From dbf67eb6d58ba5a2c8f1bfe8ee23815c6f082904 Mon Sep 17 00:00:00 2001
From: Mohsen Rezaei Estabragh <mohsen.rezaei.estabragh@cern.ch>
Date: Fri, 13 Mar 2020 18:14:17 +0100
Subject: [PATCH 001/403] elementary modifications, baselines

---
 Tools/PyJobTransforms/python/trfExe.py        | 7 +++++++
 Tools/PyJobTransforms/python/trfReports.py    | 1 +
 Tools/PyJobTransforms/python/trfUtils.py      | 4 ++++
 Tools/PyJobTransforms/test/test_trfReports.py | 5 +++++
 4 files changed, 17 insertions(+)

diff --git a/Tools/PyJobTransforms/python/trfExe.py b/Tools/PyJobTransforms/python/trfExe.py
index cfb198bfe41a..d4e4ee6aa0e3 100755
--- a/Tools/PyJobTransforms/python/trfExe.py
+++ b/Tools/PyJobTransforms/python/trfExe.py
@@ -381,6 +381,13 @@ class transformExecutor(object):
     def memStats(self):
         return self._memStats
 
+    @property
+    def memEval(self):
+        if self._memStats:
+            return calcMemExcess(self._memStats)
+        else:
+            return None
+
     @property
     def postExeCpuTime(self):
         if self._exeStop and self._valStart:
diff --git a/Tools/PyJobTransforms/python/trfReports.py b/Tools/PyJobTransforms/python/trfReports.py
index 63e009b90dee..eb4036bd303f 100644
--- a/Tools/PyJobTransforms/python/trfReports.py
+++ b/Tools/PyJobTransforms/python/trfReports.py
@@ -656,6 +656,7 @@ def exeResourceReport(exe, report):
 
     if exe.memStats:
         exeResource['memory'] = exe.memStats
+        exeResource['MaxVMEM'] = exe.memEval
     if exe.eventCount:
         exeResource['nevents'] = exe.eventCount
     if exe.athenaMP:
diff --git a/Tools/PyJobTransforms/python/trfUtils.py b/Tools/PyJobTransforms/python/trfUtils.py
index 230ba083f46d..f27834cedd38 100644
--- a/Tools/PyJobTransforms/python/trfUtils.py
+++ b/Tools/PyJobTransforms/python/trfUtils.py
@@ -1296,3 +1296,7 @@ def bind_port(host, port):
         ret=1
     s.close()
     return ret
+
+def calcMemExcess(memStat):
+    maxVmem = memStat['Max']['maxVMEM']
+    return Vmem
diff --git a/Tools/PyJobTransforms/test/test_trfReports.py b/Tools/PyJobTransforms/test/test_trfReports.py
index d709c2dd5ad6..201461dc933e 100755
--- a/Tools/PyJobTransforms/test/test_trfReports.py
+++ b/Tools/PyJobTransforms/test/test_trfReports.py
@@ -44,6 +44,9 @@ class trfFileReportUnitTests(unittest.TestCase):
         self.myMultiFile = trfArgClasses.argFile(['file1', 'file2', 'file3'], name = 'inputTEST_MULTIFile', io = 'input', guid = {'file1': '05ACBDD0-5F5F-4E2E-974A-BBF4F4FE6F0B', 'file2': '1368D295-27C6-4A92-8187-704C2A6A5864', 'file3': 'F5BA4602-6CA7-4111-B3C7-CB06486B30D9'})
         self.myMultiFileReport = trfFileReport(self.myMultiFile)
 
+        self.mytrfReport = trfReport() # trfArgClasses.argFile(['file1'], name = 'inputTEST_SINGLEFile', io = 'input', guid = {'file1': '05ACBDD0-5F5F-4E2E-974A-BBF4F4FE6F0B'}) ##??? should be contain of all keys???
+        self.myJobReport = trfJobReport(self.mytrfReport)
+        
     def tearDown(self):
         for f in 'file1', 'file2', 'file3':
             try:
@@ -66,6 +69,8 @@ class trfFileReportUnitTests(unittest.TestCase):
         self.assertEqual(self.myMultiFileReport.python(type = 'full'), {'argName': 'inputTEST_MULTIFile', 'subFiles': [{'file_guid': '05ACBDD0-5F5F-4E2E-974A-BBF4F4FE6F0B', 'name': 'file1', 'file_size': 20}, {'file_guid': '1368D295-27C6-4A92-8187-704C2A6A5864', 'name': 'file2', 'file_size': 13}, {'file_guid': 'F5BA4602-6CA7-4111-B3C7-CB06486B30D9', 'name': 'file3', 'file_size': 174}], 'type': None, 'dataset': None})
         self.assertEqual(self.myMultiFileReport.python(type = 'name'), {'subFiles': [{'file_guid': '05ACBDD0-5F5F-4E2E-974A-BBF4F4FE6F0B', 'name': 'file1'}, {'file_guid': '1368D295-27C6-4A92-8187-704C2A6A5864', 'name': 'file2'}, {'file_guid': 'F5BA4602-6CA7-4111-B3C7-CB06486B30D9', 'name': 'file3'}], 'nentries': 'UNDEFINED', 'dataset': None})
 
+    def test_JobReportPython(self):
+        self.assertEqual(self.myJobReport.python(),{} )
 
 class machineReportUnitTests(unittest.TestCase):
     # Following tests don't test content, just that the generation of the objects happens correctly
-- 
GitLab


From 6870e2e2c38bf99aaee6906e217f092adab5642c Mon Sep 17 00:00:00 2001
From: Mohsen Rezaei Estabragh <mohsen.rezaei.estabragh@cern.ch>
Date: Thu, 25 Jun 2020 08:39:00 +0200
Subject: [PATCH 002/403] reading full mem file and reporting first line of
 this file to jobReport

---
 Tools/PyJobTransforms/python/trfExe.py     | 20 +++++++++++++++++---
 Tools/PyJobTransforms/python/trfReports.py |  9 ++++++++-
 Tools/PyJobTransforms/python/trfUtils.py   | 13 +++++++++++--
 3 files changed, 36 insertions(+), 6 deletions(-)

diff --git a/Tools/PyJobTransforms/python/trfExe.py b/Tools/PyJobTransforms/python/trfExe.py
index d4e4ee6aa0e3..247b3a4bf804 100755
--- a/Tools/PyJobTransforms/python/trfExe.py
+++ b/Tools/PyJobTransforms/python/trfExe.py
@@ -38,7 +38,7 @@ msg = logging.getLogger(__name__)
 
 from PyJobTransforms.trfJobOptions import JobOptionsTemplate
 from PyJobTransforms.trfUtils import asetupReport, unpackDBRelease, setupDBRelease, cvmfsDBReleaseCheck, forceToAlphaNum
-from PyJobTransforms.trfUtils import ValgrindCommand, isInteractiveEnv, calcCpuTime, calcWallTime
+from PyJobTransforms.trfUtils import ValgrindCommand, isInteractiveEnv, calcCpuTime, calcWallTime, calcMemExcess, calcMemFull
 from PyJobTransforms.trfUtils import bind_port
 from PyJobTransforms.trfExitCodes import trfExit
 from PyJobTransforms.trfLogger import stdLogLevels
@@ -184,6 +184,7 @@ class transformExecutor(object):
         self._exeStart = self._exeStop = None
         self._valStart = self._valStop = None
         self._memStats = {}
+        self._memFullStats = ''
         self._eventCount = None
         self._athenaMP = None
         self._athenaMT = None
@@ -388,6 +389,13 @@ class transformExecutor(object):
         else:
             return None
 
+    @property
+    def memFullEval(self):
+        if self._memFullStats:
+            return calcMemFull(self._memFullStats)
+        else:
+            return 'cant read full mem file'
+
     @property
     def postExeCpuTime(self):
         if self._exeStop and self._valStart:
@@ -724,6 +732,7 @@ class scriptExecutor(transformExecutor):
             if self._memMonitor:
                 try:
                     self._memSummaryFile = 'prmon.summary.' + self._name + '.json'
+                    self._memFullFile = 'prmon.full.' + self._name
                     memMonitorCommand = ['prmon', '--pid', str(p.pid), '--filename', 'prmon.full.' + self._name, 
                                          '--json-summary', self._memSummaryFile, '--interval', '30']
                     mem_proc = subprocess.Popen(memMonitorCommand, shell = False, close_fds=True, **encargs)
@@ -771,7 +780,13 @@ class scriptExecutor(transformExecutor):
                 msg.warning('Failed to load JSON memory summmary file {0}: {1}'.format(self._memSummaryFile, e))
                 self._memMonitor = False
                 self._memStats = {}
-            
+            try:
+                self._memFullStats = open(self._memFullFile)
+            except Exception as e:
+                msg.warning('Failed to load JSON memory full file {0}: {1}'.format(self._memFullFile, e))
+                self._memMonitor = False
+                self._memFullStats = 'could not open mem.full file!!'
+
 
     def validate(self):
         if self._valStart is None:
@@ -812,7 +827,6 @@ class scriptExecutor(transformExecutor):
         msg.debug('valStop time is {0}'.format(self._valStop))
 
 
-
 class athenaExecutor(scriptExecutor):
     _exitMessageLimit = 200 # Maximum error message length to report in the exitMsg
     _defaultIgnorePatternFile = ['atlas_error_mask.db']
diff --git a/Tools/PyJobTransforms/python/trfReports.py b/Tools/PyJobTransforms/python/trfReports.py
index eb4036bd303f..b86f1b499903 100644
--- a/Tools/PyJobTransforms/python/trfReports.py
+++ b/Tools/PyJobTransforms/python/trfReports.py
@@ -656,7 +656,14 @@ def exeResourceReport(exe, report):
 
     if exe.memStats:
         exeResource['memory'] = exe.memStats
-        exeResource['MaxVMEM'] = exe.memEval
+        if exe.memEval:
+            exeResource['MaxVMEM'] = exe.memEval
+        else:
+            exeResource['MaxVMEM'] = 'at least report this'
+        if exe.memFullEval:
+            exeResource['FullMem'] = exe.memFullEval
+        else:
+            exeResource['FullMem'] = 'at least report this'
     if exe.eventCount:
         exeResource['nevents'] = exe.eventCount
     if exe.athenaMP:
diff --git a/Tools/PyJobTransforms/python/trfUtils.py b/Tools/PyJobTransforms/python/trfUtils.py
index f27834cedd38..63cf5c79c4c0 100644
--- a/Tools/PyJobTransforms/python/trfUtils.py
+++ b/Tools/PyJobTransforms/python/trfUtils.py
@@ -1298,5 +1298,14 @@ def bind_port(host, port):
     return ret
 
 def calcMemExcess(memStat):
-    maxVmem = memStat['Max']['maxVMEM']
-    return Vmem
+    maxVmem = memStat['Max']['vmem']
+    reportSum = 'couldnt get it'
+    reportSum = maxVmem
+    return reportSum
+
+def calcMemFull(memFullStats):
+    reportFull = 'in utiles: can not read lines!!'
+    for line in memFullStats:
+        reportFull = line
+        break
+    return reportFull
-- 
GitLab


From 92ecf89f8d74409aa756b478f1db7757ae0de690 Mon Sep 17 00:00:00 2001
From: Mohsen Rezaei Estabragh <mohsen.rezaei.estabragh@cern.ch>
Date: Thu, 2 Jul 2020 09:37:28 +0200
Subject: [PATCH 003/403] removing redundancies

---
 Tools/PyJobTransforms/python/trfExe.py        | 11 ++---------
 Tools/PyJobTransforms/python/trfReports.py    |  4 ----
 Tools/PyJobTransforms/python/trfUtils.py      |  6 ------
 Tools/PyJobTransforms/test/test_trfReports.py |  5 -----
 4 files changed, 2 insertions(+), 24 deletions(-)

diff --git a/Tools/PyJobTransforms/python/trfExe.py b/Tools/PyJobTransforms/python/trfExe.py
index 247b3a4bf804..4852574ab83d 100755
--- a/Tools/PyJobTransforms/python/trfExe.py
+++ b/Tools/PyJobTransforms/python/trfExe.py
@@ -38,7 +38,7 @@ msg = logging.getLogger(__name__)
 
 from PyJobTransforms.trfJobOptions import JobOptionsTemplate
 from PyJobTransforms.trfUtils import asetupReport, unpackDBRelease, setupDBRelease, cvmfsDBReleaseCheck, forceToAlphaNum
-from PyJobTransforms.trfUtils import ValgrindCommand, isInteractiveEnv, calcCpuTime, calcWallTime, calcMemExcess, calcMemFull
+from PyJobTransforms.trfUtils import ValgrindCommand, isInteractiveEnv, calcCpuTime, calcWallTime, calcMemFull
 from PyJobTransforms.trfUtils import bind_port
 from PyJobTransforms.trfExitCodes import trfExit
 from PyJobTransforms.trfLogger import stdLogLevels
@@ -382,13 +382,6 @@ class transformExecutor(object):
     def memStats(self):
         return self._memStats
 
-    @property
-    def memEval(self):
-        if self._memStats:
-            return calcMemExcess(self._memStats)
-        else:
-            return None
-
     @property
     def memFullEval(self):
         if self._memFullStats:
@@ -787,7 +780,6 @@ class scriptExecutor(transformExecutor):
                 self._memMonitor = False
                 self._memFullStats = 'could not open mem.full file!!'
 
-
     def validate(self):
         if self._valStart is None:
             self._valStart = os.times()
@@ -827,6 +819,7 @@ class scriptExecutor(transformExecutor):
         msg.debug('valStop time is {0}'.format(self._valStop))
 
 
+
 class athenaExecutor(scriptExecutor):
     _exitMessageLimit = 200 # Maximum error message length to report in the exitMsg
     _defaultIgnorePatternFile = ['atlas_error_mask.db']
diff --git a/Tools/PyJobTransforms/python/trfReports.py b/Tools/PyJobTransforms/python/trfReports.py
index b86f1b499903..9d7fdee6c110 100644
--- a/Tools/PyJobTransforms/python/trfReports.py
+++ b/Tools/PyJobTransforms/python/trfReports.py
@@ -656,10 +656,6 @@ def exeResourceReport(exe, report):
 
     if exe.memStats:
         exeResource['memory'] = exe.memStats
-        if exe.memEval:
-            exeResource['MaxVMEM'] = exe.memEval
-        else:
-            exeResource['MaxVMEM'] = 'at least report this'
         if exe.memFullEval:
             exeResource['FullMem'] = exe.memFullEval
         else:
diff --git a/Tools/PyJobTransforms/python/trfUtils.py b/Tools/PyJobTransforms/python/trfUtils.py
index 63cf5c79c4c0..43918b56ed8b 100644
--- a/Tools/PyJobTransforms/python/trfUtils.py
+++ b/Tools/PyJobTransforms/python/trfUtils.py
@@ -1297,12 +1297,6 @@ def bind_port(host, port):
     s.close()
     return ret
 
-def calcMemExcess(memStat):
-    maxVmem = memStat['Max']['vmem']
-    reportSum = 'couldnt get it'
-    reportSum = maxVmem
-    return reportSum
-
 def calcMemFull(memFullStats):
     reportFull = 'in utiles: can not read lines!!'
     for line in memFullStats:
diff --git a/Tools/PyJobTransforms/test/test_trfReports.py b/Tools/PyJobTransforms/test/test_trfReports.py
index 201461dc933e..d709c2dd5ad6 100755
--- a/Tools/PyJobTransforms/test/test_trfReports.py
+++ b/Tools/PyJobTransforms/test/test_trfReports.py
@@ -44,9 +44,6 @@ class trfFileReportUnitTests(unittest.TestCase):
         self.myMultiFile = trfArgClasses.argFile(['file1', 'file2', 'file3'], name = 'inputTEST_MULTIFile', io = 'input', guid = {'file1': '05ACBDD0-5F5F-4E2E-974A-BBF4F4FE6F0B', 'file2': '1368D295-27C6-4A92-8187-704C2A6A5864', 'file3': 'F5BA4602-6CA7-4111-B3C7-CB06486B30D9'})
         self.myMultiFileReport = trfFileReport(self.myMultiFile)
 
-        self.mytrfReport = trfReport() # trfArgClasses.argFile(['file1'], name = 'inputTEST_SINGLEFile', io = 'input', guid = {'file1': '05ACBDD0-5F5F-4E2E-974A-BBF4F4FE6F0B'}) ##??? should be contain of all keys???
-        self.myJobReport = trfJobReport(self.mytrfReport)
-        
     def tearDown(self):
         for f in 'file1', 'file2', 'file3':
             try:
@@ -69,8 +66,6 @@ class trfFileReportUnitTests(unittest.TestCase):
         self.assertEqual(self.myMultiFileReport.python(type = 'full'), {'argName': 'inputTEST_MULTIFile', 'subFiles': [{'file_guid': '05ACBDD0-5F5F-4E2E-974A-BBF4F4FE6F0B', 'name': 'file1', 'file_size': 20}, {'file_guid': '1368D295-27C6-4A92-8187-704C2A6A5864', 'name': 'file2', 'file_size': 13}, {'file_guid': 'F5BA4602-6CA7-4111-B3C7-CB06486B30D9', 'name': 'file3', 'file_size': 174}], 'type': None, 'dataset': None})
         self.assertEqual(self.myMultiFileReport.python(type = 'name'), {'subFiles': [{'file_guid': '05ACBDD0-5F5F-4E2E-974A-BBF4F4FE6F0B', 'name': 'file1'}, {'file_guid': '1368D295-27C6-4A92-8187-704C2A6A5864', 'name': 'file2'}, {'file_guid': 'F5BA4602-6CA7-4111-B3C7-CB06486B30D9', 'name': 'file3'}], 'nentries': 'UNDEFINED', 'dataset': None})
 
-    def test_JobReportPython(self):
-        self.assertEqual(self.myJobReport.python(),{} )
 
 class machineReportUnitTests(unittest.TestCase):
     # Following tests don't test content, just that the generation of the objects happens correctly
-- 
GitLab


From 9f8eec9e39f1ad08abafe139db1b705cf7c7054d Mon Sep 17 00:00:00 2001
From: Mohsen Rezaei Estabragh <mohsen.rezaei.estabragh@cern.ch>
Date: Fri, 10 Jul 2020 21:47:26 +0200
Subject: [PATCH 004/403] codes from Pilot work properly

---
 Tools/PyJobTransforms/python/trfExe.py        |  20 +-
 Tools/PyJobTransforms/python/trfReports.py    |   7 +-
 Tools/PyJobTransforms/python/trfUtils.py      | 381 +++++++++++++++++-
 Tools/PyJobTransforms/python/trfValidation.py |  11 +
 4 files changed, 400 insertions(+), 19 deletions(-)

diff --git a/Tools/PyJobTransforms/python/trfExe.py b/Tools/PyJobTransforms/python/trfExe.py
index 4852574ab83d..da85d51ee490 100755
--- a/Tools/PyJobTransforms/python/trfExe.py
+++ b/Tools/PyJobTransforms/python/trfExe.py
@@ -39,7 +39,6 @@ msg = logging.getLogger(__name__)
 from PyJobTransforms.trfJobOptions import JobOptionsTemplate
 from PyJobTransforms.trfUtils import asetupReport, unpackDBRelease, setupDBRelease, cvmfsDBReleaseCheck, forceToAlphaNum
 from PyJobTransforms.trfUtils import ValgrindCommand, isInteractiveEnv, calcCpuTime, calcWallTime, calcMemFull
-from PyJobTransforms.trfUtils import bind_port
 from PyJobTransforms.trfExitCodes import trfExit
 from PyJobTransforms.trfLogger import stdLogLevels
 from PyJobTransforms.trfMPTools import detectAthenaMPProcs, athenaMPOutputHandler
@@ -184,7 +183,6 @@ class transformExecutor(object):
         self._exeStart = self._exeStop = None
         self._valStart = self._valStop = None
         self._memStats = {}
-        self._memFullStats = ''
         self._eventCount = None
         self._athenaMP = None
         self._athenaMT = None
@@ -384,8 +382,8 @@ class transformExecutor(object):
 
     @property
     def memFullEval(self):
-        if self._memFullStats:
-            return calcMemFull(self._memFullStats)
+        if self._memFullFile:
+            return calcMemFull(self._memFullFile)
         else:
             return 'cant read full mem file'
 
@@ -773,12 +771,6 @@ class scriptExecutor(transformExecutor):
                 msg.warning('Failed to load JSON memory summmary file {0}: {1}'.format(self._memSummaryFile, e))
                 self._memMonitor = False
                 self._memStats = {}
-            try:
-                self._memFullStats = open(self._memFullFile)
-            except Exception as e:
-                msg.warning('Failed to load JSON memory full file {0}: {1}'.format(self._memFullFile, e))
-                self._memMonitor = False
-                self._memFullStats = 'could not open mem.full file!!'
 
     def validate(self):
         if self._valStart is None:
@@ -818,6 +810,14 @@ class scriptExecutor(transformExecutor):
         self._valStop = os.times()
         msg.debug('valStop time is {0}'.format(self._valStop))
 
+        ## check memory monitor results
+        # add information to the exit message if an excess has seen
+        fitResult = trfValidation.memoryMonitorReport().fitToMem(self._memFullFile)
+        if fitResult and self._errMsg:
+            msg.error('Excess in memory monitor parameter(s)')
+            self._errMsg = self._errMsg + "; high slope : {0}".format(fitResult['slope'])
+        #raise trfExceptions.TransformLogfileErrorException(trfExit.nameToCode('TRF_EXEC_LOGERROR'),
+        #                                                          'Fatal error in memory monitor: "{0}"'.format(exitErrorMessage))
 
 
 class athenaExecutor(scriptExecutor):
diff --git a/Tools/PyJobTransforms/python/trfReports.py b/Tools/PyJobTransforms/python/trfReports.py
index 9d7fdee6c110..a6006d009b47 100644
--- a/Tools/PyJobTransforms/python/trfReports.py
+++ b/Tools/PyJobTransforms/python/trfReports.py
@@ -656,10 +656,11 @@ def exeResourceReport(exe, report):
 
     if exe.memStats:
         exeResource['memory'] = exe.memStats
+    #it failes when it is aligned with the other
+    #if exe.memFullEval:
+    #   exeResource['memoryAnalyse'] = exe.memFullEval
         if exe.memFullEval:
-            exeResource['FullMem'] = exe.memFullEval
-        else:
-            exeResource['FullMem'] = 'at least report this'
+            exeResource['memoryAnalyse'] = exe.memFullEval
     if exe.eventCount:
         exeResource['nevents'] = exe.eventCount
     if exe.athenaMP:
diff --git a/Tools/PyJobTransforms/python/trfUtils.py b/Tools/PyJobTransforms/python/trfUtils.py
index 43918b56ed8b..17ff61ff8671 100644
--- a/Tools/PyJobTransforms/python/trfUtils.py
+++ b/Tools/PyJobTransforms/python/trfUtils.py
@@ -1199,6 +1199,378 @@ class ParallelJobProcessor(object):
         ))
         msg.debug(self.statusReport())
 
+
+class analytic():
+    """
+    Analytics service class.
+    """
+
+    _fit = None
+
+    def __init__(self, **kwargs):
+        """
+        Init function.
+        :param kwargs:
+        """
+        self._fit = None
+        self._memTable = memFullFileToTable()
+
+    def fit(self, x, y, model='linear'):
+        """
+        Fitting function.
+        For a linear model: y(x) = slope * x + intersect
+        :param x: list of input data (list of floats or ints).
+        :param y: list of input data (list of floats or ints).
+        :param model: model name (string).
+        :raises UnknownException: in case Fit() fails.
+        :return:
+        """
+
+        try:
+            self._fit = Fit(x=x, y=y, model=model)
+        except Exception as e:
+            msg.warning('fit failed! {0}'.format(e))
+
+        return self._fit
+
+    def slope(self):
+        """
+        Return the slope of a linear fit, y(x) = slope * x + intersect.
+        :return: slope (float).
+        """
+
+        slope = None
+
+        if self._fit:
+            slope = self._fit.slope()
+        else:
+            msg.warning('Fit has not been defined')
+
+        return slope
+
+    def get_fitted_data(self, filename, x_name='Time', y_name='pss+swap', precision=2, tails=True):
+        """
+        Return a properly formatted job metrics string with analytics data.
+        Currently the function returns a fit for PSS+Swap vs time, whose slope measures memory leaks.
+        :param filename: full path to memory monitor output (string).
+        :param x_name: optional string, name selector for table column.
+        :param y_name: optional string, name selector for table column.
+        :param precision: optional precision for fitted slope parameter, default 2.
+        :param tails: should tails (first and last values) be used? (boolean).
+        :return: {"slope": slope, "chi2": chi2} (float strings with desired precision).
+        """
+        self._math = math()
+        slope = ""
+        chi2 = ""
+        table = self._memTable.get_table_from_file(filename,header=None, separator="\t", convert_to_float=True)
+
+        if table:
+            # extract data to be fitted
+            x, y = self.extract_from_table(table, x_name, y_name)
+
+            # remove tails if desired
+            # this is useful e.g. for memory monitor data where the first and last values
+            # represent allocation and de-allocation, ie not interesting
+            if not tails and len(x) > 7 and len(y) > 7:
+                msg.debug('removing tails from data to be fitted')
+                x = x[5:]
+                x = x[:-2]
+                y = y[5:]
+                y = y[:-2]
+
+            if len(x) > 7 and len(y) > 7:
+                msg.info('fitting {0} vs {1}'.format(y_name, x_name))
+                try:
+                    fit = self.fit(x, y)
+                    _slope = self.slope()
+                    print(_slope)
+                except Exception as e:
+                    msg.warning('failed to fit data, x={0}, y={1}: {2}'.format(x, y, e))
+                else:
+                    if _slope:
+                        slope = round(fit.slope(), 2)
+                        chi2 = fit.chi2()
+                        if slope != "":
+                            msg.info('current memory leak: {0} B/s (using {1} data points, chi2={2})'.format(slope, len(x), chi2))
+            else:
+                msg.warning('wrong length of table data, x={0}, y={1} (must be same and length>=4)'.format(x, y))
+
+        return {"slope": slope, "chi2": chi2}
+
+    def extract_from_table(self, table, x_name, y_name):
+        """
+        :param table: dictionary with columns.
+        :param x_name: column name to be extracted (string).
+        :param y_name: column name to be extracted (may contain '+'-sign) (string).
+        :return: x (list), y (list).
+        """
+
+        x = table.get(x_name, [])
+        if '+' not in y_name:
+            y = table.get(y_name, [])
+        else:
+            try:
+                y1_name = y_name.split('+')[0]
+                y2_name = y_name.split('+')[1]
+                y1_value = table.get(y1_name, [])
+                y2_value = table.get(y2_name, [])
+            except Exception as e:
+                msg.warning('exception caught: {0}'.format(e))
+                x = []
+                y = []
+            else:
+                # create new list with added values (1,2,3) + (4,5,6) = (5,7,9)
+                y = [x0 + y0 for x0, y0 in zip(y1_value, y2_value)]
+
+        return x, y
+
+
+class Fit():
+    """
+    Low-level fitting class.
+    """
+    _model = 'linear'  # fitting model
+    _x = None  # x values
+    _y = None  # y values
+    _xm = None  # x mean
+    _ym = None  # y mean
+    _ss = None  # sum of square deviations
+    _ss2 = None  # sum of deviations
+    _slope = None  # slope
+    _intersect = None  # intersect
+    _chi2 = None  # chi2
+
+    def __init__(self, **kwargs):
+        """
+        Init function.
+        :param kwargs:
+        """
+        self._math = math()
+        # extract parameters
+        self._model = kwargs.get('model', 'linear')
+        self._x = kwargs.get('x', None)
+        self._y = kwargs.get('y', None)
+
+        if not self._x or not self._y:
+            msg.warning('input data not defined')
+
+        if len(self._x) != len(self._y):
+            msg.warning('input data (lists) have different lengths')
+
+        # base calculations
+        if self._model == 'linear':
+            self._ss = self._math.sum_square_dev(self._x)
+            self._ss2 = self._math.sum_dev(self._x, self._y)
+            self.set_slope()
+            self._xm = self._math.mean(self._x)
+            self._ym = self._math.mean(self._y)
+            self.set_intersect()
+            self.set_chi2()
+
+        else:
+            msg.warning("\'{0}\' model is not implemented".format(self._model))
+
+    def fit(self):
+        """
+        Return fitting object.
+        :return: fitting object.
+        """
+
+        return self
+
+    def value(self, t):
+        """
+        Return the value y(x=t) of a linear fit y(x) = slope * x + intersect.
+        :return: intersect (float).
+        """
+
+        return self._slope * t + self._intersect
+
+    def set_chi2(self):
+        """
+        Calculate and set the chi2 value.
+        :return:
+        """
+
+        y_observed = self._y
+        y_expected = []
+        #i = 0
+        for x in self._x:
+            #y_expected.append(self.value(x) - y_observed[i])
+            y_expected.append(self.value(x))
+            #i += 1
+        if y_observed and y_observed != [] and y_expected and y_expected != []:
+            self._chi2 = self._math.chi2(y_observed, y_expected)
+        else:
+            self._chi2 = None
+
+    def chi2(self):
+        """
+        Return the chi2 value.
+        :return: chi2 (float).
+        """
+
+        return self._chi2
+
+    def set_slope(self):
+        """
+        Calculate and set the slope of the linear fit.
+        :return:
+        """
+
+        if self._ss2 and self._ss and self._ss != 0:
+            self._slope = self._ss2 / self._ss
+        else:
+            self._slope = None
+
+    def slope(self):
+        """
+        Return the slope value.
+        :return: slope (float).
+        """
+
+        return self._slope
+
+    def set_intersect(self):
+        """
+        Calculate and set the intersect of the linear fit.
+        :return:
+        """
+
+        if self._ym and self._slope and self._xm:
+            self._intersect = self._ym - self._slope * self._xm
+        else:
+            self._intersect = None
+
+    def intersect(self):
+        """
+        Return the intersect value.
+        :return: intersect (float).
+        """
+
+        return self._intersect
+
+
+class math():
+
+    def mean(self, data):
+        n = len(data)
+        if n < 1:
+            msg.warning('mean requires at least one data point')
+
+        return sum(data)/n
+
+    def sum_square_dev(self, data):
+        c = self.mean(data)
+        return sum((x - c) ** 2 for x in data)
+
+    def sum_dev(self, x, y):
+        c1 = self.mean(x)
+        c2 = self.mean(y)
+        return sum((_x - c1) * (_y - c2) for _x, _y in zip(x, y))
+
+    def chi2(self, observed, expected):
+        """
+        Return the chi2 sum of the provided observed and expected values.
+        :param observed: list of floats.
+        :param expected: list of floats.
+        :return: chi2 (float).
+        """
+        if 0 in expected:
+            return 0.0
+        return sum((_o - _e) ** 2 / _e for _o, _e in zip(observed, expected))
+
+
+class memFullFileToTable():
+
+    def get_table_from_file(self, filename, header=None, separator="\t", convert_to_float=None):
+        """
+        Extract a table of data from a txt file.
+        E.g.
+        header="Time VMEM PSS RSS Swap rchar wchar rbytes wbytes"
+        or the first line in the file is
+        Time VMEM PSS RSS Swap rchar wchar rbytes wbytes
+        each of which will become keys in the dictionary, whose corresponding values are stored in lists, with the entries
+        corresponding to the values in the rows of the input file.
+        The output dictionary will have the format
+        {'Time': [ .. data from first row .. ], 'VMEM': [.. data from second row], ..}
+        :param filename: name of input text file, full path (string).
+        :param header: header string.
+        :param separator: separator character (char).
+        :param convert_to_float: boolean, if True, all values will be converted to floats.
+        :return: dictionary.
+        """
+        tabledict = {}
+        keylist = []  # ordered list of dictionary key names
+        try:
+            f = open(filename, 'r')
+        except Exception as e:
+            msg.warning("failed to open file: {0}, {1}".format(filename, e))
+        else:
+            firstline = True
+            for line in f:
+                fields = line.split(separator)
+                if firstline:
+                    firstline = False
+                    tabledict, keylist = self._define_tabledict_keys(header, fields, separator)
+                    if not header:
+                        continue
+
+                # from now on, fill the dictionary fields with the input data
+                i = 0
+                for field in fields:
+                    # get the corresponding dictionary key from the keylist
+                    key = keylist[i]
+                    # store the field value in the correct list
+                    # TODO: do we need converting to float?
+                    if convert_to_float:
+                        try:
+                            field = float(field)
+                        except Exception as e:
+                            msg.warning("failed to convert {0} to float: {1} (aborting)".format(field, e))
+                            return None
+                    tabledict[key].append(field)
+                    i += 1
+            f.close()
+        return tabledict
+
+    def _define_tabledict_keys(self, header, fields, separator):
+        """
+        Define the keys for the tabledict dictionary.
+        Note: this function is only used by parse_table_from_file().
+        :param header: header string.
+        :param fields: header content string.
+        :param separator: separator character (char).
+        :return: tabledict (dictionary), keylist (ordered list with dictionary key names).
+        """
+
+        tabledict = {}
+        keylist = []
+
+        if not header:
+            # get the dictionary keys from the header of the file
+            for key in fields:
+                # first line defines the header, whose elements will be used as dictionary keys
+                if key == '':
+                    continue
+                if key.endswith('\n'):
+                    key = key[:-1]
+                tabledict[key] = []
+                keylist.append(key)
+        else:
+            # get the dictionary keys from the provided header
+            keys = header.split(separator)
+            for key in keys:
+                if key == '':
+                    continue
+                if key.endswith('\n'):
+                    key = key[:-1]
+                tabledict[key] = []
+                keylist.append(key)
+
+        return tabledict, keylist
+
+
 ### @brief return Valgrind command
 #   @detail This function returns a Valgrind command for use with Athena. The
 #   command is returned as a string (by default) or a list, as requested using
@@ -1297,9 +1669,6 @@ def bind_port(host, port):
     s.close()
     return ret
 
-def calcMemFull(memFullStats):
-    reportFull = 'in utiles: can not read lines!!'
-    for line in memFullStats:
-        reportFull = line
-        break
-    return reportFull
+def calcMemFull(memFullStatFile):
+    result = analytic().get_fitted_data(memFullStatFile, x_name='Time', y_name='pss+swap', precision=2, tails=True)
+    return result
diff --git a/Tools/PyJobTransforms/python/trfValidation.py b/Tools/PyJobTransforms/python/trfValidation.py
index 38abe22d18fb..8ee7aeb05309 100644
--- a/Tools/PyJobTransforms/python/trfValidation.py
+++ b/Tools/PyJobTransforms/python/trfValidation.py
@@ -106,6 +106,17 @@ def corruptionTestBS(filename):
     rc = p.returncode
     return rc
 
+class memoryMonitorReport():
+    '''
+    def __init__(self):
+        self._memFile = memFullStatFile
+        self._math = trfUtils.math()
+        self._fit = None
+        self._memTable = trfUtils.memFullFileToTable()
+    '''
+    def fitToMem(self, memFullStatFile):
+        result = trfUtils.analytic().get_fitted_data(memFullStatFile, x_name='Time', y_name='pss+swap', precision=2, tails=True)
+        return result
 
 ## @brief Class of patterns that can be ignored from athena logfiles
 class ignorePatterns(object):
-- 
GitLab


From 0ae9cb368d8f9469f4aaeb3389024ede5d7a6868 Mon Sep 17 00:00:00 2001
From: Mohsen Rezaei Estabragh <mohsen.rezaei.estabragh@cern.ch>
Date: Thu, 23 Jul 2020 13:34:16 +0200
Subject: [PATCH 005/403] adapting comments to ATLAS style. replacing
 memFullToTalbe class with only functions

---
 Tools/PyJobTransforms/python/trfUtils.py | 302 +++++++++--------------
 1 file changed, 115 insertions(+), 187 deletions(-)

diff --git a/Tools/PyJobTransforms/python/trfUtils.py b/Tools/PyJobTransforms/python/trfUtils.py
index 17ff61ff8671..f641af0642bf 100644
--- a/Tools/PyJobTransforms/python/trfUtils.py
+++ b/Tools/PyJobTransforms/python/trfUtils.py
@@ -1199,33 +1199,21 @@ class ParallelJobProcessor(object):
         ))
         msg.debug(self.statusReport())
 
-
+## @brief Analytics service class
 class analytic():
-    """
-    Analytics service class.
-    """
 
     _fit = None
 
     def __init__(self, **kwargs):
-        """
-        Init function.
-        :param kwargs:
-        """
         self._fit = None
-        self._memTable = memFullFileToTable()
 
+    ## Fitting function
+    #  For a linear model: y(x) = slope * x + intersect
+    #  @param x list of input data (list of floats or ints).
+    #  @param y: list of input data (list of floats or ints).
+    #  @param model: model name (string).
+    #  raises UnknownException: in case Fit() fails.
     def fit(self, x, y, model='linear'):
-        """
-        Fitting function.
-        For a linear model: y(x) = slope * x + intersect
-        :param x: list of input data (list of floats or ints).
-        :param y: list of input data (list of floats or ints).
-        :param model: model name (string).
-        :raises UnknownException: in case Fit() fails.
-        :return:
-        """
-
         try:
             self._fit = Fit(x=x, y=y, model=model)
         except Exception as e:
@@ -1233,12 +1221,8 @@ class analytic():
 
         return self._fit
 
+    # Return the slope of a linear fit, y(x) = slope * x + intersect
     def slope(self):
-        """
-        Return the slope of a linear fit, y(x) = slope * x + intersect.
-        :return: slope (float).
-        """
-
         slope = None
 
         if self._fit:
@@ -1248,21 +1232,19 @@ class analytic():
 
         return slope
 
+    # Return a properly formatted job metrics string with analytics data.
+    # Currently the function returns a fit for PSS+Swap vs time, whose slope measures memory leaks.
+    # @param filename: memory monitor output file (string).
+    # @param x_name: optional string, name selector for table column.
+    # @param y_name: optional string, name selector for table column.
+    # @param precision: optional precision for fitted slope parameter, default 2.
+    # @param tails: should tails (first and last values) be used? (boolean).
+    # @return: {"slope": slope, "chi2": chi2} (float strings with desired precision).
     def get_fitted_data(self, filename, x_name='Time', y_name='pss+swap', precision=2, tails=True):
-        """
-        Return a properly formatted job metrics string with analytics data.
-        Currently the function returns a fit for PSS+Swap vs time, whose slope measures memory leaks.
-        :param filename: full path to memory monitor output (string).
-        :param x_name: optional string, name selector for table column.
-        :param y_name: optional string, name selector for table column.
-        :param precision: optional precision for fitted slope parameter, default 2.
-        :param tails: should tails (first and last values) be used? (boolean).
-        :return: {"slope": slope, "chi2": chi2} (float strings with desired precision).
-        """
         self._math = math()
         slope = ""
         chi2 = ""
-        table = self._memTable.get_table_from_file(filename,header=None, separator="\t", convert_to_float=True)
+        table = get_table_from_file(filename,header=None, separator="\t", convert_to_float=True)
 
         if table:
             # extract data to be fitted
@@ -1297,14 +1279,11 @@ class analytic():
 
         return {"slope": slope, "chi2": chi2}
 
+    # Extrcat wanted columns. e.g. x: Time , y: pss+swap
+    # @param x_name: column name to be extracted (string).
+    # @param y_name: column name to be extracted (may contain '+'-sign) (string).
+    # @return: x (list), y (list).
     def extract_from_table(self, table, x_name, y_name):
-        """
-        :param table: dictionary with columns.
-        :param x_name: column name to be extracted (string).
-        :param y_name: column name to be extracted (may contain '+'-sign) (string).
-        :return: x (list), y (list).
-        """
-
         x = table.get(x_name, [])
         if '+' not in y_name:
             y = table.get(y_name, [])
@@ -1324,11 +1303,8 @@ class analytic():
 
         return x, y
 
-
+## @breif Low-level fitting class
 class Fit():
-    """
-    Low-level fitting class.
-    """
     _model = 'linear'  # fitting model
     _x = None  # x values
     _y = None  # y values
@@ -1341,16 +1317,13 @@ class Fit():
     _chi2 = None  # chi2
 
     def __init__(self, **kwargs):
-        """
-        Init function.
-        :param kwargs:
-        """
-        self._math = math()
         # extract parameters
         self._model = kwargs.get('model', 'linear')
         self._x = kwargs.get('x', None)
         self._y = kwargs.get('y', None)
 
+        self._math = math()
+
         if not self._x or not self._y:
             msg.warning('input data not defined')
 
@@ -1371,88 +1344,55 @@ class Fit():
             msg.warning("\'{0}\' model is not implemented".format(self._model))
 
     def fit(self):
-        """
-        Return fitting object.
-        :return: fitting object.
-        """
-
+        #Return fitting object.
         return self
 
     def value(self, t):
-        """
-        Return the value y(x=t) of a linear fit y(x) = slope * x + intersect.
-        :return: intersect (float).
-        """
-
+        #Return the value y(x=t) of a linear fit y(x) = slope * x + intersect.
         return self._slope * t + self._intersect
 
     def set_chi2(self):
-        """
-        Calculate and set the chi2 value.
-        :return:
-        """
-
+        #Calculate and set the chi2 value.
         y_observed = self._y
         y_expected = []
-        #i = 0
         for x in self._x:
-            #y_expected.append(self.value(x) - y_observed[i])
             y_expected.append(self.value(x))
-            #i += 1
         if y_observed and y_observed != [] and y_expected and y_expected != []:
             self._chi2 = self._math.chi2(y_observed, y_expected)
         else:
             self._chi2 = None
 
     def chi2(self):
-        """
-        Return the chi2 value.
-        :return: chi2 (float).
-        """
-
+        #Return the chi2 value.
         return self._chi2
 
     def set_slope(self):
-        """
-        Calculate and set the slope of the linear fit.
-        :return:
-        """
-
+        #Calculate and set the slope of the linear fit.
         if self._ss2 and self._ss and self._ss != 0:
             self._slope = self._ss2 / self._ss
         else:
             self._slope = None
 
     def slope(self):
-        """
-        Return the slope value.
-        :return: slope (float).
-        """
-
+        #Return the slope value.
         return self._slope
 
     def set_intersect(self):
-        """
-        Calculate and set the intersect of the linear fit.
-        :return:
-        """
-
+        #Calculate and set the intersect of the linear fit.
         if self._ym and self._slope and self._xm:
             self._intersect = self._ym - self._slope * self._xm
         else:
             self._intersect = None
 
     def intersect(self):
-        """
-        Return the intersect value.
-        :return: intersect (float).
-        """
-
+        #Return the intersect value.
         return self._intersect
 
 
+## @brief some mathematical tools
 class math():
 
+    #Return the sample arithmetic mean of data.
     def mean(self, data):
         n = len(data)
         if n < 1:
@@ -1460,115 +1400,103 @@ class math():
 
         return sum(data)/n
 
+    # Return sum of square deviations of sequence data.
+    # Sum (x - x_mean)**2
     def sum_square_dev(self, data):
         c = self.mean(data)
         return sum((x - c) ** 2 for x in data)
 
+    # Return sum of deviations of sequence data.
+    # Sum (x - x_mean)**(y - y_mean)
     def sum_dev(self, x, y):
         c1 = self.mean(x)
         c2 = self.mean(y)
         return sum((_x - c1) * (_y - c2) for _x, _y in zip(x, y))
 
+    # Return the chi2 sum of the provided observed and expected values.
     def chi2(self, observed, expected):
-        """
-        Return the chi2 sum of the provided observed and expected values.
-        :param observed: list of floats.
-        :param expected: list of floats.
-        :return: chi2 (float).
-        """
         if 0 in expected:
             return 0.0
         return sum((_o - _e) ** 2 / _e for _o, _e in zip(observed, expected))
 
-
-class memFullFileToTable():
-
-    def get_table_from_file(self, filename, header=None, separator="\t", convert_to_float=None):
-        """
-        Extract a table of data from a txt file.
-        E.g.
-        header="Time VMEM PSS RSS Swap rchar wchar rbytes wbytes"
-        or the first line in the file is
-        Time VMEM PSS RSS Swap rchar wchar rbytes wbytes
-        each of which will become keys in the dictionary, whose corresponding values are stored in lists, with the entries
-        corresponding to the values in the rows of the input file.
-        The output dictionary will have the format
-        {'Time': [ .. data from first row .. ], 'VMEM': [.. data from second row], ..}
-        :param filename: name of input text file, full path (string).
-        :param header: header string.
-        :param separator: separator character (char).
-        :param convert_to_float: boolean, if True, all values will be converted to floats.
-        :return: dictionary.
-        """
-        tabledict = {}
-        keylist = []  # ordered list of dictionary key names
-        try:
-            f = open(filename, 'r')
-        except Exception as e:
-            msg.warning("failed to open file: {0}, {1}".format(filename, e))
-        else:
-            firstline = True
-            for line in f:
-                fields = line.split(separator)
-                if firstline:
-                    firstline = False
-                    tabledict, keylist = self._define_tabledict_keys(header, fields, separator)
-                    if not header:
-                        continue
-
-                # from now on, fill the dictionary fields with the input data
-                i = 0
-                for field in fields:
-                    # get the corresponding dictionary key from the keylist
-                    key = keylist[i]
-                    # store the field value in the correct list
-                    # TODO: do we need converting to float?
-                    if convert_to_float:
-                        try:
-                            field = float(field)
-                        except Exception as e:
-                            msg.warning("failed to convert {0} to float: {1} (aborting)".format(field, e))
-                            return None
-                    tabledict[key].append(field)
-                    i += 1
-            f.close()
-        return tabledict
-
-    def _define_tabledict_keys(self, header, fields, separator):
-        """
-        Define the keys for the tabledict dictionary.
-        Note: this function is only used by parse_table_from_file().
-        :param header: header string.
-        :param fields: header content string.
-        :param separator: separator character (char).
-        :return: tabledict (dictionary), keylist (ordered list with dictionary key names).
-        """
-
-        tabledict = {}
-        keylist = []
-
-        if not header:
-            # get the dictionary keys from the header of the file
-            for key in fields:
-                # first line defines the header, whose elements will be used as dictionary keys
-                if key == '':
-                    continue
-                if key.endswith('\n'):
-                    key = key[:-1]
-                tabledict[key] = []
-                keylist.append(key)
-        else:
-            # get the dictionary keys from the provided header
-            keys = header.split(separator)
-            for key in keys:
-                if key == '':
+## @brief  Extract a table of data from a txt file
+#  @details E.g. header="Time VMEM PSS RSS Swap rchar wchar rbytes wbytes"
+#  or the first line in the file is
+#  Time VMEM PSS RSS Swap rchar wchar rbytes wbytes
+#  each of which will become keys in the dictionary, whose corresponding values are stored in lists, with the entries
+#  corresponding to the values in the rows of the input file.
+#  The output dictionary will have the format
+#  {'Time': [ .. data from first row .. ], 'VMEM': [.. data from second row], ..}
+#  @param filename name of input text file, full path (string).
+#  @param header header string.
+#  @param separator separator character (char).
+#  @param convert_to_float boolean, if True, all values will be converted to floats.
+#  @return dictionary.
+def get_table_from_file(filename, header=None, separator="\t", convert_to_float=None):
+    try:
+        f = open(filename, 'r')
+    except Exception as e:
+        msg.warning("failed to open file: {0}, {1}".format(filename, e))
+    else:
+        firstline = True
+        for line in f:
+            fields = line.split(separator)
+            if firstline:
+                firstline = False
+                tabledict, keylist = _define_tabledict_keys(header, fields, separator)
+                if not header:
                     continue
-                if key.endswith('\n'):
-                    key = key[:-1]
-                tabledict[key] = []
-                keylist.append(key)
 
-        return tabledict, keylist
+            # from now on, fill the dictionary fields with the input data
+            i = 0
+            for field in fields:
+                # get the corresponding dictionary key from the keylist
+                key = keylist[i]
+                # store the field value in the correct list
+                # TODO: do we need converting to float?
+                if convert_to_float:
+                    try:
+                        field = float(field)
+                    except Exception as e:
+                        msg.warning("failed to convert {0} to float: {1} (aborting)".format(field, e))
+                        return None
+                tabledict[key].append(field)
+                i += 1
+        f.close()
+    return tabledict
+
+## @brief Define the keys for the tabledict dictionary.
+# @note should be called by get_table_from_file()
+# @param header header string.
+# @param fields header content string.
+# @param separator separator character (char).
+# @return tabledict (dictionary), keylist (ordered list with dictionary key names).
+def _define_tabledict_keys(header, fields, separator):
+    tabledict = {}
+    keylist = []
+
+    if not header:
+        # get the dictionary keys from the header of the file
+        for key in fields:
+            # first line defines the header, whose elements will be used as dictionary keys
+            if key == '':
+                continue
+            if key.endswith('\n'):
+                key = key[:-1]
+            tabledict[key] = []
+            keylist.append(key)
+    else:
+        # get the dictionary keys from the provided header
+        keys = header.split(separator)
+        for key in keys:
+            if key == '':
+                continue
+            if key.endswith('\n'):
+                key = key[:-1]
+            tabledict[key] = []
+            keylist.append(key)
+
+    return tabledict, keylist
 
 
 ### @brief return Valgrind command
-- 
GitLab


From b20059fe908663fc3103a7e7b1f630e3f6e95b98 Mon Sep 17 00:00:00 2001
From: Johannes Josef Junggeburth <johannes.josef.junggeburth@CERN.CH>
Date: Fri, 4 Sep 2020 15:21:48 +0200
Subject: [PATCH 006/403] First setup of muon large d0 tracks

---
 .../python/MuonCombinedAlgs.py                | 44 ++++++++++++------
 .../python/MuonCombinedRecExampleConfigDb.py  | 46 +++++++++++++++++--
 2 files changed, 71 insertions(+), 19 deletions(-)

diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
index 270f32214228..6bdc3df69e0a 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
@@ -66,16 +66,16 @@ def MuGirlStauAlg(name="MuGirlStauAlg",**kwargs):
     kwargs.setdefault("METrackCollection","")
     kwargs.setdefault("SegmentCollection","MuGirlStauSegments")
     return CfgMgr.MuonCombinedInDetExtensionAlg(name,**kwargs)
-      
+
 def MuonCombinedInDetCandidateAlg( name="MuonCombinedInDetCandidateAlg",**kwargs ):
     from InDetRecExample.InDetJobProperties import InDetFlags
     kwargs.setdefault("TrackSelector",getPublicTool("MuonCombinedInDetDetailedTrackSelectorTool") )
     if muonCombinedRecFlags.doSiAssocForwardMuons() and InDetFlags.doForwardTracks():
         kwargs.setdefault("DoSiliconAssocForwardMuons", True )
         kwargs.setdefault("InDetForwardTrackSelector", getPublicTool("MuonCombinedInDetDetailedForwardTrackSelectorTool") )
-    
-    kwargs.setdefault("MuonSystemExtensionTool", getPublicTool("MuonSystemExtensionTool"))
 
+    kwargs.setdefault("MuonSystemExtensionTool", getPublicTool("MuonSystemExtensionTool"))
+    print (kwargs)
     return CfgMgr.MuonCombinedInDetCandidateAlg(name,**kwargs)
 
 def MuonCombinedMuonCandidateAlg( name="MuonCombinedMuonCandidateAlg", **kwargs ):
@@ -113,11 +113,11 @@ def recordMuonCreatorAlgObjs (kw):
     if val('MakeClusters'):
         objs['CaloClusterCellLinkContainer'] =  val('CaloClusterCellLinkName') + '_links'
         objs['xAOD::CaloClusterContainer'] =  val('ClusterContainerName')
-        
+
     from RecExConfig.ObjKeyStore import objKeyStore
     objKeyStore.addManyTypesTransient (objs)
     return
-    
+
 def MuonCreatorAlg( name="MuonCreatorAlg",**kwargs ):
     kwargs.setdefault("MuonCreatorTool",getPublicTool("MuonCreatorTool"))
     recordMuonCreatorAlgObjs (kwargs)
@@ -155,30 +155,44 @@ class MuonCombinedReconstruction(ConfiguredMuonRec):
         if not self.isEnabled(): return
 
         topSequence = AlgSequence()
-                      
+
         #if jobproperties.Beam.beamType()=='collisions':
             # creates input collections for ID and MS candidates
-        topSequence += getAlgorithm("MuonCombinedInDetCandidateAlg") 
-        topSequence += getAlgorithm("MuonCombinedMuonCandidateAlg") 
-            
+        topSequence += getAlgorithm("MuonCombinedInDetCandidateAlg")
+        topSequence += getAlgorithm("MuonCombinedMuonCandidateAlg")
+
+        from InDetRecExample.InDetJobProperties import InDetFlags
+        if InDetFlags.doR3LargeD0():
+            topSequence += getAlgorithm("MuonCombinedInDetCandidateAlg_LargeD0")
+
+
             # runs ID+MS combinations (fit, staco, mugirl, ID-taggers)
         if muonCombinedRecFlags.doStatisticalCombination() or muonCombinedRecFlags.doCombinedFit():
-            topSequence += getAlgorithm("MuonCombinedAlg") 
+            topSequence += getAlgorithm("MuonCombinedAlg")
+            if InDetFlags.doR3LargeD0():
+                topSequence += getAlgorithm("MuonCombinedAlg_LargeD0")
+
 
         if muonCombinedRecFlags.doMuGirl():
-            topSequence += getAlgorithm("MuonInsideOutRecoAlg") 
+            topSequence += getAlgorithm("MuonInsideOutRecoAlg")
             if muonCombinedRecFlags.doMuGirlLowBeta():
                 topSequence += getAlgorithm("MuGirlStauAlg")
+            #if InDetFlags.doR3LargeD0():
+            #    topSequence += getAlgorithm("MuGirlAlg_LargeD0")
 
         if muonCombinedRecFlags.doCaloTrkMuId():
-            topSequence += getAlgorithm("MuonCaloTagAlg") 
-            
+            topSequence += getAlgorithm("MuonCaloTagAlg")
+
         if muonCombinedRecFlags.doMuonSegmentTagger():
             getPublicTool("MuonSegmentTagTool")
-            topSequence += getAlgorithm("MuonSegmentTagAlg") 
+            topSequence += getAlgorithm("MuonSegmentTagAlg")
+            if InDetFlags.doR3LargeD0():
+                topSequence += getAlgorithm("MuonSegmentTagAlg_LargeD0")
 
         # runs over outputs and create xAODMuon collection
         topSequence += getAlgorithm("MuonCreatorAlg")
-        
+        if InDetFlags.doR3LargeD0():
+            topSequence += getAlgorithm("MuonCreatorAlg_LargeD0")
+
         if muonCombinedRecFlags.doMuGirl() and muonCombinedRecFlags.doMuGirlLowBeta():
             topSequence += getAlgorithm("StauCreatorAlg")
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py
index a961d6ff4a81..980048cc316a 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py
@@ -7,10 +7,10 @@ from AthenaCommon.CfgGetter import addTool, addToolClone, addService, addAlgorit
      addTypesOnlyToSkip
 
 from AthenaCommon.Constants import *  # FATAL,ERROR etc.
-
+from InDetRecExample.InDetKeys import InDetKeys
+from MuonCombinedRecExample.MuonCombinedKeys import MuonCombinedKeys as MuonCbKeys
 # combined tools
 addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCombinedTool","MuonCombinedTool")
-addTool("MuonCombinedRecExample.MuonCombinedTools.InDetCandidateTool","InDetCandidateTool")
 
 addTool("MuonCombinedRecExample.MuGirlTagTool.MuonInsideOutRecoTool","MuonInsideOutRecoTool")
 addTool("MuonCombinedRecExample.MuGirlTagTool.MuonCandidateTrackBuilderTool","MuonCandidateTrackBuilderTool")
@@ -40,12 +40,52 @@ addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuGirlAlg","MuGirlAlg")
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCaloTagAlg","MuonCaloTagAlg")
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonInsideOutRecoAlg","MuonInsideOutRecoAlg")
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuGirlStauAlg","MuGirlStauAlg")
+
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCombinedInDetCandidateAlg","MuonCombinedInDetCandidateAlg")
+addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCombinedInDetCandidateAlg",
+                                    "MuonCombinedInDetCandidateAlg_LargeD0",
+                                    TrackParticleLocation=[InDetKeys.xAODLargeD0TrackParticleContainer()],
+                                    InDetCandidateLocation="InDetCandidates_LargeD0",
+                                    DoSiliconAssocForwardMuons=False)
+
+
+
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCombinedMuonCandidateAlg","MuonCombinedMuonCandidateAlg")
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCombinedAlg","MuonCombinedAlg")
+addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCombinedAlg", "MuonCombinedAlg_LargeD0",
+                                                                        InDetCandidateLocation="InDetCandidates_LargeD0",
+                                                                        CombinedTagMaps=["muidcoTagMap_LargeD0","stacoTagMap_LargeD0"],
+                                                                        MuidCombinedTracksLocation="MuidCombinedTracks_LargeD0",
+                                                                        MuidMETracksLocation="MuidMETracks_LargeD0")
+
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCombinedInDetExtensionAlg","MuonCombinedInDetExtensionAlg")
+
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonSegmentTagAlg","MuonSegmentTagAlg")
+addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonSegmentTagAlg","MuonSegmentTagAlg_LargeD0",
+                                                                        InDetCandidateLocation="InDetCandidates_LargeD0",
+                                                                        TagMap="segmentTagMap_LargeD0",
+                                                                        MuonSegmentLocation="MuonSegments")
+
+
+
+
+
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCreatorAlg","MuonCreatorAlg")
+addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCreatorAlg","MuonCreatorAlg_LargeD0",
+                                                                      MuonContainerLocation="Muons_LargeD0",
+                                                                      InDetCandidateLocation="InDetCandidates_LargeD0",
+                                                                      ExtrapolatedLocation="ExtraPolatedMuon_LargeD0",
+                                                                      ExtrapolatedTrackLocation="ExtraPolatedMuonTrack_LargeD0",
+                                                                      MSOnlyExtrapolatedLocation="MSOnlyExtraPolatedMuons_LargeD0",
+                                                                      MSOnlyExtrapolatedTrackLocation="MSOnlyExtraPolatedMuonTrack_LargeD0",
+                                                                      CombinedLocation="CombinedMuon_LargeD0",
+                                                                      SegmentContainerName="MuonSegments_LargeD0",
+                                                                      TrackSegmentContainerName="TrakMuonSegments_LargeD0",
+                                                                      TagMaps=["muidcoTagMap_LargeD0","stacoTagMap_LargeD0","segmentTagMap_LargeD0"],
+                                                                      BuildSlowMuon= False,
+                                                                      MakeClusters=False    )
+
+
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.StauCreatorAlg","StauCreatorAlg")
 
 # tracking tools
@@ -106,5 +146,3 @@ addTool("MuonCombinedRecExample.MuonCombinedFitTools.MuonTrackQuery","MuonTrackQ
 addTool("MuonCombinedRecExample.MuonCombinedFitTools.MuidSegmentRegionRecoveryTool","MuidSegmentRegionRecoveryTool")
 addTool("MuonCombinedRecExample.MuonCombinedFitTools.CombinedMuonTrackBuilder","CombinedMuonTrackBuilder")
 addTool("MuonCombinedRecExample.MuonCombinedFitTools.CombinedMuonTrackBuilderFit","CombinedMuonTrackBuilderFit")
-
-
-- 
GitLab


From 35e7fd6670cccd739de30d45fda7f3642c5a6b62 Mon Sep 17 00:00:00 2001
From: Johannes Josef Junggeburth <johannes.josef.junggeburth@CERN.CH>
Date: Fri, 4 Sep 2020 20:06:35 +0200
Subject: [PATCH 007/403] Fix the physics validation for Large D0

---
 .../share/InDetRec_jobOptions.py              | 262 +++++++++---------
 1 file changed, 130 insertions(+), 132 deletions(-)

diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_jobOptions.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_jobOptions.py
index dbf37cc41ece..d6252f7be206 100755
--- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_jobOptions.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_jobOptions.py
@@ -16,7 +16,7 @@ if not DetFlags.detdescr.ID_on():
   printfunc ("InDetRec_jobOptions.py: DetFlags ID is turned off. Not including anything!")
 else:
   # +++++++++++++++++++++++
-  # Control 
+  # Control
   # +++++++++++++++++++++++
   #
   from InDetRecExample.InDetJobProperties import InDetFlags
@@ -28,7 +28,7 @@ else:
     # rec flags are needed (e.g. for commissioning steering ...)
     from RecExConfig.RecFlags import rec
 
-    # --- ensure that Calo clustering is running if we run in calo seeded mode 
+    # --- ensure that Calo clustering is running if we run in calo seeded mode
     if InDetFlags.doBremRecovery() and InDetFlags.doCaloSeededBrem() and not DetFlags.detdescr.Calo_allOn():
       printfunc ("*************************************************************")
       printfunc ("* Major FAILURE : InDet reconstruction in seeded brem mode, *")
@@ -50,11 +50,11 @@ else:
       printfunc (" ------------> WARNING: Using Standard Back Tracking (not calo seeded)")
       InDetFlags.doCaloSeededTRTSegments.set_Value_and_Lock(False)
 
-    
+
     # --- print setup
     InDetFlags.printInfo()
-    InDetFlags.print_JobProperties()    
-    
+    InDetFlags.print_JobProperties()
+
     #
     # ----------- import, lock and print InDetKeys
     #
@@ -62,9 +62,9 @@ else:
     InDetKeys.lockAllExceptAlias()
     printfunc ("Printing InDetKeys")
     InDetKeys.print_JobProperties()
-    
+
     #
-    # --- setup of cut values for NewTracking  
+    # --- setup of cut values for NewTracking
     #
 
     if ('InDetNewTrackingCuts' not in dir()):
@@ -87,9 +87,9 @@ else:
       elif InDetFlags.doHighPileup():
         InDetNewTrackingCuts      = ConfiguredNewTrackingCuts("HighPileup")
       elif InDetFlags.doMinBias():
-        InDetNewTrackingCuts      = ConfiguredNewTrackingCuts("MinBias")        
+        InDetNewTrackingCuts      = ConfiguredNewTrackingCuts("MinBias")
       elif InDetFlags.doDVRetracking():
-        InDetNewTrackingCuts      = ConfiguredNewTrackingCuts("R3LargeD0")        
+        InDetNewTrackingCuts      = ConfiguredNewTrackingCuts("R3LargeD0")
       else:
         InDetNewTrackingCuts      = ConfiguredNewTrackingCuts("Offline")
     InDetNewTrackingCuts.printInfo()
@@ -97,7 +97,7 @@ else:
     InDetCutValues = InDetNewTrackingCuts
 
     #
-    # --- setup of cut values for  Primary vertexing  
+    # --- setup of cut values for  Primary vertexing
     #
     if ('InDetPrimaryVertexingCuts' not in dir()):
       printfunc ("InDetRec_jobOptions: InDetPrimaryVertexingCuts not set before - import them now")
@@ -105,29 +105,29 @@ else:
       InDetPrimaryVertexingCuts      = ConfiguredVertexingCuts(InDetFlags.primaryVertexCutSetup())
       InDetPrimaryVertexingCuts.printInfo()
 
-    # ----------- 
+    # -----------
     #
     # --- setup key aliases to pass to configurables
     #
     InDetSpSeededTracksKey    = InDetKeys.SiSpSeededTracks()
-    InDetResolvedTracksKey    = InDetKeys.ResolvedTracks() 
+    InDetResolvedTracksKey    = InDetKeys.ResolvedTracks()
     InDetExtendedTracksKey    = InDetKeys.ExtendedTracks()
     InDetExtendedTracksMapKey = InDetKeys.ExtendedTracksMap()
-  
-    if InDetFlags.doDBMstandalone(): 
-      InDetSpSeededTracksKey    = InDetKeys.SiSpSeededDBMTracks() 
+
+    if InDetFlags.doDBMstandalone():
+      InDetSpSeededTracksKey    = InDetKeys.SiSpSeededDBMTracks()
       InDetResolvedTracksKey    = InDetKeys.DBMTracks()
 
     if InDetFlags.doSLHC():
-      InDetSpSeededTracksKey    = InDetKeys.SiSpSeededSLHCTracks() 
-      InDetResolvedTracksKey    = InDetKeys.ResolvedSLHCTracks() 
+      InDetSpSeededTracksKey    = InDetKeys.SiSpSeededSLHCTracks()
+      InDetResolvedTracksKey    = InDetKeys.ResolvedSLHCTracks()
       InDetExtendedTracksKey    = InDetKeys.ExtendedSLHCTracks()
-      InDetExtendedTracksMapKey = InDetKeys.ExtendedTracksMapSLHC()              
-      
+      InDetExtendedTracksMapKey = InDetKeys.ExtendedTracksMapSLHC()
+
     if globalflags.InputFormat() == 'bytestream':
       ServiceMgr.ByteStreamCnvSvc.IsSimulation = (globalflags.DataSource() == 'geant4')
-              
-    
+
+
     # ------------------------------------------------------------
     #
     # ----------- special case for Calo seeded brem recovery
@@ -139,7 +139,7 @@ else:
       include ("InDetRecExample/InDetRecCaloSeededROISelection.py")
 
     # ------------------------------------------------------------
-    # 
+    #
     # -----------ROI seeding for SSS seeds or Ambi
     #
     # ------------------------------------------------------------
@@ -148,7 +148,7 @@ else:
       include ("InDetRecExample/InDetRecHadCaloSeededROISelection.py")
 
     # ------------------------------------------------------------
-    # 
+    #
     # ----------- Configuring the conditions access
     #
     # ------------------------------------------------------------
@@ -156,12 +156,12 @@ else:
       include ("InDetRecExample/InDetRecConditionsAccess.py")
 
     # ------------------------------------------------------------
-    # 
-    # ----------- Loading the Tracking Tools and Services 
+    #
+    # ----------- Loading the Tracking Tools and Services
     #
     # ------------------------------------------------------------
-    
-    if not rec.doAODMerging():  
+
+    if not rec.doAODMerging():
       include ("InDetRecExample/InDetRecLoadTools.py")
 
     # ------------------------------------------------------------
@@ -197,7 +197,7 @@ else:
 
     # NewTracking collection keys
     InputCombinedInDetTracks = []
- 
+
     # ------------------------------------------------------------
     #
     # ----------- Subdetector pattern from New Tracking
@@ -244,7 +244,7 @@ else:
                                                                  TrackCollectionKeys,
                                                                  TrackCollectionTruthKeys)
 
-   
+
     # ------------------------------------------------------------
     #
     # ----------- Cosmics Si pattern before we do the TRT phase
@@ -255,12 +255,12 @@ else:
     #
     if InDetFlags.doTRTPhaseCalculation() and not jobproperties.Beam.beamType()=="collisions":
       #
-      # We need to run the silicon tracking already at this stage together with 
+      # We need to run the silicon tracking already at this stage together with
       # the TRT tracking on uncalibrated PRDs to be able to calculate the phase
 
       # input collection for TRT Phase
       InDetCosmicSiTrackCollection = ""
-      
+
       if InDetFlags.doNewTracking():
         #
         # --- run NewTracking Si pattern
@@ -298,7 +298,7 @@ else:
                                                                    None,
                                                                    True)
 
-        # --- making tacks out of segments	      
+        # --- making tacks out of segments
         #include ("InDetRecExample/ConfiguredTRTStandalone.py")
         #InDetRecPhaseTRTStandalone = ConfiguredTRTStandalone ("", [],
         #                                                 InDetNewTrackingCuts,
@@ -353,7 +353,7 @@ else:
 
     if InDetFlags.doNewTracking():
       #
-      # --- do the Si pattern if not done for the cosmic case above 
+      # --- do the Si pattern if not done for the cosmic case above
       #
       if not InDetFlags.doTRTPhaseCalculation() or jobproperties.Beam.beamType()=="collisions":
         include ("InDetRecExample/ConfiguredNewTrackingSiPattern.py")
@@ -379,11 +379,11 @@ else:
         InputCombinedInDetTracks += [ InDetNewTrackingTRTExtension.ForwardTrackCollection() ]
       else :
         InputCombinedInDetTracks += [ InDetNewTrackingSiPattern.SiTrackCollection() ]
-        
+
     # ------------------------------------------------------------
     #
     # --- Now comes Back Tracktracking
-    # 
+    #
     # ------------------------------------------------------------
     #
     # --- TRT segment finding after forward tracking on remaining hits
@@ -407,10 +407,10 @@ else:
       # --- add into list for combination
       InputCombinedInDetTracks += [ InDetRecBackTracking.BackTrackingTracks() ]
 
-      
+
     # ------------------------------------------------------------
     #
-    # --- Large-d0 option (FIXME: Here or should be placed 
+    # --- Large-d0 option (FIXME: Here or should be placed
     #     after standard reconstruction...?
     #
     # ------------------------------------------------------------
@@ -446,14 +446,14 @@ else:
       # --- do the TRT pattern
       #
       include ("InDetRecExample/ConfiguredNewTrackingTRTExtension.py")
-      InDetLargeD0TRTExtension = ConfiguredNewTrackingTRTExtension(InDetNewTrackingCutsLargeD0,
-                                                                 InDetLargeD0SiPattern.SiTrackCollection(),
-                                                                 InDetKeys.ExtendedLargeD0Tracks(),
-                                                                 InDetKeys.ExtendedTracksMapLargeD0(),
-                                                                 TrackCollectionKeys,
-                                                                 TrackCollectionTruthKeys,
-                                                                 False)
-      # --- remove the standard tracks included some lines before (in the ESD 
+      InDetLargeD0TRTExtension = ConfiguredNewTrackingTRTExtension(NewTrackingCuts = InDetNewTrackingCutsLargeD0,
+                                                                 SiTrackCollection= InDetLargeD0SiPattern.SiTrackCollection() if InDetFlags.doAmbiSolving() else None ,
+                                                                 ExtendedTrackCollection = InDetKeys.ExtendedLargeD0Tracks(),
+                                                                 ExtendedTracksMap = InDetKeys.ExtendedTracksMapLargeD0(),
+                                                                 TrackCollectionKeys=TrackCollectionKeys,
+                                                                 TrackCollectionTruthKeys=TrackCollectionTruthKeys,
+                                                                 doPhase =False)
+      # --- remove the standard tracks included some lines before (in the ESD
       #     processing case, those tracks are not part of the re-tracking procedure)
       if InDetFlags.useExistingTracksAsInput():
           _dummy = InputCombinedInDetTracks.pop()
@@ -463,7 +463,7 @@ else:
       if not InDetFlags.storeSeparateLargeD0Container():
         InputCombinedInDetTracks += [ InDetLargeD0TRTExtension.ForwardTrackCollection()]
 
-    
+
 
     # ------------------------------------------------------------
     #
@@ -530,7 +530,7 @@ else:
                                                                TrackCollectionTruthKeys)
       # --- add into list for combination
       InputCombinedInDetTracks += [ InDetVeryLowPtSiPattern.SiTrackCollection() ]
- 
+
     # ------------------------------------------------------------
     #
     # --- TRT standalone (after LowPt)
@@ -548,7 +548,7 @@ else:
                                                        TrackCollectionKeys,
                                                        TrackCollectionTruthKeys)
       # --- add into list for combination
-      InputCombinedInDetTracks += [ InDetRecTRTStandalone.TRTStandaloneTracks() ]  
+      InputCombinedInDetTracks += [ InDetRecTRTStandalone.TRTStandaloneTracks() ]
 
 
     # ------------------------------------------------------------
@@ -589,7 +589,7 @@ else:
     #
     # --- Forward Tracklets (after standard reconstruction)
     #
-    # ------------------------------------------------------------         
+    # ------------------------------------------------------------
 
     if InDetFlags.doForwardTracks():
       # Add tracks that are not saved to the InputCombinedInDetTracks
@@ -599,24 +599,24 @@ else:
         InputForwardInDetTracks +=[ InDetLargeD0TRTExtension.ForwardTrackCollection()]
 
     if InDetFlags.doForwardTracks() and InDetFlags.doSLHC():
-      if InDetFlags.doSLHCVeryForward(): 
-       if ('InDetNewTrackingCutsForwardTracks' not in dir()): 
+      if InDetFlags.doSLHCVeryForward():
+       if ('InDetNewTrackingCutsForwardTracks' not in dir()):
          printfunc ("InDetRec_jobOptions: InDetNewTrackingCutsForwardTracks not set before - import them now"       )
-         from InDetRecExample.ConfiguredNewTrackingCuts import ConfiguredNewTrackingCuts 
-         InDetNewTrackingCutsForwardTracks = ConfiguredNewTrackingCuts("VeryForwardSLHCTracks") 
-         InDetNewTrackingCutsForwardTracks.printInfo() 
-         # 
-         # --- now run Si pattern for Low Pt 
-         # 
-         include ("InDetRecExample/ConfiguredNewTrackingSiPattern.py") 
-         InDetForwardTracksSiPattern = ConfiguredNewTrackingSiPattern(InputForwardInDetTracks, 
- 		                                                      InDetKeys.ResolvedForwardTracks(), 
- 		                                                      InDetKeys.SiSpSeededForwardTracks(), 
- 		                                                      InDetNewTrackingCutsForwardTracks, 
- 		                                                      TrackCollectionKeys, 
- 		                                                      TrackCollectionTruthKeys)   
+         from InDetRecExample.ConfiguredNewTrackingCuts import ConfiguredNewTrackingCuts
+         InDetNewTrackingCutsForwardTracks = ConfiguredNewTrackingCuts("VeryForwardSLHCTracks")
+         InDetNewTrackingCutsForwardTracks.printInfo()
+         #
+         # --- now run Si pattern for Low Pt
+         #
+         include ("InDetRecExample/ConfiguredNewTrackingSiPattern.py")
+         InDetForwardTracksSiPattern = ConfiguredNewTrackingSiPattern(InputForwardInDetTracks,
+ 		                                                      InDetKeys.ResolvedForwardTracks(),
+ 		                                                      InDetKeys.SiSpSeededForwardTracks(),
+ 		                                                      InDetNewTrackingCutsForwardTracks,
+ 		                                                      TrackCollectionKeys,
+ 		                                                      TrackCollectionTruthKeys)
          # for ITK, forward tracks get added to the combined collection
-         InputCombinedInDetTracks += [ InDetForwardTracksSiPattern.SiTrackCollection() ] 
+         InputCombinedInDetTracks += [ InDetForwardTracksSiPattern.SiTrackCollection() ]
 
 
       else:
@@ -634,7 +634,7 @@ else:
                                                                    InDetKeys.SiSpSeededForwardTracks(),
                                                                    InDetNewTrackingCutsForwardTracks,
                                                                    TrackCollectionKeys,
-                                                                   TrackCollectionTruthKeys)  
+                                                                   TrackCollectionTruthKeys)
         # for ITK, forward tracks get added to the combined collection
         InputCombinedInDetTracks += [ InDetForwardTracksSiPattern.SiTrackCollection() ]
 
@@ -659,7 +659,7 @@ else:
                                                                    InDetKeys.SiSpSeededForwardTracks(),
                                                                    InDetNewTrackingCutsForwardTracks,
                                                                    TrackCollectionKeys,
-                                                                   TrackCollectionTruthKeys)  
+                                                                   TrackCollectionTruthKeys)
       # --- do not add into list for combination
       # InputCombinedInDetTracks += [ InDetForwardTracksSiPattern.SiTrackCollection() ]
 
@@ -684,18 +684,18 @@ else:
 
       InputCombinedInDetTracks += [ InDetKeys.ResolvedSLHCConversionFindingTracks() ]
 
-    
+
     # ------------------------------------------------------------
     #
     # --- Pixel Tracklets on unassociated PRDs (after standard reconstruction + forward tracking)
     #
     # ------------------------------------------------------------
-    
+
     if InDetFlags.doTrackSegmentsDisappearing():
       InputPixelInDetTracks = []
       InputPixelInDetTracks += InputCombinedInDetTracks
       # Add tracks that are not saved to the InputCombinedInDetTracks
-      if InDetFlags.doForwardTracks(): 
+      if InDetFlags.doForwardTracks():
         InputPixelInDetTracks +=[ InDetForwardTracksSiPattern.SiTrackCollection()]
       if InDetFlags.doR3LargeD0() and InDetFlags.storeSeparateLargeD0Container():
         InputPixelInDetTracks +=[ InDetLargeD0TRTExtension.ForwardTrackCollection()]
@@ -764,8 +764,8 @@ else:
       if jobproperties.Beam.beamType() == "singlebeam":
         InputCombinedInDetTracks += [ InDetBeamGasTRTExtension.ForwardTrackCollection() ]
 
-    # ------------------------------------------------------------                                                                                                                                                                          
-    # 
+    # ------------------------------------------------------------
+    #
     # --- DBM
     #
     # ------------------------------------------------------------
@@ -791,7 +791,7 @@ else:
 
 #      InDetSiTrackerSpacePointFinder = InDetSiTrackerSpacePointFinderDBM
 
-      # --- Si Pattern                                                                                                                                                                                                                           
+      # --- Si Pattern
       include ("InDetRecExample/ConfiguredNewTrackingSiPattern.py")
       DBMTrackingSiPattern = ConfiguredNewTrackingSiPattern([],InDetKeys.DBMTracks(),
                                                                  InDetKeys.SiSpSeededDBMTracks(),
@@ -810,13 +810,13 @@ else:
     # --- Ambi solve the extended (Si + TRT) and TRT standalone tracks if both run
     if InDetFlags.doCosmics() and InDetFlags.doNewTracking() and len(InputCombinedInDetTracks) > 1:
       InputCosmicsCombinedAmbiSolver = list(InputCombinedInDetTracks)
-      
+
       from TrkAmbiguitySolver.TrkAmbiguitySolverConf import Trk__TrkAmbiguityScore
       InDetAmbiguityScore_combinedCosmics = Trk__TrkAmbiguityScore(name                    = 'InDetCombinedCosmicsAmbiguityScore',
                                                                    TrackInput              = InputCosmicsCombinedAmbiSolver,
                                                                    TrackOutput             = 'ScoredMapCosmics',
                                                                    AmbiguityScoreProcessor = '' )
-                                                                  
+
       topSequence += InDetAmbiguityScore_combinedCosmics
 
       from TrkAmbiguitySolver.TrkAmbiguitySolverConf import Trk__TrkAmbiguitySolver
@@ -829,15 +829,15 @@ else:
         printfunc (InDetAmbiguitySolver_combinedCosmics)
 
       InputCombinedInDetTracks = [ InDetKeys.CombinedCosmicTracks() ]
-	  
+
     # ------------------------------------------------------------
     #
-    # ----------- now we do the Pseudo Tracking 
+    # ----------- now we do the Pseudo Tracking
     #
     # ------------------------------------------------------------
- 
+
     # if new tracking is off, pseudo tracking replaces the output collection
-    # if new tracking is on, pseudo tracking simply runs alongside 
+    # if new tracking is on, pseudo tracking simply runs alongside
     # if split reco is on, pseudo tracking runs only on pileup and the output collections are merged
     if InDetFlags.doPseudoTracking() :
         # --- needed for sorting the PrepRawData properly
@@ -861,14 +861,14 @@ else:
             if InDetFlags.doTrackSegmentsTRT() :
                 TRT_DriftCircleCont = InDetKeys.TRT_DriftCircles()
             else:
-                TRT_DriftCircleCont ="" 
+                TRT_DriftCircleCont =""
         InDetPRD_Provider = InDet__InDetPRD_Provider(name                     = 'InDetPRD_Provider',
                                                      PixelClusterContainer    = PixelClusterCont,
                                                      SCT_ClusterContainer     = SCT_ClusterCont,
                                                      TRT_DriftCircleContainer = TRT_DriftCircleCont)
         ToolSvc += InDetPRD_Provider
 
-        # --- the truth track builder 
+        # --- the truth track builder
         from AthenaCommon import CfgGetter
         from TrkTruthTrackTools.TrkTruthTrackToolsConf import Trk__TruthTrackBuilder
         # @TODO should a track fitter be used which does not require a split cluster map ?
@@ -878,17 +878,17 @@ else:
                                                         RotCreatorTool      = InDetRotCreator,
                                                         BroadRotCreatorTool = BroadInDetRotCreator,
                                                         MinDegreesOfFreedom = 1,
-                                                        MatEffects          =  InDetFlags.materialInteractionsType(), 
+                                                        MatEffects          =  InDetFlags.materialInteractionsType(),
                                                         MinSiHits           =  InDetNewTrackingCuts.minClusters() )
         if InDetFlags.doForwardTracks() and InDetFlags.doSLHC():
             InDetTruthTrackBuilder.MinSiHitsForward = InDetNewTrackingCutsForwardTracks.minClusters()
             InDetTruthTrackBuilder.ForwardBoundary  = InDetNewTrackingCutsForwardTracks.minEta()
 #        InDetTruthTrackBuilder.OutputLevel = VERBOSE
         ToolSvc += InDetTruthTrackBuilder
-        
+
         # --- the truth PRD trajectory builder
-        
-        # 
+
+        #
         from TrkTruthTrackTools.TrkTruthTrackToolsConf import Trk__PRD_TruthTrajectoryBuilder
         # change input collection key if taking only pileup
         if InDetFlags.doSplitReco() :
@@ -912,11 +912,11 @@ else:
 
          # --- the trajectory shared cluster hits fixer
 #           from InDetTruthTools.InDetTruthToolsConf import InDet__PRD_TruthTrajectorySharedFixerID
-#           InDetTruthTrajectorySharedFixer = InDet__PRD_TruthTrajectorySharedFixerID(name = 'InDetTruthTrajectorySharedFixer' )                       
+#           InDetTruthTrajectorySharedFixer = InDet__PRD_TruthTrajectorySharedFixerID(name = 'InDetTruthTrajectorySharedFixer' )
 #           ToolSvc += InDetTruthTrajectorySharedFixer
-            
+
             InDetPRD_TruthTrajectoryBuilder.PRD_TruthTrajectoryManipulators = [ InDetTruthTrajectorySorter, InDetTruthTrajectoryManipulator ]
-        
+
         ToolSvc+=InDetPRD_TruthTrajectoryBuilder
 #        InDetPRD_TruthTrajectoryBuilder.OutputLevel = VERBOSE
 
@@ -926,7 +926,7 @@ else:
           from InDetTruthTools.InDetTruthToolsConf import InDet__PRD_TruthTrajectorySelectorID
           InDetTruthTrajectorySelector = InDet__PRD_TruthTrajectorySelectorID(name='InDetTruthTrajectorySelector')
           ToolSvc += InDetTruthTrajectorySelector
-          PRD_TruthTrajectorySelector  = [ InDetTruthTrajectorySelector ]          
+          PRD_TruthTrajectorySelector  = [ InDetTruthTrajectorySelector ]
 
         # --- the truth track creation algorithm
         from InDetRecExample.TrackingCommon import getInDetPRDtoTrackMapToolGangedPixels
@@ -955,7 +955,7 @@ else:
           InDetTruthToTrack  = Trk__TruthToTrack(name         = "InDetTruthToTrack",
                                                Extrapolator = TrackingCommon.getInDetExtrapolator())
           ToolSvc += InDetTruthToTrack
-    
+
         # Register the track collections for further processing - only if new tracking has not been running
         if not InDetFlags.doNewTracking():
             InputTrackCollection      = InDetKeys.PseudoTracks()
@@ -992,9 +992,9 @@ else:
           InDetTracksTruth = ConfiguredInDetTrackTruth(InDetKeys.DBMTracks(),
                                                        InDetKeys.DBMDetailedTracksTruth(),
                                                        InDetKeys.DBMTracksTruth())
-      
+
       if InDetFlags.useExistingTracksAsInput():
-          InputCombinedInDetTracks +=  [ InDetKeys.ProcessedESDTracks() ] 
+          InputCombinedInDetTracks +=  [ InDetKeys.ProcessedESDTracks() ]
 
       if InDetFlags.doDBMstandalone():
         TrackCollectionKeys      += [ InDetKeys.DBMTracks() ]
@@ -1021,7 +1021,7 @@ else:
             InDetSGDeletionAlg(key = InputCombinedInDetTracks)
         else:
             InDetSGDeletionAlg(key = [k for k in InputCombinedInDetTracks if not k == "ExtendedTracks"])
-      
+
 
       #
       # ------------ Track truth.
@@ -1039,16 +1039,15 @@ else:
           # add final output for statistics
           #
             TrackCollectionTruthKeys += [ InDetKeys.UnslimmedTracksTruth() ]
-    
-    
+
+
 
       # Dummy Merger to fill additional info for PRD-associated pixel tracklets
       if InDetFlags.doTrackSegmentsDisappearing():
        DummyCollection = []
        if InDetFlags.doTRTExtension() :
          DummyCollection += [ InDetKeys.ExtendedTracksDisappearing()]
-       else :
-         DummyCollection += [ InDetKeys.ResolvedPixelPrdAssociationTracks()]
+
        from InDetRecExample.TrackingCommon                        import getInDetPRDtoTrackMapToolGangedPixels
        TrkTrackCollectionMerger_pix = Trk__TrackCollectionMerger(name                    = "InDetTrackCollectionMerger_pix",
                                                                  TracksLocation          = DummyCollection,
@@ -1060,7 +1059,7 @@ else:
        #TrkTrackCollectionMerger_pix.OutputLevel = VERBOSE
        topSequence += TrkTrackCollectionMerger_pix
 
-       
+
        if InDetFlags.doTruth():
           # set up the truth info for this container
           #
@@ -1068,7 +1067,7 @@ else:
             InDetTracksTruth = ConfiguredInDetTrackTruth(InDetKeys.DisappearingTracks(),
                                                          InDetKeys.DisappearingDetailedTracksTruth(),
                                                          InDetKeys.DisappearingTracksTruth())
-    
+
 
        if (InDetFlags.doPrintConfigurables()):
          printfunc (TrkTrackCollectionMerger_pix)
@@ -1084,10 +1083,10 @@ else:
     # -- Pick one of the result collections and turn it into tracks
     #
     if InDetFlags.doNewTrackingPattern():
-      if InDetFlags.doDBMstandalone(): 
-        InputTrackCollection = InDetKeys.DBMTracks() 
-      else: 
-        InputTrackCollection = InDetKeys.UnslimmedTracks() 
+      if InDetFlags.doDBMstandalone():
+        InputTrackCollection = InDetKeys.DBMTracks()
+      else:
+        InputTrackCollection = InDetKeys.UnslimmedTracks()
     elif InDetFlags.doPseudoTracking():
       InputTrackCollection = InDetKeys.PseudoTracks()
     else:
@@ -1095,11 +1094,11 @@ else:
       InputTrackCollection      = InDetKeys.Tracks()
       InputTrackCollectionTruth = InDetKeys.TracksTruth()
 
-    # ---------------------------------------------------------------- 
+    # ----------------------------------------------------------------
     #
     # --- do we refit all tracks ?
     #
-    # ---------------------------------------------------------------- 
+    # ----------------------------------------------------------------
     if InDetFlags.doRefit():
       from InDetRecExample.TrackingCommon import getInDetPRDtoTrackMapToolGangedPixels
       from TrkRefitAlg.TrkRefitAlgConf import Trk__ReFitTrack
@@ -1120,7 +1119,7 @@ else:
         InDetReFitTrack.matEffects = InDetFlags.materialInteractionsType()
       else:
         InDetReFitTrack.matEffects = 0
-            
+
       topSequence += InDetReFitTrack
       if (InDetFlags.doPrintConfigurables()):
         printfunc (InDetReFitTrack)
@@ -1130,11 +1129,11 @@ else:
         InputDetailedTrackTruth   = InDetKeys.RefittedDetailedTracksTruth()
         InputTrackCollectionTruth = InDetKeys.RefittedTracksTruth()
 
-    # ---------------------------------------------------------------- 
+    # ----------------------------------------------------------------
     #
     # --- slimm the tracks down before writing them ?
     #
-    # ---------------------------------------------------------------- 
+    # ----------------------------------------------------------------
     from TrkTrackSlimmingTool.TrkTrackSlimmingToolConf import Trk__TrackSlimmingTool as ConfigurableTrackSlimmingTool
     InDetTrkSlimmingTool = ConfigurableTrackSlimmingTool(name           = "InDetTrackSlimmingTool",
                                                          KeepParameters = InDetFlags.KeepParameters(),
@@ -1161,7 +1160,7 @@ else:
 
       if (InDetFlags.doPrintConfigurables()):
         printfunc (InDetTrkSlimmingTool)
-            
+
       from TrkTrackSlimmer.TrkTrackSlimmerConf import Trk__TrackSlimmer as ConfigurableTrackSlimmer
       InDetTrkSlimmer = ConfigurableTrackSlimmer(name                 = "InDetTrackSlimmer",
                                                  TrackLocation        = [ InputTrackCollection ],
@@ -1172,16 +1171,16 @@ else:
       if (InDetFlags.doPrintConfigurables()):
         printfunc (InDetTrkSlimmer)
 
-      if not (InDetFlags.doMonitoringGlobal() or 
+      if not (InDetFlags.doMonitoringGlobal() or
               InDetFlags.doNtupleCreation() or
-              (InDetFlags.doMonitoringPixel() and not InDetFlags.doTrackSegmentsPixel()) or 
-              (InDetFlags.doMonitoringSCT()   and not InDetFlags.doTrackSegmentsSCT()  ) or 
+              (InDetFlags.doMonitoringPixel() and not InDetFlags.doTrackSegmentsPixel()) or
+              (InDetFlags.doMonitoringSCT()   and not InDetFlags.doTrackSegmentsSCT()  ) or
               (InDetFlags.doMonitoringTRT()   and not InDetFlags.doTrackSegmentsTRT()  )):
         if not InDetFlags.doSlimPoolTrack() :
           # --- Delete unslimmed tracks
           from InDetRecExample.ConfiguredInDetSGDeletion import InDetSGDeletionAlg
           InDetSGDeletionAlg(key = InputTrackCollection)
-      
+
       if not InDetFlags.doSlimPoolTrack() :
          # --- for output
          InDetKeys.AliasToTracks = 'none'
@@ -1189,9 +1188,9 @@ else:
          InputTrackCollection    = InDetKeys.Tracks()
          if InDetFlags.doTruth():
             InputDetailedTrackTruth   = InDetKeys.DetailedTracksTruth()
-            InputTrackCollectionTruth = InDetKeys.TracksTruth()       
-         # --- [FIXME JDC: PROVISIONAL PATCH. The final collection 
-         #      should be the one pointed by InDetKeys.Tracks()? Trying to 
+            InputTrackCollectionTruth = InDetKeys.TracksTruth()
+         # --- [FIXME JDC: PROVISIONAL PATCH. The final collection
+         #      should be the one pointed by InDetKeys.Tracks()? Trying to
          #      find a solution...
          if InDetFlags.useExistingTracksAsInput():
             InDetTrkSlimmer.SlimmedTrackLocation = [ "MergedTracks" ]
@@ -1201,13 +1200,13 @@ else:
                 InputTrackCollectionTruth = "MergedTracksTruth"
          # --- [FIXME JDC: END PROVISIONAL PATCH
 
-    # ---------------------------------------------------------------- 
+    # ----------------------------------------------------------------
     #
     # --- or just make an alias ?
     #
-    # ---------------------------------------------------------------- 
+    # ----------------------------------------------------------------
     if InDetFlags.doPattern() and (not InDetFlags.doSlimming() or InDetFlags.doSlimPoolTrack()):
-      if not InDetFlags.doDBMstandalone(): 
+      if not InDetFlags.doDBMstandalone():
       #
       # --- configure Algorithm to create output alias
       #
@@ -1224,13 +1223,13 @@ else:
         InputTrackCollection    = InDetKeys.Tracks()
 
       if InDetFlags.doTruth():
-        if InDetFlags.doDBMstandalone(): 
-          InputDetailedTrackTruth   = InDetKeys.DBMDetailedTracksTruth() 
-          InputTrackCollectionTruth = InDetKeys.DBMTracksTruth() 
-        else: 
+        if InDetFlags.doDBMstandalone():
+          InputDetailedTrackTruth   = InDetKeys.DBMDetailedTracksTruth()
+          InputTrackCollectionTruth = InDetKeys.DBMTracksTruth()
+        else:
           InputDetailedTrackTruth   = InDetKeys.DetailedTracksTruth()
           InputTrackCollectionTruth = InDetKeys.TracksTruth()
-      # --- [FIXME JDC: PROVISIONAL PATCH. The final collection 
+      # --- [FIXME JDC: PROVISIONAL PATCH. The final collection
       #      should be the one pointed by InDetKeys.Tracks()? Trying
       #      to find a soluction...
       if InDetFlags.useExistingTracksAsInput():
@@ -1239,7 +1238,7 @@ else:
         if InDetFlags.doTruth():
             InputDetailedTrackTruth   = "MergedTracksDetailedTruth"
             InputTrackCollectionTruth = "MergedTracksTruth"
-      # --- [FIXME JDC: PROVISIONAL PATCH. The final collection 
+      # --- [FIXME JDC: PROVISIONAL PATCH. The final collection
 
 
     # -----------------------------------------------------------------
@@ -1262,7 +1261,7 @@ else:
         # add to keys lists for statistics
         #
         ## ME drop this for tracks contrain # TrackCollectionTruthKeys += [ InputTrackCollectionTruth ]
-        
+
     # ------------------------------------------------------------
     #
     # ----------- now we do post-processing
@@ -1280,7 +1279,7 @@ else:
 
     # ------------------------------------------------------------
     #
-    # ----------- now we do validation and  
+    # ----------- now we do validation and
     #
     # ------------------------------------------------------------
     #
@@ -1302,7 +1301,7 @@ else:
       if InDetFlags.doSplitReco():
         InDetValidationPU = ConfiguredInDetValidation("PU",True,InDetFlags.doTruth(),cuts,[InDetKeys.PseudoTracks()],[InDetKeys.PseudoTracksTruth()],McEventCollectionKey="TruthEvent_PU")
 
-    # ntuple creation for validation purposes    
+    # ntuple creation for validation purposes
     if (InDetFlags.doNtupleCreation() or InDetFlags.doPhysValMon()):
       include("InDetRecExample/InDetRecNtupleCreation.py")
 
@@ -1314,11 +1313,10 @@ else:
       # --- Delete spacepoint collections
       from InDetRecExample.ConfiguredInDetSGDeletion import InDetSGDeletionAlg
       InDetSGDeletionAlg(container = "SpacePointOverlapCollection#", key = InDetKeys.OverlapSpacePoints())
-      
+
       # Delete Pixel and Silicon space points
       from InDetRecExample.ConfiguredInDetSGDeletion import InDetSGDeletionAlg
       InDetSGDeletionAlg(container = "SpacePointContainer#", key = [InDetKeys.PixelSpacePoints(), InDetKeys.SCT_SpacePoints()])
-    
-    # +++++++++++++++++++ end of InDetRec_jobOptions.py
-  # END if InDetFlags.Enabled()    
 
+    # +++++++++++++++++++ end of InDetRec_jobOptions.py
+  # END if InDetFlags.Enabled()
-- 
GitLab


From 711896bc8884d71901bf06daff582b4442ad30bd Mon Sep 17 00:00:00 2001
From: Johannes Josef Junggeburth <johannes.josef.junggeburth@CERN.CH>
Date: Sat, 5 Sep 2020 10:17:01 +0200
Subject: [PATCH 008/403] Add large d0 tracks to physics validation

---
 .../python/InDetPhysValJobProperties.py       | 14 +++++++----
 .../python/InDetPhysValMonitoringTool.py      | 23 ++++++++++++++-----
 .../share/PhysValInDet_jobOptions.py          |  2 +-
 3 files changed, 28 insertions(+), 11 deletions(-)

diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValJobProperties.py b/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValJobProperties.py
index 33cc4495a373..e3fd7b6337bc 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValJobProperties.py
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValJobProperties.py
@@ -1,7 +1,7 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #
-## purpose Python module to hold common flags to configure the InDetPhysValMonitoring 
+## purpose Python module to hold common flags to configure the InDetPhysValMonitoring
 ##
 
 from __future__ import print_function
@@ -44,6 +44,11 @@ class InDetPhysValFlagsJobProperty(JobProperty):
        else:
           return self.StoredValue
 
+class doValidateLargeD0Tracks(InDetPhysValFlagsJobProperty):
+    statusOn     = True
+    allowedTypes = ['bool']
+    StoredValue  = False
+
 class doValidateDBMTracks(InDetPhysValFlagsJobProperty):
     statusOn     = True
     allowedTypes = ['bool']
@@ -138,7 +143,7 @@ class InDetPhysValJobProperties(JobPropertyContainer):
     if  hasattr(InDetFlags,'doDBM') and not InDetFlags.doDBM() :
         self.checkThenSet(self.doValidateDBMTracks,  False)
     print (self)
-    
+
   def printInfo(self) :
       pass
 
@@ -150,7 +155,7 @@ jobproperties.add_Container(InDetPhysValJobProperties)
 _list_InDetPhysValJobProperties = [
     Enabled,
     doValidateDBMTracks,
-    doValidateGSFTracks,    
+    doValidateGSFTracks,
     doValidateLooseTracks,
     doValidateTightPrimaryTracks,
     doValidateTracksInJets,
@@ -158,7 +163,8 @@ _list_InDetPhysValJobProperties = [
     validateExtraTrackCollections,
     doPhysValOutput,
     doExpertOutput,
-    setTruthStrategy
+    setTruthStrategy,
+    doValidateLargeD0Tracks
 ]
 
 for j in _list_InDetPhysValJobProperties:
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValMonitoringTool.py b/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValMonitoringTool.py
index 667585ac116c..a89451e96e6e 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValMonitoringTool.py
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValMonitoringTool.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration 
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 from __future__ import print_function
 
 from InDetPhysValMonitoring.ConfigUtils import serviceFactory,toolFactory
@@ -61,13 +61,13 @@ def getInDetPhysValMonitoringTool(**kwargs) :
          kwargs=setDefaults(kwargs,
                             JetContainerName    ='' ,
                             FillTrackInJetPlots = False)
-      
+
       #adding the VeretxTruthMatchingTool
       from InDetTruthVertexValidation.InDetTruthVertexValidationConf import InDetVertexTruthMatchTool
-      kwargs=setDefaults(kwargs, 
+      kwargs=setDefaults(kwargs,
                         useVertexTruthMatchTool = True,
          		VertexTruthMatchTool = toolFactory(InDetVertexTruthMatchTool) )
-      
+
       #Options for Truth Strategy : Requires full pile-up truth containers for some
       if InDetPhysValFlags.setTruthStrategy() == 'All' or InDetPhysValFlags.setTruthStrategy() == 'PileUp' :
         from RecExConfig.AutoConfiguration import IsInInputFile
@@ -78,9 +78,9 @@ def getInDetPhysValMonitoringTool(**kwargs) :
             print ('WARNING Truth Strategy for InDetPhysValMonitoring set to %s but TruthPileupEvents are missing in the input; resetting to HardScatter only' % (InDetPhysValFlags.setTruthStrategy()))
       elif InDetPhysValFlags.setTruthStrategy() != 'HardScatter' :
         print ('WARNING Truth Strategy for for InDetPhysValMonitoring set to invalid option %s; valid flags are ["HardScatter", "All", "PileUp"]' %  (InDetPhysValFlags.setTruthStrategy()))
-         
 
-      
+
+
 
 
    else :
@@ -165,3 +165,14 @@ def getInDetPhysValMonitoringToolDBM(**kwargs) :
                       useTrackSelection          = True)
 
    return getInDetPhysValMonitoringTool(**kwargs)
+
+def getInDetLargeD0PhysValMonitoringTool(**kwargs) :
+   from InDetRecExample.InDetJobProperties import InDetFlags
+   from InDetRecExample.InDetKeys import InDetKeys
+   kwargs=setDefaults(kwargs,
+                      name                       = 'InDetPhysValMonitoringToolLargeD0',
+                      SubFolder                  = 'LargeD0/',
+                      TrackParticleContainerName = InDetKeys.xAODLargeD0TrackParticleContainer() if InDetFlags.storeSeparateLargeD0Container() else  InDetKeys.xAODTrackParticleContainer(),
+                      useTrackSelection          = True)
+
+   return getInDetPhysValMonitoringTool(**kwargs)
diff --git a/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValInDet_jobOptions.py b/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValInDet_jobOptions.py
index a3dadd6ae12e..fe45b83eaf03 100644
--- a/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValInDet_jobOptions.py
+++ b/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValInDet_jobOptions.py
@@ -7,6 +7,7 @@ from InDetPhysValMonitoring.InDetPhysValJobProperties import InDetPhysValFlags
 import InDetPhysValMonitoring.InDetPhysValMonitoringTool as InDetPhysValMonitoringTool
 
 mons=[ (True                                             , InDetPhysValMonitoringTool.getInDetPhysValMonitoringTool),
+       (InDetPhysValFlags.doValidateLargeD0Tracks()      , InDetPhysValMonitoringTool.getInDetLargeD0PhysValMonitoringTool),
        (InDetPhysValFlags.doValidateLooseTracks()        , InDetPhysValMonitoringTool.getInDetPhysValMonitoringToolLoose),
        (InDetPhysValFlags.doValidateTightPrimaryTracks() , InDetPhysValMonitoringTool.getInDetPhysValMonitoringToolTightPrimary),
        (InDetPhysValFlags.doValidateDBMTracks()          , InDetPhysValMonitoringTool.getInDetPhysValMonitoringToolDBM),
@@ -17,7 +18,6 @@ for enabled, creator in mons :
     if enabled :
         monMan.AthenaMonTools += [ creator() ]
 
-
 from InDetPhysValMonitoring.InDetPhysValMonitoringTool import getInDetPhysValMonitoringTool
 from  InDetPhysValMonitoring.InDetPhysValJobProperties import InDetPhysValFlags
 from  InDetPhysValMonitoring.ConfigUtils import extractCollectionPrefix
-- 
GitLab


From 9a8325c78f655ac57ec62e6f96dc3aeb0bc7233b Mon Sep 17 00:00:00 2001
From: Johannes Josef Junggeburth <johannes.josef.junggeburth@CERN.CH>
Date: Sat, 5 Sep 2020 18:50:20 +0200
Subject: [PATCH 009/403] Write container output for muons

---
 .../python/MuonCombinedAlgs.py                |  1 -
 .../python/MuonCombinedKeys.py                | 30 +++++++++++++++----
 .../python/MuonCombinedRecExampleConfigDb.py  | 12 ++++----
 .../python/MuonCombinedRecFlags.py            |  6 +++-
 .../share/MuonCombined_OutputItemsAOD.py      | 10 +++++--
 5 files changed, 44 insertions(+), 15 deletions(-)

diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
index 6bdc3df69e0a..90b3b8033ba0 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
@@ -75,7 +75,6 @@ def MuonCombinedInDetCandidateAlg( name="MuonCombinedInDetCandidateAlg",**kwargs
         kwargs.setdefault("InDetForwardTrackSelector", getPublicTool("MuonCombinedInDetDetailedForwardTrackSelectorTool") )
 
     kwargs.setdefault("MuonSystemExtensionTool", getPublicTool("MuonSystemExtensionTool"))
-    print (kwargs)
     return CfgMgr.MuonCombinedInDetCandidateAlg(name,**kwargs)
 
 def MuonCombinedMuonCandidateAlg( name="MuonCombinedMuonCandidateAlg", **kwargs ):
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedKeys.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedKeys.py
index ae52c1b1df0c..47e404fed022 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedKeys.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedKeys.py
@@ -36,11 +36,11 @@ class InDetTrackParticles(JobProperty):
     allowedTypes = ['str']
     StoredValue  = 'TrackParticleCandidate'
 
-class ExtrapolatedInDetParticles(JobProperty):
-    """StoreGate key for association object of ID particles plus vector of extrpolated TrackPars"""
+class InDetTrackParticlesLargeD0(JobProperty):
+    """StoreGate key for ID track particles with large radius tracking"""
     statusOn     = True
     allowedTypes = ['str']
-    StoredValue  = 'MuonCandidateTracks'
+    StoredValue  = 'TrackParticleCandidateLRT'
 
 ## classes for track collections
 class SpectrometerTracks(JobProperty): # clarify with MS if to be replaced by jobPr. in MuonRecExample
@@ -61,6 +61,12 @@ class CombinedFitTracks(JobProperty):
     allowedTypes = ['str']
     StoredValue  = 'CombinedMuonTracks'
 
+class CombinedFitTracksLargeD0(JobProperty):
+    """StoreGate key for tracks from combined fit using large d0 inner tracking particles"""
+    statusOn     = True
+    allowedTypes = ['str']
+    StoredValue  = 'CombinedMuonTracksLRT'
+
 class RefittedExtrapolatedMSTracks(JobProperty):
     """StoreGate key for tracks with refitted extrapolation using the MS part of the combined track"""
     statusOn     = True
@@ -162,6 +168,13 @@ class FinalMuons(JobProperty):
     allowedTypes = ['str']
     StoredValue  = 'Muons'
 
+class FinalMuonsLargeD0(JobProperty):
+    """StoreGate key for final muon collection with large radius InDetTracks after overlap removal and dressing"""
+    statusOn     = True
+    allowedTypes = ['str']
+    StoredValue  = 'MuonsLRT'
+
+
 class FinalCaloMuons(JobProperty):
     """StoreGate key for final muon collection from calorimeter tagging"""
     statusOn     = True
@@ -210,6 +223,8 @@ class InternalMuTagTracksContainer(JobProperty):
     allowedTypes = ['str']
     StoredValue  = 'InternalMuTagTracksContainer'
 
+
+
 ##-----------------------------------------------------------------------------
 ## 2nd step
 ## Definition of the MuonCombined flag container
@@ -222,7 +237,7 @@ class MuonCombinedContainerKeys(JobPropertyContainer):
         print("MuonCombinedKeys: Locking all keys except one thing")
         # MuonCombinedKeys.lock_JobProperties()
         [k.lock() for k in MuonCombinedKeys.__dict__.values() if hasattr(k,'is_locked') and not isinstance(k,type(MuonCombinedKeys.OneThing))]
-        return 
+        return
     pass
 
 ##-----------------------------------------------------------------------------
@@ -234,7 +249,6 @@ jobproperties.add_Container(MuonCombinedContainerKeys)
 ## 4th step
 ## adding ID flags to the MuonCombinedContainerKeys container
 jobproperties.MuonCombinedContainerKeys.add_JobProperty(InDetTrackParticles)
-jobproperties.MuonCombinedContainerKeys.add_JobProperty(ExtrapolatedInDetParticles)
 jobproperties.MuonCombinedContainerKeys.add_JobProperty(SpectrometerTracks)
 jobproperties.MuonCombinedContainerKeys.add_JobProperty(ExtrapolatedMSTracks)
 jobproperties.MuonCombinedContainerKeys.add_JobProperty(CombinedFitTracks)
@@ -262,6 +276,12 @@ jobproperties.MuonCombinedContainerKeys.add_JobProperty(SegmentTagMuons)
 jobproperties.MuonCombinedContainerKeys.add_JobProperty(SegmentTagMuonSegments)
 jobproperties.MuonCombinedContainerKeys.add_JobProperty(InternalMuTagTracksContainer)
 jobproperties.MuonCombinedContainerKeys.add_JobProperty(ExtrapolatedMSOnlyTracks)
+# Large d0 tracking muons
+jobproperties.MuonCombinedContainerKeys.add_JobProperty(FinalMuonsLargeD0)
+jobproperties.MuonCombinedContainerKeys.add_JobProperty(InDetTrackParticlesLargeD0)
+jobproperties.MuonCombinedContainerKeys.add_JobProperty(CombinedFitTracksLargeD0)
+
+
 
 ##-----------------------------------------------------------------------------
 ## 5th step
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py
index 980048cc316a..9dd6e5ac5ff7 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py
@@ -45,7 +45,7 @@ addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCombinedInDetCandidate
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCombinedInDetCandidateAlg",
                                     "MuonCombinedInDetCandidateAlg_LargeD0",
                                     TrackParticleLocation=[InDetKeys.xAODLargeD0TrackParticleContainer()],
-                                    InDetCandidateLocation="InDetCandidates_LargeD0",
+                                    InDetCandidateLocation=MuonCbKeys.InDetTrackParticlesLargeD0(),
                                     DoSiliconAssocForwardMuons=False)
 
 
@@ -53,7 +53,7 @@ addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCombinedInDetCandidate
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCombinedMuonCandidateAlg","MuonCombinedMuonCandidateAlg")
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCombinedAlg","MuonCombinedAlg")
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCombinedAlg", "MuonCombinedAlg_LargeD0",
-                                                                        InDetCandidateLocation="InDetCandidates_LargeD0",
+                                                                        InDetCandidateLocation=MuonCbKeys.InDetTrackParticlesLargeD0(),
                                                                         CombinedTagMaps=["muidcoTagMap_LargeD0","stacoTagMap_LargeD0"],
                                                                         MuidCombinedTracksLocation="MuidCombinedTracks_LargeD0",
                                                                         MuidMETracksLocation="MuidMETracks_LargeD0")
@@ -62,7 +62,7 @@ addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCombinedInDetExtension
 
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonSegmentTagAlg","MuonSegmentTagAlg")
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonSegmentTagAlg","MuonSegmentTagAlg_LargeD0",
-                                                                        InDetCandidateLocation="InDetCandidates_LargeD0",
+                                                                        InDetCandidateLocation=MuonCbKeys.InDetTrackParticlesLargeD0(),
                                                                         TagMap="segmentTagMap_LargeD0",
                                                                         MuonSegmentLocation="MuonSegments")
 
@@ -72,13 +72,13 @@ addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonSegmentTagAlg","MuonSe
 
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCreatorAlg","MuonCreatorAlg")
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCreatorAlg","MuonCreatorAlg_LargeD0",
-                                                                      MuonContainerLocation="Muons_LargeD0",
-                                                                      InDetCandidateLocation="InDetCandidates_LargeD0",
+                                                                      MuonContainerLocation=MuonCbKeys.FinalMuonsLargeD0(),
+                                                                      InDetCandidateLocation=MuonCbKeys.InDetTrackParticlesLargeD0(),
                                                                       ExtrapolatedLocation="ExtraPolatedMuon_LargeD0",
                                                                       ExtrapolatedTrackLocation="ExtraPolatedMuonTrack_LargeD0",
                                                                       MSOnlyExtrapolatedLocation="MSOnlyExtraPolatedMuons_LargeD0",
                                                                       MSOnlyExtrapolatedTrackLocation="MSOnlyExtraPolatedMuonTrack_LargeD0",
-                                                                      CombinedLocation="CombinedMuon_LargeD0",
+                                                                      CombinedLocation=MuonCbKeys.CombinedFitTracksLargeD0(),
                                                                       SegmentContainerName="MuonSegments_LargeD0",
                                                                       TrackSegmentContainerName="TrakMuonSegments_LargeD0",
                                                                       TagMaps=["muidcoTagMap_LargeD0","stacoTagMap_LargeD0","segmentTagMap_LargeD0"],
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecFlags.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecFlags.py
index d607015e7914..759c35cd2cef 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecFlags.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecFlags.py
@@ -109,7 +109,10 @@ class doxAOD(JobProperty):
     allowedTypes=['bool']
     StoredValue=True
 
-
+class doLargeRadius(JobProperty):
+    satusOn = True
+    allowedTypes=['bool']
+    StoredValue=False
 # @brief run truth-matching on tracks to evaluate tracking performance
 #
 # It will enable matching for the Combined Muon algorithms that are running
@@ -165,6 +168,7 @@ class createScaleCalibrationInput(JobProperty):
     allowedTypes=['bool']
     StoredValue=False
 
+ 
 
 ## The container with all the flags to steer MuonCombined reconstruction
 class MuonCombinedRec(JobPropertyContainer):
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/share/MuonCombined_OutputItemsAOD.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/share/MuonCombined_OutputItemsAOD.py
index 9576e4a910a2..69757f5a3c2c 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/share/MuonCombined_OutputItemsAOD.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/share/MuonCombined_OutputItemsAOD.py
@@ -3,8 +3,10 @@ MuonCombinedAODList = []
 
 from MuonCombinedRecExample.MuonCombinedKeys import MuonCombinedKeys as MuonCbKeys
 from MuonCombinedRecExample.MuonCombinedRecFlags import muonCombinedRecFlags
+from InDetRecExample.InDetJobProperties import InDetFlags
 from RecExConfig.RecFlags import rec as rec
 
+
 if DetFlags.detdescr.Calo_on(): # FIXME - check if the objects below still make sense. EJWM
    MuonCombinedAODList+=["xAOD::CaloClusterContainer#MuonClusterCollection"]
    MuonCombinedAODList+=["xAOD::CaloClusterAuxContainer#MuonClusterCollectionAux."]
@@ -23,6 +25,12 @@ if DetFlags.detdescr.Muon_on():
    MuonCombinedAODList+=[ "xAOD::TrackParticleAuxContainer#"+MuonCbKeys.SpectrometerParticles()+"Aux." + excludedAuxData ]
    MuonCombinedAODList+=[ "xAOD::MuonContainer#Muons" ]
    MuonCombinedAODList+=[ "xAOD::MuonAuxContainer#MuonsAux.-DFCommonMuonsTight.-DFCommonGoodMuon.-DFCommonMuonsMedium.-DFCommonMuonsLoose" ] # See note
+   if InDetFlags.doR3LargeD0():
+       MuonCombinedAODList+=[ "xAOD::MuonContainer#"+MuonCbKeys.FinalMuonsLargeD0() ]
+       MuonCombinedAODList+=[ "xAOD::MuonAuxContainer#"+MuonCbKeys.FinalMuonsLargeD0()+"Aux.-DFCommonMuonsTight.-DFCommonGoodMuon.-DFCommonMuonsMedium.-DFCommonMuonsLoose" ] # See note
+       MuonCombinedAODList+=[ "xAOD::TrackParticleContainer#"+MuonCbKeys.CombinedFitTracksLargeD0()]
+       MuonCombinedAODList+=[ "xAOD::TrackParticleAuxContainer#"+MuonCbKeys.CombinedFitTracksLargeD0()+"Aux." + excludedAuxData]
+
    # Note: hack to remove derivation framework variables that are added by DRAW building and are supposed to be transient
 
    ### stau
@@ -37,5 +45,3 @@ if DetFlags.detdescr.Muon_on():
 
    #Slimmed Track Collection
    #MuonCombinedAODList+=["TrackCollection#MuonSlimmedTrackCollection"]
-
-
-- 
GitLab


From a1e3560f2cb79bf1ede43454a75222ba104ab175 Mon Sep 17 00:00:00 2001
From: Johannes Josef Junggeburth <johannes.josef.junggeburth@CERN.CH>
Date: Sat, 5 Sep 2020 20:02:42 +0200
Subject: [PATCH 010/403] Add d0 vs z0 validation histogram. Fix z0 sin theta
 bug

---
 .../share/InDetPVMPlotDefCommon.xml           | 68 +++++++++++--------
 .../src/InDetPerfPlot_TrackParameters.cxx     | 24 +++++--
 .../src/InDetPerfPlot_TrackParameters.h       |  3 +
 3 files changed, 59 insertions(+), 36 deletions(-)

diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/InDetPVMPlotDefCommon.xml b/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/InDetPVMPlotDefCommon.xml
index 72aa64a3a8fd..301f6400d608 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/InDetPVMPlotDefCommon.xml
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/InDetPVMPlotDefCommon.xml
@@ -376,7 +376,7 @@
   <y title="Entries"/>
 </h>
 <h id="residualx_pixel_barrel" type="TH1F" title="Residual: Pixel Barrel X">
-  <x title="x residual(#mum)" n="100" lo="-100.0" hi="100.0"/> 
+  <x title="x residual(#mum)" n="100" lo="-100.0" hi="100.0"/>
   <y title="Entries"/>
 </h>
 <h id="residualx_pixel_barrel_1hit" type="TH1F" title="Residual: Pixel Barrel X 1 hit">
@@ -388,7 +388,7 @@
   <y title="Entries"/>
 </h>
 <h id="residualx_sct_barrel" type="TH1F" title="Residual: SCT Barrel X">
-  <x title="x residual(#mum)" n="1200" lo="-600" hi="600"/> 
+  <x title="x residual(#mum)" n="1200" lo="-600" hi="600"/>
   <y title="Entries"/>
 </h>
 <h id="residualx_sct_barrel_1hit" type="TH1F" title="Residual: SCT Barrel X 1 hit">
@@ -401,7 +401,7 @@
 </h>
 <!-- endcaps -->
 <h id="residualx_pixel_endcap" type="TH1F" title="Residual: Pixel Endcap X">
-  <x title="x residual(#mum)" n="100" lo="-100.0" hi="100.0"/> 
+  <x title="x residual(#mum)" n="100" lo="-100.0" hi="100.0"/>
   <y title="Entries"/>
 </h>
 <h id="residualx_pixel_endcap_1hit" type="TH1F" title="Residual: Pixel Endcap X 1 hit">
@@ -413,7 +413,7 @@
   <y title="Entries"/>
 </h>
 <h id="residualx_sct_endcap" type="TH1F" title="Residual: SCT Endcap X">
-  <x title="x residual(#mum)" n="1200" lo="-600" hi="600"/> 
+  <x title="x residual(#mum)" n="1200" lo="-600" hi="600"/>
   <y title="Entries"/>
 </h>
 <h id="residualx_sct_endcap_1hit" type="TH1F" title="Residual: SCT Endcap X 1 hit">
@@ -439,7 +439,7 @@
   <y title="Entries"/>
 </h>
 <h id="residualy_pixel_barrel" type="TH1F" title="Residual: Pixel Barrel Y">
-  <x title="y residual(#mum)" n="100" lo="-1000.0" hi="1000.0"/> 
+  <x title="y residual(#mum)" n="100" lo="-1000.0" hi="1000.0"/>
   <y title="Entries"/>
 </h>
 <h id="residualy_pixel_barrel_1hit" type="TH1F" title="Residual: Pixel Barrel Y 1 hit">
@@ -464,7 +464,7 @@
 </h>
 <!-- endcaps -->
 <h id="residualy_pixel_endcap" type="TH1F" title="Residual: Pixel Endcap Y">
-  <x title="y residual(#mum)" n="100" lo="-1000.0" hi="1000.0"/> 
+  <x title="y residual(#mum)" n="100" lo="-1000.0" hi="1000.0"/>
   <y title="Entries"/>
 </h>
 <h id="residualy_pixel_endcap_1hit" type="TH1F" title="Residual: Pixel Endcap Y 1 hit">
@@ -625,7 +625,7 @@
 <h id="efficiency_vs_eta" type="TEfficiency" title="Fraction of reco-matched truth track">
   <x title="#eta" n="20" lo="-&ETA;" hi="&ETA;"/>
   <y title="Efficiency" lo="0.0" hi="2.0"/>
-</h> 
+</h>
 <h id="efficiency_vs_pt" type="TEfficiency" title="Fraction of reco-matched truth track">
   <x title="p_{T} [GeV]" n="25" lo="0" hi="50"/>
   <y title="Efficiency" lo="0.0" hi="2.0"/>
@@ -674,7 +674,7 @@
 <h id="fakerate_vs_eta" type="TEfficiency" title="Fractions of reco-tracks with matching probability &lt; 50%">
   <x title="#eta" n="20" lo="-&ETA;" hi="&ETA;"/>
   <y title="Fake Rate" lo="0.0" hi="2.0"/>
-</h> 
+</h>
 <h id="fakerate_vs_pt" type="TEfficiency" title="Fractions of reco-tracks with matching probability &lt; 50%">
   <x title="p_{T} [GeV]" n="100" lo="0" hi="50.0"/>
   <y title="Fake Rate" lo="0.0" hi="2.0"/>
@@ -945,7 +945,7 @@
   <x title="reco_{z_{0} #times sin} - truth_{z_{0} #times sin}" n="100" lo="-&Z0SINRES;" hi="&Z0SINRES;"/>
   <y title="Number of Entries"/>
 </h>
-     
+
 <h id="sigma_d0" type="TH1F" title="#sigma(d_{0})">
   <x title="#sigma(d_{0}) [mm]" n="100" lo="0" hi="&D0RES;"/>
   <y title="Number of Entries"/>
@@ -1059,7 +1059,7 @@
   <x title="p_{T} [GeV]" n="100" lo="0." hi="100"/>
   <y title="reco_{z_{0} #times sin} - truth_{z_{0} #times sin} [mm]" n="1000" lo="-&Z0SINRES;" hi="&Z0SINRES;"/>
 </h>
-    
+
 
 <h id="pullHelper_eta_d0" type="TH2F" title="pull vs #eta for d_{0}">
   <x title="#eta" n="&NETA;" lo="-&ETA;" hi="&ETA;"/>
@@ -1471,82 +1471,82 @@
 <h id="sigma_vs_eta_d0" type="TProfile" title="#sigma(d_{0}) vs #eta">
   <x title="#eta" n="&NETA;" lo="-&ETA;" hi="&ETA;"/>
   <y title="#sigma(d_{0}) [mm}" lo="-1.5" hi="1.5"/>
-</h> 
+</h>
 
 <h id="sigma_vs_eta_z0" type="TProfile" title="#sigma(z_{0}) vs #eta">
   <x title="#eta" n="&NETA;" lo="-&ETA;" hi="&ETA;"/>
   <y title="#sigma(z_{0}) [mm]" lo="-10.0" hi="10.0"/>
-</h>  
+</h>
 
 <h id="sigma_vs_eta_qoverp" type="TProfile" title="#sigma_{qoverp} vs #eta">
   <x title="#eta" n="&NETA;" lo="-&ETA;" hi="&ETA;"/>
   <y title="#sigma_{qoverp}" lo="-2.5e-5" hi="2.5e-5"/>
-</h>  
+</h>
 
 <h id="sigma_vs_eta_ptqopt" type="TProfile" title="p_{T} #times #sigma(q/p_{T}) vs #eta">
   <x title="#eta" n="&NETA;" lo="-&ETA;" hi="&ETA;"/>
   <y title="p_{T} #times #sigma(q/p_{T})" lo="-15.0" hi="15.0"/>
-</h>  
+</h>
 
 <h id="sigma_vs_eta_pt" type="TProfile" title="#sigma_{pt} vs #eta">
   <x title="#eta" n="&NETA;" lo="-&ETA;" hi="&ETA;"/>
   <y title="#sigma_{pt}" lo="0.0" hi="100"/>
-</h>  
+</h>
 
 <h id="sigma_vs_eta_theta" type="TProfile" title="#sigma(#theta) vs #eta">
   <x title="#eta" n="&NETA;" lo="-&ETA;" hi="&ETA;"/>
   <y title="#sigma(#theta)" lo="-0.01" hi="0.01"/>
-</h>  
+</h>
 
 <h id="sigma_vs_eta_phi" type="TProfile" title="#sigma(#phi) vs #eta">
   <x title="#eta" n="&NETA;" lo="-&ETA;" hi="&ETA;"/>
   <y title="#sigma(#phi) [rads]" lo="-0.01" hi="0.01"/>
-</h>  
+</h>
 
 <h id="sigma_vs_eta_z0sin" type="TProfile" title="#sigma(z_{0} #times sin) vs #eta">
   <x title="#eta" n="&NETA;" lo="-&ETA;" hi="&ETA;"/>
   <y title="#sigma(z_{0} #times sin)" lo="-0.2" hi="0.2"/>
-</h>  
+</h>
 
 <h id="sigma_vs_pt_d0" type="TProfile" title="#sigma(d_{0}) vs p_{T}">
   <x title="p_{T} [GeV]" n="&NETA;" lo="0.0" hi="100"/>
   <y title="#sigma(d_{0}) [mm]" lo="-1.5" hi="1.5"/>
-</h> 
+</h>
 
 <h id="sigma_vs_pt_z0" type="TProfile" title="#sigma(z_{0}) vs p_{T}">
   <x title="p_{T} [GeV]" n="&NETA;" lo="0.0" hi="100"/>
   <y title="#sigma(z_{0}) [mm]" lo="-10.0" hi="10.0"/>
-</h>  
+</h>
 
 <h id="sigma_vs_pt_qoverp" type="TProfile" title="#sigma_{qoverp} vs pT">
   <x title="p_{T} [GeV]"  n="&NETA;" lo="0.0" hi="100"/>
   <y title="#sigma_{qoverp}" lo="-2.5e-5" hi="2.5e-5"/>
-</h>  
+</h>
 
 <h id="sigma_vs_pt_ptqopt" type="TProfile" title="p_{T} #times #sigma(q/p_{T}} vs p_{T}">
   <x title="p_{T} [GeV]" n="&NETA;" lo="0.0" hi="100"/>
   <y title="p_{T} #times #sigma(q/p_{T})" lo="-15.0" hi="15.0"/>
-</h>  
+</h>
 
 <h id="sigma_vs_pt_pt" type="TProfile" title="#sigma_{pt} vs pT">
   <x title="p_{T} [GeV]" n="&NETA;" lo="0.0" hi="100"/>
   <y title="#sigma_{pt}" lo="-100.0" hi="100.0"/>
-</h>  
+</h>
 
 <h id="sigma_vs_pt_theta" type="TProfile" title="#sigma(#theta) vs p_{T}">
   <x title="p_{T} [GeV]" n="&NETA;" lo="0.0" hi="100"/>
   <y title="#sigma(#theta) [rads]" lo="-0.01" hi="0.01" />
-</h>  
+</h>
 
 <h id="sigma_vs_pt_phi" type="TProfile" title="#sigma(phi) vs p_{T}">
   <x title="p_{T} [GeV]" n="&NETA;" lo="0.0" hi="100"/>
   <y title="#sigma(#phi) [rads]" lo="-0.01" hi="0.01"/>
-</h>  
+</h>
 
 <h id="sigma_vs_pt_z0sin" type="TProfile" title="#sigma(z_{0} #times sin) vs p_{T}">
   <x title="p_{T} [GeV]" n="&NETA;" lo="0.0" hi="100"/>
   <y title="#sigma(z_{0} #times sin)" lo="-0.2" hi="0.2"/>
-</h>  
+</h>
 
 
 <!-- End of standard resolution plots-->
@@ -1606,7 +1606,7 @@
   <x title="reco_{#chi^2/ndof}" n="100" lo="0.0" hi="5.0"/>
   <y title="Number of Entries"/>
 </h>
-  
+
 <h id="reco_author" type="TH1F" title="reco_{author}">
   <x title="reco_{author}" n="52" lo="0" hi="52"/>
   <y title="Number of Entries"/>
@@ -1621,6 +1621,16 @@
   <y title="reco_{#eta}" n="100" lo="-&ETA;" hi="&ETA;"/>
 </h>
 
+<h id="reco_d0_vs_z0" type="TH2F" title="reco d_{T} vs z_{0}">
+  <x title="reco_{d_0}" n="100" lo="-20" hi="20"/>
+  <y title="reco_{z_{0}}" n="100" lo="-250" hi="250"/>
+</h>
+
+<h id="reco_d0_vs_z0sin" type="TH2F" title="reco d_{T} vs z_{0} sin #theta">
+  <x title="reco_{d_0}" n="100" lo="-20" hi="20"/>
+  <y title="reco_{z_{0} sin #theta}" n="100" lo="-10" hi="10"/>
+</h>
+
 <h id="truth_d0" type="TH1F" title="truth_{d_{0}}">
   <x title="truth_{d0} [mm]" n="100" lo="-&D0PARA;" hi="&D0PARA;"/>
   <y title="Number of Entries"/>
@@ -1870,7 +1880,7 @@
 <h id="efficiency_vs_dR" type="TEfficiency" title="Fraction of reco-matched truth track versus #DeltaR">
   <x title="#DeltaR" n="40" lo="0.0" hi="&DRMAX;"/>
   <y title="Efficiency" lo="0.0" hi="2.0"/>
-</h> 
+</h>
 
 <h id="efficiency_vs_smalldR" type="TEfficiency" title="Fraction of reco-matched truth track versus #DeltaR">
   <x title="#DeltaR" n="40" lo="0.0" hi="&SMALLDRMAX;"/>
@@ -1886,7 +1896,7 @@
 <h id="fakerate_vs_dR" type="TEfficiency" title="Fake rate versus #DeltaR">
   <x title="#DeltaR" n="40" lo="0.0" hi="&DRMAX;"/>
   <y title="Fake Rate" lo="0.0" hi="2.0"/>
-</h> 
+</h>
 
 <h id="fakerate_vs_smalldR" type="TEfficiency" title="Fake rate versus #DeltaR">
   <x title="#DeltaR" n="40" lo="0.0" hi="&SMALLDRMAX;"/>
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_TrackParameters.cxx b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_TrackParameters.cxx
index 3220f56896f6..104e72335cfd 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_TrackParameters.cxx
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_TrackParameters.cxx
@@ -45,6 +45,10 @@ InDetPerfPlot_TrackParameters::InDetPerfPlot_TrackParameters(InDetPlotBase* pPar
   m_reco_pt_vs_eta{},
   m_reco_phi_vs_eta{},
 
+  m_reco_d0_z0{},
+  m_reco_d0_z0sin{},
+
+
   m_truth_pt_vs_eta{},
   m_truth_phi_vs_eta{} {
 }
@@ -76,11 +80,14 @@ InDetPerfPlot_TrackParameters::initializePlots() {
   book(m_truth_pt,     "truth_pt");
   book(m_truth_lowpt,     "truth_lowpt");
   book(m_truth_prodR,  "truth_prodR");
-  book(m_truth_prodZ,  "truth_prodZ"); 
+  book(m_truth_prodZ,  "truth_prodZ");
 
   book(m_reco_pt_vs_eta, "reco_pt_vs_eta");
   book(m_reco_phi_vs_eta, "reco_phi_vs_eta");
 
+  book(m_reco_d0_z0, "reco_d0_vs_z0");
+  book(m_reco_d0_z0sin, "reco_d0_vs_z0sin");
+
   book(m_truth_pt_vs_eta, "truth_pt_vs_eta");
   book(m_truth_phi_vs_eta, "truth_phi_vs_eta");
 
@@ -92,7 +99,7 @@ InDetPerfPlot_TrackParameters::fill(const xAOD::TruthParticle& particle) {
   // quantities with xAOD::TruthParticle accessors:
   float eta = particle.eta();
   float pt = particle.pt() / Gaudi::Units::GeV;
-  
+
   float d0 = (particle.isAvailable<float>("d0")) ? particle.auxdata<float>("d0") : -9999.;
   float z0 = (particle.isAvailable<float>("z0")) ? particle.auxdata<float>("z0") : -9999.;
   float theta = (particle.isAvailable<float>("theta")) ? particle.auxdata<float>("theta") : -9999.;
@@ -110,7 +117,7 @@ InDetPerfPlot_TrackParameters::fill(const xAOD::TruthParticle& particle) {
   if(qOverP > -9000.) fillHisto(m_truth_qoverp, qOverP);
   if(prodR > -9000.) fillHisto(m_truth_prodR, prodR);
   if(prodZ > -9000.) fillHisto(m_truth_prodZ, prodZ);
-  
+
   fillHisto(m_truth_eta, eta);
   fillHisto(m_truth_pt, pt);
   fillHisto(m_truth_lowpt, pt);
@@ -126,15 +133,15 @@ InDetPerfPlot_TrackParameters::fill(const xAOD::TrackParticle& particle) {
   float pt = particle.pt() / Gaudi::Units::GeV;
   float eta = particle.eta();
   float phi = particle.phi0();
-  
+
   float chi2 = particle.chiSquared();
   float ndof = particle.numberDoF();
   float chi2Overndof = ndof > 0 ? chi2 / ndof : 0;
-  
+
 
   fillHisto(m_reco_d0, particle.d0());
   fillHisto(m_reco_z0, particle.z0());
-  fillHisto(m_reco_z0sin, particle.z0()* particle.theta());
+  fillHisto(m_reco_z0sin, particle.z0()* std::sin(particle.theta()));
 
   fillHisto(m_reco_phi, phi);
   fillHisto(m_reco_theta, particle.theta());
@@ -146,13 +153,16 @@ InDetPerfPlot_TrackParameters::fill(const xAOD::TrackParticle& particle) {
   fillHisto(m_reco_pt_vs_eta, pt, eta);
   fillHisto(m_reco_phi_vs_eta, phi, eta);
 
+  fillHisto(m_reco_d0_z0,    particle.d0(), particle.z0());
+  fillHisto(m_reco_d0_z0sin, particle.d0(), particle.z0()*std::sin(particle.theta()));
+
   fillHisto(m_reco_chi2, chi2);
   fillHisto(m_reco_ndof, ndof);
   fillHisto(m_reco_chi2Overndof, chi2Overndof);
 
   std::bitset<xAOD::TrackPatternRecoInfo::NumberOfTrackRecoInfo>  patternInfo = particle.patternRecoInfo();
   for(unsigned int i = 0; i < xAOD::TrackPatternRecoInfo::NumberOfTrackRecoInfo; i++){
-    if(patternInfo.test(i)) fillHisto(m_reco_author, i);  
+    if(patternInfo.test(i)) fillHisto(m_reco_author, i);
   }
 
 }
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_TrackParameters.h b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_TrackParameters.h
index ce9a73c04308..126192b1ebc7 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_TrackParameters.h
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_TrackParameters.h
@@ -56,6 +56,9 @@ private:
   TH2* m_reco_pt_vs_eta;
   TH2* m_reco_phi_vs_eta;
 
+  TH2* m_reco_d0_z0;
+  TH2* m_reco_d0_z0sin;
+
   TH2* m_truth_pt_vs_eta;
   TH2* m_truth_phi_vs_eta;
 
-- 
GitLab


From 42fe52473ad4927b64fc5c5fcbb67ce09583bffb Mon Sep 17 00:00:00 2001
From: Debo <debottam.bakshi.gupta@cern.ch>
Date: Mon, 7 Sep 2020 15:48:54 +0200
Subject: [PATCH 011/403] introducing trigger photon with deltaPhi selection

---
 .../src/TrigEgammaDiphotonDPhiHypoTool.cxx    | 74 +++++++++++++++++++
 .../src/TrigEgammaDiphotonDPhiHypoTool.h      | 74 +++++++++++++++++++
 .../src/components/TrigEgammaHypo_entries.cxx |  3 +-
 .../python/HLTMenuConfig/Egamma/PhotonDef.py  | 18 ++++-
 .../Egamma/PhotonSequenceSetup.py             |  3 +
 .../python/HLTMenuConfig/Menu/LS2_v1.py       |  3 +
 6 files changed, 172 insertions(+), 3 deletions(-)
 create mode 100644 Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.cxx
 create mode 100644 Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.h

diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.cxx
new file mode 100644
index 000000000000..4a68998ccb99
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.cxx
@@ -0,0 +1,74 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**************************************************************************
+ **
+ **   File: Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.h
+ **
+ **   Description: - Hypothesis Tool: search for photon pairs with
+ **                deltaPhi more than a threshold value; intended for H->gg
+ **
+ **   Author: D. BakshiGupta  <debottam.bakshigupta@cern.ch>
+ **
+ **************************************************************************/
+
+
+#include "TrigEgammaDiphotonDPhiHypoTool.h"
+
+#include <cmath>
+
+using namespace TrigCompositeUtils;
+
+TrigEgammaDiphotonDPhiHypoTool::TrigEgammaDiphotonDPhiHypoTool(const std::string& type, const std::string& name, const IInterface* parent)
+    : ComboHypoToolBase(type, name, parent) {}
+
+
+StatusCode TrigEgammaDiphotonDPhiHypoTool::initialize()
+{
+  ATH_MSG_DEBUG("AcceptAll            = " << m_acceptAll );
+  ATH_MSG_DEBUG("ThresholdDPhiCut         = " << m_thresholdDPhiCut );
+
+  if ( not m_monTool.name().empty() ) {
+        ATH_CHECK( m_monTool.retrieve() );
+        ATH_MSG_DEBUG("m_monTool name: " << m_monTool);
+  }
+
+ ATH_MSG_DEBUG("Initialization completed successfully");
+
+  return StatusCode::SUCCESS;
+}
+
+bool TrigEgammaDiphotonDPhiHypoTool::executeAlg(std::vector<LegDecision> &combination) const {
+
+//retrieve the electrons 
+  std::vector<ElementLink<xAOD::PhotonContainer>> selected_photons;
+  for (auto el: combination){
+    auto EL= el.second;    
+    auto photonLink = TrigCompositeUtils::findLink<xAOD::PhotonContainer>( *EL, featureString() ).link;
+    selected_photons.push_back(photonLink);
+  }
+  auto photonLink1=selected_photons[0];
+  auto photonLink2=selected_photons[1];
+  TLorentzVector hlv1 = (*photonLink1)->p4();
+  TLorentzVector hlv2 = (*photonLink2)->p4();
+  double dPhi = hlv1.DeltaPhi(hlv2);
+  ATH_MSG_DEBUG("Found two Photons with deltaPhi " <<dPhi);
+
+  // apply the cut
+  bool pass=true;
+  if (dPhi<m_thresholdDPhiCut){ 
+      ATH_MSG_DEBUG("Combination failed deltaPhi cut: " << dPhi << " not in " << m_thresholdDPhiCut);
+      pass=false;
+  }
+
+  if (pass)
+     ATH_MSG_DEBUG( " deltaPhi " << dPhi << " is above the threshold "<<m_thresholdDPhiCut<<" This seleciton passed! ");
+  
+return pass;
+
+}
+
+
+
+
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.h
new file mode 100644
index 000000000000..08a5b52e75c7
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.h
@@ -0,0 +1,74 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRIGEGAMMAHYPO_TRIGEGAMMADIPHOTONDPHIHYPOTOOL_H
+#define TRIGEGAMMAHYPO_TRIGEGAMMADIPHOTONDPHIHYPOTOOL_H
+
+/**************************************************************************
+ **
+ **   File: Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.h
+ **
+ **   Description: - Hypothesis Tool: search for photon pairs with 
+ **                deltaPhi more than a threshold value; intended for H->gg
+ **
+ **   Author: D. BakshiGupta  <debottam.bakshigupta@cern.ch>
+ **
+ **************************************************************************/ 
+
+#include <string>
+#include <vector>
+
+#include "DecisionHandling/ComboHypoToolBase.h"
+
+#include "xAODTracking/TrackParticleContainer.h"
+#include "xAODTrigEgamma/TrigPhoton.h"
+#include "xAODEgamma/PhotonContainer.h"
+
+#include "TrigCompositeUtils/HLTIdentifier.h"
+#include "TrigCompositeUtils/TrigCompositeUtils.h"
+
+#include "AthenaMonitoringKernel/Monitored.h"
+#include "AthenaMonitoringKernel/GenericMonitoringTool.h"
+
+
+/**
+ * \class TrigEgammaDiphotonDPhiHypoTool
+ * \brief TrigEgammaDiphotonDPhiHypoTool is a ComboHypoTool that calculates the deltaPhi distance 
+ * Apply the threshold cut and accepts the event if condition is 
+ * satisfied
+ *
+ */
+
+
+class TrigEgammaDiphotonDPhiHypoTool:  public ComboHypoToolBase {
+
+ public:
+  
+  TrigEgammaDiphotonDPhiHypoTool(const std::string& type,
+                    const std::string& name,
+                    const IInterface* parent);
+  
+  virtual ~TrigEgammaDiphotonDPhiHypoTool() {};
+  virtual StatusCode initialize() override;
+
+
+ private:
+  
+  virtual bool executeAlg(std::vector<LegDecision>& thecomb) const override;
+  
+  // flags
+  Gaudi::Property< bool > m_acceptAll {this, "AcceptAll", false, "Ignore selection" };
+  
+  // cuts
+  Gaudi::Property<float> m_thresholdDPhiCut {this,"ThresholdDPhiCut", 1.5, "minimum deltaPhi required between two photons"};
+  
+  // monitoring
+  ToolHandle<GenericMonitoringTool> m_monTool { this, "MonTool", "", "Monitoring tool" };
+
+
+}; // TRIGEGAMMAHYPO_TRIGEGAMMADIPHOTONDPHIHYPOTOOL_H
+#endif
+
+
+
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/components/TrigEgammaHypo_entries.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/components/TrigEgammaHypo_entries.cxx
index 0c58c9a66ebc..840aa82ce70c 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/components/TrigEgammaHypo_entries.cxx
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/components/TrigEgammaHypo_entries.cxx
@@ -31,6 +31,7 @@
 #include "../TrigEgammaPrecisionPhotonHypoToolMult.h"
 #include "../TrigEgammaPrecisionElectronHypoToolMult.h"
 #include "../TrigEgammaDielectronMassHypoTool.h"
+#include "../TrigEgammaDiphotonDPhiHypoTool.h"
 
 DECLARE_COMPONENT( TrigL2CaloHypo )
 DECLARE_COMPONENT( TrigL2ElectronFex )
@@ -65,4 +66,4 @@ DECLARE_COMPONENT( TrigEgammaPrecisionElectronHypoAlgMT )
 DECLARE_COMPONENT( TrigEgammaPrecisionPhotonHypoToolMult )
 DECLARE_COMPONENT( TrigEgammaPrecisionElectronHypoToolMult )
 DECLARE_COMPONENT( TrigEgammaDielectronMassHypoTool )
-
+DECLARE_COMPONENT( TrigEgammaDiphotonDPhiHypoTool )
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonDef.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonDef.py
index c52532fcbf3e..1f9709a6e941 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonDef.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonDef.py
@@ -2,6 +2,8 @@
 # Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 #
 
+from AthenaCommon.Constants import DEBUG
+
 from AthenaCommon.Logging import logging
 logging.getLogger().info("Importing %s",__name__)
 log = logging.getLogger("TriggerMenuMT.HLTMenuConfig.Egamma.PhotonDef")
@@ -30,6 +32,14 @@ def precisionPhotonCaloSequenceCfg( flags ):
 def precisionPhotonSequenceCfg( flags ):
     return precisionPhotonMenuSequence('Photon')
 
+def diphotonDPhiHypoToolFromDict(chainDict):
+    from TrigEgammaHypo.TrigEgammaHypoConf import TrigEgammaDiphotonDPhiHypoTool
+    name = chainDict['chainName']
+    tool= TrigEgammaDiphotonDPhiHypoTool(name)
+    tool.ThresholdDPhiCut = 1.5
+    tool.OutputLevel = DEBUG
+    return tool
+
 #----------------------------------------------------------------
 # Class to configure chain
 #----------------------------------------------------------------
@@ -95,5 +105,9 @@ class PhotonChainConfiguration(ChainConfigurationBase):
         return self.getStep(3,stepName,[ precisionPhotonCaloSequenceCfg])
             
     def getPrecisionPhoton(self):
-        stepName = "PhotonPrecision"
-        return self.getStep(4,stepName,[ precisionPhotonSequenceCfg])
+        if "dPhi15" in self.chainName:
+            stepName = "precision_topophoton"
+            return self.getStep(4,stepName,sequenceCfgArray=[precisionPhotonSequenceCfg], comboTools=[diphotonDPhiHypoToolFromDict])
+        else:
+            stepName = "precision_photon"
+            return self.getStep(4,stepName,[ precisionPhotonSequenceCfg])
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonSequenceSetup.py
index b26abbfc3d37..aabeba28db84 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonSequenceSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonSequenceSetup.py
@@ -1,5 +1,7 @@
 # Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 
+from AthenaCommon.Constants import DEBUG
+
 # menu components   
 from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import MenuSequence, RecoFragmentsPool
 from AthenaCommon.CFElements import parOR, seqAND
@@ -101,6 +103,7 @@ def precisionPhotonMenuSequence(name):
 
     thePrecisionPhotonHypo = TrigEgammaPrecisionPhotonHypoAlgMT(name+"precisionPhotonHypo")
     thePrecisionPhotonHypo.Photons = sequenceOut
+    thePrecisionPhotonHypo.OutputLevel = DEBUG
 
     return MenuSequence( Sequence    = sequence,
                          Maker       = precisionPhotonViewsMaker, 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
index b55f21c991ee..191f72248a09 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
@@ -155,6 +155,9 @@ def setupMenu():
     
         # for moving to PhysicsP1, ATR-21242
         ChainProp(name='HLT_g140_etcut_L1EM22VHI', groups=SinglePhotonGroup),
+
+        #ATR-21882
+        ChainProp(name='HLT_2g15_tight_dPhi15_L12EM3', groups=MultiPhotonGroup),
     ]
 
     TriggerFlags.METSlice.signatures = TriggerFlags.METSlice.signatures() + [
-- 
GitLab


From 5c338ff20a2f0b1ca759d5a891e0e670a46176ff Mon Sep 17 00:00:00 2001
From: Johannes Josef Junggeburth <johannes.josef.junggeburth@CERN.CH>
Date: Wed, 9 Sep 2020 10:53:38 +0200
Subject: [PATCH 012/403] Shovel LRT muons without associated ID track

---
 .../share/PhysValMuon_jobOptions.py           |  8 +++---
 .../src/MuonCreatorTool.cxx                   | 20 +++++++++-----
 .../src/MuonCreatorTool.h                     |  4 +++
 .../python/MuonCombinedAlgs.py                |  6 +++--
 .../python/MuonCombinedKeys.py                |  8 ++++++
 .../python/MuonCombinedRecExampleConfigDb.py  | 26 +++++++++++++++----
 6 files changed, 54 insertions(+), 18 deletions(-)

diff --git a/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValMuon_jobOptions.py b/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValMuon_jobOptions.py
index 44c99a5e76ef..40bd1afd30d6 100644
--- a/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValMuon_jobOptions.py
+++ b/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValMuon_jobOptions.py
@@ -8,9 +8,9 @@ tool1 = MuonPhysValMonitoring__MuonPhysValMonitoringTool( name = 'muphysval' )
 tool1.IsData = not recFlags.doTruth()
 
 #
-tool1.MuonContainerName = 'Muons';
-tool1.SlowMuonContainerName = '';
-tool1.MuonTruthParticleContainerName = 'MuonTruthParticles';
+tool1.MuonContainerName = 'MuonsLRT'
+tool1.SlowMuonContainerName = ''
+tool1.MuonTruthParticleContainerName = 'MuonTruthParticles'
 tool1.DoBinnedResolutionPlots = True
 
 #comment out if you don't need any of the following containers
@@ -55,7 +55,7 @@ tool1.SelectMuonAuthors = [ 1, 2, 4 ,5, 6, 8, 9 ]
 
 #Select Muon Categories... (origin of muons, empty: all categories, 0: ALL, 1: PROMPT, 2: IN-FLIGHT, 3: NON-ISOLATED, 4: REST)
 #tool1.SelectMuonCategories = [ 0, 1, 2, 3, 4 ] # all possible categories
-tool1.SelectMuonCategories = [ 0, 1 ] # lighter version, good for official validation tasks; overriden when in data mode
+tool1.SelectMuonCategories = [ 0, 1 ] # lighter version, good for official validation tasks overriden when in data mode
 
 from IsolationSelection.IsolationSelectionConf import CP__IsolationSelectionTool
 IsolationTool = CP__IsolationSelectionTool( "IsolationSelectionTool",
diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.cxx b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.cxx
index 73cf0339ac54..e341909ee5af 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.cxx
@@ -274,7 +274,7 @@ namespace MuonCombined {
     // skip all muons without extrapolated track
     if( !candidate.extrapolatedTrack() ) {
       ATH_MSG_DEBUG("MuonCreatorTool::create(...) No extrapolated track - aborting. Will not create Muon.");
-      return 0; // Do we really want to do this?
+      return nullptr; // Do we really want to do this?
     }
     
     // Create the xAOD object:
@@ -291,13 +291,13 @@ namespace MuonCombined {
     if(!muon->extrapolatedMuonSpectrometerTrackParticleLink().isValid()){
       ATH_MSG_DEBUG("Creation of track particle for SA muon failed, removing it");
       outputData.muonContainer->pop_back();
-      return 0;
+      return nullptr;
     }
     
     if( !dressMuon(*muon) ){
       ATH_MSG_WARNING("Failed to dress muon");
       outputData.muonContainer->pop_back();
-      return 0;
+      return nullptr;
     }
 
     //make sure we can extrapolate the track back through the calo, otherwise it's not a muon
@@ -308,18 +308,24 @@ namespace MuonCombined {
     if(!caloExtension){
       ATH_MSG_DEBUG("failed to get a calo extension for this SA muon, discard it");
       outputData.muonContainer->pop_back();
-      return 0;
+      return nullptr;
     }
     if( caloExtension->caloLayerIntersections().empty()){
       ATH_MSG_DEBUG("failed to retrieve any calo layers for this SA muon, discard it");
       outputData.muonContainer->pop_back();
-      return 0;
+      return nullptr;
     }
 
     // check if there is a cluster container, if yes collect the cells around the muon and fill
     // Etcore variables for muon
-    if(m_useCaloCells) collectCells(*muon,outputData.clusterContainer);
-
+    if (m_useCaloCells) collectCells(*muon,outputData.clusterContainer);
+    if (m_requireIDTracks){
+        if (!muon->trackParticle(xAOD::Muon::TrackParticleType:: InnerDetectorTrackParticle)){
+            ATH_MSG_DEBUG("The muon does not have any associated ID track although it should have. Discard it");
+            outputData.muonContainer->pop_back();
+            return nullptr;
+        }
+    }
     return muon;
   }
 
diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.h b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.h
index 2fca9f99a211..a2558dc32571 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.h
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.h
@@ -182,6 +182,10 @@ namespace MuonCombined {
     Gaudi::Property<bool> m_segLowBeta {this, "AssociateSegmentsToLowBetaMuons", false, "associate segments to MuGirlLowBeta muons"};
     Gaudi::Property<bool> m_useCaloCells {this, "UseCaloCells", true};
     Gaudi::Property<bool> m_doSA {this, "MakeSAMuons", false};
+    /// In case of running the muon reconstruction with LRT tracks this property 
+    /// removes the overlap of muons in the container in which in any case
+    /// no ID track is available
+    Gaudi::Property<bool> m_requireIDTracks{this,"RequireIDTrack", false};
 
     Gaudi::Property<float> m_sigmaCaloNoiseCut {this, "SigmaCaloNoiseCut", 3.4};
   };
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
index 90b3b8033ba0..6747c9222c44 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
@@ -176,11 +176,13 @@ class MuonCombinedReconstruction(ConfiguredMuonRec):
             topSequence += getAlgorithm("MuonInsideOutRecoAlg")
             if muonCombinedRecFlags.doMuGirlLowBeta():
                 topSequence += getAlgorithm("MuGirlStauAlg")
-            #if InDetFlags.doR3LargeD0():
-            #    topSequence += getAlgorithm("MuGirlAlg_LargeD0")
+            if InDetFlags.doR3LargeD0():
+                topSequence += getAlgorithm("MuGirlAlg_LargeD0")
 
         if muonCombinedRecFlags.doCaloTrkMuId():
             topSequence += getAlgorithm("MuonCaloTagAlg")
+            if InDetFlags.doR3LargeD0():
+                topSequence += getAlgorithm("MuonCaloTagAlg_LargeD0")
 
         if muonCombinedRecFlags.doMuonSegmentTagger():
             getPublicTool("MuonSegmentTagTool")
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedKeys.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedKeys.py
index 47e404fed022..9ee62629c01b 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedKeys.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedKeys.py
@@ -154,6 +154,12 @@ class MuGirlMuons(JobProperty):
     allowedTypes = ['str']
     StoredValue  = 'MuGirlCombinedMuonContainer'
 
+class MuGirlMuonsLargeD0(JobProperty):
+    """StoreGate key for muon container from MuGirl algorithm"""
+    statusOn     = True
+    allowedTypes = ['str']
+    StoredValue  = 'MuGirlCombinedMuonContainerLRT'
+
 
 ## final muon collections
 class ESD_Muons(JobProperty):
@@ -280,6 +286,8 @@ jobproperties.MuonCombinedContainerKeys.add_JobProperty(ExtrapolatedMSOnlyTracks
 jobproperties.MuonCombinedContainerKeys.add_JobProperty(FinalMuonsLargeD0)
 jobproperties.MuonCombinedContainerKeys.add_JobProperty(InDetTrackParticlesLargeD0)
 jobproperties.MuonCombinedContainerKeys.add_JobProperty(CombinedFitTracksLargeD0)
+jobproperties.MuonCombinedContainerKeys.add_JobProperty(MuGirlMuonsLargeD0)
+
 
 
 
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py
index 9dd6e5ac5ff7..c54557a5c289 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py
@@ -36,29 +36,42 @@ addTool("Rec::MuonScatteringAngleSignificanceTool","MuonScatteringAngleSignifica
 addTool( "Muon::MuonSystemExtensionTool", "MuonSystemExtensionTool", ParticleCaloExtensionTool = "MuonParticleCaloExtensionTool", Extrapolator = "AtlasExtrapolator")
 addTool("MuonCombinedRecExample.MuonCombinedFitTools.MuonMaterialProviderTool","MuonMaterialProviderTool")
 
-addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuGirlAlg","MuGirlAlg")
+
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCaloTagAlg","MuonCaloTagAlg")
+addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCaloTagAlg","MuonCaloTagAlg_LargeD0",
+                                                                      InDetCandidateLocation=MuonCbKeys.InDetTrackParticlesLargeD0(),                                 
+                                                                      TagMap="caloTagMap_LargeD0")
+
+
+
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonInsideOutRecoAlg","MuonInsideOutRecoAlg")
+addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonInsideOutRecoAlg","MuGirlAlg_LargeD0",
+                                  InDetCandidateLocation=MuonCbKeys.InDetTrackParticlesLargeD0(),
+                                  CombinedTrackCollection=MuonCbKeys.MuGirlMuonsLargeD0(),
+                                  METrackCollection="MuGirlMETracksLargeD0",
+                                  SegmentCollection="MuGirlSegmentsLargeD0",
+                                  TagMap="MuGirlMap_LargeD0")
+
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuGirlStauAlg","MuGirlStauAlg")
 
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCombinedInDetCandidateAlg","MuonCombinedInDetCandidateAlg")
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCombinedInDetCandidateAlg",
                                     "MuonCombinedInDetCandidateAlg_LargeD0",
                                     TrackParticleLocation=[InDetKeys.xAODLargeD0TrackParticleContainer()],
-                                    InDetCandidateLocation=MuonCbKeys.InDetTrackParticlesLargeD0(),
+                                    InDetCandidateLocation=MuonCbKeys.InDetTrackParticlesLargeD0(),                                    
                                     DoSiliconAssocForwardMuons=False)
 
 
 
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCombinedMuonCandidateAlg","MuonCombinedMuonCandidateAlg")
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCombinedAlg","MuonCombinedAlg")
+## Large D0 version
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCombinedAlg", "MuonCombinedAlg_LargeD0",
                                                                         InDetCandidateLocation=MuonCbKeys.InDetTrackParticlesLargeD0(),
                                                                         CombinedTagMaps=["muidcoTagMap_LargeD0","stacoTagMap_LargeD0"],
                                                                         MuidCombinedTracksLocation="MuidCombinedTracks_LargeD0",
                                                                         MuidMETracksLocation="MuidMETracks_LargeD0")
 
-addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCombinedInDetExtensionAlg","MuonCombinedInDetExtensionAlg")
 
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonSegmentTagAlg","MuonSegmentTagAlg")
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonSegmentTagAlg","MuonSegmentTagAlg_LargeD0",
@@ -81,9 +94,10 @@ addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCreatorAlg","MuonCreat
                                                                       CombinedLocation=MuonCbKeys.CombinedFitTracksLargeD0(),
                                                                       SegmentContainerName="MuonSegments_LargeD0",
                                                                       TrackSegmentContainerName="TrakMuonSegments_LargeD0",
-                                                                      TagMaps=["muidcoTagMap_LargeD0","stacoTagMap_LargeD0","segmentTagMap_LargeD0"],
+                                                                      TagMaps=["muidcoTagMap_LargeD0","stacoTagMap_LargeD0","segmentTagMap_LargeD0","MuGirlMap_LargeD0","caloTagMap_LargeD0"],
                                                                       BuildSlowMuon= False,
-                                                                      MakeClusters=False    )
+                                                                      MakeClusters=False ,
+                                                                      MuonCreatorTool="MuonCombined::MuonCreatorTool/MuonCreatorTool_LRT"   )
 
 
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.StauCreatorAlg","StauCreatorAlg")
@@ -104,6 +118,8 @@ addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCombinedParticleCreator","
 addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCaloParticleCreator","MuonCaloParticleCreator")
 addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCreatorTool","MuonCreatorTool")
 addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCreatorTool","StauCreatorTool",BuildStauContainer=True)
+addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCreatorTool","MuonCreatorTool_LRT",RequireIDTrack=True)
+
 addTool("MuonCombinedRecExample.MuonCombinedTools.ExtrapolateMuonToIPTool","ExtrapolateMuonToIPTool")
 addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCandidateTool","MuonCandidateTool")
 addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCombinedTrackSummaryTool","MuonCombinedTrackSummaryTool")
-- 
GitLab


From a618e84d4d3d4170b0a2c2cba14093d02177fba1 Mon Sep 17 00:00:00 2001
From: Johannes Josef Junggeburth <johannes.josef.junggeburth@cern.ch>
Date: Wed, 9 Sep 2020 12:47:47 +0000
Subject: [PATCH 013/403] Hupps that change was meant to be kept locally

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

diff --git a/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValMuon_jobOptions.py b/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValMuon_jobOptions.py
index 40bd1afd30d6..e67aa8c518ce 100644
--- a/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValMuon_jobOptions.py
+++ b/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValMuon_jobOptions.py
@@ -8,7 +8,7 @@ tool1 = MuonPhysValMonitoring__MuonPhysValMonitoringTool( name = 'muphysval' )
 tool1.IsData = not recFlags.doTruth()
 
 #
-tool1.MuonContainerName = 'MuonsLRT'
+tool1.MuonContainerName = 'Muons'
 tool1.SlowMuonContainerName = ''
 tool1.MuonTruthParticleContainerName = 'MuonTruthParticles'
 tool1.DoBinnedResolutionPlots = True
-- 
GitLab


From 38dff281447d3afde7207f251f9d590c3ee6c9bb Mon Sep 17 00:00:00 2001
From: Kenji Hamano <kenji.hamano@cern.ch>
Date: Mon, 14 Sep 2020 15:52:39 -0700
Subject: [PATCH 014/403] MET Legacy Mon Cluster added

---
 .../TrigMETMonitoring/HLTMETMonTool.h         |  5 ++
 .../TrigMETMonitoring/src/HLTMETMonTool.cxx   | 51 +++++++++++++++++++
 2 files changed, 56 insertions(+)

diff --git a/Trigger/TrigMonitoring/TrigMETMonitoring/TrigMETMonitoring/HLTMETMonTool.h b/Trigger/TrigMonitoring/TrigMETMonitoring/TrigMETMonitoring/HLTMETMonTool.h
index d50951b758cb..7c89a2cf2b4c 100755
--- a/Trigger/TrigMonitoring/TrigMETMonitoring/TrigMETMonitoring/HLTMETMonTool.h
+++ b/Trigger/TrigMonitoring/TrigMETMonitoring/TrigMETMonitoring/HLTMETMonTool.h
@@ -23,6 +23,8 @@
 #include "xAODEgamma/ElectronContainer.h"
 #include "xAODEgamma/Electron.h"
 
+#include "xAODCaloEvent/CaloClusterContainer.h"
+
 #include "TLorentzVector.h"
 
 #include <string>
@@ -60,6 +62,7 @@ private:
   void addHLTvsOffHistograms();
   void addL1vsOffHistograms();
   void addElMuHistograms();
+  void addClusterHistograms();
   // methods to make filling easier
   void fillL1BasicHistograms(float l1_mex,float l1_mex_log,float l1_mey,float l1_mey_log,float l1_met,float l1_met_log,float l1_sumet,float l1_sumet_log,float l1_phi,float saturated);
   void fillL1JetHistograms(float l1_jet_pt,float l1_jet_eta);
@@ -152,6 +155,8 @@ private:
   std::string m_electron_key;
   std::string m_electron_run3_key;
   std::string m_electron_base_trigger;
+  std::string m_cluster_key;
+  std::string m_cluster_run3_key;
 
   double m_muon_pt_thresh;
   double m_electron_pt_thresh;
diff --git a/Trigger/TrigMonitoring/TrigMETMonitoring/src/HLTMETMonTool.cxx b/Trigger/TrigMonitoring/TrigMETMonitoring/src/HLTMETMonTool.cxx
index fa1d839fe9f6..9a97660d0a17 100644
--- a/Trigger/TrigMonitoring/TrigMETMonitoring/src/HLTMETMonTool.cxx
+++ b/Trigger/TrigMonitoring/TrigMETMonitoring/src/HLTMETMonTool.cxx
@@ -88,6 +88,11 @@ HLTMETMonTool::HLTMETMonTool(const std::string & type, const std::string & name,
   declareProperty("electron_base", m_electron_base_trigger="HLT_e5_lhloose");
   declareProperty("electron_pt_thresh", m_electron_pt_thresh=20.0);
 
+  // topocluster keys
+  declareProperty("cluster_key", m_cluster_key="HLT_xAOD__CaloClusterContainer_TrigCaloClusterMaker");
+  declareProperty("cluster_run3_key", m_cluster_run3_key="HLT_TopoCaloClustersLCFS");
+
+
   //
   declareProperty("comp_names", m_compNames);
   declareProperty("bit_names", m_bitNames);
@@ -426,6 +431,14 @@ StatusCode HLTMETMonTool::book() {
   setCurrentMonGroup(monFolderName);
   addElMuHistograms();
 
+
+  // Book HLT Cluster histograms **********
+  monFolderName = monGroupName + "/Cluster";
+  addMonGroup(new MonGroup(this, monFolderName.c_str(), run));
+  setCurrentMonGroup(monFolderName);
+  addClusterHistograms();
+
+
   return StatusCode::SUCCESS;
 } 
 
@@ -711,6 +724,19 @@ StatusCode HLTMETMonTool::fillMETHist() {
   }
   
 
+  // retrieve Cluster container
+  const xAOD::CaloClusterContainer *hlt_clusterEFcontainer = 0;
+  sc = evtStore()->retrieve(hlt_clusterEFcontainer, m_cluster_key);
+  if (sc.isFailure() || !hlt_clusterEFcontainer) {
+    sc = evtStore()->retrieve(hlt_clusterEFcontainer, m_cluster_run3_key);
+    if (sc.isFailure() || !hlt_clusterEFcontainer) {
+      ATH_MSG_WARNING("Could not retrieve cluster container with key " << m_cluster_key << " from TDS");
+    }
+  } else {
+    ATH_MSG_DEBUG("Accessing EF cluster container with " << hlt_clusterEFcontainer->size() << " elements");
+  }
+
+
   // Check if signal-like muon exists
   ATH_MSG_DEBUG("Going to iterate through muon container");
   bool METMuonFilled = false; // flag is set to true if event satisfies signal-like requirement 
@@ -1758,6 +1784,23 @@ StatusCode HLTMETMonTool::fillMETHist() {
     ATH_MSG_DEBUG("Electron multiciplicity: " << electronMult);
     if((h = hist("HLT_electronmult") )) h->Fill(electronMult);
   }
+
+  //////////////////////////
+  // Clusters
+  monFolderName = monGroupName + "/Cluster";
+  setCurrentMonGroup(monFolderName);
+
+  if (hlt_clusterEFcontainer) {
+    if ((h = hist("HLT_nClusters"))) h->Fill(hlt_clusterEFcontainer->size());
+    for (auto cluster : *hlt_clusterEFcontainer) {
+      if ((h = hist("HLT_cluster_E"))) h->Fill(cluster->calE()/CLHEP::GeV);
+      if ((h = hist("HLT_cluster_Eta"))) h->Fill(cluster->calEta());
+      if ((h = hist("HLT_cluster_Phi"))) h->Fill(cluster->calPhi());
+      if ((h = hist("HLT_cluster_M"))) h->Fill(cluster->calM()/CLHEP::GeV);
+    }
+  }
+
+
   
   return sc;
 }
@@ -2131,6 +2174,14 @@ void HLTMETMonTool::addElMuHistograms() {
 
 }
 
+//___________________________________________________________________________________________________________
+void HLTMETMonTool::addClusterHistograms() {
+  addHistogram(new TH1F("HLT_nClusters", "HLT Number of Clusters", 100, 0, 2000));
+  addHistogram(new TH1F("HLT_cluster_E", "HLT Cluster E (GeV)", 100, 0, 50));
+  addHistogram(new TH1F("HLT_cluster_Eta", "HLT Cluster Eta", 100, -5, 5));
+  addHistogram(new TH1F("HLT_cluster_Phi", "HLT Cluster Phi", 100, -3.5, 3.5));
+  addHistogram(new TH1F("HLT_cluster_M", "HLT Cluster M (GeV)", 100, 0, 50));
+}
 
 //___________________________________________________________________________________________________________
 void HLTMETMonTool::trigger_decision() {
-- 
GitLab


From 142953c7955838cbc38296e10716fa45607efd52 Mon Sep 17 00:00:00 2001
From: sutt <sutt@cern.ch>
Date: Wed, 16 Sep 2020 01:49:29 +0200
Subject: [PATCH 015/403] Enhance TDT feature retrieval by allowing regex
 matching

In order to allow exact matching, replace the approximate, default and impossible to turn
off matching with more precise regex matching so that either exact, or approximate matches
me used as the developer wishes
---
 .../TrigCompositeUtils/TrigCompositeUtils.icc      | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.icc b/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.icc
index 6bf1ad5c9f9a..817e6a5dd6ad 100644
--- a/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.icc
+++ b/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.icc
@@ -3,6 +3,7 @@
 */
 
 #include "AsgMessaging/MessageCheck.h"
+#include <regex>
 
 namespace TrigCompositeUtils {
 
@@ -139,7 +140,18 @@ namespace TrigCompositeUtils {
       return;
     }
     auto it = std::remove_if(vector.begin(), vector.end(), [&](const ElementLink<CONTAINER>& el) {
-      return (el.dataID().find(containerSGKey) == std::string::npos);
+
+	bool oldmatch = ( el.dataID().find(containerSGKey) == std::string::npos);
+	
+	bool newmatch = !std::regex_match( el.dataID(), std::regex(containerSGKey) );
+		
+	// ANA_MSG_WARNING ( "Strict match violation" << el.dataID() << " : " << containerSGKey ); 
+
+	if ( oldmatch!=newmatch ) std::cerr << "SUTT:: Strict match violation" << el.dataID() << " : " << containerSGKey << std::endl;; 
+				  
+	return  !std::regex_match( el.dataID(), std::regex(containerSGKey) );
+      
+        // return (el.dataID().find(containerSGKey) == std::string::npos);
     });
     // Collection has been re-ordered to put the bad elements at the end
     vector.erase(it, vector.end());
-- 
GitLab


From cdcf29072d2c14ea94dc85c327c31ffc04452204 Mon Sep 17 00:00:00 2001
From: sutt <sutt@cern.ch>
Date: Wed, 16 Sep 2020 09:14:00 +0200
Subject: [PATCH 016/403] Add wildcarding for the TrigTraversal tests electron
 container retrieval

---
 .../TrigSteer/TrigCompositeUtils/test/TrigTraversal_test.cxx    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Trigger/TrigSteer/TrigCompositeUtils/test/TrigTraversal_test.cxx b/Trigger/TrigSteer/TrigCompositeUtils/test/TrigTraversal_test.cxx
index 7ae89a7d3f02..5c48d906ab1d 100644
--- a/Trigger/TrigSteer/TrigCompositeUtils/test/TrigTraversal_test.cxx
+++ b/Trigger/TrigSteer/TrigCompositeUtils/test/TrigTraversal_test.cxx
@@ -492,7 +492,7 @@ int main ATLAS_NOT_THREAD_SAFE () {
   printFeatures(features_final_em, "[Explicit Final Electron Features] HLT_mu_em_chain", log);  
 
   // Check filtering on the collection name. Note sub-string matching, omitting the "My".
-  std::vector< LinkInfo<xAOD::ElectronContainer> > features_final_em_correctContainer   = recursiveGetFeaturesOfType<xAOD::ElectronContainer>(graph_HLT_mu_em_chain, "ElectronContainer");
+  std::vector< LinkInfo<xAOD::ElectronContainer> > features_final_em_correctContainer   = recursiveGetFeaturesOfType<xAOD::ElectronContainer>(graph_HLT_mu_em_chain, ".*ElectronContainer.*");
   std::vector< LinkInfo<xAOD::ElectronContainer> > features_final_em_incorrectContainer = recursiveGetFeaturesOfType<xAOD::ElectronContainer>(graph_HLT_mu_em_chain, "WrongContainerName");
   VALUE ( features_final_em_correctContainer.size() ) EXPECTED ( features_final_em.size() );
   VALUE ( features_final_em_incorrectContainer.size() ) EXPECTED ( 0 );
-- 
GitLab


From 0608efa40397cd99448dffc6c5c8d002a32056a4 Mon Sep 17 00:00:00 2001
From: sutt <sutt@cern.ch>
Date: Wed, 16 Sep 2020 09:31:39 +0200
Subject: [PATCH 017/403] Push additional	temporary debugging to ignore
 differenced with regex

The check on the difference is whether the output from the find	and the	regex_match
was different.

However, if a regex is passed in, ie ".*SomeContainer" then a find for this and
for the	 regex will be different, so we don't want to bother with this check for	regexs
---
 .../TrigCompositeUtils/TrigCompositeUtils.icc | 23 +++++++++++--------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.icc b/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.icc
index 817e6a5dd6ad..0ba985e24011 100644
--- a/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.icc
+++ b/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.icc
@@ -141,18 +141,23 @@ namespace TrigCompositeUtils {
     }
     auto it = std::remove_if(vector.begin(), vector.end(), [&](const ElementLink<CONTAINER>& el) {
 
-	bool oldmatch = ( el.dataID().find(containerSGKey) == std::string::npos);
-	
 	bool newmatch = !std::regex_match( el.dataID(), std::regex(containerSGKey) );
-		
-	// ANA_MSG_WARNING ( "Strict match violation" << el.dataID() << " : " << containerSGKey ); 
 
-	if ( oldmatch!=newmatch ) std::cerr << "SUTT:: Strict match violation" << el.dataID() << " : " << containerSGKey << std::endl;; 
-				  
+	if ( containerSGKey.find("*")==std::string::npos &&
+	     containerSGKey.find(".")==std::string::npos ) { 
+	  
+	  bool oldmatch = ( el.dataID().find(containerSGKey) == std::string::npos);
+	  
+	  // ANA_MSG_WARNING ( "Strict match violation" << el.dataID() << " : " << containerSGKey ); 
+	  if ( oldmatch!=newmatch ) { 
+	    std::cerr << "SUTT:: Strict match violation " << el.dataID() << " : " << containerSGKey << std::endl;; 
+	  }
+	  
+	}
+
 	return  !std::regex_match( el.dataID(), std::regex(containerSGKey) );
-      
-        // return (el.dataID().find(containerSGKey) == std::string::npos);
-    });
+
+      });
     // Collection has been re-ordered to put the bad elements at the end
     vector.erase(it, vector.end());
   }
-- 
GitLab


From d43f4e439c8c43c56e92152a5e942b721c82e16c Mon Sep 17 00:00:00 2001
From: sutt <sutt@cern.ch>
Date: Wed, 16 Sep 2020 09:45:34 +0200
Subject: [PATCH 018/403] Handle explicit case of an empty string

A empty regex string will match no patterns, whereas as find for an empty
string will match any pattern, so to maintain the expected behaviour of
an empty string matching any key, this has to be handled separately
---
 .../TrigCompositeUtils/TrigCompositeUtils.icc                  | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.icc b/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.icc
index 0ba985e24011..929eacbce78f 100644
--- a/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.icc
+++ b/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.icc
@@ -141,6 +141,9 @@ namespace TrigCompositeUtils {
     }
     auto it = std::remove_if(vector.begin(), vector.end(), [&](const ElementLink<CONTAINER>& el) {
 
+        /// handle explicit case of an empty string
+        if ( containerSGKey=="" ) return false;
+
 	bool newmatch = !std::regex_match( el.dataID(), std::regex(containerSGKey) );
 
 	if ( containerSGKey.find("*")==std::string::npos &&
-- 
GitLab


From eb6d81514b558c7c0b76bce92779506643d2db66 Mon Sep 17 00:00:00 2001
From: Johannes Josef Junggeburth <johannes.josef.junggeburth@CERN.CH>
Date: Wed, 16 Sep 2020 11:12:52 +0200
Subject: [PATCH 019/403] Put back the large radius tracking conifg'

---
 .../python/MuonCombinedAlgs.py                 | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
index 4bfc65d950b6..03eead50602e 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
@@ -157,24 +157,40 @@ class MuonCombinedReconstruction(ConfiguredMuonRec):
         topSequence += getAlgorithm("MuonCombinedInDetCandidateAlg")
         topSequence += getAlgorithm("MuonCombinedMuonCandidateAlg")
 
-            # runs ID+MS combinations (fit, staco, mugirl, ID-taggers)
+        from InDetRecExample.InDetJobProperties import InDetFlags
+        if InDetFlags.doR3LargeD0():
+            topSequence += getAlgorithm("MuonCombinedInDetCandidateAlg_LargeD0")
+
+        # runs ID+MS combinations (fit, staco, mugirl, ID-taggers)
         if muonCombinedRecFlags.doStatisticalCombination() or muonCombinedRecFlags.doCombinedFit():
             topSequence += getAlgorithm("MuonCombinedAlg")
+            if InDetFlags.doR3LargeD0():
+                topSequence += getAlgorithm("MuonCombinedAlg_LargeD0")
+
+
 
         if muonCombinedRecFlags.doMuGirl():
             topSequence += getAlgorithm("MuonInsideOutRecoAlg")
             if muonCombinedRecFlags.doMuGirlLowBeta():
                 topSequence += getAlgorithm("MuGirlStauAlg")
+            if InDetFlags.doR3LargeD0():
+                topSequence += getAlgorithm("MuGirlAlg_LargeD0")
 
         if muonCombinedRecFlags.doCaloTrkMuId():
             topSequence += getAlgorithm("MuonCaloTagAlg")
+            if InDetFlags.doR3LargeD0():
+                topSequence += getAlgorithm("MuonCaloTagAlg_LargeD0")
 
         if muonCombinedRecFlags.doMuonSegmentTagger():
             getPublicTool("MuonSegmentTagTool")
             topSequence += getAlgorithm("MuonSegmentTagAlg")
+            if InDetFlags.doR3LargeD0():
+                topSequence += getAlgorithm("MuonSegmentTagAlg_LargeD0")
 
         # runs over outputs and create xAODMuon collection
         topSequence += getAlgorithm("MuonCreatorAlg")
+        if InDetFlags.doR3LargeD0():
+            topSequence += getAlgorithm("MuonCreatorAlg_LargeD0")
 
         if muonCombinedRecFlags.doMuGirl() and muonCombinedRecFlags.doMuGirlLowBeta():
             topSequence += getAlgorithm("StauCreatorAlg")
-- 
GitLab


From 1b271d5f5ba23f8c60878fadb57d2814a0ee85ef Mon Sep 17 00:00:00 2001
From: sutt <sutt@cern.ch>
Date: Wed, 16 Sep 2020 20:03:31 +0200
Subject: [PATCH 020/403] remove debug printout

---
 .../TrigCompositeUtils/TrigCompositeUtils.icc  | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.icc b/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.icc
index 929eacbce78f..e876477789ff 100644
--- a/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.icc
+++ b/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.icc
@@ -140,26 +140,10 @@ namespace TrigCompositeUtils {
       return;
     }
     auto it = std::remove_if(vector.begin(), vector.end(), [&](const ElementLink<CONTAINER>& el) {
-
         /// handle explicit case of an empty string
         if ( containerSGKey=="" ) return false;
-
-	bool newmatch = !std::regex_match( el.dataID(), std::regex(containerSGKey) );
-
-	if ( containerSGKey.find("*")==std::string::npos &&
-	     containerSGKey.find(".")==std::string::npos ) { 
-	  
-	  bool oldmatch = ( el.dataID().find(containerSGKey) == std::string::npos);
-	  
-	  // ANA_MSG_WARNING ( "Strict match violation" << el.dataID() << " : " << containerSGKey ); 
-	  if ( oldmatch!=newmatch ) { 
-	    std::cerr << "SUTT:: Strict match violation " << el.dataID() << " : " << containerSGKey << std::endl;; 
-	  }
-	  
-	}
-
+        /// handle everything else	
 	return  !std::regex_match( el.dataID(), std::regex(containerSGKey) );
-
       });
     // Collection has been re-ordered to put the bad elements at the end
     vector.erase(it, vector.end());
-- 
GitLab


From ccc4a4eb20ce2e5d8ff9068b98f795e9138c9570 Mon Sep 17 00:00:00 2001
From: Debo <debottam.bakshi.gupta@cern.ch>
Date: Thu, 17 Sep 2020 11:19:58 +0200
Subject: [PATCH 021/403] editing LS2_v1 for right trigger name

---
 .../TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py            | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
index 191f72248a09..92ec0deb05c2 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
@@ -157,6 +157,7 @@ def setupMenu():
         ChainProp(name='HLT_g140_etcut_L1EM22VHI', groups=SinglePhotonGroup),
 
         #ATR-21882
+        #ChainProp(name='HLT_2g15_tight_dPhi15_L1DPHI-M70-2EM12I', l1SeedThresholds=['EM12I'], groups=MultiPhotonGroup),
         ChainProp(name='HLT_2g15_tight_dPhi15_L12EM3', groups=MultiPhotonGroup),
     ]
 
-- 
GitLab


From 8de21ab522d45618edb955f6a5ec1161d5a37c9d Mon Sep 17 00:00:00 2001
From: Mohsen Rezaei Estabragh <mohsen.rezaei.estabragh@cern.ch>
Date: Fri, 18 Sep 2020 09:26:48 +0200
Subject: [PATCH 022/403] implementing slope cut and adding a message to the
 exit message. removing some unnecessary codes

---
 Tools/PyJobTransforms/python/trfExe.py        |  56 +++--
 Tools/PyJobTransforms/python/trfReports.py    |   7 +-
 Tools/PyJobTransforms/python/trfUtils.py      | 212 +++++++++---------
 Tools/PyJobTransforms/python/trfValidation.py |  11 -
 4 files changed, 153 insertions(+), 133 deletions(-)

diff --git a/Tools/PyJobTransforms/python/trfExe.py b/Tools/PyJobTransforms/python/trfExe.py
index da85d51ee490..58eeaf07c1ae 100755
--- a/Tools/PyJobTransforms/python/trfExe.py
+++ b/Tools/PyJobTransforms/python/trfExe.py
@@ -38,7 +38,7 @@ msg = logging.getLogger(__name__)
 
 from PyJobTransforms.trfJobOptions import JobOptionsTemplate
 from PyJobTransforms.trfUtils import asetupReport, unpackDBRelease, setupDBRelease, cvmfsDBReleaseCheck, forceToAlphaNum
-from PyJobTransforms.trfUtils import ValgrindCommand, isInteractiveEnv, calcCpuTime, calcWallTime, calcMemFull
+from PyJobTransforms.trfUtils import ValgrindCommand, isInteractiveEnv, calcCpuTime, calcWallTime, analytic
 from PyJobTransforms.trfExitCodes import trfExit
 from PyJobTransforms.trfLogger import stdLogLevels
 from PyJobTransforms.trfMPTools import detectAthenaMPProcs, athenaMPOutputHandler
@@ -183,6 +183,8 @@ class transformExecutor(object):
         self._exeStart = self._exeStop = None
         self._valStart = self._valStop = None
         self._memStats = {}
+        self._memLeakResult = {}
+        self._memFullFile = None
         self._eventCount = None
         self._athenaMP = None
         self._athenaMT = None
@@ -381,11 +383,8 @@ class transformExecutor(object):
         return self._memStats
 
     @property
-    def memFullEval(self):
-        if self._memFullFile:
-            return calcMemFull(self._memFullFile)
-        else:
-            return 'cant read full mem file'
+    def memAnalysis(self):
+        return self._memLeakResult
 
     @property
     def postExeCpuTime(self):
@@ -810,15 +809,6 @@ class scriptExecutor(transformExecutor):
         self._valStop = os.times()
         msg.debug('valStop time is {0}'.format(self._valStop))
 
-        ## check memory monitor results
-        # add information to the exit message if an excess has seen
-        fitResult = trfValidation.memoryMonitorReport().fitToMem(self._memFullFile)
-        if fitResult and self._errMsg:
-            msg.error('Excess in memory monitor parameter(s)')
-            self._errMsg = self._errMsg + "; high slope : {0}".format(fitResult['slope'])
-        #raise trfExceptions.TransformLogfileErrorException(trfExit.nameToCode('TRF_EXEC_LOGERROR'),
-        #                                                          'Fatal error in memory monitor: "{0}"'.format(exitErrorMessage))
-
 
 class athenaExecutor(scriptExecutor):
     _exitMessageLimit = 200 # Maximum error message length to report in the exitMsg
@@ -1217,6 +1207,25 @@ class athenaExecutor(scriptExecutor):
         self._valStop = os.times()
         msg.debug('valStop time is {0}'.format(self._valStop))
 
+        ## Get results of memory monitor analysis (slope and chi2)
+        # the analysis is a linear fit to 'Time' vs 'pss' (fit to at least 5 data points)
+        # to obtain a good fit, tails are excluded from data
+        # if the slope of 'pss' is high (>5MB/s) and an error is already caught,
+        # a message will be added to the exit message
+        if self._memFullFile:
+            msg.info('Analysing memory monitor output file {0} for possible memory leak'.format(self._memFullFile))
+            self._memLeakResult = analytic().getFittedData(self._memFullFile)
+            if self._memLeakResult:
+                if self._memLeakResult['slope'] > 5000:
+                    msg.warning('Possible memory leak; abnormal high values in memory monitor parameters (ignore this message if the job has finished successfully)')
+                    if deferredException is not None:
+                        deferredException.errMsg = deferredException.errMsg + "; Possible memory leak: 'pss' slope: {0} KB/s".format(self._memLeakResult['slope'])
+            else:
+                msg.warning('Failed to analyse the memory monitor file {0}'.format(self._memFullFile))
+        else:
+            msg.info('No memory monitor file to be analysed')
+
+
     ## @brief Prepare the correct command line to be used to invoke athena
     def _prepAthenaCommandLine(self):
         ## Start building up the command line
@@ -1797,6 +1806,23 @@ class DQMergeExecutor(scriptExecutor):
         self._valStop = os.times()
         msg.debug('valStop time is {0}'.format(self._valStop))
 
+        ## Get results of memory monitor analysis (slope and chi2)
+        # the analysis is a linear fit to 'Time' vs 'pss' (fit to at least 5 data points)
+        # if the slope of 'pss' is high (>5MB/s) and an error is already caught,
+        # a message will be added to the exit message
+        if self._memFullFile:
+            msg.info('Analysing memory monitor output file {0} for possible memory leak'.format(self._memFullFile))
+            self._memLeakResult = analytic().getFittedData(self._memFullFile)
+            if self._memLeakResult:
+                if self._memLeakResult['slope'] > 5000:
+                    msg.warning('Possible memory leak; abnormal high values in memory monitor parameters (ignore this message if the job has finished successfully)')
+                    if deferredException is not None:
+                        deferredException.errMsg = deferredException.errMsg + "; Possible memory leak: 'pss' slope: {0} KB/s".format(self._memLeakResult['slope'])
+            else:
+                msg.warning('Failed to analyse the memory monitor file {0}'.format(self._memFullFile))
+        else:
+            msg.info('No memory monitor file to be analysed')
+
 
 ## @brief Specialist execution class for merging NTUPLE files
 class NTUPMergeExecutor(scriptExecutor):
diff --git a/Tools/PyJobTransforms/python/trfReports.py b/Tools/PyJobTransforms/python/trfReports.py
index a6006d009b47..5f2b4b27d5ee 100644
--- a/Tools/PyJobTransforms/python/trfReports.py
+++ b/Tools/PyJobTransforms/python/trfReports.py
@@ -656,11 +656,8 @@ def exeResourceReport(exe, report):
 
     if exe.memStats:
         exeResource['memory'] = exe.memStats
-    #it failes when it is aligned with the other
-    #if exe.memFullEval:
-    #   exeResource['memoryAnalyse'] = exe.memFullEval
-        if exe.memFullEval:
-            exeResource['memoryAnalyse'] = exe.memFullEval
+    if exe.memAnalysis:
+        exeResource['memoryAnalysis'] = exe.memAnalysis
     if exe.eventCount:
         exeResource['nevents'] = exe.eventCount
     if exe.athenaMP:
diff --git a/Tools/PyJobTransforms/python/trfUtils.py b/Tools/PyJobTransforms/python/trfUtils.py
index f641af0642bf..0fc4ca850ffa 100644
--- a/Tools/PyJobTransforms/python/trfUtils.py
+++ b/Tools/PyJobTransforms/python/trfUtils.py
@@ -1212,7 +1212,6 @@ class analytic():
     #  @param x list of input data (list of floats or ints).
     #  @param y: list of input data (list of floats or ints).
     #  @param model: model name (string).
-    #  raises UnknownException: in case Fit() fails.
     def fit(self, x, y, model='linear'):
         try:
             self._fit = Fit(x=x, y=y, model=model)
@@ -1233,66 +1232,73 @@ class analytic():
         return slope
 
     # Return a properly formatted job metrics string with analytics data.
-    # Currently the function returns a fit for PSS+Swap vs time, whose slope measures memory leaks.
+    # Currently the function returns a fit for 'pss' vs 'time', whose slope measures memory leaks.
     # @param filename: memory monitor output file (string).
     # @param x_name: optional string, name selector for table column.
     # @param y_name: optional string, name selector for table column.
     # @param precision: optional precision for fitted slope parameter, default 2.
-    # @param tails: should tails (first and last values) be used? (boolean).
-    # @return: {"slope": slope, "chi2": chi2} (float strings with desired precision).
-    def get_fitted_data(self, filename, x_name='Time', y_name='pss+swap', precision=2, tails=True):
-        self._math = math()
-        slope = ""
-        chi2 = ""
-        table = get_table_from_file(filename,header=None, separator="\t", convert_to_float=True)
-
+    # @param tails: should tails be used? (boolean).
+    # @param minPoints: minimun desired points of data to be fitted (after removing tail)
+    # @return: {"slope": slope, "chi2": chi2}
+    def getFittedData(self, filename, x_name='Time', y_name='pss', precision=2, tails=False, minPoints=5):
+        _memFileToTable = memFileToTable()
+        fitResult = {}
+        table = _memFileToTable.getTable(filename, header=None, separator="\t")
         if table:
             # extract data to be fitted
-            x, y = self.extract_from_table(table, x_name, y_name)
-
+            x, y = self.extractFromTable(table, x_name, y_name)
             # remove tails if desired
             # this is useful e.g. for memory monitor data where the first and last values
             # represent allocation and de-allocation, ie not interesting
-            if not tails and len(x) > 7 and len(y) > 7:
-                msg.debug('removing tails from data to be fitted')
-                x = x[5:]
-                x = x[:-2]
-                y = y[5:]
-                y = y[:-2]
-
-            if len(x) > 7 and len(y) > 7:
+            # here tail is defined to be first and last 20% of data
+            if not tails:
+                tail = int(len(x)/5)
+                msg.info('removing tails from the memory monitor data; 20% from each side')
+                x = x[tail:]
+                x = x[:-tail]
+                y = y[tail:]
+                y = y[:-tail]
+
+            if len(x) > minPoints and len(y) > minPoints:
                 msg.info('fitting {0} vs {1}'.format(y_name, x_name))
                 try:
                     fit = self.fit(x, y)
                     _slope = self.slope()
-                    print(_slope)
                 except Exception as e:
                     msg.warning('failed to fit data, x={0}, y={1}: {2}'.format(x, y, e))
                 else:
                     if _slope:
-                        slope = round(fit.slope(), 2)
-                        chi2 = fit.chi2()
-                        if slope != "":
-                            msg.info('current memory leak: {0} B/s (using {1} data points, chi2={2})'.format(slope, len(x), chi2))
+                        slope = round(fit.slope(), precision)
+                        chi2 = round(fit.chi2(), precision)
+                        fitResult = {"slope": slope, "chi2": chi2}
+                        if slope:
+                            HRslope, unit = self.formatBytes(slope)
+                            msg.info('current memory leak: {0} {1} (using {2} data points, chi2={3})'.format(HRslope, unit, len(x), chi2))
             else:
-                msg.warning('wrong length of table data, x={0}, y={1} (must be same and length>=4)'.format(x, y))
+                msg.warning('wrong length of table data, x={0}, y={1} (must be same and length>={2})'.format(x, y, minPoints))
 
-        return {"slope": slope, "chi2": chi2}
+        return fitResult
 
     # Extrcat wanted columns. e.g. x: Time , y: pss+swap
     # @param x_name: column name to be extracted (string).
     # @param y_name: column name to be extracted (may contain '+'-sign) (string).
     # @return: x (list), y (list).
-    def extract_from_table(self, table, x_name, y_name):
+    def extractFromTable(self, table, x_name, y_name):
+        headerUpperVersion = {'pss':'PSS', 'swap':'Swap', 'rss':'RSS', 'vmem':'VMEM'}
         x = table.get(x_name, [])
         if '+' not in y_name:
             y = table.get(y_name, [])
+            if len(y)==0:
+                y = table.get(headerUpperVersion[y_name], [])
         else:
             try:
                 y1_name = y_name.split('+')[0]
                 y2_name = y_name.split('+')[1]
                 y1_value = table.get(y1_name, [])
                 y2_value = table.get(y2_name, [])
+                if len(y1_value)==0 or len(y2_value)==0:
+                    y1_value = table.get(headerUpperVersion[y1_name], [])
+                    y2_value = table.get(headerUpperVersion[y2_name], [])
             except Exception as e:
                 msg.warning('exception caught: {0}'.format(e))
                 x = []
@@ -1303,6 +1309,19 @@ class analytic():
 
         return x, y
 
+    # Make the result of slope human readable (HR)
+    # default unit is KB
+    def formatBytes(self, size):
+        # decimal system
+        power = 1000
+        n = 1
+        power_labels = {1: 'K', 2: 'M', 3: 'G', 4: 'T'}
+        while size > power:
+            size /= power
+            n += 1
+        return round(size, 2), power_labels[n]+'B/s'
+
+
 ## @breif Low-level fitting class
 class Fit():
     _model = 'linear'  # fitting model
@@ -1321,7 +1340,6 @@ class Fit():
         self._model = kwargs.get('model', 'linear')
         self._x = kwargs.get('x', None)
         self._y = kwargs.get('y', None)
-
         self._math = math()
 
         if not self._x or not self._y:
@@ -1397,7 +1415,6 @@ class math():
         n = len(data)
         if n < 1:
             msg.warning('mean requires at least one data point')
-
         return sum(data)/n
 
     # Return sum of square deviations of sequence data.
@@ -1407,7 +1424,7 @@ class math():
         return sum((x - c) ** 2 for x in data)
 
     # Return sum of deviations of sequence data.
-    # Sum (x - x_mean)**(y - y_mean)
+    # Sum (x - x_mean)*(y - y_mean)
     def sum_dev(self, x, y):
         c1 = self.mean(x)
         c2 = self.mean(y)
@@ -1419,10 +1436,10 @@ class math():
             return 0.0
         return sum((_o - _e) ** 2 / _e for _o, _e in zip(observed, expected))
 
+
 ## @brief  Extract a table of data from a txt file
-#  @details E.g. header="Time VMEM PSS RSS Swap rchar wchar rbytes wbytes"
-#  or the first line in the file is
-#  Time VMEM PSS RSS Swap rchar wchar rbytes wbytes
+#  @details E.g. header="Time    nprocs  nthreads    wtime   stime   utime   pss rss swap    vmem"
+#  or the first line in the file
 #  each of which will become keys in the dictionary, whose corresponding values are stored in lists, with the entries
 #  corresponding to the values in the rows of the input file.
 #  The output dictionary will have the format
@@ -1430,73 +1447,68 @@ class math():
 #  @param filename name of input text file, full path (string).
 #  @param header header string.
 #  @param separator separator character (char).
-#  @param convert_to_float boolean, if True, all values will be converted to floats.
 #  @return dictionary.
-def get_table_from_file(filename, header=None, separator="\t", convert_to_float=None):
-    try:
-        f = open(filename, 'r')
-    except Exception as e:
-        msg.warning("failed to open file: {0}, {1}".format(filename, e))
-    else:
-        firstline = True
-        for line in f:
-            fields = line.split(separator)
-            if firstline:
-                firstline = False
-                tabledict, keylist = _define_tabledict_keys(header, fields, separator)
-                if not header:
-                    continue
+class memFileToTable():
 
-            # from now on, fill the dictionary fields with the input data
-            i = 0
-            for field in fields:
-                # get the corresponding dictionary key from the keylist
-                key = keylist[i]
-                # store the field value in the correct list
-                # TODO: do we need converting to float?
-                if convert_to_float:
-                    try:
-                        field = float(field)
-                    except Exception as e:
-                        msg.warning("failed to convert {0} to float: {1} (aborting)".format(field, e))
-                        return None
-                tabledict[key].append(field)
-                i += 1
-        f.close()
-    return tabledict
-
-## @brief Define the keys for the tabledict dictionary.
-# @note should be called by get_table_from_file()
-# @param header header string.
-# @param fields header content string.
-# @param separator separator character (char).
-# @return tabledict (dictionary), keylist (ordered list with dictionary key names).
-def _define_tabledict_keys(header, fields, separator):
-    tabledict = {}
-    keylist = []
-
-    if not header:
-        # get the dictionary keys from the header of the file
-        for key in fields:
-            # first line defines the header, whose elements will be used as dictionary keys
-            if key == '':
-                continue
-            if key.endswith('\n'):
-                key = key[:-1]
-            tabledict[key] = []
-            keylist.append(key)
-    else:
-        # get the dictionary keys from the provided header
-        keys = header.split(separator)
-        for key in keys:
-            if key == '':
-                continue
-            if key.endswith('\n'):
-                key = key[:-1]
-            tabledict[key] = []
-            keylist.append(key)
+    def getTable(self, filename, header=None, separator="\t"):
+        tabledict = {}
+        keylist = []
+        try:
+            f = open(filename, 'r')
+        except Exception as e:
+            msg.warning("failed to open file: {0}, {1}".format(filename, e))
+        else:
+            firstline = True
+            for line in f:
+                fields = line.split(separator)
+                if firstline:
+                    firstline = False
+                    tabledict, keylist = self._defineTableDictKeys(header, fields, separator)
+                    if not header:
+                        continue
+                # from now on, fill the dictionary fields with the input data
+                i = 0
+                for field in fields:
+                    # get the corresponding dictionary key from the keylist
+                    key = keylist[i]
+                    # store the field value in the correct list
+                    tabledict[key].append(float(field))
+                    i += 1
+            f.close()
+
+        return tabledict
+
+    ## @brief Define the keys for the tabledict dictionary.
+    # @param header header string.
+    # @param fields header content string.
+    # @param separator separator character (char).
+    # @return tabledict (dictionary), keylist (ordered list with dictionary key names).
+    def _defineTableDictKeys(self, header, fields, separator):
+        tabledict = {}
+        keylist = []
+
+        if not header:
+            # get the dictionary keys from the header of the file
+            for key in fields:
+                # first line defines the header, whose elements will be used as dictionary keys
+                if key == '':
+                    continue
+                if key.endswith('\n'):
+                    key = key[:-1]
+                tabledict[key] = []
+                keylist.append(key)
+        else:
+            # get the dictionary keys from the provided header
+            keys = header.split(separator)
+            for key in keys:
+                if key == '':
+                    continue
+                if key.endswith('\n'):
+                    key = key[:-1]
+                tabledict[key] = []
+                keylist.append(key)
 
-    return tabledict, keylist
+        return tabledict, keylist
 
 
 ### @brief return Valgrind command
@@ -1596,7 +1608,3 @@ def bind_port(host, port):
         ret=1
     s.close()
     return ret
-
-def calcMemFull(memFullStatFile):
-    result = analytic().get_fitted_data(memFullStatFile, x_name='Time', y_name='pss+swap', precision=2, tails=True)
-    return result
diff --git a/Tools/PyJobTransforms/python/trfValidation.py b/Tools/PyJobTransforms/python/trfValidation.py
index 8ee7aeb05309..38abe22d18fb 100644
--- a/Tools/PyJobTransforms/python/trfValidation.py
+++ b/Tools/PyJobTransforms/python/trfValidation.py
@@ -106,17 +106,6 @@ def corruptionTestBS(filename):
     rc = p.returncode
     return rc
 
-class memoryMonitorReport():
-    '''
-    def __init__(self):
-        self._memFile = memFullStatFile
-        self._math = trfUtils.math()
-        self._fit = None
-        self._memTable = trfUtils.memFullFileToTable()
-    '''
-    def fitToMem(self, memFullStatFile):
-        result = trfUtils.analytic().get_fitted_data(memFullStatFile, x_name='Time', y_name='pss+swap', precision=2, tails=True)
-        return result
 
 ## @brief Class of patterns that can be ignored from athena logfiles
 class ignorePatterns(object):
-- 
GitLab


From 7f0e05d94e562dd0a67f1628fd928f01c7487b37 Mon Sep 17 00:00:00 2001
From: Mohsen Rezaei Estabragh <mohsen.rezaei.estabragh@cern.ch>
Date: Fri, 18 Sep 2020 09:33:21 +0200
Subject: [PATCH 023/403] very minor

---
 Tools/PyJobTransforms/python/trfExe.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Tools/PyJobTransforms/python/trfExe.py b/Tools/PyJobTransforms/python/trfExe.py
index 58eeaf07c1ae..5fed9864c15d 100755
--- a/Tools/PyJobTransforms/python/trfExe.py
+++ b/Tools/PyJobTransforms/python/trfExe.py
@@ -771,6 +771,7 @@ class scriptExecutor(transformExecutor):
                 self._memMonitor = False
                 self._memStats = {}
 
+
     def validate(self):
         if self._valStart is None:
             self._valStart = os.times()
@@ -810,6 +811,7 @@ class scriptExecutor(transformExecutor):
         msg.debug('valStop time is {0}'.format(self._valStop))
 
 
+
 class athenaExecutor(scriptExecutor):
     _exitMessageLimit = 200 # Maximum error message length to report in the exitMsg
     _defaultIgnorePatternFile = ['atlas_error_mask.db']
-- 
GitLab


From 073b843c2d0a74e84e76a4c9a5bdcad9e5e7c900 Mon Sep 17 00:00:00 2001
From: sutt <sutt@cern.ch>
Date: Fri, 18 Sep 2020 11:41:26 +0200
Subject: [PATCH 024/403] Add regex to the muon matching

---
 .../TrigMuonMonitoringMT/src/MuonMatchingTool.cxx         | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/MuonMatchingTool.cxx b/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/MuonMatchingTool.cxx
index ad4e8c749e0f..baf35d91e9f5 100644
--- a/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/MuonMatchingTool.cxx
+++ b/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/MuonMatchingTool.cxx
@@ -60,7 +60,7 @@ const xAOD::Muon* MuonMatchingTool :: matchEFSA(  const xAOD::Muon *mu, std::str
     MuonTrack = mu->trackParticle(type);
     if (MuonTrack) break;
   }
-  return MuonTrack ? match<xAOD::Muon>( MuonTrack, trig, m_EFreqdR, pass, "HLT_Muons_", &MuonMatchingTool::PosForMatchSATrack) : nullptr;
+  return MuonTrack ? match<xAOD::Muon>( MuonTrack, trig, m_EFreqdR, pass, "HLT_Muons_.*", &MuonMatchingTool::PosForMatchSATrack) : nullptr;
 }
 
 const TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> MuonMatchingTool :: matchEFSALinkInfo( const xAOD::Muon *mu, std::string trig) const {
@@ -76,14 +76,14 @@ const TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> MuonMatchingTool :: matc
     MuonTrack = mu->trackParticle(type);
     if (MuonTrack) break;
   }
-  return MuonTrack ? matchLinkInfo<xAOD::Muon>(MuonTrack, trig, m_EFreqdR, pass, "HLT_Muons_", &MuonMatchingTool::PosForMatchSATrack) : muonLinkInfo;
+  return MuonTrack ? matchLinkInfo<xAOD::Muon>(MuonTrack, trig, m_EFreqdR, pass, "HLT_Muons_.*", &MuonMatchingTool::PosForMatchSATrack) : muonLinkInfo;
 }
 
 
 const xAOD::Muon* MuonMatchingTool :: matchEFCB(  const xAOD::Muon *mu, std::string trig, bool &pass) const {
   ATH_MSG_DEBUG("MuonMonitoring::matchEFCB()");
   const xAOD::TrackParticle* MuonTrack = mu->trackParticle(xAOD::Muon::TrackParticleType::Primary);
-  return MuonTrack ? match<xAOD::Muon>( MuonTrack, trig, m_EFreqdR, pass, "HLT_MuonsCB", &MuonMatchingTool::PosForMatchCBTrack) : nullptr;
+  return MuonTrack ? match<xAOD::Muon>( MuonTrack, trig, m_EFreqdR, pass, "HLT_MuonsCB.*", &MuonMatchingTool::PosForMatchCBTrack) : nullptr;
 }
 
 const TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> MuonMatchingTool :: matchEFCBLinkInfo( const xAOD::Muon *mu, std::string trig) const {
@@ -91,7 +91,7 @@ const TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> MuonMatchingTool :: matc
   bool pass = false;
   TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> muonLinkInfo;
   const xAOD::TrackParticle* MuonTrack = mu->trackParticle(xAOD::Muon::TrackParticleType::Primary);
-  return MuonTrack ? matchLinkInfo<xAOD::Muon>(MuonTrack, trig, m_EFreqdR, pass, "HLT_MuonsCB", &MuonMatchingTool::PosForMatchCBTrack) : muonLinkInfo;
+  return MuonTrack ? matchLinkInfo<xAOD::Muon>(MuonTrack, trig, m_EFreqdR, pass, "HLT_MuonsCB.*", &MuonMatchingTool::PosForMatchCBTrack) : muonLinkInfo;
 }
 
 
-- 
GitLab


From 310d14b807c707fff700121b5b59de3b5fed4c4f Mon Sep 17 00:00:00 2001
From: sutt <sutt@cern.ch>
Date: Fri, 18 Sep 2020 11:56:35 +0200
Subject: [PATCH 025/403] Add regex for the Muon EF moniotring also

---
 .../TrigMonitoring/TrigMuonMonitoringMT/src/EFMuonMonMT.cxx   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/EFMuonMonMT.cxx b/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/EFMuonMonMT.cxx
index 3247ad55b440..b82eaf45a93a 100644
--- a/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/EFMuonMonMT.cxx
+++ b/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/EFMuonMonMT.cxx
@@ -16,7 +16,7 @@ StatusCode EFMuonMonMT :: fillVariablesPerChain(const EventContext& , const std:
   ATH_MSG_DEBUG ("Filling histograms for " << name() << "...");
 
   // EFSA
-  std::vector< TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> > featureContSA = getTrigDecisionTool()->features<xAOD::MuonContainer>( chain, TrigDefs::includeFailedDecisions, "HLT_Muons_");
+  std::vector< TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> > featureContSA = getTrigDecisionTool()->features<xAOD::MuonContainer>( chain, TrigDefs::includeFailedDecisions, "HLT_Muons_.*");
   for (const TrigCompositeUtils::LinkInfo<xAOD::MuonContainer>& muSALinkInfo : featureContSA) {
     ATH_CHECK( muSALinkInfo.isValid() );
     const ElementLink<xAOD::MuonContainer> muSAEL = muSALinkInfo.link;
@@ -36,7 +36,7 @@ StatusCode EFMuonMonMT :: fillVariablesPerChain(const EventContext& , const std:
 
 
   // EFCB
-  std::vector< TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> > featureContCB = getTrigDecisionTool()->features<xAOD::MuonContainer>( chain, TrigDefs::includeFailedDecisions, "HLT_MuonsCB");
+  std::vector< TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> > featureContCB = getTrigDecisionTool()->features<xAOD::MuonContainer>( chain, TrigDefs::includeFailedDecisions, "HLT_MuonsCB.*");
   for (const TrigCompositeUtils::LinkInfo<xAOD::MuonContainer>& muCBLinkInfo : featureContCB) {
     ATH_CHECK( muCBLinkInfo.isValid() );
     const ElementLink<xAOD::MuonContainer> muCBEL = muCBLinkInfo.link;
-- 
GitLab


From 923cae379dd42895b8ece439607e8df6a9284f25 Mon Sep 17 00:00:00 2001
From: sutt <sutt@cern.ch>
Date: Fri, 18 Sep 2020 12:24:29 +0200
Subject: [PATCH 026/403] remove redundant check on empty string

---
 .../TrigCompositeUtils/TrigCompositeUtils.icc                | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.icc b/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.icc
index e876477789ff..34d6931f0cb0 100644
--- a/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.icc
+++ b/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.icc
@@ -140,10 +140,7 @@ namespace TrigCompositeUtils {
       return;
     }
     auto it = std::remove_if(vector.begin(), vector.end(), [&](const ElementLink<CONTAINER>& el) {
-        /// handle explicit case of an empty string
-        if ( containerSGKey=="" ) return false;
-        /// handle everything else	
-	return  !std::regex_match( el.dataID(), std::regex(containerSGKey) );
+ 	return  !std::regex_match( el.dataID(), std::regex(containerSGKey) );
       });
     // Collection has been re-ordered to put the bad elements at the end
     vector.erase(it, vector.end());
-- 
GitLab


From 21d8b358f5b641586284daefb91c8fba917d16fc Mon Sep 17 00:00:00 2001
From: Johannes Josef Junggeburth <johannes.josef.junggeburth@CERN.CH>
Date: Fri, 18 Sep 2020 13:03:54 +0200
Subject: [PATCH 027/403] Rename some of the containers

---
 .../MuonCombinedAlgs/src/MuonCreatorAlg.cxx         | 11 +++++++++++
 .../python/MuonCombinedKeys.py                      |  7 -------
 .../python/MuonCombinedRecExampleConfigDb.py        | 13 +++++++------
 .../share/MuonCombined_OutputItemsAOD.py            |  5 +++--
 4 files changed, 21 insertions(+), 15 deletions(-)

diff --git a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.cxx b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.cxx
index c8b2873eca01..e66d0fdc6aaf 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.cxx
@@ -56,6 +56,17 @@ StatusCode MuonCreatorAlg::initialize()
   if ( not m_monTool.name().empty() ) {
     ATH_CHECK( m_monTool.retrieve() );
   }
+  ATH_MSG_DEBUG("MuonCreatorAlg has been setup  successfully");
+  ATH_MSG_DEBUG("    *** SegmentTrackContainer:            "<<m_segTrkContainerName);
+  ATH_MSG_DEBUG("    *** SegmentContainer:                 "<<m_segContainerName);
+  ATH_MSG_DEBUG("    *** CombinedTrackContainer:           "<<m_combinedTrkCollectionName);
+  ATH_MSG_DEBUG("    *** xAOD::CombinedTrackContainer:     "<<m_combinedCollectionName);
+ 
+  ATH_MSG_DEBUG("    *** xAOD::ExtrpolatedTrackContainer:  "<<m_extrapolatedCollectionName);
+  ATH_MSG_DEBUG("    *** ExtrpolatedTrackContainer:        "<<m_extrapolatedTrkCollectionName);  
+  ATH_MSG_DEBUG("    *** xAOD::MSOnlyTrackContainer:       "<<m_msOnlyExtrapolatedCollectionName);
+  ATH_MSG_DEBUG("    *** ExtrpolatedTackContainer:         "<<m_msOnlyExtrapolatedTrkCollectionName);
+  
 
   return StatusCode::SUCCESS;
 }
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedKeys.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedKeys.py
index 9ee62629c01b..75f85ea4e78c 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedKeys.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedKeys.py
@@ -61,12 +61,6 @@ class CombinedFitTracks(JobProperty):
     allowedTypes = ['str']
     StoredValue  = 'CombinedMuonTracks'
 
-class CombinedFitTracksLargeD0(JobProperty):
-    """StoreGate key for tracks from combined fit using large d0 inner tracking particles"""
-    statusOn     = True
-    allowedTypes = ['str']
-    StoredValue  = 'CombinedMuonTracksLRT'
-
 class RefittedExtrapolatedMSTracks(JobProperty):
     """StoreGate key for tracks with refitted extrapolation using the MS part of the combined track"""
     statusOn     = True
@@ -285,7 +279,6 @@ jobproperties.MuonCombinedContainerKeys.add_JobProperty(ExtrapolatedMSOnlyTracks
 # Large d0 tracking muons
 jobproperties.MuonCombinedContainerKeys.add_JobProperty(FinalMuonsLargeD0)
 jobproperties.MuonCombinedContainerKeys.add_JobProperty(InDetTrackParticlesLargeD0)
-jobproperties.MuonCombinedContainerKeys.add_JobProperty(CombinedFitTracksLargeD0)
 jobproperties.MuonCombinedContainerKeys.add_JobProperty(MuGirlMuonsLargeD0)
 
 
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py
index c54557a5c289..f6e471ade4e5 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py
@@ -87,17 +87,18 @@ addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCreatorAlg","MuonCreat
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCreatorAlg","MuonCreatorAlg_LargeD0",
                                                                       MuonContainerLocation=MuonCbKeys.FinalMuonsLargeD0(),
                                                                       InDetCandidateLocation=MuonCbKeys.InDetTrackParticlesLargeD0(),
-                                                                      ExtrapolatedLocation="ExtraPolatedMuon_LargeD0",
-                                                                      ExtrapolatedTrackLocation="ExtraPolatedMuonTrack_LargeD0",
-                                                                      MSOnlyExtrapolatedLocation="MSOnlyExtraPolatedMuons_LargeD0",
-                                                                      MSOnlyExtrapolatedTrackLocation="MSOnlyExtraPolatedMuonTrack_LargeD0",
-                                                                      CombinedLocation=MuonCbKeys.CombinedFitTracksLargeD0(),
+                                                                      ExtrapolatedLocation="ExtraPolated"+MuonCbKeys.FinalMuonsLargeD0(),
+                                                                      #ExtrapolatedTrackLocation="ExtraPolatedMuonLRT",
+                                                                      MSOnlyExtrapolatedLocation="MSOnlyExtraPolated"+MuonCbKeys.FinalMuonsLargeD0(),
+                                                                      #MSOnlyExtrapolatedTrackLocation="MSOnlyExtraPolated"+MuonCbKeys.FinalMuonsLargeD0(),
+                                                                      CombinedLocation="Combined"+MuonCbKeys.FinalMuonsLargeD0(),
                                                                       SegmentContainerName="MuonSegments_LargeD0",
                                                                       TrackSegmentContainerName="TrakMuonSegments_LargeD0",
                                                                       TagMaps=["muidcoTagMap_LargeD0","stacoTagMap_LargeD0","segmentTagMap_LargeD0","MuGirlMap_LargeD0","caloTagMap_LargeD0"],
                                                                       BuildSlowMuon= False,
                                                                       MakeClusters=False ,
-                                                                      MuonCreatorTool="MuonCombined::MuonCreatorTool/MuonCreatorTool_LRT"   )
+                                                                      MuonCreatorTool="MuonCombined::MuonCreatorTool/MuonCreatorTool_LRT",
+                                                                      OutputLevel=DEBUG   )
 
 
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.StauCreatorAlg","StauCreatorAlg")
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/share/MuonCombined_OutputItemsAOD.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/share/MuonCombined_OutputItemsAOD.py
index 69757f5a3c2c..d2d6813559ff 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/share/MuonCombined_OutputItemsAOD.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/share/MuonCombined_OutputItemsAOD.py
@@ -28,8 +28,9 @@ if DetFlags.detdescr.Muon_on():
    if InDetFlags.doR3LargeD0():
        MuonCombinedAODList+=[ "xAOD::MuonContainer#"+MuonCbKeys.FinalMuonsLargeD0() ]
        MuonCombinedAODList+=[ "xAOD::MuonAuxContainer#"+MuonCbKeys.FinalMuonsLargeD0()+"Aux.-DFCommonMuonsTight.-DFCommonGoodMuon.-DFCommonMuonsMedium.-DFCommonMuonsLoose" ] # See note
-       MuonCombinedAODList+=[ "xAOD::TrackParticleContainer#"+MuonCbKeys.CombinedFitTracksLargeD0()]
-       MuonCombinedAODList+=[ "xAOD::TrackParticleAuxContainer#"+MuonCbKeys.CombinedFitTracksLargeD0()+"Aux." + excludedAuxData]
+      
+       MuonCombinedAODList+=[ "xAOD::TrackParticleContainer#Combined"+MuonCbKeys.FinalMuonsLargeD0()+"TrackParticles"]
+       MuonCombinedAODList+=[ "xAOD::TrackParticleAuxContainer#Combined"+MuonCbKeys.FinalMuonsLargeD0()+"TrackParticlesAux." + excludedAuxData]
 
    # Note: hack to remove derivation framework variables that are added by DRAW building and are supposed to be transient
 
-- 
GitLab


From b6b688b12e1927188bb48c412dcd331a523ca895 Mon Sep 17 00:00:00 2001
From: Johannes Josef Junggeburth <johannes.josef.junggeburth@CERN.CH>
Date: Fri, 18 Sep 2020 16:54:34 +0200
Subject: [PATCH 028/403] Add the muon track particle containers for now

---
 .../share/MuonCombined_OutputItemsAOD.py                    | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/share/MuonCombined_OutputItemsAOD.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/share/MuonCombined_OutputItemsAOD.py
index d2d6813559ff..047e7b238216 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/share/MuonCombined_OutputItemsAOD.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/share/MuonCombined_OutputItemsAOD.py
@@ -29,8 +29,14 @@ if DetFlags.detdescr.Muon_on():
        MuonCombinedAODList+=[ "xAOD::MuonContainer#"+MuonCbKeys.FinalMuonsLargeD0() ]
        MuonCombinedAODList+=[ "xAOD::MuonAuxContainer#"+MuonCbKeys.FinalMuonsLargeD0()+"Aux.-DFCommonMuonsTight.-DFCommonGoodMuon.-DFCommonMuonsMedium.-DFCommonMuonsLoose" ] # See note
       
+       ### Combined muon track particles
        MuonCombinedAODList+=[ "xAOD::TrackParticleContainer#Combined"+MuonCbKeys.FinalMuonsLargeD0()+"TrackParticles"]
        MuonCombinedAODList+=[ "xAOD::TrackParticleAuxContainer#Combined"+MuonCbKeys.FinalMuonsLargeD0()+"TrackParticlesAux." + excludedAuxData]
+       ### ME trackParticles
+       MuonCombinedAODList+=[ "xAOD::TrackParticleContainer#ExtraPolated"+MuonCbKeys.FinalMuonsLargeD0()+"TrackParticles"]
+       MuonCombinedAODList+=[ "xAOD::TrackParticleAuxContainer#ExtraPolated"+MuonCbKeys.FinalMuonsLargeD0()+"TrackParticlesAux." + excludedAuxData]
+       MuonCombinedAODList+=[ "xAOD::TrackParticleContainer#MSOnlyExtraPolated"+MuonCbKeys.FinalMuonsLargeD0()+"TrackParticles"]
+       MuonCombinedAODList+=[ "xAOD::TrackParticleAuxContainer#MSOnlyExtraPolated"+MuonCbKeys.FinalMuonsLargeD0()+"TrackParticlesAux." + excludedAuxData]
 
    # Note: hack to remove derivation framework variables that are added by DRAW building and are supposed to be transient
 
-- 
GitLab


From fe0680410ba07c5b8fa56bcd0803217c0df7e686 Mon Sep 17 00:00:00 2001
From: Mohsen Rezaei Estabragh <mohsen.rezaei.estabragh@cern.ch>
Date: Fri, 18 Sep 2020 17:20:21 +0200
Subject: [PATCH 029/403] minor: info message improvement

---
 Tools/PyJobTransforms/python/trfUtils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Tools/PyJobTransforms/python/trfUtils.py b/Tools/PyJobTransforms/python/trfUtils.py
index 0fc4ca850ffa..1a0d50832e16 100644
--- a/Tools/PyJobTransforms/python/trfUtils.py
+++ b/Tools/PyJobTransforms/python/trfUtils.py
@@ -1273,7 +1273,7 @@ class analytic():
                         fitResult = {"slope": slope, "chi2": chi2}
                         if slope:
                             HRslope, unit = self.formatBytes(slope)
-                            msg.info('current memory leak: {0} {1} (using {2} data points, chi2={3})'.format(HRslope, unit, len(x), chi2))
+                            msg.info('slope of the fitted line: {0} {1} (using {2} data points, chi2={3})'.format(HRslope, unit, len(x), chi2))
             else:
                 msg.warning('wrong length of table data, x={0}, y={1} (must be same and length>={2})'.format(x, y, minPoints))
 
-- 
GitLab


From 0106cc556bfc2a6f249bb9d11c70971a87c7a8b1 Mon Sep 17 00:00:00 2001
From: Nicholas Styles <nstyles@atlas07.desy.de>
Date: Tue, 22 Sep 2020 18:14:36 +0200
Subject: [PATCH 030/403] Add intial ITk flags implementation, and use to steer
 loading of local Geometry XML files

---
 Control/AthenaConfiguration/python/AllConfigFlags.py  |  7 ++++++-
 InnerDetector/InDetConfig/python/ITkConfigFlags.py    | 11 +++++++++++
 .../StripGeoModelXml/python/ITkStripGeoModelConfig.py |  3 +++
 3 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 InnerDetector/InDetConfig/python/ITkConfigFlags.py

diff --git a/Control/AthenaConfiguration/python/AllConfigFlags.py b/Control/AthenaConfiguration/python/AllConfigFlags.py
index 2d09407b2e9d..c1d8cd2e4ba0 100644
--- a/Control/AthenaConfiguration/python/AllConfigFlags.py
+++ b/Control/AthenaConfiguration/python/AllConfigFlags.py
@@ -167,7 +167,12 @@ def _createCfgFlags():
     def __indet():
         from InDetConfig.InDetConfigFlags import createInDetConfigFlags
         return createInDetConfigFlags()
-    _addFlagsCategory(acf, "InDet", __indet, 'InDetConfig' )    
+    _addFlagsCategory(acf, "InDet", __indet, 'InDetConfig' )
+
+    def __itk():
+        from InDetConfig.ITkConfigFlags import createITkConfigFlags
+        return createITkConfigFlags()
+    _addFlagsCategory(acf, "ITk", __itk, 'InDetConfig' )
 
     def __muon():
         from MuonConfig.MuonConfigFlags import createMuonConfigFlags
diff --git a/InnerDetector/InDetConfig/python/ITkConfigFlags.py b/InnerDetector/InDetConfig/python/ITkConfigFlags.py
new file mode 100644
index 000000000000..077bb9d58ae0
--- /dev/null
+++ b/InnerDetector/InDetConfig/python/ITkConfigFlags.py
@@ -0,0 +1,11 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+from AthenaConfiguration.AthConfigFlags import AthConfigFlags
+# TODO: clean up flags, should only contain general settings but no alg config
+# TODO : Add some exta levels?
+
+def createITkConfigFlags():
+  itkcf=AthConfigFlags()
+  itkcf.addFlag("ITk.useLocalGeometry", False) #take geometry XML files from local instance rather than Detector Database, for development
+  itkcf.addFlag("ITk.stripGeometryFilename", 'ITkStrip.gmx')
+  return itkcf
diff --git a/InnerDetector/InDetDetDescr/StripGeoModelXml/python/ITkStripGeoModelConfig.py b/InnerDetector/InDetDetDescr/StripGeoModelXml/python/ITkStripGeoModelConfig.py
index 642c5a5b4f3b..f4093350e752 100644
--- a/InnerDetector/InDetDetDescr/StripGeoModelXml/python/ITkStripGeoModelConfig.py
+++ b/InnerDetector/InDetDetDescr/StripGeoModelXml/python/ITkStripGeoModelConfig.py
@@ -15,6 +15,9 @@ def ITkStripGeometryCfg( flags ):
     #ITkStripDetectorTool.useDynamicAlignFolders = flags.GeoModel.Align.Dynamic
     ITkStripDetectorTool.Alignable = False # make this a flag? Set true as soon as decided on folder structure
     ITkStripDetectorTool.DetectorName = "ITkStrip"
+    if flags.ITk.useLocalGeometry:
+      #Setting this filename triggers reading from local file rather than DB  
+      ITkStripDetectorTool.GmxFilename = flags.ITk.stripGeometryFilename 
     geoModelSvc.DetectorTools += [ ITkStripDetectorTool ]
     
     """
-- 
GitLab


From da2598bdd893d6523cdf92bfefc073db3f0c5509 Mon Sep 17 00:00:00 2001
From: Debo <debottam.bakshi.gupta@cern.ch>
Date: Wed, 23 Sep 2020 14:32:02 +0200
Subject: [PATCH 031/403] Adding HLT_2g15_tight_dPhi15_L12EM7to LS2

---
 .../TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py         | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
index bde1aa713935..73f97dc356cb 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
@@ -165,8 +165,8 @@ def setupMenu():
         ChainProp(name='HLT_g140_etcut_L1EM22VHI', groups=SinglePhotonGroup),
 
         #ATR-21882
-        #ChainProp(name='HLT_2g15_tight_dPhi15_L1DPHI-M70-2EM12I', l1SeedThresholds=['EM12I'], groups=MultiPhotonGroup),
-        ChainProp(name='HLT_2g15_tight_dPhi15_L12EM3', groups=MultiPhotonGroup),
+        ChainProp(name='HLT_2g15_tight_dPhi15_L1DPHI-M70-2EM12I', l1SeedThresholds=['EM12I'], groups=MultiPhotonGroup),
+        ChainProp(name='HLT_2g15_tight_dPhi15_L12EM7', groups=MultiPhotonGroup),
         ChainProp(name='HLT_g300_etcut_L1EM22VHI', groups=SinglePhotonGroup),
     ]
 
-- 
GitLab


From 8302ef003c0daa5c860cd464f5a1f4f7401875a5 Mon Sep 17 00:00:00 2001
From: Debo <debottam.bakshi.gupta@cern.ch>
Date: Thu, 24 Sep 2020 12:13:17 +0200
Subject: [PATCH 032/403] making combohypo more inclusive by replacing
 PhotonContainer by EgammaContainer

---
 .../TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.cxx     | 4 ++--
 .../TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.h       | 1 +
 .../TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py         | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.cxx
index 4a68998ccb99..64aa3528d611 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.cxx
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.cxx
@@ -42,10 +42,10 @@ StatusCode TrigEgammaDiphotonDPhiHypoTool::initialize()
 bool TrigEgammaDiphotonDPhiHypoTool::executeAlg(std::vector<LegDecision> &combination) const {
 
 //retrieve the electrons 
-  std::vector<ElementLink<xAOD::PhotonContainer>> selected_photons;
+  std::vector<ElementLink<xAOD::EgammaContainer>> selected_photons;
   for (auto el: combination){
     auto EL= el.second;    
-    auto photonLink = TrigCompositeUtils::findLink<xAOD::PhotonContainer>( *EL, featureString() ).link;
+    auto photonLink = TrigCompositeUtils::findLink<xAOD::EgammaContainer>( *EL, featureString() ).link;
     selected_photons.push_back(photonLink);
   }
   auto photonLink1=selected_photons[0];
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.h
index 08a5b52e75c7..c3c45cc5998f 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.h
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.h
@@ -24,6 +24,7 @@
 #include "xAODTracking/TrackParticleContainer.h"
 #include "xAODTrigEgamma/TrigPhoton.h"
 #include "xAODEgamma/PhotonContainer.h"
+#include "xAODEgamma/EgammaContainer.h"
 
 #include "TrigCompositeUtils/HLTIdentifier.h"
 #include "TrigCompositeUtils/TrigCompositeUtils.h"
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
index cb0ff75f25ff..97f57cff1182 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
@@ -166,7 +166,7 @@ def setupMenu():
         ChainProp(name='HLT_g140_etcut_L1EM22VHI', groups=SinglePhotonGroup),
 
         #ATR-21882
-        ChainProp(name='HLT_2g15_tight_dPhi15_L1DPHI-M70-2EM12I', l1SeedThresholds=['EM12I'], groups=MultiPhotonGroup),
+        ChainProp(name='HLT_2g15_tight_dPhi15_L1DPHI-M70-2EM12I', l1SeedThresholds=['EM12'], groups=MultiPhotonGroup),
         ChainProp(name='HLT_2g15_tight_dPhi15_L12EM7', groups=MultiPhotonGroup),
         ChainProp(name='HLT_g300_etcut_L1EM22VHI', groups=SinglePhotonGroup),
     ]
-- 
GitLab


From 7f901f6c3b8100f4d789ab0db3a9bb2f757a8c53 Mon Sep 17 00:00:00 2001
From: mleszczy <michal.leszczynski@cern.ch>
Date: Fri, 25 Sep 2020 10:51:03 +0100
Subject: [PATCH 033/403] Update confTool to flatten props list when comparing

---
 Control/AthenaConfiguration/share/confTool.py | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/Control/AthenaConfiguration/share/confTool.py b/Control/AthenaConfiguration/share/confTool.py
index 3ae4bc6447e5..c07fd168c4cc 100755
--- a/Control/AthenaConfiguration/share/confTool.py
+++ b/Control/AthenaConfiguration/share/confTool.py
@@ -100,12 +100,15 @@ def main(args):
             sys.exit("ERROR, can diff exactly two files at a time, got: %s" % args.file)
         configRef = _loadSingleFile(args.file[0], args)
         configChk = _loadSingleFile(args.file[1], args)
-        for ref, chk in zip(configRef, configChk):
-            if isinstance(ref, dict) and isinstance(chk, dict):
-                _compareConfig(ref, chk, args)
-            else:
-                print("Given list of size %d. Not looking for differences." % len(ref))
-
+        flattenedRef = {}
+        flattenedChk = {}
+        for ref in configRef:
+            if isinstance(ref, dict):
+                flattenedRef.update(ref)
+        for chk in configChk:
+            if isinstance(chk, dict):
+                flattenedChk.update(chk)
+        _compareConfig(flattenedRef, flattenedChk, args)
 
 def _loadSingleFile(fname, args):
     conf = []
@@ -122,7 +125,7 @@ def _loadSingleFile(fname, args):
                     to_json[comp][name] = value
                 conf = [to_json, props[0], props[1]]
 
-            elif isinstance(cfg, collections.defaultdict):  # old configuration
+            elif isinstance(cfg, (collections.defaultdict, dict)):  # old configuration
                 cfg.update(pickle.load(input_file))
                 conf.append(pickle.load(input_file))
                 conf.append(cfg)
@@ -166,6 +169,8 @@ def _loadSingleFile(fname, args):
             for dic in conf
             if isinstance(dic, dict)
         ]
+    # import code
+    # code.interact(local=locals())
     return conf
 
 
-- 
GitLab


From 5160b8666b68601f457c621295d0892306ee7f63 Mon Sep 17 00:00:00 2001
From: Ivan Yeletskikh <Ivan.Yeletskikh@cern.ch>
Date: Fri, 25 Sep 2020 12:51:10 +0200
Subject: [PATCH 034/403] update TrackingCutsFlags due to changes in
 ConfiguredNewTrackingCuts

---
 .../InDetConfig/python/TrackingCutsFlags.py   | 46 +++++++++++--------
 1 file changed, 27 insertions(+), 19 deletions(-)

diff --git a/InnerDetector/InDetConfig/python/TrackingCutsFlags.py b/InnerDetector/InDetConfig/python/TrackingCutsFlags.py
index cfa8fe0dc807..3e7aa0bcae61 100644
--- a/InnerDetector/InDetConfig/python/TrackingCutsFlags.py
+++ b/InnerDetector/InDetConfig/python/TrackingCutsFlags.py
@@ -173,21 +173,25 @@ def roadWidth_ranges( inflags ):
     {'-16':  20.0,
     '17-':  12.0 } )
 
-def keepAllConfirmedSeeds_ranges( inflags ):
+def keepAllConfirmedPixelSeeds_ranges( inflags ):
     return select( inflags.InDet.cutLevel,
     {'-17':  False,
     '18-':  True } )
 
-def maxSeedsPerSP_ranges( inflags ):
-    return select( inflags.InDet.cutLevel,
-    {'-17':  5,
-    '18-':  1 } )
-
 def minRoIClusterEt_ranges( inflags ):
     return select( inflags.InDet.cutLevel,
     {'-18':  0.0,
     '19-':  6000. * Units.MeV } )
 
+def maxSeedsPerSP_Pixels_ranges( inflags ):
+    return select( inflags.InDet.cutLevel,
+    {'-17':  5,
+    '18-':   1 } )
+
+def maxSeedsPerSP_Strips_ranges( inflags ):
+    return select( inflags.InDet.cutLevel,
+    {'-17':  5,
+    '18-':   5 } )
 
 ################################################################
     ## create set of tracking cut flags
@@ -199,7 +203,6 @@ def createTrackingFlags():
     icf = AthConfigFlags()
 
     icf.addFlag("extension", "" ) ### for extension
-    icf.addFlag("maxSCTHoles", 0 )
 
     icf.addFlag("minPT", minPT_ranges )
     icf.addFlag("minSecondaryPt", minSecondaryPT_ranges ) #Pt cut for back tracking + segment finding for these
@@ -264,8 +267,10 @@ def createTrackingFlags():
     icf.addFlag("maxTracksPerSharedPRD", 0)  ## is 0 ok for default??
     icf.addFlag("maxdImpactPPSSeeds", 2)
     icf.addFlag("maxdImpactSSSSeeds", maxdImpactSSSSeeds_ranges)
-    icf.addFlag("keepAllConfirmedSeeds", keepAllConfirmedSeeds_ranges)
-    icf.addFlag("maxSeedsPerSP", maxSeedsPerSP_ranges)
+    icf.addFlag("maxSeedsPerSP_Pixels", maxSeedsPerSP_Pixels_ranges)
+    icf.addFlag("maxSeedsPerSP_Strips", maxSeedsPerSP_Strips_ranges)
+    icf.addFlag("keepAllConfirmedPixelSeeds", keepAllConfirmedPixelSeeds_ranges)
+    icf.addFlag("keepAllConfirmedStripSeeds", False)
 
     # --- min pt cut for brem
     icf.addFlag("minPTBrem", 1. * Units.GeV) # off
@@ -485,7 +490,8 @@ def createR3LargeD0TrackingFlags():
     icf.maxdImpactSSSSeeds      = 300.0
     icf.doZBoundary             = True
     icf.keepAllConfirmedSeeds   = True
-    icf.maxSeedsPerSP           = 1
+    icf.maxSeedsPerSP_Strips           = 1
+    icf.keepAllConfirmedStripSeeds  = True
 
     return icf
 
@@ -520,7 +526,7 @@ def createLowPtLargeD0TrackingFlags():
 def createLowPtTrackingFlags():
     icf = createTrackingFlags()
     icf.extension        = "LowPt"
-    icf.maxPT = lambda pcf: (1e6  if pcf.InDet.doMinBias else pcf.InDet.Tracking.minPT + 0.3) * Units.GeV
+    icf.maxPT = lambda pcf: (1e6  if pcf.InDet.doMinBias else pcf.InDet.Tracking.minPt + 0.3) * Units.GeV
     icf.minPT            = 0.050 * Units.GeV
     icf.minClusters      = 5
     icf.minSiNotShared   = 4
@@ -608,7 +614,6 @@ def createForwardTracksTrackingFlags():
     icf.maxPrimaryImpact = 5. * Units.mm
     icf.roadWidth        = 12.
     icf.maxdImpactSSSSeeds = 5.0
-    icf.maxSeedsPerSP    = 1
     icf.keepAllConfirmedSeeds = True
     icf.SecondarynHolesMax = 2
     icf.SecondarynHolesGapMax = 2
@@ -823,7 +828,6 @@ def createPixelTrackingFlags():
     icf.maxPrimaryImpact = lambda pcf: 1000. * Units.mm if pcf.Beam.Type =="cosmics" else 5. * Units.mm 
     icf.roadWidth        = lambda pcf: 60.0 if pcf.Beam.Type =="cosmics" else 12.0
     icf.maxdImpactSSSSeeds = 5.0
-    icf.maxSeedsPerSP    = 1
     icf.keepAllConfirmedSeeds = True
     icf.SecondarynHolesMax = 2
     icf.SecondarynHolesGapMax = 2
@@ -979,11 +983,11 @@ def createDBMTrackingFlags():
 #####################################################################
 
 if __name__ == "__main__":
-  #from AthenaConfiguration.AthConfigFlags import AthConfigFlags
-  #from AthenaConfiguration.AllConfigFlags import ConfigFlags
-  #ConfigFlags = createTrackingFlags()
-  from InDetConfig.InDetConfigFlags import createInDetConfigFlags
-  ConfigFlags = createInDetConfigFlags()
+
+  from AthenaConfiguration.AllConfigFlags import ConfigFlags
+  from AthenaConfiguration.TestDefaults import defaultTestFiles
+  ConfigFlags.Input.Files=defaultTestFiles.RAW
+  
   from AthenaCommon.Logging import logging
   l = logging.getLogger('AthConfigFlags')
   from AthenaCommon.Constants import WARNING
@@ -998,7 +1002,11 @@ if __name__ == "__main__":
 
   assert ConfigFlags.InDet.HeavyIonTracking.minSiNotShared == 7, "wrong value, overwrite"
   assert ConfigFlags.InDet.HeavyIonTracking.minRoIClusterEt == 0.0, "wrong value, overwrite"
+
+  print("ConfigFlags.InDet.SCTandTRTTracking.minPT",ConfigFlags.InDet.SCTandTRTTracking.minPT)
+  print("type(ConfigFlags.InDet.SCTandTRTTracking)",type(ConfigFlags.InDet.SCTandTRTTracking)) 
+  
   #ConfigFlags.dump()
-  print( "allok" )  
+  print( "allok" )   
 
 
-- 
GitLab


From edd8e32a09f8b325350b143499d0da2edcefc10a Mon Sep 17 00:00:00 2001
From: Johannes Josef Junggeburth <johannes.josef.junggeburth@CERN.CH>
Date: Fri, 25 Sep 2020 14:30:05 +0200
Subject: [PATCH 035/403] Remove IP cuts for LRT:

---
 .../python/MuonCombinedRecExampleConfigDb.py       | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py
index f6e471ade4e5..82dc5ab82b1d 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py
@@ -39,7 +39,8 @@ addTool("MuonCombinedRecExample.MuonCombinedFitTools.MuonMaterialProviderTool","
 
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCaloTagAlg","MuonCaloTagAlg")
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCaloTagAlg","MuonCaloTagAlg_LargeD0",
-                                                                      InDetCandidateLocation=MuonCbKeys.InDetTrackParticlesLargeD0(),                                 
+                                                                      InDetCandidateLocation=MuonCbKeys.InDetTrackParticlesLargeD0(),  
+                                                                                                     
                                                                       TagMap="caloTagMap_LargeD0")
 
 
@@ -58,7 +59,8 @@ addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCombinedInDetCandidate
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCombinedInDetCandidateAlg",
                                     "MuonCombinedInDetCandidateAlg_LargeD0",
                                     TrackParticleLocation=[InDetKeys.xAODLargeD0TrackParticleContainer()],
-                                    InDetCandidateLocation=MuonCbKeys.InDetTrackParticlesLargeD0(),                                    
+                                    InDetCandidateLocation=MuonCbKeys.InDetTrackParticlesLargeD0(),  
+									TrackSelector="MuonCombinedInDetDetailedTrackSelectorTool_LargeD0",
                                     DoSiliconAssocForwardMuons=False)
 
 
@@ -113,6 +115,14 @@ addTool("MuonCombinedRecExample.MuonSegmentTaggerTools.MuTagAmbiguitySolverTool"
 addTool("MuonCombinedRecExample.MuonSegmentTaggerTools.MuonSegmentTagTool","MuonSegmentTagTool")
 
 addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCombinedInDetDetailedTrackSelectorTool","MuonCombinedInDetDetailedTrackSelectorTool")
+addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCombinedInDetDetailedTrackSelectorTool",
+        "MuonCombinedInDetDetailedTrackSelectorTool_LargeD0",
+        IPd0Max=1.e4,
+        nHitPix=0,
+        nHitSct=4,
+        
+)
+
 addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCombinedInDetDetailedTrackSelectorTool","MuonCombinedInDetDetailedForwardTrackSelectorTool", nHitSct=0)
 addTool("MuonCombinedRecExample.MuonCombinedTools.MuonInDetForwardCandidateTool","MuonInDetForwardCandidateTool")
 addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCombinedParticleCreator","MuonCombinedParticleCreator")
-- 
GitLab


From d9754d102ba41a757faa65c25e4beefeb706ffa5 Mon Sep 17 00:00:00 2001
From: Kenji Hamano <kenji.hamano@cern.ch>
Date: Fri, 25 Sep 2020 12:20:10 -0700
Subject: [PATCH 036/403] jNOISECUT folder typo fixed

---
 .../TrigMonitoring/TrigMETMonitoring/src/HLTMETMonTool.cxx  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Trigger/TrigMonitoring/TrigMETMonitoring/src/HLTMETMonTool.cxx b/Trigger/TrigMonitoring/TrigMETMonitoring/src/HLTMETMonTool.cxx
index 9a97660d0a17..7305bb8f7f26 100644
--- a/Trigger/TrigMonitoring/TrigMETMonitoring/src/HLTMETMonTool.cxx
+++ b/Trigger/TrigMonitoring/TrigMETMonitoring/src/HLTMETMonTool.cxx
@@ -252,8 +252,8 @@ StatusCode HLTMETMonTool::book() {
   setCurrentMonGroup(monFolderName);
   addL1BasicHistograms();
   
-  // jXENOISECUT L1 histograms
-  monFolderName = monGroupName + "/jXENOISECUT";
+  // jNOISECUT L1 histograms
+  monFolderName = monGroupName + "/jNOISECUT";
   addMonGroup(new MonGroup(this, monFolderName, run));
   setCurrentMonGroup(monFolderName);
   addL1BasicHistograms();
@@ -1159,7 +1159,7 @@ StatusCode HLTMETMonTool::fillMETHist() {
     fillL1BasicHistograms(l1_noisecut_mex,l1_noisecut_mex_log,l1_noisecut_mey,l1_noisecut_mey_log,l1_noisecut_met,l1_noisecut_met_log,l1_noisecut_sumet,l1_noisecut_sumet_log,l1_noisecut_phi,saturated_noisecut);
   }
 
-  // L1 jXENOISECUT
+  // L1 jNOISECUT
   monFolderName = monGroupName + "/jNOISECUT";
   setCurrentMonGroup(monFolderName.c_str());
 
-- 
GitLab


From 95dbd6e4ed4c78a3782feeeaaf3d0b797dca3e1b Mon Sep 17 00:00:00 2001
From: Laura Stephanie Miller <lmiller@lxplus707.cern.ch>
Date: Sun, 27 Sep 2020 03:42:29 +0200
Subject: [PATCH 037/403] Update CMakeLists to add xAODTau for use in
 tau-FlowElement linking

---
 Reconstruction/eflowRec/CMakeLists.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Reconstruction/eflowRec/CMakeLists.txt b/Reconstruction/eflowRec/CMakeLists.txt
index 5b1142016446..00f8bd1a4313 100644
--- a/Reconstruction/eflowRec/CMakeLists.txt
+++ b/Reconstruction/eflowRec/CMakeLists.txt
@@ -17,11 +17,12 @@ atlas_depends_on_subdirs( PUBLIC
                           Control/CxxUtils
                           DetectorDescription/GeoPrimitives
                           Event/xAOD/xAODCaloEvent
-			  Event/xAOD/xAODCore
+                          Event/xAOD/xAODCore
                           Event/xAOD/xAODEgamma
                           Event/xAOD/xAODMuon
                           Event/xAOD/xAODPFlow
                           Event/xAOD/xAODTracking
+                          Event/xAOD/xAODTau
                           GaudiKernel
                           InnerDetector/InDetDetDescr/InDetReadoutGeometry
                           InnerDetector/InDetDetDescr/TRT_ReadoutGeometry
@@ -48,11 +49,10 @@ atlas_add_component( eflowRec
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} CaloEvent CaloIdentifier CaloRecLib AthContainers AthLinks AthenaBaseComps CxxUtils AthenaKernel GeoPrimitives xAODCaloEvent xAODCore xAODEgamma xAODMuon xAODPFlow xAODTracking GaudiKernel InDetReadoutGeometry TRT_ReadoutGeometry TrackVertexAssociationToolLib Particle RecoToolInterfaces TrkParameters CaloDetDescrLib CaloUtilsLib StoreGateLib SGtests FourMomUtils PathResolver TrkCaloExtension TrkParametersIdentificationHelpers InDetTrackSelectionToolLib AthenaMonitoringKernelLib )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} CaloEvent CaloIdentifier CaloRecLib AthContainers AthLinks AthenaBaseComps CxxUtils AthenaKernel GeoPrimitives xAODCaloEvent xAODCore xAODEgamma xAODMuon xAODPFlow xAODTau xAODTracking GaudiKernel InDetReadoutGeometry TRT_ReadoutGeometry TrackVertexAssociationToolLib Particle RecoToolInterfaces TrkParameters CaloDetDescrLib CaloUtilsLib StoreGateLib SGtests FourMomUtils PathResolver TrkCaloExtension TrkParametersIdentificationHelpers InDetTrackSelectionToolLib AthenaMonitoringKernelLib )
 
 # Install files from the package:
 atlas_install_headers( eflowRec )
 atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/*.py )
 atlas_install_runtime( share/rmsvsdr.dat )
-
-- 
GitLab


From b2b124a37d00c3a0b0791b5a358b51adeabce957 Mon Sep 17 00:00:00 2001
From: Laura Stephanie Miller <lmiller@lxplus707.cern.ch>
Date: Sun, 27 Sep 2020 03:48:15 +0200
Subject: [PATCH 038/403] Added FE tau linking algorithm

---
 .../eflowRec/share/PFlowMTConfig.py           | 44 ++++++++++---------
 1 file changed, 24 insertions(+), 20 deletions(-)

diff --git a/Reconstruction/eflowRec/share/PFlowMTConfig.py b/Reconstruction/eflowRec/share/PFlowMTConfig.py
index edd98bf0749f..4a90cf8b5554 100644
--- a/Reconstruction/eflowRec/share/PFlowMTConfig.py
+++ b/Reconstruction/eflowRec/share/PFlowMTConfig.py
@@ -28,7 +28,7 @@ from CaloTools.CaloNoiseCondAlg import CaloNoiseCondAlg
 CaloNoiseCondAlg()
 
 TrackSelectionTool.CutLevel = "TightPrimary"
-TrackSelectionTool.minPt = 500.0 
+TrackSelectionTool.minPt = 500.0
 
 PFTrackSelector.trackSelectionTool = TrackSelectionTool
 
@@ -82,7 +82,7 @@ if jobproperties.eflowRecFlags.eflowAlgType == "EOverP":
    MatchingTool.ClusterPositionType = 'PlainEtaPhi' # str
    MatchingTool.DistanceType        = 'EtaPhiSquareDistance'
    MatchingTool.MatchCut = 0.2*0.2 # float
-   
+
 PFAlgorithm.SubtractionToolList += [PFCellLevelSubtractionTool]
 
 from eflowRec.eflowRecConf import PFRecoverSplitShowersTool
@@ -94,7 +94,7 @@ PFRecoverSplitShowersTool.eflowCellEOverPTool=CellEOverPTool_Recover
 
 if jobproperties.eflowRecFlags.recoverIsolatedTracks == True:
    PFRecoverSplitShowersTool.RecoverIsolatedTracks = True
-   
+
 if jobproperties.eflowRecFlags.useUpdated2015ChargedShowerSubtraction == False:
    PFRecoverSplitShowersTool.useUpdated2015ChargedShowerSubtraction = False
 
@@ -110,18 +110,18 @@ PFClusterMomentsMaker = CaloClusterMomentsMaker("PFClusterMomentsMaker")
 from CaloRec.CaloTopoClusterFlags import jobproperties
 
 PFClusterMomentsMaker.MaxAxisAngle = 20*deg
-PFClusterMomentsMaker.WeightingOfNegClusters = jobproperties.CaloTopoClusterFlags.doTreatEnergyCutAsAbsolute() 
+PFClusterMomentsMaker.WeightingOfNegClusters = jobproperties.CaloTopoClusterFlags.doTreatEnergyCutAsAbsolute()
 PFClusterMomentsMaker.MinBadLArQuality = 4000
 PFClusterMomentsMaker.TwoGaussianNoise = jobproperties.CaloTopoClusterFlags.doTwoGaussianNoise()
 PFClusterMomentsMaker.OutputLevel = INFO
 PFClusterMomentsMaker.MomentsNames = [
-   "FIRST_PHI" 
+   "FIRST_PHI"
    ,"FIRST_ETA"
-   ,"SECOND_R" 
+   ,"SECOND_R"
    ,"SECOND_LAMBDA"
    ,"DELTA_PHI"
    ,"DELTA_THETA"
-   ,"DELTA_ALPHA" 
+   ,"DELTA_ALPHA"
    ,"CENTER_X"
    ,"CENTER_Y"
    ,"CENTER_Z"
@@ -129,11 +129,11 @@ PFClusterMomentsMaker.MomentsNames = [
    ,"CENTER_LAMBDA"
    ,"LATERAL"
    ,"LONGITUDINAL"
-   ,"FIRST_ENG_DENS" 
-   ,"ENG_FRAC_EM" 
-   ,"ENG_FRAC_MAX" 
-   ,"ENG_FRAC_CORE" 
-   ,"FIRST_ENG_DENS" 
+   ,"FIRST_ENG_DENS"
+   ,"ENG_FRAC_EM"
+   ,"ENG_FRAC_MAX"
+   ,"ENG_FRAC_CORE"
+   ,"FIRST_ENG_DENS"
    ,"SECOND_ENG_DENS"
    ,"ISOLATION"
    ,"EM_PROBABILITY"
@@ -184,8 +184,8 @@ if jobproperties.eflowRecFlags.useCalibHitTruth:
 
    PFMomentCalculatorTool.CaloCalibClusterMomentsMaker2=PFCalibClusterMomentsMaker
 
-   
-                                           
+
+
 from eflowRec.eflowRecConf import PFClusterCollectionTool
 PFClusterCollectionTool_default = PFClusterCollectionTool("PFClusterCollectionTool")
 
@@ -234,7 +234,7 @@ from eflowRec.eflowRecConf import PFONeutralCreatorAlgorithm
 PFONeutralCreatorAlgorithm =  PFONeutralCreatorAlgorithm("PFONeutralCreatorAlgorithm")
 if jobproperties.eflowRecFlags.useCalibHitTruth:
    PFONeutralCreatorAlgorithm.UseCalibHitTruth=True
-   
+
 if jobproperties.eflowRecFlags.eflowAlgType == "EOverP":
    PFONeutralCreatorAlgorithm.PFOOutputName="EOverPNeutralParticleFlowObjects"
    PFONeutralCreatorAlgorithm.EOverPMode=True
@@ -248,25 +248,29 @@ jobproperties.eflowRecFlags.usePFEGammaPFOAssoc.set_Value_and_Lock(True)
 jobproperties.eflowRecFlags.useFlowElements.set_Value_and_Lock(True)
 
 if jobproperties.eflowRecFlags.usePFEGammaPFOAssoc:
-   
+
    from eflowRec.eflowRecConf import PFEGammaPFOAssoc
    PFEGammaPFOAssoc=PFEGammaPFOAssoc("PFEGammaPFOAssoc")
    topSequence += PFEGammaPFOAssoc
 
 #Add new FlowElement creators
-if jobproperties.eflowRecFlags.useFlowElements: 
+if jobproperties.eflowRecFlags.useFlowElements:
   from eflowRec.eflowRecConf import PFChargedFlowElementCreatorAlgorithm
   PFChargedFlowElementCreatorAlgorithm = PFChargedFlowElementCreatorAlgorithm("PFChargedFlowElementCreatorAlgorithm")
-  topSequence += PFChargedFlowElementCreatorAlgorithm 
+  topSequence += PFChargedFlowElementCreatorAlgorithm
 
   from eflowRec.eflowRecConf import PFNeutralFlowElementCreatorAlgorithm
   PFNeutralFlowElementCreatorAlgorithm = PFNeutralFlowElementCreatorAlgorithm("PFNeutralFlowElementCreatorAlgorithm")
-  topSequence += PFNeutralFlowElementCreatorAlgorithm 
+  topSequence += PFNeutralFlowElementCreatorAlgorithm
 
   from eflowRec.eflowRecConf import PFLCNeutralFlowElementCreatorAlgorithm
   PFLCNeutralFlowElementCreatorAlgorithm = PFLCNeutralFlowElementCreatorAlgorithm("PFLCNeutralFlowElementCreatorAlgorithm")
-  topSequence += PFLCNeutralFlowElementCreatorAlgorithm 
+  topSequence += PFLCNeutralFlowElementCreatorAlgorithm
 
   from eflowRec.eflowRecConf import PFEGamFlowElementAssoc
   PFEGamFlowElementAssoc=PFEGamFlowElementAssoc("PFEGamFlowElementAssoc")
   topSequence +=PFEGamFlowElementAssoc
+
+  from eflowRec.eflowRecConf import PFTauFlowElementAssoc
+  PFTauFlowElementAssoc=PFTauFlowElementAssoc("PFTauFlowElementAssoc")
+  topSequence += PFTauFlowElementAssoc
-- 
GitLab


From 062ec3f9eb5ad31274a8de9dd2d67e87ff7a86a9 Mon Sep 17 00:00:00 2001
From: Laura Stephanie Miller <lmiller@lxplus707.cern.ch>
Date: Sun, 27 Sep 2020 03:50:09 +0200
Subject: [PATCH 039/403] Added FE tau linking algorithm

---
 Reconstruction/eflowRec/src/components/eflowRec_entries.cxx | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Reconstruction/eflowRec/src/components/eflowRec_entries.cxx b/Reconstruction/eflowRec/src/components/eflowRec_entries.cxx
index f0ad355de1ce..8516927133d1 100644
--- a/Reconstruction/eflowRec/src/components/eflowRec_entries.cxx
+++ b/Reconstruction/eflowRec/src/components/eflowRec_entries.cxx
@@ -21,6 +21,7 @@
 #include "eflowRec/PFONeutralCreatorAlgorithm.h"
 #include "eflowRec/PFEGammaPFOAssoc.h"
 #include "eflowRec/PFEGamFlowElementAssoc.h"
+#include "eflowRec/PFTauFlowElementAssoc.h"
 
 DECLARE_COMPONENT( eflowOverlapRemoval )
 DECLARE_COMPONENT( PFLeptonSelector )
@@ -45,3 +46,4 @@ DECLARE_COMPONENT( eflowCellEOverPTool_mc12_JetETMiss)
 DECLARE_COMPONENT(  eflowCellEOverPTool_mc12_HLLHC)
 DECLARE_COMPONENT( eflowCellEOverPTool_mc12_LC)
 DECLARE_COMPONENT( PFEGamFlowElementAssoc )
+DECLARE_COMPONENT( PFTauFlowElementAssoc )
-- 
GitLab


From e91e00b93f38c5683fa3f46c57b0347aa5a09bc6 Mon Sep 17 00:00:00 2001
From: Laura Stephanie Miller <lmiller@lxplus707.cern.ch>
Date: Sun, 27 Sep 2020 03:54:24 +0200
Subject: [PATCH 040/403] Added linking algorithm for taus and FlowElements

---
 .../eflowRec/src/PFTauFlowElementAssoc.cxx    | 151 ++++++++++++++++++
 1 file changed, 151 insertions(+)
 create mode 100644 Reconstruction/eflowRec/src/PFTauFlowElementAssoc.cxx

diff --git a/Reconstruction/eflowRec/src/PFTauFlowElementAssoc.cxx b/Reconstruction/eflowRec/src/PFTauFlowElementAssoc.cxx
new file mode 100644
index 000000000000..a8e46cd64853
--- /dev/null
+++ b/Reconstruction/eflowRec/src/PFTauFlowElementAssoc.cxx
@@ -0,0 +1,151 @@
+/*
+ Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "eflowRec/PFTauFlowElementAssoc.h"
+#include "xAODTau/TauJetContainer.h"
+#include "xAODTau/TauTrack.h"
+#include "xAODPFlow/FlowElementContainer.h"
+#include "xAODPFlow/FlowElement.h"
+
+typedef ElementLink<xAOD::TauJetContainer> TauJetLink_t;
+typedef ElementLink<xAOD::FlowElementContainer> FELink_t;
+
+PFTauFlowElementAssoc::PFTauFlowElementAssoc(const std::string& name,
+              ISvcLocator* pSvcLocator): AthReentrantAlgorithm(name, pSvcLocator)
+{
+  // Declare the decoration keys
+  declareProperty ("TauNeutralFEDecorKey", m_tauNeutralFEWriteDecorKey = "TauJets.neutralFELinks");
+  declareProperty ("TauChargedFEDecorKey", m_tauChargedFEWriteDecorKey = "TauJets.chargedFELinks");
+
+  declareProperty ("NeutralFETauDecorKey", m_neutralFETauWriteDecorKey = "JetETMissNeutralFlowElements.FE_TauLinks");
+  declareProperty ("ChargedFETauDecorKey", m_chargedFETauWriteDecorKey = "JetETMissChargedFlowElements.FE_TauLinks");
+}
+
+PFTauFlowElementAssoc::~PFTauFlowElementAssoc() {}
+
+StatusCode PFTauFlowElementAssoc::initialize() {
+
+  ATH_MSG_DEBUG("Initializing" << name() << "...");
+
+  ATH_CHECK(m_tauNeutralFEWriteDecorKey.initialize());
+  ATH_CHECK(m_tauChargedFEWriteDecorKey.initialize());
+  ATH_CHECK(m_neutralFETauWriteDecorKey.initialize());
+  ATH_CHECK(m_chargedFETauWriteDecorKey.initialize());
+
+  ATH_CHECK(m_tauJetReadHandleKey.initialize());
+  ATH_CHECK(m_neutralFEReadHandleKey.initialize());
+  ATH_CHECK(m_chargedFEReadHandleKey.initialize());
+
+  ATH_MSG_DEBUG("Initialization completed successfully");
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode PFTauFlowElementAssoc::finalize() {
+  return StatusCode::SUCCESS;
+}
+
+/**
+  This algorithm:
+  1) Accesses the relevant FlowElement and TauJet containers
+  2) Loops over the neutral FEs and matches them to the corresponding TauJet clusters, creating the ElementLinks
+     and adding them to the JetETMissNeutralFlowElements container as a decoration
+  3) Loops over the charged FEs and matches them to the corresponding TauJet tracks, creating the ElementLinks
+     and adding them to the JetETMissChargedFlowElements container as a decoration
+  4) Adds the decoration to the TauJet container containing a vector of ElementLinks to corresponding FEs
+**/
+
+StatusCode PFTauFlowElementAssoc::execute(const EventContext &ctx) const {
+
+  // Write decoration handles for linking the TauJet container with the FlowElement container and vice versa
+  SG::WriteDecorHandle< xAOD::TauJetContainer, std::vector<FELink_t> > tauNeutralFEWriteDecorHandle (m_tauNeutralFEWriteDecorKey,ctx);
+  SG::WriteDecorHandle< xAOD::FlowElementContainer, std::vector<TauJetLink_t> > neutralFETauWriteDecorHandle (m_neutralFETauWriteDecorKey,ctx);
+  SG::WriteDecorHandle< xAOD::TauJetContainer, std::vector<FELink_t> > tauChargedFEWriteDecorHandle (m_tauChargedFEWriteDecorKey,ctx);
+  SG::WriteDecorHandle< xAOD::FlowElementContainer, std::vector<TauJetLink_t> > chargedFETauWriteDecorHandle (m_chargedFETauWriteDecorKey,ctx);
+  // Read handles for the TauJet container and the FlowElement container
+  SG::ReadHandle<xAOD::TauJetContainer> tauJetReadHandle (m_tauJetReadHandleKey,ctx);
+  SG::ReadHandle<xAOD::FlowElementContainer> neutralFEReadHandle (m_neutralFEReadHandleKey,ctx);
+  SG::ReadHandle<xAOD::FlowElementContainer> chargedFEReadHandle (m_chargedFEReadHandleKey,ctx);
+
+  // Initialize flow element link containers
+  std::vector<std::vector<FELink_t>> tauNeutralFEVec(tauJetReadHandle->size());
+  std::vector<std::vector<FELink_t>> tauChargedFEVec(tauJetReadHandle->size());
+
+  ////////////////////////////////////////////
+  // Loop over the neutral flow elements
+  ////////////////////////////////////////////
+  for (const xAOD::FlowElement* FE : *neutralFETauWriteDecorHandle) {
+    // Get the index of the flow element cluster
+    size_t FEClusterIndex = FE->otherObjects().at(0)->index();
+
+    std::vector<TauJetLink_t> FETauJetLinks;
+
+    // Loop over the taus
+    for (const xAOD::TauJet* tau : *tauNeutralFEWriteDecorHandle) {
+      // Get the clusters associated to the tau
+      std::vector< ElementLink<xAOD::IParticleContainer> > tauClusters = tau->clusterLinks();
+      for (auto clusLink : tauClusters) {
+        const xAOD::IParticle* clus = *clusLink;
+        // Get the index of the cluster associated to the tau
+        size_t tauClusterIndex = clus->index();
+
+        // Link the tau and the neutral FE if the cluster indices match
+        if (tauClusterIndex == FEClusterIndex) {
+          FETauJetLinks.push_back( TauJetLink_t(*tauJetReadHandle,tau->index()) );
+          tauNeutralFEVec.at(tau->index()).push_back( FELink_t(*neutralFEReadHandle, FE->index()) );
+        }
+
+      } // end tau cluster loop
+    } // end tau loop
+
+    // Add vector of elements links to the tau jets as a decoration to the FE container
+    neutralFETauWriteDecorHandle (*FE) = FETauJetLinks;
+
+  } // end neutral FE loop
+
+  ////////////////////////////////////////////
+  // Loop over the charged flow elements
+  ////////////////////////////////////////////
+  for (const xAOD::FlowElement* FE : *chargedFETauWriteDecorHandle) {
+    // Get the index of the flow element track
+    size_t FETrackIndex = FE->chargedObjects().at(0)->index();
+
+    std::vector<TauJetLink_t> FETauJetLinks;
+
+    // Loop over the taus
+    for (const xAOD::TauJet* tau : *tauChargedFEWriteDecorHandle) {
+      // Get tau tracks associated to the tau
+      std::vector<const xAOD::TauTrack*> tauTracks = tau->tracks(xAOD::TauJetParameters::coreTrack);
+      for (auto tauTrack : tauTracks) {
+        // Get track associated to the tau track to use for matching
+        const xAOD::TrackParticle* tauIDTrack = tauTrack->track();
+        // Get the index of the track associated to the tau
+        size_t tauIDTrackIndex = tauIDTrack->index();
+
+        // Link the tau and the charged FE if the track indices match
+        if (tauIDTrackIndex == FETrackIndex) {
+          FETauJetLinks.push_back( TauJetLink_t(*tauJetReadHandle,tau->index()) );
+          tauChargedFEVec.at(tau->index()).push_back( FELink_t(*chargedFEReadHandle, FE->index()) );
+        }
+      } // end tau track loop
+    } // end tau loop
+
+    // Add vector of elements links to the tau jets as a decoration to the FE container
+    chargedFETauWriteDecorHandle (*FE) = FETauJetLinks;
+
+  } // end charged FE loop
+
+  ////////////////////////////////////////////
+  // Write decorations to TauJet container
+  ////////////////////////////////////////////
+  // Add vectors of Flow Element (FE) Links as decorations to the TauJet container
+  for (const xAOD::TauJet* tau : *tauNeutralFEWriteDecorHandle) {
+    tauNeutralFEWriteDecorHandle (*tau) = tauNeutralFEVec.at(tau->index());
+    tauChargedFEWriteDecorHandle (*tau) = tauChargedFEVec.at(tau->index());
+  }
+
+  ATH_MSG_DEBUG("Execute completed successfully");
+
+  return StatusCode::SUCCESS;
+}
-- 
GitLab


From c53afcdd9ee995f832e1a40590eefde2855cc8e4 Mon Sep 17 00:00:00 2001
From: Laura Stephanie Miller <lmiller@lxplus707.cern.ch>
Date: Sun, 27 Sep 2020 03:54:42 +0200
Subject: [PATCH 041/403] Added linking algorithm for taus and FlowElements

---
 .../eflowRec/eflowRec/PFTauFlowElementAssoc.h | 68 +++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 Reconstruction/eflowRec/eflowRec/PFTauFlowElementAssoc.h

diff --git a/Reconstruction/eflowRec/eflowRec/PFTauFlowElementAssoc.h b/Reconstruction/eflowRec/eflowRec/PFTauFlowElementAssoc.h
new file mode 100644
index 000000000000..87071c12883b
--- /dev/null
+++ b/Reconstruction/eflowRec/eflowRec/PFTauFlowElementAssoc.h
@@ -0,0 +1,68 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+/*
+ * PFTauFlowElementAssoc.h
+ * Header file for class PFTauFlowElementAssoc
+ *
+ * Created on: 24.09.20
+ *     Author: L. Miller
+ */
+
+#ifndef PFTAUFLOWELEMENTASSOC_H
+#define PFTAUFLOWELEMENTASSOC_H
+
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
+#include "GaudiKernel/ToolHandle.h"
+#include "StoreGate/DataHandle.h"
+#include "StoreGate/WriteDecorHandle.h"
+
+#include "xAODPFlow/FlowElementContainer.h"
+#include "xAODTau/TauJetContainer.h"
+
+/**
+This is the algorithm, which inherits from AthReentrantAlgorithm, that adds element links
+between FlowElements (FEs) and Tau objects. Charged FEs are associated with core tau
+tracks and neutral FEs are associated with tau clusters.
+Decorations are added to the TauJet container consisting of a vector of ElementLinks
+to the charged and neutral FlowElement container.
+Similarly, decorations are added to the charged and neutral FlowElement containers
+(JetETMissChargedFlowElements and JetETMissNeutralFlowElements) which contain a
+vector of ElementLinks to the associated TauJets.
+*/
+
+class PFTauFlowElementAssoc : public AthReentrantAlgorithm {
+
+public:
+  using AthReentrantAlgorithm::AthReentrantAlgorithm;
+
+  PFTauFlowElementAssoc(const std::string& name, ISvcLocator* pSvcLocator);
+
+  virtual ~PFTauFlowElementAssoc();
+
+  virtual StatusCode initialize();
+  virtual StatusCode execute(const EventContext &ctx) const;
+  virtual StatusCode finalize();
+
+private:
+
+  // ReadHandle for the tau jets
+  SG::ReadHandleKey<xAOD::TauJetContainer> m_tauJetReadHandleKey{this,"TauJetContainer","TauJets","ReadHandleKey for TauJet Container"};
+  // ReadHandles for FlowElements
+  SG::ReadHandleKey<xAOD::FlowElementContainer> m_neutralFEReadHandleKey{this,"JetETMissNeutralFlowElementContainer","JetETMissNeutralFlowElements","ReadHandleKey for neutral FlowElements"};
+  SG::ReadHandleKey<xAOD::FlowElementContainer> m_chargedFEReadHandleKey{this,"JetETMissChargedFlowElementContainer","JetETMissChargedFlowElements","ReadHandleKey for charged FlowElements"};
+
+  /** The write key for adding Neutral Flow Element links to the taus */
+  SG::WriteDecorHandleKey<xAOD::TauJetContainer> m_tauNeutralFEWriteDecorKey;
+  /** The write key for adding Charged Flow Element links to the taus */
+  SG::WriteDecorHandleKey<xAOD::TauJetContainer> m_tauChargedFEWriteDecorKey;
+  /** The write key for adding tau element links to the Neutral Flow Elements */
+  SG::WriteDecorHandleKey<xAOD::FlowElementContainer> m_neutralFETauWriteDecorKey;
+  /** The write key for adding tau element links to the Charged Flow Elements */
+  SG::WriteDecorHandleKey<xAOD::FlowElementContainer> m_chargedFETauWriteDecorKey;
+
+};
+
+#endif // PFTAUFLOWELEMENTASSOC_H
-- 
GitLab


From 4394c07734db35b5ae1931a945903d3d5c8abdc6 Mon Sep 17 00:00:00 2001
From: Tomasz Bold <tomasz.bold@gmail.com>
Date: Mon, 28 Sep 2020 11:31:09 +0100
Subject: [PATCH 042/403] Support multiplicity triggers in new JO

---
 .../DecisionHandling/src/ComboHypo.cxx        |  6 ---
 .../L1Decoder/src/RoIsUnpackingToolBase.cxx   | 15 +++++--
 .../share/runHLT_standalone_newJO.py          |  2 +-
 .../Electron/generateElectron.py              |  5 ++-
 .../HLTMenuConfig/Menu/ChainDictTools.py      |  2 +-
 .../HLTMenuConfig/Menu/DictFromChainName.py   |  2 +-
 .../Menu/GenerateMenuMT_newJO.py              | 18 ++-------
 .../HLTMenuConfig/Menu/HLTCFConfig_newJO.py   | 39 ++++++++++++-------
 .../python/HLTMenuConfig/Menu/LS2_v1_newJO.py |  4 ++
 9 files changed, 51 insertions(+), 42 deletions(-)

diff --git a/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx b/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx
index cd105070e9e8..8cfe4dadfce4 100644
--- a/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx
+++ b/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx
@@ -179,12 +179,6 @@ StatusCode ComboHypo::execute(const EventContext& context ) const {
       nRequiredUnique += requiredMultiplicity;
 
       HLT::Identifier legId = TrigCompositeUtils::createLegName(chainId, legIndex);
-      // If there is only one leg, then we just use the chain's name.
-      if (multiplicityPerLeg.size() == 1) {
-        ATH_MSG_DEBUG(chainId << " has multiplicityPerLeg.size() == 1, so we don't use legXXX_HLT_YYY, we just use HLT_YYY");
-        legId = chainId; 
-      }
-
       const DecisionID requiredDecisionIDLeg = legId.numeric();
       ATH_MSG_DEBUG("Container " << legIndex << ", looking at leg : " << legId );
      
diff --git a/Trigger/TrigSteer/L1Decoder/src/RoIsUnpackingToolBase.cxx b/Trigger/TrigSteer/L1Decoder/src/RoIsUnpackingToolBase.cxx
index f982f97bdb67..a8b210c6d6ec 100644
--- a/Trigger/TrigSteer/L1Decoder/src/RoIsUnpackingToolBase.cxx
+++ b/Trigger/TrigSteer/L1Decoder/src/RoIsUnpackingToolBase.cxx
@@ -23,6 +23,15 @@ StatusCode RoIsUnpackingToolBase::initialize()
   return StatusCode::SUCCESS;
 }
 
+/**
+ * Retruns true if the seed is single threshold multiplicity item: L1_3MU6
+ * In such case the threashold name is prefixed by digit.
+ */
+bool isMultilpicity(const std::string& itemName, const std::string& thName) {
+  const size_t thPos = itemName.find( thName );
+  return std::isdigit(itemName[thPos-1]);
+}
+
 StatusCode RoIsUnpackingToolBase::decodeMapping( std::function< bool(const std::string&)> filter ) {
 
   SG::ReadHandle<TrigConf::HLTMenu>  hltMenuHandle = SG::makeHandle( m_HLTMenuKey );
@@ -36,9 +45,9 @@ StatusCode RoIsUnpackingToolBase::decodeMapping( std::function< bool(const std::
       if ( filter(th) ) {
         const HLT::Identifier thresholIdentifier(th);
         m_thresholdToChainMapping[ thresholIdentifier ].push_back( chainIdentifier );
-        ATH_MSG_DEBUG( "Associating " << chainIdentifier << " with threshold " << th );
-        if ( thresholds.size() > 1 ) {
-          HLT::Identifier legIdentifier = TrigCompositeUtils::createLegName(chainIdentifier, counter);
+        ATH_MSG_DEBUG( "Associating " << chainIdentifier << " with threshold " << th );        
+        if ( thresholds.size() > 1 or isMultilpicity( chain.l1item(), th ) ) {
+          HLT::Identifier legIdentifier = TrigCompositeUtils::createLegName( chainIdentifier, counter );
           m_thresholdToChainMapping[ thresholIdentifier ].push_back( legIdentifier );
           m_legToChainMapping.insert( std::make_pair( legIdentifier,  chainIdentifier ) );
           ATH_MSG_INFO( "Associating additional chain leg " << legIdentifier << " with threshold " << thresholIdentifier );
diff --git a/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone_newJO.py b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone_newJO.py
index 65e1efbcaf67..97ba2889f692 100644
--- a/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone_newJO.py
+++ b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone_newJO.py
@@ -100,7 +100,7 @@ acc.foreach_component("*/L1Decoder").OutputLevel = DEBUG
 acc.foreach_component("*/L1Decoder/*Tool").OutputLevel = DEBUG # tools
 acc.foreach_component("*HLTTop/*Hypo*").OutputLevel = DEBUG # hypo algs
 acc.foreach_component("*HLTTop/*Hypo*/*Tool*").OutputLevel = INFO # hypo tools
-acc.foreach_component("*HLTTop/RoRSeqFilter/*").OutputLevel = INFO# filters
+acc.foreach_component("*HLTTop/RoRSeqFilter/*").OutputLevel = DEBUG# filters
 acc.foreach_component("*HLTTop/*Input*").OutputLevel = DEBUG # input makers
 acc.foreach_component("*HLTTop/*HLTEDMCreator*").OutputLevel = WARNING # messaging from the EDM creators
 acc.foreach_component("*HLTTop/*GenericMonitoringTool*").OutputLevel = WARNING # silcence mon tools (addressing by type)
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/generateElectron.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/generateElectron.py
index a3f965858011..040687e1d6e3 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/generateElectron.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/generateElectron.py
@@ -8,6 +8,7 @@ from TrigEgammaHypo.TrigEgammaFastCaloHypoTool import TrigEgammaFastCaloHypoTool
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from TrigEDMConfig.TriggerEDMRun3 import recordable
 from AthenaConfiguration.ComponentFactory import CompFactory
+from TriggerMenuMT.HLTMenuConfig.Menu.DictFromChainName import getChainMultFromDict
 
 # TODO remove once full tracking is in place
 def fakeHypoAlgCfg(flags, name="FakeHypoForElectron"):    
@@ -44,7 +45,7 @@ def generateChains( flags,  chainDict ):
 
     accCalo.printConfig()
 
-    fastCaloStep = ChainStep(name=firstStepName, Sequences=[fastCaloSequence], chainDicts=[chainDict])
+    fastCaloStep = ChainStep(name=firstStepName, Sequences=[fastCaloSequence], chainDicts=[chainDict], multiplicity=getChainMultFromDict(chainDict))
 
 
     secondStepName = 'ElectronFTF'
@@ -75,7 +76,7 @@ def generateChains( flags,  chainDict ):
                                       HypoToolGen = makeFakeHypoTool,
                                       CA = accTrk)
 
-    fastInDetStep = ChainStep( name=secondStepName, Sequences=[fastInDetSequence], chainDicts=[chainDict])
+    fastInDetStep = ChainStep( name=secondStepName, Sequences=[fastInDetSequence], chainDicts=[chainDict], multiplicity=getChainMultFromDict(chainDict))
 
     l1Thresholds=[]
     for part in chainDict['chainParts']:
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainDictTools.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainDictTools.py
index 3bedb1670031..eadbcb44b6f8 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainDictTools.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainDictTools.py
@@ -103,7 +103,7 @@ def splitChainInDict(chainName):
       from TrigCompositeUtils.TrigCompositeUtils import legName
       chainDict = TriggerConfigHLT.getChainDictFromChainName(chainName)
       if len(chainDict['chainParts']) ==1:
-        return [chainDict]
+        return [deepcopy(chainDict)]
                   
       listOfChainDicts = []     
       for count, chainDictPart in enumerate(chainDict['chainParts']):
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/DictFromChainName.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/DictFromChainName.py
index 103ecceeadc5..e4ffe2c25c25 100755
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/DictFromChainName.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/DictFromChainName.py
@@ -149,7 +149,7 @@ def getChainMultFromDict(chainDict):
     allMultis = []
     for cpart in chainDict['chainParts']:
         if cpart['multiplicity'] != '':
-            allMultis.append(cpart['multiplicity'])
+            allMultis.append( int(cpart['multiplicity']))
     return allMultis
 
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT_newJO.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT_newJO.py
index 46d1bc651051..20867d5b3cfe 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT_newJO.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT_newJO.py
@@ -82,7 +82,7 @@ def generateMenu( flags ):
 
             chainDicts = splitInterSignatureChainDict(mainChainDict)
             listOfChainConfigs = []
-
+            print("aaa", chainDicts)
             for chainDict in chainDicts:
                 signature = chainDict['signature'].lower()
 
@@ -105,19 +105,9 @@ def generateMenu( flags ):
     log.info('Obtained Menu Chain objects')
 
     # pass all menuChain to CF builder
-    useReworked = True
-
-    if useReworked:
-        menuAcc.wasMerged()
-        menuAcc = generateDecisionTree(menuChains)
-    else:
-        menuAcc.wasMerged()
-        menuAcc = ComponentAccumulator()
-        mainSequenceName = 'HLTAllSteps'
-        menuAcc.addSequence( seqAND(mainSequenceName) )
-        chainsAcc = generateDecisionTreeOld(menuAcc.getSequence(mainSequenceName), menuChains, allChainDicts)
-        menuAcc.merge(chainsAcc)
-
+    menuAcc.wasMerged()
+    menuAcc = generateDecisionTree(menuChains)
+    
     menuAcc.printConfig()
 
     log.info('CF is built')
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig_newJO.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig_newJO.py
index 87091d47e192..630c9b49c0f5 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig_newJO.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig_newJO.py
@@ -1,13 +1,16 @@
 # Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-
+from PyUtils.Decorators import memoize
+from AthenaCommon.CFElements import findAllAlgorithms, parOR, seqAND
+from AthenaCommon.Logging import logging
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
 from TriggerMenuMT.HLTMenuConfig.Menu.ChainDictTools import splitChainInDict
+from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import (isComboHypoAlg,
+                                                             isHypoBase,
+                                                             isInputMakerBase)
 from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponentsNaming import CFNaming
 from TriggerMenuMT.HLTMenuConfig.Menu.TriggerConfigHLT import TriggerConfigHLT
-from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import isInputMakerBase, isHypoBase, isComboHypoAlg
-from AthenaCommon.CFElements import parOR, seqAND, findAllAlgorithms
-from AthenaCommon.Logging import logging
+
 log = logging.getLogger( __name__ )
 
 def printStepsMatrix(matrix):
@@ -19,15 +22,15 @@ def printStepsMatrix(matrix):
             print('---- {}: {}'.format(chainName, namesInCell))  # noqa: ATL901
     print('-------------------------')  # noqa: ATL901
 
-def memoize(f):
-    """ caches call of the helper functions, (copied from the internet) remove when we move to python 3.2 or newer and rplace by functools.lru_cache"""
-    memo = {}
-    def helper(*x):
-        tupledx = tuple(x)
-        if tupledx not in memo:
-            memo[tupledx] = f(*x)
-        return memo[tupledx]
-    return helper
+# def memoize(f):
+#     """ caches call of the helper functions, (copied from the internet) remove when we move to python 3.2 or newer and rplace by functools.lru_cache"""
+#     memo = {}
+#     def helper(*x):
+#         tupledx = tuple(x)
+#         if tupledx not in memo:
+#             memo[tupledx] = f(*x)
+#         return memo[tupledx]
+#     return helper
 
 def generateDecisionTree(chains):
     acc = ComponentAccumulator()
@@ -192,7 +195,7 @@ def generateDecisionTree(chains):
             prevCounter = stepCounter-1
             prevName = chain.steps[prevCounter-1].name # counting steps from 1, for indexing need one less
             prevStep = chain.steps[prevCounter-1]
-            if prevStep.isCombo:
+            if prevStep.isCombo:                
                 prevHypoAlg = findComboHypoAlg( prevCounter, prevName )
             else:
                 prevHypoAlg = findHypoAlg( prevCounter, prevName )
@@ -207,6 +210,8 @@ def generateDecisionTree(chains):
         for stepCounter, step in enumerate( chain.steps, 1 ):
             getFilterAlg( stepCounter, step.name )
             menuSeqName = getSingleMenuSeq( stepCounter, step.name ).name
+            log.info("zzz {} mult {} step {} is combo {}".format(chain.name, step.multiplicity, stepCounter, step.isCombo))
+
             if step.isCombo:
                 # add sequences that allows reconstructions to be run in parallel, followed (in sequence) by the combo hypo
                 comboSeq, comboRecoSeq = getComboSequences( stepCounter, step.name )
@@ -275,12 +280,17 @@ def generateDecisionTree(chains):
                 hypoOut = CFNaming.hypoAlgOutName( hypoAlg.name )
                 hypoAlg.HypoOutputDecisions = assureUnsetOrTheSame( hypoAlg.HypoOutputDecisions, hypoOut,
                     "{} hypo output".format( hypoAlg.name )  )
+                print("kkk", chainDict)
                 hypoAlg.HypoTools.append( step.sequences[sequenceCounter]._hypoToolConf.confAndCreate( chainDict ) )
                 pass
 
             if step.isCombo:
                 for seqCounter in range( len( step.sequences ) ) :
                     chainLegDict = splitChainInDict( chain.name )[seqCounter]
+                    # hack for multiplicity chains of the same signature, it should be handled in splitChainInDrict, TODO eliminate it, needs discussion wiht menu
+                    if len( step.sequences ) == 1: 
+                        from DecisionHandling.TrigCompositeUtils import legName
+                        chainLegDict['chainName'] = legName( chainLegDict['chainName'], 0)
                     __setup( seqCounter, chainLegDict )
 
                     comboHypoAlg = findComboHypoAlg( stepCounter, step.name )
@@ -326,6 +336,7 @@ def generateDecisionTree(chains):
             else:
                 hypoAlg = findHypoAlg( stepCounter, step.name )
                 log.info("  HypoAlg {} Inputs {} Outputs {} Tools {}".format( hypoAlg.name, hypoAlg.HypoInputDecisions, hypoAlg.HypoOutputDecisions, [t.name for t in hypoAlg.HypoTools] ) )
+    #kaboom
     return acc
 
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1_newJO.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1_newJO.py
index 4d7d83583376..6750ceff61a8 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1_newJO.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1_newJO.py
@@ -34,6 +34,7 @@ def setupMenu(flags):
     #---------------------------------------------------------------------
     SingleMuonGroup = ['RATE:SingleMuon', 'BW:Muon']
     SingleElectronGroup = ['RATE:SingleElectron', 'BW:Electron']
+    MultiElectronGroup = ['RATE:MultiElectron', 'BW:Electron']
     SinglePhotonGroup = ['RATE:SinglePhoton', 'BW:Photon']
     SingleJetGroup = ['RATE:SingleJet', 'BW:Jet']
     CombinedGroup = ['RATE:Combined', 'BW:Combined']
@@ -46,6 +47,9 @@ def setupMenu(flags):
 
     flags.Trigger.menu.electron = [
         ChainProp(name='HLT_e3_etcut_L1EM3', groups=SingleElectronGroup),
+        ChainProp(name='HLT_2e3_etcut_L12EM3', groups=MultiElectronGroup),
+# this chain does not work yet        
+#        ChainProp(name='HLT_e3_etcut_e5_etcut_L12EM3', groups=MultiElectronGroup),
         ChainProp(name='HLT_e5_etcut_L1EM3', groups=SingleElectronGroup),
         ChainProp(name='HLT_e7_etcut_L1EM7', groups=SingleElectronGroup)
     ]
-- 
GitLab


From 8e1415a455990df88394eb19368ef947b6f739be Mon Sep 17 00:00:00 2001
From: Johannes Josef Junggeburth <johannes.josef.junggeburth@CERN.CH>
Date: Mon, 28 Sep 2020 13:01:52 +0200
Subject: [PATCH 043/403] Fix validation jobs

---
 .../InDetExample/InDetRecExample/share/InDetRec_jobOptions.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_jobOptions.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_jobOptions.py
index 291bdee90e0b..f7c2d58b1b9f 100755
--- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_jobOptions.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_jobOptions.py
@@ -1106,12 +1106,10 @@ else:
        DummyCollection = []
        if InDetFlags.doTRTExtension() :
          DummyCollection += [ InDetKeys.ExtendedTracksDisappearing()]
-       else :
-         DummyCollection += [ InDetKeys.ResolvedPixelPrdAssociationTracks()]
        merger_track_summary_tool = TrackingCommon.getInDetTrackSummaryToolSharedHits(namePrefix                 = 'DisappearingSplitProb',
                                                                                      ClusterSplitProbabilityName= DisappearingClusterSplitProbContainer)
        from InDetRecExample.TrackingCommon                        import getInDetPRDtoTrackMapToolGangedPixels
-       assert( TrackingCommon.pixelClusterSplitProbName() == DisappearingClusterSplitProbContainer)
+       #assert( TrackingCommon.pixelClusterSplitProbName() == DisappearingClusterSplitProbContainer)
        TrkTrackCollectionMerger_pix = Trk__TrackCollectionMerger(name                    = "InDetTrackCollectionMerger_pix",
                                                                  TracksLocation          = DummyCollection,
                                                                  OutputTracksLocation    = InDetKeys.DisappearingTracks(),
-- 
GitLab


From d0ecf65b30f3b360f22d6f93dcd01c151374fd00 Mon Sep 17 00:00:00 2001
From: Tomasz Bold <tomasz.bold@gmail.com>
Date: Mon, 28 Sep 2020 13:41:14 +0100
Subject: [PATCH 044/403] Remove GeoModel loading from set of main services

---
 Control/AthenaConfiguration/python/MainServicesConfig.py | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/Control/AthenaConfiguration/python/MainServicesConfig.py b/Control/AthenaConfiguration/python/MainServicesConfig.py
index 0b8a8eba5038..5ae6073308f8 100644
--- a/Control/AthenaConfiguration/python/MainServicesConfig.py
+++ b/Control/AthenaConfiguration/python/MainServicesConfig.py
@@ -77,10 +77,6 @@ def MainServicesCfg(cfgFlags):
     cfg.addService(StoreGateSvc("DetectorStore"))
     cfg.addService(StoreGateSvc("HistoryStore"))
     cfg.addService(StoreGateSvc("ConditionStore"))
-
-    from AtlasGeoModel.GeoModelConfig import GeoModelCfg
-    cfg.merge( GeoModelCfg(cfgFlags) )
-    cfg.addService(CompFactory.DetDescrCnvSvc(), create=True)
     cfg.addService(CompFactory.CoreDumpSvc(), create=True)
 
     cfg.setAppProperty('InitializationLoopCheck',False)
-- 
GitLab


From f31c943ec8f0c3557f465c4b4abec53004cb8662 Mon Sep 17 00:00:00 2001
From: Peter Onyisi <ponyisi@utexas.edu>
Date: Mon, 28 Sep 2020 23:19:46 +0200
Subject: [PATCH 045/403] Speed up offline DQ

---
 .../python/AthMonitorCfgHelper.py             |  2 ++
 .../share/Run3DQTestingDriver.py              | 18 +++++++++++++
 .../GenericMonitoringTool.h                   |  3 +++
 .../src/GenericMonitoringTool.cxx             | 26 ++++++++++++++++++-
 4 files changed, 48 insertions(+), 1 deletion(-)

diff --git a/Control/AthenaMonitoring/python/AthMonitorCfgHelper.py b/Control/AthenaMonitoring/python/AthMonitorCfgHelper.py
index d9ec2bd41db2..1373405ecf52 100644
--- a/Control/AthenaMonitoring/python/AthMonitorCfgHelper.py
+++ b/Control/AthenaMonitoring/python/AthMonitorCfgHelper.py
@@ -132,6 +132,7 @@ class AthMonitorCfgHelper(object):
 
         pathToSet = self.inputFlags.DQ.FileKey+('/%s' % topPath if topPath else '')
         array.broadcast('HistPath',pathToSet)
+        array.broadcast('UseCache',True)
         # in the future, autodetect if we are online or not
         array.broadcast('convention','OFFLINE')
         array.broadcast('defaultDuration',defaultDuration)
@@ -271,6 +272,7 @@ class AthMonitorCfgHelperOld(object):
         # Broadcast member values to each element of the array
         array.broadcast('THistSvc',svcMgr.THistSvc)
         array.broadcast('HistPath',pathToSet)
+        array.broadcast('UseCache',True)
         array.broadcast('convention',conventionName)
         array.broadcast('defaultDuration',defaultDuration)
         alg.GMTools += array.toolList()
diff --git a/Control/AthenaMonitoring/share/Run3DQTestingDriver.py b/Control/AthenaMonitoring/share/Run3DQTestingDriver.py
index fc30f1f78ab8..77215c43db53 100755
--- a/Control/AthenaMonitoring/share/Run3DQTestingDriver.py
+++ b/Control/AthenaMonitoring/share/Run3DQTestingDriver.py
@@ -27,6 +27,10 @@ if __name__=='__main__':
                         help='Maximum number of events to process (alias for --evtMax)')
     parser.add_argument('--printDetailedConfig', action='store_true',
                         help='Print detailed Athena configuration')
+    parser.add_argument('--threads', type=int, default=0,
+                        help='Number of threads/concurrent events')
+    parser.add_argument('--perfmon', action='store_true',
+                        help='Run perfmon')
     args, _ = parser.parse_known_args()
 
     # Setup the Run III behavior
@@ -68,6 +72,10 @@ if __name__=='__main__':
                         ConfigFlags.DQ.Environment)
             log.warning('Will proceed but best guess is this is an error')
 
+    # perfmon
+    if args.perfmon:
+        ConfigFlags.PerfMon.doFullMonMT=True
+
     if args.preExec:
         # bring things into scope
         from AthenaMonitoring.DQConfigFlags import allSteeringFlagsOff
@@ -97,6 +105,16 @@ if __name__=='__main__':
     from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
     cfg = MainServicesCfg(ConfigFlags)
 
+    # add FPE auditor
+    from AthenaConfiguration.ComponentFactory import CompFactory
+    cfg.addService(CompFactory.AuditorSvc(Auditors=[CompFactory.FPEAuditor().getFullJobOptName()]))
+
+    # add perfmon
+    if args.perfmon:
+        from PerfMonComps.PerfMonCompsConfig import PerfMonMTSvcCfg
+        cfg.merge(PerfMonMTSvcCfg(ConfigFlags))
+
+
     if isReadingRaw:
         # attempt to start setting up reco ...
         from CaloRec.CaloRecoConfig import CaloRecoCfg
diff --git a/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/GenericMonitoringTool.h b/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/GenericMonitoringTool.h
index 8deb6504183a..299d28744960 100644
--- a/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/GenericMonitoringTool.h
+++ b/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/GenericMonitoringTool.h
@@ -80,10 +80,13 @@ private:
   Gaudi::Property<std::vector<std::string> > m_histograms { this, "Histograms", {},  "Definitions of histograms"};
   Gaudi::Property<bool> m_explicitBooking { this, "ExplicitBooking", false, "Do not create histograms automatically in initialize but wait until the method book is called." };
   Gaudi::Property<bool> m_failOnEmpty { this, "FailOnEmpty", true, "Fail in initialize() if no histograms defined" };
+  BooleanProperty m_useCache { this, "UseCache", false, "Cache filler lookups" };
 
   std::vector<std::shared_ptr<Monitored::HistogramFiller>> m_fillers; //!< plain list of fillers
   mutable std::mutex m_fillMutex;
   mutable Monitored::HistogramFiller::VariablesPack m_vars ATLAS_THREAD_SAFE;
+  mutable std::map<std::vector<std::string>,std::vector<std::shared_ptr<Monitored::HistogramFiller>>> m_fillerCacheMap ATLAS_THREAD_SAFE;
+  mutable std::vector<std::string> m_key ATLAS_THREAD_SAFE;
 };
 
 /**
diff --git a/Control/AthenaMonitoringKernel/src/GenericMonitoringTool.cxx b/Control/AthenaMonitoringKernel/src/GenericMonitoringTool.cxx
index 3431c7a2138e..74f373f1e7c7 100644
--- a/Control/AthenaMonitoringKernel/src/GenericMonitoringTool.cxx
+++ b/Control/AthenaMonitoringKernel/src/GenericMonitoringTool.cxx
@@ -103,7 +103,26 @@ namespace Monitored {
 
 void GenericMonitoringTool::invokeFillers(const std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>>& monitoredVariables) const {
   std::scoped_lock guard(m_fillMutex);
-  for ( auto filler: m_fillers ) {
+  const std::vector<std::shared_ptr<Monitored::HistogramFiller>>* fillerList{nullptr};
+  bool makeCache = false;
+  std::vector<std::shared_ptr<Monitored::HistogramFiller>> matchedFillerList;
+  m_key.clear();
+  if (m_useCache) {
+    m_key.reserve(monitoredVariables.size());
+    for (const auto& mv : monitoredVariables) {
+      m_key.push_back(mv.get().name());
+    }
+    const auto match = m_fillerCacheMap.find(m_key);
+    if (match != m_fillerCacheMap.end()) {
+      fillerList = &(match->second);
+    } else {
+      fillerList = &m_fillers;
+      makeCache = true;
+    }
+  } else {
+    fillerList = &m_fillers;
+  }
+  for ( auto filler: *fillerList ) {
     m_vars.reset();
     const int fillerCardinality = filler->histogramVariablesNames().size() + (filler->histogramWeightName().empty() ? 0: 1) + (filler->histogramCutMaskName().empty() ? 0 : 1);
 
@@ -112,6 +131,7 @@ void GenericMonitoringTool::invokeFillers(const std::vector<std::reference_wrapp
         if ( var.get().name().compare( filler->histogramVariablesNames()[0] ) == 0 )  {
 	  m_vars.var[0] = &var.get();
           filler->fill( m_vars );
+          if (makeCache) { matchedFillerList.push_back(filler); }
           break;
         }
       }
@@ -141,6 +161,7 @@ void GenericMonitoringTool::invokeFillers(const std::vector<std::reference_wrapp
       }
       if ( matchesCount == fillerCardinality ) {
 	filler->fill( m_vars );
+  if (makeCache) { matchedFillerList.push_back(filler); }
       } else if ( ATH_UNLIKELY( matchesCount != 0 ) ) { // something has matched, but not all, worth informing user
 	bool reasonFound = false;
 	if (ATH_UNLIKELY(!filler->histogramWeightName().empty() && !m_vars.weight)) {
@@ -164,6 +185,9 @@ void GenericMonitoringTool::invokeFillers(const std::vector<std::reference_wrapp
       }
     }
   }
+  if (makeCache) {
+    m_fillerCacheMap[m_key] = matchedFillerList;
+  }
 }
 
 uint32_t GenericMonitoringTool::runNumber() {
-- 
GitLab


From 759145510ddf6a2c819bb7470e85b607d384c6d6 Mon Sep 17 00:00:00 2001
From: Debo <debottam.bakshi.gupta@cern.ch>
Date: Tue, 29 Sep 2020 08:56:24 +0200
Subject: [PATCH 046/403] making combohypo more inclusive

---
 .../TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.cxx     | 4 ++--
 .../TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.h       | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.cxx
index 64aa3528d611..4996af7b514c 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.cxx
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.cxx
@@ -42,10 +42,10 @@ StatusCode TrigEgammaDiphotonDPhiHypoTool::initialize()
 bool TrigEgammaDiphotonDPhiHypoTool::executeAlg(std::vector<LegDecision> &combination) const {
 
 //retrieve the electrons 
-  std::vector<ElementLink<xAOD::EgammaContainer>> selected_photons;
+  std::vector<ElementLink<xAOD::IParticleContainer>> selected_photons;
   for (auto el: combination){
     auto EL= el.second;    
-    auto photonLink = TrigCompositeUtils::findLink<xAOD::EgammaContainer>( *EL, featureString() ).link;
+    auto photonLink = TrigCompositeUtils::findLink<xAOD::IParticleContainer>( *EL, featureString() ).link;
     selected_photons.push_back(photonLink);
   }
   auto photonLink1=selected_photons[0];
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.h
index c3c45cc5998f..3a16342ae085 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.h
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.h
@@ -25,6 +25,7 @@
 #include "xAODTrigEgamma/TrigPhoton.h"
 #include "xAODEgamma/PhotonContainer.h"
 #include "xAODEgamma/EgammaContainer.h"
+#include "xAODBase/IParticleContainer.h"
 
 #include "TrigCompositeUtils/HLTIdentifier.h"
 #include "TrigCompositeUtils/TrigCompositeUtils.h"
-- 
GitLab


From 116b75be6db21edf6d35a52187f94335225fb6a4 Mon Sep 17 00:00:00 2001
From: Sebastien Rettie <srettie@lxplus700.cern.ch>
Date: Tue, 29 Sep 2020 11:22:38 +0200
Subject: [PATCH 047/403] First pass at lwtnn implementation of number network;
 only modularize old function and run a small sanity check.

---
 .../NnClusterizationFactory.h                 |  9 +++
 .../src/NnClusterizationFactory.cxx           | 55 +++++++++++++++++++
 2 files changed, 64 insertions(+)

diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnClusterizationFactory.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnClusterizationFactory.h
index 01039990556a..90ee9b29a9fc 100644
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnClusterizationFactory.h
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnClusterizationFactory.h
@@ -134,6 +134,15 @@ namespace InDet {
     // Handling lwtnn inputs
     typedef std::map<std::string, std::map<std::string, double> > InputMap;
 
+    /* Estimate number of particles for both with and w/o tracks */
+    /* Method 1: using older TTrainedNetworks */
+    std::vector<double> estimateNumberOfParticlesTTN(const TTrainedNetworkCollection &nn_collection,
+                                                     std::vector<double> inputData) const;
+
+    /* Estimate number of particles for both with and w/o tracks */
+    /* Method 2: using lwtnn for more flexible interfacing */
+    //std::vector<double> estimateNumberOfParticlesLWTNN(NnClusterizationFactory::InputMap & input) const;
+
     /* Estimate position for both with and w/o tracks */
     /* Method 1: using older TTrainedNetworks */
     std::vector<Amg::Vector2D> estimatePositionsTTN(
diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx
index 28feb5fa6854..5eef23f8e37d 100644
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx
@@ -302,6 +302,7 @@ namespace InDet {
 
     double tanl=0;
 
+    // Move this to if (m_useTTrainedNetworks) clause when validated
     SG::ReadCondHandle<TTrainedNetworkCollection> nn_collection( m_readKeyWithoutTrack );
     if (!nn_collection.isValid()) {
       std::stringstream msg; msg  << "Failed to get trained network collection with key " << m_readKeyWithoutTrack.key();
@@ -327,6 +328,20 @@ namespace InDet {
                     " (2): " << resultNN_NoTrack[1] <<
                     " (3): " << resultNN_NoTrack[2]);
 
+    std::vector<double> resultNN_NoTrack_sanity = estimateNumberOfParticlesTTN(**nn_collection, inputData);
+
+    std::cout<<"yoyoma_p1_orig,"<<resultNN_NoTrack[0]<<std::endl;
+    std::cout<<"yoyoma_p2_orig,"<<resultNN_NoTrack[1]<<std::endl;
+    std::cout<<"yoyoma_p3_orig,"<<resultNN_NoTrack[2]<<std::endl;
+
+    std::cout<<"yoyoma_p1_sanity,"<<resultNN_NoTrack_sanity[0]<<std::endl;
+    std::cout<<"yoyoma_p2_sanity,"<<resultNN_NoTrack_sanity[1]<<std::endl;
+    std::cout<<"yoyoma_p3_sanity,"<<resultNN_NoTrack_sanity[2]<<std::endl;
+
+    std::cout<<"yoyoma_p1_sanitydiff,"<<resultNN_NoTrack[0] - resultNN_NoTrack_sanity[0]<<std::endl;
+    std::cout<<"yoyoma_p2_sanitydiff,"<<resultNN_NoTrack[1] - resultNN_NoTrack_sanity[1]<<std::endl;
+    std::cout<<"yoyoma_p3_sanitydiff,"<<resultNN_NoTrack[2] - resultNN_NoTrack_sanity[2]<<std::endl;
+
     return resultNN_NoTrack;
   }
 
@@ -337,6 +352,7 @@ namespace InDet {
                                                                          int sizeY) const
   {
 
+    // Move this to if (m_useTTrainedNetworks) clause when validated
     SG::ReadCondHandle<TTrainedNetworkCollection> nn_collection( m_readKeyWithTrack );
     if (!nn_collection.isValid()) {
       std::stringstream msg; msg << "Failed to get trained network collection with key " << m_readKeyWithTrack.key();
@@ -366,9 +382,48 @@ namespace InDet {
 
     ATH_MSG_VERBOSE(" Prob of n. particles (1): " << resultNN[0] << " (2): " << resultNN[1] << " (3): " << resultNN[2]);
 
+    std::vector<double> resultNN_sanity = estimateNumberOfParticlesTTN(**nn_collection, inputData);
+
+    std::cout<<"yoyoma_p1_orig,"<<resultNN[0]<<std::endl;
+    std::cout<<"yoyoma_p2_orig,"<<resultNN[1]<<std::endl;
+    std::cout<<"yoyoma_p3_orig,"<<resultNN[2]<<std::endl;
+
+    std::cout<<"yoyoma_p1_sanity,"<<resultNN_sanity[0]<<std::endl;
+    std::cout<<"yoyoma_p2_sanity,"<<resultNN_sanity[1]<<std::endl;
+    std::cout<<"yoyoma_p3_sanity,"<<resultNN_sanity[2]<<std::endl;
+
+    std::cout<<"yoyoma_p1_sanitydiff,"<<resultNN[0] - resultNN_sanity[0]<<std::endl;
+    std::cout<<"yoyoma_p2_sanitydiff,"<<resultNN[1] - resultNN_sanity[1]<<std::endl;
+    std::cout<<"yoyoma_p3_sanitydiff,"<<resultNN[2] - resultNN_sanity[2]<<std::endl;
+
     return resultNN;
   }
 
+  std::vector<double> NnClusterizationFactory::estimateNumberOfParticlesTTN(const TTrainedNetworkCollection &nn_collection,
+                                                                            std::vector<double> inputData) const
+  {
+    ATH_MSG_DEBUG("Using TTN number network");
+    // dereference unique_ptr<TTrainedNetwork> then call calculateOutput :
+    std::vector<double> resultNN_TTN( ((*(nn_collection.at(m_nParticleNNId))).*m_calculateOutput)(inputData) );  
+    return resultNN_TTN;
+  }
+
+  // std::vector<double> NnClusterizationFactory::estimateNumberOfParticlesLWTNN(NnClusterizationFactory::InputMap & input)
+  // {
+  //   ATH_MSG_DEBUG("Using lwtnn number network");
+  //   // Evaluate the number network once per cluster
+  //   lwt::ValueMap discriminant = m_lwnnNumber->compute(input);
+  //   double num0 = discriminant["output_number0"];
+  //   double num1 = discriminant["output_number1"];
+  //   double num2 = discriminant["output_number2"];
+  //   // Get normalized predictions
+  //   double prob1 = num0/(num0+num1+num2);
+  //   double prob2 = num1/(num0+num1+num2);
+  //   double prob3 = num2/(num0+num1+num2);
+  //   std::vector<double> number_probabilities{prob1, prob2, prob3};
+  //   return number_probabilities;
+  // }
+
   std::vector<Amg::Vector2D> NnClusterizationFactory::estimatePositions(const InDet::PixelCluster& pCluster,
                                                                              Amg::Vector3D & beamSpotPosition,
                                                                              std::vector<Amg::MatrixX> & errors,
-- 
GitLab


From fa12c24b22a03481f12441b13c65b20935d14faf Mon Sep 17 00:00:00 2001
From: Debo <debottam.bakshi.gupta@cern.ch>
Date: Tue, 29 Sep 2020 14:45:53 +0200
Subject: [PATCH 048/403] making DielectronMassHypoTool inclusive

---
 .../TrigEgammaHypo/src/TrigEgammaDielectronMassHypoTool.cxx   | 4 ++--
 .../TrigEgammaHypo/src/TrigEgammaDielectronMassHypoTool.h     | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDielectronMassHypoTool.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDielectronMassHypoTool.cxx
index 136668950ef9..dbe59bbab759 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDielectronMassHypoTool.cxx
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDielectronMassHypoTool.cxx
@@ -48,10 +48,10 @@ StatusCode TrigEgammaDielectronMassHypoTool::initialize()
 bool TrigEgammaDielectronMassHypoTool::executeAlg(std::vector<LegDecision> &combination) const {
 
 //retrieve the electrons 
-  std::vector<ElementLink<xAOD::ElectronContainer>> selected_electrons;
+  std::vector<ElementLink<xAOD::IParticleContainer>> selected_electrons;
   for (auto el: combination){
     auto EL= el.second;    
-    auto electronLink = TrigCompositeUtils::findLink<xAOD::ElectronContainer>( *EL, featureString() ).link;
+    auto electronLink = TrigCompositeUtils::findLink<xAOD::IParticleContainer>( *EL, featureString() ).link;
     selected_electrons.push_back(electronLink);
   }
   auto electronLink1=selected_electrons[0];
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDielectronMassHypoTool.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDielectronMassHypoTool.h
index 424dea96b825..74ef72358963 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDielectronMassHypoTool.h
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDielectronMassHypoTool.h
@@ -29,6 +29,7 @@
 #include "xAODTracking/TrackParticleContainer.h"
 #include "xAODTrigEgamma/TrigElectron.h"
 #include "xAODEgamma/ElectronContainer.h"
+#include "xAODBase/IParticleContainer.h"
 
 #include "TrigCompositeUtils/HLTIdentifier.h"
 #include "TrigCompositeUtils/TrigCompositeUtils.h"
-- 
GitLab


From f42aa971ce9ed95a13dc9a33e936fcbda089bdf9 Mon Sep 17 00:00:00 2001
From: Laura Stephanie Miller <lmiller@lxplus710.cern.ch>
Date: Tue, 29 Sep 2020 16:07:17 +0200
Subject: [PATCH 049/403] Added copyright statement

---
 Reconstruction/eflowRec/CMakeLists.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Reconstruction/eflowRec/CMakeLists.txt b/Reconstruction/eflowRec/CMakeLists.txt
index 00f8bd1a4313..2c73f643b8df 100644
--- a/Reconstruction/eflowRec/CMakeLists.txt
+++ b/Reconstruction/eflowRec/CMakeLists.txt
@@ -1,3 +1,5 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
 ################################################################################
 # Package: eflowRec
 ################################################################################
-- 
GitLab


From b45c0eb12e88686c2cc6c8c47f34743c1149b9bf Mon Sep 17 00:00:00 2001
From: Laura Stephanie Miller <lmiller@lxplus710.cern.ch>
Date: Tue, 29 Sep 2020 16:09:13 +0200
Subject: [PATCH 050/403] Added copyright statement

---
 Reconstruction/eflowRec/src/components/eflowRec_entries.cxx | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Reconstruction/eflowRec/src/components/eflowRec_entries.cxx b/Reconstruction/eflowRec/src/components/eflowRec_entries.cxx
index 8516927133d1..2d0d1d66b28c 100644
--- a/Reconstruction/eflowRec/src/components/eflowRec_entries.cxx
+++ b/Reconstruction/eflowRec/src/components/eflowRec_entries.cxx
@@ -1,3 +1,7 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
 #include "eflowRec/eflowTrackCaloExtensionTool.h"
 #include "eflowRec/eflowTrackCaloDummyExtensionTool.h"
 #include "eflowRec/PFTrackClusterMatchingTool.h"
-- 
GitLab


From 249a335fc52723d51dcb6e3da9ea9a77228bd4bf Mon Sep 17 00:00:00 2001
From: Laura Stephanie Miller <lmiller@lxplus710.cern.ch>
Date: Tue, 29 Sep 2020 16:11:18 +0200
Subject: [PATCH 051/403] Removed locked on FE flag

---
 Reconstruction/eflowRec/share/PFlowMTConfig.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Reconstruction/eflowRec/share/PFlowMTConfig.py b/Reconstruction/eflowRec/share/PFlowMTConfig.py
index 4a90cf8b5554..caed64a890b7 100644
--- a/Reconstruction/eflowRec/share/PFlowMTConfig.py
+++ b/Reconstruction/eflowRec/share/PFlowMTConfig.py
@@ -1,3 +1,5 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
 from eflowRec.eflowRecConf import PFLeptonSelector
 PFLeptonSelector=PFLeptonSelector("PFLeptonSelector")
 topSequence += PFLeptonSelector
@@ -245,7 +247,6 @@ if True == jobproperties.eflowRecFlags.provideShowerSubtractedClusters:
 topSequence += PFONeutralCreatorAlgorithm
 from eflowRec.eflowRecFlags import jobproperties # set reco flags for eFlowRec algorithms
 jobproperties.eflowRecFlags.usePFEGammaPFOAssoc.set_Value_and_Lock(True)
-jobproperties.eflowRecFlags.useFlowElements.set_Value_and_Lock(True)
 
 if jobproperties.eflowRecFlags.usePFEGammaPFOAssoc:
 
-- 
GitLab


From 5c45603497113dc1972634600ac48dc873249d9b Mon Sep 17 00:00:00 2001
From: Laura Stephanie Miller <lmiller@lxplus710.cern.ch>
Date: Tue, 29 Sep 2020 16:14:51 +0200
Subject: [PATCH 052/403] Removed unneeded finalize function and fixed
 WriteDecorKey declaration

---
 .../eflowRec/eflowRec/PFTauFlowElementAssoc.h       |  9 ++++-----
 .../eflowRec/src/PFTauFlowElementAssoc.cxx          | 13 +------------
 2 files changed, 5 insertions(+), 17 deletions(-)

diff --git a/Reconstruction/eflowRec/eflowRec/PFTauFlowElementAssoc.h b/Reconstruction/eflowRec/eflowRec/PFTauFlowElementAssoc.h
index 87071c12883b..28cf78794a07 100644
--- a/Reconstruction/eflowRec/eflowRec/PFTauFlowElementAssoc.h
+++ b/Reconstruction/eflowRec/eflowRec/PFTauFlowElementAssoc.h
@@ -44,7 +44,6 @@ public:
 
   virtual StatusCode initialize();
   virtual StatusCode execute(const EventContext &ctx) const;
-  virtual StatusCode finalize();
 
 private:
 
@@ -55,13 +54,13 @@ private:
   SG::ReadHandleKey<xAOD::FlowElementContainer> m_chargedFEReadHandleKey{this,"JetETMissChargedFlowElementContainer","JetETMissChargedFlowElements","ReadHandleKey for charged FlowElements"};
 
   /** The write key for adding Neutral Flow Element links to the taus */
-  SG::WriteDecorHandleKey<xAOD::TauJetContainer> m_tauNeutralFEWriteDecorKey;
+  SG::WriteDecorHandleKey<xAOD::TauJetContainer> m_tauNeutralFEWriteDecorKey{this,"TauNeutralFEDecorKey","TauJets.neutralFELinks","WriteDecorHandleKey for adding neutral FE links to taus"};
   /** The write key for adding Charged Flow Element links to the taus */
-  SG::WriteDecorHandleKey<xAOD::TauJetContainer> m_tauChargedFEWriteDecorKey;
+  SG::WriteDecorHandleKey<xAOD::TauJetContainer> m_tauChargedFEWriteDecorKey{this,"TauChargedFEDecorKey","TauJets.chargedFELinks","WriteDecorHandleKey for adding charged FE links to taus"};
   /** The write key for adding tau element links to the Neutral Flow Elements */
-  SG::WriteDecorHandleKey<xAOD::FlowElementContainer> m_neutralFETauWriteDecorKey;
+  SG::WriteDecorHandleKey<xAOD::FlowElementContainer> m_neutralFETauWriteDecorKey{this,"NeutralFETauDecorKey","JetETMissNeutralFlowElements.FE_TauLinks","WriteDecorHandleKey for adding tau links to neutral FEs"};
   /** The write key for adding tau element links to the Charged Flow Elements */
-  SG::WriteDecorHandleKey<xAOD::FlowElementContainer> m_chargedFETauWriteDecorKey;
+  SG::WriteDecorHandleKey<xAOD::FlowElementContainer> m_chargedFETauWriteDecorKey{this,"ChargedFETauDecorKey","JetETMissChargedFlowElements.FE_TauLinks","WriteDecorHandleKey for adding tau links to charged FEs"};
 
 };
 
diff --git a/Reconstruction/eflowRec/src/PFTauFlowElementAssoc.cxx b/Reconstruction/eflowRec/src/PFTauFlowElementAssoc.cxx
index a8e46cd64853..cdd60bc234de 100644
--- a/Reconstruction/eflowRec/src/PFTauFlowElementAssoc.cxx
+++ b/Reconstruction/eflowRec/src/PFTauFlowElementAssoc.cxx
@@ -13,14 +13,7 @@ typedef ElementLink<xAOD::FlowElementContainer> FELink_t;
 
 PFTauFlowElementAssoc::PFTauFlowElementAssoc(const std::string& name,
               ISvcLocator* pSvcLocator): AthReentrantAlgorithm(name, pSvcLocator)
-{
-  // Declare the decoration keys
-  declareProperty ("TauNeutralFEDecorKey", m_tauNeutralFEWriteDecorKey = "TauJets.neutralFELinks");
-  declareProperty ("TauChargedFEDecorKey", m_tauChargedFEWriteDecorKey = "TauJets.chargedFELinks");
-
-  declareProperty ("NeutralFETauDecorKey", m_neutralFETauWriteDecorKey = "JetETMissNeutralFlowElements.FE_TauLinks");
-  declareProperty ("ChargedFETauDecorKey", m_chargedFETauWriteDecorKey = "JetETMissChargedFlowElements.FE_TauLinks");
-}
+{}
 
 PFTauFlowElementAssoc::~PFTauFlowElementAssoc() {}
 
@@ -42,10 +35,6 @@ StatusCode PFTauFlowElementAssoc::initialize() {
   return StatusCode::SUCCESS;
 }
 
-StatusCode PFTauFlowElementAssoc::finalize() {
-  return StatusCode::SUCCESS;
-}
-
 /**
   This algorithm:
   1) Accesses the relevant FlowElement and TauJet containers
-- 
GitLab


From 881d73b2f95cdfd7024c4c332f8a92d16e082774 Mon Sep 17 00:00:00 2001
From: Ruggero Turra <ruggero.turra@cern.ch>
Date: Tue, 29 Sep 2020 19:06:28 +0200
Subject: [PATCH 053/403] EMBremCollectionBuilder reentrant

---
 .../egammaAlgs/src/EMBremCollectionBuilder.cxx       |  4 ++--
 .../egamma/egammaAlgs/src/EMBremCollectionBuilder.h  | 12 +++---------
 2 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.cxx b/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.cxx
index fedb6bc04bac..bd9cc982d7d6 100644
--- a/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.cxx
+++ b/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.cxx
@@ -32,7 +32,7 @@
 
 EMBremCollectionBuilder::EMBremCollectionBuilder(const std::string& name,
                                                  ISvcLocator* pSvcLocator)
-  : AthAlgorithm(name, pSvcLocator)
+  : AthReentrantAlgorithm(name, pSvcLocator)
 {
 }
 
@@ -66,7 +66,7 @@ StatusCode EMBremCollectionBuilder::EMBremCollectionBuilder::finalize(){
 }
 
 StatusCode
-EMBremCollectionBuilder::execute_r(const EventContext& ctx) const
+EMBremCollectionBuilder::execute(const EventContext& ctx) const
 {
   /*
    * Read in the input
diff --git a/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.h b/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.h
index 8dbb3cf1a1f1..8c2bd549be06 100644
--- a/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.h
+++ b/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.h
@@ -16,7 +16,7 @@
 #include "TrkToolInterfaces/ITrackSlimmingTool.h"
 #include "TrkToolInterfaces/ITrackSummaryTool.h"
 
-#include "AthenaBaseComps/AthAlgorithm.h"
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/EventContext.h"
 #include "StoreGate/ReadHandleKey.h"
@@ -30,7 +30,7 @@
 #include "InDetReadoutGeometry/SiDetectorElementCollection.h"
 
 #include <memory>
-class EMBremCollectionBuilder : public AthAlgorithm 
+class EMBremCollectionBuilder : public AthReentrantAlgorithm 
 {
 
 public:
@@ -39,13 +39,7 @@ public:
 
   virtual StatusCode initialize() override final;
   virtual StatusCode finalize() override final;
-  virtual StatusCode execute() override final
-  {
-    return execute_r(Algorithm::getContext());
-  }
-  // This will become the normal execute when
-  // inheriting from AthReentrantAlgorithm
-  StatusCode execute_r(const EventContext& ctx) const;
+  virtual StatusCode execute(const EventContext& ctx) const override final;
 
 
   struct TrackWithIndex
-- 
GitLab


From 540c9c79ce6280c6bb115f6cad9ad4ae1f13cc10 Mon Sep 17 00:00:00 2001
From: Stephen Nicholas Swatman <stephen.nicholas.swatman@cern.ch>
Date: Wed, 2 Sep 2020 16:51:06 +0200
Subject: [PATCH 054/403] Add flag to enable hole search in GX2 fitter

This commit adds a configurable parameter to the TrkGlobalChi2Fitter
which enables it to do a hole search and export that information via a
track summary. It's disabled by default, and it doesn't actually do
anything yet. Actual hole search logic will be added later.
---
 .../TrkGlobalChi2Fitter/GlobalChi2Fitter.h            |  1 +
 .../TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx      | 11 +++++++++++
 2 files changed, 12 insertions(+)

diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h
index 50928716eec8..5f445069621d 100755
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h
@@ -791,6 +791,7 @@ namespace Trk {
     Gaudi::Property<bool> m_useCaloTG {this, "UseCaloTG", false};
     Gaudi::Property<bool> m_rejectLargeNScat {this, "RejectLargeNScat", false};
     Gaudi::Property<bool> m_createSummary {this, "CreateTrackSummary", true};
+    Gaudi::Property<bool> m_holeSearch {this, "DoHoleSearch", false};
 
     Gaudi::Property<double> m_outlcut {this, "OutlierCut", 5.0};
     Gaudi::Property<double> m_p {this, "Momentum", 0.0};
diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
index d85eb877e0d5..cfefe36a3399 100644
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
@@ -209,6 +209,17 @@ namespace Trk {
       m_caloMaterialProvider.disable();
     }
 
+    /*
+     * Doing a hole search only makes sense if we are also creating a track
+     * summary, because the track summary is the only way for us to export the
+     * hole search information out of the fitter. For this reason, we disable
+     * the hole search in the case that track summaries are disabled.
+     */
+    if (m_holeSearch.value() && !m_createSummary.value()) {
+      ATH_MSG_WARNING("Hole search requested but track summaries disabled, disabling hole search.");
+      m_holeSearch.set(false);
+    }
+
     ATH_MSG_INFO("fixed momentum: " << m_p);
 
     return StatusCode::SUCCESS;
-- 
GitLab


From df9b4227a8c64386f802cb4f8bf39dd34fb82ea0 Mon Sep 17 00:00:00 2001
From: Stephen Nicholas Swatman <stephen.nicholas.swatman@cern.ch>
Date: Tue, 29 Sep 2020 14:41:44 +0200
Subject: [PATCH 055/403] Add InDetReadoutGeometry as a GX2F dependency

For future changes, we will need to access header files defined in the
InDetReadoutGeometry to implement hole search. This commit adds the
dependency on that package to the CMake file of the TrkGlobalChi2Fitter.
---
 Tracking/TrkFitter/TrkGlobalChi2Fitter/CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/CMakeLists.txt b/Tracking/TrkFitter/TrkGlobalChi2Fitter/CMakeLists.txt
index 7e4cdf5c7b0b..7e4df7878139 100644
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/CMakeLists.txt
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/CMakeLists.txt
@@ -37,6 +37,7 @@ atlas_add_library(
     TrkToolInterfaces
     MagFieldElements
     MagFieldConditions
+    InDetReadoutGeometry
 )
 
 # Component(s) in the package:
-- 
GitLab


From c1cea7de6ab6e2c52c0df3b21b25827f8b84f549 Mon Sep 17 00:00:00 2001
From: Stephen Nicholas Swatman <stephen.nicholas.swatman@cern.ch>
Date: Tue, 29 Sep 2020 14:43:17 +0200
Subject: [PATCH 056/403] Add getter for GXFTrajectory track states

Previously, this class had no getter to access the track states stored
within. That's a little bit weird, because it is something we access a
lot. This commit adds that getter.
---
 .../TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GXFTrajectory.h   | 1 +
 Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GXFTrajectory.cxx  | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GXFTrajectory.h b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GXFTrajectory.h
index 2983f85ff095..cc6439560e59 100644
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GXFTrajectory.h
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GXFTrajectory.h
@@ -71,6 +71,7 @@ namespace Trk {
     int numberOfPseudoMeasurements();
     int numberOfOutliers();
 
+    const std::vector<std::unique_ptr<GXFTrackState>> & trackStates() const;
     std::vector<std::unique_ptr<GXFTrackState>> & trackStates();
     std::vector < std::pair < double, double >>&scatteringAngles();
     std::vector < std::pair < double, double >>&scatteringSigmas();
diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GXFTrajectory.cxx b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GXFTrajectory.cxx
index fb7139514cb9..dbbc23c960ba 100644
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GXFTrajectory.cxx
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GXFTrajectory.cxx
@@ -558,6 +558,10 @@ namespace Trk {
     }
   }
 
+  const std::vector<std::unique_ptr<GXFTrackState>> & GXFTrajectory::trackStates() const {
+    return m_states;
+  }
+
   std::vector<std::unique_ptr<GXFTrackState>> & GXFTrajectory::trackStates() {
     return m_states;
   }
-- 
GitLab


From 759cdff9721a8b33cfaa978a8a62d19b970e7a0a Mon Sep 17 00:00:00 2001
From: Stephen Nicholas Swatman <stephen.nicholas.swatman@cern.ch>
Date: Tue, 29 Sep 2020 14:51:24 +0200
Subject: [PATCH 057/403] Make track parameters getter const

There is really no reason for this getter method to not be const. The
returned pointer is to a const value, and the non-const qualification
makes it impossible to use this extremely useful getter in non-const
contexts.
---
 .../TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GXFTrackState.h   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GXFTrackState.h b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GXFTrackState.h
index b70dec6a6089..89e53815c467 100755
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GXFTrackState.h
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GXFTrackState.h
@@ -47,7 +47,7 @@ namespace Trk {
     const MeasurementBase *measurement(void);
 
     void setTrackParameters(std::unique_ptr<const TrackParameters>);
-    const TrackParameters *trackParameters(void);
+    const TrackParameters *trackParameters(void) const;
     
     GXFMaterialEffects *materialEffects();
     const Surface *surface() const;
@@ -150,7 +150,7 @@ namespace Trk {
     return m_covariancematrix;
   }
 
-  inline const TrackParameters *GXFTrackState::trackParameters(void) {
+  inline const TrackParameters *GXFTrackState::trackParameters(void) const {
     return m_trackpar.get();
   }
 
-- 
GitLab


From 14f703dac8c75bab4c5ee11681a272807e08061f Mon Sep 17 00:00:00 2001
From: Stephen Nicholas Swatman <stephen.nicholas.swatman@cern.ch>
Date: Tue, 29 Sep 2020 14:52:55 +0200
Subject: [PATCH 058/403] Add hole storage logic to GX2F track state

In the future, we will want to store hole search information in the
GlobalChi2Fitter's internal representation of a track state. This commit
adds the necessary data members as well as getters and setters to make
that possible.
---
 .../TrkGlobalChi2Fitter/GXFTrackState.h                   | 5 ++++-
 .../TrkFitter/TrkGlobalChi2Fitter/src/GXFTrackState.cxx   | 8 ++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GXFTrackState.h b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GXFTrackState.h
index 89e53815c467..581eb4a25610 100755
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GXFTrackState.h
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GXFTrackState.h
@@ -114,6 +114,9 @@ namespace Trk {
      */
     bool getStateType(TrackStateOnSurface::TrackStateOnSurfaceType type) const;
 
+    std::optional<std::vector<std::unique_ptr<const TrackParameters>>> & getHoles(void);
+    void setHoles(std::vector<std::unique_ptr<const TrackParameters>> &&);
+
   private:
     std::unique_ptr<const MeasurementBase> m_measurement;       //!< The measurement defining the track state
     std::bitset<TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> m_tsType;      //!< type of track state, eg Fittable, Outlier, Scatterer, Brem, Hole
@@ -132,7 +135,7 @@ namespace Trk {
     bool m_recalib;             //!< Has this measurement already been recalibrated?
     bool m_measphi;
     Amg::Vector3D m_globpos;
-    std::optional<std::vector<const TrackParameters *>> m_preholes;
+    std::optional<std::vector<std::unique_ptr<const TrackParameters>>> m_holes;
 
   public:
     EIGEN_MAKE_ALIGNED_OPERATOR_NEW
diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GXFTrackState.cxx b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GXFTrackState.cxx
index 4350cb6cb3fb..973b803de05d 100644
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GXFTrackState.cxx
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GXFTrackState.cxx
@@ -249,4 +249,12 @@ namespace Trk {
   bool GXFTrackState::getStateType(TrackStateOnSurface::TrackStateOnSurfaceType t) const {
     return m_tsType.test(t);
   }
+
+  std::optional<std::vector<std::unique_ptr<const TrackParameters>>> & GXFTrackState::getHoles(void) {
+    return m_holes;
+  }
+
+  void GXFTrackState::setHoles(std::vector<std::unique_ptr<const TrackParameters>> && v) {
+    m_holes = std::move(v);
+  }
 }
-- 
GitLab


From e1780fa1899284bd13aa8c73dee3953301bfe402 Mon Sep 17 00:00:00 2001
From: Stephen Nicholas Swatman <stephen.nicholas.swatman@cern.ch>
Date: Tue, 29 Sep 2020 15:15:33 +0200
Subject: [PATCH 059/403] Add extrapolation helper for hole search

In order to do our hole search, we will need to do a slightly modified
version of the stepwise extrapolation provided by the extrapolator
interface. This commit adds a helper method to the TrkGlobalChi2Fitter
that provides this functionality.
---
 .../TrkGlobalChi2Fitter/GlobalChi2Fitter.h    | 21 +++++++
 .../src/GlobalChi2Fitter.cxx                  | 59 +++++++++++++++++++
 2 files changed, 80 insertions(+)

diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h
index 5f445069621d..fd0f55474c58 100755
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h
@@ -531,6 +531,27 @@ namespace Trk {
       ParticleHypothesis
     ) const;
 
+    /**
+     * @brief Helper method which performs an extrapolation with additional
+     * logic for hole search.
+     *
+     * This method is a wrapper around extrapolateStepwise from the
+     * extrapolator interface, with the added functionality that it will null
+     * any returned track parameters which are on the start and end surface.
+     *
+     * @param[in] ctx An event context for extrapolation.
+     * @param[in] src The track parameters to start extrapolating from.
+     * @param[in] dst The track state to extrapolate to.
+     * @param[in] propdir The propagation direction.
+     * @return A vector of track states, just like normal extrapolation.
+     */
+    std::vector<std::unique_ptr<const TrackParameters>> holesearchExtrapolation(
+      const EventContext & ctx,
+      const TrackParameters & src,
+      const GXFTrackState & dst,
+      PropDirection propdir
+    ) const;
+
     std::unique_ptr<const TrackParameters> makePerigee(
       Cache &,
       const TrackParameters &,
diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
index cfefe36a3399..6531af6c9629 100644
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
@@ -139,6 +139,14 @@ namespace {
       return nullptr;
     }
   }
+
+  bool trackParametersClose(const Trk::TrackParameters & a, const Trk::TrackParameters & b, double e) {
+    return (
+      std::abs(a.parameters()[0] - b.parameters()[0]) < e &&
+      std::abs(a.parameters()[1] - b.parameters()[1]) < e &&
+      std::abs(a.parameters()[2] - b.parameters()[2]) < e
+    );
+  }
 }
 
 namespace Trk {
@@ -7220,6 +7228,57 @@ namespace Trk {
   GlobalChi2Fitter::~GlobalChi2Fitter() {
   }
 
+  std::vector<std::unique_ptr<const TrackParameters>> GlobalChi2Fitter::holesearchExtrapolation(
+    const EventContext & ctx,
+    const TrackParameters & src,
+    const GXFTrackState & dst,
+    PropDirection propdir
+  ) const {
+    /*
+     * First, we conduct a bog standard stepwise extrapolation. This will
+     * yield some unwanted results, but we will filter those later.
+     */
+    std::vector<std::unique_ptr<const TrackParameters>> rv = m_extrapolator->extrapolateStepwise(
+      ctx, src, *dst.surface(), propdir, false
+    );
+
+    /*
+     * It is possible for the first returned track parameter to be on the same
+     * surface as we started on. That's probably due to some rounding errors.
+     * We check for this possibility, and set the pointer to null if it
+     * occurs. Note that this leaves some null pointers in the returned vector
+     * but this is more performant compared to removing them properly.
+     */
+    if (
+      rv.size() > 0 && (
+        &rv.front()->associatedSurface() == dst.surface() ||
+        &rv.front()->associatedSurface() == &src.associatedSurface() ||
+        trackParametersClose(*rv.front(), src, 0.001) ||
+        trackParametersClose(*rv.front(), *dst.trackParameters(), 0.001)
+      )
+    ) {
+      rv.front().reset(nullptr);
+    }
+
+    /*
+     * Same logic, but for the last returned element. In that case, we get a
+     * set of parameters on the destination surface, which we also do not
+     * want.
+     */
+    if (
+      rv.size() > 1 && (
+        &rv.back()->associatedSurface() == dst.surface() ||
+        &rv.back()->associatedSurface() == &src.associatedSurface() ||
+        trackParametersClose(*rv.back(), src, 0.001) ||
+        trackParametersClose(*rv.back(), *dst.trackParameters(), 0.001)
+      )
+    ) {
+      rv.back().reset(nullptr);
+    }
+
+    return rv;
+  }
+
   GlobalChi2Fitter::PropagationResult GlobalChi2Fitter::calculateTrackParametersPropagateHelper(
     const EventContext & ctx,
     const TrackParameters & prev,
-- 
GitLab


From 925a46e92fd6afdb30bbeb0b48ade23fee48da3b Mon Sep 17 00:00:00 2001
From: Stephen Nicholas Swatman <stephen.nicholas.swatman@cern.ch>
Date: Tue, 29 Sep 2020 15:20:29 +0200
Subject: [PATCH 060/403] Enhance propagation helper with extrapolation

This commit adds a boolean flag to our existing propagation helper used
in the global \chi^2 fitter that enables it to also do an extrapolation,
gathering not only the position where the propagation lands but also a
set of surfaces crossed in between.
---
 .../TrkGlobalChi2Fitter/GlobalChi2Fitter.h    |  3 +++
 .../src/GlobalChi2Fitter.cxx                  | 24 +++++++++++++------
 2 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h
index fd0f55474c58..2742c7728242 100755
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h
@@ -662,6 +662,7 @@ namespace Trk {
       const GXFTrackState &,
       PropDirection,
       MagneticFieldProperties,
+      bool,
       bool
     ) const;
 
@@ -692,6 +693,7 @@ namespace Trk {
      * @param[in] propdir The propagation direction.
      * @param[in] bf The magnetic field properties.
      * @param[in] calcderiv If set, calculate the derivative.
+     * @param[in] holesearch If set, search for holes.
      *
      * @return An instance of PropagationResult, which is a struct with three
      * members. Firstly, it contains a unique pointer to a set of track
@@ -710,6 +712,7 @@ namespace Trk {
       const GXFTrackState &,
       PropDirection,
       MagneticFieldProperties,
+      bool,
       bool
     ) const;
 
diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
index 6531af6c9629..35e79bb8ffe6 100644
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
@@ -7285,7 +7285,8 @@ namespace Trk {
     const GXFTrackState & ts,
     PropDirection propdir,
     MagneticFieldProperties bf,
-    bool calcderiv
+    bool calcderiv,
+    bool holesearch
   ) const {
     std::unique_ptr<const TrackParameters> rv;
     TransportJacobian * jac = nullptr;
@@ -7308,10 +7309,16 @@ namespace Trk {
       }
     }
 
+    std::optional<std::vector<std::unique_ptr<const TrackParameters>>> extrapolation;
+
+    if (holesearch) {
+      extrapolation = holesearchExtrapolation(ctx, prev, ts, propdir);
+    }
+
     return PropagationResult {
       std::move(rv),
       std::unique_ptr<TransportJacobian>(jac),
-      {}
+      std::move(extrapolation)
     };
   }
 
@@ -7321,19 +7328,20 @@ namespace Trk {
     const GXFTrackState & ts,
     PropDirection propdir,
     MagneticFieldProperties bf,
-    bool calcderiv
+    bool calcderiv,
+    bool holesearch
   ) const {
     PropagationResult rv;
 
     rv = calculateTrackParametersPropagateHelper(
-      ctx, prev, ts, propdir, bf, calcderiv
+      ctx, prev, ts, propdir, bf, calcderiv, holesearch
     );
 
     if (rv.m_parameters == nullptr) {
       propdir = invertPropdir(propdir);
 
       rv = calculateTrackParametersPropagateHelper(
-        ctx, prev, ts, propdir, bf, calcderiv
+        ctx, prev, ts, propdir, bf, calcderiv, holesearch
       );
     }
 
@@ -7377,7 +7385,8 @@ namespace Trk {
         *states[hitno],
         propdir,
         trajectory.m_fieldprop,
-        calcderiv
+        calcderiv,
+        false
       );
 
       if (
@@ -7457,7 +7466,8 @@ namespace Trk {
         *states[hitno],
         propdir,
         trajectory.m_fieldprop,
-        calcderiv
+        calcderiv,
+        false
       );
 
       if (
-- 
GitLab


From 0fc7970272126800be8bc8a93b5a3a29c8f4c7f8 Mon Sep 17 00:00:00 2001
From: Stephen Nicholas Swatman <stephen.nicholas.swatman@cern.ch>
Date: Tue, 29 Sep 2020 16:37:10 +0200
Subject: [PATCH 061/403] Add hole search logic to the GlobalChi2Fitter

This commit adds the necessary logic to do hole search to the
GlobalChi2Fitter. The implementation is very close in output to the
InDetTrackHoleSearch, and may even improve on its quality slightly. The
hole search, if enabled, adds some CPU time to the fitting process but
this is negated by reduced CPU time later on in the algorithm chain. The
hole search data is carried out of the fitter through a track summary
object attached to the track. This functionality is disabled by default
to preserve exact bit-to-bit equality of the output, but can be enabled
using the DoHoleSearch flag. The rest of Athena should by now be
configured to accept this and work around it without performing
unnecessary additional hole searches.
---
 .../TrkGlobalChi2Fitter/GlobalChi2Fitter.h    | 110 ++++++
 .../src/GlobalChi2Fitter.cxx                  | 370 +++++++++++++++++-
 2 files changed, 479 insertions(+), 1 deletion(-)

diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h
index 2742c7728242..0ad04e70aab5 100755
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h
@@ -17,6 +17,7 @@
 #include "TrkToolInterfaces/IResidualPullCalculator.h"
 #include "TrkToolInterfaces/IRIO_OnTrackCreator.h"
 #include "TrkToolInterfaces/IUpdator.h"
+#include "TrkToolInterfaces/IBoundaryCheckTool.h"
 
 #include "TrkExInterfaces/IExtrapolator.h"
 #include "TrkExInterfaces/IPropagator.h"
@@ -157,6 +158,19 @@ namespace Trk {
       std::optional<std::vector<std::unique_ptr<const TrackParameters>>> m_preholes;
     };
 
+    /*
+     * This struct serves as a very simple container for the five different
+     * hole and dead module states that we want to count, which are the dead
+     * Pixels, dead SCTs, Pixel holes, SCT holes, and SCT double holes.
+     */
+    struct TrackHoleCount {
+      unsigned int m_pixel_hole = 0;
+      unsigned int m_sct_hole = 0;
+      unsigned int m_sct_double_hole = 0;
+      unsigned int m_pixel_dead = 0;
+      unsigned int m_sct_dead = 0;
+    };
+
     struct Cache {
       /*
        * Currently the information about what type of fit is being passed by the
@@ -716,6 +730,94 @@ namespace Trk {
       bool
     ) const;
 
+    /**
+     * @brief Extracts a collection of track states which are important for
+     * hole search.
+     *
+     * This method helps extract the measurement (and outlier) states from a
+     * track. These are the states between which we want to do a hole search,
+     * so the result of calling this method can be used as a source of truth
+     * for conducting a hole search on the track.
+     *
+     * This method only returns states between the first and last measurements
+     * on the track, which is the region in which we are interested in doing a
+     * hole search.
+     *
+     * As an example, if we denote scatterers as S, and measurements as M, this
+     * method would reduce the following track with numbered states:
+     *
+     * 1 2 3 4 5 6 7 8 9
+     * M S S M M S M S S
+     *
+     * Into a list of references [1, 4, 5, 7].
+     *
+     * This method ensures that each pair of consecutive states in the return
+     * value list is a target for a hole search extrapolation.
+     *
+     * @param[in] trajectory The trajectory from which to extract states.
+     * @return A vector of state references as described above.
+     */
+    std::vector<std::reference_wrapper<GXFTrackState>> holeSearchStates(
+      GXFTrajectory & trajectory
+    ) const;
+
+    /**
+     * @brief Conduct a hole search between a list of states, possibly reusing
+     * existing information.
+     *
+     * Given a collection of state references, this method will conduct a hole
+     * search between consecutive pairs of states, possibly reusing existing
+     * information stored in the state data types. The method will check
+     * whether the state contains any previous hole search data and use it. If
+     * there is no data, it will run additional extrapolations to gather that
+     * data. It will then use a helper method to count holes and dead modules
+     * and return a total count.
+     *
+     * In some cases, this method may error. Should this occur, it will return
+     * a non-extant value.
+     *
+     * @param[in] ctx An event context used for extrapolation.
+     * @param[in] states A list of states to operate on, using consecutive
+     * states as extrapolation regions.
+     * @return A list of hole counts if the process succeeded, or a non-extant
+     * value in case of an error.
+     */
+    std::optional<GlobalChi2Fitter::TrackHoleCount> holeSearchProcess(
+      const EventContext & ctx,
+      const std::vector<std::reference_wrapper<GXFTrackState>> & states
+    ) const;
+
+    /**
+     * @brief Helper method for the hole search that does the actual counting
+     * of holes and dead modules.
+     *
+     * This is a helper function that does a lot of esoteric and weird things
+     * that you most likely won't need to know about. The gist of it is that
+     * you pass it a vector of track parameters and a counting object, and it
+     * will update those counters according to its analysis of the track
+     * parameters.
+     *
+     * Unfortunately, due to the design of this method, it requires quite a lot
+     * of persistent state between invocations for the same track. That's bad
+     * design of course, but it is how it is for now. This means that there
+     * are quite a few state parameters.
+     *
+     * @param[in] hc A list of candidate hole track parameters to analyse.
+     * @param[in,out] id_set A set of identifiers found to be holes or dead.
+     * @param[in,out] sct_set A set of identifiers of SCT holes.
+     * @param[in,out] rv The hole count container to update.
+     * @param[in] count_holes Holes are counted only if this is enabled.
+     * @param[in] count_dead Dead modules are counted only if this is enabled.
+     */
+    void holeSearchHelper(
+      const std::vector<std::unique_ptr<const TrackParameters>> & hc,
+      std::set<Identifier> & id_set,
+      std::set<Identifier> & sct_set,
+      TrackHoleCount & rv,
+      bool count_holes,
+      bool count_dead
+    ) const;
+
     FitterStatusCode calculateTrackParameters(
       const EventContext& ctx,
       GXFTrajectory&,
@@ -780,6 +882,7 @@ namespace Trk {
     ToolHandle<Trk::ITrkMaterialProviderTool> m_caloMaterialProvider {this, "CaloMaterialProvider", "Trk::TrkMaterialProviderTool/TrkMaterialProviderTool", ""};
     ToolHandle<IMaterialEffectsOnTrackProvider> m_calotool {this, "MuidTool", "Rec::MuidMaterialEffectsOnTrackProvider/MuidMaterialEffectsOnTrackProvider", ""};
     ToolHandle<IMaterialEffectsOnTrackProvider> m_calotoolparam {this, "MuidToolParam", "", ""};
+    ToolHandle<IBoundaryCheckTool> m_boundaryCheckTool {this, "BoundaryCheckTool", "InDet::InDetBoundaryCheckTool", "Boundary checking tool for detector sensitivities" };
 
     ServiceHandle<ITrackingGeometrySvc> m_trackingGeometrySvc;
 
@@ -829,6 +932,13 @@ namespace Trk {
 
     ParticleMasses m_particleMasses;
 
+    /*
+     * This little volume defines the inner detector. Its exact size is set at
+     * the time that the fitter object is created. We just make one and keep
+     * it around to save us a few allocations.
+     */
+    Trk::Volume m_idVolume;
+
     /*
      * The following members are mutable. They keep track of the number of
      * fits that have returned with a certain status. Since this must be
diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
index 35e79bb8ffe6..96c3fb03cfb7 100644
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
@@ -23,6 +23,9 @@
 #include "TrkGeometry/TrackingVolume.h"
 #include "TrkGeometry/TrackingGeometry.h"
 
+#include "TrkVolumes/Volume.h"
+#include "TrkVolumes/CylinderVolumeBounds.h"
+
 #include "TrkExUtils/TransportJacobian.h"
 
 #include "TrkMaterialOnTrack/EnergyLoss.h"
@@ -48,6 +51,8 @@
 #include "MagFieldConditions/AtlasFieldCacheCondObj.h"
 #include "MagFieldElements/AtlasFieldCache.h"
 
+#include "InDetReadoutGeometry/SiDetectorElement.h"
+
 #include "CLHEP/Matrix/Matrix.h"
 #include "CLHEP/Matrix/SymMatrix.h"
 #include "CLHEP/Matrix/Vector.h"
@@ -156,7 +161,8 @@ namespace Trk {
     const IInterface * p
   ):
     base_class(t, n, p),
-    m_trackingGeometrySvc("", n)
+    m_trackingGeometrySvc("", n),
+    m_idVolume(nullptr, std::make_unique<Trk::CylinderVolumeBounds>(560, 2750).release())
   {
     declareProperty("TrackingGeometrySvc", m_trackingGeometrySvc);
   }
@@ -7149,6 +7155,322 @@ namespace Trk {
     return std::make_unique<GXFTrackState>(std::move(per), TrackStateOnSurface::Perigee);
   }
 
+  void GlobalChi2Fitter::holeSearchHelper(
+    const std::vector<std::unique_ptr<const TrackParameters>> & hc,
+    std::set<Identifier> & id_set,
+    std::set<Identifier> & sct_set,
+    TrackHoleCount & rv,
+    bool count_holes,
+    bool count_dead
+  ) const {
+    /*
+     * Our input is a list of track states, which we are iterating over. We
+     * need to examine each one and update the values in our track hole count
+     * accordingly.
+     */
+    for (const std::unique_ptr<const TrackParameters> & tp : hc) {
+      /*
+       * It is possible, expected even, for some of these pointers to be null.
+       * In those cases, it would be dangerous to continue, so we need to make
+       * sure we skip them.
+       */
+      if (tp == nullptr) {
+        continue;
+      }
+
+      /*
+       * Extract the detector element of the track parameter surface for
+       * examination. If for whatever reason there is none (i.e. the surface
+       * is not a detector at all), we can skip it and continue.
+       */
+      const TrkDetElementBase * de = tp->associatedSurface().associatedDetectorElement();
+
+      if (de == nullptr) {
+        continue;
+      }
+
+      Identifier id = de->identify();
+
+      /*
+       * If, for whatever reason, we have already visited this detector, we do
+       * not want to visit it again. Otherwise we might end up with modules
+       * counted twice, and that would be very bad.
+       */
+      if (id_set.find(id) != id_set.end()) {
+        continue;
+      }
+
+      /*
+       * This is the meat of the pudding, we use the boundary checking tool
+       * to see whether this set of parameters is a hole candidate, a dead
+       * module, or not a hole at all.
+       */
+      BoundaryCheckResult bc = m_boundaryCheckTool->boundaryCheck(*tp);
+
+      if (bc == BoundaryCheckResult::DeadElement && count_dead) {
+        /*
+         * If the module is dead, our job is very simple. We just check
+         * whether it is a Pixel or an SCT and increment the appropriate
+         * counter. We also insert the module into our set of visited elements.
+         */
+        if (m_DetID->is_pixel(id)) {
+          ++rv.m_pixel_dead;
+        } else if (m_DetID->is_sct(id)) {
+          ++rv.m_sct_dead;
+        }
+        id_set.insert(id);
+      } else if (bc == BoundaryCheckResult::Candidate && count_holes) {
+        /*
+         * If the module is a candidate, it's much the same, but we also need
+         * to handle double SCT holes.
+         */
+        if (m_DetID->is_pixel(id)) {
+          ++rv.m_pixel_hole;
+        } else if (m_DetID->is_sct(id)) {
+          ++rv.m_sct_hole;
+
+          /*
+           * To check for SCT double holes, we need to first fetch the other
+           * side of the current SCT. Thankfully, the detector description
+           * makes this very easy.
+           */
+          const InDetDD::SiDetectorElement* e = dynamic_cast<const InDetDD::SiDetectorElement *>(de);
+          const Identifier os = e->otherSide()->identify();
+
+          /*
+           * We keep a special set containing only SCT hole IDs. We simply
+           * check whether the ID of the other side of the SCT is in this set
+           * to confirm that we have a double hole. Note that the first side
+           * in a double hole will be counted as a SCT hole only, and the
+           * second side will count as another hole as well as a double hole,
+           * which is exactly the behaviour we would expect to see.
+           */
+          if (sct_set.find(os) != sct_set.end()) {
+            ++rv.m_sct_double_hole;
+          }
+
+          /*
+           * We need to add our SCT to the SCT identifier set if it is a
+           * candidate hit, otherwise known as a hole in this context.
+           */
+          sct_set.insert(id);
+        }
+
+        /*
+         * SCTs are also added to the set of all identifiers to avoid double
+         * counting them.
+         */
+        id_set.insert(id);
+      }
+    }
+  }
+
+  std::vector<std::reference_wrapper<GXFTrackState>> GlobalChi2Fitter::holeSearchStates(
+    GXFTrajectory & trajectory
+  ) const {
+    /*
+     * Firstly, we will need to find the last measurement state on our track.
+     * This will allow us to break the main loop later once we are done with
+     * our work.
+     */
+    GXFTrackState * lastmeas = nullptr;
+
+    for (const std::unique_ptr<GXFTrackState> & s : trajectory.trackStates()) {
+      if (s->getStateType(TrackStateOnSurface::Measurement)) {
+        lastmeas = s.get();
+      }
+    }
+
+    /*
+     * We create a vector of reference wrappers and reserve at least enough
+     * space to contain the entire trajectory. This is perhaps a little
+     * wasteful since we will never need this much space, but it may be more
+     * efficient than taking the resizing pentalty on the chin.
+     */
+    std::vector<std::reference_wrapper<GXFTrackState>> rv;
+    rv.reserve(trajectory.trackStates().size());
+
+    /*
+     * The main body of our method now. We iterate over all track states in
+     * the track, at least until we find the last measurement state as found
+     * above.
+     */
+    for (const std::unique_ptr<GXFTrackState> & s : trajectory.trackStates()) {
+      /*
+       * We are only interested in collecting measurements, perigees, and any
+       * outlier states.
+       */
+      if (
+        s->getStateType(TrackStateOnSurface::Measurement) ||
+        s->getStateType(TrackStateOnSurface::Perigee) ||
+        s->getStateType(TrackStateOnSurface::Outlier)
+      ) {
+        /*
+         * We store a reference to the current track state in our return value
+         * vector.
+         */
+        rv.emplace_back(*s);
+
+        /*
+         * We want to make sure we do not collect any TRT results or other
+         * non-SCT and non-Pixel detector types. For that, we need to access
+         * the details of the detector element and determine the detector type.
+         */
+        const TrkDetElementBase * de = s->trackParameters()->associatedSurface().associatedDetectorElement();
+
+        if (de != nullptr) {
+          Identifier id = de->identify();
+
+          if (!m_DetID->is_pixel(id) && !m_DetID->is_sct(id)) {
+            break;
+          }
+        }
+
+        /*
+         * We also have no interest in going past the final measurement, so we
+         * break out of the loop if we find it.
+         */
+        if (s.get() == lastmeas) {
+          break;
+        }
+      }
+    }
+
+    return rv;
+  }
+
+  std::optional<GlobalChi2Fitter::TrackHoleCount> GlobalChi2Fitter::holeSearchProcess(
+    const EventContext & ctx,
+    const std::vector<std::reference_wrapper<GXFTrackState>> & states
+  ) const {
+    /*
+     * Firstly, we need to guard against tracks having too few measurement
+     * states to perform a good hole search. This is a mechanism that we
+     * inherit from the reference hole search. If we have too few states, we
+     * return a non-extant result to indicate an error state.
+     *
+     * TODO: The minimum value of 3 is also borrowed from the reference
+     * implementation. It's hardcoded for now, but could be a parameter in the
+     * future.
+     */
+    constexpr uint min_meas = 3;
+    if (std::count_if(states.begin(), states.end(), [](const GXFTrackState & s){ return s.getStateType(TrackStateOnSurface::Measurement); }) < min_meas) {
+      return {};
+    }
+
+    bool seen_meas = false;
+    TrackHoleCount rv;
+    std::set<Identifier> id_set;
+    std::set<Identifier> sct_set;
+
+    /*
+     * Using an old-school integer-based for loop because we need to iterate
+     * over successive pairs of states to do an extrapolation between.
+     */
+    for (std::size_t i = 0; i < states.size() - 1; i++) {
+      /*
+       * Gather references to the state at the beginning of the extrapolation,
+       * named beg, and the end, named end.
+       */
+      GXFTrackState & beg = states[i];
+      GXFTrackState & end = states[i + 1];
+
+      /*
+       * Update the boolean keeping track of whether we have seen a measurement
+       * or outlier yet. Once we see one, this will remain true forever, but
+       * it helps us make sure we don't collect holes before the first
+       * measurement.
+       */
+      seen_meas |= beg.getStateType(TrackStateOnSurface::Measurement) || beg.getStateType(TrackStateOnSurface::Outlier);
+
+      /*
+       * Calculate the distance between the position of the starting parameters
+       * and the end parameters. If this distance is sufficiently small, there
+       * can be no elements between them (for example, between two SCTs), and
+       * we don't need to do an extrapolation. This can easily save us a few
+       * microseconds.
+       */
+      double dist = (beg.trackParameters()->position() - end.trackParameters()->position()).norm();
+
+      /*
+       * Only proceed to count holes if we have seen a measurement before (this
+       * may include the starting track state, if it is a measurement) and the
+       * distance between start and end is at least 2.5 millimeters.
+       */
+      if (seen_meas && dist >= 2.5) {
+        /*
+         * First, we retrieve the hole data stored in the beginning state. Note
+         * that this may very well be non-extant, but it is possible for the
+         * fitter to have deposited some hole information into the track state
+         * earlier on in the fitting process.
+         */
+        std::optional<std::vector<std::unique_ptr<const TrackParameters>>> & hc = beg.getHoles();
+        std::vector<std::unique_ptr<const TrackParameters>> states;
+
+        /*
+         * Gather the track states between the start and end of the
+         * extrapolation. If the track state contained hole search information,
+         * we simply move that out and use it. If there was no information, we
+         * do a fresh extrapolation. This can be a CPU hog!
+         */
+        if (hc.has_value()) {
+          states = std::move(*hc);
+        } else {
+          states = holesearchExtrapolation(ctx, *beg.trackParameters(), end, alongMomentum);
+        }
+
+        /*
+         * Finally, we process the collected hole candidate states, checking
+         * them for liveness and other properties. This helper function will
+         * increment the values in rv accordingly.
+         */
+        holeSearchHelper(states, id_set, sct_set, rv, true, true);
+      }
+    }
+
+    /*
+     * Once we are done processing our measurements, we also need to do a
+     * final blind extrapolation to collect and dead modules (but not holes)
+     * behind the last measurement. For this, we do a blind extrapolation
+     * from the final state.
+     */
+    GXFTrackState & last = states.back();
+
+    /*
+     * To do the blind extrapolation, we need to have a set of track parameters
+     * for our last measurement state. We also check whether the position of
+     * the last measurement is still inside the inner detector. If it is not,
+     * we don't need to blindly extrapolate because we're only interested in
+     * collecting inner detector dead modules. This check saves us a few tens
+     * of microseconds.
+     */
+    if (
+      last.trackParameters() != nullptr &&
+      m_idVolume.inside(last.trackParameters()->position())
+    ) {
+      /*
+       * Simply conduct the blind extrapolation, and then use the helper tool
+       * to ensure that the hole counts are updated.
+       */
+      std::vector<std::unique_ptr<const Trk::TrackParameters>> bl = m_extrapolator->extrapolateBlindly(
+        *last.trackParameters(),
+        Trk::alongMomentum,
+        false,
+        Trk::pion,
+        &m_idVolume
+      );
+
+      /*
+       * Note that we have flipped one of the boolean parameters of the helper
+       * method here to make sure it only collects dead modules, not hole
+       * candidates.
+       */
+      holeSearchHelper(bl, id_set, sct_set, rv, false, true);
+    }
+
+    return rv;
+  }
+
   std::unique_ptr<Track> GlobalChi2Fitter::makeTrack(
     const EventContext & ctx,
     Cache & cache,
@@ -7219,6 +7541,52 @@ namespace Trk {
      */
     if (m_createSummary.value()) {
       std::unique_ptr<TrackSummary> ts = std::make_unique<TrackSummary>();
+
+      /*
+       * This segment determines the hole search behaviour of the track fitter.
+       * It is only invoked if the DoHoleSearch parameter is set, but it can
+       * take a significant amount of CPU time, since the hole search is rather
+       * expensive. Beware of that!
+       */
+      if (m_holeSearch.value()) {
+        std::optional<TrackHoleCount> hole_count;
+
+        /*
+         * First, we collect a list of states that will act as our hole search
+         * extrapolation states. This will serve as our source of truth in
+         * regards to which track states we need to extrapolate between.
+         */
+        std::vector<std::reference_wrapper<GXFTrackState>> states = holeSearchStates(tmptrajectory);
+
+        /*
+         * Then, collect the actual hole search infomation using our state list
+         * from before. This is the expensive operation, as it will invoke a
+         * series of extrapolations if not all states have existing hole
+         * information! It will also check all the hole candidates to see if
+         * they are actually holes or not.
+         */
+        hole_count = holeSearchProcess(ctx, states);
+
+        /*
+         * Note that the hole search is not guaranteed to return a useful set
+         * of values. It can, for example, reach an error state if the number
+         * of measurements on a track is below a certain threshold. In that
+         * case, a non-extant result will be returned, which we must guard
+         * against. In that case, the hole counts will remain unset.
+         */
+        if (hole_count.has_value()) {
+          /*
+           * If the hole search did return good results, we can proceed to
+           * simply copy the numerical values in the track summary.
+           */
+          ts->update(Trk::numberOfPixelHoles, hole_count->m_pixel_hole);
+          ts->update(Trk::numberOfSCTHoles, hole_count->m_sct_hole);
+          ts->update(Trk::numberOfSCTDoubleHoles, hole_count->m_sct_double_hole);
+          ts->update(Trk::numberOfPixelDeadSensors, hole_count->m_pixel_dead);
+          ts->update(Trk::numberOfSCTDeadSensors, hole_count->m_sct_dead);
+        }
+      }
+
       rv->setTrackSummary(std::move(ts));
     }
 
-- 
GitLab


From e5e77ac17801bc20cc88b9264884731aa0c8231b Mon Sep 17 00:00:00 2001
From: williams <sarah.louise.williams@cern.ch>
Date: Tue, 29 Sep 2020 18:19:43 +0100
Subject: [PATCH 062/403] Updates to METAssociator to avoid conflicts between
 serial and MT mode

---
 .../ATLAS_CHECK_THREAD_SAFETY                 |  7 +++++++
 .../METReconstruction/METAssociator.h         |  3 +--
 .../METReconstruction/Root/METAssociator.cxx  | 21 ++++++++-----------
 .../share/RecExRecoTest_ART_met_fromESD.py    |  8 +++++++
 4 files changed, 25 insertions(+), 14 deletions(-)
 create mode 100644 Reconstruction/MET/METReconstruction/METReconstruction/ATLAS_CHECK_THREAD_SAFETY

diff --git a/Reconstruction/MET/METReconstruction/METReconstruction/ATLAS_CHECK_THREAD_SAFETY b/Reconstruction/MET/METReconstruction/METReconstruction/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 000000000000..86c3c72891a2
--- /dev/null
+++ b/Reconstruction/MET/METReconstruction/METReconstruction/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1,7 @@
+Reconstruction/MET/METReconstruction/METAssociationTool
+Reconstruction/MET/METReconstruction/METAssociator
+Reconstruction/MET/METReconstruction/METSoftTermsTool
+Reconstruction/MET/METReconstruction/METSoftAssociator
+Reconstruction/MET/METReconstruction/METJetAssocTool
+Reconstruction/MET/METReconstruction/METElectronAssociator
+Reconstruction/MET/METReconstruction/METMuonAssociator
diff --git a/Reconstruction/MET/METReconstruction/METReconstruction/METAssociator.h b/Reconstruction/MET/METReconstruction/METReconstruction/METAssociator.h
index b2cb63946697..70ecd538250c 100644
--- a/Reconstruction/MET/METReconstruction/METReconstruction/METAssociator.h
+++ b/Reconstruction/MET/METReconstruction/METReconstruction/METAssociator.h
@@ -90,12 +90,11 @@ namespace met {
     std::string m_pvcoll;
     std::string m_trkcoll;
     std::string m_clcoll;
-    std::string m_pfcoll;
 
     SG::ReadHandleKey<xAOD::VertexContainer>  m_pvcollKey;
     SG::ReadHandleKey<xAOD::IParticleContainer>  m_clcollKey;
     SG::ReadHandleKey<xAOD::TrackParticleContainer>  m_trkcollKey;
-    SG::ReadHandleKey<xAOD::PFOContainer>  m_pfcollKey;
+    SG::ReadHandleKey<xAOD::PFOContainer>  m_pfcollKey{this,"PFlowColl","CHSParticleFlowObjects","PFO Collection"};
     SG::ReadHandleKey<xAOD::IParticleContainer>  m_forcollKey;
     SG::ReadHandleKey<xAOD::IParticleContainer>  m_hybridContKey;
 
diff --git a/Reconstruction/MET/METReconstruction/Root/METAssociator.cxx b/Reconstruction/MET/METReconstruction/Root/METAssociator.cxx
index 268096e58911..83adb2079c58 100644
--- a/Reconstruction/MET/METReconstruction/Root/METAssociator.cxx
+++ b/Reconstruction/MET/METReconstruction/Root/METAssociator.cxx
@@ -54,15 +54,13 @@ namespace met {
     m_caloIsolationTool(this,""),
     m_pvcollKey(""),
     m_clcollKey(""),
-    m_trkcollKey(""),
-    m_pfcollKey("")
+    m_trkcollKey("")
   {
     ATH_MSG_INFO("METAssoc constructor");
     declareProperty( "InputCollection",    m_input_data_key                      );
     declareProperty( "PrimVxColl",         m_pvcoll      = "PrimaryVertices"     );
     declareProperty( "TrkColl",            m_trkcoll     = "InDetTrackParticles" );
     declareProperty( "ClusColl",           m_clcoll      = "CaloCalTopoClusters" );
-    declareProperty( "PFlowColl",          m_pfcoll      = "CHSParticleFlowObjects" );
     declareProperty( "UseModifiedClus",    m_useModifiedClus = false            );
     declareProperty( "UseTracks",          m_useTracks   = true                  );
     declareProperty( "PFlow",              m_pflow       = false                 );
@@ -109,13 +107,6 @@ namespace met {
       }
     }
 
-    if(m_pfcoll == "JetETMissParticleFlowObjects") {
-      ATH_MSG_ERROR("Configured to use standard pflow collection \"" << m_pfcoll << "\".");
-      ATH_MSG_ERROR("This is no longer supported -- please use the CHSParticleFlowObjects collection, which has the four-vector corrections built in.");
-      return StatusCode::FAILURE;
-    } else {
-      ATH_MSG_INFO("Configured to use PFlow collection \"" << m_pfcoll << "\".");
-    }
     //initialise read handle keys
     if(m_useTracks){
       ATH_CHECK( m_pvcollKey.assign(m_pvcoll));
@@ -124,8 +115,14 @@ namespace met {
       ATH_CHECK( m_trkcollKey.initialize());
     }
     if(m_pflow){
-      ATH_CHECK( m_pfcollKey.assign(m_pfcoll));
       ATH_CHECK( m_pfcollKey.initialize());
+      if(m_pfcollKey.key() == "JetETMissParticleFlowObjects") {
+        ATH_MSG_ERROR("Configured to use standard pflow collection \"" << m_pfcollKey.key() << "\".");
+        ATH_MSG_ERROR("This is no longer supported -- please use the CHSParticleFlowObjects collection, which has the four-vector corrections built in.");
+        return StatusCode::FAILURE;
+      } else {
+        ATH_MSG_INFO("Configured to use PFlow collection \"" << m_pfcollKey.key() << "\".");
+      }
     }
     if(!m_skipconst || m_forcoll.empty()){
       ATH_CHECK( m_clcollKey.assign(m_clcoll));
@@ -263,7 +260,7 @@ namespace met {
       constits.trkCont=trCont.cptr();
 
       if(m_pflow) {
-	ATH_MSG_DEBUG("Retrieving PFlow collection " << m_pfcoll);
+	ATH_MSG_DEBUG("Retrieving PFlow collection " << m_pfcollKey.key());
 	constits.pfoCont = 0;
         SG::ReadHandle<PFOContainer> pfCont(m_pfcollKey);
         if (!pfCont.isValid()) {
diff --git a/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_met_fromESD.py b/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_met_fromESD.py
index ac65568b6b33..e0f268abd5f0 100644
--- a/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_met_fromESD.py
+++ b/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_met_fromESD.py
@@ -27,7 +27,15 @@ jobproperties.InDetJobProperties.doxAOD.set_Value_and_Lock(False)
 rec.doFileMetaData.set_Value_and_Lock(False)
 
 athenaCommonFlags.EvtMax=10
+athenaCommonFlags.SkipEvents=0
 UserAlgs=["RecExRecoTest/RecExRecoTests_setupReadID.py"]
 UserAlgs+=["RecExRecoTest/RecExRecoTest_setupJetEtMissPFlow.py"]
 UserAlgs+=["METReconstruction/METReconstruction_jobOptions.py"]
 include ("RecExCommon/RecExCommon_topOptions.py")
+
+import AthenaCommon.PropertiesManip as manip
+
+manip.appendItemsToList(StreamAOD,'ItemList','xAOD::PFOContainer_v1#CHSParticleFlowObjects')
+manip.appendItemsToList(StreamAOD,'ItemList','xAOD::PFOAuxContainer_v1#CHSParticleFlowObjectsAux.')
+
+
-- 
GitLab


From 37a5bb6b78e344d16bf4efed5453debcafe6aad6 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 25 Aug 2020 22:31:20 +0200
Subject: [PATCH 063/403] AthViews: Use transient keys within views.

Change the mapping of keys to the parent store such that we use
transient-only keys (starting with an underscore).
Should help with avoiding hash collisions.
---
 Control/AthViews/CMakeLists.txt                    |  2 +-
 Control/AthViews/src/SimpleView.cxx                |  3 ++-
 Control/AthViews/test/ViewCollectionMerge_test.cxx | 10 +++++-----
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/Control/AthViews/CMakeLists.txt b/Control/AthViews/CMakeLists.txt
index 8cfbffaab5b7..594026fe12ec 100644
--- a/Control/AthViews/CMakeLists.txt
+++ b/Control/AthViews/CMakeLists.txt
@@ -12,7 +12,7 @@ atlas_add_library( AthViews
                    src/*.cxx
                    PUBLIC_HEADERS AthViews
                    INCLUDE_DIRS ${TBB_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${TBB_LIBRARIES} AthContainers AthLinks AthenaBaseComps AthenaKernel GaudiKernel StoreGateLib TrigSteeringEvent )
+                   LINK_LIBRARIES ${TBB_LIBRARIES} AthContainers AthLinks AthenaBaseComps AthenaKernel GaudiKernel StoreGateLib TrigSteeringEvent SGTools )
 
 atlas_add_component( AthViewsAlgs
                      src/components/*.cxx
diff --git a/Control/AthViews/src/SimpleView.cxx b/Control/AthViews/src/SimpleView.cxx
index 5b2821f70555..9c232b98026a 100644
--- a/Control/AthViews/src/SimpleView.cxx
+++ b/Control/AthViews/src/SimpleView.cxx
@@ -5,6 +5,7 @@
 #include <stdexcept>
 #include "AthViews/SimpleView.h"
 #include "AthViews/View.h"
+#include "SGTools/transientKey.h"
 
 SimpleView::SimpleView( std::string Name, bool AllowFallThrough, std::string const& storeName ) :
   m_store( storeName, Name ),
@@ -25,7 +26,7 @@ SimpleView::~SimpleView()
  */
 std::string SimpleView::viewKey (const std::string& key) const
 {
-  return m_name + "_" + key;
+  return SG::transientKey (m_name + "_" + key);
 }
 
 
diff --git a/Control/AthViews/test/ViewCollectionMerge_test.cxx b/Control/AthViews/test/ViewCollectionMerge_test.cxx
index 87b691375723..cb23953eff99 100644
--- a/Control/AthViews/test/ViewCollectionMerge_test.cxx
+++ b/Control/AthViews/test/ViewCollectionMerge_test.cxx
@@ -477,7 +477,7 @@ TEST_F( ViewCollectionMerge_test, elementLinkViewRemapTest ) {
   ASSERT_TRUE( outputDataHandle2.isValid() );
 
   // Declare remapping - pretty hacky, have to specify view object names explicitly
-  evtStore()->remap( ClassID_traits< DataVector< int > >::ID(), "testView_" + DATA_NAME, "testView_" + DATA_NAME + "2", 0 );
+  evtStore()->remap( ClassID_traits< DataVector< int > >::ID(), "_testView_" + DATA_NAME, "_testView_" + DATA_NAME + "2", 0 );
 
   // Test the link again - should not have changed
   ASSERT_TRUE( dataLink.isValid() );
@@ -566,8 +566,8 @@ TEST_F( ViewCollectionMerge_test, elementLinkMergeRemapTest ) {
   ASSERT_TRUE( outputDataHandle.isValid() );
 
   // Declare remapping - pretty hacky, have to specify view object names explicitly
-  evtStore()->remap( ClassID_traits< DataVector< int > >::ID(), "testView_1_" + DATA_NAME, DATA_NAME, 0 );
-  evtStore()->remap( ClassID_traits< DataVector< int > >::ID(), "testView_2_" + DATA_NAME, DATA_NAME, 1 );
+  evtStore()->remap( ClassID_traits< DataVector< int > >::ID(), "_testView_1_" + DATA_NAME, DATA_NAME, 0 );
+  evtStore()->remap( ClassID_traits< DataVector< int > >::ID(), "_testView_2_" + DATA_NAME, DATA_NAME, 1 );
 
   // Element link should still be pointing to view container
   ASSERT_TRUE( dataLink.isValid() );
@@ -665,8 +665,8 @@ TEST_F( ViewCollectionMerge_test, elementLinkMergeRemapBookkeepTest ) {
   ASSERT_TRUE( auxHandle.isValid() );
 
   // Declare remapping - pretty hacky, have to specify view object names explicitly
-  evtStore()->remap( ClassID_traits< DataVector< DummyData > >::ID(), "testView_1_" + DATA_NAME, DATA_NAME, 0 );
-  evtStore()->remap( ClassID_traits< DataVector< DummyData > >::ID(), "testView_2_" + DATA_NAME, DATA_NAME, 1 );
+  evtStore()->remap( ClassID_traits< DataVector< DummyData > >::ID(), "_testView_1_" + DATA_NAME, DATA_NAME, 0 );
+  evtStore()->remap( ClassID_traits< DataVector< DummyData > >::ID(), "_testView_2_" + DATA_NAME, DATA_NAME, 1 );
 
   // Element link should still be pointing to view container
   ASSERT_TRUE( dataLink.isValid() );
-- 
GitLab


From b8ed415add23b5612ceeded25823c73f2647e773 Mon Sep 17 00:00:00 2001
From: Alexander Solodkov <Sanya.Solodkov@cern.ch>
Date: Tue, 29 Sep 2020 21:03:41 +0200
Subject: [PATCH 064/403] Adding new tool which will detect 25 timing jumps in
 channels which are flagged as problematic in COOL DB

---
 .../python/TileConfigFlags.py                 |   8 +
 .../TileRecUtils/TileTimeBCOffsetFilter.h     | 101 +++++
 .../python/TileRawChannelGetter.py            |   8 +-
 .../TileRecUtils/python/TileRecFlags.py       |  21 +-
 .../src/TileRawChannelBuilder.cxx             |  11 +-
 .../src/TileTimeBCOffsetFilter.cxx            | 368 ++++++++++++++++++
 .../src/components/TileRecUtils_entries.cxx   |   2 +
 7 files changed, 509 insertions(+), 10 deletions(-)
 create mode 100644 TileCalorimeter/TileRecUtils/TileRecUtils/TileTimeBCOffsetFilter.h
 create mode 100644 TileCalorimeter/TileRecUtils/src/TileTimeBCOffsetFilter.cxx

diff --git a/TileCalorimeter/TileConfiguration/python/TileConfigFlags.py b/TileCalorimeter/TileConfiguration/python/TileConfigFlags.py
index 45857ba68fdd..07368f70b3bc 100644
--- a/TileCalorimeter/TileConfiguration/python/TileConfigFlags.py
+++ b/TileCalorimeter/TileConfiguration/python/TileConfigFlags.py
@@ -29,6 +29,7 @@ def createTileConfigFlags():
      tcf.addFlag('Tile.doOverflowFit', True)
      tcf.addFlag('Tile.zeroAmplitudeWithoutDigits', _zeroAmplitudeWithouDigits)
      tcf.addFlag('Tile.correctPedestalDifference', _correctPedestalDifference)
+     tcf.addFlag('Tile.correctTimeJumps', _correctTimeJumps)
      tcf.addFlag('Tile.RawChannelContainer', _getRawChannelContainer)
      tcf.addFlag('Tile.useDCS', _useDCS)
      tcf.addFlag('Tile.TimingType', _getTimingType)
@@ -106,6 +107,13 @@ def _correctPedestalDifference(prevFlags):
           return False
 
 
+def _correctTimeJumps(prevFlags):
+     if not (prevFlags.Input.isMC or prevFlags.Overlay.DataOverlay) and prevFlags.Input.Format == 'BS':
+          return True
+     else:
+          return False
+
+
 def _getRunType(prevFlags):
      # Tile run types: UNDEFINED, PHY, PED, LAS, BILAS, CIS, MONOCIS
      from AthenaConfiguration.AutoConfigFlags import GetFileMD
diff --git a/TileCalorimeter/TileRecUtils/TileRecUtils/TileTimeBCOffsetFilter.h b/TileCalorimeter/TileRecUtils/TileRecUtils/TileTimeBCOffsetFilter.h
new file mode 100644
index 000000000000..2b0c8342aca2
--- /dev/null
+++ b/TileCalorimeter/TileRecUtils/TileRecUtils/TileTimeBCOffsetFilter.h
@@ -0,0 +1,101 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TILERECUTILS_ITILETIMEBCOFFSETFILTER_H
+#define TILERECUTILS_ITILETIMEBCOFFSETFILTER_H
+
+/********************************************************************
+ *
+ * NAME:     TileTileBCOffsetFilter
+ * PACKAGE:  TileCalorimeter/TileRecUtils
+ *
+ * AUTHOR :  T. Davidek, A. Solodkov
+ * CREATED:  Feb 2019
+ *
+ * PURPOSE:  mask the time offsets by +/-1 or +/-2 bunch crossings in the given
+ *           Tile DMU
+ *
+ *  Input:   TileRawChannelContainer
+ *  Output:  TileRawChannelContainer is modified
+ *  Parameters:  none
+ *
+ ********************************************************************/
+
+// Tile includes
+#include "TileRecUtils/ITileRawChannelTool.h"
+#include "TileConditions/TileCondToolEmscale.h"
+#include "TileConditions/TileCablingSvc.h"
+#include "TileConditions/ITileDCSTool.h"
+#include "TileConditions/ITileBadChanTool.h"
+#include "TileEvent/TileDQstatus.h"
+
+// Atlas includes
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "StoreGate/ReadHandleKey.h"
+#include "GaudiKernel/ToolHandle.h"
+#include "GaudiKernel/ServiceHandle.h"
+
+#include <vector>
+
+// forward declarations
+class TileHWID;
+class TileRawChannel;
+class TileRawChannelContainer;
+class TileRawChannelCollection;
+class TileCablingService;
+
+/**
+ @class TileTimeBCOffsetFilter
+ @brief This tool sets bad status for channels with 25ns or 50ns timing jump
+ */
+class TileTimeBCOffsetFilter: public extends<AthAlgTool, ITileRawChannelTool> {
+
+  public:
+
+    TileTimeBCOffsetFilter(const std::string& type, const std::string& name,
+                           const IInterface* parent);
+
+    virtual ~TileTimeBCOffsetFilter() {};
+
+    virtual StatusCode initialize() override;
+    virtual StatusCode finalize() override;
+
+    virtual StatusCode process (TileMutableRawChannelContainer& rchCont) const override;
+
+  private:
+
+    int find_partner(int ros, int channel) const;
+    bool drawer_ok(const int drawerIndex, std::vector<bool> & channel_time_ok,
+                   std::vector<int> & bad_dmu) const;
+    bool ch_masked_or_empty(int ros, int drawer, int channel, int gain,
+                            const TileDQstatus* DQstatus) const;
+    bool isChanDCSgood(int ros, int drawer, int channel) const;
+
+    const TileHWID* m_tileHWID; //!< Pointer to TileHWID
+
+    const TileCablingService* m_cabling; //!< TileCabling instance
+
+    ServiceHandle<TileCablingSvc> m_cablingSvc{ this,
+        "TileCablingSvc", "TileCablingSvc", "The Tile cabling service"};
+
+    ToolHandle<ITileDCSTool> m_tileDCS{this, "TileDCSTool", "TileDCSTool", "Tile DCS tool"};
+
+    ToolHandle<TileCondToolEmscale> m_tileToolEmscale{this,
+        "TileCondToolEmscale", "TileCondToolEmscale", "Tile EM scale calibration tool"};
+
+    ToolHandle<ITileBadChanTool> m_tileBadChanTool{this,
+        "TileBadChanTool", "TileBadChanTool", "Tile bad channel tool"};
+
+    // properties
+    SG::ReadHandleKey<TileDQstatus> m_DQstatusKey{this, "TileDQstatus", 
+                                                  "TileDQstatus", 
+                                                  "TileDQstatus key"};
+
+    float m_ene_threshold_3chan;
+    float m_ene_threshold_1chan;
+    float m_time_threshold_diff;
+    bool m_checkDCS;
+
+};
+#endif
diff --git a/TileCalorimeter/TileRecUtils/python/TileRawChannelGetter.py b/TileCalorimeter/TileRecUtils/python/TileRawChannelGetter.py
index e9b1b0b922db..d47a9ed4335e 100644
--- a/TileCalorimeter/TileRecUtils/python/TileRawChannelGetter.py
+++ b/TileCalorimeter/TileRecUtils/python/TileRawChannelGetter.py
@@ -152,7 +152,13 @@ class TileRawChannelGetter ( Configured)  :
                     theTileRawChannelNoiseFilter.TileCondToolNoiseSample.TileOnlineSampleNoise = ''
                 NoiseFilterTools += [theTileRawChannelNoiseFilter]
 
-                if globalflags.DataSource() == 'data' and not globalflags.isOverlay():
+            if globalflags.DataSource() == 'data' and not globalflags.isOverlay():
+                if jobproperties.TileRecFlags.correctTimeJumps():
+                    from TileRecUtils.TileRecUtilsConf import TileTimeBCOffsetFilter
+                    theTileTimeBCOffsetFilter = TileTimeBCOffsetFilter()
+                    NoiseFilterTools += [theTileTimeBCOffsetFilter]
+
+                if len(NoiseFilterTools) > 0:
                     from TileRecUtils.TileRecUtilsConf import TileRawChannelCorrectionAlg
                     theTileRawChannelCorrectionAlg = TileRawChannelCorrectionAlg()
                     theTileRawChannelCorrectionAlg.NoiseFilterTools= NoiseFilterTools
diff --git a/TileCalorimeter/TileRecUtils/python/TileRecFlags.py b/TileCalorimeter/TileRecUtils/python/TileRecFlags.py
index b233c3310a8a..6da8521c9e73 100644
--- a/TileCalorimeter/TileRecUtils/python/TileRecFlags.py
+++ b/TileCalorimeter/TileRecUtils/python/TileRecFlags.py
@@ -209,14 +209,15 @@ class readDigits(JobProperty):
     allowedTypes = ['bool']
     StoredValue  = True
 
-
+#
 class doTileOverflowFit(JobProperty):
     """ set to True if apply fit builder for raw channels with overflow
     """
     statusOn     = True
     allowedTypes = ['bool']
     StoredValue  = True
-    
+
+#
 class simulateTrips(JobProperty):
     """ set to True if drawer trips simulation has to be done
     """
@@ -224,7 +225,7 @@ class simulateTrips(JobProperty):
     allowedTypes = ['bool']
     StoredValue  = False    
 
-
+#
 class zeroAmplitudeWithoutDigits(JobProperty):
     """ zero amplitude in Tile raw channel container from DSP reconstructed with OF1 method
         if amplitude is above threshold but there are no corresponding digits 
@@ -234,6 +235,7 @@ class zeroAmplitudeWithoutDigits(JobProperty):
     allowedTypes = ['bool']
     StoredValue  = True
 
+#
 class correctPedestalDifference(JobProperty):
     """ correct amplitude in Tile raw channel container from DSP reconstructed with OF1 method
         if there is online pedestal difference 
@@ -242,7 +244,15 @@ class correctPedestalDifference(JobProperty):
     allowedTypes = ['bool']
     StoredValue  = True    
 
-                    
+#
+class correctTimeJumps(JobProperty):
+    """ appply time correction for channels with possible +/-25 ns time jumps
+    """
+    statusOn     = True
+    allowedTypes = ['bool']
+    StoredValue  = True
+
+
 # Defines the container for the performance monitoring flags  
 class TileRecFlags(JobPropertyContainer):
     """ The global Tile reconstruction flag/job property container.
@@ -283,7 +293,8 @@ list_jobproperties = [
     doTileOverflowFit,
     simulateTrips,
     zeroAmplitudeWithoutDigits,
-    correctPedestalDifference
+    correctPedestalDifference,
+    correctTimeJumps
     ]
 
 for i in list_jobproperties:
diff --git a/TileCalorimeter/TileRecUtils/src/TileRawChannelBuilder.cxx b/TileCalorimeter/TileRecUtils/src/TileRawChannelBuilder.cxx
index 1e66afd98153..76f01e7108f2 100644
--- a/TileCalorimeter/TileRecUtils/src/TileRawChannelBuilder.cxx
+++ b/TileCalorimeter/TileRecUtils/src/TileRawChannelBuilder.cxx
@@ -468,10 +468,11 @@ const char * TileRawChannelBuilder::BadPatternName(float ped) {
       "11 - jump down in last sample in low gain",
       "12 - jump up in one sample above const",
       "13 - jump down in one sample below const",
-      "14 - unknown error"
+      "14 - unrecoverable timing jump"
+      "15 - unknown error"
   };
   
-  return errname[std::min(24, std::max(0, int((ped + 500) * 1e-4)))];
+  return errname[std::min(25, std::max(0, int((ped + 500) * 1e-4)))];
 }
 
     
@@ -574,8 +575,10 @@ StatusCode TileRawChannelBuilder::commitContainer()
             ATH_MSG_VERBOSE( "Ch "<<m_tileHWID->to_string(adc_id)
                              <<" amp " << rch->amplitude() << " ped " << rch->pedestal() 
                              << " corr " << corr );
-            rch->setAmplitude (rch->amplitude() - corr);
-            rch->setPedestal (rch->pedestal() + corr);
+            if (corr<10000.) {
+              rch->setAmplitude (rch->amplitude() - corr); // just baseline shift
+            }
+            rch->setPedestal (rch->pedestal() + corr); // baseline shift or change in error status
           } else {
             ATH_MSG_WARNING(" Problem in applying noise corrections " 
                             << " can not find channel in DSP container with HWID "
diff --git a/TileCalorimeter/TileRecUtils/src/TileTimeBCOffsetFilter.cxx b/TileCalorimeter/TileRecUtils/src/TileTimeBCOffsetFilter.cxx
new file mode 100644
index 000000000000..672abe3e9b44
--- /dev/null
+++ b/TileCalorimeter/TileRecUtils/src/TileTimeBCOffsetFilter.cxx
@@ -0,0 +1,368 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+/********************************************************************
+ *
+ * NAME:     TileTileBCOffsetFilter
+ * PACKAGE:  offline/TileCalorimeter/TileRecUtils
+ *
+ * AUTHOR :  T. Davidek, A. Solodkov
+ * CREATED:  Feb 2019
+ *
+ * PURPOSE:  mask the time offsets by +/-1 or +/-2 bunch crossings in the given
+ *           Tile DMU
+ *
+ *  Input: TileRawChannelContainer
+ *  Output: TileRawChannelContainer is modified
+ *  Parameters:  none
+ *
+ ********************************************************************/
+
+// Tile includes
+#include "TileRecUtils/TileTimeBCOffsetFilter.h"
+#include "TileIdentifier/TileHWID.h"
+#include "TileEvent/TileRawChannel.h"
+#include "TileEvent/TileRawChannelContainer.h"
+#include "TileIdentifier/TileRawChannelUnit.h"
+#include "TileCalibBlobObjs/TileCalibUtils.h"
+
+// Atlas includes
+#include "AthenaKernel/errorcheck.h"
+#include "Identifier/HWIdentifier.h"
+#include "GaudiKernel/ThreadLocalContext.h"
+
+
+//========================================================
+// constructor
+TileTimeBCOffsetFilter::TileTimeBCOffsetFilter(const std::string& type,
+    const std::string& name, const IInterface* parent)
+    : base_class(type, name, parent)
+    , m_tileHWID(nullptr)
+    , m_cabling(nullptr)
+{
+  declareProperty("EneThreshold3", m_ene_threshold_3chan = 3000);
+  declareProperty("EneThreshold1", m_ene_threshold_1chan = 4000);
+  declareProperty("TimeThreshold", m_time_threshold_diff = 15);
+
+  declareProperty("CheckDCS", m_checkDCS = false);
+}
+
+StatusCode TileTimeBCOffsetFilter::initialize() {
+  ATH_MSG_INFO( "TileTimeBCOffsetFilter::initialize()" );
+
+  if (msgLvl(MSG::DEBUG)) {
+      msg(MSG::DEBUG) << "EneThreshold3 = " 
+                      << m_ene_threshold_3chan << endmsg;
+      msg(MSG::DEBUG) << "EneThreshold1 = " 
+                      << m_ene_threshold_1chan << endmsg;
+      msg(MSG::DEBUG) << "TimeThreshold = " 
+                      << m_time_threshold_diff << endmsg;
+      msg(MSG::DEBUG) << "CheckDCS = " 
+                      << ((m_checkDCS)?"true":"false") << endmsg;
+  }
+
+  ATH_CHECK( detStore()->retrieve(m_tileHWID) );
+
+  //=== get TileCondToolEmscale
+  ATH_CHECK( m_tileToolEmscale.retrieve() );
+
+  //=== get TileBadChanTool
+  ATH_CHECK( m_tileBadChanTool.retrieve() );
+
+  CHECK( m_tileDCS.retrieve(EnableTool{m_checkDCS}) );
+
+  ATH_CHECK( m_cablingSvc.retrieve() );
+  m_cabling = m_cablingSvc->cablingService();
+
+  ATH_CHECK( m_DQstatusKey.initialize() );
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode TileTimeBCOffsetFilter::finalize() {
+  return StatusCode::SUCCESS;
+}
+
+StatusCode
+TileTimeBCOffsetFilter::process (TileMutableRawChannelContainer& rchCont) const
+{
+  const EventContext& ctx = Gaudi::Hive::currentContext();
+  ATH_MSG_DEBUG("in process()");
+
+  // Now retrieve the TileDQstatus
+  const TileDQstatus* DQstatus = SG::makeHandle (m_DQstatusKey, ctx).get();
+
+  const int nchan_dmu = 3; // number of channels in a single DMU
+
+  TileRawChannelUnit::UNIT rchUnit = rchCont.get_unit();
+
+  for (IdentifierHash hash : rchCont.GetAllCurrentHashes()) {
+    TileRawChannelCollection* coll = rchCont.indexFindPtr (hash);
+
+    if (coll->size() != TileCalibUtils::MAX_CHAN) {
+      ATH_MSG_DEBUG("drawer container does not contain all channels");
+      continue;
+    }
+
+    /* Get drawer ID and build drawer index. */
+    HWIdentifier drawer_id = m_tileHWID->drawer_id(coll->identify());
+    int ros = m_tileHWID->ros(drawer_id);
+    int drawer = m_tileHWID->drawer(drawer_id);
+
+    unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(ros, drawer);
+    std::vector<bool> channel_time_ok(TileCalibUtils::MAX_CHAN,true);
+    std::vector<int> bad_dmu;
+    if (drawer_ok(drawerIdx,channel_time_ok,bad_dmu)) continue;
+    if (msgLvl(MSG::VERBOSE)) {
+      for (unsigned int ch=0; ch<TileCalibUtils::MAX_CHAN; ++ch) {
+        if (!channel_time_ok[ch]) {
+          const char * part[5] = {"AUX","LBA","LBC","EBA","EBC"};
+          ATH_MSG_VERBOSE( "Checking timing jump in module " << part[ros]
+                           << std::setw(2) << std::setfill('0') << drawer+1
+                           << " channel " << std::setw(2) << std::setfill(' ') << ch );
+        }
+      }
+    }
+
+    // in loop below rely on the channel order 0..47 inside collection
+    // print an ERROR and do nothing if order is wrong
+
+    for (int dmu : bad_dmu) {
+      ATH_MSG_VERBOSE( "Checking DMU " << dmu);
+      int dmu_offset = dmu * nchan_dmu;
+
+      /* the order is: [0] - channel on a different DMU, being a partner of
+         one of the channels on this DMU. We call it reference channel.
+         Indices [1]..[3] correspond to the channels on this DMU.
+         There might be more reference channels in one DMU (e.g. LB DMU#0 has
+         two partners on different DMU: ch=3 and ch=4), in that case we pick up
+         that with the highest energy.*/
+      bool ch_status[nchan_dmu+1];
+      int ch_number[nchan_dmu+1];
+      float ch_amp[nchan_dmu+1];
+      float ch_time[nchan_dmu+1];
+      bool ch_mask[nchan_dmu+1];
+
+      // search for reference channels, picking that with highest energy
+      int ch_p = -1, ch_0 = -1;
+      float ch_p_amp = -1000000;
+      for(int i=0; i < nchan_dmu; ++i) {
+        int ch = i+dmu_offset;
+        int ch_p_tmp = find_partner(ros,ch);
+        if ((ch_p_tmp >= 0) && (ch_p_tmp/nchan_dmu != dmu)) { // partner on different DMU
+          const TileRawChannel * rch = coll->at(ch_p_tmp);
+          HWIdentifier adc_id = rch->adc_HWID();
+          if (m_tileHWID->channel(adc_id) != ch_p_tmp) {
+            ATH_MSG_ERROR("Channels in drawer collection are out of order");
+            continue;
+          }
+          int gain = m_tileHWID->adc(adc_id);
+          if (channel_time_ok[ch_p_tmp] &&
+              (! ch_masked_or_empty(ros,drawer,ch_p_tmp,gain,DQstatus))) {
+            float amp = rch->amplitude();
+            if (rchUnit != TileRawChannelUnit::OnlineMegaElectronVolts) {
+              amp = m_tileToolEmscale->channelCalib(drawerIdx, ch_p_tmp, gain, amp, rchUnit, TileRawChannelUnit::MegaElectronVolts);
+            }
+            if (amp > ch_p_amp) {
+              ch_p = ch_p_tmp;
+              ch_p_amp = amp;
+              ch_0 = ch;
+            }
+          }
+        }
+      }
+      if (ch_p < 0) { // no suitable reference channel found, cannot do anything
+        continue;
+      }
+
+      ch_number[0] = ch_p;
+      ch_status[0] = channel_time_ok[ch_p];
+      ch_number[1] = ch_0;
+      ch_status[1] = channel_time_ok[ch_0];
+      int index = 2;
+      for(int i=0; i < nchan_dmu; ++i) {
+        int ch = i+dmu_offset;
+        if (ch != ch_0) {
+          ch_number[index] = ch;
+          ch_status[index] = channel_time_ok[ch];
+          ++index;
+        }
+      }
+
+      // init ch_amp, ch_time, ch_mask; ch_status already filled-in above
+      int nprob = 0; // number of potentially problematic channels in the DMU
+      for(int i=0; i <= nchan_dmu; ++i) {
+        int ch = ch_number[i];
+        const TileRawChannel * rch = coll->at(ch);
+        HWIdentifier adc_id = rch->adc_HWID();
+        if (m_tileHWID->channel(adc_id) != ch) {
+          ATH_MSG_ERROR("Channels in drawer collection are out of order");
+          continue;
+        }
+        int gain = m_tileHWID->adc(adc_id);
+        if (ch_masked_or_empty(ros,drawer,ch,gain,DQstatus)) {
+          ch_number[i] = -10;
+          ch_amp[i] = 0;
+          ch_time[i] = 0;
+          ch_mask[i] = false;
+        } else {
+          ch_amp[i]    = rch->amplitude();
+          if (rchUnit != TileRawChannelUnit::OnlineMegaElectronVolts) {
+            ch_amp[i] = m_tileToolEmscale->channelCalib(drawerIdx, ch, gain, ch_amp[i], rchUnit, TileRawChannelUnit::MegaElectronVolts);
+          }
+          ch_time[i]   = rch->time();
+          ch_mask[i]   = false;
+          if ((i > 0) && (! ch_status[i])) ++nprob;
+        }
+      }
+
+      ATH_MSG_VERBOSE( "DMU " << dmu << " number of problems found " << nprob);
+      if (nprob == 0) continue; // no potential problems, skipping
+
+      float ene_threshold;
+      if (nprob == 1) {
+        ene_threshold = m_ene_threshold_1chan;
+      } else {
+        ene_threshold = m_ene_threshold_3chan;
+      }
+      /* Look at both reference and potentially affected channels in the given
+         DMU. At least one channel of the four should be above threshold,
+         and the time difference of affected channsl wrt reference channel
+         should be above 15 ns. */
+      bool ene_above = false;
+      for(int i=0; i <= nchan_dmu; ++i) {
+        ene_above = ene_above || ((ch_number[i] >= 0) && (ch_amp[i] > ene_threshold));
+      }
+      if (ene_above) { // at least 1 channel above the threshold
+        ATH_MSG_VERBOSE( "Energy above threshold");
+        /* first check whether the times of 1-3 channels on the DMU are within
+           15 ns, also calculate the average time */
+        bool time_dmu_same = true;
+        float time_dmu_aver = 0;
+        int n_dmu_aver = 0;
+        for(int i=1; (i <= nchan_dmu) && time_dmu_same; ++i) { //
+          if (ch_number[i] < 0) continue;
+          time_dmu_aver += ch_time[i];
+          ++n_dmu_aver;
+          for(int j=i+1; (j <= nchan_dmu) && time_dmu_same; ++j) {
+            if (ch_number[j] >= 0) {
+              time_dmu_same = time_dmu_same &&
+                (fabs(ch_time[i]-ch_time[j]) < m_time_threshold_diff);
+            }
+          }
+        }
+        if (time_dmu_same) {
+          time_dmu_aver /= n_dmu_aver;
+          ATH_MSG_VERBOSE( "Average time "<< time_dmu_aver);
+          if (fabs(ch_time[0]-time_dmu_aver) > m_time_threshold_diff) {
+            for(int i=1; i <= nchan_dmu; ++i) {
+              if (ch_number[i] >= 0) ch_mask[i] = true;
+            }
+          }
+        } else {
+          ATH_MSG_VERBOSE( "Can not determine average time");
+        }
+      }
+      // now apply mask to RawChannelContainer for channels spotted above
+      for(int i=1; i<= nchan_dmu;++i) {
+        if ((ch_number[i] >= 0) && ch_mask[i]) {
+          ATH_MSG_VERBOSE( "Masking channel " << ch_number[i]);
+          coll->at(ch_number[i])->setPedestal(240000.0);
+        }
+      }
+    } // end-of-loop over all DMUs in the given drawer
+  } // end-of loop over drawers
+
+  return StatusCode::SUCCESS;
+}
+
+bool TileTimeBCOffsetFilter::drawer_ok(int drawerIdx,
+                                       std::vector<bool> & channel_time_ok,
+                                       std::vector<int> & bad_dmu) const {
+  /* checks whether the whole drawer is ok, i.e. none of its channel
+     is potentially suffering from the +/-25 ns (or +/-50 ns) time shifts
+     and fill vectors with status for every channel at the same time
+  */
+  bool status = true;
+  int last_dmu = -1;
+  const int nchan_dmu = 3; // number of channels in a single DMU
+  for (unsigned int ch=0; ch<TileCalibUtils::MAX_CHAN; ++ch) {
+    TileBchStatus chStatus = m_tileBadChanTool->getAdcStatus(drawerIdx, ch, 0);
+    if (chStatus.isTimingDmuBcOffset()) { // channel timing is not stable
+      int dmu = ch/nchan_dmu;
+      if (dmu!=last_dmu) {
+        bad_dmu.push_back(dmu);
+        last_dmu=dmu;
+      }
+      channel_time_ok[ch] = false;
+      status = false;
+    }
+  }
+  return status;
+}
+
+bool TileTimeBCOffsetFilter::ch_masked_or_empty(int ros, int drawer, int channel, int gain,
+                                                const TileDQstatus* DQstatus) const {
+  // check if channel is connected
+  int index, pmt;
+  m_cabling->h2s_cell_id_index(ros, drawer, channel, index, pmt);
+  if (index < 0) return true; // disconnected or MBTS
+
+  // DB status
+  int drawerIdx = TileCalibUtils::getDrawerIdx(ros, drawer);
+  TileBchStatus chStatus = m_tileBadChanTool->getAdcStatus(drawerIdx, channel, gain);
+  if (chStatus.isBad()) return true;
+
+  // check DQstatus now
+  bool bad = !(DQstatus->isAdcDQgood(ros, drawer, channel, gain)
+               && isChanDCSgood(ros, drawer, channel));
+  return bad;
+}
+
+bool TileTimeBCOffsetFilter::isChanDCSgood (int ros, int drawer, int channel) const
+{
+  bool good=true;
+
+  if (m_checkDCS) {
+    
+    TileDCSState::TileDCSStatus status = m_tileDCS->getDCSStatus(ros, drawer, channel);
+
+    if (status > TileDCSState::WARNING) {
+      good=false;
+      ATH_MSG_DEBUG("Module=" << TileCalibUtils::getDrawerString(ros, drawer)
+                    << " channel=" << channel
+                    << " masking becasue of bad DCS status=" << status);
+    } 
+  }
+
+  return good;
+}
+
+
+int TileTimeBCOffsetFilter::find_partner(int ros, int ch) const {
+  /* returns the "partner" channel, i.e. the channel reading the same cell
+     as channel "ch" */
+  int lbcells[48] = {
+    -1,  4,  3,  2,  1,  8,  7,  6,  5,
+    10,  9, 12, 11, 14, 13, 18, 17, 16, 15,
+    20, 19, 22, 21, 26, 25, 24, 23,
+    28, 27, 32, -1, -1, 29,
+    34, 33, 38, 37, 36, 35,
+    40, 39, 44, 47, -1, 41, 46, 45, 42
+  };
+  int ebcells[48] = {
+    -1, -1,  3,  2,  5,  4,
+     7,  6,  9,  8, 11, 10,
+    -1, -1, 15, 14, 17, 16,
+    -1, -1, 21, 20, 23, 22,
+    -1, -1, -1, -1, -1, -1,
+    35, 32, 31, -1, -1, 30,
+    39, 38, 37, 36, 41, 40,
+    -1, -1, -1, -1, -1, -1
+  };
+  if (ros < 3) // LB
+    return lbcells[ch];
+  else         // EB
+    return ebcells[ch];
+}
diff --git a/TileCalorimeter/TileRecUtils/src/components/TileRecUtils_entries.cxx b/TileCalorimeter/TileRecUtils/src/components/TileRecUtils_entries.cxx
index b8c6ac7f1042..e5ec8b5129a7 100644
--- a/TileCalorimeter/TileRecUtils/src/components/TileRecUtils_entries.cxx
+++ b/TileCalorimeter/TileRecUtils/src/components/TileRecUtils_entries.cxx
@@ -16,6 +16,7 @@
 #include "TileRecUtils/TileCellNoiseFilter.h"
 #include "TileRecUtils/TileRawChannelNoiseFilter.h"
 #include "TileRecUtils/TileRawChannelOF1Corrector.h"
+#include "TileRecUtils/TileTimeBCOffsetFilter.h"
 #include "../TileTowerBuilderTool.h"
 #include "../TileDigitsDumper.h"
 #include "../TileRawChannelDumper.h"
@@ -44,6 +45,7 @@ DECLARE_COMPONENT( TileTowerBuilderTool )
 DECLARE_COMPONENT( TileCellNoiseFilter )
 DECLARE_COMPONENT( TileRawChannelNoiseFilter )
 DECLARE_COMPONENT( TileRawChannelOF1Corrector )
+DECLARE_COMPONENT( TileTimeBCOffsetFilter )
 DECLARE_COMPONENT( TileRawChannelMaker )
 DECLARE_COMPONENT( TileRawChannelVerify )
 DECLARE_COMPONENT( TileRawCorrelatedNoise )
-- 
GitLab


From 6b6ead8c2552ce3ea80be3998452959a6478d22d Mon Sep 17 00:00:00 2001
From: Sebastien Rettie <srettie@lxplus740.cern.ch>
Date: Wed, 30 Sep 2020 08:05:03 +0200
Subject: [PATCH 065/403] Modularize old number estimate, and implement new
 number network

---
 .../NnClusterizationFactory.h                 |   2 +-
 .../src/NnClusterizationFactory.cxx           | 130 +++++++++---------
 2 files changed, 66 insertions(+), 66 deletions(-)

diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnClusterizationFactory.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnClusterizationFactory.h
index 90ee9b29a9fc..7516f8bc21c4 100644
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnClusterizationFactory.h
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnClusterizationFactory.h
@@ -141,7 +141,7 @@ namespace InDet {
 
     /* Estimate number of particles for both with and w/o tracks */
     /* Method 2: using lwtnn for more flexible interfacing */
-    //std::vector<double> estimateNumberOfParticlesLWTNN(NnClusterizationFactory::InputMap & input) const;
+    std::vector<double> estimateNumberOfParticlesLWTNN(NnClusterizationFactory::InputMap & input) const;
 
     /* Estimate position for both with and w/o tracks */
     /* Method 1: using older TTrainedNetworks */
diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx
index 5eef23f8e37d..188d69ab74bb 100644
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx
@@ -302,12 +302,6 @@ namespace InDet {
 
     double tanl=0;
 
-    // Move this to if (m_useTTrainedNetworks) clause when validated
-    SG::ReadCondHandle<TTrainedNetworkCollection> nn_collection( m_readKeyWithoutTrack );
-    if (!nn_collection.isValid()) {
-      std::stringstream msg; msg  << "Failed to get trained network collection with key " << m_readKeyWithoutTrack.key();
-      throw std::runtime_error(msg.str() );
-    }
     NNinput input( createInput(pCluster,
                                beamSpotPosition,
                                tanl,
@@ -321,28 +315,22 @@ namespace InDet {
 
 
     std::vector<double> inputData=(this->*m_assembleInput)(input,sizeX,sizeY);
-    // dereference unique_ptr<TTrainedNetwork> then call calculateOutput :
-    std::vector<double> resultNN_NoTrack( ((*(nn_collection->at(m_nParticleNNId))).*m_calculateOutput)(inputData) );  
-
-    ATH_MSG_VERBOSE(" NOTRACK Prob of n. particles (1): " << resultNN_NoTrack[0] <<
-                    " (2): " << resultNN_NoTrack[1] <<
-                    " (3): " << resultNN_NoTrack[2]);
 
-    std::vector<double> resultNN_NoTrack_sanity = estimateNumberOfParticlesTTN(**nn_collection, inputData);
-
-    std::cout<<"yoyoma_p1_orig,"<<resultNN_NoTrack[0]<<std::endl;
-    std::cout<<"yoyoma_p2_orig,"<<resultNN_NoTrack[1]<<std::endl;
-    std::cout<<"yoyoma_p3_orig,"<<resultNN_NoTrack[2]<<std::endl;
-
-    std::cout<<"yoyoma_p1_sanity,"<<resultNN_NoTrack_sanity[0]<<std::endl;
-    std::cout<<"yoyoma_p2_sanity,"<<resultNN_NoTrack_sanity[1]<<std::endl;
-    std::cout<<"yoyoma_p3_sanity,"<<resultNN_NoTrack_sanity[2]<<std::endl;
+    // If using old TTrainedNetworks, fetch correct ones for the
+    // without-track situation and call them now.
+    if (m_useTTrainedNetworks) {
+      SG::ReadCondHandle<TTrainedNetworkCollection> nn_collection( m_readKeyWithoutTrack );
+      if (!nn_collection.isValid()) {
+        std::stringstream msg; msg  << "Failed to get trained network collection with key " << m_readKeyWithoutTrack.key();
+        throw std::runtime_error( msg.str() );
+      }
+      return estimateNumberOfParticlesTTN(**nn_collection, inputData);
+    }
 
-    std::cout<<"yoyoma_p1_sanitydiff,"<<resultNN_NoTrack[0] - resultNN_NoTrack_sanity[0]<<std::endl;
-    std::cout<<"yoyoma_p2_sanitydiff,"<<resultNN_NoTrack[1] - resultNN_NoTrack_sanity[1]<<std::endl;
-    std::cout<<"yoyoma_p3_sanitydiff,"<<resultNN_NoTrack[2] - resultNN_NoTrack_sanity[2]<<std::endl;
+    // Otherwise, prepare lwtnn input map and use new networks.
+    NnClusterizationFactory::InputMap nnInputData = flattenInput(input);
+    return estimateNumberOfParticlesLWTNN(nnInputData);
 
-    return resultNN_NoTrack;
   }
 
   std::vector<double> NnClusterizationFactory::estimateNumberOfParticles(const InDet::PixelCluster& pCluster,
@@ -352,13 +340,6 @@ namespace InDet {
                                                                          int sizeY) const
   {
 
-    // Move this to if (m_useTTrainedNetworks) clause when validated
-    SG::ReadCondHandle<TTrainedNetworkCollection> nn_collection( m_readKeyWithTrack );
-    if (!nn_collection.isValid()) {
-      std::stringstream msg; msg << "Failed to get trained network collection with key " << m_readKeyWithTrack.key();
-      throw std::runtime_error(msg.str() );
-    }
-
     Amg::Vector3D dummyBS(0,0,0);
 
     double tanl=0;
@@ -377,26 +358,22 @@ namespace InDet {
     addTrackInfoToInput(input,pixelSurface,trackParsAtSurface,tanl);
 
     std::vector<double> inputData=(this->*m_assembleInput)(input,sizeX,sizeY);
-    // dereference unique_ptr<TTrainedNetwork> then call calculateOutput :
-    std::vector<double> resultNN( ( ( *(nn_collection->at(m_nParticleNNId))).*m_calculateOutput)(inputData) );
-
-    ATH_MSG_VERBOSE(" Prob of n. particles (1): " << resultNN[0] << " (2): " << resultNN[1] << " (3): " << resultNN[2]);
-
-    std::vector<double> resultNN_sanity = estimateNumberOfParticlesTTN(**nn_collection, inputData);
-
-    std::cout<<"yoyoma_p1_orig,"<<resultNN[0]<<std::endl;
-    std::cout<<"yoyoma_p2_orig,"<<resultNN[1]<<std::endl;
-    std::cout<<"yoyoma_p3_orig,"<<resultNN[2]<<std::endl;
 
-    std::cout<<"yoyoma_p1_sanity,"<<resultNN_sanity[0]<<std::endl;
-    std::cout<<"yoyoma_p2_sanity,"<<resultNN_sanity[1]<<std::endl;
-    std::cout<<"yoyoma_p3_sanity,"<<resultNN_sanity[2]<<std::endl;
+    // If using old TTrainedNetworks, fetch correct ones for the
+    // with-track situation and call them now.
+    if (m_useTTrainedNetworks) {
+      SG::ReadCondHandle<TTrainedNetworkCollection> nn_collection( m_readKeyWithTrack );
+      if (!nn_collection.isValid()) {
+        std::stringstream msg; msg << "Failed to get trained network collection with key " << m_readKeyWithTrack.key();
+        throw std::runtime_error( msg.str() );
+      }
+      return estimateNumberOfParticlesTTN(**nn_collection, inputData);
+    }
 
-    std::cout<<"yoyoma_p1_sanitydiff,"<<resultNN[0] - resultNN_sanity[0]<<std::endl;
-    std::cout<<"yoyoma_p2_sanitydiff,"<<resultNN[1] - resultNN_sanity[1]<<std::endl;
-    std::cout<<"yoyoma_p3_sanitydiff,"<<resultNN[2] - resultNN_sanity[2]<<std::endl;
+    // Otherwise, prepare lwtnn input map and use new networks.
+    NnClusterizationFactory::InputMap nnInputData = flattenInput(input);
+    return estimateNumberOfParticlesLWTNN(nnInputData);
 
-    return resultNN;
   }
 
   std::vector<double> NnClusterizationFactory::estimateNumberOfParticlesTTN(const TTrainedNetworkCollection &nn_collection,
@@ -404,25 +381,48 @@ namespace InDet {
   {
     ATH_MSG_DEBUG("Using TTN number network");
     // dereference unique_ptr<TTrainedNetwork> then call calculateOutput :
-    std::vector<double> resultNN_TTN( ((*(nn_collection.at(m_nParticleNNId))).*m_calculateOutput)(inputData) );  
+    std::vector<double> resultNN_TTN( ((*(nn_collection.at(m_nParticleNNId))).*m_calculateOutput)(inputData) );
+
+    ATH_MSG_VERBOSE(" TTN Prob of n. particles (1): " << resultNN_TTN[0] <<
+                                             " (2): " << resultNN_TTN[1] <<
+                                             " (3): " << resultNN_TTN[2]);
+
+    std::cout<<"yoyoma_p1_orig,"<<resultNN_TTN[0]<<std::endl;
+    std::cout<<"yoyoma_p2_orig,"<<resultNN_TTN[1]<<std::endl;
+    std::cout<<"yoyoma_p3_orig,"<<resultNN_TTN[2]<<std::endl;
+
     return resultNN_TTN;
   }
 
-  // std::vector<double> NnClusterizationFactory::estimateNumberOfParticlesLWTNN(NnClusterizationFactory::InputMap & input)
-  // {
-  //   ATH_MSG_DEBUG("Using lwtnn number network");
-  //   // Evaluate the number network once per cluster
-  //   lwt::ValueMap discriminant = m_lwnnNumber->compute(input);
-  //   double num0 = discriminant["output_number0"];
-  //   double num1 = discriminant["output_number1"];
-  //   double num2 = discriminant["output_number2"];
-  //   // Get normalized predictions
-  //   double prob1 = num0/(num0+num1+num2);
-  //   double prob2 = num1/(num0+num1+num2);
-  //   double prob3 = num2/(num0+num1+num2);
-  //   std::vector<double> number_probabilities{prob1, prob2, prob3};
-  //   return number_probabilities;
-  // }
+  std::vector<double> NnClusterizationFactory::estimateNumberOfParticlesLWTNN(NnClusterizationFactory::InputMap & input) const
+  {
+    SG::ReadCondHandle<LWTNNCollection> lwtnn_collection(m_readKeyJSON) ;
+    if (!lwtnn_collection.isValid()) {
+      std::stringstream msg; msg << "Failed to get LWTNN network collection with key " << m_readKeyJSON.key();
+      throw std::runtime_error( msg.str() );      
+    }
+    ATH_MSG_DEBUG("Using lwtnn number network");
+    // Evaluate the number network once per cluster
+    lwt::ValueMap discriminant = lwtnn_collection->at(0)->compute(input);
+    double num0 = discriminant["output_number0"];
+    double num1 = discriminant["output_number1"];
+    double num2 = discriminant["output_number2"];
+    // Get normalized predictions
+    double prob1 = num0/(num0+num1+num2);
+    double prob2 = num1/(num0+num1+num2);
+    double prob3 = num2/(num0+num1+num2);
+    std::vector<double> number_probabilities{prob1, prob2, prob3};
+
+    ATH_MSG_VERBOSE(" LWTNN Prob of n. particles (1): " << number_probabilities[0] <<
+                                               " (2): " << number_probabilities[1] <<
+                                               " (3): " << number_probabilities[2]);
+
+    std::cout<<"yoyoma_p1_lwtnn,"<<number_probabilities[0]<<std::endl;
+    std::cout<<"yoyoma_p2_lwtnn,"<<number_probabilities[1]<<std::endl;
+    std::cout<<"yoyoma_p3_lwtnn,"<<number_probabilities[2]<<std::endl;
+
+    return number_probabilities;
+  }
 
   std::vector<Amg::Vector2D> NnClusterizationFactory::estimatePositions(const InDet::PixelCluster& pCluster,
                                                                              Amg::Vector3D & beamSpotPosition,
-- 
GitLab


From d25811584e66e9459e3548afbc625e1afa8738bd Mon Sep 17 00:00:00 2001
From: Soshi Tsuno <soshi.tsuno@cern.ch>
Date: Wed, 30 Sep 2020 09:56:31 +0200
Subject: [PATCH 066/403] Adding OccupancyMapMaker.

---
 .../PixelCalibAlgs/OccupancyMapMaker.h        | 105 +++
 .../PixelCalibAlgs/src/OccupancyMapMaker.cxx  | 738 ++++++++++++++++++
 .../src/components/PixelCalibAlgs_entries.cxx |   2 +
 3 files changed, 845 insertions(+)
 create mode 100755 InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/OccupancyMapMaker.h
 create mode 100755 InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/OccupancyMapMaker.cxx

diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/OccupancyMapMaker.h b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/OccupancyMapMaker.h
new file mode 100755
index 000000000000..687dd46d1345
--- /dev/null
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/OccupancyMapMaker.h
@@ -0,0 +1,105 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef PIXELCONDITIONSALGS_OCCUPANCYMAPMAKER_H
+#define PIXELCONDITIONSALGS_OCCUPANCYMAPMAKER_H
+
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "GaudiKernel/ServiceHandle.h"
+
+#include "InDetConditionsSummaryService/IInDetConditionsTool.h"
+
+#include <string>
+#include <sstream>
+#include <vector>
+#include <fstream>
+#include <utility> // pair
+
+class ITHistSvc;
+class PixelID;
+class TH2D;
+class TH2C;
+class TH1D;
+
+class OccupancyMapMaker: public AthAlgorithm{
+  public:
+    OccupancyMapMaker (const std::string& name, ISvcLocator* pSvcLocator);
+    ~OccupancyMapMaker();
+
+    StatusCode initialize();
+    StatusCode execute();
+    StatusCode finalize();
+
+  private:
+    std::string getDCSIDFromPosition(int bec, int layer, int modPhi, int modEta);
+
+    std::vector<std::string> &splitter(const std::string &str, char delim, std::vector<std::string> &elems);
+
+    std::vector<std::string> splitter(const std::string &str, char delim); 
+    StatusCode registerHistograms();
+
+    const std::string histoSuffix(const int bec, const int layer);
+
+  private:
+    ServiceHandle <ITHistSvc> m_tHistSvc;
+
+    ToolHandle<IInDetConditionsTool> m_pixelConditionsTool
+    {this, "PixelConditionsSummaryTool", "PixelConditionsSummaryTool", "Tool to retrieve Pixel Conditions summary"};
+
+    const PixelID *m_pixelID;
+
+    // vector of modulename and vector(barrel/endcap, layer, phi, eta)
+    std::vector< std::pair< std::string, std::vector<int> > > m_pixelMapping;
+
+    std::string m_pixelRDOKey;
+    std::vector<int> m_moduleHashList;
+
+    double m_nEvents;
+    //  double m_occupancyCut;
+
+    TH1D* m_nEventsHist;
+    TH1D* m_nEventsLBHist;
+    std::vector<TH2D*> m_hitMaps;
+    std::vector<TH2C*> m_noiseMaps;
+    std::vector<TH1D*> m_LBdependence;
+    std::vector<TH1D*> m_BCIDdependence;
+    std::vector<TH1D*> m_TOTdistributions;
+
+    TH1D *m_disabledModules;
+    TH2D *m_overlayedPixelNoiseMap;
+    TH2D *m_overlayedIBLDCNoiseMap; // Planar Double Chip
+    TH2D *m_overlayedIBLSCNoiseMap; // 3D Single Chip
+    //TH2D* m_overlayedDBMNoiseMap; // DBM
+
+    // cuts ....
+    double m_disk1ACut; // disk-1, A-side
+    double m_disk2ACut; // disk-2, A-side
+    double m_disk3ACut; // disk-3, A-side
+    double m_disk1CCut; // disk-1, C-side
+    double m_disk2CCut; // disk-2, C-side
+    double m_disk3CCut; // disk-3, C-side
+    double m_iblCut;    // IBL
+    double m_bLayerCut; // B-Layer
+    double m_layer1Cut; // Layer 1
+    double m_layer2Cut; // Layer 2
+    double m_dbmCut;    // DBM
+
+    int m_hist_lbMax;   // max number of LB 
+
+    double m_longPixelMultiplier;
+    double m_gangedPixelMultiplier;
+
+    //  int m_maxLVL1A;
+
+    bool m_occupancyPerBC;
+
+    unsigned int m_nBCReadout;
+
+    int m_evt_lbMin; // lower limit for LB to be taken into account
+    int m_evt_lbMax; // upper limit for LB to be taken into account
+
+    bool m_calculateNoiseMaps;
+};
+
+#endif  // PIXELCONDITIONSALGS_OCCUPANCYMAPMAKERH_
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/OccupancyMapMaker.cxx b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/OccupancyMapMaker.cxx
new file mode 100755
index 000000000000..c721c8a0a2d9
--- /dev/null
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/OccupancyMapMaker.cxx
@@ -0,0 +1,738 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+// PixelCalibAlgs
+#include "PixelCalibAlgs/OccupancyMapMaker.h"
+#include "PixelCalibAlgs/PixelConvert.h"
+
+// Gaudi
+#include "GaudiKernel/ITHistSvc.h"
+
+// EDM
+#include "InDetRawData/PixelRDO_Container.h"
+#include "EventInfo/EventInfo.h"
+#include "EventInfo/EventID.h"
+
+// geometry
+#include "InDetIdentifier/PixelID.h"
+
+// Thread safety check
+#include "CxxUtils/checker_macros.h"
+
+// ROOT
+#include "TH2.h"
+#include "TString.h" 
+
+// standard library
+#include <string>
+#include <sstream>
+#include <algorithm>
+#include <map> 
+#include <fstream>
+#include <cstdlib> 
+
+OccupancyMapMaker::OccupancyMapMaker(const std::string& name, ISvcLocator* pSvcLocator) :
+  AthAlgorithm(name, pSvcLocator),
+  m_tHistSvc("THistSvc", name),
+  m_pixelID(0),
+  m_pixelRDOKey("PixelRDOs"),
+  m_nEvents(0.),
+  m_nEventsHist(nullptr),
+  m_nEventsLBHist(nullptr),
+  m_disabledModules(nullptr),
+  m_overlayedPixelNoiseMap(nullptr),
+  m_overlayedIBLDCNoiseMap(nullptr),
+  m_overlayedIBLSCNoiseMap(nullptr),
+  m_disk1ACut(1.e-3),
+  m_disk2ACut(1.e-3),
+  m_disk3ACut(1.e-3),
+  m_disk1CCut(1.e-3),
+  m_disk2CCut(1.e-3),
+  m_disk3CCut(1.e-3),
+  m_iblCut(1.e-3), 
+  m_bLayerCut(1.e-3),
+  m_layer1Cut(1.e-3),
+  m_layer2Cut(1.e-3),
+  m_dbmCut(1.e-3),
+  m_hist_lbMax(3001),
+  m_longPixelMultiplier(1.5), 
+  m_gangedPixelMultiplier(2.), 
+  m_occupancyPerBC(true),
+  m_nBCReadout(2),
+  m_evt_lbMin(0),
+  m_evt_lbMax(-1),
+  m_calculateNoiseMaps(false)
+{
+  declareProperty("PixelRDOKey", m_pixelRDOKey, "StoreGate key of pixel RDOs");
+  declareProperty("Disk1ACut", m_disk1ACut, "Occupancy cut for Disk1A pixels");
+  declareProperty("Disk2ACut", m_disk2ACut, "Occupancy cut for Disk2A pixels");
+  declareProperty("Disk3ACut", m_disk3ACut, "Occupancy cut for Disk3A pixels");
+  declareProperty("Disk1CCut", m_disk1CCut, "Occupancy cut for Disk1C pixels");
+  declareProperty("Disk2CCut", m_disk2CCut, "Occupancy cut for Disk2C pixels");
+  declareProperty("Disk3CCut", m_disk3CCut, "Occupancy cut for Disk3C pixels");
+  declareProperty("BLayerCut", m_bLayerCut, "Occupancy cut for BLayer pixels");
+  declareProperty("Layer1Cut", m_layer1Cut, "Occupancy cut for Layer1 pixels");
+  declareProperty("Layer2Cut", m_layer2Cut, "Occupancy cut for Layer2 pixels");
+  declareProperty("IBLCut", m_dbmCut, "Occupancy cut for DBM pixels"); 
+  declareProperty("nLBmax", m_hist_lbMax, "Maximum number of LB (for histograms binning)");
+  declareProperty("NBCReadout", m_nBCReadout, "Number of bunch crossings read out");
+  declareProperty("LBMin", m_evt_lbMin, "First lumi block to consider");
+  declareProperty("LBMax", m_evt_lbMax, "Last lumi block to consider");
+  declareProperty("LongPixelMultiplier", m_longPixelMultiplier, "Multiplier for long pixels");
+  declareProperty("GangedPixelMultiplier", m_gangedPixelMultiplier, "Multiplier for ganged pixels");
+  declareProperty("OccupancyPerBC", m_occupancyPerBC, "Calculate occupancy per BC or per event");
+  declareProperty("CalculateNoiseMaps", m_calculateNoiseMaps, "If false only build hit maps");
+  declareProperty("THistSvc", m_tHistSvc, "THistSvc");
+}
+
+OccupancyMapMaker::~OccupancyMapMaker(){}
+
+StatusCode OccupancyMapMaker::initialize(){
+  ATH_MSG_INFO("Initializing OccupancyMapMaker");
+
+  ATH_CHECK(m_tHistSvc.retrieve());
+  ATH_CHECK(m_pixelConditionsTool.retrieve());
+  ATH_CHECK(detStore()->retrieve(m_pixelID, "PixelID"));
+ 
+  // resize vectors of histograms
+  const Identifier::size_type maxHash = m_pixelID->wafer_hash_max();
+  ATH_MSG_INFO("PixelID maxHash = " << maxHash);
+  m_hitMaps.resize(maxHash);
+  m_LBdependence.resize(maxHash);
+  m_BCIDdependence.resize(maxHash);
+  m_TOTdistributions.resize(maxHash);
+  if(m_calculateNoiseMaps) {
+    m_noiseMaps.resize(maxHash);
+  }
+  return registerHistograms(); 
+}
+
+std::string OccupancyMapMaker::getDCSIDFromPosition (int barrel_ec, int layer, int modPhi, int module_eta){
+  for(unsigned int ii = 0; ii < m_pixelMapping.size(); ii++) {
+    if (m_pixelMapping[ii].second.size() != 4) {
+      ATH_MSG_WARNING( "getDCSIDFromPosition: Vector size is not 4!" );
+      return std::string("Error!");
+    }
+    if (m_pixelMapping[ii].second[0] != barrel_ec) continue;
+    if (m_pixelMapping[ii].second[1] != layer) continue;
+    if (m_pixelMapping[ii].second[2] != modPhi) continue;
+    if (m_pixelMapping[ii].second[3] != module_eta) continue;
+    return m_pixelMapping[ii].first;
+  }
+  ATH_MSG_WARNING( "Not found!" );
+  return std::string("Error!");
+}
+
+const std::string OccupancyMapMaker::histoSuffix(const int bec, const int layer){
+  std::ostringstream out;
+  
+  switch(bec) {
+  case 0: 
+    out << "barrel/";  
+    if(layer==0)      { out << "IBL";              }
+    else if(layer==1) { out << "B-layer";          }
+    else              { out << "Layer" << layer-1; }
+    break;
+  case +2: out << "endcapA/Disk" << layer+1; break;
+  case -2: out << "endcapC/Disk" << layer+1; break;
+  case +4: out << "DBMA/Layer"   << layer+1; break;
+  case -4: out << "DBMC/Layer"   << layer+1; break;
+  default: break;
+  }  
+  return out.str();
+}
+
+std::vector<std::string>& OccupancyMapMaker::splitter(const std::string &str,
+						    char delim, 
+						    std::vector<std::string> &elems) {
+  std::stringstream ss(str);
+  std::string item;
+  while (std::getline(ss, item, delim)) {
+    elems.push_back(item);
+  }
+  return elems;
+}
+
+std::vector<std::string> OccupancyMapMaker::splitter(const std::string &str, 
+						   char delim) {
+  std::vector<std::string> elems;
+  splitter(str, delim, elems);
+  return elems;
+}
+
+StatusCode OccupancyMapMaker::registerHistograms(){
+
+  const std::string mapFile = "PixelMapping_Run2.dat";
+  char* getenvPath = std::getenv("DATAPATH");
+  const unsigned int maxPathStringLength{3000};
+  if((not getenvPath) or (strlen(getenvPath) > maxPathStringLength) ){
+      ATH_MSG_FATAL( "Unable to retrieve environmental DATAPATH" );
+      return StatusCode::FAILURE;
+  }
+  std::stringstream tmpSstr{};
+  tmpSstr<<getenvPath;
+  std::string tmppath(tmpSstr.str());
+ 
+  std::vector<std::string> paths = splitter(tmppath, ':'); 
+  bool found(false);  
+  for(const auto& x : paths){
+    std::ifstream infile( (x+"/"+mapFile).c_str() );
+    if( infile.is_open() ){
+      ATH_MSG_INFO("Mapping file '" << mapFile << "' found in " << x);
+
+      int tmp_barrel_ec; int tmp_layer; int tmp_modPhi; int tmp_module_eta; std::string tmp_module_name;
+      std::vector<int> tmp_position;
+      tmp_position.resize(4);
+      while(infile >> tmp_barrel_ec >> tmp_layer >> tmp_modPhi >> tmp_module_eta >> tmp_module_name) {
+        tmp_position[0] = tmp_barrel_ec;
+        tmp_position[1] = tmp_layer;
+        tmp_position[2] = tmp_modPhi;
+        tmp_position[3] = tmp_module_eta;
+        m_pixelMapping.push_back(std::make_pair(tmp_module_name, tmp_position));
+      }
+
+      found=true;
+      infile.close();
+      break;
+    }
+  }
+  
+  if( !found ){
+    ATH_MSG_FATAL("Mapping file '" << mapFile << "' not found in DATAPATH !!!");
+    return StatusCode::FAILURE;
+  }
+
+  m_nEventsHist = new TH1D("NEvents", "NEvents", 1, 0, 1);
+  m_tHistSvc->regHist("/histfile/NEvents", m_nEventsHist).setChecked();
+  
+  m_nEventsLBHist = new TH1D("NEventsLB", "NEventsLB", m_hist_lbMax, -0.5, m_hist_lbMax+0.5);
+  m_tHistSvc->regHist("/histfile/NEventsLB", m_nEventsLBHist).setChecked();
+
+  for (PixelID::const_id_iterator wafer_it=m_pixelID->wafer_begin(); wafer_it!=m_pixelID->wafer_end(); ++wafer_it) {
+    Identifier ident = *wafer_it;
+    if(!m_pixelID->is_pixel(ident)) continue; 
+    
+    //const InDetDD::PixelModuleDesign* design = dynamic_cast<const InDetDD::PixelModuleDesign*>(&element->design());
+    //if(!design) continue;    
+    //unsigned int mchips = design->numberOfCircuits();
+
+    int bec        = m_pixelID->barrel_ec(ident);
+    int layer      = m_pixelID->layer_disk(ident); 
+    int modPhi = m_pixelID->phi_module(ident);
+    int module_eta = m_pixelID->eta_module(ident); 
+    int modHash = m_pixelID->wafer_hash(ident);
+
+    std::string onlineID = 
+      getDCSIDFromPosition(bec,layer,modPhi,module_eta);
+
+    std::ostringstream name;
+    
+    // hitmap
+    if( bec == 0 && layer == 0) // IBL
+      m_hitMaps[modHash] = new TH2D(onlineID.c_str(), onlineID.c_str(), 160, 0, 160, 336, 0, 336);
+    else if( abs(bec) == 4 ) // DBM
+      m_hitMaps[modHash] = new TH2D(onlineID.c_str(), onlineID.c_str(), 80,  0,  80, 336, 0, 336);
+    else
+      m_hitMaps[modHash] = new TH2D(onlineID.c_str(), onlineID.c_str(), 144, 0, 144, 328, 0, 328);    
+    name << "/histfile/hitMaps_" << histoSuffix(bec,layer) << "/" << onlineID;
+    m_tHistSvc->regHist(name.str().c_str(), m_hitMaps[modHash]).setChecked();
+    name.str(""); name.clear();
+
+
+    // LB dependence
+    m_LBdependence[modHash] = new TH1D(onlineID.c_str(), onlineID.c_str(), m_hist_lbMax, -0.5, m_hist_lbMax + 0.5);
+    name  << "/histfile/LBdep_" << histoSuffix(bec,layer) << "/" << onlineID;
+    m_tHistSvc->regHist(name.str().c_str(), m_LBdependence[modHash]).setChecked();
+    name.str(""); name.clear();
+    
+    // BCID dependence
+    m_BCIDdependence[modHash] = new TH1D(onlineID.c_str(), onlineID.c_str(), 301, -0.5, 300.5);
+    name << "/histfile/BCIDdep_" << histoSuffix(bec,layer) << "/" << onlineID;
+    m_tHistSvc->regHist(name.str().c_str(), m_BCIDdependence[modHash]).setChecked();
+    name.str(""); name.clear();
+    
+    // TOT
+    if( bec == 0 && layer == 0) // IBL
+      m_TOTdistributions[modHash] = new TH1D(onlineID.c_str(), onlineID.c_str(), 19, -0.5, 18.5);
+    else
+      m_TOTdistributions[modHash] = new TH1D(onlineID.c_str(), onlineID.c_str(), 256, -0.5, 255.5);
+    name << "/histfile/TOT_" << histoSuffix(bec,layer) << "/" << onlineID;
+    m_tHistSvc->regHist(name.str().c_str(), m_TOTdistributions[modHash]).setChecked();
+    name.str(""); name.clear();
+    
+    // noisemap
+    if( m_calculateNoiseMaps ){
+      if( bec == 0 && layer == 0) // IBL
+	m_noiseMaps[modHash] = new TH2C(onlineID.c_str(), onlineID.c_str(), 160, 0, 160, 336, 0, 336);
+      else if( abs(bec) == 4 ) // DBM
+	m_noiseMaps[modHash] = new TH2C(onlineID.c_str(), onlineID.c_str(), 80, 0, 80, 336, 0, 336);
+      else
+	m_noiseMaps[modHash] = new TH2C(onlineID.c_str(), onlineID.c_str(), 144, 0, 144, 328, 0, 328);
+      name << "/histfile/noiseMaps_" << histoSuffix(bec,layer) << "/" << onlineID;
+      m_tHistSvc->regHist(name.str().c_str(), m_noiseMaps[modHash]).setChecked();
+      name.str(""); name.clear();
+    }
+  } // end loop in detector elements 
+  
+  m_disabledModules = new TH1D("DisabledModules", "Number of events disabled vs. IdentifierHash", 2048, 0, 2048);
+  m_tHistSvc->regHist("/histfile/DisabledModules", m_disabledModules).setChecked();
+  
+  if (m_calculateNoiseMaps) {
+    m_overlayedPixelNoiseMap = new TH2D("overlayedPixelNoiseMap", "Noisy pixel map overlayed all Pixel modules", 144, 0, 144, 328, 0, 328);
+    m_tHistSvc->regHist("/histfile/overlayedPixelNoiseMap", m_overlayedPixelNoiseMap).setChecked();
+    
+    m_overlayedIBLDCNoiseMap = new TH2D("overlayedIBLDCNoiseMap", "Noisy pixel map overlayed all IBL Planar modules", 160, 0, 160, 336, 0, 336);
+    m_tHistSvc->regHist("/histfile/overlayedIBLDCNoiseMap", m_overlayedIBLDCNoiseMap).setChecked();
+    
+    m_overlayedIBLSCNoiseMap = new TH2D("overlayedIBLSCNoiseMap", "Noisy pixel map overlayed all IBL 3D modules", 80, 0, 80, 336, 0, 336);
+    m_tHistSvc->regHist("/histfile/overlayedIBLSCNoiseMap", m_overlayedIBLSCNoiseMap).setChecked();
+  }  
+  
+  return StatusCode::SUCCESS;
+} 
+
+//=========================================================
+//
+// execute
+//
+//=========================================================
+StatusCode OccupancyMapMaker::execute(){
+  ATH_MSG_DEBUG( "Executing OccupancyMapMaker" );
+
+  // retrieve EventInfo
+  const EventInfo* eventInfo;
+  StatusCode sc = sgSvc()->retrieve(eventInfo);
+  if( !sc.isSuccess() ){
+    ATH_MSG_FATAL("Unable to retrieve event info");
+    return StatusCode::FAILURE;
+  } ATH_MSG_DEBUG("Event info retrieved");
+
+  // check LB is in allowed range
+  int LB =  static_cast<int>(eventInfo->event_ID()->lumi_block());
+  if( (LB < m_evt_lbMin) || (m_evt_lbMax >= m_evt_lbMin && LB > m_evt_lbMax) ){
+    ATH_MSG_VERBOSE("Event in lumiblock " << eventInfo->event_ID()->lumi_block() <<
+		    " not in selected range [" << m_evt_lbMin << "," << m_evt_lbMax << "] => skipped");    
+    return StatusCode::SUCCESS;
+  }
+
+  // retrieve PixelRDO container
+  const PixelRDO_Container* pixelRDOs = nullptr;
+  sc = sgSvc()->retrieve(pixelRDOs, m_pixelRDOKey);
+  if( !sc.isSuccess() ){
+    ATH_MSG_FATAL( "Unable to retrieve pixel RDO container at " << m_pixelRDOKey );
+    return StatusCode::FAILURE;
+  } ATH_MSG_DEBUG( "Pixel RDO container retrieved" );
+
+  // loop in RDO container
+  for(PixelRDO_Container::const_iterator coll=pixelRDOs->begin(); 
+      coll!=pixelRDOs->end(); ++coll){
+
+    const InDetRawDataCollection<PixelRDORawData>* PixelRDOCollection(*coll);
+    if(PixelRDOCollection != 0){
+      Identifier moduleID = PixelRDOCollection->identify();
+      IdentifierHash modHash = m_pixelID->wafer_hash(moduleID);
+      ATH_MSG_VERBOSE("moduleID, modHash = " << moduleID << " , " << modHash);
+      
+      // exclude module if reported as not good by PixelConditionsSummaryTool
+      if( !(m_pixelConditionsTool->isGood(modHash)) ) {
+	ATH_MSG_VERBOSE("Module excluded as reported not good by PixelConditionsSummaryTool");
+        continue;
+      }
+
+      // exclude module if containg FE synch errors
+      if (m_pixelConditionsTool->hasBSError(modHash)) {
+	ATH_MSG_VERBOSE("Module excluded as containing FE synch errors");
+	continue;
+      }
+      
+      for(DataVector<PixelRDORawData>::const_iterator rdo = PixelRDOCollection->begin();
+          rdo!=PixelRDOCollection->end(); ++rdo){
+        Identifier rdoID = (*rdo)->identify();
+        unsigned int pixel_eta = m_pixelID->eta_index(rdoID);
+        unsigned int pixel_phi = m_pixelID->phi_index(rdoID);
+
+        int TOT = (*rdo)->getToT(); // it returns a 8 bits "word"
+        int BCID = (*rdo)->getBCID();
+
+        m_hitMaps[modHash]->Fill(pixel_eta, pixel_phi);
+        m_LBdependence[modHash]->Fill(LB);
+        m_BCIDdependence[modHash]->Fill(BCID);
+        m_TOTdistributions[modHash]->Fill(TOT);
+      }
+    }
+  }
+
+
+  // [sgs] why is this done in every event ???
+  for(unsigned int moduleHash = 0; moduleHash < m_pixelID->wafer_hash_max(); moduleHash++) {
+    if( !m_pixelConditionsTool->isActive( moduleHash ) ){
+      m_disabledModules->Fill( moduleHash );
+    }
+  }
+  
+  m_nEvents++;
+  m_nEventsHist->Fill(0.5);
+  m_nEventsLBHist->Fill(LB);
+
+  return StatusCode::SUCCESS;
+}
+
+
+//=========================================================
+//
+// finalize
+//
+//=========================================================
+StatusCode OccupancyMapMaker::finalize() {
+  ATH_MSG_INFO("Finalizing OccupancyMapMaker");
+
+  if(m_occupancyPerBC)
+    m_nEvents *= m_nBCReadout;
+ 
+  const int minLogOccupancy = 8;
+  const double minOccupancy = pow(10.,-minLogOccupancy);
+  
+  TH1D* globalOccupancy= new TH1D("occupancy", "Pixel occupancy", minLogOccupancy*10, -minLogOccupancy, 0.);
+  m_tHistSvc->regHist("/histfile/occupancy",globalOccupancy).setChecked();
+
+  std::map<std::string, TH1D*> h_occupancy;
+
+  // occupancy histograms for different components of the Pixel detector
+  std::vector<std::string> vcomponent;
+  vcomponent.push_back("Disk1A");
+  vcomponent.push_back("Disk2A");
+  vcomponent.push_back("Disk3A");
+  vcomponent.push_back("Disk1C");
+  vcomponent.push_back("Disk2C");
+  vcomponent.push_back("Disk3C");
+  vcomponent.push_back("IBL"); 
+  vcomponent.push_back("B-layer");
+  vcomponent.push_back("Layer1");
+  vcomponent.push_back("Layer2");
+  vcomponent.push_back("DBMA");
+  vcomponent.push_back("DBMC");
+
+  for(std::vector<std::string>::const_iterator cit=vcomponent.begin(); cit!=vcomponent.end(); ++cit) {
+    const std::string comp = (*cit);
+    h_occupancy[comp] = new TH1D( ("occupancy"+comp).c_str(), ("Pixel occupancy "+comp).c_str(),
+				  minLogOccupancy*10, -minLogOccupancy, 0);    
+    m_tHistSvc->regHist(("/histfile/occupancy"+comp).c_str(), h_occupancy[comp]).setChecked();
+  }
+  vcomponent.clear();
+  
+  // occupancy histograms for different pixel types
+  std::vector<std::string> vtype;
+  vtype.push_back("Normal");
+  vtype.push_back("Ganged");
+  vtype.push_back("InterGanged");
+  vtype.push_back("Long");
+  vtype.push_back("Long-Ganged");
+  vtype.push_back("Long-InterGanged");
+ for(std::vector<std::string>::const_iterator cit=vtype.begin(); cit!=vtype.end(); ++cit){
+    const std::string type = (*cit);
+    h_occupancy[type] = 
+      new TH1D( ("occupancy"+type).c_str(), ("Pixel occupancy "+type).c_str(), 
+		minLogOccupancy*10, -minLogOccupancy, 0);
+    m_tHistSvc->regHist(("/histfile/occupancy"+type).c_str(), h_occupancy[type]).setChecked();
+  }
+  vtype.clear();
+
+  //------------------------
+  // number of hits 
+  //------------------------  
+
+  // IBL
+  TH2F* nhitsPlotBI=new TH2F("nhitsPlotBI", "Number of hits BI;module_eta;module_phi", 20, -10, 10, 14, -0.5, 13.5); 
+  m_tHistSvc->regHist("/histfile/nhitsPlotBI",nhitsPlotBI).setChecked();
+
+  // B-layer
+  TH2F* nhitsPlotB0=new TH2F("nhitsPlotB0", "Number of hits B0;module_eta;module_phi", 13, -6.5, 6.5, 22, -0.5, 21.5);
+  m_tHistSvc->regHist("/histfile/nhitsPlotB0",nhitsPlotB0).setChecked();
+
+  // barrel layer 1
+  TH2F* nhitsPlotB1=new TH2F("nhitsPlotB1", "Number of hits B1;module_eta;module_phi", 13, -6.5, 6.5, 38, -0.5, 37.5);
+  m_tHistSvc->regHist("/histfile/nhitsPlotB1",nhitsPlotB1).setChecked();
+
+  // barrel layer 2
+  TH2F* nhitsPlotB2=new TH2F("nhitsPlotB2", "Number of hits B2;module_eta;module_phi", 13,- 6.5, 6.5, 52, -0.5, 51.5);
+  m_tHistSvc->regHist("/histfile/nhitsPlotB2",nhitsPlotB2).setChecked();
+
+  // endcap
+  TH2F* nhitsPlotEC=new TH2F("nhitsPlotEC", "Number of hits Endcap;Disk;module_phi", 7, -3.5, 3.5, 48, -0.5, 47.5);
+  m_tHistSvc->regHist("/histfile/nhitsPlotEC",nhitsPlotEC).setChecked();
+  
+  // DBM
+  TH2F* nhitsPlotDBM=new TH2F("nhitsPlotDBM", "Number of hits DBM;Layer;module_phi",7,-3.5,3.5,4,-0.5,3.5);
+  m_tHistSvc->regHist("/histfile/nhitsPlotDBM",nhitsPlotDBM).setChecked();
+
+  //------------------------
+  // hits w/o noise
+  //------------------------  
+
+  // IBL
+  TH2F* nhitsNoNoisePlotBI=new TH2F("nhitsNoNoisePlotBI","Number of hits without Noise BI;module_eta;module_phi", 20, -10, 10, 14, -0.5, 13.5); 
+  m_tHistSvc->regHist("/histfile/nhitsNoNoisePlotBI",nhitsNoNoisePlotBI).setChecked();
+
+  // B-layer
+  TH2F* nhitsNoNoisePlotB0=new TH2F("nhitsNoNoisePlotB0","Number of hits without Noise B0;module_eta;module_phi", 13, -6.5, 6.5, 22, -0.5, 21.5);
+  m_tHistSvc->regHist("/histfile/nhitsNoNoisePlotB0",nhitsNoNoisePlotB0).setChecked();
+
+  // barrel layer 1
+  TH2F* nhitsNoNoisePlotB1=new TH2F("nhitsNoNoisePlotB1","Number of hits without Noise B1;module_eta;module_phi", 13, -6.5, 6.5, 38, -0.5, 37.5);
+  m_tHistSvc->regHist("/histfile/nhitsNoNoisePlotB1",nhitsNoNoisePlotB1).setChecked();
+
+  // barrel layer 2
+  TH2F* nhitsNoNoisePlotB2=new TH2F("nhitsNoNoisePlotB2","Number of hits without Noise B2;module_eta;module_phi", 13, -6.5, 6.5, 52, -0.5, 51.5);
+  m_tHistSvc->regHist("/histfile/nhitsNoNoisePlotB2",nhitsNoNoisePlotB2).setChecked();
+
+  //------------------------
+  // disabled pixels
+  //------------------------  
+
+  // IBL
+  TH2F* disablePlotBI=new TH2F("disablePlotBI", "Disabled pixels BI;module_eta;module_phi", 20, -10, 10, 14, -0.5, 13.5); 
+  m_tHistSvc->regHist("/histfile/disablePlotBI",disablePlotBI).setChecked();
+
+  // B-layer
+  TH2F* disablePlotB0=new TH2F("disablePlotB0", "Disabled pixels B0;module_eta;module_phi", 13,- 6.5, 6.5, 22, -0.5, 21.5);
+  m_tHistSvc->regHist("/histfile/disablePlotB0",disablePlotB0).setChecked();
+
+  // barrel layer 1
+  TH2F* disablePlotB1=new TH2F("disablePlotB1", "Disabled pixels B1;module_eta;module_phi", 13, -6.5, 6.5, 38, -0.5, 37.5);
+  m_tHistSvc->regHist("/histfile/disablePlotB1",disablePlotB1).setChecked();
+
+  // barrel layer 2
+  TH2F* disablePlotB2=new TH2F("disablePlotB2", "Disabled pixels B2;module_eta;module_phi", 13, -6.5, 6.5, 52, -0.5, 51.5);
+  m_tHistSvc->regHist("/histfile/disablePlotB2",disablePlotB2).setChecked();
+
+  // endcap
+  TH2F* disablePlotEC=new TH2F("disablePlotEC", "Disabled pixels Endcap;Disk;module_phi", 7, -3.5, 3.5, 48, -0.5, 47.5);
+  m_tHistSvc->regHist("/histfile/disablePlotEC",disablePlotEC).setChecked();
+
+  // DBM
+  TH2F* disablePlotDBM=new TH2F("disablePlotDBM", "Disabled pixels DBM;Layer;module_phi", 7, -3.5, 3.5, 4, -0.5, 3.5);
+  m_tHistSvc->regHist("/histfile/disablePlotDBM",disablePlotDBM).setChecked();
+
+  TH1D* maskedPlot= new TH1D("maskedPlot","Disabled pixel per module",50,0.5,50.5);
+  m_tHistSvc->regHist("/histfile/maskedPlot",maskedPlot).setChecked();
+
+  int totalDisabledPixels=0;
+  int totalDisabledModules=0;
+  int modulesWithHits=0;
+  int modulesWithDisabledPixels=0;
+
+ 
+  //  std::sort(m_moduleHashList.begin(), m_moduleHashList.end());
+  //  if(m_pixelID->wafer_hash_max() > 1744) m_isIBL = true; // #modules only Pixel is 1744
+  //for(unsigned int moduleHash = 0; moduleHash < m_pixelID->wafer_hash_max(); moduleHash++)
+  //for(std::vector<int>::iterator it = m_moduleHashList.begin(); it != m_moduleHashList.end(); ++it)
+
+  for (PixelID::const_id_iterator wafer_it=m_pixelID->wafer_begin(); wafer_it!=m_pixelID->wafer_end(); ++wafer_it) {
+    Identifier ident = *wafer_it;
+    if(!m_pixelID->is_pixel(ident)) continue;  
+
+    int bec     = m_pixelID->barrel_ec (ident);
+    int layer   = m_pixelID->layer_disk(ident);
+    int modPhi  = m_pixelID->phi_module(ident);
+    int modEta  = m_pixelID->eta_module(ident); 
+    int modHash = m_pixelID->wafer_hash(ident);
+    int phi_max = m_pixelID->phi_index_max(ident);
+    int eta_max = m_pixelID->eta_index_max(ident);
+
+    TH2F* nhitsNoNoisePlot=0; 
+    std::string comp;
+    double cut = 0.;
+
+    if(bec != 0) { // Disk or DBM
+      if(bec == 2) { 
+        if(layer == 0)      {cut=m_disk1ACut; comp="Disk1A"; }
+        else if(layer == 1) {cut=m_disk2ACut; comp="Disk2A"; }
+        else if(layer == 2) {cut=m_disk3ACut; comp="Disk3A"; }
+      }
+      else if(bec == -2) { 
+        if(layer == 0)      { cut=m_disk1CCut; comp="Disk1C"; }
+        else if(layer == 1) { cut=m_disk2CCut; comp="Disk2C"; }
+        else if(layer == 2) { cut=m_disk3CCut; comp="Disk3C"; }
+      }
+      else if(bec ==  4) { cut=m_dbmCut; comp="DBMA"; }
+      else if(bec == -4) { cut=m_dbmCut; comp="DBMC"; }
+    } 
+    else if(bec == 0) { // Barrel
+      if(layer == 0)        { cut=m_iblCut;    nhitsNoNoisePlot=nhitsNoNoisePlotBI; comp="IBL";     }
+        else if(layer == 1) { cut=m_bLayerCut; nhitsNoNoisePlot=nhitsNoNoisePlotB0; comp="B-layer"; }
+        else if(layer == 2) { cut=m_layer1Cut; nhitsNoNoisePlot=nhitsNoNoisePlotB1; comp="Layer1";  }
+        else if(layer == 3) { cut=m_layer2Cut; nhitsNoNoisePlot=nhitsNoNoisePlotB2; comp="Layer2";  }
+    } 
+
+    if (!m_pixelConditionsTool->hasBSError(modHash) && m_hitMaps[modHash]->GetEntries()==0) {
+      if(bec == 0) {
+	if(layer == 0)      { disablePlotBI->Fill(modEta, modPhi, -1); }
+	else if(layer == 1) { disablePlotB0->Fill(modEta, modPhi, -1); }
+	else if(layer == 2) { disablePlotB1->Fill(modEta, modPhi, -1); }
+	else if(layer == 3) { disablePlotB2->Fill(modEta, modPhi, -1); }
+      }
+      else if(bec ==  2) { disablePlotEC->Fill(layer+1,     modPhi, -1); }
+      else if(bec == -2) { disablePlotEC->Fill(-(layer+1),  modPhi, -1); }
+      else if(bec ==  4) { disablePlotDBM->Fill(layer+1,    modPhi, -1); }
+      else if(bec == -4) { disablePlotDBM->Fill(-(layer+1), modPhi, -1); }
+
+      totalDisabledModules++;
+      continue;
+    }
+    else if( m_hitMaps[modHash]->GetEntries() != 0 ) {
+      if(bec == 0) {
+	if(layer == 0)      { nhitsPlotBI->Fill(modEta, modPhi, m_hitMaps[modHash]->GetEntries()); }
+	else if(layer == 1) { nhitsPlotB0->Fill(modEta, modPhi, m_hitMaps[modHash]->GetEntries()); }
+	else if(layer == 2) { nhitsPlotB1->Fill(modEta, modPhi, m_hitMaps[modHash]->GetEntries()); }
+	else if(layer == 3) { nhitsPlotB2->Fill(modEta, modPhi, m_hitMaps[modHash]->GetEntries()); }
+      }
+      else if(bec ==  2) { nhitsPlotEC->Fill(layer+1,     modPhi, m_hitMaps[modHash]->GetEntries()); }
+      else if(bec == -2) { nhitsPlotEC->Fill(-(layer+1),  modPhi, m_hitMaps[modHash]->GetEntries()); }
+      else if(bec ==  4) { nhitsPlotDBM->Fill(layer+1,    modPhi, m_hitMaps[modHash]->GetEntries()); }
+      else if(bec == -4) { nhitsPlotDBM->Fill(-(layer+1), modPhi, m_hitMaps[modHash]->GetEntries()); }
+
+      modulesWithHits++;
+    }
+
+    int thisModuleCut = 0;
+    bool isIBL3D = ( bec==0 && layer==0 && (modEta <= -7 || modEta >= 6) ) ? true : false;
+
+    for(int pixel_eta=0; pixel_eta<=eta_max; pixel_eta++){
+      for(int pixel_phi=0; pixel_phi<=phi_max; pixel_phi++){
+
+        // kazuki added from here
+        int pixel_eta_on_chip = (bec==0 && layer==0) ? pixel_eta % 80 : pixel_eta % 18; // column
+        int pixel_phi_on_chip = (pixel_phi <= 163) ? pixel_phi : 327 - pixel_phi; // eta
+        if (bec == 0 && layer == 0) pixel_phi_on_chip = pixel_phi;
+        int pixelType = 0;
+
+        if (bec == 0 && layer == 0) { // ----- IBL ----- //
+          if( !isIBL3D && (pixel_eta_on_chip == 0 || pixel_eta_on_chip == 80 - 1) ){
+            pixelType = 1; // long
+          }
+          else { // pixel size = 50x250 um2
+            pixelType = 0; // normal
+          }
+        } else { // Pixel
+          if(pixel_eta_on_chip > 0 && pixel_eta_on_chip < 18 - 1){ // pixel size = 50x400 um2
+            pixelType = 0; // normal
+            for(int kk = 0; kk < 3; kk++){
+              // row 154,156,158                       = inter-ganged
+              // row 153,155,157,159,  160,161,162,163 = ganged
+              if(pixel_phi_on_chip == (153 + 2 * kk + 1)){
+                pixelType = 5; // inter-ganged (dealt as normal)
+                break;
+              }
+              if(pixel_phi_on_chip == (153 + 2 * kk) || pixel_phi_on_chip >= 159){
+                pixelType = 2; // ganged
+                break;
+              }
+            }
+          }
+          else if(pixel_eta_on_chip == 0 || pixel_eta_on_chip == 18 - 1){
+            pixelType =  1; //long
+            for(int kk = 0; kk < 3; kk++){
+              if(pixel_phi_on_chip == (153 + 2 * kk + 1)){
+                pixelType = 6; // long inter-ganged (dealt as long)
+                break;
+              }
+              if(pixel_phi_on_chip == (153 + 2 * kk) || pixel_phi_on_chip >= 159){
+                pixelType = 3; // long ganged
+                break;
+              }
+            }
+          }
+          else
+            pixelType =  8; //invalid pixel_phi/pixel_eta pair
+        }
+        // to here
+
+        std::string type;
+
+
+        switch(pixelType) {
+          case 0:
+            type = "Normal";
+            break;
+          case 1:
+            type = "Long";
+            break;
+          case 2:
+            type = "Ganged";
+            break;
+          case 3:
+            type = "Long-Ganged";
+            break;
+          case 5:
+            type = "Long-InterGanged";
+            break;
+          case 6:
+            type = "InterGanged";
+            break;
+          case 8:
+          default:
+            type = "Invalid";
+            break;
+        }
+
+        double thiscut = cut;
+        if( type == "Ganged" )                thiscut *= m_gangedPixelMultiplier;
+        else if( type == "Long" )             thiscut *= m_longPixelMultiplier;
+        else if( type == "Long-InterGanged" ) thiscut *= m_longPixelMultiplier;
+        else if( type == "Long-Ganged" )      thiscut *= m_longPixelMultiplier * m_gangedPixelMultiplier;
+
+        if( type != "Invalid" ){
+	  double occupancy = 0;
+	  if( m_nEvents != 0 ) 
+	    occupancy = static_cast<double>(m_hitMaps[modHash]->GetBinContent(pixel_eta+1, pixel_phi+1)) /
+	      static_cast<double>(m_nEvents);
+	  
+          if( occupancy < minOccupancy ) occupancy = minOccupancy;
+          globalOccupancy->Fill(log10(occupancy));
+          h_occupancy[comp]->Fill(log10(occupancy));
+          h_occupancy[type]->Fill(log10(occupancy));
+
+          if( occupancy > thiscut ) {
+            thisModuleCut++;
+
+            if( m_calculateNoiseMaps ){
+              m_noiseMaps[modHash]->Fill(pixel_eta, pixel_phi);
+              if (comp == "IBL") {
+                if(modEta >= -6 && modEta <= 5) m_overlayedIBLDCNoiseMap->Fill(pixel_eta, pixel_phi); // Planar
+                if(modEta <= -7 || modEta >= 6) m_overlayedIBLSCNoiseMap->Fill(pixel_eta, pixel_phi); // 3D
+              }
+              else m_overlayedPixelNoiseMap->Fill(pixel_eta, pixel_phi);
+            }
+          } else {
+            if(bec == 0) nhitsNoNoisePlot->Fill(modEta, modPhi, m_hitMaps[modHash]->GetBinContent(pixel_eta+1, pixel_phi+1));
+          }
+        } // end if ( type != "Invalid" )
+      } // end for loop on pixel_phi
+    } // end for loop on pixel_eta
+
+    if ( thisModuleCut > 0 ) {
+      totalDisabledPixels+=thisModuleCut;
+      maskedPlot->Fill( static_cast<double>(thisModuleCut) );
+      modulesWithDisabledPixels++;
+   
+      if(bec == 0) {
+	if(layer == 0)      { disablePlotBI->Fill(modEta, modPhi, thisModuleCut); }
+	else if(layer == 1) { disablePlotB0->Fill(modEta, modPhi, thisModuleCut); }
+	else if(layer == 2) { disablePlotB1->Fill(modEta, modPhi, thisModuleCut); }
+	else if(layer == 3) { disablePlotB2->Fill(modEta, modPhi, thisModuleCut); }
+      }
+      else if(bec ==  2) { disablePlotEC->Fill(layer+1,    modPhi, thisModuleCut); }
+      else if(bec == -2) { disablePlotEC->Fill(-(layer+1), modPhi, thisModuleCut); }
+    }
+  } // end loop in detector elements
+  
+  ATH_MSG_INFO("Modules disabled = " << totalDisabledModules);
+  ATH_MSG_INFO("Modules with hits = " << modulesWithHits);
+  ATH_MSG_INFO("Modules with disabled pixels = " << modulesWithDisabledPixels);
+  ATH_MSG_INFO("Total disabled pixels = " << totalDisabledPixels);
+
+  return StatusCode::SUCCESS;
+  
+} // end finalize
+
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/components/PixelCalibAlgs_entries.cxx b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/components/PixelCalibAlgs_entries.cxx
index bee47e765f6e..894428e2720d 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/components/PixelCalibAlgs_entries.cxx
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/components/PixelCalibAlgs_entries.cxx
@@ -3,10 +3,12 @@
 #include "PixelCalibAlgs/PixMapDBWriter.h"
 #include "PixelCalibAlgs/PixMapOverlayWriter.h"
 #include "PixelCalibAlgs/PixelChargeToTConversion.h"
+#include "PixelCalibAlgs/OccupancyMapMaker.h"
 
 DECLARE_COMPONENT( PixelBarrelSurvey )
 DECLARE_COMPONENT( NoiseMapBuilder )
 DECLARE_COMPONENT( PixMapDBWriter )
 DECLARE_COMPONENT( PixMapOverlayWriter )
 DECLARE_COMPONENT( PixelChargeToTConversion )
+DECLARE_COMPONENT( OccupancyMapMaker )
 
-- 
GitLab


From 06c0e394cb220b712ad201f440f624e3d84bbb4b Mon Sep 17 00:00:00 2001
From: williams <sarah.louise.williams@cern.ch>
Date: Wed, 30 Sep 2020 11:10:33 +0100
Subject: [PATCH 067/403] Updating dates in METAssociator, removing unnecessary
 line in MET ART test

---
 .../MET/METReconstruction/METReconstruction/METAssociator.h     | 2 +-
 Reconstruction/MET/METReconstruction/Root/METAssociator.cxx     | 2 +-
 .../RecExRecoTest/share/RecExRecoTest_ART_met_fromESD.py        | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Reconstruction/MET/METReconstruction/METReconstruction/METAssociator.h b/Reconstruction/MET/METReconstruction/METReconstruction/METAssociator.h
index 70ecd538250c..9619c27fde22 100644
--- a/Reconstruction/MET/METReconstruction/METReconstruction/METAssociator.h
+++ b/Reconstruction/MET/METReconstruction/METReconstruction/METAssociator.h
@@ -1,7 +1,7 @@
 ///////////////////////// -*- C++ -*- /////////////////////////////
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // METAssociator.h
diff --git a/Reconstruction/MET/METReconstruction/Root/METAssociator.cxx b/Reconstruction/MET/METReconstruction/Root/METAssociator.cxx
index 83adb2079c58..20b1a7a925a7 100644
--- a/Reconstruction/MET/METReconstruction/Root/METAssociator.cxx
+++ b/Reconstruction/MET/METReconstruction/Root/METAssociator.cxx
@@ -1,7 +1,7 @@
 ///////////////////////// -*- C++ -*- /////////////////////////////
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // METAssociator.cxx
diff --git a/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_met_fromESD.py b/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_met_fromESD.py
index e0f268abd5f0..8c30a3c0d03f 100644
--- a/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_met_fromESD.py
+++ b/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_met_fromESD.py
@@ -27,7 +27,7 @@ jobproperties.InDetJobProperties.doxAOD.set_Value_and_Lock(False)
 rec.doFileMetaData.set_Value_and_Lock(False)
 
 athenaCommonFlags.EvtMax=10
-athenaCommonFlags.SkipEvents=0
+
 UserAlgs=["RecExRecoTest/RecExRecoTests_setupReadID.py"]
 UserAlgs+=["RecExRecoTest/RecExRecoTest_setupJetEtMissPFlow.py"]
 UserAlgs+=["METReconstruction/METReconstruction_jobOptions.py"]
-- 
GitLab


From be2f5f48679aab5ee7618cf9c793713960902064 Mon Sep 17 00:00:00 2001
From: Tomasz Bold <tomasz.bold@gmail.com>
Date: Wed, 30 Sep 2020 13:48:31 +0100
Subject: [PATCH 068/403] Updated Calo ref files

---
 .../share/ToolConstantsCondAlg_test.ref       | 110 +-----------------
 .../share/ToolWithConstants_test.ref          |  89 +-------------
 2 files changed, 3 insertions(+), 196 deletions(-)

diff --git a/Calorimeter/CaloRec/share/ToolConstantsCondAlg_test.ref b/Calorimeter/CaloRec/share/ToolConstantsCondAlg_test.ref
index 94009bb555a7..1fe498cfaf9d 100644
--- a/Calorimeter/CaloRec/share/ToolConstantsCondAlg_test.ref
+++ b/Calorimeter/CaloRec/share/ToolConstantsCondAlg_test.ref
@@ -1,111 +1,18 @@
-Py:AutoConfigFlags    INFO Obtaining metadata of auto-configuration by peeking into /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/q221/21.0/v1/myRDO.pool.root
 Py:MetaReader        INFO Current mode used: peeker
-Py:MetaReader        INFO Current filenames: ['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/q221/21.0/v1/myRDO.pool.root']
 Py:MetaReader        INFO MetaReader is called with the parameter "unique_tag_info_values" set to True. This is a workaround to remove all duplicate values from "/TagInfo" key
-Py:Athena            INFO using release [WorkDir-22.0.18] [x86_64-centos7-gcc8-opt] [atlas-work3/00ebad2a0aad] -- built on [2020-09-25T1826]
-ApplicationMgr    SUCCESS 
-====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
-                                          running on lxplus750.cern.ch on Fri Sep 25 20:46:13 2020
-====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
-ClassIDSvc           INFO  getRegistryEntries: read 18821 CLIDRegistry entries for module ALL
-PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok]
-PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
-PoolSvc              INFO Frontier compression level set to 5
-DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-09-24T2101/Athena/22.0.18/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host lxplus750.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
-PoolSvc              INFO Successfully setup replica sorting algorithm
-PoolSvc              INFO Setting up APR FileCatalog and Streams
-PoolSvc              INFO Resolved path (via ATLAS_POOLCOND_PATH) is /cvmfs/atlas-condb.cern.ch/repo/conditions/poolcond/PoolFileCatalog.xml
-PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
-PoolSvc           WARNING Unable to locate catalog for apcfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
-PoolSvc              INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml
-DbSession            INFO     Open     DbSession    
-Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
 IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
-IOVDbSvc             INFO Cache alignment will be done in 3 slices
 IOVDbSvc             INFO Global tag: OFLCOND-MC16-SDR-17 set from joboptions
 IOVDbSvc             INFO Initialised with 2 connections and 1 folders
 IOVDbSvc             INFO Service IOVDbSvc initialised successfully
-MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
-MetaDataSvc          INFO Found MetaDataTools = PublicToolHandleArray(['IOVDbMetaDataTool/IOVDbMetaDataTool'])
-OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
-CondProxyProvider    INFO Initializing CondProxyProvider - package version EventSelectorAthenaPool-00-00-00
-Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] BC292F26-AE73-9041-BF5C-BCE6C5C651EC
-Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000079.gen.COND/cond09_mc.000079.gen.COND._0002.pool.root
-RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000079.gen.COND/cond09_mc.000079.gen.COND._0002.pool.root File version:53413
-ClassIDSvc           INFO  getRegistryEntries: read 1518 CLIDRegistry entries for module ALL
-IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
-IOVSvc.IOVSvcTool    INFO IOVRanges will be checked at every Event
 IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
 IOVDbSvc             INFO Added taginfo remove for /LAR/CellCorrOfl/deadOTX
-/cvmfs/atlas-co...   INFO Database being retired...
-Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] BC292F26-AE73-9041-BF5C-BCE6C5C651EC
-Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
-ClassIDSvc           INFO  getRegistryEntries: read 273 CLIDRegistry entries for module ALL
-EventPersistenc...   INFO Added successfully Conversion service:DetDescrCnvSvc
-EventPersistenc...   INFO Added successfully Conversion service:TagInfoMgr
 EventPersistenc...   INFO Added successfully Conversion service:McCnvSvc
+EventPersistenc...   INFO Added successfully Conversion service:TagInfoMgr
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
-DbSession            INFO     Open     DbSession    
-Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] BC292F26-AE73-9041-BF5C-BCE6C5C651EC
-Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000079.gen.COND/cond09_mc.000079.gen.COND._0002.pool.root
-RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000079.gen.COND/cond09_mc.000079.gen.COND._0002.pool.root File version:53413
-ClassIDSvc           INFO  getRegistryEntries: read 112 CLIDRegistry entries for module ALL
-GeoModelSvc          INFO Explicitly initializing DetDescrCnvSvc
-DetDescrCnvSvc       INFO  initializing 
-DetDescrCnvSvc       INFO Found DetectorStore service
-DetDescrCnvSvc       INFO  filling proxies for detector managers 
-DetDescrCnvSvc       INFO  filling address for CaloTTMgr with CLID 117659265 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for CaloMgr with CLID 4548337 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for CaloSuperCellMgr with CLID 241807251 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for CaloIdManager with CLID 125856940 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for LArIdManager with CLID 79554919 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for IdDict with CLID 2411 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for AtlasID with CLID 164875623 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for PixelID with CLID 2516 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for SCT_ID with CLID 2517 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for TRT_ID with CLID 2518 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for SiliconID with CLID 129452393 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for LArEM_ID with CLID 163583365 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for LArEM_SuperCell_ID with CLID 99488227 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for LArHEC_ID with CLID 3870484 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for LArHEC_SuperCell_ID with CLID 254277678 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for LArFCAL_ID with CLID 45738051 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for LArFCAL_SuperCell_ID with CLID 12829437 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for LArMiniFCAL_ID with CLID 79264204 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for LArOnlineID with CLID 158698068 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for TTOnlineID with CLID 38321944 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for LArOnline_SuperCellID with CLID 115600394 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for LArHVLineID with CLID 27863673 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for LArElectrodeID with CLID 80757351 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for TileID with CLID 2901 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for Tile_SuperCell_ID with CLID 49557789 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for TileHWID with CLID 2902 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for TileTBID with CLID 2903 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for MDTIDHELPER with CLID 4170 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for CSCIDHELPER with CLID 4171 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for RPCIDHELPER with CLID 4172 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for TGCIDHELPER with CLID 4173 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for CaloLVL1_ID with CLID 108133391 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for CaloCell_ID with CLID 123500438 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for CaloCell_SuperCell_ID with CLID 128365736 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for CaloDM_ID with CLID 167756483 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for ZdcID with CLID 190591643 and storage type 68 to detector store 
-GeoModelSvc::RD...WARNING  Getting PixTBMatComponents with default tag
-GeoModelSvc::RD...WARNING  Getting PixTBMaterials with default tag
-GeoModelSvc::RD...WARNING  Getting InDetMatComponents with default tag
-GeoModelSvc::RD...WARNING  Getting InDetMaterials with default tag
-ClassIDSvc           INFO  getRegistryEntries: read 270 CLIDRegistry entries for module ALL
-AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 4933 CLIDRegistry entries for module ALL
-CondInputLoader      INFO Initializing CondInputLoader...
 CondInputLoader      INFO Adding base classes:
   +  ( 'CondAttrListCollection' , 'ConditionStore+/LAR/CellCorrOfl/deadOTX' )   ->
 CondInputLoader      INFO Will create WriteCondHandle dependencies for the following DataObjects:
@@ -135,7 +42,6 @@ CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'Con
 ApplicationMgr       INFO Application Manager Started successfully
 AthenaEventLoopMgr   INFO   ===>>>  start of run 284500    <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #0, run #284500 0 events processed so far  <<<===
-IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVDbFolder          INFO HVS tag OFLCOND-MC16-SDR-17 resolved to LARCellCorrOflDeadOTX-000-00 for folder /LAR/CellCorrOfl/deadOTX
 IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
 dumper1              INFO dumper.energyCalibrationTypes = [0, 0, 0, -1]
@@ -2591,25 +2497,11 @@ dumper.gam55.region = 4
 
 
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #284500 1 events processed so far  <<<===
-/cvmfs/atlas-co...   INFO Database being retired...
-Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] BC292F26-AE73-9041-BF5C-BCE6C5C651EC
-Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
 ApplicationMgr       INFO Application Manager Stopped successfully
-IncidentProcAlg1     INFO Finalize
-CondInputLoader      INFO Finalizing CondInputLoader...
-IncidentProcAlg2     INFO Finalize
-EventSelector        INFO finalize
-IOVDbFolder          INFO Folder /LAR/CellCorrOfl/deadOTX (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/705 ((     0.06 ))s
-IOVDbSvc             INFO  bytes in ((      0.06 ))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: 1 ReadTime: ((     0.06 ))s
 ToolSvc              INFO Removing all tools created by ToolSvc
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot=    0 [us] Ave/Min/Max=       0(+-       0)/       0/       0 [us] #=  3
-cObj_ALL             INFO Time User   : Tot=   10 [ms] Ave/Min/Max=    3.33(+-    4.71)/       0/      10 [ms] #=  3
-ChronoStatSvc        INFO Time User   : Tot= 0.69  [s]  #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/Calorimeter/CaloUtils/share/ToolWithConstants_test.ref b/Calorimeter/CaloUtils/share/ToolWithConstants_test.ref
index 98276efcc3c8..368b72218fd6 100644
--- a/Calorimeter/CaloUtils/share/ToolWithConstants_test.ref
+++ b/Calorimeter/CaloUtils/share/ToolWithConstants_test.ref
@@ -1,67 +1,9 @@
-Py:AutoConfigFlags    INFO Obtaining metadata of auto-configuration by peeking into /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/q221/21.0/v1/myRDO.pool.root
 Py:MetaReader        INFO Current mode used: peeker
-Py:MetaReader        INFO Current filenames: ['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/q221/21.0/v1/myRDO.pool.root']
 Py:MetaReader        INFO MetaReader is called with the parameter "unique_tag_info_values" set to True. This is a workaround to remove all duplicate values from "/TagInfo" key
-Py:Athena            INFO using release [WorkDir-22.0.18] [x86_64-centos7-gcc8-opt] [atlas-work3/00ebad2a0aad] -- built on [2020-09-25T1826]
-ApplicationMgr    SUCCESS 
-====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
-                                          running on lxplus750.cern.ch on Fri Sep 25 20:50:08 2020
-====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
-ClassIDSvc           INFO  getRegistryEntries: read 18821 CLIDRegistry entries for module ALL
-GeoModelSvc          INFO Explicitly initializing DetDescrCnvSvc
-DetDescrCnvSvc       INFO  initializing 
-DetDescrCnvSvc       INFO Found DetectorStore service
-DetDescrCnvSvc       INFO  filling proxies for detector managers 
-DetDescrCnvSvc       INFO  filling address for CaloTTMgr with CLID 117659265 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for CaloMgr with CLID 4548337 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for CaloSuperCellMgr with CLID 241807251 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for CaloIdManager with CLID 125856940 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for LArIdManager with CLID 79554919 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for IdDict with CLID 2411 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for AtlasID with CLID 164875623 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for PixelID with CLID 2516 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for SCT_ID with CLID 2517 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for TRT_ID with CLID 2518 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for SiliconID with CLID 129452393 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for LArEM_ID with CLID 163583365 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for LArEM_SuperCell_ID with CLID 99488227 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for LArHEC_ID with CLID 3870484 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for LArHEC_SuperCell_ID with CLID 254277678 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for LArFCAL_ID with CLID 45738051 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for LArFCAL_SuperCell_ID with CLID 12829437 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for LArMiniFCAL_ID with CLID 79264204 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for LArOnlineID with CLID 158698068 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for TTOnlineID with CLID 38321944 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for LArOnline_SuperCellID with CLID 115600394 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for LArHVLineID with CLID 27863673 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for LArElectrodeID with CLID 80757351 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for TileID with CLID 2901 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for Tile_SuperCell_ID with CLID 49557789 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for TileHWID with CLID 2902 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for TileTBID with CLID 2903 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for MDTIDHELPER with CLID 4170 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for CSCIDHELPER with CLID 4171 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for RPCIDHELPER with CLID 4172 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for TGCIDHELPER with CLID 4173 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for CaloLVL1_ID with CLID 108133391 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for CaloCell_ID with CLID 123500438 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for CaloCell_SuperCell_ID with CLID 128365736 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for CaloDM_ID with CLID 167756483 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for ZdcID with CLID 190591643 and storage type 68 to detector store 
-GeoModelSvc::RD...WARNING  Getting PixTBMatComponents with default tag
-GeoModelSvc::RD...WARNING  Getting PixTBMaterials with default tag
-GeoModelSvc::RD...WARNING  Getting InDetMatComponents with default tag
-GeoModelSvc::RD...WARNING  Getting InDetMaterials with default tag
-IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
-IOVSvc.IOVSvcTool    INFO IOVRanges will be checked at every Event
-ClassIDSvc           INFO  getRegistryEntries: read 1035 CLIDRegistry entries for module ALL
-AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 PyComponentMgr       INFO Initializing PyComponentMgr...
 TestAlg              INFO Initializing TestAlg...
-ClassIDSvc           INFO  getRegistryEntries: read 2478 CLIDRegistry entries for module ALL
 EventSelector        INFO  Enter McEventSelector Initialization 
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
@@ -81,27 +23,8 @@ ApplicationMgr    SUCCESS                IncidentProcAlg/IncidentProcAlg2
 ApplicationMgr    SUCCESS      AthSequencer/AthOutSeq
 ApplicationMgr    SUCCESS ******************************************************************************
 ApplicationMgr       INFO Application Manager Started successfully
-EventPersistenc...   INFO Added successfully Conversion service:DetDescrCnvSvc
-EventPersistenc...   INFO Added successfully Conversion service:TagInfoMgr
 EventPersistenc...   INFO Added successfully Conversion service:McCnvSvc
 AthenaEventLoopMgr   INFO   ===>>>  start of run 284500    <<<===
-PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok]
-PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
-PoolSvc              INFO Frontier compression level set to 5
-DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-09-24T2101/Athena/22.0.18/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host lxplus750.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] 
-IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
-IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
-IOVDbSvc             INFO Setting run/LB/time from EventSelector override in initialize
-IOVDbSvc             INFO run/LB/time set to [284500,0 : 1000000000000]
-IOVDbSvc             INFO Initialised with 1 connections and 0 folders
-IOVDbSvc             INFO Service IOVDbSvc initialised successfully
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #0, run #284500 0 events processed so far  <<<===
 284500 0 1000
 ToolSvc.tool1        INFO m_cf1 2.5
@@ -155,8 +78,8 @@ testMerge:  CaloUtils::ToolWithConstantsTestTool 2 .test.ca1 = [3, 4.5, 6]
 .test.order = 0
 
 
-ToolSvc.tool1       ERROR CaloUtils/src/ToolWithConstants.cxx:112 (StatusCode CaloUtils::ToolWithConstantsImpl::mergeConstants(const std::string&, int, CaloUtils::ToolWithConstantsImpl::Context&, bool, CaloRec::ToolConstants&) const): code FAILURE: Trying to write to ToolConstants for tools of differing types: foofoo and CaloUtils::ToolWithConstantsTestTool
-ToolSvc.tool1       ERROR CaloUtils/src/ToolWithConstants.cxx:118 (StatusCode CaloUtils::ToolWithConstantsImpl::mergeConstants(const std::string&, int, CaloUtils::ToolWithConstantsImpl::Context&, bool, CaloRec::ToolConstants&) const): code FAILURE: Trying to write to ToolConstants for differing versions of tool CaloUtils::ToolWithConstantsTestTool: 10 and 2
+ToolSvc.tool1       ERROR ../ToolWithConstants.cxx (StatusCode CaloUtils::ToolWithConstantsImpl::mergeConstants(const std::string&, int, CaloUtils::ToolWithConstantsImpl::Context&, bool, CaloRec::ToolConstants&) const): code FAILURE: Trying to write to ToolConstants for tools of differing types: foofoo and CaloUtils::ToolWithConstantsTestTool
+ToolSvc.tool1       ERROR ../ToolWithConstants.cxx (StatusCode CaloUtils::ToolWithConstantsImpl::mergeConstants(const std::string&, int, CaloUtils::ToolWithConstantsImpl::Context&, bool, CaloRec::ToolConstants&) const): code FAILURE: Trying to write to ToolConstants for differing versions of tool CaloUtils::ToolWithConstantsTestTool: 10 and 2
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #284500 1 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #1, run #284500 1 events processed so far  <<<===
 284500 0 1000
@@ -313,15 +236,7 @@ ToolSvc.tool2        INFO m_ca1 [3, 4.5, 6]
 
 ToolSvc.tool2        INFO m_ca2 Can't find key in
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #284500 8 events processed so far  <<<===
-Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
 ApplicationMgr       INFO Application Manager Stopped successfully
-IncidentProcAlg1     INFO Finalize
-TestAlg              INFO Finalizing TestAlg...
-IncidentProcAlg2     INFO Finalize
-IOVDbSvc             INFO  bytes in ((      0.00 ))s
-IOVDbSvc             INFO Connection sqlite://;schema=cooldummy.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: ((     0.00 ))s
-EventSelector        INFO finalize
-PyComponentMgr       INFO Finalizing PyComponentMgr...
 ToolSvc              INFO Removing all tools created by ToolSvc
 ApplicationMgr       INFO Application Manager Finalized successfully
 ApplicationMgr       INFO Application Manager Terminated successfully
-- 
GitLab


From af4daac4653c8eb8e2dc17f58af72c34b6a68d0b Mon Sep 17 00:00:00 2001
From: Ivan Yeletskikh <Ivan.Yeletskikh@cern.ch>
Date: Wed, 30 Sep 2020 15:18:20 +0200
Subject: [PATCH 069/403] update Tracking Cuts according to changes in
 ConfiguredNewTrackingCuts.py, fix test snippet

---
 .../InDetConfig/python/TrackingCutsFlags.py   | 52 +++----------------
 1 file changed, 7 insertions(+), 45 deletions(-)

diff --git a/InnerDetector/InDetConfig/python/TrackingCutsFlags.py b/InnerDetector/InDetConfig/python/TrackingCutsFlags.py
index 3e7aa0bcae61..760d47375e20 100644
--- a/InnerDetector/InDetConfig/python/TrackingCutsFlags.py
+++ b/InnerDetector/InDetConfig/python/TrackingCutsFlags.py
@@ -375,19 +375,8 @@ def createSLHCTrackingFlags():
     # --- cluster cuts
     icf.minClusters             = 9
     icf.minSiNotShared          = 8
-    #icf.maxShared               = 3 # cut is now on number of shared modules
-    #icf.maxHoles                = 3
-    #icf.maxPixelHoles           = D2
-    #icf.maxSctHoles             = 2
-    #icf.maxDoubleHoles          = 2
     # --- also tighten pattern cuts
     icf.radMax                  = 1000. * Units.mm
-    #icf.seedFilterLevel         = 1
-    #icf.nHolesMax               = max_holes
-    #icf.nHolesGapMax            = max_holes
-    #icf.Xi2max                  = 15.0
-    #icf.Xi2maxNoAdd             = 35.0
-    #icf.nWeightedClustersMin    = icf.InDet.Tracking.minClusters-1
     
     return icf
 
@@ -489,7 +478,7 @@ def createR3LargeD0TrackingFlags():
     icf.nWeightedClustersMin    = 8   
     icf.maxdImpactSSSSeeds      = 300.0
     icf.doZBoundary             = True
-    icf.keepAllConfirmedSeeds   = True
+    icf.keepAllConfirmedStripSeeds   = True
     icf.maxSeedsPerSP_Strips           = 1
     icf.keepAllConfirmedStripSeeds  = True
 
@@ -552,19 +541,9 @@ def createSLHCConversionFindingTrackingFlags():
     icf.maxZImpact              = 150.0 * Units.mm
     icf.minClusters             = 6
     icf.minSiNotShared          = 4
-    #icf.maxShared               = 3
     icf.maxHoles                = 0
-    #icf.maxPixelHoles           = D2
-    #icf.maxSctHoles             = 2
-    #icf.maxDoubleHoles          = 2
     # --- also tighten pattern cuts
     icf.radMax                  = 1000. * Units.mm
-    #icf.seedFilterLevel         = 1
-    #icf.nHolesMax               = max_holes
-    #icf.nHolesGapMax            = max_holes
-    #icf.Xi2max                  = 15.0
-    #icf.Xi2maxNoAdd             = 35.0
-    #icf.nWeightedClustersMin    = icf.InDet.Tracking.minClusters-1
     # --- turn on Z Boundary seeding
     icf.doZBoundary              = False #
 
@@ -609,16 +588,6 @@ def createForwardTracksTrackingFlags():
     icf.nHolesGapMax     = icf.maxHoles
     icf.radMax           = 600. * Units.mm
     icf.useTRT           = False # no TRT for forward tracks
-    icf.useSCTSeeding    = False
-    icf.minSecondaryPt   = 3 * Units.GeV
-    icf.maxPrimaryImpact = 5. * Units.mm
-    icf.roadWidth        = 12.
-    icf.maxdImpactSSSSeeds = 5.0
-    icf.keepAllConfirmedSeeds = True
-    icf.SecondarynHolesMax = 2
-    icf.SecondarynHolesGapMax = 2
-    icf.RoISeededBackTracking = False
-    icf.minRoIClusterEt = 6000. * Units.MeV
 
     return icf
 
@@ -772,12 +741,12 @@ def createHeavyIonTrackingFlags():
     icf.maxdImpactPPSSeeds = lambda pcf: \
                              1.7 if pcf.InDet.cutLevel >= 4 else True
     
-    icf.maxHoles = lambda pcf: 2 if pcf.InDet.cutLevel >= 4 else 0
-    icf.maxPixelHoles = lambda pcf: 1 if pcf.InDet.cutLevel >= 4 else 0
-    icf.maxSctHoles = lambda pcf: 1 if pcf.InDet.cutLevel >= 4 else 0
+    icf.maxHoles = lambda pcf: 2 if pcf.InDet.cutLevel in [4, 5] else 0
+    icf.maxPixelHoles = lambda pcf: 1 if pcf.InDet.cutLevel in [4, 5] else 0
+    icf.maxSctHoles = lambda pcf: 1 if pcf.InDet.cutLevel in [4, 5] else 0
     icf.maxDoubleHoles   = 0    
-    icf.Xi2max           = lambda pcf: 9. if pcf.InDet.cutLevel >= 4 else 6.
-    icf.Xi2maxNoAdd      = lambda pcf: 25. if pcf.InDet.cutLevel >= 4 else 10.        
+    icf.Xi2max           = lambda pcf: 9. if pcf.InDet.cutLevel in [4, 5] else 6.
+    icf.Xi2maxNoAdd      = lambda pcf: 25. if pcf.InDet.cutLevel in [4, 5] else 10.        
     icf.radMax           = 600. * Units.mm # restrict to pixels + first SCT layer
     icf.useTRT           = False
 
@@ -823,19 +792,12 @@ def createPixelTrackingFlags():
     icf.nHolesGapMax     = _pick( default = 1, hion = 0, cosmics = 3 )
     icf.useSCT           = False
     icf.useTRT           = False
-    icf.useSCTSeeding    = True
     icf.minSecondaryPt   = 3 * Units.GeV
     icf.maxPrimaryImpact = lambda pcf: 1000. * Units.mm if pcf.Beam.Type =="cosmics" else 5. * Units.mm 
     icf.roadWidth        = lambda pcf: 60.0 if pcf.Beam.Type =="cosmics" else 12.0
-    icf.maxdImpactSSSSeeds = 5.0
-    icf.keepAllConfirmedSeeds = True
-    icf.SecondarynHolesMax = 2
-    icf.SecondarynHolesGapMax = 2
-    icf.RoISeededBackTracking = False
-    icf.minRoIClusterEt = 6000. * Units.MeV
-    
     icf.maxZImpact       = lambda pcf: 10000. * Units.mm if pcf.Beam.Type == "cosmics" else maxZImpact_ranges
     icf.Xi2max           = lambda pcf: 60.0  if pcf.Beam.Type =="cosmics" else Xi2max_ranges
+    icf.Xi2maxNoAdd      = lambda pcf: 100.0  if pcf.Beam.Type =="cosmics" else Xi2maxNoAdd_ranges
     icf.nWeightedClustersMin = lambda pcf: 6 if pcf.Beam.Type =="cosmics" else 6 # why change if detault is also 6!
 
     return icf
-- 
GitLab


From 2a6c88e9a8c4e5bf2260e3f2c4c165c5ccf85c55 Mon Sep 17 00:00:00 2001
From: sutt <sutt@cern.ch>
Date: Thu, 1 Oct 2020 00:36:13 +0200
Subject: [PATCH 070/403] Replace use of old RegSelSvc by RegSelTools for the
 ID

The single RegSelSvc is to be replaced by a separate RegSelTool for each subsystem.

This merge request is to implement that migration for the ID code.

This code contains about 60 % of all the changes that are needed for the migration,
and most of the changes for the pixel, SCT and TRT.

```
For information the packages needing changes are
Innerdetector/InDetEventCnv/PixelRawDataByteStreamCnv
InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv
InnerDetector/InDetExample/InDetRecExample
InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation
InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool

Reconstruction/TRT_Rec
Reconstruction/iPat/iPatRecExample

Innerdetector/InDetExample/InDetTrigRecExample

InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat
InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider
InnerDetector/InDetTrigRecAlgs/SiTrigSPSeededTrackFinder
InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation
InnerDetector/InDetTrigRecAlgs/TRT_TrigSeededTrackFinder
InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackSegmentsFinder

Trigger/TrigTools/TrigOnlineSpacePointTool
Trigger/TriggerCommon/TriggerJobOpts

Trigger/TrigAlgorithms/TrigGenericAlgs
Trigger/TrigAlgorithms/TrigT2MinBias
Trigger/TrigHypothesis/TrigLongLivedParticlesHypo
```

plus the configuratin for every package that uses any of the above packages which will need to
instantiate the RegSelTools for the tool and algorithms configurables.
---
 .../share/InnerDetectorOverlay_jobOptions.py  | 11 ++++++
 .../PixelCalibAlgs/share/NoiseMapBuilder.py   |  7 +++-
 .../TRT_CalibAlgs/share/RAWHITemplate.py      |  1 +
 .../InDetConfig/python/TrackRecoConfig.py     |  4 ++-
 .../src/PixelRawDataProvider.cxx              |  4 +--
 .../src/PixelRawDataProvider.h                |  6 ++--
 .../share/ConfiguredInDetPreProcessingTRT.py  |  5 +++
 .../share/InDetReadBS_jobOptions.py           | 12 +++++++
 .../share/InDetRecPreProcessingSilicon.py     |  8 +++++
 .../python/InDetTrigConfigRecBackTracking.py  | 21 +++++++-----
 .../python/InDetTrigConfigRecNewTracking.py   |  7 ++++
 .../python/InDetTrigConfigRecPreProcessing.py | 34 +++++++++++++++++++
 .../share/InDetTrigRec_jobOptions.py          | 18 +++++-----
 .../PixelClusterization.h                     |  4 +--
 .../InDetPrepRawDataFormation/TRT_RIO_Maker.h |  4 +--
 .../src/PixelClusterization.cxx               |  3 +-
 .../src/TRT_RIO_Maker.cxx                     |  3 +-
 .../share/SiSPSeededTracksStandalone.py       |  4 +++
 .../SimpleTRT_SeededSpacePointFinder_ATL.h    |  4 +--
 .../SimpleTRT_SeededSpacePointFinder_ATL.cxx  |  3 +-
 .../Pixel_TrgClusterization.h                 |  5 +--
 .../SCT_TrgClusterization.h                   |  4 +--
 .../TRT_TrgRIO_Maker.h                        |  5 +--
 .../doc/packagedoc.h                          |  2 +-
 .../src/Pixel_TrgClusterization.cxx           | 12 ++-----
 .../src/SCT_TrgClusterization.cxx             | 11 ++----
 .../src/TRT_TrgRIO_Maker.cxx                  |  7 ++--
 .../TrigPixRawDataProvider.h                  |  8 +++--
 .../TrigSCTRawDataProvider.h                  |  5 +--
 .../TrigTRTRawDataProvider.h                  |  5 +--
 .../src/TrigPixRawDataProvider.cxx            |  8 ++---
 .../src/TrigSCTRawDataProvider.cxx            |  8 ++---
 .../src/TrigTRTRawDataProvider.cxx            |  9 ++---
 .../SiTrigSPSeededTrackFinder.h               |  6 ++--
 .../src/SiTrigSPSeededTrackFinder.cxx         | 18 ++++++----
 .../SiTrigSpacePointFinder.h                  |  8 +++--
 .../src/SiTrigSpacePointFinder.cxx            | 30 +++++++---------
 .../TRT_TrigSeededTrackFinder.h               |  5 ++-
 .../src/TRT_TrigSeededTrackFinder.cxx         | 14 +++-----
 .../TRT_TrigTrackSegmentsFinder.h             |  7 ++--
 .../src/TRT_TrigTrackSegmentsFinder.cxx       |  9 ++---
 .../share/PixelRTT_DigitizationValidation.py  | 11 +++++-
 .../share/PixelRTT_SimulationValidation.py    |  6 +++-
 .../TRT_Rec/TRT_Rec/TRT_Predictor.h           |  4 +--
 Reconstruction/TRT_Rec/src/TRT_Predictor.cxx  |  3 +-
 .../share/iPatRec_jobOptions.py               |  8 ++---
 .../TrigInDetConfig/python/InDetPT.py         |  3 ++
 .../TrigInDetConfig/python/InDetSetup.py      |  7 ++++
 .../TrigInDetConfig/python/TrigInDetConfig.py | 10 ++++--
 .../src/TrigSpacePointConversionTool.cxx      |  1 -
 50 files changed, 253 insertions(+), 149 deletions(-)

diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/InnerDetectorOverlay_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/InnerDetectorOverlay_jobOptions.py
index 5e3236432c13..304e723bf901 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/InnerDetectorOverlay_jobOptions.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/InnerDetectorOverlay_jobOptions.py
@@ -24,6 +24,10 @@ if DetFlags.overlay.pixel_on() or DetFlags.overlay.SCT_on() or DetFlags.overlay.
                 job.InDetPixelRawDataProvider.RDOKey = overlayFlags.bkgPrefix()+"PixelRDOs"
             else:
                 job.InDetPixelRawDataProvider.RDOKey = overlayFlags.dataStore()+"+PixelRDOs"
+
+            from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
+            job.InDetPixelRawDataProvider.RegSelTool = makeRegSelTool_Pixel()
+
             #ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "PixelRDO_Container/PixelRDOs" ]
             #ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "Trk::PixelClusterContainer/PixelOnlineClusters" ]
         else:
@@ -65,6 +69,10 @@ if DetFlags.overlay.pixel_on() or DetFlags.overlay.SCT_on() or DetFlags.overlay.
             #ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "SCT_RDO_Container/SCT_RDOs" ]
             #ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "Trk::SCT_ClusterContainer/SCT_OnlineClusters" ]
 
+#           from RegionSelector.RegSelToolConfig import makeRegSelTool_SCT
+#           job.InDetSCTRawDataProvider.RegSelTool_SCT = makeRegSelTool_SCT()
+
+
     if DetFlags.overlay.TRT_on():
         if overlayFlags.isDataOverlay():
             conddb.blockFolder("/TRT/Cond/DigVers")
@@ -92,6 +100,9 @@ if DetFlags.overlay.pixel_on() or DetFlags.overlay.SCT_on() or DetFlags.overlay.
                 job.InDetTRTRawDataProvider.RDOKey = overlayFlags.dataStore()+"+TRT_RDOs"
             #ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "TRT_RDO_Container/TRT_RDOs" ]
 
+#           from RegionSelector.RegSelToolConfig import makeRegSelTool_TRT
+#           job.InDetTRTRawDataProvider.RegSelTool = makeRegSelTool_TRT()
+
             #from IOVDbSvc.CondDB import conddb
             #conddb.addFolder("TRT","/TRT/Calib/T0","<tag>TrtCalibt0-UPD2-FDR2-01</tag>")
             #conddb.addFolder("TRT","/TRT/Calib/RT","<tag>TrtCalibRt-UPD2-FDR2-01</tag>")
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/NoiseMapBuilder.py b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/NoiseMapBuilder.py
index 67a11a30b79b..1d66ea56b492 100755
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/NoiseMapBuilder.py
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/NoiseMapBuilder.py
@@ -166,7 +166,12 @@ if doClusterization :
   include( "PixelConditionsServices/PixelCalibSvc_jobOptions.py" )
 
   from InDetPrepRawDataFormation.InDetPrepRawDataFormationConf import InDet__PixelClusterization
-  topSequence += InDet__PixelClusterization("PixelClusterization")
+
+  pixelClusterization = InDet__PixelClusterization("PixelClusterization")
+  from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
+  pixelClusterization.RegSelTool = makeReagSelTool_Pixel()
+
+  topSequence += pixelClusterization
   import logging
   logger = logging.getLogger( 'PixelCalibAlgs' )
   logger.info(topSequence.PixelClusterization)
diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/RAWHITemplate.py b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/RAWHITemplate.py
index 9675ae23a0f9..455f0adf6775 100644
--- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/RAWHITemplate.py
+++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/RAWHITemplate.py
@@ -422,6 +422,7 @@ print TRT_StrawStatus
 
 
 
+
 topSequence.InDetTRT_RIO_Maker.TRTEffiCut=0.5
 topSequence.InDetSCT_Clusterization.TRTEffiCut=0.5
 topSequence.InDetPixelClusterization.TRTEffiCut=0.5
diff --git a/InnerDetector/InDetConfig/python/TrackRecoConfig.py b/InnerDetector/InDetConfig/python/TrackRecoConfig.py
index b69f153bfa3f..6445930a9596 100644
--- a/InnerDetector/InDetConfig/python/TrackRecoConfig.py
+++ b/InnerDetector/InDetConfig/python/TrackRecoConfig.py
@@ -20,7 +20,9 @@ def PixelClusterizationCfg(flags, **kwargs) :
     sub_acc = PixelGangedAmbiguitiesFinderCfg(flags)
     ambi_finder=sub_acc.getPrimary()
     acc.merge(sub_acc)
-    acc.addEventAlgo( CompFactory.InDet.PixelClusterization(   name                    = "InDetPixelClusterization",
+
+    from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
+    acc.addEventAlgo( CompFactory.InDet.PixelClusterization(   name         = "InDetPixelClusterization",
                                                     clusteringTool          = merged_pixels_tool,
                                                     gangedAmbiguitiesFinder = ambi_finder,
                                                     DataObjectName          = "PixelRDOs",
diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.cxx b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.cxx
index d50b392fd753..53f53c1041a9 100644
--- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.cxx
+++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.cxx
@@ -115,9 +115,7 @@ StatusCode PixelRawDataProvider::execute(const EventContext& ctx) const {
      for (; roi!=roiE; ++roi) {
        superRoI.push_back(*roi);
      }
-     m_regionSelector->DetROBIDListUint( PIXEL,
-					 superRoI,
-					 listOfRobs);
+     m_regionSelector->ROBIDList( superRoI, listOfRobs );
   }
   std::vector<const ROBFragment*> listOfRobf;
 
diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.h b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.h
index b9f4c5605c38..56855e0b8d88 100644
--- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.h
+++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.h
@@ -24,7 +24,7 @@
 #include "StoreGate/ReadCondHandleKey.h"
 #include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h"
 #include "PixelRawDataByteStreamCnv/IPixelRawDataProviderTool.h"
-#include "IRegionSelector/IRegSelSvc.h"
+#include "IRegionSelector/IRegSelTool.h"
 
 // Forward declarations
 class PixelID;
@@ -49,8 +49,8 @@ class PixelRawDataProvider : public AthReentrantAlgorithm {
 private:
   const PixelID* m_pixel_id { nullptr };
 
-  ServiceHandle<IRegSelSvc> m_regionSelector                            { this, "RegSelSvc",  "RegSelSvc", "Region selector" };
-  ServiceHandle<IROBDataProviderSvc>   m_robDataProvider                { this, "ROBDataProvider", "ROBDataProviderSvc" };
+  ToolHandle<IRegSelTool>               m_regionSelector                { this, "RegSelTool",  "RegSelTool/RegSelTool_Pixel" };
+  ServiceHandle<IROBDataProviderSvc>    m_robDataProvider               { this, "ROBDataProvider", "ROBDataProviderSvc" };
   ToolHandle<IPixelRawDataProviderTool> m_rawDataTool                   { this, "ProviderTool", "PixelRawDataProviderTool"};
   Gaudi::Property<bool> m_roiSeeded                                     { this, "isRoI_Seeded", false, "Use RoI" }; // TODO, doubled information, empty RoIs collection name would be sufficent
   SG::ReadHandleKey<TrigRoiDescriptorCollection> m_roiCollectionKey     { this, "RoIs", "", "If RoI driven unpacking to be used, this is the key"};
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredInDetPreProcessingTRT.py b/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredInDetPreProcessingTRT.py
index a4289a2f4d3d..a18b6a4c2998 100644
--- a/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredInDetPreProcessingTRT.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredInDetPreProcessingTRT.py
@@ -174,6 +174,11 @@ class ConfiguredInDetPreProcessingTRT:
                                                    TrtDescrManageLocation = InDetKeys.TRT_Manager(),
                                                    TRTRDOLocation         = InDetKeys.TRT_RDOs(),
                                                    TRTRIOLocation         = collection)
+
+         from RegionSelector.RegSelToolConfig import makeRegSelTool_TRT
+         InDetTRT_RIO_Maker.RegSelTool = makeRegSelTool_TRT()
+
+
          topSequence += InDetTRT_RIO_Maker
          if (InDetFlags.doPrintConfigurables()):
             printfunc (InDetTRT_RIO_Maker)
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetReadBS_jobOptions.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetReadBS_jobOptions.py
index aa7b9745a8a4..e5d39621d692 100755
--- a/InnerDetector/InDetExample/InDetRecExample/share/InDetReadBS_jobOptions.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetReadBS_jobOptions.py
@@ -28,7 +28,13 @@ if DetFlags.readRDOBS.pixel_on():
   InDetPixelRawDataProvider = PixelRawDataProvider(name         = "InDetPixelRawDataProvider",
                                                    RDOKey       = InDetKeys.PixelRDOs(),
                                                    ProviderTool = InDetPixelRawDataProviderTool)
+
+  from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
+  InDetPixelRawDataProvider.RegSelTool = makeRegSelTool_Pixel()
+
   topSequence += InDetPixelRawDataProvider
+
+
   if (InDetFlags.doPrintConfigurables()):
     printfunc          (InDetPixelRawDataProvider)
   #InDetPixelRawDataProvider.OutputLevel = VERBOSE
@@ -80,6 +86,8 @@ if DetFlags.readRDOBS.TRT_on():
   from TRT_RawDataByteStreamCnv.TRT_RawDataByteStreamCnvConf import TRTRawDataProviderTool
   InDetTRTRawDataProviderTool = TRTRawDataProviderTool(name    = "InDetTRTRawDataProviderTool",
                                                       Decoder = InDetTRTRodDecoder)
+
+
   #ToolSvc += InDetTRTRawDataProviderTool
   if (InDetFlags.doPrintConfigurables()):
     printfunc      (InDetTRTRawDataProviderTool)
@@ -90,6 +98,10 @@ if DetFlags.readRDOBS.TRT_on():
   InDetTRTRawDataProvider = TRTRawDataProvider(name         = "InDetTRTRawDataProvider",
                                               RDOKey       = InDetKeys.TRT_RDOs(),
                                               ProviderTool = InDetTRTRawDataProviderTool)
+
+# from RegionSelector.RegSelToolConfig import makeRegSelTool_TRT
+# InDetTRTRawDataProvider.RegSelTool = makeRegSelTool_TRT()
+
   topSequence += InDetTRTRawDataProvider
   if (InDetFlags.doPrintConfigurables()):
     printfunc          (InDetTRTRawDataProvider)
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecPreProcessingSilicon.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecPreProcessingSilicon.py
index f35a14aadf02..bbe4a79c2593 100644
--- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecPreProcessingSilicon.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecPreProcessingSilicon.py
@@ -153,6 +153,10 @@ if InDetFlags.doPRDFormation():
                                                             gangedAmbiguitiesFinder = InDetPixelGangedAmbiguitiesFinder,
                                                             DataObjectName          = InDetKeys.PixelRDOs(),
                                                             ClustersName            = InDetKeys.PixelClusters())
+
+      from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
+      InDetPixelClusterization.RegSelTool = makeRegSelTool_Pixel()
+
       topSequence += InDetPixelClusterization
       if (InDetFlags.doPrintConfigurables()):
          printfunc (InDetPixelClusterization)
@@ -164,6 +168,10 @@ if InDetFlags.doPRDFormation():
                                                                 DataObjectName          = InDetKeys.PixelPURDOs(),
                                                                 ClustersName            = InDetKeys.PixelPUClusters(),
                                                                 AmbiguitiesMap = "PixelClusterAmbiguitiesMapPU")
+
+        from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
+        InDetPixelClusterizationPU.RegSelTool = makeRegSelTool_Pixel()
+
         topSequence += InDetPixelClusterizationPU
         if (InDetFlags.doPrintConfigurables()):
           printfunc (InDetPixelClusterizationPU)
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecBackTracking.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecBackTracking.py
index bd853408b9e6..95ba698ec6e6 100755
--- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecBackTracking.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecBackTracking.py
@@ -34,6 +34,9 @@ class TRT_TrigTrackSegmentsFinder_EF( InDet__TRT_TrigTrackSegmentsFinder ):
    def __init__(self, name="InDetTrigTRT_TrackSegmentsFinder_Photon_EF", type="photon", seqType="InsideOut"):
       super( InDet__TRT_TrigTrackSegmentsFinder, self ).__init__( name )
 
+      from RegionSelector.RegSelToolConfig import makeRegSelTool_TRT
+      self.RegSelTool = makeRegSelTool_TRT()
+
       from AthenaCommon.AppMgr import ToolSvc
       from InDetTrigRecExample.InDetTrigSliceSettings import InDetTrigSliceSettings
       from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags
@@ -150,6 +153,9 @@ class TRT_TrigSeededTrackFinder_EF( InDet__TRT_TrigSeededTrackFinder ):
    def __init__(self, name="InDetTrigTRT_SeededTrackFinder_Photon_EF", type="photon"):
       super( InDet__TRT_TrigSeededTrackFinder, self ).__init__( name )
       
+      from RegionSelector.RegSelToolConfig import makeRegSelTool_TRT
+      self.RegSelTool = makeRegSelTool_TRT()
+
       from AthenaCommon.AppMgr import ToolSvc         
       from InDetTrigRecExample.ConfiguredNewTrackingTrigCuts import EFIDTrackingCuts
       InDetTrigCutValues = EFIDTrackingCuts
@@ -174,14 +180,13 @@ class TRT_TrigSeededTrackFinder_EF( InDet__TRT_TrigSeededTrackFinder ):
            InDetTrigTRT_SeededSpacePointFinder.PRDtoTrackMap = 'InDetTrigPRDtoTrackMap_Photon_EF'
 
       elif InDetTrigFlags.loadSimpleTRTSeededSPFinder():
-         from RegionSelector.RegSelSvcDefault import RegSelSvcDefault
-         InDetTrigRegSelSvc = RegSelSvcDefault()
-         InDetTrigRegSelSvc.enablePixel = DetFlags.pixel_on()
-         InDetTrigRegSelSvc.enableSCT   = DetFlags.SCT_on()
-
-         ServiceMgr += InDetTrigRegSelSvc
-         if (InDetTrigFlags.doPrintConfigurables()):
-            print (              InDetTrigRegSelSvc)
+         # from RegionSelector.RegSelSvcDefault import RegSelSvcDefault
+         # InDetTrigRegSelSvc = RegSelSvcDefault()
+         # InDetTrigRegSelSvc.enablePixel = DetFlags.pixel_on()
+         # InDetTrigRegSelSvc.enableSCT   = DetFlags.SCT_on()
+         # ServiceMgr += InDetTrigRegSelSvc
+         # if (InDetTrigFlags.doPrintConfigurables()):
+         #    print (              InDetTrigRegSelSvc)
 
          from TRT_SeededSpacePointFinderTool.TRT_SeededSpacePointFinderToolConf import InDet__SimpleTRT_SeededSpacePointFinder_ATL
          InDetTrigTRT_SeededSpacePointFinder =  InDet__SimpleTRT_SeededSpacePointFinder_ATL(name                   = 'InDetTrigTRT_SeededSpFinder_'+type  ,
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecNewTracking.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecNewTracking.py
index 01712f83af5a..b9a3085f4426 100755
--- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecNewTracking.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecNewTracking.py
@@ -31,6 +31,13 @@ class SiTrigTrackFinder_EF( InDet__SiTrigSPSeededTrackFinder ):
   def __init__(self, name="SiTrigTrackFinder_Electron_EF", type="electron", lowPt=False):
     super( InDet__SiTrigSPSeededTrackFinder, self ).__init__( name )
     
+    from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
+    from RegionSelector.RegSelToolConfig import makeRegSelTool_SCT
+
+    self.RegSelTool_Pixel = makeRegSelTool_Pixel()
+    self.RegSelTool_SCT   = makeRegSelTool_SCT()
+
+
     from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigPrdAssociationTool, \
         InDetTrigPatternPropagator, InDetTrigPatternUpdator, \
         InDetTrigRotCreator
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPreProcessing.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPreProcessing.py
index b22d5446699f..e5fdf17b536a 100755
--- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPreProcessing.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPreProcessing.py
@@ -40,6 +40,8 @@ class PixelClustering_EF( InDet__Pixel_TrgClusterization ):
    def __init__(self, name="PixelClustering_Electron_EF", type="electron"):
       super( InDet__Pixel_TrgClusterization, self ).__init__( name )
       
+      from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
+      self.RegSelTool = makeRegSelTool_Pixel()
       
       from AthenaCommon.AppMgr import ToolSvc
       # configure tools used
@@ -65,6 +67,10 @@ class PixelClustering_EF( InDet__Pixel_TrgClusterization ):
           InDet__TrigPixRawDataProvider(name="TrigPixRawDataProvider_EF",
                                         RawDataProviderTool = InDetTrigPixelRawDataProviderTool,
                                         RDOKey = EF_PixRDOKey)
+
+      from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
+      InDetTrigPixRawDataProvider.RegSelTool = makeRegSelTool_Pixel()
+
       ToolSvc += InDetTrigPixRawDataProvider
 
 
@@ -123,6 +129,9 @@ class SCTClustering_EF( InDet__SCT_TrgClusterization ):
    def __init__(self, name= "SCTClustering_Electron_EF", type="electron" ):
       super(InDet__SCT_TrgClusterization, self).__init__(name)
 
+      from RegionSelector.RegSelToolConfig import makeRegSelTool_SCT
+      self.RegSelTool = makeRegSelTool_SCT()
+
       from AthenaCommon.AppMgr import ToolSvc
       from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags
 
@@ -143,6 +152,7 @@ class SCTClustering_EF( InDet__SCT_TrgClusterization ):
       from InDetTrigRecExample.InDetTrigConditionsAccess import SCT_ConditionsSetup
       InDetTrigSCTRawDataProviderTool = SCTRawDataProviderTool(name    = "InDetTrigSCTRawDataProviderTool",
                                                                Decoder = InDetTrigSCTRodDecoder)
+
       ToolSvc += InDetTrigSCTRawDataProviderTool
 
 
@@ -151,6 +161,12 @@ class SCTClustering_EF( InDet__SCT_TrgClusterization ):
           InDet__TrigSCTRawDataProvider(name="TrigSCTRawDataProvider_EF",
                                         RDOKey = EF_SCTRDOKey,
                                         RawDataTool = InDetTrigSCTRawDataProviderTool)
+
+      from RegionSelector.RegSelToolConfig import makeRegSelTool_SCT
+      InDetTrigSCTRawDataProvider.RegSelTool = makeRegSelTool_SCT()
+
+
+
       ToolSvc += InDetTrigSCTRawDataProvider
 
       from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigClusterMakerTool
@@ -204,6 +220,10 @@ class TRTDriftCircleMaker_EF(  InDet__TRT_TrgRIO_Maker ):
    def __init__(self, name= "TRTDriftCircleMaker_Electron_EF", type="electron" ):
       super(InDet__TRT_TrgRIO_Maker, self).__init__(name)
 
+      from RegionSelector.RegSelToolConfig import makeRegSelTool_TRT
+      self.RegSelTool = makeRegSelTool_TRT()
+      
+
       from AthenaCommon.AppMgr import ToolSvc
 
       from InDetTrigRecExample.InDetTrigCommonTools import InDetTrigTRTRodDecoder
@@ -221,6 +241,9 @@ class TRTDriftCircleMaker_EF(  InDet__TRT_TrgRIO_Maker ):
                                         RDOKey = EF_TRTRDOKey,
                                         RawDataTool="TRTRawDataProviderTool/InDetTrigTRTRawDataProviderTool")
 
+      from RegionSelector.RegSelToolConfig import makeRegSelTool_TRT
+      InDetTrigTRTRawDataProvider.RegSelTool = makeRegSelTool_TRT()
+
       ToolSvc += InDetTrigTRTRawDataProvider
       
       from InDetTrigRecExample.InDetTrigCommonTools import InDetTrigTRT_DriftFunctionTool, \
@@ -279,6 +302,11 @@ class SiTrigSpacePointFinder_EF( InDet__SiTrigSpacePointFinder ):
    def __init__(self, name = "SiTrigSpacePointFinder_Electron_EF", type="electron", lowPt=False):
       super (InDet__SiTrigSpacePointFinder, self).__init__(name)
 
+      from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
+      from RegionSelector.RegSelToolConfig import makeRegSelTool_SCT
+      self.RegSelTool_Pixel = makeRegSelTool_Pixel()
+      self.RegSelTool_SCT   = makeRegSelTool_SCT()
+
       from AthenaCommon.AppMgr import ToolSvc
       
       from InDetTrigRecExample.InDetTrigConfigRecLoadTools import \
@@ -302,6 +330,12 @@ class SiTrigSpacePointFinder_EF( InDet__SiTrigSpacePointFinder ):
       self.ProcessSCTs = True
       self.ProcessOverlaps = InDetTrigFlags.doOverlapSP()
 
+#      from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
+#      from RegionSelector.RegSelToolConfig import makeRegSelTool_SCT
+
+#      self.RegSelTool_Pixel = makeRegSelTool_Pixel()
+#      self.RegSelTool_SCT   = makeRegSelTool_SCT()
+
       if type=='cosmicsN':
          from InDetTrigRecExample.InDetTrigConfigRecLoadToolsCosmics import \
              InDetTrigSiSpacePointMakerToolCosmics, SCT_TrigSpacePointToolCosmics
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/share/InDetTrigRec_jobOptions.py b/InnerDetector/InDetExample/InDetTrigRecExample/share/InDetTrigRec_jobOptions.py
index f5627a5d66ce..85d5fbef1c05 100755
--- a/InnerDetector/InDetExample/InDetTrigRecExample/share/InDetTrigRec_jobOptions.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/share/InDetTrigRec_jobOptions.py
@@ -60,18 +60,18 @@ else:
   include ("InDetRecExample/InDetRecConditionsAccess.py")
 
 #manipulate RegSelSvc settings to be aware of the inactive detelems
-from RegionSelector.RegSelSvcDefault import RegSelSvcDefault
-RegSelSvc = RegSelSvcDefault()
+# from RegionSelector.RegSelSvcDefault import RegSelSvcDefault
+# RegSelSvc = RegSelSvcDefault()
 
-RegSelSvc.DisableFromConditions = False
-RegSelSvc.DisablePixelFromConditions = False
-RegSelSvc.DisableTRTFromConditions = False
-RegSelSvc.DisableSCTFromConditions = False
+# RegSelSvc.DisableFromConditions = False
+# RegSelSvc.DisablePixelFromConditions = False
+# RegSelSvc.DisableTRTFromConditions = False
+# RegSelSvc.DisableSCTFromConditions = False
 from InDetTrigRecExample.InDetTrigConfigConditions import \
          SCT_ConditionsSetup, TRT_ConditionsSetup
-RegSelSvc.PixConditionsSvc = ""      #empty as it does not work
-RegSelSvc.SCTConditionsTool = "SCT_ConditionsSummaryTool/"+SCT_ConditionsSetup.instanceName("InDetSCT_ConditionsSummaryTool")
-RegSelSvc.TRTConditionsSvc = "TRT_ConditionsSummarySvc/"+TRT_ConditionsSetup.instanceName("InDetTRTConditionsSummaryService")
+# RegSelSvc.PixConditionsSvc = ""      #empty as it does not work
+# RegSelSvc.SCTConditionsTool = "SCT_ConditionsSummaryTool/"+SCT_ConditionsSetup.instanceName("InDetSCT_ConditionsSummaryTool")
+# RegSelSvc.TRTConditionsSvc = "TRT_ConditionsSummarySvc/"+TRT_ConditionsSetup.instanceName("InDetTRTConditionsSummaryService")
 
 #this should be our common cabling setup/
 # online running data are dealt with in the TriggerJobOpts 
diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/PixelClusterization.h b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/PixelClusterization.h
index 969b27bb8bbd..0dc0a7b5ce4d 100644
--- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/PixelClusterization.h
+++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/PixelClusterization.h
@@ -30,7 +30,7 @@
 #include "InDetRawData/InDetRawDataCollection.h"
 #include "InDetRawData/PixelRDO_Container.h"
 #include "TrigSteeringEvent/TrigRoiDescriptorCollection.h"
-#include "IRegionSelector/IRegSelSvc.h"
+#include "IRegionSelector/IRegSelTool.h"
 #include "SiClusterizationTool/IPixelClusteringTool.h"
 
 
@@ -78,7 +78,7 @@ private:
   ToolHandle< PixelGangedAmbiguitiesFinder > m_gangedAmbiguitiesFinder; 
   SG::ReadHandleKey<PixelRDO_Container> m_rdoContainerKey;
   SG::ReadHandleKey<TrigRoiDescriptorCollection> m_roiCollectionKey;
-  ServiceHandle<IRegSelSvc>     m_regionSelector;     //!< region selector service
+  ToolHandle<IRegSelTool>     m_regionSelector { this, "RegSelTool", "RegSelTool/RegSelTool_Pixel" };     //!< region selector tool
   bool m_roiSeeded;
   const PixelID* m_idHelper;
   SG::WriteHandleKey<PixelClusterContainer> m_clusterContainerKey;
diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/TRT_RIO_Maker.h b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/TRT_RIO_Maker.h
index 87d61f41bedc..ca76abb53594 100644
--- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/TRT_RIO_Maker.h
+++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/TRT_RIO_Maker.h
@@ -27,7 +27,7 @@
 #include "InDetPrepRawData/TRT_DriftCircleContainer.h"
 #include "InDetRawData/TRT_RDO_Container.h"
 #include "TrigSteeringEvent/TrigRoiDescriptorCollection.h"
-#include "IRegionSelector/IRegSelSvc.h"
+#include "IRegionSelector/IRegSelTool.h"
 //fwd declarations
 class StatusCode;
 class ISvcLocator;
@@ -72,7 +72,7 @@ namespace InDet{
 
     SG::ReadHandleKey<TrigRoiDescriptorCollection> m_roiCollectionKey{this, "RoIs", "", "RoIs to read in"};
     BooleanProperty m_roiSeeded{this, "isRoI_Seeded", false, "Use RoI"};
-    ServiceHandle<IRegSelSvc>     m_regionSelector;     //!< region selector service
+    ToolHandle<IRegSelTool>     m_regionSelector { this, "RegSelTool", "RegSelTool/RegSelTool_TRT" };     //!< region selector tool
     SG::UpdateHandleKey<InDet::TRT_DriftCircleContainerCache> m_rioContainerCacheKey;
 
   };
diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/PixelClusterization.cxx b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/PixelClusterization.cxx
index bf694c1e3ed6..7f3c93be1474 100644
--- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/PixelClusterization.cxx
+++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/PixelClusterization.cxx
@@ -35,7 +35,6 @@ namespace InDet{
   m_gangedAmbiguitiesFinder("InDet::PixelGangedAmbiguitiesFinder", this), //made private
   m_rdoContainerKey(""),
   m_roiCollectionKey(""),
-  m_regionSelector("RegSelSvc", name),
   m_roiSeeded(false),
   m_idHelper(nullptr),
   m_clusterContainerKey(""),
@@ -163,7 +162,7 @@ namespace InDet{
       for (; roi!=roiE; ++roi) {
         
         listOfPixIds.clear();//Prevents needless memory reallocations
-        m_regionSelector->DetHashIDList( PIXEL, **roi, listOfPixIds);
+        m_regionSelector->HashIDList( **roi, listOfPixIds);
         ATH_MSG_VERBOSE(**roi);
         ATH_MSG_VERBOSE( "REGTEST: Pixel : Roi contains " 
 		     << listOfPixIds.size() << " det. Elements" );
diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/TRT_RIO_Maker.cxx b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/TRT_RIO_Maker.cxx
index 0008dcf25499..4f1628039ecf 100644
--- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/TRT_RIO_Maker.cxx
+++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/TRT_RIO_Maker.cxx
@@ -34,7 +34,6 @@ namespace InDet {
   m_rioContainerKey("TRT_DriftCircles"),
   m_mode_rio_production(0),
   m_trtBadChannels(0),
-  m_regionSelector("RegSelSvc", name),
   m_rioContainerCacheKey("")
   {
     // Read TRT_RIO_Maker steering parameters
@@ -110,7 +109,7 @@ namespace InDet {
       for(const TrigRoiDescriptor* roi : *roiCollection){
          
          listOfTRTIds.clear(); //Prevents needless memory reallocations
-         m_regionSelector->DetHashIDList( TRT, *roi, listOfTRTIds);
+         m_regionSelector->HashIDList( *roi, listOfTRTIds);
 #ifndef NDEBUG
           ATH_MSG_VERBOSE(*roi);
           ATH_MSG_VERBOSE( "REGTEST: SCT : Roi contains " 
diff --git a/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/share/SiSPSeededTracksStandalone.py b/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/share/SiSPSeededTracksStandalone.py
index 3698aa44f90d..4798ef3495e3 100644
--- a/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/share/SiSPSeededTracksStandalone.py
+++ b/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/share/SiSPSeededTracksStandalone.py
@@ -499,6 +499,10 @@ if doPixel:
                                                           gangedAmbiguitiesFinder = InDetPixelGangedAmbiguitiesFinder,
                                                           DataObjectName          = InDetKeys.PixelRDOs(),
                                                           ClustersName            = InDetKeys.PixelClusters())
+
+    from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
+    InDetPixelClusterization.RegSelTool = makeRegSelTool_Pixel()
+
     topSequence += InDetPixelClusterization
 
 # For SCT
diff --git a/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/TRT_SeededSpacePointFinderTool/SimpleTRT_SeededSpacePointFinder_ATL.h b/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/TRT_SeededSpacePointFinderTool/SimpleTRT_SeededSpacePointFinder_ATL.h
index 400fd153c4b1..46de857d44fa 100755
--- a/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/TRT_SeededSpacePointFinderTool/SimpleTRT_SeededSpacePointFinder_ATL.h
+++ b/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/TRT_SeededSpacePointFinderTool/SimpleTRT_SeededSpacePointFinder_ATL.h
@@ -26,7 +26,7 @@
 
 #include "TrkSpacePoint/SpacePointContainer.h" 
 #include "TrkSpacePoint/SpacePointOverlapCollection.h" 
-#include "IRegionSelector/IRegSelSvc.h"
+#include "IRegionSelector/IRegSelTool.h"
 #include "TrkEventUtils/PRDtoTrackMap.h"
 
 class MsgStream;
@@ -122,7 +122,7 @@ namespace InDet{
 
 
        /** Region Selector */
-       ServiceHandle<IRegSelSvc> m_pRegionSelector;
+       ToolHandle<IRegSelTool> m_pRegionSelector{ this, "RegSelTool_SCT", "RegSelTool/RegSelTool_SCT" };
 
        /**ID SCT helper*/
        const SCT_ID* m_sctId;
diff --git a/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/src/SimpleTRT_SeededSpacePointFinder_ATL.cxx b/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/src/SimpleTRT_SeededSpacePointFinder_ATL.cxx
index a18b2f4fd4fa..d73412d42955 100755
--- a/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/src/SimpleTRT_SeededSpacePointFinder_ATL.cxx
+++ b/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/src/SimpleTRT_SeededSpacePointFinder_ATL.cxx
@@ -40,7 +40,6 @@ InDet::SimpleTRT_SeededSpacePointFinder_ATL::SimpleTRT_SeededSpacePointFinder_AT
     m_directionEtaCut(0.5),
     m_positionPhiCut(5.),
     m_positionZ_Cut(250.),
-    m_pRegionSelector("RegSelSvc",n),
     m_sctId(nullptr),
     m_trtId(nullptr)
 {
@@ -243,7 +242,7 @@ void InDet::SimpleTRT_SeededSpacePointFinder_ATL::getHashesInROI(const Trk::Trac
   //// AAAARGH!!! No checking that you are within the correct phi range???
   RoiDescriptor roi(  eta-deltaEta, eta+deltaEta, phi-deltaPhi, phi+deltaPhi);
 
-  m_pRegionSelector->DetHashIDList(SCT, roi, listOfSCT_Hashes);
+  m_pRegionSelector->HashIDList( roi, listOfSCT_Hashes );
 
   // copy Hashes into Set to be able to search them
   for (std::vector<IdentifierHash>::const_iterator it = listOfSCT_Hashes.begin();
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/Pixel_TrgClusterization.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/Pixel_TrgClusterization.h
index 69320dc0d480..745a9ae5d8cd 100755
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/Pixel_TrgClusterization.h
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/Pixel_TrgClusterization.h
@@ -44,8 +44,9 @@
 #include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/ServiceHandle.h"
 
+#include "IRegionSelector/IRegSelTool.h"
+
 
-class IRegSelSvc;
 class TrigTimer;
 class PixelID;
 class IROBDataProviderSvc;
@@ -116,7 +117,7 @@ namespace InDet {
     const PixelID*           m_idHelper{};
     PixelClusterContainer*   m_clusterContainer{};
     
-    ServiceHandle<IRegSelSvc>     m_regionSelector;     //!< region selector service
+    ToolHandle<IRegSelTool>  m_regionSelector{ this, "RegSelTool", "RegSelTool/RegSelTool_Pixel" };     //!< region selector service
     bool m_doFullScan;             //!< support for FullScan mode
     double                   m_etaHalfWidth;       //!< ROI half-width in eta
     double                   m_phiHalfWidth;       //!< ROI half-width in phi
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/SCT_TrgClusterization.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/SCT_TrgClusterization.h
index 72e2844ccfc4..971401aefd88 100755
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/SCT_TrgClusterization.h
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/SCT_TrgClusterization.h
@@ -37,7 +37,7 @@
 #include "InDetConditionsSummaryService/IInDetConditionsTool.h"
 
 #include "Identifier/IdentifierHash.h"
-#include "IRegionSelector/IRegSelSvc.h"
+#include "IRegionSelector/IRegSelTool.h"
 #include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h"
 #include "SiClusterizationTool/ISCT_ClusteringTool.h"
 #include "InDetTrigToolInterfaces/ITrigRawDataProviderTool.h"
@@ -110,7 +110,7 @@ namespace InDet {
     SCT_ClusterContainer*   m_clusterContainer;
     
     // !<  Trigger part
-    ServiceHandle<IRegSelSvc>    m_regionSelector; //!<  region selector service
+    ToolHandle<IRegSelTool>    m_regionSelector{ this, "RegSelTool", "RegSelTool/RegSelTool_SCT" }; //!<  region selector service
     bool m_doFullScan;                       //!<  support for FullScan mode
     double                  m_etaHalfWidth;          //!<  ROI half-width in eta.
     double                  m_phiHalfWidth;          //!<  ROI half-width in phi.
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/TRT_TrgRIO_Maker.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/TRT_TrgRIO_Maker.h
index 78f85d6397de..22c1d61f8dbd 100755
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/TRT_TrgRIO_Maker.h
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/TRT_TrgRIO_Maker.h
@@ -33,7 +33,8 @@
 //typedef - cannot be declared forward
 #include "InDetPrepRawData/TRT_DriftCircleContainer.h"
 
-class IRegSelSvc;
+#include "IRegionSelector/IRegSelTool.h"
+
 class TrigTimer;
 class ITRT_ByteStream_ConditionsSvc;
 class IROBDataProviderSvc;
@@ -84,7 +85,7 @@ namespace InDet{
     InDet::TRT_DriftCircleContainer* m_riocontainer       ;
     int                            m_mode_rio_production;
 
-    ServiceHandle<IRegSelSvc>    m_regionSelector; //!<  region selector service
+    ToolHandle<IRegSelTool>    m_regionSelector { this, "RegSelTool", "RegSelTool/RegSelTool_TRT" }; //!<  region selector service
     ServiceHandle<ITRT_ByteStream_ConditionsSvc> m_bsErrorSvc;
     ServiceHandle<IROBDataProviderSvc>    m_robDataProvider;   //!< ROB Data Provide Service
     
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/doc/packagedoc.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/doc/packagedoc.h
index 861903ddfae9..d034ff42b65c 100644
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/doc/packagedoc.h
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/doc/packagedoc.h
@@ -69,7 +69,7 @@ ErrorStrategy
 
 Trigger-specific parameters are:
 <ul>
-<li>RegionSelectorToolName = "RegSelSvc" name of the RegionSelector tool, </li>
+<li>RegSelToolName = "RegSelTool/RegSelTool_TRT" name of the RegSel tool, </li>
 <li>EtaHalfWidth  - RoI half-width in eta </li>
 <li>PhiHalfWidth - RoI half-width in phi </li>
 </ul>
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/Pixel_TrgClusterization.cxx b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/Pixel_TrgClusterization.cxx
index f3ff3c4f81df..1dd2cb7184bf 100755
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/Pixel_TrgClusterization.cxx
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/Pixel_TrgClusterization.cxx
@@ -31,7 +31,7 @@
 
 // Trigger
 #include "TrigSteeringEvent/TrigRoiDescriptor.h"
-#include "IRegionSelector/IRegSelSvc.h"
+#include "IRegionSelector/IRegSelTool.h"
 #include "IRegionSelector/IRoiDescriptor.h"
 #include "TrigTimeAlgs/TrigTimerSvc.h"
 
@@ -57,7 +57,6 @@ namespace InDet{
     m_pixelRDOContainerName("PixelRDOs"),    // RDO container
     m_clustersName("PixelTrigClusters"),
     m_ambiguitiesMapName("TrigPixelClusterAmbiguitiesMap"),
-    m_regionSelector("RegSelSvc", name),
     m_doFullScan(false),
     m_etaHalfWidth(0.1),
     m_phiHalfWidth(0.1),
@@ -71,7 +70,6 @@ namespace InDet{
     declareProperty("ClustersName",            m_clustersName);
     declareProperty("AmbiguitiesMapName",      m_ambiguitiesMapName);
 
-    declareProperty("RegionSelectorTool",      m_regionSelector);
     declareProperty("doFullScan",              m_doFullScan);
     declareProperty("EtaHalfWidth",            m_etaHalfWidth);
     declareProperty("PhiHalfWidth",            m_phiHalfWidth);
@@ -361,7 +359,7 @@ namespace InDet{
 
     if (!(roi->isFullscan())){
       if(doTiming()) m_timerRegSel->start();
-      m_regionSelector->DetHashIDList( PIXEL, *roi, m_listOfPixIds);
+      m_regionSelector->HashIDList( *roi, m_listOfPixIds);
       m_numPixIds = m_listOfPixIds.size();
       ATH_MSG_DEBUG( "REGTEST: Pixel : Roi contains " 
 		     << m_numPixIds << " det. Elements" );
@@ -619,12 +617,8 @@ namespace InDet{
 		   << " located at   phi = " <<  roi->phi()
 		   << ", eta = " << roi->eta() );
 		
-
-    //const TrigRoiDescriptor fs(true);
-
     std::vector<unsigned int> uIntListOfRobs;
-    m_regionSelector->DetROBIDListUint( PIXEL, *roi, uIntListOfRobs );
-    //m_regionSelector->DetROBIDListUint( PIXEL, fs, uIntListOfRobs );
+    m_regionSelector->ROBIDList( *roi, uIntListOfRobs );
 
     ATH_MSG_DEBUG( "list of pre-registered ROB ID in PIX: " );
     for(uint i_lid(0); i_lid<uIntListOfRobs.size(); i_lid++)
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/SCT_TrgClusterization.cxx b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/SCT_TrgClusterization.cxx
index dd13ab00bd92..7f629e254a4a 100755
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/SCT_TrgClusterization.cxx
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/SCT_TrgClusterization.cxx
@@ -31,7 +31,7 @@
 
 //Trigger
 #include "TrigSteeringEvent/TrigRoiDescriptor.h"
-#include "IRegionSelector/IRegSelSvc.h"
+#include "IRegionSelector/IRegSelTool.h"
 #include "IRegionSelector/IRoiDescriptor.h"
 #include "TrigTimeAlgs/TrigTimerSvc.h"
 
@@ -58,7 +58,6 @@ namespace InDet{
     m_flaggedCondDataName("SCT_FlaggedCondData_TRIG"),
     m_idHelper(0),
     m_clusterContainer(nullptr),
-    m_regionSelector("RegSelSvc", name),
     m_doFullScan(false),
     m_etaHalfWidth(0.1),
     m_phiHalfWidth(0.1),
@@ -77,7 +76,6 @@ namespace InDet{
     declareProperty("clusteringTool",      m_clusteringTool);
     declareProperty("ClustersName",        m_clustersName);
     declareProperty("FlaggedCondDataName", m_flaggedCondDataName);
-    declareProperty("RegionSelectorTool",  m_regionSelector );
     declareProperty("doFullScan",          m_doFullScan );
 
     declareProperty("EtaHalfWidth",        m_etaHalfWidth);
@@ -366,7 +364,7 @@ namespace InDet{
 
     if (!(roi->isFullscan())){
       if(doTiming()) m_timerRegSel->start();
-      m_regionSelector->DetHashIDList(SCT, *roi, m_listOfSctIds );
+      m_regionSelector->HashIDList( *roi, m_listOfSctIds );
       if(doTiming()) m_timerRegSel->stop();
       
       m_numSctIds = m_listOfSctIds.size();
@@ -620,11 +618,8 @@ namespace InDet{
     ATH_MSG_DEBUG( "REGTEST prepareROBs / event"
 		   << *roi);
 
-    //const TrigRoiDescriptor fs(true);
-
     std::vector<unsigned int> uIntListOfRobs;
-    m_regionSelector->DetROBIDListUint( SCT, *roi, uIntListOfRobs );
-    //m_regionSelector->DetROBIDListUint( SCT, fs, uIntListOfRobs );
+    m_regionSelector->ROBIDList( *roi, uIntListOfRobs );
 
 
     ATH_MSG_DEBUG( "list of pre-registered ROB ID in SCT: " );
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/TRT_TrgRIO_Maker.cxx b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/TRT_TrgRIO_Maker.cxx
index 6b41fc716d90..5dc99d7ae9b8 100755
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/TRT_TrgRIO_Maker.cxx
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/TRT_TrgRIO_Maker.cxx
@@ -22,7 +22,7 @@
 
 //Trigger
 #include "TrigSteeringEvent/TrigRoiDescriptor.h"
-#include "IRegionSelector/IRegSelSvc.h"
+#include "IRegionSelector/IRegSelTool.h"
 #include "IRegionSelector/IRoiDescriptor.h"
 #include "TrigTimeAlgs/TrigTimerSvc.h"
 
@@ -43,7 +43,6 @@ namespace InDet{
     m_driftcircle_tool("InDet::TRT_DriftCircleTool"), 
     m_riocontainer(0),
     m_mode_rio_production(0),
-    m_regionSelector("RegSelSvc", name),
     m_bsErrorSvc("TRT_ByteStream_ConditionsSvc",name),
     m_robDataProvider("ROBDataProviderSvc", name),
     m_doFullScan(false),
@@ -293,7 +292,7 @@ namespace InDet{
     
       if(doTiming()) m_timerRegSel->start();
       
-      m_regionSelector->DetHashIDList( TRT, *roi, m_listOfTrtIds);
+      m_regionSelector->HashIDList( *roi, m_listOfTrtIds);
       m_numTrtIds = m_listOfTrtIds.size();
 
       if(doTiming()) m_timerRegSel->stop();
@@ -499,7 +498,7 @@ namespace InDet{
     ATH_MSG_DEBUG( "REGTEST prepareROBs / event RoI " << *roi);
 
     std::vector<unsigned int> uIntListOfRobs;
-    m_regionSelector->DetROBIDListUint( TRT, *roi, uIntListOfRobs );
+    m_regionSelector->ROBIDList( *roi, uIntListOfRobs );
 
     ATH_MSG_DEBUG( "list of pre-registered ROB ID in TRT: ");
     for(auto i : uIntListOfRobs)
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/InDetTrigRawDataProvider/TrigPixRawDataProvider.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/InDetTrigRawDataProvider/TrigPixRawDataProvider.h
index 0c6feddca789..ce5a4ef5be91 100644
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/InDetTrigRawDataProvider/TrigPixRawDataProvider.h
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/InDetTrigRawDataProvider/TrigPixRawDataProvider.h
@@ -26,12 +26,14 @@
 #include "InDetRawData/PixelRDO_Container.h"
 #include "InDetByteStreamErrors/IDCInDetBSErrContainer.h"
 
+#include "IRegionSelector/IRegSelTool.h"
+
 #include <string>
 
 class IRoiDescriptor;
 class PixelID;
 class IROBDataProviderSvc;
-class IRegSelSvc;
+
 class IPixelRawDataProviderTool;
 
 namespace InDet {
@@ -55,7 +57,9 @@ namespace InDet {
 
     
   private:
-    ServiceHandle<IRegSelSvc>             m_regionSelector;     
+
+    ToolHandle<IRegSelTool>               m_regionSelector { this, "RegSelTool", "RegSelTool/RegSelTool_Pixel" };     
+
     ServiceHandle<IROBDataProviderSvc>    m_robDataProvider;
     ToolHandle<IPixelRawDataProviderTool>  m_rawDataTool;
     const PixelID*                        m_id; 
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/InDetTrigRawDataProvider/TrigSCTRawDataProvider.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/InDetTrigRawDataProvider/TrigSCTRawDataProvider.h
index 6b9091979554..681f4fe663c3 100644
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/InDetTrigRawDataProvider/TrigSCTRawDataProvider.h
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/InDetTrigRawDataProvider/TrigSCTRawDataProvider.h
@@ -28,11 +28,12 @@
 #include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/IIncidentListener.h"
 
+#include "IRegionSelector/IRegSelTool.h"
+
 #include <string>
 
 class TrigRoiDescriptor;
 class SCT_ID;
-class IRegSelSvc;
 class IROBDataProviderSvc;
 class MsgStream;
 class IRoiDescriptor;
@@ -62,7 +63,7 @@ namespace InDet {
     StatusCode initContainer();
     
   private:
-    ServiceHandle<IRegSelSvc>           m_regionSelector;     
+    ToolHandle<IRegSelTool>             m_regionSelector { this, "RegSelTool", "RegSelTool/RegSelTool_SCT" };     
     ServiceHandle<IROBDataProviderSvc>  m_robDataProvider;
     ToolHandle<ISCTRawDataProviderTool> m_rawDataTool{this, "RawDataTool", "SCTRawDataProviderTool"};
     ToolHandle<ISCT_CablingTool>        m_cablingTool{this, "SCT_CablingTool", "SCT_CablingTool", "Tool to retrieve SCT Cabling"};
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/InDetTrigRawDataProvider/TrigTRTRawDataProvider.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/InDetTrigRawDataProvider/TrigTRTRawDataProvider.h
index fe0b3816a02c..bb51dd9f3c23 100644
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/InDetTrigRawDataProvider/TrigTRTRawDataProvider.h
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/InDetTrigRawDataProvider/TrigTRTRawDataProvider.h
@@ -25,13 +25,14 @@
 #include "InDetRawData/TRT_RDO_Container.h"
 #include "TRT_ConditionsServices/ITRT_ByteStream_ConditionsSvc.h"
 
+#include "IRegionSelector/IRegSelTool.h"
+
 #include <string>
 
 class IRoiDescriptor;
 class TRT_ID;
 class ITRT_CablingSvc;
 class IROBDataProviderSvc;
-class IRegSelSvc;
 class ITRTRawDataProviderTool;
 
 
@@ -57,7 +58,7 @@ namespace InDet {
     StatusCode initContainer();
     
   private:
-    ServiceHandle<IRegSelSvc>           m_regionSelector;     
+    ToolHandle<IRegSelTool>             m_regionSelector { this, "RegSelTool", "RegSetTool/RegSelTool_TRT" };     
     ServiceHandle<IROBDataProviderSvc>  m_robDataProvider;
     ToolHandle<ITRTRawDataProviderTool> m_rawDataTool;
     ServiceHandle<ITRT_CablingSvc>      m_IdMapping;
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/src/TrigPixRawDataProvider.cxx b/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/src/TrigPixRawDataProvider.cxx
index 313b6bd8f45d..0b2913901239 100644
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/src/TrigPixRawDataProvider.cxx
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/src/TrigPixRawDataProvider.cxx
@@ -7,7 +7,7 @@
 #include "TrigSteeringEvent/TrigRoiDescriptor.h" 
 #include "AthenaKernel/getMessageSvc.h"
 #include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h"
-#include "IRegionSelector/IRegSelSvc.h" 
+#include "IRegionSelector/IRegSelTool.h" 
 #include "PixelRawDataByteStreamCnv/IPixelRawDataProviderTool.h"
 
 
@@ -26,7 +26,6 @@ namespace InDet {
 						  const std::string& name,
 						  const IInterface* parent) :
     AthAlgTool(type,name,parent),
-    m_regionSelector  ("RegSelSvc", name), 
     m_robDataProvider ("ROBDataProviderSvc", name),
     m_rawDataTool     ("PixelRawDataProviderTool"),
     m_id(0),
@@ -133,9 +132,8 @@ namespace InDet {
       ATH_MSG_DEBUG ( "REGTEST:" << *roi );
     
       //double zmax = 168; 
-      m_regionSelector->DetROBIDListUint( PIXEL, 
-					  *roi, 
-					  robIDlist); 
+      m_regionSelector->ROBIDList( *roi, robIDlist ); 
+
     } else {
       msg(MSG::ERROR) << name() << " invoked without an RoI data " << endmsg;
       return StatusCode::FAILURE;
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/src/TrigSCTRawDataProvider.cxx b/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/src/TrigSCTRawDataProvider.cxx
index 40d1eda7c57c..aeac885a8d55 100644
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/src/TrigSCTRawDataProvider.cxx
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/src/TrigSCTRawDataProvider.cxx
@@ -10,7 +10,7 @@
 
 //#include "InDetRawData/InDetRawDataCLASS_DEF.h"
 #include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h"
-#include "IRegionSelector/IRegSelSvc.h" 
+#include "IRegionSelector/IRegSelTool.h" 
 
 using OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment;
 
@@ -25,7 +25,6 @@ namespace InDet {
 						  const std::string& name,
 						  const IInterface* parent) :
     AthAlgTool(type,name,parent),
-    m_regionSelector  ("RegSelSvc", name), 
     m_robDataProvider ("ROBDataProviderSvc", name),
     m_id(nullptr),
     m_container(nullptr),
@@ -159,10 +158,7 @@ namespace InDet {
       ATH_MSG_DEBUG( "REGTEST:" << *roi);
 
       //      double zmax = 168; 
-      m_regionSelector->DetROBIDListUint( SCT, 
-					  *roi, 
-					  robIDlist);                                       
-
+      m_regionSelector->ROBIDList( *roi, robIDlist );
 
     } else {
       m_cablingTool->getAllRods(robIDlist);
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/src/TrigTRTRawDataProvider.cxx b/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/src/TrigTRTRawDataProvider.cxx
index b32400654e2f..17c65c76cf1e 100644
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/src/TrigTRTRawDataProvider.cxx
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/src/TrigTRTRawDataProvider.cxx
@@ -8,7 +8,7 @@
 #include "AthenaKernel/getMessageSvc.h"
 #include "TRT_Cabling/ITRT_CablingSvc.h"
 #include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h"
-#include "IRegionSelector/IRegSelSvc.h" 
+#include "IRegionSelector/IRegSelTool.h" 
 #include "TRT_RawDataByteStreamCnv/ITRTRawDataProviderTool.h"
 #include "InDetByteStreamErrors/TRT_BSErrContainer.h"
 
@@ -24,7 +24,6 @@ namespace InDet {
 						  const std::string& name,
 						  const IInterface* parent) :
     AthAlgTool(type,name,parent),
-    m_regionSelector  ("RegSelSvc", name), 
     m_robDataProvider ("ROBDataProviderSvc", name),
     m_rawDataTool     ("TRTRawDataProviderTool/InDetTrigTRTRawDataProviderTool"),
     m_IdMapping       ("TRT_CablingSvc",name),
@@ -132,10 +131,8 @@ namespace InDet {
       // Get RoiDescriptor
       ATH_MSG_DEBUG( "REGTEST:" << *roi );
             
-      //double zmax = 168; 
-      m_regionSelector->DetROBIDListUint( TRT, 
-					  *roi, 
-					  robIDlist);
+      m_regionSelector->ROBIDList( *roi, robIDlist );
+					  
     } else {
       robIDlist = m_IdMapping->getAllRods();
     }
diff --git a/InnerDetector/InDetTrigRecAlgs/SiTrigSPSeededTrackFinder/SiTrigSPSeededTrackFinder/SiTrigSPSeededTrackFinder.h b/InnerDetector/InDetTrigRecAlgs/SiTrigSPSeededTrackFinder/SiTrigSPSeededTrackFinder/SiTrigSPSeededTrackFinder.h
index a41f07122fac..2ce82cb6394b 100755
--- a/InnerDetector/InDetTrigRecAlgs/SiTrigSPSeededTrackFinder/SiTrigSPSeededTrackFinder/SiTrigSPSeededTrackFinder.h
+++ b/InnerDetector/InDetTrigRecAlgs/SiTrigSPSeededTrackFinder/SiTrigSPSeededTrackFinder/SiTrigSPSeededTrackFinder.h
@@ -29,6 +29,8 @@
 #include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/ServiceHandle.h"
 
+#include "IRegionSelector/IRegSelTool.h"
+
 //!< Trigger specific stuff
 #include "TrigInterfaces/FexAlgo.h"
 
@@ -36,7 +38,6 @@
 
 //forward declarations
 class TrigTimer;
-class IRegSelSvc;
 
 namespace InDet {
   class ISiSpacePointsSeedMaker;
@@ -113,7 +114,8 @@ namespace InDet {
     ToolHandle< ISiTrackMaker           > m_trackmaker;   // Track                maker
     
     //!< Trigger part
-    ServiceHandle<IRegSelSvc>     m_regionSelector;      //!< region selector service
+    ToolHandle<IRegSelTool>     m_regionSelector_pixel { this, "RegSelTool_Pixel", "RegSelTool/RegSelTool_Pixel" };    //!< pixel region selector tool
+    ToolHandle<IRegSelTool>     m_regionSelector_sct   { this, "RegSelTool_SCT",   "RegSelTool/RegSelTool_SCT" };      //!< sct region selector tool
 
     StringProperty m_prdToTrackMap
        {this,"PRDtoTrackMap",""};                        //!< optional map between PRDs and tracks to identify shared hits.
diff --git a/InnerDetector/InDetTrigRecAlgs/SiTrigSPSeededTrackFinder/src/SiTrigSPSeededTrackFinder.cxx b/InnerDetector/InDetTrigRecAlgs/SiTrigSPSeededTrackFinder/src/SiTrigSPSeededTrackFinder.cxx
index 846f87dbca67..1ebedf8ca820 100755
--- a/InnerDetector/InDetTrigRecAlgs/SiTrigSPSeededTrackFinder/src/SiTrigSPSeededTrackFinder.cxx
+++ b/InnerDetector/InDetTrigRecAlgs/SiTrigSPSeededTrackFinder/src/SiTrigSPSeededTrackFinder.cxx
@@ -17,7 +17,7 @@
 
 //Trigger stuff
 #include "TrigSteeringEvent/TrigRoiDescriptor.h"
-#include "IRegionSelector/IRegSelSvc.h"
+#include "IRegionSelector/IRegSelTool.h"
 #include "IRegionSelector/IRoiDescriptor.h"
 
 //tools
@@ -61,7 +61,6 @@ InDet::SiTrigSPSeededTrackFinder::SiTrigSPSeededTrackFinder
   m_seedsmaker("InDet::SiSpacePointsSeedMaker_ATLxk/InDetTrigSiSpacePointsSeedMaker"),
   m_zvertexmaker("InDet::SiZvertexMaker_xk/InDetTrigZvertexMaker"),
   m_trackmaker("InDet::SiTrackMaker_xk/InDetTrigSiTrackMaker"),
-  m_regionSelector("RegSelSvc", name),
   m_etaHalfWidth(0.1),
   m_phiHalfWidth(0.1),
   m_doFullScan(false),
@@ -75,7 +74,6 @@ InDet::SiTrigSPSeededTrackFinder::SiTrigSPSeededTrackFinder
   
   declareProperty("useZvertexTool",m_useZvertexTool);
   declareProperty("useSeedMaker",m_useSeedMaker);
-  declareProperty("RegionSelectorTool",m_regionSelector);
   declareProperty("EtaHalfWidth",  m_etaHalfWidth);
   declareProperty("PhiHalfWidth",  m_phiHalfWidth);
   declareProperty("doFullScan",    m_doFullScan);
@@ -167,10 +165,16 @@ HLT::ErrorCode InDet::SiTrigSPSeededTrackFinder::hltInitialize() {
 
   if(!m_doFullScan){
     // Retrieving Region Selector Tool
-    if ( m_regionSelector.retrieve().isFailure() ) {
+    if ( m_regionSelector_pixel.retrieve().isFailure() ) {
       msg() << MSG::FATAL
 	    << "Unable to retrieve RegionSelector tool "
-	    << m_regionSelector.type() << endmsg;
+	    << m_regionSelector_pixel.type() << endmsg;
+      return HLT::ErrorCode(HLT::Action::ABORT_JOB, HLT::Reason::BAD_JOB_SETUP);
+    }
+    if ( m_regionSelector_sct.retrieve().isFailure() ) {
+      msg() << MSG::FATAL
+	    << "Unable to retrieve RegionSelector tool "
+	    << m_regionSelector_sct.type() << endmsg;
       return HLT::ErrorCode(HLT::Action::ABORT_JOB, HLT::Reason::BAD_JOB_SETUP);
     }
   }
@@ -264,12 +268,12 @@ HLT::ErrorCode InDet::SiTrigSPSeededTrackFinder::hltExecute(const HLT::TriggerEl
       m_timerRegSel->start();
     
     // SCT hash id's:
-    m_regionSelector->DetHashIDList(SCT, *roi, listOfSCTIds );
+    m_regionSelector_sct->HashIDList( *roi, listOfSCTIds );
     
     m_nDetElSCT = listOfSCTIds.size();
     
     // pixels hash id's:
-    m_regionSelector->DetHashIDList( PIXEL, *roi, listOfPixIds);
+    m_regionSelector_pixel->HashIDList( *roi, listOfPixIds);
     m_nDetElPixel = listOfPixIds.size();
 
     if(doTiming()) 
diff --git a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/SiTrigSpacePointFormation/SiTrigSpacePointFinder.h b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/SiTrigSpacePointFormation/SiTrigSpacePointFinder.h
index c99b4b347042..ef36ccdb5280 100755
--- a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/SiTrigSpacePointFormation/SiTrigSpacePointFinder.h
+++ b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/SiTrigSpacePointFormation/SiTrigSpacePointFinder.h
@@ -41,6 +41,8 @@
 #include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/ServiceHandle.h"
 
+#include "IRegionSelector/IRegSelTool.h"
+
 #include <string>
 #include <vector>
 
@@ -49,7 +51,7 @@
 class SpacePointCollection; 
 class SpacePointContainer; 
 class SpacePointOverlapCollection;
-class IRegSelSvc;
+
 class TrigTimer;
 
 namespace InDet{
@@ -98,7 +100,9 @@ namespace InDet{
     ToolHandle< ITrigSCT_SpacePointTool > m_trigSpacePointTool;
     ToolHandle< SiSpacePointMakerTool > m_SiSpacePointMakerTool;
     
-    ServiceHandle<IRegSelSvc>     m_regionSelector;     //!< region selector service
+    ToolHandle<IRegSelTool>     m_regionSelector_pixel { this, "RegSelTool_Pixel", "RegSelTool/RegSelTool_Pixel" };     //!< region selector service
+    ToolHandle<IRegSelTool>     m_regionSelector_sct   { this, "RegSelTool_SCT",   "RegSelTool/RegSelTool_SCT" };     //!< region selector service
+ 
     bool m_doFullScan;		//!< skip RegionSelector and indefFind for FullScan
     
     double                  m_etaHalfWidth;          //!< ROI half-width in eta
diff --git a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SiTrigSpacePointFinder.cxx b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SiTrigSpacePointFinder.cxx
index b3c30d1609c2..e6c6919f1ce2 100755
--- a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SiTrigSpacePointFinder.cxx
+++ b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SiTrigSpacePointFinder.cxx
@@ -29,7 +29,7 @@ ATLAS Collaboration
 
 // Trigger
 #include "TrigSteeringEvent/TrigRoiDescriptor.h"
-#include "IRegionSelector/IRegSelSvc.h"
+#include "IRegionSelector/IRegSelTool.h"
 #include "TrigTimeAlgs/TrigTimer.h"
 
 #include "GaudiKernel/ITHistSvc.h"
@@ -60,7 +60,6 @@ namespace InDet{
     m_spOverlapColl(0),
     m_trigSpacePointTool ("InDet::SCT_TrigSpacePointTool"),
     m_SiSpacePointMakerTool ("InDet::SiSpacePointMakerTool"),
-    m_regionSelector("RegSelSvc", name),
     m_doFullScan(false),
     m_etaHalfWidth(0.1),
     m_phiHalfWidth(0.1)
@@ -80,7 +79,6 @@ namespace InDet{
     declareProperty("ProcessOverlaps",          m_overlap);
     declareProperty("OverlapSPName",            m_spOverlapName);
 
-    declareProperty("RegionSelectorTool",      m_regionSelector);
     declareProperty("doFullScan",              m_doFullScan);
     declareProperty("EtaHalfWidth",            m_etaHalfWidth );
     declareProperty("PhiHalfWidth",            m_phiHalfWidth );
@@ -138,14 +136,19 @@ namespace InDet{
 
     if(!m_doFullScan){  
       // Retrieving Region Selector Tool:
-      if ( m_regionSelector.retrieve().isFailure() ) {
-	ATH_MSG_FATAL( "Unable to retrieve RegionSelector tool "  
-		       << m_regionSelector.type() );
+      if ( m_regionSelector_pixel.retrieve().isFailure() ) {
+	ATH_MSG_FATAL( "Unable to retrieve Pixel RegionSelector tool "  
+		       << m_regionSelector_pixel.type() );
+	return HLT::ErrorCode(HLT::Action::ABORT_JOB, HLT::Reason::BAD_JOB_SETUP);
+      }
+      if ( m_regionSelector_sct.retrieve().isFailure() ) {
+	ATH_MSG_FATAL( "Unable to retrieve SCT RegionSelector tool "  
+		       << m_regionSelector_sct.type() );
 	return HLT::ErrorCode(HLT::Action::ABORT_JOB, HLT::Reason::BAD_JOB_SETUP);
       }
     }
     else{
-      ATH_MSG_INFO( "RegionSelector is not needed for FullScan " );
+      ATH_MSG_INFO( "RegionSelector is not needed for FullScan (not strictly true - we can use fullscan RoiDescriptors" );
     }
 
     // Get an Identifier helper object
@@ -440,10 +443,7 @@ namespace InDet{
       if(!m_doFullScan){
 	//   Get the SCT RDO's:
 	if(doTiming()) m_timerRegSel->resume();
-      
-	m_regionSelector->DetHashIDList(SCT, 
-					*roi, 
-					m_listOfSctIds );
+	m_regionSelector_sct->HashIDList( *roi, m_listOfSctIds );
 	if(doTiming()) m_timerRegSel->pause();
       }
 
@@ -619,12 +619,8 @@ namespace InDet{
 
       if(!m_doFullScan){
 	if(doTiming()) m_timerRegSel->resume();
-      
-	m_regionSelector->DetHashIDList( PIXEL, 
-					 *roi, 
-					 m_listOfPixIds);
-      
-	if(doTiming()) m_timerRegSel->pause();
+      	m_regionSelector_pixel->HashIDList( *roi, m_listOfPixIds );
+      	if(doTiming()) m_timerRegSel->pause();
       }
     
       m_nPix=0;
diff --git a/InnerDetector/InDetTrigRecAlgs/TRT_TrigSeededTrackFinder/TRT_TrigSeededTrackFinder/TRT_TrigSeededTrackFinder.h b/InnerDetector/InDetTrigRecAlgs/TRT_TrigSeededTrackFinder/TRT_TrigSeededTrackFinder/TRT_TrigSeededTrackFinder.h
index f447b291a878..13b5b6332002 100755
--- a/InnerDetector/InDetTrigRecAlgs/TRT_TrigSeededTrackFinder/TRT_TrigSeededTrackFinder/TRT_TrigSeededTrackFinder.h
+++ b/InnerDetector/InDetTrigRecAlgs/TRT_TrigSeededTrackFinder/TRT_TrigSeededTrackFinder/TRT_TrigSeededTrackFinder.h
@@ -36,10 +36,9 @@
 //!< Trigger specific stuff
 #include "TrigTimeAlgs/TrigTimerSvc.h"
 #include "TrigInterfaces/FexAlgo.h"
+#include "IRegionSelector/IRegSelTool.h"
 
 
-class IRegSelSvc;
-
 namespace InDet {
 
 
@@ -78,7 +77,7 @@ namespace InDet {
       std::ostream& dump     (std::ostream& out) const;
 
   protected:
-      ServiceHandle<IRegSelSvc>     m_regionSelector;      //!< region selector service
+      ToolHandle<IRegSelTool>     m_regionSelector{ this, "RegSelTool", "RegSelTool/RegSelTool_TRT" };      //!< region selector service
       
       double       m_etaHalfWidth{};   //!< ROI half-width in eta.
       double       m_phiHalfWidth{};   //!< ROI half-width in phi.
diff --git a/InnerDetector/InDetTrigRecAlgs/TRT_TrigSeededTrackFinder/src/TRT_TrigSeededTrackFinder.cxx b/InnerDetector/InDetTrigRecAlgs/TRT_TrigSeededTrackFinder/src/TRT_TrigSeededTrackFinder.cxx
index 23c9070448cc..1ccc01ce4b08 100755
--- a/InnerDetector/InDetTrigRecAlgs/TRT_TrigSeededTrackFinder/src/TRT_TrigSeededTrackFinder.cxx
+++ b/InnerDetector/InDetTrigRecAlgs/TRT_TrigSeededTrackFinder/src/TRT_TrigSeededTrackFinder.cxx
@@ -18,7 +18,7 @@
 #include "TrkEventPrimitives/FitQuality.h"
 #include "TrkTrack/TrackCollection.h"
 
-#include "IRegionSelector/IRegSelSvc.h"
+#include "IRegionSelector/IRegSelTool.h"
 
 #include "TrigSteeringEvent/TrigRoiDescriptor.h"
 
@@ -36,7 +36,6 @@ using namespace std;
 
 InDet::TRT_TrigSeededTrackFinder::TRT_TrigSeededTrackFinder (const std::string& name, ISvcLocator* pSvcLocator)
   : HLT::FexAlgo(name, pSvcLocator),
-    m_regionSelector("RegSelSvc", name),
     m_etaHalfWidth(0.1),
     m_phiHalfWidth(0.1),
     m_doFullScan(false),
@@ -49,7 +48,6 @@ InDet::TRT_TrigSeededTrackFinder::TRT_TrigSeededTrackFinder (const std::string&
   m_doExtension = false ; //Find the track TRT extension
   m_saveTRT = true ; //Save stand-alone TRT segments
 
-  declareProperty("RegionSelectorTool"         ,m_regionSelector   ); //RegionSelector tool
   declareProperty("EtaHalfWidth"               ,m_etaHalfWidth     ); //Eta half-width of RoI
   declareProperty("PhiHalfWidth"               ,m_phiHalfWidth     ); //Phi half-width of RoI
   declareProperty("doFullScan"                 ,m_doFullScan       ); // Enables full scan mode
@@ -218,17 +216,15 @@ HLT::ErrorCode InDet::TRT_TrigSeededTrackFinder::hltExecute(const HLT::TriggerEl
     //    const double zmax= 168;
 
     // SCT hash id's:
-    m_regionSelector->DetHashIDList(SCT,
-				    *roi,
-				    listOfSCTIds );
+    m_regionSelector->HashIDList( *roi, listOfSCTIds );
 
     m_nDetElSCT = listOfSCTIds.size();
     if(outputLevel <= MSG::DEBUG) msg() << MSG::DEBUG << "Number of SCT detector elements:" << m_nDetElSCT << endmsg;
 
     // pixels hash id's:
-    m_regionSelector->DetHashIDList( PIXEL,
-				     *roi,
-				     listOfPixIds);
+    m_regionSelector->HashIDList( *roi, listOfPixIds );
+				     
+				     
     m_nDetElPixel = listOfPixIds.size();
     if(outputLevel <= MSG::DEBUG) msg() << MSG::DEBUG << "Number of Pixel detector elements:" << m_nDetElPixel << endmsg;
 
diff --git a/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackSegmentsFinder/TRT_TrigTrackSegmentsFinder/TRT_TrigTrackSegmentsFinder.h b/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackSegmentsFinder/TRT_TrigTrackSegmentsFinder/TRT_TrigTrackSegmentsFinder.h
index f2c1c03ecff5..a73d01ac009e 100755
--- a/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackSegmentsFinder/TRT_TrigTrackSegmentsFinder/TRT_TrigTrackSegmentsFinder.h
+++ b/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackSegmentsFinder/TRT_TrigTrackSegmentsFinder/TRT_TrigTrackSegmentsFinder.h
@@ -11,9 +11,12 @@
 
 //!< Trigger specific stuff
 #include "TrigInterfaces/FexAlgo.h"
+
+#include "IRegionSelector/IRegSelTool.h"
+
 #include <iosfwd>
 
-class IRegSelSvc;
+
 class TrigTimer;
 
 namespace InDet {
@@ -72,7 +75,7 @@ namespace InDet {
       MsgStream&    dumpevent(MsgStream&    out) const;
 
       //!< Trigger part
-      ServiceHandle<IRegSelSvc>     m_regionSelector;     //!< region selector service
+      ToolHandle<IRegSelTool>     m_regionSelector{ this, "RegSelTool", "RegSelTool/RegSelTool_TRT" };     //!< region selector service
       double                  m_etaHalfWidth{};   //!< ROI half-width in eta.
       double                  m_phiHalfWidth{};   //!< ROI half-width in phi.
       bool m_doFullScan{}; 			//!< supports FullScan mode
diff --git a/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackSegmentsFinder/src/TRT_TrigTrackSegmentsFinder.cxx b/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackSegmentsFinder/src/TRT_TrigTrackSegmentsFinder.cxx
index c106ba7b5f4e..3990768571a4 100755
--- a/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackSegmentsFinder/src/TRT_TrigTrackSegmentsFinder.cxx
+++ b/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackSegmentsFinder/src/TRT_TrigTrackSegmentsFinder.cxx
@@ -21,7 +21,7 @@
 
 //Trigger stuff
 #include "TrigSteeringEvent/TrigRoiDescriptor.h"
-#include "IRegionSelector/IRegSelSvc.h"
+#include "IRegionSelector/IRegSelTool.h"
 #include <ostream>
 
 
@@ -33,13 +33,11 @@ InDet::TRT_TrigTrackSegmentsFinder::TRT_TrigTrackSegmentsFinder
 (const std::string& name,ISvcLocator* pSvcLocator):
   HLT::FexAlgo(name, pSvcLocator),
   m_segmentsMakerTool("InDet::TRT_TrackSegmentsMaker_ATLxk/InDetTrigTRT_TrackSegmentsMaker"),
-  m_regionSelector("RegSelSvc", name),
   m_etaHalfWidth(0.1),
   m_phiHalfWidth(0.1),
   m_doFullScan(false)
 {
   declareProperty("SegmentsMakerTool", m_segmentsMakerTool);
-  declareProperty("RegionSelector", m_regionSelector);
   declareProperty("EtaHalfWidth",  m_etaHalfWidth);
   declareProperty("PhiHalfWidth",  m_phiHalfWidth);
   declareProperty("doFullScan",    m_doFullScan);
@@ -131,9 +129,8 @@ HLT::ErrorCode InDet::TRT_TrigTrackSegmentsFinder::hltExecute(const HLT::Trigger
     // TRT hash id's:
     if(doTiming()) m_timerRegSel->start();
     std::vector<IdentifierHash> listOfTRTIds; 
-    m_regionSelector->DetHashIDList(TRT, 
-				    *roi, 
-				    listOfTRTIds );
+    m_regionSelector->HashIDList( *roi,listOfTRTIds );
+				    
     if(doTiming()) m_timerRegSel->stop();
 
     if(doTiming()) m_timerSegMaker->resume();
diff --git a/InnerDetector/InDetValidation/PixelRTT/share/PixelRTT_DigitizationValidation.py b/InnerDetector/InDetValidation/PixelRTT/share/PixelRTT_DigitizationValidation.py
index aa582e882bc6..68822f76a632 100644
--- a/InnerDetector/InDetValidation/PixelRTT/share/PixelRTT_DigitizationValidation.py
+++ b/InnerDetector/InDetValidation/PixelRTT/share/PixelRTT_DigitizationValidation.py
@@ -109,9 +109,18 @@ if not hasattr(condSeq, 'PixelOfflineCalibCondAlg'):
     PixelOfflineCalibCondAlg.InputSource = 2
 
 from InDetPrepRawDataFormation.InDetPrepRawDataFormationConf import InDet__PixelClusterization
-job += InDet__PixelClusterization("PixelClusterization")
+
+pixelClusterization = InDet__PixelClusterization("PixelClusterization")
+
+from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
+pixelClusterization.RegSelTool = makeRegSelTool_Pixel()
+
+job += pixelClusterization
+
 print job.PixelClusterization
 
+
+
 from SiSpacePointFormation.SiSpacePointFormationConf import InDet__SiTrackerSpacePointFinder
 job += InDet__SiTrackerSpacePointFinder("PixelSpacePoints",
                                         ProcessSCTs = False)
diff --git a/InnerDetector/InDetValidation/PixelRTT/share/PixelRTT_SimulationValidation.py b/InnerDetector/InDetValidation/PixelRTT/share/PixelRTT_SimulationValidation.py
index 38406bcda0f8..f671cb84298c 100644
--- a/InnerDetector/InDetValidation/PixelRTT/share/PixelRTT_SimulationValidation.py
+++ b/InnerDetector/InDetValidation/PixelRTT/share/PixelRTT_SimulationValidation.py
@@ -178,9 +178,13 @@ if not hasattr(condSeq, 'PixelOfflineCalibCondAlg'):
     PixelOfflineCalibCondAlg.InputSource = 2
 
 from InDetPrepRawDataFormation.InDetPrepRawDataFormationConf import InDet__PixelClusterization
-job += InDet__PixelClusterization("PixelClusterization")
+pixelClusterization = InDet__PixelClusterization("PixelClusterization")
+from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
+pixelClusterization.RegSelTool = makeRegSelTool_Pixel()
+job += pixelClusterization
 print job.PixelClusterization
 
+
 from SiSpacePointFormation.SiSpacePointFormationConf import InDet__SiTrackerSpacePointFinder
 job += InDet__SiTrackerSpacePointFinder("PixelSpacePoints",
                                         ProcessSCTs = False)
diff --git a/Reconstruction/TRT_Rec/TRT_Rec/TRT_Predictor.h b/Reconstruction/TRT_Rec/TRT_Rec/TRT_Predictor.h
index a105d5edcfb2..32c4d3de0f0a 100755
--- a/Reconstruction/TRT_Rec/TRT_Rec/TRT_Predictor.h
+++ b/Reconstruction/TRT_Rec/TRT_Rec/TRT_Predictor.h
@@ -14,7 +14,7 @@
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
-#include "IRegionSelector/IRegSelSvc.h"
+#include "IRegionSelector/IRegSelTool.h"
 #include "iPatInterfaces/ITRT_Predictor.h"
 
 //<<<<<< CLASS DECLARATIONS                                             >>>>>>
@@ -59,7 +59,7 @@ private:
 
     // helpers, managers, tools
     // SurfaceIntersector*				m_intersector;
-    ServiceHandle<IRegSelSvc>			m_regionSelector;
+    ToolHandle<IRegSelTool>			m_regionSelector { this, "RegSelTool", "RegSelTool/RegSetTool_TRT" };
     ToolHandle<Trk::IIntersector>		m_rungeKuttaIntersector;
     const InDetDD::TRT_DetectorManager*		m_manager;
 
diff --git a/Reconstruction/TRT_Rec/src/TRT_Predictor.cxx b/Reconstruction/TRT_Rec/src/TRT_Predictor.cxx
index d82abe5479de..1e58c807ba28 100755
--- a/Reconstruction/TRT_Rec/src/TRT_Predictor.cxx
+++ b/Reconstruction/TRT_Rec/src/TRT_Predictor.cxx
@@ -40,7 +40,6 @@ TRT_Predictor::TRT_Predictor (const std::string&	type,
 			      const std::string&	name, 
 			      const IInterface*      	parent)
     :	AthAlgTool			(type, name, parent),
-	m_regionSelector		("RegSelSvc", name),
 	m_rungeKuttaIntersector		("Trk::RungeKuttaIntersector/RungeKuttaIntersector"),
 	m_manager			(nullptr),
 	m_barrelAcceptance		(0.55),
@@ -684,7 +683,7 @@ TRT_Predictor::setRegion(const TrackParameters&	parameters)
     // get the detector element hashIDs from the RegionSelector.
     RoiDescriptor roi( etaMin, etaMax, phiMin, phiMax );
 
-    m_regionSelector->DetHashIDList(TRT, roi, *m_hashIds);
+    m_regionSelector->HashIDList( roi, *m_hashIds);
 }
 
 
diff --git a/Reconstruction/iPat/iPatRecExample/share/iPatRec_jobOptions.py b/Reconstruction/iPat/iPatRecExample/share/iPatRec_jobOptions.py
index 18ec6fe20db9..d65f219d642c 100755
--- a/Reconstruction/iPat/iPatRecExample/share/iPatRec_jobOptions.py
+++ b/Reconstruction/iPat/iPatRecExample/share/iPatRec_jobOptions.py
@@ -92,10 +92,10 @@ if DetFlags.detdescr.ID_on() and (DetFlags.haveRIO.pixel_on() or DetFlags.haveRI
     # include the RegionSelector service
     if DetFlags.haveRIO.TRT_on():
         from AthenaCommon.AppMgr import ServiceMgr
-        from RegionSelector.RegSelSvcDefault import RegSelSvcDefault
-        iPatRegSelSvc  = RegSelSvcDefault()
-        iPatRegSelSvc.enableTRT = True
-        ServiceMgr += iPatRegSelSvc
+        # from RegionSelector.RegSelSvcDefault import RegSelSvcDefault
+        # iPatRegSelSvc  = RegSelSvcDefault()
+        # iPatRegSelSvc.enableTRT = True
+        # ServiceMgr += iPatRegSelSvc
 
     # -------------------------------------------------------------
     # Algorithm Private Options: iPatRec
diff --git a/Trigger/TrigTools/TrigInDetConfig/python/InDetPT.py b/Trigger/TrigTools/TrigInDetConfig/python/InDetPT.py
index b42c63542a24..6a2e8ff95bac 100644
--- a/Trigger/TrigTools/TrigInDetConfig/python/InDetPT.py
+++ b/Trigger/TrigTools/TrigInDetConfig/python/InDetPT.py
@@ -156,6 +156,9 @@ def makeInDetPrecisionTracking( config = None,
                                                      TRT_DriftCircleTool = InDetTrigTRT_DriftCircleTool )
             InDetTrigTRTRIOMaker.isRoI_Seeded = True
             InDetTrigTRTRIOMaker.RoIs = rois
+
+            from RegionSelector.RegSelToolConfig import makeRegSelTool_TRT
+            InDetTrigTRTRIOMaker.RegSelTool = makeRegSelTool_TRT()
  
  
             from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigPatternPropagator, InDetTrigPatternUpdator
diff --git a/Trigger/TrigTools/TrigInDetConfig/python/InDetSetup.py b/Trigger/TrigTools/TrigInDetConfig/python/InDetSetup.py
index 6acaa889727a..97993fa95ed7 100644
--- a/Trigger/TrigTools/TrigInDetConfig/python/InDetSetup.py
+++ b/Trigger/TrigTools/TrigInDetConfig/python/InDetSetup.py
@@ -112,6 +112,10 @@ def makeInDetAlgs( config = None, rois = 'EMViewRoIs', doFTF = True, viewVerifie
     InDetPixelRawDataProvider.RDOCacheKey = InDetCacheNames.PixRDOCacheKey
     InDetPixelRawDataProvider.BSErrorsCacheKey = InDetCacheNames.PixBSErrCacheKey
 
+    from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel 
+
+    InDetPixelRawDataProvider.RegSelTool = makeRegSelTool_Pixel()
+
     viewAlgs.append(InDetPixelRawDataProvider)
 
 
@@ -194,6 +198,9 @@ def makeInDetAlgs( config = None, rois = 'EMViewRoIs', doFTF = True, viewVerifie
   InDetPixelClusterization.RoIs = rois
   InDetPixelClusterization.ClusterContainerCacheKey = InDetCacheNames.Pixel_ClusterKey
 
+  from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
+  InDetPixelClusterization.RegSelTool = makeRegSelTool_Pixel()
+
   viewAlgs.append(InDetPixelClusterization)
 
   # Create SCT_ConditionsSummaryTool
diff --git a/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetConfig.py b/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetConfig.py
index 9099aac72f95..c35b373ab85d 100644
--- a/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetConfig.py
+++ b/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetConfig.py
@@ -484,11 +484,15 @@ def TrigInDetConfig( flags, roisKey="EMRoIs", signatureName='' ):
     PixelRawDataProvider=CompFactory.PixelRawDataProvider
     InDetPixelRawDataProvider = PixelRawDataProvider(name         = "InDetPixelRawDataProvider"+ signature,
                                                      RDOKey       = InDetKeys.PixelRDOs(),
-                                                     ProviderTool = InDetPixelRawDataProviderTool,)
+                                                     ProviderTool = InDetPixelRawDataProviderTool )
 
     InDetPixelRawDataProvider.isRoI_Seeded = True
     InDetPixelRawDataProvider.RoIs = roisKey
     InDetPixelRawDataProvider.RDOCacheKey = InDetCacheNames.PixRDOCacheKey
+
+    from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
+    InDetPixelRawDataProvider.RegSelTool = makeRegSelTool_Pixel()
+
     acc.addEventAlgo(InDetPixelRawDataProvider)
 
 
@@ -575,10 +579,12 @@ def TrigInDetConfig( flags, roisKey="EMRoIs", signatureName='' ):
                                                         DataObjectName          = InDetKeys.PixelRDOs(),
                                                         AmbiguitiesMap          = 'TrigPixelClusterAmbiguitiesMap',
                                                         ClustersName            = "PixelTrigClusters",)
-  InDetPixelClusterization
+
   InDetPixelClusterization.isRoI_Seeded = True
   InDetPixelClusterization.RoIs = roisKey
   InDetPixelClusterization.ClusterContainerCacheKey = InDetCacheNames.Pixel_ClusterKey
+  from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
+  InDetPixelClusterization.RegSelTool = makeRegSelTool_Pixel()
   acc.addEventAlgo(InDetPixelClusterization)
 
   from InDetConfig.InDetRecToolConfig import InDetSCT_ConditionsSummaryToolCfg
diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/TrigSpacePointConversionTool.cxx b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/TrigSpacePointConversionTool.cxx
index aefb54809a06..54eda180a1d2 100644
--- a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/TrigSpacePointConversionTool.cxx
+++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/TrigSpacePointConversionTool.cxx
@@ -30,7 +30,6 @@ TrigSpacePointConversionTool::TrigSpacePointConversionTool(const std::string& t,
 {
   declareInterface< ITrigSpacePointConversionTool >( this );
 
-  //  declareProperty( "RegionSelectorService",  m_regionSelectorName = "RegSelSvc" );
   declareProperty( "RegSel_Pixel",           m_regsel_pix);
   declareProperty( "RegSel_SCT",             m_regsel_sct);
 
-- 
GitLab


From 22233b2b6b613179f58c0c9228387f0103de78a8 Mon Sep 17 00:00:00 2001
From: Peter Onyisi <ponyisi@utexas.edu>
Date: Thu, 1 Oct 2020 02:00:46 +0200
Subject: [PATCH 071/403] Remove naked cout

---
 .../src/HistogramFiller/HistogramFillerTree.h                    | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFillerTree.h b/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFillerTree.h
index 07f5bdf52af5..44737932c44b 100644
--- a/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFillerTree.h
+++ b/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFillerTree.h
@@ -59,7 +59,6 @@ namespace Monitored {
           ++idx; continue;
         }
         TBranch* branch = static_cast<TBranch*>(branchList->At(idxgood));
-	std::cout << "Calling filler function for var : " <<  vars.var[idx]->name() << " branch " << branch->GetName() << "\n";
         m_fillerFunctions[idx](branch, *vars.var[idx]);
         ++idx; ++idxgood;
       }
-- 
GitLab


From 20c0c24c3ae96afa98d9d339cf2df60c0b18ce96 Mon Sep 17 00:00:00 2001
From: Peter Onyisi <ponyisi@utexas.edu>
Date: Thu, 1 Oct 2020 05:42:10 +0200
Subject: [PATCH 072/403] Respond to MR comments

---
 .../GenericMonitoringTool.h                   |   5 +-
 .../src/GenericMonitoringTool.cxx             | 133 +++++++++++-------
 2 files changed, 85 insertions(+), 53 deletions(-)

diff --git a/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/GenericMonitoringTool.h b/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/GenericMonitoringTool.h
index 299d28744960..b152e39e4b5b 100644
--- a/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/GenericMonitoringTool.h
+++ b/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/GenericMonitoringTool.h
@@ -80,13 +80,12 @@ private:
   Gaudi::Property<std::vector<std::string> > m_histograms { this, "Histograms", {},  "Definitions of histograms"};
   Gaudi::Property<bool> m_explicitBooking { this, "ExplicitBooking", false, "Do not create histograms automatically in initialize but wait until the method book is called." };
   Gaudi::Property<bool> m_failOnEmpty { this, "FailOnEmpty", true, "Fail in initialize() if no histograms defined" };
-  BooleanProperty m_useCache { this, "UseCache", false, "Cache filler lookups" };
+  BooleanProperty m_useCache { this, "UseCache", true, "Cache filler lookups" };
 
   std::vector<std::shared_ptr<Monitored::HistogramFiller>> m_fillers; //!< plain list of fillers
   mutable std::mutex m_fillMutex;
   mutable Monitored::HistogramFiller::VariablesPack m_vars ATLAS_THREAD_SAFE;
-  mutable std::map<std::vector<std::string>,std::vector<std::shared_ptr<Monitored::HistogramFiller>>> m_fillerCacheMap ATLAS_THREAD_SAFE;
-  mutable std::vector<std::string> m_key ATLAS_THREAD_SAFE;
+  mutable std::map<std::vector<std::string>,std::vector<std::shared_ptr<Monitored::HistogramFiller>>,std::less<>> m_fillerCacheMap ATLAS_THREAD_SAFE; //!< lookup map to speed up filler searches
 };
 
 /**
diff --git a/Control/AthenaMonitoringKernel/src/GenericMonitoringTool.cxx b/Control/AthenaMonitoringKernel/src/GenericMonitoringTool.cxx
index 74f373f1e7c7..ea0575f4a100 100644
--- a/Control/AthenaMonitoringKernel/src/GenericMonitoringTool.cxx
+++ b/Control/AthenaMonitoringKernel/src/GenericMonitoringTool.cxx
@@ -100,19 +100,42 @@ namespace Monitored {
     }
 }
 
+namespace std {
+  // Next four functions are for speeding up lookups in the the caching of invokeFillers
+  // They allow us to directly compare keys of the cache std::map
+  // with vectors of IMonitoredVariables, avoiding memory allocations
+  // these compare strings and IMonitoredVariables
+  bool operator<(const std::string& a, const std::reference_wrapper<Monitored::IMonitoredVariable>& b)  {
+    return a < b.get().name();
+  }
+  bool operator<(const std::reference_wrapper<Monitored::IMonitoredVariable>& a, const std::string& b)  {
+    return a.get().name() < b;
+  }
+
+  // lexicographical comparison of cache map items and vector of IMonitoredVariables
+  bool operator<(const std::vector<std::string>& lhs,
+                 const std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>>& rhs) {
+    return std::lexicographical_compare(lhs.begin(), lhs.end(),
+                                        rhs.begin(), rhs.end());
+  }
+  bool operator<(const std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>>& lhs,
+                 const std::vector<std::string>& rhs) {
+    return std::lexicographical_compare(lhs.begin(), lhs.end(),
+                                        rhs.begin(), rhs.end());
+  }
+}
 
 void GenericMonitoringTool::invokeFillers(const std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>>& monitoredVariables) const {
   std::scoped_lock guard(m_fillMutex);
+  // This is the list of fillers to consider in the invocation.
+  // If we are using the cache then this may be a proper subset of m_fillers; otherwise will just be m_fillers
   const std::vector<std::shared_ptr<Monitored::HistogramFiller>>* fillerList{nullptr};
+  // do we need to update the cache?
   bool makeCache = false;
+  // list of matched fillers, if we need to update the cache
   std::vector<std::shared_ptr<Monitored::HistogramFiller>> matchedFillerList;
-  m_key.clear();
   if (m_useCache) {
-    m_key.reserve(monitoredVariables.size());
-    for (const auto& mv : monitoredVariables) {
-      m_key.push_back(mv.get().name());
-    }
-    const auto match = m_fillerCacheMap.find(m_key);
+    const auto match = m_fillerCacheMap.find(monitoredVariables);
     if (match != m_fillerCacheMap.end()) {
       fillerList = &(match->second);
     } else {
@@ -129,64 +152,74 @@ void GenericMonitoringTool::invokeFillers(const std::vector<std::reference_wrapp
     if ( fillerCardinality == 1 ) { // simplest case, optimising this to be super fast
       for ( auto& var: monitoredVariables ) {
         if ( var.get().name().compare( filler->histogramVariablesNames()[0] ) == 0 )  {
-	  m_vars.var[0] = &var.get();
+          m_vars.var[0] = &var.get();
           filler->fill( m_vars );
-          if (makeCache) { matchedFillerList.push_back(filler); }
+          if (makeCache) { 
+            matchedFillerList.push_back(filler); 
+          }
           break;
         }
       }
     } else { // a more complicated case, and cuts or weights
       int matchesCount = 0;
       for ( const auto& var: monitoredVariables ) {
-	bool matched = false;
-	for ( unsigned fillerVarIndex = 0; fillerVarIndex < filler->histogramVariablesNames().size(); ++fillerVarIndex ) {
-	  if ( var.get().name().compare( filler->histogramVariablesNames()[fillerVarIndex] ) == 0 ) {
-	    m_vars.set(fillerVarIndex, &var.get());
-	    matched = true;
-	    matchesCount++;
-	    break;
-	  }
-	}
-	if ( matchesCount == fillerCardinality ) break;
-	if ( not matched ) { // may be a weight or cut variable still
-	  if ( var.get().name().compare( filler->histogramWeightName() ) == 0 )  {
-	    m_vars.weight = &var.get();
-	    matchesCount ++;
-	  } else if ( var.get().name().compare( filler->histogramCutMaskName() ) == 0 )  {
-	    m_vars.cut = &var.get();
-	    matchesCount++;
-	  }
-	}
-	if ( matchesCount == fillerCardinality ) break;
+        bool matched = false;
+        for ( unsigned fillerVarIndex = 0; fillerVarIndex < filler->histogramVariablesNames().size(); ++fillerVarIndex ) {
+          if ( var.get().name().compare( filler->histogramVariablesNames()[fillerVarIndex] ) == 0 ) {
+            m_vars.set(fillerVarIndex, &var.get());
+            matched = true;
+            matchesCount++;
+            break;
+          }
+        }
+        if ( matchesCount == fillerCardinality ) break;
+        if ( not matched ) { // may be a weight or cut variable still
+          if ( var.get().name().compare( filler->histogramWeightName() ) == 0 )  {
+            m_vars.weight = &var.get();
+            matchesCount ++;
+          } else if ( var.get().name().compare( filler->histogramCutMaskName() ) == 0 )  {
+            m_vars.cut = &var.get();
+            matchesCount++;
+         }
+        }
+        if ( matchesCount == fillerCardinality ) break;
       }
       if ( matchesCount == fillerCardinality ) {
-	filler->fill( m_vars );
-  if (makeCache) { matchedFillerList.push_back(filler); }
+        filler->fill( m_vars );
+        if (makeCache) { 
+          matchedFillerList.push_back(filler); 
+        }
       } else if ( ATH_UNLIKELY( matchesCount != 0 ) ) { // something has matched, but not all, worth informing user
-	bool reasonFound = false;
-	if (ATH_UNLIKELY(!filler->histogramWeightName().empty() && !m_vars.weight)) {
-	  reasonFound = true;
-	  ATH_MSG_DEBUG("Filler weight not found in monitoredVariables:"
-			<< "\n  Filler weight               : " << filler->histogramWeightName()
-			<< "\n  Asked to fill from mon. vars: " << monitoredVariables);
-	}
-	if (ATH_UNLIKELY(!filler->histogramCutMaskName().empty() && !m_vars.cut)) {
-	  reasonFound = true;
-	  ATH_MSG_DEBUG("Filler cut mask not found in monitoredVariables:"
-			<< "\n  Filler cut mask             : " << filler->histogramCutMaskName()
-			<< "\n  Asked to fill from mon. vars: " << monitoredVariables);
-	}
-	if ( not reasonFound ) {
-	  ATH_MSG_DEBUG("Filler has different variables than monitoredVariables:"
-			<< "\n  Filler variables            : " << filler->histogramVariablesNames()
-			<< "\n  Asked to fill from mon. vars: " << monitoredVariables
-			<< "\n  Selected monitored variables: " << m_vars.names() );
-	}
+        bool reasonFound = false;
+        if (ATH_UNLIKELY(!filler->histogramWeightName().empty() && !m_vars.weight)) {
+          reasonFound = true;
+          ATH_MSG_DEBUG("Filler weight not found in monitoredVariables:"
+            << "\n  Filler weight               : " << filler->histogramWeightName()
+            << "\n  Asked to fill from mon. vars: " << monitoredVariables);
+        }
+        if (ATH_UNLIKELY(!filler->histogramCutMaskName().empty() && !m_vars.cut)) {
+          reasonFound = true;
+          ATH_MSG_DEBUG("Filler cut mask not found in monitoredVariables:"
+            << "\n  Filler cut mask             : " << filler->histogramCutMaskName()
+            << "\n  Asked to fill from mon. vars: " << monitoredVariables);
+        }
+        if ( not reasonFound ) {
+          ATH_MSG_DEBUG("Filler has different variables than monitoredVariables:"
+            << "\n  Filler variables            : " << filler->histogramVariablesNames()
+            << "\n  Asked to fill from mon. vars: " << monitoredVariables
+            << "\n  Selected monitored variables: " << m_vars.names() );
+        }
       }
     }
   }
+
   if (makeCache) {
-    m_fillerCacheMap[m_key] = matchedFillerList;
+    std::vector<std::string> key;
+    key.reserve(monitoredVariables.size());
+    for (const auto& mv : monitoredVariables) {
+      key.push_back(mv.get().name());
+    }
+    m_fillerCacheMap[key] = matchedFillerList;
   }
 }
 
-- 
GitLab


From f3d39ebb3f7e6e74a0d57a4c4954b4dbbfaf6305 Mon Sep 17 00:00:00 2001
From: Sebastien Rettie <srettie@lxplus779.cern.ch>
Date: Thu, 1 Oct 2020 10:15:20 +0200
Subject: [PATCH 073/403] Remove unnecessary printouts

---
 .../SiClusterizationTool/src/NnClusterizationFactory.cxx  | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx
index 188d69ab74bb..1486f67471c4 100644
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx
@@ -387,10 +387,6 @@ namespace InDet {
                                              " (2): " << resultNN_TTN[1] <<
                                              " (3): " << resultNN_TTN[2]);
 
-    std::cout<<"yoyoma_p1_orig,"<<resultNN_TTN[0]<<std::endl;
-    std::cout<<"yoyoma_p2_orig,"<<resultNN_TTN[1]<<std::endl;
-    std::cout<<"yoyoma_p3_orig,"<<resultNN_TTN[2]<<std::endl;
-
     return resultNN_TTN;
   }
 
@@ -417,10 +413,6 @@ namespace InDet {
                                                " (2): " << number_probabilities[1] <<
                                                " (3): " << number_probabilities[2]);
 
-    std::cout<<"yoyoma_p1_lwtnn,"<<number_probabilities[0]<<std::endl;
-    std::cout<<"yoyoma_p2_lwtnn,"<<number_probabilities[1]<<std::endl;
-    std::cout<<"yoyoma_p3_lwtnn,"<<number_probabilities[2]<<std::endl;
-
     return number_probabilities;
   }
 
-- 
GitLab


From 49fb46b722a21af33b91dfe968e62d68886127dc Mon Sep 17 00:00:00 2001
From: Radek Novotny <ranovotn@cern.ch>
Date: Thu, 1 Oct 2020 14:43:28 +0200
Subject: [PATCH 074/403] new format DRAW_DIMU for BPhysics

---
 .../PrimaryDPDMaker/python/PrimaryDPDFlags.py |  15 +++
 .../PrimaryDPDMaker/share/DRAW_DIMU.py        | 108 ++++++++++++++++++
 2 files changed, 123 insertions(+)
 create mode 100644 PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_DIMU.py

diff --git a/PhysicsAnalysis/PrimaryDPDMaker/python/PrimaryDPDFlags.py b/PhysicsAnalysis/PrimaryDPDMaker/python/PrimaryDPDFlags.py
index 56e2a53221dd..bca2215ea159 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/python/PrimaryDPDFlags.py
+++ b/PhysicsAnalysis/PrimaryDPDMaker/python/PrimaryDPDFlags.py
@@ -325,6 +325,21 @@ class WriteRAWPerfDPD_ZMUMU(JobProperty):
 jobproperties.PrimaryDPDFlags.add_JobProperty(WriteRAWPerfDPD_ZMUMU)
 listRAWtoDPD.append(WriteRAWPerfDPD_ZMUMU.StreamName)
 
+class WriteRAWPerfDPD_DIMU(JobProperty):
+    """ Produce the primary DPD DiMu in Byte Stream format."""
+    statusOn       = True
+    allowedTypes   = ['bool']
+    StoredValue    = False
+    StreamName     = "StreamDRAW_DIMU"
+    FileName       = ""
+    Prescale       = 1
+    isVirtual      = False
+    DPDMakerScript = "PrimaryDPDMaker/DRAW_DIMU.py"
+    pass
+jobproperties.PrimaryDPDFlags.add_JobProperty(WriteRAWPerfDPD_DIMU)
+listRAWtoDPD.append(WriteRAWPerfDPD_DIMU.StreamName)
+
+
 class WriteDRAW_EGZ(JobProperty):
     """ Produce the DRAW for EGamma calibration in Z events."""
     statusOn       = True
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_DIMU.py b/PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_DIMU.py
new file mode 100644
index 000000000000..5543f21739cf
--- /dev/null
+++ b/PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_DIMU.py
@@ -0,0 +1,108 @@
+####################################################
+### Setup:
+###     sequencer
+###     derivation framework / event selection
+####################################################
+
+# needed for dynamic determination of lowest-unprescaled single-muon and dimuon triggers
+from TriggerMenu.api.TriggerAPI import TriggerAPI
+from TriggerMenu.api.TriggerEnums import TriggerPeriod, TriggerType
+
+# Sequence
+from AthenaCommon.AlgSequence import AlgSequence 
+topSequence = AlgSequence() 
+DRAW_DIMU_Seq = CfgMgr.AthSequencer("DRAW_DIMU_Seq")
+
+# Object selection strings
+sel_muon1  = 'Muons.pt > 3.5*GeV'
+sel_muon2  = 'Muons.pt > 3.5*GeV'
+
+# Event selection string
+dimuonMassString = '( count (  DRDiMuMass > 0.1*GeV   &&  DRDiMuMass < 20*GeV ) >= 1 )'
+
+# Invariant masses in various configurations
+from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__InvariantMassTool
+DRDiMuMassTool = DerivationFramework__InvariantMassTool(name = "DRDiMuMassTool",
+                                                      ContainerName              = "Muons",
+                                                      ObjectRequirements         = sel_muon1,
+                                                      SecondObjectRequirements   = sel_muon2,
+                                                      MassHypothesis             = 105.66,
+                                                      SecondMassHypothesis       = 105.66,
+                                                      StoreGateEntryName         = "DRDiMuMass")
+ToolSvc += DRDiMuMassTool
+from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool
+dimuonMassSkimmingTool = DerivationFramework__xAODStringSkimmingTool(name = "DRAW_DIMU_DiMuonMass_SkimmingTool",
+                                                                     expression = dimuonMassString)
+ToolSvc += dimuonMassSkimmingTool
+
+# Muon selector tool
+from MuonSelectorTools.MuonSelectorToolsConf import CP__MuonSelectionTool
+goodMuonTool = CP__MuonSelectionTool(name = "DRAW_DIMU_MuonsSelector")
+goodMuonTool.MaxEta = 3.
+goodMuonTool.MuQuality = 3
+# turn of the momentum correction which is not needed for IDHits cut and Preselection
+goodMuonTool.TurnOffMomCorr = True
+ToolSvc += goodMuonTool
+print(goodMuonTool)
+from PrimaryDPDMaker.PrimaryDPDMakerConf import DerivationFramework__DRAW_ZMUMUSkimmingTool
+goodMuonSkimmingTool = DerivationFramework__DRAW_ZMUMUSkimmingTool(name = "DRAW_DIMU_GoodMuon_SkimmingTool",
+                                                               MuonContainerKey = "Muons",
+                                                               MuonSelectorTool = goodMuonTool,
+                                                               MinimumNumberOfMuons = 1,
+                                                               MuonPtCut = 3.5) 
+ToolSvc += goodMuonSkimmingTool
+
+periods = TriggerPeriod.future | TriggerPeriod.y2015 | TriggerPeriod.y2016 | TriggerPeriod.y2017 | TriggerPeriod.y2018
+allUnprescaledTriggers = TriggerAPI.getLowestUnprescaledAnyPeriod(periods, TriggerType.mu)
+print("DRAW_DIMU: will skim on an OR of the following muon triggers (list provided at run-time by the TriggerAPI):")
+print(allUnprescaledTriggers)
+from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool
+triggerSkimmingTool = DerivationFramework__TriggerSkimmingTool(name = "DRAWDIMUTriggerSkimmingTool", 
+                                                               TriggerListOR = allUnprescaledTriggers)
+ToolSvc += triggerSkimmingTool
+
+# Event selection tool
+from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__FilterCombinationAND
+DRAW_DIMU_SkimmingTool = DerivationFramework__FilterCombinationAND( name = "DRAW_DIMU_FinalFilter",
+                                                                     FilterList=[dimuonMassSkimmingTool, 
+                                                                                 goodMuonSkimmingTool] )
+ToolSvc += DRAW_DIMU_SkimmingTool
+print(DRAW_DIMU_SkimmingTool)
+
+# Kernel algorithm
+from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel
+DRAW_DIMU_Seq += CfgMgr.DerivationFramework__DerivationKernel("DRAW_DIMUKernel",
+                                                               AugmentationTools = [DRDiMuMassTool],
+                                                               SkimmingTools = [DRAW_DIMU_SkimmingTool]
+                                                               )
+topSequence += DRAW_DIMU_Seq 
+
+##################
+### Output stream
+##################
+from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
+from D2PDMaker.D2PDHelpers import buildFileName
+from PrimaryDPDMaker.PrimaryDPDFlags import primDPD
+streamName = primDPD.WriteRAWPerfDPD_DIMU.StreamName
+fileName   = buildFileName( primDPD.WriteRAWPerfDPD_DIMU )
+#streamName = primDPD.WriteDRAW_DIMU.StreamName
+#fileName   = buildFileName( primDPD.WriteDRAW_DIMU )
+# Remove the .pool.root ending in the file name, this is a RAW file!
+if fileName.endswith(".pool.root") :
+    fileName = fileName.rstrip(".pool.root")
+    pass
+StreamDRAW_DIMU = MSMgr.NewByteStream( streamName, fileName )
+StreamDRAW_DIMU.AddRequireAlgs(["DRAW_DIMUKernel"])
+
+# Don't write an output RAW file if it is empty
+StreamDRAW_DIMU.bsOutputSvc.WriteEventlessFiles = primDPD.WriteEventlessFiles()
+
+
+#########################################
+# Add the containers to the output stream
+#########################################
+from PrimaryDPDMaker import PrimaryDPD_OutputDefinitions as dpdOutput
+
+# Take everything from the input
+ExcludeList=[]
+dpdOutput.addAllItemsFromInputExceptExcludeList(streamName,ExcludeList)
-- 
GitLab


From 09422a8b3afb28b653311e612be173c646d12189 Mon Sep 17 00:00:00 2001
From: Stephen Nicholas Swatman <stephen.nicholas.swatman@cern.ch>
Date: Thu, 1 Oct 2020 14:44:28 +0200
Subject: [PATCH 075/403] Ensure boundary checking tool is initialized

In our previous commits, we have added a new boundary checking tool to
the GlobalChi2Fitter, but we have failed to add the proper
initialization checks to ensure that this tool is properly created. This
may be causing some configuration issues for trigger jobs, while being
invisible for other offline reconstruction jobs.
---
 .../TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
index 96c3fb03cfb7..96c1d0421450 100644
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
@@ -183,7 +183,8 @@ namespace Trk {
     ATH_CHECK(m_navigator.retrieve());
     ATH_CHECK(m_residualPullCalculator.retrieve());
     ATH_CHECK(m_propagator.retrieve());
-    
+    ATH_CHECK(m_boundaryCheckTool.retrieve());
+
     if (m_calomat) {
       ATH_CHECK(m_calotool.retrieve());
       
-- 
GitLab


From 19eb19b6256f1978ab65caf9eec9b4dac2b7ac64 Mon Sep 17 00:00:00 2001
From: Tomasz Bold <tomasz.bold@gmail.com>
Date: Thu, 1 Oct 2020 14:56:17 +0100
Subject: [PATCH 076/403] Supporting merging os same signature chains of
 differnet kinds

---
 .../DecisionHandling/src/ComboHypo.cxx        | 12 ++-
 .../L1Decoder/src/RoIsUnpackingToolBase.cxx   | 10 +-
 .../HLTMenuConfig/Menu/HLTCFConfig_newJO.py   | 92 ++++++++-----------
 .../python/HLTMenuConfig/Menu/LS2_v1_newJO.py |  2 +-
 .../HLTMenuConfig/Menu/MenuComponents.py      |  4 +-
 5 files changed, 51 insertions(+), 69 deletions(-)

diff --git a/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx b/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx
index 8cfe4dadfce4..185308b82f1d 100644
--- a/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx
+++ b/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx
@@ -55,7 +55,7 @@ StatusCode ComboHypo::initialize() {
   }
 
   ATH_CHECK( m_multiplicitiesReqMap.size() != 0 );
-
+ 
   bool errorOccured = false;
   if (m_checkMultiplicityMap) {
     for ( const auto& m : m_multiplicitiesReqMap ) {
@@ -177,11 +177,17 @@ StatusCode ComboHypo::execute(const EventContext& context ) const {
     for ( size_t legIndex = 0; legIndex <  multiplicityPerLeg.size(); ++legIndex ) {
       const size_t requiredMultiplicity =  multiplicityPerLeg.at( legIndex );
       nRequiredUnique += requiredMultiplicity;
-
       HLT::Identifier legId = TrigCompositeUtils::createLegName(chainId, legIndex);
+
+      // If there is only one leg, then we just use the chain's name.
+      if (multiplicityPerLeg.size() == 1) {
+        ATH_MSG_DEBUG(chainId << " has multiplicityPerLeg.size() == 1, so we don't use legXXX_HLT_YYY, we just use HLT_YYY");
+        legId = chainId; 
+      }
+
       const DecisionID requiredDecisionIDLeg = legId.numeric();
       ATH_MSG_DEBUG("Container " << legIndex << ", looking at leg : " << legId );
-     
+
       LegDecisionsMap::const_iterator it = dmap.find(requiredDecisionIDLeg);
       if ( it == dmap.end() ) {
         overallDecision = false;
diff --git a/Trigger/TrigSteer/L1Decoder/src/RoIsUnpackingToolBase.cxx b/Trigger/TrigSteer/L1Decoder/src/RoIsUnpackingToolBase.cxx
index a8b210c6d6ec..de41fa4da0e0 100644
--- a/Trigger/TrigSteer/L1Decoder/src/RoIsUnpackingToolBase.cxx
+++ b/Trigger/TrigSteer/L1Decoder/src/RoIsUnpackingToolBase.cxx
@@ -23,14 +23,6 @@ StatusCode RoIsUnpackingToolBase::initialize()
   return StatusCode::SUCCESS;
 }
 
-/**
- * Retruns true if the seed is single threshold multiplicity item: L1_3MU6
- * In such case the threashold name is prefixed by digit.
- */
-bool isMultilpicity(const std::string& itemName, const std::string& thName) {
-  const size_t thPos = itemName.find( thName );
-  return std::isdigit(itemName[thPos-1]);
-}
 
 StatusCode RoIsUnpackingToolBase::decodeMapping( std::function< bool(const std::string&)> filter ) {
 
@@ -46,7 +38,7 @@ StatusCode RoIsUnpackingToolBase::decodeMapping( std::function< bool(const std::
         const HLT::Identifier thresholIdentifier(th);
         m_thresholdToChainMapping[ thresholIdentifier ].push_back( chainIdentifier );
         ATH_MSG_DEBUG( "Associating " << chainIdentifier << " with threshold " << th );        
-        if ( thresholds.size() > 1 or isMultilpicity( chain.l1item(), th ) ) {
+        if ( thresholds.size() > 1 ) {
           HLT::Identifier legIdentifier = TrigCompositeUtils::createLegName( chainIdentifier, counter );
           m_thresholdToChainMapping[ thresholIdentifier ].push_back( legIdentifier );
           m_legToChainMapping.insert( std::make_pair( legIdentifier,  chainIdentifier ) );
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig_newJO.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig_newJO.py
index 630c9b49c0f5..0f45af0a554a 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig_newJO.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig_newJO.py
@@ -195,10 +195,7 @@ def generateDecisionTree(chains):
             prevCounter = stepCounter-1
             prevName = chain.steps[prevCounter-1].name # counting steps from 1, for indexing need one less
             prevStep = chain.steps[prevCounter-1]
-            if prevStep.isCombo:                
-                prevHypoAlg = findComboHypoAlg( prevCounter, prevName )
-            else:
-                prevHypoAlg = findHypoAlg( prevCounter, prevName )
+            prevHypoAlg = findComboHypoAlg( prevCounter, prevName )
             out = prevHypoAlg.HypoOutputDecisions
             prevHypoAlgName = prevHypoAlg.name
 
@@ -210,20 +207,15 @@ def generateDecisionTree(chains):
         for stepCounter, step in enumerate( chain.steps, 1 ):
             getFilterAlg( stepCounter, step.name )
             menuSeqName = getSingleMenuSeq( stepCounter, step.name ).name
-            log.info("zzz {} mult {} step {} is combo {}".format(chain.name, step.multiplicity, stepCounter, step.isCombo))
-
-            if step.isCombo:
-                # add sequences that allows reconstructions to be run in parallel, followed (in sequence) by the combo hypo
-                comboSeq, comboRecoSeq = getComboSequences( stepCounter, step.name )
-                for sequence in step.sequences:
-                    acc.merge( sequence.ca, sequenceName=comboRecoSeq.name)
 
-                comboHypo = CompFactory.ComboHypo( "CH"+step.name )
-                acc.addEventAlgo( comboHypo, sequenceName=comboSeq.name )
-                pass
-            else:
-                acc.merge( step.sequences[0].ca, sequenceName=menuSeqName )
 
+            # add sequences that allows reconstructions to be run in parallel, followed (in sequence) by the combo hypo
+            comboSeq, comboRecoSeq = getComboSequences( stepCounter, step.name )
+            for sequence in step.sequences:
+                acc.merge( sequence.ca, sequenceName=comboRecoSeq.name)
+            comboHypo = CompFactory.ComboHypo( "CH"+step.name, CheckMultiplicityMap = len(step.sequences) != 1 )
+            acc.addEventAlgo( comboHypo, sequenceName=comboSeq.name )
+            pass
 
     # cleanup settings made by Chain & related objects (can be removed in the future)
     for chain in chains:
@@ -242,16 +234,14 @@ def generateDecisionTree(chains):
                 hypoAlg.HypoInputDecisions  = ""
                 hypoAlg.HypoOutputDecisions = ""
 
-            if step.isCombo:
-                comboHypoAlg = findComboHypoAlg( stepCounter, step.name )
-                comboHypoAlg.MultiplicitiesMap = {}
-                comboHypoAlg.HypoInputDecisions = []
-                comboHypoAlg.HypoOutputDecisions = []
+            comboHypoAlg = findComboHypoAlg( stepCounter, step.name )
+            comboHypoAlg.MultiplicitiesMap = {}
+            comboHypoAlg.HypoInputDecisions = []
+            comboHypoAlg.HypoOutputDecisions = []
 
 
     # connect all outputs (decision DF) and add chains to filter on
     for chain in chains:
-
         for stepCounter, step in enumerate( chain.steps, 1 ):
             # Filters linking
             filterAlg = getFilterAlg( stepCounter, step.name )
@@ -280,41 +270,35 @@ def generateDecisionTree(chains):
                 hypoOut = CFNaming.hypoAlgOutName( hypoAlg.name )
                 hypoAlg.HypoOutputDecisions = assureUnsetOrTheSame( hypoAlg.HypoOutputDecisions, hypoOut,
                     "{} hypo output".format( hypoAlg.name )  )
-                print("kkk", chainDict)
+
                 hypoAlg.HypoTools.append( step.sequences[sequenceCounter]._hypoToolConf.confAndCreate( chainDict ) )
                 pass
 
-            if step.isCombo:
-                for seqCounter in range( len( step.sequences ) ) :
-                    chainLegDict = splitChainInDict( chain.name )[seqCounter]
-                    # hack for multiplicity chains of the same signature, it should be handled in splitChainInDrict, TODO eliminate it, needs discussion wiht menu
-                    if len( step.sequences ) == 1: 
-                        from DecisionHandling.TrigCompositeUtils import legName
-                        chainLegDict['chainName'] = legName( chainLegDict['chainName'], 0)
-                    __setup( seqCounter, chainLegDict )
-
-                    comboHypoAlg = findComboHypoAlg( stepCounter, step.name )
-                    comboHypoAlg.MultiplicitiesMap[chain.name] = step.multiplicity
-
-                    elementaryHypos = findAllHypoAlgs( stepCounter, step.name )
-                    for hypo in elementaryHypos:
-                        if hypo == comboHypoAlg:
-                            continue
-                        comboHypoAlg.HypoInputDecisions = addAndAssureUniqness( comboHypoAlg.HypoInputDecisions, hypo.HypoOutputDecisions,
-                            "{} comboHypo input".format( comboHypoAlg.name ) )
-
-                        comboOut = CFNaming.comboHypoOutputName( comboHypoAlg.name, hypo.name )
-                        comboHypoAlg.HypoOutputDecisions = addAndAssureUniqness( comboHypoAlg.HypoOutputDecisions, comboOut,
-                            "{} comboHypo output".format( comboHypoAlg.name ) )
-
-                    # Combo Hypo Tools
-                    for comboToolConf in step.comboToolConfs:
-                        comboHypoAlg.ComboHypoTools.append( comboToolConf.confAndCreate( TriggerConfigHLT.getChainDictFromChainName( chain.name ) ) )
-
-            else:
-                assert len( step.sequences ) == 1, "chain {} step {} is not combo bye has number of sequences = {}".format( chain.name, stepCounter, len( step.sequences ) )
-                __setup( 0,  TriggerConfigHLT.getChainDictFromChainName( chain.name ) )
-
+            chainDictLegs = splitChainInDict( chain.name )
+            # possible cases: A) number of seqeunces == number of chain parts, e5_mu10 or just e3 type of chain 
+            # ([0, 1], [0, 1]) is the set of indices
+            indices = zip( range( len( step.sequences ) ), range( len( chainDictLegs ) ) )# case A
+            # B) number of sequences == 1 && number of chain parts > 1 for single signature assymetric combined chains e5_e3 type chain
+            if len(step.sequences) == 1 and len(chainDictLegs) > 1:
+                indices = zip( [0]*len(chainDictLegs), range( len( chainDictLegs ) ) )
+
+            for seqCounter, chainDictCounter  in indices:
+                chainLegDict = chainDictLegs[chainDictCounter]
+                __setup( seqCounter, chainLegDict )
+                comboHypoAlg = findComboHypoAlg( stepCounter, step.name )
+                comboHypoAlg.MultiplicitiesMap[chain.name] = step.multiplicity
+                elementaryHypos = findAllHypoAlgs( stepCounter, step.name )
+                for hypo in elementaryHypos:
+                    if hypo == comboHypoAlg:
+                        continue
+                    comboHypoAlg.HypoInputDecisions = addAndAssureUniqness( comboHypoAlg.HypoInputDecisions, hypo.HypoOutputDecisions,
+                        "{} comboHypo input".format( comboHypoAlg.name ) )
+                    comboOut = CFNaming.comboHypoOutputName( comboHypoAlg.name, hypo.name )
+                    comboHypoAlg.HypoOutputDecisions = addAndAssureUniqness( comboHypoAlg.HypoOutputDecisions, comboOut,
+                        "{} comboHypo output".format( comboHypoAlg.name ) )
+                # Combo Hypo Tools
+                for comboToolConf in step.comboToolConfs:
+                    comboHypoAlg.ComboHypoTools.append( comboToolConf.confAndCreate( TriggerConfigHLT.getChainDictFromChainName( chain.name ) ) )
 
     for chain in chains:
         log.info( "CF algorithms for chain {}".format( chain.name ) )
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1_newJO.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1_newJO.py
index 11aca40ae2e6..819eadbf95a1 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1_newJO.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1_newJO.py
@@ -53,7 +53,7 @@ def setupMenu(flags):
         ChainProp(name='HLT_e3_etcut_L1EM3', groups=SingleElectronGroup),
         ChainProp(name='HLT_2e3_etcut_L12EM3', groups=MultiElectronGroup),
 # this chain does not work yet        
-#        ChainProp(name='HLT_e3_etcut_e5_etcut_L12EM3', groups=MultiElectronGroup),
+        ChainProp(name='HLT_e5_etcut_e3_etcut_L12EM3', groups=MultiElectronGroup),
         ChainProp(name='HLT_e5_etcut_L1EM3', groups=SingleElectronGroup),
         ChainProp(name='HLT_e7_etcut_L1EM7', groups=SingleElectronGroup)
     ]
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py
index 180a86b256a0..846e4d7141b1 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py
@@ -779,8 +779,8 @@ class ChainStep(object):
             multiplicity=[]
 
         # sanity check on inputs
-        if len(Sequences) != len(multiplicity):
-            raise RuntimeError("Tried to configure a ChainStep %s with %i Sequences and %i multiplicities. These lists must have the same size" % (name, len(Sequences), len(multiplicity)) )
+        #if len(Sequences) != len(multiplicity):
+        #    raise RuntimeError("Tried to configure a ChainStep %s with %i Sequences and %i multiplicities. These lists must have the same size" % (name, len(Sequences), len(multiplicity)) )
 
         self.name = name
         self.sequences=Sequences
-- 
GitLab


From 673d22d136d23a521e9b296269be7c98e9a8dd82 Mon Sep 17 00:00:00 2001
From: Tomasz Bold <tomasz.bold@gmail.com>
Date: Thu, 1 Oct 2020 16:31:32 +0100
Subject: [PATCH 077/403] Fixes after review

---
 .../DecisionHandling/src/ComboHypo.cxx        |  6 +--
 .../L1Decoder/src/RoIsUnpackingToolBase.cxx   |  5 +--
 .../share/runHLT_standalone_newJO.py          |  2 +-
 .../Menu/GenerateMenuMT_newJO.py              |  5 +--
 .../HLTMenuConfig/Menu/HLTCFConfig_newJO.py   | 42 +++++++------------
 5 files changed, 23 insertions(+), 37 deletions(-)

diff --git a/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx b/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx
index 185308b82f1d..cd105070e9e8 100644
--- a/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx
+++ b/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx
@@ -55,7 +55,7 @@ StatusCode ComboHypo::initialize() {
   }
 
   ATH_CHECK( m_multiplicitiesReqMap.size() != 0 );
- 
+
   bool errorOccured = false;
   if (m_checkMultiplicityMap) {
     for ( const auto& m : m_multiplicitiesReqMap ) {
@@ -177,8 +177,8 @@ StatusCode ComboHypo::execute(const EventContext& context ) const {
     for ( size_t legIndex = 0; legIndex <  multiplicityPerLeg.size(); ++legIndex ) {
       const size_t requiredMultiplicity =  multiplicityPerLeg.at( legIndex );
       nRequiredUnique += requiredMultiplicity;
-      HLT::Identifier legId = TrigCompositeUtils::createLegName(chainId, legIndex);
 
+      HLT::Identifier legId = TrigCompositeUtils::createLegName(chainId, legIndex);
       // If there is only one leg, then we just use the chain's name.
       if (multiplicityPerLeg.size() == 1) {
         ATH_MSG_DEBUG(chainId << " has multiplicityPerLeg.size() == 1, so we don't use legXXX_HLT_YYY, we just use HLT_YYY");
@@ -187,7 +187,7 @@ StatusCode ComboHypo::execute(const EventContext& context ) const {
 
       const DecisionID requiredDecisionIDLeg = legId.numeric();
       ATH_MSG_DEBUG("Container " << legIndex << ", looking at leg : " << legId );
-
+     
       LegDecisionsMap::const_iterator it = dmap.find(requiredDecisionIDLeg);
       if ( it == dmap.end() ) {
         overallDecision = false;
diff --git a/Trigger/TrigSteer/L1Decoder/src/RoIsUnpackingToolBase.cxx b/Trigger/TrigSteer/L1Decoder/src/RoIsUnpackingToolBase.cxx
index de41fa4da0e0..f982f97bdb67 100644
--- a/Trigger/TrigSteer/L1Decoder/src/RoIsUnpackingToolBase.cxx
+++ b/Trigger/TrigSteer/L1Decoder/src/RoIsUnpackingToolBase.cxx
@@ -23,7 +23,6 @@ StatusCode RoIsUnpackingToolBase::initialize()
   return StatusCode::SUCCESS;
 }
 
-
 StatusCode RoIsUnpackingToolBase::decodeMapping( std::function< bool(const std::string&)> filter ) {
 
   SG::ReadHandle<TrigConf::HLTMenu>  hltMenuHandle = SG::makeHandle( m_HLTMenuKey );
@@ -37,9 +36,9 @@ StatusCode RoIsUnpackingToolBase::decodeMapping( std::function< bool(const std::
       if ( filter(th) ) {
         const HLT::Identifier thresholIdentifier(th);
         m_thresholdToChainMapping[ thresholIdentifier ].push_back( chainIdentifier );
-        ATH_MSG_DEBUG( "Associating " << chainIdentifier << " with threshold " << th );        
+        ATH_MSG_DEBUG( "Associating " << chainIdentifier << " with threshold " << th );
         if ( thresholds.size() > 1 ) {
-          HLT::Identifier legIdentifier = TrigCompositeUtils::createLegName( chainIdentifier, counter );
+          HLT::Identifier legIdentifier = TrigCompositeUtils::createLegName(chainIdentifier, counter);
           m_thresholdToChainMapping[ thresholIdentifier ].push_back( legIdentifier );
           m_legToChainMapping.insert( std::make_pair( legIdentifier,  chainIdentifier ) );
           ATH_MSG_INFO( "Associating additional chain leg " << legIdentifier << " with threshold " << thresholIdentifier );
diff --git a/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone_newJO.py b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone_newJO.py
index 97ba2889f692..65e1efbcaf67 100644
--- a/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone_newJO.py
+++ b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone_newJO.py
@@ -100,7 +100,7 @@ acc.foreach_component("*/L1Decoder").OutputLevel = DEBUG
 acc.foreach_component("*/L1Decoder/*Tool").OutputLevel = DEBUG # tools
 acc.foreach_component("*HLTTop/*Hypo*").OutputLevel = DEBUG # hypo algs
 acc.foreach_component("*HLTTop/*Hypo*/*Tool*").OutputLevel = INFO # hypo tools
-acc.foreach_component("*HLTTop/RoRSeqFilter/*").OutputLevel = DEBUG# filters
+acc.foreach_component("*HLTTop/RoRSeqFilter/*").OutputLevel = INFO# filters
 acc.foreach_component("*HLTTop/*Input*").OutputLevel = DEBUG # input makers
 acc.foreach_component("*HLTTop/*HLTEDMCreator*").OutputLevel = WARNING # messaging from the EDM creators
 acc.foreach_component("*HLTTop/*GenericMonitoringTool*").OutputLevel = WARNING # silcence mon tools (addressing by type)
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT_newJO.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT_newJO.py
index 20867d5b3cfe..ad2ca2e8bbd5 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT_newJO.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT_newJO.py
@@ -1,8 +1,7 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaCommon.CFElements import seqAND
 
-from TriggerMenuMT.HLTMenuConfig.Menu.HLTCFConfig import generateDecisionTreeOld
 from TriggerMenuMT.HLTMenuConfig.Menu.HLTCFConfig_newJO import generateDecisionTree
 from TriggerMenuMT.HLTMenuConfig.Menu.TriggerConfigHLT import TriggerConfigHLT
 from TriggerMenuMT.HLTMenuConfig.Menu.ChainMerging import mergeChainDefs
@@ -82,7 +81,7 @@ def generateMenu( flags ):
 
             chainDicts = splitInterSignatureChainDict(mainChainDict)
             listOfChainConfigs = []
-            print("aaa", chainDicts)
+
             for chainDict in chainDicts:
                 signature = chainDict['signature'].lower()
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig_newJO.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig_newJO.py
index 0f45af0a554a..f7e351239c6c 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig_newJO.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig_newJO.py
@@ -1,5 +1,5 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-from PyUtils.Decorators import memoize
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+from functools import lru_cache
 from AthenaCommon.CFElements import findAllAlgorithms, parOR, seqAND
 from AthenaCommon.Logging import logging
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
@@ -22,22 +22,13 @@ def printStepsMatrix(matrix):
             print('---- {}: {}'.format(chainName, namesInCell))  # noqa: ATL901
     print('-------------------------')  # noqa: ATL901
 
-# def memoize(f):
-#     """ caches call of the helper functions, (copied from the internet) remove when we move to python 3.2 or newer and rplace by functools.lru_cache"""
-#     memo = {}
-#     def helper(*x):
-#         tupledx = tuple(x)
-#         if tupledx not in memo:
-#             memo[tupledx] = f(*x)
-#         return memo[tupledx]
-#     return helper
 
 def generateDecisionTree(chains):
     acc = ComponentAccumulator()
     mainSequenceName = 'HLTAllSteps'
     acc.addSequence( seqAND(mainSequenceName) )
 
-    @memoize
+    @lru_cache(None)
     def getFiltersStepSeq( stepNumber ):
         """
         Returns sequence containing all filters for a step
@@ -49,7 +40,7 @@ def generateDecisionTree(chains):
         acc.addSequence( seq, parentName = mainSequenceName )
         return seq
 
-    @memoize
+    @lru_cache(None)
     def getRecosStepSeq( stepNumber ):
         """
         """
@@ -59,7 +50,7 @@ def generateDecisionTree(chains):
         acc.addSequence( seq, parentName = mainSequenceName )
         return seq
 
-    @memoize
+    @lru_cache(None)
     def getSingleMenuSeq( stepNumber, stepName ):
         """
         """
@@ -70,7 +61,7 @@ def generateDecisionTree(chains):
         acc.addSequence(seq, parentName = allRecoSeqName )
         return seq
 
-    @memoize
+    @lru_cache(None)
     def getComboSequences( stepNumber, stepName ):
         """
         """
@@ -83,7 +74,7 @@ def generateDecisionTree(chains):
         acc.addSequence( parOR(stepComboRecoName), parentName=stepComboName )
         return acc.getSequence(stepComboName), acc.getSequence(stepComboRecoName)
 
-    @memoize
+    @lru_cache(None)
     def getFilterAlg( stepNumber, stepName ):
         """
         Returns, if need be created, filter for a given step
@@ -101,7 +92,7 @@ def generateDecisionTree(chains):
         log.debug('Creted filter {}'.format(filterName))
         return filterAlg
 
-    @memoize
+    @lru_cache(None)
     def findInputMaker( stepCounter, stepName ):
         seq = getSingleMenuSeq( stepCounter, stepName )
         algs = findAllAlgorithms( seq )
@@ -110,7 +101,7 @@ def generateDecisionTree(chains):
                 return alg
         raise Exception("No input maker in seq "+seq.name)
 
-    @memoize
+    @lru_cache(None)
     def findAllInputMakers( stepCounter, stepName ):
         seq = getSingleMenuSeq( stepCounter, stepName )
         algs = findAllAlgorithms( seq )
@@ -123,7 +114,7 @@ def generateDecisionTree(chains):
             return result
         else:
             raise Exception("No input maker in seq "+seq.name)
-    @memoize
+    @lru_cache(None)
     def findComboHypoAlg( stepCounter, stepName ):
         seq = getSingleMenuSeq( stepCounter, stepName )
         algs = findAllAlgorithms( seq )
@@ -132,7 +123,7 @@ def generateDecisionTree(chains):
                 return alg
         raise Exception("No combo hypo alg in seq "+seq.name)
 
-    @memoize
+    @lru_cache(None)
     def findHypoAlg( stepCounter, stepName ):
         seq = getSingleMenuSeq( stepCounter, stepName )
         algs = findAllAlgorithms( seq )
@@ -142,7 +133,7 @@ def generateDecisionTree(chains):
         raise Exception("No hypo alg in seq "+seq.name)
 
 
-    @memoize
+    @lru_cache(None)
     def findAllHypoAlgs( stepCounter, stepName ):
         seq = getSingleMenuSeq( stepCounter, stepName )
         algs = findAllAlgorithms( seq )
@@ -183,7 +174,7 @@ def generateDecisionTree(chains):
                 return p.rstrip("_")
             p = n
 
-    @memoize
+    @lru_cache(None)
     def prevStepOutput( chain, stepCounter ):
         """
         Returns list of decision collections that are outputs of previous step as well as the hypo alg name that outpus it
@@ -194,7 +185,6 @@ def generateDecisionTree(chains):
         else:
             prevCounter = stepCounter-1
             prevName = chain.steps[prevCounter-1].name # counting steps from 1, for indexing need one less
-            prevStep = chain.steps[prevCounter-1]
             prevHypoAlg = findComboHypoAlg( prevCounter, prevName )
             out = prevHypoAlg.HypoOutputDecisions
             prevHypoAlgName = prevHypoAlg.name
@@ -206,9 +196,7 @@ def generateDecisionTree(chains):
     for chain in chains:
         for stepCounter, step in enumerate( chain.steps, 1 ):
             getFilterAlg( stepCounter, step.name )
-            menuSeqName = getSingleMenuSeq( stepCounter, step.name ).name
-
-
+            getSingleMenuSeq( stepCounter, step.name ).name
             # add sequences that allows reconstructions to be run in parallel, followed (in sequence) by the combo hypo
             comboSeq, comboRecoSeq = getComboSequences( stepCounter, step.name )
             for sequence in step.sequences:
@@ -320,7 +308,7 @@ def generateDecisionTree(chains):
             else:
                 hypoAlg = findHypoAlg( stepCounter, step.name )
                 log.info("  HypoAlg {} Inputs {} Outputs {} Tools {}".format( hypoAlg.name, hypoAlg.HypoInputDecisions, hypoAlg.HypoOutputDecisions, [t.name for t in hypoAlg.HypoTools] ) )
-    #kaboom
+
     return acc
 
 
-- 
GitLab


From 6b738a7150eba0fc288dd60d35846aaa281618c5 Mon Sep 17 00:00:00 2001
From: Maximilian Goblirsch-Kolb <goblirsc@cern.ch>
Date: Thu, 1 Oct 2020 19:38:04 +0200
Subject: [PATCH 078/403] Add installed standalone job options for IDPVM

---
 .../InDetPhysValMonitoring_topOptions.py      | 101 ++++++++++++++++++
 1 file changed, 101 insertions(+)
 create mode 100644 InnerDetector/InDetValidation/InDetPhysValMonitoring/share/InDetPhysValMonitoring_topOptions.py

diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/InDetPhysValMonitoring_topOptions.py b/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/InDetPhysValMonitoring_topOptions.py
new file mode 100644
index 000000000000..f5d09db69d8d
--- /dev/null
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/InDetPhysValMonitoring_topOptions.py
@@ -0,0 +1,101 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+
+# Define a few configuration arguments that can be passed by the user via the command line.
+# Avoid the need of hacking the job option file 
+def GetCustomAthArgs():
+    from AthenaCommon.AthArgumentParser import AthArgumentParser
+    IDPVMparser = AthArgumentParser(description='Parser for IDPVM configuration')
+    IDPVMparser.add_argument("--doTightPrimary", help='also run tight-primary plots', action='store_true', default=False)
+    IDPVMparser.add_argument("--doTracksInJets", help='also run tracks in jets', action='store_true', default=False)
+    IDPVMparser.add_argument("--doTracksInBJets", help='also run tracks in jets', action='store_true', default=False)
+    IDPVMparser.add_argument("--doExpertPlots", help='run additional expert-level plots', action='store_true', default=False)
+    IDPVMparser.add_argument("--outputFile", help='Name of output file',default="M_output.root")
+    IDPVMparser.add_argument("--HSFlag", help='Hard-scatter flag - decides what is used for truth matching', choices=['HardScatter', 'All', 'PileUp'],default="HardScatter")
+    return IDPVMparser.parse_args()
+
+
+MyArgs = GetCustomAthArgs()
+
+from InDetRecExample.InDetJobProperties import InDetFlags
+InDetFlags.doSlimming.set_Value_and_Lock(False)
+rec.doTrigger.set_Value_and_Lock(False)
+
+include( "AthenaPython/iread_file.py" )
+
+from AthenaCommon.AlgSequence import AlgSequence
+topSequence = AlgSequence()
+
+from InDetPhysValMonitoring.InDetPhysValMonitoringConf import HistogramDefinitionSvc
+ToolSvc = ServiceMgr.ToolSvc
+ServiceMgr+=HistogramDefinitionSvc()
+ServiceMgr.HistogramDefinitionSvc.DefinitionSource="../share/InDetPVMPlotDefRun2.xml"
+ServiceMgr.HistogramDefinitionSvc.DefinitionFormat="text/xml"
+
+import InDetPhysValMonitoring.InDetPhysValDecoration
+for decorator in InDetPhysValMonitoring.InDetPhysValDecoration.getDecorators() :
+  topSequence += decorator
+
+from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager
+monMan = AthenaMonManager( "PhysValMonManager",
+  FileKey = "M_output",
+  Environment = "altprod",
+  ManualDataTypeSetup = True,
+  DataType = "monteCarlo",
+  ManualRunLBSetup = True,
+  Run = 1,
+  LumiBlock = 1  )
+  
+print (monMan)
+
+topSequence += monMan
+
+
+
+from InDetTrackSelectionTool.InDetTrackSelectionToolConf import InDet__InDetTrackSelectionTool
+InDetTrackSelectorTool=InDet__InDetTrackSelectionTool()
+ToolSvc += InDetTrackSelectorTool
+InDetTrackSelectorTool.CutLevel = "TightPrimary"
+                                                 
+from InDetPhysValMonitoring.InDetPhysValMonitoringConf import AthTruthSelectionTool
+AthTruthSelectionTool = AthTruthSelectionTool()
+
+print (AthTruthSelectionTool)
+
+from InDetPhysValMonitoring.InDetPhysValMonitoringConf import InDetPhysValMonitoringTool
+
+tool1 = InDetPhysValMonitoringTool()
+tool1.TruthSelectionTool = AthTruthSelectionTool
+tool1.useTrackSelection = False
+tool1.TrackSelectionTool=InDetTrackSelectorTool
+tool1.PileupSwitch=MyArgs.HSFlag
+tool1.FillTrackInJetPlots = MyArgs.doTracksInJets
+tool1.FillTrackInBJetPlots = MyArgs.doTracksInBJets
+tool1.SkillLevel = 201 if MyArgs.doExpertPlots else 1
+print (tool1)
+tool1.ManagerName = 'PhysValMonManager'
+monMan.AthenaMonTools += [tool1]
+
+if MyArgs.doTightPrimary:
+  from InDetPhysValMonitoring.InDetPhysValMonitoringConf import InDetPhysValMonitoringTool
+  toolTP = InDetPhysValMonitoringTool("IDPVMTool_TightPrimary")
+  toolTP.TruthSelectionTool = AthTruthSelectionTool
+  toolTP.useTrackSelection = True
+  toolTP.SubFolder = "TightPrimary/"
+  toolTP.PileupSwitch=MyArgs.HSFlag
+  toolTP.TrackSelectionTool=InDetTrackSelectorTool
+  toolTP.FillTrackInJetPlots = MyArgs.doTracksInJets
+  toolTP.FillTrackInBJetPlots = MyArgs.doTracksInBJets
+  tool1.SkillLevel = 201 if MyArgs.doExpertPlots else 1
+  print (toolTP)
+  toolTP.ManagerName = 'PhysValMonManager'
+  monMan.AthenaMonTools += [toolTP  ]
+
+from GaudiSvc.GaudiSvcConf import THistSvc
+ServiceMgr += THistSvc()
+svcMgr.THistSvc.Output += ["M_output DATAFILE='"+MyArgs.outputFile+"' OPT='RECREATE'"]
+
+# Do some additional tweaking:
+from AthenaCommon.AppMgr import theApp
+ServiceMgr.MessageSvc.OutputLevel = INFO
+ServiceMgr.MessageSvc.defaultLimit = 10000
\ No newline at end of file
-- 
GitLab


From 629f01117d2d5e776240b1b79c9465c9dad87a14 Mon Sep 17 00:00:00 2001
From: Maximilian Goblirsch-Kolb <goblirsc@cern.ch>
Date: Thu, 1 Oct 2020 19:38:22 +0200
Subject: [PATCH 079/403] fix a segfault when no truth vertex collection is on
 hand

---
 .../src/InDetPerfPlot_VertexTruthMatching.cxx                 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_VertexTruthMatching.cxx b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_VertexTruthMatching.cxx
index c4745c4f2626..62f5a53a690e 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_VertexTruthMatching.cxx
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_VertexTruthMatching.cxx
@@ -271,6 +271,10 @@ void InDetPerfPlot_VertexTruthMatching::fill(const xAOD::VertexContainer& vertex
 
         // Did we correctly select the best reco HS vertex using sumpt2?
         truthVtx = getTruthVertex(bestRecoHSVtx_sumpt2);
+        if (!truthVtx){
+            ATH_MSG_INFO("No truth HS - not filling vertex truth matching."); 
+            return;
+        }
         localPUDensity = getLocalPUDensity(truthVtx, truthHSVertices, truthPUVertices);
         fillHisto(m_vx_hs_sel_eff, localPUDensity, (bestRecoHSVtx_sumpt2 == bestRecoHSVtx_truth));
 
-- 
GitLab


From 46cc76063c912bd242cb50624633059bef1e3cb2 Mon Sep 17 00:00:00 2001
From: Maximilian Goblirsch-Kolb <goblirsc@cern.ch>
Date: Thu, 1 Oct 2020 19:38:32 +0200
Subject: [PATCH 080/403] add hit plots for fake tracks

---
 .../InDetPhysValMonitoring/src/InDetRttPlots.cxx           | 7 ++++++-
 .../InDetPhysValMonitoring/src/InDetRttPlots.h             | 2 ++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetRttPlots.cxx b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetRttPlots.cxx
index 90c0762ab9b0..8d6332e53384 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetRttPlots.cxx
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetRttPlots.cxx
@@ -42,6 +42,8 @@ InDetRttPlots::InDetRttPlots(InDetPlotBase* pParent, const std::string& sDir, co
   if(m_iDetailLevel >= 200){
     m_resolutionPlotSecd = std::make_unique<InDetPerfPlot_Resolution>(this, "Tracks/Matched/Resolutions/Secondary");
     m_hitsMatchedTracksPlots = std::make_unique<InDetPerfPlot_Hits>(this, "Tracks/Matched/HitsOnTracks");
+    m_hitsFakeTracksPlots = std::make_unique<InDetPerfPlot_Hits>(this, "Tracks/Fakes/HitsOnTracks");
+    m_hitsUnlinkedTracksPlots = std::make_unique<InDetPerfPlot_Hits>(this, "Tracks/Unlinked/HitsOnTracks");
     m_vertexTruthMatchingPlots = std::make_unique<InDetPerfPlot_VertexTruthMatching>(this, "Vertices/AllPrimaryVertices", m_iDetailLevel);
 
     //Split by track author
@@ -230,7 +232,10 @@ InDetRttPlots::fillFakeRate(const xAOD::TrackParticle& track, const bool isFake,
 
   m_missingTruthFakePlots.fill(track, !isAssociatedTruth);
   m_anTrackingPlots.fillUnlinked(track, !isAssociatedTruth, mu, nVtx);
-
+  if(m_iDetailLevel >= 200){
+    if (!isAssociatedTruth) m_hitsUnlinkedTracksPlots->fill(track);
+    else m_hitsFakeTracksPlots->fill(track);
+  }
   if(isAssociatedTruth) {
     m_fakePlots.fill(track, isFake);
       m_anTrackingPlots.fillFakeRate(track, isFake, mu, nVtx);
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetRttPlots.h b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetRttPlots.h
index db3d1a80769c..0b1f672e41e7 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetRttPlots.h
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetRttPlots.h
@@ -96,6 +96,8 @@ private:
   InDetPerfPlot_ANTracking m_anTrackingPlots;
   std::unique_ptr<InDetPerfPlot_Resolution> m_resolutionPlotSecd;
   std::unique_ptr<InDetPerfPlot_Hits> m_hitsMatchedTracksPlots;
+  std::unique_ptr<InDetPerfPlot_Hits> m_hitsFakeTracksPlots{nullptr};
+  std::unique_ptr<InDetPerfPlot_Hits> m_hitsUnlinkedTracksPlots{nullptr};
   std::unique_ptr<InDetPerfPlot_VertexTruthMatching> m_vertexTruthMatchingPlots;
   bool m_doTrackInJetPlots;
   bool m_doTrackInBJetPlots;
-- 
GitLab


From beb036da5510f0247b685a68b0e85d9888267dfb Mon Sep 17 00:00:00 2001
From: sutt <sutt@cern.ch>
Date: Fri, 2 Oct 2020 00:34:22 +0200
Subject: [PATCH 081/403] Add RoiUpdater

---
 .../InDetConfig/python/TrackRecoConfig.py     |  1 -
 .../TrigGenericAlgs/src/TrigRoiUpdater.cxx    | 19 +++++++++++++------
 .../TrigGenericAlgs/src/TrigRoiUpdater.h      |  6 ++++--
 .../TrigInDetConf/python/RoiManipulators.py   |  6 ++++++
 .../TriggerMenu/python/muon/MuonDef.py        |  5 +++++
 5 files changed, 28 insertions(+), 9 deletions(-)

diff --git a/InnerDetector/InDetConfig/python/TrackRecoConfig.py b/InnerDetector/InDetConfig/python/TrackRecoConfig.py
index 6445930a9596..1d4e35f410c1 100644
--- a/InnerDetector/InDetConfig/python/TrackRecoConfig.py
+++ b/InnerDetector/InDetConfig/python/TrackRecoConfig.py
@@ -21,7 +21,6 @@ def PixelClusterizationCfg(flags, **kwargs) :
     ambi_finder=sub_acc.getPrimary()
     acc.merge(sub_acc)
 
-    from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
     acc.addEventAlgo( CompFactory.InDet.PixelClusterization(   name         = "InDetPixelClusterization",
                                                     clusteringTool          = merged_pixels_tool,
                                                     gangedAmbiguitiesFinder = ambi_finder,
diff --git a/Trigger/TrigAlgorithms/TrigGenericAlgs/src/TrigRoiUpdater.cxx b/Trigger/TrigAlgorithms/TrigGenericAlgs/src/TrigRoiUpdater.cxx
index 28850a513377..df54f1f15cee 100644
--- a/Trigger/TrigAlgorithms/TrigGenericAlgs/src/TrigRoiUpdater.cxx
+++ b/Trigger/TrigAlgorithms/TrigGenericAlgs/src/TrigRoiUpdater.cxx
@@ -20,7 +20,6 @@ namespace PESA
       m_etaHalfWidth(0.),
       m_phiHalfWidth(0.),
       m_zHalfWidth(0.),
-      m_regionSelector("RegSelSvc", name),
       m_requestPIXRobs(true),
       m_requestSCTRobs(true),
       m_monitorDuplicateRoIs(true),
@@ -29,7 +28,6 @@ namespace PESA
   {
     declareProperty("EtaHalfWidth",           m_etaHalfWidth);
     declareProperty("PhiHalfWidth",           m_phiHalfWidth);
-    declareProperty("RegionSelectorTool",     m_regionSelector);
     declareProperty("RequestPIXRobs",         m_requestPIXRobs);
     declareProperty("RequestSCTRobs",         m_requestSCTRobs);
     declareProperty("MonitorDuplicateRoIs",   m_monitorDuplicateRoIs);
@@ -73,10 +71,19 @@ namespace PESA
     }
 
     // Retrieving Region Selector Tool:
-    if ( (m_requestPIXRobs || m_requestSCTRobs) && m_regionSelector.retrieve().isFailure() ) {
-      ATH_MSG_FATAL( m_regionSelector.propertyName()
+    if ( m_requestPIXRobs && m_regionSelector_pix.retrieve().isFailure() ) {
+      ATH_MSG_FATAL( m_regionSelector_pix.propertyName()
 		     << " : Unable to retrieve RegionSelector tool "  
-		     << m_regionSelector.type() );
+		     << m_regionSelector_pix.type() );
+      return HLT::ErrorCode(HLT::Action::ABORT_JOB, HLT::Reason::BAD_JOB_SETUP);
+    }
+
+
+    // Retrieving Region Selector Tool:
+    if ( m_requestSCTRobs && m_regionSelector_sct.retrieve().isFailure() ) {
+      ATH_MSG_FATAL( m_regionSelector_sct.propertyName()
+		     << " : Unable to retrieve RegionSelector tool "  
+		     << m_regionSelector_sct.type() );
       return HLT::ErrorCode(HLT::Action::ABORT_JOB, HLT::Reason::BAD_JOB_SETUP);
     }
 
@@ -258,7 +265,7 @@ namespace PESA
     std::vector<unsigned int> uIntListOfRobs;
 
     if (m_requestPIXRobs) {
-      m_regionSelector->DetROBIDListUint( PIXEL, *roi, uIntListOfRobs );
+      m_regionSelector->ROBIDList( *roi, uIntListOfRobs );
 
       ATH_MSG_DEBUG( "list of ROBs ID in PIX: " );
       for(uint i_lid(0); i_lid<uIntListOfRobs.size(); i_lid++)
diff --git a/Trigger/TrigAlgorithms/TrigGenericAlgs/src/TrigRoiUpdater.h b/Trigger/TrigAlgorithms/TrigGenericAlgs/src/TrigRoiUpdater.h
index d24dd472f1a2..1a9a58433db5 100644
--- a/Trigger/TrigAlgorithms/TrigGenericAlgs/src/TrigRoiUpdater.h
+++ b/Trigger/TrigAlgorithms/TrigGenericAlgs/src/TrigRoiUpdater.h
@@ -22,8 +22,8 @@
 //!< Trigger specific stuff
 #include "TrigInterfaces/FexAlgo.h"
 #include "TrigSteeringEvent/TrigRoiDescriptor.h"
+#include "IRegionSelector/IRegSelTool.h"
 
-class IRegSelSvc;
 
 namespace PESA
 
@@ -47,7 +47,9 @@ namespace PESA
     float m_zHalfWidth;
 
     //ROB prefetching
-    ServiceHandle<IRegSelSvc>     m_regionSelector;     
+    ToolHandle<IRegSelTool>     m_regionSelector_pix { this, "RegSelTool_Pixel", "RegSelTool/RegSelTool_Pixel" };     
+    ToolHandle<IRegSelTool>     m_regionSelector_sct { this, "RegSelTool_SCT",   "RegSelTool/RegSelTool_SCT"   };     
+
     //!< region selector service
     bool  m_requestPIXRobs;
     bool  m_requestSCTRobs;
diff --git a/Trigger/TrigTools/TrigInDetConf/python/RoiManipulators.py b/Trigger/TrigTools/TrigInDetConf/python/RoiManipulators.py
index f387c5660ccd..7be025de0d2c 100644
--- a/Trigger/TrigTools/TrigInDetConf/python/RoiManipulators.py
+++ b/Trigger/TrigTools/TrigInDetConf/python/RoiManipulators.py
@@ -7,6 +7,12 @@ class IDTrigRoiUpdater ( PESA__TrigRoiUpdater ):
   def __init__(self, name="IDTrigRoiUpdater_Electron_IDT", type="electron"):
     super ( PESA__TrigRoiUpdater, self ).__init__(name)
 
+    from RegionSelector.RegSelToolConfif import makeRegSelTool_Pixel
+    from RegionSelector.RegSelToolConfif import makeRegSelTool_SCT
+
+    self.RegSelTool_Pixel = makeRegSelTool_Pixel()
+    self.RegSelTool_SCT   = makeRegSelTool_SCT()
+
     from InDetTrigRecExample.InDetTrigSliceSettings import InDetTrigSliceSettings
     self.EtaHalfWidth = InDetTrigSliceSettings[('etaHalfWidth',type)]
     self.PhiHalfWidth = InDetTrigSliceSettings[('phiHalfWidth',type)]
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonDef.py b/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonDef.py
index 020efa740599..40a8f83a9c38 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonDef.py
@@ -1965,6 +1965,11 @@ class L2EFChain_mu(L2EFChainDef):
       RoiUpdater.EtaHalfWidth = 0.10
       RoiUpdater.PhiHalfWidth = 0.10
     
+    from RegionSelector.RegSelToolConfif import makeRegSelTool_Pixel
+    from RegionSelector.RegSelToolConfif import makeRegSelTool_SCT
+    RoiUpdater.RegSelTool_Pixel = makeRegSelTool_Pixel()
+    RoiUpdater.RegSelTool_SCT   = makeRegSelTool_SCT()
+
     from TrigL2MuonSA.TrigL2MuonSAConfig import TrigL2MuonSAConfig
     theL2StandAloneAlg  = TrigL2MuonSAConfig(L2AlgName)
     from TrigMuonHypo.TrigMuonHypoConfig import MufastHypoConfig
-- 
GitLab


From 9d656cc96749c4a1b1fd5d90922c3f89944a2c1e Mon Sep 17 00:00:00 2001
From: sutt <sutt@cern.ch>
Date: Fri, 2 Oct 2020 08:46:17 +0200
Subject: [PATCH 082/403] fix regionselector names in cxx

---
 .../TrigAlgorithms/TrigGenericAlgs/src/TrigRoiUpdater.cxx   | 4 ++--
 Trigger/TrigTools/TrigInDetConf/python/RoiManipulators.py   | 6 ++++++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigGenericAlgs/src/TrigRoiUpdater.cxx b/Trigger/TrigAlgorithms/TrigGenericAlgs/src/TrigRoiUpdater.cxx
index df54f1f15cee..173c7dc9b80d 100644
--- a/Trigger/TrigAlgorithms/TrigGenericAlgs/src/TrigRoiUpdater.cxx
+++ b/Trigger/TrigAlgorithms/TrigGenericAlgs/src/TrigRoiUpdater.cxx
@@ -265,7 +265,7 @@ namespace PESA
     std::vector<unsigned int> uIntListOfRobs;
 
     if (m_requestPIXRobs) {
-      m_regionSelector->ROBIDList( *roi, uIntListOfRobs );
+      m_regionSelector_pix->ROBIDList( *roi, uIntListOfRobs );
 
       ATH_MSG_DEBUG( "list of ROBs ID in PIX: " );
       for(uint i_lid(0); i_lid<uIntListOfRobs.size(); i_lid++)
@@ -276,7 +276,7 @@ namespace PESA
     }
 
     if (m_requestSCTRobs){
-      m_regionSelector->DetROBIDListUint( SCT, *roi, uIntListOfRobs );
+      m_regionSelector_sct->DetROBIDListUint( SCT, *roi, uIntListOfRobs );
 
       ATH_MSG_DEBUG( "list of ROBs ID in SCT: " );
       for(uint i_lid(0); i_lid<uIntListOfRobs.size(); i_lid++)
diff --git a/Trigger/TrigTools/TrigInDetConf/python/RoiManipulators.py b/Trigger/TrigTools/TrigInDetConf/python/RoiManipulators.py
index 7be025de0d2c..b1a4be815382 100644
--- a/Trigger/TrigTools/TrigInDetConf/python/RoiManipulators.py
+++ b/Trigger/TrigTools/TrigInDetConf/python/RoiManipulators.py
@@ -7,12 +7,18 @@ class IDTrigRoiUpdater ( PESA__TrigRoiUpdater ):
   def __init__(self, name="IDTrigRoiUpdater_Electron_IDT", type="electron"):
     super ( PESA__TrigRoiUpdater, self ).__init__(name)
 
+    print( "\n\n\n\nRoiUpdater:: ", name ) 
+    
+
     from RegionSelector.RegSelToolConfif import makeRegSelTool_Pixel
     from RegionSelector.RegSelToolConfif import makeRegSelTool_SCT
 
     self.RegSelTool_Pixel = makeRegSelTool_Pixel()
     self.RegSelTool_SCT   = makeRegSelTool_SCT()
 
+    print( "added RegSelTools\n\n\n\n" ) 
+
+
     from InDetTrigRecExample.InDetTrigSliceSettings import InDetTrigSliceSettings
     self.EtaHalfWidth = InDetTrigSliceSettings[('etaHalfWidth',type)]
     self.PhiHalfWidth = InDetTrigSliceSettings[('phiHalfWidth',type)]
-- 
GitLab


From 1b2cb46cca48f86991425521c98f1732aa26c2d6 Mon Sep 17 00:00:00 2001
From: sutt <sutt@cern.ch>
Date: Fri, 2 Oct 2020 08:57:02 +0200
Subject: [PATCH 083/403] Fix RoiUpdater config

---
 Trigger/TrigAlgorithms/TrigGenericAlgs/src/TrigRoiUpdater.cxx | 4 ++--
 Trigger/TrigTools/TrigInDetConf/python/RoiManipulators.py     | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigGenericAlgs/src/TrigRoiUpdater.cxx b/Trigger/TrigAlgorithms/TrigGenericAlgs/src/TrigRoiUpdater.cxx
index 173c7dc9b80d..29e30c2672b2 100644
--- a/Trigger/TrigAlgorithms/TrigGenericAlgs/src/TrigRoiUpdater.cxx
+++ b/Trigger/TrigAlgorithms/TrigGenericAlgs/src/TrigRoiUpdater.cxx
@@ -9,7 +9,7 @@
 #include "RoiDescriptor/RoiDescriptor.h"
 #include "IRegionSelector/RoiUtil.h"
 #include "IRegionSelector/IRoiDescriptor.h"
-#include "IRegionSelector/IRegSelSvc.h"
+#include "IRegionSelector/IRegSelTool.h"
 
 namespace PESA
 {
@@ -276,7 +276,7 @@ namespace PESA
     }
 
     if (m_requestSCTRobs){
-      m_regionSelector_sct->DetROBIDListUint( SCT, *roi, uIntListOfRobs );
+      m_regionSelector_sct->ROBIDList( *roi, uIntListOfRobs );
 
       ATH_MSG_DEBUG( "list of ROBs ID in SCT: " );
       for(uint i_lid(0); i_lid<uIntListOfRobs.size(); i_lid++)
diff --git a/Trigger/TrigTools/TrigInDetConf/python/RoiManipulators.py b/Trigger/TrigTools/TrigInDetConf/python/RoiManipulators.py
index b1a4be815382..d2bc90f67ff7 100644
--- a/Trigger/TrigTools/TrigInDetConf/python/RoiManipulators.py
+++ b/Trigger/TrigTools/TrigInDetConf/python/RoiManipulators.py
@@ -10,8 +10,8 @@ class IDTrigRoiUpdater ( PESA__TrigRoiUpdater ):
     print( "\n\n\n\nRoiUpdater:: ", name ) 
     
 
-    from RegionSelector.RegSelToolConfif import makeRegSelTool_Pixel
-    from RegionSelector.RegSelToolConfif import makeRegSelTool_SCT
+    from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
+    from RegionSelector.RegSelToolConfig import makeRegSelTool_SCT
 
     self.RegSelTool_Pixel = makeRegSelTool_Pixel()
     self.RegSelTool_SCT   = makeRegSelTool_SCT()
-- 
GitLab


From 2bd61aa893ed12851eacfafef750817d197efab3 Mon Sep 17 00:00:00 2001
From: Michal Leszczynski <michal.leszczynski@cern.ch>
Date: Fri, 2 Oct 2020 12:26:04 +0000
Subject: [PATCH 084/403] Remove development leftovers

---
 Control/AthenaConfiguration/share/confTool.py | 2 --
 1 file changed, 2 deletions(-)

diff --git a/Control/AthenaConfiguration/share/confTool.py b/Control/AthenaConfiguration/share/confTool.py
index c07fd168c4cc..29534568ce18 100755
--- a/Control/AthenaConfiguration/share/confTool.py
+++ b/Control/AthenaConfiguration/share/confTool.py
@@ -169,8 +169,6 @@ def _loadSingleFile(fname, args):
             for dic in conf
             if isinstance(dic, dict)
         ]
-    # import code
-    # code.interact(local=locals())
     return conf
 
 
-- 
GitLab


From 9a0d38d698eca6aaf014f0408b152661140a5aec Mon Sep 17 00:00:00 2001
From: Kenji Hamano <kenji.hamano@cern.ch>
Date: Fri, 2 Oct 2020 05:41:56 -0700
Subject: [PATCH 085/403] Copyright year updated

---
 .../TrigMETMonitoring/TrigMETMonitoring/HLTMETMonTool.h         | 2 +-
 Trigger/TrigMonitoring/TrigMETMonitoring/src/HLTMETMonTool.cxx  | 2 +-
 .../TrigMETMonitoring/src/TrigMETMonitorAlgorithm.cxx           | 2 +-
 .../TrigMETMonitoring/src/TrigMETMonitorAlgorithm.h             | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Trigger/TrigMonitoring/TrigMETMonitoring/TrigMETMonitoring/HLTMETMonTool.h b/Trigger/TrigMonitoring/TrigMETMonitoring/TrigMETMonitoring/HLTMETMonTool.h
index 7c89a2cf2b4c..e4314e98c612 100755
--- a/Trigger/TrigMonitoring/TrigMETMonitoring/TrigMETMonitoring/HLTMETMonTool.h
+++ b/Trigger/TrigMonitoring/TrigMETMonitoring/TrigMETMonitoring/HLTMETMonTool.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 HLTMETMONTOOL_H
diff --git a/Trigger/TrigMonitoring/TrigMETMonitoring/src/HLTMETMonTool.cxx b/Trigger/TrigMonitoring/TrigMETMonitoring/src/HLTMETMonTool.cxx
index 7305bb8f7f26..b2335a0c2d76 100644
--- a/Trigger/TrigMonitoring/TrigMETMonitoring/src/HLTMETMonTool.cxx
+++ b/Trigger/TrigMonitoring/TrigMETMonitoring/src/HLTMETMonTool.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 "TrigMETMonitoring/HLTMETMonTool.h"
diff --git a/Trigger/TrigMonitoring/TrigMETMonitoring/src/TrigMETMonitorAlgorithm.cxx b/Trigger/TrigMonitoring/TrigMETMonitoring/src/TrigMETMonitorAlgorithm.cxx
index a07f9ec663db..2b95787a71a7 100644
--- a/Trigger/TrigMonitoring/TrigMETMonitoring/src/TrigMETMonitorAlgorithm.cxx
+++ b/Trigger/TrigMonitoring/TrigMETMonitoring/src/TrigMETMonitorAlgorithm.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 "TrigMETMonitorAlgorithm.h"
diff --git a/Trigger/TrigMonitoring/TrigMETMonitoring/src/TrigMETMonitorAlgorithm.h b/Trigger/TrigMonitoring/TrigMETMonitoring/src/TrigMETMonitorAlgorithm.h
index da040becf0c2..70efa912b191 100644
--- a/Trigger/TrigMonitoring/TrigMETMonitoring/src/TrigMETMonitorAlgorithm.h
+++ b/Trigger/TrigMonitoring/TrigMETMonitoring/src/TrigMETMonitorAlgorithm.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 TRIGMETMONITORING_TRIGMETMONITORALGORITHM_H
-- 
GitLab


From f273330460a8137ea402ea019f065d211b33c75d Mon Sep 17 00:00:00 2001
From: Tomasz Bold <tomasz.bold@gmail.com>
Date: Fri, 2 Oct 2020 14:53:35 +0100
Subject: [PATCH 086/403] Post review fixes

---
 .../python/HLTMenuConfig/Electron/generateElectron.py         | 2 +-
 .../TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1_newJO.py   | 2 +-
 .../TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py | 4 +++-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/generateElectron.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/generateElectron.py
index 040687e1d6e3..c73e14378ddb 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/generateElectron.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/generateElectron.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 from TriggerMenuMT.HLTMenuConfig.Electron.ElectronRecoSequences import l2CaloRecoCfg, l2CaloHypoCfg
 from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import CAMenuSequence, \
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1_newJO.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1_newJO.py
index 819eadbf95a1..955836c64b6a 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1_newJO.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1_newJO.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 TriggerMenuMT.HLTMenuConfig.Menu.ChainDefInMenu import ChainProp
 
 import six
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py
index 846e4d7141b1..49e3c9685e26 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py
@@ -777,7 +777,9 @@ class ChainStep(object):
         # include cases of emtpy steps with multiplicity = [] or multiplicity=[0,0,0///]
         if sum(multiplicity)==0:
             multiplicity=[]
-
+        
+        # This check is commented out (temporarily before can be removed completely) to support signatures wiht one sequence and multiplicty > 1, e.g. HLT_2e3
+        # In such case there is only one sequence, however the multiplicty is == 2 
         # sanity check on inputs
         #if len(Sequences) != len(multiplicity):
         #    raise RuntimeError("Tried to configure a ChainStep %s with %i Sequences and %i multiplicities. These lists must have the same size" % (name, len(Sequences), len(multiplicity)) )
-- 
GitLab


From c915c1c127c2ac46277da83389ea3e4b7a5a0817 Mon Sep 17 00:00:00 2001
From: Ivan Yeletskikh <Ivan.Yeletskikh@cern.ch>
Date: Fri, 2 Oct 2020 16:28:38 +0200
Subject: [PATCH 087/403] update TrackingCutsFlags.py

---
 InnerDetector/InDetConfig/python/TrackingCutsFlags.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/InnerDetector/InDetConfig/python/TrackingCutsFlags.py b/InnerDetector/InDetConfig/python/TrackingCutsFlags.py
index 760d47375e20..fb4bad8789e6 100644
--- a/InnerDetector/InDetConfig/python/TrackingCutsFlags.py
+++ b/InnerDetector/InDetConfig/python/TrackingCutsFlags.py
@@ -957,13 +957,13 @@ if __name__ == "__main__":
   ConfigFlags.loadAllDynamicFlags()
 
   assert ConfigFlags.InDet.cutLevel == 19 , "default cut level is wrong"
-  assert ConfigFlags.InDet.Tracking.minRoIClusterEt == 6000.0 * Units.MeV, "wrong value {} ".format(ConfigFlags.InDet.Tracking.minRoIClusterEt)
+  assert ConfigFlags.InDet.Tracking.minRoIClusterEt == 6000.0 * Units.MeV, "wrong cut value {} ".format(ConfigFlags.InDet.Tracking.minRoIClusterEt)
   ConfigFlags.InDet.cutLevel = 2
-  assert ConfigFlags.InDet.Tracking.minRoIClusterEt == 0.0, "wrong value {} ".format(ConfigFlags.InDet.Tracking.minRoIClusterEt)  
-  assert ConfigFlags.InDet.BeamGasTracking.minRoIClusterEt == 0.0, "wrong value {}, not following cutLevel setting ".format(ConfigFlags.InDet.BeamGasTracking.minRoIClusterEt)   
+  assert ConfigFlags.InDet.Tracking.minRoIClusterEt == 0.0, "wrong cut value {} ".format(ConfigFlags.InDet.Tracking.minRoIClusterEt)  
+  assert ConfigFlags.InDet.BeamGasTracking.minRoIClusterEt == 0.0, "wrong cut value {}, not following cutLevel setting ".format(ConfigFlags.InDet.BeamGasTracking.minRoIClusterEt)   
 
-  assert ConfigFlags.InDet.HeavyIonTracking.minSiNotShared == 7, "wrong value, overwrite"
-  assert ConfigFlags.InDet.HeavyIonTracking.minRoIClusterEt == 0.0, "wrong value, overwrite"
+  assert ConfigFlags.InDet.HeavyIonTracking.minSiNotShared == 7, "wrong cut value, overwrite"
+  assert ConfigFlags.InDet.HeavyIonTracking.minRoIClusterEt == 0.0, "wrong cut value, overwrite"
 
   print("ConfigFlags.InDet.SCTandTRTTracking.minPT",ConfigFlags.InDet.SCTandTRTTracking.minPT)
   print("type(ConfigFlags.InDet.SCTandTRTTracking)",type(ConfigFlags.InDet.SCTandTRTTracking)) 
-- 
GitLab


From 011798bc129029328c44df9fb5da7cb89e0182a8 Mon Sep 17 00:00:00 2001
From: Nils Krumnack <krumnack@iastate.edu>
Date: Thu, 1 Oct 2020 08:24:27 -0500
Subject: [PATCH 088/403] mark StatusCode nodiscard

Just to prevent accidentally discarding it.
---
 Control/AthToolSupport/AsgMessaging/AsgMessaging/StatusCode.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Control/AthToolSupport/AsgMessaging/AsgMessaging/StatusCode.h b/Control/AthToolSupport/AsgMessaging/AsgMessaging/StatusCode.h
index 21e9e7058e95..7c40c952be0e 100644
--- a/Control/AthToolSupport/AsgMessaging/AsgMessaging/StatusCode.h
+++ b/Control/AthToolSupport/AsgMessaging/AsgMessaging/StatusCode.h
@@ -25,7 +25,7 @@
 /// $Revision: 612639 $
 /// $Date: 2014-08-20 14:26:10 +0200 (Wed, 20 Aug 2014) $
 ///
-class StatusCode {
+class [[nodiscard]] StatusCode {
 
 public:
    /// Convenience StatusCode types
-- 
GitLab


From 92a59817f5c3bb651da6c99bea2824ca28ba7491 Mon Sep 17 00:00:00 2001
From: Nils Krumnack <krumnack@iastate.edu>
Date: Thu, 1 Oct 2020 08:25:14 -0500
Subject: [PATCH 089/403] mark TReturnCode nodiscard

Just to prevent accidentally discarding it.
---
 Control/xAODRootAccess/xAODRootAccess/tools/TReturnCode.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Control/xAODRootAccess/xAODRootAccess/tools/TReturnCode.h b/Control/xAODRootAccess/xAODRootAccess/tools/TReturnCode.h
index 2f103abe55c3..dab7eaac86b2 100644
--- a/Control/xAODRootAccess/xAODRootAccess/tools/TReturnCode.h
+++ b/Control/xAODRootAccess/xAODRootAccess/tools/TReturnCode.h
@@ -27,7 +27,7 @@ namespace xAOD {
    /// $Revision: 598368 $
    /// $Date: 2014-05-22 12:23:54 +0200 (Thu, 22 May 2014) $
    ///
-   class TReturnCode {
+   class [[nodiscard]] TReturnCode {
 
    public:
       /// Enumeration listing the possible return codes
-- 
GitLab


From 0826076a595eb930247d84af096b9caf4134e5d6 Mon Sep 17 00:00:00 2001
From: Nils Krumnack <krumnack@iastate.edu>
Date: Thu, 1 Oct 2020 08:25:43 -0500
Subject: [PATCH 090/403] mark CorrectionCode and SystematicCode nodiscard

Just to keep users from accidentally discarding them.
---
 .../AnalysisCommon/PATInterfaces/PATInterfaces/CorrectionCode.h | 2 +-
 .../AnalysisCommon/PATInterfaces/PATInterfaces/SystematicCode.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/CorrectionCode.h b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/CorrectionCode.h
index cc248b9c02d5..aa4f3fe9b4ee 100644
--- a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/CorrectionCode.h
+++ b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/CorrectionCode.h
@@ -32,7 +32,7 @@ namespace CP {
    /// $Revision: 719663 $
    /// $Date: 2016-01-25 21:27:50 +0100 (Mon, 25 Jan 2016) $
    ///
-   class CorrectionCode {
+   class [[nodiscard]] CorrectionCode {
 
    public:
       /// Possible values for the correction code
diff --git a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/SystematicCode.h b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/SystematicCode.h
index 600ba6e1b953..3665c6bdbbfb 100644
--- a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/SystematicCode.h
+++ b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/SystematicCode.h
@@ -34,7 +34,7 @@ namespace CP {
    /// $Revision: 717600 $
    /// $Date: 2016-01-13 18:48:13 +0100 (Wed, 13 Jan 2016) $
    ///
-   class SystematicCode {
+   class [[nodiscard]] SystematicCode {
 
    public:
       /// Possible values for the systematic code
-- 
GitLab


From f840012d466f62a29768f02b7bc23ac44b03793f Mon Sep 17 00:00:00 2001
From: Nils Krumnack <krumnack@iastate.edu>
Date: Thu, 1 Oct 2020 08:49:12 -0500
Subject: [PATCH 091/403] ignore some previously discarded status codes

This only happens in death tests, so ignoring them is the proper way
to do this.
---
 .../AsgExampleTools/test/gt_AnaToolHandle_test.cxx     | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/Control/AthToolSupport/AsgExampleTools/test/gt_AnaToolHandle_test.cxx b/Control/AthToolSupport/AsgExampleTools/test/gt_AnaToolHandle_test.cxx
index 1a2523af6f86..fb695eb98aa2 100644
--- a/Control/AthToolSupport/AsgExampleTools/test/gt_AnaToolHandle_test.cxx
+++ b/Control/AthToolSupport/AsgExampleTools/test/gt_AnaToolHandle_test.cxx
@@ -327,7 +327,7 @@ namespace asg
   // check make(type)
   TEST_F (AnaToolHandleUseTest, makeTyped)
   {
-    ASSERT_DEATH (tool.make ("asg::UnitTestTool1"), "");
+    ASSERT_DEATH (tool.make ("asg::UnitTestTool1").ignore(), "");
   }
 #endif
 
@@ -351,7 +351,7 @@ namespace asg
   // check makeNew<type>()
   TEST_F (AnaToolHandleUseTest, makeNew)
   {
-    ASSERT_DEATH (tool.makeNew<asg::UnitTestTool1> ("asg::UnitTestTool1"), "");
+    ASSERT_DEATH (tool.makeNew<asg::UnitTestTool1> ("asg::UnitTestTool1").ignore(), "");
   }
 #endif
 
@@ -432,7 +432,7 @@ namespace asg
   // check setProperty<int>()
   TEST_F (AnaToolHandleUseTest, setPropertyInt)
   {
-    ASSERT_DEATH (tool.setProperty<int> ("propertyInt", 42), "");
+    ASSERT_DEATH (tool.setProperty<int> ("propertyInt", 42).ignore(), "");
   }
 #endif
 
@@ -461,7 +461,7 @@ namespace asg
   // check setProperty(const char*)
   TEST_F (AnaToolHandleUseTest, setPropertyString)
   {
-    ASSERT_DEATH (tool.setProperty ("propertyString", "42"), "");
+    ASSERT_DEATH (tool.setProperty ("propertyString", "42").ignore(), "");
   }
 #endif
 
@@ -487,7 +487,7 @@ namespace asg
   // check initialize()
   TEST_F (AnaToolHandleUseTest, initialize)
   {
-    ASSERT_DEATH (tool.initialize(), "");
+    ASSERT_DEATH (tool.initialize().ignore(), "");
   }
 #endif
 
-- 
GitLab


From 60c3364dfbda686ae1b8b93d83d7f226b6bb987b Mon Sep 17 00:00:00 2001
From: Nils Krumnack <krumnack@iastate.edu>
Date: Thu, 1 Oct 2020 09:07:57 -0500
Subject: [PATCH 092/403] handled previously unchecked status code

---
 .../ElectronEfficiencyCorrection/util/testEgChargeCorr.cxx    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/testEgChargeCorr.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/testEgChargeCorr.cxx
index daf62201577d..ed74807f89f0 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/testEgChargeCorr.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/testEgChargeCorr.cxx
@@ -94,12 +94,12 @@ int main( int argc, char* argv[] ) {
 
     CHECK( myEgCorrections.setProperty("DefaultRandomRunNumber", (unsigned int)311481 ) );
     CHECK( myEgCorrections.setProperty("UseRandomRunNumber",false) );
-    myEgCorrections.initialize();
+    CHECK( myEgCorrections.initialize() );
 
     AsgElectronLikelihoodTool * m_LHToolTight = new AsgElectronLikelihoodTool("m_LHToolTight");
     CHECK (m_LHToolTight->setProperty("primaryVertexContainer","PrimaryVertices") );
     m_LHToolTight->setProperty("ConfigFile","ElectronPhotonSelectorTools/offline/mc15_20160512/ElectronLikelihoodLooseOfflineConfig2016_CutBL_Smooth.conf").ignore();
-    m_LHToolTight->initialize();
+    CHECK ( m_LHToolTight->initialize() );
 
 
     // Get a list of systematics
-- 
GitLab


From 83b624957fc6614c5066f6ede238f17e7b76220c Mon Sep 17 00:00:00 2001
From: Nils Krumnack <krumnack@iastate.edu>
Date: Thu, 1 Oct 2020 09:08:09 -0500
Subject: [PATCH 093/403] handled previously unchecked status code

---
 .../Root/EgammaCalibrationAndSmearingTool.cxx               | 6 +++---
 .../util/testEgammaCalibTool.cxx                            | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/Root/EgammaCalibrationAndSmearingTool.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/Root/EgammaCalibrationAndSmearingTool.cxx
index 93ed52f4e4ba..82397858f7f3 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/Root/EgammaCalibrationAndSmearingTool.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/Root/EgammaCalibrationAndSmearingTool.cxx
@@ -702,7 +702,7 @@ CP::CorrectionCode EgammaCalibrationAndSmearingTool::correctedCopy(const xAOD::P
 double EgammaCalibrationAndSmearingTool::getEnergy(const xAOD::Photon& input)
 {
   xAOD::Photon* new_particle = nullptr;
-  correctedCopy(input, new_particle);
+  ANA_CHECK_THROW (correctedCopy(input, new_particle));
   const double e = new_particle->e();
   delete new_particle;
   return e;
@@ -711,7 +711,7 @@ double EgammaCalibrationAndSmearingTool::getEnergy(const xAOD::Photon& input)
 double EgammaCalibrationAndSmearingTool::getEnergy(const xAOD::Electron& input)
 {
   xAOD::Electron* new_particle = nullptr;
-  correctedCopy(input, new_particle);
+  ANA_CHECK_THROW (correctedCopy(input, new_particle));
   const double e = new_particle->e();
   delete new_particle;
   return e;
@@ -854,7 +854,7 @@ CP::CorrectionCode EgammaCalibrationAndSmearingTool::applyCorrection(xAOD::Egamm
 
 double EgammaCalibrationAndSmearingTool::getEnergy(xAOD::Egamma* p, const xAOD::EventInfo* event_info)
 {
-  applyCorrection(*p, *event_info);
+  ANA_CHECK_THROW (applyCorrection(*p, *event_info));
   ATH_MSG_DEBUG("returning " << p->e());
   return p->e();
 }
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/util/testEgammaCalibTool.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/util/testEgammaCalibTool.cxx
index 95f7e6ea9cb6..905ebc3c195e 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/util/testEgammaCalibTool.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/util/testEgammaCalibTool.cxx
@@ -96,8 +96,8 @@ int main( int argc, char* argv[] ) {
 
    // Create the tool
    std::unique_ptr<CP::IEgammaCalibrationAndSmearingTool> tool(new CP::EgammaCalibrationAndSmearingTool("EgammaCalibrationAndSmearingTool"));
-   asg::setProperty(tool.get(), "ESModel", "es2017_R21_PRE");
-   asg::setProperty(tool.get(), "randomRunNumber", 123456);
+   RETURN_CHECK(APP_NAME, asg::setProperty(tool.get(), "ESModel", "es2017_R21_PRE"));
+   RETURN_CHECK(APP_NAME, asg::setProperty(tool.get(), "randomRunNumber", 123456));
    RETURN_CHECK(APP_NAME, tool->initialize());
 
 
-- 
GitLab


From 97b2b70e022f714fb0f90f2f4901769eb4f37fd0 Mon Sep 17 00:00:00 2001
From: Nils Krumnack <krumnack@iastate.edu>
Date: Thu, 1 Oct 2020 09:08:18 -0500
Subject: [PATCH 094/403] handled previously unchecked status code

---
 .../util/BTaggingSelectionToolTester.cxx      | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/util/BTaggingSelectionToolTester.cxx b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/util/BTaggingSelectionToolTester.cxx
index bf874a431880..d4a739656cbf 100644
--- a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/util/BTaggingSelectionToolTester.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/util/BTaggingSelectionToolTester.cxx
@@ -8,19 +8,24 @@
 #include "xAODJet/JetContainer.h"
 #include "xAODBTagging/BTaggingAuxContainer.h"
 
+#include "AsgMessaging/MessageCheck.h"
+
 #include <string>
 #include <iomanip>
 
 int main() {
 
+  using namespace asg::msgUserCode;
+  ANA_CHECK_SET_TYPE (int);
+
   BTaggingSelectionTool * tool = new BTaggingSelectionTool("BTagSelecTest");
-  tool->setProperty( "MaxEta", 2.5 );
-  tool->setProperty( "MinPt", 20000. );  
-  //  tool->setProperty( "FlvTagCutDefinitionsFileName","xAODBTaggingEfficiency/13TeV/2016-20_7-13TeV-MC15-CDI-May31_v1.root" );
-  tool->setProperty( "FlvTagCutDefinitionsFileName","xAODBTaggingEfficiency/share/AntiKt2TrackJets_20160615.root" );
-  tool->setProperty("TaggerName",     "MV2c00_MV2c100"  );
-  tool->setProperty("OperatingPoint", "2DFixedCutBEff_85"   );
-  tool->setProperty("JetAuthor",      "AntiKt2PV0TrackJets" );
+  ANA_CHECK (tool->setProperty( "MaxEta", 2.5 ));
+  ANA_CHECK (tool->setProperty( "MinPt", 20000. ));  
+  //  ANA_CHECK (tool->setProperty( "FlvTagCutDefinitionsFileName","xAODBTaggingEfficiency/13TeV/2016-20_7-13TeV-MC15-CDI-May31_v1.root" ));
+  ANA_CHECK (tool->setProperty( "FlvTagCutDefinitionsFileName","xAODBTaggingEfficiency/share/AntiKt2TrackJets_20160615.root" ));
+  ANA_CHECK (tool->setProperty("TaggerName",     "MV2c00_MV2c100"  ));
+  ANA_CHECK (tool->setProperty("OperatingPoint", "2DFixedCutBEff_85"   ));
+  ANA_CHECK (tool->setProperty("JetAuthor",      "AntiKt2PV0TrackJets" ));
 
   // A successful initialisation ought to be checked for
   StatusCode code = tool->initialize();
-- 
GitLab


From 8a56954592f6f65408e894456ea8d03d3637239d Mon Sep 17 00:00:00 2001
From: Nils Krumnack <krumnack@iastate.edu>
Date: Thu, 1 Oct 2020 09:08:27 -0500
Subject: [PATCH 095/403] handled previously unchecked status code

---
 .../TauID/TauAnalysisTools/util/TauAnalysisToolsExample.cxx     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/util/TauAnalysisToolsExample.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/util/TauAnalysisToolsExample.cxx
index 9dcb4fd03f12..3bfe9af4e9e1 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/util/TauAnalysisToolsExample.cxx
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/util/TauAnalysisToolsExample.cxx
@@ -365,7 +365,7 @@ int main( int argc, char* argv[] )
       // }
     }
     if (xTauJetContainer->empty())
-      T2MT.retrieveTruthTaus();
+      CHECK (T2MT.retrieveTruthTaus());
     xEvent.fill();
   }
 
-- 
GitLab


From a0d3d7bb993cf23c486fb8bba5b1a3327e25ad95 Mon Sep 17 00:00:00 2001
From: Nils Krumnack <krumnack@iastate.edu>
Date: Thu, 1 Oct 2020 09:08:32 -0500
Subject: [PATCH 096/403] handled previously unchecked status code

---
 .../MET/METUtilities/util/example_rebuildTrackMET.cxx         | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Reconstruction/MET/METUtilities/util/example_rebuildTrackMET.cxx b/Reconstruction/MET/METUtilities/util/example_rebuildTrackMET.cxx
index 79b64d1ae9d4..9f5babd48b51 100644
--- a/Reconstruction/MET/METUtilities/util/example_rebuildTrackMET.cxx
+++ b/Reconstruction/MET/METUtilities/util/example_rebuildTrackMET.cxx
@@ -60,8 +60,10 @@ int main() {
 using namespace asg::msgUserCode;
 
 int main( int argc, char* argv[]) {std::cout << __PRETTY_FUNCTION__ << std::endl;
+  ANA_CHECK_SET_TYPE (int);
+
 #ifdef XAOD_STANDALONE
-  xAOD::Init() ;
+  ANA_CHECK (xAOD::Init()) ;
   //enable status code failures
   CP::CorrectionCode::enableFailure();
   CP::SystematicCode::enableFailure();
-- 
GitLab


From 495d260fc7f9f08d3d1fa235696b5491f5dea025 Mon Sep 17 00:00:00 2001
From: Nils Krumnack <krumnack@iastate.edu>
Date: Thu, 1 Oct 2020 15:38:38 -0500
Subject: [PATCH 097/403] fix test to use status code

Apparently the test should have checked for FAILURE, not for DEATH.
---
 .../AsgExampleTools/test/gt_AnaToolHandle_test.cxx              | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Control/AthToolSupport/AsgExampleTools/test/gt_AnaToolHandle_test.cxx b/Control/AthToolSupport/AsgExampleTools/test/gt_AnaToolHandle_test.cxx
index fb695eb98aa2..ac2d51c96a8a 100644
--- a/Control/AthToolSupport/AsgExampleTools/test/gt_AnaToolHandle_test.cxx
+++ b/Control/AthToolSupport/AsgExampleTools/test/gt_AnaToolHandle_test.cxx
@@ -351,7 +351,7 @@ namespace asg
   // check makeNew<type>()
   TEST_F (AnaToolHandleUseTest, makeNew)
   {
-    ASSERT_DEATH (tool.makeNew<asg::UnitTestTool1> ("asg::UnitTestTool1").ignore(), "");
+    ASSERT_FAILURE (tool.makeNew<asg::UnitTestTool1> ("asg::UnitTestTool1"));
   }
 #endif
 
-- 
GitLab


From b71cc82200a26923f31ede48a1d2f1347467752e Mon Sep 17 00:00:00 2001
From: Nils Krumnack <krumnack@iastate.edu>
Date: Thu, 1 Oct 2020 15:40:12 -0500
Subject: [PATCH 098/403] add checks for unchecked status codes

---
 .../POOLRootAccess/test/ut_basicRead_test.cxx  | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/PhysicsAnalysis/POOLRootAccess/test/ut_basicRead_test.cxx b/PhysicsAnalysis/POOLRootAccess/test/ut_basicRead_test.cxx
index 758bbda25725..8ebdc70d712c 100644
--- a/PhysicsAnalysis/POOLRootAccess/test/ut_basicRead_test.cxx
+++ b/PhysicsAnalysis/POOLRootAccess/test/ut_basicRead_test.cxx
@@ -12,10 +12,16 @@
 #include "xAODRootAccess/Init.h"
 #include "xAODRootAccess/TEvent.h"
 
+#include "AsgMessaging/MessageCheck.h"
+
 #include "AthAnalysisBaseComps/AthAnalysisHelper.h"
 
 int main(int argc, char* argv[]) {
 
+   ANA_CHECK_SET_TYPE (int);
+   using namespace asg::msgUserCode;
+   
+
    std::string whatToRead = "$ASG_TEST_FILE_MC";
    if(argc>1) whatToRead = argv[1];
 
@@ -24,18 +30,18 @@ int main(int argc, char* argv[]) {
    const xAOD::EventInfo_v1* evtInfo = 0;
 
 
-   xAOD::Init();
-  TChain* c = new TChain("CollectionTree"); 
-  c->Add(whatToRead.c_str());
-  xAOD::TEvent evt2;
-  evt2.readFrom(c);
+   ANA_CHECK (xAOD::Init());
+   TChain* c = new TChain("CollectionTree"); 
+   c->Add(whatToRead.c_str());
+   xAOD::TEvent evt2;
+   ANA_CHECK (evt2.readFrom(c));
 
    int maxEvt2 = evt2.getEntries(); 
    TStopwatch st2;
    st2.Start();
    for(int i=0; i< maxEvt2; i++) {
       evt2.getEntry(i);
-      evt2.retrieve( evtInfo , "EventInfo" );
+      ANA_CHECK (evt2.retrieve( evtInfo , "EventInfo" ));
       evtInfo->eventNumber();
    }
    st2.Stop();
-- 
GitLab


From 9edc09c6f76e97ae6dfff2dd6a1a76b5d63a6d93 Mon Sep 17 00:00:00 2001
From: Nils Krumnack <Nils.Erik.Krumnack@cern.ch>
Date: Fri, 2 Oct 2020 16:43:00 +0200
Subject: [PATCH 099/403] fix unit test that was wrongly expected to fail

This was set to fail because not checking the StatusCode caused an
abort, but now that I actually check the StatusCode it should succeed.
---
 .../AsgExampleTools/test/gt_AnaToolHandle_test.cxx              | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Control/AthToolSupport/AsgExampleTools/test/gt_AnaToolHandle_test.cxx b/Control/AthToolSupport/AsgExampleTools/test/gt_AnaToolHandle_test.cxx
index ac2d51c96a8a..c5556a927911 100644
--- a/Control/AthToolSupport/AsgExampleTools/test/gt_AnaToolHandle_test.cxx
+++ b/Control/AthToolSupport/AsgExampleTools/test/gt_AnaToolHandle_test.cxx
@@ -351,7 +351,7 @@ namespace asg
   // check makeNew<type>()
   TEST_F (AnaToolHandleUseTest, makeNew)
   {
-    ASSERT_FAILURE (tool.makeNew<asg::UnitTestTool1> ("asg::UnitTestTool1"));
+    ASSERT_SUCCESS (tool.makeNew<asg::UnitTestTool1> ("asg::UnitTestTool1"));
   }
 #endif
 
-- 
GitLab


From 980ed848c863d01c7e5c6391c04071e4f3a4f9f9 Mon Sep 17 00:00:00 2001
From: Nils Krumnack <Nils.Erik.Krumnack@cern.ch>
Date: Fri, 2 Oct 2020 16:47:02 +0200
Subject: [PATCH 100/403] add missing dependency

---
 PhysicsAnalysis/POOLRootAccess/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PhysicsAnalysis/POOLRootAccess/CMakeLists.txt b/PhysicsAnalysis/POOLRootAccess/CMakeLists.txt
index a3df8865960f..25a1ba2324ac 100644
--- a/PhysicsAnalysis/POOLRootAccess/CMakeLists.txt
+++ b/PhysicsAnalysis/POOLRootAccess/CMakeLists.txt
@@ -38,7 +38,7 @@ atlas_add_dictionary( POOLRootAccessDict
 atlas_add_executable( ut_basicRead_test
                       test/ut_basicRead_test.cxx
                       INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} POOLRootAccessLib xAODEventInfo )
+                      LINK_LIBRARIES ${ROOT_LIBRARIES} POOLRootAccessLib xAODEventInfo AsgMessagingLib )
 
 atlas_add_executable( ut_basicxAODRead_test
                       test/ut_basicxAODRead_test.cxx
-- 
GitLab


From 7f237fcaf3d54bf3e82247d5698b4cf59905f050 Mon Sep 17 00:00:00 2001
From: Nils Krumnack <Nils.Erik.Krumnack@cern.ch>
Date: Fri, 2 Oct 2020 16:47:21 +0200
Subject: [PATCH 101/403] check unchecked status code

---
 .../TauAnalysisTools/src/TauAnalysisToolsExampleAthena.cxx    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/src/TauAnalysisToolsExampleAthena.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/src/TauAnalysisToolsExampleAthena.cxx
index 1ba23c7ad51f..f705e02402b6 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/src/TauAnalysisToolsExampleAthena.cxx
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/src/TauAnalysisToolsExampleAthena.cxx
@@ -71,11 +71,11 @@ StatusCode TauAnalysisToolsExampleAthena::execute()
     tau = new xAOD::TauJet();
     tau->makePrivateStore( **tau_itr );
 
-    m_effTool->applyEfficiencyScaleFactor(*tau);
+    ATH_CHECK (m_effTool->applyEfficiencyScaleFactor(*tau));
 
     ATH_MSG_INFO( "  sf = " << tau->auxdata< double >( "TauScaleFactorJetID" ) );
 
-    m_smearTool->applyCorrection(*tau);
+    ATH_CHECK (m_smearTool->applyCorrection(*tau));
     ATH_MSG_INFO( "Unsmeared tau pt " << tau->pt() << " Smeared tau pt: " << tau->p4().Pt());
   }
 
-- 
GitLab


From e6c68924555f08f1fdb6ae68158887bdb0d986b3 Mon Sep 17 00:00:00 2001
From: Nils Krumnack <Nils.Erik.Krumnack@cern.ch>
Date: Fri, 2 Oct 2020 16:59:34 +0200
Subject: [PATCH 102/403] check unchecked status codes

---
 .../MuonMomentumCorrections/util/MCAST_Tester.cxx      | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/util/MCAST_Tester.cxx b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/util/MCAST_Tester.cxx
index 29458e8218ee..f913e7948d31 100644
--- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/util/MCAST_Tester.cxx
+++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/util/MCAST_Tester.cxx
@@ -41,6 +41,10 @@ ANA_MSG_HEADER(msgMMC)
 
 int main( int argc, char* argv[] ) {
 
+  // setup for ANA_CHECK()
+  using namespace msgMMC;
+  ANA_CHECK_SET_TYPE (int);
+
   bool useCorrectedCopy = false;
 
   // The application's name:
@@ -92,7 +96,7 @@ int main( int argc, char* argv[] ) {
   ////////////////////////////////////////////////////
   //:::  initialize the application and get the event
   ////////////////////////////////////////////////////
-  xAOD::Init( APP_NAME );
+  ANA_CHECK (xAOD::Init( APP_NAME ));
   xAOD::TReturnCode::enableFailure();
 
   //::: Open the input file:
@@ -221,14 +225,14 @@ int main( int argc, char* argv[] ) {
 
     // Print some event information
     const xAOD::EventInfo* evtInfo = 0;
-    event.retrieve( evtInfo, "EventInfo" );
+    ANA_CHECK( event.retrieve( evtInfo, "EventInfo" ));
     if(Ievent!=-1 && static_cast <int> (evtInfo->eventNumber())!=Ievent) {
       continue;
     }
 
     //::: Get the Muons from the event:
     const xAOD::MuonContainer* muons = 0;
-    event.retrieve( muons, "Muons" );
+    ANA_CHECK( event.retrieve( muons, "Muons" ));
 
     // create a shallow copy of the muons container
     std::pair< xAOD::MuonContainer*, xAOD::ShallowAuxContainer* > muons_shallowCopy = xAOD::shallowCopyContainer( *muons );
-- 
GitLab


From df6f328cbe11fc62d9fc274e0ddfc869b3254cc4 Mon Sep 17 00:00:00 2001
From: abarton <Adam.Edward.Barton@cern.ch>
Date: Fri, 2 Oct 2020 16:58:49 +0100
Subject: [PATCH 103/403] Add class checks for SiDetElementLink_xk classes

---
 .../src/SiDetElementsRoadMaker_xk.cxx                  | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx
index 570c835f6271..7cbc5ea18754 100644
--- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx
@@ -41,6 +41,16 @@ InDet::SiDetElementsRoadMaker_xk::SiDetElementsRoadMaker_xk
 
 StatusCode InDet::SiDetElementsRoadMaker_xk::initialize()
 {
+  //Class optimization checks
+  static_assert(std::is_trivially_copyable<SiDetElementLink_xk::UsedFlag>::value);
+  static_assert(std::is_trivially_destructible<SiDetElementLink_xk::UsedFlag>::value);
+  static_assert(std::is_trivially_copyable<SiDetElementLink_xk::ElementWay>::value);
+  static_assert(std::is_trivially_destructible<SiDetElementLink_xk::ElementWay>::value);
+  static_assert(std::is_trivially_copyable<SiDetElementLink_xk>::value);
+  static_assert(std::is_trivially_destructible<SiDetElementLink_xk>::value);
+  static_assert(std::is_nothrow_move_constructible<SiDetElementsLayer_xk>::value);
+
+
   if (!m_usePIX && !m_useSCT) {
     ATH_MSG_FATAL("Please don't call this tool if usePixel and useSCT are false");
     return StatusCode::FAILURE;
-- 
GitLab


From 4899b328581d77f496b00e063d8f2c7ef7b36c50 Mon Sep 17 00:00:00 2001
From: Nils Krumnack <krumnack@iastate.edu>
Date: Fri, 2 Oct 2020 11:34:51 -0500
Subject: [PATCH 104/403] remove AsgTools/Check.h

This has been superseded by AsgMessaging/Check.h.
---
 Control/AthToolSupport/AsgTools/AsgTools/Check.h | 16 ----------------
 .../Root/InDetSecVtxTrackSelectionTool.cxx       |  2 +-
 .../Root/InDetTrackSelectionTool.cxx             |  2 +-
 .../AssociationUtils/MacroChecks.h               |  2 +-
 .../FsrUtils/Root/FsrPhotonTool.cxx              |  2 +-
 .../Root/CopyTruthJetParticles.cxx               |  2 +-
 .../ParticleJetTools/Root/CopyTruthParticles.cxx |  2 +-
 .../Root/JetParticleCenterOfMassAssociation.cxx  |  2 +-
 .../Root/JetParticleShrinkingConeAssociation.cxx |  2 +-
 .../Root/ParticleJetDeltaRLabelTool.cxx          |  2 +-
 .../Root/ParticleJetGhostLabelTool.cxx           |  2 +-
 .../HIEventUtils/Root/HIVertexSelectionTool.cxx  |  2 +-
 .../util/run_evtselection_tool_test.cxx          |  2 +-
 .../HIEventUtils/util/run_vertex_tool_test.cxx   |  2 +-
 .../MuonEfficiencyScaleFactorsSFFileTester.cxx   |  2 +-
 .../util/MuonEfficiencyScaleFactorsTest.cxx      |  2 +-
 .../util/MuonTriggerSFRootCoreTest.cxx           |  2 +-
 .../util/MCAST_Tester.cxx                        |  2 +-
 .../JetReclustering/Root/JetReclusteringTool.cxx |  2 +-
 .../Root/BoostedXbbTagTool.cxx                   |  2 +-
 .../TrigDecisionTool/Root/CacheGlobalMemory.cxx  |  2 +-
 .../TrigDecisionTool/FeatureCollectStandalone.h  |  2 +-
 .../util/TrigMuonMatching_example.cxx            |  2 +-
 .../util/TrigTauMatching_example.cxx             |  2 +-
 24 files changed, 23 insertions(+), 39 deletions(-)
 delete mode 100644 Control/AthToolSupport/AsgTools/AsgTools/Check.h

diff --git a/Control/AthToolSupport/AsgTools/AsgTools/Check.h b/Control/AthToolSupport/AsgTools/AsgTools/Check.h
deleted file mode 100644
index 913c7989d24b..000000000000
--- a/Control/AthToolSupport/AsgTools/AsgTools/Check.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef FILE_AsgTools_Check_h
-#define FILE_AsgTools_Check_h
-
-// this file is likely used in a variety of places, so this warning is
-// disabled in 21.2.  once this gets swept to master it may be a good
-// idea to include this warning and remove all the users.
-
-// #warning "use of this file is deprecated, please include the header from AsgMessaging instead"
-
-#include <AsgMessaging/Check.h>
-
-#endif
diff --git a/InnerDetector/InDetRecTools/InDetSecVtxTrackSelectionTool/Root/InDetSecVtxTrackSelectionTool.cxx b/InnerDetector/InDetRecTools/InDetSecVtxTrackSelectionTool/Root/InDetSecVtxTrackSelectionTool.cxx
index 5bdef6ccb254..7f2829fade8c 100644
--- a/InnerDetector/InDetRecTools/InDetSecVtxTrackSelectionTool/Root/InDetSecVtxTrackSelectionTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetSecVtxTrackSelectionTool/Root/InDetSecVtxTrackSelectionTool.cxx
@@ -6,7 +6,7 @@
 #include "InDetSecVtxTrackSelectionTool/InDetSecVtxTrackSelectionTool.h"
 #include "InDetSecVtxTrackCut.h"
 
-#include "AsgTools/Check.h"
+#include "AsgMessaging/Check.h"
 #include "xAODTracking/TrackingPrimitives.h"
 #ifndef XAOD_ANALYSIS
 #include "TrkTrack/Track.h"
diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectionTool/Root/InDetTrackSelectionTool.cxx b/InnerDetector/InDetRecTools/InDetTrackSelectionTool/Root/InDetTrackSelectionTool.cxx
index 09a128d3552b..e482501e8eca 100644
--- a/InnerDetector/InDetRecTools/InDetTrackSelectionTool/Root/InDetTrackSelectionTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetTrackSelectionTool/Root/InDetTrackSelectionTool.cxx
@@ -5,7 +5,7 @@
 #include "InDetTrackSelectionTool/InDetTrackSelectionTool.h"
 #include "InDetTrackCut.h"
 
-#include "AsgTools/Check.h"
+#include "AsgMessaging/Check.h"
 #include "xAODTracking/TrackingPrimitives.h"
 
 #ifndef XAOD_ANALYSIS
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/MacroChecks.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/MacroChecks.h
index 8521da074f86..c9fd620ced8b 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/MacroChecks.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/MacroChecks.h
@@ -5,7 +5,7 @@
 #ifndef ASSOCIATIONUTILS_MACROCHECKS_H
 #define ASSOCIATIONUTILS_MACROCHECKS_H
 
-#include "AsgTools/Check.h"
+#include "AsgMessaging/Check.h"
 
 // Checks that pointer is non-null, prints error.
 // Can only be used in context where the ATH_MSG_XXX macros work
diff --git a/PhysicsAnalysis/AnalysisCommon/FsrUtils/Root/FsrPhotonTool.cxx b/PhysicsAnalysis/AnalysisCommon/FsrUtils/Root/FsrPhotonTool.cxx
index 201e9d8c49ba..be9e98552cf9 100644
--- a/PhysicsAnalysis/AnalysisCommon/FsrUtils/Root/FsrPhotonTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/FsrUtils/Root/FsrPhotonTool.cxx
@@ -7,7 +7,7 @@
 // Local include(s):
 #include "FsrUtils/FsrPhotonTool.h"
 #include "IsolationSelection/IsolationSelectionTool.h"
-#include "AsgTools/Check.h"
+#include "AsgMessaging/Check.h"
 
 namespace FSR {
 
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/CopyTruthJetParticles.cxx b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/CopyTruthJetParticles.cxx
index 3cf158009215..067c435ce0bc 100644
--- a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/CopyTruthJetParticles.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/CopyTruthJetParticles.cxx
@@ -12,7 +12,7 @@
 #include "AthContainers/ConstDataVector.h"
 #include "AsgDataHandles/ReadHandle.h"
 #include "AsgDataHandles/WriteHandle.h"
-#include "AsgTools/Check.h"
+#include "AsgMessaging/Check.h"
 
 #ifndef XAOD_STANDALONE
 // Usage of metadata is for now only possible in Athena...
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/CopyTruthParticles.cxx b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/CopyTruthParticles.cxx
index dc75e27f179b..5ed4b0e4ab56 100644
--- a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/CopyTruthParticles.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/CopyTruthParticles.cxx
@@ -5,7 +5,7 @@
 #include "ParticleJetTools/CopyTruthParticles.h"
 #include <memory>
 #include "TruthUtils/PIDHelpers.h"
-#include "AsgTools/Check.h"
+#include "AsgMessaging/Check.h"
 #include "AsgDataHandles/ReadHandle.h"
 #include "AsgDataHandles/WriteHandle.h"
 
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/JetParticleCenterOfMassAssociation.cxx b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/JetParticleCenterOfMassAssociation.cxx
index 5a10c0c6ba5e..c5a3d0433c67 100644
--- a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/JetParticleCenterOfMassAssociation.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/JetParticleCenterOfMassAssociation.cxx
@@ -5,7 +5,7 @@
 // author: jie.yu@cern.ch
 
 #include "ParticleJetTools/JetParticleCenterOfMassAssociation.h"
-#include "AsgTools/Check.h"
+#include "AsgMessaging/Check.h"
 #include "TLorentzVector.h"
 
 using namespace std;
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/JetParticleShrinkingConeAssociation.cxx b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/JetParticleShrinkingConeAssociation.cxx
index 400438a62ce8..11635ea0119f 100644
--- a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/JetParticleShrinkingConeAssociation.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/JetParticleShrinkingConeAssociation.cxx
@@ -5,7 +5,7 @@
 // author: cpollard@cern.ch
 
 #include "ParticleJetTools/JetParticleShrinkingConeAssociation.h"
-#include "AsgTools/Check.h"
+#include "AsgMessaging/Check.h"
 
 using namespace std;
 using namespace xAOD;
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/ParticleJetDeltaRLabelTool.cxx b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/ParticleJetDeltaRLabelTool.cxx
index 27040971a9f2..5ab3ad66a017 100644
--- a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/ParticleJetDeltaRLabelTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/ParticleJetDeltaRLabelTool.cxx
@@ -6,7 +6,7 @@
 #include "ParticleJetTools/ParticleJetLabelCommon.h"
 #include "xAODJet/JetContainer.h"
 #include "AsgDataHandles/ReadHandle.h"
-#include "AsgTools/Check.h"
+#include "AsgMessaging/Check.h"
 
 using namespace std;
 using namespace xAOD;
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/ParticleJetGhostLabelTool.cxx b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/ParticleJetGhostLabelTool.cxx
index 2a022fd3f80f..ed216f050703 100644
--- a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/ParticleJetGhostLabelTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/ParticleJetGhostLabelTool.cxx
@@ -5,7 +5,7 @@
 #include "ParticleJetTools/ParticleJetGhostLabelTool.h"
 #include "ParticleJetTools/ParticleJetLabelCommon.h"
 #include "xAODJet/JetContainer.h"
-#include "AsgTools/Check.h"
+#include "AsgMessaging/Check.h"
 
 using namespace std;
 using namespace xAOD;
diff --git a/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/Root/HIVertexSelectionTool.cxx b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/Root/HIVertexSelectionTool.cxx
index 92b76af96e91..d4ee7fdcd35f 100644
--- a/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/Root/HIVertexSelectionTool.cxx
+++ b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/Root/HIVertexSelectionTool.cxx
@@ -5,7 +5,7 @@
 
 #include "HIEventUtils/HIVertexSelectionTool.h"
 #include "xAODTracking/TrackParticleContainer.h"
-#include "AsgTools/Check.h"
+#include "AsgMessaging/Check.h"
 
 using std::string;
 
diff --git a/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/util/run_evtselection_tool_test.cxx b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/util/run_evtselection_tool_test.cxx
index 44279687d21b..652c5e1e474a 100644
--- a/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/util/run_evtselection_tool_test.cxx
+++ b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/util/run_evtselection_tool_test.cxx
@@ -7,7 +7,7 @@
 #include <string>
 #include "xAODRootAccess/Init.h"
 #include "xAODRootAccess/TEvent.h"
-#include "AsgTools/Check.h"
+#include "AsgMessaging/Check.h"
 #include "CxxUtils/make_unique.h"
 #include "HIEventUtils/HIVertexSelectionTool.h"
 #include "HIEventUtils/HIEventSelectionTool.h"
diff --git a/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/util/run_vertex_tool_test.cxx b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/util/run_vertex_tool_test.cxx
index dd74fa66ee80..a5641fce53a9 100644
--- a/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/util/run_vertex_tool_test.cxx
+++ b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/util/run_vertex_tool_test.cxx
@@ -7,7 +7,7 @@
 #include <string>
 #include "xAODRootAccess/Init.h"
 #include "xAODRootAccess/TEvent.h"
-#include "AsgTools/Check.h"
+#include "AsgMessaging/Check.h"
 #include "CxxUtils/make_unique.h"
 #include "HIEventUtils/HIVertexSelectionTool.h"
 #include "xAODTracking/VertexContainer.h"
diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonEfficiencyScaleFactorsSFFileTester.cxx b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonEfficiencyScaleFactorsSFFileTester.cxx
index 8d7a5cbeffb8..a0f19d665365 100644
--- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonEfficiencyScaleFactorsSFFileTester.cxx
+++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonEfficiencyScaleFactorsSFFileTester.cxx
@@ -23,7 +23,7 @@
 #   include "xAODRootAccess/Init.h"
 #   include "xAODRootAccess/TEvent.h"
 #   include "xAODRootAccess/tools/ReturnCheck.h"
-#   include "AsgTools/Check.h"
+#   include "AsgMessaging/Check.h"
 #endif // ROOTCORE
 
 // EDM include(s):
diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonEfficiencyScaleFactorsTest.cxx b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonEfficiencyScaleFactorsTest.cxx
index 104a54d90197..f832caa314b0 100644
--- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonEfficiencyScaleFactorsTest.cxx
+++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonEfficiencyScaleFactorsTest.cxx
@@ -22,7 +22,7 @@
 #include "xAODRootAccess/Init.h"
 #include "xAODRootAccess/TEvent.h"
 #include "xAODRootAccess/tools/ReturnCheck.h"
-#include "AsgTools/Check.h"
+#include "AsgMessaging/Check.h"
 
 // EDM include(s):
 #include "xAODEventInfo/EventInfo.h"
diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonTriggerSFRootCoreTest.cxx b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonTriggerSFRootCoreTest.cxx
index 385c7da2c525..d349a3502000 100644
--- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonTriggerSFRootCoreTest.cxx
+++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonTriggerSFRootCoreTest.cxx
@@ -18,7 +18,7 @@
 #   include "xAODRootAccess/Init.h"
 #   include "xAODRootAccess/TEvent.h"
 #   include "xAODRootAccess/tools/ReturnCheck.h"
-#   include "AsgTools/Check.h"
+#   include "AsgMessaging/Check.h"
 #endif // ROOTCORE
 
 // EDM include(s):
diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/util/MCAST_Tester.cxx b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/util/MCAST_Tester.cxx
index 29458e8218ee..828b418bd45a 100644
--- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/util/MCAST_Tester.cxx
+++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/util/MCAST_Tester.cxx
@@ -28,7 +28,7 @@
 #include "PATInterfaces/SystematicRegistry.h"
 #include "xAODCore/tools/IOStats.h"
 #include "xAODCore/tools/ReadStats.h"
-#include "AsgTools/Check.h"
+#include "AsgMessaging/Check.h"
 #include "AsgTools/AnaToolHandle.h"
 #include "PATInterfaces/SystematicCode.h"
 
diff --git a/Reconstruction/Jet/JetReclustering/Root/JetReclusteringTool.cxx b/Reconstruction/Jet/JetReclustering/Root/JetReclusteringTool.cxx
index 633038a1508b..da4de0b6f7af 100644
--- a/Reconstruction/Jet/JetReclustering/Root/JetReclusteringTool.cxx
+++ b/Reconstruction/Jet/JetReclustering/Root/JetReclusteringTool.cxx
@@ -3,7 +3,7 @@
 */
 
 #include "JetReclustering/JetReclusteringTool.h"
-#include "AsgTools/Check.h"
+#include "AsgMessaging/Check.h"
 
 #include "JetInterface/IJetModifier.h"
 #include "JetInterface/IJetFromPseudojet.h"
diff --git a/Reconstruction/Jet/JetSubStructureMomentTools/Root/BoostedXbbTagTool.cxx b/Reconstruction/Jet/JetSubStructureMomentTools/Root/BoostedXbbTagTool.cxx
index 7616c7b74061..bba03ef63b20 100644
--- a/Reconstruction/Jet/JetSubStructureMomentTools/Root/BoostedXbbTagTool.cxx
+++ b/Reconstruction/Jet/JetSubStructureMomentTools/Root/BoostedXbbTagTool.cxx
@@ -5,7 +5,7 @@
 #include "JetSubStructureMomentTools/BoostedXbbTagTool.h"
 #include "JetSubStructureUtils/BoostedXbbTag.h"
 #include "xAODMuon/Muon.h"
-#include "AsgTools/Check.h"
+#include "AsgMessaging/Check.h"
 
 using namespace std;
 
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/Root/CacheGlobalMemory.cxx b/Trigger/TrigAnalysis/TrigDecisionTool/Root/CacheGlobalMemory.cxx
index 223dbd2c8ae0..8dbd32782f2c 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/Root/CacheGlobalMemory.cxx
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/Root/CacheGlobalMemory.cxx
@@ -45,7 +45,7 @@
 #ifndef XAOD_STANDALONE
 #include "AthenaBaseComps/AthCheckMacros.h"
 #else
-#include "AsgTools/Check.h"
+#include "AsgMessaging/Check.h"
 #endif
 
 
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/FeatureCollectStandalone.h b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/FeatureCollectStandalone.h
index 651808deff56..e4c5a196be8d 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/FeatureCollectStandalone.h
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/FeatureCollectStandalone.h
@@ -42,7 +42,7 @@
 
 #include "TrigNavStructure/TrigNavStructure.h"
 
-#include "AsgTools/Check.h"
+#include "AsgMessaging/Check.h"
 
 #include "TrigNavStructure/TypedHolder.h"
 
diff --git a/Trigger/TrigAnalysis/TrigMuonMatching/util/TrigMuonMatching_example.cxx b/Trigger/TrigAnalysis/TrigMuonMatching/util/TrigMuonMatching_example.cxx
index ebd665abd2e8..1aef2af9b287 100644
--- a/Trigger/TrigAnalysis/TrigMuonMatching/util/TrigMuonMatching_example.cxx
+++ b/Trigger/TrigAnalysis/TrigMuonMatching/util/TrigMuonMatching_example.cxx
@@ -7,7 +7,7 @@
 #include "xAODRootAccess/Init.h"
 #include "xAODRootAccess/tools/ReturnCheck.h"
 #include "xAODRootAccess/TEvent.h"
-#include "AsgTools/Check.h"
+#include "AsgMessaging/Check.h"
 #endif 
 
 #include "TrigConfxAOD/xAODConfigTool.h"
diff --git a/Trigger/TrigAnalysis/TrigTauAnalysis/TrigTauMatching/util/TrigTauMatching_example.cxx b/Trigger/TrigAnalysis/TrigTauAnalysis/TrigTauMatching/util/TrigTauMatching_example.cxx
index e15db176bf5b..cccf60df8ebf 100644
--- a/Trigger/TrigAnalysis/TrigTauAnalysis/TrigTauMatching/util/TrigTauMatching_example.cxx
+++ b/Trigger/TrigAnalysis/TrigTauAnalysis/TrigTauMatching/util/TrigTauMatching_example.cxx
@@ -8,7 +8,7 @@
 #include "xAODRootAccess/tools/ReturnCheck.h"
 #include "xAODRootAccess/TEvent.h"
 #include "xAODCore/ShallowCopy.h"
-#include "AsgTools/Check.h"
+#include "AsgMessaging/Check.h"
 #endif 
 
 #include "TrigConfxAOD/xAODConfigTool.h"
-- 
GitLab


From 783dc6d18c906c590efe091be71e7854f1a988c3 Mon Sep 17 00:00:00 2001
From: Nils Krumnack <krumnack@iastate.edu>
Date: Fri, 2 Oct 2020 11:38:44 -0500
Subject: [PATCH 105/403] remove AsgTools/IMessagePrinter.h

That has been superseded by AsgMessaging/IMessagePrinter.h.
---
 .../AsgTools/AsgTools/IMessagePrinter.h          | 16 ----------------
 .../EventLoopTest/test/gt_Algorithm.cxx          |  2 +-
 2 files changed, 1 insertion(+), 17 deletions(-)
 delete mode 100644 Control/AthToolSupport/AsgTools/AsgTools/IMessagePrinter.h

diff --git a/Control/AthToolSupport/AsgTools/AsgTools/IMessagePrinter.h b/Control/AthToolSupport/AsgTools/AsgTools/IMessagePrinter.h
deleted file mode 100644
index 3c56d65513b8..000000000000
--- a/Control/AthToolSupport/AsgTools/AsgTools/IMessagePrinter.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef FILE_AsgTools_IMessagePrinter_h
-#define FILE_AsgTools_IMessagePrinter_h
-
-// this file is likely used in a variety of places, so this warning is
-// disabled in 21.2.  once this gets swept to master it may be a good
-// idea to include this warning and remove all the users.
-
-// #warning "use of this file is deprecated, please include the header from AsgMessaging instead"
-
-#include <AsgMessaging/IMessagePrinter.h>
-
-#endif
diff --git a/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_Algorithm.cxx b/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_Algorithm.cxx
index 101fbee1ac94..ec25264b1b0f 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_Algorithm.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_Algorithm.cxx
@@ -12,7 +12,7 @@
 
 #include <AsgTools/AnaToolHandle.h>
 #include <AsgTools/MessageCheck.h>
-#include <AsgTools/IMessagePrinter.h>
+#include <AsgMessaging/IMessagePrinter.h>
 #include <AsgTools/MessagePrinterOverlay.h>
 #include <AsgTesting/UnitTest.h>
 #include <AsgTesting/MessagePrinterMock.h>
-- 
GitLab


From f598ac8d56e390c649bad64ddf14bd28295d0ebd Mon Sep 17 00:00:00 2001
From: Nils Krumnack <krumnack@iastate.edu>
Date: Fri, 2 Oct 2020 11:40:03 -0500
Subject: [PATCH 106/403] remove AsgTools/INamedInterface.h

That has been superseded by AsgMessaging/INamedInterface.h.
---
 .../AsgTools/AsgTools/INamedInterface.h          | 16 ----------------
 .../D3PDTools/EventLoop/EventLoop/Algorithm.h    |  2 +-
 2 files changed, 1 insertion(+), 17 deletions(-)
 delete mode 100644 Control/AthToolSupport/AsgTools/AsgTools/INamedInterface.h

diff --git a/Control/AthToolSupport/AsgTools/AsgTools/INamedInterface.h b/Control/AthToolSupport/AsgTools/AsgTools/INamedInterface.h
deleted file mode 100644
index bd805ef45962..000000000000
--- a/Control/AthToolSupport/AsgTools/AsgTools/INamedInterface.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef FILE_AsgTools_INamedInterface_h
-#define FILE_AsgTools_INamedInterface_h
-
-// this file is likely used in a variety of places, so this warning is
-// disabled in 21.2.  once this gets swept to master it may be a good
-// idea to include this warning and remove all the users.
-
-// #warning "use of this file is deprecated, please include the header from AsgMessaging instead"
-
-#include <AsgMessaging/INamedInterface.h>
-
-#endif
diff --git a/PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/Algorithm.h b/PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/Algorithm.h
index 841d94708e59..355599a218a9 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/Algorithm.h
+++ b/PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/Algorithm.h
@@ -24,7 +24,7 @@
 #include <EventLoop/Global.h>
 
 #include <TNamed.h>
-#include <AsgTools/INamedInterface.h>
+#include <AsgMessaging/INamedInterface.h>
 #include <AsgTools/SgTEvent.h>
 #include <EventLoop/StatusCode.h>
 
-- 
GitLab


From 97b1942eac511a41fd0ebebc5b43f3f30a71a68c Mon Sep 17 00:00:00 2001
From: Nils Krumnack <krumnack@iastate.edu>
Date: Fri, 2 Oct 2020 11:41:27 -0500
Subject: [PATCH 107/403] remove AsgTools/MessageCheck.h

That has been superseded by AsgMessaging/MessageCheck.h.
---
 .../AsgTools/AsgTools/MessageCheck.h             | 16 ----------------
 .../AsgTools/Root/AnaToolHandle.cxx              |  2 +-
 .../GoodRunsLists/Root/GRLSelectorAlg.cxx        |  2 +-
 Event/EventBookkeeperTools/util/dump-cbk.cxx     |  2 +-
 .../util/TrackVertexAssoValidator.cxx            |  2 +-
 .../Root/SysListLoaderAlg.cxx                    |  2 +-
 .../Root/OutOfValidityEventHelper.cxx            |  2 +-
 .../Root/OutOfValidityHelper.cxx                 |  2 +-
 .../Root/SelectionReadHandle.cxx                 |  2 +-
 .../SelectionHelpers/SelectionHelpers.h          |  2 +-
 .../test/gt_ISelectionAccessor.cxx               |  2 +-
 .../SystematicsHandles/Root/SysListHandle.cxx    |  2 +-
 .../SystematicsHandles/CopyHelpers.h             |  2 +-
 .../SystematicsHandles/SysCopyHandle.icc         |  2 +-
 .../SystematicsHandles/SysDecorationHandle.icc   |  2 +-
 .../SystematicsHandles/SysReadHandle.icc         |  2 +-
 .../SystematicsHandles/SysReadHandleArray.icc    |  2 +-
 .../SystematicsHandles/SysWriteHandle.icc        |  2 +-
 .../SystematicsHandles/test/ut_CopyHelpers.cxx   |  2 +-
 .../test/gt_AnaToolHandle_test.cxx               |  2 +-
 .../test/gt_OverlapRemovalInit_test.cxx          |  2 +-
 .../AssociationUtils/test/gt_toolbox_test.cxx    |  2 +-
 .../PATInterfaces/PATInterfaces/MessageCheck.h   |  2 +-
 .../AnalysisCommon/PMGTools/test/MyPMGApp.cxx    |  2 +-
 .../PMGTools/test/ut_PMGTruthWeightTool_test.cxx |  2 +-
 .../AnaAlgorithm/AnaAlgorithm/AnaAlgorithm.h     |  2 +-
 .../AnaAlgorithm/AnaAlgorithm/MessageCheck.h     |  2 +-
 .../D3PDTools/AnaAlgorithm/Root/AnaAlgorithm.cxx |  2 +-
 .../D3PDTools/EventLoop/EventLoop/MessageCheck.h |  2 +-
 .../D3PDTools/EventLoop/Root/TEventModule.cxx    |  2 +-
 .../D3PDTools/EventLoop/Root/VomsProxySvc.cxx    |  2 +-
 .../EventLoop/util/eventloop_batch_worker.cxx    |  2 +-
 .../EventLoopGrid/util/eventloop_grid_merge.cxx  |  2 +-
 .../util/eventloop_run_grid_job.cxx              |  2 +-
 .../EventLoopTest/Root/UnitTestAlgXAOD.cxx       |  2 +-
 .../EventLoopTest/Root/UnitTestFixture.cxx       |  2 +-
 .../EventLoopTest/test/gt_Algorithm.cxx          |  2 +-
 .../EventLoopTest/test/gt_AnaAlgorithm.cxx       |  2 +-
 .../EventLoopTest/test/gt_DirectDriver.cxx       |  2 +-
 .../EventLoopTest/test/gt_LSFDriver_EOS.cxx      |  2 +-
 .../EventLoopTest/test/gt_LocalDriver.cxx        |  2 +-
 .../D3PDTools/SampleHandler/Root/GridTools.cxx   |  2 +-
 .../SampleHandler/SampleHandler/GridTools.h      |  2 +-
 .../SampleHandler/SampleHandler/MessageCheck.h   |  2 +-
 .../util/EGIdentification_mem_check.cxx          |  2 +-
 .../util/testEGIdentificationPoints.cxx          |  2 +-
 .../test/ut_MuonSelectorToolsTester_data.cxx     |  2 +-
 .../test/ut_TauAnalysisTools_test.cxx            |  2 +-
 .../JetCalibTools/util/JetCalibTools_Example.cxx |  2 +-
 .../JetRecTools/JetInputElRemovalTool.h          |  2 +-
 .../JetReclustering/Root/JetReclusteringAlgo.cxx |  2 +-
 .../MET/METUtilities/METUtilities/METHelpers.h   |  2 +-
 .../util/example_METMaker_METSystematicsTool.cxx |  2 +-
 .../util/example_METMaker_advanced.cxx           |  2 +-
 .../util/example_rebuildTrackMET.cxx             |  2 +-
 55 files changed, 54 insertions(+), 70 deletions(-)
 delete mode 100644 Control/AthToolSupport/AsgTools/AsgTools/MessageCheck.h

diff --git a/Control/AthToolSupport/AsgTools/AsgTools/MessageCheck.h b/Control/AthToolSupport/AsgTools/AsgTools/MessageCheck.h
deleted file mode 100644
index a45a5acd86de..000000000000
--- a/Control/AthToolSupport/AsgTools/AsgTools/MessageCheck.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef FILE_AsgTools_MessageCheck_h
-#define FILE_AsgTools_MessageCheck_h
-
-// this file is likely used in a variety of places, so this warning is
-// disabled in 21.2.  once this gets swept to master it may be a good
-// idea to include this warning and remove all the users.
-
-// #warning "use of this file is deprecated, please include the header from AsgMessaging instead"
-
-#include <AsgMessaging/MessageCheck.h>
-
-#endif
diff --git a/Control/AthToolSupport/AsgTools/Root/AnaToolHandle.cxx b/Control/AthToolSupport/AsgTools/Root/AnaToolHandle.cxx
index 9ff58a0e8b3a..1687aae831ee 100644
--- a/Control/AthToolSupport/AsgTools/Root/AnaToolHandle.cxx
+++ b/Control/AthToolSupport/AsgTools/Root/AnaToolHandle.cxx
@@ -22,7 +22,7 @@
 #include <regex>
 #else
 #include <GaudiKernel/AlgTool.h>
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <GaudiKernel/IToolSvc.h>
 #include <GaudiKernel/IJobOptionsSvc.h>
 #endif
diff --git a/DataQuality/GoodRunsLists/Root/GRLSelectorAlg.cxx b/DataQuality/GoodRunsLists/Root/GRLSelectorAlg.cxx
index 635ba1dda33a..35bc5c42a559 100644
--- a/DataQuality/GoodRunsLists/Root/GRLSelectorAlg.cxx
+++ b/DataQuality/GoodRunsLists/Root/GRLSelectorAlg.cxx
@@ -5,7 +5,7 @@
 // GoodRunsLists includes
 #include <GoodRunsLists/GRLSelectorAlg.h>
 #include <AnaAlgorithm/FilterReporter.h>
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include "xAODEventInfo/EventInfo.h"
 
 GRLSelectorAlg::GRLSelectorAlg( const std::string& name, ISvcLocator* pSvcLocator ) : AnaAlgorithm( name, pSvcLocator )
diff --git a/Event/EventBookkeeperTools/util/dump-cbk.cxx b/Event/EventBookkeeperTools/util/dump-cbk.cxx
index 37b02876dbec..45036386ec4c 100644
--- a/Event/EventBookkeeperTools/util/dump-cbk.cxx
+++ b/Event/EventBookkeeperTools/util/dump-cbk.cxx
@@ -12,7 +12,7 @@
 #include <xAODRootAccess/tools/TFileAccessTracer.h>
 
 // ASG
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <AsgTools/ToolHandle.h>
 #include <AsgTools/AsgMetadataTool.h>
 #include <AthAnalysisBaseComps/AthAnalysisHelper.h>
diff --git a/InnerDetector/InDetRecTools/TrackVertexAssociationTool/util/TrackVertexAssoValidator.cxx b/InnerDetector/InDetRecTools/TrackVertexAssociationTool/util/TrackVertexAssoValidator.cxx
index b7e7ebf7557d..2ce4b611ac9b 100644
--- a/InnerDetector/InDetRecTools/TrackVertexAssociationTool/util/TrackVertexAssoValidator.cxx
+++ b/InnerDetector/InDetRecTools/TrackVertexAssociationTool/util/TrackVertexAssoValidator.cxx
@@ -22,7 +22,7 @@
 #   include "xAODRootAccess/tools/ReturnCheck.h"
 #endif
 
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 
 // EDM include(s):
 #include "xAODTracking/TrackParticle.h"
diff --git a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/Root/SysListLoaderAlg.cxx b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/Root/SysListLoaderAlg.cxx
index 068697fa1fb3..6fb2cc9e7409 100644
--- a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/Root/SysListLoaderAlg.cxx
+++ b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/Root/SysListLoaderAlg.cxx
@@ -13,7 +13,7 @@
 
 #include <AsgAnalysisAlgorithms/SysListLoaderAlg.h>
 
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <PATInterfaces/MakeSystematicsVector.h>
 #include <PATInterfaces/SystematicRegistry.h>
 
diff --git a/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/OutOfValidityEventHelper.cxx b/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/OutOfValidityEventHelper.cxx
index 5eaa8d02501e..094f7e262b8a 100644
--- a/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/OutOfValidityEventHelper.cxx
+++ b/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/OutOfValidityEventHelper.cxx
@@ -11,7 +11,7 @@
 
 #include <SelectionHelpers/OutOfValidityEventHelper.h>
 
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <AsgTools/StatusCode.h>
 #include <PATInterfaces/CorrectionCode.h>
 
diff --git a/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/OutOfValidityHelper.cxx b/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/OutOfValidityHelper.cxx
index 3069eb56eb09..a7ef6f31fbaa 100644
--- a/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/OutOfValidityHelper.cxx
+++ b/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/OutOfValidityHelper.cxx
@@ -11,7 +11,7 @@
 
 #include <SelectionHelpers/OutOfValidityHelper.h>
 
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <AsgTools/StatusCode.h>
 #include <PATInterfaces/CorrectionCode.h>
 
diff --git a/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/SelectionReadHandle.cxx b/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/SelectionReadHandle.cxx
index 80a95355b819..51e2d03b776e 100644
--- a/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/SelectionReadHandle.cxx
+++ b/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/SelectionReadHandle.cxx
@@ -11,7 +11,7 @@
 
 #include <SelectionHelpers/SelectionReadHandle.h>
 
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <AsgTools/StatusCode.h>
 
 //
diff --git a/PhysicsAnalysis/Algorithms/SelectionHelpers/SelectionHelpers/SelectionHelpers.h b/PhysicsAnalysis/Algorithms/SelectionHelpers/SelectionHelpers/SelectionHelpers.h
index 076dd2fcb769..579ad0ec0013 100644
--- a/PhysicsAnalysis/Algorithms/SelectionHelpers/SelectionHelpers/SelectionHelpers.h
+++ b/PhysicsAnalysis/Algorithms/SelectionHelpers/SelectionHelpers/SelectionHelpers.h
@@ -8,7 +8,7 @@
 #ifndef SELECTION_HELPERS__SELECTION_HELPERS_H
 #define SELECTION_HELPERS__SELECTION_HELPERS_H
 
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <cstdint>
 
 namespace asg
diff --git a/PhysicsAnalysis/Algorithms/SelectionHelpers/test/gt_ISelectionAccessor.cxx b/PhysicsAnalysis/Algorithms/SelectionHelpers/test/gt_ISelectionAccessor.cxx
index 58b44391d388..38b2b7c78a89 100644
--- a/PhysicsAnalysis/Algorithms/SelectionHelpers/test/gt_ISelectionAccessor.cxx
+++ b/PhysicsAnalysis/Algorithms/SelectionHelpers/test/gt_ISelectionAccessor.cxx
@@ -15,7 +15,7 @@
 #include <SelectionHelpers/SelectionAccessorBits.h>
 #include <SelectionHelpers/SelectionAccessorList.h>
 #include <SelectionHelpers/SelectionAccessorNull.h>
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <AsgTesting/UnitTest.h>
 #include <xAODJet/Jet.h>
 #include <gtest/gtest.h>
diff --git a/PhysicsAnalysis/Algorithms/SystematicsHandles/Root/SysListHandle.cxx b/PhysicsAnalysis/Algorithms/SystematicsHandles/Root/SysListHandle.cxx
index ccd200164bc7..159109a217c5 100644
--- a/PhysicsAnalysis/Algorithms/SystematicsHandles/Root/SysListHandle.cxx
+++ b/PhysicsAnalysis/Algorithms/SystematicsHandles/Root/SysListHandle.cxx
@@ -11,7 +11,7 @@
 
 #include <SystematicsHandles/SysListHandle.h>
 
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <AsgTools/StatusCode.h>
 #include <PATInterfaces/SystematicSet.h>
 #include <SystematicsHandles/ISysHandleBase.h>
diff --git a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/CopyHelpers.h b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/CopyHelpers.h
index c2eb45959410..8240db430772 100644
--- a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/CopyHelpers.h
+++ b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/CopyHelpers.h
@@ -9,7 +9,7 @@
 #define SYSTEMATICS_HANDLES__COPY_HELPERS_H
 
 #include <AnaAlgorithm/AnaAlgorithm.h>
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <AsgTools/StatusCode.h>
 #include <xAODBase/IParticleContainer.h>
 #include <xAODBase/IParticleHelpers.h>
diff --git a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysCopyHandle.icc b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysCopyHandle.icc
index e41dd1c55ca1..5abbda5cc254 100644
--- a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysCopyHandle.icc
+++ b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysCopyHandle.icc
@@ -9,7 +9,7 @@
 // includes
 //
 
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <SystematicsHandles/CopyHelpers.h>
 #include <SystematicsHandles/Helpers.h>
 
diff --git a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysDecorationHandle.icc b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysDecorationHandle.icc
index 13a59deed6ec..48bcb799f392 100644
--- a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysDecorationHandle.icc
+++ b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysDecorationHandle.icc
@@ -9,7 +9,7 @@
 // includes
 //
 
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <AsgTools/StatusCode.h>
 #include <SystematicsHandles/Helpers.h>
 
diff --git a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysReadHandle.icc b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysReadHandle.icc
index 690580cc9713..dc9e28744a69 100644
--- a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysReadHandle.icc
+++ b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysReadHandle.icc
@@ -9,7 +9,7 @@
 // includes
 //
 
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <AsgTools/StatusCode.h>
 #include <SystematicsHandles/Helpers.h>
 
diff --git a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysReadHandleArray.icc b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysReadHandleArray.icc
index 89cbde790971..8b4676d0c368 100644
--- a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysReadHandleArray.icc
+++ b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysReadHandleArray.icc
@@ -9,7 +9,7 @@
 // includes
 //
 
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <AsgTools/StatusCode.h>
 #include <SystematicsHandles/Helpers.h>
 
diff --git a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysWriteHandle.icc b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysWriteHandle.icc
index 74ba4964619d..8371a02aefba 100644
--- a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysWriteHandle.icc
+++ b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysWriteHandle.icc
@@ -9,7 +9,7 @@
 // includes
 //
 
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <SystematicsHandles/Helpers.h>
 
 //
diff --git a/PhysicsAnalysis/Algorithms/SystematicsHandles/test/ut_CopyHelpers.cxx b/PhysicsAnalysis/Algorithms/SystematicsHandles/test/ut_CopyHelpers.cxx
index 284efb010809..7e42bd38f44b 100644
--- a/PhysicsAnalysis/Algorithms/SystematicsHandles/test/ut_CopyHelpers.cxx
+++ b/PhysicsAnalysis/Algorithms/SystematicsHandles/test/ut_CopyHelpers.cxx
@@ -12,7 +12,7 @@
 #include "xAODRootAccess/TStore.h"
 #include "xAODRootAccess/Init.h"
 #include "AsgTools/MsgStream.h"
-#include "AsgTools/MessageCheck.h"
+#include "AsgMessaging/MessageCheck.h"
 #include "AsgTools/SgTEvent.h"
 
 // EDM include(s):
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/gt_AnaToolHandle_test.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/gt_AnaToolHandle_test.cxx
index f34dfe50ef80..b6bb4f6acebf 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/gt_AnaToolHandle_test.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/gt_AnaToolHandle_test.cxx
@@ -6,7 +6,7 @@
  */
 
 #include "AsgTesting/UnitTest.h"
-#include "AsgTools/MessageCheck.h"
+#include "AsgMessaging/MessageCheck.h"
 #include "gtest/gtest.h"
 #ifdef ROOTCORE
 #include "xAODRootAccess/Init.h"
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/gt_OverlapRemovalInit_test.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/gt_OverlapRemovalInit_test.cxx
index 0b6305b170e0..763e0c0efbe4 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/gt_OverlapRemovalInit_test.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/gt_OverlapRemovalInit_test.cxx
@@ -12,7 +12,7 @@
 
 // Infrastructure
 #include "AsgTools/UnitTest.h"
-#include "AsgTools/MessageCheck.h"
+#include "AsgMessaging/MessageCheck.h"
 #include "gtest/gtest.h"
 #ifdef ROOTCORE
 #include "xAODRootAccess/Init.h"
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/gt_toolbox_test.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/gt_toolbox_test.cxx
index ccb6afcb8887..1145bef13c12 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/gt_toolbox_test.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/gt_toolbox_test.cxx
@@ -7,7 +7,7 @@
 
 // Infrastructure
 #include "AsgTools/UnitTest.h"
-#include "AsgTools/MessageCheck.h"
+#include "AsgMessaging/MessageCheck.h"
 #include "gtest/gtest.h"
 #ifdef ROOTCORE
 #include "xAODRootAccess/Init.h"
diff --git a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/MessageCheck.h b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/MessageCheck.h
index e33960d1a149..e55718a96646 100644
--- a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/MessageCheck.h
+++ b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/MessageCheck.h
@@ -9,7 +9,7 @@
 #define PAT_INTERFACES__MESSAGE_CHECK_H
 
 
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 
 namespace CP
 {
diff --git a/PhysicsAnalysis/AnalysisCommon/PMGTools/test/MyPMGApp.cxx b/PhysicsAnalysis/AnalysisCommon/PMGTools/test/MyPMGApp.cxx
index 7398015984b7..5a6eef69ed4a 100644
--- a/PhysicsAnalysis/AnalysisCommon/PMGTools/test/MyPMGApp.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/PMGTools/test/MyPMGApp.cxx
@@ -10,7 +10,7 @@
 
 // EDM includes
 #include "AsgTools/AnaToolHandle.h"
-#include "AsgTools/MessageCheck.h"  // for messaging
+#include "AsgMessaging/MessageCheck.h"  // for messaging
 #include "POOLRootAccess/TEvent.h"  // event looping
 #include "xAODJet/JetContainer.h"   // for jet studies
 #include "GaudiKernel/ToolHandle.h" // for better working with tools
diff --git a/PhysicsAnalysis/AnalysisCommon/PMGTools/test/ut_PMGTruthWeightTool_test.cxx b/PhysicsAnalysis/AnalysisCommon/PMGTools/test/ut_PMGTruthWeightTool_test.cxx
index a4bfec7a5ca4..7cf812907780 100644
--- a/PhysicsAnalysis/AnalysisCommon/PMGTools/test/ut_PMGTruthWeightTool_test.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/PMGTools/test/ut_PMGTruthWeightTool_test.cxx
@@ -8,7 +8,7 @@
 /// @author: James Robinson
 
 // EDM include(s):
-#include "AsgTools/MessageCheck.h"
+#include "AsgMessaging/MessageCheck.h"
 #include "AsgTools/AnaToolHandle.h"
 
 // Project dependent include(s)
diff --git a/PhysicsAnalysis/D3PDTools/AnaAlgorithm/AnaAlgorithm/AnaAlgorithm.h b/PhysicsAnalysis/D3PDTools/AnaAlgorithm/AnaAlgorithm/AnaAlgorithm.h
index 670fc9aff2cb..84cc10421356 100644
--- a/PhysicsAnalysis/D3PDTools/AnaAlgorithm/AnaAlgorithm/AnaAlgorithm.h
+++ b/PhysicsAnalysis/D3PDTools/AnaAlgorithm/AnaAlgorithm/AnaAlgorithm.h
@@ -20,7 +20,7 @@
 #include <vector>
 #else
 #include <AthenaBaseComps/AthHistogramAlgorithm.h>
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <StoreGate/StoreGateSvc.h>
 #include <GaudiKernel/IIncidentListener.h>
 #include <GaudiKernel/ServiceHandle.h>
diff --git a/PhysicsAnalysis/D3PDTools/AnaAlgorithm/AnaAlgorithm/MessageCheck.h b/PhysicsAnalysis/D3PDTools/AnaAlgorithm/AnaAlgorithm/MessageCheck.h
index 42f4197683e9..dee0b9746937 100644
--- a/PhysicsAnalysis/D3PDTools/AnaAlgorithm/AnaAlgorithm/MessageCheck.h
+++ b/PhysicsAnalysis/D3PDTools/AnaAlgorithm/AnaAlgorithm/MessageCheck.h
@@ -11,7 +11,7 @@
 
 #include <AnaAlgorithm/Global.h>
 
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 
 namespace EL
 {
diff --git a/PhysicsAnalysis/D3PDTools/AnaAlgorithm/Root/AnaAlgorithm.cxx b/PhysicsAnalysis/D3PDTools/AnaAlgorithm/Root/AnaAlgorithm.cxx
index f8dbe6068fd9..c58ead977a41 100644
--- a/PhysicsAnalysis/D3PDTools/AnaAlgorithm/Root/AnaAlgorithm.cxx
+++ b/PhysicsAnalysis/D3PDTools/AnaAlgorithm/Root/AnaAlgorithm.cxx
@@ -12,7 +12,7 @@
 
 #include <AnaAlgorithm/AnaAlgorithm.h>
 
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <RootCoreUtils/Assert.h>
 #include <TH1.h>
 #include <TH2.h>
diff --git a/PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/MessageCheck.h b/PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/MessageCheck.h
index 81c2639d850a..ecdb8f11ffdc 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/MessageCheck.h
+++ b/PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/MessageCheck.h
@@ -11,7 +11,7 @@
 
 #include <EventLoop/Global.h>
 
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 
 namespace EL
 {
diff --git a/PhysicsAnalysis/D3PDTools/EventLoop/Root/TEventModule.cxx b/PhysicsAnalysis/D3PDTools/EventLoop/Root/TEventModule.cxx
index 6b3700c8c517..830ff568d3af 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoop/Root/TEventModule.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoop/Root/TEventModule.cxx
@@ -26,7 +26,7 @@
 #include <xAODCore/tools/ReadStats.h>
 #include <xAODCore/tools/PerfStats.h>
 #include <xAODCore/tools/IOStats.h>
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <TList.h>
 
 //
diff --git a/PhysicsAnalysis/D3PDTools/EventLoop/Root/VomsProxySvc.cxx b/PhysicsAnalysis/D3PDTools/EventLoop/Root/VomsProxySvc.cxx
index fabb1f416eed..296934b6cae7 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoop/Root/VomsProxySvc.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoop/Root/VomsProxySvc.cxx
@@ -17,7 +17,7 @@
 
 #include <EventLoop/VomsProxySvc.h>
 
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <RootCoreUtils/Assert.h>
 #include <RootCoreUtils/ThrowMsg.h>
 #include <SampleHandler/GridTools.h>
diff --git a/PhysicsAnalysis/D3PDTools/EventLoop/util/eventloop_batch_worker.cxx b/PhysicsAnalysis/D3PDTools/EventLoop/util/eventloop_batch_worker.cxx
index 316a881e5bf7..1e4975ce17a3 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoop/util/eventloop_batch_worker.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoop/util/eventloop_batch_worker.cxx
@@ -4,7 +4,7 @@
 
 #include <EventLoop/Worker.h>
 #include <xAODRootAccess/Init.h>
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 
 int main (int argc, char **argv)
 {
diff --git a/PhysicsAnalysis/D3PDTools/EventLoopGrid/util/eventloop_grid_merge.cxx b/PhysicsAnalysis/D3PDTools/EventLoopGrid/util/eventloop_grid_merge.cxx
index b61e4a0bcc84..0ca9a1827056 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoopGrid/util/eventloop_grid_merge.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoopGrid/util/eventloop_grid_merge.cxx
@@ -5,7 +5,7 @@
 #include <EventLoop/OutputStream.h>
 #include <RootCoreUtils/ThrowMsg.h>
 #include <xAODRootAccess/Init.h>
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <TList.h>
 #include <TSystem.h>
 #include <TFile.h>
diff --git a/PhysicsAnalysis/D3PDTools/EventLoopGrid/util/eventloop_run_grid_job.cxx b/PhysicsAnalysis/D3PDTools/EventLoopGrid/util/eventloop_run_grid_job.cxx
index ee2595835c29..cbfa8d05110b 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoopGrid/util/eventloop_run_grid_job.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoopGrid/util/eventloop_run_grid_job.cxx
@@ -7,7 +7,7 @@
 #include <iostream>
 #include <string>
 #include <xAODRootAccess/Init.h>
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 
 int main (int argc, char **argv)
 {
diff --git a/PhysicsAnalysis/D3PDTools/EventLoopTest/Root/UnitTestAlgXAOD.cxx b/PhysicsAnalysis/D3PDTools/EventLoopTest/Root/UnitTestAlgXAOD.cxx
index 4c6018d9db02..380f21f8b544 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoopTest/Root/UnitTestAlgXAOD.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoopTest/Root/UnitTestAlgXAOD.cxx
@@ -16,7 +16,7 @@
 #include <EventLoop/Worker.h>
 #include <RootCoreUtils/Assert.h>
 #include <RootCoreUtils/ThrowMsg.h>
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <TFile.h>
 #include <TH1.h>
 #include <TTree.h>
diff --git a/PhysicsAnalysis/D3PDTools/EventLoopTest/Root/UnitTestFixture.cxx b/PhysicsAnalysis/D3PDTools/EventLoopTest/Root/UnitTestFixture.cxx
index c2aad48ce445..683a7c7a404e 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoopTest/Root/UnitTestFixture.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoopTest/Root/UnitTestFixture.cxx
@@ -11,7 +11,7 @@
 
 #include <EventLoopTest/UnitTestFixture.h>
 
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <EventLoop/Driver.h>
 #include <AnaAlgorithm/AnaAlgorithmConfig.h>
 #include <EventLoopTest/UnitTestAlg1.h>
diff --git a/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_Algorithm.cxx b/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_Algorithm.cxx
index ec25264b1b0f..f72c332ac4ad 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_Algorithm.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_Algorithm.cxx
@@ -11,7 +11,7 @@
 //
 
 #include <AsgTools/AnaToolHandle.h>
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <AsgMessaging/IMessagePrinter.h>
 #include <AsgTools/MessagePrinterOverlay.h>
 #include <AsgTesting/UnitTest.h>
diff --git a/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_AnaAlgorithm.cxx b/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_AnaAlgorithm.cxx
index 8fb58d5ff965..ba2bd4da1890 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_AnaAlgorithm.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_AnaAlgorithm.cxx
@@ -16,7 +16,7 @@
 #include <AnaAlgorithm/AlgorithmWorkerData.h>
 #include <EventLoopTest/UnitTestAlg5.h>
 #include <AsgTools/ToolHandle.h>
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <AsgTesting/UnitTest.h>
 #include <cmath>
 #include <gtest/gtest.h>
diff --git a/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_DirectDriver.cxx b/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_DirectDriver.cxx
index 505a3db852c5..7475862cd818 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_DirectDriver.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_DirectDriver.cxx
@@ -9,7 +9,7 @@
 // includes
 //
 
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <EventLoop/DirectDriver.h>
 #include <EventLoopTest/UnitTestConfig.h>
 #include <EventLoopTest/UnitTestFixture.h>
diff --git a/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_LSFDriver_EOS.cxx b/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_LSFDriver_EOS.cxx
index 3b1cbfed930a..973e6ee43bbf 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_LSFDriver_EOS.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_LSFDriver_EOS.cxx
@@ -9,7 +9,7 @@
 // includes
 //
 
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <EventLoop/Job.h>
 #include <EventLoop/LSFDriver.h>
 #include <EventLoopTest/UnitTestConfig.h>
diff --git a/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_LocalDriver.cxx b/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_LocalDriver.cxx
index 0abd349b2141..b931f11e673f 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_LocalDriver.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_LocalDriver.cxx
@@ -9,7 +9,7 @@
 // includes
 //
 
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <EventLoop/LocalDriver.h>
 #include <EventLoopTest/UnitTestConfig.h>
 #include <EventLoopTest/UnitTestFixture.h>
diff --git a/PhysicsAnalysis/D3PDTools/SampleHandler/Root/GridTools.cxx b/PhysicsAnalysis/D3PDTools/SampleHandler/Root/GridTools.cxx
index 921541a9e737..fa87a2a10700 100644
--- a/PhysicsAnalysis/D3PDTools/SampleHandler/Root/GridTools.cxx
+++ b/PhysicsAnalysis/D3PDTools/SampleHandler/Root/GridTools.cxx
@@ -11,7 +11,7 @@
 
 #include <SampleHandler/GridTools.h>
 
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <RootCoreUtils/Assert.h>
 #include <RootCoreUtils/ShellExec.h>
 #include <RootCoreUtils/StringUtil.h>
diff --git a/PhysicsAnalysis/D3PDTools/SampleHandler/SampleHandler/GridTools.h b/PhysicsAnalysis/D3PDTools/SampleHandler/SampleHandler/GridTools.h
index 3d21460c5369..61fd10549b6b 100644
--- a/PhysicsAnalysis/D3PDTools/SampleHandler/SampleHandler/GridTools.h
+++ b/PhysicsAnalysis/D3PDTools/SampleHandler/SampleHandler/GridTools.h
@@ -7,7 +7,7 @@
 
 #include <SampleHandler/Global.h>
 
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <map>
 #include <memory>
 #include <set>
diff --git a/PhysicsAnalysis/D3PDTools/SampleHandler/SampleHandler/MessageCheck.h b/PhysicsAnalysis/D3PDTools/SampleHandler/SampleHandler/MessageCheck.h
index d82c4cecca97..b9e2e1799503 100644
--- a/PhysicsAnalysis/D3PDTools/SampleHandler/SampleHandler/MessageCheck.h
+++ b/PhysicsAnalysis/D3PDTools/SampleHandler/SampleHandler/MessageCheck.h
@@ -11,7 +11,7 @@
 
 #include <SampleHandler/Global.h>
 
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 
 namespace SH
 {
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/util/EGIdentification_mem_check.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/util/EGIdentification_mem_check.cxx
index 1913574a2aca..755f04a978ca 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/util/EGIdentification_mem_check.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/util/EGIdentification_mem_check.cxx
@@ -16,7 +16,7 @@ http://valgrind.org/docs/manual/faq.html#faq.deflost
 #include "EgammaAnalysisInterfaces/IAsgElectronIsEMSelector.h"
 #include "EgammaAnalysisInterfaces/IAsgElectronLikelihoodTool.h"
 #include "AsgTools/AnaToolHandle.h"
-#include "AsgTools/MessageCheck.h"
+#include "AsgMessaging/MessageCheck.h"
 
 int main(){
   using namespace asg::msgUserCode;
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/util/testEGIdentificationPoints.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/util/testEGIdentificationPoints.cxx
index 05461c362b7f..d2dfb3a385c2 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/util/testEGIdentificationPoints.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/util/testEGIdentificationPoints.cxx
@@ -25,7 +25,7 @@
 #include "EgammaAnalysisInterfaces/IAsgElectronLikelihoodTool.h"
 #include "ElectronPhotonSelectorTools/egammaPIDdefs.h"
 //
-#include "AsgTools/MessageCheck.h"
+#include "AsgMessaging/MessageCheck.h"
 #include "AsgTools/MsgStream.h"
 // Derivation include
 #include "xAODCore/tools/IOStats.h"
diff --git a/PhysicsAnalysis/MuonID/MuonSelectorTools/test/ut_MuonSelectorToolsTester_data.cxx b/PhysicsAnalysis/MuonID/MuonSelectorTools/test/ut_MuonSelectorToolsTester_data.cxx
index 512e4958664c..76bf00955546 100644
--- a/PhysicsAnalysis/MuonID/MuonSelectorTools/test/ut_MuonSelectorToolsTester_data.cxx
+++ b/PhysicsAnalysis/MuonID/MuonSelectorTools/test/ut_MuonSelectorToolsTester_data.cxx
@@ -5,7 +5,7 @@
 #include <iostream>
 #include <cstdlib>
 
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 
 int main()
 {
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/test/ut_TauAnalysisTools_test.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/test/ut_TauAnalysisTools_test.cxx
index adfe484461b5..576cfbf840cc 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/test/ut_TauAnalysisTools_test.cxx
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/test/ut_TauAnalysisTools_test.cxx
@@ -13,7 +13,7 @@
 #include "POOLRootAccess/TEvent.h" //event looping
 #include "GaudiKernel/ToolHandle.h" //for better working with tools
 
-#include "AsgTools/MessageCheck.h" //messaging
+#include "AsgMessaging/MessageCheck.h" //messaging
 using namespace asg::msgUserCode;  //messaging
 
 //ROOT includes
diff --git a/Reconstruction/Jet/JetCalibTools/util/JetCalibTools_Example.cxx b/Reconstruction/Jet/JetCalibTools/util/JetCalibTools_Example.cxx
index 9f5b17169784..9dee8c4636c7 100644
--- a/Reconstruction/Jet/JetCalibTools/util/JetCalibTools_Example.cxx
+++ b/Reconstruction/Jet/JetCalibTools/util/JetCalibTools_Example.cxx
@@ -25,7 +25,7 @@
 #include "xAODRootAccess/Init.h"
 #include "xAODRootAccess/TEvent.h"
 #include "xAODRootAccess/TStore.h"
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #else
 #include "POOLRootAccess/TEvent.h"
 #include "StoreGate/StoreGateSvc.h"
diff --git a/Reconstruction/Jet/JetRecTools/JetRecTools/JetInputElRemovalTool.h b/Reconstruction/Jet/JetRecTools/JetRecTools/JetInputElRemovalTool.h
index effd9033b0c5..7599ed05a664 100644
--- a/Reconstruction/Jet/JetRecTools/JetRecTools/JetInputElRemovalTool.h
+++ b/Reconstruction/Jet/JetRecTools/JetRecTools/JetInputElRemovalTool.h
@@ -12,7 +12,7 @@
 
 
 #include "AsgTools/AsgTool.h"
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 #include <AsgTools/MsgStream.h>
 #include <AsgTools/MsgStreamMacros.h>
 
diff --git a/Reconstruction/Jet/JetReclustering/Root/JetReclusteringAlgo.cxx b/Reconstruction/Jet/JetReclustering/Root/JetReclusteringAlgo.cxx
index 24e73d996bdf..62622b1c2eaf 100644
--- a/Reconstruction/Jet/JetReclustering/Root/JetReclusteringAlgo.cxx
+++ b/Reconstruction/Jet/JetReclustering/Root/JetReclusteringAlgo.cxx
@@ -17,7 +17,7 @@
 #include <EventLoop/OutputStream.h>
 
 // ANA_CHECK macro
-#include <AsgTools/MessageCheck.h>
+#include <AsgMessaging/MessageCheck.h>
 
 // this is needed to distribute the algorithm to the workers
 ClassImp(JetReclusteringAlgo)
diff --git a/Reconstruction/MET/METUtilities/METUtilities/METHelpers.h b/Reconstruction/MET/METUtilities/METUtilities/METHelpers.h
index 64aef9653c2d..4dd090393932 100644
--- a/Reconstruction/MET/METUtilities/METUtilities/METHelpers.h
+++ b/Reconstruction/MET/METUtilities/METUtilities/METHelpers.h
@@ -13,7 +13,7 @@
 #define METUTILITIES_MET_METHELPERS_H 1
 
 // Framework includes
-#include "AsgTools/MessageCheck.h"
+#include "AsgMessaging/MessageCheck.h"
 #include "AsgTools/StatusCode.h"
 
 #include "xAODMuon/MuonContainer.h"
diff --git a/Reconstruction/MET/METUtilities/util/example_METMaker_METSystematicsTool.cxx b/Reconstruction/MET/METUtilities/util/example_METMaker_METSystematicsTool.cxx
index 606f7b5f4bb6..d0f753c3d7c2 100644
--- a/Reconstruction/MET/METUtilities/util/example_METMaker_METSystematicsTool.cxx
+++ b/Reconstruction/MET/METUtilities/util/example_METMaker_METSystematicsTool.cxx
@@ -23,7 +23,7 @@ int main() {
 #endif
 
 // FrameWork includes
-#include "AsgTools/MessageCheck.h"
+#include "AsgMessaging/MessageCheck.h"
 #include "AsgTools/AnaToolHandle.h"
 
 #include "xAODMissingET/MissingETAuxContainer.h"
diff --git a/Reconstruction/MET/METUtilities/util/example_METMaker_advanced.cxx b/Reconstruction/MET/METUtilities/util/example_METMaker_advanced.cxx
index f4f4f9548435..33e2574eb49a 100644
--- a/Reconstruction/MET/METUtilities/util/example_METMaker_advanced.cxx
+++ b/Reconstruction/MET/METUtilities/util/example_METMaker_advanced.cxx
@@ -22,7 +22,7 @@ int main() {
 #endif
 
 // FrameWork includes
-#include "AsgTools/MessageCheck.h"
+#include "AsgMessaging/MessageCheck.h"
 #include "AsgTools/AnaToolHandle.h"
 
 #include "xAODMissingET/MissingETAuxContainer.h"
diff --git a/Reconstruction/MET/METUtilities/util/example_rebuildTrackMET.cxx b/Reconstruction/MET/METUtilities/util/example_rebuildTrackMET.cxx
index 79b64d1ae9d4..e0358891255c 100644
--- a/Reconstruction/MET/METUtilities/util/example_rebuildTrackMET.cxx
+++ b/Reconstruction/MET/METUtilities/util/example_rebuildTrackMET.cxx
@@ -22,7 +22,7 @@ int main() {
 #endif
 
 // FrameWork includes
-#include "AsgTools/MessageCheck.h"
+#include "AsgMessaging/MessageCheck.h"
 #include "AsgTools/AnaToolHandle.h"
 
 #include "xAODMissingET/MissingETAuxContainer.h"
-- 
GitLab


From b82dd38e6557acb3ce93e30bac6dd13e30c75e6b Mon Sep 17 00:00:00 2001
From: Nils Krumnack <krumnack@iastate.edu>
Date: Fri, 2 Oct 2020 11:47:07 -0500
Subject: [PATCH 108/403] remove AsgTools/StatusCode.h

That has been superseded by AsgMessaging/StatusCode.h.
---
 .../AsgTools/AsgTools/AsgComponent.icc           |  2 +-
 .../AsgTools/AsgTools/StatusCode.h               | 16 ----------------
 .../Root/InDetSecVtxTrackAccessor.h              |  2 +-
 .../Root/InDetTrackAccessor.h                    |  2 +-
 .../SelectionHelpers/Root/ISelectionAccessor.cxx |  2 +-
 .../Root/OutOfValidityEventHelper.cxx            |  2 +-
 .../Root/OutOfValidityHelper.cxx                 |  2 +-
 .../Root/SelectionReadHandle.cxx                 |  2 +-
 .../SystematicsHandles/Root/SysListHandle.cxx    |  2 +-
 .../SystematicsHandles/CopyHelpers.h             |  2 +-
 .../SystematicsHandles/SysDecorationHandle.icc   |  2 +-
 .../SystematicsHandles/SysReadHandle.icc         |  2 +-
 .../SystematicsHandles/SysReadHandleArray.icc    |  2 +-
 .../AssociationUtils/OverlapLinkHelper.h         |  2 +-
 .../AssociationUtils/OverlapRemovalInit.h        |  2 +-
 .../AnaAlgorithm/AnaAlgorithm/ITreeWorker.h      |  2 +-
 .../D3PDTools/EventLoop/EventLoop/Module.h       |  2 +-
 .../D3PDTools/EventLoop/Root/BaseManager.cxx     |  2 +-
 .../D3PDTools/EventLoop/Root/CondorDriver.cxx    |  2 +-
 .../D3PDTools/EventLoop/Root/DriverManager.cxx   |  2 +-
 .../D3PDTools/EventLoop/Root/GEDriver.cxx        |  2 +-
 .../EventLoop/Root/KubernetesDriver.cxx          |  2 +-
 .../D3PDTools/EventLoop/Root/LLDriver.cxx        |  2 +-
 .../D3PDTools/EventLoop/Root/LSFDriver.cxx       |  2 +-
 .../D3PDTools/EventLoop/Root/LocalDriver.cxx     |  2 +-
 .../EventLoop/Root/OutputStreamData.cxx          |  2 +-
 .../D3PDTools/EventLoop/Root/RetrieveManager.cxx |  2 +-
 .../D3PDTools/EventLoop/Root/SlurmDriver.cxx     |  2 +-
 .../D3PDTools/EventLoop/Root/SoGEDriver.cxx      |  2 +-
 .../D3PDTools/EventLoop/Root/SubmitManager.cxx   |  2 +-
 .../D3PDTools/EventLoop/Root/TorqueDriver.cxx    |  2 +-
 .../EventLoopAlgs/test/gt_DuplicateChecker.cxx   |  2 +-
 .../EventLoopTest/test/gt_UnitTestAlgXAOD.cxx    |  2 +-
 .../util/CreateDummyEl.h                         |  2 +-
 .../MET/METUtilities/METUtilities/CutsMETMaker.h |  2 +-
 .../MET/METUtilities/METUtilities/METHelpers.h   |  2 +-
 .../tauRecTools/tauRecTools/BDTHelper.h          |  2 +-
 .../TrigDecisionTool/IDecisionUnpacker.h         |  2 +-
 .../TrigDecisionTool/TrigDecisionToolCore.h      |  2 +-
 .../TrigConfxAOD/tools/prepareTriggerMenu.h      |  2 +-
 40 files changed, 39 insertions(+), 55 deletions(-)
 delete mode 100644 Control/AthToolSupport/AsgTools/AsgTools/StatusCode.h

diff --git a/Control/AthToolSupport/AsgTools/AsgTools/AsgComponent.icc b/Control/AthToolSupport/AsgTools/AsgTools/AsgComponent.icc
index cc3f11022101..77cda10fb7ca 100644
--- a/Control/AthToolSupport/AsgTools/AsgTools/AsgComponent.icc
+++ b/Control/AthToolSupport/AsgTools/AsgTools/AsgComponent.icc
@@ -9,7 +9,7 @@
 #define ASGTOOLS_ASGCOMPONENT_ICC
 
 #include <AsgTools/PropertyMgr.h>
-#include <AsgTools/StatusCode.h>
+#include <AsgMessaging/StatusCode.h>
 #include <AsgTools/TProperty.h>
 #include <utility>
 
diff --git a/Control/AthToolSupport/AsgTools/AsgTools/StatusCode.h b/Control/AthToolSupport/AsgTools/AsgTools/StatusCode.h
deleted file mode 100644
index 677f7145e822..000000000000
--- a/Control/AthToolSupport/AsgTools/AsgTools/StatusCode.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef FILE_AsgTools_StatusCode_h
-#define FILE_AsgTools_StatusCode_h
-
-// this file is likely used in a variety of places, so this warning is
-// disabled in 21.2.  once this gets swept to master it may be a good
-// idea to include this warning and remove all the users.
-
-// #warning "use of this file is deprecated, please include the header from AsgMessaging instead"
-
-#include <AsgMessaging/StatusCode.h>
-
-#endif
diff --git a/InnerDetector/InDetRecTools/InDetSecVtxTrackSelectionTool/Root/InDetSecVtxTrackAccessor.h b/InnerDetector/InDetRecTools/InDetSecVtxTrackSelectionTool/Root/InDetSecVtxTrackAccessor.h
index a3b3397bbd88..7dc22e302c4c 100644
--- a/InnerDetector/InDetRecTools/InDetSecVtxTrackSelectionTool/Root/InDetSecVtxTrackAccessor.h
+++ b/InnerDetector/InDetRecTools/InDetSecVtxTrackSelectionTool/Root/InDetSecVtxTrackAccessor.h
@@ -9,7 +9,7 @@
 #ifndef INDETSECVTXTRACKSELECTIONTOOL_INDETTRACKACCESSOR_H
 #define INDETSECVTXTRACKSELECTIONTOOL_INDETTRACKACCESSOR_H
 
-#include "AsgTools/StatusCode.h"
+#include "AsgMessaging/StatusCode.h"
 #include "AsgTools/AsgMessaging.h"
 
 #include "xAODTracking/TrackingPrimitives.h"
diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectionTool/Root/InDetTrackAccessor.h b/InnerDetector/InDetRecTools/InDetTrackSelectionTool/Root/InDetTrackAccessor.h
index c8f62399b85a..86c3b9b7e5e8 100644
--- a/InnerDetector/InDetRecTools/InDetTrackSelectionTool/Root/InDetTrackAccessor.h
+++ b/InnerDetector/InDetRecTools/InDetTrackSelectionTool/Root/InDetTrackAccessor.h
@@ -10,7 +10,7 @@
 #ifndef INDETTRACKSELECTIONTOOL_INDETTRACKACCESSOR_H
 #define INDETTRACKSELECTIONTOOL_INDETTRACKACCESSOR_H
 
-#include "AsgTools/StatusCode.h"
+#include "AsgMessaging/StatusCode.h"
 #include "AsgTools/AsgMessaging.h"
 #include "xAODTracking/TrackingPrimitives.h"
 #include "xAODTracking/TrackParticle.h"
diff --git a/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/ISelectionAccessor.cxx b/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/ISelectionAccessor.cxx
index d3c2ecb77437..3c926e8d439e 100644
--- a/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/ISelectionAccessor.cxx
+++ b/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/ISelectionAccessor.cxx
@@ -11,7 +11,7 @@
 
 #include <SelectionHelpers/ISelectionAccessor.h>
 
-#include <AsgTools/StatusCode.h>
+#include <AsgMessaging/StatusCode.h>
 #include <SelectionHelpers/SelectionAccessorBits.h>
 #include <SelectionHelpers/SelectionAccessorChar.h>
 #include <SelectionHelpers/SelectionAccessorInvert.h>
diff --git a/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/OutOfValidityEventHelper.cxx b/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/OutOfValidityEventHelper.cxx
index 094f7e262b8a..cc240e15ba99 100644
--- a/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/OutOfValidityEventHelper.cxx
+++ b/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/OutOfValidityEventHelper.cxx
@@ -12,7 +12,7 @@
 #include <SelectionHelpers/OutOfValidityEventHelper.h>
 
 #include <AsgMessaging/MessageCheck.h>
-#include <AsgTools/StatusCode.h>
+#include <AsgMessaging/StatusCode.h>
 #include <PATInterfaces/CorrectionCode.h>
 
 //
diff --git a/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/OutOfValidityHelper.cxx b/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/OutOfValidityHelper.cxx
index a7ef6f31fbaa..805032cd80bc 100644
--- a/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/OutOfValidityHelper.cxx
+++ b/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/OutOfValidityHelper.cxx
@@ -12,7 +12,7 @@
 #include <SelectionHelpers/OutOfValidityHelper.h>
 
 #include <AsgMessaging/MessageCheck.h>
-#include <AsgTools/StatusCode.h>
+#include <AsgMessaging/StatusCode.h>
 #include <PATInterfaces/CorrectionCode.h>
 
 //
diff --git a/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/SelectionReadHandle.cxx b/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/SelectionReadHandle.cxx
index 51e2d03b776e..060281362576 100644
--- a/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/SelectionReadHandle.cxx
+++ b/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/SelectionReadHandle.cxx
@@ -12,7 +12,7 @@
 #include <SelectionHelpers/SelectionReadHandle.h>
 
 #include <AsgMessaging/MessageCheck.h>
-#include <AsgTools/StatusCode.h>
+#include <AsgMessaging/StatusCode.h>
 
 //
 // method implementations
diff --git a/PhysicsAnalysis/Algorithms/SystematicsHandles/Root/SysListHandle.cxx b/PhysicsAnalysis/Algorithms/SystematicsHandles/Root/SysListHandle.cxx
index 159109a217c5..3e1bc1dff0e6 100644
--- a/PhysicsAnalysis/Algorithms/SystematicsHandles/Root/SysListHandle.cxx
+++ b/PhysicsAnalysis/Algorithms/SystematicsHandles/Root/SysListHandle.cxx
@@ -12,7 +12,7 @@
 #include <SystematicsHandles/SysListHandle.h>
 
 #include <AsgMessaging/MessageCheck.h>
-#include <AsgTools/StatusCode.h>
+#include <AsgMessaging/StatusCode.h>
 #include <PATInterfaces/SystematicSet.h>
 #include <SystematicsHandles/ISysHandleBase.h>
 #include <regex>
diff --git a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/CopyHelpers.h b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/CopyHelpers.h
index 8240db430772..29d8179f726c 100644
--- a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/CopyHelpers.h
+++ b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/CopyHelpers.h
@@ -10,7 +10,7 @@
 
 #include <AnaAlgorithm/AnaAlgorithm.h>
 #include <AsgMessaging/MessageCheck.h>
-#include <AsgTools/StatusCode.h>
+#include <AsgMessaging/StatusCode.h>
 #include <xAODBase/IParticleContainer.h>
 #include <xAODBase/IParticleHelpers.h>
 #include <xAODCore/ShallowCopy.h>
diff --git a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysDecorationHandle.icc b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysDecorationHandle.icc
index 48bcb799f392..c0acdbff906f 100644
--- a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysDecorationHandle.icc
+++ b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysDecorationHandle.icc
@@ -10,7 +10,7 @@
 //
 
 #include <AsgMessaging/MessageCheck.h>
-#include <AsgTools/StatusCode.h>
+#include <AsgMessaging/StatusCode.h>
 #include <SystematicsHandles/Helpers.h>
 
 #include <regex>
diff --git a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysReadHandle.icc b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysReadHandle.icc
index dc9e28744a69..86f59f5aed4f 100644
--- a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysReadHandle.icc
+++ b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysReadHandle.icc
@@ -10,7 +10,7 @@
 //
 
 #include <AsgMessaging/MessageCheck.h>
-#include <AsgTools/StatusCode.h>
+#include <AsgMessaging/StatusCode.h>
 #include <SystematicsHandles/Helpers.h>
 
 //
diff --git a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysReadHandleArray.icc b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysReadHandleArray.icc
index 8b4676d0c368..8ab1d17b0dcd 100644
--- a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysReadHandleArray.icc
+++ b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysReadHandleArray.icc
@@ -10,7 +10,7 @@
 //
 
 #include <AsgMessaging/MessageCheck.h>
-#include <AsgTools/StatusCode.h>
+#include <AsgMessaging/StatusCode.h>
 #include <SystematicsHandles/Helpers.h>
 
 //
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapLinkHelper.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapLinkHelper.h
index 890514a262ff..83b92609c7c7 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapLinkHelper.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapLinkHelper.h
@@ -6,7 +6,7 @@
 #define ASSOCIATIONUTILS_OVERLAPLINKHELPER_H
 
 // Framework includes
-#include "AsgTools/StatusCode.h"
+#include "AsgMessaging/StatusCode.h"
 
 // EDM includes
 #include "xAODBase/IParticleContainer.h"
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapRemovalInit.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapRemovalInit.h
index b29235d47123..2105c76bfb69 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapRemovalInit.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapRemovalInit.h
@@ -14,7 +14,7 @@
 #include <string>
 
 // ASG includes
-#include "AsgTools/StatusCode.h"
+#include "AsgMessaging/StatusCode.h"
 
 // Local includes
 #include "AssociationUtils/ToolBox.h"
diff --git a/PhysicsAnalysis/D3PDTools/AnaAlgorithm/AnaAlgorithm/ITreeWorker.h b/PhysicsAnalysis/D3PDTools/AnaAlgorithm/AnaAlgorithm/ITreeWorker.h
index 38c9cc6da44a..c60c200183e5 100644
--- a/PhysicsAnalysis/D3PDTools/AnaAlgorithm/AnaAlgorithm/ITreeWorker.h
+++ b/PhysicsAnalysis/D3PDTools/AnaAlgorithm/AnaAlgorithm/ITreeWorker.h
@@ -14,7 +14,7 @@
 #include <string>
 
 // Framework include(s):
-#include "AsgTools/StatusCode.h"
+#include "AsgMessaging/StatusCode.h"
 
 // Local include(s):
 #include "AnaAlgorithm/Global.h"
diff --git a/PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/Module.h b/PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/Module.h
index 10d782ab9a78..47ee245888bf 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/Module.h
+++ b/PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/Module.h
@@ -11,7 +11,7 @@
 
 #include <EventLoop/Global.h>
 
-#include <AsgTools/StatusCode.h>
+#include <AsgMessaging/StatusCode.h>
 
 namespace EL
 {
diff --git a/PhysicsAnalysis/D3PDTools/EventLoop/Root/BaseManager.cxx b/PhysicsAnalysis/D3PDTools/EventLoop/Root/BaseManager.cxx
index 528a2d35999a..8e5084501432 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoop/Root/BaseManager.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoop/Root/BaseManager.cxx
@@ -12,7 +12,7 @@
 
 #include <EventLoop/BaseManager.h>
 
-#include <AsgTools/StatusCode.h>
+#include <AsgMessaging/StatusCode.h>
 #include <EventLoop/ManagerData.h>
 #include <EventLoop/ManagerOrder.h>
 #include <EventLoop/MessageCheck.h>
diff --git a/PhysicsAnalysis/D3PDTools/EventLoop/Root/CondorDriver.cxx b/PhysicsAnalysis/D3PDTools/EventLoop/Root/CondorDriver.cxx
index f6f90279f83b..94e0f318787d 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoop/Root/CondorDriver.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoop/Root/CondorDriver.cxx
@@ -11,7 +11,7 @@
 
 #include <EventLoop/CondorDriver.h>
 
-#include <AsgTools/StatusCode.h>
+#include <AsgMessaging/StatusCode.h>
 #include <EventLoop/BatchJob.h>
 #include <EventLoop/Job.h>
 #include <EventLoop/ManagerData.h>
diff --git a/PhysicsAnalysis/D3PDTools/EventLoop/Root/DriverManager.cxx b/PhysicsAnalysis/D3PDTools/EventLoop/Root/DriverManager.cxx
index 1c8e46b6863e..43deeada9936 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoop/Root/DriverManager.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoop/Root/DriverManager.cxx
@@ -12,7 +12,7 @@
 
 #include <EventLoop/DriverManager.h>
 
-#include <AsgTools/StatusCode.h>
+#include <AsgMessaging/StatusCode.h>
 #include <EventLoop/Driver.h>
 #include <EventLoop/ManagerData.h>
 #include <EventLoop/ManagerOrder.h>
diff --git a/PhysicsAnalysis/D3PDTools/EventLoop/Root/GEDriver.cxx b/PhysicsAnalysis/D3PDTools/EventLoop/Root/GEDriver.cxx
index 48e796f86008..1d1b231102b1 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoop/Root/GEDriver.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoop/Root/GEDriver.cxx
@@ -11,7 +11,7 @@
 
 #include <EventLoop/GEDriver.h>
 
-#include <AsgTools/StatusCode.h>
+#include <AsgMessaging/StatusCode.h>
 #include <EventLoop/Job.h>
 #include <EventLoop/ManagerData.h>
 #include <EventLoop/MessageCheck.h>
diff --git a/PhysicsAnalysis/D3PDTools/EventLoop/Root/KubernetesDriver.cxx b/PhysicsAnalysis/D3PDTools/EventLoop/Root/KubernetesDriver.cxx
index c476764c38d3..f5fa5621d922 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoop/Root/KubernetesDriver.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoop/Root/KubernetesDriver.cxx
@@ -14,7 +14,7 @@
 #include <fstream>
 #include <sstream>
 #include <TSystem.h>
-#include <AsgTools/StatusCode.h>
+#include <AsgMessaging/StatusCode.h>
 #include <EventLoop/Job.h>
 #include <EventLoop/ManagerData.h>
 #include <EventLoop/MessageCheck.h>
diff --git a/PhysicsAnalysis/D3PDTools/EventLoop/Root/LLDriver.cxx b/PhysicsAnalysis/D3PDTools/EventLoop/Root/LLDriver.cxx
index 0f65ca5cb118..ca1f30aa8c2b 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoop/Root/LLDriver.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoop/Root/LLDriver.cxx
@@ -12,7 +12,7 @@
 
 #include <EventLoop/LLDriver.h>
 
-#include <AsgTools/StatusCode.h>
+#include <AsgMessaging/StatusCode.h>
 #include <EventLoop/Job.h>
 #include <EventLoop/ManagerData.h>
 #include <EventLoop/MessageCheck.h>
diff --git a/PhysicsAnalysis/D3PDTools/EventLoop/Root/LSFDriver.cxx b/PhysicsAnalysis/D3PDTools/EventLoop/Root/LSFDriver.cxx
index ad2326640be4..7ebcaf77b946 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoop/Root/LSFDriver.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoop/Root/LSFDriver.cxx
@@ -11,7 +11,7 @@
 
 #include <EventLoop/LSFDriver.h>
 
-#include <AsgTools/StatusCode.h>
+#include <AsgMessaging/StatusCode.h>
 #include <EventLoop/Job.h>
 #include <EventLoop/ManagerData.h>
 #include <EventLoop/MessageCheck.h>
diff --git a/PhysicsAnalysis/D3PDTools/EventLoop/Root/LocalDriver.cxx b/PhysicsAnalysis/D3PDTools/EventLoop/Root/LocalDriver.cxx
index b794680c99c8..d539774682cc 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoop/Root/LocalDriver.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoop/Root/LocalDriver.cxx
@@ -13,7 +13,7 @@
 
 #include <sstream>
 #include <TSystem.h>
-#include <AsgTools/StatusCode.h>
+#include <AsgMessaging/StatusCode.h>
 #include <EventLoop/Job.h>
 #include <EventLoop/ManagerData.h>
 #include <EventLoop/MessageCheck.h>
diff --git a/PhysicsAnalysis/D3PDTools/EventLoop/Root/OutputStreamData.cxx b/PhysicsAnalysis/D3PDTools/EventLoop/Root/OutputStreamData.cxx
index 91a5eafb77b5..984596c1ea00 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoop/Root/OutputStreamData.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoop/Root/OutputStreamData.cxx
@@ -12,7 +12,7 @@
 
 #include <EventLoop/OutputStreamData.h>
 
-#include <AsgTools/StatusCode.h>
+#include <AsgMessaging/StatusCode.h>
 #include <RootCoreUtils/Assert.h>
 #include <RootCoreUtils/RootUtils.h>
 #include <TH1.h>
diff --git a/PhysicsAnalysis/D3PDTools/EventLoop/Root/RetrieveManager.cxx b/PhysicsAnalysis/D3PDTools/EventLoop/Root/RetrieveManager.cxx
index b9051ca92c6c..cfb91757649b 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoop/Root/RetrieveManager.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoop/Root/RetrieveManager.cxx
@@ -12,7 +12,7 @@
 
 #include <EventLoop/RetrieveManager.h>
 
-#include <AsgTools/StatusCode.h>
+#include <AsgMessaging/StatusCode.h>
 #include <EventLoop/Driver.h>
 #include <EventLoop/ManagerData.h>
 #include <EventLoop/ManagerOrder.h>
diff --git a/PhysicsAnalysis/D3PDTools/EventLoop/Root/SlurmDriver.cxx b/PhysicsAnalysis/D3PDTools/EventLoop/Root/SlurmDriver.cxx
index 33cf2ade5e15..6d5a721ca7a1 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoop/Root/SlurmDriver.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoop/Root/SlurmDriver.cxx
@@ -11,7 +11,7 @@
 
 #include <EventLoop/SlurmDriver.h>
 
-#include <AsgTools/StatusCode.h>
+#include <AsgMessaging/StatusCode.h>
 #include <EventLoop/BatchJob.h>
 #include <EventLoop/Job.h>
 #include <EventLoop/ManagerData.h>
diff --git a/PhysicsAnalysis/D3PDTools/EventLoop/Root/SoGEDriver.cxx b/PhysicsAnalysis/D3PDTools/EventLoop/Root/SoGEDriver.cxx
index 9afb0b6bd672..0df351060d73 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoop/Root/SoGEDriver.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoop/Root/SoGEDriver.cxx
@@ -12,7 +12,7 @@
 
 #include <EventLoop/SoGEDriver.h>
 
-#include <AsgTools/StatusCode.h>
+#include <AsgMessaging/StatusCode.h>
 #include <EventLoop/Job.h>
 #include <EventLoop/ManagerData.h>
 #include <EventLoop/MessageCheck.h>
diff --git a/PhysicsAnalysis/D3PDTools/EventLoop/Root/SubmitManager.cxx b/PhysicsAnalysis/D3PDTools/EventLoop/Root/SubmitManager.cxx
index 4540f4f17197..7bb0fae28f43 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoop/Root/SubmitManager.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoop/Root/SubmitManager.cxx
@@ -12,7 +12,7 @@
 
 #include <EventLoop/SubmitManager.h>
 
-#include <AsgTools/StatusCode.h>
+#include <AsgMessaging/StatusCode.h>
 #include <EventLoop/Driver.h>
 #include <EventLoop/Job.h>
 #include <EventLoop/ManagerData.h>
diff --git a/PhysicsAnalysis/D3PDTools/EventLoop/Root/TorqueDriver.cxx b/PhysicsAnalysis/D3PDTools/EventLoop/Root/TorqueDriver.cxx
index 5543001b1b47..97d813735de2 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoop/Root/TorqueDriver.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoop/Root/TorqueDriver.cxx
@@ -11,7 +11,7 @@
 
 #include <EventLoop/TorqueDriver.h>
 
-#include <AsgTools/StatusCode.h>
+#include <AsgMessaging/StatusCode.h>
 #include <EventLoop/Job.h>
 #include <EventLoop/ManagerData.h>
 #include <EventLoop/MessageCheck.h>
diff --git a/PhysicsAnalysis/D3PDTools/EventLoopAlgs/test/gt_DuplicateChecker.cxx b/PhysicsAnalysis/D3PDTools/EventLoopAlgs/test/gt_DuplicateChecker.cxx
index 0131805b9781..f8a03eb14289 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoopAlgs/test/gt_DuplicateChecker.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoopAlgs/test/gt_DuplicateChecker.cxx
@@ -13,7 +13,7 @@
 #include <EventLoopAlgs/Global.h>
 #include <AsgTesting/UnitTest.h>
 #include <AthContainers/AuxStoreStandalone.h>
-#include <AsgTools/StatusCode.h>
+#include <AsgMessaging/StatusCode.h>
 #include <RootCoreUtils/Assert.h>
 #include <RootCoreUtils/ShellExec.h>
 #include <SampleHandler/SampleLocal.h>
diff --git a/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_UnitTestAlgXAOD.cxx b/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_UnitTestAlgXAOD.cxx
index 8e8f0cd5ad4b..a0110a2c15f1 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_UnitTestAlgXAOD.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_UnitTestAlgXAOD.cxx
@@ -13,7 +13,7 @@
 #include <EventLoopTest/UnitTestAlgXAOD.h>
 #include <AsgTesting/UnitTest.h>
 #include <AthContainers/AuxStoreStandalone.h>
-#include <AsgTools/StatusCode.h>
+#include <AsgMessaging/StatusCode.h>
 #include <RootCoreUtils/Assert.h>
 #include <RootCoreUtils/ShellExec.h>
 #include <SampleHandler/SampleLocal.h>
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/CreateDummyEl.h b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/CreateDummyEl.h
index 05dc33a68142..959526833ab0 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/CreateDummyEl.h
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/CreateDummyEl.h
@@ -11,7 +11,7 @@
 #ifdef ROOTCORE
 #include "xAODRootAccess/TEvent.h"
 #include "xAODRootAccess/TStore.h"
-#include "AsgTools/StatusCode.h"
+#include "AsgMessaging/StatusCode.h"
 #endif // ROOTCORE
 
 StatusCode getElectrons(const std::vector<std::pair<double,double> >& pt_eta, int runNumber,
diff --git a/Reconstruction/MET/METUtilities/METUtilities/CutsMETMaker.h b/Reconstruction/MET/METUtilities/METUtilities/CutsMETMaker.h
index fc45f1c2489d..f11446c397e5 100644
--- a/Reconstruction/MET/METUtilities/METUtilities/CutsMETMaker.h
+++ b/Reconstruction/MET/METUtilities/METUtilities/CutsMETMaker.h
@@ -10,7 +10,7 @@
 // Author: Russell Smith <rsmith@cern.ch>
 ///////////////////////////////////////////////////////////////////
 
-#include "AsgTools/StatusCode.h"
+#include "AsgMessaging/StatusCode.h"
 
 #include "xAODTau/TauJet.h"
 #include "xAODEgamma/Electron.h"
diff --git a/Reconstruction/MET/METUtilities/METUtilities/METHelpers.h b/Reconstruction/MET/METUtilities/METUtilities/METHelpers.h
index 4dd090393932..84b9f18eac77 100644
--- a/Reconstruction/MET/METUtilities/METUtilities/METHelpers.h
+++ b/Reconstruction/MET/METUtilities/METUtilities/METHelpers.h
@@ -14,7 +14,7 @@
 
 // Framework includes
 #include "AsgMessaging/MessageCheck.h"
-#include "AsgTools/StatusCode.h"
+#include "AsgMessaging/StatusCode.h"
 
 #include "xAODMuon/MuonContainer.h"
 #include "xAODJet/JetContainer.h"
diff --git a/Reconstruction/tauRecTools/tauRecTools/BDTHelper.h b/Reconstruction/tauRecTools/tauRecTools/BDTHelper.h
index fdf0ca111238..cc63113ee2aa 100644
--- a/Reconstruction/tauRecTools/tauRecTools/BDTHelper.h
+++ b/Reconstruction/tauRecTools/tauRecTools/BDTHelper.h
@@ -6,7 +6,7 @@
 #define TAURECTOOLS_BDTHELPER_H
 
 #include "AsgTools/AsgMessaging.h"
-#include "AsgTools/StatusCode.h"
+#include "AsgMessaging/StatusCode.h"
 #include "xAODTau/TauJet.h"
 #include "MVAUtils/BDT.h"
 
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/IDecisionUnpacker.h b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/IDecisionUnpacker.h
index 8d1ce94bc48e..6c7c6236c79d 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/IDecisionUnpacker.h
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/IDecisionUnpacker.h
@@ -8,7 +8,7 @@
 #ifndef TRIG_IDECISIONUNPACKER_H
 #define TRIG_IDECISIONUNPACKER_H
 
-#include "AsgTools/StatusCode.h"
+#include "AsgMessaging/StatusCode.h"
 #include <map>
 #include <unordered_map>
 #include <string>
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/TrigDecisionToolCore.h b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/TrigDecisionToolCore.h
index 1bc0d47cd520..da39c2e27b38 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/TrigDecisionToolCore.h
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/TrigDecisionToolCore.h
@@ -19,7 +19,7 @@
  * @author Joerg Stelzer  <Joerg.Stelzer@cern.ch>  - DESY
  *
  ***********************************************************************************/
-#include "AsgTools/StatusCode.h"
+#include "AsgMessaging/StatusCode.h"
 #include "TrigDecisionTool/ChainGroupFunctions.h"
 #include "TrigDecisionTool/Conditions.h"
 #include "TrigDecisionTool/ChainGroup.h"
diff --git a/Trigger/TrigConfiguration/TrigConfxAOD/TrigConfxAOD/tools/prepareTriggerMenu.h b/Trigger/TrigConfiguration/TrigConfxAOD/TrigConfxAOD/tools/prepareTriggerMenu.h
index 0fd9b4129252..08453573b75a 100644
--- a/Trigger/TrigConfiguration/TrigConfxAOD/TrigConfxAOD/tools/prepareTriggerMenu.h
+++ b/Trigger/TrigConfiguration/TrigConfxAOD/TrigConfxAOD/tools/prepareTriggerMenu.h
@@ -9,7 +9,7 @@
 #define TRIGCONFXAOD_TOOLS_PREPARETRIGGERMENU_H
 
 // Infrastructure include(s):
-#include "AsgTools/StatusCode.h"
+#include "AsgMessaging/StatusCode.h"
 
 // xAOD include(s):
 #include "xAODTrigger/TriggerMenu.h"
-- 
GitLab


From 66cf0cf8024f7a364302626af5f01bb637f3aa92 Mon Sep 17 00:00:00 2001
From: abarton <Adam.Edward.Barton@cern.ch>
Date: Fri, 2 Oct 2020 17:22:49 +0100
Subject: [PATCH 109/403] Adjust Class traits SiDetElementsRoadTool_xk

---
 .../SiDetElementLink_xk.h                     | 38 +++++--------------
 .../SiDetElementsLayer_xk.h                   |  2 +
 2 files changed, 11 insertions(+), 29 deletions(-)

diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementLink_xk.h b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementLink_xk.h
index 400e3a9617dd..4678bb2a2cd1 100644
--- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementLink_xk.h
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementLink_xk.h
@@ -40,20 +40,22 @@ namespace InDet{
           bool m_used;
        };
 
-       class ElementWay : public std::pair<const InDet::SiDetElementLink_xk*, float> {
+       class ElementWay {
+       const InDet::SiDetElementLink_xk* m_link;
+       float m_way;
        public:
           ElementWay(const InDet::SiDetElementLink_xk*link, float way)
-             : std::pair<const InDet::SiDetElementLink_xk*, float>(link,way) {}
+             : m_link(link), m_way(way) {}
 
-          const InDet::SiDetElementLink_xk* link() const { return this->first; }
-          float way()                              const { return this->second; }
+          const InDet::SiDetElementLink_xk* link() const { return m_link; }
+          float way()                              const { return m_way; }
        };
 
       SiDetElementLink_xk();
       SiDetElementLink_xk(const InDetDD::SiDetectorElement*,const double*);
-      SiDetElementLink_xk(const SiDetElementLink_xk&);
-      ~SiDetElementLink_xk();
-      SiDetElementLink_xk& operator  = (const SiDetElementLink_xk&);
+      SiDetElementLink_xk(const SiDetElementLink_xk&) = default;
+      ~SiDetElementLink_xk() = default;
+      SiDetElementLink_xk& operator  = (const SiDetElementLink_xk&) = default;
 
       ///////////////////////////////////////////////////////////////////
       // Main methods
@@ -92,27 +94,6 @@ namespace InDet{
       m_phi        = 0.   ;
     }
 
-  inline SiDetElementLink_xk::SiDetElementLink_xk(const SiDetElementLink_xk& L): m_detelement(L.m_detelement)
-    {
-      *this = L;
-    }
-  
-  inline SiDetElementLink_xk& SiDetElementLink_xk::operator = 
-    (const SiDetElementLink_xk& L) 
-    {
-      if(&L!=this) {
-
-	m_detelement =  L.m_detelement;
-	m_phi        =  L.m_phi       ;
-	for(int i=0; i!=6; ++i)  m_geo   [i] = L.m_geo   [i];
-	for(int i=0; i!=2; ++i)  m_center[i] = L.m_center[i];
-	for(int i=0; i!=4; ++i) {
-	  for(int j=0; j!=3; ++j) {m_bound[i][j]=L.m_bound[i][j];}
-	}
-      }
-      return(*this);
-    }
- 
 
   inline InDet::SiDetElementLink_xk::SiDetElementLink_xk
     (const InDetDD::SiDetectorElement* el,const double* P)
@@ -120,7 +101,6 @@ namespace InDet{
       m_detelement = el; set(P);
     } 
 
-  inline SiDetElementLink_xk::~SiDetElementLink_xk() {}
 
 } // end of name space
 
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsLayer_xk.h b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsLayer_xk.h
index 630b54ccb67b..021a81bfac14 100644
--- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsLayer_xk.h
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsLayer_xk.h
@@ -39,8 +39,10 @@ namespace InDet{
       SiDetElementsLayer_xk(double,double,double,double,double);
 
       SiDetElementsLayer_xk(const SiDetElementsLayer_xk&) = default;
+      SiDetElementsLayer_xk(SiDetElementsLayer_xk&&) = default;
       ~SiDetElementsLayer_xk() = default;
       SiDetElementsLayer_xk& operator  = (const SiDetElementsLayer_xk&) = default;
+      SiDetElementsLayer_xk& operator  = (SiDetElementsLayer_xk&&) = default;
 
       ///////////////////////////////////////////////////////////////////
       // Main methods
-- 
GitLab


From 21b3e346fd77c6a62e8176a988fd571d2e3a3093 Mon Sep 17 00:00:00 2001
From: Rafal Bielski <rafal.bielski@cern.ch>
Date: Fri, 2 Oct 2020 18:57:38 +0200
Subject: [PATCH 110/403] Move online error monitoring from event loop manager
 to a dedicated tool

---
 .../TrigServices/python/TrigServicesConfig.py |  7 +--
 .../TrigServices/src/HltEventLoopMgr.cxx      | 21 ++-------
 .../TrigServices/src/HltEventLoopMgr.h        |  5 +-
 .../TrigSteerMonitor/ITrigErrorMonTool.h      | 22 +++++++++
 .../python/TrigSteerMonitorConfig.py          | 11 +++++
 .../TrigSteerMonitor/src/TrigErrorMonTool.cxx | 47 +++++++++++++++++++
 .../TrigSteerMonitor/src/TrigErrorMonTool.h   | 36 ++++++++++++++
 .../components/TrigSteerMonitor_entries.cxx   |  2 +
 8 files changed, 127 insertions(+), 24 deletions(-)
 create mode 100644 Trigger/TrigMonitoring/TrigSteerMonitor/TrigSteerMonitor/ITrigErrorMonTool.h
 create mode 100644 Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigErrorMonTool.cxx
 create mode 100644 Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigErrorMonTool.h

diff --git a/HLT/Trigger/TrigControl/TrigServices/python/TrigServicesConfig.py b/HLT/Trigger/TrigControl/TrigServices/python/TrigServicesConfig.py
index 9e363ea071c8..068d32ec5d94 100644
--- a/HLT/Trigger/TrigControl/TrigServices/python/TrigServicesConfig.py
+++ b/HLT/Trigger/TrigControl/TrigServices/python/TrigServicesConfig.py
@@ -127,9 +127,6 @@ class HltEventLoopMgr(_HltEventLoopMgr):
       super(HltEventLoopMgr, self).__init__(name)
       from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
       self.MonTool = GenericMonitoringTool('MonTool', HistPath='HLTFramework/'+name)
-      self.MonTool.defineHistogram('ErrorAlgName,ErrorCode', path='EXPERT', type='TH2I',
-                                   title='Error StatusCodes per algorithm;Algorithm name;StatusCode',
-                                   xbins=1, xmin=0, xmax=1, ybins=1, ymin=0, ymax=1)
       self.MonTool.defineHistogram('TotalTime', path='EXPERT', type='TH1F',
                                    title='Total event processing time (all events);Time [ms];Events',
                                    xbins=200, xmin=0, xmax=10000)
@@ -142,4 +139,8 @@ class HltEventLoopMgr(_HltEventLoopMgr):
       self.MonTool.defineHistogram('SlotIdleTime', path='EXPERT', type='TH1F',
                                    title='Time between freeing and assigning a scheduler slot;Time [ms];Events',
                                    xbins=400, xmin=0, xmax=400)
+
+      from TrigSteerMonitor.TrigSteerMonitorConfig import getTrigErrorMonTool
+      self.TrigErrorMonTool = getTrigErrorMonTool()
+
       return
diff --git a/HLT/Trigger/TrigControl/TrigServices/src/HltEventLoopMgr.cxx b/HLT/Trigger/TrigControl/TrigServices/src/HltEventLoopMgr.cxx
index c619cb671b52..8718714de1ea 100644
--- a/HLT/Trigger/TrigControl/TrigServices/src/HltEventLoopMgr.cxx
+++ b/HLT/Trigger/TrigControl/TrigServices/src/HltEventLoopMgr.cxx
@@ -196,8 +196,9 @@ StatusCode HltEventLoopMgr::initialize()
   ATH_CHECK(m_coolHelper.retrieve());
   // HLT result builder
   ATH_CHECK(m_hltResultMaker.retrieve());
-  // Monitoring tool
+  // Monitoring tools
   if (!m_monTool.empty()) ATH_CHECK(m_monTool.retrieve());
+  ATH_CHECK(m_errorMonTool.retrieve());
 
   //----------------------------------------------------------------------------
   // Initialise data handle keys
@@ -1183,22 +1184,6 @@ void HltEventLoopMgr::runEventTimer()
   ATH_MSG_VERBOSE("end of " << __FUNCTION__);
 }
 
-// =============================================================================
-std::unordered_map<std::string_view,StatusCode> HltEventLoopMgr::algExecErrors(const EventContext& eventContext) const {
-  std::unordered_map<std::string_view,StatusCode> algErrors;
-  for (const auto& [key, state] : m_aess->algExecStates(eventContext)) {
-    if (!state.execStatus().isSuccess()) {
-      ATH_MSG_DEBUG("Algorithm " << key << " returned StatusCode " << state.execStatus().message()
-                    << " in event " << eventContext.eventID());
-      algErrors[key.str()] = state.execStatus();
-      auto monErrorAlgName = Monitored::Scalar<std::string>("ErrorAlgName", key.str());
-      auto monErrorCode = Monitored::Scalar<std::string>("ErrorCode", state.execStatus().message());
-      auto mon = Monitored::Group(m_monTool, monErrorAlgName, monErrorCode);
-    }
-  }
-  return algErrors;
-}
-
 // =============================================================================
 /**
  * @brief Retrieves finished events from the scheduler, processes their output and cleans up the slots
@@ -1258,7 +1243,7 @@ HltEventLoopMgr::DrainSchedulerStatusCode HltEventLoopMgr::drainScheduler()
     // Check the event processing status
     if (m_aess->eventStatus(*thisFinishedEvtContext) != EventStatus::Success) {
       markFailed();
-      auto algErrors = algExecErrors(*thisFinishedEvtContext);
+      auto algErrors = m_errorMonTool->algExecErrors(*thisFinishedEvtContext);
       HLT::OnlineErrorCode errCode = isTimedOut(algErrors) ?
                                      HLT::OnlineErrorCode::TIMEOUT : HLT::OnlineErrorCode::PROCESSING_FAILURE;
       HLT_DRAINSCHED_CHECK(sc, "Processing event with context " << *thisFinishedEvtContext
diff --git a/HLT/Trigger/TrigControl/TrigServices/src/HltEventLoopMgr.h b/HLT/Trigger/TrigControl/TrigServices/src/HltEventLoopMgr.h
index 163ffa1e83cd..f3ff73ae52ca 100644
--- a/HLT/Trigger/TrigControl/TrigServices/src/HltEventLoopMgr.h
+++ b/HLT/Trigger/TrigControl/TrigServices/src/HltEventLoopMgr.h
@@ -10,6 +10,7 @@
 #include "TrigOutputHandling/HLTResultMTMaker.h"
 #include "TrigSteeringEvent/OnlineErrorCode.h"
 #include "TrigSteerMonitor/ISchedulerMonSvc.h"
+#include "TrigSteerMonitor/ITrigErrorMonTool.h"
 
 // Athena includes
 #include "AthenaBaseComps/AthService.h"
@@ -156,9 +157,6 @@ private:
   /// The method executed by the event timeout monitoring thread
   void runEventTimer();
 
-  /// Produce a subset of IAlgExecStateSvc::algExecStates with only non-success StatusCodes
-  std::unordered_map<std::string_view,StatusCode> algExecErrors(const EventContext& eventContext) const;
-
   /// Drain the scheduler from all actions that may be queued
   DrainSchedulerStatusCode drainScheduler();
 
@@ -186,6 +184,7 @@ private:
   ToolHandle<TrigCOOLUpdateHelper>   m_coolHelper{this, "CoolUpdateTool", "TrigCOOLUpdateHelper"};
   ToolHandle<HLTResultMTMaker>       m_hltResultMaker{this, "ResultMaker", "HLTResultMTMaker"};
   ToolHandle<GenericMonitoringTool>  m_monTool{this, "MonTool", "", "Monitoring tool"};
+  ToolHandle<ITrigErrorMonTool>      m_errorMonTool{this, "TrigErrorMonTool", "TrigErrorMonTool", "Error monitoring tool"};
 
   SmartIF<IHiveWhiteBoard> m_whiteboard;
   SmartIF<IAlgResourcePool> m_algResourcePool;
diff --git a/Trigger/TrigMonitoring/TrigSteerMonitor/TrigSteerMonitor/ITrigErrorMonTool.h b/Trigger/TrigMonitoring/TrigSteerMonitor/TrigSteerMonitor/ITrigErrorMonTool.h
new file mode 100644
index 000000000000..2a372954a714
--- /dev/null
+++ b/Trigger/TrigMonitoring/TrigSteerMonitor/TrigSteerMonitor/ITrigErrorMonTool.h
@@ -0,0 +1,22 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+#ifndef TRIGSTEERMONITOR_ITRIGERRORMONTOOL_H
+#define TRIGSTEERMONITOR_ITRIGERRORMONTOOL_H
+
+#include "GaudiKernel/IAlgTool.h"
+#include "GaudiKernel/EventContext.h"
+
+/**
+ * @class ITrigErrorMonTool
+ * @brief Interface of a tool which retrieves and monitors all non-success status codes returned by algorithms
+ **/
+class ITrigErrorMonTool : virtual public IAlgTool {
+public: 
+  DeclareInterfaceID(ITrigErrorMonTool, 1, 0);
+
+  /// Produce a subset of IAlgExecStateSvc::algExecStates with only non-success StatusCodes and fill relevant histograms
+  virtual std::unordered_map<std::string_view, StatusCode> algExecErrors(const EventContext& eventContext) const = 0;
+}; 
+
+#endif // TRIGSTEERMONITOR_ITRIGERRORMONTOOL_H
diff --git a/Trigger/TrigMonitoring/TrigSteerMonitor/python/TrigSteerMonitorConfig.py b/Trigger/TrigMonitoring/TrigSteerMonitor/python/TrigSteerMonitorConfig.py
index 99c55a625895..23be91a7d8f3 100644
--- a/Trigger/TrigMonitoring/TrigSteerMonitor/python/TrigSteerMonitorConfig.py
+++ b/Trigger/TrigMonitoring/TrigSteerMonitor/python/TrigSteerMonitorConfig.py
@@ -59,3 +59,14 @@ def SchedulerMonSvcCfg(flags, name='SchedulerMonSvc'):
     acc = ComponentAccumulator()
     acc.addService(monsvc)
     return acc
+
+def getTrigErrorMonTool(name='TrigErrorMonTool'):
+    errorMonTool = CompFactory.TrigErrorMonTool(name)
+    errorMonTool.MonTool = GenericMonitoringTool('MonTool', HistPath='HLTFramework/'+name)
+
+    errorMonTool.MonTool.defineHistogram(
+        'ErrorAlgName,ErrorCode', path='EXPERT', type='TH2I',
+        title='Error StatusCodes per algorithm;Algorithm name;StatusCode',
+        xbins=1, xmin=0, xmax=1, ybins=1, ymin=0, ymax=1)
+
+    return errorMonTool
diff --git a/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigErrorMonTool.cxx b/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigErrorMonTool.cxx
new file mode 100644
index 000000000000..52263624a126
--- /dev/null
+++ b/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigErrorMonTool.cxx
@@ -0,0 +1,47 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+#include "TrigErrorMonTool.h"
+#include "GaudiKernel/IAlgExecStateSvc.h"
+
+// =============================================================================
+// Standard constructor
+// =============================================================================
+TrigErrorMonTool::TrigErrorMonTool(const std::string& type, const std::string& name, const IInterface* parent)
+: base_class(type, name, parent) {}
+
+// =============================================================================
+// Implementation of IStateful::initialize
+// =============================================================================
+StatusCode TrigErrorMonTool::initialize() {
+  ATH_CHECK(m_monTool.retrieve(DisableTool{m_monTool.name().empty()}));
+  ATH_CHECK(m_aess.retrieve());
+  return StatusCode::SUCCESS;
+}
+
+// =============================================================================
+// Implementation of IStateful::finalize
+// =============================================================================
+StatusCode TrigErrorMonTool::finalize() {
+  ATH_CHECK(m_monTool.release());
+  ATH_CHECK(m_aess.release());
+  return StatusCode::SUCCESS;
+}
+
+// =============================================================================
+// The main method of the tool, ITrigErrorMonTool::algExecErrors
+// =============================================================================
+std::unordered_map<std::string_view, StatusCode> TrigErrorMonTool::algExecErrors(const EventContext& eventContext) const {
+  std::unordered_map<std::string_view, StatusCode> algErrors;
+  for (const auto& [key, state] : m_aess->algExecStates(eventContext)) {
+    if (!state.execStatus().isSuccess()) {
+      ATH_MSG_DEBUG("Algorithm " << key << " returned StatusCode " << state.execStatus().message()
+                    << " in event " << eventContext.eventID());
+      algErrors[key.str()] = state.execStatus();
+      auto monErrorAlgName = Monitored::Scalar<std::string>("ErrorAlgName", key.str());
+      auto monErrorCode = Monitored::Scalar<std::string>("ErrorCode", state.execStatus().message());
+      auto mon = Monitored::Group(m_monTool, monErrorAlgName, monErrorCode);
+    }
+  }
+  return algErrors;
+}
diff --git a/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigErrorMonTool.h b/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigErrorMonTool.h
new file mode 100644
index 000000000000..ebbbe1ddd40a
--- /dev/null
+++ b/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigErrorMonTool.h
@@ -0,0 +1,36 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+#ifndef TRIGSTEERMONITOR_TRIGERRORMONTOOL_H
+#define TRIGSTEERMONITOR_TRIGERRORMONTOOL_H
+
+#include "TrigSteerMonitor/ITrigErrorMonTool.h"
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "AthenaMonitoringKernel/Monitored.h"
+#include "GaudiKernel/EventContext.h"
+
+class IAlgExecStateSvc;
+
+/**
+ * @class TrigErrorMonTool
+ * @brief Retrieves and monitors all non-success status codes returned by algorithms
+ **/
+class TrigErrorMonTool : public extends<AthAlgTool, ITrigErrorMonTool> {
+public:
+  TrigErrorMonTool(const std::string& type, const std::string& name, const IInterface* parent);
+
+  // ------------------------- IStateful methods -------------------------------
+  virtual StatusCode initialize() override;
+  virtual StatusCode finalize() override;
+
+  // ------------------------- ITrigErrorMonTool methods -----------------------
+  /// Produce a subset of IAlgExecStateSvc::algExecStates with only non-success StatusCodes and fill relevant histograms
+  virtual std::unordered_map<std::string_view, StatusCode> algExecErrors(const EventContext& eventContext) const override;
+
+private:
+  ServiceHandle<IAlgExecStateSvc> m_aess{this, "AlgExecStateSvc", "AlgExecStateSvc"};
+  ToolHandle<GenericMonitoringTool> m_monTool{this, "MonTool", "", "Monitoring tool"};
+};
+
+
+#endif // TRIGSTEERMONITOR_TRIGERRORMONTOOL_H
diff --git a/Trigger/TrigMonitoring/TrigSteerMonitor/src/components/TrigSteerMonitor_entries.cxx b/Trigger/TrigMonitoring/TrigSteerMonitor/src/components/TrigSteerMonitor_entries.cxx
index 9e4c016cad15..99609106c35a 100644
--- a/Trigger/TrigMonitoring/TrigSteerMonitor/src/components/TrigSteerMonitor_entries.cxx
+++ b/Trigger/TrigMonitoring/TrigSteerMonitor/src/components/TrigSteerMonitor_entries.cxx
@@ -12,6 +12,7 @@
 #include "../TrigSignatureMoniMT.h"
 #include "../DecisionCollectorTool.h"
 #include "../SchedulerMonSvc.h"
+#include "../TrigErrorMonTool.h"
 
 DECLARE_COMPONENT( TrigSteerMoni )
 DECLARE_COMPONENT( TrigChainMoni )
@@ -27,3 +28,4 @@ DECLARE_COMPONENT( TrigMemAuditor )
 DECLARE_COMPONENT( TrigSignatureMoniMT )
 DECLARE_COMPONENT( DecisionCollectorTool )
 DECLARE_COMPONENT( SchedulerMonSvc )
+DECLARE_COMPONENT( TrigErrorMonTool )
-- 
GitLab


From f433f3c5796c8eb1ba0bd15180d39dd399b0dc53 Mon Sep 17 00:00:00 2001
From: Corentin Allaire <corentin.allaire@cern.ch>
Date: Mon, 21 Sep 2020 17:53:58 +0200
Subject: [PATCH 111/403] PriVtxFinder

---
 .../ActsAdaptiveMultiPriVtxFinderTool.h            | 12 ++++++++----
 .../src/ActsAdaptiveMultiPriVtxFinderTool.cxx      | 14 +++++++++-----
 2 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/Tracking/Acts/ActsPriVtxFinder/ActsPriVtxFinder/ActsAdaptiveMultiPriVtxFinderTool.h b/Tracking/Acts/ActsPriVtxFinder/ActsPriVtxFinder/ActsAdaptiveMultiPriVtxFinderTool.h
index 9b742841e160..28d06a00cbd9 100644
--- a/Tracking/Acts/ActsPriVtxFinder/ActsPriVtxFinder/ActsAdaptiveMultiPriVtxFinderTool.h
+++ b/Tracking/Acts/ActsPriVtxFinder/ActsPriVtxFinder/ActsAdaptiveMultiPriVtxFinderTool.h
@@ -5,6 +5,10 @@
 #ifndef ACTSPRIVTXFINDER_ACTSADAPTIVEMULTIPRIVTXFINDERTOOL_H
 #define ACTSPRIVTXFINDER_ACTSADAPTIVEMULTIPRIVTXFINDERTOOL_H
 
+#include "TrkParameters/TrackParameters.h"
+
+#include "Acts/Propagator/Propagator.hpp"
+
 // ATHENA
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/IInterface.h"
@@ -60,19 +64,19 @@ class ActsAdaptiveMultiPriVtxFinderTool : public extends<AthAlgTool, InDet::IVer
 // Track wrapper input for the Acts vertexing
 class TrackWrapper {
 public:
-  TrackWrapper(const Trk::ITrackLink* trkLink, const Acts::BoundParameters& boundParams)
+  TrackWrapper(const Trk::ITrackLink* trkLink, const Acts::BoundTrackParameters& boundParams)
     : m_trkLink(trkLink)
     , m_boundParams(boundParams)
 
   {}
 
-  const Acts::BoundParameters& parameters() const {return m_boundParams;}
+  const Acts::BoundTrackParameters& parameters() const {return m_boundParams;}
 
   const Trk::ITrackLink* trackLink() const {return m_trkLink;}
 
 private:
   const Trk::ITrackLink* m_trkLink;
-  Acts::BoundParameters m_boundParams;
+  Acts::BoundTrackParameters m_boundParams;
 };
 
 public:
@@ -96,7 +100,7 @@ private:
   findVertex(const EventContext& ctx, std::vector<std::unique_ptr<Trk::ITrackLink>> trackVector) const;
 
   Trk::Perigee* actsBoundToTrkPerigee(
-  const Acts::BoundParameters& bound, const Acts::Vector3D& surfCenter) const;
+  const Acts::BoundTrackParameters& bound, const Acts::Vector3D& surfCenter) const;
 
   double estimateSignalCompatibility(xAOD::Vertex* vtx) const;
 
diff --git a/Tracking/Acts/ActsPriVtxFinder/src/ActsAdaptiveMultiPriVtxFinderTool.cxx b/Tracking/Acts/ActsPriVtxFinder/src/ActsAdaptiveMultiPriVtxFinderTool.cxx
index 69d853cb9831..5fe3cbb40a7d 100755
--- a/Tracking/Acts/ActsPriVtxFinder/src/ActsAdaptiveMultiPriVtxFinderTool.cxx
+++ b/Tracking/Acts/ActsPriVtxFinder/src/ActsAdaptiveMultiPriVtxFinderTool.cxx
@@ -79,7 +79,7 @@ ActsAdaptiveMultiPriVtxFinderTool::initialize()
 
     // Create a custom std::function to extract BoundParameters 
     // from TrackWrapper
-    std::function<Acts::BoundParameters(TrackWrapper)> extractParameters =
+    std::function<Acts::BoundTrackParameters(TrackWrapper)> extractParameters =
         [](TrackWrapper params) { return params.parameters(); };
 
     // Vertex fitter configuration
@@ -250,7 +250,13 @@ ActsAdaptiveMultiPriVtxFinderTool::findVertex(const EventContext& ctx, std::vect
       , cov(4,0) *1./(1_MeV) , cov(4,1) *1./(1_MeV) , cov(4,2) *1./(1_MeV) , cov(4,3) *1./(1_MeV) , cov(4,4) *1./(1_MeV*1_MeV), 0
       , 0. , 0. , 0. , 0., 0., 1.;
 
-      allTracks.emplace_back(trk.get(),Acts::BoundParameters(geoContext, covMat, actsParams, perigeeSurface));
+      Amg::Vector3D test(0, 0, 0); 
+      std::cout << test.phi() << std::endl;
+      std::cout << bug << std::endl;
+
+      allTracks.emplace_back(trk.get(),Acts::BoundTrackParameters(geoContext, covMat, actsParams, perigeeSurface));
+
+      std::cout << test.theta() << std::endl;
     }
 
     std::vector<const TrackWrapper*> allTrackPtrs;
@@ -366,7 +372,7 @@ return std::make_pair(theVertexContainer, theVertexAuxContainer);
 
 
 Trk::Perigee* ActsAdaptiveMultiPriVtxFinderTool::actsBoundToTrkPerigee(
-  const Acts::BoundParameters& bound, const Acts::Vector3D& surfCenter) const {
+  const Acts::BoundTrackParameters& bound, const Acts::Vector3D& surfCenter) const {
   using namespace Acts::UnitLiterals;
   AmgSymMatrix(5)* cov =  new AmgSymMatrix(5)(bound.covariance()->block<5,5>(0,0));
   cov->col(Trk::qOverP) *= 1_MeV;
@@ -405,5 +411,3 @@ ActsAdaptiveMultiPriVtxFinderTool::estimateSignalCompatibility(xAOD::Vertex* vtx
   }
   return totalPt2 * std::sqrt((double) nTracks);
 }
-
-
-- 
GitLab


From 30776afd0bf0fc1a87bbe2a98cd20588d8f49b84 Mon Sep 17 00:00:00 2001
From: Corentin Allaire <corentin.allaire@cern.ch>
Date: Mon, 21 Sep 2020 18:25:06 +0200
Subject: [PATCH 112/403] acts API change .h

---
 .../ActsGeometry/ActsDetectorElement.h          |  8 ++++----
 .../ActsGeometry/ActsExtrapolationAlg.h         |  3 ++-
 .../ActsGeometry/ActsExtrapolationTool.h        | 17 ++++++++---------
 .../ActsGeometry/ActsMaterialMapping.h          |  6 +++---
 .../ActsGeometry/ActsTrackingGeometrySvc.h      |  2 +-
 5 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsDetectorElement.h b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsDetectorElement.h
index 422d149b8841..b48216906216 100644
--- a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsDetectorElement.h
+++ b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsDetectorElement.h
@@ -43,10 +43,10 @@ public:
 
   /// Constructor for a straw surface.
   /// @param transform Transform to the straw system
-  ActsDetectorElement(std::shared_ptr<const Acts::Transform3D> trf,
-                          const InDetDD::TRT_BaseElement* detElem,
-                          const Identifier& id // we need explicit ID here b/c of straws
-                          );
+  ActsDetectorElement(const Acts::Transform3D& trf,
+                      const InDetDD::TRT_BaseElement* detElem,
+                      const Identifier& id // we need explicit ID here b/c of straws
+                      );
 
   ///  Destructor
   virtual ~ActsDetectorElement() {}
diff --git a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsExtrapolationAlg.h b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsExtrapolationAlg.h
index 89635fe82c74..d87153490dbf 100755
--- a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsExtrapolationAlg.h
+++ b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsExtrapolationAlg.h
@@ -13,7 +13,7 @@
 
 // ACTS
 #include "Acts/EventData/TrackParameters.hpp"
-#include "Acts/Geometry/GeometryID.hpp"
+#include "Acts/Geometry/GeometryIdentifier.hpp"
 
 // STL
 #include <memory>
@@ -58,6 +58,7 @@ private:
 
   // material track writer for the material map validation
   Gaudi::Property<bool> m_writeMaterialTracks{this, "WriteMaterialTracks", false, "Write material track"};
+  Gaudi::Property<bool> m_writePropStep{this, "WritePropStep", false, "Write propagation step"};
   ServiceHandle<IActsMaterialTrackWriterSvc> m_materialTrackWriterSvc;
 
   mutable std::mutex m_writeMutex{};
diff --git a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsExtrapolationTool.h b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsExtrapolationTool.h
index 9a117e51f0e6..a803638f943b 100644
--- a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsExtrapolationTool.h
+++ b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsExtrapolationTool.h
@@ -26,11 +26,12 @@
 #include "Acts/MagneticField/ConstantBField.hpp"
 #include "Acts/MagneticField/MagneticFieldContext.hpp"
 #include "Acts/Propagator/detail/SteppingLogger.hpp"
-#include "Acts/Propagator/DebugOutputActor.hpp"
 #include "Acts/Propagator/StandardAborters.hpp"
+#include "Acts/Propagator/SurfaceCollector.hpp"
 #include "Acts/Utilities/Result.hpp"
 #include "Acts/Utilities/Units.hpp"
 #include "Acts/Utilities/Helpers.hpp"
+#include "Acts/Utilities/Logger.hpp"
 
 #include <cmath>
 
@@ -59,39 +60,37 @@ public:
 private:
   // set up options for propagation
   using SteppingLogger = Acts::detail::SteppingLogger;
-  using DebugOutput = Acts::DebugOutputActor;
   using EndOfWorld = Acts::EndOfWorldReached;
-  using ResultType = Acts::Result<std::pair<ActsPropagationOutput,
-                                            DebugOutput::result_type>>;
+  using ResultType = Acts::Result<ActsPropagationOutput>;
 
 
 public:
   virtual
   ActsPropagationOutput
   propagationSteps(const EventContext& ctx,
-                   const Acts::BoundParameters& startParameters,
+                   const Acts::BoundTrackParameters& startParameters,
                    Acts::NavigationDirection navDir = Acts::forward,
                    double pathLimit = std::numeric_limits<double>::max()) const override;
 
   virtual
   std::unique_ptr<const Acts::CurvilinearParameters>
   propagate(const EventContext& ctx,
-            const Acts::BoundParameters& startParameters,
+            const Acts::BoundTrackParameters& startParameters,
             Acts::NavigationDirection navDir = Acts::forward,
             double pathLimit = std::numeric_limits<double>::max()) const override;
 
   virtual
   ActsPropagationOutput
   propagationSteps(const EventContext& ctx,
-                   const Acts::BoundParameters& startParameters,
+                   const Acts::BoundTrackParameters& startParameters,
                    const Acts::Surface& target,
                    Acts::NavigationDirection navDir = Acts::forward,
                    double pathLimit = std::numeric_limits<double>::max()) const override;
 
   virtual
-  std::unique_ptr<const Acts::BoundParameters>
+  std::unique_ptr<const Acts::BoundTrackParameters>
   propagate(const EventContext& ctx,
-            const Acts::BoundParameters& startParameters,
+            const Acts::BoundTrackParameters& startParameters,
             const Acts::Surface& target,
             Acts::NavigationDirection navDir = Acts::forward,
             double pathLimit = std::numeric_limits<double>::max()) const override;
diff --git a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsMaterialMapping.h b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsMaterialMapping.h
index 4cad3f6f2e6d..4421ca296f91 100755
--- a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsMaterialMapping.h
+++ b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsMaterialMapping.h
@@ -16,7 +16,7 @@
 
 // ACTS
 #include "Acts/EventData/TrackParameters.hpp"
-#include "Acts/Geometry/GeometryID.hpp"
+#include "Acts/Geometry/GeometryIdentifier.hpp"
 #include "Acts/Utilities/Helpers.hpp"
 #include "Acts/Material/SurfaceMaterialMapper.hpp"
 
@@ -34,10 +34,10 @@ namespace Acts {
   class IVolumeMaterial;
 
   using SurfaceMaterialMap
-      = std::map<GeometryID, std::shared_ptr<const ISurfaceMaterial>>;
+      = std::map<GeometryIdentifier, std::shared_ptr<const ISurfaceMaterial>>;
 
   using VolumeMaterialMap
-      = std::map<GeometryID, std::shared_ptr<const IVolumeMaterial>>;
+      = std::map<GeometryIdentifier, std::shared_ptr<const IVolumeMaterial>>;
 
   using DetectorMaterialMaps = std::pair<SurfaceMaterialMap, VolumeMaterialMap>;
 }
diff --git a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsTrackingGeometrySvc.h b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsTrackingGeometrySvc.h
index ba327af06215..b9c5d4b4ef55 100644
--- a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsTrackingGeometrySvc.h
+++ b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsTrackingGeometrySvc.h
@@ -36,7 +36,7 @@ class TrackingGeometry;
 class CylinderVolumeHelper;
 class ILayerBuilder;
 
-class GeometryID;
+class GeometryIdentifier;
 class BinnedSurfaceMaterial;
 
 }
-- 
GitLab


From 944f0b15ee3599a028be143b4857381d0edf434e Mon Sep 17 00:00:00 2001
From: Corentin Allaire <corentin.allaire@cern.ch>
Date: Mon, 21 Sep 2020 18:27:39 +0200
Subject: [PATCH 113/403] acts API change .cxx

---
 .../src/ActsCaloTrackingVolumeBuilder.cxx     | 44 ++++------
 .../ActsGeometry/src/ActsDetectorElement.cxx  |  4 +-
 .../ActsGeometry/src/ActsExtrapolationAlg.cxx |  9 +-
 .../src/ActsExtrapolationTool.cxx             | 52 ++++-------
 .../ActsGeometry/src/ActsLayerBuilder.cxx     | 86 +++++++++----------
 .../ActsGeometry/src/ActsMaterialMapping.cxx  |  1 -
 .../src/ActsMaterialStepConverterTool.cxx     |  6 +-
 .../src/ActsMaterialTrackWriterSvc.cxx        |  4 +-
 .../src/ActsPropStepRootWriterSvc.cxx         | 16 ++--
 .../src/ActsStrawLayerBuilder.cxx             | 15 ++--
 .../src/ActsVolumeMappingTool.cxx             |  1 -
 .../ActsWriteTrackingGeometryTransforms.cxx   |  4 +-
 .../src/components/ActsGeometry_entries.cxx   |  2 +
 .../src/util/ObjSurfaceWriter.cxx             |  6 +-
 .../src/util/RootExCellWriter.icc             | 13 +--
 15 files changed, 114 insertions(+), 149 deletions(-)

diff --git a/Tracking/Acts/ActsGeometry/src/ActsCaloTrackingVolumeBuilder.cxx b/Tracking/Acts/ActsGeometry/src/ActsCaloTrackingVolumeBuilder.cxx
index b80997c2103c..6bc36d1a7d05 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsCaloTrackingVolumeBuilder.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsCaloTrackingVolumeBuilder.cxx
@@ -25,7 +25,6 @@
 
 #include <fstream>
 
-using namespace Acts::VectorHelpers;
 using Box = Acts::Volume::BoundingBox; // shortcut
 
 using CVBBV = Acts::CylinderVolumeBounds::BoundValues;
@@ -96,7 +95,7 @@ ActsCaloTrackingVolumeBuilder::trackingVolume(
   }
 
   std::shared_ptr<Acts::TrackingVolume> calo
-      = Acts::TrackingVolume::create(std::make_shared<Acts::Transform3D>(Acts::Transform3D::Identity()),
+      = Acts::TrackingVolume::create(Acts::Transform3D::Identity()),
                                      caloVolBounds,
                                      std::move(boxStore),
                                      std::move(cellVols),
@@ -261,12 +260,8 @@ ActsCaloTrackingVolumeBuilder::trackingVolume(
           tVolOrdPosNeg, std::move(binUtilityPosNeg));
 
   double chokeZOffset = caloDZ2 + (caloDZ1 - caloDZ2)/2.;
-  auto posTrf
-   = std::make_shared<const Acts::Transform3D>(
-       Acts::Translation3D(Acts::Vector3D::UnitZ()*chokeZOffset));
-  auto negTrf
-   = std::make_shared<const Acts::Transform3D>(
-       Acts::Translation3D(Acts::Vector3D::UnitZ()* -1 *chokeZOffset));
+  Acts::Transform3D posTrf(Acts::Translation3D(Acts::Vector3D::UnitZ() * chokeZOffset));
+  Acts::Transform3D negTrf(Acts::Translation3D(Acts::Vector3D::UnitZ()* -1 *chokeZOffset));
 
   auto posNegCylBounds = std::make_shared<Acts::CylinderVolumeBounds>(
        caloRMin, caloRMax, (caloDZ1 - caloDZ2) / 2.);
@@ -296,23 +291,21 @@ ActsCaloTrackingVolumeBuilder::trackingVolume(
       = std::make_shared<const Acts::BinnedArrayXD<Acts::TrackingVolumePtr>>(
           tVolOrderedCtr, std::move(binUtilityCtr));
 
-  auto ctrContainer = Acts::TrackingVolume::create(
-      std::make_shared<const Acts::Transform3D>(Acts::Transform3D::Identity()),
-      std::make_shared<Acts::CylinderVolumeBounds>(
-          caloRMin, caloRMax, caloDZ2),
-      tVolArrCtr);
+auto ctrContainer = Acts::TrackingVolume::create(Acts::Transform3D::Identity(),
+                        std::make_shared<Acts::CylinderVolumeBounds>(
+                        caloRMin, caloRMax, caloDZ2),
+                        tVolArrCtr);
   ATH_MSG_VERBOSE("Built central container " << *ctrContainer);
   ATH_MSG_VERBOSE("- containing: " << idContainer->volumeName() << ", " << calo->volumeName());
 
   // and now combine those together into another one
   Acts::TrackingVolumeArrayCreator tvac{Acts::TrackingVolumeArrayCreator::Config{}};
 
-  auto mainContainer = Acts::TrackingVolume::create(
-      std::make_shared<const Acts::Transform3D>(Acts::Transform3D::Identity()),
-      std::make_shared<Acts::CylinderVolumeBounds>(
-          caloRMin, caloRMax, caloDZ1),
-      tvac.trackingVolumeArray(gctx, {negContainer, ctrContainer, posContainer},
-                               Acts::binZ));
+auto mainContainer = Acts::TrackingVolume::create(Acts::Transform3D::Identity(),
+    std::make_shared<Acts::CylinderVolumeBounds>(
+    caloRMin, caloRMax, caloDZ1),
+    tvac.trackingVolumeArray(gctx, {negContainer, ctrContainer, posContainer},
+    Acts::binZ));
 
   ATH_MSG_VERBOSE("Built main container: " << *mainContainer);
 
@@ -323,6 +316,7 @@ std::shared_ptr<Acts::CutoutCylinderVolumeBounds>
 ActsCaloTrackingVolumeBuilder::makeCaloVolumeBounds(const std::vector<std::unique_ptr<Box>>& boxStore,
                      std::shared_ptr<const Acts::TrackingVolume> insideVolume) const
 {
+  using namespace Acts::VectorHelpers; 
   // determine the dimensions of the
   double rmin_at_center = std::numeric_limits<double>::max();
   double rmin_at_choke  = std::numeric_limits<double>::max();
@@ -535,11 +529,11 @@ ActsCaloTrackingVolumeBuilder::build_endcap(double z,
   p7 = glob2vol * p7;
   p8 = glob2vol * p8;
 
-  auto globalToLocal = std::make_shared<Acts::Transform3D>(glob2vol.inverse());
+  auto globalToLocal = glob2vol.inverse();
 
   auto cubo = std::make_shared<Acts::GenericCuboidVolumeBounds>(
       std::array<Acts::Vector3D, 8>({{p1, p2, p3, p4, p5, p6, p7, p8}}));
-  Acts::AbstractVolume vol(std::move(globalToLocal), std::move(cubo));
+  Acts::AbstractVolume vol(globalToLocal, std::move(cubo));
 
   return vol;
 }
@@ -607,12 +601,12 @@ ActsCaloTrackingVolumeBuilder::build_barrel(double r,
   p7 = glob2vol * p7;
   p8 = glob2vol * p8;
 
-  auto globalToLocal = std::make_shared<Acts::Transform3D>(glob2vol.inverse());
+  auto globalToLocal = glob2vol.inverse();
 
   auto cubo = std::make_shared<Acts::GenericCuboidVolumeBounds>(
       std::array<Acts::Vector3D, 8>({{p1, p2, p3, p4, p5, p6, p7, p8}}));
 
-  Acts::AbstractVolume vol(std::move(globalToLocal), std::move(cubo));
+  Acts::AbstractVolume vol(globalToLocal, std::move(cubo));
 
   return vol;
 }
@@ -657,11 +651,11 @@ ActsCaloTrackingVolumeBuilder::build_box(double x, double dx, double y, double d
   p7 = glob2vol * p7;
   p8 = glob2vol * p8;
 
-  auto globalToLocal = std::make_shared<Acts::Transform3D>(glob2vol.inverse());
+  auto globalToLocal = glob2vol.inverse();
 
   auto cubo = std::make_shared<Acts::GenericCuboidVolumeBounds>(
       std::array<Acts::Vector3D, 8>({{p1, p2, p3, p4, p5, p6, p7, p8}}));
-  Acts::AbstractVolume vol(std::move(globalToLocal), std::move(cubo));
+  Acts::AbstractVolume vol(globalToLocal, std::move(cubo));
 
   return vol;
 }
diff --git a/Tracking/Acts/ActsGeometry/src/ActsDetectorElement.cxx b/Tracking/Acts/ActsGeometry/src/ActsDetectorElement.cxx
index 44d708d65b06..fd65d733545c 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsDetectorElement.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsDetectorElement.cxx
@@ -90,12 +90,12 @@ ActsDetectorElement::ActsDetectorElement(
 }
 
 ActsDetectorElement::ActsDetectorElement(
-    std::shared_ptr<const Transform3D> trf,
+    const Acts::Transform3D& trf,
     const InDetDD::TRT_BaseElement* detElem,
     const Identifier& id)
 {
   m_detElement = detElem;
-  m_defTransform = trf;
+  m_defTransform = std::make_shared<const Acts::Transform3D>(trf);
   m_explicitIdentifier = id;
 
   // we know this is a straw
diff --git a/Tracking/Acts/ActsGeometry/src/ActsExtrapolationAlg.cxx b/Tracking/Acts/ActsGeometry/src/ActsExtrapolationAlg.cxx
index 30b177811a37..5f6e7775d878 100755
--- a/Tracking/Acts/ActsGeometry/src/ActsExtrapolationAlg.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsExtrapolationAlg.cxx
@@ -119,14 +119,15 @@ StatusCode ActsExtrapolationAlg::execute(const EventContext &ctx) const {
       // Perigee, no alignment -> default geo context
       ActsGeometryContext gctx = m_extrapolationTool->trackingGeometryTool()
                                      ->getNominalGeometryContext();
-      auto anygctx = gctx.any();
-      Acts::BoundParameters startParameters(
-          anygctx, std::move(cov), std::move(pars), std::move(surface));
+      Acts::BoundTrackParameters startParameters(std::move(surface), std::move(pars), std::move(cov));
       output = m_extrapolationTool->propagationSteps(ctx, startParameters);
       if(output.first.size() == 0) {
         ATH_MSG_WARNING("Got ZERO steps from the extrapolation tool");
       }
-      m_propStepWriterSvc->write(output.first);
+      if (m_writePropStep) {
+        m_propStepWriterSvc->write(output.first);
+      }
+
       if(m_writeMaterialTracks){
         Acts::RecordedMaterialTrack track;
         track.first.first = Acts::Vector3D(0,0,0);
diff --git a/Tracking/Acts/ActsGeometry/src/ActsExtrapolationTool.cxx b/Tracking/Acts/ActsGeometry/src/ActsExtrapolationTool.cxx
index 6c5d6459b188..bfe37a2ecbf2 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsExtrapolationTool.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsExtrapolationTool.cxx
@@ -110,7 +110,7 @@ ActsExtrapolationTool::initialize()
 
 ActsPropagationOutput
 ActsExtrapolationTool::propagationSteps(const EventContext& ctx,
-                                        const Acts::BoundParameters& startParameters,
+                                        const Acts::BoundTrackParameters& startParameters,
                                         Acts::NavigationDirection navDir /*= Acts::forward*/,
                                         double pathLimit /*= std::numeric_limits<double>::max()*/) const
 {
@@ -125,15 +125,13 @@ ActsExtrapolationTool::propagationSteps(const EventContext& ctx,
 
   // Action list and abort list
   using ActionList =
-  Acts::ActionList<SteppingLogger, Acts::MaterialInteractor, DebugOutput>;
+  Acts::ActionList<SteppingLogger, Acts::MaterialInteractor>;
   using AbortConditions = Acts::AbortList<EndOfWorld>;
 
   using Options = Acts::PropagatorOptions<ActionList, AbortConditions>;
 
   Options options(anygctx, mctx, Acts::LoggerWrapper{*m_logger});
   options.pathLimit = pathLimit;
-  bool debug = msg().level() == MSG::VERBOSE;
-  options.debug = debug;
 
   options.loopProtection
     = (Acts::VectorHelpers::perp(startParameters.momentum())
@@ -147,7 +145,6 @@ ActsExtrapolationTool::propagationSteps(const EventContext& ctx,
   mInteractor.recordInteractions = m_interactionRecord;
 
   ActsPropagationOutput output;
-  DebugOutput::result_type debugOutput;
 
   auto res = boost::apply_visitor([&](const auto& propagator) -> ResultType {
       auto result = propagator.propagate(startParameters, options);
@@ -162,7 +159,7 @@ ActsExtrapolationTool::propagationSteps(const EventContext& ctx,
       output.first = std::move(steppingResults.steps);
       output.second = std::move(materialResult);
       // try to force return value optimization, not sure this is necessary
-      return std::make_pair(std::move(output), std::move(debugOutput));
+      return std::move(output);
     }, *m_varProp);
 
   if (!res.ok()) {
@@ -171,11 +168,7 @@ ActsExtrapolationTool::propagationSteps(const EventContext& ctx,
                   << ". Returning empty step vector.");
     return {};
   }
-  std::tie(output, debugOutput) = std::move(*res);
-
-  if(debug) {
-    ATH_MSG_VERBOSE(debugOutput.debugString);
-  }
+  output = std::move(*res);
 
   ATH_MSG_VERBOSE("Collected " << output.first.size() << " steps");
   if(output.first.size() == 0) {
@@ -189,9 +182,9 @@ ActsExtrapolationTool::propagationSteps(const EventContext& ctx,
 
 
 
-std::unique_ptr<const Acts::CurvilinearParameters>
+std::unique_ptr<const Acts::CurvilinearTrackParameters>
 ActsExtrapolationTool::propagate(const EventContext& ctx,
-                                 const Acts::BoundParameters& startParameters,
+                                 const Acts::BoundTrackParameters& startParameters,
                                  Acts::NavigationDirection navDir /*= Acts::forward*/,
                                  double pathLimit /*= std::numeric_limits<double>::max()*/) const
 {
@@ -205,15 +198,12 @@ ActsExtrapolationTool::propagate(const EventContext& ctx,
   auto anygctx = gctx.any();
 
   // Action list and abort list
-  using ActionList =
-  Acts::ActionList<Acts::MaterialInteractor, DebugOutput>;
+  using ActionList = Acts::ActionList<Acts::MaterialInteractor>;
   using AbortConditions = Acts::AbortList<EndOfWorld>;
   using Options = Acts::PropagatorOptions<ActionList, AbortConditions>;
 
   Options options(anygctx, mctx, Acts::LoggerWrapper{*m_logger});
   options.pathLimit = pathLimit;
-  bool debug = msg().level() == MSG::VERBOSE;
-  options.debug = debug;
 
   options.loopProtection
     = (Acts::VectorHelpers::perp(startParameters.momentum())
@@ -226,7 +216,7 @@ ActsExtrapolationTool::propagate(const EventContext& ctx,
   mInteractor.energyLoss = m_interactionEloss;
   mInteractor.recordInteractions = m_interactionRecord;
 
-  auto parameters = boost::apply_visitor([&](const auto& propagator) -> std::unique_ptr<const Acts::CurvilinearParameters> {
+  auto parameters = boost::apply_visitor([&](const auto& propagator) -> std::unique_ptr<const Acts::CurvilinearTrackParameters> {
       auto result = propagator.propagate(startParameters, options);
       if (!result.ok()) {
         ATH_MSG_ERROR("Got error during propagation:" << result.error()
@@ -241,7 +231,7 @@ ActsExtrapolationTool::propagate(const EventContext& ctx,
 
 ActsPropagationOutput
 ActsExtrapolationTool::propagationSteps(const EventContext& ctx,
-                                        const Acts::BoundParameters& startParameters,
+                                        const Acts::BoundTrackParameters& startParameters,
                                         const Acts::Surface& target,
                                         Acts::NavigationDirection navDir /*= Acts::forward*/,
                                         double pathLimit /*= std::numeric_limits<double>::max()*/) const
@@ -257,14 +247,12 @@ ActsExtrapolationTool::propagationSteps(const EventContext& ctx,
 
   // Action list and abort list
   using ActionList =
-  Acts::ActionList<SteppingLogger, Acts::MaterialInteractor, DebugOutput>;
+  Acts::ActionList<SteppingLogger, Acts::MaterialInteractor>;
   using AbortConditions = Acts::AbortList<EndOfWorld>;
   using Options = Acts::PropagatorOptions<ActionList, AbortConditions>;
 
   Options options(anygctx, mctx, Acts::LoggerWrapper{*m_logger});
   options.pathLimit = pathLimit;
-  bool debug = msg().level() == MSG::VERBOSE;
-  options.debug = debug;
 
   options.loopProtection
     = (Acts::VectorHelpers::perp(startParameters.momentum())
@@ -278,7 +266,6 @@ ActsExtrapolationTool::propagationSteps(const EventContext& ctx,
   mInteractor.recordInteractions = m_interactionRecord;
 
   ActsPropagationOutput output;
-  DebugOutput::result_type debugOutput;
 
   auto res = boost::apply_visitor([&](const auto& propagator) -> ResultType {
       auto result = propagator.propagate(startParameters, target, options);
@@ -288,11 +275,10 @@ ActsExtrapolationTool::propagationSteps(const EventContext& ctx,
       auto& propRes = *result;
 
       auto steppingResults = propRes.template get<SteppingLogger::result_type>();
-      auto debugOutput = propRes.template get<DebugOutput::result_type>();
       auto materialResult = propRes.template get<Acts::MaterialInteractor::result_type>();
       output.first = std::move(steppingResults.steps);
       output.second = std::move(materialResult);
-      return std::make_pair(std::move(output), std::move(debugOutput));
+      return std::move(output));
     }, *m_varProp);
 
   if (!res.ok()) {
@@ -300,11 +286,7 @@ ActsExtrapolationTool::propagationSteps(const EventContext& ctx,
                   << ". Returning empty step vector.");
     return {};
   }
-  std::tie(output, debugOutput) = std::move(*res);
-
-  if(debug) {
-    ATH_MSG_VERBOSE(debugOutput.debugString);
-  }
+  output = std::move(*res);
 
   ATH_MSG_VERBOSE("Collected " << output.first.size() << " steps");
   ATH_MSG_VERBOSE(name() << "::" << __FUNCTION__ << " end");
@@ -312,9 +294,9 @@ ActsExtrapolationTool::propagationSteps(const EventContext& ctx,
   return output;
 }
 
-std::unique_ptr<const Acts::BoundParameters>
+std::unique_ptr<const Acts::BoundTrackParameters>
 ActsExtrapolationTool::propagate(const EventContext& ctx,
-                                 const Acts::BoundParameters& startParameters,
+                                 const Acts::BoundTrackParameters& startParameters,
                                  const Acts::Surface& target,
                                  Acts::NavigationDirection navDir /*= Acts::forward*/,
                                  double pathLimit /*= std::numeric_limits<double>::max()*/) const
@@ -330,14 +312,12 @@ ActsExtrapolationTool::propagate(const EventContext& ctx,
 
   // Action list and abort list
   using ActionList =
-  Acts::ActionList<Acts::MaterialInteractor, DebugOutput>;
+  Acts::ActionList<Acts::MaterialInteractor>;
   using AbortConditions = Acts::AbortList<EndOfWorld>;
   using Options = Acts::PropagatorOptions<ActionList, AbortConditions>;
 
   Options options(anygctx, mctx, Acts::LoggerWrapper{*m_logger});
   options.pathLimit = pathLimit;
-  bool debug = msg().level() == MSG::VERBOSE;
-  options.debug = debug;
 
   options.loopProtection
     = (Acts::VectorHelpers::perp(startParameters.momentum())
@@ -350,7 +330,7 @@ ActsExtrapolationTool::propagate(const EventContext& ctx,
   mInteractor.energyLoss = m_interactionEloss;
   mInteractor.recordInteractions = m_interactionRecord;
 
-  auto parameters = boost::apply_visitor([&](const auto& propagator) -> std::unique_ptr<const Acts::BoundParameters> {
+  auto parameters = boost::apply_visitor([&](const auto& propagator) -> std::unique_ptr<const Acts::BoundTrackParameters> {
       auto result = propagator.propagate(startParameters, target, options);
       if (!result.ok()) {
         ATH_MSG_ERROR("Got error during propagation: " << result.error()
diff --git a/Tracking/Acts/ActsGeometry/src/ActsLayerBuilder.cxx b/Tracking/Acts/ActsGeometry/src/ActsLayerBuilder.cxx
index 05c2f7deefd5..60dcbfb12ff3 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsLayerBuilder.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsLayerBuilder.cxx
@@ -181,8 +181,7 @@ ActsLayerBuilder::buildLayers(const Acts::GeometryContext& gctx,
       double layerHalfZ
         = std::abs(pl.max(Acts::binZ) + pl.envelope[Acts::binZ].second - layerZ);
 
-      auto transform
-        = std::make_shared<const Transform3D>(Translation3D(0., 0., -layerZ));
+      Transform3D transform(Translation3D(0., 0., -layerZ));
       // set up approach descriptor
 
       std::shared_ptr<Acts::CylinderSurface> innerBoundary
@@ -252,62 +251,55 @@ ActsLayerBuilder::buildLayers(const Acts::GeometryContext& gctx,
 
       if (std::abs(layerZInner) > std::abs(layerZOuter)) std::swap(layerZInner, layerZOuter);
 
-      auto transformNominal
-        = std::make_shared<const Transform3D>(Translation3D(0., 0., layerZ));
+        Transform3D transformNominal(Translation3D(0., 0., layerZ));
+        Transform3D transformInner(Translation3D(0., 0., layerZInner));
+        Transform3D transformOuter(Translation3D(0., 0., layerZOuter));
 
-      auto transformInner
-        = std::make_shared<const Transform3D>(Translation3D(0., 0., layerZInner));
+        std::shared_ptr<Acts::DiscSurface> innerBoundary = Acts::Surface::makeShared<Acts::DiscSurface>(transformInner, pl.min(Acts::binR), pl.max(Acts::binR));
 
-      auto transformOuter
-        = std::make_shared<const Transform3D>(Translation3D(0., 0., layerZOuter));
+        std::shared_ptr<Acts::DiscSurface> nominalSurface = Acts::Surface::makeShared<Acts::DiscSurface>(transformNominal, pl.min(Acts::binR), pl.max(Acts::binR));
 
-      std::shared_ptr<Acts::DiscSurface> innerBoundary
-        = Acts::Surface::makeShared<Acts::DiscSurface>(transformInner, pl.min(Acts::binR), pl.max(Acts::binR));
+        std::shared_ptr<Acts::DiscSurface> outerBoundary = Acts::Surface::makeShared<Acts::DiscSurface>(transformOuter, pl.min(Acts::binR), pl.max(Acts::binR));
 
-      std::shared_ptr<Acts::DiscSurface> nominalSurface
-        = Acts::Surface::makeShared<Acts::DiscSurface>(transformNominal, pl.min(Acts::binR), pl.max(Acts::binR));
+        size_t matBinsPhi = m_cfg.endcapMaterialBins.first;
+        size_t matBinsR = m_cfg.endcapMaterialBins.second;
 
-      std::shared_ptr<Acts::DiscSurface> outerBoundary
-        = Acts::Surface::makeShared<Acts::DiscSurface>(transformOuter, pl.min(Acts::binR), pl.max(Acts::binR));
+        Acts::BinUtility materialBinUtil(
+            matBinsPhi, -M_PI, M_PI, Acts::closed, Acts::binPhi);
+        materialBinUtil += Acts::BinUtility(
+            matBinsR, pl.min(Acts::binR), pl.max(Acts::binR), Acts::open, Acts::binR, transformNominal);
 
-      size_t matBinsPhi = m_cfg.endcapMaterialBins.first;
-      size_t matBinsR = m_cfg.endcapMaterialBins.second;
+        materialProxy = std::make_shared<const Acts::ProtoSurfaceMaterial>(materialBinUtil);
 
-      Acts::BinUtility materialBinUtil(
-          matBinsPhi, -M_PI, M_PI, Acts::closed, Acts::binPhi);
-      materialBinUtil += Acts::BinUtility(
-          matBinsR, pl.min(Acts::binR), pl.max(Acts::binR), Acts::open, Acts::binR, transformNominal);
+        ACTS_VERBOSE("[L] Layer is marked to carry support material on Surface ( "
+                     "inner=0 / center=1 / outer=2 ) : "
+                     << "inner");
+        ACTS_VERBOSE("with binning: [" << matBinsPhi << ", " << matBinsR << "]");
 
-      materialProxy
-        = std::make_shared<const Acts::ProtoSurfaceMaterial>(materialBinUtil);
+        ACTS_VERBOSE("Created ApproachSurfaces for disc layer at:");
+        ACTS_VERBOSE(" - inner:   Z=" << layerZInner);
+        ACTS_VERBOSE(" - central: Z=" << layerZ);
+        ACTS_VERBOSE(" - outer:   Z=" << layerZOuter);
 
-      ACTS_VERBOSE("[L] Layer is marked to carry support material on Surface ( "
-          "inner=0 / center=1 / outer=2 ) : " << "inner");
-      ACTS_VERBOSE("with binning: [" << matBinsPhi << ", " << matBinsR << "]");
+        // set material on inner
+        // @TODO: make this configurable somehow
+        innerBoundary->assignSurfaceMaterial(materialProxy);
 
-      ACTS_VERBOSE("Created ApproachSurfaces for disc layer at:");
-      ACTS_VERBOSE(" - inner:   Z=" << layerZInner);
-      ACTS_VERBOSE(" - central: Z=" << layerZ);
-      ACTS_VERBOSE(" - outer:   Z=" << layerZOuter);
-
-
-      // set material on inner
-      // @TODO: make this configurable somehow
-      innerBoundary->assignSurfaceMaterial(materialProxy);
+        int nModPhi = std::numeric_limits<int>::max();
+        int nModR = 0;
 
-      int nModPhi = std::numeric_limits<int>::max();
-      int nModR = 0;
-
-      // want to figure out bins in phi
-      for (const auto& srf : layerSurfaces) {
-        auto elm = dynamic_cast<const ActsDetectorElement*>(srf->associatedDetectorElement());
-        if (elm){
-          auto id = elm->identityHelper();
-          int phi_mod_max = id.phi_module_max();
-          int eta_mod_max = id.eta_module_max();
-          nModPhi = std::min(nModPhi, phi_mod_max+1);
-          nModR = eta_mod_max+1;
-        }
+        // want to figure out bins in phi
+        for (const auto &srf : layerSurfaces)
+        {
+          auto elm = dynamic_cast<const ActsDetectorElement *>(srf->associatedDetectorElement());
+          if (elm)
+          {
+            auto id = elm->identityHelper();
+            int phi_mod_max = id.phi_module_max();
+            int eta_mod_max = id.eta_module_max();
+            nModPhi = std::min(nModPhi, phi_mod_max + 1);
+            nModR = eta_mod_max + 1;
+          }
       }
 
       ACTS_VERBOSE("Identifier reports: " << nModPhi << " is lowest for " << nModR << " r-rings");
diff --git a/Tracking/Acts/ActsGeometry/src/ActsMaterialMapping.cxx b/Tracking/Acts/ActsGeometry/src/ActsMaterialMapping.cxx
index ae6842218a4b..26c49f5b2466 100755
--- a/Tracking/Acts/ActsGeometry/src/ActsMaterialMapping.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsMaterialMapping.cxx
@@ -32,7 +32,6 @@
 //TEST
 #include "Acts/EventData/NeutralTrackParameters.hpp"
 #include "Acts/Propagator/ActionList.hpp"
-#include "Acts/Propagator/DebugOutputActor.hpp"
 #include "Acts/Propagator/Navigator.hpp"
 #include "Acts/Propagator/Propagator.hpp"
 #include "Acts/Propagator/StandardAborters.hpp"
diff --git a/Tracking/Acts/ActsGeometry/src/ActsMaterialStepConverterTool.cxx b/Tracking/Acts/ActsGeometry/src/ActsMaterialStepConverterTool.cxx
index 9d1c0703ad4c..aaafb1494732 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsMaterialStepConverterTool.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsMaterialStepConverterTool.cxx
@@ -14,7 +14,7 @@
 #include "TrkGeometry/MaterialStep.h"
 
 // ACTS
-#include "Acts/Material/MaterialProperties.hpp"
+#include "Acts/Material/MaterialSlab.hpp"
 
 // STL
 #include <iostream>
@@ -65,9 +65,9 @@ ActsMaterialStepConverterTool::convertToMaterialTrack(const Trk::MaterialStepCol
     Acts::MaterialInteraction interaction;
 
     Acts::Vector3D pos{step->hitX(), step->hitY(), step->hitZ()};
-    Acts::MaterialProperties matProp(step->x0(), step->l0(), step->A(), step->Z(), step->rho(),step->steplength());
+    Acts::MaterialSlab matProp(Acts::Material::fromMassDensity(step->x0(), step->l0(), step->A(), step->Z(), step->rho()),step->steplength());
     interaction.position = pos;
-    interaction.materialProperties = matProp;
+    interaction.materialSlab = matProp;
     sum_X0 += step->steplengthInX0();
     sum_L0 += step->steplengthInL0();
     nStep.push_back(interaction);
diff --git a/Tracking/Acts/ActsGeometry/src/ActsMaterialTrackWriterSvc.cxx b/Tracking/Acts/ActsGeometry/src/ActsMaterialTrackWriterSvc.cxx
index dd5b9ad679b3..3116a28d4535 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsMaterialTrackWriterSvc.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsMaterialTrackWriterSvc.cxx
@@ -8,7 +8,7 @@
 #include "TTree.h"
 #include "TFile.h"
 
-#include "Acts/Material/MaterialProperties.hpp"
+#include "Acts/Material/MaterialSlab.hpp"
 #include "Acts/Utilities/Helpers.hpp"
 
 using namespace Acts::VectorHelpers;
@@ -220,7 +220,7 @@ ActsMaterialTrackWriterSvc::doWrite(const Acts::RecordedMaterialTrack& mTrack)
       m_step_ez.push_back(posPos.z());
 
     // the material information
-    const auto& mprops = mint.materialProperties;
+    const auto& mprops = mint.materialSlab;
     m_step_length.push_back(mprops.thickness());
     m_step_X0.push_back(mprops.material().X0());
     m_step_L0.push_back(mprops.material().L0());
diff --git a/Tracking/Acts/ActsGeometry/src/ActsPropStepRootWriterSvc.cxx b/Tracking/Acts/ActsGeometry/src/ActsPropStepRootWriterSvc.cxx
index 003a5e3b2fd0..6229793ec97c 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsPropStepRootWriterSvc.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsPropStepRootWriterSvc.cxx
@@ -120,7 +120,7 @@ ActsPropStepRootWriterSvc::writeThread()
 void
 ActsPropStepRootWriterSvc::doWrite(const StepVector& steps, size_t evtNum)
 {
-  using ag = Acts::GeometryID;
+  using ag = Acts::GeometryIdentifier;
 
   m_eventNum = evtNum;
   m_s_pX.clear();
@@ -134,14 +134,14 @@ ActsPropStepRootWriterSvc::doWrite(const StepVector& steps, size_t evtNum)
   m_s_sensitiveID.clear();
 
   for(const auto& step : steps) {
-      Acts::GeometryID::Value volumeID    = 0;
-      Acts::GeometryID::Value boundaryID  = 0;
-      Acts::GeometryID::Value layerID     = 0;
-      Acts::GeometryID::Value approachID  = 0;
-      Acts::GeometryID::Value sensitiveID = 0;
+      Acts::GeometryIdentifier::Value volumeID    = 0;
+      Acts::GeometryIdentifier::Value boundaryID  = 0;
+      Acts::GeometryIdentifier::Value layerID     = 0;
+      Acts::GeometryIdentifier::Value approachID  = 0;
+      Acts::GeometryIdentifier::Value sensitiveID = 0;
       // get the identification from the surface first
       if (step.surface) {
-        auto geoID  = step.surface->geoID();
+        auto geoID  = step.surface->geometryId();
         sensitiveID = geoID.sensitive();
         approachID  = geoID.approach();
         layerID     = geoID.layer();
@@ -150,7 +150,7 @@ ActsPropStepRootWriterSvc::doWrite(const StepVector& steps, size_t evtNum)
       }
       // a current volume overwrites the surface tagged one
       if (step.volume) {
-        volumeID = step.volume->geoID().volume();
+        volumeID = step.volume->geometryId().volume();
       }
       // now fill
       m_s_sensitiveID.push_back(sensitiveID);
diff --git a/Tracking/Acts/ActsGeometry/src/ActsStrawLayerBuilder.cxx b/Tracking/Acts/ActsGeometry/src/ActsStrawLayerBuilder.cxx
index 214222de2aa8..4452202ca160 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsStrawLayerBuilder.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsStrawLayerBuilder.cxx
@@ -28,9 +28,6 @@
 #include <iostream>
 #include <fstream>
 
-using Acts::Transform3D;
-using Acts::Vector3D;
-
 using namespace Acts::UnitLiterals;
 
 const Acts::LayerVector
@@ -112,9 +109,9 @@ ActsStrawLayerBuilder::centralLayers(const Acts::GeometryContext& gctx)
 
           for(unsigned int istraw=0;istraw<nStraws;istraw++) {
 
-            auto trf = std::make_shared<Transform3D>(brlElem->strawTransform(istraw));
+            Acts::Transform3D trf = brlElem->strawTransform(istraw);
             // need to convert translation to length unit
-            trf->translation() *= 1_mm;
+            trf.translation() *= 1_mm;
             auto code = brlElem->getCode();
             Identifier straw_id = m_cfg.idHelper->straw_id(code.isPosZ() == 1 ? 1 : -1,
                                                     code.getPhiIndex(),
@@ -137,7 +134,7 @@ ActsStrawLayerBuilder::centralLayers(const Acts::GeometryContext& gctx)
             fudge = radius / 4.;
 
             // calculate min/max R and Z
-            Vector3D ctr = straw->center(gctx);
+            Acts::Vector3D ctr = straw->center(gctx);
             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);
@@ -211,9 +208,9 @@ ActsStrawLayerBuilder::endcapLayers(const Acts::GeometryContext& gctx, int side)
 
         for(unsigned int istraw=0;istraw<nStraws;istraw++) {
 
-          auto trf = std::make_shared<Transform3D>(ecElem->strawTransform(istraw));
+          Acts::Transform3D trf = (ecElem->strawTransform(istraw));
           // need to convert translation to length unit
-          trf->translation() *= 1_mm;
+          trf.translation() *= 1_mm;
 
           auto code = ecElem->getCode();
           Identifier straw_id = m_cfg.idHelper->straw_id(code.isPosZ() == 1 ? 2 : -2,
@@ -235,7 +232,7 @@ ActsStrawLayerBuilder::endcapLayers(const Acts::GeometryContext& gctx, int side)
               double radius = strawBounds->get(LBBV::eR);
               double length = strawBounds->get(LBBV::eHalfLengthZ);
 
-              Vector3D ctr = straw->center(gctx);
+              Acts::Vector3D ctr = straw->center(gctx);
               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);
diff --git a/Tracking/Acts/ActsGeometry/src/ActsVolumeMappingTool.cxx b/Tracking/Acts/ActsGeometry/src/ActsVolumeMappingTool.cxx
index 97c4a7ad8052..e2b8beb892c7 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsVolumeMappingTool.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsVolumeMappingTool.cxx
@@ -47,7 +47,6 @@ ActsVolumeMappingTool::initialize()
 
   /// The material mapper
   Acts::VolumeMaterialMapper::Config smmConfig;
-  smmConfig.mapperDebugOutput = true;
   m_mapper = std::make_shared<Acts::VolumeMaterialMapper>(
       smmConfig,
       std::move(propagator),
diff --git a/Tracking/Acts/ActsGeometry/src/ActsWriteTrackingGeometryTransforms.cxx b/Tracking/Acts/ActsGeometry/src/ActsWriteTrackingGeometryTransforms.cxx
index 25dbd9a5a459..60ab905e7f36 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsWriteTrackingGeometryTransforms.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsWriteTrackingGeometryTransforms.cxx
@@ -22,7 +22,7 @@
 // STL
 #include <string>
 
-using gid = Acts::GeometryID;
+using gid = Acts::GeometryIdentifier;
 
 ActsWriteTrackingGeometryTransforms::ActsWriteTrackingGeometryTransforms(const std::string& name,
                                  ISvcLocator* pSvcLocator)
@@ -58,7 +58,7 @@ StatusCode ActsWriteTrackingGeometryTransforms::execute() {
       return;
     }
 
-    gid geoID = srf->geoID();
+    gid geoID = srf->geometryId();
     os << geoID.volume() << ";";
     os << geoID.boundary() << ";";
     os << geoID.layer() << ";";
diff --git a/Tracking/Acts/ActsGeometry/src/components/ActsGeometry_entries.cxx b/Tracking/Acts/ActsGeometry/src/components/ActsGeometry_entries.cxx
index 311f5dfe30a8..1450be63d539 100755
--- a/Tracking/Acts/ActsGeometry/src/components/ActsGeometry_entries.cxx
+++ b/Tracking/Acts/ActsGeometry/src/components/ActsGeometry_entries.cxx
@@ -2,6 +2,8 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
+#include "TrkParameters/TrackParameters.h"
+
 #include "ActsGeometry/ActsExtrapolationAlg.h"
 #include "ActsGeometry/ActsWriteTrackingGeometry.h"
 #include "ActsGeometry/ActsWriteTrackingGeometryTransforms.h"
diff --git a/Tracking/Acts/ActsGeometry/src/util/ObjSurfaceWriter.cxx b/Tracking/Acts/ActsGeometry/src/util/ObjSurfaceWriter.cxx
index 162a34efc441..4de54887c0cf 100644
--- a/Tracking/Acts/ActsGeometry/src/util/ObjSurfaceWriter.cxx
+++ b/Tracking/Acts/ActsGeometry/src/util/ObjSurfaceWriter.cxx
@@ -15,7 +15,7 @@
 #include "Acts/Surfaces/PlanarBounds.hpp"
 #include "Acts/Surfaces/RadialBounds.hpp"
 #include "Acts/Surfaces/SurfaceBounds.hpp"
-#include "Acts/Geometry/GeometryID.hpp"
+#include "Acts/Geometry/GeometryIdentifier.hpp"
 
 #include "Acts/Geometry/Polyhedron.hpp"
 #include "Acts/Surfaces/CylinderSurface.hpp"
@@ -166,7 +166,7 @@ Acts::ObjSurfaceWriter::write(const Acts::GeometryContext &gctx,
     ACTS_VERBOSE(">>Obj: Writing out a CylinderSurface with r = "
                  << cylinderBounds->get(Acts::CylinderBounds::eR));
     // name the object
-    auto layerID = surface.geoID().layer();
+    auto layerID = surface.geometryId().layer();
     (*(m_cfg.outputStream))
         << " o Cylinder_" << std::to_string(layerID) << '\n';
     // output to the file
@@ -188,7 +188,7 @@ Acts::ObjSurfaceWriter::write(const Acts::GeometryContext &gctx,
     ACTS_VERBOSE(">>Obj: Writing out a DiskSurface at z = "
                  << sTransform.translation().z());
     // name the object
-    auto layerID = surface.geoID().layer();
+    auto layerID = surface.geometryId().layer();
     (*(m_cfg.outputStream)) << "o Disk_" << std::to_string(layerID) << '\n';
     // we use the tube writer in the other direction
     double rMin      = radialBounds->rMin();
diff --git a/Tracking/Acts/ActsGeometry/src/util/RootExCellWriter.icc b/Tracking/Acts/ActsGeometry/src/util/RootExCellWriter.icc
index bebcf8481941..d6604f32cb22 100644
--- a/Tracking/Acts/ActsGeometry/src/util/RootExCellWriter.icc
+++ b/Tracking/Acts/ActsGeometry/src/util/RootExCellWriter.icc
@@ -90,12 +90,13 @@ RootExCellWriter<T>::write(
           Acts::ExtrapolationMode::CollectPassive);
 
       /// check the layer, surface, volume ID
-      geo_id_value volumeID = pars.referenceSurface().geoID().value(
-          Acts::GeometryID::volume_mask);
-      geo_id_value layerID = pars.referenceSurface().geoID().value(
-          Acts::GeometryID::layer_mask);
-      geo_id_value surfaceID = pars.referenceSurface().geoID().value(
-          Acts::GeometryID::sensitive_mask);
+      geo_id_value volumeID = pars.referenceSurface().geometryId().value(
+          Acts::GeometryIdentifier::volume_mask);
+      geo_id_value layerID = pars.referenceSurface().geometryId().value(
+          Acts::GeometryIdentifier::layer_mask);
+      geo_id_value surfaceID = pars.referenceSurface().geometryId().value(
+          Acts::GeometryIdentifier::sensitive_mask);
+
       ///
       if ((m_cfg.writeSensitive && sensitive)
           || (m_cfg.writeBoundary && boundary)
-- 
GitLab


From 1c7f364142057201520da17613acb471e0da8e25 Mon Sep 17 00:00:00 2001
From: Corentin Allaire <corentin.allaire@cern.ch>
Date: Mon, 21 Sep 2020 18:27:53 +0200
Subject: [PATCH 114/403] acts API change Interfaces

---
 .../ActsGeometryInterfaces/IActsExtrapolationTool.h  | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Tracking/Acts/ActsGeometryInterfaces/ActsGeometryInterfaces/IActsExtrapolationTool.h b/Tracking/Acts/ActsGeometryInterfaces/ActsGeometryInterfaces/IActsExtrapolationTool.h
index c012a91e8428..e456f739f97e 100644
--- a/Tracking/Acts/ActsGeometryInterfaces/ActsGeometryInterfaces/IActsExtrapolationTool.h
+++ b/Tracking/Acts/ActsGeometryInterfaces/ActsGeometryInterfaces/IActsExtrapolationTool.h
@@ -34,29 +34,29 @@ class IActsExtrapolationTool : virtual public IAlgTool {
   virtual
   ActsPropagationOutput
   propagationSteps(const EventContext& ctx,
-                   const Acts::BoundParameters& startParameters,
+                   const Acts::BoundTrackParameters& startParameters,
                    Acts::NavigationDirection navDir = Acts::forward,
                    double pathLimit = std::numeric_limits<double>::max()) const = 0;
 
   virtual
-  std::unique_ptr<const Acts::CurvilinearParameters>
+  std::unique_ptr<const Acts::CurvilinearTrackParameters>
   propagate(const EventContext& ctx,
-            const Acts::BoundParameters& startParameters,
+            const Acts::BoundTrackParameters& startParameters,
             Acts::NavigationDirection navDir = Acts::forward,
             double pathLimit = std::numeric_limits<double>::max()) const = 0;
 
   virtual
   ActsPropagationOutput
   propagationSteps(const EventContext& ctx,
-                   const Acts::BoundParameters& startParameters,
+                   const Acts::BoundTrackParameters& startParameters,
                    const Acts::Surface& target,
                    Acts::NavigationDirection navDir = Acts::forward,
                    double pathLimit = std::numeric_limits<double>::max()) const = 0;
 
   virtual
-  std::unique_ptr<const Acts::BoundParameters>
+  std::unique_ptr<const Acts::BoundTrackParameters>
   propagate(const EventContext& ctx,
-            const Acts::BoundParameters& startParameters,
+            const Acts::BoundTrackParameters& startParameters,
             const Acts::Surface& target,
             Acts::NavigationDirection navDir = Acts::forward,
             double pathLimit = std::numeric_limits<double>::max()) const = 0;
-- 
GitLab


From 2ed31bcbe51d3cfcd5442cf42c257941757c354f Mon Sep 17 00:00:00 2001
From: Corentin Allaire <corentin.allaire@cern.ch>
Date: Mon, 21 Sep 2020 18:28:24 +0200
Subject: [PATCH 115/403] acts API change PriVtxFinder

---
 .../src/ActsAdaptiveMultiPriVtxFinderTool.cxx             | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/Tracking/Acts/ActsPriVtxFinder/src/ActsAdaptiveMultiPriVtxFinderTool.cxx b/Tracking/Acts/ActsPriVtxFinder/src/ActsAdaptiveMultiPriVtxFinderTool.cxx
index 5fe3cbb40a7d..22236ae656a6 100755
--- a/Tracking/Acts/ActsPriVtxFinder/src/ActsAdaptiveMultiPriVtxFinderTool.cxx
+++ b/Tracking/Acts/ActsPriVtxFinder/src/ActsAdaptiveMultiPriVtxFinderTool.cxx
@@ -249,14 +249,8 @@ ActsAdaptiveMultiPriVtxFinderTool::findVertex(const EventContext& ctx, std::vect
       , cov(3,0) , cov(3,1) , cov(3,2) , cov(3,3) , cov(3,4) *1./(1_MeV) , 0 
       , cov(4,0) *1./(1_MeV) , cov(4,1) *1./(1_MeV) , cov(4,2) *1./(1_MeV) , cov(4,3) *1./(1_MeV) , cov(4,4) *1./(1_MeV*1_MeV), 0
       , 0. , 0. , 0. , 0., 0., 1.;
-
-      Amg::Vector3D test(0, 0, 0); 
-      std::cout << test.phi() << std::endl;
-      std::cout << bug << std::endl;
-
+      
       allTracks.emplace_back(trk.get(),Acts::BoundTrackParameters(geoContext, covMat, actsParams, perigeeSurface));
-
-      std::cout << test.theta() << std::endl;
     }
 
     std::vector<const TrackWrapper*> allTrackPtrs;
-- 
GitLab


From 43f0d7199d25308a1a438271f1a04414614f7a85 Mon Sep 17 00:00:00 2001
From: Corentin Allaire <corentin.allaire@cern.ch>
Date: Mon, 21 Sep 2020 18:29:56 +0200
Subject: [PATCH 116/403] acts API change PriVtxFinder

---
 .../ActsPriVtxFinder/ActsAdaptiveMultiPriVtxFinderTool.h      | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/Tracking/Acts/ActsPriVtxFinder/ActsPriVtxFinder/ActsAdaptiveMultiPriVtxFinderTool.h b/Tracking/Acts/ActsPriVtxFinder/ActsPriVtxFinder/ActsAdaptiveMultiPriVtxFinderTool.h
index 28d06a00cbd9..ed8eb9f9d52c 100644
--- a/Tracking/Acts/ActsPriVtxFinder/ActsPriVtxFinder/ActsAdaptiveMultiPriVtxFinderTool.h
+++ b/Tracking/Acts/ActsPriVtxFinder/ActsPriVtxFinder/ActsAdaptiveMultiPriVtxFinderTool.h
@@ -5,10 +5,6 @@
 #ifndef ACTSPRIVTXFINDER_ACTSADAPTIVEMULTIPRIVTXFINDERTOOL_H
 #define ACTSPRIVTXFINDER_ACTSADAPTIVEMULTIPRIVTXFINDERTOOL_H
 
-#include "TrkParameters/TrackParameters.h"
-
-#include "Acts/Propagator/Propagator.hpp"
-
 // ATHENA
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/IInterface.h"
-- 
GitLab


From 8879e2aed4ffc2252f73ffd0b719d23bc57e2844 Mon Sep 17 00:00:00 2001
From: Corentin Allaire <corentin.allaire@cern.ch>
Date: Tue, 22 Sep 2020 10:13:39 +0200
Subject: [PATCH 117/403] fix small errors

---
 .../Acts/ActsGeometry/ActsGeometry/ActsExtrapolationTool.h  | 2 +-
 Tracking/Acts/ActsGeometry/scripts/geo_id.py                | 6 +++---
 .../Acts/ActsGeometry/src/ActsCaloTrackingVolumeBuilder.cxx | 2 +-
 Tracking/Acts/ActsGeometry/src/ActsExtrapolationTool.cxx    | 3 +--
 4 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsExtrapolationTool.h b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsExtrapolationTool.h
index a803638f943b..957021ea7785 100644
--- a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsExtrapolationTool.h
+++ b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsExtrapolationTool.h
@@ -73,7 +73,7 @@ public:
                    double pathLimit = std::numeric_limits<double>::max()) const override;
 
   virtual
-  std::unique_ptr<const Acts::CurvilinearParameters>
+  std::unique_ptr<const Acts::CurvilinearTrackParameters>
   propagate(const EventContext& ctx,
             const Acts::BoundTrackParameters& startParameters,
             Acts::NavigationDirection navDir = Acts::forward,
diff --git a/Tracking/Acts/ActsGeometry/scripts/geo_id.py b/Tracking/Acts/ActsGeometry/scripts/geo_id.py
index 10c7f456158f..747bfef936d0 100755
--- a/Tracking/Acts/ActsGeometry/scripts/geo_id.py
+++ b/Tracking/Acts/ActsGeometry/scripts/geo_id.py
@@ -6,7 +6,7 @@ import sys
 
 # file = sys.argv[1]
 
-class GeometryID:
+class GeometryIdentifier:
     volume_mask    = 0xff00000000000000
     boundary_mask  = 0x00ff000000000000
     layer_mask     = 0x0000ff0000000000
@@ -53,7 +53,7 @@ class GeometryID:
         return (self._value & mask) >> self._ffs(mask)
 
     def __repr__(self):
-        fmt = "GeometryID(vol={}, bnd={}, lay={}, app={}, sen={}, chn={})"
+        fmt = "GeometryIdentifier(vol={}, bnd={}, lay={}, app={}, sen={}, chn={})"
         return fmt.format(self.vol_id, 
                           self.bnd_id, 
                           self.lay_id, 
@@ -67,7 +67,7 @@ class GeometryID:
 
 # for idx, event in enumerate(tree):
     # for geo_id_ in event.step_geo_id:
-        # geo_id = GeometryID(geo_id_)
+        # geo_id = GeometryIdentifier(geo_id_)
         # print(geo_id)
 
     # print("----")
diff --git a/Tracking/Acts/ActsGeometry/src/ActsCaloTrackingVolumeBuilder.cxx b/Tracking/Acts/ActsGeometry/src/ActsCaloTrackingVolumeBuilder.cxx
index 6bc36d1a7d05..ee264d238008 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsCaloTrackingVolumeBuilder.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsCaloTrackingVolumeBuilder.cxx
@@ -95,7 +95,7 @@ ActsCaloTrackingVolumeBuilder::trackingVolume(
   }
 
   std::shared_ptr<Acts::TrackingVolume> calo
-      = Acts::TrackingVolume::create(Acts::Transform3D::Identity()),
+      = Acts::TrackingVolume::create(Acts::Transform3D::Identity(),
                                      caloVolBounds,
                                      std::move(boxStore),
                                      std::move(cellVols),
diff --git a/Tracking/Acts/ActsGeometry/src/ActsExtrapolationTool.cxx b/Tracking/Acts/ActsGeometry/src/ActsExtrapolationTool.cxx
index bfe37a2ecbf2..27fc064a397a 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsExtrapolationTool.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsExtrapolationTool.cxx
@@ -154,7 +154,6 @@ ActsExtrapolationTool::propagationSteps(const EventContext& ctx,
       auto& propRes = *result;
 
       auto steppingResults = propRes.template get<SteppingLogger::result_type>();
-      auto debugOutput = propRes.template get<DebugOutput::result_type>();
       auto materialResult = propRes.template get<Acts::MaterialInteractor::result_type>();
       output.first = std::move(steppingResults.steps);
       output.second = std::move(materialResult);
@@ -278,7 +277,7 @@ ActsExtrapolationTool::propagationSteps(const EventContext& ctx,
       auto materialResult = propRes.template get<Acts::MaterialInteractor::result_type>();
       output.first = std::move(steppingResults.steps);
       output.second = std::move(materialResult);
-      return std::move(output));
+      return std::move(output);
     }, *m_varProp);
 
   if (!res.ok()) {
-- 
GitLab


From 1ab9922541fd20f812407edd0d11bb27b4a7bdf7 Mon Sep 17 00:00:00 2001
From: Corentin Allaire <corentin.allaire@cern.ch>
Date: Tue, 22 Sep 2020 14:43:29 +0200
Subject: [PATCH 118/403] better json option

---
 .../ActsGeometry/ActsMaterialJsonWriterTool.h     | 13 +++++++++++--
 .../src/ActsMaterialJsonWriterTool.cxx            | 15 +++++++++++----
 2 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsMaterialJsonWriterTool.h b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsMaterialJsonWriterTool.h
index 6ae582a783f4..7e5b79632d39 100644
--- a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsMaterialJsonWriterTool.h
+++ b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsMaterialJsonWriterTool.h
@@ -44,7 +44,16 @@ public:
 
 private:
 
-  Gaudi::Property<std::string> m_filePath{this, "FilePath", "material-maps.json", "Output json file for the Material Map"};
-
+  Acts::JsonGeometryConverter::Config m_cfg;
+
+  Gaudi::Property<std::string> m_filePath{this, "OutputFile", "material-maps.json", "Output json file for the Material Map"};
+  Gaudi::Property<bool> m_processSensitives{this, "processSensitives", true, "Write sensitive surface to the json file"};
+  Gaudi::Property<bool> m_processApproaches{this, "processApproaches", true, "Write approche surface to the json file"};
+  Gaudi::Property<bool> m_processRepresenting{this, "processRepresenting", true, "Write representing surface to the json file"};
+  Gaudi::Property<bool> m_processBoundaries{this, "processBoundaries", true, "Write boundary surface to the json file"};
+  Gaudi::Property<bool> m_processVolumes{this, "processVolumes", true, "Write volume to the json file"};
+  Gaudi::Property<bool> m_processDenseVolumes{this, "processDenseVolumes", false, "Write dense volume to the json file"};
+  Gaudi::Property<bool> m_processnonmaterial{this, "processnonmaterial", false, "Add proto material to all surfaces and volumes"};
 };
+
 #endif
diff --git a/Tracking/Acts/ActsGeometry/src/ActsMaterialJsonWriterTool.cxx b/Tracking/Acts/ActsGeometry/src/ActsMaterialJsonWriterTool.cxx
index b13694f69ac0..4cd303b36ec1 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsMaterialJsonWriterTool.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsMaterialJsonWriterTool.cxx
@@ -24,15 +24,23 @@ ActsMaterialJsonWriterTool::initialize()
 {
   ATH_MSG_INFO("Starting Material writer");
 
+  m_cfg = Acts::JsonGeometryConverter::Config("JsonGeometryConverter",Acts::Logging::INFO);
+  m_cfg.processSensitives = m_processSensitives;
+  m_cfg.processApproaches = m_processApproaches;
+  m_cfg.processRepresenting = m_processRepresenting;
+  m_cfg.processBoundaries = m_processBoundaries;
+  m_cfg.processVolumes = m_processVolumes;
+  m_cfg.processDenseVolumes = m_processDenseVolumes;
+  m_cfg.processnonmaterial = m_processnonmaterial;
+  
   return StatusCode::SUCCESS;
 }
 
 void
 ActsMaterialJsonWriterTool::write(const Acts::JsonGeometryConverter::DetectorMaterialMaps& detMaterial) const
 {
-  Acts::JsonGeometryConverter::Config cfg;
   // Evoke the converter
-  Acts::JsonGeometryConverter jmConverter(cfg);
+  Acts::JsonGeometryConverter jmConverter(m_cfg);
   auto jout = jmConverter.materialMapsToJson(detMaterial);
   // And write the file
   std::ofstream ofj(m_filePath);
@@ -42,9 +50,8 @@ ActsMaterialJsonWriterTool::write(const Acts::JsonGeometryConverter::DetectorMat
 void
 ActsMaterialJsonWriterTool::write(const Acts::TrackingGeometry& tGeometry) const
 {
-  Acts::JsonGeometryConverter::Config cfg;
   // Evoke the converter
-  Acts::JsonGeometryConverter jmConverter(cfg);
+  Acts::JsonGeometryConverter jmConverter(m_cfg);
   auto jout = jmConverter.trackingGeometryToJson(tGeometry);
   // And write the file
   std::ofstream ofj(m_filePath);
-- 
GitLab


From fd6094efcb2c9f4e30512e2b642896c48e8a428e Mon Sep 17 00:00:00 2001
From: Corentin Allaire <corentin.allaire@cern.ch>
Date: Tue, 22 Sep 2020 14:44:25 +0200
Subject: [PATCH 119/403] material decoration

---
 .../src/ActsTrackingGeometrySvc.cxx           | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/Tracking/Acts/ActsGeometry/src/ActsTrackingGeometrySvc.cxx b/Tracking/Acts/ActsGeometry/src/ActsTrackingGeometrySvc.cxx
index 92590d9feda6..24fafa039bfd 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsTrackingGeometrySvc.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsTrackingGeometrySvc.cxx
@@ -23,6 +23,9 @@
 #include "Acts/Geometry/TrackingGeometryBuilder.hpp"
 #include "Acts/Geometry/CylinderVolumeBuilder.hpp"
 #include "Acts/Geometry/CylinderVolumeBounds.hpp"
+#include <Acts/Plugins/Json/JsonGeometryConverter.hpp>
+#include <Acts/Plugins/Json/JsonMaterialDecorator.hpp>
+#include "Acts/Utilities/Logger.hpp"
 #include "Acts/ActsVersion.hpp"
 
 // PACKAGE
@@ -87,6 +90,20 @@ ActsTrackingGeometrySvc::initialize()
 
   Acts::TrackingGeometryBuilder::Config tgbConfig;
   tgbConfig.trackingVolumeHelper   = cylinderVolumeHelper;
+
+  if(m_useMaterialMap){
+    std::shared_ptr<const Acts::IMaterialDecorator> matDeco = nullptr;
+    std::string matFile = m_materialMapInputFile;
+    if (matFile.find(".json") != std::string::npos) {
+      // Set up the converter first
+      Acts::JsonGeometryConverter::Config jsonGeoConvConfig("JsonGeometryConverter", Acts::Logging::INFO);
+      // Set up the json-based decorator
+      matDeco = std::make_shared<const Acts::JsonMaterialDecorator>(
+          jsonGeoConvConfig, m_materialMapInputFile, true, true);
+    }
+    tgbConfig.materialDecorator = matDeco;
+  }  
+
   try {
     // PIXEL
     if(buildSubdet.count("Pixel") > 0) {
@@ -416,6 +433,9 @@ ActsTrackingGeometrySvc::makeSCTTRTAssembly(const Acts::GeometryContext& gctx,
   trtPosEC.zMin = trtBrl.zMax;
   sctPosEC.zMin = trtBrl.zMax;
 
+  // extend TRT endcaps in R so they touch SCT barel
+  trtBrl.rMin = sctBrl.rMax;
+
   // extend TRT endcaps in R so they touch SCT endcaps
   trtNegEC.rMin = sctNegEC.rMax;
   trtPosEC.rMin = sctPosEC.rMax;
-- 
GitLab


From b5663465c1183f6ed68eae5f6931f99136028d2c Mon Sep 17 00:00:00 2001
From: Corentin Allaire <corentin.allaire@cern.ch>
Date: Tue, 22 Sep 2020 14:46:33 +0200
Subject: [PATCH 120/403] new job option

---
 .../ActsGeometry/python/ActsGeometryConfig.py |  83 ++++++-
 .../share/ActsExtrapolationAlg.py             |   2 +-
 .../share/ActsMaterialMapping_jobOptions.py   | 213 +++++++---------
 .../share/ActsMaterialValidationAlg.py        | 233 +++++++-----------
 .../share/ActsWriteTrackingGeometry.py        | 205 +++++++--------
 .../share/GeantinoMapping_jobOptions.py       |  21 +-
 6 files changed, 356 insertions(+), 401 deletions(-)

diff --git a/Tracking/Acts/ActsGeometry/python/ActsGeometryConfig.py b/Tracking/Acts/ActsGeometry/python/ActsGeometryConfig.py
index d22b648a9354..5a6871605651 100644
--- a/Tracking/Acts/ActsGeometry/python/ActsGeometryConfig.py
+++ b/Tracking/Acts/ActsGeometry/python/ActsGeometryConfig.py
@@ -35,12 +35,14 @@ def ActsTrackingGeometrySvcCfg(configFlags, name = "ActsTrackingGeometrySvc" ) :
       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)
 
-    
-  actsTrackingGeometrySvc = Acts_ActsTrackingGeometrySvc(name, BuildSubDetectors = subDetectors)
-
-  from AthenaCommon.Constants import VERBOSE
-  actsTrackingGeometrySvc.OutputLevel = VERBOSE
+  if configFlags.TrackingGeometry.MaterialSource == "Input":
+    actsTrackingGeometrySvc.UseMaterialMap = True
+    actsTrackingGeometrySvc.MaterialMapInputFile = "material-maps.json"
+  if configFlags.TrackingGeometry.MaterialSource.find(".json") != -1:  
+    actsTrackingGeometrySvc.UseMaterialMap = True
+    actsTrackingGeometrySvc.MaterialMapInputFile = configFlags.TrackingGeometry.MaterialSource
   result.addService(actsTrackingGeometrySvc)
   return result
 
@@ -96,7 +98,7 @@ def ActsAlignmentCondAlgCfg(configFlags, name = "ActsAlignmentCondAlg", **kwargs
   return result
 
 from MagFieldServices.MagFieldServicesConfig import MagneticFieldSvcCfg
-def ActsExtrapolationToolCfg(configFlags, name = "ActsExtrapolationTool" ) :
+def ActsExtrapolationToolCfg(configFlags, name="ActsExtrapolationTool", **kwargs) :
   result=ComponentAccumulator()
   
   acc  = MagneticFieldSvcCfg(configFlags)
@@ -106,6 +108,73 @@ def ActsExtrapolationToolCfg(configFlags, name = "ActsExtrapolationTool" ) :
   result.merge(acc)
   
   Acts_ActsExtrapolationTool = CompFactory.ActsExtrapolationTool
-  actsExtrapolationTool = Acts_ActsExtrapolationTool(name)
+  actsExtrapolationTool = Acts_ActsExtrapolationTool(name, **kwargs)
   result.addPublicTool(actsExtrapolationTool, primary=True)
   return result
+
+
+def ActsMaterialTrackWriterSvcCfg(name="ActsMaterialTrackWriterSvc",
+                                  FilePath="MaterialTracks_mapping.root",
+                                  TreeName="material-tracks") :
+  result = ComponentAccumulator()
+
+  Acts_ActsMaterialTrackWriterSvc = CompFactory.ActsMaterialTrackWriterSvc
+  ActsMaterialTrackWriterSvc = Acts_ActsMaterialTrackWriterSvc(name, 
+                                                               FilePath=FilePath,
+                                                               TreeName=TreeName)
+
+  from AthenaCommon.Constants import INFO
+  ActsMaterialTrackWriterSvc.OutputLevel = INFO
+  result.addService(ActsMaterialTrackWriterSvc, primary=True)
+  return result
+
+def ActsMaterialStepConverterToolCfg(name = "ActsMaterialStepConverterTool" ) :
+  result=ComponentAccumulator()
+  
+  Acts_ActsMaterialStepConverterTool = CompFactory.ActsMaterialStepConverterTool
+  ActsMaterialStepConverterTool = Acts_ActsMaterialStepConverterTool(name)
+
+  from AthenaCommon.Constants import INFO
+  ActsMaterialStepConverterTool.OutputLevel = INFO
+
+  result.addPublicTool(ActsMaterialStepConverterTool, primary=True)
+  return result
+
+def ActsSurfaceMappingToolCfg(configFlags, name = "ActsSurfaceMappingTool" ) :
+  result=ComponentAccumulator()
+    
+  acc, actsTrackingGeometryTool = ActsTrackingGeometryToolCfg(configFlags) 
+  result.merge(acc)
+
+  Acts_ActsSurfaceMappingTool = CompFactory.ActsSurfaceMappingTool
+  ActsSurfaceMappingTool = Acts_ActsSurfaceMappingTool(name)
+
+  from AthenaCommon.Constants import INFO
+  ActsSurfaceMappingTool.OutputLevel = INFO
+
+  result.addPublicTool(ActsSurfaceMappingTool, primary=True)
+  return result
+
+def ActsMaterialJsonWriterToolCfg(name= "ActsMaterialJsonWriterTool", **kwargs) :
+  result=ComponentAccumulator()
+    
+  Acts_ActsMaterialJsonWriterTool = CompFactory.ActsMaterialJsonWriterTool
+  ActsMaterialJsonWriterTool = Acts_ActsMaterialJsonWriterTool(name, **kwargs)
+
+  from AthenaCommon.Constants import INFO
+  ActsMaterialJsonWriterTool.OutputLevel = INFO
+
+  result.addPublicTool(ActsMaterialJsonWriterTool, primary=True)
+  return result
+
+def ActsObjWriterToolCfg(name= "ActsObjWriterTool", **kwargs) :
+  result=ComponentAccumulator()
+    
+  Acts_ActsObjWriterTool = CompFactory.ActsObjWriterTool
+  ActsObjWriterTool = Acts_ActsObjWriterTool(name, **kwargs)
+
+  from AthenaCommon.Constants import INFO
+  ActsObjWriterTool.OutputLevel = INFO
+
+  result.addPublicTool(ActsObjWriterTool, primary=True)
+  return result
diff --git a/Tracking/Acts/ActsGeometry/share/ActsExtrapolationAlg.py b/Tracking/Acts/ActsGeometry/share/ActsExtrapolationAlg.py
index e2907f4e0508..7f305015feb7 100644
--- a/Tracking/Acts/ActsGeometry/share/ActsExtrapolationAlg.py
+++ b/Tracking/Acts/ActsGeometry/share/ActsExtrapolationAlg.py
@@ -51,7 +51,7 @@ if "__main__" == __name__:
   ConfigFlags.Detector.GeometryCalo  = True
   ConfigFlags.Detector.GeometryMuon  = False
   ConfigFlags.Detector.GeometryTRT   = True
-  ConfigFlags.TrackingGeometry.MaterialSource = "Input"
+  ConfigFlags.TrackingGeometry.MaterialSource = "None"
 
   ConfigFlags.Concurrency.NumThreads = 10
   ConfigFlags.Concurrency.NumConcurrentEvents = 10
diff --git a/Tracking/Acts/ActsGeometry/share/ActsMaterialMapping_jobOptions.py b/Tracking/Acts/ActsGeometry/share/ActsMaterialMapping_jobOptions.py
index b20518e8aa9d..e1456fc3ca2b 100644
--- a/Tracking/Acts/ActsGeometry/share/ActsMaterialMapping_jobOptions.py
+++ b/Tracking/Acts/ActsGeometry/share/ActsMaterialMapping_jobOptions.py
@@ -1,139 +1,100 @@
 ###############################################################
 #
-# Loads Detector Description for Pixel and SCT
-# and prints out various quanities for each detector element.
+# Map material from a Geantino scan onto the surfaces and 
+# volumes of the detector to creat a material map.
 #
 ###############################################################
 
 
-# Use Global flags and DetFlags.
-from AthenaCommon.DetFlags import DetFlags
-from AthenaCommon.GlobalFlags import globalflags
+##########################################################################
+# start from scratch with component accumulator
 
-from AthenaCommon.ConcurrencyFlags import jobproperties as jp
-nThreads = jp.ConcurrencyFlags.NumThreads()
-ServiceMgr.MessageSvc.defaultLimit = 20000
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.ComponentFactory import CompFactory
 
-# Just the pixel and SCT
-DetFlags.ID_setOn()
-DetFlags.detdescr.pixel_setOn()
-DetFlags.detdescr.SCT_setOn()
-DetFlags.Calo_setOff()
+from ActsGeometry.ActsGeometryConfig import ActsMaterialStepConverterToolCfg
+from ActsGeometry.ActsGeometryConfig import ActsSurfaceMappingToolCfg
+from ActsGeometry.ActsGeometryConfig import ActsMaterialJsonWriterToolCfg
 
-# MC or data - affects which conditions database instance is used
-globalflags.DataSource='geant4'
-#globalflags.DataSource='data'
+from ActsGeometry.ActsGeometryConfig import ActsAlignmentCondAlgCfg
 
-# Select the geometry version.
-globalflags.DetDescrVersion = 'ATLAS-R2-2016-00-00-00'
+def ActsMaterialMappingCfg(configFlags, name = "ActsMaterialMapping", **kwargs):
+  result = ComponentAccumulator()
 
-# print "HERE"
-# print globalflags.DetDescrVersion
+  MaterialStepConverterTool = ActsMaterialStepConverterToolCfg()
+  kwargs["MaterialStepConverterTool"] = MaterialStepConverterTool.getPrimary()   
+  result.merge(MaterialStepConverterTool)
 
-# LorentzAngle Svc needs field now
-import MagFieldServices.SetupField
+  ActsSurfaceMappingTool = ActsSurfaceMappingToolCfg(configFlags)
+  kwargs["SurfaceMappingTool"] = ActsSurfaceMappingTool.getPrimary()   
+  result.merge(ActsSurfaceMappingTool)
 
-# Initialize geometry
-# THIS ACTUALLY DOES STUFF!!
-from AtlasGeoModel import GeoModelInit
-from AtlasGeoModel import SetGeometryVersion
-
-# For misalignments
-from IOVDbSvc.CondDB import conddb
-conddb.setGlobalTag('OFLCOND-SIM-00-00-00')
-# conddb.addOverride("/Indet/Align", "InDetAlign_R2_Nominal")
-
-from AthenaCommon.AppMgr import ServiceMgr
-
-# Read material step file
-import AthenaPoolCnvSvc.ReadAthenaPool
-ServiceMgr.EventSelector.InputCollections =  ["MaterialStepFile.root"]
-
-
-from AthenaCommon.AlgScheduler import AlgScheduler
-AlgScheduler.OutputLevel( INFO )
-AlgScheduler.ShowControlFlow( True )
-AlgScheduler.ShowDataDependencies( True )
-AlgScheduler.EnableConditions( True )
-# AlgScheduler.setDataLoaderAlg( "SGInputLoader" )
-
-
-from IOVSvc.IOVSvcConf import CondSvc
-svcMgr += CondSvc( OutputLevel=INFO )
-
-# ServiceMgr += CfgMgr.THistSvc()
-# ServiceMgr.THistSvc.Output += ["MATTRACKVAL DATAFILE='MaterialTracks.root' OPT='RECREATE'"]
-# ServiceMgr.ToolSvc.OutputLevel = VERBOSE
-
-
-# Set up ACTS tracking geometry service
-from ActsGeometry.ActsGeometryConf import ActsTrackingGeometrySvc
-trkGeomSvc = ActsTrackingGeometrySvc()
-trkGeomSvc.OutputLevel = INFO
-trkGeomSvc.BarrelMaterialBins = [40, 60] # phi z
-trkGeomSvc.EndcapMaterialBins = [50, 20] # phi r
-trkGeomSvc.BuildSubDetectors = [
-  "Pixel",
-  "SCT",
-  # "TRT",
-  # "Calo",
-]
-ServiceMgr += trkGeomSvc
-
-trkGeomTool = CfgMgr.ActsTrackingGeometryTool("ActsTrackingGeometryTool")
-trkGeomTool.OutputLevel = INFO;
-
-# Set up ACTS extrapolation cell writer service
-# exCellWriterSvc = CfgMgr.ActsExCellWriterSvc("ActsExCellWriterSvc")
-# exCellWriterSvc.FilePath = "excells_charged_mapping.root"
-# ServiceMgr += exCellWriterSvc
-mTrackWriterSvc = CfgMgr.ActsMaterialTrackWriterSvc("ActsMaterialTrackWriterSvc")
-mTrackWriterSvc.OutputLevel = INFO
-mTrackWriterSvc.FilePath = "MaterialTracks_mapping.root"
-# mTrackWriterSvc.MaxQueueSize = 10
-ServiceMgr += mTrackWriterSvc
-
-mMaterialStepConverterTool = CfgMgr.ActsMaterialStepConverterTool("ActsMaterialStepConverterTool")
-mMaterialStepConverterTool.OutputLevel = INFO
-
-mActsSurfaceMappingTool = CfgMgr.ActsSurfaceMappingTool("ActsSurfaceMappingTool")
-mActsSurfaceMappingTool.OutputLevel = INFO
-mActsSurfaceMappingTool.TrackingGeometryTool = trkGeomTool
-
-mActsMaterialJsonWriterTool = CfgMgr.ActsMaterialJsonWriterTool("ActsMaterialJsonWriterTool")
-mActsMaterialJsonWriterTool.OutputLevel = VERBOSE
-mActsMaterialJsonWriterTool.FilePath = "material-maps.json"
-
-from ActsGeometry import ActsGeometryConf
-
-## SET UP ALIGNMENT CONDITIONS ALGORITHM
-from AthenaCommon.AlgSequence import AthSequencer
-condSeq = AthSequencer("AthCondSeq")
-condSeq += ActsGeometryConf.NominalAlignmentCondAlg("NominalAlignmentCondAlg",
-                                                 OutputLevel=INFO)
-## END OF CONDITIONS SETUP
-
-# Set up algorithm sequence
-from AthenaCommon.AlgSequence import AlgSequence
-job = AlgSequence()
-
-eventPrintFrequency = 1000
-
-if hasattr(ServiceMgr,"AthenaEventLoopMgr"):
-    ServiceMgr.AthenaEventLoopMgr.EventPrintoutInterval = eventPrintFrequency
-if hasattr(ServiceMgr,"AthenaHiveEventLoopMgr"):
-    ServiceMgr.AthenaHiveEventLoopMgr.EventPrintoutInterval = eventPrintFrequency
-
-from GaudiAlg.GaudiAlgConf import EventCounter
-job += EventCounter(Frequency=1000)
-
-# Set up material mapping algorithm
-from ActsGeometry.ActsGeometryConf import ActsMaterialMapping
-
-alg = ActsMaterialMapping()
-alg.Cardinality = 0#nThreads
-alg.MaterialStepConverterTool = mMaterialStepConverterTool
-alg.SurfaceMappingTool = mActsSurfaceMappingTool
-alg.MaterialJsonWriterTool = mActsMaterialJsonWriterTool
-alg.OutputLevel = INFO
-job += alg
+  ActsMaterialJsonWriterTool = ActsMaterialJsonWriterToolCfg(OutputFile = "material-maps.json",
+                                                            processSensitives = False,
+                                                            processnonmaterial = False)
+  kwargs["MaterialJsonWriterTool"] = ActsMaterialJsonWriterTool.getPrimary()   
+  result.merge(ActsMaterialJsonWriterTool)
+
+  ActsMaterialMapping = CompFactory.ActsMaterialMapping
+  alg = ActsMaterialMapping(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, INFO
+  from AthenaConfiguration.AllConfigFlags import ConfigFlags
+  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
+  from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
+  from ActsGeometry.ActsGeometryConfig import ActsMaterialTrackWriterSvcCfg
+  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 = False
+  ConfigFlags.Detector.SimulateID    = False
+  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 = "geometry-maps.json"
+  ConfigFlags.Concurrency.NumThreads = 1
+  ConfigFlags.Concurrency.NumConcurrentEvents = 1
+
+  ConfigFlags.lock()
+  ConfigFlags.dump()
+
+  cfg = MainServicesCfg(ConfigFlags)
+
+  cfg.merge(ActsMaterialTrackWriterSvcCfg("ActsMaterialTrackWriterSvc",
+                                          "MaterialTracks_mapping.root"))
+
+  cfg.merge(PoolReadCfg(ConfigFlags))
+  eventSelector = cfg.getService("EventSelector")
+  eventSelector.InputCollections = ["MaterialStepFile.root"]
+
+  from BeamPipeGeoModel.BeamPipeGMConfig import BeamPipeGeometryCfg
+  cfg.merge(BeamPipeGeometryCfg(ConfigFlags))
+
+  alignCondAlgCfg = ActsAlignmentCondAlgCfg(ConfigFlags)
+
+  cfg.merge(alignCondAlgCfg)
+
+  alg = ActsMaterialMappingCfg(ConfigFlags,
+                               OutputLevel=INFO)
+
+  cfg.merge(alg)
+
+  cfg.printConfig()
+
+  log.info("CONFIG DONE")
+
+  cfg.run(80000)
diff --git a/Tracking/Acts/ActsGeometry/share/ActsMaterialValidationAlg.py b/Tracking/Acts/ActsGeometry/share/ActsMaterialValidationAlg.py
index cdaed670692e..beffb05e101d 100644
--- a/Tracking/Acts/ActsGeometry/share/ActsMaterialValidationAlg.py
+++ b/Tracking/Acts/ActsGeometry/share/ActsMaterialValidationAlg.py
@@ -1,148 +1,93 @@
 """
 This job options file will run an example extrapolation using the
-Acts tracking geometry, the material map and the Acts extrapolation toolchain.
+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 = 'MaterialMapValidation', 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=INFO)
-# 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.ActsGeometryConf 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 = INFO
-trkGeomSvc.BuildSubDetectors = [
-  "Pixel",
-  "SCT",
-  # "TRT",
-  # "Calo",
-]
-trkGeomSvc.UseMaterialMap = True
-trkGeomSvc.MaterialMapInputFile = "material-maps.json"
-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 = [-2.4, 2.4]
-alg.OutputLevel = INFO
-alg.NParticlesPerEvent = int(1e4)
-
-
-# Record the material track for material map validation
-alg.WriteMaterialTracks = True
-# 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 = INFO
-  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"
-exTool.InteractionMultiScatering = True
-exTool.InteractionEloss = True
-exTool.InteractionRecord = True
-# 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 = 10000
+# 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
+
+def ActsExtrapolationAlgCfg(configFlags, name = "ActsExtrapolationAlg", **kwargs):
+  result = ComponentAccumulator()
+
+  if "ExtrapolationTool" not in kwargs:
+    extrapTool = ActsExtrapolationToolCfg(configFlags)
+    kwargs["ExtrapolationTool"] = extrapTool.getPrimary()
+    result.merge(extrapTool)
+
+  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, INFO
+  from AthenaConfiguration.AllConfigFlags import ConfigFlags
+  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
+  from ActsGeometry.ActsGeometryConfig import ActsMaterialTrackWriterSvcCfg
+  from ActsGeometry.ActsGeometryConfig import ActsExtrapolationToolCfg
+
+  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 = "material-maps.json"
+
+  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)
+
+  cfg.merge(ActsMaterialTrackWriterSvcCfg("ActsMaterialTrackWriterSvc",
+                                          "MaterialTracks_mapped.root"))
+  print('DEF WRITER : ')
+  extrapol = ActsExtrapolationToolCfg(ConfigFlags,
+                                      InteractionMultiScatering = True,
+                                      InteractionEloss = True,
+                                      InteractionRecord = True)
+  cfg.merge(extrapol)
+  
+  alg = ActsExtrapolationAlgCfg(ConfigFlags,
+                                OutputLevel=INFO,
+                                NParticlesPerEvent=int(1e4),
+                                EtaRange=[-2.5, 2.5],
+                                PtRange=[20, 100],
+                                WriteMaterialTracks = True,
+                                ExtrapolationTool=extrapol.getPrimary())
+
+  cfg.merge(alg)
+
+  cfg.printConfig()
+
+  log.info("CONFIG DONE")
+
+  cfg.run(100)
diff --git a/Tracking/Acts/ActsGeometry/share/ActsWriteTrackingGeometry.py b/Tracking/Acts/ActsGeometry/share/ActsWriteTrackingGeometry.py
index 6bdf79f04d72..847d14f72d2a 100644
--- a/Tracking/Acts/ActsGeometry/share/ActsWriteTrackingGeometry.py
+++ b/Tracking/Acts/ActsGeometry/share/ActsWriteTrackingGeometry.py
@@ -1,118 +1,91 @@
-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()
-
-from AtlasGeoModel import GeoModelInit
-from AtlasGeoModel import SetGeometryVersion
-from SubDetectorEnvelopes.SubDetectorEnvelopesConfig import getEnvelopeDefSvc
-svcMgr += getEnvelopeDefSvc()
-
-
-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")
-
-condSeq += ActsGeometryConf.ActsAlignmentCondAlg("ActsAlignCondAlg",
-                                                 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 = INFO
-trkGeomSvc.BuildSubDetectors = [
-  "Pixel",
-  "SCT",
-  # "TRT",
-  # "Calo",
-]
-ServiceMgr += trkGeomSvc
-
-import MagFieldServices.SetupField
-
-from AthenaCommon.AlgSequence import AlgSequence
-job = AlgSequence()
-
-trkGeomTool = CfgMgr.ActsTrackingGeometryTool("ActsTrackingGeometryTool")
-trkGeomTool.OutputLevel = INFO;
-
-# from ActsGeometry.ActsGeometryConf import ActsWriteTrackingGeometryTransforms
-# alg = ActsWriteTrackingGeometryTransforms(OutputLevel = VERBOSE)
-# alg.TrackingGeometryTool = trkGeomTool
-# job += alg
-
-mActsMaterialJsonWriterTool = CfgMgr.ActsMaterialJsonWriterTool("ActsMaterialJsonWriterTool")
-mActsMaterialJsonWriterTool.OutputLevel = VERBOSE
-mActsMaterialJsonWriterTool.FilePath = "geometry-maps.json"
-
-from ActsGeometry.ActsGeometryConf import ActsWriteTrackingGeometry
-alg = ActsWriteTrackingGeometry(OutputLevel = VERBOSE)
-alg.TrackingGeometryTool = trkGeomTool
-alg.ObjWriterTool.OutputDirectory = "obj"
-alg.ObjWriterTool.SubDetectors = ["Pixel", "SCT"]
-alg.MaterialJsonWriterTool = mActsMaterialJsonWriterTool
-
-job += alg
-
-
-# Make the event heardbeat output a bit nicer
-eventPrintFrequency = 100
-if hasattr(ServiceMgr,"AthenaEventLoopMgr"):
-    ServiceMgr.AthenaEventLoopMgr.EventPrintoutInterval = eventPrintFrequency
-if hasattr(ServiceMgr,"AthenaHiveEventLoopMgr"):
-    ServiceMgr.AthenaHiveEventLoopMgr.EventPrintoutInterval = eventPrintFrequency
+###############################################################
+#
+# Write the tracking geometry as a obj and json files.
+#
+###############################################################
 
+##########################################################################
+# start from scratch with component accumulator
 
-theApp.EvtMax = 1
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.ComponentFactory import CompFactory
+
+from ActsGeometry.ActsGeometryConfig import ActsAlignmentCondAlgCfg
+from ActsGeometry.ActsGeometryConfig import ActsTrackingGeometryToolCfg
+from ActsGeometry.ActsGeometryConfig import ActsMaterialJsonWriterToolCfg
+from ActsGeometry.ActsGeometryConfig import ActsObjWriterToolCfg
+
+def ActsWriteTrackingGeometryCfg(configFlags, name="ActsWriteTrackingGeometry", **kwargs):
+
+  result = ComponentAccumulator()
+
+  acc, actsTrackingGeometryTool = ActsTrackingGeometryToolCfg(configFlags) 
+  result.merge(acc)
+  ActsMaterialJsonWriterTool = ActsMaterialJsonWriterToolCfg(OutputFile = "geometry-maps.json",
+                                                             processSensitives = False,
+                                                             processnonmaterial = True)
+
+  kwargs["MaterialJsonWriterTool"] = ActsMaterialJsonWriterTool.getPrimary()                                                           
+  result.merge(ActsMaterialJsonWriterTool)
+
+  ActsObjWriterTool = ActsObjWriterToolCfg(OutputDirectory = "obj",
+                                           SubDetectors = ["Pixel", "SCT", "TRT"])
+ 
+  kwargs["ObjWriterTool"] = ActsObjWriterTool.getPrimary()     
+  result.merge(ActsObjWriterTool)
+
+  ActsWriteTrackingGeometry = CompFactory.ActsWriteTrackingGeometry
+  alg = ActsWriteTrackingGeometry(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, INFO
+  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 = False
+  ConfigFlags.Detector.SimulateID    = False
+  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.Concurrency.NumThreads = 1
+  ConfigFlags.Concurrency.NumConcurrentEvents = 1
+
+  ConfigFlags.lock()
+  ConfigFlags.dump()
+
+  cfg = MainServicesCfg(ConfigFlags)
+
+  from BeamPipeGeoModel.BeamPipeGMConfig import BeamPipeGeometryCfg
+  cfg.merge(BeamPipeGeometryCfg(ConfigFlags))
+
+  alignCondAlgCfg = ActsAlignmentCondAlgCfg(ConfigFlags)
+
+  cfg.merge(alignCondAlgCfg)
+
+  alg = ActsWriteTrackingGeometryCfg(ConfigFlags,
+                                     OutputLevel=VERBOSE)
+
+  cfg.merge(alg)
+
+  cfg.printConfig()
+
+  log.info("CONFIG DONE")
+
+  cfg.run(1)
\ No newline at end of file
diff --git a/Tracking/Acts/ActsGeometry/share/GeantinoMapping_jobOptions.py b/Tracking/Acts/ActsGeometry/share/GeantinoMapping_jobOptions.py
index 6da34c04734a..231efe63091a 100644
--- a/Tracking/Acts/ActsGeometry/share/GeantinoMapping_jobOptions.py
+++ b/Tracking/Acts/ActsGeometry/share/GeantinoMapping_jobOptions.py
@@ -1,6 +1,7 @@
 #
 # This is based on Tracking/TrkG4Components/TrkG4UserActions/share/GeantinoMapping_jobOptions.py
 # Copied 11/04/2018
+# Updated 22/09/2020
 #
 
 
@@ -17,7 +18,8 @@ from AthenaCommon.AlgSequence import AlgSequence
 topSeq = AlgSequence()
 
 #--- Output threshold (DEBUG, INFO, WARNING, ERROR, FATAL) ----
-#from AthenaCommon.AppMgr import ServiceMgr
+from AthenaCommon.AppMgr import ServiceMgr
+from AthenaCommon.Constants import VERBOSE, INFO
 ServiceMgr.MessageSvc.OutputLevel  = INFO
 ServiceMgr.MessageSvc.defaultLimit = 20000
 
@@ -50,37 +52,39 @@ if 'myPt' not in dir() :
 if 'myGeo' not in dir() :
     myGeo = 'ATLAS-R2-2016-00-00-00'
 
-print 'Random seeds and offset as calcluated by jobOptions ', myRandomSeed1, ' ', myRandomSeed2, ' offset - ', myRandomOffset
+print('Random seeds and offset as calcluated by jobOptions ', myRandomSeed1, ' ', myRandomSeed2, ' offset - ', myRandomOffset)
 
 
 # Set everything to ATLAS
 DetFlags.ID_setOn()
-DetFlags.Calo_setOff()
+DetFlags.Calo_setOn()
 DetFlags.Muon_setOff()
 # the global flags
 globalflags.ConditionsTag = 'OFLCOND-SIM-00-00-00'
-print globalflags.ConditionsTag
+print(globalflags.ConditionsTag)
 
 
 #--- AthenaCommon flags ---------------------------------------
 from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
 athenaCommonFlags.PoolEvgenInput.set_Off()   ### is this necessary?
 athenaCommonFlags.PoolHitsOutput = 'Hits.pool.root'
-athenaCommonFlags.EvtMax = 1000000
+athenaCommonFlags.EvtMax = 100000
 
 #--- Simulation flags -----------------------------------------
 from G4AtlasApps.SimFlags import simFlags
 simFlags.load_atlas_flags() # Going to use an ATLAS layout
 simFlags.SimLayout = myGeo
+simFlags.RunNumber = 284500 # MC16a run number used for all Run2 simulation
 simFlags.EventFilter.set_Off()
 
+
 myMinEta = -2.5
 myMaxEta =  2.5
 
 myPDG    = 999   # 999 = Geantinos, 13 = Muons
 
 include("GeneratorUtils/StdEvgenSetup.py")
-theApp.EvtMax = 20000
+theApp.EvtMax = 100000
 
 import ParticleGun as PG
 pg = PG.ParticleGun()
@@ -137,7 +141,10 @@ include("G4AtlasApps/G4Atlas.flat.configuration.py")
 from AthenaCommon.CfgGetter import getAlgorithm
 topSeq += getAlgorithm("BeamEffectsAlg", tryDefaultConfigurable=True)
 
-## Populate alg sequence
+from AthenaCommon.CfgGetter import getPublicTool
+topSeq.BeamEffectsAlg.GenEventManipulators = [getPublicTool("GenEventValidityChecker")]
+
+# Populate alg sequence
 topSeq += getAlgorithm("G4AtlasAlg",tryDefaultConfigurable=True)
 
 # Conditions sequence for Athena MT
-- 
GitLab


From 41caa80dece396cf6ab13d835f529eb4690a8bb6 Mon Sep 17 00:00:00 2001
From: Corentin Allaire <corentin.allaire@cern.ch>
Date: Tue, 22 Sep 2020 15:24:35 +0200
Subject: [PATCH 121/403] use athena log level

---
 .../Acts/ActsGeometry/src/ActsMaterialJsonWriterTool.cxx    | 6 +++++-
 Tracking/Acts/ActsGeometry/src/ActsSurfaceMappingTool.cxx   | 2 +-
 Tracking/Acts/ActsGeometry/src/ActsTrackingGeometrySvc.cxx  | 4 +++-
 Tracking/Acts/ActsGeometry/src/ActsVolumeMappingTool.cxx    | 2 +-
 4 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/Tracking/Acts/ActsGeometry/src/ActsMaterialJsonWriterTool.cxx b/Tracking/Acts/ActsGeometry/src/ActsMaterialJsonWriterTool.cxx
index 4cd303b36ec1..665eaa8bc422 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsMaterialJsonWriterTool.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsMaterialJsonWriterTool.cxx
@@ -4,6 +4,8 @@
 
 #include "ActsGeometry/ActsMaterialJsonWriterTool.h"
 
+#include "ActsInterop/Logger.h"
+
 #include <fstream>
 #include <ios>
 #include <iostream>
@@ -24,7 +26,8 @@ ActsMaterialJsonWriterTool::initialize()
 {
   ATH_MSG_INFO("Starting Material writer");
 
-  m_cfg = Acts::JsonGeometryConverter::Config("JsonGeometryConverter",Acts::Logging::INFO);
+  m_cfg.name = "JsonGeometryConverter";
+  m_cfg.logger = makeActsAthenaLogger(this, "JsonGeometryConverter");
   m_cfg.processSensitives = m_processSensitives;
   m_cfg.processApproaches = m_processApproaches;
   m_cfg.processRepresenting = m_processRepresenting;
@@ -50,6 +53,7 @@ ActsMaterialJsonWriterTool::write(const Acts::JsonGeometryConverter::DetectorMat
 void
 ActsMaterialJsonWriterTool::write(const Acts::TrackingGeometry& tGeometry) const
 {
+
   // Evoke the converter
   Acts::JsonGeometryConverter jmConverter(m_cfg);
   auto jout = jmConverter.trackingGeometryToJson(tGeometry);
diff --git a/Tracking/Acts/ActsGeometry/src/ActsSurfaceMappingTool.cxx b/Tracking/Acts/ActsGeometry/src/ActsSurfaceMappingTool.cxx
index 68fff9b388df..5a5c4cdb0ea2 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsSurfaceMappingTool.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsSurfaceMappingTool.cxx
@@ -49,7 +49,7 @@ ActsSurfaceMappingTool::initialize()
   m_mapper = std::make_shared<Acts::SurfaceMaterialMapper>(
       smmConfig,
       std::move(propagator),
-      Acts::getDefaultLogger("SurfaceMaterialMapper", Acts::Logging::INFO));
+      makeActsAthenaLogger(this, "SurfaceMaterialMapper"));
 
   m_geoContext = m_trackingGeometryTool->getNominalGeometryContext().any();
 
diff --git a/Tracking/Acts/ActsGeometry/src/ActsTrackingGeometrySvc.cxx b/Tracking/Acts/ActsGeometry/src/ActsTrackingGeometrySvc.cxx
index 24fafa039bfd..62212ec7760d 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsTrackingGeometrySvc.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsTrackingGeometrySvc.cxx
@@ -96,7 +96,9 @@ ActsTrackingGeometrySvc::initialize()
     std::string matFile = m_materialMapInputFile;
     if (matFile.find(".json") != std::string::npos) {
       // Set up the converter first
-      Acts::JsonGeometryConverter::Config jsonGeoConvConfig("JsonGeometryConverter", Acts::Logging::INFO);
+      Acts::JsonGeometryConverter::Config jsonGeoConvConfig;
+      jsonGeoConvConfig.name = "JsonGeometryConverter";
+      jsonGeoConvConfig.logger = makeActsAthenaLogger(this, "JsonGeometryConverter");
       // Set up the json-based decorator
       matDeco = std::make_shared<const Acts::JsonMaterialDecorator>(
           jsonGeoConvConfig, m_materialMapInputFile, true, true);
diff --git a/Tracking/Acts/ActsGeometry/src/ActsVolumeMappingTool.cxx b/Tracking/Acts/ActsGeometry/src/ActsVolumeMappingTool.cxx
index e2b8beb892c7..5434b0abbcf7 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsVolumeMappingTool.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsVolumeMappingTool.cxx
@@ -50,7 +50,7 @@ ActsVolumeMappingTool::initialize()
   m_mapper = std::make_shared<Acts::VolumeMaterialMapper>(
       smmConfig,
       std::move(propagator),
-      Acts::getDefaultLogger("VolumeMaterialMapper", Acts::Logging::INFO));
+      makeActsAthenaLogger(this, "VolumeMaterialMapper"));
 
   m_geoContext = m_trackingGeometryTool->getNominalGeometryContext().any();
 
-- 
GitLab


From 69b6814d2ef3a6a2f9a34351086e13e452d53337 Mon Sep 17 00:00:00 2001
From: Bastian Schlag <bastian.schlag@cern.ch>
Date: Thu, 24 Sep 2020 13:39:44 +0200
Subject: [PATCH 122/403] adapt ACTS vertexing to new BoundTrackParameters
 interface

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

diff --git a/Tracking/Acts/ActsPriVtxFinder/src/ActsAdaptiveMultiPriVtxFinderTool.cxx b/Tracking/Acts/ActsPriVtxFinder/src/ActsAdaptiveMultiPriVtxFinderTool.cxx
index 22236ae656a6..0a037919e662 100755
--- a/Tracking/Acts/ActsPriVtxFinder/src/ActsAdaptiveMultiPriVtxFinderTool.cxx
+++ b/Tracking/Acts/ActsPriVtxFinder/src/ActsAdaptiveMultiPriVtxFinderTool.cxx
@@ -250,7 +250,7 @@ ActsAdaptiveMultiPriVtxFinderTool::findVertex(const EventContext& ctx, std::vect
       , cov(4,0) *1./(1_MeV) , cov(4,1) *1./(1_MeV) , cov(4,2) *1./(1_MeV) , cov(4,3) *1./(1_MeV) , cov(4,4) *1./(1_MeV*1_MeV), 0
       , 0. , 0. , 0. , 0., 0., 1.;
       
-      allTracks.emplace_back(trk.get(),Acts::BoundTrackParameters(geoContext, covMat, actsParams, perigeeSurface));
+      allTracks.emplace_back(trk.get(),Acts::BoundTrackParameters(perigeeSurface, actsParams, covMat));
     }
 
     std::vector<const TrackWrapper*> allTrackPtrs;
-- 
GitLab


From 6ede9d235ff0ce180d7d25643f9f3b25c5f46ae3 Mon Sep 17 00:00:00 2001
From: Bastian Schlag <bastian.schlag@cern.ch>
Date: Thu, 24 Sep 2020 17:36:11 +0200
Subject: [PATCH 123/403] remove TrackParameters header in A in
 ActsGeometry_entries.cxx

---
 .../Acts/ActsGeometry/src/components/ActsGeometry_entries.cxx   | 2 --
 1 file changed, 2 deletions(-)

diff --git a/Tracking/Acts/ActsGeometry/src/components/ActsGeometry_entries.cxx b/Tracking/Acts/ActsGeometry/src/components/ActsGeometry_entries.cxx
index 1450be63d539..311f5dfe30a8 100755
--- a/Tracking/Acts/ActsGeometry/src/components/ActsGeometry_entries.cxx
+++ b/Tracking/Acts/ActsGeometry/src/components/ActsGeometry_entries.cxx
@@ -2,8 +2,6 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "TrkParameters/TrackParameters.h"
-
 #include "ActsGeometry/ActsExtrapolationAlg.h"
 #include "ActsGeometry/ActsWriteTrackingGeometry.h"
 #include "ActsGeometry/ActsWriteTrackingGeometryTransforms.h"
-- 
GitLab


From caf62d39d30cfcdd4ba44702ff0b237275571dcf Mon Sep 17 00:00:00 2001
From: Bastian Schlag <bastian.schlag@cern.ch>
Date: Tue, 29 Sep 2020 10:46:47 +0200
Subject: [PATCH 124/403] rename JsonPlugin to PluginJson

---
 Tracking/Acts/ActsGeometry/CMakeLists.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Tracking/Acts/ActsGeometry/CMakeLists.txt b/Tracking/Acts/ActsGeometry/CMakeLists.txt
index 9f516690bfe7..58a92864ea4f 100755
--- a/Tracking/Acts/ActsGeometry/CMakeLists.txt
+++ b/Tracking/Acts/ActsGeometry/CMakeLists.txt
@@ -30,7 +30,7 @@ find_package( Eigen )
 find_package( Boost )
 find_package( nlohmann_json )
 
-find_package( Acts COMPONENTS Core JsonPlugin)
+find_package( Acts COMPONENTS Core PluginJson)
 
 # Component(s) in the package:
 
@@ -48,7 +48,7 @@ atlas_add_library( ActsGeometryLib
                    ActsInteropLib
                    ActsGeometryInterfacesLib
                    ActsCore
-                   ActsJsonPlugin
+                   ActsPluginJson
                    TrkGeometry
                    PixelReadoutGeometry
                    SCT_ReadoutGeometry
@@ -84,7 +84,7 @@ atlas_add_component( ActsGeometry
                      ActsGeometryLib
                      ActsGeometryInterfacesLib
                      ActsCore
-                     ActsJsonPlugin)
+                     ActsPluginJson)
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
-- 
GitLab


From cf25ddf4bc9d668bcb6aa913e5ef870a15d47f1a Mon Sep 17 00:00:00 2001
From: Bastian Schlag <bastian.schlag@cern.ch>
Date: Tue, 29 Sep 2020 10:48:40 +0200
Subject: [PATCH 125/403] update SCT/TRT boundaries in ActsTrackingGeometrySvc

---
 Tracking/Acts/ActsGeometry/src/ActsTrackingGeometrySvc.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Tracking/Acts/ActsGeometry/src/ActsTrackingGeometrySvc.cxx b/Tracking/Acts/ActsGeometry/src/ActsTrackingGeometrySvc.cxx
index 62212ec7760d..657e9970b3e5 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsTrackingGeometrySvc.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsTrackingGeometrySvc.cxx
@@ -435,8 +435,8 @@ ActsTrackingGeometrySvc::makeSCTTRTAssembly(const Acts::GeometryContext& gctx,
   trtPosEC.zMin = trtBrl.zMax;
   sctPosEC.zMin = trtBrl.zMax;
 
-  // extend TRT endcaps in R so they touch SCT barel
-  trtBrl.rMin = sctBrl.rMax;
+  // extend SCT endcaps in R so they touch TRT barel
+  sctBrl.rMax = trtBrl.rMin;
 
   // extend TRT endcaps in R so they touch SCT endcaps
   trtNegEC.rMin = sctNegEC.rMax;
-- 
GitLab


From b3e0a5168d3756dc10657ee9db33c6b2d506726c Mon Sep 17 00:00:00 2001
From: Bastian Schlag <bastian.schlag@cern.ch>
Date: Thu, 1 Oct 2020 11:15:15 +0200
Subject: [PATCH 126/403] update also SCT/TRT endcaps r-minmin/max values in
 ActsTrackingGeometrySvc

---
 .../Acts/ActsGeometry/src/ActsTrackingGeometrySvc.cxx     | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/Tracking/Acts/ActsGeometry/src/ActsTrackingGeometrySvc.cxx b/Tracking/Acts/ActsGeometry/src/ActsTrackingGeometrySvc.cxx
index 657e9970b3e5..d58de4d0e1b2 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsTrackingGeometrySvc.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsTrackingGeometrySvc.cxx
@@ -435,12 +435,10 @@ ActsTrackingGeometrySvc::makeSCTTRTAssembly(const Acts::GeometryContext& gctx,
   trtPosEC.zMin = trtBrl.zMax;
   sctPosEC.zMin = trtBrl.zMax;
 
-  // extend SCT endcaps in R so they touch TRT barel
+  // extend SCT in R so they touch TRT barel
   sctBrl.rMax = trtBrl.rMin;
-
-  // extend TRT endcaps in R so they touch SCT endcaps
-  trtNegEC.rMin = sctNegEC.rMax;
-  trtPosEC.rMin = sctPosEC.rMax;
+  sctNegEC.rMax = trtNegEC.rMin;
+  sctPosEC.rMax = trtPosEC.rMin;
 
   // extend TRT endcaps in r to that of Barrel
   trtNegEC.rMax = trtBrl.rMax;
-- 
GitLab


From 1063d10a2edccefa308c45aba87cbf2662d35000 Mon Sep 17 00:00:00 2001
From: Bastian Schlag <bastian.schlag@cern.ch>
Date: Thu, 1 Oct 2020 12:53:45 +0200
Subject: [PATCH 127/403] update externals to new tag 2.0.80

---
 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 +-
 Projects/VP1Light/externals.txt       | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Projects/AnalysisBase/externals.txt b/Projects/AnalysisBase/externals.txt
index e606c3417349..d9419a10e2c7 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.79
+AnalysisBaseExternalsVersion = 2.0.80
diff --git a/Projects/AthDataQuality/externals.txt b/Projects/AthDataQuality/externals.txt
index 60a8e3eda802..a2864e7a31e2 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.79
+AtlasExternalsVersion = 2.0.80
diff --git a/Projects/AthGeneration/externals.txt b/Projects/AthGeneration/externals.txt
index cf4157aa4720..889d7e83edcd 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.79
+AthGenerationExternalsVersion = 2.0.80
 
 # The version of atlas/Gaudi to use:
 GaudiVersion = v34r0.004
diff --git a/Projects/AthSimulation/externals.txt b/Projects/AthSimulation/externals.txt
index aad2056a93f5..0423b4e395c3 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.79
+AthSimulationExternalsVersion = 2.0.80
 
 # The version of atlas/Gaudi to use:
 GaudiVersion = v34r0.004
diff --git a/Projects/Athena/externals.txt b/Projects/Athena/externals.txt
index 109064ca92e2..7cfbdd50f073 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.79
+AthenaExternalsVersion = 2.0.80
 
 # The version of atlas/Gaudi to use:
 GaudiVersion = v34r0.004
diff --git a/Projects/VP1Light/externals.txt b/Projects/VP1Light/externals.txt
index 8edf53d6d2e2..88576ad8aa72 100644
--- a/Projects/VP1Light/externals.txt
+++ b/Projects/VP1Light/externals.txt
@@ -6,4 +6,4 @@
 # forbidden.
 
 # The version of atlas/atlasexternals to use:
-VP1LightExternalsVersion = 2.0.79
+VP1LightExternalsVersion = 2.0.80
-- 
GitLab


From dba51a907a02f8caff74f48eca3573a1f8197418 Mon Sep 17 00:00:00 2001
From: Bastian Schlag <bastian.schlag@cern.ch>
Date: Thu, 1 Oct 2020 17:35:42 +0200
Subject: [PATCH 128/403] update Acts track parameters in
 ExtrapolatorComparisonTest

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

diff --git a/Tracking/TrkExtrapolation/TrkExAlgs/src/ExtrapolatorComparisonTest.cxx b/Tracking/TrkExtrapolation/TrkExAlgs/src/ExtrapolatorComparisonTest.cxx
index 692a3da6dbe6..c3e22490d73b 100644
--- a/Tracking/TrkExtrapolation/TrkExAlgs/src/ExtrapolatorComparisonTest.cxx
+++ b/Tracking/TrkExtrapolation/TrkExAlgs/src/ExtrapolatorComparisonTest.cxx
@@ -291,7 +291,7 @@ StatusCode Trk::ExtrapolatorComparisonTest::execute(const EventContext& ctx) con
     // Perigee, no alignment -> default geo context
     ActsGeometryContext gctx = m_extrapolationTool->trackingGeometryTool()->getNominalGeometryContext();
     auto anygctx = gctx.any();
-    const Acts::BoundParameters* startParameters = new const Acts::BoundParameters(anygctx, std::move(cov), std::move(pars), std::move(actsPerigeeSurface));
+    const Acts::BoundTrackParameters* startParameters = new const Acts::BoundTrackParameters(std::move(actsPerigeeSurface), std::move(pars), std::move(cov));
     
     for (unsigned int surface = 0; surface < m_actsReferenceSurfaceTriples.size(); surface++) {
       n_extraps++;
@@ -334,10 +334,10 @@ StatusCode Trk::ExtrapolatorComparisonTest::execute(const EventContext& ctx) con
            ATH_MSG_DEBUG(" ACTS Extrapolation to perigee failed for input parameters: " << destParameters->parameters());
          }
          
-         m_actsPropResultWriterSvc->write<Acts::BoundParameters>(startParameters, destParameters.release(), ms_fwd, finalperigee.release(), ms_bkw);
+         m_actsPropResultWriterSvc->write<Acts::BoundTrackParameters>(startParameters, destParameters.release(), ms_fwd, finalperigee.release(), ms_bkw);
       } else if (!destParameters) {
         ATH_MSG_DEBUG(" ACTS Extrapolation not successful! " );
-        m_actsPropResultWriterSvc->write<Acts::BoundParameters>(startParameters);
+        m_actsPropResultWriterSvc->write<Acts::BoundTrackParameters>(startParameters);
       }
     }
     delete startParameters;
-- 
GitLab


From ee08ec616590b12b801f90f5a5bc76fde14b3a52 Mon Sep 17 00:00:00 2001
From: Bastian Schlag <bastian.schlag@cern.ch>
Date: Fri, 2 Oct 2020 19:10:10 +0200
Subject: [PATCH 129/403] adapt TrkExAlgs/ExtrapolatorComparisonTest to Acts
 interface changes

---
 .../TrkExAlgs/ExtrapolatorComparisonTest.h    | 26 +++++++++++++++
 .../src/ExtrapolatorComparisonTest.cxx        | 33 ++++++++++++-------
 2 files changed, 47 insertions(+), 12 deletions(-)

diff --git a/Tracking/TrkExtrapolation/TrkExAlgs/TrkExAlgs/ExtrapolatorComparisonTest.h b/Tracking/TrkExtrapolation/TrkExAlgs/TrkExAlgs/ExtrapolatorComparisonTest.h
index fa61505d3492..1d4740ebf026 100644
--- a/Tracking/TrkExtrapolation/TrkExAlgs/TrkExAlgs/ExtrapolatorComparisonTest.h
+++ b/Tracking/TrkExtrapolation/TrkExAlgs/TrkExAlgs/ExtrapolatorComparisonTest.h
@@ -24,6 +24,7 @@
 #include "ActsGeometryInterfaces/IActsExtrapolationTool.h"
 #include "ActsGeometry/ActsGeometryContext.h"
 #include "TrkExAlgs/PropResultRootWriterSvc.h"
+#include "Acts/EventData/TrackParameters.hpp"
 // STL
 #include <memory>
 #include <vector>
@@ -82,6 +83,31 @@ namespace Trk
        StatusCode          finalize() override;
        
     private:
+
+      /** @struct ActsTrackWrapper
+         Wrapper code for Acts track parameters, to provide a position() method
+         without the need of explicitly passing the Acts::GeometryContext
+      */
+      struct ActsTrackWrapper
+      {
+        /** Constructor */
+        ActsTrackWrapper(const Acts::BoundTrackParameters* trackParams, Acts::GeometryContext& ctx)
+        : m_params(trackParams)
+        , m_geometryContext(ctx) {};
+
+        /** Position getter */
+        Acts::Vector3D position() const {return m_params->position(m_geometryContext);}
+        /** Parameter getter */
+        Acts::BoundVector parameters() const {return m_params->parameters();}
+        /** Covariance getter */
+        const std::optional<Acts::BoundSymMatrix>& covariance() const {return m_params->covariance();}
+
+      private:
+        /** The Acts track parameters */
+        const Acts::BoundTrackParameters* m_params;
+        /** The Acts geometry context */
+        Acts::GeometryContext m_geometryContext;
+      };
       
       void generatePerigee(std::vector<perigeeParameters>& parameters);
 
diff --git a/Tracking/TrkExtrapolation/TrkExAlgs/src/ExtrapolatorComparisonTest.cxx b/Tracking/TrkExtrapolation/TrkExAlgs/src/ExtrapolatorComparisonTest.cxx
index c3e22490d73b..9dcd0e5f3147 100644
--- a/Tracking/TrkExtrapolation/TrkExAlgs/src/ExtrapolatorComparisonTest.cxx
+++ b/Tracking/TrkExtrapolation/TrkExAlgs/src/ExtrapolatorComparisonTest.cxx
@@ -22,7 +22,6 @@
 #include "AthenaKernel/RNGWrapper.h"
 
 // ACTS
-#include "Acts/EventData/TrackParameters.hpp"
 #include "Acts/Surfaces/Surface.hpp"
 #include "Acts/Surfaces/PerigeeSurface.hpp"
 #include "Acts/Surfaces/DiscSurface.hpp"
@@ -31,7 +30,6 @@
 #include "Acts/Utilities/Logger.hpp"
 #include "ActsInterop/Logger.h"
 #include "Acts/Propagator/detail/SteppingLogger.hpp"
-#include "ActsGeometry/ActsGeometryContext.h"
 #include "ActsGeometryInterfaces/IActsTrackingGeometryTool.h"
 #include "Acts/Geometry/GeometryContext.hpp"
 #include "Acts/Utilities/Definitions.hpp"
@@ -138,13 +136,13 @@ StatusCode Trk::ExtrapolatorComparisonTest::initialize()
        // create the Surface triplet
        std::vector<std::shared_ptr<const Acts::Surface>> actsSurfaceTriplet;
        
-       const Acts::Transform3D * posTransf = new Acts::Transform3D(Acts::Transform3D::Identity()*Acts::Translation3D(Acts::Vector3D(0.,0., halfZ)));
-       const Acts::Transform3D *   cTransf = new Acts::Transform3D(Acts::Transform3D::Identity()*Acts::Translation3D(Acts::Vector3D(0.,0.,    0.)));
-       const Acts::Transform3D * negTransf = new Acts::Transform3D(Acts::Transform3D::Identity()*Acts::Translation3D(Acts::Vector3D(0.,0.,-halfZ)));
+       Acts::Transform3D posTransf(Acts::Transform3D::Identity()*Acts::Translation3D(Acts::Vector3D(0.,0., halfZ)));
+       Acts::Transform3D   cTransf(Acts::Transform3D::Identity()*Acts::Translation3D(Acts::Vector3D(0.,0.,    0.)));
+       Acts::Transform3D negTransf(Acts::Transform3D::Identity()*Acts::Translation3D(Acts::Vector3D(0.,0.,-halfZ)));
        
-       auto posSurface = Acts::Surface::makeShared<Acts::DiscSurface>    (std::shared_ptr<const Acts::Transform3D>(posTransf),    0.,radius);
-       auto cSurface   = Acts::Surface::makeShared<Acts::CylinderSurface>(std::shared_ptr<const Acts::Transform3D>(  cTransf),radius, halfZ);
-       auto negSurface = Acts::Surface::makeShared<Acts::DiscSurface>    (std::shared_ptr<const Acts::Transform3D>(negTransf),    0.,radius);
+       auto posSurface = Acts::Surface::makeShared<Acts::DiscSurface>    (posTransf ,    0.,radius);
+       auto cSurface   = Acts::Surface::makeShared<Acts::CylinderSurface>(  cTransf ,radius, halfZ);
+       auto negSurface = Acts::Surface::makeShared<Acts::DiscSurface>    (negTransf ,    0.,radius);
        
        actsSurfaceTriplet.push_back(posSurface);
        actsSurfaceTriplet.push_back(cSurface  );
@@ -314,7 +312,7 @@ StatusCode Trk::ExtrapolatorComparisonTest::execute(const EventContext& ctx) con
       
       if (destParameters) {
         ATH_MSG_VERBOSE(" ACTS Extrapolator succeded!! --> Forward" );           
-        ATH_MSG_VERBOSE(" [ intersection ] with surface at (x,y,z) = " << destParameters->position().x() << ", " << destParameters->position().y() << ", " << destParameters->position().z() );   
+        ATH_MSG_VERBOSE(" [ intersection ] with surface at (x,y,z) = " << destParameters->position(anygctx).x() << ", " << destParameters->position(anygctx).y() << ", " << destParameters->position(anygctx).z() );   
         ATH_MSG_VERBOSE(" [ intersection ] parameters: " << destParameters->parameters() );   
         ATH_MSG_VERBOSE(" [ intersection ] cov matrix: " << *destParameters->covariance() );
         
@@ -333,11 +331,22 @@ StatusCode Trk::ExtrapolatorComparisonTest::execute(const EventContext& ctx) con
          } else if (!finalperigee) {
            ATH_MSG_DEBUG(" ACTS Extrapolation to perigee failed for input parameters: " << destParameters->parameters());
          }
-         
-         m_actsPropResultWriterSvc->write<Acts::BoundTrackParameters>(startParameters, destParameters.release(), ms_fwd, finalperigee.release(), ms_bkw);
+
+         // Construct wrappers for Acts track parameters
+         const ActsTrackWrapper* startWrapper = new ActsTrackWrapper(startParameters, anygctx);
+         const ActsTrackWrapper* destWrapper = new ActsTrackWrapper(destParameters.release(), anygctx);
+         const ActsTrackWrapper* finalWrapper = new ActsTrackWrapper(finalperigee.release(), anygctx);
+
+         m_actsPropResultWriterSvc->write<ActsTrackWrapper>(startWrapper, destWrapper, ms_fwd, finalWrapper, ms_bkw);
+
+         delete startWrapper;
+         delete destWrapper;
+         delete finalWrapper;
       } else if (!destParameters) {
         ATH_MSG_DEBUG(" ACTS Extrapolation not successful! " );
-        m_actsPropResultWriterSvc->write<Acts::BoundTrackParameters>(startParameters);
+        const ActsTrackWrapper* startWrapper = new ActsTrackWrapper(startParameters, anygctx);
+        m_actsPropResultWriterSvc->write<ActsTrackWrapper>(startWrapper);
+        delete startWrapper;
       }
     }
     delete startParameters;
-- 
GitLab


From 35a285343e2b70e2e95852643686c2647fcd4355 Mon Sep 17 00:00:00 2001
From: Laura Stephanie Miller <lmiller@lxplus705.cern.ch>
Date: Fri, 2 Oct 2020 19:20:15 +0200
Subject: [PATCH 130/403] Removed tau-FE link from flow elements flag

---
 Reconstruction/eflowRec/share/PFlowMTConfig.py | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/Reconstruction/eflowRec/share/PFlowMTConfig.py b/Reconstruction/eflowRec/share/PFlowMTConfig.py
index caed64a890b7..2f737ec0ca34 100644
--- a/Reconstruction/eflowRec/share/PFlowMTConfig.py
+++ b/Reconstruction/eflowRec/share/PFlowMTConfig.py
@@ -271,7 +271,3 @@ if jobproperties.eflowRecFlags.useFlowElements:
   from eflowRec.eflowRecConf import PFEGamFlowElementAssoc
   PFEGamFlowElementAssoc=PFEGamFlowElementAssoc("PFEGamFlowElementAssoc")
   topSequence +=PFEGamFlowElementAssoc
-
-  from eflowRec.eflowRecConf import PFTauFlowElementAssoc
-  PFTauFlowElementAssoc=PFTauFlowElementAssoc("PFTauFlowElementAssoc")
-  topSequence += PFTauFlowElementAssoc
-- 
GitLab


From 02669669f7b26727259313dd7e3bcd730f7a74f3 Mon Sep 17 00:00:00 2001
From: Laura Stephanie Miller <lmiller@lxplus705.cern.ch>
Date: Fri, 2 Oct 2020 19:21:06 +0200
Subject: [PATCH 131/403] Added flag to toggle the tau to flow element links

---
 Reconstruction/eflowRec/python/eflowRecFlags.py | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/Reconstruction/eflowRec/python/eflowRecFlags.py b/Reconstruction/eflowRec/python/eflowRecFlags.py
index a204bf9ffb1b..eb2c341c3968 100644
--- a/Reconstruction/eflowRec/python/eflowRecFlags.py
+++ b/Reconstruction/eflowRec/python/eflowRecFlags.py
@@ -46,7 +46,7 @@ class useEEtaFirstInt(JobProperty):
     """ Whether to bin E/P in E,Eta and layer of First Interaction
     or just E,Eta
     """
-    
+
     statusOn = True
     allowedTypes = ['bool']
     StoredValue = True
@@ -121,6 +121,13 @@ class usePFEGammaPFOAssoc(JobProperty):
     allowedTypes = ['bool']
     StoredValue = False
 
+class usePFTauFlowElementAssoc(JobProperty):
+    """ Flag to toggle use of linking between tau objects and flow elements
+    """
+    statusOn = True
+    allowedTypes = ['bool']
+    StoredValue = False
+
 class provideShowerSubtractedClusters(JobProperty):
     """ Flag to toggle provision of ElementLink to charged shower subtracted calorimeter clusters. Such links are added to
     neutral PFO and we write out the relevant CaloClusterContainer to AOD such that the links remain valid """
@@ -140,14 +147,13 @@ class eflowRecFlags(JobPropertyContainer):
      """ The eflowRec flag property container
      """
      pass
- 
-# add the flags container to the top container 
+
+# add the flags container to the top container
 jobproperties.add_Container(eflowRecFlags)
 
-eflowJobProperties = [eflowAlgType,CalType,useLocalHadWeightsOOCC,useOverLapShowerCells,useSplitShowers,useEEtaFirstInt,recoverIsolatedTracks,UseElectronHadronID,runTauMode, useLeptons,storeLeptonCells, useLCInput, useUpdated2015ChargedShowerSubtraction,useAODReductionClusterMomentList,useCalibHitTruth,usePFEGammaPFOAssoc,provideShowerSubtractedClusters, useFlowElements]
+eflowJobProperties = [eflowAlgType,CalType,useLocalHadWeightsOOCC,useOverLapShowerCells,useSplitShowers,useEEtaFirstInt,recoverIsolatedTracks,UseElectronHadronID,runTauMode, useLeptons,storeLeptonCells, useLCInput, useUpdated2015ChargedShowerSubtraction,useAODReductionClusterMomentList,useCalibHitTruth,usePFEGammaPFOAssoc,usePFTauFlowElementAssoc,provideShowerSubtractedClusters, useFlowElements]
 
 for i in eflowJobProperties :
     jobproperties.eflowRecFlags.add_JobProperty(i)
 
 del eflowJobProperties
-
-- 
GitLab


From de7271d8bb28054dc7261bd2185542b86c71219c Mon Sep 17 00:00:00 2001
From: Laura Stephanie Miller <lmiller@lxplus705.cern.ch>
Date: Fri, 2 Oct 2020 19:24:51 +0200
Subject: [PATCH 132/403] Needed in order to allow the tau-flow element links
 to be run after tau reconstruction

---
 Reconstruction/eflowRec/share/tauFELinkConfig.py | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 Reconstruction/eflowRec/share/tauFELinkConfig.py

diff --git a/Reconstruction/eflowRec/share/tauFELinkConfig.py b/Reconstruction/eflowRec/share/tauFELinkConfig.py
new file mode 100644
index 000000000000..fb0d78316e26
--- /dev/null
+++ b/Reconstruction/eflowRec/share/tauFELinkConfig.py
@@ -0,0 +1,8 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+from eflowRec.eflowRecFlags import jobproperties
+
+if jobproperties.eflowRecFlags.usePFTauFlowElementAssoc and jobproperties.eflowRecFlags.useFlowElements :
+    from eflowRec.eflowRecConf import PFTauFlowElementAssoc
+    PFTauFlowElementAssoc=PFTauFlowElementAssoc("PFTauFlowElementAssoc")
+    topSequence += PFTauFlowElementAssoc
-- 
GitLab


From fdae0d83020fc774aa754c0d51d2473f1b4781a7 Mon Sep 17 00:00:00 2001
From: Laura Stephanie Miller <lmiller@lxplus705.cern.ch>
Date: Fri, 2 Oct 2020 19:29:09 +0200
Subject: [PATCH 133/403] Added algorithm for flow element-tau links after tau
 reconstruction

---
 .../RecExCommon/share/CombinedRec_config.py   | 30 +++++++++++--------
 1 file changed, 17 insertions(+), 13 deletions(-)

diff --git a/Reconstruction/RecExample/RecExCommon/share/CombinedRec_config.py b/Reconstruction/RecExample/RecExCommon/share/CombinedRec_config.py
index b788aea37e9d..de94e226c5f1 100755
--- a/Reconstruction/RecExample/RecExCommon/share/CombinedRec_config.py
+++ b/Reconstruction/RecExample/RecExCommon/share/CombinedRec_config.py
@@ -22,14 +22,14 @@ AODFix_Init()
 from CaloRec.CaloRecFlags import jobproperties
 
 #
-# functionality : CaloExtensionBuilder setup 
-# to be used  in tau, pflow, e/gamma 
+# functionality : CaloExtensionBuilder setup
+# to be used  in tau, pflow, e/gamma
 #
 pdr.flag_domain('CaloExtensionBuilder')
 if (rec.doESD()) and (recAlgs.doEFlow() or rec.doTau() or rec.doEgamma()) : #   or rec.readESD()
-    try:        
+    try:
         from TrackToCalo.CaloExtensionBuilderAlgConfig import CaloExtensionBuilder
-        CaloExtensionBuilder() 
+        CaloExtensionBuilder()
     except Exception:
         treatException("Cannot include CaloExtensionBuilder !")
 
@@ -55,7 +55,7 @@ if rec.doMuonCombined() and DetFlags.Muon_on() and DetFlags.ID_on():
         rec.doMuonCombined = False
 
 #
-#  functionality : add cells crossed by high pt ID tracks 
+#  functionality : add cells crossed by high pt ID tracks
 #
 if rec.doESD() and recAlgs.doTrackParticleCellAssociation() and DetFlags.ID_on() and DetFlags.Muon_on() and DetFlags.Calo_on():
     from AthenaCommon.CfgGetter import getPublicTool
@@ -65,13 +65,13 @@ if rec.doESD() and recAlgs.doTrackParticleCellAssociation() and DetFlags.ID_on()
     pcExtensionTool = Trk__ParticleCaloExtensionTool(Extrapolator = AtlasExtrapolator())
     caloCellAssociationTool = Rec__ParticleCaloCellAssociationTool(ParticleCaloExtensionTool = pcExtensionTool)
 
-    topSequence += CfgMgr.TrackParticleCellAssociationAlg("TrackParticleCellAssociationAlg", 
+    topSequence += CfgMgr.TrackParticleCellAssociationAlg("TrackParticleCellAssociationAlg",
                                                           ParticleCaloCellAssociationTool=caloCellAssociationTool)
 
 
 #
 # functionality : energy flow
-#                                                                                                 
+#
 pdr.flag_domain('eflow')
 if recAlgs.doEFlow() and (rec.readESD() or (DetFlags.haveRIO.ID_on() and DetFlags.haveRIO.Calo_allOn() and rec.doMuonCombined())):
     try:
@@ -115,7 +115,7 @@ if (rec.doESD() and (rec.doMuonCombined() or rec.doEgamma()) and
 if jetOK and recAlgs.doMuonSpShower() and DetFlags.detdescr.Muon_on() and DetFlags.haveRIO.Calo_on() :
     try:
         include("MuonSpShowerBuilderAlgs/MuonSpShowerBuilder_jobOptions.py")
-    except Exception:    
+    except Exception:
         treatException("Could not set up MuonSpShower. Switched off !")
         recAlgs.doMuonSpShower=False
 else:
@@ -141,7 +141,14 @@ if jetOK and rec.doTau():
     protectedInclude ("tauRec/tauRec_config.py")
 AODFix_posttauRec()
 
-
+#
+# functionality: Flow element tau links
+#
+if recAlgs.doEFlow():
+    try:
+        include( "eflowRec/tauFELinkConfig.py" )
+    except Exception:
+        treatException("Could not set up tau-FE links")
 
 
 
@@ -155,7 +162,7 @@ if recAlgs.doMissingET() and DetFlags.Calo_on() and DetFlags.ID_on() and DetFlag
     except Exception:
         treatException("Could not set up MissingET. Switched off !")
         recAlgs.doMissingET=False
-        
+
 else:
     recAlgs.doMissingET=False
 AODFix_postMissingETRec()
@@ -175,6 +182,3 @@ else:
 pdr.flag_domain('caloringer')
 if rec.doCaloRinger:
   include('CaloRingerAlgs/CaloRinger_jobOptions.py')
-
-
-        
-- 
GitLab


From 969254ab6226b6613414c693ad626360509faada Mon Sep 17 00:00:00 2001
From: Nils Krumnack <krumnack@iastate.edu>
Date: Fri, 2 Oct 2020 12:55:20 -0500
Subject: [PATCH 134/403] remove AsgTools/MessagePrinter*.h

Those have been superseded by AsgMessaging/MessagePrinter*.h.
---
 .../AsgTools/AsgTools/MessagePrinter.h           | 16 ----------------
 .../AsgTools/MessagePrinterErrorCollect.h        | 16 ----------------
 .../AsgTools/AsgTools/MessagePrinterOverlay.h    | 16 ----------------
 .../EventLoopTest/test/gt_Algorithm.cxx          |  2 +-
 4 files changed, 1 insertion(+), 49 deletions(-)
 delete mode 100644 Control/AthToolSupport/AsgTools/AsgTools/MessagePrinter.h
 delete mode 100644 Control/AthToolSupport/AsgTools/AsgTools/MessagePrinterErrorCollect.h
 delete mode 100644 Control/AthToolSupport/AsgTools/AsgTools/MessagePrinterOverlay.h

diff --git a/Control/AthToolSupport/AsgTools/AsgTools/MessagePrinter.h b/Control/AthToolSupport/AsgTools/AsgTools/MessagePrinter.h
deleted file mode 100644
index 00cbf476f574..000000000000
--- a/Control/AthToolSupport/AsgTools/AsgTools/MessagePrinter.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef FILE_AsgTools_MessagePrinter_h
-#define FILE_AsgTools_MessagePrinter_h
-
-// this file is likely used in a variety of places, so this warning is
-// disabled in 21.2.  once this gets swept to master it may be a good
-// idea to include this warning and remove all the users.
-
-// #warning "use of this file is deprecated, please include the header from AsgMessaging instead"
-
-#include <AsgMessaging/MessagePrinter.h>
-
-#endif
diff --git a/Control/AthToolSupport/AsgTools/AsgTools/MessagePrinterErrorCollect.h b/Control/AthToolSupport/AsgTools/AsgTools/MessagePrinterErrorCollect.h
deleted file mode 100644
index 9638bb07b73a..000000000000
--- a/Control/AthToolSupport/AsgTools/AsgTools/MessagePrinterErrorCollect.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef FILE_AsgTools_MessagePrinterErrorCollect_h
-#define FILE_AsgTools_MessagePrinterErrorCollect_h
-
-// this file is likely used in a variety of places, so this warning is
-// disabled in 21.2.  once this gets swept to master it may be a good
-// idea to include this warning and remove all the users.
-
-// #warning "use of this file is deprecated, please include the header from AsgMessaging instead"
-
-#include <AsgMessaging/MessagePrinterErrorCollect.h>
-
-#endif
diff --git a/Control/AthToolSupport/AsgTools/AsgTools/MessagePrinterOverlay.h b/Control/AthToolSupport/AsgTools/AsgTools/MessagePrinterOverlay.h
deleted file mode 100644
index fe0c3a2c0472..000000000000
--- a/Control/AthToolSupport/AsgTools/AsgTools/MessagePrinterOverlay.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef FILE_AsgTools_MessagePrinterOverlay_h
-#define FILE_AsgTools_MessagePrinterOverlay_h
-
-// this file is likely used in a variety of places, so this warning is
-// disabled in 21.2.  once this gets swept to master it may be a good
-// idea to include this warning and remove all the users.
-
-// #warning "use of this file is deprecated, please include the header from AsgMessaging instead"
-
-#include <AsgMessaging/MessagePrinterOverlay.h>
-
-#endif
diff --git a/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_Algorithm.cxx b/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_Algorithm.cxx
index f72c332ac4ad..55bcfe6aae4b 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_Algorithm.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_Algorithm.cxx
@@ -13,7 +13,7 @@
 #include <AsgTools/AnaToolHandle.h>
 #include <AsgMessaging/MessageCheck.h>
 #include <AsgMessaging/IMessagePrinter.h>
-#include <AsgTools/MessagePrinterOverlay.h>
+#include <AsgMessaging/MessagePrinterOverlay.h>
 #include <AsgTesting/UnitTest.h>
 #include <AsgTesting/MessagePrinterMock.h>
 #include <cmath>
-- 
GitLab


From 3d325ba87e0013791a0d8c60e9ca07e096570b91 Mon Sep 17 00:00:00 2001
From: Nils Krumnack <krumnack@iastate.edu>
Date: Fri, 2 Oct 2020 12:59:59 -0500
Subject: [PATCH 135/403] remove AsgTools/Msg*.h

Those have been superseded by the files in AsgMessaging.
---
 .../AthToolSupport/AsgTools/AsgTools/MsgLevel.h  | 16 ----------------
 .../AthToolSupport/AsgTools/AsgTools/MsgStream.h | 16 ----------------
 .../AsgTools/AsgTools/MsgStreamMacros.h          | 16 ----------------
 .../SelectionHelpers/OutOfValidityEventHelper.h  |  2 +-
 .../SelectionHelpers/OutOfValidityHelper.h       |  2 +-
 .../SelectionHelpers/SelectionReadHandle.h       |  2 +-
 .../SystematicsHandles/test/ut_CopyHelpers.cxx   |  2 +-
 .../D3PDTools/EventLoop/Root/Algorithm.cxx       |  4 ++--
 .../EventLoopAlgs/Root/DuplicateChecker.cxx      |  2 +-
 .../EventLoopTest/EventLoopTest/IUnitTestTool.h  |  2 +-
 .../D3PDTools/EventLoopTest/Root/UnitTestAlg.cxx |  4 ++--
 .../EventLoopTest/Root/UnitTestAlg1.cxx          |  4 ++--
 .../EventLoopTest/Root/UnitTestAlg2.cxx          |  4 ++--
 .../EventLoopTest/Root/UnitTestAlgXAOD.cxx       |  4 ++--
 .../util/testEGIdentificationPoints.cxx          |  2 +-
 .../JetSelectorTools/JetSelectorTools/Helpers.h  |  2 +-
 .../ExtraDescriptionPatterns.h                   |  2 +-
 .../procedures/Normalizations.icc                |  2 +-
 .../tools/IRedirectMsgStream.h                   |  4 ++--
 .../Root/procedures/Normalizations.cxx           |  2 +-
 .../RingerSelectorTools/util/testRead.cxx        |  2 +-
 .../RingerSelectorTools/util/testWrite.cxx       |  2 +-
 .../JetRecTools/JetInputElRemovalTool.h          |  4 ++--
 .../JetUncertainties/JetUncertainties/Helpers.h  |  2 +-
 .../TrigBunchCrossingTool/Root/SetPrint.h        |  2 +-
 .../TrigBunchCrossingTool/BunchCrossing.h        |  2 +-
 .../TrigBunchCrossingTool/BunchTrain.h           |  2 +-
 .../TrigDecisionTool/TrigDecisionTool/Feature.h  |  2 +-
 .../TrigConfxAOD/Root/prepareTriggerMenu.cxx     |  2 +-
 .../TrigCostAnalysis/TableConstructorBase.h      |  2 +-
 .../TrigCostAnalysis/TableEntry.h                |  2 +-
 .../TrigCostAnalysis/util/trigCostHistToCSV.cxx  |  2 +-
 .../TrigSteeringEvent/TrigSteeringEvent/Chain.h  |  4 ++--
 33 files changed, 38 insertions(+), 86 deletions(-)
 delete mode 100644 Control/AthToolSupport/AsgTools/AsgTools/MsgLevel.h
 delete mode 100644 Control/AthToolSupport/AsgTools/AsgTools/MsgStream.h
 delete mode 100644 Control/AthToolSupport/AsgTools/AsgTools/MsgStreamMacros.h

diff --git a/Control/AthToolSupport/AsgTools/AsgTools/MsgLevel.h b/Control/AthToolSupport/AsgTools/AsgTools/MsgLevel.h
deleted file mode 100644
index 0f562ecc75b7..000000000000
--- a/Control/AthToolSupport/AsgTools/AsgTools/MsgLevel.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef FILE_AsgTools_MsgMevel_h
-#define FILE_AsgTools_MsgMevel_h
-
-// this file is likely used in a variety of places, so this warning is
-// disabled in 21.2.  once this gets swept to master it may be a good
-// idea to include this warning and remove all the users.
-
-// #warning "use of this file is deprecated, please include the header from AsgMessaging instead"
-
-#include <AsgMessaging/MsgLevel.h>
-
-#endif
diff --git a/Control/AthToolSupport/AsgTools/AsgTools/MsgStream.h b/Control/AthToolSupport/AsgTools/AsgTools/MsgStream.h
deleted file mode 100644
index b71648c3cae6..000000000000
--- a/Control/AthToolSupport/AsgTools/AsgTools/MsgStream.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef FILE_AsgTools_MsgStream_h
-#define FILE_AsgTools_MsgStream_h
-
-// this file is likely used in a variety of places, so this warning is
-// disabled in 21.2.  once this gets swept to master it may be a good
-// idea to include this warning and remove all the users.
-
-// #warning "use of this file is deprecated, please include the header from AsgMessaging instead"
-
-#include <AsgMessaging/MsgStream.h>
-
-#endif
diff --git a/Control/AthToolSupport/AsgTools/AsgTools/MsgStreamMacros.h b/Control/AthToolSupport/AsgTools/AsgTools/MsgStreamMacros.h
deleted file mode 100644
index 13c88e282d81..000000000000
--- a/Control/AthToolSupport/AsgTools/AsgTools/MsgStreamMacros.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef FILE_AsgTools_MsgStreamMacros_h
-#define FILE_AsgTools_MsgStreamMacros_h
-
-// this file is likely used in a variety of places, so this warning is
-// disabled in 21.2.  once this gets swept to master it may be a good
-// idea to include this warning and remove all the users.
-
-// #warning "use of this file is deprecated, please include the header from AsgMessaging instead"
-
-#include <AsgMessaging/MsgStreamMacros.h>
-
-#endif
diff --git a/PhysicsAnalysis/Algorithms/SelectionHelpers/SelectionHelpers/OutOfValidityEventHelper.h b/PhysicsAnalysis/Algorithms/SelectionHelpers/SelectionHelpers/OutOfValidityEventHelper.h
index 4fcc1f49c8fc..356a60ebb486 100644
--- a/PhysicsAnalysis/Algorithms/SelectionHelpers/SelectionHelpers/OutOfValidityEventHelper.h
+++ b/PhysicsAnalysis/Algorithms/SelectionHelpers/SelectionHelpers/OutOfValidityEventHelper.h
@@ -8,7 +8,7 @@
 #ifndef SELECTION_HELPERS__OUT_OF_VALIDITY_EVENT_HELPER_H
 #define SELECTION_HELPERS__OUT_OF_VALIDITY_EVENT_HELPER_H
 
-#include <AsgTools/MsgStream.h>
+#include <AsgMessaging/MsgStream.h>
 #include <AthContainers/AuxElement.h>
 #include <SelectionHelpers/ISelectionAccessor.h>
 #include <SelectionHelpers/OutOfValidityHelper.h>
diff --git a/PhysicsAnalysis/Algorithms/SelectionHelpers/SelectionHelpers/OutOfValidityHelper.h b/PhysicsAnalysis/Algorithms/SelectionHelpers/SelectionHelpers/OutOfValidityHelper.h
index 97787061e611..1f59b150806e 100644
--- a/PhysicsAnalysis/Algorithms/SelectionHelpers/SelectionHelpers/OutOfValidityHelper.h
+++ b/PhysicsAnalysis/Algorithms/SelectionHelpers/SelectionHelpers/OutOfValidityHelper.h
@@ -8,7 +8,7 @@
 #ifndef SELECTION_HELPERS__OUT_OF_VALIDITY_HELPER_H
 #define SELECTION_HELPERS__OUT_OF_VALIDITY_HELPER_H
 
-#include <AsgTools/MsgStream.h>
+#include <AsgMessaging/MsgStream.h>
 #include <AthContainers/AuxElement.h>
 #include <SelectionHelpers/ISelectionAccessor.h>
 #include <xAODBase/IParticle.h>
diff --git a/PhysicsAnalysis/Algorithms/SelectionHelpers/SelectionHelpers/SelectionReadHandle.h b/PhysicsAnalysis/Algorithms/SelectionHelpers/SelectionHelpers/SelectionReadHandle.h
index 3ad43fc265e2..876f46e3415e 100644
--- a/PhysicsAnalysis/Algorithms/SelectionHelpers/SelectionHelpers/SelectionReadHandle.h
+++ b/PhysicsAnalysis/Algorithms/SelectionHelpers/SelectionHelpers/SelectionReadHandle.h
@@ -9,7 +9,7 @@
 #define SELECTION_HELPERS_SELECTION_READ_HANDLE_H
 
 #include <AthContainers/AuxElement.h>
-#include <AsgTools/MsgStream.h>
+#include <AsgMessaging/MsgStream.h>
 #include <memory>
 
 class StatusCode;
diff --git a/PhysicsAnalysis/Algorithms/SystematicsHandles/test/ut_CopyHelpers.cxx b/PhysicsAnalysis/Algorithms/SystematicsHandles/test/ut_CopyHelpers.cxx
index 7e42bd38f44b..f35fe2f9dac9 100644
--- a/PhysicsAnalysis/Algorithms/SystematicsHandles/test/ut_CopyHelpers.cxx
+++ b/PhysicsAnalysis/Algorithms/SystematicsHandles/test/ut_CopyHelpers.cxx
@@ -11,7 +11,7 @@
 #include "xAODRootAccess/TEvent.h"
 #include "xAODRootAccess/TStore.h"
 #include "xAODRootAccess/Init.h"
-#include "AsgTools/MsgStream.h"
+#include "AsgMessaging/MsgStream.h"
 #include "AsgMessaging/MessageCheck.h"
 #include "AsgTools/SgTEvent.h"
 
diff --git a/PhysicsAnalysis/D3PDTools/EventLoop/Root/Algorithm.cxx b/PhysicsAnalysis/D3PDTools/EventLoop/Root/Algorithm.cxx
index 51b26d8b9fe1..08344c08f9a0 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoop/Root/Algorithm.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoop/Root/Algorithm.cxx
@@ -23,8 +23,8 @@
 #include <RootCoreUtils/ThrowMsg.h>
 #include <TH1.h>
 
-#include <AsgTools/MsgLevel.h>
-#include <AsgTools/MsgStream.h>
+#include <AsgMessaging/MsgLevel.h>
+#include <AsgMessaging/MsgStream.h>
 
 //
 // method implementations
diff --git a/PhysicsAnalysis/D3PDTools/EventLoopAlgs/Root/DuplicateChecker.cxx b/PhysicsAnalysis/D3PDTools/EventLoopAlgs/Root/DuplicateChecker.cxx
index 3c273885c6e3..bda4443de458 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoopAlgs/Root/DuplicateChecker.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoopAlgs/Root/DuplicateChecker.cxx
@@ -12,7 +12,7 @@
 #include <EventLoopAlgs/DuplicateChecker.h>
 #include <EventLoopAlgs/Global.h>
 
-#include <AsgTools/MsgStream.h>
+#include <AsgMessaging/MsgStream.h>
 #include <EventLoop/Job.h>
 #include <EventLoop/IWorker.h>
 #include <RootCoreUtils/Assert.h>
diff --git a/PhysicsAnalysis/D3PDTools/EventLoopTest/EventLoopTest/IUnitTestTool.h b/PhysicsAnalysis/D3PDTools/EventLoopTest/EventLoopTest/IUnitTestTool.h
index 108529600c9e..60457732f5fc 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoopTest/EventLoopTest/IUnitTestTool.h
+++ b/PhysicsAnalysis/D3PDTools/EventLoopTest/EventLoopTest/IUnitTestTool.h
@@ -10,7 +10,7 @@
 #define EVENT_LOOP_TEST__I_UNIT_TEST_TOOL_H
 
 #include <AsgTools/IAsgTool.h>
-#include <AsgTools/MsgLevel.h>
+#include <AsgMessaging/MsgLevel.h>
 
 namespace EL
 {
diff --git a/PhysicsAnalysis/D3PDTools/EventLoopTest/Root/UnitTestAlg.cxx b/PhysicsAnalysis/D3PDTools/EventLoopTest/Root/UnitTestAlg.cxx
index d92256a3d118..8a946d5001ea 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoopTest/Root/UnitTestAlg.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoopTest/Root/UnitTestAlg.cxx
@@ -27,8 +27,8 @@
 #include <TTree.h>
 #include <TObjString.h>
 
-#include <AsgTools/MsgStream.h>
-#include <AsgTools/MsgStreamMacros.h>
+#include <AsgMessaging/MsgStream.h>
+#include <AsgMessaging/MsgStreamMacros.h>
 
 //
 // method implementations
diff --git a/PhysicsAnalysis/D3PDTools/EventLoopTest/Root/UnitTestAlg1.cxx b/PhysicsAnalysis/D3PDTools/EventLoopTest/Root/UnitTestAlg1.cxx
index e44d142c08e4..f8ed016609c4 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoopTest/Root/UnitTestAlg1.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoopTest/Root/UnitTestAlg1.cxx
@@ -27,8 +27,8 @@
 #include <TTree.h>
 #include <TObjString.h>
 
-#include <AsgTools/MsgStream.h>
-#include <AsgTools/MsgStreamMacros.h>
+#include <AsgMessaging/MsgStream.h>
+#include <AsgMessaging/MsgStreamMacros.h>
 
 //
 // method implementations
diff --git a/PhysicsAnalysis/D3PDTools/EventLoopTest/Root/UnitTestAlg2.cxx b/PhysicsAnalysis/D3PDTools/EventLoopTest/Root/UnitTestAlg2.cxx
index 5746aeff0f58..f36ba2659dd0 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoopTest/Root/UnitTestAlg2.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoopTest/Root/UnitTestAlg2.cxx
@@ -27,8 +27,8 @@
 #include <TTree.h>
 #include <TObjString.h>
 
-#include <AsgTools/MsgStream.h>
-#include <AsgTools/MsgStreamMacros.h>
+#include <AsgMessaging/MsgStream.h>
+#include <AsgMessaging/MsgStreamMacros.h>
 
 //
 // method implementations
diff --git a/PhysicsAnalysis/D3PDTools/EventLoopTest/Root/UnitTestAlgXAOD.cxx b/PhysicsAnalysis/D3PDTools/EventLoopTest/Root/UnitTestAlgXAOD.cxx
index 380f21f8b544..4776e1e41e4e 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoopTest/Root/UnitTestAlgXAOD.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoopTest/Root/UnitTestAlgXAOD.cxx
@@ -21,8 +21,8 @@
 #include <TH1.h>
 #include <TTree.h>
 
-#include <AsgTools/MsgStream.h>
-#include <AsgTools/MsgStreamMacros.h>
+#include <AsgMessaging/MsgStream.h>
+#include <AsgMessaging/MsgStreamMacros.h>
 #include <xAODEventInfo/EventInfo.h>
 
 //
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/util/testEGIdentificationPoints.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/util/testEGIdentificationPoints.cxx
index d2dfb3a385c2..de8d330181cc 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/util/testEGIdentificationPoints.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/util/testEGIdentificationPoints.cxx
@@ -26,7 +26,7 @@
 #include "ElectronPhotonSelectorTools/egammaPIDdefs.h"
 //
 #include "AsgMessaging/MessageCheck.h"
-#include "AsgTools/MsgStream.h"
+#include "AsgMessaging/MsgStream.h"
 // Derivation include
 #include "xAODCore/tools/IOStats.h"
 #include "xAODCore/tools/ReadStats.h"
diff --git a/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/JetSelectorTools/Helpers.h b/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/JetSelectorTools/Helpers.h
index ca6a055c77c3..210197872d77 100644
--- a/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/JetSelectorTools/Helpers.h
+++ b/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/JetSelectorTools/Helpers.h
@@ -15,7 +15,7 @@
 #include "TObjArray.h"
 #include "TFile.h"
 
-#include "AsgTools/MsgStreamMacros.h"
+#include "AsgMessaging/MsgStreamMacros.h"
 
 
 namespace JCT
diff --git a/PhysicsAnalysis/RingerSelectorTools/RingerSelectorTools/ExtraDescriptionPatterns.h b/PhysicsAnalysis/RingerSelectorTools/RingerSelectorTools/ExtraDescriptionPatterns.h
index 8d0781737a99..417c51383c21 100644
--- a/PhysicsAnalysis/RingerSelectorTools/RingerSelectorTools/ExtraDescriptionPatterns.h
+++ b/PhysicsAnalysis/RingerSelectorTools/RingerSelectorTools/ExtraDescriptionPatterns.h
@@ -8,7 +8,7 @@
 #define RINGERSELECTORTOOLS_EXTRADESCRIPTIONPATTERNS_H
 
 // Asg includes:
-#include "AsgTools/MsgStream.h"
+#include "AsgMessaging/MsgStream.h"
 
 // std includes:
 #include <bitset>
diff --git a/PhysicsAnalysis/RingerSelectorTools/RingerSelectorTools/procedures/Normalizations.icc b/PhysicsAnalysis/RingerSelectorTools/RingerSelectorTools/procedures/Normalizations.icc
index edf637d2f044..1bfe2a709866 100644
--- a/PhysicsAnalysis/RingerSelectorTools/RingerSelectorTools/procedures/Normalizations.icc
+++ b/PhysicsAnalysis/RingerSelectorTools/RingerSelectorTools/procedures/Normalizations.icc
@@ -9,7 +9,7 @@
 #include "Normalizations.h"
 #include <cmath>
 #include <limits>
-#include "AsgTools/MsgStream.h"
+#include "AsgMessaging/MsgStream.h"
 
 /**
  * @brief Namespace dedicated for Ringer utilities
diff --git a/PhysicsAnalysis/RingerSelectorTools/RingerSelectorTools/tools/IRedirectMsgStream.h b/PhysicsAnalysis/RingerSelectorTools/RingerSelectorTools/tools/IRedirectMsgStream.h
index fcf799b0a67a..e26d1371d36d 100644
--- a/PhysicsAnalysis/RingerSelectorTools/RingerSelectorTools/tools/IRedirectMsgStream.h
+++ b/PhysicsAnalysis/RingerSelectorTools/RingerSelectorTools/tools/IRedirectMsgStream.h
@@ -10,8 +10,8 @@
 // without C++11 enum class.
 #if !defined(RINGER_STANDALONE)
 // Asg includes:
-# include "AsgTools/MsgStream.h"
-# include "AsgTools/MsgStreamMacros.h"
+# include "AsgMessaging/MsgStream.h"
+# include "AsgMessaging/MsgStreamMacros.h"
 //#pragma message "ASGTOOL or XAOD_STANDALONE"
 #else
 # include <iostream>
diff --git a/PhysicsAnalysis/RingerSelectorTools/Root/procedures/Normalizations.cxx b/PhysicsAnalysis/RingerSelectorTools/Root/procedures/Normalizations.cxx
index 43151182bad8..410db30f0ea2 100644
--- a/PhysicsAnalysis/RingerSelectorTools/Root/procedures/Normalizations.cxx
+++ b/PhysicsAnalysis/RingerSelectorTools/Root/procedures/Normalizations.cxx
@@ -4,7 +4,7 @@
 
 // $Id: Normalizations.cxx 770805 2016-08-30 14:03:33Z ssnyder $
 #include "RingerSelectorTools/procedures/Normalizations.icc"
-#include "AsgTools/MsgStream.h"
+#include "AsgMessaging/MsgStream.h"
 
 #include <algorithm>
 
diff --git a/PhysicsAnalysis/RingerSelectorTools/util/testRead.cxx b/PhysicsAnalysis/RingerSelectorTools/util/testRead.cxx
index 6a72c4b678d8..1a87b9947192 100644
--- a/PhysicsAnalysis/RingerSelectorTools/util/testRead.cxx
+++ b/PhysicsAnalysis/RingerSelectorTools/util/testRead.cxx
@@ -32,7 +32,7 @@ Ringer::AsgElectronRingerSelector __AsgRingerSel__("testRead");
 MsgStream &msg = __AsgRingerSel__.msg();
 #else
 #include "RingerSelectorTools/AsgElectronRingerSelector.h"
-#include "AsgTools/MsgStream.h"
+#include "AsgMessaging/MsgStream.h"
 MsgStream msg("testRead");
 #endif
 
diff --git a/PhysicsAnalysis/RingerSelectorTools/util/testWrite.cxx b/PhysicsAnalysis/RingerSelectorTools/util/testWrite.cxx
index f04b806f5218..cf804d9706b3 100644
--- a/PhysicsAnalysis/RingerSelectorTools/util/testWrite.cxx
+++ b/PhysicsAnalysis/RingerSelectorTools/util/testWrite.cxx
@@ -35,7 +35,7 @@ Ringer::AsgElectronRingerSelector __AsgRingerSel__("testWrite");
 MsgStream &msg = __AsgRingerSel__.msg();
 #else
 #include "RingerSelectorTools/AsgElectronRingerSelector.h"
-#include "AsgTools/MsgStream.h"
+#include "AsgMessaging/MsgStream.h"
 MsgStream msg("testWrite");
 #endif
 
diff --git a/Reconstruction/Jet/JetRecTools/JetRecTools/JetInputElRemovalTool.h b/Reconstruction/Jet/JetRecTools/JetRecTools/JetInputElRemovalTool.h
index 7599ed05a664..e033e5228a9b 100644
--- a/Reconstruction/Jet/JetRecTools/JetRecTools/JetInputElRemovalTool.h
+++ b/Reconstruction/Jet/JetRecTools/JetRecTools/JetInputElRemovalTool.h
@@ -13,8 +13,8 @@
 
 #include "AsgTools/AsgTool.h"
 #include <AsgMessaging/MessageCheck.h>
-#include <AsgTools/MsgStream.h>
-#include <AsgTools/MsgStreamMacros.h>
+#include <AsgMessaging/MsgStream.h>
+#include <AsgMessaging/MsgStreamMacros.h>
 
 #include "JetInterface/IJetExecuteTool.h"
 
diff --git a/Reconstruction/Jet/JetUncertainties/JetUncertainties/Helpers.h b/Reconstruction/Jet/JetUncertainties/JetUncertainties/Helpers.h
index c676176f3442..62aad5b1ac40 100644
--- a/Reconstruction/Jet/JetUncertainties/JetUncertainties/Helpers.h
+++ b/Reconstruction/Jet/JetUncertainties/JetUncertainties/Helpers.h
@@ -15,7 +15,7 @@
 #include "TObjArray.h"
 #include "TFile.h"
 
-#include "AsgTools/MsgStreamMacros.h"
+#include "AsgMessaging/MsgStreamMacros.h"
 
 #include "xAODJet/Jet.h"
 #include "xAODJet/JetAccessors.h"
diff --git a/Trigger/TrigAnalysis/TrigBunchCrossingTool/Root/SetPrint.h b/Trigger/TrigAnalysis/TrigBunchCrossingTool/Root/SetPrint.h
index 68bcdb1b77ef..c51371673125 100644
--- a/Trigger/TrigAnalysis/TrigBunchCrossingTool/Root/SetPrint.h
+++ b/Trigger/TrigAnalysis/TrigBunchCrossingTool/Root/SetPrint.h
@@ -13,7 +13,7 @@
 #include <iostream>
 
 // Gaudi/Athena include(s):
-#include "AsgTools/MsgStream.h"
+#include "AsgMessaging/MsgStream.h"
 
 /// Helper operator for printing std::set variables easily
 template< typename T >
diff --git a/Trigger/TrigAnalysis/TrigBunchCrossingTool/TrigBunchCrossingTool/BunchCrossing.h b/Trigger/TrigAnalysis/TrigBunchCrossingTool/TrigBunchCrossingTool/BunchCrossing.h
index d2d1e52c6a94..34d36651fd49 100644
--- a/Trigger/TrigAnalysis/TrigBunchCrossingTool/TrigBunchCrossingTool/BunchCrossing.h
+++ b/Trigger/TrigAnalysis/TrigBunchCrossingTool/TrigBunchCrossingTool/BunchCrossing.h
@@ -12,7 +12,7 @@
 #include <iosfwd>
 
 // Gaudi/Athena include(s):
-#include "AsgTools/MsgStream.h"
+#include "AsgMessaging/MsgStream.h"
 
 namespace Trig {
 
diff --git a/Trigger/TrigAnalysis/TrigBunchCrossingTool/TrigBunchCrossingTool/BunchTrain.h b/Trigger/TrigAnalysis/TrigBunchCrossingTool/TrigBunchCrossingTool/BunchTrain.h
index 1b5ba7e0d29a..fb69f98d2376 100644
--- a/Trigger/TrigAnalysis/TrigBunchCrossingTool/TrigBunchCrossingTool/BunchTrain.h
+++ b/Trigger/TrigAnalysis/TrigBunchCrossingTool/TrigBunchCrossingTool/BunchTrain.h
@@ -13,7 +13,7 @@
 #include <iosfwd>
 
 // Gaudi/Athena include(s):
-#include "AsgTools/MsgStream.h"
+#include "AsgMessaging/MsgStream.h"
 
 // Local include(s):
 #include "TrigBunchCrossingTool/BunchCrossing.h"
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/Feature.h b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/Feature.h
index 221cf757745c..bd144b15a31f 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/Feature.h
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/Feature.h
@@ -25,7 +25,7 @@
 #include "boost/shared_ptr.hpp"
 #include "boost/lexical_cast.hpp"
 
-#include "AsgTools/MsgStream.h"
+#include "AsgMessaging/MsgStream.h"
 
 #include "TrigNavStructure/TriggerElement.h"
 #include "xAODTrigger/EmTauRoI.h"
diff --git a/Trigger/TrigConfiguration/TrigConfxAOD/Root/prepareTriggerMenu.cxx b/Trigger/TrigConfiguration/TrigConfxAOD/Root/prepareTriggerMenu.cxx
index fc8d52c37c6b..86f3999fc2df 100644
--- a/Trigger/TrigConfiguration/TrigConfxAOD/Root/prepareTriggerMenu.cxx
+++ b/Trigger/TrigConfiguration/TrigConfxAOD/Root/prepareTriggerMenu.cxx
@@ -5,7 +5,7 @@
 // $Id: prepareTriggerMenu.cxx 792850 2017-01-18 18:58:03Z ssnyder $
 
 // Infrastructure include(s):
-#include "AsgTools/MsgStream.h"
+#include "AsgMessaging/MsgStream.h"
 
 // Trigger configuration include(s):
 #include "TrigConfL1Data/CTPConfig.h"
diff --git a/Trigger/TrigCost/TrigCostAnalysis/TrigCostAnalysis/TableConstructorBase.h b/Trigger/TrigCost/TrigCostAnalysis/TrigCostAnalysis/TableConstructorBase.h
index d4bccd4dfd4e..96085f29c534 100644
--- a/Trigger/TrigCost/TrigCostAnalysis/TrigCostAnalysis/TableConstructorBase.h
+++ b/Trigger/TrigCost/TrigCostAnalysis/TrigCostAnalysis/TableConstructorBase.h
@@ -11,7 +11,7 @@
 
 #include "TableEntry.h"
 
-#include "AsgTools/MsgStream.h"
+#include "AsgMessaging/MsgStream.h"
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
 
 #include "TString.h"
diff --git a/Trigger/TrigCost/TrigCostAnalysis/TrigCostAnalysis/TableEntry.h b/Trigger/TrigCost/TrigCostAnalysis/TrigCostAnalysis/TableEntry.h
index a5b2218cdbe6..f183eb5b7eda 100644
--- a/Trigger/TrigCost/TrigCostAnalysis/TrigCostAnalysis/TableEntry.h
+++ b/Trigger/TrigCost/TrigCostAnalysis/TrigCostAnalysis/TableEntry.h
@@ -9,7 +9,7 @@
 #include <unordered_map>
 #include <vector>
 
-#include "AsgTools/MsgStream.h"
+#include "AsgMessaging/MsgStream.h"
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
 
 #include "TString.h"
diff --git a/Trigger/TrigCost/TrigCostAnalysis/util/trigCostHistToCSV.cxx b/Trigger/TrigCost/TrigCostAnalysis/util/trigCostHistToCSV.cxx
index eab0ab15d5ee..44b80ef6e04d 100644
--- a/Trigger/TrigCost/TrigCostAnalysis/util/trigCostHistToCSV.cxx
+++ b/Trigger/TrigCost/TrigCostAnalysis/util/trigCostHistToCSV.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "AsgTools/MsgStream.h"
+#include "AsgMessaging/MsgStream.h"
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
 
 #include <string.h>
diff --git a/Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/Chain.h b/Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/Chain.h
index b06062a6a31e..cf0ae8609e4d 100644
--- a/Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/Chain.h
+++ b/Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/Chain.h
@@ -28,8 +28,8 @@
 #include "TrigConfHLTData/HLTChain.h"
 
 #ifdef XAOD_STANDALONE
-#include "AsgTools/MsgStream.h"
-#include "AsgTools/MsgStreamMacros.h"
+#include "AsgMessaging/MsgStream.h"
+#include "AsgMessaging/MsgStreamMacros.h"
 #endif
 #ifndef XAOD_STANDALONE
 #include "GaudiKernel/MsgStream.h"
-- 
GitLab


From ec79ea578739fe92f4912b437736e13dab26fa5a Mon Sep 17 00:00:00 2001
From: Nils Krumnack <krumnack@iastate.edu>
Date: Fri, 2 Oct 2020 13:15:28 -0500
Subject: [PATCH 136/403] remove AsgTools/AsgMessaging*.h

This is superseced by AsgMessaging/AsgMessaging*.h, though in some
places extra includes are needed.
---
 .../AsgTools/AsgTools/AsgMessaging.h            | 17 -----------------
 .../AsgTools/AsgTools/AsgMessagingForward.h     | 16 ----------------
 .../Root/InDetSecVtxTrackAccessor.h             |  2 +-
 .../Root/InDetTrackAccessor.cxx                 |  1 +
 .../Root/InDetTrackAccessor.h                   |  3 ++-
 .../AsgxAODNTupleMakerAlg.h                     |  2 +-
 .../AsgAnalysisAlgorithms/TreeFillerAlg.h       |  2 +-
 .../SystematicsHandles/SysCopyHandle.h          |  2 +-
 .../SystematicsHandles/SysDecorationHandle.h    |  2 +-
 .../SystematicsHandles/SysListHandle.h          |  2 +-
 .../SystematicsHandles/SysReadHandle.h          |  2 +-
 .../SystematicsHandles/SysReadHandleArray.h     |  2 +-
 .../SystematicsHandles/SysWriteHandle.h         |  2 +-
 .../AssociationUtils/MuJetGhostDRMatcher.h      |  2 +-
 .../AssociationUtils/AssociationUtils/ToolBox.h |  2 +-
 .../Root/PhotonHelpers.cxx                      |  2 +-
 .../TElectronEfficiencyCorrectionTool.h         |  2 +-
 .../util/EgEfficiencyCorr_mem_check.cxx         |  2 +-
 .../util/Messaging.h                            |  2 +-
 .../util/testEgChargeCorr.cxx                   |  2 +-
 .../EgammaCalibrationAndSmearingTool.h          |  2 +-
 .../EgammaFactory.h                             |  2 +-
 .../GainUncertainty.h                           |  2 +-
 .../LArTemperatureCorrectionTool.h              |  2 +-
 .../egammaEnergyCorrectionTool.h                |  2 +-
 .../get_MaterialResolutionEffect.h              |  2 +-
 ...sgElectronPhotonIsEMSelectorConfigHelper.cxx |  2 +-
 .../Root/ElectronSelectorHelpers.cxx            |  2 +-
 .../Root/TElectronIsEMSelector.h                |  3 ++-
 .../Root/TElectronLikelihoodTool.h              |  3 ++-
 .../Root/TForwardElectronIsEMSelector.h         |  3 ++-
 .../Root/TPhotonIsEMSelector.h                  |  3 ++-
 .../util/testEGChargeIDSelector.cxx             |  2 +-
 .../IsolationCorrections/IsolationCorrection.h  |  2 +-
 .../IsolationCorrectionTool.h                   |  2 +-
 .../egammaMVACalibAnalysis/egammaMVACalib.h     |  2 +-
 .../egammaMVACalibAnalysis/egammaMVATree.h      |  2 +-
 .../util/testClusterMVACalib.cxx                |  2 +-
 .../JetSelectorTools/Root/EventCleaningTool.cxx |  2 +-
 .../JetSelectorTools/Root/JetCleaningTool.cxx   |  2 +-
 .../JetUncertainties/ConfigHelper.h             |  3 ++-
 .../JetUncertainties/CorrelationMatrix.h        |  2 +-
 .../JetUncertainties/UncertaintyComponent.h     |  2 +-
 .../JetUncertainties/UncertaintyGroup.h         |  2 +-
 .../JetUncertainties/UncertaintyHistogram.h     |  3 ++-
 .../JetUncertainties/UncertaintySet.h           |  3 ++-
 .../Jet/JetUncertainties/util/OptionHelper.h    |  2 +-
 .../PanTauAlgs/PanTauAlgs/HelperFunctions.h     |  2 +-
 .../egammaLayerRecalibTool.h                    |  2 +-
 .../egammaMVACalib/egammaMVAFunctions.h         |  2 +-
 .../tauRecTools/tauRecTools/BDTHelper.h         |  2 +-
 .../tauRecTools/tauRecTools/TauJetRNN.h         |  2 +-
 .../tauRecTools/tauRecTools/TauJetRNNUtils.h    |  2 +-
 Tools/PathResolver/PathResolver/PathResolver.h  |  2 +-
 .../Root/BunchCrossing.cxx                      |  2 +-
 .../TrigBunchCrossingTool/Root/BunchTrain.cxx   |  2 +-
 .../TrigDecisionTool/CacheGlobalMemory.h        |  2 +-
 .../DecisionObjectHandleAthena.h                |  2 +-
 .../DecisionObjectHandleEventInfo.h             |  2 +-
 .../DecisionObjectHandleStandalone.h            |  2 +-
 .../TrigDecisionTool/DecisionUnpackerAthena.h   |  2 +-
 .../DecisionUnpackerEventInfo.h                 |  2 +-
 .../DecisionUnpackerStandalone.h                |  2 +-
 .../TrigDecisionTool/TrigDecisionTool/Logger.h  |  2 +-
 .../Root/MinimalSumAssociation.h                |  2 +-
 .../MatchingImplementation.h                    |  2 +-
 .../TrigNavStructure/TrigHolderStructure.h      |  2 +-
 .../TrigNavStructure/TypedHolder.h              |  2 +-
 .../TrigNavigation/FullHolderFactory.h          |  2 +-
 .../TrigMultiVarHypo/tools/RingerSelectorTool.h |  2 +-
 .../tools/common/RingerReader.h                 |  2 +-
 71 files changed, 77 insertions(+), 101 deletions(-)
 delete mode 100644 Control/AthToolSupport/AsgTools/AsgTools/AsgMessaging.h
 delete mode 100644 Control/AthToolSupport/AsgTools/AsgTools/AsgMessagingForward.h

diff --git a/Control/AthToolSupport/AsgTools/AsgTools/AsgMessaging.h b/Control/AthToolSupport/AsgTools/AsgTools/AsgMessaging.h
deleted file mode 100644
index cf6f1a5d6708..000000000000
--- a/Control/AthToolSupport/AsgTools/AsgTools/AsgMessaging.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef FILE_AsgTools_AsgMessaging_h
-#define FILE_AsgTools_AsgMessaging_h
-
-// this file is likely used in a variety of places, so this warning is
-// disabled in 21.2.  once this gets swept to master it may be a good
-// idea to include this warning and remove all the users.
-
-// #warning "use of this file is deprecated, please include the header from AsgMessaging instead"
-
-#include <AsgMessaging/AsgMessaging.h>
-#include <AsgTools/IAsgTool.h>
-
-#endif
diff --git a/Control/AthToolSupport/AsgTools/AsgTools/AsgMessagingForward.h b/Control/AthToolSupport/AsgTools/AsgTools/AsgMessagingForward.h
deleted file mode 100644
index 9cbd12a981e1..000000000000
--- a/Control/AthToolSupport/AsgTools/AsgTools/AsgMessagingForward.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef FILE_AsgTools_AsgMessagingForward_h
-#define FILE_AsgTools_AsgMessagingForward_h
-
-// this file is likely used in a variety of places, so this warning is
-// disabled in 21.2.  once this gets swept to master it may be a good
-// idea to include this warning and remove all the users.
-
-// #warning "use of this file is deprecated, please include the header from AsgMessaging instead"
-
-#include <AsgMessaging/AsgMessagingForward.h>
-
-#endif
diff --git a/InnerDetector/InDetRecTools/InDetSecVtxTrackSelectionTool/Root/InDetSecVtxTrackAccessor.h b/InnerDetector/InDetRecTools/InDetSecVtxTrackSelectionTool/Root/InDetSecVtxTrackAccessor.h
index 7dc22e302c4c..531b06679ecd 100644
--- a/InnerDetector/InDetRecTools/InDetSecVtxTrackSelectionTool/Root/InDetSecVtxTrackAccessor.h
+++ b/InnerDetector/InDetRecTools/InDetSecVtxTrackSelectionTool/Root/InDetSecVtxTrackAccessor.h
@@ -10,7 +10,7 @@
 #define INDETSECVTXTRACKSELECTIONTOOL_INDETTRACKACCESSOR_H
 
 #include "AsgMessaging/StatusCode.h"
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 #include "xAODTracking/TrackingPrimitives.h"
 #include "xAODTracking/TrackParticle.h"
diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectionTool/Root/InDetTrackAccessor.cxx b/InnerDetector/InDetRecTools/InDetTrackSelectionTool/Root/InDetTrackAccessor.cxx
index 30f3751afefa..bac83c331e9a 100644
--- a/InnerDetector/InDetRecTools/InDetTrackSelectionTool/Root/InDetTrackAccessor.cxx
+++ b/InnerDetector/InDetRecTools/InDetTrackSelectionTool/Root/InDetTrackAccessor.cxx
@@ -10,6 +10,7 @@
 #include "InDetTrackAccessor.h"
 #include "InDetTrackSelectionTool/InDetTrackSelectionTool.h"
 
+#include "AsgTools/IAsgTool.h"
 #include "xAODTracking/TrackParticle.h"
 #include "xAODTracking/Vertex.h"
 #ifndef XAOD_ANALYSIS
diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectionTool/Root/InDetTrackAccessor.h b/InnerDetector/InDetRecTools/InDetTrackSelectionTool/Root/InDetTrackAccessor.h
index 86c3b9b7e5e8..f7891ef01b04 100644
--- a/InnerDetector/InDetRecTools/InDetTrackSelectionTool/Root/InDetTrackAccessor.h
+++ b/InnerDetector/InDetRecTools/InDetTrackSelectionTool/Root/InDetTrackAccessor.h
@@ -11,7 +11,8 @@
 #define INDETTRACKSELECTIONTOOL_INDETTRACKACCESSOR_H
 
 #include "AsgMessaging/StatusCode.h"
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
+#include "AsgTools/IAsgTool.h"
 #include "xAODTracking/TrackingPrimitives.h"
 #include "xAODTracking/TrackParticle.h"
 #include "xAODTracking/Vertex.h"
diff --git a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/AsgAnalysisAlgorithms/AsgxAODNTupleMakerAlg.h b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/AsgAnalysisAlgorithms/AsgxAODNTupleMakerAlg.h
index 50df447893fa..64a4f28a794b 100644
--- a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/AsgAnalysisAlgorithms/AsgxAODNTupleMakerAlg.h
+++ b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/AsgAnalysisAlgorithms/AsgxAODNTupleMakerAlg.h
@@ -13,7 +13,7 @@
 #include <list>
 
 // Framework include(s):
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 #include "AnaAlgorithm/AnaAlgorithm.h"
 #include "SystematicsHandles/SysListHandle.h"
 
diff --git a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/AsgAnalysisAlgorithms/TreeFillerAlg.h b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/AsgAnalysisAlgorithms/TreeFillerAlg.h
index d845bedb3bf7..366a5d6ac13f 100644
--- a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/AsgAnalysisAlgorithms/TreeFillerAlg.h
+++ b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/AsgAnalysisAlgorithms/TreeFillerAlg.h
@@ -13,7 +13,7 @@
 #include <list>
 
 // Framework include(s):
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 #include "AnaAlgorithm/AnaAlgorithm.h"
 #include "SystematicsHandles/SysListHandle.h"
 
diff --git a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysCopyHandle.h b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysCopyHandle.h
index 7f7e5f62705e..eff0a36901e6 100644
--- a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysCopyHandle.h
+++ b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysCopyHandle.h
@@ -9,7 +9,7 @@
 #define SYSTEMATICS_HANDLES__SYS_COPY_HANDLE_H
 
 #include <AnaAlgorithm/AnaAlgorithm.h>
-#include <AsgTools/AsgMessagingForward.h>
+#include <AsgMessaging/AsgMessagingForward.h>
 #include <PATInterfaces/SystematicSet.h>
 #include <SystematicsHandles/ISysHandleBase.h>
 #include <string>
diff --git a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysDecorationHandle.h b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysDecorationHandle.h
index 5c736c3aaf41..df90f77764a1 100644
--- a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysDecorationHandle.h
+++ b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysDecorationHandle.h
@@ -9,7 +9,7 @@
 #define SYSTEMATICS_HANDLES__SYS_DECORATION_HANDLE_H
 
 #include <AnaAlgorithm/AnaAlgorithm.h>
-#include <AsgTools/AsgMessagingForward.h>
+#include <AsgMessaging/AsgMessagingForward.h>
 #include <AthContainers/AuxElement.h>
 #include <PATInterfaces/SystematicSet.h>
 #include <SystematicsHandles/ISysHandleBase.h>
diff --git a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysListHandle.h b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysListHandle.h
index 53ec9d7a325a..37e1a352225d 100644
--- a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysListHandle.h
+++ b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysListHandle.h
@@ -9,7 +9,7 @@
 #define SYSTEMATICS_HANDLES__SYS_LIST_HANDLE_H
 
 #include <AnaAlgorithm/AnaAlgorithm.h>
-#include <AsgTools/AsgMessagingForward.h>
+#include <AsgMessaging/AsgMessagingForward.h>
 #include <PATInterfaces/SystematicSet.h>
 #include <SystematicsHandles/SysListType.h>
 #include <functional>
diff --git a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysReadHandle.h b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysReadHandle.h
index ae7c304c77fe..6ed8323bac19 100644
--- a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysReadHandle.h
+++ b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysReadHandle.h
@@ -9,7 +9,7 @@
 #define SYSTEMATICS_HANDLES__SYS_READ_HANDLE_H
 
 #include <AnaAlgorithm/AnaAlgorithm.h>
-#include <AsgTools/AsgMessagingForward.h>
+#include <AsgMessaging/AsgMessagingForward.h>
 #include <PATInterfaces/SystematicSet.h>
 #include <SystematicsHandles/ISysHandleBase.h>
 #include <string>
diff --git a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysReadHandleArray.h b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysReadHandleArray.h
index 614541e0cf96..2d6c23ac32cb 100644
--- a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysReadHandleArray.h
+++ b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysReadHandleArray.h
@@ -9,7 +9,7 @@
 #define SYSTEMATICS_HANDLES__SYS_READ_HANDLE_ARRAY_H
 
 #include <AnaAlgorithm/AnaAlgorithm.h>
-#include <AsgTools/AsgMessagingForward.h>
+#include <AsgMessaging/AsgMessagingForward.h>
 #include <PATInterfaces/SystematicSet.h>
 #include <SystematicsHandles/ISysHandleBase.h>
 #include <boost/functional/hash.hpp>
diff --git a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysWriteHandle.h b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysWriteHandle.h
index 81d7a20202b2..ce28b3dc8ca2 100644
--- a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysWriteHandle.h
+++ b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SysWriteHandle.h
@@ -9,7 +9,7 @@
 #define SYSTEMATICS_HANDLES__SYS_WRITE_HANDLE_H
 
 #include <AnaAlgorithm/AnaAlgorithm.h>
-#include <AsgTools/AsgMessagingForward.h>
+#include <AsgMessaging/AsgMessagingForward.h>
 #include <PATInterfaces/SystematicSet.h>
 #include <SystematicsHandles/ISysHandleBase.h>
 #include <memory>
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/MuJetGhostDRMatcher.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/MuJetGhostDRMatcher.h
index e174c3254514..447c0c31892d 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/MuJetGhostDRMatcher.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/MuJetGhostDRMatcher.h
@@ -9,7 +9,7 @@
 #include <memory>
 
 // Infrastructure includes
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 // Local includes
 #include "AssociationUtils/IObjectAssociator.h"
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/ToolBox.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/ToolBox.h
index f3bad7e5d13a..a97b6c6cf660 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/ToolBox.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/ToolBox.h
@@ -6,7 +6,7 @@
 #define ASSOCIATIONUTILS_TOOLBOX_H
 
 // Framework includes
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 #include "AsgTools/AnaToolHandle.h"
 
 // Local includes
diff --git a/PhysicsAnalysis/ElectronPhotonID/EgammaAnalysisHelpers/Root/PhotonHelpers.cxx b/PhysicsAnalysis/ElectronPhotonID/EgammaAnalysisHelpers/Root/PhotonHelpers.cxx
index b2dc23c91721..099e380af8ba 100644
--- a/PhysicsAnalysis/ElectronPhotonID/EgammaAnalysisHelpers/Root/PhotonHelpers.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/EgammaAnalysisHelpers/Root/PhotonHelpers.cxx
@@ -6,7 +6,7 @@
 #include "xAODEgamma/Photon.h"
 #include "xAODCaloEvent/CaloCluster.h"
 #include "xAODEgamma/EgammaxAODHelpers.h"
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 // ==================================================================
 bool PhotonHelpers::passOQquality(const xAOD::Photon *ph){
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/ElectronEfficiencyCorrection/TElectronEfficiencyCorrectionTool.h b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/ElectronEfficiencyCorrection/TElectronEfficiencyCorrectionTool.h
index d24ab74ecbc9..8fe95146257f 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/ElectronEfficiencyCorrection/TElectronEfficiencyCorrectionTool.h
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/ElectronEfficiencyCorrection/TElectronEfficiencyCorrectionTool.h
@@ -31,7 +31,7 @@ class TH2;
 #include "TObjArray.h"
 // Core includes
 #include "PATCore/PATCoreEnums.h"
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 namespace Root {
 class TElectronEfficiencyCorrectionTool : public asg::AsgMessaging
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/EgEfficiencyCorr_mem_check.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/EgEfficiencyCorr_mem_check.cxx
index 0022cd08130e..48888242fb22 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/EgEfficiencyCorr_mem_check.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/EgEfficiencyCorr_mem_check.cxx
@@ -16,7 +16,7 @@ http://valgrind.org/docs/manual/faq.html#faq.deflost
 #include <string>
 #include <vector>
 #include "EgammaAnalysisInterfaces/IAsgElectronEfficiencyCorrectionTool.h"
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 #include "AsgTools/AnaToolHandle.h"
 #ifdef XAOD_STANDALONE
 // xAOD include(s):
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/Messaging.h b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/Messaging.h
index 536fde840aa1..a53260c4aff6 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/Messaging.h
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/Messaging.h
@@ -4,7 +4,7 @@
 
 #ifndef __ELECTRONEFFICIENCYCORRECTIONMESSAGING__
 #define __ELECTRONEFFICIENCYCORRECTIONMESSAGING__
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 namespace MSGHELPERS{
     const asg::AsgMessaging& getMsgStream();
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/testEgChargeCorr.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/testEgChargeCorr.cxx
index daf62201577d..ef3b700e6f97 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/testEgChargeCorr.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/testEgChargeCorr.cxx
@@ -27,7 +27,7 @@
 #include "xAODCore/ShallowCopy.h"
 
 //Asg includes
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 #include "PATCore/AcceptData.h"
 #include "PATInterfaces/SystematicsUtil.h"
 
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/ElectronPhotonFourMomentumCorrection/EgammaCalibrationAndSmearingTool.h b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/ElectronPhotonFourMomentumCorrection/EgammaCalibrationAndSmearingTool.h
index 9e3818e34354..9be0c21f1800 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/ElectronPhotonFourMomentumCorrection/EgammaCalibrationAndSmearingTool.h
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/ElectronPhotonFourMomentumCorrection/EgammaCalibrationAndSmearingTool.h
@@ -16,7 +16,7 @@
 #include "EgammaAnalysisInterfaces/IEgammaCalibrationAndSmearingTool.h"
 #include "AsgTools/AsgTool.h"
 #include "AsgTools/AsgMetadataTool.h"
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 #include "PATInterfaces/ISystematicsTool.h"
 #include "PATInterfaces/SystematicSet.h"
 #include "xAODEgamma/Electron.h"
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/ElectronPhotonFourMomentumCorrection/EgammaFactory.h b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/ElectronPhotonFourMomentumCorrection/EgammaFactory.h
index f8ff2c91bf37..250038eb298b 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/ElectronPhotonFourMomentumCorrection/EgammaFactory.h
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/ElectronPhotonFourMomentumCorrection/EgammaFactory.h
@@ -15,7 +15,7 @@
 #include <array>
 #include <memory>
 
-#include <AsgTools/AsgMessaging.h>
+#include <AsgMessaging/AsgMessaging.h>
 #include <xAODRootAccess/TEvent.h>
 #include <xAODRootAccess/TStore.h>
 #include <xAODEgamma/Electron.h>
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/ElectronPhotonFourMomentumCorrection/GainUncertainty.h b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/ElectronPhotonFourMomentumCorrection/GainUncertainty.h
index ae355993f4e1..4dd53f2ec5ad 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/ElectronPhotonFourMomentumCorrection/GainUncertainty.h
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/ElectronPhotonFourMomentumCorrection/GainUncertainty.h
@@ -5,7 +5,7 @@
 #ifndef ELECTRONPHOTONFOURMOMENTUMCORRECTION_GAINUNCERTAINTYY_H
 #define ELECTRONPHOTONFOURMOMENTUMCORRECTION_GAINUNCERTAINTYY_H
 
-#include <AsgTools/AsgMessaging.h>
+#include <AsgMessaging/AsgMessaging.h>
 #include <PATCore/PATCoreEnums.h>
 #include <memory>
 #include <string>
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/ElectronPhotonFourMomentumCorrection/LArTemperatureCorrectionTool.h b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/ElectronPhotonFourMomentumCorrection/LArTemperatureCorrectionTool.h
index 928f8d91fb16..adea579b920e 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/ElectronPhotonFourMomentumCorrection/LArTemperatureCorrectionTool.h
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/ElectronPhotonFourMomentumCorrection/LArTemperatureCorrectionTool.h
@@ -26,7 +26,7 @@
 #include <map>
 #include <memory>
 
-#include <AsgTools/AsgMessaging.h>
+#include <AsgMessaging/AsgMessaging.h>
 
 #include <TFile.h>
 #include <TTree.h>
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/ElectronPhotonFourMomentumCorrection/egammaEnergyCorrectionTool.h b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/ElectronPhotonFourMomentumCorrection/egammaEnergyCorrectionTool.h
index e3c6401512f1..7abd7c637fcc 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/ElectronPhotonFourMomentumCorrection/egammaEnergyCorrectionTool.h
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/ElectronPhotonFourMomentumCorrection/egammaEnergyCorrectionTool.h
@@ -25,7 +25,7 @@
 
 // PAT includes
 #include "PATCore/PATCoreEnums.h"
-#include <AsgTools/AsgMessaging.h>
+#include <AsgMessaging/AsgMessaging.h>
 
 
 // ROOT includes
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/ElectronPhotonFourMomentumCorrection/get_MaterialResolutionEffect.h b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/ElectronPhotonFourMomentumCorrection/get_MaterialResolutionEffect.h
index e0b56da73c7f..9991efa21dac 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/ElectronPhotonFourMomentumCorrection/get_MaterialResolutionEffect.h
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/ElectronPhotonFourMomentumCorrection/get_MaterialResolutionEffect.h
@@ -8,7 +8,7 @@
 #include <math.h>
 #include <memory>
 
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 #include "TH1.h"
 #include "TH2D.h"
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronPhotonIsEMSelectorConfigHelper.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronPhotonIsEMSelectorConfigHelper.cxx
index 21313bfdb626..a0f88eb02410 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronPhotonIsEMSelectorConfigHelper.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronPhotonIsEMSelectorConfigHelper.cxx
@@ -4,7 +4,7 @@
 
 #include "AsgElectronPhotonIsEMSelectorConfigHelper.h"
 #include "ElectronPhotonSelectorTools/egammaPIDdefs.h"
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 #include "TEnv.h"
 #include <iostream>
 #include <sstream>   
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/ElectronSelectorHelpers.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/ElectronSelectorHelpers.cxx
index 50b7483a74e4..133edf56e0fc 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/ElectronSelectorHelpers.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/ElectronSelectorHelpers.cxx
@@ -6,7 +6,7 @@
 #include "xAODEgamma/Electron.h"
 #include "xAODTracking/TrackParticle.h"
 #include "xAODTracking/TrackParticleContainer.h"
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 // ==================================================================
 std::size_t ElectronSelectorHelpers::numberOfPixelHitsAndDeadSensors(const xAOD::TrackParticle *tp){
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronIsEMSelector.h b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronIsEMSelector.h
index eeb4de303381..e4711ac0b794 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronIsEMSelector.h
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronIsEMSelector.h
@@ -21,7 +21,8 @@
 #include "PATCore/AcceptInfo.h"
 #include "PATCore/AcceptData.h"
 #include "ElectronPhotonSelectorTools/egammaPIDdefs.h"
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
+#include "AsgMessaging/StatusCode.h"
 #include <vector>
 #include <string>
 
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronLikelihoodTool.h b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronLikelihoodTool.h
index f8b4137ab614..cc7a6066388d 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronLikelihoodTool.h
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronLikelihoodTool.h
@@ -20,7 +20,8 @@ June 2011
 #define TELECTRONLIKELIHOODTOOL_H
 
 // Include the return objects and the base class
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
+#include "AsgTools/IAsgTool.h"
 #include "PATCore/AcceptData.h"
 #include "PATCore/AcceptInfo.h"
 //
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TForwardElectronIsEMSelector.h b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TForwardElectronIsEMSelector.h
index 1ee2cb9f585c..65ab7be7afc6 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TForwardElectronIsEMSelector.h
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TForwardElectronIsEMSelector.h
@@ -20,7 +20,8 @@
 // ROOT includes
 // Include the return object and the base class
 #include "ElectronPhotonSelectorTools/egammaPIDdefs.h"
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
+#include "AsgMessaging/StatusCode.h"
 #include "PATCore/AcceptInfo.h"
 #include "PATCore/AcceptData.h"
 #include <vector>
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TPhotonIsEMSelector.h b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TPhotonIsEMSelector.h
index a598d76e450b..e00cdebbf343 100755
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TPhotonIsEMSelector.h
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TPhotonIsEMSelector.h
@@ -26,7 +26,8 @@
 #include "PATCore/AcceptInfo.h"
 #include "PATCore/AcceptData.h"
 #include "ElectronPhotonSelectorTools/egammaPIDdefs.h"
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
+#include "AsgMessaging/StatusCode.h"
 
 #include <vector>
 #include <string>
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/util/testEGChargeIDSelector.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/util/testEGChargeIDSelector.cxx
index ba1c723f13e5..8e279eb9418b 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/util/testEGChargeIDSelector.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/util/testEGChargeIDSelector.cxx
@@ -22,7 +22,7 @@
 #include "ElectronPhotonSelectorTools/AsgElectronIsEMSelector.h"
 #include "ElectronPhotonSelectorTools/AsgElectronLikelihoodTool.h"
 #include "ElectronPhotonSelectorTools/AsgElectronChargeIDSelectorTool.h"
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 // Derivation include
 #include "xAODCore/tools/IOStats.h"
diff --git a/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/IsolationCorrections/IsolationCorrection.h b/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/IsolationCorrections/IsolationCorrection.h
index e066ad1b6ad5..069c8e49a048 100644
--- a/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/IsolationCorrections/IsolationCorrection.h
+++ b/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/IsolationCorrections/IsolationCorrection.h
@@ -6,7 +6,7 @@
 #define ISOLATIONCORRECTION_ISOLATIONCORRECTION_H
 
 #include "AsgTools/AsgTool.h"
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 #include "TGraph.h"
 #include "TObject.h"
 #include "TF1.h"
diff --git a/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/IsolationCorrections/IsolationCorrectionTool.h b/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/IsolationCorrections/IsolationCorrectionTool.h
index 97db502c9e02..717d48646fc3 100644
--- a/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/IsolationCorrections/IsolationCorrectionTool.h
+++ b/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/IsolationCorrections/IsolationCorrectionTool.h
@@ -7,7 +7,7 @@
 
 #include "AsgTools/AsgTool.h"
 #include "AsgTools/AsgMetadataTool.h"
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 #include "IsolationCorrections/IIsolationCorrectionTool.h"
 #include "IsolationCorrections/IsolationCorrection.h"
 
diff --git a/PhysicsAnalysis/ElectronPhotonID/egammaMVACalibAnalysis/egammaMVACalibAnalysis/egammaMVACalib.h b/PhysicsAnalysis/ElectronPhotonID/egammaMVACalibAnalysis/egammaMVACalibAnalysis/egammaMVACalib.h
index 12a56cc68298..f74249559a65 100644
--- a/PhysicsAnalysis/ElectronPhotonID/egammaMVACalibAnalysis/egammaMVACalibAnalysis/egammaMVACalib.h
+++ b/PhysicsAnalysis/ElectronPhotonID/egammaMVACalibAnalysis/egammaMVACalibAnalysis/egammaMVACalib.h
@@ -14,7 +14,7 @@
 #include <TString.h>
 #include <TObject.h>
 #include <TFile.h>
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 class TTreeFormula;
 class TList;
diff --git a/PhysicsAnalysis/ElectronPhotonID/egammaMVACalibAnalysis/egammaMVACalibAnalysis/egammaMVATree.h b/PhysicsAnalysis/ElectronPhotonID/egammaMVACalibAnalysis/egammaMVACalibAnalysis/egammaMVATree.h
index 2723ea295ea4..feba6d672a1d 100644
--- a/PhysicsAnalysis/ElectronPhotonID/egammaMVACalibAnalysis/egammaMVACalibAnalysis/egammaMVATree.h
+++ b/PhysicsAnalysis/ElectronPhotonID/egammaMVACalibAnalysis/egammaMVACalibAnalysis/egammaMVATree.h
@@ -25,7 +25,7 @@
 #include <TTree.h>
 #include <TLorentzVector.h>
 
-#include <AsgTools/AsgMessaging.h>
+#include <AsgMessaging/AsgMessaging.h>
 
 #include "egammaMVACalib/egammaMVALayerDepth.h"
 #include "egammaMVACalib/egammaMVAFunctions.h"
diff --git a/PhysicsAnalysis/ElectronPhotonID/egammaMVACalibAnalysis/util/testClusterMVACalib.cxx b/PhysicsAnalysis/ElectronPhotonID/egammaMVACalibAnalysis/util/testClusterMVACalib.cxx
index 683cbbae93d8..863b786a29db 100644
--- a/PhysicsAnalysis/ElectronPhotonID/egammaMVACalibAnalysis/util/testClusterMVACalib.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/egammaMVACalibAnalysis/util/testClusterMVACalib.cxx
@@ -27,7 +27,7 @@
 #include "xAODCore/AuxContainerBase.h"
 
 #include "egammaMVACalibAnalysis/egammaMVATool.h"
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 // Infrastructure include(s):
 #ifdef ROOTCORE
diff --git a/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/Root/EventCleaningTool.cxx b/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/Root/EventCleaningTool.cxx
index 5e7cdad30b0a..679ad8518d90 100644
--- a/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/Root/EventCleaningTool.cxx
+++ b/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/Root/EventCleaningTool.cxx
@@ -21,7 +21,7 @@ Description: Class for selecting events that pass recommended jet cleaning proce
 #include "xAODEventInfo/EventInfo.h"
 
 // xAOD/ASG includes
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 // STL includes
 #include <iostream>
diff --git a/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/Root/JetCleaningTool.cxx b/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/Root/JetCleaningTool.cxx
index b67461f54688..1824091d138d 100644
--- a/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/Root/JetCleaningTool.cxx
+++ b/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/Root/JetCleaningTool.cxx
@@ -16,7 +16,7 @@ Description: Class for selecting jets that pass some cleaning cuts
 #include "JetSelectorTools/Helpers.h"
 
 // xAOD/ASG includes
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 // STL includes
 #include <iostream>
diff --git a/Reconstruction/Jet/JetUncertainties/JetUncertainties/ConfigHelper.h b/Reconstruction/Jet/JetUncertainties/JetUncertainties/ConfigHelper.h
index f62e05744d34..6796dc875bc9 100644
--- a/Reconstruction/Jet/JetUncertainties/JetUncertainties/ConfigHelper.h
+++ b/Reconstruction/Jet/JetUncertainties/JetUncertainties/ConfigHelper.h
@@ -7,7 +7,8 @@
 
 #include "JetUncertainties/UncertaintyEnum.h"
 
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
+#include "AsgMessaging/StatusCode.h"
 
 #include "TString.h"
 class TEnv;
diff --git a/Reconstruction/Jet/JetUncertainties/JetUncertainties/CorrelationMatrix.h b/Reconstruction/Jet/JetUncertainties/JetUncertainties/CorrelationMatrix.h
index 1d8e62e488ca..963e89bcf76a 100644
--- a/Reconstruction/Jet/JetUncertainties/JetUncertainties/CorrelationMatrix.h
+++ b/Reconstruction/Jet/JetUncertainties/JetUncertainties/CorrelationMatrix.h
@@ -5,7 +5,7 @@
 #ifndef JETUNCERTAINTIES_CORRELATIONMATRIX_H
 #define JETUNCERTAINTIES_CORRELATIONMATRIX_H
 
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 #include "JetUncertainties/JetUncertaintiesTool.h"
 
 #include "xAODJet/Jet.h"
diff --git a/Reconstruction/Jet/JetUncertainties/JetUncertainties/UncertaintyComponent.h b/Reconstruction/Jet/JetUncertainties/JetUncertainties/UncertaintyComponent.h
index cb409649b31a..d2b63963b484 100644
--- a/Reconstruction/Jet/JetUncertainties/JetUncertainties/UncertaintyComponent.h
+++ b/Reconstruction/Jet/JetUncertainties/JetUncertainties/UncertaintyComponent.h
@@ -12,7 +12,7 @@
 #include "xAODJet/Jet.h"
 #include "xAODEventInfo/EventInfo.h"
 
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 #include "TString.h"
 
diff --git a/Reconstruction/Jet/JetUncertainties/JetUncertainties/UncertaintyGroup.h b/Reconstruction/Jet/JetUncertainties/JetUncertainties/UncertaintyGroup.h
index 691379a91416..aeaa5ea3f869 100644
--- a/Reconstruction/Jet/JetUncertainties/JetUncertainties/UncertaintyGroup.h
+++ b/Reconstruction/Jet/JetUncertainties/JetUncertainties/UncertaintyGroup.h
@@ -12,7 +12,7 @@
 #include "xAODJet/Jet.h"
 #include "xAODEventInfo/EventInfo.h"
 
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 #include "TString.h"
 
diff --git a/Reconstruction/Jet/JetUncertainties/JetUncertainties/UncertaintyHistogram.h b/Reconstruction/Jet/JetUncertainties/JetUncertainties/UncertaintyHistogram.h
index 513e88073ebd..33afa2969a19 100644
--- a/Reconstruction/Jet/JetUncertainties/JetUncertainties/UncertaintyHistogram.h
+++ b/Reconstruction/Jet/JetUncertainties/JetUncertainties/UncertaintyHistogram.h
@@ -5,7 +5,8 @@
 #ifndef JETUNCERTAINTIES_UNCERTAINTYHISTOGRAM_H
 #define JETUNCERTAINTIES_UNCERTAINTYHISTOGRAM_H
 
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
+#include "AsgMessaging/StatusCode.h"
 
 #include "TString.h"
 #include "TH1.h"
diff --git a/Reconstruction/Jet/JetUncertainties/JetUncertainties/UncertaintySet.h b/Reconstruction/Jet/JetUncertainties/JetUncertainties/UncertaintySet.h
index cc8b53f49e1d..172cba68143a 100644
--- a/Reconstruction/Jet/JetUncertainties/JetUncertainties/UncertaintySet.h
+++ b/Reconstruction/Jet/JetUncertainties/JetUncertainties/UncertaintySet.h
@@ -11,7 +11,8 @@
 #include "xAODEventInfo/EventInfo.h"
 
 #include "PATInterfaces/SystematicSet.h"
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
+#include "AsgTools/IAsgTool.h"
 
 #include <string>
 #include <vector>
diff --git a/Reconstruction/Jet/JetUncertainties/util/OptionHelper.h b/Reconstruction/Jet/JetUncertainties/util/OptionHelper.h
index 7f6a0c0cb2da..c415a4171800 100644
--- a/Reconstruction/Jet/JetUncertainties/util/OptionHelper.h
+++ b/Reconstruction/Jet/JetUncertainties/util/OptionHelper.h
@@ -5,7 +5,7 @@
 #ifndef JETUNCERTAINTIES_OPTIONHELPER_H
 #define JETUNCERTAINTIES_OPTIONHELPER_H
 
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 #include <vector>
 #include <utility>
 #include "TString.h"
diff --git a/Reconstruction/PanTau/PanTauAlgs/PanTauAlgs/HelperFunctions.h b/Reconstruction/PanTau/PanTauAlgs/PanTauAlgs/HelperFunctions.h
index 834be475c3db..85edf36a9dcd 100644
--- a/Reconstruction/PanTau/PanTauAlgs/PanTauAlgs/HelperFunctions.h
+++ b/Reconstruction/PanTau/PanTauAlgs/PanTauAlgs/HelperFunctions.h
@@ -11,7 +11,7 @@
 #include <string>
 #include <iostream>
 
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 #include "AsgTools/ToolHandle.h"
 
 #include "xAODTau/TauJet.h"
diff --git a/Reconstruction/egamma/egammaLayerRecalibTool/egammaLayerRecalibTool/egammaLayerRecalibTool.h b/Reconstruction/egamma/egammaLayerRecalibTool/egammaLayerRecalibTool/egammaLayerRecalibTool.h
index 7ce654111324..5f8b13382905 100644
--- a/Reconstruction/egamma/egammaLayerRecalibTool/egammaLayerRecalibTool/egammaLayerRecalibTool.h
+++ b/Reconstruction/egamma/egammaLayerRecalibTool/egammaLayerRecalibTool/egammaLayerRecalibTool.h
@@ -26,7 +26,7 @@
 #include <memory>
 
 #include "AsgTools/AsgTool.h"
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 #include "xAODEgamma/Egamma.h"
 #include "xAODCaloEvent/CaloCluster.h"
 #include "xAODEventInfo/EventInfo.h"
diff --git a/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVAFunctions.h b/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVAFunctions.h
index 900f75b92f18..754e4858141c 100644
--- a/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVAFunctions.h
+++ b/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVAFunctions.h
@@ -14,7 +14,7 @@
 #include "egammaMVALayerDepth.h"
 
 // for the ConversionHelper (deprecated?)
-#include <AsgTools/AsgMessaging.h>
+#include <AsgMessaging/AsgMessaging.h>
 
 #include "TLorentzVector.h"
 
diff --git a/Reconstruction/tauRecTools/tauRecTools/BDTHelper.h b/Reconstruction/tauRecTools/tauRecTools/BDTHelper.h
index cc63113ee2aa..73dfa99f4666 100644
--- a/Reconstruction/tauRecTools/tauRecTools/BDTHelper.h
+++ b/Reconstruction/tauRecTools/tauRecTools/BDTHelper.h
@@ -5,7 +5,7 @@
 #ifndef TAURECTOOLS_BDTHELPER_H
 #define TAURECTOOLS_BDTHELPER_H
 
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 #include "AsgMessaging/StatusCode.h"
 #include "xAODTau/TauJet.h"
 #include "MVAUtils/BDT.h"
diff --git a/Reconstruction/tauRecTools/tauRecTools/TauJetRNN.h b/Reconstruction/tauRecTools/tauRecTools/TauJetRNN.h
index 53842ed3d0f3..6db5ee4a8cc2 100644
--- a/Reconstruction/tauRecTools/tauRecTools/TauJetRNN.h
+++ b/Reconstruction/tauRecTools/tauRecTools/TauJetRNN.h
@@ -7,7 +7,7 @@
 
 #include <memory>
 
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 #include "xAODTau/TauJet.h"
 
diff --git a/Reconstruction/tauRecTools/tauRecTools/TauJetRNNUtils.h b/Reconstruction/tauRecTools/tauRecTools/TauJetRNNUtils.h
index 1b5b3665864c..f53752499a62 100644
--- a/Reconstruction/tauRecTools/tauRecTools/TauJetRNNUtils.h
+++ b/Reconstruction/tauRecTools/tauRecTools/TauJetRNNUtils.h
@@ -7,7 +7,7 @@
 
 #include <unordered_map>
 
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 #include "xAODTau/TauJet.h"
 
diff --git a/Tools/PathResolver/PathResolver/PathResolver.h b/Tools/PathResolver/PathResolver/PathResolver.h
index 7989bcc0bb60..dd9c3980fff0 100644
--- a/Tools/PathResolver/PathResolver/PathResolver.h
+++ b/Tools/PathResolver/PathResolver/PathResolver.h
@@ -5,7 +5,7 @@
 #ifndef PATHRESOLVER_PATHRESOLVER_H
 #define PATHRESOLVER_PATHRESOLVER_H
 
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 #include <string>
 #include <atomic>
diff --git a/Trigger/TrigAnalysis/TrigBunchCrossingTool/Root/BunchCrossing.cxx b/Trigger/TrigAnalysis/TrigBunchCrossingTool/Root/BunchCrossing.cxx
index a6c1d244cadc..fef29e726b27 100644
--- a/Trigger/TrigAnalysis/TrigBunchCrossingTool/Root/BunchCrossing.cxx
+++ b/Trigger/TrigAnalysis/TrigBunchCrossingTool/Root/BunchCrossing.cxx
@@ -8,7 +8,7 @@
 #include <iostream>
 
 // Gaudi/Athena include(s):
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 // Local include(s):
 #include "TrigBunchCrossingTool/BunchCrossing.h"
diff --git a/Trigger/TrigAnalysis/TrigBunchCrossingTool/Root/BunchTrain.cxx b/Trigger/TrigAnalysis/TrigBunchCrossingTool/Root/BunchTrain.cxx
index 30efce35947c..784aa3673235 100644
--- a/Trigger/TrigAnalysis/TrigBunchCrossingTool/Root/BunchTrain.cxx
+++ b/Trigger/TrigAnalysis/TrigBunchCrossingTool/Root/BunchTrain.cxx
@@ -9,7 +9,7 @@
 #include <iostream>
 
 // Gaudi/Athena include(s):
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 // Local include(s):
 #include "TrigBunchCrossingTool/BunchTrain.h"
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/CacheGlobalMemory.h b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/CacheGlobalMemory.h
index cca01aa534ee..672280458856 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/CacheGlobalMemory.h
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/CacheGlobalMemory.h
@@ -35,7 +35,7 @@
 
 #include "TrigDecisionTool/IDecisionUnpacker.h"
 #include "TrigDecisionTool/Logger.h"
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 #include "AsgDataHandles/ReadHandleKey.h"
 
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionObjectHandleAthena.h b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionObjectHandleAthena.h
index 97e8c0946e40..11d0c99a25ed 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionObjectHandleAthena.h
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionObjectHandleAthena.h
@@ -19,7 +19,7 @@
 #include "TrigDecisionTool/DecisionObjectHandle.h"
 #include "TrigDecisionTool/EventPtrDef.h"
 #include "TrigDecisionEvent/TrigDecision.h"
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 #include "StoreGate/ReadHandleKey.h"
 
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionObjectHandleEventInfo.h b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionObjectHandleEventInfo.h
index 78558a853108..276a25d11d8c 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionObjectHandleEventInfo.h
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionObjectHandleEventInfo.h
@@ -18,7 +18,7 @@
 #include "TrigDecisionTool/Logger.h"
 #include "TrigDecisionTool/DecisionObjectHandle.h"
 #include "EventInfo/EventInfo.h"
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 #include "StoreGate/ReadHandleKey.h"
 
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionObjectHandleStandalone.h b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionObjectHandleStandalone.h
index 09b72d0f6904..2b8ca014591c 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionObjectHandleStandalone.h
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionObjectHandleStandalone.h
@@ -12,7 +12,7 @@
 #include <string>
 
 // ASG include(s):
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 // xAOD include(s):
 #include "xAODTrigger/TrigDecision.h"
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionUnpackerAthena.h b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionUnpackerAthena.h
index bf9e0054424b..84880279c5c1 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionUnpackerAthena.h
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionUnpackerAthena.h
@@ -12,7 +12,7 @@
 
 #include "TrigDecisionTool/IDecisionUnpacker.h"
 #include "TrigDecisionTool/Logger.h"
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 #include "AsgDataHandles/ReadHandleKey.h"
 
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionUnpackerEventInfo.h b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionUnpackerEventInfo.h
index 33eccfd95d31..eb93a78d9ac9 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionUnpackerEventInfo.h
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionUnpackerEventInfo.h
@@ -11,7 +11,7 @@
 
 
 #include "TrigDecisionTool/IDecisionUnpacker.h"
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 #include "DecisionObjectHandleEventInfo.h"
 
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionUnpackerStandalone.h b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionUnpackerStandalone.h
index 08f816388597..19f8a4c51da2 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionUnpackerStandalone.h
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionUnpackerStandalone.h
@@ -9,7 +9,7 @@
 #define TRIGDECISIONTOOL_DECISIONUNPACKERSTANDALONE_H
 
 // ASG include(s):
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 // Trigger configuration include(s):
 #include "TrigConfHLTData/HLTChain.h"
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/Logger.h b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/Logger.h
index 9f80cf80987c..d293be661e20 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/Logger.h
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/Logger.h
@@ -19,7 +19,7 @@
 #include <string>
 
 #ifdef XAOD_STANDALONE
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 #endif
 #ifndef XAOD_STANDALONE
 #include "AthenaKernel/getMessageSvc.h"
diff --git a/Trigger/TrigAnalysis/TriggerMatchingTool/Root/MinimalSumAssociation.h b/Trigger/TrigAnalysis/TriggerMatchingTool/Root/MinimalSumAssociation.h
index 5ca655b13d0b..2df9acf2b86d 100644
--- a/Trigger/TrigAnalysis/TriggerMatchingTool/Root/MinimalSumAssociation.h
+++ b/Trigger/TrigAnalysis/TriggerMatchingTool/Root/MinimalSumAssociation.h
@@ -8,7 +8,7 @@
 #define TRIGGERMATCHINGTOOL_MINIMALSUMASSOCIATION_H
 
 #include "TriggerMatchingTool/IAssociationStrategy.h"
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 
 class MinimalSumAssociation : public IAssociationStrategy, public asg::AsgMessaging {
diff --git a/Trigger/TrigAnalysis/TriggerMatchingTool/TriggerMatchingTool/MatchingImplementation.h b/Trigger/TrigAnalysis/TriggerMatchingTool/TriggerMatchingTool/MatchingImplementation.h
index bc46c415a630..fc68b7d60a80 100644
--- a/Trigger/TrigAnalysis/TriggerMatchingTool/TriggerMatchingTool/MatchingImplementation.h
+++ b/Trigger/TrigAnalysis/TriggerMatchingTool/TriggerMatchingTool/MatchingImplementation.h
@@ -12,7 +12,7 @@
 
 #include "TriggerMatchingTool/MatchingTool.h"
 #include "TriggerMatchingTool/IAssociationStrategy.h"
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 namespace Trig {
 
diff --git a/Trigger/TrigEvent/TrigNavStructure/TrigNavStructure/TrigHolderStructure.h b/Trigger/TrigEvent/TrigNavStructure/TrigNavStructure/TrigHolderStructure.h
index 7ee305780887..21a924368336 100644
--- a/Trigger/TrigEvent/TrigNavStructure/TrigNavStructure/TrigHolderStructure.h
+++ b/Trigger/TrigEvent/TrigNavStructure/TrigNavStructure/TrigHolderStructure.h
@@ -12,7 +12,7 @@
 
 #include <boost/variant.hpp>
 
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 #include "TrigNavStructure/Types.h"
 #include "TrigNavStructure/BaseHolder.h"
 #include "TrigNavStructure/TriggerElement.h"
diff --git a/Trigger/TrigEvent/TrigNavStructure/TrigNavStructure/TypedHolder.h b/Trigger/TrigEvent/TrigNavStructure/TrigNavStructure/TypedHolder.h
index f4acb15c1930..1632aba5c766 100644
--- a/Trigger/TrigEvent/TrigNavStructure/TrigNavStructure/TypedHolder.h
+++ b/Trigger/TrigEvent/TrigNavStructure/TrigNavStructure/TypedHolder.h
@@ -30,7 +30,7 @@ typedef asg::SgTEvent* EventPtr;
 typedef StoreGateSvc* EventPtr;
 #endif //XAOD_STANDALONE
 
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 
 //forward declarations
diff --git a/Trigger/TrigEvent/TrigNavigation/TrigNavigation/FullHolderFactory.h b/Trigger/TrigEvent/TrigNavigation/TrigNavigation/FullHolderFactory.h
index e8552160379b..c4106400edc8 100644
--- a/Trigger/TrigEvent/TrigNavigation/TrigNavigation/FullHolderFactory.h
+++ b/Trigger/TrigEvent/TrigNavigation/TrigNavigation/FullHolderFactory.h
@@ -10,7 +10,7 @@
 #include <string>
 #include "TrigNavStructure/ITrigHolderFactory.h"
 #include "TrigNavStructure/BaseHolder.h"
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 #include "GaudiKernel/ServiceHandle.h"
 
 class IConversionSvc;
diff --git a/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/tools/RingerSelectorTool.h b/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/tools/RingerSelectorTool.h
index 28dc97bff581..e9b27b5cba31 100644
--- a/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/tools/RingerSelectorTool.h
+++ b/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/tools/RingerSelectorTool.h
@@ -20,7 +20,7 @@
 #include "TrigMultiVarHypo/tools/procedures/Norm1.h"
 
 #include "AthenaMonitoringKernel/MonitoredTimer.h"
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 #include <memory>
 #include <string>
 
diff --git a/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/tools/common/RingerReader.h b/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/tools/common/RingerReader.h
index a8aacc1500a7..d936779394e1 100644
--- a/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/tools/common/RingerReader.h
+++ b/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/tools/common/RingerReader.h
@@ -20,7 +20,7 @@
 #include <memory>
 
 
-#include "AsgTools/AsgMessaging.h"
+#include "AsgMessaging/AsgMessaging.h"
 
 namespace Ringer{
 
-- 
GitLab


From 0bc4d2bb5377cf66e225bd6ccefb9839cd3f0c4f Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Sun, 27 Sep 2020 22:17:55 -0400
Subject: [PATCH 137/403] TrigT1CaloByteStream: Enable thread-safety checking.

Enable thread-safety checking.
Fix warnings revealed by that.
(Still need to make more tools const.)
---
 .../ATLAS_CHECK_THREAD_SAFETY                 |   1 +
 .../src/CpByteStreamCnv.cxx                   |  38 +----
 .../src/CpByteStreamCnv.h                     |   7 +-
 .../src/CpByteStreamV1Cnv.cxx                 |  38 +----
 .../src/CpByteStreamV1Cnv.h                   |   8 +-
 .../src/CpByteStreamV2Cnv.cxx                 |  37 +----
 .../src/CpByteStreamV2Cnv.h                   |   7 +-
 .../src/CpReadByteStreamCnv.h                 |  77 ----------
 .../src/CpReadByteStreamCnv.icc               | 142 ------------------
 .../src/CpReadByteStreamV1Cnv.h               |   2 -
 .../src/CpReadByteStreamV1Cnv.icc             |  61 +++-----
 .../src/CpReadByteStreamV1V2Cnv.cxx           |  69 +++------
 .../src/CpReadByteStreamV1V2Cnv.h             |   4 +-
 .../src/CpReadByteStreamV2Cnv.h               |   4 +-
 .../src/CpReadByteStreamV2Cnv.icc             |  58 ++-----
 .../src/CpmRoiByteStreamCnv.cxx               |  70 +++------
 .../src/CpmRoiByteStreamCnv.h                 |   3 +-
 .../src/CpmRoiByteStreamV1Cnv.cxx             |  70 +++------
 .../src/CpmRoiByteStreamV1Cnv.h               |   3 +-
 .../src/CpmRoiByteStreamV2Cnv.cxx             |  70 +++------
 .../src/CpmRoiByteStreamV2Cnv.h               |   3 +-
 .../src/JepByteStreamCnv.cxx                  |  38 +----
 .../src/JepByteStreamCnv.h                    |   7 +-
 .../src/JepByteStreamV1Cnv.cxx                |  38 +----
 .../src/JepByteStreamV1Cnv.h                  |   7 +-
 .../src/JepByteStreamV2Cnv.cxx                |  38 +----
 .../src/JepByteStreamV2Cnv.h                  |   7 +-
 .../src/JepReadByteStreamCnv.h                |  77 ----------
 .../src/JepReadByteStreamCnv.icc              | 141 -----------------
 .../src/JepReadByteStreamV1Cnv.h              |   4 +-
 .../src/JepReadByteStreamV1Cnv.icc            |  60 +++-----
 .../src/JepReadByteStreamV1V2Cnv.h            |   4 +-
 .../src/JepReadByteStreamV1V2Cnv.icc          |  69 +++------
 .../src/JepReadByteStreamV2Cnv.h              |   4 +-
 .../src/JepReadByteStreamV2Cnv.icc            |  58 ++-----
 .../src/JepRoiByteStreamCnv.cxx               |  38 +----
 .../src/JepRoiByteStreamCnv.h                 |   7 +-
 .../src/JepRoiByteStreamV1Cnv.cxx             |  38 +----
 .../src/JepRoiByteStreamV1Cnv.h               |   7 +-
 .../src/JepRoiByteStreamV2Cnv.cxx             |  38 +----
 .../src/JepRoiByteStreamV2Cnv.h               |   7 +-
 .../src/JepRoiReadByteStreamCnv.h             |  77 ----------
 .../src/JepRoiReadByteStreamCnv.icc           | 142 ------------------
 .../src/JepRoiReadByteStreamV1Cnv.h           |   4 +-
 .../src/JepRoiReadByteStreamV1Cnv.icc         |  60 +++-----
 .../src/JepRoiReadByteStreamV2Cnv.h           |   4 +-
 .../src/JepRoiReadByteStreamV2Cnv.icc         |  60 +++-----
 .../src/L1CaloErrorByteStreamCnv.cxx          |  41 ++---
 .../src/L1CaloErrorByteStreamCnv.h            |   4 +-
 .../src/L1CaloErrorByteStreamTool.h           |   5 +-
 .../src/PpmByteStreamV1Cnv.cxx                |  72 +++------
 .../src/PpmByteStreamV1Cnv.h                  |   4 +-
 .../src/PpmSubBlockV1.cxx                     |  27 ++--
 .../TrigT1CaloByteStream/src/PpmSubBlockV1.h  |   5 +-
 .../src/RodHeaderByteStreamCnv.cxx            |  40 ++---
 .../src/RodHeaderByteStreamCnv.h              |   9 +-
 .../src/xaod/CaloUserHeader.cxx               |   4 +-
 .../src/xaod/SubBlockHeader.cxx               |   4 +-
 .../src/xaod/SubBlockStatus.cxx               |   4 +-
 59 files changed, 349 insertions(+), 1676 deletions(-)
 create mode 100644 Trigger/TrigT1/TrigT1CaloByteStream/TrigT1CaloByteStream/ATLAS_CHECK_THREAD_SAFETY
 delete mode 100644 Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamCnv.h
 delete mode 100644 Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamCnv.icc
 delete mode 100644 Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamCnv.h
 delete mode 100644 Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamCnv.icc
 delete mode 100644 Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiReadByteStreamCnv.h
 delete mode 100644 Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiReadByteStreamCnv.icc

diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/TrigT1CaloByteStream/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigT1/TrigT1CaloByteStream/TrigT1CaloByteStream/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 000000000000..6b806d30ce2b
--- /dev/null
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/TrigT1CaloByteStream/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Trigger/TrigT1/TrigT1CaloByteStream
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamCnv.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamCnv.cxx
index e93d5ae36e17..aa4f10e19a7b 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamCnv.cxx
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -21,6 +21,7 @@
 
 #include "AthenaKernel/ClassID_traits.h"
 #include "AthenaKernel/StorableConversions.h"
+#include "AthenaKernel/errorcheck.h"
 
 #include "TrigT1CaloEvent/CPBSCollection.h"
 
@@ -33,8 +34,7 @@ CpByteStreamCnv::CpByteStreamCnv( ISvcLocator* svcloc )
     : Converter( storageType(), classID(), svcloc ),
       m_name("CpByteStreamCnv"),
       m_tool("LVL1BS::CpByteStreamTool/CpByteStreamTool"),
-      m_ByteStreamEventAccess("ByteStreamCnvSvc", m_name),
-      m_log(msgSvc(), m_name), m_debug(false)
+      m_ByteStreamEventAccess("ByteStreamCnvSvc", m_name)
 {
 }
 
@@ -59,31 +59,9 @@ long CpByteStreamCnv::storageType()
 
 StatusCode CpByteStreamCnv::initialize()
 {
-  m_debug = msgSvc()->outputLevel(m_name) <= MSG::DEBUG;
-  m_log << MSG::DEBUG << "Initializing " << m_name << " - package version "
-                      << PACKAGE_VERSION << endmsg;
-
-  StatusCode sc = Converter::initialize();
-  if ( sc.isFailure() )
-    return sc;
-
-  //Get ByteStreamCnvSvc
-  sc = m_ByteStreamEventAccess.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve service "
-          << m_ByteStreamEventAccess << endmsg;
-    return sc;
-  } else {
-    m_log << MSG::DEBUG << "Retrieved service "
-          << m_ByteStreamEventAccess << endmsg;
-  }
-
-  // Retrieve Tool
-  sc = m_tool.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve tool " << m_tool << endmsg;
-    return sc;
-  } else m_log << MSG::DEBUG << "Retrieved tool " << m_tool << endmsg;
+  ATH_CHECK( Converter::initialize() );
+  ATH_CHECK( m_ByteStreamEventAccess.retrieve() );
+  ATH_CHECK( m_tool.retrieve() );
 
   return StatusCode::SUCCESS;
 }
@@ -93,13 +71,11 @@ StatusCode CpByteStreamCnv::initialize()
 StatusCode CpByteStreamCnv::createRep( DataObject* pObj,
                                         IOpaqueAddress*& pAddr )
 {
-  if (m_debug) m_log << MSG::DEBUG << "createRep() called" << endmsg;
-
   RawEventWrite* re = m_ByteStreamEventAccess->getRawEvent();
 
   LVL1::CPBSCollection* cp = 0;
   if( !SG::fromStorable( pObj, cp ) ) {
-    m_log << MSG::ERROR << " Cannot cast to CPBSCollection" << endmsg;
+    REPORT_ERROR (StatusCode::FAILURE) << " Cannot cast to CPBSCollection";
     return StatusCode::FAILURE;
   }
 
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamCnv.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamCnv.h
index 3f995f7dea0d..2bb844f9462e 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamCnv.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamCnv.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 TRIGT1CALOBYTESTREAM_CPBYTESTREAMCNV_H
@@ -62,11 +62,6 @@ private:
 
   /// Service for writing bytestream
   ServiceHandle<IByteStreamEventAccess> m_ByteStreamEventAccess;
-
-  /// Message log
-  mutable MsgStream m_log;
-  bool m_debug;
-
 };
 
 } // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV1Cnv.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV1Cnv.cxx
index 38b8c76ceca9..637d5bd0ecb9 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV1Cnv.cxx
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV1Cnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -21,6 +21,7 @@
 
 #include "AthenaKernel/ClassID_traits.h"
 #include "AthenaKernel/StorableConversions.h"
+#include "AthenaKernel/errorcheck.h"
 
 #include "TrigT1CaloEvent/CPBSCollectionV1.h"
 
@@ -33,8 +34,7 @@ CpByteStreamV1Cnv::CpByteStreamV1Cnv( ISvcLocator* svcloc )
     : Converter( storageType(), classID(), svcloc ),
       m_name("CpByteStreamV1Cnv"),
       m_tool("LVL1BS::CpByteStreamV1Tool/CpByteStreamV1Tool"),
-      m_ByteStreamEventAccess("ByteStreamCnvSvc", m_name),
-      m_log(msgSvc(), m_name), m_debug(false)
+      m_ByteStreamEventAccess("ByteStreamCnvSvc", m_name)
 {
 }
 
@@ -59,31 +59,9 @@ long CpByteStreamV1Cnv::storageType()
 
 StatusCode CpByteStreamV1Cnv::initialize()
 {
-  m_debug = msgSvc()->outputLevel(m_name) <= MSG::DEBUG;
-  m_log << MSG::DEBUG << "Initializing " << m_name << " - package version "
-                      << PACKAGE_VERSION << endmsg;
-
-  StatusCode sc = Converter::initialize();
-  if ( sc.isFailure() )
-    return sc;
-
-  //Get ByteStreamCnvSvc
-  sc = m_ByteStreamEventAccess.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve service "
-          << m_ByteStreamEventAccess << endmsg;
-    return sc;
-  } else {
-    m_log << MSG::DEBUG << "Retrieved service "
-          << m_ByteStreamEventAccess << endmsg;
-  }
-
-  // Retrieve Tool
-  sc = m_tool.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve tool " << m_tool << endmsg;
-    return sc;
-  } else m_log << MSG::DEBUG << "Retrieved tool " << m_tool << endmsg;
+  ATH_CHECK( Converter::initialize() );
+  ATH_CHECK( m_ByteStreamEventAccess.retrieve() );
+  ATH_CHECK( m_tool.retrieve() );
 
   return StatusCode::SUCCESS;
 }
@@ -93,13 +71,11 @@ StatusCode CpByteStreamV1Cnv::initialize()
 StatusCode CpByteStreamV1Cnv::createRep( DataObject* pObj,
                                         IOpaqueAddress*& pAddr )
 {
-  if (m_debug) m_log << MSG::DEBUG << "createRep() called" << endmsg;
-
   RawEventWrite* re = m_ByteStreamEventAccess->getRawEvent();
 
   LVL1::CPBSCollectionV1* cp = 0;
   if( !SG::fromStorable( pObj, cp ) ) {
-    m_log << MSG::ERROR << " Cannot cast to CPBSCollectionV1" << endmsg;
+    REPORT_ERROR (StatusCode::FAILURE) <<  "Cannot cast to CPBSCollectionV1";
     return StatusCode::FAILURE;
   }
 
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV1Cnv.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV1Cnv.h
index ecc81b558ff1..f5a2af4f15ed 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV1Cnv.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV1Cnv.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 TRIGT1CALOBYTESTREAM_CPBYTESTREAMV1CNV_H
@@ -9,7 +9,6 @@
 
 #include "GaudiKernel/ClassID.h"
 #include "GaudiKernel/Converter.h"
-#include "GaudiKernel/MsgStream.h"
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
 
@@ -56,11 +55,6 @@ private:
 
   /// Service for writing bytestream
   ServiceHandle<IByteStreamEventAccess> m_ByteStreamEventAccess;
-
-  /// Message log
-  mutable MsgStream m_log;
-  bool m_debug;
-
 };
 
 } // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV2Cnv.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV2Cnv.cxx
index 569094b68d74..36d9aad6afbe 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV2Cnv.cxx
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV2Cnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -21,6 +21,7 @@
 
 #include "AthenaKernel/ClassID_traits.h"
 #include "AthenaKernel/StorableConversions.h"
+#include "AthenaKernel/errorcheck.h"
 
 #include "TrigT1CaloEvent/CPBSCollectionV2.h"
 
@@ -33,8 +34,7 @@ CpByteStreamV2Cnv::CpByteStreamV2Cnv( ISvcLocator* svcloc )
     : Converter( storageType(), classID(), svcloc ),
       m_name("CpByteStreamV2Cnv"),
       m_tool("LVL1BS::CpByteStreamV2Tool/CpByteStreamV2Tool"),
-      m_ByteStreamEventAccess("ByteStreamCnvSvc", m_name),
-      m_log(msgSvc(), m_name), m_debug(false)
+      m_ByteStreamEventAccess("ByteStreamCnvSvc", m_name)
 {
 }
 
@@ -59,31 +59,10 @@ long CpByteStreamV2Cnv::storageType()
 
 StatusCode CpByteStreamV2Cnv::initialize()
 {
-  m_debug = msgSvc()->outputLevel(m_name) <= MSG::DEBUG;
-  m_log << MSG::DEBUG << "Initializing " << m_name << " - package version "
-                      << PACKAGE_VERSION << endmsg;
-
   StatusCode sc = Converter::initialize();
-  if ( sc.isFailure() )
-    return sc;
-
-  //Get ByteStreamCnvSvc
-  sc = m_ByteStreamEventAccess.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve service "
-          << m_ByteStreamEventAccess << endmsg;
-    return sc;
-  } else {
-    m_log << MSG::DEBUG << "Retrieved service "
-          << m_ByteStreamEventAccess << endmsg;
-  }
-
-  // Retrieve Tool
-  sc = m_tool.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve tool " << m_tool << endmsg;
-    return sc;
-  } else m_log << MSG::DEBUG << "Retrieved tool " << m_tool << endmsg;
+  ATH_CHECK( sc.isFailure() );
+  ATH_CHECK( m_ByteStreamEventAccess.retrieve() );
+  ATH_CHECK( m_tool.retrieve() );
 
   return StatusCode::SUCCESS;
 }
@@ -93,13 +72,11 @@ StatusCode CpByteStreamV2Cnv::initialize()
 StatusCode CpByteStreamV2Cnv::createRep( DataObject* pObj,
                                          IOpaqueAddress*& pAddr )
 {
-  if (m_debug) m_log << MSG::DEBUG << "createRep() called" << endmsg;
-
   RawEventWrite* re = m_ByteStreamEventAccess->getRawEvent();
 
   LVL1::CPBSCollectionV2* cp = 0;
   if( !SG::fromStorable( pObj, cp ) ) {
-    m_log << MSG::ERROR << " Cannot cast to CPBSCollectionV2" << endmsg;
+    REPORT_ERROR (StatusCode::FAILURE) << " Cannot cast to CPBSCollectionV2";
     return StatusCode::FAILURE;
   }
 
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV2Cnv.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV2Cnv.h
index 1ea5ead44079..7b83f410f185 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV2Cnv.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV2Cnv.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 TRIGT1CALOBYTESTREAM_CPBYTESTREAMV2CNV_H
@@ -56,11 +56,6 @@ private:
 
   /// Service for writing bytestream
   ServiceHandle<IByteStreamEventAccess> m_ByteStreamEventAccess;
-
-  /// Message log
-  mutable MsgStream m_log;
-  bool m_debug;
-
 };
 
 } // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamCnv.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamCnv.h
deleted file mode 100644
index 7a745443ff47..000000000000
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamCnv.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef TRIGT1CALOBYTESTREAM_CPREADBYTESTREAMCNV_H
-#define TRIGT1CALOBYTESTREAM_CPREADBYTESTREAMCNV_H
-
-#include <string>
-
-#include "GaudiKernel/ClassID.h"
-#include "GaudiKernel/Converter.h"
-#include "GaudiKernel/MsgStream.h"
-#include "GaudiKernel/ServiceHandle.h"
-#include "GaudiKernel/ToolHandle.h"
-
-class DataObject;
-class IOpaqueAddress;
-class IROBDataProviderSvc;
-class ISvcLocator;
-class StatusCode;
-
-template <typename> class CnvFactory;
-
-
-namespace LVL1BS {
-
-class CpByteStreamTool;
-
-/** ByteStream converter for CP component containers.
- *
- *  @author Peter Faulkner
- */
-
-template <typename Container>
-class CpReadByteStreamCnv: public Converter {
-
-  friend class CnvFactory<CpReadByteStreamCnv<Container> >;
-
-protected:
-
-  CpReadByteStreamCnv(ISvcLocator* svcloc);
-
-public:
-
-  ~CpReadByteStreamCnv();
-
-  virtual StatusCode initialize();
-  /// Create Container from ByteStream
-  virtual StatusCode createObj(IOpaqueAddress* pAddr, DataObject*& pObj);
-
-  //  Storage type and class ID
-  virtual long repSvcType() const { return i_repSvcType(); }
-  static  long storageType();
-  static const CLID& classID();
-
-private:
-
-  /// Converter name
-  std::string m_name;
-
-  /// Tool that does the actual work
-  ToolHandle<LVL1BS::CpByteStreamTool> m_tool;
-
-  /// Service for reading bytestream
-  ServiceHandle<IROBDataProviderSvc> m_robDataProvider;
-
-  /// Message log
-  mutable MsgStream m_log;
-  bool m_debug;
-
-};
-
-} // end namespace
-
-#include "CpReadByteStreamCnv.icc"
-
-#endif
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamCnv.icc b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamCnv.icc
deleted file mode 100644
index 303e0273900f..000000000000
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamCnv.icc
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-
-#include <vector>
-#include <stdint.h>
-#include <typeinfo>
-
-#include "ByteStreamCnvSvcBase/ByteStreamAddress.h"
-#include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h"
-
-#include "ByteStreamData/RawEvent.h"
-#include "ByteStreamData/ROBData.h"
-
-#include "GaudiKernel/DataObject.h"
-#include "GaudiKernel/IOpaqueAddress.h"
-#include "GaudiKernel/ISvcLocator.h"
-#include "GaudiKernel/StatusCode.h"
-
-#include "AthenaKernel/ClassID_traits.h"
-#include "AthenaKernel/StorableConversions.h"
-
-#include "CpByteStreamTool.h"
-
-namespace LVL1BS {
-
-template <typename Container>
-CpReadByteStreamCnv<Container>::CpReadByteStreamCnv( ISvcLocator* svcloc )
-    : Converter( storageType(), classID(), svcloc ),
-      m_name("CpReadByteStreamCnv"),
-      m_tool("LVL1BS::CpByteStreamTool/CpByteStreamTool"),
-      m_robDataProvider("ROBDataProviderSvc", m_name),
-      m_log(msgSvc(), m_name), m_debug(false)
-{
-}
-
-template <typename Container>
-CpReadByteStreamCnv<Container>::~CpReadByteStreamCnv()
-{
-}
-
-// CLID
-
-template <typename Container>
-const CLID& CpReadByteStreamCnv<Container>::classID()
-{
-  return ClassID_traits<Container>::ID();
-}
-
-template <typename Container>
-long CpReadByteStreamCnv<Container>::storageType()
-{
-  return ByteStreamAddress::storageType();
-}
-
-//  Init method gets all necessary services etc.
-
-
-template <typename Container>
-StatusCode CpReadByteStreamCnv<Container>::initialize()
-{
-  m_debug = msgSvc()->outputLevel(m_name) <= MSG::DEBUG;
-  m_log << MSG::DEBUG << "Initializing " << m_name << "<"
-                      << typeid(Container).name() << "> - package version "
-                      << PACKAGE_VERSION << endmsg;
-
-  StatusCode sc = Converter::initialize();
-  if ( sc.isFailure() )
-    return sc;
-
-  // Retrieve Tool
-  sc = m_tool.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve tool " << m_tool << endmsg;
-    return sc;
-  } else m_log << MSG::DEBUG << "Retrieved tool " << m_tool << endmsg;
-
-  // Get ROBDataProvider
-  sc = m_robDataProvider.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve service "
-          << m_robDataProvider << endmsg;
-    return sc ;
-  } else {
-    m_log << MSG::DEBUG << "Retrieved service "
-          << m_robDataProvider << endmsg;
-  }
-
-  return StatusCode::SUCCESS;
-}
-
-// createObj should create the RDO from bytestream.
-
-template <typename Container>
-StatusCode CpReadByteStreamCnv<Container>::createObj( IOpaqueAddress* pAddr,
-                                                       DataObject*& pObj )
-{
-  if (m_debug) m_log << MSG::DEBUG << "createObj() called" << endmsg;
-
-  ByteStreamAddress *pBS_Addr;
-  pBS_Addr = dynamic_cast<ByteStreamAddress *>( pAddr );
-  if ( !pBS_Addr ) {
-    m_log << MSG::ERROR << " Can not cast to ByteStreamAddress " << endmsg;
-    return StatusCode::FAILURE;
-  }
-
-  const std::string nm = *( pBS_Addr->par() );
-
-  if (m_debug) m_log << MSG::DEBUG << " Creating Objects " << nm << endmsg;
-
-  // get SourceIDs
-  const std::vector<uint32_t>& vID(m_tool->sourceIDs(nm));
-
-  // get ROB fragments
-  IROBDataProviderSvc::VROBFRAG robFrags;
-  m_robDataProvider->getROBData( vID, robFrags );
-
-  // size check
-  Container* const collection = new Container;
-  if (m_debug) {
-    m_log << MSG::DEBUG << " Number of ROB fragments is " << robFrags.size()
-          << endmsg;
-  }
-  if (robFrags.size() == 0) {
-    pObj = SG::asStorable(collection) ;
-    return StatusCode::SUCCESS;
-  }
-
-  StatusCode sc = m_tool->convert(robFrags, collection);
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << " Failed to create Objects   " << nm << endmsg;
-    delete collection;
-    return sc;
-  }
-
-  pObj = SG::asStorable(collection);
-
-  return sc;
-}
-
-} // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamV1Cnv.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamV1Cnv.h
index bf34a314dd94..8f3598b39740 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamV1Cnv.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamV1Cnv.h
@@ -59,9 +59,7 @@ private:
   ServiceHandle<IROBDataProviderSvc> m_robDataProvider;
 
   /// Message log
-  mutable MsgStream m_log;
   bool m_debug;
-
 };
 
 } // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamV1Cnv.icc b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamV1Cnv.icc
index eb9b9eeceb1c..8bc7c26ac7a7 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamV1Cnv.icc
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamV1Cnv.icc
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -20,6 +20,7 @@
 
 #include "AthenaKernel/ClassID_traits.h"
 #include "AthenaKernel/StorableConversions.h"
+#include "AthenaKernel/errorcheck.h"
 
 #include "CpByteStreamV1Tool.h"
 
@@ -30,8 +31,7 @@ CpReadByteStreamV1Cnv<Container>::CpReadByteStreamV1Cnv( ISvcLocator* svcloc )
     : Converter( storageType(), classID(), svcloc ),
       m_name("CpReadByteStreamV1Cnv"),
       m_tool("LVL1BS::CpByteStreamV1Tool/CpByteStreamV1Tool"),
-      m_robDataProvider("ROBDataProviderSvc", m_name),
-      m_log(msgSvc(), m_name), m_debug(false)
+      m_robDataProvider("ROBDataProviderSvc", m_name)
 {
 }
 
@@ -61,31 +61,10 @@ template <typename Container>
 StatusCode CpReadByteStreamV1Cnv<Container>::initialize()
 {
   m_debug = msgSvc()->outputLevel(m_name) <= MSG::DEBUG;
-  m_log << MSG::DEBUG << "Initializing " << m_name << "<"
-                      << typeid(Container).name() << "> - package version "
-                      << PACKAGE_VERSION << endmsg;
-
-  StatusCode sc = Converter::initialize();
-  if ( sc.isFailure() )
-    return sc;
-
-  // Retrieve Tool
-  sc = m_tool.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve tool " << m_tool << endmsg;
-    return sc;
-  } else m_log << MSG::DEBUG << "Retrieved tool " << m_tool << endmsg;
-
-  // Get ROBDataProvider
-  sc = m_robDataProvider.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve service "
-          << m_robDataProvider << endmsg;
-    return sc ;
-  } else {
-    m_log << MSG::DEBUG << "Retrieved service "
-          << m_robDataProvider << endmsg;
-  }
+
+  ATH_CHECK( Converter::initialize() );
+  ATH_CHECK( m_tool.retrieve() );
+  ATH_CHECK( m_robDataProvider.retrieve() );
 
   return StatusCode::SUCCESS;
 }
@@ -96,18 +75,18 @@ template <typename Container>
 StatusCode CpReadByteStreamV1Cnv<Container>::createObj( IOpaqueAddress* pAddr,
                                                        DataObject*& pObj )
 {
-  if (m_debug) m_log << MSG::DEBUG << "createObj() called" << endmsg;
-
   ByteStreamAddress *pBS_Addr;
   pBS_Addr = dynamic_cast<ByteStreamAddress *>( pAddr );
   if ( !pBS_Addr ) {
-    m_log << MSG::ERROR << " Can not cast to ByteStreamAddress " << endmsg;
+    REPORT_ERROR (StatusCode::FAILURE) << " Can not cast to ByteStreamAddress ";
     return StatusCode::FAILURE;
   }
 
   const std::string nm = *( pBS_Addr->par() );
 
-  if (m_debug) m_log << MSG::DEBUG << " Creating Objects " << nm << endmsg;
+  if (m_debug) {
+    REPORT_MESSAGE (MSG::DEBUG) << " Creating Objects " << nm;
+  }
 
   // get SourceIDs
   const std::vector<uint32_t>& vID(m_tool->sourceIDs(nm));
@@ -117,26 +96,20 @@ StatusCode CpReadByteStreamV1Cnv<Container>::createObj( IOpaqueAddress* pAddr,
   m_robDataProvider->getROBData( vID, robFrags );
 
   // size check
-  Container* const collection = new Container;
+  auto collection = std::make_unique<Container>();
   if (m_debug) {
-    m_log << MSG::DEBUG << " Number of ROB fragments is " << robFrags.size()
-          << endmsg;
+    REPORT_MESSAGE (MSG::DEBUG) << " Number of ROB fragments is " << robFrags.size();
   }
   if (robFrags.size() == 0) {
-    pObj = SG::asStorable(collection) ;
+    pObj = SG::asStorable(std::move(collection)) ;
     return StatusCode::SUCCESS;
   }
 
-  StatusCode sc = m_tool->convert(robFrags, collection);
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << " Failed to create Objects   " << nm << endmsg;
-    delete collection;
-    return sc;
-  }
+  ATH_CHECK( m_tool->convert(robFrags, collection.get()) );
 
-  pObj = SG::asStorable(collection);
+  pObj = SG::asStorable(std::move(collection));
 
-  return sc;
+  return StatusCode::SUCCESS;
 }
 
 } // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamV1V2Cnv.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamV1V2Cnv.cxx
index 5cf6b9e80709..d5660c39f328 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamV1V2Cnv.cxx
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamV1V2Cnv.cxx
@@ -23,6 +23,7 @@
 
 #include "AthenaKernel/ClassID_traits.h"
 #include "AthenaKernel/StorableConversions.h"
+#include "AthenaKernel/errorcheck.h"
 
 #include "TrigT1CaloEvent/CPMTower.h"
 
@@ -38,7 +39,7 @@ CpReadByteStreamV1V2Cnv::CpReadByteStreamV1V2Cnv( ISvcLocator* svcloc )
       m_tool1("LVL1BS::CpByteStreamV1Tool/CpByteStreamV1Tool"),
       m_tool2("LVL1BS::CpByteStreamV2Tool/CpByteStreamV2Tool"),
       m_robDataProvider("ROBDataProviderSvc", m_name),
-      m_log(msgSvc(), m_name), m_debug(false)
+      m_debug(false)
 {
 }
 
@@ -64,35 +65,11 @@ long CpReadByteStreamV1V2Cnv::storageType()
 StatusCode CpReadByteStreamV1V2Cnv::initialize()
 {
   m_debug = msgSvc()->outputLevel(m_name) <= MSG::DEBUG;
-  m_log << MSG::DEBUG << "Initializing " << m_name << " - package version "
-                      << PACKAGE_VERSION << endmsg;
 
-  StatusCode sc = Converter::initialize();
-  if ( sc.isFailure() )
-    return sc;
-
-  // Retrieve Tools
-  sc = m_tool1.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve tool " << m_tool1 << endmsg;
-    return StatusCode::FAILURE;
-  } else m_log << MSG::DEBUG << "Retrieved tool " << m_tool1 << endmsg;
-  sc = m_tool2.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve tool " << m_tool2 << endmsg;
-    return StatusCode::FAILURE;
-  } else m_log << MSG::DEBUG << "Retrieved tool " << m_tool2 << endmsg;
-
-  // Get ROBDataProvider
-  sc = m_robDataProvider.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::WARNING << "Failed to retrieve service "
-          << m_robDataProvider << endmsg;
-    return sc ;
-  } else {
-    m_log << MSG::DEBUG << "Retrieved service "
-          << m_robDataProvider << endmsg;
-  }
+  ATH_CHECK( Converter::initialize() );
+  ATH_CHECK( m_tool1.retrieve() );
+  ATH_CHECK( m_tool2.retrieve() );
+  ATH_CHECK( m_robDataProvider.retrieve() );
 
   return StatusCode::SUCCESS;
 }
@@ -102,18 +79,18 @@ StatusCode CpReadByteStreamV1V2Cnv::initialize()
 StatusCode CpReadByteStreamV1V2Cnv::createObj( IOpaqueAddress* pAddr,
                                                DataObject*& pObj )
 {
-  if (m_debug) m_log << MSG::DEBUG << "createObj() called" << endmsg;
-
   ByteStreamAddress *pBS_Addr;
   pBS_Addr = dynamic_cast<ByteStreamAddress *>( pAddr );
   if ( !pBS_Addr ) {
-    m_log << MSG::ERROR << " Can not cast to ByteStreamAddress " << endmsg;
+    REPORT_ERROR (StatusCode::FAILURE) << " Can not cast to ByteStreamAddress ";
     return StatusCode::FAILURE;
   }
 
   const std::string nm = *( pBS_Addr->par() );
 
-  if (m_debug) m_log << MSG::DEBUG << " Creating Objects " << nm << endmsg;
+  if (m_debug) {
+    REPORT_MESSAGE (MSG::DEBUG) << " Creating Objects " << nm;
+  }
 
   // get SourceIDs
   const std::vector<uint32_t>& vID1(m_tool1->sourceIDs(nm));
@@ -126,36 +103,26 @@ StatusCode CpReadByteStreamV1V2Cnv::createObj( IOpaqueAddress* pAddr,
   m_robDataProvider->getROBData( vID2, robFrags2 );
 
   // size check
-  DataVector<LVL1::CPMTower>* const towerCollection = new DataVector<LVL1::CPMTower>;
+  auto towerCollection = std::make_unique<DataVector<LVL1::CPMTower> >();
   if (m_debug) {
-    m_log << MSG::DEBUG << " Number of ROB fragments is " << robFrags1.size()
-          << ", " << robFrags2.size() << endmsg;
+    REPORT_MESSAGE (MSG::DEBUG) << " Number of ROB fragments is " << robFrags1.size()
+                                << ", " << robFrags2.size();
   }
   if (robFrags1.size() == 0 && robFrags2.size() == 0) {
-    pObj = SG::asStorable(towerCollection) ;
+    pObj = SG::asStorable(std::move(towerCollection)) ;
     return StatusCode::SUCCESS;
   }
 
   // Pre-LS1 data
   if (robFrags1.size() > 0) {
-    StatusCode sc = m_tool1->convert(robFrags1, towerCollection);
-    if ( sc.isFailure() ) {
-      m_log << MSG::ERROR << " Failed to create Objects   " << nm << endmsg;
-      delete towerCollection;
-      return sc;
-    }
+    ATH_CHECK( m_tool1->convert(robFrags1, towerCollection.get()) );
   }
   // Post-LS1 data
   if (robFrags2.size() > 0) {
-    StatusCode sc = m_tool2->convert(nm, robFrags2, towerCollection);
-    if ( sc.isFailure() ) {
-      m_log << MSG::ERROR << " Failed to create Objects   " << nm << endmsg;
-      delete towerCollection;
-      return sc;
-    }
-  }
+    ATH_CHECK( m_tool2->convert(nm, robFrags2, towerCollection.get()) ); 
+ }
 
-  pObj = SG::asStorable(towerCollection);
+  pObj = SG::asStorable(std::move(towerCollection));
 
   return StatusCode::SUCCESS;
 }
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamV1V2Cnv.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamV1V2Cnv.h
index 6b2087b61b04..7b8a4308ff8c 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamV1V2Cnv.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamV1V2Cnv.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 TRIGT1CALOBYTESTREAM_CPREADBYTESTREAMV1V2CNV_H
@@ -65,9 +65,7 @@ private:
   ServiceHandle<IROBDataProviderSvc> m_robDataProvider;
 
   /// Message log
-  mutable MsgStream m_log;
   bool m_debug;
-
 };
 
 } // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamV2Cnv.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamV2Cnv.h
index ee6fa1ac8ed3..d5307350bb0d 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamV2Cnv.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamV2Cnv.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 TRIGT1CALOBYTESTREAM_CPREADBYTESTREAMV2CNV_H
@@ -59,9 +59,7 @@ private:
   ServiceHandle<IROBDataProviderSvc> m_robDataProvider;
 
   /// Message log
-  mutable MsgStream m_log;
   bool m_debug;
-
 };
 
 } // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamV2Cnv.icc b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamV2Cnv.icc
index 404d8925284b..9a0076c579e0 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamV2Cnv.icc
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamV2Cnv.icc
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -20,6 +20,7 @@
 
 #include "AthenaKernel/ClassID_traits.h"
 #include "AthenaKernel/StorableConversions.h"
+#include "AthenaKernel/errorcheck.h"
 
 #include "CpByteStreamV2Tool.h"
 
@@ -31,7 +32,7 @@ CpReadByteStreamV2Cnv<Container>::CpReadByteStreamV2Cnv( ISvcLocator* svcloc )
       m_name("CpReadByteStreamV2Cnv"),
       m_tool("LVL1BS::CpByteStreamV2Tool/CpByteStreamV2Tool"),
       m_robDataProvider("ROBDataProviderSvc", m_name),
-      m_log(msgSvc(), m_name), m_debug(false)
+      m_debug(false)
 {
 }
 
@@ -61,31 +62,10 @@ template <typename Container>
 StatusCode CpReadByteStreamV2Cnv<Container>::initialize()
 {
   m_debug = msgSvc()->outputLevel(m_name) <= MSG::DEBUG;
-  m_log << MSG::DEBUG << "Initializing " << m_name << "<"
-                      << typeid(Container).name() << "> - package version "
-                      << PACKAGE_VERSION << endmsg;
-
-  StatusCode sc = Converter::initialize();
-  if ( sc.isFailure() )
-    return sc;
-
-  // Retrieve Tool
-  sc = m_tool.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve tool " << m_tool << endmsg;
-    return sc;
-  } else m_log << MSG::DEBUG << "Retrieved tool " << m_tool << endmsg;
-
-  // Get ROBDataProvider
-  sc = m_robDataProvider.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve service "
-          << m_robDataProvider << endmsg;
-    return sc ;
-  } else {
-    m_log << MSG::DEBUG << "Retrieved service "
-          << m_robDataProvider << endmsg;
-  }
+
+  ATH_CHECK( Converter::initialize() );
+  ATH_CHECK( m_tool.retrieve() );
+  ATH_CHEKC( m_robDataProvider.retrieve() );
 
   return StatusCode::SUCCESS;
 }
@@ -96,19 +76,15 @@ template <typename Container>
 StatusCode CpReadByteStreamV2Cnv<Container>::createObj( IOpaqueAddress* pAddr,
                                                         DataObject*& pObj )
 {
-  if (m_debug) m_log << MSG::DEBUG << "createObj() called" << endmsg;
-
   ByteStreamAddress *pBS_Addr;
   pBS_Addr = dynamic_cast<ByteStreamAddress *>( pAddr );
   if ( !pBS_Addr ) {
-    m_log << MSG::ERROR << " Can not cast to ByteStreamAddress " << endmsg;
+    REPORT_ERROR (StatusCode::FAILURE) << " Can not cast to ByteStreamAddress ";
     return StatusCode::FAILURE;
   }
 
   const std::string nm = *( pBS_Addr->par() );
 
-  if (m_debug) m_log << MSG::DEBUG << " Creating Objects " << nm << endmsg;
-
   // get SourceIDs
   const std::vector<uint32_t>& vID(m_tool->sourceIDs(nm));
 
@@ -117,26 +93,20 @@ StatusCode CpReadByteStreamV2Cnv<Container>::createObj( IOpaqueAddress* pAddr,
   m_robDataProvider->getROBData( vID, robFrags );
 
   // size check
-  Container* const collection = new Container;
+  auto collection = std::make_unique<Container>();
   if (m_debug) {
-    m_log << MSG::DEBUG << " Number of ROB fragments is " << robFrags.size()
-          << endmsg;
+    REPORT_MESSAGE (MSG::DEBUG) << " Number of ROB fragments is " << robFrags.size();
   }
   if (robFrags.size() == 0) {
-    pObj = SG::asStorable(collection) ;
+    pObj = SG::asStorable(std::move(collection)) ;
     return StatusCode::SUCCESS;
   }
 
-  StatusCode sc = m_tool->convert(robFrags, collection);
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << " Failed to create Objects   " << nm << endmsg;
-    delete collection;
-    return sc;
-  }
+  ATH_CHECK( m_tool->convert(robFrags, collection.get()) );
 
-  pObj = SG::asStorable(collection);
+  pObj = SG::asStorable(std::move(collection));
 
-  return sc;
+  return StatusCode::SUCCESS;
 }
 
 } // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpmRoiByteStreamCnv.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpmRoiByteStreamCnv.cxx
index daedba54f63a..62d3ba80fba4 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpmRoiByteStreamCnv.cxx
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpmRoiByteStreamCnv.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
 */
 
 
@@ -23,6 +23,7 @@
 
 #include "AthenaKernel/ClassID_traits.h"
 #include "AthenaKernel/StorableConversions.h"
+#include "AthenaKernel/errorcheck.h"
 
 #include "TrigT1CaloEvent/CPMRoI.h"
 
@@ -37,7 +38,7 @@ CpmRoiByteStreamCnv::CpmRoiByteStreamCnv( ISvcLocator* svcloc )
       m_tool("LVL1BS::CpmRoiByteStreamTool/CpmRoiByteStreamTool"),
       m_robDataProvider("ROBDataProviderSvc", m_name),
       m_ByteStreamEventAccess("ByteStreamCnvSvc", m_name),
-      m_log(msgSvc(), m_name), m_debug(false)
+      m_debug(false)
 {
 }
 
@@ -63,41 +64,18 @@ long CpmRoiByteStreamCnv::storageType()
 StatusCode CpmRoiByteStreamCnv::initialize()
 {
   m_debug = msgSvc()->outputLevel(m_name) <= MSG::DEBUG;
-  m_log << MSG::DEBUG << "Initializing " << m_name << " - package version "
-                      << PACKAGE_VERSION << endmsg;
 
-  StatusCode sc = Converter::initialize();
-  if ( sc.isFailure() )
-    return sc;
-
-  //Get ByteStreamCnvSvc
-  sc = m_ByteStreamEventAccess.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve service "
-          << m_ByteStreamEventAccess << endmsg;
-    return sc;
-  } else {
-    m_log << MSG::DEBUG << "Retrieved service "
-          << m_ByteStreamEventAccess << endmsg;
-  }
-
-  // Retrieve Tool
-  sc = m_tool.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve tool " << m_tool << endmsg;
-    return StatusCode::FAILURE;
-  } else m_log << MSG::DEBUG << "Retrieved tool " << m_tool << endmsg;
+  ATH_CHECK( Converter::initialize() );
+  ATH_CHECK( m_ByteStreamEventAccess.retrieve() );
+  ATH_CHECK( m_tool.retrieve() );
 
   // Get ROBDataProvider
-  sc = m_robDataProvider.retrieve();
+  StatusCode sc = m_robDataProvider.retrieve();
   if ( sc.isFailure() ) {
-    m_log << MSG::WARNING << "Failed to retrieve service "
-          << m_robDataProvider << endmsg;
+    REPORT_MESSAGE (MSG::WARNING) << "Failed to retrieve service "
+                                  << m_robDataProvider;
     // return is disabled for Write BS which does not require ROBDataProviderSvc
     // return sc ;
-  } else {
-    m_log << MSG::DEBUG << "Retrieved service "
-          << m_robDataProvider << endmsg;
   }
 
   return StatusCode::SUCCESS;
@@ -108,18 +86,18 @@ StatusCode CpmRoiByteStreamCnv::initialize()
 StatusCode CpmRoiByteStreamCnv::createObj( IOpaqueAddress* pAddr,
                                         DataObject*& pObj )
 {
-  if (m_debug) m_log << MSG::DEBUG << "createObj() called" << endmsg;
-
   ByteStreamAddress *pBS_Addr;
   pBS_Addr = dynamic_cast<ByteStreamAddress *>( pAddr );
   if ( !pBS_Addr ) {
-    m_log << MSG::ERROR << " Can not cast to ByteStreamAddress " << endmsg;
+    REPORT_ERROR (StatusCode::FAILURE) << " Can not cast to ByteStreamAddress ";
     return StatusCode::FAILURE;
   }
 
   const std::string nm = *( pBS_Addr->par() );
 
-  if (m_debug) m_log << MSG::DEBUG << " Creating Objects " << nm << endmsg;
+  if (m_debug) {
+    REPORT_MESSAGE (MSG::DEBUG) << " Creating Objects " << nm;
+  }
 
   // get SourceIDs
   const std::vector<uint32_t>& vID(m_tool->sourceIDs(nm));
@@ -129,26 +107,20 @@ StatusCode CpmRoiByteStreamCnv::createObj( IOpaqueAddress* pAddr,
   m_robDataProvider->getROBData( vID, robFrags );
 
   // size check
-  DataVector<LVL1::CPMRoI>* const roiCollection = new DataVector<LVL1::CPMRoI>;
+  auto roiCollection = std::make_unique<DataVector<LVL1::CPMRoI> >();
   if (m_debug) {
-    m_log << MSG::DEBUG << " Number of ROB fragments is " << robFrags.size()
-          << endmsg;
+    REPORT_MESSAGE (MSG::DEBUG) << " Number of ROB fragments is " << robFrags.size();
   }
   if (robFrags.size() == 0) {
-    pObj = SG::asStorable(roiCollection) ;
+    pObj = SG::asStorable(std::move(roiCollection)) ;
     return StatusCode::SUCCESS;
   }
 
-  StatusCode sc = m_tool->convert(robFrags, roiCollection);
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << " Failed to create Objects   " << nm << endmsg;
-    delete roiCollection;
-    return sc;
-  }
+  ATH_CHECK( m_tool->convert(robFrags, roiCollection.get()) );
 
-  pObj = SG::asStorable(roiCollection);
+  pObj = SG::asStorable(std::move(roiCollection));
 
-  return sc;
+  return StatusCode::SUCCESS;
 }
 
 // createRep should create the bytestream from RDOs.
@@ -156,13 +128,11 @@ StatusCode CpmRoiByteStreamCnv::createObj( IOpaqueAddress* pAddr,
 StatusCode CpmRoiByteStreamCnv::createRep( DataObject* pObj,
                                         IOpaqueAddress*& pAddr )
 {
-  if (m_debug) m_log << MSG::DEBUG << "createRep() called" << endmsg;
-
   RawEventWrite* re = m_ByteStreamEventAccess->getRawEvent();
 
   DataVector<LVL1::CPMRoI>* roiCollection = 0;
   if( !SG::fromStorable( pObj, roiCollection ) ) {
-    m_log << MSG::ERROR << " Cannot cast to DataVector<CPMRoI>" << endmsg;
+    REPORT_ERROR (StatusCode::FAILURE) << " Cannot cast to DataVector<CPMRoI>";
     return StatusCode::FAILURE;
   }
 
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpmRoiByteStreamCnv.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpmRoiByteStreamCnv.h
index bfab72403207..193989e3864e 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpmRoiByteStreamCnv.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpmRoiByteStreamCnv.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 TRIGT1CALOBYTESTREAM_CPMROIBYTESTREAMCNV_H
@@ -69,7 +69,6 @@ private:
   ServiceHandle<IByteStreamEventAccess> m_ByteStreamEventAccess;
 
   /// Message log
-  mutable MsgStream m_log;
   bool m_debug;
 
 };
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpmRoiByteStreamV1Cnv.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpmRoiByteStreamV1Cnv.cxx
index 44878ee34820..de4f2977fda5 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpmRoiByteStreamV1Cnv.cxx
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpmRoiByteStreamV1Cnv.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
 */
 
 
@@ -23,6 +23,7 @@
 
 #include "AthenaKernel/ClassID_traits.h"
 #include "AthenaKernel/StorableConversions.h"
+#include "AthenaKernel/errorcheck.h"
 
 #include "TrigT1CaloEvent/CPMRoI.h"
 
@@ -37,7 +38,7 @@ CpmRoiByteStreamV1Cnv::CpmRoiByteStreamV1Cnv( ISvcLocator* svcloc )
       m_tool("LVL1BS::CpmRoiByteStreamV1Tool/CpmRoiByteStreamV1Tool"),
       m_robDataProvider("ROBDataProviderSvc", m_name),
       m_ByteStreamEventAccess("ByteStreamCnvSvc", m_name),
-      m_log(msgSvc(), m_name), m_debug(false)
+      m_debug(false)
 {
 }
 
@@ -63,41 +64,18 @@ long CpmRoiByteStreamV1Cnv::storageType()
 StatusCode CpmRoiByteStreamV1Cnv::initialize()
 {
   m_debug = msgSvc()->outputLevel(m_name) <= MSG::DEBUG;
-  m_log << MSG::DEBUG << "Initializing " << m_name << " - package version "
-                      << PACKAGE_VERSION << endmsg;
 
-  StatusCode sc = Converter::initialize();
-  if ( sc.isFailure() )
-    return sc;
-
-  //Get ByteStreamCnvSvc
-  sc = m_ByteStreamEventAccess.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve service "
-          << m_ByteStreamEventAccess << endmsg;
-    return sc;
-  } else {
-    m_log << MSG::DEBUG << "Retrieved service "
-          << m_ByteStreamEventAccess << endmsg;
-  }
-
-  // Retrieve Tool
-  sc = m_tool.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve tool " << m_tool << endmsg;
-    return StatusCode::FAILURE;
-  } else m_log << MSG::DEBUG << "Retrieved tool " << m_tool << endmsg;
+  ATH_CHECK( Converter::initialize() );
+  ATH_CHECK( m_ByteStreamEventAccess.retrieve() );
+  ATH_CHECK(  m_tool.retrieve() );
 
   // Get ROBDataProvider
-  sc = m_robDataProvider.retrieve();
+  StatusCode sc = m_robDataProvider.retrieve();
   if ( sc.isFailure() ) {
-    m_log << MSG::WARNING << "Failed to retrieve service "
-          << m_robDataProvider << endmsg;
+    REPORT_MESSAGE (MSG::WARNING) << "Failed to retrieve service "
+                                  << m_robDataProvider;
     // return is disabled for Write BS which does not require ROBDataProviderSvc
     // return sc ;
-  } else {
-    m_log << MSG::DEBUG << "Retrieved service "
-          << m_robDataProvider << endmsg;
   }
 
   return StatusCode::SUCCESS;
@@ -108,18 +86,18 @@ StatusCode CpmRoiByteStreamV1Cnv::initialize()
 StatusCode CpmRoiByteStreamV1Cnv::createObj( IOpaqueAddress* pAddr,
                                              DataObject*& pObj )
 {
-  if (m_debug) m_log << MSG::DEBUG << "createObj() called" << endmsg;
-
   ByteStreamAddress *pBS_Addr;
   pBS_Addr = dynamic_cast<ByteStreamAddress *>( pAddr );
   if ( !pBS_Addr ) {
-    m_log << MSG::ERROR << " Can not cast to ByteStreamAddress " << endmsg;
+    REPORT_ERROR (StatusCode::FAILURE) << " Can not cast to ByteStreamAddress ";
     return StatusCode::FAILURE;
   }
 
   const std::string nm = *( pBS_Addr->par() );
 
-  if (m_debug) m_log << MSG::DEBUG << " Creating Objects " << nm << endmsg;
+  if (m_debug) {
+    REPORT_MESSAGE (MSG::DEBUG) << " Creating Objects " << nm;
+  }
 
   // get SourceIDs
   const std::vector<uint32_t>& vID(m_tool->sourceIDs(nm));
@@ -129,26 +107,20 @@ StatusCode CpmRoiByteStreamV1Cnv::createObj( IOpaqueAddress* pAddr,
   m_robDataProvider->getROBData( vID, robFrags );
 
   // size check
-  DataVector<LVL1::CPMRoI>* const roiCollection = new DataVector<LVL1::CPMRoI>;
+  auto roiCollection = std::make_unique<DataVector<LVL1::CPMRoI> >();
   if (m_debug) {
-    m_log << MSG::DEBUG << " Number of ROB fragments is " << robFrags.size()
-          << endmsg;
+    REPORT_MESSAGE (MSG::DEBUG) << " Number of ROB fragments is " << robFrags.size();
   }
   if (robFrags.size() == 0) {
-    pObj = SG::asStorable(roiCollection) ;
+    pObj = SG::asStorable(std::move(roiCollection)) ;
     return StatusCode::SUCCESS;
   }
 
-  StatusCode sc = m_tool->convert(robFrags, roiCollection);
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << " Failed to create Objects   " << nm << endmsg;
-    delete roiCollection;
-    return sc;
-  }
+  ATH_CHECK( m_tool->convert(robFrags, roiCollection.get()) );
 
-  pObj = SG::asStorable(roiCollection);
+  pObj = SG::asStorable(std::move(roiCollection));
 
-  return sc;
+  return StatusCode::SUCCESS;
 }
 
 // createRep should create the bytestream from RDOs.
@@ -156,13 +128,11 @@ StatusCode CpmRoiByteStreamV1Cnv::createObj( IOpaqueAddress* pAddr,
 StatusCode CpmRoiByteStreamV1Cnv::createRep( DataObject* pObj,
                                              IOpaqueAddress*& pAddr )
 {
-  if (m_debug) m_log << MSG::DEBUG << "createRep() called" << endmsg;
-
   RawEventWrite* re = m_ByteStreamEventAccess->getRawEvent();
 
   DataVector<LVL1::CPMRoI>* roiCollection = 0;
   if( !SG::fromStorable( pObj, roiCollection ) ) {
-    m_log << MSG::ERROR << " Cannot cast to DataVector<CPMRoI>" << endmsg;
+    REPORT_ERROR (StatusCode::FAILURE)  << " Cannot cast to DataVector<CPMRoI>";
     return StatusCode::FAILURE;
   }
 
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpmRoiByteStreamV1Cnv.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpmRoiByteStreamV1Cnv.h
index 5f5463f2d727..c7d5dc1e3b3c 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpmRoiByteStreamV1Cnv.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpmRoiByteStreamV1Cnv.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 TRIGT1CALOBYTESTREAM_CPMROIBYTESTREAMV1CNV_H
@@ -63,7 +63,6 @@ private:
   ServiceHandle<IByteStreamEventAccess> m_ByteStreamEventAccess;
 
   /// Message log
-  mutable MsgStream m_log;
   bool m_debug;
 
 };
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpmRoiByteStreamV2Cnv.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpmRoiByteStreamV2Cnv.cxx
index a34558df2e8b..4ecbe43930e1 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpmRoiByteStreamV2Cnv.cxx
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpmRoiByteStreamV2Cnv.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
 */
 
 
@@ -23,6 +23,7 @@
 
 #include "AthenaKernel/ClassID_traits.h"
 #include "AthenaKernel/StorableConversions.h"
+#include "AthenaKernel/errorcheck.h"
 
 #include "TrigT1CaloEvent/CPMTobRoI.h"
 
@@ -37,7 +38,7 @@ CpmRoiByteStreamV2Cnv::CpmRoiByteStreamV2Cnv( ISvcLocator* svcloc )
       m_tool("LVL1BS::CpmRoiByteStreamV2Tool/CpmRoiByteStreamV2Tool"),
       m_robDataProvider("ROBDataProviderSvc", m_name),
       m_ByteStreamEventAccess("ByteStreamCnvSvc", m_name),
-      m_log(msgSvc(), m_name), m_debug(false)
+      m_debug(false)
 {
 }
 
@@ -63,41 +64,18 @@ long CpmRoiByteStreamV2Cnv::storageType()
 StatusCode CpmRoiByteStreamV2Cnv::initialize()
 {
   m_debug = msgSvc()->outputLevel(m_name) <= MSG::DEBUG;
-  m_log << MSG::DEBUG << "Initializing " << m_name << " - package version "
-                      << PACKAGE_VERSION << endmsg;
 
-  StatusCode sc = Converter::initialize();
-  if ( sc.isFailure() )
-    return sc;
-
-  //Get ByteStreamCnvSvc
-  sc = m_ByteStreamEventAccess.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve service "
-          << m_ByteStreamEventAccess << endmsg;
-    return sc;
-  } else {
-    m_log << MSG::DEBUG << "Retrieved service "
-          << m_ByteStreamEventAccess << endmsg;
-  }
-
-  // Retrieve Tool
-  sc = m_tool.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve tool " << m_tool << endmsg;
-    return StatusCode::FAILURE;
-  } else m_log << MSG::DEBUG << "Retrieved tool " << m_tool << endmsg;
+  ATH_CHECK( Converter::initialize() );
+  ATH_CHECK( m_ByteStreamEventAccess.retrieve() );
+  ATH_CHECK( m_tool.retrieve() );
 
   // Get ROBDataProvider
-  sc = m_robDataProvider.retrieve();
+  StatusCode sc = m_robDataProvider.retrieve();
   if ( sc.isFailure() ) {
-    m_log << MSG::WARNING << "Failed to retrieve service "
-          << m_robDataProvider << endmsg;
+    REPORT_MESSAGE (MSG::WARNING) << "Failed to retrieve service "
+                                  << m_robDataProvider;
     // return is disabled for Write BS which does not require ROBDataProviderSvc
     // return sc ;
-  } else {
-    m_log << MSG::DEBUG << "Retrieved service "
-          << m_robDataProvider << endmsg;
   }
 
   return StatusCode::SUCCESS;
@@ -108,18 +86,18 @@ StatusCode CpmRoiByteStreamV2Cnv::initialize()
 StatusCode CpmRoiByteStreamV2Cnv::createObj( IOpaqueAddress* pAddr,
                                         DataObject*& pObj )
 {
-  if (m_debug) m_log << MSG::DEBUG << "createObj() called" << endmsg;
-
   ByteStreamAddress *pBS_Addr;
   pBS_Addr = dynamic_cast<ByteStreamAddress *>( pAddr );
   if ( !pBS_Addr ) {
-    m_log << MSG::ERROR << " Can not cast to ByteStreamAddress " << endmsg;
+    REPORT_ERROR (StatusCode::FAILURE) << " Can not cast to ByteStreamAddress ";
     return StatusCode::FAILURE;
   }
 
   const std::string nm = *( pBS_Addr->par() );
 
-  if (m_debug) m_log << MSG::DEBUG << " Creating Objects " << nm << endmsg;
+  if (m_debug) {
+    REPORT_MESSAGE (MSG::DEBUG) << " Creating Objects " << nm;
+  }
 
   // get SourceIDs
   const std::vector<uint32_t>& vID(m_tool->sourceIDs(nm));
@@ -129,26 +107,20 @@ StatusCode CpmRoiByteStreamV2Cnv::createObj( IOpaqueAddress* pAddr,
   m_robDataProvider->getROBData( vID, robFrags );
 
   // size check
-  DataVector<LVL1::CPMTobRoI>* const roiCollection = new DataVector<LVL1::CPMTobRoI>;
+  auto roiCollection = std::make_unique<DataVector<LVL1::CPMTobRoI> >();
   if (m_debug) {
-    m_log << MSG::DEBUG << " Number of ROB fragments is " << robFrags.size()
-          << endmsg;
+    REPORT_MESSAGE (MSG::DEBUG) <<" Number of ROB fragments is " << robFrags.size();
   }
   if (robFrags.size() == 0) {
-    pObj = SG::asStorable(roiCollection) ;
+    pObj = SG::asStorable(std::move(roiCollection)) ;
     return StatusCode::SUCCESS;
   }
 
-  StatusCode sc = m_tool->convert(robFrags, roiCollection);
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << " Failed to create Objects   " << nm << endmsg;
-    delete roiCollection;
-    return sc;
-  }
+  ATH_CHECK( m_tool->convert(robFrags, roiCollection.get()) );
 
-  pObj = SG::asStorable(roiCollection);
+  pObj = SG::asStorable(std::move(roiCollection));
 
-  return sc;
+  return StatusCode::SUCCESS;
 }
 
 // createRep should create the bytestream from RDOs.
@@ -156,13 +128,11 @@ StatusCode CpmRoiByteStreamV2Cnv::createObj( IOpaqueAddress* pAddr,
 StatusCode CpmRoiByteStreamV2Cnv::createRep( DataObject* pObj,
                                         IOpaqueAddress*& pAddr )
 {
-  if (m_debug) m_log << MSG::DEBUG << "createRep() called" << endmsg;
-
   RawEventWrite* re = m_ByteStreamEventAccess->getRawEvent();
 
   DataVector<LVL1::CPMTobRoI>* roiCollection = 0;
   if( !SG::fromStorable( pObj, roiCollection ) ) {
-    m_log << MSG::ERROR << " Cannot cast to DataVector<CPMTobRoI>" << endmsg;
+    REPORT_ERROR (StatusCode::FAILURE) << " Cannot cast to DataVector<CPMTobRoI>";
     return StatusCode::FAILURE;
   }
 
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpmRoiByteStreamV2Cnv.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpmRoiByteStreamV2Cnv.h
index 6f80a49e0af6..e97d2c4d8b2a 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpmRoiByteStreamV2Cnv.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpmRoiByteStreamV2Cnv.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 TRIGT1CALOBYTESTREAM_CPMROIBYTESTREAMV2CNV_H
@@ -63,7 +63,6 @@ private:
   ServiceHandle<IByteStreamEventAccess> m_ByteStreamEventAccess;
 
   /// Message log
-  mutable MsgStream m_log;
   bool m_debug;
 
 };
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamCnv.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamCnv.cxx
index b1bb4cebd7d9..4d079ee4c3f3 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamCnv.cxx
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -21,6 +21,7 @@
 
 #include "AthenaKernel/ClassID_traits.h"
 #include "AthenaKernel/StorableConversions.h"
+#include "AthenaKernel/errorcheck.h"
 
 #include "TrigT1CaloEvent/JEPBSCollection.h"
 
@@ -33,8 +34,7 @@ JepByteStreamCnv::JepByteStreamCnv( ISvcLocator* svcloc )
     : Converter( storageType(), classID(), svcloc ),
       m_name("JepByteStreamCnv"),
       m_tool("LVL1BS::JepByteStreamTool/JepByteStreamTool"),
-      m_ByteStreamEventAccess("ByteStreamCnvSvc", m_name),
-      m_log(msgSvc(), m_name), m_debug(false)
+      m_ByteStreamEventAccess("ByteStreamCnvSvc", m_name)
 {
 }
 
@@ -59,31 +59,9 @@ long JepByteStreamCnv::storageType()
 
 StatusCode JepByteStreamCnv::initialize()
 {
-  m_debug = msgSvc()->outputLevel(m_name) <= MSG::DEBUG;
-  m_log << MSG::DEBUG << "Initializing " << m_name << " - package version "
-                      << PACKAGE_VERSION << endmsg;
-
-  StatusCode sc = Converter::initialize();
-  if ( sc.isFailure() )
-    return sc;
-
-  //Get ByteStreamCnvSvc
-  sc = m_ByteStreamEventAccess.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve service "
-          << m_ByteStreamEventAccess << endmsg;
-    return sc;
-  } else {
-    m_log << MSG::DEBUG << "Retrieved service "
-          << m_ByteStreamEventAccess << endmsg;
-  }
-
-  // Retrieve Tool
-  sc = m_tool.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve tool " << m_tool << endmsg;
-    return StatusCode::FAILURE;
-  } else m_log << MSG::DEBUG << "Retrieved tool " << m_tool << endmsg;
+  ATH_CHECK( Converter::initialize() );
+  ATH_CHECK( m_ByteStreamEventAccess.retrieve() );
+  ATH_CHECK(  m_tool.retrieve() );
 
   return StatusCode::SUCCESS;
 }
@@ -93,13 +71,11 @@ StatusCode JepByteStreamCnv::initialize()
 StatusCode JepByteStreamCnv::createRep( DataObject* pObj,
                                         IOpaqueAddress*& pAddr )
 {
-  if (m_debug) m_log << MSG::DEBUG << "createRep() called" << endmsg;
-
   RawEventWrite* re = m_ByteStreamEventAccess->getRawEvent();
 
   LVL1::JEPBSCollection* jep = 0;
   if( !SG::fromStorable( pObj, jep ) ) {
-    m_log << MSG::ERROR << " Cannot cast to JEPBSCollection" << endmsg;
+    REPORT_ERROR (StatusCode::FAILURE) << " Cannot cast to JEPBSCollection";
     return StatusCode::FAILURE;
   }
 
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamCnv.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamCnv.h
index c09e547c2bd7..0e5a5457a5d9 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamCnv.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamCnv.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 TRIGT1CALOBYTESTREAM_JEPBYTESTREAMCNV_H
@@ -62,11 +62,6 @@ private:
 
   /// Service for writing bytestream
   ServiceHandle<IByteStreamEventAccess> m_ByteStreamEventAccess;
-
-  /// Message log
-  mutable MsgStream m_log;
-  bool m_debug;
-
 };
 
 } // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV1Cnv.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV1Cnv.cxx
index acd48877dd64..14ceefa9e1d7 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV1Cnv.cxx
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV1Cnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -21,6 +21,7 @@
 
 #include "AthenaKernel/ClassID_traits.h"
 #include "AthenaKernel/StorableConversions.h"
+#include "AthenaKernel/errorcheck.h"
 
 #include "TrigT1CaloEvent/JEPBSCollectionV1.h"
 
@@ -33,8 +34,7 @@ JepByteStreamV1Cnv::JepByteStreamV1Cnv( ISvcLocator* svcloc )
     : Converter( storageType(), classID(), svcloc ),
       m_name("JepByteStreamV1Cnv"),
       m_tool("LVL1BS::JepByteStreamV1Tool/JepByteStreamV1Tool"),
-      m_ByteStreamEventAccess("ByteStreamCnvSvc", m_name),
-      m_log(msgSvc(), m_name), m_debug(false)
+      m_ByteStreamEventAccess("ByteStreamCnvSvc", m_name)
 {
 }
 
@@ -59,31 +59,9 @@ long JepByteStreamV1Cnv::storageType()
 
 StatusCode JepByteStreamV1Cnv::initialize()
 {
-  m_debug = msgSvc()->outputLevel(m_name) <= MSG::DEBUG;
-  m_log << MSG::DEBUG << "Initializing " << m_name << " - package version "
-                      << PACKAGE_VERSION << endmsg;
-
-  StatusCode sc = Converter::initialize();
-  if ( sc.isFailure() )
-    return sc;
-
-  //Get ByteStreamCnvSvc
-  sc = m_ByteStreamEventAccess.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve service "
-          << m_ByteStreamEventAccess << endmsg;
-    return sc;
-  } else {
-    m_log << MSG::DEBUG << "Retrieved service "
-          << m_ByteStreamEventAccess << endmsg;
-  }
-
-  // Retrieve Tool
-  sc = m_tool.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve tool " << m_tool << endmsg;
-    return StatusCode::FAILURE;
-  } else m_log << MSG::DEBUG << "Retrieved tool " << m_tool << endmsg;
+  ATH_CHECK( Converter::initialize() );
+  ATH_CHECK( m_ByteStreamEventAccess.retrieve() );
+  ATH_CHECK( m_tool.retrieve() );
 
   return StatusCode::SUCCESS;
 }
@@ -93,13 +71,11 @@ StatusCode JepByteStreamV1Cnv::initialize()
 StatusCode JepByteStreamV1Cnv::createRep( DataObject* pObj,
                                           IOpaqueAddress*& pAddr )
 {
-  if (m_debug) m_log << MSG::DEBUG << "createRep() called" << endmsg;
-
   RawEventWrite* re = m_ByteStreamEventAccess->getRawEvent();
 
   LVL1::JEPBSCollectionV1* jep = 0;
   if( !SG::fromStorable( pObj, jep ) ) {
-    m_log << MSG::ERROR << " Cannot cast to JEPBSCollectionV1" << endmsg;
+    REPORT_ERROR (StatusCode::FAILURE) << " Cannot cast to JEPBSCollectionV1";
     return StatusCode::FAILURE;
   }
 
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV1Cnv.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV1Cnv.h
index b7242d981428..1d8ebb467b25 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV1Cnv.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV1Cnv.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 TRIGT1CALOBYTESTREAM_JEPBYTESTREAMV1CNV_H
@@ -56,11 +56,6 @@ private:
 
   /// Service for writing bytestream
   ServiceHandle<IByteStreamEventAccess> m_ByteStreamEventAccess;
-
-  /// Message log
-  mutable MsgStream m_log;
-  bool m_debug;
-
 };
 
 } // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV2Cnv.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV2Cnv.cxx
index e4c469825fd6..057507e5fc14 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV2Cnv.cxx
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV2Cnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -21,6 +21,7 @@
 
 #include "AthenaKernel/ClassID_traits.h"
 #include "AthenaKernel/StorableConversions.h"
+#include "AthenaKernel/errorcheck.h"
 
 #include "TrigT1CaloEvent/JEPBSCollectionV2.h"
 
@@ -33,8 +34,7 @@ JepByteStreamV2Cnv::JepByteStreamV2Cnv( ISvcLocator* svcloc )
     : Converter( storageType(), classID(), svcloc ),
       m_name("JepByteStreamV2Cnv"),
       m_tool("LVL1BS::JepByteStreamV2Tool/JepByteStreamV2Tool"),
-      m_ByteStreamEventAccess("ByteStreamCnvSvc", m_name),
-      m_log(msgSvc(), m_name), m_debug(false)
+      m_ByteStreamEventAccess("ByteStreamCnvSvc", m_name)
 {
 }
 
@@ -59,31 +59,9 @@ long JepByteStreamV2Cnv::storageType()
 
 StatusCode JepByteStreamV2Cnv::initialize()
 {
-  m_debug = msgSvc()->outputLevel(m_name) <= MSG::DEBUG;
-  m_log << MSG::DEBUG << "Initializing " << m_name << " - package version "
-                      << PACKAGE_VERSION << endmsg;
-
-  StatusCode sc = Converter::initialize();
-  if ( sc.isFailure() )
-    return sc;
-
-  //Get ByteStreamCnvSvc
-  sc = m_ByteStreamEventAccess.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve service "
-          << m_ByteStreamEventAccess << endmsg;
-    return sc;
-  } else {
-    m_log << MSG::DEBUG << "Retrieved service "
-          << m_ByteStreamEventAccess << endmsg;
-  }
-
-  // Retrieve Tool
-  sc = m_tool.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve tool " << m_tool << endmsg;
-    return StatusCode::FAILURE;
-  } else m_log << MSG::DEBUG << "Retrieved tool " << m_tool << endmsg;
+  ATH_CHECK( Converter::initialize() );
+  ATH_CHECK( m_ByteStreamEventAccess.retrieve() );
+  ATH_CHECK( m_tool.retrieve() );
 
   return StatusCode::SUCCESS;
 }
@@ -93,13 +71,11 @@ StatusCode JepByteStreamV2Cnv::initialize()
 StatusCode JepByteStreamV2Cnv::createRep( DataObject* pObj,
                                           IOpaqueAddress*& pAddr )
 {
-  if (m_debug) m_log << MSG::DEBUG << "createRep() called" << endmsg;
-
   RawEventWrite* re = m_ByteStreamEventAccess->getRawEvent();
 
   LVL1::JEPBSCollectionV2* jep = 0;
   if( !SG::fromStorable( pObj, jep ) ) {
-    m_log << MSG::ERROR << " Cannot cast to JEPBSCollectionV2" << endmsg;
+    REPORT_ERROR (StatusCode::FAILURE) << " Cannot cast to JEPBSCollectionV2";
     return StatusCode::FAILURE;
   }
 
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV2Cnv.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV2Cnv.h
index 9b438874c5a6..107bf8dc8af0 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV2Cnv.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV2Cnv.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 TRIGT1CALOBYTESTREAM_JEPBYTESTREAMV2CNV_H
@@ -56,11 +56,6 @@ private:
 
   /// Service for writing bytestream
   ServiceHandle<IByteStreamEventAccess> m_ByteStreamEventAccess;
-
-  /// Message log
-  mutable MsgStream m_log;
-  bool m_debug;
-
 };
 
 } // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamCnv.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamCnv.h
deleted file mode 100644
index b3a0a0e911a4..000000000000
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamCnv.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef TRIGT1CALOBYTESTREAM_JEPREADBYTESTREAMCNV_H
-#define TRIGT1CALOBYTESTREAM_JEPREADBYTESTREAMCNV_H
-
-#include <string>
-
-#include "GaudiKernel/ClassID.h"
-#include "GaudiKernel/Converter.h"
-#include "GaudiKernel/MsgStream.h"
-#include "GaudiKernel/ServiceHandle.h"
-#include "GaudiKernel/ToolHandle.h"
-
-class DataObject;
-class IOpaqueAddress;
-class IROBDataProviderSvc;
-class ISvcLocator;
-class StatusCode;
-
-template <typename> class CnvFactory;
-
-
-namespace LVL1BS {
-
-class JepByteStreamTool;
-
-/** ByteStream converter for JEP component containers.
- *
- *  @author Peter Faulkner
- */
-
-template <typename Container>
-class JepReadByteStreamCnv: public Converter {
-
-  friend class CnvFactory<JepReadByteStreamCnv<Container> >;
-
-protected:
-
-  JepReadByteStreamCnv(ISvcLocator* svcloc);
-
-public:
-
-  ~JepReadByteStreamCnv();
-
-  virtual StatusCode initialize();
-  /// Create Container from ByteStream
-  virtual StatusCode createObj(IOpaqueAddress* pAddr, DataObject*& pObj);
-
-  //  Storage type and class ID
-  virtual long repSvcType() const { return i_repSvcType(); }
-  static  long storageType();
-  static const CLID& classID();
-
-private:
-
-  /// Converter name
-  std::string m_name;
-
-  /// Tool that does the actual work
-  ToolHandle<JepByteStreamTool> m_tool;
-
-  /// Service for reading bytestream
-  ServiceHandle<IROBDataProviderSvc> m_robDataProvider;
-
-  /// Message log
-  mutable MsgStream m_log;
-  bool m_debug;
-
-};
-
-} // end namespace
-
-#include "JepReadByteStreamCnv.icc"
-
-#endif
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamCnv.icc b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamCnv.icc
deleted file mode 100644
index 59ac60b26053..000000000000
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamCnv.icc
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-
-#include <vector>
-#include <stdint.h>
-#include <typeinfo>
-
-#include "ByteStreamCnvSvcBase/ByteStreamAddress.h"
-#include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h"
-
-#include "ByteStreamData/RawEvent.h"
-#include "ByteStreamData/ROBData.h"
-
-#include "GaudiKernel/DataObject.h"
-#include "GaudiKernel/IOpaqueAddress.h"
-#include "GaudiKernel/ISvcLocator.h"
-#include "GaudiKernel/StatusCode.h"
-
-#include "AthenaKernel/ClassID_traits.h"
-#include "AthenaKernel/StorableConversions.h"
-
-#include "JepByteStreamTool.h"
-
-namespace LVL1BS {
-
-template <typename Container>
-JepReadByteStreamCnv<Container>::JepReadByteStreamCnv( ISvcLocator* svcloc )
-    : Converter( storageType(), classID(), svcloc ),
-      m_name("JepReadByteStreamCnv"),
-      m_tool("LVL1BS::JepByteStreamTool/JepByteStreamTool"),
-      m_robDataProvider("ROBDataProviderSvc", m_name),
-      m_log(msgSvc(), m_name), m_debug(false)
-{
-}
-
-template <typename Container>
-JepReadByteStreamCnv<Container>::~JepReadByteStreamCnv()
-{
-}
-
-// CLID
-
-template <typename Container>
-const CLID& JepReadByteStreamCnv<Container>::classID()
-{
-  return ClassID_traits<Container>::ID();
-}
-
-long JepReadByteStreamCnv<Container>::storageType()
-{
-  return ByteStreamAddress::storageType();
-}
-
-//  Init method gets all necessary services etc.
-
-
-template <typename Container>
-StatusCode JepReadByteStreamCnv<Container>::initialize()
-{
-  m_debug = msgSvc()->outputLevel(m_name) <= MSG::DEBUG;
-  m_log << MSG::DEBUG << "Initializing " << m_name << "<"
-                      << typeid(Container).name() << "> - package version "
-                      << PACKAGE_VERSION << endmsg;
-
-  StatusCode sc = Converter::initialize();
-  if ( sc.isFailure() )
-    return sc;
-
-  // Retrieve Tool
-  sc = m_tool.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve tool " << m_tool << endmsg;
-    return StatusCode::FAILURE;
-  } else m_log << MSG::DEBUG << "Retrieved tool " << m_tool << endmsg;
-
-  // Get ROBDataProvider
-  sc = m_robDataProvider.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve service "
-          << m_robDataProvider << endmsg;
-    return sc;
-  } else {
-    m_log << MSG::DEBUG << "Retrieved service "
-          << m_robDataProvider << endmsg;
-  }
-
-  return StatusCode::SUCCESS;
-}
-
-// createObj should create the RDO from bytestream.
-
-template <typename Container>
-StatusCode JepReadByteStreamCnv<Container>::createObj( IOpaqueAddress* pAddr,
-                                                       DataObject*& pObj )
-{
-  if (m_debug) m_log << MSG::DEBUG << "createObj() called" << endmsg;
-
-  ByteStreamAddress *pBS_Addr;
-  pBS_Addr = dynamic_cast<ByteStreamAddress *>( pAddr );
-  if ( !pBS_Addr ) {
-    m_log << MSG::ERROR << " Can not cast to ByteStreamAddress " << endmsg;
-    return StatusCode::FAILURE;
-  }
-
-  const std::string nm = *( pBS_Addr->par() );
-
-  if (m_debug) m_log << MSG::DEBUG << " Creating Objects " << nm << endmsg;
-
-  // get SourceIDs
-  const std::vector<uint32_t>& vID(m_tool->sourceIDs(nm));
-
-  // get ROB fragments
-  IROBDataProviderSvc::VROBFRAG robFrags;
-  m_robDataProvider->getROBData( vID, robFrags );
-
-  // size check
-  Container* const collection = new Container;
-  if (m_debug) {
-    m_log << MSG::DEBUG << " Number of ROB fragments is " << robFrags.size()
-          << endmsg;
-  }
-  if (robFrags.size() == 0) {
-    pObj = SG::asStorable(collection) ;
-    return StatusCode::SUCCESS;
-  }
-
-  StatusCode sc = m_tool->convert(robFrags, collection);
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << " Failed to create Objects   " << nm << endmsg;
-    delete collection;
-    return sc;
-  }
-
-  pObj = SG::asStorable(collection);
-
-  return sc;
-}
-
-} // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamV1Cnv.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamV1Cnv.h
index 4d128e9fd83d..6f905cb06d6d 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamV1Cnv.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamV1Cnv.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 TRIGT1CALOBYTESTREAM_JEPREADBYTESTREAMV1CNV_H
@@ -60,9 +60,7 @@ private:
   ServiceHandle<IROBDataProviderSvc> m_robDataProvider;
 
   /// Message log
-  mutable MsgStream m_log;
   bool m_debug;
-
 };
 
 } // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamV1Cnv.icc b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamV1Cnv.icc
index ae49f932598d..788491d1ab54 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamV1Cnv.icc
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamV1Cnv.icc
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -20,6 +20,7 @@
 
 #include "AthenaKernel/ClassID_traits.h"
 #include "AthenaKernel/StorableConversions.h"
+#include "AthenaKernel/errorcheck.h"
 
 #include "JepByteStreamV1Tool.h"
 
@@ -31,7 +32,7 @@ JepReadByteStreamV1Cnv<Container>::JepReadByteStreamV1Cnv( ISvcLocator* svcloc )
       m_name("JepReadByteStreamV1Cnv"),
       m_tool("LVL1BS::JepByteStreamV1Tool/JepByteStreamV1Tool"),
       m_robDataProvider("ROBDataProviderSvc", m_name),
-      m_log(msgSvc(), m_name), m_debug(false)
+      m_debug(false)
 {
 }
 
@@ -61,31 +62,10 @@ template <typename Container>
 StatusCode JepReadByteStreamV1Cnv<Container>::initialize()
 {
   m_debug = msgSvc()->outputLevel(m_name) <= MSG::DEBUG;
-  m_log << MSG::DEBUG << "Initializing " << m_name << "<"
-                      << typeid(Container).name() << "> - package version "
-                      << PACKAGE_VERSION << endmsg;
-
-  StatusCode sc = Converter::initialize();
-  if ( sc.isFailure() )
-    return sc;
-
-  // Retrieve Tool
-  sc = m_tool.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve tool " << m_tool << endmsg;
-    return StatusCode::FAILURE;
-  } else m_log << MSG::DEBUG << "Retrieved tool " << m_tool << endmsg;
-
-  // Get ROBDataProvider
-  sc = m_robDataProvider.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve service "
-          << m_robDataProvider << endmsg;
-    return sc;
-  } else {
-    m_log << MSG::DEBUG << "Retrieved service "
-          << m_robDataProvider << endmsg;
-  }
+
+  ATH_CHECK( Converter::initialize() );
+  ATH_CHECK( m_tool.retrieve() );
+  ATH_CHECK( m_robDataProvider.retrieve() );
 
   return StatusCode::SUCCESS;
 }
@@ -96,18 +76,18 @@ template <typename Container>
 StatusCode JepReadByteStreamV1Cnv<Container>::createObj( IOpaqueAddress* pAddr,
                                                          DataObject*& pObj )
 {
-  if (m_debug) m_log << MSG::DEBUG << "createObj() called" << endmsg;
-
   ByteStreamAddress *pBS_Addr;
   pBS_Addr = dynamic_cast<ByteStreamAddress *>( pAddr );
   if ( !pBS_Addr ) {
-    m_log << MSG::ERROR << " Can not cast to ByteStreamAddress " << endmsg;
+    REPORT_ERROR (StatusCode::FAILURE) << " Can not cast to ByteStreamAddress ";
     return StatusCode::FAILURE;
   }
 
   const std::string nm = *( pBS_Addr->par() );
 
-  if (m_debug) m_log << MSG::DEBUG << " Creating Objects " << nm << endmsg;
+  if (m_debug) {
+    REPORT_MESSAGE (MSG::DEBUG) << " Creating Objects " << nm;
+  }
 
   // get SourceIDs
   const std::vector<uint32_t>& vID(m_tool->sourceIDs(nm));
@@ -117,26 +97,20 @@ StatusCode JepReadByteStreamV1Cnv<Container>::createObj( IOpaqueAddress* pAddr,
   m_robDataProvider->getROBData( vID, robFrags );
 
   // size check
-  Container* const collection = new Container;
+  auto collection = std::make_unique<Container>();
   if (m_debug) {
-    m_log << MSG::DEBUG << " Number of ROB fragments is " << robFrags.size()
-          << endmsg;
+    REPORT_MESSAGE (MSG::DEBUG) << " Number of ROB fragments is " << robFrags.size();
   }
   if (robFrags.size() == 0) {
-    pObj = SG::asStorable(collection) ;
+    pObj = SG::asStorable(std::move(collection)) ;
     return StatusCode::SUCCESS;
   }
 
-  StatusCode sc = m_tool->convert(robFrags, collection);
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << " Failed to create Objects   " << nm << endmsg;
-    delete collection;
-    return sc;
-  }
+  ATH_CHECK( m_tool->convert(robFrags, collection.get()) );
 
-  pObj = SG::asStorable(collection);
+  pObj = SG::asStorable(std::move(collection));
 
-  return sc;
+  return StatusCode::SUCCESS;
 }
 
 } // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamV1V2Cnv.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamV1V2Cnv.h
index 2a0acf8560ad..ac3746194a05 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamV1V2Cnv.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamV1V2Cnv.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 TRIGT1CALOBYTESTREAM_JEPREADBYTESTREAMV1V2CNV_H
@@ -66,9 +66,7 @@ private:
   ServiceHandle<IROBDataProviderSvc> m_robDataProvider;
 
   /// Message log
-  mutable MsgStream m_log;
   bool m_debug;
-
 };
 
 } // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamV1V2Cnv.icc b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamV1V2Cnv.icc
index b1a71bb45d4b..2b32a33b6796 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamV1V2Cnv.icc
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamV1V2Cnv.icc
@@ -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
 */
 
 
@@ -23,6 +23,7 @@
 
 #include "AthenaKernel/ClassID_traits.h"
 #include "AthenaKernel/StorableConversions.h"
+#include "AthenaKernel/errorcheck.h"
 
 #include "JepByteStreamV1Tool.h"
 #include "JepByteStreamV2Tool.h"
@@ -36,7 +37,7 @@ JepReadByteStreamV1V2Cnv<Container>::JepReadByteStreamV1V2Cnv( ISvcLocator* svcl
       m_tool1("LVL1BS::JepByteStreamV1Tool/JepByteStreamV1Tool"),
       m_tool2("LVL1BS::JepByteStreamV2Tool/JepByteStreamV2Tool"),
       m_robDataProvider("ROBDataProviderSvc", m_name),
-      m_log(msgSvc(), m_name), m_debug(false)
+      m_debug(false)
 {
 }
 
@@ -66,35 +67,11 @@ template <typename Container>
 StatusCode JepReadByteStreamV1V2Cnv<Container>::initialize()
 {
   m_debug = msgSvc()->outputLevel(m_name) <= MSG::DEBUG;
-  m_log << MSG::DEBUG << "Initializing " << m_name << " - package version "
-                      << PACKAGE_VERSION << endmsg;
 
-  StatusCode sc = Converter::initialize();
-  if ( sc.isFailure() )
-    return sc;
-
-  // Retrieve Tools
-  sc = m_tool1.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve tool " << m_tool1 << endmsg;
-    return StatusCode::FAILURE;
-  } else m_log << MSG::DEBUG << "Retrieved tool " << m_tool1 << endmsg;
-  sc = m_tool2.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve tool " << m_tool2 << endmsg;
-    return StatusCode::FAILURE;
-  } else m_log << MSG::DEBUG << "Retrieved tool " << m_tool2 << endmsg;
-
-  // Get ROBDataProvider
-  sc = m_robDataProvider.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::WARNING << "Failed to retrieve service "
-          << m_robDataProvider << endmsg;
-    return sc ;
-  } else {
-    m_log << MSG::DEBUG << "Retrieved service "
-          << m_robDataProvider << endmsg;
-  }
+  ATH_CHECK( Converter::initialize() );
+  ATH_CHECK( m_tool1.retrieve() );
+  ATH_CHECK( m_tool2.retrieve() );
+  ATH_CHECK( m_robDataProvider.retrieve() );
 
   return StatusCode::SUCCESS;
 }
@@ -105,18 +82,18 @@ template <typename Container>
 StatusCode JepReadByteStreamV1V2Cnv<Container>::createObj( IOpaqueAddress* pAddr,
                                                 DataObject*& pObj )
 {
-  if (m_debug) m_log << MSG::DEBUG << "createObj() called" << endmsg;
-
   ByteStreamAddress *pBS_Addr;
   pBS_Addr = dynamic_cast<ByteStreamAddress *>( pAddr );
   if ( !pBS_Addr ) {
-    m_log << MSG::ERROR << " Can not cast to ByteStreamAddress " << endmsg;
+    REPORT_ERROR (StatusCode::FAILURE) << " Can not cast to ByteStreamAddress ";
     return StatusCode::FAILURE;
   }
 
   const std::string nm = *( pBS_Addr->par() );
 
-  if (m_debug) m_log << MSG::DEBUG << " Creating Objects " << nm << endmsg;
+  if (m_debug) {
+    REPORT_MESSAGE (MSG::DEBUG) << " Creating Objects " << nm;
+  }
 
   // get SourceIDs
   const std::vector<uint32_t>& vID1(m_tool1->sourceIDs(nm));
@@ -129,36 +106,26 @@ StatusCode JepReadByteStreamV1V2Cnv<Container>::createObj( IOpaqueAddress* pAddr
   m_robDataProvider->getROBData( vID2, robFrags2 );
 
   // size check
-  Container* const collection = new Container;
+  auto collection = std::make_unique<Container>();
   if (m_debug) {
-    m_log << MSG::DEBUG << " Number of ROB fragments is " << robFrags1.size()
-          << ", " << robFrags2.size() << endmsg;
+    REPORT_MESSAGE (MSG::DEBUG) << " Number of ROB fragments is " << robFrags1.size()
+                                << ", " << robFrags2.size();
   }
   if (robFrags1.size() == 0 && robFrags2.size() == 0) {
-    pObj = SG::asStorable(collection) ;
+    pObj = SG::asStorable(std::move(collection)) ;
     return StatusCode::SUCCESS;
   }
 
   // Pre-LS1 data
   if (robFrags1.size() > 0) {
-    StatusCode sc = m_tool1->convert(robFrags1, collection);
-    if ( sc.isFailure() ) {
-      m_log << MSG::ERROR << " Failed to create Objects   " << nm << endmsg;
-      delete collection;
-      return sc;
-    }
+    ATH_CHECK( m_tool1->convert(robFrags1, collection.get()) );
   }
   // Post-LS1 data
   if (robFrags2.size() > 0) {
-    StatusCode sc = m_tool2->convert(robFrags2, collection);
-    if ( sc.isFailure() ) {
-      m_log << MSG::ERROR << " Failed to create Objects   " << nm << endmsg;
-      delete collection;
-      return sc;
-    }
+    ATH_CHECK( m_tool2->convert(robFrags2, collection.get()) );
   }
 
-  pObj = SG::asStorable(collection);
+  pObj = SG::asStorable(std::move(collection));
 
   return StatusCode::SUCCESS;
 }
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamV2Cnv.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamV2Cnv.h
index e2c407133c86..bf9ccab5e24c 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamV2Cnv.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamV2Cnv.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 TRIGT1CALOBYTESTREAM_JEPREADBYTESTREAMV2CNV_H
@@ -59,9 +59,7 @@ private:
   ServiceHandle<IROBDataProviderSvc> m_robDataProvider;
 
   /// Message log
-  mutable MsgStream m_log;
   bool m_debug;
-
 };
 
 } // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamV2Cnv.icc b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamV2Cnv.icc
index 92a5f1d292e3..fdcdaa758d56 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamV2Cnv.icc
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepReadByteStreamV2Cnv.icc
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -20,6 +20,7 @@
 
 #include "AthenaKernel/ClassID_traits.h"
 #include "AthenaKernel/StorableConversions.h"
+#include "AthenaKernel/errorcheck.h"
 
 #include "JepByteStreamV2Tool.h"
 
@@ -31,7 +32,7 @@ JepReadByteStreamV2Cnv<Container>::JepReadByteStreamV2Cnv( ISvcLocator* svcloc )
       m_name("JepReadByteStreamV2Cnv"),
       m_tool("LVL1BS::JepByteStreamV2Tool/JepByteStreamV2Tool"),
       m_robDataProvider("ROBDataProviderSvc", m_name),
-      m_log(msgSvc(), m_name), m_debug(false)
+      m_debug(false)
 {
 }
 
@@ -60,31 +61,10 @@ template <typename Container>
 StatusCode JepReadByteStreamV2Cnv<Container>::initialize()
 {
   m_debug = msgSvc()->outputLevel(m_name) <= MSG::DEBUG;
-  m_log << MSG::DEBUG << "Initializing " << m_name << "<"
-                      << typeid(Container).name() << "> - package version "
-                      << PACKAGE_VERSION << endmsg;
-
-  StatusCode sc = Converter::initialize();
-  if ( sc.isFailure() )
-    return sc;
-
-  // Retrieve Tool
-  sc = m_tool.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve tool " << m_tool << endmsg;
-    return StatusCode::FAILURE;
-  } else m_log << MSG::DEBUG << "Retrieved tool " << m_tool << endmsg;
-
-  // Get ROBDataProvider
-  sc = m_robDataProvider.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve service "
-          << m_robDataProvider << endmsg;
-    return sc;
-  } else {
-    m_log << MSG::DEBUG << "Retrieved service "
-          << m_robDataProvider << endmsg;
-  }
+
+  ATH_CHECK( Converter::initialize() );
+  ATH_CHECK( m_tool.retrieve() );
+  ATH_CHECK( m_robDataProvider.retrieve() );
 
   return StatusCode::SUCCESS;
 }
@@ -95,18 +75,18 @@ template <typename Container>
 StatusCode JepReadByteStreamV2Cnv<Container>::createObj( IOpaqueAddress* pAddr,
                                                          DataObject*& pObj )
 {
-  if (m_debug) m_log << MSG::DEBUG << "createObj() called" << endmsg;
-
   ByteStreamAddress *pBS_Addr;
   pBS_Addr = dynamic_cast<ByteStreamAddress *>( pAddr );
   if ( !pBS_Addr ) {
-    m_log << MSG::ERROR << " Can not cast to ByteStreamAddress " << endmsg;
+    REPORT_ERROR (StatusCode::FAILURE) << " Can not cast to ByteStreamAddress ";
     return StatusCode::FAILURE;
   }
 
   const std::string nm = *( pBS_Addr->par() );
 
-  if (m_debug) m_log << MSG::DEBUG << " Creating Objects " << nm << endmsg;
+  if (m_debug) {
+    REPORT_MESSAGE (MSG::DEBUG) << " Creating Objects " << nm;
+  }
 
   // get SourceIDs
   const std::vector<uint32_t>& vID(m_tool->sourceIDs(nm));
@@ -116,24 +96,18 @@ StatusCode JepReadByteStreamV2Cnv<Container>::createObj( IOpaqueAddress* pAddr,
   m_robDataProvider->getROBData( vID, robFrags );
 
   // size check
-  Container* const collection = new Container;
+  auto collection = std::make_unique<Container>();
   if (m_debug) {
-    m_log << MSG::DEBUG << " Number of ROB fragments is " << robFrags.size()
-          << endmsg;
+    REPORT_MESSAGE (MSG::DEBUG) << " Number of ROB fragments is " << robFrags.size();
   }
   if (robFrags.size() == 0) {
-    pObj = SG::asStorable(collection) ;
+    pObj = SG::asStorable(std::move(collection)) ;
     return StatusCode::SUCCESS;
   }
 
-  StatusCode sc = m_tool->convert(robFrags, collection);
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << " Failed to create Objects   " << nm << endmsg;
-    delete collection;
-    return sc;
-  }
+  ATH_CHECK( m_tool->convert(robFrags, collection.get()) );
 
-  pObj = SG::asStorable(collection);
+  pObj = SG::asStorable(std::move(collection));
 
   return sc;
 }
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiByteStreamCnv.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiByteStreamCnv.cxx
index 5ce5ba0d4fa7..dab2dc2ce7ee 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiByteStreamCnv.cxx
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiByteStreamCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -21,6 +21,7 @@
 
 #include "AthenaKernel/ClassID_traits.h"
 #include "AthenaKernel/StorableConversions.h"
+#include "AthenaKernel/errorcheck.h"
 
 #include "TrigT1CaloEvent/JEPRoIBSCollection.h"
 
@@ -33,8 +34,7 @@ JepRoiByteStreamCnv::JepRoiByteStreamCnv( ISvcLocator* svcloc )
     : Converter( storageType(), classID(), svcloc ),
       m_name("JepRoiByteStreamCnv"),
       m_tool("LVL1BS::JepRoiByteStreamTool/JepRoiByteStreamTool"),
-      m_ByteStreamEventAccess("ByteStreamCnvSvc", m_name),
-      m_log(msgSvc(), m_name), m_debug(false)
+      m_ByteStreamEventAccess("ByteStreamCnvSvc", m_name)
 {
 }
 
@@ -59,31 +59,9 @@ long JepRoiByteStreamCnv::storageType()
 
 StatusCode JepRoiByteStreamCnv::initialize()
 {
-  m_debug = msgSvc()->outputLevel(m_name) <= MSG::DEBUG;
-  m_log << MSG::DEBUG << "Initializing " << m_name << " - package version "
-                      << PACKAGE_VERSION << endmsg;
-
-  StatusCode sc = Converter::initialize();
-  if ( sc.isFailure() )
-    return sc;
-
-  //Get ByteStreamCnvSvc
-  sc = m_ByteStreamEventAccess.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve service "
-          << m_ByteStreamEventAccess << endmsg;
-    return sc;
-  } else {
-    m_log << MSG::DEBUG << "Retrieved service "
-          << m_ByteStreamEventAccess << endmsg;
-  }
-
-  // Retrieve Tool
-  sc = m_tool.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve tool " << m_tool << endmsg;
-    return StatusCode::FAILURE;
-  } else m_log << MSG::DEBUG << "Retrieved tool " << m_tool << endmsg;
+  ATH_CHECK( Converter::initialize() );
+  ATH_CHECK( m_ByteStreamEventAccess.retrieve() );
+  ATH_CHECK( m_tool.retrieve() );
 
   return StatusCode::SUCCESS;
 }
@@ -93,13 +71,11 @@ StatusCode JepRoiByteStreamCnv::initialize()
 StatusCode JepRoiByteStreamCnv::createRep( DataObject* pObj,
                                         IOpaqueAddress*& pAddr )
 {
-  if (m_debug) m_log << MSG::DEBUG << "createRep() called" << endmsg;
-
   RawEventWrite* re = m_ByteStreamEventAccess->getRawEvent();
 
   LVL1::JEPRoIBSCollection* jep = 0;
   if( !SG::fromStorable( pObj, jep ) ) {
-    m_log << MSG::ERROR << " Cannot cast to JEPRoIBSCollection" << endmsg;
+    REPORT_ERROR (StatusCode::FAILURE) << " Cannot cast to JEPRoIBSCollection";
     return StatusCode::FAILURE;
   }
 
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiByteStreamCnv.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiByteStreamCnv.h
index 86a955aada9d..edb9ce6ef309 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiByteStreamCnv.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiByteStreamCnv.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 TRIGT1CALOBYTESTREAM_JEPROIBYTESTREAMCNV_H
@@ -62,11 +62,6 @@ private:
 
   /// Service for writing bytestream
   ServiceHandle<IByteStreamEventAccess> m_ByteStreamEventAccess;
-
-  /// Message log
-  mutable MsgStream m_log;
-  bool m_debug;
-
 };
 
 } // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiByteStreamV1Cnv.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiByteStreamV1Cnv.cxx
index 41a1faa5e82d..f4545b970523 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiByteStreamV1Cnv.cxx
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiByteStreamV1Cnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -21,6 +21,7 @@
 
 #include "AthenaKernel/ClassID_traits.h"
 #include "AthenaKernel/StorableConversions.h"
+#include "AthenaKernel/errorcheck.h"
 
 #include "TrigT1CaloEvent/JEPRoIBSCollectionV1.h"
 
@@ -33,8 +34,7 @@ JepRoiByteStreamV1Cnv::JepRoiByteStreamV1Cnv( ISvcLocator* svcloc )
     : Converter( storageType(), classID(), svcloc ),
       m_name("JepRoiByteStreamV1Cnv"),
       m_tool("LVL1BS::JepRoiByteStreamV1Tool/JepRoiByteStreamV1Tool"),
-      m_ByteStreamEventAccess("ByteStreamCnvSvc", m_name),
-      m_log(msgSvc(), m_name), m_debug(false)
+      m_ByteStreamEventAccess("ByteStreamCnvSvc", m_name)
 {
 }
 
@@ -59,31 +59,9 @@ long JepRoiByteStreamV1Cnv::storageType()
 
 StatusCode JepRoiByteStreamV1Cnv::initialize()
 {
-  m_debug = msgSvc()->outputLevel(m_name) <= MSG::DEBUG;
-  m_log << MSG::DEBUG << "Initializing " << m_name << " - package version "
-                      << PACKAGE_VERSION << endmsg;
-
-  StatusCode sc = Converter::initialize();
-  if ( sc.isFailure() )
-    return sc;
-
-  //Get ByteStreamCnvSvc
-  sc = m_ByteStreamEventAccess.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve service "
-          << m_ByteStreamEventAccess << endmsg;
-    return sc;
-  } else {
-    m_log << MSG::DEBUG << "Retrieved service "
-          << m_ByteStreamEventAccess << endmsg;
-  }
-
-  // Retrieve Tool
-  sc = m_tool.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve tool " << m_tool << endmsg;
-    return StatusCode::FAILURE;
-  } else m_log << MSG::DEBUG << "Retrieved tool " << m_tool << endmsg;
+  ATH_CHECK( Converter::initialize() );
+  ATH_CHECK( m_ByteStreamEventAccess.retrieve() );
+  ATH_CHECK( m_tool.retrieve() );
 
   return StatusCode::SUCCESS;
 }
@@ -93,13 +71,11 @@ StatusCode JepRoiByteStreamV1Cnv::initialize()
 StatusCode JepRoiByteStreamV1Cnv::createRep( DataObject* pObj,
                                              IOpaqueAddress*& pAddr )
 {
-  if (m_debug) m_log << MSG::DEBUG << "createRep() called" << endmsg;
-
   RawEventWrite* re = m_ByteStreamEventAccess->getRawEvent();
 
   LVL1::JEPRoIBSCollectionV1* jep = 0;
   if( !SG::fromStorable( pObj, jep ) ) {
-    m_log << MSG::ERROR << " Cannot cast to JEPRoIBSCollectionV1" << endmsg;
+    REPORT_ERROR (StatusCode::FAILURE) << " Cannot cast to JEPRoIBSCollectionV1";
     return StatusCode::FAILURE;
   }
 
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiByteStreamV1Cnv.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiByteStreamV1Cnv.h
index 200e9e8e4277..5ab627cda897 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiByteStreamV1Cnv.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiByteStreamV1Cnv.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 TRIGT1CALOBYTESTREAM_JEPROIBYTESTREAMV1CNV_H
@@ -57,11 +57,6 @@ private:
 
   /// Service for writing bytestream
   ServiceHandle<IByteStreamEventAccess> m_ByteStreamEventAccess;
-
-  /// Message log
-  mutable MsgStream m_log;
-  bool m_debug;
-
 };
 
 } // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiByteStreamV2Cnv.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiByteStreamV2Cnv.cxx
index eb2470f40b39..4def9f1d8dae 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiByteStreamV2Cnv.cxx
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiByteStreamV2Cnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -21,6 +21,7 @@
 
 #include "AthenaKernel/ClassID_traits.h"
 #include "AthenaKernel/StorableConversions.h"
+#include "AthenaKernel/errorcheck.h"
 
 #include "TrigT1CaloEvent/JEPRoIBSCollectionV2.h"
 
@@ -33,8 +34,7 @@ JepRoiByteStreamV2Cnv::JepRoiByteStreamV2Cnv( ISvcLocator* svcloc )
     : Converter( storageType(), classID(), svcloc ),
       m_name("JepRoiByteStreamV2Cnv"),
       m_tool("LVL1BS::JepRoiByteStreamV2Tool/JepRoiByteStreamV2Tool"),
-      m_ByteStreamEventAccess("ByteStreamCnvSvc", m_name),
-      m_log(msgSvc(), m_name), m_debug(false)
+      m_ByteStreamEventAccess("ByteStreamCnvSvc", m_name)
 {
 }
 
@@ -59,31 +59,9 @@ long JepRoiByteStreamV2Cnv::storageType()
 
 StatusCode JepRoiByteStreamV2Cnv::initialize()
 {
-  m_debug = msgSvc()->outputLevel(m_name) <= MSG::DEBUG;
-  m_log << MSG::DEBUG << "Initializing " << m_name << " - package version "
-                      << PACKAGE_VERSION << endmsg;
-
-  StatusCode sc = Converter::initialize();
-  if ( sc.isFailure() )
-    return sc;
-
-  //Get ByteStreamCnvSvc
-  sc = m_ByteStreamEventAccess.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve service "
-          << m_ByteStreamEventAccess << endmsg;
-    return sc;
-  } else {
-    m_log << MSG::DEBUG << "Retrieved service "
-          << m_ByteStreamEventAccess << endmsg;
-  }
-
-  // Retrieve Tool
-  sc = m_tool.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve tool " << m_tool << endmsg;
-    return StatusCode::FAILURE;
-  } else m_log << MSG::DEBUG << "Retrieved tool " << m_tool << endmsg;
+  ATH_CHECK( Converter::initialize() );
+  ATH_CHECK( m_ByteStreamEventAccess.retrieve() );
+  ATH_CHECK(  m_tool.retrieve() );
 
   return StatusCode::SUCCESS;
 }
@@ -93,13 +71,11 @@ StatusCode JepRoiByteStreamV2Cnv::initialize()
 StatusCode JepRoiByteStreamV2Cnv::createRep( DataObject* pObj,
                                              IOpaqueAddress*& pAddr )
 {
-  if (m_debug) m_log << MSG::DEBUG << "createRep() called" << endmsg;
-
   RawEventWrite* re = m_ByteStreamEventAccess->getRawEvent();
 
   LVL1::JEPRoIBSCollectionV2* jep = 0;
   if( !SG::fromStorable( pObj, jep ) ) {
-    m_log << MSG::ERROR << " Cannot cast to JEPRoIBSCollectionV2" << endmsg;
+    REPORT_ERROR (StatusCode::FAILURE) << " Cannot cast to JEPRoIBSCollectionV2";
     return StatusCode::FAILURE;
   }
 
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiByteStreamV2Cnv.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiByteStreamV2Cnv.h
index c46cb7d96d02..b3f17797f9c0 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiByteStreamV2Cnv.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiByteStreamV2Cnv.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 TRIGT1CALOBYTESTREAM_JEPROIBYTESTREAMV2CNV_H
@@ -56,11 +56,6 @@ private:
 
   /// Service for writing bytestream
   ServiceHandle<IByteStreamEventAccess> m_ByteStreamEventAccess;
-
-  /// Message log
-  mutable MsgStream m_log;
-  bool m_debug;
-
 };
 
 } // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiReadByteStreamCnv.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiReadByteStreamCnv.h
deleted file mode 100644
index dccbab8a0d4d..000000000000
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiReadByteStreamCnv.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef TRIGT1CALOBYTESTREAM_JEPROIREADBYTESTREAMCNV_H
-#define TRIGT1CALOBYTESTREAM_JEPROIREADBYTESTREAMCNV_H
-
-#include <string>
-
-#include "GaudiKernel/ClassID.h"
-#include "GaudiKernel/Converter.h"
-#include "GaudiKernel/MsgStream.h"
-#include "GaudiKernel/ServiceHandle.h"
-#include "GaudiKernel/ToolHandle.h"
-
-class DataObject;
-class IOpaqueAddress;
-class IROBDataProviderSvc;
-class ISvcLocator;
-class StatusCode;
-
-template <typename> class CnvFactory;
-
-
-namespace LVL1BS {
-
-class JepRoiByteStreamTool;
-
-/** ByteStream converter for JEP component containers.
- *
- *  @author Peter Faulkner
- */
-
-template <typename Container>
-class JepRoiReadByteStreamCnv: public Converter {
-
-  friend class CnvFactory<JepRoiReadByteStreamCnv<Container> >;
-
-protected:
-
-  JepRoiReadByteStreamCnv(ISvcLocator* svcloc);
-
-public:
-
-  ~JepRoiReadByteStreamCnv();
-
-  virtual StatusCode initialize();
-  /// Create Container from ByteStream
-  virtual StatusCode createObj(IOpaqueAddress* pAddr, DataObject*& pObj);
-
-  //  Storage type and class ID
-  virtual long repSvcType() const { return i_repSvcType(); }
-  static  long storageType();
-  static const CLID& classID();
-
-private:
-
-  /// Converter name
-  std::string m_name;
-
-  /// Tool that does the actual work
-  ToolHandle<LVL1BS::JepRoiByteStreamTool> m_tool;
-
-  /// Service for reading bytestream
-  ServiceHandle<IROBDataProviderSvc> m_robDataProvider;
-
-  /// Message log
-  mutable MsgStream m_log;
-  bool m_debug;
-
-};
-
-} // end namespace
-
-#include "JepRoiReadByteStreamCnv.icc"
-
-#endif
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiReadByteStreamCnv.icc b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiReadByteStreamCnv.icc
deleted file mode 100644
index 112e6145cacb..000000000000
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiReadByteStreamCnv.icc
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-
-#include <vector>
-#include <stdint.h>
-#include <typeinfo>
-
-#include "ByteStreamCnvSvcBase/ByteStreamAddress.h"
-#include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h"
-
-#include "ByteStreamData/RawEvent.h"
-#include "ByteStreamData/ROBData.h"
-
-#include "GaudiKernel/DataObject.h"
-#include "GaudiKernel/IOpaqueAddress.h"
-#include "GaudiKernel/ISvcLocator.h"
-#include "GaudiKernel/StatusCode.h"
-
-#include "AthenaKernel/ClassID_traits.h"
-#include "AthenaKernel/StorableConversions.h"
-
-#include "JepRoiByteStreamTool.h"
-
-namespace LVL1BS {
-
-template <typename Container>
-JepRoiReadByteStreamCnv<Container>::JepRoiReadByteStreamCnv(
-      ISvcLocator* svcloc )
-    : Converter( storageType(), classID(), svcloc ),
-      m_name("JepRoiReadByteStreamCnv"),
-      m_tool("LVL1BS::JepRoiByteStreamTool/JepRoiByteStreamTool"),
-      m_robDataProvider("ROBDataProviderSvc", m_name),
-      m_log(msgSvc(), m_name), m_debug(false)
-{
-}
-
-template <typename Container>
-JepRoiReadByteStreamCnv<Container>::~JepRoiReadByteStreamCnv()
-{
-}
-
-// CLID
-
-template <typename Container>
-const CLID& JepRoiReadByteStreamCnv<Container>::classID()
-{
-  return ClassID_traits<Container>::ID();
-}
-
-long JepRoiReadByteStreamCnv<Container>::storageType()
-{
-  return ByteStreamAddress::storageType();
-}
-
-//  Init method gets all necessary services etc.
-
-
-template <typename Container>
-StatusCode JepRoiReadByteStreamCnv<Container>::initialize()
-{
-  m_debug = msgSvc()->outputLevel(m_name) <= MSG::DEBUG;
-  m_log << MSG::DEBUG << "Initializing " << m_name << "<"
-                      << typeid(Container).name() << "> - package version "
-                      << PACKAGE_VERSION << endmsg;
-
-  StatusCode sc = Converter::initialize();
-  if ( sc.isFailure() )
-    return sc;
-
-  // Retrieve Tool
-  sc = m_tool.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve tool " << m_tool << endmsg;
-    return sc;
-  } else m_log << MSG::DEBUG << "Retrieved tool " << m_tool << endmsg;
-
-  // Get ROBDataProvider
-  sc = m_robDataProvider.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve service "
-          << m_robDataProvider << endmsg;
-    return sc ;
-  } else {
-    m_log << MSG::DEBUG << "Retrieved service "
-          << m_robDataProvider << endmsg;
-  }
-
-  return StatusCode::SUCCESS;
-}
-
-// createObj should create the RDO from bytestream.
-
-template <typename Container>
-StatusCode JepRoiReadByteStreamCnv<Container>::createObj( IOpaqueAddress* pAddr,
-                                                          DataObject*& pObj )
-{
-  if (m_debug) m_log << MSG::DEBUG << "createObj() called" << endmsg;
-
-  ByteStreamAddress *pBS_Addr;
-  pBS_Addr = dynamic_cast<ByteStreamAddress *>( pAddr );
-  if ( !pBS_Addr ) {
-    m_log << MSG::ERROR << " Cannot cast to ByteStreamAddress " << endmsg;
-    return StatusCode::FAILURE;
-  }
-
-  const std::string nm = *( pBS_Addr->par() );
-
-  if (m_debug) m_log << MSG::DEBUG << " Creating Objects " << nm << endmsg;
-
-  // get SourceIDs
-  const std::vector<uint32_t>& vID(m_tool->sourceIDs(nm));
-
-  // get ROB fragments
-  IROBDataProviderSvc::VROBFRAG robFrags;
-  m_robDataProvider->getROBData( vID, robFrags );
-
-  // size check
-  Container* const collection = new Container;
-  if (m_debug) {
-    m_log << MSG::DEBUG << " Number of ROB fragments is " << robFrags.size()
-          << endmsg;
-  }
-  if (robFrags.size() == 0) {
-    pObj = SG::asStorable(collection) ;
-    return StatusCode::SUCCESS;
-  }
-
-  StatusCode sc = m_tool->convert(robFrags, collection);
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << " Failed to create Objects   " << nm << endmsg;
-    delete collection;
-    return sc;
-  }
-
-  pObj = SG::asStorable(collection);
-
-  return sc;
-}
-
-} // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiReadByteStreamV1Cnv.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiReadByteStreamV1Cnv.h
index 0a1a63d663a7..c0586aef79eb 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiReadByteStreamV1Cnv.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiReadByteStreamV1Cnv.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 TRIGT1CALOBYTESTREAM_JEPROIREADBYTESTREAMV1CNV_H
@@ -60,9 +60,7 @@ private:
   ServiceHandle<IROBDataProviderSvc> m_robDataProvider;
 
   /// Message log
-  mutable MsgStream m_log;
   bool m_debug;
-
 };
 
 } // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiReadByteStreamV1Cnv.icc b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiReadByteStreamV1Cnv.icc
index c75b442e0c8c..2f77a7089b2c 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiReadByteStreamV1Cnv.icc
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiReadByteStreamV1Cnv.icc
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -20,6 +20,7 @@
 
 #include "AthenaKernel/ClassID_traits.h"
 #include "AthenaKernel/StorableConversions.h"
+#include "AthenaKernel/errorcheck.h"
 
 #include "JepRoiByteStreamV1Tool.h"
 
@@ -32,7 +33,7 @@ JepRoiReadByteStreamV1Cnv<Container>::JepRoiReadByteStreamV1Cnv(
       m_name("JepRoiReadByteStreamV1Cnv"),
       m_tool("LVL1BS::JepRoiByteStreamV1Tool/JepRoiByteStreamV1Tool"),
       m_robDataProvider("ROBDataProviderSvc", m_name),
-      m_log(msgSvc(), m_name), m_debug(false)
+      m_debug(false)
 {
 }
 
@@ -62,31 +63,10 @@ template <typename Container>
 StatusCode JepRoiReadByteStreamV1Cnv<Container>::initialize()
 {
   m_debug = msgSvc()->outputLevel(m_name) <= MSG::DEBUG;
-  m_log << MSG::DEBUG << "Initializing " << m_name << "<"
-                      << typeid(Container).name() << "> - package version "
-                      << PACKAGE_VERSION << endmsg;
-
-  StatusCode sc = Converter::initialize();
-  if ( sc.isFailure() )
-    return sc;
-
-  // Retrieve Tool
-  sc = m_tool.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve tool " << m_tool << endmsg;
-    return sc;
-  } else m_log << MSG::DEBUG << "Retrieved tool " << m_tool << endmsg;
-
-  // Get ROBDataProvider
-  sc = m_robDataProvider.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve service "
-          << m_robDataProvider << endmsg;
-    return sc ;
-  } else {
-    m_log << MSG::DEBUG << "Retrieved service "
-          << m_robDataProvider << endmsg;
-  }
+
+  ATH_CHECK( Converter::initialize() );
+  ATH_CHECK( m_tool.retrieve() );
+  ATH_CHECK( m_robDataProvider.retrieve() );
 
   return StatusCode::SUCCESS;
 }
@@ -97,18 +77,18 @@ template <typename Container>
 StatusCode JepRoiReadByteStreamV1Cnv<Container>::createObj( IOpaqueAddress* pAddr,
                                                             DataObject*& pObj )
 {
-  if (m_debug) m_log << MSG::DEBUG << "createObj() called" << endmsg;
-
   ByteStreamAddress *pBS_Addr;
   pBS_Addr = dynamic_cast<ByteStreamAddress *>( pAddr );
   if ( !pBS_Addr ) {
-    m_log << MSG::ERROR << " Cannot cast to ByteStreamAddress " << endmsg;
+    REPORT_ERROR (StatusCode::FAILURE) << " Cannot cast to ByteStreamAddress ";
     return StatusCode::FAILURE;
   }
 
   const std::string nm = *( pBS_Addr->par() );
 
-  if (m_debug) m_log << MSG::DEBUG << " Creating Objects " << nm << endmsg;
+  if (m_debug) {
+    REPORT_MESSAGE (MSG::DEBUG) << " Creating Objects " << nm;
+  }
 
   // get SourceIDs
   const std::vector<uint32_t>& vID(m_tool->sourceIDs(nm));
@@ -118,26 +98,20 @@ StatusCode JepRoiReadByteStreamV1Cnv<Container>::createObj( IOpaqueAddress* pAdd
   m_robDataProvider->getROBData( vID, robFrags );
 
   // size check
-  Container* const collection = new Container;
+  auto collection = std::make_unique<Container>();
   if (m_debug) {
-    m_log << MSG::DEBUG << " Number of ROB fragments is " << robFrags.size()
-          << endmsg;
+    REPORT_MESSAGE (MSG::DEBUG) << " Number of ROB fragments is " << robFrags.size();
   }
   if (robFrags.size() == 0) {
-    pObj = SG::asStorable(collection) ;
+    pObj = SG::asStorable(std::move(collection)) ;
     return StatusCode::SUCCESS;
   }
 
-  StatusCode sc = m_tool->convert(robFrags, collection);
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << " Failed to create Objects   " << nm << endmsg;
-    delete collection;
-    return sc;
-  }
+  ATH_CHECK( m_tool->convert(robFrags, collection.get()) );
 
-  pObj = SG::asStorable(collection);
+  pObj = SG::asStorable(std::move(collection));
 
-  return sc;
+  return StatusCode::SUCCESS;
 }
 
 } // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiReadByteStreamV2Cnv.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiReadByteStreamV2Cnv.h
index 569fe838788c..135b2e0a17f2 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiReadByteStreamV2Cnv.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiReadByteStreamV2Cnv.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 TRIGT1CALOBYTESTREAM_JEPROIREADBYTESTREAMV2CNV_H
@@ -59,9 +59,7 @@ private:
   ServiceHandle<IROBDataProviderSvc> m_robDataProvider;
 
   /// Message log
-  mutable MsgStream m_log;
   bool m_debug;
-
 };
 
 } // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiReadByteStreamV2Cnv.icc b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiReadByteStreamV2Cnv.icc
index 8eb3d7a1c6ec..5f881e0ad974 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiReadByteStreamV2Cnv.icc
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiReadByteStreamV2Cnv.icc
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -20,6 +20,7 @@
 
 #include "AthenaKernel/ClassID_traits.h"
 #include "AthenaKernel/StorableConversions.h"
+#include "AthenaKernel/errorcheck.h"
 
 #include "JepRoiByteStreamV2Tool.h"
 
@@ -32,7 +33,7 @@ JepRoiReadByteStreamV2Cnv<Container>::JepRoiReadByteStreamV2Cnv(
       m_name("JepRoiReadByteStreamV2Cnv"),
       m_tool("LVL1BS::JepRoiByteStreamV2Tool/JepRoiByteStreamV2Tool"),
       m_robDataProvider("ROBDataProviderSvc", m_name),
-      m_log(msgSvc(), m_name), m_debug(false)
+      m_debug(false)
 {
 }
 
@@ -62,31 +63,10 @@ template <typename Container>
 StatusCode JepRoiReadByteStreamV2Cnv<Container>::initialize()
 {
   m_debug = msgSvc()->outputLevel(m_name) <= MSG::DEBUG;
-  m_log << MSG::DEBUG << "Initializing " << m_name << "<"
-                      << typeid(Container).name() << "> - package version "
-                      << PACKAGE_VERSION << endmsg;
-
-  StatusCode sc = Converter::initialize();
-  if ( sc.isFailure() )
-    return sc;
-
-  // Retrieve Tool
-  sc = m_tool.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve tool " << m_tool << endmsg;
-    return sc;
-  } else m_log << MSG::DEBUG << "Retrieved tool " << m_tool << endmsg;
-
-  // Get ROBDataProvider
-  sc = m_robDataProvider.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve service "
-          << m_robDataProvider << endmsg;
-    return sc ;
-  } else {
-    m_log << MSG::DEBUG << "Retrieved service "
-          << m_robDataProvider << endmsg;
-  }
+
+  ATH_CHECK( Converter::initialize() );
+  ATH_CHECK( m_tool.retrieve() );
+  ATH_CHECK( m_robDataProvider.retrieve() );
 
   return StatusCode::SUCCESS;
 }
@@ -97,18 +77,18 @@ template <typename Container>
 StatusCode JepRoiReadByteStreamV2Cnv<Container>::createObj( IOpaqueAddress* pAddr,
                                                             DataObject*& pObj )
 {
-  if (m_debug) m_log << MSG::DEBUG << "createObj() called" << endmsg;
-
   ByteStreamAddress *pBS_Addr;
   pBS_Addr = dynamic_cast<ByteStreamAddress *>( pAddr );
   if ( !pBS_Addr ) {
-    m_log << MSG::ERROR << " Cannot cast to ByteStreamAddress " << endmsg;
+    REPORT_ERROR (StatusCode::FAILURE) << " Cannot cast to ByteStreamAddress ";
     return StatusCode::FAILURE;
   }
 
   const std::string nm = *( pBS_Addr->par() );
 
-  if (m_debug) m_log << MSG::DEBUG << " Creating Objects " << nm << endmsg;
+  if (m_debug) {
+    REPORT_MESSAGE (MSG::DEBUG) << " Creating Objects " << nm;
+  }
 
   // get SourceIDs
   const std::vector<uint32_t>& vID(m_tool->sourceIDs(nm));
@@ -118,26 +98,20 @@ StatusCode JepRoiReadByteStreamV2Cnv<Container>::createObj( IOpaqueAddress* pAdd
   m_robDataProvider->getROBData( vID, robFrags );
 
   // size check
-  Container* const collection = new Container;
+  auto collection = std::make_unique<Container>();
   if (m_debug) {
-    m_log << MSG::DEBUG << " Number of ROB fragments is " << robFrags.size()
-          << endmsg;
+    REPORT_MESSAGE (MSG::DEBUG) << " Number of ROB fragments is " << robFrags.size();
   }
   if (robFrags.size() == 0) {
-    pObj = SG::asStorable(collection) ;
+    pObj = SG::asStorable(std::move(collection)) ;
     return StatusCode::SUCCESS;
   }
 
-  StatusCode sc = m_tool->convert(robFrags, collection);
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << " Failed to create Objects   " << nm << endmsg;
-    delete collection;
-    return sc;
-  }
+  ATH_CHECK( m_tool->convert(robFrags, collection.get()) );
 
-  pObj = SG::asStorable(collection);
+  pObj = SG::asStorable(std::move(collection));
 
-  return sc;
+  return StatusCode::SUCCESS;
 }
 
 } // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/L1CaloErrorByteStreamCnv.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/L1CaloErrorByteStreamCnv.cxx
index 0aa93dd93643..3caae1aa87ab 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/L1CaloErrorByteStreamCnv.cxx
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/L1CaloErrorByteStreamCnv.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,6 +15,7 @@
 #include "AthenaKernel/ClassID_traits.h"
 #include "SGTools/StlVectorClids.h"
 #include "AthenaKernel/StorableConversions.h"
+#include "AthenaKernel/errorcheck.h"
 
 #include "L1CaloErrorByteStreamTool.h"
 
@@ -26,7 +27,7 @@ L1CaloErrorByteStreamCnv::L1CaloErrorByteStreamCnv( ISvcLocator* svcloc )
     : Converter( storageType(), classID(), svcloc ),
       m_name("L1CaloErrorByteStreamCnv"),
       m_tool("LVL1BS::L1CaloErrorByteStreamTool/L1CaloErrorByteStreamTool"),
-      m_log(msgSvc(), m_name), m_debug(false)
+      m_debug(false)
 {
 }
 
@@ -52,19 +53,9 @@ long L1CaloErrorByteStreamCnv::storageType()
 StatusCode L1CaloErrorByteStreamCnv::initialize()
 {
   m_debug = msgSvc()->outputLevel(m_name) <= MSG::DEBUG;
-  m_log << MSG::DEBUG << "Initializing " << m_name << " - package version "
-                      << PACKAGE_VERSION << endmsg;
 
-  StatusCode sc = Converter::initialize();
-  if ( sc.isFailure() )
-    return sc;
-
-  // Retrieve Tool
-  sc = m_tool.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve tool " << m_tool << endmsg;
-    return sc;
-  } else m_log << MSG::DEBUG << "Retrieved tool " << m_tool << endmsg;
+  ATH_CHECK( Converter::initialize() );
+  ATH_CHECK( m_tool.retrieve() );
 
   return StatusCode::SUCCESS;
 }
@@ -74,32 +65,26 @@ StatusCode L1CaloErrorByteStreamCnv::initialize()
 StatusCode L1CaloErrorByteStreamCnv::createObj( IOpaqueAddress* pAddr,
                                                 DataObject*& pObj )
 {
-  if (m_debug) m_log << MSG::DEBUG << "createObj() called" << endmsg;
-
   ByteStreamAddress *pBS_Addr;
   pBS_Addr = dynamic_cast<ByteStreamAddress *>( pAddr );
   if ( !pBS_Addr ) {
-    m_log << MSG::ERROR << " Can not cast to ByteStreamAddress " << endmsg;
+    REPORT_ERROR (StatusCode::FAILURE) << " Can not cast to ByteStreamAddress ";
     return StatusCode::FAILURE;
   }
 
   const std::string nm = *( pBS_Addr->par() );
 
-  if (m_debug) m_log << MSG::DEBUG << " Creating Objects " << nm << endmsg;
+  if (m_debug) {
+    REPORT_MESSAGE (MSG::DEBUG) << " Creating Objects " << nm;
+  }
 
-  std::vector<unsigned int>* const errCollection =
-                                             new std::vector<unsigned int>;
+  auto errCollection = std::make_unique<std::vector<unsigned int> >();
 
-  StatusCode sc = m_tool->errors(errCollection);
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << " Failed to create Objects   " << nm << endmsg;
-    delete errCollection;
-    return sc;
-  }
+  ATH_CHECK( m_tool->errors(errCollection.get()) );
 
-  pObj = SG::asStorable(errCollection);
+  pObj = SG::asStorable(std::move(errCollection));
 
-  return sc;
+  return StatusCode::SUCCESS;
 }
 
 } // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/L1CaloErrorByteStreamCnv.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/L1CaloErrorByteStreamCnv.h
index 44f330227ead..e5bd2983637f 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/L1CaloErrorByteStreamCnv.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/L1CaloErrorByteStreamCnv.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 TRIGT1CALOBYTESTREAM_L1CALOERRORBYTESTREAMCNV_H
@@ -54,9 +54,7 @@ private:
   ToolHandle<LVL1BS::L1CaloErrorByteStreamTool> m_tool;
 
   /// Message log
-  mutable MsgStream m_log;
   bool m_debug;
-
 };
 
 } // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/L1CaloErrorByteStreamTool.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/L1CaloErrorByteStreamTool.h
index 27fadc8e2d70..934e9556c094 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/L1CaloErrorByteStreamTool.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/L1CaloErrorByteStreamTool.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 TRIGT1CALOBYTESTREAM_L1CALOERRORBYTESTREAMTOOL_H
@@ -13,6 +13,7 @@
 
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "AthenaKernel/SlotSpecificObj.h"
+#include "CxxUtils/checker_macros.h"
 
 class IInterface;
 class InterfaceID;
@@ -55,7 +56,7 @@ class L1CaloErrorByteStreamTool : public AthAlgTool {
      ErrorMap m_rodMap;
      std::mutex m_mutex;
    };
-   mutable SG::SlotSpecificObj<ErrorMaps> m_maps;
+   mutable SG::SlotSpecificObj<ErrorMaps> m_maps ATLAS_THREAD_SAFE;
 };
 
 } // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/PpmByteStreamV1Cnv.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/PpmByteStreamV1Cnv.cxx
index f03157a3df81..2083ea628e10 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/PpmByteStreamV1Cnv.cxx
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/PpmByteStreamV1Cnv.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
 */
 
 
@@ -23,6 +23,7 @@
 
 #include "AthenaKernel/ClassID_traits.h"
 #include "AthenaKernel/StorableConversions.h"
+#include "AthenaKernel/errorcheck.h"
 
 #include "TrigT1CaloEvent/TriggerTower.h"
 
@@ -37,7 +38,7 @@ PpmByteStreamV1Cnv::PpmByteStreamV1Cnv( ISvcLocator* svcloc )
       m_tool("LVL1BS::PpmByteStreamV1Tool/PpmByteStreamV1Tool"),
       m_robDataProvider("ROBDataProviderSvc", m_name),
       m_ByteStreamEventAccess("ByteStreamCnvSvc", m_name),
-      m_log(msgSvc(), m_name), m_debug(false)
+      m_debug(false)
 {
 }
 
@@ -63,43 +64,19 @@ long PpmByteStreamV1Cnv::storageType()
 StatusCode PpmByteStreamV1Cnv::initialize()
 {
   m_debug = msgSvc()->outputLevel(m_name) <= MSG::DEBUG;
-  m_log << MSG::DEBUG << "Initializing " << m_name << " - package version "
-                      << PACKAGE_VERSION << endmsg;
 
-  StatusCode sc = Converter::initialize();
-  if ( sc.isFailure() )
-    return sc;
-
-  //Get ByteStreamCnvSvc
-  sc = m_ByteStreamEventAccess.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve service "
-          << m_ByteStreamEventAccess << endmsg;
-    return sc;
-  } else {
-    m_log << MSG::DEBUG << "Retrieved service "
-          << m_ByteStreamEventAccess << endmsg;
-  }
-
-  // Retrieve Tool
-  sc = m_tool.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve tool " << m_tool << endmsg;
-    return sc;
-  } else m_log << MSG::DEBUG << "Retrieved tool " << m_tool << endmsg;
+  ATH_CHECK( Converter::initialize() );
+  ATH_CHECK( m_ByteStreamEventAccess.retrieve() );
+  ATH_CHECK( m_tool.retrieve() );
 
   // Get ROBDataProvider
-  sc = m_robDataProvider.retrieve();
+  StatusCode sc = m_robDataProvider.retrieve();
   if ( sc.isFailure() ) {
-    m_log << MSG::WARNING << "Failed to retrieve service "
-          << m_robDataProvider << endmsg;
+    REPORT_MESSAGE (MSG::WARNING) << "Failed to retrieve service "
+                                  << m_robDataProvider;
     // return is disabled for Write BS which does not require ROBDataProviderSvc
     // return sc ;
-  } else {
-    m_log << MSG::DEBUG << "Retrieved service "
-          << m_robDataProvider << endmsg;
   }
-
   return StatusCode::SUCCESS;
 }
 
@@ -108,18 +85,18 @@ StatusCode PpmByteStreamV1Cnv::initialize()
 StatusCode PpmByteStreamV1Cnv::createObj( IOpaqueAddress* pAddr,
                                         DataObject*& pObj )
 {
-  if (m_debug) m_log << MSG::DEBUG << "createObj() called" << endmsg;
-
   ByteStreamAddress *pBS_Addr;
   pBS_Addr = dynamic_cast<ByteStreamAddress *>( pAddr );
   if ( !pBS_Addr ) {
-    m_log << MSG::ERROR << " Can not cast to ByteStreamAddress " << endmsg;
+    REPORT_ERROR (StatusCode::FAILURE) << " Can not cast to ByteStreamAddress ";
     return StatusCode::FAILURE;
   }
 
   const std::string nm = *( pBS_Addr->par() );
 
-  if (m_debug) m_log << MSG::DEBUG << " Creating Objects " << nm << endmsg;
+  if (m_debug) {
+    REPORT_MESSAGE (MSG::DEBUG) << " Creating Objects " << nm;
+  }
 
   // get SourceIDs
   const std::vector<uint32_t>& vID(m_tool->sourceIDs(nm));
@@ -129,27 +106,20 @@ StatusCode PpmByteStreamV1Cnv::createObj( IOpaqueAddress* pAddr,
   m_robDataProvider->getROBData( vID, robFrags );
 
   // size check
-  DataVector<LVL1::TriggerTower>* const ttCollection =
-                      new DataVector<LVL1::TriggerTower>(SG::VIEW_ELEMENTS);
+  auto ttCollection = std::make_unique<DataVector<LVL1::TriggerTower> >(SG::VIEW_ELEMENTS);
   if (m_debug) {
-    m_log << MSG::DEBUG << " Number of ROB fragments is " << robFrags.size()
-          << endmsg;
+    REPORT_MESSAGE (MSG::DEBUG) << " Number of ROB fragments is " << robFrags.size();
   }
   if (robFrags.size() == 0) {
-    pObj = SG::asStorable(ttCollection) ;
+    pObj = SG::asStorable(std::move(ttCollection)) ;
     return StatusCode::SUCCESS;
   }
 
-  StatusCode sc = m_tool->convert(robFrags, ttCollection);
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << " Failed to create Objects   " << nm << endmsg;
-    delete ttCollection;
-    return sc;
-  }
+  ATH_CHECK( m_tool->convert(robFrags, ttCollection.get()) );
 
-  pObj = SG::asStorable(ttCollection);
+  pObj = SG::asStorable(std::move(ttCollection));
 
-  return sc;
+  return StatusCode::SUCCESS;
 }
 
 // createRep should create the bytestream from RDOs.
@@ -157,13 +127,11 @@ StatusCode PpmByteStreamV1Cnv::createObj( IOpaqueAddress* pAddr,
 StatusCode PpmByteStreamV1Cnv::createRep( DataObject* pObj,
                                         IOpaqueAddress*& pAddr )
 {
-  if (m_debug) m_log << MSG::DEBUG << "createRep() called" << endmsg;
-
   RawEventWrite* re = m_ByteStreamEventAccess->getRawEvent();
 
   DataVector<LVL1::TriggerTower>* ttCollection = 0;
   if( !SG::fromStorable( pObj, ttCollection ) ) {
-    m_log << MSG::ERROR << " Cannot cast to DataVector<TriggerTower>" << endmsg;
+    REPORT_ERROR (StatusCode::FAILURE) << " Cannot cast to DataVector<TriggerTower>";
     return StatusCode::FAILURE;
   }
 
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/PpmByteStreamV1Cnv.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/PpmByteStreamV1Cnv.h
index c41c9f7c0b95..555d8e3b2017 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/PpmByteStreamV1Cnv.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/PpmByteStreamV1Cnv.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 TRIGT1CALOBYTESTREAM_PPMBYTESTREAMV1CNV_H
@@ -64,9 +64,7 @@ private:
   ServiceHandle<IByteStreamEventAccess> m_ByteStreamEventAccess;
 
   /// Message log
-  mutable MsgStream m_log;
   bool m_debug;
-
 };
 
 } // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/PpmSubBlockV1.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/PpmSubBlockV1.cxx
index 3377ab851aa6..b5933f3a032d 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/PpmSubBlockV1.cxx
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/PpmSubBlockV1.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
 */
 
 
@@ -40,7 +40,7 @@ const int      PpmSubBlockV1::s_timeoutBit;
 const int      PpmSubBlockV1::s_mcmAbsentBit;
 const int      PpmSubBlockV1::s_channelDisabledBit;
 
-PpmSubBlockV1::PpmSubBlockV1() : m_globalError(0), m_globalDone(false),
+PpmSubBlockV1::PpmSubBlockV1() : m_globalError(0), 
   m_lutOffset(-1), m_fadcOffset(-1),
   m_pedestal(10), m_fadcBaseline(0),
   m_fadcThreshold(0), m_runNumber(0)
@@ -57,7 +57,6 @@ void PpmSubBlockV1::clear()
 {
   L1CaloSubBlock::clear();
   m_globalError   = 0;
-  m_globalDone    = false;
   m_lutOffset     = -1;
   m_fadcOffset    = -1;
   m_datamap.clear();
@@ -184,8 +183,10 @@ void PpmSubBlockV1::fillPpmError(const int chan, const int errorWord)
   if (m_errormap.empty()) m_errormap.resize(s_glinkPins);
   // Expand one ASIC channel disabled bit to four
   const uint32_t chanDisabled = (errorWord & 0x1) << asic(chan);
-  m_errormap[pin(chan)] |= (((errorWord >> 1) << s_asicChannels)
+  uint32_t word = (((errorWord >> 1) << s_asicChannels)
                             | chanDisabled) & s_errorMask;
+  m_errormap[pin(chan)] |= word;
+  m_globalError |= word;
 }
 
 // Store an error word corresponding to a G-Link pin
@@ -194,6 +195,10 @@ void PpmSubBlockV1::fillPpmPinError(const int pin, const int errorWord)
 {
   if (m_errormap.empty()) m_errormap.resize(s_glinkPins);
   m_errormap[pin] = errorWord & s_errorMask;
+  m_globalError = 0;
+  for (uint32_t word : m_errormap) {
+    m_globalError |= word;
+  }
 }
 
 // Return the error word for a data channel
@@ -223,13 +228,6 @@ int PpmSubBlockV1::ppmPinError(const int pin) const
 
 bool PpmSubBlockV1::errorBit(const int bit) const
 {
-  if ( ! m_globalDone) {
-    std::vector<uint32_t>::const_iterator pos;
-    for (pos = m_errormap.begin(); pos != m_errormap.end(); ++pos) {
-      m_globalError |= *pos;
-    }
-    m_globalDone  = true;
-  }
   return m_globalError & (0x1 << bit);
 }
 
@@ -390,10 +388,12 @@ bool PpmSubBlockV1::unpackNeutral()
   if (!rc) setUnpackErrorCode(UNPACK_DATA_TRUNCATED);
   // Errors
   m_errormap.clear();
+  m_globalError = 0;
   for (int pin = 0; pin < s_glinkPins; ++pin) {
     uint32_t error = unpackerNeutral(pin, s_errorBits);
     error |= unpackerNeutralParityError(pin) << s_errorBits;
     m_errormap.push_back(error);
+    m_globalError |= error;
   }
   return rc;
 }
@@ -432,8 +432,11 @@ bool PpmSubBlockV1::unpackUncompressedErrors()
 {
   unpackerInit();
   m_errormap.clear();
+  m_globalError = 0;
   for (int pin = 0; pin < s_glinkPins; ++pin) {
-    m_errormap.push_back(unpacker(s_wordLen));
+    uint32_t word = unpacker(s_wordLen);
+    m_errormap.push_back(word);
+    m_globalError |= word;
   }
   bool rc = unpackerSuccess();
   if (!rc) setUnpackErrorCode(UNPACK_DATA_TRUNCATED);
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/PpmSubBlockV1.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/PpmSubBlockV1.h
index 67d3fe9fe7d7..c6ee67cd389f 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/PpmSubBlockV1.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/PpmSubBlockV1.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 TRIGT1CALOBYTESTREAM_PPMSUBBLOCKV1_H
@@ -173,8 +173,7 @@ class PpmSubBlockV1 : public L1CaloSubBlock {
    bool unpackUncompressedErrors();
 
    //  Global error flags
-   mutable uint32_t m_globalError;
-   mutable bool     m_globalDone;
+   uint32_t m_globalError;
 
    //  Triggered slice offsets, pedestal value
    int m_lutOffset;
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/RodHeaderByteStreamCnv.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/RodHeaderByteStreamCnv.cxx
index e80e5d042bfc..298dfe7f01f8 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/RodHeaderByteStreamCnv.cxx
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/RodHeaderByteStreamCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -21,6 +21,7 @@
 
 #include "AthenaKernel/ClassID_traits.h"
 #include "AthenaKernel/StorableConversions.h"
+#include "AthenaKernel/errorcheck.h"
 
 #include "TrigT1CaloEvent/RODHeader.h"
 
@@ -33,8 +34,7 @@ namespace LVL1BS {
 RodHeaderByteStreamCnv::RodHeaderByteStreamCnv( ISvcLocator* svcloc )
     : Converter( storageType(), classID(), svcloc ),
       m_name("RodHeaderByteStreamCnv"),
-      m_tool("LVL1BS::RodHeaderByteStreamTool/RodHeaderByteStreamTool"),
-      m_log(msgSvc(), m_name), m_debug(false)
+      m_tool("LVL1BS::RodHeaderByteStreamTool/RodHeaderByteStreamTool")
 {
 }
 
@@ -59,20 +59,8 @@ long RodHeaderByteStreamCnv::storageType()
 
 StatusCode RodHeaderByteStreamCnv::initialize()
 {
-  m_debug = msgSvc()->outputLevel(m_name) <= MSG::DEBUG;
-  m_log << MSG::DEBUG << "Initializing " << m_name << " - package version "
-                      << PACKAGE_VERSION << endmsg;
-
-  StatusCode sc = Converter::initialize();
-  if ( sc.isFailure() )
-    return sc;
-
-  // Retrieve Tool
-  sc = m_tool.retrieve();
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << "Failed to retrieve tool " << m_tool << endmsg;
-    return sc;
-  } else m_log << MSG::DEBUG << "Retrieved tool " << m_tool << endmsg;
+  ATH_CHECK( Converter::initialize() );
+  ATH_CHECK( m_tool.retrieve() );
 
   return StatusCode::SUCCESS;
 }
@@ -82,29 +70,21 @@ StatusCode RodHeaderByteStreamCnv::initialize()
 StatusCode RodHeaderByteStreamCnv::createObj( IOpaqueAddress* pAddr,
                                         DataObject*& pObj )
 {
-  if (m_debug) m_log << MSG::DEBUG << "createObj() called" << endmsg;
-
   ByteStreamAddress *pBS_Addr;
   pBS_Addr = dynamic_cast<ByteStreamAddress *>( pAddr );
   if ( !pBS_Addr ) {
-    m_log << MSG::ERROR << " Can not cast to ByteStreamAddress " << endmsg;
+    REPORT_ERROR (StatusCode::FAILURE) << " Can not cast to ByteStreamAddress ";
     return StatusCode::FAILURE;
   }
 
   const std::string nm = *( pBS_Addr->par() );
   // size check
-  DataVector<LVL1::RODHeader>* const rhCollection =
-                                           new DataVector<LVL1::RODHeader>;
-  StatusCode sc = m_tool->convert(nm, rhCollection);
-  if ( sc.isFailure() ) {
-    m_log << MSG::ERROR << " Failed to create Objects   " << nm << endmsg;
-    delete rhCollection;
-    return sc;
-  }
+  auto rhCollection = std::make_unique<DataVector<LVL1::RODHeader> >();
+  ATH_CHECK( m_tool->convert(nm, rhCollection.get()) );
 
-  pObj = SG::asStorable(rhCollection);
+  pObj = SG::asStorable(std::move(rhCollection));
 
-  return sc;
+  return StatusCode::SUCCESS;
 }
 
 } // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/RodHeaderByteStreamCnv.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/RodHeaderByteStreamCnv.h
index 8a607846a6d7..ccb2345159d6 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/RodHeaderByteStreamCnv.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/RodHeaderByteStreamCnv.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 TRIGT1CALOBYTESTREAM_RODHEADERBYTESTREAMCNV_H
@@ -53,13 +53,6 @@ private:
 
   /// Tool that does the actual work
   ToolHandle<LVL1BS::RodHeaderByteStreamTool> m_tool;
-
-
-
-  /// Message log
-  mutable MsgStream m_log;
-  bool m_debug;
-
 };
 
 } // end namespace
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/xaod/CaloUserHeader.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/xaod/CaloUserHeader.cxx
index 859b2a833f90..802c0d3b35bf 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/xaod/CaloUserHeader.cxx
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/xaod/CaloUserHeader.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 "CaloUserHeader.h"
@@ -8,7 +8,7 @@
 using namespace LVL1BS;
 
 namespace {
-  WordDecoder caloUserWordDecoder({
+  const WordDecoder caloUserWordDecoder({
     BitField("Length", 0, 4),
     BitField("L1A Slice: PP FADC", 4, 5),
     BitField("LUT", 9, 3),
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/xaod/SubBlockHeader.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/xaod/SubBlockHeader.cxx
index 9f24dd6210f3..31c5b7ad863c 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/xaod/SubBlockHeader.cxx
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/xaod/SubBlockHeader.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 "SubBlockHeader.h"
@@ -9,7 +9,7 @@
 using namespace LVL1BS;
 
 namespace {
-  WordDecoder subBlockHeaderDecoder(
+  const WordDecoder subBlockHeaderDecoder(
       {
         BitField("Type", 28, 4),
         BitField("Version", 25, 3),
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/xaod/SubBlockStatus.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/xaod/SubBlockStatus.cxx
index 67e54e930d3a..794379f3a947 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/xaod/SubBlockStatus.cxx
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/xaod/SubBlockStatus.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 "SubBlockStatus.h"
@@ -9,7 +9,7 @@
 using namespace LVL1BS;
 
 namespace {
-  WordDecoder subBlockStatusDecoder(
+  const WordDecoder subBlockStatusDecoder(
       {
         BitField("Timeout", 7, 1),
         BitField("Link", 6, 1),
-- 
GitLab


From b94090dafaa82fda976747fbd83e75b103abaa2f Mon Sep 17 00:00:00 2001
From: Marcin Nowak <Marcin.Nowak@cern.ch>
Date: Fri, 2 Oct 2020 21:32:17 +0200
Subject: [PATCH 138/403] EventService in AthenaMP fixes

Fix: IOVDbSvc was holding on PoolSvc contextID over fork and
I/O reinit, after which it was invalid and interfering with other
contexts. Made IOVDbSvc a client of IIoComponentMgr to reset the context

PoolSvc was not cleaning up its map of contexts fully at I/O reninit
- fixed

MetaDataSvc transitionMetaDataFile was refusing to run for ES
- cleared the blocking unnecessary flag

Implemented handling of "end of range" NextEventRange incidents for
MP mode
---
 .../AthenaServices/src/AthenaOutputStream.cxx |  2 +-
 Control/AthenaServices/src/MetaDataSvc.cxx    | 16 +++-
 .../src/OutputStreamSequencerSvc.cxx          | 38 +++++----
 Database/AthenaPOOL/PoolSvc/src/PoolSvc.cxx   | 37 +++------
 Database/AthenaPOOL/PoolSvc/src/PoolSvc.h     |  3 +
 Database/IOVDbSvc/share/IOVDbSvc_test.ref     | 42 +++++-----
 Database/IOVDbSvc/src/IOVDbSvc.cxx            | 81 +++++++++++++------
 Database/IOVDbSvc/src/IOVDbSvc.h              | 11 ++-
 8 files changed, 132 insertions(+), 98 deletions(-)

diff --git a/Control/AthenaServices/src/AthenaOutputStream.cxx b/Control/AthenaServices/src/AthenaOutputStream.cxx
index 9a80f13a123c..1c574879f78e 100644
--- a/Control/AthenaServices/src/AthenaOutputStream.cxx
+++ b/Control/AthenaServices/src/AthenaOutputStream.cxx
@@ -350,7 +350,7 @@ void AthenaOutputStream::handle(const Incident& inc)
    std::unique_lock<mutex_t>  lock(m_mutex);
 
    // Handle Event Ranges for Event Service
-   if( m_outSeqSvc->inUse() and m_outSeqSvc->inConcurrentEventsMode() )
+   if( m_outSeqSvc->inUse() )
    {
       if( inc.type() == "MetaDataStop" )  {
          // all substreams should be closed by this point
diff --git a/Control/AthenaServices/src/MetaDataSvc.cxx b/Control/AthenaServices/src/MetaDataSvc.cxx
index 2a81f9dd6bb0..e94bca00818a 100644
--- a/Control/AthenaServices/src/MetaDataSvc.cxx
+++ b/Control/AthenaServices/src/MetaDataSvc.cxx
@@ -292,6 +292,7 @@ StatusCode MetaDataSvc::retireMetadataSource(const Incident& inc)
       return StatusCode::FAILURE;
    }
    const std::string guid = fileInc->fileGuid();
+   ATH_MSG_DEBUG("retireMetadataSource: " << fileInc->fileName());
    for (auto it = m_metaDataTools.begin(); it != m_metaDataTools.end(); ++it) {
       if ( (*it)->endInputFile(guid).isFailure() ) {
          ATH_MSG_ERROR("Unable to call endInputFile for " << it->name());
@@ -396,11 +397,17 @@ void MetaDataSvc::handle(const Incident& inc) {
       }
    } 
 }
+
 //__________________________________________________________________________
-StatusCode MetaDataSvc::transitionMetaDataFile() {
-   if( !m_allowMetaDataStop ) {
-      return(StatusCode::FAILURE);
-   }
+// This method is currently called only from OutputStreamSequencerSvc for MP EventService
+StatusCode MetaDataSvc::transitionMetaDataFile()
+{
+   ATH_MSG_DEBUG("transitionMetaDataFile()");
+
+   // this is normally called through EndInputFile inc, simulate it for EvSvc 
+   FileIncident inc("transitionMetaDataFile", "EndInputFile", "dummyMetaInputFileName", "");
+   ATH_CHECK(retireMetadataSource(inc));
+
    // Make sure metadata is ready for writing
    ATH_CHECK(this->prepareOutput());
 
@@ -418,6 +425,7 @@ StatusCode MetaDataSvc::transitionMetaDataFile() {
 
    return(StatusCode::SUCCESS);
 }
+
 //__________________________________________________________________________
 StatusCode MetaDataSvc::io_reinit() {
    ATH_MSG_INFO("I/O reinitialization...");
diff --git a/Control/AthenaServices/src/OutputStreamSequencerSvc.cxx b/Control/AthenaServices/src/OutputStreamSequencerSvc.cxx
index 6008b0d787c2..1b991f24cb11 100644
--- a/Control/AthenaServices/src/OutputStreamSequencerSvc.cxx
+++ b/Control/AthenaServices/src/OutputStreamSequencerSvc.cxx
@@ -95,28 +95,32 @@ void OutputStreamSequencerSvc::handle(const Incident& inc)
    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);
+         ATH_MSG_DEBUG("Requested (through incident) Next Event Range filename extension: " << rangeID);
       }
+      if( rangeID=="dummy") {
+         // finish the previous range
+         if( not inConcurrentEventsMode() ) {
+            // SEQUENTIAL (threads<2) event processing
+            // Write metadata on the incident finishing a Range (filename=="dummy")
+            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);
+            }
+         }
+         // exit now, wait for the next incident that will start the next range
+         return;
+      }
+      // start a new range
+      std::lock_guard lockg( m_mutex );
+      m_fileSequenceNumber++;
       if( rangeID.empty() ) {
          std::ostringstream n;
          n << "_" << std::setw(4) << std::setfill('0') << m_fileSequenceNumber;
diff --git a/Database/AthenaPOOL/PoolSvc/src/PoolSvc.cxx b/Database/AthenaPOOL/PoolSvc/src/PoolSvc.cxx
index bedf6f427386..4ccd4b01123d 100644
--- a/Database/AthenaPOOL/PoolSvc/src/PoolSvc.cxx
+++ b/Database/AthenaPOOL/PoolSvc/src/PoolSvc.cxx
@@ -175,11 +175,8 @@ StatusCode PoolSvc::io_reinit() {
 }
 //__________________________________________________________________________
 StatusCode PoolSvc::setupPersistencySvc() {
+   clearState();
    ATH_MSG_INFO("Setting up APR FileCatalog and Streams");
-   if (m_catalog != nullptr) {
-      m_catalog->commit();
-      delete m_catalog; m_catalog = nullptr;
-   }
    m_catalog = createCatalog();
    if (m_catalog != nullptr) {
       m_catalog->start();
@@ -187,15 +184,6 @@ StatusCode PoolSvc::setupPersistencySvc() {
       ATH_MSG_FATAL("Failed to setup POOL File Catalog.");
       return(StatusCode::FAILURE);
    }
-   // Cleanup persistency service
-   for (const auto& persistencySvc : m_persistencySvcVec) {
-      delete persistencySvc;
-   }
-   m_persistencySvcVec.clear();
-   for (const auto& persistencyMutex : m_pers_mut) {
-      delete persistencyMutex;
-   }
-   m_pers_mut.clear();
    // Setup a persistency services
    m_persistencySvcVec.push_back(pool::IPersistencySvc::create(*m_catalog).release()); // Read Service
    m_pers_mut.push_back(new CallMutex);
@@ -242,8 +230,9 @@ StatusCode PoolSvc::stop() {
    }
    return(retError ? StatusCode::FAILURE : StatusCode::SUCCESS);
 }
+
 //__________________________________________________________________________
-StatusCode PoolSvc::finalize() {
+void PoolSvc::clearState() {
    // Cleanup persistency service
    for (const auto& persistencySvc : m_persistencySvcVec) {
       delete persistencySvc;
@@ -252,11 +241,17 @@ StatusCode PoolSvc::finalize() {
    for (const auto& persistencyMutex : m_pers_mut) {
       delete persistencyMutex;
    }
+   m_mainOutputLabel.clear();
+   m_contextLabel.clear();
    m_pers_mut.clear();
    if (m_catalog != nullptr) {
       m_catalog->commit();
       delete m_catalog; m_catalog = nullptr;
    }
+}
+//__________________________________________________________________________
+StatusCode PoolSvc::finalize() {
+   clearState();
    return(::AthService::finalize());
 }
 //__________________________________________________________________________
@@ -268,18 +263,7 @@ StatusCode PoolSvc::io_finalize() {
          ATH_MSG_WARNING("Cannot disconnect output Stream " << i);
       }
    }
-   for (const auto& persistencySvc : m_persistencySvcVec) {
-      delete persistencySvc;
-   }
-   m_persistencySvcVec.clear();
-   for (const auto& persistencyMutex : m_pers_mut) {
-      delete persistencyMutex;
-   }
-   m_pers_mut.clear();
-   if (m_catalog != nullptr) {
-      m_catalog->commit();
-      delete m_catalog; m_catalog = nullptr;
-   }
+   clearState();
    return(StatusCode::SUCCESS);
 }
 //_______________________________________________________________________
@@ -607,6 +591,7 @@ StatusCode PoolSvc::connect(pool::ITransaction::Type type, unsigned int contextI
       ATH_MSG_ERROR("connect failed persSvc = " << persSvc << " type = " << type);
       return(StatusCode::FAILURE);
    }
+
    return(StatusCode::SUCCESS);
 }
 //__________________________________________________________________________
diff --git a/Database/AthenaPOOL/PoolSvc/src/PoolSvc.h b/Database/AthenaPOOL/PoolSvc/src/PoolSvc.h
index 900aa024c049..ff7e581c9d1f 100644
--- a/Database/AthenaPOOL/PoolSvc/src/PoolSvc.h
+++ b/Database/AthenaPOOL/PoolSvc/src/PoolSvc.h
@@ -223,6 +223,9 @@ private: // properties
    BooleanProperty m_sortReplicas{this,"SortReplicas",true};
 
 private: // internal helper functions
+   // delete all APR::Persistency Services, Catalog, Mutexes and Indexes
+   void clearState();
+
    pool::IFileCatalog* createCatalog();
 
    // setup APR persistency
diff --git a/Database/IOVDbSvc/share/IOVDbSvc_test.ref b/Database/IOVDbSvc/share/IOVDbSvc_test.ref
index 177dc6aa8515..8a3c061ff2a1 100644
--- a/Database/IOVDbSvc/share/IOVDbSvc_test.ref
+++ b/Database/IOVDbSvc/share/IOVDbSvc_test.ref
@@ -1,40 +1,28 @@
 IOVDbSvc_test
 
 
-Initializing Gaudi ApplicationMgr using job opts user_path/athena/Database/IOVDbSvc/share/IOVDbSvc_test.txt
-JobOptionsSvc        INFO # =======> user_path/athena/Database/IOVDbSvc/share/../share/IOVDbSvc_test.txt
+Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/m/mnowak/athena/event.service.mp/build/x86_64-centos7-gcc8-opt/jobOptions/IOVDbSvc/IOVDbSvc_test.txt
+JobOptionsSvc        INFO # =======> /afs/cern.ch/user/m/mnowak/athena/event.service.mp/build/x86_64-centos7-gcc8-opt/jobOptions/IOVDbSvc/IOVDbSvc_test.txt
 JobOptionsSvc        INFO # (1,1): ApplicationMgr.CreateSvc += ["StoreGateSvc/DetectorStore"]
-JobOptionsSvc        INFO # (2,1): IOVDbSvc.Folders = ["/key1", "/key2<extensible/>"]
+JobOptionsSvc        INFO # (2,1): IOVDbSvc.Folders = ["<db>sqlite://none;schema=mytest.db;dbname=OFLP200</db> /key1", "<db>sqlite://none;schema=mytest.db;dbname=OFLP200</db> /key2<extensible/>"]
 JobOptionsSvc        INFO # (3,1): EventPersistencySvc.CnvServices += ["AthenaPoolCnvSvc"]
-JobOptionsSvc        INFO Job options successfully read in from ../share/IOVDbSvc_test.txt
+JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/m/mnowak/athena/event.service.mp/build/x86_64-centos7-gcc8-opt/jobOptions/IOVDbSvc/IOVDbSvc_test.txt
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v30r4)
-                                          running on lxplus021.cern.ch on Mon Nov 19 14:46:10 2018
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on aibuild20-040.cern.ch on Fri Oct  2 21:29:07 2020
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
-ClassIDSvc           INFO  getRegistryEntries: read 642 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 758 CLIDRegistry entries for module ALL
 EventLoopMgr      WARNING Unable to locate service "EventSelector" 
 EventLoopMgr      WARNING No events will be processed from external input.
-HistogramPersis...WARNING Histograms saving not required.
 ApplicationMgr       INFO Application Manager Initialized successfully
 ApplicationMgr Ready
-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/2018-11-17T2340/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host lxplus021.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] 
-IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
 IOVDbFolder          INFO Extensible folder /key2
 IOVDbSvc             INFO Initialised with 2 connections and 2 folders
 IOVDbSvc             INFO Service IOVDbSvc initialised successfully
+ClassIDSvc           INFO  getRegistryEntries: read 1467 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO Opening COOL connection for sqlite://none;schema=mytest.db;dbname=OFLP200
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
 IOVSvc.IOVSvcTool    INFO IOVRanges will be checked at every Event
@@ -42,9 +30,19 @@ IOVDbSvc             INFO Disconnecting from sqlite://none;schema=mytest.db;dbna
 test1
 IOVDbSvc             INFO Opening COOL connection for sqlite://none;schema=mytest.db;dbname=OFLP200
 IOVDbSvc             INFO Disconnecting from sqlite://none;schema=mytest.db;dbname=OFLP200
-AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
+PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok]
+PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
+PoolSvc              INFO Frontier compression level set to 5
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-01T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host aibuild20-040.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] 
+IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 IOVDbFolder          INFO Increase cache length (step 1) for folder /key2 to 8589934590 at validityKey 85899345935
 IOVDbSvc             INFO Opening COOL connection for sqlite://none;schema=mytest.db;dbname=OFLP200
 IOVDbSvc             INFO Disconnecting from sqlite://none;schema=mytest.db;dbname=OFLP200
-
diff --git a/Database/IOVDbSvc/src/IOVDbSvc.cxx b/Database/IOVDbSvc/src/IOVDbSvc.cxx
index aec06b21e3a8..c3f836582622 100644
--- a/Database/IOVDbSvc/src/IOVDbSvc.cxx
+++ b/Database/IOVDbSvc/src/IOVDbSvc.cxx
@@ -14,6 +14,7 @@
 #include "GaudiKernel/Guards.h"
 #include "GaudiKernel/IOpaqueAddress.h"
 #include "GaudiKernel/IProperty.h"
+#include "GaudiKernel/IIoComponentMgr.h"
 #include "AthenaKernel/IOVRange.h"
 #include "IOVDbDataModel/IOVMetaDataContainer.h"
 #include "AthenaKernel/IAddressProvider.h"
@@ -54,6 +55,25 @@ IOVDbSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) {
   return StatusCode::SUCCESS;
 }
 
+int IOVDbSvc::poolSvcContext()
+{
+   if( m_poolSvcContext < 0 ) {
+      // Get context for POOL conditions files, and created an initial connection
+      if (m_par_managePoolConnections) {
+         m_poolSvcContext=m_h_poolSvc->getInputContext("Conditions", m_par_maxNumPoolFiles);
+      } else {
+         m_poolSvcContext=m_h_poolSvc->getInputContext("Conditions");
+      }
+      if( m_h_poolSvc->connect(pool::ITransaction::READ, m_poolSvcContext).isSuccess() ) {
+         ATH_MSG_INFO( "Opened read transaction for POOL PersistencySvc");
+      } else {
+         // We only emit info for failure to connect (for the moment? RDS 01/2008)
+         ATH_MSG_INFO( "Cannot connect to POOL PersistencySvc" );
+      }
+   }
+   return m_poolSvcContext;
+}
+
 StatusCode IOVDbSvc::initialize() {
   if (StatusCode::SUCCESS!=AthService::initialize()) return StatusCode::FAILURE;
   // subscribe to events
@@ -66,20 +86,16 @@ StatusCode IOVDbSvc::initialize() {
   incSvc->addListener( this, "BeginEvent", pri );
   incSvc->addListener( this, "StoreCleared", pri );
 
-  // Get context for POOL conditions files, and created an initial connection
-  if (m_par_managePoolConnections) {
-    m_poolSvcContext=m_h_poolSvc->getInputContext("Conditions", m_par_maxNumPoolFiles);
-  } else {
-    m_poolSvcContext=m_h_poolSvc->getInputContext("Conditions");
+  // Register this service for 'I/O' events
+  ServiceHandle<IIoComponentMgr> iomgr("IoComponentMgr", name());
+  if (!iomgr.retrieve().isSuccess()) {
+     ATH_MSG_FATAL("Could not retrieve IoComponentMgr !");
+     return(StatusCode::FAILURE);
   }
-  
-  if (StatusCode::SUCCESS==m_h_poolSvc->connect(pool::ITransaction::READ,m_poolSvcContext)) {
-    ATH_MSG_INFO( "Opened read transaction for POOL PersistencySvc");
-  } else {
-    // We only emit info for failure to connect (for the moment? RDS 01/2008)
-    ATH_MSG_INFO( "Cannot connect to POOL PersistencySvc" );
+  if (!iomgr->io_register(this).isSuccess()) {
+     ATH_MSG_FATAL("Could not register myself with the IoComponentMgr !");
+     return(StatusCode::FAILURE);
   }
-
   // print warnings/info depending on state of job options
   if (!m_par_manageConnections)
     ATH_MSG_INFO( "COOL connection management disabled - connections kept open throughout job" );
@@ -139,6 +155,19 @@ StatusCode IOVDbSvc::initialize() {
   return StatusCode::SUCCESS;
 }
 
+
+StatusCode IOVDbSvc::io_reinit() {
+   ATH_MSG_DEBUG("I/O reinitialization...");
+   // PoolSvc clears all connections on IO_reinit - forget the stored contextId
+   m_poolSvcContext = -1;
+   return(StatusCode::SUCCESS);
+}
+
+StatusCode IOVDbSvc::io_finalize() {
+   ATH_MSG_DEBUG("I/O finalization...");
+   return(StatusCode::SUCCESS);
+}
+
 StatusCode IOVDbSvc::finalize() {
   // summarise and delete folders, adding total read from COOL
   unsigned long long nread=0;
@@ -416,7 +445,7 @@ StatusCode IOVDbSvc::updateAddress(StoreID::type storeID, SG::TransientAddress*
   {
     Gaudi::Guards::AuditorGuard auditor(std::string("FldrSetup:")+(tad->name().empty() ? "anonymous" : tad->name()),
                                         auditorSvc(), "preLoadProxy");
-    if (!folder->getAddress(vkey,&(*m_h_persSvc),m_poolSvcContext,address,
+    if (!folder->getAddress(vkey,&(*m_h_persSvc),poolSvcContext(),address,
                             range,m_poolPayloadRequested)) {
       ATH_MSG_ERROR( "getAddress failed for folder " << folder->folderName() );
       return StatusCode::FAILURE;
@@ -506,7 +535,7 @@ StatusCode IOVDbSvc::getRange( const CLID&        clid,
   {
     Gaudi::Guards::AuditorGuard auditor(std::string("FldrSetup:")+(key.empty() ? "anonymous" : key),
                                         auditorSvc(), "preLoadProxy");
-    if (!folder->getAddress(vkey,&(*m_h_persSvc),m_poolSvcContext,address,
+    if (!folder->getAddress(vkey,&(*m_h_persSvc),poolSvcContext(),address,
                             range,m_poolPayloadRequested)) {
       ATH_MSG_ERROR("getAddress failed for folder " <<folder->folderName() );
       return StatusCode::FAILURE;
@@ -633,17 +662,19 @@ void IOVDbSvc::handle( const Incident& inc) {
         // reset POOL connection to close all open conditions POOL files
         m_par_managePoolConnections.set(false);
         m_poolPayloadRequested=false;
-        if (StatusCode::SUCCESS==m_h_poolSvc->disconnect(m_poolSvcContext)) {
-          ATH_MSG_DEBUG( "Successfully closed input POOL connections");
-        } else {
-          ATH_MSG_WARNING( "Unable to close input POOL connections" );
-        }
-        // reopen transaction
-        if (StatusCode::SUCCESS==m_h_poolSvc->connect(pool::ITransaction::READ,
-                                                      m_poolSvcContext)) {
-          ATH_MSG_DEBUG("Reopend read transaction for POOL conditions input files" );
-        } else {
-          ATH_MSG_WARNING("Cannot reopen read transaction for POOL conditions input files");
+        if( m_poolSvcContext ) {
+           if (StatusCode::SUCCESS==m_h_poolSvc->disconnect(m_poolSvcContext)) {
+              ATH_MSG_DEBUG( "Successfully closed input POOL connections");
+           } else {
+              ATH_MSG_WARNING( "Unable to close input POOL connections" );
+           }
+           // reopen transaction
+           if (StatusCode::SUCCESS==m_h_poolSvc->connect(pool::ITransaction::READ,
+                                                         m_poolSvcContext)) {
+              ATH_MSG_DEBUG("Reopend read transaction for POOL conditions input files" );
+           } else {
+              ATH_MSG_WARNING("Cannot reopen read transaction for POOL conditions input files");
+           }
         }
       }
     }
diff --git a/Database/IOVDbSvc/src/IOVDbSvc.h b/Database/IOVDbSvc/src/IOVDbSvc.h
index 4f54810e3cdd..b8b97e91a4b6 100644
--- a/Database/IOVDbSvc/src/IOVDbSvc.h
+++ b/Database/IOVDbSvc/src/IOVDbSvc.h
@@ -25,6 +25,7 @@
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/IAddressCreator.h"
+#include "GaudiKernel/IIoComponent.h"
 #include "SGTools/DataProxy.h"
 #include "EventInfoMgt/ITagInfoMgr.h"
 #include "PoolSvc/IPoolSvc.h"
@@ -75,7 +76,8 @@ class IOVDbSvc : public virtual IIOVCondDbSvc,
                  public virtual IIOVDbSvc,
                  public virtual IAddressProvider,
                  public virtual IIncidentListener,
-                 public virtual AthService
+                 public virtual AthService,
+                 public virtual IIoComponent
 {
   // Forward declarations
   template <class TYPE> class SvcFactory;
@@ -88,10 +90,12 @@ public:
   
   /// Service init
   virtual StatusCode initialize() override;
+  StatusCode io_reinit() override final;
 
   /// Service finalize
   virtual StatusCode finalize() override;
-  
+  StatusCode io_finalize() override final;
+
   /// Query the interfaces.
   virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface )  override;
   static const InterfaceID& interfaceID();
@@ -240,7 +244,8 @@ private:
   bool                           m_poolPayloadRequested{false};
 
   // Pool service context
-  unsigned int                   m_poolSvcContext{0};
+  int                   poolSvcContext();
+  int                   m_poolSvcContext {-1};
 
   // Flag to keep track of which state we are in to know
   // how to obtain the IOV time, i.e. during:
-- 
GitLab


From 38700e79e5bd77f06f176453b8ed23897cc4e148 Mon Sep 17 00:00:00 2001
From: Moe Wakida <wakida@hepl.phys.nagoya-u.ac.jp>
Date: Fri, 2 Oct 2020 22:27:17 +0200
Subject: [PATCH 139/403] Changed how to get the TrackParticles

---
 .../python/EFMuonMonConfig.py                 | 16 ++---
 .../TrigMuonMonitoringMT/src/EFMuonMonMT.cxx  | 60 +++++++++----------
 .../TrigMuonMonitoringMT/src/EFMuonMonMT.h    |  3 +
 .../src/MuonMatchingTool.cxx                  | 59 +++++++++++++++---
 .../src/MuonMatchingTool.h                    | 17 ++++--
 5 files changed, 103 insertions(+), 52 deletions(-)

diff --git a/Trigger/TrigMonitoring/TrigMuonMonitoringMT/python/EFMuonMonConfig.py b/Trigger/TrigMonitoring/TrigMuonMonitoringMT/python/EFMuonMonConfig.py
index 0561a361f78a..13f119bf3e57 100644
--- a/Trigger/TrigMonitoring/TrigMuonMonitoringMT/python/EFMuonMonConfig.py
+++ b/Trigger/TrigMonitoring/TrigMuonMonitoringMT/python/EFMuonMonConfig.py
@@ -41,37 +41,37 @@ def EFMuonMonConfig(helper):
 
         # basic EDM variables
         # EFSA
-        histGroup.defineHistogram(chain+'_EFSA_Pt;EFSA_Pt',
+        histGroup.defineHistogram(chain+'_MSTrack_Pt;EFSA_Pt',
                                   title='EFSA Pt '+chain+';p_{T} [GeV];Events', 
                                   type='TH1F', path='',xbins=210,xmin=-105.,xmax=105.)
 
-        histGroup.defineHistogram(chain+'_EFSA_Eta;EFSA_Eta',
+        histGroup.defineHistogram(chain+'_MSTrack_Eta;EFSA_Eta',
                                   title='EFSA Eta '+chain+';#eta;Events', 
                                   type='TH1F', path='',xbins=108,xmin=-2.7,xmax=2.7)
 
-        histGroup.defineHistogram(chain+'_EFSA_Phi;EFSA_Phi',
+        histGroup.defineHistogram(chain+'_MSTrack_Phi;EFSA_Phi',
                                   title='EFSA Phi '+chain+';#phi;Events', 
                                   type='TH1F', path='',xbins=96,xmin=-ROOT.TMath.Pi(),xmax=ROOT.TMath.Pi())
 
-        histGroup.defineHistogram(chain+'_EFSA_Eta,'+chain+'_EFSA_Phi;EFSA_Eta_vs_Phi',
+        histGroup.defineHistogram(chain+'_MSTrack_Eta,'+chain+'_MSTrack_Phi;EFSA_Eta_vs_Phi',
                                   title='EFSA Eta vs Phi '+chain+';#eta;#phi', 
                                   type='TH2F', path='',xbins=108,xmin=-2.7,xmax=2.7, ybins=96,ymin=-ROOT.TMath.Pi(),ymax=ROOT.TMath.Pi())
 
 
         # EFCB
-        histGroup.defineHistogram(chain+'_EFCB_Pt;EFCB_Pt',
+        histGroup.defineHistogram(chain+'_CBTrack_Pt;EFCB_Pt',
                                   title='EFCB Pt '+chain+';p_{T} [GeV];Events', 
                                   type='TH1F', path='',xbins=210,xmin=-105.,xmax=105.)
 
-        histGroup.defineHistogram(chain+'_EFCB_Eta;EFCB_Eta',
+        histGroup.defineHistogram(chain+'_CBTrack_Eta;EFCB_Eta',
                                   title='EFCB Eta '+chain+';#eta;Events', 
                                   type='TH1F', path='',xbins=108,xmin=-2.7,xmax=2.7)
 
-        histGroup.defineHistogram(chain+'_EFCB_Phi;EFCB_Phi',
+        histGroup.defineHistogram(chain+'_CBTrack_Phi;EFCB_Phi',
                                   title='EFCB Phi '+chain+';#phi;Events', 
                                   type='TH1F', path='',xbins=96,xmin=-ROOT.TMath.Pi(),xmax=ROOT.TMath.Pi())
 
-        histGroup.defineHistogram(chain+'_EFCB_Eta,'+chain+'_EFCB_Phi;EFCB_Eta_vs_Phi',
+        histGroup.defineHistogram(chain+'_CBTrack_Eta,'+chain+'_CBTrack_Phi;EFCB_Eta_vs_Phi',
                                   title='EFCB Eta vs Phi '+chain+';#eta;#phi', 
                                   type='TH2F', path='',xbins=108,xmin=-2.7,xmax=2.7, ybins=96,ymin=-ROOT.TMath.Pi(),ymax=ROOT.TMath.Pi())
 
diff --git a/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/EFMuonMonMT.cxx b/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/EFMuonMonMT.cxx
index bd5fb0120e73..7bf712af8de0 100644
--- a/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/EFMuonMonMT.cxx
+++ b/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/EFMuonMonMT.cxx
@@ -16,53 +16,53 @@ StatusCode EFMuonMonMT :: initialize(){
   StatusCode sc = TrigMuonMonitorAlgorithm::initialize();
   ATH_CHECK( m_EFSAMuonContainerKey.initialize() );
   ATH_CHECK( m_EFCBMuonContainerKey.initialize() );
+  ATH_CHECK( m_MStrackContainerKey.initialize() );
+  ATH_CHECK( m_CBtrackContainerKey.initialize() );
   return sc;
 }
 
 
-StatusCode EFMuonMonMT :: fillVariablesPerChain(const EventContext& , const std::string &chain) const {
+StatusCode EFMuonMonMT :: fillVariablesPerChain(const EventContext &ctx, const std::string &chain) const {
 
   ATH_MSG_DEBUG ("Filling histograms for " << name() << "...");
 
   // EFSA
   std::vector< TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> > featureContSA = getTrigDecisionTool()->features<xAOD::MuonContainer>( chain, TrigDefs::includeFailedDecisions, "HLT_Muons_");
+
   for (const TrigCompositeUtils::LinkInfo<xAOD::MuonContainer>& muSALinkInfo : featureContSA) {
     ATH_CHECK( muSALinkInfo.isValid() );
-    const ElementLink<xAOD::MuonContainer> muSAEL = muSALinkInfo.link;
-    const xAOD::TrackParticle* EFSATrack = (*muSAEL)->trackParticle(xAOD::Muon::TrackParticleType::ExtrapolatedMuonSpectrometerTrackParticle);
-    if ( !EFSATrack ) continue;
-
-    // basic EDM variables
-    auto EFSAPt = Monitored::Scalar<float>(chain+"_EFSA_Pt",-999.);
-    auto EFSAEta = Monitored::Scalar<float>(chain+"_EFSA_Eta",-999.);
-    auto EFSAPhi = Monitored::Scalar<float>(chain+"_EFSA_Phi",-999.);
-
-    EFSAPt = EFSATrack->pt()/1e3 * EFSATrack->charge(); // convert to GeV
-    EFSAEta = EFSATrack->eta();
-    EFSAPhi = EFSATrack->phi();
+    auto MSTrackPt = Monitored::Scalar<float>(chain+"_MSTrack_Pt", -999.);
+    auto MSTrackEta = Monitored::Scalar<float>(chain+"_MSTrack_Eta", -999.);
+    auto MSTrackPhi = Monitored::Scalar<float>(chain+"_MSTrack_Phi", -999.);
+
+    const xAOD::TrackParticle* MatchedMSTrack = m_matchTool->SearchEFTrack(ctx, muSALinkInfo, m_MStrackContainerKey);
+    if(MatchedMSTrack){
+      MSTrackPt = MatchedMSTrack->pt()/1e3 * MatchedMSTrack->charge();
+      MSTrackEta = MatchedMSTrack->eta();
+      MSTrackPhi = MatchedMSTrack->phi(); 
+    }
 
-    fill(m_group+"_"+chain, EFSAPt, EFSAEta, EFSAPhi);
+    fill(m_group+"_"+chain, MSTrackPt, MSTrackEta, MSTrackPhi);
   }
 
 
   // EFCB
   std::vector< TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> > featureContCB = getTrigDecisionTool()->features<xAOD::MuonContainer>( chain, TrigDefs::includeFailedDecisions, "HLT_MuonsCB");
+
   for (const TrigCompositeUtils::LinkInfo<xAOD::MuonContainer>& muCBLinkInfo : featureContCB) {
     ATH_CHECK( muCBLinkInfo.isValid() );
-    const ElementLink<xAOD::MuonContainer> muCBEL = muCBLinkInfo.link;
-    const xAOD::TrackParticle* EFCBTrack = (*muCBEL)->trackParticle(xAOD::Muon::TrackParticleType::CombinedTrackParticle);
-    if ( !EFCBTrack ) continue;
-
-    // basic EDM variables
-    auto EFCBPt = Monitored::Scalar<float>(chain+"_EFCB_Pt",-999.);
-    auto EFCBEta = Monitored::Scalar<float>(chain+"_EFCB_Eta",-999.);
-    auto EFCBPhi = Monitored::Scalar<float>(chain+"_EFCB_Phi",-999.);
-
-    EFCBPt = EFCBTrack->pt()/1e3 * EFCBTrack->charge(); // convert to GeV
-    EFCBEta = EFCBTrack->eta();
-    EFCBPhi = EFCBTrack->phi();
+    auto CBTrackPt = Monitored::Scalar<float>(chain+"_CBTrack_Pt", -999.);
+    auto CBTrackEta = Monitored::Scalar<float>(chain+"_CBTrack_Eta", -999.);
+    auto CBTrackPhi = Monitored::Scalar<float>(chain+"_CBTrack_Phi", -999.);
+
+    const xAOD::TrackParticle* MatchedCBTrack = m_matchTool->SearchEFTrack(ctx, muCBLinkInfo, m_CBtrackContainerKey);
+    if(MatchedCBTrack){
+      CBTrackPt = MatchedCBTrack->pt()/1e3 * MatchedCBTrack->charge();
+      CBTrackEta = MatchedCBTrack->eta();
+      CBTrackPhi = MatchedCBTrack->phi(); 
+    }
 
-    fill(m_group+"_"+chain, EFCBPt, EFCBEta, EFCBPhi);
+    fill(m_group+"_"+chain, CBTrackPt, CBTrackEta, CBTrackPhi);
   }
 
   return StatusCode::SUCCESS;
@@ -108,8 +108,7 @@ StatusCode EFMuonMonMT :: fillVariablesPerOfflineMuonPerChain(const EventContext
     // get the EFSA muon matched to offlineSA muon
     const TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> EFSAMuonLinkInfo = m_matchTool->matchEFSALinkInfo(mu, chain); 
     if( EFSAMuonLinkInfo.isValid() ){
-      const ElementLink<xAOD::MuonContainer> EFSAMuon = EFSAMuonLinkInfo.link;
-      const xAOD::TrackParticle* EFSATrack = (*EFSAMuon)->trackParticle(xAOD::Muon::TrackParticleType::ExtrapolatedMuonSpectrometerTrackParticle);
+      const xAOD::TrackParticle* EFSATrack = m_matchTool->SearchEFTrack(ctx, EFSAMuonLinkInfo, m_MStrackContainerKey);
       if ( EFSATrack ){
         matchedEFSA = true;
   
@@ -179,8 +178,7 @@ StatusCode EFMuonMonMT :: fillVariablesPerOfflineMuonPerChain(const EventContext
     // get the closest EFCB muon
     const TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> EFCBMuonLinkInfo = m_matchTool->matchEFCBLinkInfo(mu, chain);
     if( EFCBMuonLinkInfo.isValid() ){
-      const ElementLink<xAOD::MuonContainer> EFCBMuon = EFCBMuonLinkInfo.link;
-      const xAOD::TrackParticle* EFCBTrack = (*EFCBMuon)->trackParticle(xAOD::Muon::TrackParticleType::CombinedTrackParticle);
+      const xAOD::TrackParticle* EFCBTrack = m_matchTool->SearchEFTrack(ctx, EFCBMuonLinkInfo, m_CBtrackContainerKey);
       if ( EFCBTrack ){
         matchedEFCB = true;
   
diff --git a/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/EFMuonMonMT.h b/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/EFMuonMonMT.h
index 1475e7fe8af5..77a7bd492387 100644
--- a/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/EFMuonMonMT.h
+++ b/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/EFMuonMonMT.h
@@ -27,6 +27,9 @@ class EFMuonMonMT : public TrigMuonMonitorAlgorithm{
  private:
   SG::ReadHandleKey<xAOD::MuonContainer> m_EFSAMuonContainerKey {this, "EFSAMuonContainerName", "HLT_Muons_RoI", "EFSAMuon container"};
   SG::ReadHandleKey<xAOD::MuonContainer> m_EFCBMuonContainerKey {this, "EFCBMuonContainerName", "HLT_MuonsCB_RoI", "EFCBMuon container"};
+  SG::ReadHandleKey<xAOD::TrackParticleContainer> m_MStrackContainerKey {this, "ExtrapolatedMStrackConntainner", "HLT_MSExtrapolatedMuons_RoITrackParticles", "EFCBMuon container"};
+  SG::ReadHandleKey<xAOD::TrackParticleContainer> m_CBtrackContainerKey {this, "CBtrackContainerName", "HLT_CBCombinedMuon_RoITrackParticles", "EFCBMuon container"};
+
 
 };
 
diff --git a/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/MuonMatchingTool.cxx b/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/MuonMatchingTool.cxx
index 527b9503a059..775c062b1a8b 100644
--- a/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/MuonMatchingTool.cxx
+++ b/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/MuonMatchingTool.cxx
@@ -24,6 +24,8 @@ StatusCode MuonMatchingTool :: initialize(){
   ATH_CHECK( m_L2muCombContainerKey.initialize() );
   ATH_CHECK( m_EFSAMuonContainerKey.initialize() );
   ATH_CHECK( m_EFCBMuonContainerKey.initialize() );
+  ATH_CHECK( m_MStrackContainerKey.initialize() );
+  ATH_CHECK( m_CBtrackContainerKey.initialize() );
 
   return StatusCode::SUCCESS;
 }
@@ -42,6 +44,14 @@ std::tuple<bool, double,double> MuonMatchingTool :: trigPosForMatch<xAOD::L2Stan
 }
 
 
+std::tuple<bool, double,double> MuonMatchingTool :: trigPosForMatchSATrack(const xAOD::Muon *mu){
+  return mu->muonType() == xAOD::Muon::MuonType::MuonStandAlone ? std::forward_as_tuple(true, mu->eta(), mu->phi()) : std::forward_as_tuple(false, 0., 0.);
+}
+
+std::tuple<bool, double,double> MuonMatchingTool :: trigPosForMatchCBTrack(const xAOD::Muon *mu){
+  return mu->muonType() == xAOD::Muon::MuonType::Combined ? std::forward_as_tuple(true, mu->eta(), mu->phi()) : std::forward_as_tuple(false, 0., 0.);
+}
+
 std::tuple<bool, double,double> MuonMatchingTool :: PosForMatchSATrack(const xAOD::Muon *mu){
   const xAOD::TrackParticle* MuonTrack = mu->trackParticle(xAOD::Muon::TrackParticleType::ExtrapolatedMuonSpectrometerTrackParticle);
   return MuonTrack ? std::forward_as_tuple(true, MuonTrack->eta(), MuonTrack->phi()) : std::forward_as_tuple(false, 0., 0.);
@@ -53,7 +63,8 @@ std::tuple<bool, double,double> MuonMatchingTool :: PosForMatchCBTrack(const xAO
 }
 
 
-const xAOD::Muon* MuonMatchingTool :: matchEFSA(  const xAOD::Muon *mu, std::string trig, bool &pass) const {
+
+const xAOD::Muon* MuonMatchingTool :: matchEFSA(const xAOD::Muon *mu, std::string trig, bool &pass) const {
   ATH_MSG_DEBUG("MuonMonitoring::matchEFSA()");
   const xAOD::TrackParticle* MuonTrack = nullptr;
   using Type = xAOD::Muon::TrackParticleType;
@@ -64,10 +75,10 @@ const xAOD::Muon* MuonMatchingTool :: matchEFSA(  const xAOD::Muon *mu, std::str
     MuonTrack = mu->trackParticle(type);
     if (MuonTrack) break;
   }
-  return MuonTrack ? match<xAOD::Muon>( MuonTrack, trig, m_EFreqdR, pass, "HLT_Muons_", &MuonMatchingTool::PosForMatchSATrack) : nullptr;
+  return MuonTrack ? match<xAOD::Muon>(MuonTrack, trig, m_EFreqdR, pass, "HLT_Muons_", &MuonMatchingTool::trigPosForMatchSATrack) : nullptr;
 }
 
-const TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> MuonMatchingTool :: matchEFSALinkInfo( const xAOD::Muon *mu, std::string trig) const {
+const TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> MuonMatchingTool :: matchEFSALinkInfo(const xAOD::Muon *mu, std::string trig) const {
   ATH_MSG_DEBUG("MuonMonitoring::matchEFSALinkInfo()");
   bool pass = false;
   TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> muonLinkInfo;
@@ -80,9 +91,10 @@ const TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> MuonMatchingTool :: matc
     MuonTrack = mu->trackParticle(type);
     if (MuonTrack) break;
   }
-  return MuonTrack ? matchLinkInfo<xAOD::Muon>(MuonTrack, trig, m_EFreqdR, pass, "HLT_Muons_", &MuonMatchingTool::PosForMatchSATrack) : muonLinkInfo;
+  return MuonTrack ? matchLinkInfo<xAOD::Muon>(MuonTrack, trig, m_EFreqdR, pass, "HLT_Muons_", &MuonMatchingTool::trigPosForMatchSATrack) : muonLinkInfo;
 }
 
+
 const xAOD::Muon* MuonMatchingTool :: matchEFSAReadHandle( const EventContext& ctx, const xAOD::Muon *mu) const {
   ATH_MSG_DEBUG("MuonMonitoring::matchEFSAReadHandle()");
   const xAOD::TrackParticle* MuonTrack = nullptr;
@@ -101,7 +113,7 @@ const xAOD::Muon* MuonMatchingTool :: matchEFSAReadHandle( const EventContext& c
 const xAOD::Muon* MuonMatchingTool :: matchEFCB(  const xAOD::Muon *mu, std::string trig, bool &pass) const {
   ATH_MSG_DEBUG("MuonMonitoring::matchEFCB()");
   const xAOD::TrackParticle* MuonTrack = mu->trackParticle(xAOD::Muon::TrackParticleType::Primary);
-  return MuonTrack ? match<xAOD::Muon>( MuonTrack, trig, m_EFreqdR, pass, "HLT_MuonsCB", &MuonMatchingTool::PosForMatchCBTrack) : nullptr;
+  return MuonTrack ? match<xAOD::Muon>( MuonTrack, trig, m_EFreqdR, pass, "HLT_MuonsCB", &MuonMatchingTool::trigPosForMatchCBTrack) : nullptr;
 }
 
 const TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> MuonMatchingTool :: matchEFCBLinkInfo( const xAOD::Muon *mu, std::string trig) const {
@@ -109,7 +121,7 @@ const TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> MuonMatchingTool :: matc
   bool pass = false;
   TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> muonLinkInfo;
   const xAOD::TrackParticle* MuonTrack = mu->trackParticle(xAOD::Muon::TrackParticleType::Primary);
-  return MuonTrack ? matchLinkInfo<xAOD::Muon>(MuonTrack, trig, m_EFreqdR, pass, "HLT_MuonsCB", &MuonMatchingTool::PosForMatchCBTrack) : muonLinkInfo;
+  return MuonTrack ? matchLinkInfo<xAOD::Muon>(MuonTrack, trig, m_EFreqdR, pass, "HLT_MuonsCB", &MuonMatchingTool::trigPosForMatchCBTrack) : muonLinkInfo;
 }
 
 const xAOD::Muon* MuonMatchingTool :: matchEFCBReadHandle( const EventContext& ctx, const xAOD::Muon *mu) const {
@@ -119,10 +131,41 @@ const xAOD::Muon* MuonMatchingTool :: matchEFCBReadHandle( const EventContext& c
 }
 
 
-const xAOD::Muon* MuonMatchingTool :: matchEFIso(  const xAOD::Muon *mu, std::string trig, bool &pass) const {
+const xAOD::Muon* MuonMatchingTool :: matchEFIso( const xAOD::Muon *mu, std::string trig, bool &pass) const {
   ATH_MSG_DEBUG("MuonMonitoring::matchEFIso()");
   const xAOD::TrackParticle* MuonTrack = mu->trackParticle(xAOD::Muon::TrackParticleType::Primary);
-  return MuonTrack ? match<xAOD::Muon>( MuonTrack, trig, m_EFreqdR, pass, "HLT_MuonsIso", &MuonMatchingTool::PosForMatchCBTrack) : nullptr;
+  return MuonTrack ? match<xAOD::Muon>( MuonTrack, trig, m_EFreqdR, pass, "HLT_MuonsIso", &MuonMatchingTool::trigPosForMatchCBTrack) : nullptr;
+}
+
+
+const xAOD::TrackParticle* MuonMatchingTool :: SearchEFTrack(const EventContext &ctx, const TrigCompositeUtils::LinkInfo<xAOD::MuonContainer>& muLinkInfo, SG::ReadHandleKey<xAOD::TrackParticleContainer> ReadHandleKey) const {
+  const xAOD::TrackParticle* MatchedTrack = nullptr;
+  const ElementLink<xAOD::MuonContainer> muEL = muLinkInfo.link;
+  float EFEta = (*muEL)->eta();
+  float EFPhi = (*muEL)->phi();
+  float mindR = 999.;
+
+  SG::ReadHandle<xAOD::TrackParticleContainer> trackHandle(ReadHandleKey, ctx);
+  if ( !trackHandle.isValid() ) return MatchedTrack;
+
+  const auto track = m_trigDec->associateToEventView<xAOD::TrackParticleContainer>(trackHandle, muLinkInfo);
+  const xAOD::TrackParticleContainer::const_iterator begin = track.first;
+  const xAOD::TrackParticleContainer::const_iterator end  = track.second;
+
+  for (xAOD::TrackParticleContainer::const_iterator it = begin; it != end; ++it) {
+
+    float deta = EFEta - (*it)->eta();
+    float dphi = xAOD::P4Helpers::deltaPhi(EFPhi, (*it)->phi() );
+    float dR = sqrt(deta*deta + dphi*dphi);
+
+    if( dR< mindR ){
+      mindR = dR;
+      MatchedTrack = (*it);
+    }
+  }
+
+  return MatchedTrack;
+
 }
 
 
diff --git a/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/MuonMatchingTool.h b/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/MuonMatchingTool.h
index 9a39791eb98b..1345e82cc02f 100644
--- a/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/MuonMatchingTool.h
+++ b/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/MuonMatchingTool.h
@@ -161,6 +161,8 @@ class MuonMatchingTool : public AthAlgTool {
   const xAOD::Muon* matchEFIso(const xAOD::Muon *mu, std::string trigger, bool &pass) const;
 
 
+  const xAOD::TrackParticle* SearchEFTrack(const EventContext &ctx, const TrigCompositeUtils::LinkInfo<xAOD::MuonContainer>& muLinkInfo, SG::ReadHandleKey<xAOD::TrackParticleContainer> ReadHandleKey) const;
+
   /**
    * @brief Function that searches for an offline muon matched to L2SA muon
    * @param ctx Reference to the @c EventContext needed for accessing the @c Muons container.
@@ -200,6 +202,8 @@ class MuonMatchingTool : public AthAlgTool {
   static double reqdRL1byPt(double mupt);
 
 
+  static std::tuple<bool,double,double> trigPosForMatchSATrack(const xAOD::Muon *mu);
+  static std::tuple<bool,double,double> trigPosForMatchCBTrack(const xAOD::Muon *mu);
   static std::tuple<bool,double,double> PosForMatchSATrack(const xAOD::Muon *mu);
   static std::tuple<bool,double,double> PosForMatchCBTrack(const xAOD::Muon *mu);
 
@@ -249,9 +253,10 @@ class MuonMatchingTool : public AthAlgTool {
    * @see MuonMatchingTool.icc for the implementation and MuonMatchingTool.cxx for the instantiation.
    * @todo Consider improving the argument list.
    */
-  template<class T, class OFFL> const TrigCompositeUtils::LinkInfo<DataVector<T> > matchLinkInfo(const OFFL *offl, std::string trigger, float reqdR, bool &pass,
-                                   const std::string containerSGKey = "",
-				   std::tuple<bool,double,double> (*trigPosForMatchFunc)(const T*) = &MuonMatchingTool::trigPosForMatch<T>) const;
+  template<class T, class OFFL> 
+  const TrigCompositeUtils::LinkInfo<DataVector<T> > matchLinkInfo(const OFFL *offl, std::string trigger, float reqdR, bool &pass,
+                                                                   const std::string containerSGKey = "",
+				                                   std::tuple<bool,double,double> (*trigPosForMatchFunc)(const T*) = &MuonMatchingTool::trigPosForMatch<T>) const;
 
   /**
    * @brief Function that searches for an online muon candidate of type T and judges if it is matched to a given offline muon.
@@ -266,8 +271,8 @@ class MuonMatchingTool : public AthAlgTool {
    * @todo Consider improving the argument list.
    */
   template<class T, class OFFL> const T* match(const OFFL *offl, std::string trigger, float reqdR, bool &pass,
-                                   const std::string containerSGKey = "",
-				   std::tuple<bool,double,double> (*trigPosForMatchFunc)(const T*) = &MuonMatchingTool::trigPosForMatch<T>) const;
+                                               const std::string containerSGKey = "",
+				               std::tuple<bool,double,double> (*trigPosForMatchFunc)(const T*) = &MuonMatchingTool::trigPosForMatch<T>) const;
 
   /**
    * @brief Function that searches for an offline muon candidate matched to online muon of type T.
@@ -300,6 +305,8 @@ class MuonMatchingTool : public AthAlgTool {
   SG::ReadHandleKey<xAOD::L2CombinedMuonContainer> m_L2muCombContainerKey {this, "L2CombinedMuonContainerName", "HLT_MuonL2CBInfo", "L2muComb container"};
   SG::ReadHandleKey<xAOD::MuonContainer> m_EFSAMuonContainerKey {this, "EFSAMuonContainerName", "HLT_Muons_RoI", "EFSAMuon container"};
   SG::ReadHandleKey<xAOD::MuonContainer> m_EFCBMuonContainerKey {this, "EFCBMuonContainerName", "HLT_MuonsCB_RoI", "EFCBMuon container"};
+  SG::ReadHandleKey<xAOD::TrackParticleContainer> m_MStrackContainerKey {this, "ExtrapolatedMStrackConntainner", "HLT_MSExtrapolatedMuons_RoITrackParticles", "ExtrapolatedMuons track container"};
+  SG::ReadHandleKey<xAOD::TrackParticleContainer> m_CBtrackContainerKey {this, "CBtrackContainerName", "HLT_CBCombinedMuon_RoITrackParticles", "CombinedMuon track container"};
 
   // properties
   Gaudi::Property<bool> m_use_extrapolator {this, "UseExtrapolator", false, "Flag to enable the extrapolator for matching offline and trigger muons"};
-- 
GitLab


From a30a0ecfb8d52ae0b7560633f698d5b408bbbcaf Mon Sep 17 00:00:00 2001
From: Maximilian Goblirsch-Kolb <goblirsc@cern.ch>
Date: Fri, 2 Oct 2020 23:41:21 +0200
Subject: [PATCH 140/403] revise standalone IDPVM job options to re-use
 existing code

---
 .../InDetPhysValMonitoring_topOptions.py      | 84 +++++--------------
 1 file changed, 21 insertions(+), 63 deletions(-)

diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/InDetPhysValMonitoring_topOptions.py b/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/InDetPhysValMonitoring_topOptions.py
index f5d09db69d8d..58496bafea31 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/InDetPhysValMonitoring_topOptions.py
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/InDetPhysValMonitoring_topOptions.py
@@ -1,6 +1,5 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-
 # Define a few configuration arguments that can be passed by the user via the command line.
 # Avoid the need of hacking the job option file 
 def GetCustomAthArgs():
@@ -14,28 +13,31 @@ def GetCustomAthArgs():
     IDPVMparser.add_argument("--HSFlag", help='Hard-scatter flag - decides what is used for truth matching', choices=['HardScatter', 'All', 'PileUp'],default="HardScatter")
     return IDPVMparser.parse_args()
 
-
+# Parse the arguments 
 MyArgs = GetCustomAthArgs()
 
+# Forward the args into the InDetPhysValFlags used to steer our job 
+from InDetPhysValMonitoring.InDetPhysValJobProperties import InDetPhysValFlags
+InDetPhysValFlags.setTruthStrategy.set_Value_and_Lock(MyArgs.HSFlag)
+InDetPhysValFlags.doExpertOutput.set_Value_and_Lock(MyArgs.doExpertPlots)
+InDetPhysValFlags.doPhysValOutput.set_Value_and_Lock(True)
+InDetPhysValFlags.doValidateTracksInBJets.set_Value_and_Lock(MyArgs.doTracksInBJets)
+InDetPhysValFlags.doValidateTracksInJets.set_Value_and_Lock(MyArgs.doTracksInJets)
+InDetPhysValFlags.doValidateTightPrimaryTracks.set_Value_and_Lock(MyArgs.doTightPrimary)
+
+# Print the configuration
+print(" ==== Final Phys Val flags to run === ")
+print(InDetPhysValFlags)
+
+# Set up the I/O and the RecExCommon infrastructure 
 from InDetRecExample.InDetJobProperties import InDetFlags
 InDetFlags.doSlimming.set_Value_and_Lock(False)
 rec.doTrigger.set_Value_and_Lock(False)
-
 include( "AthenaPython/iread_file.py" )
 
+# Add our monitoring manager to the topSequence
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
-
-from InDetPhysValMonitoring.InDetPhysValMonitoringConf import HistogramDefinitionSvc
-ToolSvc = ServiceMgr.ToolSvc
-ServiceMgr+=HistogramDefinitionSvc()
-ServiceMgr.HistogramDefinitionSvc.DefinitionSource="../share/InDetPVMPlotDefRun2.xml"
-ServiceMgr.HistogramDefinitionSvc.DefinitionFormat="text/xml"
-
-import InDetPhysValMonitoring.InDetPhysValDecoration
-for decorator in InDetPhysValMonitoring.InDetPhysValDecoration.getDecorators() :
-  topSequence += decorator
-
 from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager
 monMan = AthenaMonManager( "PhysValMonManager",
   FileKey = "M_output",
@@ -45,57 +47,13 @@ monMan = AthenaMonManager( "PhysValMonManager",
   ManualRunLBSetup = True,
   Run = 1,
   LumiBlock = 1  )
-  
-print (monMan)
-
 topSequence += monMan
 
-
-
-from InDetTrackSelectionTool.InDetTrackSelectionToolConf import InDet__InDetTrackSelectionTool
-InDetTrackSelectorTool=InDet__InDetTrackSelectionTool()
-ToolSvc += InDetTrackSelectorTool
-InDetTrackSelectorTool.CutLevel = "TightPrimary"
-                                                 
-from InDetPhysValMonitoring.InDetPhysValMonitoringConf import AthTruthSelectionTool
-AthTruthSelectionTool = AthTruthSelectionTool()
-
-print (AthTruthSelectionTool)
-
-from InDetPhysValMonitoring.InDetPhysValMonitoringConf import InDetPhysValMonitoringTool
-
-tool1 = InDetPhysValMonitoringTool()
-tool1.TruthSelectionTool = AthTruthSelectionTool
-tool1.useTrackSelection = False
-tool1.TrackSelectionTool=InDetTrackSelectorTool
-tool1.PileupSwitch=MyArgs.HSFlag
-tool1.FillTrackInJetPlots = MyArgs.doTracksInJets
-tool1.FillTrackInBJetPlots = MyArgs.doTracksInBJets
-tool1.SkillLevel = 201 if MyArgs.doExpertPlots else 1
-print (tool1)
-tool1.ManagerName = 'PhysValMonManager'
-monMan.AthenaMonTools += [tool1]
-
-if MyArgs.doTightPrimary:
-  from InDetPhysValMonitoring.InDetPhysValMonitoringConf import InDetPhysValMonitoringTool
-  toolTP = InDetPhysValMonitoringTool("IDPVMTool_TightPrimary")
-  toolTP.TruthSelectionTool = AthTruthSelectionTool
-  toolTP.useTrackSelection = True
-  toolTP.SubFolder = "TightPrimary/"
-  toolTP.PileupSwitch=MyArgs.HSFlag
-  toolTP.TrackSelectionTool=InDetTrackSelectorTool
-  toolTP.FillTrackInJetPlots = MyArgs.doTracksInJets
-  toolTP.FillTrackInBJetPlots = MyArgs.doTracksInBJets
-  tool1.SkillLevel = 201 if MyArgs.doExpertPlots else 1
-  print (toolTP)
-  toolTP.ManagerName = 'PhysValMonManager'
-  monMan.AthenaMonTools += [toolTP  ]
-
+# Now we can attach our IDPVM tool instances 
+# To do this, we leverage the existing job options from PhysValMonitoring
+include ("PhysValMonitoring/PhysValInDet_jobOptions.py") 
+  
+# finally, set up the infrastructure for writing our output
 from GaudiSvc.GaudiSvcConf import THistSvc
 ServiceMgr += THistSvc()
 svcMgr.THistSvc.Output += ["M_output DATAFILE='"+MyArgs.outputFile+"' OPT='RECREATE'"]
-
-# Do some additional tweaking:
-from AthenaCommon.AppMgr import theApp
-ServiceMgr.MessageSvc.OutputLevel = INFO
-ServiceMgr.MessageSvc.defaultLimit = 10000
\ No newline at end of file
-- 
GitLab


From 067cc68993acd70b0ff6a555dbbbee9a448d7397 Mon Sep 17 00:00:00 2001
From: Maximilian Goblirsch-Kolb <goblirsc@cern.ch>
Date: Fri, 2 Oct 2020 23:41:51 +0200
Subject: [PATCH 141/403] extend track-in-jet plots to prepare truth matched
 versions without effi booking

---
 .../src/InDetPerfPlot_TrkInJet.cxx            | 25 +++++++++++--------
 .../src/InDetPerfPlot_TrkInJet.h              |  4 ++-
 2 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_TrkInJet.cxx b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_TrkInJet.cxx
index 97747e432fab..22fc13f0e046 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_TrkInJet.cxx
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_TrkInJet.cxx
@@ -19,7 +19,7 @@
 using namespace IDPVM;
 
 
-InDetPerfPlot_TrkInJet::InDetPerfPlot_TrkInJet(InDetPlotBase* pParent, std::string sDir) :
+InDetPerfPlot_TrkInJet::InDetPerfPlot_TrkInJet(InDetPlotBase* pParent, std::string sDir, bool bookFakeAndEff) :
   InDetPlotBase(pParent, sDir),
 
   m_nInnerMostPixelHits_vs_dR{},
@@ -68,7 +68,8 @@ InDetPerfPlot_TrkInJet::InDetPerfPlot_TrkInJet(InDetPlotBase* pParent, std::stri
 
   m_fakerate_vs_dR{},
   m_fakerate_vs_smalldR{},
-  m_fakerate_vs_jetpT{} {
+  m_fakerate_vs_jetpT{},
+  m_doFakeAndEff(bookFakeAndEff) {
 
   //nop
 
@@ -119,14 +120,15 @@ InDetPerfPlot_TrkInJet::initializePlots() {
   book(m_reco_lowpt_vs_dR, "reco_lowpt_vs_dR");
 
   book(m_reco_chi2Overndof_vs_dR, "reco_chi2Overndof_vs_dR");
-
-  book(m_efficiency_vs_dR, "efficiency_vs_dR");
-  book(m_efficiency_vs_smalldR, "efficiency_vs_smalldR");
-  book(m_efficiency_vs_jetpT, "efficiency_vs_jetpT");
-
-  book(m_fakerate_vs_dR, "fakerate_vs_dR");
-  book(m_fakerate_vs_smalldR, "fakerate_vs_smalldR");
-  book(m_fakerate_vs_jetpT, "fakerate_vs_jetpT");
+  if (m_doFakeAndEff){
+    book(m_efficiency_vs_dR, "efficiency_vs_dR");
+    book(m_efficiency_vs_smalldR, "efficiency_vs_smalldR");
+    book(m_efficiency_vs_jetpT, "efficiency_vs_jetpT");
+
+    book(m_fakerate_vs_dR, "fakerate_vs_dR");
+    book(m_fakerate_vs_smalldR, "fakerate_vs_smalldR");
+    book(m_fakerate_vs_jetpT, "fakerate_vs_jetpT");
+  }
 
 }
 
@@ -252,7 +254,7 @@ InDetPerfPlot_TrkInJet::fill(const xAOD::TrackParticle& trk, const xAOD::Jet& je
 
 void
 InDetPerfPlot_TrkInJet::fillEfficiency(const xAOD::TruthParticle& truth, const xAOD::Jet& jet, const bool isGood) {
-
+  if (!m_doFakeAndEff) return; 
   float dR = jet.p4().DeltaR(truth.p4());
   float jetpT = jet.pt() / Gaudi::Units::GeV;
   fillHisto(m_efficiency_vs_dR, dR, isGood);
@@ -263,6 +265,7 @@ InDetPerfPlot_TrkInJet::fillEfficiency(const xAOD::TruthParticle& truth, const x
 
 void
 InDetPerfPlot_TrkInJet::fillFakeRate(const xAOD::TrackParticle& trk, const xAOD::Jet& jet, const bool isFake) {
+  if (!m_doFakeAndEff) return; 
   float dR = jet.p4().DeltaR(trk.p4());
   float jetpT = jet.pt() / Gaudi::Units::GeV;
 
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_TrkInJet.h b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_TrkInJet.h
index d4d082013d21..c509b8a39170 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_TrkInJet.h
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_TrkInJet.h
@@ -14,7 +14,7 @@
 
 class InDetPerfPlot_TrkInJet: public InDetPlotBase {
 public:
-  InDetPerfPlot_TrkInJet(InDetPlotBase* pParent, std::string sDir);
+  InDetPerfPlot_TrkInJet(InDetPlotBase* pParent, std::string sDir, bool bookFakeAndEff=true);
   void fill(const xAOD::TrackParticle& trk, const xAOD::Jet& jet);
 
   void fillEfficiency(const xAOD::TruthParticle& trk, const xAOD::Jet& jet, const bool isEfficient);
@@ -72,6 +72,8 @@ private:
   TEfficiency* m_fakerate_vs_smalldR;
   TEfficiency* m_fakerate_vs_jetpT;
 
+  bool m_doFakeAndEff;
+
 
 };
 
-- 
GitLab


From 010f0f593cbccfee5815afe086c20b6022f3bfd6 Mon Sep 17 00:00:00 2001
From: Maximilian Goblirsch-Kolb <goblirsc@cern.ch>
Date: Fri, 2 Oct 2020 23:42:08 +0200
Subject: [PATCH 142/403] extend RTTPlots to book additional track-in-jet plots

---
 .../src/InDetRttPlots.cxx                     | 38 ++++++++++++++++++-
 .../src/InDetRttPlots.h                       |  8 +++-
 2 files changed, 43 insertions(+), 3 deletions(-)

diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetRttPlots.cxx b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetRttPlots.cxx
index 8d6332e53384..b5be6c232b13 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetRttPlots.cxx
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetRttPlots.cxx
@@ -76,8 +76,18 @@ InDetRttPlots::InDetRttPlots(InDetPlotBase* pParent, const std::string& sDir, co
   //A lot of Jets... do we need these at all???
   if(m_doTrackInJetPlots){
     m_trkInJetPlots = std::make_unique<InDetPerfPlot_TrkInJet>(this, "TracksInJets/Tracks");
+    if (m_iDetailLevel >= 200){
+      m_trkInJetPlots_matched = std::make_unique<InDetPerfPlot_TrkInJet>(this, "TracksInJets/Tracks/Matched",false);
+      m_trkInJetPlots_fake = std::make_unique<InDetPerfPlot_TrkInJet>(this, "TracksInJets/Tracks/Fakes",false);
+      m_trkInJetPlots_unlinked = std::make_unique<InDetPerfPlot_TrkInJet>(this, "TracksInJets/Tracks/Unlinked",false);
+    }
     if(m_doTrackInBJetPlots){
       m_trkInJetPlots_bjets = std::make_unique<InDetPerfPlot_TrkInJet>(this, "TracksInBJets/Tracks");
+      if (m_iDetailLevel >= 200){
+        m_trkInJetPlots_matched_bjets = std::make_unique<InDetPerfPlot_TrkInJet>(this, "TracksInBJets/Tracks/Matched",false);
+        m_trkInJetPlots_fake_bjets = std::make_unique<InDetPerfPlot_TrkInJet>(this, "TracksInBJets/Tracks/Fakes",false);
+        m_trkInJetPlots_unlinked_bjets = std::make_unique<InDetPerfPlot_TrkInJet>(this, "TracksInBJets/Tracks/Unlinked",false);
+      }
     }
   }
 }
@@ -303,9 +313,33 @@ InDetRttPlots::fillCounter(const unsigned int freq, const InDetPerfPlot_nTracks:
 
 //Track in Jet Plots
 void
-InDetRttPlots::fill(const xAOD::TrackParticle& track, const xAOD::Jet& jet, bool isBjet){
+InDetRttPlots::fill(const xAOD::TrackParticle& track, const xAOD::Jet& jet, bool isBjet, bool isFake, bool isUnlinked){
   m_trkInJetPlots->fill(track, jet);
-  if(isBjet) m_trkInJetPlots_bjets->fill(track, jet);
+  if (m_iDetailLevel >= 200){
+    if (isFake){
+      m_trkInJetPlots_fake->fill(track,jet); 
+    }
+    else if (isUnlinked){
+      m_trkInJetPlots_unlinked->fill(track,jet); 
+    }
+    else {
+      m_trkInJetPlots_matched->fill(track,jet); 
+    }
+  }
+  if(isBjet){
+     m_trkInJetPlots_bjets->fill(track, jet);
+    if (m_iDetailLevel >= 200){
+      if (isFake){
+        m_trkInJetPlots_fake_bjets->fill(track,jet); 
+      }
+      else if (isUnlinked){
+        m_trkInJetPlots_unlinked_bjets->fill(track,jet); 
+      }
+      else {
+        m_trkInJetPlots_matched_bjets->fill(track,jet); 
+      }
+    }
+  }
 }
 
 void
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetRttPlots.h b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetRttPlots.h
index 0b1f672e41e7..5c10e024d408 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetRttPlots.h
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetRttPlots.h
@@ -67,7 +67,7 @@ public:
   ///fill reco-vertex related plots that need EventInfo
   void fill(const xAOD::VertexContainer& vertexContainer, const unsigned int nPU);
 
-  void fill(const xAOD::TrackParticle& track, const xAOD::Jet& jet, bool isBjet=false);
+  void fill(const xAOD::TrackParticle& track, const xAOD::Jet& jet, bool isBjet=false, bool isFake=false, bool isUnlinked=false);
   void fillEfficiency(const xAOD::TruthParticle& truth, const xAOD::Jet& jet, const bool isGood, bool isBjet=false);
   void fillFakeRate(const xAOD::TrackParticle& track, const xAOD::Jet& jet, const bool isFake, bool isBjet=false);
   
@@ -103,6 +103,12 @@ private:
   bool m_doTrackInBJetPlots;
   std::unique_ptr<InDetPerfPlot_TrkInJet> m_trkInJetPlots;
   std::unique_ptr<InDetPerfPlot_TrkInJet> m_trkInJetPlots_bjets;
+  std::unique_ptr<InDetPerfPlot_TrkInJet> m_trkInJetPlots_matched;
+  std::unique_ptr<InDetPerfPlot_TrkInJet> m_trkInJetPlots_matched_bjets;
+  std::unique_ptr<InDetPerfPlot_TrkInJet> m_trkInJetPlots_fake;
+  std::unique_ptr<InDetPerfPlot_TrkInJet> m_trkInJetPlots_fake_bjets;
+  std::unique_ptr<InDetPerfPlot_TrkInJet> m_trkInJetPlots_unlinked;
+  std::unique_ptr<InDetPerfPlot_TrkInJet> m_trkInJetPlots_unlinked_bjets;
 
   //By track authors
   std::unique_ptr<InDetPerfPlot_Efficiency> m_effSiSPSeededFinderPlots;
-- 
GitLab


From dfa71bbf2b200613b846fb3e6a0ee56edadf7535 Mon Sep 17 00:00:00 2001
From: Maximilian Goblirsch-Kolb <goblirsc@cern.ch>
Date: Fri, 2 Oct 2020 23:43:54 +0200
Subject: [PATCH 143/403] fix logic inconsistency for jet plots and support
 filling of  extra jet plots

---
 .../src/InDetPhysValMonitoringTool.cxx                      | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPhysValMonitoringTool.cxx b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPhysValMonitoringTool.cxx
index d68b26f4c418..8f8a2e008c4e 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPhysValMonitoringTool.cxx
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPhysValMonitoringTool.cxx
@@ -461,12 +461,14 @@ InDetPhysValMonitoringTool::fillHistograms() {
         }
         float prob = getMatchingProbability(*thisTrack);
         if(std::isnan(prob)) prob = 0.0;
-        m_monPlots->fill(*thisTrack, *thisJet,isBjet);
       
         const xAOD::TruthParticle* associatedTruth = getAsTruth.getTruth(thisTrack); 
+        bool unlinked = (associatedTruth==nullptr);
+        bool isFake = (associatedTruth && prob < m_lowProb);  
+        m_monPlots->fill(*thisTrack, *thisJet,isBjet,isFake,unlinked);
                                                                                          
         if (associatedTruth){
-          if(m_truthSelectionTool->accept(associatedTruth) and prob < m_lowProb ) {
+          if(prob < m_lowProb ) {
             isFakeJet = true;
           } 
           m_monPlots->fillFakeRate(*thisTrack, *thisJet, isFakeJet,isBjet);
-- 
GitLab


From 8e9cca1404280ff3bb650462da8533634cea0713 Mon Sep 17 00:00:00 2001
From: Maximilian Goblirsch-Kolb <goblirsc@cern.ch>
Date: Fri, 2 Oct 2020 23:47:35 +0200
Subject: [PATCH 144/403] fix one flag to avoid blocking expert output

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

diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/InDetPhysValMonitoring_topOptions.py b/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/InDetPhysValMonitoring_topOptions.py
index 58496bafea31..e6162297b276 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/InDetPhysValMonitoring_topOptions.py
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/InDetPhysValMonitoring_topOptions.py
@@ -20,7 +20,7 @@ MyArgs = GetCustomAthArgs()
 from InDetPhysValMonitoring.InDetPhysValJobProperties import InDetPhysValFlags
 InDetPhysValFlags.setTruthStrategy.set_Value_and_Lock(MyArgs.HSFlag)
 InDetPhysValFlags.doExpertOutput.set_Value_and_Lock(MyArgs.doExpertPlots)
-InDetPhysValFlags.doPhysValOutput.set_Value_and_Lock(True)
+InDetPhysValFlags.doPhysValOutput.set_Value_and_Lock(not MyArgs.doExpertPlots)
 InDetPhysValFlags.doValidateTracksInBJets.set_Value_and_Lock(MyArgs.doTracksInBJets)
 InDetPhysValFlags.doValidateTracksInJets.set_Value_and_Lock(MyArgs.doTracksInJets)
 InDetPhysValFlags.doValidateTightPrimaryTracks.set_Value_and_Lock(MyArgs.doTightPrimary)
-- 
GitLab


From 5470260f18b88df57f50afbe4056cd5d66dcaeaf Mon Sep 17 00:00:00 2001
From: Maximilian Goblirsch-Kolb <goblirsc@cern.ch>
Date: Sat, 3 Oct 2020 00:17:31 +0200
Subject: [PATCH 145/403] change jet track dir

---
 .../InDetPhysValMonitoring/src/InDetRttPlots.cxx     | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetRttPlots.cxx b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetRttPlots.cxx
index b5be6c232b13..371722d08458 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetRttPlots.cxx
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetRttPlots.cxx
@@ -77,16 +77,16 @@ InDetRttPlots::InDetRttPlots(InDetPlotBase* pParent, const std::string& sDir, co
   if(m_doTrackInJetPlots){
     m_trkInJetPlots = std::make_unique<InDetPerfPlot_TrkInJet>(this, "TracksInJets/Tracks");
     if (m_iDetailLevel >= 200){
-      m_trkInJetPlots_matched = std::make_unique<InDetPerfPlot_TrkInJet>(this, "TracksInJets/Tracks/Matched",false);
-      m_trkInJetPlots_fake = std::make_unique<InDetPerfPlot_TrkInJet>(this, "TracksInJets/Tracks/Fakes",false);
-      m_trkInJetPlots_unlinked = std::make_unique<InDetPerfPlot_TrkInJet>(this, "TracksInJets/Tracks/Unlinked",false);
+      m_trkInJetPlots_matched = std::make_unique<InDetPerfPlot_TrkInJet>(this, "TracksInJets/Matched",false);
+      m_trkInJetPlots_fake = std::make_unique<InDetPerfPlot_TrkInJet>(this, "TracksInJets/Fakes",false);
+      m_trkInJetPlots_unlinked = std::make_unique<InDetPerfPlot_TrkInJet>(this, "TracksInJets/Unlinked",false);
     }
     if(m_doTrackInBJetPlots){
       m_trkInJetPlots_bjets = std::make_unique<InDetPerfPlot_TrkInJet>(this, "TracksInBJets/Tracks");
       if (m_iDetailLevel >= 200){
-        m_trkInJetPlots_matched_bjets = std::make_unique<InDetPerfPlot_TrkInJet>(this, "TracksInBJets/Tracks/Matched",false);
-        m_trkInJetPlots_fake_bjets = std::make_unique<InDetPerfPlot_TrkInJet>(this, "TracksInBJets/Tracks/Fakes",false);
-        m_trkInJetPlots_unlinked_bjets = std::make_unique<InDetPerfPlot_TrkInJet>(this, "TracksInBJets/Tracks/Unlinked",false);
+        m_trkInJetPlots_matched_bjets = std::make_unique<InDetPerfPlot_TrkInJet>(this, "TracksInBJets/Matched",false);
+        m_trkInJetPlots_fake_bjets = std::make_unique<InDetPerfPlot_TrkInJet>(this, "TracksInBJets/Fakes",false);
+        m_trkInJetPlots_unlinked_bjets = std::make_unique<InDetPerfPlot_TrkInJet>(this, "TracksInBJets/Unlinked",false);
       }
     }
   }
-- 
GitLab


From af010dd957adee67049837d266566d1e9092a138 Mon Sep 17 00:00:00 2001
From: Tasnuva Chowdhury <ch.tasnuva@cern.ch>
Date: Sat, 3 Oct 2020 01:31:58 +0200
Subject: [PATCH 146/403] CaloTopoTower Implementation: Affects 4 packages-
 CaloEvnt, CaloRecEx, CaloRec, xAODCaloEvent

---
 .../CaloEvent/CaloCellClusterWeights.h        | 159 +++++
 .../CaloEvent/src/CaloCellClusterWeights.cxx  |  59 ++
 .../share/CaloRecOutputItemList_jobOptions.py |  32 +
 .../CaloRec/CaloTowerCollectionProcessor.h    |  49 ++
 Calorimeter/CaloRec/python/CaloRecFlags.py    |  18 +-
 .../CaloRec/python/MakeTowersFromClusters.py  | 261 ++++++++
 .../CaloRec/share/CaloRec_jobOptions.py       |  10 +-
 .../CaloRec/share/CaloTopoSignalFragment.py   |  64 ++
 .../CaloRec/share/CaloTopoTowerFragment.py    |  56 ++
 .../src/CaloTopoClusterFromTowerHelpers.cxx   | 192 ++++++
 .../src/CaloTopoClusterFromTowerHelpers.h     | 271 ++++++++
 .../src/CaloTopoClusterFromTowerMonitor.cxx   | 421 ++++++++++++
 .../src/CaloTopoClusterFromTowerMonitor.h     | 342 ++++++++++
 .../src/CaloTopoClusterTowerMerger.cxx        | 181 ++++++
 .../CaloRec/src/CaloTopoClusterTowerMerger.h  |  84 +++
 .../CaloTopoTowerFromClusterCalibrator.cxx    |  91 +++
 .../src/CaloTopoTowerFromClusterCalibrator.h  |  48 ++
 .../src/CaloTopoTowerFromClusterMaker.cxx     | 608 ++++++++++++++++++
 .../src/CaloTopoTowerFromClusterMaker.h       | 255 ++++++++
 .../CaloRec/src/CaloTopoTowerMaker.cxx        | 224 +++++++
 Calorimeter/CaloRec/src/CaloTopoTowerMaker.h  | 117 ++++
 .../CaloRec/src/CaloTowerGeometrySvc.cxx      | 410 ++++++++++++
 .../CaloRec/src/CaloTowerGeometrySvc.h        | 414 ++++++++++++
 .../src/components/CaloRec_entries.cxx        |  14 +
 .../xAODCaloEvent/versions/CaloCluster_v1.h   |   8 +-
 25 files changed, 4383 insertions(+), 5 deletions(-)
 create mode 100644 Calorimeter/CaloEvent/CaloEvent/CaloCellClusterWeights.h
 create mode 100644 Calorimeter/CaloEvent/src/CaloCellClusterWeights.cxx
 create mode 100644 Calorimeter/CaloRec/CaloRec/CaloTowerCollectionProcessor.h
 create mode 100644 Calorimeter/CaloRec/python/MakeTowersFromClusters.py
 create mode 100644 Calorimeter/CaloRec/share/CaloTopoSignalFragment.py
 create mode 100644 Calorimeter/CaloRec/share/CaloTopoTowerFragment.py
 create mode 100644 Calorimeter/CaloRec/src/CaloTopoClusterFromTowerHelpers.cxx
 create mode 100644 Calorimeter/CaloRec/src/CaloTopoClusterFromTowerHelpers.h
 create mode 100644 Calorimeter/CaloRec/src/CaloTopoClusterFromTowerMonitor.cxx
 create mode 100644 Calorimeter/CaloRec/src/CaloTopoClusterFromTowerMonitor.h
 create mode 100644 Calorimeter/CaloRec/src/CaloTopoClusterTowerMerger.cxx
 create mode 100644 Calorimeter/CaloRec/src/CaloTopoClusterTowerMerger.h
 create mode 100644 Calorimeter/CaloRec/src/CaloTopoTowerFromClusterCalibrator.cxx
 create mode 100644 Calorimeter/CaloRec/src/CaloTopoTowerFromClusterCalibrator.h
 create mode 100644 Calorimeter/CaloRec/src/CaloTopoTowerFromClusterMaker.cxx
 create mode 100644 Calorimeter/CaloRec/src/CaloTopoTowerFromClusterMaker.h
 create mode 100644 Calorimeter/CaloRec/src/CaloTopoTowerMaker.cxx
 create mode 100644 Calorimeter/CaloRec/src/CaloTopoTowerMaker.h
 create mode 100644 Calorimeter/CaloRec/src/CaloTowerGeometrySvc.cxx
 create mode 100644 Calorimeter/CaloRec/src/CaloTowerGeometrySvc.h

diff --git a/Calorimeter/CaloEvent/CaloEvent/CaloCellClusterWeights.h b/Calorimeter/CaloEvent/CaloEvent/CaloCellClusterWeights.h
new file mode 100644
index 000000000000..2f3ad212b7ee
--- /dev/null
+++ b/Calorimeter/CaloEvent/CaloEvent/CaloCellClusterWeights.h
@@ -0,0 +1,159 @@
+// -*- c++ -*-
+/* Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */
+
+#ifndef CALOEVENT_CALOCELLCLUSTERWEIGHTS_H
+#define CALOEVENT_CALOCELLCLUSTERWEIGHTS_H
+
+#include "AthenaKernel/CLASS_DEF.h"
+
+#include <string>
+#include <vector>
+#include <boost/tuple/tuple.hpp>
+
+class CaloCell;
+
+/// @brief Hash lookup of calibration weights for calorimeter cells
+///
+/// This object wraps a random access lookup of calibration weights based on the hash id of a calorimeter cell. It is meant to 
+/// provide these weights to several tools, thus e.g. reducing the number of searches for cells in topo-clusters.
+/// 
+/// The data object reserves a fixed memory segment sufficient to store one weight per cell, and is of a fixed size which is defaulted to
+/// the total number of calorimeter cells, but can also be set at construction. 
+class CaloCellClusterWeights
+{
+public:
+
+  /// @name Storage and payload types
+  /// @{
+  typedef std::vector<double>                 weight_t;        ///< @brief Type of weight
+  typedef boost::tuples::tuple<bool,weight_t> value_t;         ///< @brief Type of payload
+  typedef std::vector<value_t>                store_t;         ///< @brief Store type
+  typedef store_t::const_iterator             const_iterator;  ///< @brief Iterator type for const access
+  typedef store_t::iterator                   iterator;        ///< @brief Iterator type 
+  /// @}
+
+  /// @brief Default constructor
+  ///
+  /// The constructed data object provides a reserved and sized store appropriate for the total number of cells in the calorimeter.
+  /// The store is pre-filled with the default payload value (0).
+  CaloCellClusterWeights();
+  /// @brief Constructor with client-defined size
+  ///
+  /// A store with the specified size is created and pre-filled with the default payload value (0).
+  /// 
+  /// @param size requested store size
+  CaloCellClusterWeights(size_t size);
+  /// @brief Copy constructor
+  CaloCellClusterWeights(const CaloCellClusterWeights& cellClusterWeights);
+  /// @brief Destructor 
+  virtual ~CaloCellClusterWeights();
+
+  /// @name Random access to payload
+  /// @{
+  /// @brief Accessing value using operator
+  ///
+  /// @return Stored value at given index if index is valid, else payload default value (0).
+  /// @param  hash index (calorimeter cell hash id)
+  const weight_t& operator[](size_t hash) const; 
+  /// @brief Accessing value using function and hash
+  ///
+  /// @return Stored value at given index if index is valid, else payload default value (0).
+  /// @param  hash index (calorimeter cell hash id)
+  const weight_t& at(size_t hash) const;
+  /// @brief Accessing value using function and cell pointer
+  ///
+  /// @return Stored value at given index if index is valid, else payload default value (0).
+  /// @param  hash index (calorimeter cell hash id)
+  const weight_t& at(const CaloCell* pCell) const;
+  /// @brief Safe checking if cell is used by any cluster
+  ///
+  /// @return @c true if cell is part of any cluster and has valid hash index
+  bool check(size_t hash) const;
+  /// @brief Safe checking if cell is used by any cluster
+  ///
+  /// @return @c true if cell is part of any cluster and has valid hash index
+  bool check(const CaloCell* pCell) const;
+  /// @brief Fast checking if cell is used by any cluster
+  ///
+  ///  @return @c true if cell is part of any cluster
+  bool fastCheck(size_t hash) const;
+  /// @brief Fast checking if cell is used by any cluster
+  ///
+  ///  @return @c true if cell is part of any cluster
+  bool fastCheck(const CaloCell* pCell) const;
+  /// @}
+
+  /// @name Store modifiers
+  /// @{
+  /// @brief Loading a value by hash id
+  ///
+  /// This method overwrites the stored value at the given index. It also sets the "used" flag in the store for the cell.
+  /// @param hash index in store
+  /// @param value value to be stored at index
+  void set(size_t hash,double value);
+  /// @brief Loading a value by cell pointer
+  ///
+  /// This method overwrites the stored value at the given index. It also sets the "used" flag in the store for the cell.
+  /// @param hash index in store
+  /// @param value value to be stored at index
+  void set(const CaloCell* pCell,double value);
+  /// @brief Reset the store
+  ///
+  /// All stored values are overwritten with the default payload value (0).
+  void reset();                       
+  /// @brief Clear the store
+  ///
+  /// All stored values are overwritten with the default payload value (0).
+  void clear();
+  /// @brief Clear a specific entry in the store
+  ///
+  /// The value stored at the given index is overwritten with the default payload value (0).
+  /// @param hash index in store
+  void clear(size_t hash);
+  /// @}
+
+  /// @name Store parameters
+  /// @{
+  size_t size() const;     ///< Store size
+  size_t reserve() const;  ///< Reserved memory
+  /// @}
+
+  /// @name Iterators
+  /// @{
+  const_iterator begin() const; ///< Constant access iterator pointing to beginning of the store
+  const_iterator end() const;   ///< Constant iterator indicating the end of the store
+  iterator begin();             ///< Access iterator pointing to beginning of the store
+  iterator end();               ///< Iterator indicating the end of the store
+  /// @}
+
+  /// @name Store access
+  /// @{
+  const store_t& store() const; ///< Read-only access to underlying store 
+  store_t& store();             ///< Read/write access to underlying store 
+  /// @}
+
+  /// @brief Construct a SG key for this object
+  static std::string key(const std::string& pref);
+
+private:
+
+  store_t  m_hashTable;                      ///< Store implementation
+  weight_t m_defaultValue { weight_t() };    ///< Default (empty) entry
+};
+
+//CLASS_DEF( CaloCellClusterWeights, 249044352, 1 )
+
+inline CaloCellClusterWeights::const_iterator CaloCellClusterWeights::begin() const { return m_hashTable.begin(); }
+inline CaloCellClusterWeights::iterator       CaloCellClusterWeights::begin()       { return m_hashTable.begin(); }
+
+inline CaloCellClusterWeights::const_iterator CaloCellClusterWeights::end() const { return m_hashTable.end(); }
+inline CaloCellClusterWeights::iterator       CaloCellClusterWeights::end()       { return m_hashTable.end(); }
+
+inline size_t CaloCellClusterWeights::size()    const { return m_hashTable.size(); }
+inline size_t CaloCellClusterWeights::reserve() const { return m_hashTable.capacity(); }
+
+inline const CaloCellClusterWeights::store_t& CaloCellClusterWeights::store() const { return m_hashTable; } 
+inline       CaloCellClusterWeights::store_t& CaloCellClusterWeights::store()       { return m_hashTable; } 
+
+inline std::string CaloCellClusterWeights::key(const std::string& pref) { return pref+std::string("_CCW"); } 
+#endif
diff --git a/Calorimeter/CaloEvent/src/CaloCellClusterWeights.cxx b/Calorimeter/CaloEvent/src/CaloCellClusterWeights.cxx
new file mode 100644
index 000000000000..0185aa1e572b
--- /dev/null
+++ b/Calorimeter/CaloEvent/src/CaloCellClusterWeights.cxx
@@ -0,0 +1,59 @@
+/* Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */
+#include "CaloEvent/CaloCellClusterWeights.h"
+
+#include "CaloEvent/CaloCell.h"
+
+#include <algorithm>
+
+#ifndef CELLCLUSTERLOOKUP
+#define CELLCLUSTERLOOKUP 200000
+#endif
+
+CaloCellClusterWeights::CaloCellClusterWeights(size_t size)
+  : m_hashTable(size)
+{
+  this->clear(); 
+}
+
+CaloCellClusterWeights::CaloCellClusterWeights() 
+  : CaloCellClusterWeights( CELLCLUSTERLOOKUP )
+{ }
+
+CaloCellClusterWeights::CaloCellClusterWeights(const CaloCellClusterWeights& cellClusterWeights)
+  : m_hashTable(cellClusterWeights.m_hashTable)
+{ }
+
+CaloCellClusterWeights::~CaloCellClusterWeights()
+{ }
+
+const CaloCellClusterWeights::weight_t& CaloCellClusterWeights::operator[](size_t hash)   const 
+{ return this->check(hash) ? m_hashTable.at(hash).get<1>() : m_defaultValue; }
+const CaloCellClusterWeights::weight_t& CaloCellClusterWeights::at(size_t hash)           const 
+{ return this->check(hash) ? m_hashTable.at(hash).get<1>() : m_defaultValue; }
+const CaloCellClusterWeights::weight_t& CaloCellClusterWeights::at(const CaloCell* pCell) const 
+{ return this->at(static_cast<size_t>(pCell->caloDDE()->calo_hash())); }
+
+bool CaloCellClusterWeights::fastCheck(size_t hash)           const { return m_hashTable.at(hash).get<0>(); }
+bool CaloCellClusterWeights::fastCheck(const CaloCell* pCell) const { return this->fastCheck(static_cast<size_t>(pCell->caloDDE()->calo_hash())); } 
+bool CaloCellClusterWeights::check(size_t hash)               const { return hash < m_hashTable.size() && this->fastCheck(hash); }
+bool CaloCellClusterWeights::check(const CaloCell* pCell)     const { return this->check(static_cast<size_t>(pCell->caloDDE()->calo_hash())); } 
+
+void CaloCellClusterWeights::set(size_t hash,double value)           
+{ 
+  if ( hash < m_hashTable.size() ) {
+    if ( this->fastCheck(hash) ) { 
+      m_hashTable[hash].get<1>().push_back(value); 
+    } else {
+      m_hashTable[hash].get<0>() = true;
+      m_hashTable[hash].get<1>().push_back(value); 
+    } 
+  }
+}
+
+void CaloCellClusterWeights::set(const CaloCell* pCell,double value) { this->set(static_cast<size_t>(pCell->caloDDE()->calo_hash()),value); } 
+
+void CaloCellClusterWeights::clear() { std::fill(m_hashTable.begin(),m_hashTable.end(),value_t(false,m_defaultValue)); }
+void CaloCellClusterWeights::clear(size_t hash) { 
+  if ( hash < m_hashTable.size() ) { m_hashTable[hash].get<0>() = false; m_hashTable[hash].get<1>() = m_defaultValue; } 
+}
+void CaloCellClusterWeights::reset() { this->clear(); }
diff --git a/Calorimeter/CaloExample/CaloRecEx/share/CaloRecOutputItemList_jobOptions.py b/Calorimeter/CaloExample/CaloRecEx/share/CaloRecOutputItemList_jobOptions.py
index db91de8baf30..136e4c3b1ffa 100644
--- a/Calorimeter/CaloExample/CaloRecEx/share/CaloRecOutputItemList_jobOptions.py
+++ b/Calorimeter/CaloExample/CaloRecEx/share/CaloRecOutputItemList_jobOptions.py
@@ -17,6 +17,12 @@ CaloClusterItemList=[]
 CaloClusterKeys=[]
 
 CaloClusterKeys+=["CaloCalTopoClusters"]
+if jobproperties.CaloRecFlags.doCaloTopoTower.get_Value():
+    CaloClusterKeys+=["CaloCalTopoTowers"]
+if jobproperties.CaloRecFlags.doCaloTopoSignal.get_Value():
+    CaloClusterKeys+=["CaloCalTopoSignals"]
+##CaloClusterKeys+=["CaloCalFwdTopoTowers"]
+
 CaloClusterKeys+=["CombinedCluster"]
 #CaloClusterKeys+=["EMTopoCluster430"]
 CaloClusterKeys+=["EMTopoSW35"]
@@ -105,6 +111,18 @@ AODMoments=[#"LATERAL"
             ,"BadChannelList"
             ,#"LATERAL"
             ]
+
+if jobproperties.CaloRecFlags.doExtendedClusterMoments.get_Value():
+    AODMoments += ["LATERAL"
+                   ,"LONGITUDINAL"
+                   ,"ENG_BAD_HV_CELLS"
+                   ,"N_BAD_HV_CELLS"
+                   ,"SIGNIFICANCE"
+                   ,"CELL_SIGNIFICANCE"
+                   ,"CELL_SIG_SAMPLING"
+                   ,"PTD"
+                   ,"MASS"
+                   ]
 try:
     from Digitization.DigitizationFlags import digitizationFlags
     if digitizationFlags.doDigiTruth():
@@ -133,6 +151,15 @@ try:
                 ,"ETA_DigiHSTruth"
                 ,"PHI_DigiHSTruth"
                 ]
+      if jobproperties.CaloRecFlags.doExtendedClusterMoments.get_Value():
+            AODMoments+=["ENG_BAD_HV_CELLS_Truth"
+                         ,"N_BAD_HV_CELLS_Truth"
+                         ,"SIGNIFICANCE_Truth"
+                         ,"CELL_SIGNIFICANCE_Truth"
+                         ,"CELL_SIG_SAMPLING_Truth"
+                         ,"PTD_Truth"
+                 ]
+
 except:
     log = logging.getLogger('CaloRecOutputItemList')
     log.info('Unable to import DigitizationFlags in CaloRecOutputItemList_jobOptions. Expected in AthenaP1')
@@ -149,6 +176,11 @@ CaloClusterKeys=[]
 
 
 CaloClusterKeys+=["CaloCalTopoClusters"]
+if jobproperties.CaloRecFlags.doCaloTopoTower.get_Value():
+    CaloClusterKeys+=["CaloCalTopoTowers"]
+if jobproperties.CaloRecFlags.doCaloTopoSignal.get_Value():
+    CaloClusterKeys+=["CaloCalTopoSignals"]
+
 CaloClusterKeys+=["CombinedCluster"]
 #CaloClusterKeys+=["EMTopoCluster430"]
 CaloClusterKeys+=["EMTopoSW35"]
diff --git a/Calorimeter/CaloRec/CaloRec/CaloTowerCollectionProcessor.h b/Calorimeter/CaloRec/CaloRec/CaloTowerCollectionProcessor.h
new file mode 100644
index 000000000000..784e1fefd8d7
--- /dev/null
+++ b/Calorimeter/CaloRec/CaloRec/CaloTowerCollectionProcessor.h
@@ -0,0 +1,49 @@
+// This file's extension implies that it's C, but it's really -*- C++ -*-.
+
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+// $Id: CaloTowerCollectionProcessor.h, 2020-09-16 03:49:56 ssnyder Exp $
+/**
+ * @file  CaloTowerCollectionProcessor.h
+ * @author Tasnuva Chowdhury
+ * @date   September, 2020
+ * @brief Base class for cluster processing tools called from
+ *        @c CaloClusterMaker.
+ *
+ */
+
+#ifndef CALOREC_CALOTOWERCOLLECTIONPROCESSOR_H
+#define CALOREC_CALOTOWERCOLLECTIONPROCESSOR_H
+
+
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "xAODCaloEvent/CaloClusterContainer.h"
+#include "GaudiKernel/EventContext.h"
+#include "GaudiKernel/ThreadLocalContext.h"
+#include "CaloEvent/CaloCellClusterWeights.h"
+
+static const InterfaceID IID_CaloTowerCollectionProcessor ("CaloTowerCollectionProcessor", 1 , 0);
+
+class CaloTowerCollectionProcessor
+  : virtual public IAlgTool
+{
+public:
+
+   /**
+   * @brief Execute on an entire collection of clusters.
+   * @param collection The container of clusters.
+   * param ctx The event context.
+   */
+  virtual StatusCode execute (const EventContext& ctx,
+                              xAOD::CaloClusterContainer* collection,
+                              CaloCellClusterWeights* cellWeights) const = 0;
+ /**
+   * @brief Standard Gaudi interface ID method.
+   */
+  static const InterfaceID& interfaceID() {return IID_CaloTowerCollectionProcessor;}
+};
+
+
+#endif // not CALOREC_CaloTowerCollectionProcessor_H
diff --git a/Calorimeter/CaloRec/python/CaloRecFlags.py b/Calorimeter/CaloRec/python/CaloRecFlags.py
index 6fa0d33277e1..c72e2978e0fb 100644
--- a/Calorimeter/CaloRec/python/CaloRecFlags.py
+++ b/Calorimeter/CaloRec/python/CaloRecFlags.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:   RecExConfig/python/CaloFlags.py
@@ -94,6 +94,20 @@ class doCaloTopoTower(CaloRecFlagsJobProperty):
     statusOn=True
     allowedTypes=['bool']
     StoredValue=False
+    
+class doCaloTopoSignal(CaloRecFlagsJobProperty):
+    """ produce mixed topo-cluster and topo-tower container 
+    """
+    statusOn=True
+    allowedTypes=['bool']
+    storedValue=False
+
+class doExtendedClusterMoments(CaloRecFlagsJobProperty):
+    """ add more cluster moments for R&D
+    """
+    statusOn=True
+    allowedTypes=['bool']
+    storedValue=True
 
 class doTileMuId(CaloRecFlagsJobProperty):
     """ switch for TileMuId - muon finding algorighm
@@ -170,7 +184,7 @@ jobproperties.add_Container(CaloRecFlags)
 
 
 # I want always the following flags in the Rec container  
-_list_Calo=[Enabled,doCaloTopoCluster,doEmCluster,doCaloEMTopoCluster,emTopoClusterThreshold,doCaloCluster,doCaloTopoTower,doTileMuId,doTileCellCorrection,doLArAffectedRegion,doLArAutoConfiguration,doLArNoisyRO,doEMDigits,doFillMBTSBackgroundBit,doLArNoiseBurstVeto,clusterCellGetterName,doCaloTowerFromCells,doCaloTowerFromCluster]
+_list_Calo=[Enabled,doCaloTopoCluster,doEmCluster,doCaloEMTopoCluster,emTopoClusterThreshold,doCaloCluster,doCaloTopoTower,doCaloTopoSignal,doExtendedClusterMoments,doTileMuId,doTileCellCorrection,doLArAffectedRegion,doLArAutoConfiguration,doLArNoisyRO,doEMDigits,doFillMBTSBackgroundBit,doLArNoiseBurstVeto,clusterCellGetterName,doCaloTowerFromCells,doCaloTowerFromCluster]
 for j in _list_Calo: 
     jobproperties.CaloRecFlags.add_JobProperty(j)
 del _list_Calo
diff --git a/Calorimeter/CaloRec/python/MakeTowersFromClusters.py b/Calorimeter/CaloRec/python/MakeTowersFromClusters.py
new file mode 100644
index 000000000000..11f243a88dae
--- /dev/null
+++ b/Calorimeter/CaloRec/python/MakeTowersFromClusters.py
@@ -0,0 +1,261 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+#from AthenaCommon.AppMgr import ServiceMgr as svcMgr
+
+from CaloRec.CaloRecConf import CaloTopoTowerFromClusterMaker
+from CaloRec.CaloRecConf import CaloTowerGeometrySvc
+
+from   AthenaCommon.Logging import logging
+import AthenaCommon.Constants as Lvl
+#from AthenaCommon.GlobalFlags import globalflags
+
+####################################
+## Tower configuration dictionary ##
+####################################
+
+def TowersFromClustersDict(clusterBuilderName       = 'TowerFromClusterTool',
+                           towerGeometrySvc         = CaloTowerGeometrySvc('CaloTowerGeometrySvc'),
+                           cellContainerKey         = 'AllCalo',
+                           buildTopoTowers          = True,
+                           topoClusterContainerKey  = 'CaloTopoCluster',
+                           orderClusterByPt         = False,
+                           applyCellEnergyThreshold = False,
+                           doCellIndexCheck         = False,
+                           cellEnergyThreshold      = 0.,
+                           applyLCW                 = False,
+                           buildCombinedSignal      = False,
+                           clusterRange             = 5.):
+    ''' Configuration dictionary for tower-to-cluster converter 
+    '''
+    configDict = { 'ClusterBuilderName'          : clusterBuilderName,         ### name of the tower builder tool
+                   'CaloTowerGeometrySvc'        : towerGeometrySvc,           ### tower geometry provider
+                   'CaloCellContainerKey'        : cellContainerKey,           ### (input)   cell container key
+                   'CaloTopoClusterContainerKey' : topoClusterContainerKey,    ### (input)   topo-cluster container key
+                   'BuildTopoTowers'             : buildTopoTowers,            ### (control) form topo-towers
+                   'OrderClusterByPt'            : orderClusterByPt,           ### (control) order final clusters by Pt
+                   'ApplyCellEnergyThreshold'    : applyCellEnergyThreshold,   ### (control) apply energy thresholds to cells
+                   'CellEnergyThreshold'         : cellEnergyThreshold,        ### (control) value of energy threshold
+                   'PrepareLCW'                  : applyLCW,                   ### (control) prepare (and apply) LCW
+                   'DoCellIndexCheck'            : doCellIndexCheck,           ### (control) check cell hash indices
+                   'BuildCombinedTopoSignal'     : buildCombinedSignal,        ### (control) build combined topo-cluster/topo-tower container
+                   'TopoClusterRange'            : clusterRange,               ### (control) range for topo-cluster in combined mode 
+                   }
+    return configDict
+
+###################################
+## Tower algorithm configuration ##
+###################################
+
+def MakeTowersFromClusters(towerMakerName      = 'CaloTowerBuilderAlg',        ### name of tower builder algorithm
+                           towerContainerKey   = 'CaloTowerTopoCluster',       ### output container key
+                           configDict          = TowersFromClustersDict(),     ### tower builder tool configuration
+                           debugOn             = True): #False
+    ''' This function generates an instance of a cluster algorithm configuration producting clusters trom towers with or without moments. 
+    '''
+    mlog = logging.getLogger('MakeTowersFromClusters.py:: ')
+    mlog.info('TowerMakerName    = "'+towerMakerName+'"')
+    mlog.info('TowerContainerKey = <'+towerContainerKey+'>')
+
+    ########################################
+    ## Configuring the tower builder tool ##
+    ########################################
+
+    ''' collect properties from dictionary and set correct dependencies
+    ''' 
+    mlog.info('Converter properties: ',configDict)
+    excludedKeys = [ 'ClusterBuilderName' ]
+    if configDict['PrepareLCW']: 
+        towerBuilder  = CaloTopoTowerFromClusterMaker(configDict['ClusterBuilderName'],OrderClusterByPt=False) ### order by pt after LCW calibration!
+        excludedKeys += [ 'OrderClusterByPt' ]
+    else:
+        towerBuilder  = CaloTopoTowerFromClusterMaker(configDict['ClusterBuilderName'])
+
+    ''' Copy properties from dictionary
+    '''
+    for key,value in configDict.items():
+        if key not in excludedKeys:
+            setattr(towerBuilder,key,value)
+
+    ''' Check basic consistency of configuration
+    '''
+    mlog.info('Consistency check')
+    if towerBuilder.PrepareLCW and not towerBuilder.BuildTopoTowers:
+        raise RuntimeError('{0}[inconsistent configuration] applying LCW requires to build topo-towers'.format(towerBuilder.name()))
+    if towerBuilder.BuildCombinedTopoSignal and not towerBuilder.BuildTopoTowers:
+        raise RuntimeError('{0}[inconsistent configuration] building combined topo-cluster/topo-tower signals requires to build topo-towers'.format(towerBuilder.name()))
+    if towerBuilder.ApplyCellEnergyThreshold and towerBuilder.BuildTopoTowers:
+        raise RuntimeError('{0}[inconsistent configuration] applying cell energy thresholds for topo-towers not yet implemented'.format(towerBuilder.name()))
+
+    ''' Tower converter configuration summary
+    '''
+    if towerBuilder.BuildTopoTowers:
+        if towerBuilder.PrepareLCW:
+            ''' LCW topo-towers
+            '''
+            mlog.info('################################################')
+            mlog.info('## Produce LCW calibrated topo-tower clusters ##')
+            mlog.info('################################################')
+            mlog.info('CaloTopoClusterContainerKey .. {0}'.format(towerBuilder.CaloTopoClusterContainerKey))
+            #mlog.info('CellClusterWeightKey ......... {0}'.format(towerBuilder.CellClusterWeightKey))
+        else:
+            ''' EM topo-towers
+            '''
+            mlog.info('###############################################')
+            mlog.info('## Produce EM calibrated topo-tower clusters ##')
+            mlog.info('###############################################')
+            mlog.info('CaloTopoClusterContainerKey .. {0}'.format(towerBuilder.CaloTopoClusterContainerKey))
+
+        if towerBuilder.BuildCombinedTopoSignal:
+            mlog.info(' ')
+            mlog.info('Combined topo-cluster/topo-towermode with y_max = {0}'.format(towerBuilder.TopoClusterRange))
+    else:    
+        ''' EM towers
+        '''
+        mlog.info('########################################')
+        mlog.info('## Produce EM standard tower clusters ##')
+        mlog.info('########################################')
+
+    ''' Set debug flag (not a property in the dictionary)
+    '''
+    if debugOn:
+        towerBuilder.OutputLevel  = Lvl.DEBUG
+
+    towerCoreName = towerMakerName
+    if towerCoreName.find('Builder') > 0:
+        (towerCoreName.replace('Builder',' ')).rstrip(' ')
+    elif towerCoreName.find('Maker') > 0:
+        (towerCoreName.replace('Maker',' ')).rstrip(' ')
+
+    ############################
+    ## Setting up the moments ##
+    ############################
+    
+    ''' External tools for moment calculation
+    '''
+    ##from CaloTools.CaloNoiseToolDefault import CaloNoiseToolDefault
+    #from AthenaCommon.AppMgr import ToolSvc
+    #caloNoiseTool  = CaloNoiseToolDefault()
+    #ToolSvc       += caloNoiseTool
+        
+    from CaloTools.CaloNoiseCondAlg import CaloNoiseCondAlg
+    CaloNoiseCondAlg ()
+    CaloNoiseCondAlg(noisetype="totalNoise") # "electronicNoise","pileupNoise","totalNoise"
+    
+    ''' Cluster moment maker (all general moments)
+    '''
+    from CaloRec.CaloTopoClusterFlags import jobproperties
+    from AthenaCommon.SystemOfUnits   import deg #, GeV, MeV
+    from CaloRec.CaloRecConf          import CaloClusterMomentsMaker
+    clusterMoments                  = CaloClusterMomentsMaker (towerMakerName+'MomentMaker')
+    clusterMoments.MaxAxisAngle     = 20*deg
+    #clusterMoments.CaloNoiseTool    = caloNoiseTool
+    #clusterMoments.UsePileUpNoise   = True
+    clusterMoments.TwoGaussianNoise = jobproperties.CaloTopoClusterFlags.doTwoGaussianNoise()
+    clusterMoments.MinBadLArQuality = 4000
+    clusterMoments.MomentsNames     = [
+        "FIRST_PHI" 
+        ,"FIRST_ETA"
+        ,"SECOND_R" 
+        ,"SECOND_LAMBDA"
+        ,"DELTA_PHI"
+        ,"DELTA_THETA"
+        ,"DELTA_ALPHA" 
+        ,"CENTER_X"
+        ,"CENTER_Y"
+        ,"CENTER_Z"
+        ,"CENTER_MAG"
+        ,"CENTER_LAMBDA"
+        ,"LATERAL"
+        ,"LONGITUDINAL"
+        ,"FIRST_ENG_DENS" 
+        ,"ENG_FRAC_EM" 
+        ,"ENG_FRAC_MAX" 
+        ,"ENG_FRAC_CORE" 
+        ,"SECOND_ENG_DENS" 
+        ,"ISOLATION"
+        ,"ENG_BAD_CELLS"
+        ,"N_BAD_CELLS"
+        ,"N_BAD_CELLS_CORR"
+        ,"BAD_CELLS_CORR_E"
+        ,"BADLARQ_FRAC"
+        ,"ENG_POS"
+        ,"SIGNIFICANCE"
+        ,"CELL_SIGNIFICANCE"
+        ,"CELL_SIG_SAMPLING"
+        ,"AVG_LAR_Q"
+        ,"AVG_TILE_Q"
+        ,"PTD"
+        ,"MASS"
+    ]
+
+    from IOVDbSvc.CondDB import conddb
+    if not conddb.isOnline:
+        #from LArRecUtils.LArHVScaleRetrieverDefault import LArHVScaleRetrieverDefault
+        #clusterMoments.LArHVScaleRetriever = LArHVScaleRetrieverDefault()
+        clusterMoments.MomentsNames       += ["ENG_BAD_HV_CELLS","N_BAD_HV_CELLS"]
+    
+    ###############################################################
+    ## Set up the tower builder algorithm - as a cluster builder ##
+    ###############################################################
+
+    ''' Basic algorithm properties
+    '''
+    #from CaloRec.CaloRecConf import CaloClusterMaker
+    from CaloRec.CaloRecConf import CaloTopoTowerMaker
+    towerMaker                    = CaloTopoTowerMaker(towerMakerName)
+    towerMaker.TowersOutputName   = towerContainerKey
+    towerMaker.TowerMakerTool     = towerBuilder
+    mlog.info('instantiated CaloTopoTowerMaker "{0}" configuration'.format(towerMaker.name()))
+
+    ''' Set up bad cell corrections
+    '''
+    from CaloClusterCorrection.CaloClusterBadChannelListCorr import CaloClusterBadChannelListCorr
+    badChannelCorr = CaloClusterBadChannelListCorr()
+
+    ''' Register correction and moment tools
+    '''
+    towerMaker.TowerCorrectionTools += [ badChannelCorr ]
+    towerMaker.TowerCorrectionTools += [ clusterMoments ]
+    towerMaker                      += clusterMoments
+
+    ####################################
+    ## Configure LCW calibration tool ##
+    ####################################
+
+    if towerBuilder.PrepareLCW:
+        from CaloRec.CaloRecConf import CaloTopoTowerFromClusterCalibrator
+        ''' Configure name for calibration tool
+        '''
+        towerCalName    = towerCoreName+'Calibrator'
+        towerCalibrator = CaloTopoTowerFromClusterCalibrator(towerCalName)
+        mlog.info('add LCW calibration tool <'+towerCalName+'>')
+        #mlog.info('TopoTowers: '+towerCalName+'.CellClusterWeightKey = "'+towerBuilder.CellClusterWeightKey+'"')
+        #towerCalibrator.CellClusterWeightKey = towerBuilder.CellClusterWeightKey
+        towerCalibrator.OrderClusterByPt     = configDict['OrderClusterByPt']
+        if debugOn:
+            towerCalibrator.OutputLevel = Lvl.DEBUG
+        ''' Schedule calibration tool
+        '''
+        towerMaker.TowerCalibratorTool = towerCalibrator
+
+    #######################
+    # Configuration done ##
+    #######################
+
+    return towerMaker
+
+##
+##    toolname       = configDict['ClusterBuilderName']     ### name of the tower builder tool
+##    cellkey        = configDict['CaloCellContainerKey']   ### cell container key
+##    buildtopotower = configDict['BuildTopoTowers']        ### controls if topo-towers or inclusive towers are built
+##    towergeosvc    = configDict['CaloTowerGeometrySvc']   ### tower geometry provider 
+##    if ( buildtopotower ):
+##        topoclusterkey = configDict['CaloTopoClusterContainerKey']
+##    else:
+##        topoclusterkey = 'N/A'
+##
+##    cellweightkey  = configDict['CellClusterWeightKey']
+##
+##    mlog.info('(input) CaloCellContainer        <'+cellkey+'>')
+##    mlog.info('(input) CaloTopoClusterContainer <'+topoclusterkey+'>')
+##    mlog.info('(input) CellClusterWeightKey     <'+cellweightkey+'>')
diff --git a/Calorimeter/CaloRec/share/CaloRec_jobOptions.py b/Calorimeter/CaloRec/share/CaloRec_jobOptions.py
index 1a3bdfe062df..5d2ef1e9964e 100644
--- a/Calorimeter/CaloRec/share/CaloRec_jobOptions.py
+++ b/Calorimeter/CaloRec/share/CaloRec_jobOptions.py
@@ -248,7 +248,7 @@ else:
 #
 # functionality : Noise suppressed tower
 #
-if jobproperties.CaloRecFlags.doCaloTopoTower() and DetFlags.haveRIO.Calo_on():
+if jobproperties.CaloRecFlags.doCaloTowerFromCluster() and DetFlags.haveRIO.Calo_on():
    try:
        include ("CaloRec/CaloTopoTower_jobOptions.py")
    except Exception:
@@ -361,3 +361,11 @@ if rec.doWritexAOD():
 #L1Calo Trigger tower decoration
 if globalflags.DataSource()=='data' and rec.doESD() and rec.doCalo() and rec.doTrigger():
     include("TrigT1CaloCalibTools/DecorateL1CaloTriggerTowers_prodJobOFragment.py")
+    
+#new style CaloTopoTowers
+if jobproperties.CaloRecFlags.doCaloTopoTower():
+    include ( "CaloRec/CaloTopoTowerFragment.py" )
+#mixed topo-cluster/topo-tower 
+if jobproperties.CaloRecFlags.doCaloTopoSignal():
+    include ("CaloRec/CaloTopoSignalFragment.py" )
+
diff --git a/Calorimeter/CaloRec/share/CaloTopoSignalFragment.py b/Calorimeter/CaloRec/share/CaloTopoSignalFragment.py
new file mode 100644
index 000000000000..79bcb1076bdc
--- /dev/null
+++ b/Calorimeter/CaloRec/share/CaloTopoSignalFragment.py
@@ -0,0 +1,64 @@
+######################################
+## Create standard 0.1 x 0.1 towers ##
+######################################
+
+
+from AthenaCommon.Logging import logging
+mlog = logging.getLogger('CaloTopoSignalFragment.py:: ')
+
+import AthenaCommon.Constants as Lvl
+from AthenaCommon.AppMgr import ServiceMgr as svcMgr
+
+from CaloRec.MakeTowersFromClusters import TowersFromClustersDict, MakeTowersFromClusters
+from CaloRec.CaloRecConf            import CaloTowerGeometrySvc, CaloTopoClusterTowerMerger
+
+mlog.info(' ')
+mlog.info('##################################')
+mlog.info('## Topological Signal Formation ##')
+mlog.info('##################################')
+mlog.info(' ')
+
+#############################
+## Tower Geometry Provider ##
+#############################
+
+if not hasattr(svcMgr,'CaloTowerGeometryProvider'):
+    mlog.info("setting up tower geometry provider")
+    caloTowerGeoSvc              = CaloTowerGeometrySvc('CaloTowerGeometryProvider')
+    caloTowerGeoSvc.TowerEtaBins = 100
+    caloTowerGeoSvc.TowerEtaMin  = -5.
+    caloTowerGeoSvc.TowerEtaMax  =  5.
+    svcMgr                      += caloTowerGeoSvc
+
+
+#############################
+## CaloTopoTower Formation ##
+#############################
+
+caloTowerDict = TowersFromClustersDict(clusterBuilderName='CaloFwdTopoTowerBuilder',
+                                       towerGeometrySvc=svcMgr.CaloTowerGeometryProvider,
+                                       cellContainerKey='AllCalo',
+                                       buildTopoTowers=True,
+                                       topoClusterContainerKey='CaloCalTopoClusters',
+                                       orderClusterByPt=False,
+                                       applyCellEnergyThreshold=False,
+                                       doCellIndexCheck=False,
+                                       cellEnergyThreshold=0.,
+                                       applyLCW=True,
+                                       buildCombinedSignal=True,
+                                       clusterRange=2.5)
+
+caloTowerAlgo = MakeTowersFromClusters(towerMakerName      = 'CaloFwdTopoTowerMaker',
+                                       towerContainerKey   = 'CaloCalFwdTopoTowers',
+                                       configDict          = caloTowerDict,
+                                       debugOn             = False)
+#merging
+caloTowerMerger                         = CaloTopoClusterTowerMerger("CaloTopoSignalMaker")
+caloTowerMerger.TopoClusterRange        = caloTowerDict['TopoClusterRange']                        #### caloTowerAlgo.CaloFwdTopoTowerBuilder.TopoClusterRange
+caloTowerMerger.TopoClusterContainerKey = caloTowerDict['CaloTopoClusterContainerKey']             #### caloTowerAlgo.CaloFwdTopoTowerBuilder.CaloTopoClusterContainerKey
+caloTowerMerger.TopoTowerContainerKey   = caloTowerAlgo.TowersOutputName
+caloTowerMerger.TopoSignalContainerKey  = 'CaloCalTopoSignals'
+caloTowerMerger.OutputLevel             = Lvl.DEBUG
+
+topSequence+=caloTowerAlgo
+topSequence+=caloTowerMerger
diff --git a/Calorimeter/CaloRec/share/CaloTopoTowerFragment.py b/Calorimeter/CaloRec/share/CaloTopoTowerFragment.py
new file mode 100644
index 000000000000..15f6f3663410
--- /dev/null
+++ b/Calorimeter/CaloRec/share/CaloTopoTowerFragment.py
@@ -0,0 +1,56 @@
+######################################
+## Create standard 0.1 x 0.1 towers ##
+######################################
+
+
+from AthenaCommon.Logging import logging
+mlog = logging.getLogger('CaloTopoTowerFragment.py:: ')
+
+import AthenaCommon.Constants as Lvl
+from AthenaCommon.AppMgr import ServiceMgr as svcMgr
+
+from CaloRec.MakeTowersFromClusters import TowersFromClustersDict, MakeTowersFromClusters
+from CaloRec.CaloRecConf            import CaloTowerGeometrySvc
+
+mlog.info(' ')
+mlog.info('##################################')
+mlog.info('## Standard Tower Configuration ##')
+mlog.info('##################################')
+mlog.info(' ')
+
+#############################
+## Tower Geometry Provider ##
+#############################
+
+if not hasattr(svcMgr,'CaloTowerGeometryProvider'):
+    mlog.info("setting up tower geometry provider")
+    caloTowerGeoSvc              = CaloTowerGeometrySvc('CaloTowerGeometryProvider')
+    caloTowerGeoSvc.TowerEtaBins = 100
+    caloTowerGeoSvc.TowerEtaMin  = -5.
+    caloTowerGeoSvc.TowerEtaMax  =  5.
+    svcMgr                      += caloTowerGeoSvc
+
+#############################
+## CaloTopoTower Formation ##
+#############################
+
+caloTowerDict = TowersFromClustersDict(clusterBuilderName='CaloTopoTowerBuilder',
+                                       towerGeometrySvc=svcMgr.CaloTowerGeometryProvider,
+                                       cellContainerKey='AllCalo',
+                                       buildTopoTowers=True,
+                                       topoClusterContainerKey='CaloCalTopoClusters',
+#                                       cellClusterWeightKey='CaloCalTopoTowerCellWeights',
+                                       orderClusterByPt=False,
+                                       applyCellEnergyThreshold=False,
+                                       doCellIndexCheck=False,
+                                       cellEnergyThreshold=0.,
+                                       applyLCW=True,
+                                       buildCombinedSignal=False,
+                                       clusterRange=5.)
+
+caloTowerAlgo = MakeTowersFromClusters(towerMakerName      = 'CaloTopoTowerMaker',
+                                       towerContainerKey = 'CaloCalTopoTowers',
+                                       configDict          = caloTowerDict,
+                                       debugOn             = False)
+
+topSequence+=caloTowerAlgo
diff --git a/Calorimeter/CaloRec/src/CaloTopoClusterFromTowerHelpers.cxx b/Calorimeter/CaloRec/src/CaloTopoClusterFromTowerHelpers.cxx
new file mode 100644
index 000000000000..a5e4ca3288c3
--- /dev/null
+++ b/Calorimeter/CaloRec/src/CaloTopoClusterFromTowerHelpers.cxx
@@ -0,0 +1,192 @@
+/* Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */
+#include "CaloTopoClusterFromTowerHelpers.h"
+
+#include "CaloEvent/CaloCell.h"
+
+#include "xAODCaloEvent/CaloCluster.h"
+
+#include "CaloGeoHelpers/CaloPhiRange.h"
+#include "CaloGeoHelpers/proxim.h"
+
+#include <cmath>
+
+std::string CaloRec::Helpers::fmtMsg(const char* fmt,...) {
+      char _buffer[1024];
+      va_list args;
+      va_start(args,fmt);
+      vsprintf(_buffer,fmt,args);
+      va_end(args);
+      return std::string(_buffer);
+}
+
+
+bool CaloRec::Helpers::cellAccumulator(const CaloCell& rcell,CaloClusterSignalAccumulator& accum,double weight,bool onlyKine)
+{
+  ///////////////////////////
+  // Collecting Kinematics //
+  ///////////////////////////
+
+
+  // required info
+  const CaloDetDescrElement* dde = rcell.caloDDE(); if ( dde == 0 ) { return false; }
+  // energy and weights
+  accum.cluster.cellWeight    = weight;
+  accum.cluster.cellAbsWeight = std::fabs(accum.cluster.cellWeight);
+  accum.cluster.cellE         = accum.cluster.cellWeight*rcell.e();
+  accum.cluster.cellAbsE      = accum.cluster.cellAbsWeight*std::fabs(rcell.e());
+  // direction
+  double celleta(dde->eta());
+  double cellphi(dde->phi());
+  // energy sum and normalizations
+  accum.cluster.accumE    += accum.cluster.cellE;
+  accum.cluster.accumAbsE += accum.cluster.cellAbsE;
+  if ( accum.cluster.firstCell ) { 
+    accum.cluster.phiSeed = cellphi; accum.cluster.firstCell = false; 
+  } else { 
+    cellphi = proxim(cellphi,accum.cluster.phiSeed); 
+  }
+  accum.cluster.accumPhi  += accum.cluster.cellAbsE*cellphi;
+  accum.cluster.accumEta  += accum.cluster.cellAbsE*celleta;
+  // kine kinmatic updates done
+  if ( onlyKine ) return true;
+  
+  /////////////////////////
+  // Sampling Quantities //
+  /////////////////////////
+
+  // check if cell has valid sampling 
+  CaloSampling::CaloSample sam = dde->getSampling();
+  int isam((int)sam);
+  int fsam((int)CaloSampling::Unknown);
+  if ( isam < 0 || isam >= fsam ) { return false; }
+  
+  // mark sampling in cluster
+  accum.sampling.presenceInSample[isam] = true;
+  
+  // collecting in samples
+  accum.sampling.energyInSample[isam]  += accum.cluster.cellE;
+  accum.sampling.posNormInSample[isam] += accum.cluster.cellAbsE;
+  accum.sampling.etaInSample[isam]     += accum.cluster.cellAbsE*celleta;
+  accum.sampling.phiInSample[isam]     += accum.cluster.cellAbsE*cellphi;
+  
+  // maximum energies in samplings
+  if ( accum.cluster.cellE > accum.sampling.maxEnergyInSample[isam] ) {
+    accum.sampling.maxEnergyInSample[isam]    = accum.cluster.cellE;
+    accum.sampling.etaMaxEnergyInSample[isam] = celleta;
+    accum.sampling.phiMaxEnergyInSample[isam] = cellphi;
+  }
+  
+  // counting cells in barrel and endcap
+  if ( accum.cluster.cellE != 0. && accum.cluster.cellWeight != 0. ) { 
+    switch (sam) {
+    case CaloSampling::PreSamplerE:
+    case CaloSampling::EME1:
+    case CaloSampling::EME2:
+    case CaloSampling::EME3:
+    case CaloSampling::HEC0:
+    case CaloSampling::HEC1:
+    case CaloSampling::HEC2:
+    case CaloSampling::HEC3:
+    case CaloSampling::FCAL0:
+    case CaloSampling::FCAL1:
+    case CaloSampling::FCAL2:
+    case CaloSampling::MINIFCAL0:
+    case CaloSampling::MINIFCAL1:
+    case CaloSampling::MINIFCAL2:
+    case CaloSampling::MINIFCAL3:
+      accum.cluster.nEndcap++;
+      break;
+    default:
+      accum.cluster.nBarrel++;
+      break;
+    }
+    
+    // time where available
+    if ( sam != CaloSampling::PreSamplerB && sam != CaloSampling::PreSamplerE ) { 
+      unsigned int pmask = dde->is_tile() ? 0x8080 : 0x2000;
+      // is time defined?
+      if ( rcell.provenance() & pmask ) {
+	double tnorm(accum.cluster.cellAbsE*accum.cluster.cellWeight*rcell.e()); // sign of weight preserved!
+	accum.cluster.accumTime      += tnorm*rcell.time();
+	accum.cluster.accumTimeNorm  += tnorm;
+      } // cell ok for time
+    } // sampling contributes to time
+  } // cell has energy and weight != 0
+  return true;
+}
+
+bool CaloRec::Helpers::calculateKine(xAOD::CaloCluster* pClus,bool onlyKine)
+{
+  // input
+  if ( pClus == 0 ) { return false; }
+
+  // get cell links
+  const CaloClusterCellLink* clk = pClus->getCellLinks();
+  if ( clk == 0 || clk->size() == 0 ) { return false; }
+
+  // accumulator object                        ////////////////////////////////////////////////
+  CaloClusterSignalAccumulator accum;          // Strict enforcement of valid cell pointers! //
+  // accumulate cells                          ////////////////////////////////////////////////
+  bool retflg(true); 
+  auto citer(clk->begin());
+  while ( citer != clk->end() && retflg ) { 
+    if ( *citer != 0 ) { retflg = cellAccumulator(**citer,accum,citer.weight(),onlyKine); } ++citer; }
+  if ( !retflg ) { return false; }
+
+  // set cluster kinematics: energy & mass
+  pClus->setE(accum.cluster.accumE);
+  pClus->setM(0.);
+
+  // set cluster kinematics: directions
+  if ( accum.cluster.accumAbsE != 0. ) {
+    double invPosNorm(1./accum.cluster.accumAbsE);
+    pClus->setEta(accum.cluster.accumEta*invPosNorm);
+    pClus->setPhi(CaloPhiRange::fix(accum.cluster.accumPhi*invPosNorm));
+  } else {
+    pClus->setEta(0.);
+    pClus->setPhi(0.);
+  }
+
+  // bail out if only global kinematice to be updated
+  if ( onlyKine ) { return true; }
+
+  // set cluster kinematics: time
+  if ( accum.cluster.accumTimeNorm != 0. ) {
+    pClus->setTime(accum.cluster.accumTime/accum.cluster.accumTimeNorm);
+  } else {
+    pClus->setTime(0.);
+  }
+
+  // set sampling pattern
+  uint32_t samplingPattern(0);
+  for ( int i(0); i<(int)CaloSampling::Unknown; ++i ) {
+    if ( accum.sampling.presenceInSample[i] ) { samplingPattern |= (0x1U<<i); }
+    if ( samplingPattern != pClus->samplingPattern() ) { 
+      pClus->clearSamplingData();
+      pClus->setSamplingPattern(samplingPattern,true);
+    }
+  }
+
+  // set sampling variables
+  for ( int i(0); i<(int)CaloSampling::Unknown; ++i ) { 
+    if ( accum.sampling.presenceInSample[i] ) { 
+      CaloSampling::CaloSample sam = (CaloSampling::CaloSample)i;
+      pClus->setEnergy(sam,accum.sampling.energyInSample[i]);
+      double enorm(accum.sampling.posNormInSample[i]);
+      double eta(accum.sampling.etaInSample[i]);
+      double phi(accum.sampling.phiInSample[i]);
+      if ( enorm != 0. ) { 
+	pClus->setEta(sam,eta/enorm);
+	pClus->setPhi(sam,CaloPhiRange::fix(phi/enorm));
+      } else { 
+	pClus->setEta(sam,eta);
+	pClus->setPhi(sam,CaloPhiRange::fix(phi));
+      }
+      pClus->setEmax(sam,accum.sampling.maxEnergyInSample[i]);
+      pClus->setEtamax(sam,accum.sampling.etaMaxEnergyInSample[i]);
+      pClus->setPhimax(sam,accum.sampling.phiMaxEnergyInSample[i]);
+    } // check if sampling is in cluster
+  } // loop on samplings
+
+  return true;
+}
diff --git a/Calorimeter/CaloRec/src/CaloTopoClusterFromTowerHelpers.h b/Calorimeter/CaloRec/src/CaloTopoClusterFromTowerHelpers.h
new file mode 100644
index 000000000000..797de7a586b8
--- /dev/null
+++ b/Calorimeter/CaloRec/src/CaloTopoClusterFromTowerHelpers.h
@@ -0,0 +1,271 @@
+// -*- c++ -*- 
+/* Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */
+#ifndef CALOREC_CALOTOPOCLUSTERFROMTOWERHELPERS
+#define CALOREC_CALOTOPOCLUSTERFROMTOWERHELPERS
+
+#include "CaloGeoHelpers/CaloSampling.h"
+
+#include "xAODCaloEvent/CaloCluster.h"
+
+#include <cstdarg>
+#include <string>
+#include <map>
+
+#define _SNAMELU( NAME ) { CaloSampling::NAME , std::string( #NAME ) }
+#define _SIDLU( ID ) { std::string( #ID ) , CaloSampling::ID } 
+
+#define _MNAMELU( NAME ) { xAOD::CaloCluster::NAME, std::string( #NAME ) }
+#define _MIDLU( ID ) { std::string( #ID ) , xAOD::CaloCluster::ID }
+
+class CaloCell;
+
+// namespace xAOD {
+//   class CaloCluster;
+// }
+
+/// @brief Namespace for helper functions
+///
+/// These functions are largely a copy of @c xAOD::CaloEvent::CaloKineHelper but avoid the proximity stepper which 
+/// seems to create a problem. Additional functions are added.
+///
+namespace CaloRec {
+  namespace Helpers {
+    /// @name Types
+    /// @{
+    typedef std::array<double,CaloSampling::Unknown> valarray_t;  ///< @brief Array accommodating data for samplings
+    typedef std::vector<bool>                        boolarray_t; ///< @brief Vector of flags indicating sampling contribution 
+    /// @}
+    
+    /// @name Messaging
+    /// @{
+    /// @brief Message formatter
+    std::string fmtMsg(const char* fmt,...) ;//{
+    //   char _buffer[1024];
+    //   va_list args;
+    //   va_start(args,fmt);
+    //   vsprintf(_buffer,fmt,args);
+    //   va_end(args);
+    //   return std::string(_buffer);
+    // }
+    /// @}
+    
+    /// @brief Cache for data accumulator
+    struct CaloClusterSignalAccumulator
+    {
+      /// @brief Pre-fill array with given value
+      /// @param array array of numbers
+      /// @param value pre-fill value (optional, default is 0.)
+      static void fill(valarray_t& array,double value=0.) { array.fill(value); }
+
+      /// @brief Sampling quantities
+      struct Sampling
+      {
+	/// @{ 
+	boolarray_t presenceInSample;     ///< @brief Flag for presens of sampling in cluster
+	valarray_t  energyInSample;       ///< @brief Energy
+	valarray_t  etaInSample;          ///< @brief Eta
+	valarray_t  phiInSample;          ///< @brief Phi
+	valarray_t  maxEnergyInSample;    ///< @brief Maxmimum energy
+	valarray_t  etaMaxEnergyInSample; ///< @brief Eta of maximum energy
+	valarray_t  phiMaxEnergyInSample; ///< @brief Phi of maximum energy
+	valarray_t  posNormInSample;      ///< @brief Positive (absolute) normalization energy
+	/// @}
+	Sampling() 
+	  : presenceInSample((size_t)CaloSampling::Unknown,false)
+	{
+	  fill(energyInSample);
+	  fill(etaInSample);
+	  fill(phiInSample);
+	  fill(maxEnergyInSample);
+	  fill(etaMaxEnergyInSample);
+	  fill(phiMaxEnergyInSample);
+	  fill(posNormInSample);
+	}
+      };
+      Sampling sampling;
+	
+      /// @brief Cluster quantities
+      struct Cluster
+      { 
+	/// @name Actual cell signals
+	/// @{
+	double cellWeight;    ///< @brief Signal weight
+	double cellAbsWeight; ///< @brief Absolute Signal weight
+	double cellE;         ///< @brief Signal
+	double cellAbsE;      ///< @brief Absolute signal
+	/// @}
+	/// @name Accumulated cell signals
+	/// @{
+	double accumE;        ///< @brief Signal
+	double accumAbsE;     ///< @brief Absolute signal
+	double accumTimeNorm; ///< @brief Time normalization
+	double accumEta;      ///< @brief Accumulated energy-weighted eta
+	double accumPhi;      ///< @brief Accumulated energy-weighted phi 
+	double accumTime;     ///< @brief Time
+	int    nBarrel;       ///< @brief Number of cells in barrel 
+	int    nEndcap;       ///< @brief Number of cells in endcap
+	/// @}
+	/// @name Parameters 
+	double phiSeed;       ///< @brief Phi seed
+	bool   firstCell;     ///< @brief Flags first cell
+	/// @}
+	/// @brief Constructor
+	Cluster() 
+	  : cellWeight(0.)
+	  , cellAbsWeight(0.)
+	  , cellE(0.)
+	  , cellAbsE(0.)
+	  , accumE(0.)
+	  , accumAbsE(0.)
+	  , accumTimeNorm(0.)
+	  , accumEta(0.)
+	  , accumPhi(0.)
+	  , accumTime(0.)
+	  , nBarrel(0)
+	  , nEndcap(0)
+	  , phiSeed(0.)
+	  , firstCell(true)
+	{ }
+      };
+      Cluster cluster;
+
+      /// @brief Constructor
+      CaloClusterSignalAccumulator() 
+	: sampling(), cluster()
+      { } 
+    };
+
+    /// @name Cluster building and refinement
+    /// @{
+    /// @brief Accumulator function
+    ///
+    /// This function fills the @c CaloClusterSignalAccumulator object. It is invoked for each cell in a cluster. 
+    /// 
+    /// @param rcell    reference to non-modifiable @c CaloCell object
+    /// @param accum    reference to modifiable @c CaloClusterSignalAccumulator object
+    /// @param weight   weight of cell contribution
+    /// @param onlyKine update only global cluster kinematics when @c true, else update all cluster variables
+    bool cellAccumulator(const CaloCell& rcell,CaloClusterSignalAccumulator& accum,double weight,bool onlyKine=false);
+    /// @brief Kinematic updates
+    ///
+    /// This function updates the kinematics of a cluster e.g. after calibration
+    ///
+    /// @param pClus    pointer to modifiable cluster object
+    /// @param onlyKine update only global cluster kinematics when @c true, else update all cluster variables
+    bool calculateKine(xAOD::CaloCluster* pClus,bool onlyKine=false);
+    /// @}
+  } // Helpers
+
+  ///@brief Stores
+  namespace Lookup {
+    ///@name Sampling names and identifier maps
+    ///@{
+    static const std::map<CaloSampling::CaloSample,std::string> samplingNames  = {
+      // EM
+      _SNAMELU( PreSamplerB ), _SNAMELU( EMB1 ),  _SNAMELU( EMB2 ),  _SNAMELU( EMB3 ), 
+      _SNAMELU( PreSamplerE ), _SNAMELU( EME1 ),  _SNAMELU( EME2 ),  _SNAMELU( EME3 ),
+      // HAD 
+      _SNAMELU( HEC0 ),     _SNAMELU( HEC1 ),     _SNAMELU( HEC2 ),     _SNAMELU( HEC3 ), 
+      _SNAMELU( TileBar0 ), _SNAMELU( TileBar1 ), _SNAMELU( TileBar2 ),
+      // Tile
+      _SNAMELU( TileBar0 ), _SNAMELU( TileBar1 ), _SNAMELU( TileBar2 ),
+      _SNAMELU( TileGap1 ), _SNAMELU( TileGap2 ), _SNAMELU( TileGap3 ),
+      _SNAMELU( TileExt0 ), _SNAMELU( TileExt1 ), _SNAMELU( TileExt2 ),
+      // FCal
+      _SNAMELU( FCAL0 ),    _SNAMELU( FCAL1 ),    _SNAMELU( FCAL2 ),
+      // Mini-FCal
+      _SNAMELU( MINIFCAL0 ),    _SNAMELU( MINIFCAL1 ),    _SNAMELU( MINIFCAL2 ), _SNAMELU( MINIFCAL3 ),
+      // unknown
+      _SNAMELU( Unknown ) 
+    };  ///< Name lookup by sampling identifier (data)
+    static const std::map<std::string,CaloSampling::CaloSample> samplingIds = {
+      // EM
+      _SIDLU( PreSamplerB ), _SIDLU( EMB1 ),  _SIDLU( EMB2 ),  _SIDLU( EMB3 ), 
+      _SIDLU( PreSamplerE ), _SIDLU( EME1 ),  _SIDLU( EME2 ),  _SIDLU( EME3 ),
+      // HAD 
+      _SIDLU( HEC0 ),     _SIDLU( HEC1 ),     _SIDLU( HEC2 ),     _SIDLU( HEC3 ), 
+      _SIDLU( TileBar0 ), _SIDLU( TileBar1 ), _SIDLU( TileBar2 ),
+      // Tile
+      _SIDLU( TileBar0 ), _SIDLU( TileBar1 ), _SIDLU( TileBar2 ),
+      _SIDLU( TileGap1 ), _SIDLU( TileGap2 ), _SIDLU( TileGap3 ),
+      _SIDLU( TileExt0 ), _SIDLU( TileExt1 ), _SIDLU( TileExt2 ),
+      // FCal
+      _SIDLU( FCAL0 ),    _SIDLU( FCAL1 ),    _SIDLU( FCAL2 ),
+      // Mini-FCal
+      _SIDLU( MINIFCAL0 ),    _SIDLU( MINIFCAL1 ),    _SIDLU( MINIFCAL2 ), _SIDLU( MINIFCAL3 ),
+      // unknown
+      _SIDLU( Unknown )
+    };  ///< Identifier lookup by sampling name (data)
+    static const std::string&       getSamplingName(CaloSampling::CaloSample sid); ///< Lookup sampling name by identifier (function) 
+    static CaloSampling::CaloSample getSamplingId(const std::string& sname);       ///< Lookup sampling identifier by name (function)
+    ///@}
+    ///@name Cluster moment names and identifier maps
+    ///@{
+    static const std::map<xAOD::CaloCluster::MomentType,std::string> clusterMomentNames = {
+      _MNAMELU( FIRST_PHI ),_MNAMELU( FIRST_ETA ),_MNAMELU( SECOND_R ),_MNAMELU( SECOND_LAMBDA ),_MNAMELU( DELTA_PHI ),_MNAMELU( DELTA_THETA ),_MNAMELU( DELTA_ALPHA ),      
+      _MNAMELU( CENTER_X ),_MNAMELU( CENTER_Y ),_MNAMELU( CENTER_Z ),_MNAMELU( CENTER_MAG ),_MNAMELU( CENTER_LAMBDA ),_MNAMELU( LATERAL ),_MNAMELU( LONGITUDINAL ),     
+      _MNAMELU( ENG_FRAC_EM ),_MNAMELU( ENG_FRAC_MAX ),_MNAMELU( ENG_FRAC_CORE ),_MNAMELU( FIRST_ENG_DENS ),_MNAMELU( SECOND_ENG_DENS ),_MNAMELU( ENG_POS ),  
+      _MNAMELU( ISOLATION ),_MNAMELU( ENG_BAD_CELLS ),_MNAMELU( N_BAD_CELLS ),_MNAMELU( N_BAD_CELLS_CORR ),_MNAMELU( BAD_CELLS_CORR_E ),_MNAMELU( BADLARQ_FRAC ),    
+      _MNAMELU( SIGNIFICANCE ),_MNAMELU( CELL_SIGNIFICANCE ),_MNAMELU( CELL_SIG_SAMPLING ),_MNAMELU( AVG_LAR_Q ),_MNAMELU( AVG_TILE_Q ),_MNAMELU( ENG_BAD_HV_CELLS ),
+      _MNAMELU( N_BAD_HV_CELLS ),_MNAMELU( PTD ),_MNAMELU( MASS ),_MNAMELU( EM_PROBABILITY ),_MNAMELU( HAD_WEIGHT ),_MNAMELU( OOC_WEIGHT ),_MNAMELU( DM_WEIGHT ),                  
+      _MNAMELU( TILE_CONFIDENCE_LEVEL ),_MNAMELU( VERTEX_FRACTION ),_MNAMELU( NVERTEX_FRACTION ),_MNAMELU( ETACALOFRAME ),_MNAMELU( PHICALOFRAME ),_MNAMELU( ETA1CALOFRAME ),    
+      _MNAMELU( PHI1CALOFRAME ),_MNAMELU( ETA2CALOFRAME ),_MNAMELU( PHI2CALOFRAME ),_MNAMELU( ENG_CALIB_TOT ),_MNAMELU( ENG_CALIB_OUT_L ),_MNAMELU( ENG_CALIB_OUT_M ),  
+      _MNAMELU( ENG_CALIB_OUT_T ),_MNAMELU( ENG_CALIB_DEAD_L ),_MNAMELU( ENG_CALIB_DEAD_M ),_MNAMELU( ENG_CALIB_DEAD_T ),_MNAMELU( ENG_CALIB_EMB0 ),_MNAMELU( ENG_CALIB_EME0 ),
+      _MNAMELU( ENG_CALIB_TILEG3 ),_MNAMELU( ENG_CALIB_DEAD_TOT ),_MNAMELU( ENG_CALIB_DEAD_EMB0 ),_MNAMELU( ENG_CALIB_DEAD_TILE0 ),_MNAMELU( ENG_CALIB_DEAD_TILEG3 ),
+      _MNAMELU( ENG_CALIB_DEAD_EME0 ),_MNAMELU( ENG_CALIB_DEAD_HEC0 ),_MNAMELU( ENG_CALIB_DEAD_FCAL ),_MNAMELU( ENG_CALIB_DEAD_LEAKAGE ),_MNAMELU( ENG_CALIB_DEAD_UNCLASS ),
+      _MNAMELU( ENG_CALIB_FRAC_EM ),_MNAMELU( ENG_CALIB_FRAC_HAD ),_MNAMELU( ENG_CALIB_FRAC_REST ),_MNAMELU( ENERGY_DigiHSTruth ),_MNAMELU( ETA_DigiHSTruth ),_MNAMELU( PHI_DigiHSTruth ),
+      _MNAMELU( TIME_DigiHSTruth ),_MNAMELU( ENERGY_CALIB_DigiHSTruth ),_MNAMELU( ETA_CALIB_DigiHSTruth ),_MNAMELU( PHI_CALIB_DigiHSTruth ),_MNAMELU( TIME_CALIB_DigiHSTruth ),
+      _MNAMELU( FIRST_PHI_DigiHSTruth ),_MNAMELU( FIRST_ETA_DigiHSTruth ),_MNAMELU( SECOND_R_DigiHSTruth ),_MNAMELU( SECOND_LAMBDA_DigiHSTruth ),_MNAMELU( DELTA_PHI_DigiHSTruth ),
+      _MNAMELU( DELTA_THETA_DigiHSTruth ),_MNAMELU( DELTA_ALPHA_DigiHSTruth ),_MNAMELU( CENTER_X_DigiHSTruth ),_MNAMELU( CENTER_Y_DigiHSTruth ),_MNAMELU( CENTER_Z_DigiHSTruth ),
+      _MNAMELU( CENTER_MAG_DigiHSTruth ),_MNAMELU( CENTER_LAMBDA_DigiHSTruth ),_MNAMELU( LATERAL_DigiHSTruth ),_MNAMELU( LONGITUDINAL_DigiHSTruth ),_MNAMELU( ENG_FRAC_EM_DigiHSTruth ),
+      _MNAMELU( ENG_FRAC_MAX_DigiHSTruth ),_MNAMELU( ENG_FRAC_CORE_DigiHSTruth ),_MNAMELU( FIRST_ENG_DENS_DigiHSTruth ),_MNAMELU( SECOND_ENG_DENS_DigiHSTruth ),
+      _MNAMELU( ISOLATION_DigiHSTruth ),_MNAMELU( ENG_BAD_CELLS_DigiHSTruth ),_MNAMELU( N_BAD_CELLS_DigiHSTruth ),_MNAMELU( N_BAD_CELLS_CORR_DigiHSTruth ),
+      _MNAMELU( BAD_CELLS_CORR_E_DigiHSTruth ),_MNAMELU( BADLARQ_FRAC_DigiHSTruth ),_MNAMELU( ENG_POS_DigiHSTruth ),_MNAMELU( SIGNIFICANCE_DigiHSTruth ),
+      _MNAMELU( CELL_SIGNIFICANCE_DigiHSTruth ),_MNAMELU( CELL_SIG_SAMPLING_DigiHSTruth ),_MNAMELU( AVG_LAR_Q_DigiHSTruth ),_MNAMELU( AVG_TILE_Q_DigiHSTruth ),
+      _MNAMELU( ENG_BAD_HV_CELLS_DigiHSTruth ),_MNAMELU( N_BAD_HV_CELLS_DigiHSTruth ),_MNAMELU( EM_PROBABILITY_DigiHSTruth ),_MNAMELU( HAD_WEIGHT_DigiHSTruth ),
+      _MNAMELU( OOC_WEIGHT_DigiHSTruth ),_MNAMELU( DM_WEIGHT_DigiHSTruth )
+    }; ///< Moment names by moment types
+    static const std::map<std::string,xAOD::CaloCluster::MomentType> clusterMomentTypes = {
+      _MIDLU( FIRST_PHI ),_MIDLU( FIRST_ETA ),_MIDLU( SECOND_R ),_MIDLU( SECOND_LAMBDA ),_MIDLU( DELTA_PHI ),_MIDLU( DELTA_THETA ),_MIDLU( DELTA_ALPHA ),      
+      _MIDLU( CENTER_X ),_MIDLU( CENTER_Y ),_MIDLU( CENTER_Z ),_MIDLU( CENTER_MAG ),_MIDLU( CENTER_LAMBDA ),_MIDLU( LATERAL ),_MIDLU( LONGITUDINAL ),     
+      _MIDLU( ENG_FRAC_EM ),_MIDLU( ENG_FRAC_MAX ),_MIDLU( ENG_FRAC_CORE ),_MIDLU( FIRST_ENG_DENS ),_MIDLU( SECOND_ENG_DENS ),_MIDLU( ENG_POS ),  
+      _MIDLU( ISOLATION ),_MIDLU( ENG_BAD_CELLS ),_MIDLU( N_BAD_CELLS ),_MIDLU( N_BAD_CELLS_CORR ),_MIDLU( BAD_CELLS_CORR_E ),_MIDLU( BADLARQ_FRAC ),    
+      _MIDLU( SIGNIFICANCE ),_MIDLU( CELL_SIGNIFICANCE ),_MIDLU( CELL_SIG_SAMPLING ),_MIDLU( AVG_LAR_Q ),_MIDLU( AVG_TILE_Q ),_MIDLU( ENG_BAD_HV_CELLS ),
+      _MIDLU( N_BAD_HV_CELLS ),_MIDLU( PTD ),_MIDLU( MASS ),_MIDLU( EM_PROBABILITY ),_MIDLU( HAD_WEIGHT ),_MIDLU( OOC_WEIGHT ),_MIDLU( DM_WEIGHT ),                  
+      _MIDLU( TILE_CONFIDENCE_LEVEL ),_MIDLU( VERTEX_FRACTION ),_MIDLU( NVERTEX_FRACTION ),_MIDLU( ETACALOFRAME ),_MIDLU( PHICALOFRAME ),_MIDLU( ETA1CALOFRAME ),    
+      _MIDLU( PHI1CALOFRAME ),_MIDLU( ETA2CALOFRAME ),_MIDLU( PHI2CALOFRAME ),_MIDLU( ENG_CALIB_TOT ),_MIDLU( ENG_CALIB_OUT_L ),_MIDLU( ENG_CALIB_OUT_M ),  
+      _MIDLU( ENG_CALIB_OUT_T ),_MIDLU( ENG_CALIB_DEAD_L ),_MIDLU( ENG_CALIB_DEAD_M ),_MIDLU( ENG_CALIB_DEAD_T ),_MIDLU( ENG_CALIB_EMB0 ),_MIDLU( ENG_CALIB_EME0 ),
+      _MIDLU( ENG_CALIB_TILEG3 ),_MIDLU( ENG_CALIB_DEAD_TOT ),_MIDLU( ENG_CALIB_DEAD_EMB0 ),_MIDLU( ENG_CALIB_DEAD_TILE0 ),_MIDLU( ENG_CALIB_DEAD_TILEG3 ),
+      _MIDLU( ENG_CALIB_DEAD_EME0 ),_MIDLU( ENG_CALIB_DEAD_HEC0 ),_MIDLU( ENG_CALIB_DEAD_FCAL ),_MIDLU( ENG_CALIB_DEAD_LEAKAGE ),_MIDLU( ENG_CALIB_DEAD_UNCLASS ),
+      _MIDLU( ENG_CALIB_FRAC_EM ),_MIDLU( ENG_CALIB_FRAC_HAD ),_MIDLU( ENG_CALIB_FRAC_REST ),_MIDLU( ENERGY_DigiHSTruth ),_MIDLU( ETA_DigiHSTruth ),_MIDLU( PHI_DigiHSTruth ),
+      _MIDLU( TIME_DigiHSTruth ),_MIDLU( ENERGY_CALIB_DigiHSTruth ),_MIDLU( ETA_CALIB_DigiHSTruth ),_MIDLU( PHI_CALIB_DigiHSTruth ),_MIDLU( TIME_CALIB_DigiHSTruth ),
+      _MIDLU( FIRST_PHI_DigiHSTruth ),_MIDLU( FIRST_ETA_DigiHSTruth ),_MIDLU( SECOND_R_DigiHSTruth ),_MIDLU( SECOND_LAMBDA_DigiHSTruth ),_MIDLU( DELTA_PHI_DigiHSTruth ),
+      _MIDLU( DELTA_THETA_DigiHSTruth ),_MIDLU( DELTA_ALPHA_DigiHSTruth ),_MIDLU( CENTER_X_DigiHSTruth ),_MIDLU( CENTER_Y_DigiHSTruth ),_MIDLU( CENTER_Z_DigiHSTruth ),
+      _MIDLU( CENTER_MAG_DigiHSTruth ),_MIDLU( CENTER_LAMBDA_DigiHSTruth ),_MIDLU( LATERAL_DigiHSTruth ),_MIDLU( LONGITUDINAL_DigiHSTruth ),_MIDLU( ENG_FRAC_EM_DigiHSTruth ),
+      _MIDLU( ENG_FRAC_MAX_DigiHSTruth ),_MIDLU( ENG_FRAC_CORE_DigiHSTruth ),_MIDLU( FIRST_ENG_DENS_DigiHSTruth ),_MIDLU( SECOND_ENG_DENS_DigiHSTruth ),
+      _MIDLU( ISOLATION_DigiHSTruth ),_MIDLU( ENG_BAD_CELLS_DigiHSTruth ),_MIDLU( N_BAD_CELLS_DigiHSTruth ),_MIDLU( N_BAD_CELLS_CORR_DigiHSTruth ),
+      _MIDLU( BAD_CELLS_CORR_E_DigiHSTruth ),_MIDLU( BADLARQ_FRAC_DigiHSTruth ),_MIDLU( ENG_POS_DigiHSTruth ),_MIDLU( SIGNIFICANCE_DigiHSTruth ),
+      _MIDLU( CELL_SIGNIFICANCE_DigiHSTruth ),_MIDLU( CELL_SIG_SAMPLING_DigiHSTruth ),_MIDLU( AVG_LAR_Q_DigiHSTruth ),_MIDLU( AVG_TILE_Q_DigiHSTruth ),
+      _MIDLU( ENG_BAD_HV_CELLS_DigiHSTruth ),_MIDLU( N_BAD_HV_CELLS_DigiHSTruth ),_MIDLU( EM_PROBABILITY_DigiHSTruth ),_MIDLU( HAD_WEIGHT_DigiHSTruth ),
+      _MIDLU( OOC_WEIGHT_DigiHSTruth ),_MIDLU( DM_WEIGHT_DigiHSTruth )
+    }; ///< Moment names buy moment identifiers
+    static const std::string& getMomentName(xAOD::CaloCluster::MomentType momentType);                                ///< Get moment name associated with a moment type 
+    static bool               getMomentType(const std::string& momentName,xAOD::CaloCluster::MomentType& momentType); ///< Get moment type associated with a moment name
+    static bool               haveMomentType(const std::string& momentName);                                          ///< Returns @c true in case moment is known  
+    ///@}
+  } // Lookup
+} // CaloRec
+
+inline const std::string&       CaloRec::Lookup::getSamplingName(CaloSampling::CaloSample sid) { return samplingNames.find(sid)->second; }
+inline CaloSampling::CaloSample CaloRec::Lookup::getSamplingId(const std::string& sname) { 
+  auto fid(samplingIds.find(sname)); return fid != samplingIds.end() ? fid->second : samplingIds.find("Unknown")->second; 
+}
+
+inline bool               CaloRec::Lookup::haveMomentType(const std::string& momentName) { return clusterMomentTypes.find(momentName) != clusterMomentTypes.end(); }
+inline const std::string& CaloRec::Lookup::getMomentName(xAOD::CaloCluster::MomentType momentType) { return clusterMomentNames.at(momentType); }
+inline bool               CaloRec::Lookup::getMomentType(const std::string& momentName,xAOD::CaloCluster::MomentType& momentType) {
+  bool isOk(haveMomentType(momentName)); if ( isOk ) { momentType = clusterMomentTypes.at(momentName); } return isOk;
+}
+
+ 
+#endif
diff --git a/Calorimeter/CaloRec/src/CaloTopoClusterFromTowerMonitor.cxx b/Calorimeter/CaloRec/src/CaloTopoClusterFromTowerMonitor.cxx
new file mode 100644
index 000000000000..75e41911895b
--- /dev/null
+++ b/Calorimeter/CaloRec/src/CaloTopoClusterFromTowerMonitor.cxx
@@ -0,0 +1,421 @@
+
+#include "GaudiKernel/MsgStream.h"
+#include "GaudiKernel/SystemOfUnits.h"
+#include "GaudiKernel/PhysicalConstants.h"
+
+#include "CaloTopoClusterFromTowerMonitor.h"
+
+#include "CaloGeoHelpers/CaloPhiRange.h"
+
+#include "CaloDetDescr/CaloDetDescrElement.h"
+#include "CaloDetDescr/CaloDetDescrManager.h"
+
+#include "TH1D.h"
+#include "TH2D.h"
+
+#include <vector>
+
+namespace { 
+  MsgStream& operator<<(MsgStream& mstr,const SG::ReadHandleKey<xAOD::CaloClusterContainer>& ckey) { mstr << ckey.key();   return mstr; }
+  MsgStream& operator<<(MsgStream& mstr,const ServiceHandle<CaloTowerGeometrySvc>&           shdl) { mstr << shdl->name(); return mstr; }
+}
+
+CaloTopoClusterFromTowerMonitor::CaloTopoClusterFromTowerMonitor(const std::string& name,ISvcLocator* pSvcLocator)
+  : AthHistogramAlgorithm(name,pSvcLocator)
+  , m_towerContainerKey("LCWTowerTopoClusterStd")
+  , m_towerGeometrySvc("CaloTowerGeometrySvc",name)
+  , m_ncBins(100)
+  , m_ncMin(-0.5)
+  , m_ncMax(m_ncMin+m_ncBins)
+  , m_nBins(320)
+  , m_nMin(-0.05)
+  , m_nMax(m_nMin+m_nBins*20.)
+  , m_ptBins(220)
+  , m_ptMin(-10.)
+  , m_ptMax(100.)
+  , m_etaBins(100)
+  , m_etaMin(-5.)
+  , m_etaMax(5.)
+  , m_phiBins(64)
+  , m_phiMin(-Gaudi::Units::pi)
+  , m_phiMax(Gaudi::Units::pi)
+  , m_hsEtaMin(0.)
+  , m_hsEtaMax(0.1)
+  , m_hsPhiMin(0.)
+  , m_hsPhiMax(0.1)
+  , m_doGeoAutoBins(true)
+  , m_doHotspot(false)
+  ,  m_h_n((TH1D*)0),  m_h_pt((TH1D*)0),  m_h_eta((TH1D*)0),  m_h_phi((TH1D*)0),  m_h_nc((TH1D*)0),  m_h_samp((TH1D*)0)
+  , m_d_n_eta_phi((TH2D*)0), m_d_nc_eta_phi((TH2D*)0)
+  , m_d_pt_eta((TH2D*)0), m_d_nc_eta((TH2D*)0)
+  , m_d_wgt_samp((TH2D*)0), m_d_ntt_samp((TH2D*)0), m_d_geo_samp((TH2D*)0)
+  , m_d_maxtowers_samp((TH2D*)0), m_d_wgttowers_samp((TH2D*)0) 
+  , m_d_maxcells_eta((TH2D*)0), m_d_allwghts_eta((TH2D*)0)
+  , m_d_deta_eta((TH2D*)0),  m_d_dphi_eta((TH2D*)0),  m_d_dphi_deta((TH2D*)0)
+  , m_d_detac_eta((TH2D*)0), m_d_dphic_eta((TH2D*)0), m_d_dphic_detac((TH2D*)0), m_d_detac_samp((TH2D*)0), m_d_dphic_samp((TH2D*)0)
+  ,  m_h_nc_hs((TH1D*)0),  m_h_n_hs((TH1D*)0),  m_h_pt_hs((TH1D*)0),  m_h_eta_hs((TH1D*)0),  m_h_phi_hs((TH1D*)0),  m_h_samp_hs((TH1D*)0)
+  , m_d_n_eta_phi_hs((TH2D*)0), m_d_nc_eta_phi_hs((TH2D*)0)
+  , m_d_deta_eta_hs((TH2D*)0), m_d_dphi_eta_hs((TH2D*)0), m_d_dphi_deta_hs((TH2D*)0)
+  , m_d_detac_eta_hs((TH2D*)0), m_d_dphic_eta_hs((TH2D*)0), m_d_dphic_detac_hs((TH2D*)0), m_d_detac_samp_hs((TH2D*)0), m_d_dphic_samp_hs((TH2D*)0) 
+{
+  declareProperty("CaloTowerContainerKey", m_towerContainerKey, "Input container key"     );
+  declareProperty("CaloTowerGeometrySvc",  m_towerGeometrySvc,  "Tower geometry provider" );
+  declareProperty("NTowerCellsBins",       m_ncBins,            "Number of bins in cell-in-tower multiplicity");
+  declareProperty("NTowerCellsMin",        m_ncMin,             "Lower limit in cell-in-tower multiplicity");
+  declareProperty("NTowerCellsMax",        m_ncMax,             "Upper limit in cell-in-tower multiplicity");
+  declareProperty("NTowersBins",           m_nBins,             "Number of bins in tower multiplicity binning");
+  declareProperty("NTowersMin",            m_nMin,              "Lower limit in tower multiplicity binning");
+  declareProperty("NTowersMax",            m_nMax,              "Upper limit in tower multiplicity binning");          
+  declareProperty("PtTowersBins",          m_ptBins,            "Number of bins in tower pT binning");
+  declareProperty("PtTowersMin",           m_ptMin,             "Lower limit in tower pT binning");
+  declareProperty("PtTowersMax",           m_ptMax,             "Upper limit in tower pT binning");          
+  declareProperty("EtaTowersBins",         m_etaBins,           "Number of bins in tower rapidity binning");
+  declareProperty("EtaTowersMin",          m_etaMin,            "Lower limit in tower rapidity binning");
+  declareProperty("EtaTowersMax",          m_etaMax,            "Upper limit in tower rapidity binning");          
+  declareProperty("PhiTowersBins",         m_phiBins,           "Number of bins in tower azimuth binning");
+  declareProperty("PhiTowersMin",          m_phiMin,            "Lower limit in tower azimuth binning");
+  declareProperty("PhiTowersMax",          m_phiMax,            "Upper limit in tower azimuth binning");
+  declareProperty("EtaMinHotspot",         m_hsEtaMin,          "lower limit in tower rapidity for hotspot");
+  declareProperty("EtaMaxHotspot",         m_hsEtaMax,          "Upper limit in tower rapidity for hotspot");
+  declareProperty("PhiMinHotspot",         m_hsPhiMin,          "lower limit in tower azimuth for hotspot");
+  declareProperty("PhiMaxHotspot",         m_hsPhiMax,          "Upper limit in tower azimuth for hotspot");
+  declareProperty("DoGeoAutoBins",         m_doGeoAutoBins,     "Flag controls automatic binning for rapidity and azimuth");          
+}
+
+CaloTopoClusterFromTowerMonitor::~CaloTopoClusterFromTowerMonitor()
+{ }
+
+StatusCode CaloTopoClusterFromTowerMonitor::initialize()
+{
+  // initialize read handle key
+  ATH_CHECK(m_towerContainerKey.initialize());
+
+  // tower geometry service
+  ATH_MSG_INFO( "Allocate tower geometry service:" );
+  if ( !m_towerGeometrySvc.isValid() ) { 
+    ATH_MSG_ERROR("[reject] - cannot allocate tower geometry service - fatal");
+    return StatusCode::FAILURE;
+  } else {
+    ATH_MSG_INFO( "[accept] - allocated tower geometry provider \042" << m_towerGeometrySvc << "\042");
+  }
+
+  ATH_MSG_INFO( CaloRec::Helpers::fmtMsg("Tower geometry service is allocated, describes %6zu towers in grid:", m_towerGeometrySvc->towerBins()) );
+  ATH_MSG_INFO( CaloRec::Helpers::fmtMsg("[accept] %3zu eta bins in [%5.2f,%5.2f]",m_towerGeometrySvc->etaBins(),m_towerGeometrySvc->etaMin(),m_towerGeometrySvc->etaMax()) );
+  ATH_MSG_INFO( CaloRec::Helpers::fmtMsg("[accept] %3zu phi bins in [%5.2f,%5.2f]",m_towerGeometrySvc->phiBins(),m_towerGeometrySvc->phiMin(),m_towerGeometrySvc->phiMax()) );
+
+  std::string cfgStr;  
+  if ( m_doGeoAutoBins ) { 
+    ATH_MSG_INFO("Eta and phi binning taken from tower geometry provider"); 
+    m_etaBins  = m_towerGeometrySvc->etaBins();
+    m_etaMin   = m_towerGeometrySvc->etaMin();
+    m_etaMax   = m_towerGeometrySvc->etaMax();
+    m_phiBins  = m_towerGeometrySvc->phiBins();
+    m_phiMin   = m_towerGeometrySvc->phiMin();
+    m_phiMax   = m_towerGeometrySvc->phiMax();
+    m_hsPhiMax = m_hsPhiMin+m_towerGeometrySvc->phiWidth(); 
+    cfgStr = "autoconfig";
+  } else {
+    ATH_MSG_INFO("Eta and phi binning taken from specific configuration");
+    cfgStr = "userconfig"; 
+  }
+
+  m_doHotspot = m_hsEtaMin < m_hsEtaMax &&  m_hsPhiMin < m_hsPhiMax;
+
+  ATH_MSG_INFO( CaloRec::Helpers::fmtMsg("Eta and phi binning for histograms (total %zu towers)",m_etaBins*m_phiBins) );
+  ATH_MSG_INFO( CaloRec::Helpers::fmtMsg("[%s] %3zu eta bins in [%5.2f,%5.2f]",cfgStr.c_str(),m_etaBins,m_etaMin,m_etaMax) );
+  ATH_MSG_INFO( CaloRec::Helpers::fmtMsg("[%s] %3zu phi bins in [%5.2f,%5.2f]",cfgStr.c_str(),m_phiBins,m_phiMin,m_phiMax) );
+
+  ATH_CHECK( book() ); 
+
+  // database plots
+  std::vector<std::vector<double> > cWghts(m_towerGeometrySvc->towerBins(),std::vector<double>());
+  size_t chash(0);
+  for ( auto fLnk(m_towerGeometrySvc->begin()); fLnk != m_towerGeometrySvc->end(); ++fLnk, ++chash ) { 
+    CaloSampling::CaloSample samp = CaloDetDescrManager::instance()->get_element(chash)->getSampling();
+    double cs(static_cast<double>(samp));
+    double nt(static_cast<double>(fLnk->size()));
+    m_d_maxtowers_samp->Fill(cs,nt);
+    for ( auto elm : *fLnk ) {
+      // collect for towers
+      size_t tidx(static_cast<size_t>(m_towerGeometrySvc->towerIndex(elm)));
+      double weight(m_towerGeometrySvc->cellWeight(elm));
+      cWghts[tidx].push_back(weight);
+      // plot for smaplings
+      m_d_wgttowers_samp->Fill(cs,weight);
+    }
+  }
+
+  for ( size_t tidx(0); tidx<cWghts.size(); ++tidx ) { 
+    double eta(m_towerGeometrySvc->towerEta(tidx));
+    double phi(m_towerGeometrySvc->towerPhi(tidx));
+    double nc(1.0*cWghts.at(tidx).size());
+    m_d_maxcells_eta->Fill(eta,nc);
+    size_t etaIdx(m_towerGeometrySvc->etaIndexFromTowerIndex(tidx));
+    m_d_maxcells_phi_eta_slice[etaIdx]->Fill(phi,nc);
+    for ( auto w : cWghts.at(tidx) ) { m_d_allwghts_eta->Fill(eta,w); m_d_allwghts_phi_eta_slice[etaIdx]->Fill(phi,w); }
+  }
+
+  if ( msgLvl(MSG::DEBUG) ) { 
+    ATH_MSG_DEBUG( CaloRec::Helpers::fmtMsg("+------------+--------------+") );
+    ATH_MSG_DEBUG( CaloRec::Helpers::fmtMsg("| SamplingId | SamplingName |") );
+    ATH_MSG_DEBUG( CaloRec::Helpers::fmtMsg("+------------+--------------+") );
+    const auto& smap = CaloRec::Lookup::samplingNames;
+    for ( auto fsamp(smap.begin()); fsamp != smap.end(); ++fsamp ) { 
+      ATH_MSG_DEBUG( CaloRec::Helpers::fmtMsg("|     %02i     |  %11.11s |",fsamp->first,fsamp->second.c_str()) );
+    }
+    ATH_MSG_DEBUG( CaloRec::Helpers::fmtMsg("+------------+--------------+") );
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode CaloTopoClusterFromTowerMonitor::book()
+{
+  ////////////////////////////////////////////////////////////
+  // composition, multiplicity, kinematics (event by event) //
+  ////////////////////////////////////////////////////////////
+
+  int    detaBins(105);  int    dphiBins(128);
+  double detaMin(-1.05); double dphiMin(-Gaudi::Units::pi/2.);
+  double detaMax(1.05);  double dphiMax(Gaudi::Units::pi/2.);
+
+  // re-center delta phi
+  double dphi((dphiMax-dphiMin)/(1.*dphiBins)); double dphiMinOld(dphiMin); double dphiMaxOld(dphiMax); //int dphiBinsOld(dphiBins);
+  int dphiBinsOld = (dphiMax-dphiMin)/dphi;
+  dphiMin  -= (dphi/2.); dphiMax  += (dphi/2.);
+  double dphim(dphi);
+  dphiBins  = (dphiMax-dphiMin)/dphim;
+
+  ATH_MSG_INFO( CaloRec::Helpers::fmtMsg("re-center delta_phi distributions, old/new binning [%6.3f,%6.3f]/[%6.3f,%6.3f] with %3i/%3i bins %5.3f/%5.3f rad wide",
+					 dphiMinOld,dphiMaxOld,dphiMin,dphiMax,dphiBinsOld,dphiBins,dphi,dphim) );
+  
+
+  m_h_n    = bookAny<TH1D>("TowerMultiplicity",    "N_{tower}",          m_nBins, m_nMin, m_nMax);
+  m_h_pt   = bookAny<TH1D>("TowerPt",              "p_{T}^{tower} [GeV]",m_ptBins,m_ptMin,m_ptMax);
+  m_h_nc   = bookAny<TH1D>("TowerCellMultiplicity","N_{cell}^{tower}",   m_ncBins,m_ncMin,m_ncMax);
+  m_h_eta  = bookForEta<TH1D>("TowerRapidity",     "y_{tower}");
+  m_h_phi  = bookForPhi<TH1D>("TowerAzimuth",      "#phi_{tower} [rad]");
+
+  m_h_samp = bookForSamplings<TH1D>("TowerCellSamplings","TowerCellSamplings"); setAxisTitle(m_h_samp,"N_{cells} in sampling","y");
+  // relations (event by event)
+  m_d_n_eta_phi  = bookAny<TH2D>("TowerMultiplicityVsEtaVsPhi",    "N_{tower}(y_{tower},#phi_{tower})",       "y_{tower}",m_etaBins,m_etaMin,m_etaMax,m_phiBins,m_phiMin,m_phiMax);
+  setAxisTitle(m_d_n_eta_phi,"#phi_{tower} [rad]","y"); setAxisTitle(m_d_n_eta_phi,"N_{tower}","z");
+  m_d_nc_eta_phi = bookAny<TH2D>("TowerCellMultiplicityVsEtaBsPhi","N_{cell}^{tower}(y_{tower},#phi_{tower})","y_{tower}",m_etaBins,m_etaMin,m_etaMax,m_phiBins,m_phiMin,m_phiMax); 
+  setAxisTitle(m_d_nc_eta_phi,"#phi_{tower} [rad]","y"); setAxisTitle(m_d_nc_eta_phi,"N_{cell}^{tower}","z");
+  m_d_pt_eta     = bookAny<TH2D>("TowerPtVsEta",                   "p_{T}^{tower}(y_{tower})",                "y_{tower}",m_etaBins,m_etaMin,m_etaMax,m_ptBins, m_ptMin, m_ptMax );
+  setAxisTitle(m_d_pt_eta,"p_{T}^{tower} [GeV]","y");
+  m_d_nc_eta     = bookAny<TH2D>("TowerCellMultiplicityVsEta",     "N_{cell}^{tower}(y_{tower})",             "y_{tower}",m_etaBins,m_etaMin,m_etaMax,m_ncBins, m_ncMin, m_ncMax );
+  setAxisTitle(m_d_pt_eta,"N_{cell}^{tower} [GeV]","y");
+  // distance to nominal
+  m_d_deta_eta  = bookAny<TH2D>("TowerDeltaEtaVsEta",         "(y_{tower}-y_{tower,0})(y_{tower})",      "y_{tower}",      m_etaBins,m_etaMin,m_etaMax,detaBins,detaMin,detaMax);
+  setAxisTitle(m_d_deta_eta,"#Deltay_{tower}","y");
+  m_d_dphi_eta  = bookAny<TH2D>("TowerDeltaPhiVsEta",         "(#phi_{tower}-#phi_{tower,0})(y_{tower})","y_{tower}",      m_etaBins,m_etaMin,m_etaMax,dphiBins,dphiMin,dphiMax);
+  setAxisTitle(m_d_dphi_eta,"#Delta#phi_{tower} [rad]","y");
+  m_d_dphi_deta = bookAny<TH2D>("TowerDeltaPhiVsDeltaEta",    "#Delta#phi_{tower}(#Deltay_{tower})",     "#Deltay_{tower}",detaBins, detaMin, detaMax, dphiBins,dphiMin,dphiMax);
+  setAxisTitle(m_d_dphi_deta,"#Delta#phi_{tower} [rad]","y");
+  // cell distance to nominal
+  m_d_detac_eta   = bookAny<TH2D>("CellDeltaEtaVsEta",         "(y_{cell #in tower}#minusy_{tower,0})(y_{tower})",             "y_{tower}",             
+				m_etaBins,m_etaMin,m_etaMax,detaBins,detaMin,detaMax);
+  setAxisTitle(m_d_detac_eta,"#Deltay_{cell #in tower}","y");
+  m_d_dphic_eta   = bookAny<TH2D>("CellDeltaPhiVsEta",         "(#phi_{cell #in tower}^{cell}#minus#phi_{tower,0})(y_{tower})","y_{tower}",             
+				m_etaBins,m_etaMin,m_etaMax,dphiBins,dphiMin,dphiMax);
+  setAxisTitle(m_d_dphic_eta,"#Delta#phi_{cell #in tower}","y");
+  m_d_dphic_detac = bookAny<TH2D>("CellDeltaPhiVsDeltaEta",    "#Delta#phi_{cell #in tower}^{cell}(#Deltay_{tower}^{cell})",   "#Deltay_{cell #in tower}",
+				detaBins,detaMin,detaMax,dphiBins,dphiMin,dphiMax);
+  setAxisTitle(m_d_dphic_detac,"#Delta#phi_{cell #in tower}","y");
+
+  ///////////////////////////
+  // features in samplings //
+  ///////////////////////////
+
+  int    fwbins(250);
+  double fwmin(-0.1);
+  double fwmax(4.9);
+
+  int    gwbins(60);
+  double gwmin(-0.1);
+  double gwmax(1.1);
+
+  int    ctbins(20);
+  double ctmin(-0.5);
+  double ctmax(19.5);
+
+  // per event
+  m_d_wgt_samp   = bookForSamplings<TH2D>("EvtFullWeightvsSampling",    "[Event] Full weight vs sampling",                  fwbins,fwmin,fwmax);
+  setAxisTitle(m_d_wgt_samp,"w_{geo#plusLCW}","y");
+  m_d_ntt_samp   = bookForSamplings<TH2D>("EvtNTowersPerCellvsSampling","[Event] Number of towers/cell vs sampling",        ctbins,ctmin,ctmax);
+  setAxisTitle(m_d_ntt_samp,"N_{towers}/cell","y");
+  m_d_geo_samp   = bookForSamplings<TH2D>("EvtGeoWeightvsSampling",     "[Event] Geometrical weight vs sampling",           gwbins,gwmin,gwmax);
+  setAxisTitle(m_d_geo_samp,"w_{geo}","y");
+  m_d_detac_samp = bookForSamplings<TH2D>("EvtDetaCellvsSampling",      "[Event] y_{cell #in tower}#minusy_{0}^{tower}",     detaBins,detaMin,detaMax);  
+  setAxisTitle(m_d_detac_samp,"#Deltay_{cell #in tower}","y");
+  m_d_dphic_samp = bookForSamplings<TH2D>("EvtDphiCellvsSampling",      "[Event] #phi_{cell #in tower}#minus#phi_{0}^{tower}",dphiBins,dphiMin,dphiMax);  
+  setAxisTitle(m_d_dphic_samp,"#Delta#phi_{cell #in tower}","y");
+
+  // from database
+  m_d_maxtowers_samp = bookForSamplings<TH2D>("DBNTowersPerCellvsSampling", "[DB] Number of towers/cell vs sampling",ctbins,ctmin,ctmax);
+  setAxisTitle(m_d_maxtowers_samp,"N_{towers}/cell (maximum sharing)","y");
+  m_d_wgttowers_samp = bookForSamplings<TH2D>("DBGeoWeightvsSampling",      "[DB] Geometrical weight vs sampling",   gwbins,gwmin,gwmax);
+  setAxisTitle(m_d_wgttowers_samp,"w_{geo} (from database)","y");
+
+  /////////////////////
+  // features in eta //
+  /////////////////////
+
+  int    tcbins(100);
+  double tcmin(-0.5);
+  double tcmax(99.5);
+
+  m_d_maxcells_eta = bookForEta<TH2D>("DBNTowerCellsvsEta","[DB] Cells in towers vs y_{tower}",   tcbins,tcmin,tcmax); setAxisTitle(m_d_maxcells_eta,"N_{cells #in tower} (from database)","y");
+  m_d_allwghts_eta = bookForEta<TH2D>("DBGeoWeightvsEta",  "[DB] Geometrical weight vs y_{tower}",gwbins,gwmin,gwmax); setAxisTitle(m_d_allwghts_eta,"w_{geo} (from database)","y");
+
+  // analyzing the database (in tower eta slices)
+  double deta((m_etaMax-m_etaMin)/(1.*m_etaBins)); 
+  double eta0(m_etaMin);
+
+  m_d_maxcells_phi_eta_slice.resize(m_etaBins,(TH2D*)0);
+  m_d_allwghts_phi_eta_slice.resize(m_etaBins,(TH2D*)0);
+
+  std::string hname; std::string htitle;
+  for ( int i(0); i<m_etaBins; ++i, eta0+=deta ) { 
+    hname  = CaloRec::Helpers::fmtMsg("DBTowerCellsvsPhiEta%02i",i);
+    htitle = CaloRec::Helpers::fmtMsg("[DB] Cells in towers vs #phi_{tower} for y #in [%6.3f,%6.3f]",eta0,eta0+deta); 
+    m_d_maxcells_phi_eta_slice[i] = bookForPhi<TH2D>(hname,htitle,tcbins,tcmin,tcmax); setAxisTitle(m_d_maxcells_phi_eta_slice.at(i),"N_{cells #in tower} (from database)","y");
+    hname  = CaloRec::Helpers::fmtMsg("DBGeoWeightvsPhiEta%02i",i);
+    htitle = CaloRec::Helpers::fmtMsg("[DB] Geometrical weight vs #phi_{tower} for y #in [%6.3f,%6.3f]",eta0,eta0+deta); 
+    m_d_allwghts_phi_eta_slice[i] = bookForPhi<TH2D>(hname,htitle,gwbins,gwmin,gwmax); setAxisTitle(m_d_allwghts_phi_eta_slice.at(i),"w_{geo} (from database)","y");
+  }
+
+  /////////////////////////
+  // debugging y=0,phi=0 //
+  /////////////////////////
+
+  if ( m_doHotspot ) { 
+    m_h_n_hs    = bookAny<TH1D>("HSTowerMultiplicity",    "[Hotspot] N_{tower}",       "N_{tower}",          m_nBins, m_nMin, m_nMax);
+    m_h_pt_hs   = bookAny<TH1D>("HSTowerPt",              "[Hotspot] p_{T}^{tower}",   "p_{T}^{tower} [GeV]",m_ptBins,m_ptMin,m_ptMax);
+    m_h_nc_hs   = bookAny<TH1D>("HSTowerCellMultiplicity","[Hotspot] N_{cell}^{tower}","N_{cell}^{tower}",   m_ncBins,m_ncMin,m_ncMax);
+    m_h_eta_hs  = bookForEta<TH1D>("HSTowerEta",          "[Hotspot] y_{tower}");    
+    m_h_phi_hs  = bookForPhi<TH1D>("HSTowerPhi",          "[Hotspot] #phi_{tower}"); 
+    
+    m_h_samp_hs = bookForSamplings<TH1D>("HSTowerCellSampling","HSTowerCellSampling");
+    
+    m_d_n_eta_phi_hs  = bookAny<TH2D>("HSTowerMultiplicityVsEtaVsPhi",    "[Hotspot] N_{tower}(y_{tower},#phi_{tower})"        "y_{tower}",m_etaBins,m_etaMin,m_etaMax,m_phiBins,m_phiMin,m_phiMax);
+    setAxisTitle(m_d_n_eta_phi_hs,"#phi_{tower} [rad]","y"); setAxisTitle(m_d_n_eta_phi_hs,"N_{tower}","z");
+    m_d_nc_eta_phi_hs = bookAny<TH2D>("HSTowerCellMultiplicityVsEtaVsPhi","[Hotspot] N_{cell}^{tower}(y_{tower},#phi_{tower})","y_{tower}",m_etaBins,m_etaMin,m_etaMax,m_phiBins,m_phiMin,m_phiMax);
+    setAxisTitle(m_d_nc_eta_phi_hs,"#phi_{tower} [rad]","y"); setAxisTitle(m_d_nc_eta_phi_hs,"N_{cell}^{tower}","z");
+    m_d_deta_eta_hs   = bookForEta<TH2D>("HSTowerDeltaEtaVsEta",          "[Hotspot] #Deltay(y_{tower})",detaBins,detaMin,detaMax); setAxisTitle(m_d_deta_eta_hs,"#Deltay_{tower}","y");
+    setAxisTitle(m_d_deta_eta_hs,"#Deltay_{tower}","y");
+    m_d_dphi_eta_hs   = bookForEta<TH2D>("HSTowerDeltaPhiVsEta",          "[Hotspot] #Delta#phi(y_{tower})",dphiBins,dphiMin,dphiMax);
+    setAxisTitle(m_d_dphi_eta_hs,"#Delta#phi_{tower} [rad]","y");
+    m_d_dphi_deta_hs  = bookAny<TH2D>("HSTowerDeltaPhiVsDeltaEta",        "[Hotspot] #Delta#phi_{tower}(#Deltay_{tower})","#Deltay_{tower}",detaBins,detaMin,detaMax,dphiBins,dphiMin,dphiMax);
+    setAxisTitle(m_d_dphi_deta_hs,"#Delta#phi_{tower} [rad]","y");
+    m_d_detac_eta_hs   = bookForEta<TH2D>("HSCellDeltaEtaVsEta",          "[Hotspot] #Deltay_{cell #in tower}(y_{tower})",detaBins,detaMin,detaMax);
+    setAxisTitle(m_d_detac_eta_hs,"#Deltay_{cell #in tower}","y");
+    m_d_dphic_eta_hs   = bookForEta<TH2D>("HSCellDeltaPhiVsEta",          "[Hotspot] #Delta#phi_{cell #in tower}(y_{tower})",dphiBins,dphiMin,dphiMax);
+    setAxisTitle(m_d_dphic_eta_hs,"#Delta#phi_{cell #in tower}","y");
+    m_d_dphic_detac_hs = bookAny<TH2D>("HSCellDeltaPhiVsCellDeltaEta",    "[Hotspot] #Delta#phi_{cell #in tower}(#Deltay_{cell #in tower})","#Deltay_{cell #in tower}",
+				      detaBins,detaMin,detaMax,dphiBins,dphiMin,dphiMax);
+    setAxisTitle(m_d_dphic_detac_hs,"#Delta#phi_{cell #in tower}","y");
+    m_d_detac_samp_hs = bookForSamplings<TH2D>("HSCellDeltaEtavsSampling", "[Hotspot] #Deltay_{cell #in tower} in samplings",   detaBins,detaMin,detaMax);
+    setAxisTitle(m_d_detac_samp_hs,"#Deltay_{cell #in tower}","y");
+    m_d_dphic_samp_hs = bookForSamplings<TH2D>("HSCelLDeltaPhivsSampling", "[Hotspot] #Delta#phi_{cell #in tower} in samplings",dphiBins,dphiMin,dphiMax);
+    setAxisTitle(m_d_dphic_samp_hs,"#Delta#phi_{cell #in tower}","y");
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode CaloTopoClusterFromTowerMonitor::execute()
+{
+  SG::ReadHandle<xAOD::CaloClusterContainer> towerHandle(m_towerContainerKey);
+  if ( !towerHandle.isValid() ) { 
+    ATH_MSG_ERROR( "cannot allocate cluster container with key <" << m_towerContainerKey << ">" );
+    return StatusCode::FAILURE;
+  }
+
+  // fill plots
+  size_t nhs(0);
+  m_cellTags.reset();
+  std::vector<double> deta; deta.reserve(1000);
+  std::vector<double> dphi; dphi.reserve(deta.capacity()); 
+  std::vector<CaloSampling::CaloSample> csam; csam.reserve(deta.capacity());
+  m_h_n->Fill(1.0*towerHandle->size());
+  for ( auto ftow(towerHandle->begin()); ftow!=towerHandle->end(); ++ftow ) { 
+    const xAOD::CaloCluster* ptow = *ftow;
+    // tower kinematics
+    double pt(ptow->pt()/Gaudi::Units::GeV);
+    double eta(ptow->eta());
+    double phi(CaloPhiRange::fix(ptow->phi()));
+    double nc(1.0*ptow->size());
+    // tower composition and get distances
+    this->fillComposition(*ptow,deta,dphi,csam);
+    double deltaEta(ptow->eta()-ptow->eta0());
+    double deltaPhi(CaloPhiRange::fix(ptow->phi()-ptow->phi0()));
+    // inclusive plots
+    m_h_pt->Fill(pt); m_h_eta->Fill(eta); m_h_phi->Fill(phi); m_h_nc->Fill(nc);
+    m_d_n_eta_phi->Fill(eta,phi); m_d_nc_eta_phi->Fill(eta,phi,nc);
+    m_d_pt_eta->Fill(eta,pt);
+    m_d_nc_eta->Fill(eta,nc);
+    m_d_deta_eta->Fill(eta,deltaEta);
+    m_d_dphi_eta->Fill(eta,deltaPhi);
+    m_d_dphi_deta->Fill(deltaEta,deltaPhi);
+    for ( size_t ic(0); ic<deta.size(); ++ic ) { 
+      m_d_detac_eta->Fill(eta,deta.at(ic));
+      m_d_dphic_eta->Fill(eta,dphi.at(ic));
+      m_d_dphic_detac->Fill(deta.at(ic),dphi.at(ic));
+      fillSampling<TH2D>(m_d_detac_samp,csam.at(ic),deta.at(ic));
+      fillSampling<TH2D>(m_d_dphic_samp,csam.at(ic),dphi.at(ic));
+      fillSampling<TH1D>(m_h_samp,csam.at(ic));
+    }
+    // hot spot
+    if ( this->isInHotspot(*ptow) ) {
+      ++nhs;
+      m_h_pt_hs->Fill(pt); 
+      m_h_eta_hs->Fill(eta); 
+      m_h_phi_hs->Fill(phi); 
+      m_h_nc_hs->Fill(nc);
+      m_d_n_eta_phi_hs->Fill(eta,phi);    
+      m_d_nc_eta_phi_hs->Fill(eta,phi,nc);
+      m_d_deta_eta_hs->Fill(eta,deltaEta);
+      m_d_dphi_eta_hs->Fill(eta,deltaPhi);
+      m_d_dphi_deta_hs->Fill(deltaEta,deltaPhi);
+      for ( size_t ic(0); ic<deta.size(); ++ic ) { 
+	m_d_detac_eta_hs->Fill(eta,deta.at(ic));
+	m_d_dphic_eta_hs->Fill(eta,dphi.at(ic));
+	m_d_dphic_detac_hs->Fill(deta.at(ic),dphi.at(ic));
+	fillSampling<TH2D>(m_d_detac_samp_hs,csam.at(ic),deta.at(ic));
+	fillSampling<TH2D>(m_d_dphic_samp_hs,csam.at(ic),dphi.at(ic));
+	fillSampling<TH1D>(m_h_samp_hs,csam.at(ic));
+      }
+    }
+    // fill in samplings
+    for ( auto fCell(ptow->getCellLinks()->begin()); fCell!=ptow->getCellLinks()->end(); ++fCell ) { 
+      CaloSampling::CaloSample csamp = (*fCell)->caloDDE()->getSampling();
+      fillSampling<TH2D>(m_d_wgt_samp,csamp,fCell.weight());
+      // check for cell which other tower it contributes to and plot geometrical weights (only 1/cell)
+      size_t chash(static_cast<size_t>((*fCell)->caloDDE()->calo_hash()));
+      if ( !m_cellTags.test(chash) ) { 
+	CaloTowerGeometrySvc::elementvector_t lOfTowers = m_towerGeometrySvc->getTowers(chash);
+	double ntowers(1.0*lOfTowers.size());
+	fillSampling<TH2D>(m_d_ntt_samp,csamp,ntowers);
+	for ( auto elm : lOfTowers ) { fillSampling<TH2D>(m_d_geo_samp,csamp,m_towerGeometrySvc->cellWeight(elm)); }
+	m_cellTags.set(chash);
+      }
+    }
+  }
+  // number of towers in hot spot
+  m_h_n_hs->Fill(1.0*nhs);
+
+  return StatusCode::SUCCESS;
+}
+
+bool CaloTopoClusterFromTowerMonitor::fillComposition(const xAOD::CaloCluster& ptow,std::vector<double>& deta,std::vector<double>& dphi,std::vector<CaloSampling::CaloSample>& csam) const
+{
+  deta.clear(); dphi.clear(); csam.clear();
+  for ( auto fCell(ptow.getCellLinks()->begin()); fCell != ptow.getCellLinks()->end(); ++fCell ) { 
+    deta.push_back((*fCell)->eta()-ptow.eta0()); 
+    dphi.push_back(CaloPhiRange::fix((*fCell)->phi()-ptow.phi0()));
+    csam.push_back((*fCell)->caloDDE()->getSampling());
+  }
+  return !deta.empty();
+}
diff --git a/Calorimeter/CaloRec/src/CaloTopoClusterFromTowerMonitor.h b/Calorimeter/CaloRec/src/CaloTopoClusterFromTowerMonitor.h
new file mode 100644
index 000000000000..44f18b3b16c9
--- /dev/null
+++ b/Calorimeter/CaloRec/src/CaloTopoClusterFromTowerMonitor.h
@@ -0,0 +1,342 @@
+// -*- c++ -*-
+#ifndef CALOREC_CALOTOPOCLUSTERFROMTOWERMONITOR_H
+#define CALOREC_CALOTOPOCLUSTERFROMTOWERMONITOR_H
+
+#include "StoreGate/ReadHandleKey.h"
+
+#include "GaudiKernel/ServiceHandle.h"
+
+#include "AthenaBaseComps/AthHistogramAlgorithm.h"
+
+#include "xAODCaloEvent/CaloClusterContainer.h"
+
+#include "CaloTowerGeometrySvc.h"
+#include "CaloTopoClusterFromTowerHelpers.h"
+
+#include "xAODCaloEvent/CaloCluster.h"
+#include "CaloEvent/CaloCell.h"
+
+#include <vector>
+#include <bitset>
+#include <map>
+#include <cmath>
+
+#include "TH1D.h"
+#include "TH2D.h"
+
+///@brief Algorithm to monitor kinematics and composition of towers (and clusters)
+///
+/// This algorithm fills a few histograms relevant for monitoring tower-related information, As both topo-clusters and towers
+/// use the same representation in data, both signal definitions can be monitored - even though most histograms are designed
+/// for distributions of tower-specific signal features.
+///
+/// The algorithm has several process control properties and configured values:
+///
+/// | Property          |  Default     | Controled feature or value
+/// :------------------ | :----------: |:-------------------------------------------------------------------------------------------
+/// | @c DoGeoAutoBins  |   @c true    | if @c true the binning of @f$ y @f$ and @f$ \phi @f$ is constructed from the tower geometry database;
+/// | ^                 | ^            | else it is user-defined by the corresponding value property
+/// | Hotspot analysis is on if @f$ y_{\rm min}^{\rm hotspot} < y_{\rm max}^{\rm hotspot} @f$ and @f$ \phi_{\rm min}^{\rm hotspot} < \phi_{\rm max}^[\rm hotspot} @f$ (on by defaults) ||
+/// | @c EtaMinHotspot  |   0.         | defines lower limit @f$ y_{\rm min}^{\rm hotspot} @f$ of rapidity for the hotspot analysis
+/// | @c EtaMaxHotspot  |   0.1        | defines upper limit @f$ y_{\rm max}^{\rm hotspot} @f$ of rapidity for the hotspot analysis
+/// | @c PhiMinHotspot  |   0.         | defines lower limit @f$ \phi_{\rm min}^{\rm hotspot} @f$ of azimuth for the hotspot analysis
+/// | @c PhiMaxHotspot  |   0.1        | defines upper limit @f$ \phi_{\rm max}^{\rm hotspot} @f$ of azimuth for the hotspot analysis  
+/// | Histogram binning: (pseudo)-rapidity (@f$ y_{\rm min} \geq y_{\rm max} @f$ returns error) ||
+/// | @c EtaTowersBins  |   100        | number of rapidity bins
+/// | @c EtaTowersMin   |  -5.         | lower limit of rapidity range @f$ y_{\rm min} @f$
+/// | @c EtaTowersMax   |   5.         | upper limit of rapidity range @f$ y_{\rm max} @f$
+/// | Histogram binning: azimuth (@f$ \phi_{\rm min \geq \phi_[\rm max} @f$ returns error) ||
+/// | @c PhiTowersBins  |  64          | number of azimuth bins
+/// | @c PhiTowersMin   | @f$ -\pi @f$ | lower limit of azimuth range @f$ \phi_{\rm min} @f$
+/// | @c PhiTowersMax   | @f$ +\pi @f$ | upper limit of azimuth range @f$ \phi_{\rm max} @f$
+/// | Histogram binning: transverse momentum (@f$ p_{\rm T,min} < p_{\rm T,max} @f$ returns error) ||
+/// | @c PtTowersBins   | 220          | number of transverse momentum bins
+/// | @c PtTowersMin    | -10 GeV      | lower limit of transverse momentum range @f$ p_{\rm T,min} @f$
+/// | @c PtTowersMax    | 100 GeV      | upper limit of transverse momentum range @f$ p_{\rm T,max} @f$
+class CaloTopoClusterFromTowerMonitor : public AthHistogramAlgorithm
+{
+public:
+
+  /// Default algorithm constructor
+  CaloTopoClusterFromTowerMonitor(const std::string& name,ISvcLocator* pSvcLocator);
+  /// Base-class destructor
+  virtual ~CaloTopoClusterFromTowerMonitor();
+
+  ///@brief Initialization
+  ///
+  /// This method configures the algorithm, allocates the tower geometry service and books the histograms by 
+  /// invoking the @c book() method. In addition, histograms are filled with geometry information retrieved
+  /// from the tower geometry service (static information not depending on event variables).   
+  virtual StatusCode initialize();
+  ///@brief Execution
+  ///
+  /// This method allocates the input data container and fills all histograms. If configured, it also provides
+  ///  
+  virtual StatusCode execute();    ///< Execution fills histograms.
+
+
+private:
+
+  ///@name Data access properties
+  ///@{
+  SG::ReadHandleKey<xAOD::CaloClusterContainer> m_towerContainerKey; ///< Allocator for input @c xAOD::CaloClusterContainer 
+  ServiceHandle<CaloTowerGeometrySvc>           m_towerGeometrySvc;  ///< Allocator for tower geometry services
+  ///@}
+
+  ///@name Histogram binning properties
+  ///@{
+  int m_ncBins;    ///< Number of cells in towers - number of bins
+  double m_ncMin;  ///< Number of cells in towers - lower limit of value range
+  double m_ncMax;  ///< Number of cells in towers - upper limit of value range
+  int m_nBins;     ///< Tower multiplicity - number of bins  
+  double m_nMin;   ///< Tower multiplicity - lower limit of value range  
+  double m_nMax;   ///< Tower multiplicity - upper limit of value range
+  int m_ptBins;    ///< Tower @f$ p_{\rm T} @f$ - number of bins 
+  double m_ptMin;  ///< Tower @f$ p_{\rm T} @f$ - lower limit of value range (in GeV)
+  double m_ptMax;  ///< Tower @f$ p_{\rm T} @f$ - upper limit of value range (in GeV)
+  int m_etaBins;   ///< Tower rapidity - number of bins
+  double m_etaMin; ///< Tower rapidity - lower limit of value range
+  double m_etaMax; ///< Tower rapidity - upper limit of value range
+  int m_phiBins;   ///< Tower azimuth - number of bins
+  double m_phiMin; ///< Tower azimuth - lower limit of value range
+  double m_phiMax; ///< Tower azimuth - upper limit of value range
+
+  double m_hsEtaMin; double m_hsEtaMax;
+  double m_hsPhiMin; double m_hsPhiMax;
+
+  bool m_doGeoAutoBins; 
+  bool m_doHotspot;
+  ///@}
+
+  TH1D*m_h_n;
+  TH1D*m_h_pt;
+  TH1D*m_h_eta;
+  TH1D*m_h_phi;
+  TH1D*m_h_nc;
+  TH1D*m_h_samp;
+
+  TH2D* m_d_n_eta_phi;
+  TH2D* m_d_nc_eta_phi;
+  TH2D* m_d_pt_eta;
+  TH2D* m_d_nc_eta;
+
+  TH2D* m_d_wgt_samp;
+  TH2D* m_d_ntt_samp;
+  TH2D* m_d_geo_samp;
+  TH2D* m_d_maxtowers_samp;
+  TH2D* m_d_wgttowers_samp; 
+
+  TH2D* m_d_maxcells_eta;
+  TH2D* m_d_allwghts_eta;
+
+  TH2D* m_d_deta_eta;
+  TH2D* m_d_dphi_eta;
+  TH2D* m_d_dphi_deta;
+
+  TH2D* m_d_detac_eta;
+  TH2D* m_d_dphic_eta;
+  TH2D* m_d_dphic_detac;
+
+  TH2D* m_d_detac_samp;
+  TH2D* m_d_dphic_samp;
+
+  // hot spot
+  TH1D*m_h_nc_hs;
+  TH1D*m_h_n_hs;
+  TH1D*m_h_pt_hs;
+  TH1D*m_h_eta_hs;
+  TH1D*m_h_phi_hs;
+  TH1D*m_h_samp_hs;
+
+  TH2D* m_d_n_eta_phi_hs;
+  TH2D* m_d_nc_eta_phi_hs;
+
+  TH2D* m_d_deta_eta_hs;
+  TH2D* m_d_dphi_eta_hs;
+  TH2D* m_d_dphi_deta_hs;
+
+  TH2D* m_d_detac_eta_hs;
+  TH2D* m_d_dphic_eta_hs;
+  TH2D* m_d_dphic_detac_hs;
+
+  TH2D* m_d_detac_samp_hs;
+  TH2D* m_d_dphic_samp_hs;
+
+  std::vector<TH2D*> m_d_maxcells_phi_eta_slice;
+  std::vector<TH2D*> m_d_allwghts_phi_eta_slice;
+
+protected:
+
+  bool isInHotspot(const xAOD::CaloCluster& ptow) const;
+  bool fillComposition(const xAOD::CaloCluster& ptow,std::vector<double>& deta,std::vector<double>& dphi,std::vector<CaloSampling::CaloSample>& csam) const;
+  bool setAxisTitle(TH1* h,const std::string& title,const std::string& axis="x"); 
+
+  virtual StatusCode book();
+  std::bitset<200000> m_cellTags;
+
+  ///////////////////////
+  // BookAny Templates //
+  ///////////////////////
+
+  template<class H>
+  H* bookAny(const std::string& hname,const std::string& htitle,const std::string& xtitle,int nxbins,double xmin,double xmax) {
+    H* hptr = (H*)bookGetPointer( H(hname.c_str(),htitle.c_str(),nxbins,xmin,xmax) );
+    if ( hptr == 0 ) { 
+      ATH_MSG_WARNING( CaloRec::Helpers::fmtMsg("Cannot book distribution \042%s\042 with title \042%s\042",hname.c_str(),htitle.c_str()) );
+    } else { 
+      hptr->Sumw2();
+      if ( !xtitle.empty() && xtitle != "" ) { hptr->GetXaxis()->SetTitle(xtitle.c_str()); }
+    }
+    return hptr;
+  }
+
+  template<class H>
+  H* bookAny(const std::string& hname,const std::string& htitle,const std::string& xtitle,int nxbins,double xmin,double xmax,int nybins,double ymin,double ymax) {
+    H* hptr = (H*)bookGetPointer( H(hname.c_str(),htitle.c_str(),nxbins,xmin,xmax,nybins,ymin,ymax) );
+    if ( hptr == 0 ) { 
+      ATH_MSG_WARNING( CaloRec::Helpers::fmtMsg("Cannot book distribution \042%s\042 with title \042%s\042",hname.c_str(),htitle.c_str()) );
+    } else { 
+      hptr->Sumw2();
+      if ( !xtitle.empty() && xtitle != "" ) { hptr->GetXaxis()->SetTitle(xtitle.c_str()); }
+    }
+    return hptr;
+  }
+
+  template<class H>
+  H* bookAny(const std::string& hname,const std::string& htitle,const std::string& xtitle,
+	     int nxbins,double xmin,double xmax,int nybins,double ymin,double ymax,int nzbins,double zmin,double zmax) {
+      H* hptr = (H*)bookGetPointer( H(hname.c_str(),htitle.c_str(),nxbins,xmin,xmax,nybins,ymin,ymax,nzbins,zmin,zmax) );
+    if ( hptr == 0 ) { 
+      ATH_MSG_WARNING( CaloRec::Helpers::fmtMsg("Cannot book distribution \042%s\042 with title \042%s\042",hname.c_str(),htitle.c_str()) );
+    } else { 
+      hptr->Sumw2();
+      if ( !xtitle.empty() && xtitle != "" ) { hptr->GetXaxis()->SetTitle(xtitle.c_str()); }
+    }
+    return hptr;
+  }
+
+  template<class H>
+      H* bookAny(const std::string& hname,const std::string& htitle,int nxbins,double xmin,double xmax) {
+    H* hptr = (H*)bookGetPointer( H(hname.c_str(),htitle.c_str(),nxbins,xmin,xmax) );
+    if ( hptr == 0 ) { 
+      ATH_MSG_WARNING( CaloRec::Helpers::fmtMsg("Cannot book distribution \042%s\042 with title \042%s\042",hname.c_str(),htitle.c_str()) );
+    } else { 
+      hptr->Sumw2();
+      hptr->GetXaxis()->SetTitle(hptr->GetTitle());
+    }
+    return hptr;
+  }
+
+  template<class H>
+    H* bookAny(const std::string& hname,const std::string& htitle,int nxbins,double xmin,double xmax,int nybins,double ymin,double ymax) { 
+      H* hptr = (H*)bookGetPointer( H(hname.c_str(),htitle.c_str(),nxbins,xmin,xmax,nybins,ymin,ymax) );
+    if ( hptr == 0 ) { 
+      ATH_MSG_WARNING( CaloRec::Helpers::fmtMsg("Cannot book distribution \042%s\042 with title \042%s\042",hname.c_str(),htitle.c_str()) );
+    } else { 
+      hptr->Sumw2();
+      hptr->GetXaxis()->SetTitle(hptr->GetTitle());
+    }
+    return hptr;
+  }
+
+  template<class H>
+  H* bookAny(const std::string& hname,const std::string& htitle,int nxbins,double xmin,double xmax,int nybins,double ymin,double ymax,int nzbins,double zmin,double zmax) {
+    H* hptr = (H*)bookGetPointer( H(hname.c_str(),htitle.c_str(),nxbins,xmin,xmax,nybins,ymin,ymax,nzbins,zmin,zmax) );
+    if ( hptr == 0 ) { 
+      ATH_MSG_WARNING( CaloRec::Helpers::fmtMsg("Cannot book distribution \042%s\042 with title \042%s\042",hname.c_str(),htitle.c_str()) );
+    } else { 
+      hptr->Sumw2();
+      hptr->GetXaxis()->SetTitle(hptr->GetTitle());
+    }
+    return hptr;
+  }
+
+  ////////////////////////
+  // Book for Samplings //
+  ////////////////////////
+
+  template<class H>
+    H* bookForSamplings(const std::string& hname,const std::string& htitle) {
+    int nsamp((int)CaloRec::Lookup::getSamplingId("MINIFCAL0")); double xmin(-0.5); double xmax(xmin+1.*(nsamp+1));
+    H* hptr = bookAny<H>(hname,htitle,"",nsamp+1,xmin,xmax);
+    if ( hptr != 0 ) { 
+      for ( int isamp(0); isamp < nsamp; ++isamp ) { 
+	hptr->GetXaxis()->SetBinLabel(isamp+1,CaloRec::Lookup::getSamplingName((CaloSampling::CaloSample)isamp).c_str()); 
+      }
+      hptr->GetXaxis()->SetBinLabel(hptr->GetNbinsX(),CaloRec::Lookup::getSamplingName(CaloSampling::Unknown).c_str());
+    }
+    return hptr;
+  }
+
+  template<class H>
+  H* bookForSamplings(const std::string& hname,const std::string& htitle,int nybins,double ymin,double ymax) {
+    int nsamp((int)CaloRec::Lookup::getSamplingId("MINIFCAL0")); double xmin(-0.5); double xmax(xmin+1.*(nsamp+1));
+    H* hptr = bookAny<H>(hname,htitle,"",nsamp+1,xmin,xmax,nybins,ymin,ymax);
+    if ( hptr != 0 ) { 
+      for ( int isamp(0); isamp < nsamp; ++isamp ) { 
+	hptr->GetXaxis()->SetBinLabel(isamp+1,CaloRec::Lookup::getSamplingName((CaloSampling::CaloSample)isamp).c_str()); 
+      }
+      hptr->GetXaxis()->SetBinLabel(hptr->GetNbinsX(),CaloRec::Lookup::getSamplingName(CaloSampling::Unknown).c_str());
+    }
+    return hptr;
+  }
+
+  ///////////////////////
+  // Book for Rapidity //
+  ///////////////////////
+
+  template<class H>
+  H* bookForEta(const std::string& hname,const std::string& htitle) { return bookAny<H>(hname,htitle,"y_{tower}",m_etaBins,m_etaMin,m_etaMax); }
+
+  template<class H>
+  H* bookForEta(const std::string& hname,const std::string& htitle,int nybins,double ymin,double ymax) { 
+    return bookAny<H>(hname,htitle,"y_{tower}",m_etaBins,m_etaMin,m_etaMax,nybins,ymin,ymax);
+  }
+
+  //////////////////////
+  // Book for Azimuth //
+  //////////////////////
+
+  template<class H>
+  H* bookForPhi(const std::string& hname,const std::string& htitle) { return bookAny<H>(hname,htitle,"#phi_{tower} [rad]",m_phiBins,m_phiMin,m_phiMax); }
+
+  template<class H>
+  H* bookForPhi(const std::string& hname,const std::string& htitle,int nybins,double ymin,double ymax) { 
+    return bookAny<H>(hname,htitle,"#phi_{tower} [rad]",m_phiBins,m_phiMin,m_phiMax,nybins,ymin,ymax);
+  }
+
+  ///////////////////
+  // Fill Sampling //
+  ///////////////////
+
+  template<class H>
+  void fillSampling(H* hptr,CaloSampling::CaloSample csamp) { 
+    int isamp(std::min(static_cast<int>(csamp),static_cast<int>(CaloRec::Lookup::getSamplingId("MINIFCAL0"))));
+    hptr->Fill(1.*isamp);
+  }
+
+  template<class H>
+  void fillSampling(H* hptr,CaloSampling::CaloSample csamp,double yval) { 
+    int isamp(std::min(static_cast<int>(csamp),static_cast<int>(CaloRec::Lookup::getSamplingId("MINIFCAL0"))));
+    hptr->Fill(1.*isamp,yval);
+  }
+
+  template<class H>
+  void fillSampling(H* hptr,CaloSampling::CaloSample csamp,double yval,double zval) { 
+    int isamp(std::min(static_cast<int>(csamp),static_cast<int>(CaloRec::Lookup::getSamplingId("MINIFCAL0"))));
+    hptr->Fill(1.*isamp,yval,zval);
+  }
+}; // CaloTopoClusterFromTowerMonitor
+
+inline bool CaloTopoClusterFromTowerMonitor::isInHotspot(const xAOD::CaloCluster& ptow) const
+{ return m_doHotspot && ( ptow.eta() >= m_hsEtaMin && ptow.eta() < m_hsEtaMax ) && ( ptow.phi() >= m_hsPhiMin && ptow.phi() < m_hsPhiMax ); }
+
+inline bool CaloTopoClusterFromTowerMonitor::setAxisTitle(TH1* hptr,const std::string& title,const std::string& axis) {
+  if ( axis == "x" ) { hptr->GetXaxis()->SetTitle(title.c_str()); return true; }
+  if ( axis == "y" ) { hptr->GetYaxis()->SetTitle(title.c_str()); return true; }
+  if ( axis == "z" ) { hptr->GetZaxis()->SetTitle(title.c_str()); return true; }
+  return false;
+}
+#endif
+
+
diff --git a/Calorimeter/CaloRec/src/CaloTopoClusterTowerMerger.cxx b/Calorimeter/CaloRec/src/CaloTopoClusterTowerMerger.cxx
new file mode 100644
index 000000000000..eeec478d0485
--- /dev/null
+++ b/Calorimeter/CaloRec/src/CaloTopoClusterTowerMerger.cxx
@@ -0,0 +1,181 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "StoreGate/ReadHandle.h"
+#include "StoreGate/WriteHandle.h"
+
+#include "xAODCaloEvent/CaloClusterAuxContainer.h"
+
+#include "CaloTopoClusterTowerMerger.h"
+#include "CaloTopoClusterFromTowerHelpers.h"
+
+#include "CaloUtils/CaloClusterStoreHelper.h"
+
+#define CL_RHMSG( NAME ) MsgStream& operator<<(MsgStream& mstr,const SG::ReadHandleKey< NAME >& ckey )  { mstr << ckey.key(); return mstr; }
+#define CL_WHMSG( NAME ) MsgStream& operator<<(MsgStream& mstr,const SG::WriteHandleKey< NAME >& ckey ) { mstr << ckey.key(); return mstr; }
+
+namespace {
+  CL_RHMSG( xAOD::CaloClusterContainer )
+}
+
+// std::vector<xAOD::CaloCluster::MomentType>                           CaloTopoClusterTowerMerger::m_momentList = std::vector< CL_MNAME( MomentType ) >();
+//  std::vector<std::tuple<xAOD::CaloCluster::MomentType,std::string> > CaloTopoClusterTowerMerger::m_momentMap {
+//   CL_ENTRY( FIRST_PHI ),
+//   CL_ENTRY( FIRST_ETA ),
+//   CL_ENTRY( SECOND_R ),
+//   CL_ENTRY( SECOND_LAMBDA ),
+//   CL_ENTRY( DELTA_PHI ),
+//   CL_ENTRY( DELTA_THETA ),
+//   CL_ENTRY( DELTA_ALPHA ),
+//   CL_ENTRY( CENTER_X ),
+//   CL_ENTRY( CENTER_Y ),
+//   CL_ENTRY( CENTER_Z ),
+//   CL_ENTRY( CENTER_MAG ),
+//   CL_ENTRY( CENTER_LAMBDA ),
+//   CL_ENTRY( LATERAL ),
+//   CL_ENTRY( LONGITUDINAL ),
+//   CL_ENTRY( ENG_FRAC_EM ),
+//   CL_ENTRY( ENG_FRAC_MAX ),
+//   CL_ENTRY( ENG_FRAC_CORE ),
+//   CL_ENTRY( FIRST_ENG_DENS ),
+//   CL_ENTRY( SECOND_ENG_DENS ),
+//   CL_ENTRY( ISOLATION ),
+//   CL_ENTRY( ENG_BAD_CELLS ),    
+//   CL_ENTRY( N_BAD_CELLS ),
+//   CL_ENTRY( N_BAD_CELLS_CORR ), 
+//   CL_ENTRY( BAD_CELLS_CORR_E ), 
+//   CL_ENTRY( BADLARQ_FRAC ),     
+//   CL_ENTRY( ENG_POS ),
+//   CL_ENTRY( SIGNIFICANCE ),
+//   CL_ENTRY( CELL_SIGNIFICANCE ),
+//   CL_ENTRY( CELL_SIG_SAMPLING ),
+//   CL_ENTRY( AVG_LAR_Q ),
+//   CL_ENTRY( AVG_TILE_Q ),       
+//   CL_ENTRY( ENG_BAD_HV_CELLS ), 
+//   CL_ENTRY( N_BAD_HV_CELLS ),
+//   CL_ENTRY( PTD ),
+//   CL_ENTRY( EM_PROBABILITY ),
+//   CL_ENTRY( HAD_WEIGHT ),
+//   CL_ENTRY( OOC_WEIGHT ),
+//   CL_ENTRY( DM_WEIGHT ),        
+//   CL_ENTRY( TILE_CONFIDENCE_LEVEL ),
+//   CL_ENTRY( VERTEX_FRACTION ),
+//   CL_ENTRY( NVERTEX_FRACTION ),
+//   CL_ENTRY( ETACALOFRAME ), 
+//   CL_ENTRY( PHICALOFRAME ),
+//   CL_ENTRY( ETA1CALOFRAME ),
+//   CL_ENTRY( PHI1CALOFRAME ),
+//   CL_ENTRY( ETA2CALOFRAME ),
+//   CL_ENTRY( PHI2CALOFRAME ),
+//   CL_ENTRY( ENG_CALIB_TOT ),
+//   CL_ENTRY( ENG_CALIB_OUT_L ),
+//   CL_ENTRY( ENG_CALIB_OUT_M ),
+//   CL_ENTRY( ENG_CALIB_OUT_T ),
+//   CL_ENTRY( ENG_CALIB_DEAD_L ),
+//   CL_ENTRY( ENG_CALIB_DEAD_M ),
+//   CL_ENTRY( ENG_CALIB_DEAD_T ),
+//   CL_ENTRY( ENG_CALIB_EMB0 ),       
+//   CL_ENTRY( ENG_CALIB_EME0 ),       
+//   CL_ENTRY( ENG_CALIB_TILEG3 ),    
+//   CL_ENTRY( ENG_CALIB_DEAD_TOT ),   
+//   CL_ENTRY( ENG_CALIB_DEAD_EMB0 ),  
+//   CL_ENTRY( ENG_CALIB_DEAD_TILE0 ),
+//   CL_ENTRY( ENG_CALIB_DEAD_TILEG3 ),
+//   CL_ENTRY( ENG_CALIB_DEAD_EME0 ),  
+//   CL_ENTRY( ENG_CALIB_DEAD_HEC0 ),  
+//   CL_ENTRY( ENG_CALIB_DEAD_FCAL ),  
+//   //  CL_ENTRY( ENG_CALIB_DEAD_LEAKAG ), // not in r21
+//   //  CL_ENTRY( ENG_CALIB_DEAD_UNCLAS ), // not in r21
+//   CL_ENTRY( ENG_CALIB_FRAC_EM ),    
+//   CL_ENTRY( ENG_CALIB_FRAC_HAD ),   
+//   CL_ENTRY( ENG_CALIB_FRAC_REST )  
+// }; 
+
+CaloTopoClusterTowerMerger::CaloTopoClusterTowerMerger(const std::string& name,ISvcLocator* pSvcLocator)
+  : AthReentrantAlgorithm(name,pSvcLocator)
+  , m_clusterContainerKey("CaloCalTopoCluster")
+  , m_towerContainerKey("CaloCalFwdTopoTower")
+  , m_topoSignalContainerKey("CaloCalTopoSignal")
+  , m_cellLinkContainerKey("")
+  , m_clusterRange(3.2)
+{
+  declareProperty("TopoClusterContainerKey",m_clusterContainerKey,   "Topo-cluster container key"                                    );
+  declareProperty("TopoTowerContainerKey",  m_towerContainerKey,     "Topo-tower container key"                                      );
+  declareProperty("TopoSignalContainerKey", m_topoSignalContainerKey,"Topo-signal container key"                                     ); 
+  declareProperty("TopoSignalCellLinksKey", m_cellLinkContainerKey,  "Topo-signal cell links key"                                    ); 
+  declareProperty("TopoClusterRange",       m_clusterRange,          "Rapidity range for using topo-clusters in combined signal mode");
+}
+
+CaloTopoClusterTowerMerger::~CaloTopoClusterTowerMerger()
+{ }
+
+StatusCode CaloTopoClusterTowerMerger::initialize()
+{
+  if ( m_clusterRange <= 0. ) {
+    ATH_MSG_ERROR( CaloRec::Helpers::fmtMsg("Invalid topo-cluster range |y| < %6.3f - algorithm non-functional",m_clusterRange) );
+    return StatusCode::FAILURE;
+  }
+
+  if ( m_cellLinkContainerKey.key().empty() ) { m_cellLinkContainerKey = m_topoSignalContainerKey.key() + std::string("_links"); }
+  ATH_CHECK( m_clusterContainerKey.initialize()    );   // topo-cluster input key
+  ATH_CHECK( m_towerContainerKey.initialize()      );   // topo-tower input key
+  ATH_CHECK( m_topoSignalContainerKey.initialize() );   // topo-signal (topo-cluster+topo-tower) output key
+  ATH_CHECK( m_cellLinkContainerKey.initialize()   );   // cell link container key (ESD only)
+ 
+  ATH_MSG_INFO( CaloRec::Helpers::fmtMsg("Topo_cluster with |y| < %.2f will be merged with topo-towers with |y| > %.2f",m_clusterRange,m_clusterRange) );
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode CaloTopoClusterTowerMerger::execute(const EventContext& ctx) const
+{
+
+  // collect input
+  rhandle_t clusterHandle(m_clusterContainerKey,ctx);
+  if ( !clusterHandle.isValid() ) { 
+    ATH_MSG_WARNING( "Topo-cluster container with key <" << m_clusterContainerKey << "> not found" );
+    return StatusCode::SUCCESS;
+  }
+  rhandle_t towerHandle(m_towerContainerKey,ctx);
+  if ( !towerHandle.isValid() ) {
+    ATH_MSG_WARNING( "Topo-tower container with key <" << m_towerContainerKey << "> not found" ); 
+    return StatusCode::SUCCESS;
+  }
+
+  // prepare output
+  whandle_t signalHandle(m_topoSignalContainerKey,ctx);
+  ATH_CHECK(this->addContainerWriteHandle(signalHandle));
+
+  // fill output from topo-clusters
+  for ( auto pClus : *clusterHandle ) { if ( clusterFilter(*pClus) ) { this->makeDeepCopy(*pClus,signalHandle.ptr()); } }
+  // fill output from topo-towers
+  for ( auto pTowr : *towerHandle )   { if ( towerFilter(*pTowr) )   { this->makeDeepCopy(*pTowr,signalHandle.ptr()); } }
+
+  // finalize the clusters/towers
+  lhandle_t linkHandle(m_cellLinkContainerKey,ctx);
+  ATH_CHECK(CaloClusterStoreHelper::finalizeClusters (linkHandle,signalHandle.ptr()));
+
+  return StatusCode::SUCCESS;
+}
+
+bool CaloTopoClusterTowerMerger::makeDeepCopy(const xAOD::CaloCluster& rClus,xAOD::CaloClusterContainer* pClusCont) const
+{ pClusCont->push_back(new xAOD::CaloCluster(rClus)); return true; }
+
+StatusCode CaloTopoClusterTowerMerger::addContainerWriteHandle(whandle_t& signalHandle) const
+{ return CaloClusterStoreHelper::AddContainerWriteHandle(&(*evtStore()),signalHandle,msg()); }
+//   // get a new signal handle
+//   signalHandle = std::unique_ptr<xAOD::CaloClusterContainer>(new xAOD::CaloClusterContainer());
+//   if ( !signalHandle.isValid() ) { return StatusCode::FAILURE; }
+//   // get AUX container
+//   xAOD::CaloClusterAuxContainer* auxData = new xAOD::CaloClusterAuxContainer();
+//   std::string auxName(m_topoSignalContainerKey.key()+"Aux.");
+//   if ( evtStore()->overwrite(auxData,auxName).isFailure() ) {
+//     ATH_MSG_ERROR("Failed to record xAOD::CaloClusterAuxContainer with key <" << auxName << ">");
+//     delete auxData;
+//     return StatusCode::FAILURE;
+//   } 
+//   // connect store with object container
+//   signalHandle.ptr()->setStore(auxData);
+//   return StatusCode::SUCCESS;
+// }
diff --git a/Calorimeter/CaloRec/src/CaloTopoClusterTowerMerger.h b/Calorimeter/CaloRec/src/CaloTopoClusterTowerMerger.h
new file mode 100644
index 000000000000..d22ebc35ae11
--- /dev/null
+++ b/Calorimeter/CaloRec/src/CaloTopoClusterTowerMerger.h
@@ -0,0 +1,84 @@
+// -*- c++ -*-
+
+/*
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+#ifndef CALOREC_CALOTOPOCLUSTERTOWERMERGER_H
+#define CALOREC_CALOTOPOCLUSTERTOWERMERGER_H
+
+#include "StoreGate/ReadHandleKey.h"
+#include "StoreGate/WriteHandleKey.h"
+
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
+
+#include "xAODCaloEvent/CaloCluster.h"
+#include "xAODCaloEvent/CaloClusterContainer.h"
+
+#include "CaloEvent/CaloClusterCellLinkContainer.h"
+
+#include <vector>
+//#include <tuple>
+#include <string>
+#include <cmath>
+
+class CaloTopoClusterTowerMerger : public AthReentrantAlgorithm
+{
+public:
+  ///@brief Algorithm constructor
+  CaloTopoClusterTowerMerger(const std::string& name,ISvcLocator* pSvcLocator);
+  ///@brief Baseclass destructor 
+  virtual ~CaloTopoClusterTowerMerger();
+
+  ///@name Algorithm interface
+  ///@{
+  virtual StatusCode initialize();                                     ///< Initialization sets up read and write handle keys
+  virtual StatusCode execute(const EventContext& ctx) const override;  ///< Execution merges the container contents 
+  ///@}
+
+private:
+
+  ///@name Internally used types
+  ///@{
+  typedef SG::ReadHandleKey<xAOD::CaloClusterContainer>    rhandlekey_t;   ///< Input data handle key type
+  typedef SG::WriteHandleKey<xAOD::CaloClusterContainer>   whandlekey_t;   ///< Output data handle key type
+  typedef SG::WriteHandleKey<CaloClusterCellLinkContainer> lhandlekey_t;   ///< Cell link container output data handle key
+  typedef SG::ReadHandle<xAOD::CaloClusterContainer>       rhandle_t;      ///< Input data handle type
+  typedef SG::WriteHandle<xAOD::CaloClusterContainer>      whandle_t;      ///< Output data handle type
+  typedef SG::WriteHandle<CaloClusterCellLinkContainer>    lhandle_t;      ///< Cell link container output data handle
+  ///@}
+
+  ///@name Algorithm properties
+  ///@{
+  rhandlekey_t  m_clusterContainerKey;    ///< Input topo-cluster container
+  rhandlekey_t  m_towerContainerKey;      ///< Input topo-tower container
+  whandlekey_t  m_topoSignalContainerKey; ///< Output merged container
+  lhandlekey_t  m_cellLinkContainerKey;   ///< Output cell links for merged container
+  double        m_clusterRange;           ///< Rapidity range for topo-clusters 
+  ///@}
+
+  ///@name Helpers
+  ///@{
+  bool       makeDeepCopy(const xAOD::CaloCluster& rClus,xAOD::CaloClusterContainer* pClusCont) const; ///< Attaches a deep copy to container, returns @c true if successful. 
+  //  bool       fillMoments(const xAOD::CaloCluster& rClus);                                          ///< Copies list of filled moments into lookup 
+  bool       clusterFilter(const xAOD::CaloCluster& rClus) const;                                      ///< Filter topo-cluster
+  bool       towerFilter(const xAOD::CaloCluster& rTowr) const;                                        ///< Filter topo-tower
+  StatusCode addContainerWriteHandle(whandle_t& signalHandle) const;                                   ///< Add a write handle for a container (in CaloClusterStoreHelper from r21.9)
+  ///@}
+};
+
+
+inline bool CaloTopoClusterTowerMerger::clusterFilter(const xAOD::CaloCluster& rClus)   const { return std::abs(rClus.eta()) <= m_clusterRange; }
+inline bool CaloTopoClusterTowerMerger::towerFilter(const xAOD::CaloCluster& /*rTowr*/) const { return true; }
+
+///@class CaloTopoClusterTowerMerger
+///
+/// This algorithm merges objects from two @c xAOD::CaloClusterContainer. In the context of the
+/// mixed topo-tower/topo-cluster output, the objects in the topo-cluster container are taken
+/// up to a client-defined (symmetric) rapidity range. The rest of the phase space is then filled 
+/// with the objects from the topo-tower container. It is assumed that the overlap resolution
+/// is performed when the topo-tower container is filled. The mixed object container contains deep copies 
+/// of the objects in the input containers.
+/// 
+#endif
diff --git a/Calorimeter/CaloRec/src/CaloTopoTowerFromClusterCalibrator.cxx b/Calorimeter/CaloRec/src/CaloTopoTowerFromClusterCalibrator.cxx
new file mode 100644
index 000000000000..67763152daae
--- /dev/null
+++ b/Calorimeter/CaloRec/src/CaloTopoTowerFromClusterCalibrator.cxx
@@ -0,0 +1,91 @@
+/* Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */
+
+#include "CaloTopoTowerFromClusterCalibrator.h"
+#include "CaloTopoClusterFromTowerHelpers.h"
+
+#include "CaloEvent/CaloCellClusterWeights.h"
+
+#include "CaloGeoHelpers/CaloSampling.h"
+
+#include <numeric>
+
+namespace {                                                                             /////////////////////////////////////////////////////////////
+  double accumulateWeight(const CaloCellClusterWeights::weight_t& wght)                 // A cell can be split across clusters (usually only two). //
+  { return wght.empty()                                                                 // It thus receives two different calibration weights,     //
+      ? 0.                                                                              // including geometrical weight introduced by splitting.   //
+      : wght.size() == 1                                                                // The overall weight is the sum of the two.               //
+      ? wght.front()                                                                    /////////////////////////////////////////////////////////////
+      : std::accumulate(wght.begin(),wght.end(),0.);
+  }
+}
+
+CaloTopoTowerFromClusterCalibrator::CaloTopoTowerFromClusterCalibrator(const std::string& type,const std::string& name,const IInterface* pParent)
+  : AthAlgTool(type,name,pParent)
+{ 
+  declareInterface<CaloTowerCollectionProcessor>(this);
+  declareProperty("OrderClusterByPt",    m_orderByPt,           "Order clusters by calibrated Pt (input)");
+}
+
+StatusCode CaloTopoTowerFromClusterCalibrator::execute(const EventContext& /*ctx*/,
+						       xAOD::CaloClusterContainer* pClusCont, 
+						       CaloCellClusterWeights* cellWeights) const
+{
+
+  // protection needed?
+  if ( cellWeights == nullptr ) { 
+    ATH_MSG_ERROR("Tower calibrator needs valid pointer to LCW weight lookup");
+    return StatusCode::FAILURE;
+  }
+
+  /////////////////////////
+  // Calibrated clusters //
+  /////////////////////////
+
+  // loop towers                                                                   
+  for ( auto pClus : *pClusCont ) {                                                
+    // loop cells in towers                                                        
+    for ( auto fCell(pClus->cell_begin()); fCell != pClus->cell_end(); ++fCell ) {
+      // pick up the LCW weights (one if cell is only in one topo-cluster, two if cell is split  between two) -> w_cell 
+      const CaloCellClusterWeights::weight_t& wght(cellWeights->at(*fCell));
+      // pick up geometrical weight of cells in tower       
+      double weight(fCell.weight());
+      // combine the weights -> w_geo * w_cell                                               
+      weight *= accumulateWeight(wght);       
+      if ( weight == 0. ) { 
+	// weight = 0 should actualy never happen!!!!                                     
+	ATH_MSG_DEBUG( CaloRec::Helpers::fmtMsg("[NO_LCW_REWEIGHT] Tower (%6.3f,%6.3f) cell [%6zu] weight = %6.3f [# LCW weights %zu geo %6.3f LCW %6.3f] SamplingID %2u Name \042%s\042",
+						pClus->eta(),pClus->phi(),(size_t)fCell->caloDDE()->calo_hash(),weight,wght.size(),fCell.weight(),weight/std::max(fCell.weight(),1e-08),
+						(unsigned int)fCell->caloDDE()->getSampling(),CaloSampling::getSamplingName(fCell->caloDDE()->getSampling()).c_str()) );
+      } else {
+	// valid weight, apply to cell in tower
+	ATH_MSG_DEBUG(   CaloRec::Helpers::fmtMsg("[DO_LCW_REWEIGHT] Tower (%6.3f,%6.3f) cell [%6zu] weight = %6.3f [# LCW weights %zu geo %6.3f LCW %6.3f]",
+						  pClus->eta(),pClus->phi(),(size_t)fCell->caloDDE()->calo_hash(),weight,wght.size(),fCell.weight(),weight/fCell.weight()) );
+	pClus->reweightCell(fCell,weight);                                         // Set new weight.                                        //
+      }
+    }                                                                              ////////////////////////////////////////////////////////////
+    // preserve raw (EM) kinematics
+    double rawE(pClus->e());                       ////////////////////////////////////////////////////////////////////////////////////////////
+    double rawEta(pClus->eta());                   // Clusters are instantiated with signal state CALIBRATED. The kinematics prior to the    //
+    double rawPhi(pClus->phi());                   // application of LCW is EM. This code saves the EM scale kinematics.                     //
+    double rawM(pClus->m());                       ////////////////////////////////////////////////////////////////////////////////////////////
+    // update cluster kinematics
+    CaloRec::Helpers::calculateKine(pClus,true);   ////////////////////////////////////////////////////////////////////////////////////////////
+    pClus->setRawE(rawE);                          // The calculateKine function recombines cell signals with the updated weights (combined  //
+    pClus->setRawEta(rawEta);                      // LCW and tower geometry weights). After this function, the CALIBRATED state reflects    //
+    pClus->setRawPhi(rawPhi);                      // these combined weights. The EM scale kinematics is restored as raw (UNCALIBRATED).     //
+    pClus->setRawM(rawM);                          ////////////////////////////////////////////////////////////////////////////////////////////
+  } // cluster loop
+
+  // order clusters by Pt if requested
+  if ( m_orderByPt ) { 
+    std::sort(pClusCont->begin(),pClusCont->end(),[](xAOD::CaloCluster* pc1,xAOD::CaloCluster* pc2) {
+        volatile double pt1(pc1->pt());
+        volatile double pt2(pc2->pt());
+   	return ( pt1 > pt2 );  
+      }
+      );
+  }
+
+  return StatusCode::SUCCESS;
+}
+
diff --git a/Calorimeter/CaloRec/src/CaloTopoTowerFromClusterCalibrator.h b/Calorimeter/CaloRec/src/CaloTopoTowerFromClusterCalibrator.h
new file mode 100644
index 000000000000..4c8372318225
--- /dev/null
+++ b/Calorimeter/CaloRec/src/CaloTopoTowerFromClusterCalibrator.h
@@ -0,0 +1,48 @@
+// -*- c++ -*- 
+/* Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */
+#ifndef CALOREC_CALOTOPOTOWERFROMCLUSTERCALIBRATOR_H
+#define CALOREC_CALOTOPOTOWERFROMCLUSTERCALIBRATOR_H
+
+#include "StoreGate/ReadHandleKey.h"
+
+#include "AthenaBaseComps/AthAlgTool.h" 
+
+#include "CaloRec/CaloTowerCollectionProcessor.h"
+
+#include <string>
+
+class CaloCellClusterWeights;
+
+class CaloTopoTowerFromClusterCalibrator : public AthAlgTool, virtual public CaloTowerCollectionProcessor
+{
+public:
+
+  /// @brief Tool constructor
+  CaloTopoTowerFromClusterCalibrator(const std::string& type,const std::string& name,const IInterface* pParent);
+ 
+  /// @brief Tool execution
+  
+  virtual StatusCode execute(const EventContext& ctx,
+                             xAOD::CaloClusterContainer* pClusCont,
+			     CaloCellClusterWeights* cellWeights) const override;
+  //  virtual StatusCode initialize() override;
+private:
+
+  /// @name Tool properties
+  /// @{
+  bool m_orderByPt = { false };            ///< Turn on pT ordering if @c true
+  /// @}
+};
+/// @class CaloTopoTowerFromClusterCalibrator
+///
+/// @brief A cluster builder tool to calibrate topo-clusters formed from (EM) calorimeter towers to the LCW scale. 
+///
+/// This module applies LCW weights to cells contributing to towers represented by @c xAOD::CaloCluster objects. 
+/// The overall energy contribution of a given cell contributing to a given tower is then @f$ w_{\rm geo} \times w_{\rm LCW} \times E_{\rm cell} @f$,
+/// where @f$ w_{\rm geo} @f$ is the geometrical weight, @f$ w_{\rm LCW} @f$ is
+/// the calibration weight the cell received from the LCW calibration in the context of the @c xAOD::CaloCluster objects it contributes to (at most two),
+/// and @f$ E_{\rm cell} @f$ is the cell energy on EM scale. More details on the weights are given on 
+/// <a href="https://twiki.cern.ch/twiki/bin/view/AtlasSandboxProtected/CaloTowerPerformance" title="https://twiki.cern.ch/twiki/bin/view/AtlasSandboxProtected/CaloTowerPerformance">this page</a>.
+///  
+/// @author Peter Loch <loch@physics.arizona.edu>      
+#endif
diff --git a/Calorimeter/CaloRec/src/CaloTopoTowerFromClusterMaker.cxx b/Calorimeter/CaloRec/src/CaloTopoTowerFromClusterMaker.cxx
new file mode 100644
index 000000000000..b3861bb3f862
--- /dev/null
+++ b/Calorimeter/CaloRec/src/CaloTopoTowerFromClusterMaker.cxx
@@ -0,0 +1,608 @@
+/* Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */
+#include "GaudiKernel/MsgStream.h"
+#include "GaudiKernel/SystemOfUnits.h"
+
+#include "AthenaKernel/Units.h"
+
+#include "CaloTopoTowerFromClusterMaker.h"
+#include "CaloTopoClusterFromTowerHelpers.h"
+
+#include "xAODCaloEvent/CaloClusterKineHelper.h"
+
+#include "CaloEvent/CaloClusterCellLink.h"
+#include "CaloEvent/CaloCellClusterWeights.h"
+
+#include "CaloGeoHelpers/CaloSampling.h"
+#include "CaloGeoHelpers/CaloPhiRange.h"
+#include "CaloGeoHelpers/proxim.h"
+
+#include "CaloProtoCluster.h"
+#include "CaloTowerGeometrySvc.h"
+
+#include "CaloDetDescr/CaloDetDescrElement.h"
+#include "CaloDetDescr/CaloDetDescrManager.h"
+
+#include <algorithm>
+
+#include <cstdio>
+#include <cstdarg>
+#include <string>
+#include <cmath>
+#include <memory>
+#include <vector>
+#include <atomic>
+#include <tuple>
+
+namespace {
+  MsgStream& operator<<(MsgStream& mstr,const SG::ReadHandleKey<CaloCellContainer>&          ckey) { mstr << ckey.key(); return mstr; }
+  MsgStream& operator<<(MsgStream& mstr,const SG::ReadHandleKey<xAOD::CaloClusterContainer>& ckey) { mstr << ckey.key(); return mstr; }
+}
+
+std::atomic<bool> CaloTopoTowerFromClusterMaker_checkCellIndices(false);
+
+///////////////////////////////////
+// CaloTopoTowerFromClusterMaker //
+///////////////////////////////////
+
+double                                CaloTopoTowerFromClusterMaker::m_energyThresholdDef = -100000000.; // in MeV
+double                                CaloTopoTowerFromClusterMaker::m_clusterRangeDef    = 5.;
+std::string                           CaloTopoTowerFromClusterMaker::m_defaultKey         = "NONE";
+CaloTopoTowerFromClusterMaker::uint_t CaloTopoTowerFromClusterMaker::m_errorValueUINT     = uint_t(-1); 
+
+CaloTopoTowerFromClusterMaker::CaloTopoTowerFromClusterMaker(const std::string& type,
+							     const std::string& name,
+							     const IInterface* pParent)
+  : AthAlgTool(type,name,pParent)
+  , m_towerGeometrySvc("CaloTowerGeometrySvc",name)
+  , m_clusterContainerKey("CaloTopoCluster")
+  , m_cellContainerKey("AllCalo")
+  , m_energyThreshold(m_energyThresholdDef-1.)
+  , m_clusterRange(m_clusterRangeDef)
+  , m_numberOfCells(0)
+  , m_maxCellHash(0)
+  , m_numberOfSamplings(static_cast<uint_t>(CaloSampling::Unknown))
+  , m_numberOfTowers(0)
+{
+  declareInterface<CaloTowerCollectionProcessor>(this);
+  declareProperty("CaloTowerGeometrySvc",        m_towerGeometrySvc=ServiceHandle<CaloTowerGeometrySvc>("CaloTowerGeometrySvc",name), "Service providing tower geometry");
+  declareProperty("CaloCellContainerKey",        m_cellContainerKey,                                                                  "SG Key for CaloCellContainer (input)");
+  declareProperty("BuildTopoTowers",             m_useCellsFromClusters,                                                              "Turn on/off topo-tower formation");
+  declareProperty("CaloTopoClusterContainerKey", m_clusterContainerKey,                                                               "SG Key for CaloClusterContainer (input)");
+  declareProperty("OrderClusterByPt",            m_orderByPt,                                                                         "Turn on/off pT-ordering of CaloClusterContainer (output)");
+  declareProperty("ApplyCellEnergyThreshold",    m_applyCellEnergyThreshold,                                                          "Turn on/off cell energy thresholds");
+  declareProperty("CellEnergyThreshold",         m_energyThreshold,                                                                   "Energy threshold for cells filled in clusters");
+  declareProperty("PrepareLCW",                  m_prepareLCW,                                                                        "Prepare data structure to apply LCW");
+  declareProperty("ExcludedSamplings",           m_excludedSamplingsName,                                                             "Excluded samplings by name");
+  declareProperty("DoCellIndexCheck",            m_doCellIndexCheck,                                                                  "Check cell hash indices for consistency");
+  declareProperty("BuildCombinedTopoSignal",     m_buildCombinedSignal,                                                               "Build topo-clusters and topo-towers");
+  declareProperty("TopoClusterRange",            m_clusterRange,                                                                      "Rapidity range for using topo-clusters in combined signal mode");
+}
+
+StatusCode CaloTopoTowerFromClusterMaker::initialize()
+{
+  //--------------------//
+  // Set up handle keys //
+  //--------------------//
+
+  ATH_CHECK(m_cellContainerKey.initialize());
+  
+  //---------------------//
+  // Check configuration //
+  //---------------------//
+
+  // tower geometry service
+  ATH_MSG_INFO("Allocate tower geometry service:");
+  if ( !m_towerGeometrySvc.isValid() ) { 
+    ATH_MSG_ERROR("[reject] cannot allocate tower geometry service - fatal");
+    return StatusCode::FAILURE; 
+  } else {
+    ATH_MSG_INFO( CaloRec::Helpers::fmtMsg("Tower geometry service is allocated, describes %6zu towers in grid:", m_towerGeometrySvc->towerBins()) );
+    ATH_MSG_INFO( CaloRec::Helpers::fmtMsg("[accept] %3zu eta bins in [%5.2f,%5.2f]",m_towerGeometrySvc->etaBins(),m_towerGeometrySvc->etaMin(),m_towerGeometrySvc->etaMax()) );
+    ATH_MSG_INFO( CaloRec::Helpers::fmtMsg("[accept] %3zu phi bins in [%5.2f,%5.2f]",m_towerGeometrySvc->phiBins(),m_towerGeometrySvc->phiMin(),m_towerGeometrySvc->phiMax()) );
+  }
+
+  // tower builder configurations
+  if ( m_useCellsFromClusters ) {
+    // topo-tower
+    ATH_MSG_INFO("Configure for building topo-towers (filtered mode):");
+    // energy threshold not (yet) implemented for topo-towers
+    if ( m_applyCellEnergyThreshold ) {
+      ATH_MSG_WARNING("[ignore] cannot apply energy thresholds to topo-towers!");
+      m_applyCellEnergyThreshold = false;
+    }
+    ATH_CHECK(m_clusterContainerKey.initialize());
+    // // check on request for LCW
+    // if ( m_prepareLCW ) { 
+    //   ATH_CHECK(m_cellClusterWeightKey.initialize());
+    //   ATH_MSG_INFO("[accept] prepare for LCW calibration - initialize CaloCellClusterWeights key object <" << m_cellClusterWeightKey << ">");
+    // } else {
+    //   ATH_MSG_INFO("[accept] use EM scale");
+    // }
+  } else { 
+    // inclusive/exclusive towers
+    ATH_MSG_INFO("Configure for building cell towers:");
+    if ( m_applyCellEnergyThreshold ) { 
+      ATH_MSG_INFO("[accept] configure exclusive towers: use cell energy threshold");
+      if ( m_energyThreshold < m_energyThresholdDef ) { 
+	ATH_MSG_ERROR("######## [reject] invalid cell energy threshold " << m_energyThreshold/Athena::Units::GeV 
+		      << " GeV is smaller than default (no-op) " << m_energyThresholdDef/Athena::Units::GeV << " GeV - fatal");
+	return StatusCode::FAILURE;
+      }
+      ATH_MSG_INFO("######## [accept] energy threshold for cells to contribute to towers is " << m_energyThreshold/Athena::Units::GeV << " GeV");
+    } else {
+      ATH_MSG_INFO("[accept] configure inclusive towers");
+    } // end inclusive/exclusive tower configuration
+  } // end tower builder configuration
+
+  // local data (constant parameters)
+  m_numberOfCells  = m_towerGeometrySvc->totalNumberCells();
+  m_maxCellHash    = m_towerGeometrySvc->maxCellHash();
+  m_numberOfTowers = m_towerGeometrySvc->towerBins();
+  ATH_MSG_INFO("Additional tool parameters:");
+  if ( m_numberOfCells > 0 ) { 
+    ATH_MSG_INFO("[accept] maximum cell hash index is " << m_maxCellHash);
+    ATH_MSG_INFO("[accept] maximum number of cells is " << m_numberOfCells);
+  } else { 
+    ATH_MSG_ERROR("[reject] invalid maximum cell hash index/total number of cells " << m_maxCellHash << "/" << m_numberOfCells << " - fatal");
+    return StatusCode::FAILURE;
+  }
+  if ( m_numberOfTowers > 0 ) { 
+    ATH_MSG_INFO("[accept] maximum number of towers is " << m_numberOfTowers);
+  } else {
+    ATH_MSG_ERROR("[reject] invalid maximum number of towers " << m_numberOfTowers << " - fatal");
+    return StatusCode::FAILURE;
+  }
+
+  if ( m_excludedSamplingsName.empty() ) { 
+    m_excludedSamplings.clear();
+    m_excludedSamplingsPattern.reset();
+    ATH_MSG_INFO("Cells from all samplings used for topo-cluster included"); 
+  } else {
+    size_t nex(std::min(m_excludedSamplingsName.size(), m_excludedSamplingsPattern.size()));
+    if ( m_excludedSamplingsName.size() > m_excludedSamplingsPattern.size() ) { 
+      ATH_MSG_WARNING( CaloRec::Helpers::fmtMsg("Configuration problem: number of excluded sampling names %zu exceeds expected maximum %zu - ignore last %zu name(s)",
+						m_excludedSamplingsName.size(), m_excludedSamplingsPattern.size(),m_excludedSamplingsName.size()-m_excludedSamplingsPattern.size()) );
+    }
+    m_excludedSamplings.resize(nex);
+    m_excludedSamplingsPattern.reset();
+    for ( size_t i(0); i<nex; ++i ) {
+      m_excludedSamplings[i] = CaloRec::Lookup::getSamplingId(m_excludedSamplingsName.at(i));
+      m_excludedSamplingsPattern.set(i);
+      ATH_MSG_INFO( CaloRec::Helpers::fmtMsg("CaloSampling \042%10.10s\042 has id %2zu (name in lookup table \042%10.10s\042)",
+					      m_excludedSamplingsName.at(i).c_str(),(size_t)m_excludedSamplings.at(i),CaloRec::Lookup::getSamplingName(m_excludedSamplings.at(i)).c_str()) );
+    }
+  }
+
+  ATH_MSG_INFO("Other properties:");
+  std::map<bool,std::string> blu { { true, "true" }, { false, "false" } };
+  ATH_MSG_INFO( CaloRec::Helpers::fmtMsg("PrepareLCW ................. %s",             blu[m_prepareLCW].c_str())               ); 
+  ATH_MSG_INFO( CaloRec::Helpers::fmtMsg("BuildTopoTowers ............ %s",             blu[m_useCellsFromClusters].c_str())     );
+  ATH_MSG_INFO( CaloRec::Helpers::fmtMsg("ApplyCellEnergyThreshold ... %s",             blu[m_applyCellEnergyThreshold].c_str()) );
+  ATH_MSG_INFO( CaloRec::Helpers::fmtMsg("OrderClusterByPt ........... %s",             blu[m_orderByPt].c_str())                );
+  ATH_MSG_INFO( CaloRec::Helpers::fmtMsg("DoCellIndexCheck ........... %s",             blu[m_doCellIndexCheck].c_str())         );
+  ATH_MSG_INFO( CaloRec::Helpers::fmtMsg("BuildCombinedTopoSignal .... %s",             blu[m_buildCombinedSignal].c_str())      );
+  ATH_MSG_INFO( CaloRec::Helpers::fmtMsg("TopoClusterRange ........... %.2f",           m_clusterRange)                          );
+  ATH_MSG_INFO( CaloRec::Helpers::fmtMsg("ExcludedSamplings .......... %zu (number of)",m_excludedSamplingsName.size())          );
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode CaloTopoTowerFromClusterMaker::finalize()
+{ return StatusCode::SUCCESS; }
+
+StatusCode CaloTopoTowerFromClusterMaker::execute(const EventContext& ctx,
+						  xAOD::CaloClusterContainer* pClusCont,
+						  CaloCellClusterWeights*     cellWeights) const
+{
+  /////////////////
+  // Check input //
+  /////////////////
+
+  // CaloCellContainer is needed to construct CaloProtoCluster
+  SG::ReadHandle<CaloCellContainer> pCellCont(m_cellContainerKey,ctx);
+  if ( !pCellCont.isValid() ) { 
+    ATH_MSG_ERROR("Cannot allocate CaloCellContainer with key <" << m_cellContainerKey << ">");
+    return StatusCode::FAILURE;
+  }
+
+  if ( msgLvl(MSG::DEBUG) && m_numberOfCells != pCellCont->size() ) { 
+    ATH_MSG_DEBUG( CaloRec::Helpers::fmtMsg("[mismatch] number of cells in CaloCellContainer %6zu, total number of cell descriptors %6zu",
+					      pCellCont->size(),m_towerGeometrySvc->totalNumberCells()) );
+  }
+
+  if ( m_doCellIndexCheck ) { this->checkCellIndices(pCellCont.cptr()); }
+
+  /////////////////////////
+  // Set up ProtoCluster //
+  /////////////////////////
+
+  // index of CaloProtoCluster in container relates to tower position! DO NOT sort, shuffle, or remove elements!  
+  protocont_t pProtoCont; pProtoCont.reserve(m_numberOfTowers);
+  for ( uint_t i(0); i<m_numberOfTowers; ++i ) { pProtoCont.push_back(CaloProtoCluster(pCellCont.cptr())); }
+
+  //////////////////////////////////////////////////////
+  // Apply overall cell filter and fill protoclusters //
+  //////////////////////////////////////////////////////
+
+  // The weights extracted for cells from clusters are LCW weights (typically). The total
+  // contribution of a LCW-weighted cell to towers is Ecell*Weight_LCW*Weight_tower.
+
+  // If EM clusters are used, the weights of a clustered cell are completely defined
+  // by the tower grid. As cells can shared between clusters, each cell can only be
+  // projected onto the towergrid once, with Ecell*Weight_tower
+
+  // The CaloCellClusterWeights object is used to store the combined LCW weight.
+  // for each clustered cell. In case of EM, the LCW weights are ignored and this
+  // object is not used - a simple vector<bool> tags cells already put into towers.
+
+  uint_t cCtr(0);
+  if ( m_useCellsFromClusters ) {
+    // retrieve topo-cluster container for topo-towers
+    SG::ReadHandle<xAOD::CaloClusterContainer> pTopoClusCont(m_clusterContainerKey,ctx);
+    if ( !pTopoClusCont.isValid() ) {
+      ATH_MSG_ERROR("Cannot allocate xAOD::CaloClusterContainer with key <" << m_clusterContainerKey << ">");
+      return StatusCode::FAILURE;
+    } // check on ReadHandle validity
+    cCtr = m_prepareLCW && cellWeights != nullptr ? this->buildLCWTopoTowers(*pTopoClusCont,pProtoCont,cellWeights) : this->buildEMTopoTowers(*pTopoClusCont,pProtoCont);
+    if ( !isValidIndex(cCtr) ) { ATH_MSG_WARNING("problems building EM or LCW topo-towers"); return StatusCode::SUCCESS; }
+  } else {
+    // fill inclusive/exclusive towers
+    cCtr = m_applyCellEnergyThreshold ?  this->buildExclTowers(*pCellCont,pProtoCont) : this->buildInclTowers(*pCellCont,pProtoCont);
+    if ( !isValidIndex(cCtr) ) { ATH_MSG_WARNING("problems building EM inclusive or exclusive towers"); return StatusCode::SUCCESS; }
+  } // end topo-towers/inclusive-exclusive towers
+  
+  
+  
+  // allocate sufficient space in vector
+  pClusCont->reserve(cCtr);
+  // pick up cluster size tag and set up counter
+  xAOD::CaloCluster::ClusterSize csize = this->getClusterSize(m_numberOfTowers);
+  // loop proto-clusters
+  for ( uint_t ipc(0); ipc<pProtoCont.size(); ++ipc ) {
+    CaloProtoCluster& pProto  = pProtoCont.at(ipc);                     // pick up proto-cluster
+    CaloClusterCellLink* lptr = pProto.releaseCellLinks();              // take over CaloClusterCellLink object
+    this->cleanupCells(lptr,ipc);                                       // clean up cell links 
+    if ( this->filterProtoCluster(*lptr) ) {                            // ignore empty proto-clusters (no cells assigned)
+      xAOD::CaloCluster* clptr = new xAOD::CaloCluster();               // new empty cluster
+      pClusCont->push_back(clptr);                                      // put into container
+      clptr->addCellLink(lptr);                                         // transfer cell links to CaloCluster
+      clptr->setClusterSize(csize);                                     // set the cluster size spec
+      CaloRec::Helpers::calculateKine(clptr,false);                     // calculate kinematics and other signals from cells
+      clptr->setEta0(m_towerGeometrySvc->towerEta(ipc));                // save the tower center eta
+      clptr->setPhi0(m_towerGeometrySvc->towerPhi(ipc));                // save the tower center phi
+    } else {
+      delete lptr;
+    }
+  } // proto-cluster loop
+
+  // clean up proto-cluster container
+  pProtoCont.clear();
+
+  /////////////
+  // Sorting //
+  /////////////
+
+  // All towers/clusters at this point are on EM scale. Sorting LCW towers by pT should be done in the 
+  // CaloTopoClusterFromTowerCalibrator tool to assure desired ordering on the final scale.
+  // The link between tower location and index of tower representation (CaloCluster) in its
+  // container is definitively broken after sorting (was never ok in mixed cluster/tower mode).
+  if ( m_orderByPt ) { 
+    std::sort(pClusCont->begin(),pClusCont->end(),[](xAOD::CaloCluster* pc1,xAOD::CaloCluster* pc2) {
+   	volatile double pt1(pc1->pt()); // FIXME needed? (this was just copied)
+   	volatile double pt2(pc2->pt()); // FIXME needed? (this was just copied)
+   	return ( pt1 > pt2 );  
+      }
+      );
+  } // end ordered by pT
+
+  return StatusCode::SUCCESS;
+} // end execute
+
+//////////////////////
+// Fill topo-towers //
+//////////////////////
+
+// EM 
+CaloTopoTowerFromClusterMaker::uint_t CaloTopoTowerFromClusterMaker::buildEMTopoTowers(const xAOD::CaloClusterContainer& pClusCont,protocont_t& pProtoCont) const
+{
+  // presets
+  uint_t cCtr(0);
+  std::vector<bool> cellTags(m_numberOfCells,false);
+
+  // -- EM scale clusters
+  if ( !m_buildCombinedSignal ) { 
+    // topo-towers
+    for ( auto pClus : pClusCont ) { 
+      for ( auto fCell(pClus->cell_begin()); fCell != pClus->cell_end(); ++fCell ) { 
+	uint_t cidx(static_cast<uint_t>((*fCell)->caloDDE()->calo_hash()));
+	if ( cidx < cellTags.size() ) {
+	  if ( !cellTags.at(cidx) ) { cellTags[cidx] = this->addCellToProtoCluster(*fCell,pProtoCont); }  
+	} else {
+	  ATH_MSG_ERROR( CaloRec::Helpers::fmtMsg("Invalid cell hash index %6zu >= maximum index %6zu for cell in %s at (eta,phi) = (%6.3,%f6.3)",
+						  cidx,cellTags.size(),CaloSampling::getSamplingName((*fCell)->caloDDE()->getSampling()).c_str(),(*fCell)->eta(),(*fCell)->phi()) );
+	  return m_errorValueUINT;
+	}
+      } // end cells-in-cluster loop
+    } // end cluster loop
+  } else { 
+    // selected topo-towers for combined signal
+    std::vector<std::tuple<const CaloCell*,double> > cellList(m_numberOfCells,std::tuple<const CaloCell*,double>(0,0.));
+    for ( auto pClus : pClusCont ) { 
+      if ( std::abs(pClus->eta()) > m_clusterRange ) { 
+	for ( auto fCell(pClus->cell_begin()); fCell != pClus->cell_end(); ++fCell ) { 
+	  uint_t cidx(static_cast<uint_t>((*fCell)->caloDDE()->calo_hash()));
+	  if ( cellTags.at(cidx) ) { 
+	    std::get<1>(cellList[cidx]) += fCell.weight();
+	  } else { 
+	    cellList[cidx] = std::tuple<const CaloCell*,double>(*fCell,fCell.weight());
+	    cellTags[cidx] = true; 
+	  } 
+	} // cell in cluster loop
+      } else { 
+	++cCtr; 
+      } // cluster range check
+    } // cluster loop
+    // fill proto-cluster
+    for ( auto tpl : cellList ) { this->addCellToProtoCluster(std::get<0>(tpl),pProtoCont,std::get<1>(tpl)); }
+  } // end of fill mode
+
+  //
+  return cCtr+pProtoCont.size();
+}
+
+// LCW
+CaloTopoTowerFromClusterMaker::uint_t CaloTopoTowerFromClusterMaker::buildLCWTopoTowers(const xAOD::CaloClusterContainer& pClusCont,protocont_t& pProtoCont,CaloCellClusterWeights* cellWeights) const
+{ 
+  // Need to keep track of LCW weights (up to two per cell) available from the topo-cluster(s) the cell is assigned to.
+  // Each cell in a topo-cluster is, at first occurance, added to the CaloProtoCluster(s) representing the tower(s) and its
+  // LCW calibration weight is stored in a lookup table indexed by the calorimeter hash id of the cell. The second 
+  // time the same cell is found in another topo-cluster, only its LCW weight is added to the lookup table (stored in
+  // CaloCellClusterWeights for use in the downstream tower calibration tool) - the assignment to tower(s) has already
+  // happened.
+
+  uint_t cCtr(0);
+  // project cells on tower grid
+  if ( !m_buildCombinedSignal ) { 
+    // loop original topo-cluster container
+    for ( auto pClus : pClusCont ) { 
+      // loop over cells in the original topo-cluster
+      for ( auto fCell(pClus->cell_begin()); fCell != pClus->cell_end(); ++fCell ) {
+	// map to towers only once
+	if ( !cellWeights->check(*fCell) ) { this->addCellToProtoCluster(*fCell,pProtoCont); }
+	// store all associated LCW weights
+	cellWeights->set(*fCell,fCell.weight());
+      } // end cells-in-cluster loop
+    } // end cluster loop
+  } else { 
+    // loop topo-cluster
+    for ( auto pClus : pClusCont ) {
+      // keep top-clusters in configured eta range
+      if ( std::abs(pClus->eta()) > m_clusterRange ) { 
+	// loop over cells of topo-clusters for the forward towards 
+	for ( auto fCell(pClus->cell_begin()); fCell != pClus->cell_end(); ++fCell ) {
+	  // map to towers only once
+	  if ( !cellWeights->check(*fCell) ) { this->addCellToProtoCluster(*fCell,pProtoCont); }
+	  // store all associated LCW weights
+	  cellWeights->set(*fCell,fCell.weight());
+	} // end cells-in-cluster loop
+      } else { 
+	++cCtr; 
+      } // end range check
+    } // end cluster loop
+  } // end combined signal check
+
+  //
+  return cCtr+pProtoCont.size();
+}
+
+/////////////////
+// Fill towers //
+/////////////////
+
+// inclusive
+CaloTopoTowerFromClusterMaker::uint_t CaloTopoTowerFromClusterMaker::buildInclTowers(const CaloCellContainer& pCellCont,protocont_t& pProtoCont) const
+{
+  // loop cell container - counter icl replaces cell hash index for NULL pointers in cell container
+  uint_t icl(0);
+  for ( auto cptr : pCellCont ) { 
+    if ( cptr == 0 ) { 
+      ATH_MSG_ERROR( CaloRec::Helpers::fmtMsg("CaloCellContainer[%6zu] contains invalid cell object pointer %p",icl,(void*)cptr) ); 
+      return m_errorValueUINT;
+    } else {
+      // existing cell with non-zero energy (negative or positive)
+      if ( std::fabs(cptr->e()) > 0. ) { this->addCellToProtoCluster(cptr,pProtoCont); }
+    } // end pointer check 
+    ++icl;
+  } // end cell loop
+  return pProtoCont.size();
+}
+
+// exclusive
+CaloTopoTowerFromClusterMaker::uint_t CaloTopoTowerFromClusterMaker::buildExclTowers(const CaloCellContainer& pCellCont,protocont_t& pProtoCont) const
+{
+  // loop cell container
+  uint_t icl(0);
+  for ( auto cptr : pCellCont ) {
+    if ( cptr == 0 ) { 
+      ATH_MSG_ERROR( CaloRec::Helpers::fmtMsg("CaloCellContainer[%6zu] contains invalid cell object pointer %p",icl,(void*)cptr) ); 
+      return m_errorValueUINT;
+    } else {
+      // existing cell with energy above threshold
+      if ( cptr->e() > m_energyThreshold ) { this->addCellToProtoCluster(cptr,pProtoCont); }
+    } // end pointer check
+    ++icl;
+  } // end cell loop
+  //return StatusCode::SUCCESS;
+  return pProtoCont.size();
+}
+
+bool CaloTopoTowerFromClusterMaker::addCellToProtoCluster(const CaloCell* cptr,protocont_t& pProtoCont,double weight) const
+{
+  // invalid input
+  if ( cptr == 0 ) { return false; }
+
+  // get towers for cell from geometry service
+  uint_t nctr(0);
+  for ( auto elm : m_towerGeometrySvc->getTowers(cptr) ) { 
+    auto towerIdx(m_towerGeometrySvc->towerIndex(elm));
+    if ( !m_towerGeometrySvc->isInvalidIndex(towerIdx) ) {
+      if ( !m_excludedSamplingsPattern[(size_t)cptr->caloDDE()->getSampling()] ) {
+	uint_t cellIdx(pProtoCont.at(towerIdx).getCellLinks()->getCellContainer()->findIndex(cptr->caloDDE()->calo_hash()));
+	pProtoCont[towerIdx].addCell(cellIdx,m_towerGeometrySvc->cellWeight(elm)*weight); ++nctr; 
+      }
+    }
+  }
+  return nctr > 0;
+}
+
+/////////////
+// Helpers //
+/////////////
+
+xAOD::CaloCluster::ClusterSize CaloTopoTowerFromClusterMaker::getClusterSize(uint_t etaBins,uint_t phiBins) const
+{ return this->getClusterSize(etaBins*phiBins); }
+
+xAOD::CaloCluster::ClusterSize CaloTopoTowerFromClusterMaker::getClusterSize(uint_t nTowers) const
+{
+  // check for tower sizes
+  return nTowers == 6400                    // known "standard" towers 0,1 x 0.1
+    ? xAOD::CaloCluster::Tower_01_01 
+    : nTowers == 25600                      // known "fine" towers 0.05 x 0.05
+    ? xAOD::CaloCluster::Tower_005_005 
+    : xAOD::CaloCluster::Tower_fixed_area;  // unspecified towers 
+}
+
+int CaloTopoTowerFromClusterMaker::cleanupCells(CaloClusterCellLink* clk,uint_t nclus) const
+{
+  // Any pathology here probably indicates a configuration problem with the conditions (geometry)
+  // database (wrong tag for data?)
+
+  // check on null pointers in cell links
+  int nrc(0); int hid(0);
+  auto fcell(clk->begin());
+  while ( fcell != clk->end() ) {
+    const CaloCell* pCell = *fcell;
+    auto nc(clk->getCellContainer()->size());
+    const CaloCell* aCell = fcell.index() < nc ? clk->getCellContainer()->at(fcell.index()) : (const CaloCell*)0;
+    if ( pCell == 0 ) {
+      ATH_MSG_WARNING( CaloRec::Helpers::fmtMsg("CaloCellContainer[%6zu/%6zu] - tower %5zu at (%6.3f,%6.3f) - cell pointer invalid (%p/%p) [removed %3i of %3zu cells]",
+						fcell.index(),nc-1,nclus,m_towerGeometrySvc->towerEta(nclus),m_towerGeometrySvc->towerPhi(nclus),
+						(void*)pCell,(void*)aCell,++nrc,clk->size()) );
+      fcell = clk->removeCell(fcell);
+    } else {
+      uint_t chash(static_cast<uint_t>(pCell->caloDDE()->calo_hash()));
+      uint_t csamp(static_cast<uint_t>(pCell->caloDDE()->getSampling()));
+      if (chash > m_maxCellHash ) {
+	// check cell hash
+	ATH_MSG_WARNING( CaloRec::Helpers::fmtMsg("Tower %5zu at (%6.3f,%6.3f) linked cell %3i - cell hash index (%6zu/%6zu) invalid",
+						  nclus,m_towerGeometrySvc->towerEta(nclus),m_towerGeometrySvc->towerPhi(nclus),hid,chash,m_maxCellHash) );
+	fcell = clk->removeCell(fcell);	++nrc;
+      } else if ( csamp >= m_numberOfSamplings ) {
+	// check sampling id
+	ATH_MSG_WARNING( CaloRec::Helpers::fmtMsg("Tower %5zu at (%6.3f,%6.3f) linked cell %3i -cell sampling id (%3zu/%3zu) invalid",
+						  nclus,m_towerGeometrySvc->towerEta(nclus),m_towerGeometrySvc->towerPhi(nclus),hid,csamp,m_numberOfSamplings) );
+	fcell = clk->removeCell(fcell); ++nrc;
+      } else if ( fcell.weight() <= 0.0000001 ) { 
+	// remove cells with 0 weight 
+	fcell = clk->removeCell(fcell); ++nrc;
+      } else { 
+	// next cell 
+	++fcell;
+      }
+    } // end remove cell due to pointer invalid
+    ++hid;
+  } // end loop on cells in cell link object
+  return nrc;
+}
+
+bool CaloTopoTowerFromClusterMaker::filterProtoCluster(const CaloClusterCellLink& clnk) const
+{ return clnk.size() > 0; }
+
+bool CaloTopoTowerFromClusterMaker::checkCellIndices(const CaloCellContainer* pCellCont) const
+{
+  ////////////////////////////
+  // input and setup checks //
+  ////////////////////////////
+
+  // check argument
+  if ( pCellCont == 0 ) { 
+    ATH_MSG_WARNING( CaloRec::Helpers::fmtMsg("Invalid pointer to CaloCellContainer (%p)",(void*)pCellCont) ); return false;
+  } else if ( pCellCont->empty() ) { 
+    ATH_MSG_WARNING( CaloRec::Helpers::fmtMsg("CaloCellContainer at %p is empty (size %zu)",(void*)pCellCont,pCellCont->size()) ); return false; 
+  }
+  // check the atomic state
+  if ( CaloTopoTowerFromClusterMaker_checkCellIndices ) { return true; }
+  // set the atomic flag
+  ATH_MSG_INFO( "Cell hash index check requested" ); 
+  CaloTopoTowerFromClusterMaker_checkCellIndices = true;
+  // assign output file
+  std::string algname(this->name());
+  if ( algname.find_last_of('.') != std::string::npos ) { algname = algname.substr(algname.find_last_of('.')+1); }
+  std::string logname(CaloRec::Helpers::fmtMsg("%s.cellhash_index_check.dat",this->name().c_str())); 
+  std::ofstream logstream; logstream.open(logname);
+  if ( !logstream.is_open() ) { 
+    ATH_MSG_WARNING( CaloRec::Helpers::fmtMsg("Cannot open log file \042%s\042 - no hash index checking",logname.c_str()) ); 
+    return false;
+  }
+  logstream << "##########################################################################" << std::endl;
+  logstream << "### This file contains a list of CaloCell indices in CaloCellContainer ###" << std::endl;
+  logstream << "### for which this index is not the same as the calorimeter cell hash  ###" << std::endl;
+  logstream << "### identifier. An empty list indicates full consistency between this  ###" << std::endl;
+  logstream << "### index and the hash identifier for all cells.                       ###" << std::endl;
+  logstream << "##########################################################################" << std::endl;
+  logstream << "<begin list>--------------------------------------------------------------" << std::endl;
+
+  /////////////////////////
+  // loop cell container //
+  /////////////////////////
+
+  // prepare tag store
+  size_t ifc(0); std::bitset<200000> chkflg; chkflg.reset();
+  for ( size_t i(0); i<pCellCont->size(); ++i ) { 
+    if ( pCellCont->at(i) != 0 ) { 
+      size_t chash((size_t)pCellCont->at(i)->caloDDE()->calo_hash());
+      if ( chash != i ) {
+	std::string cni("UKNOWN");
+	double etai(0.); double phii(0.);
+	const CaloDetDescrElement* iel = i < CaloDetDescrManager::instance()->element_size() ? CaloDetDescrManager::instance()->get_element(i) : 0;
+	if ( iel != 0 ) {
+	  cni  = CaloRec::Lookup::getSamplingName(iel->getSampling());
+	  etai = iel->eta_raw();
+	  phii = iel->phi_raw();
+	}
+	std::string cnc("UNKNOWN");
+	double etac(0.); double phic(0.);
+	const CaloDetDescrElement* cel = chash < CaloDetDescrManager::instance()->element_size() ? CaloDetDescrManager::instance()->get_element(chash) : 0;
+	if ( cel != 0 ) { 
+	  cnc  = CaloRec::Lookup::getSamplingName(cel->getSampling());
+	  etac = cel->eta_raw();
+	  phic = cel->phi_raw();
+	}
+	size_t cidx(pCellCont->findIndex(chash));
+	logstream << CaloRec::Helpers::fmtMsg("[%06zu] Cell %6zu [%12.12s %5.3f %5.3f] non-matching id %6zu [%12.12s %5.3f %5.3f] findCell() index %6zu",
+					      ++ifc,i,cni.c_str(),etai,phii,chash,cnc.c_str(),etac,phic,cidx) << std::endl; 
+      }
+      chkflg.set(chash);
+    }
+  }
+  logstream << "<end list>----------------------------------------------------------------" << std::endl;
+  logstream.close();
+
+  /////////////////////////
+  // check missed hashes //
+  /////////////////////////
+
+  // number of non-matched hashes
+  if ( ifc > 0 ) { 
+    ATH_MSG_DEBUG( CaloRec::Helpers::fmtMsg("Found %zu non-matching cell hashes",ifc) );
+  }
+  // list of non-matched hashes
+  std::vector<size_t> chl; chl.reserve(m_towerGeometrySvc->totalNumberCells());
+  for ( size_t i(0); i<chl.size(); ++i ) { if ( !chkflg.test(i) ) { chl.push_back(i); } }
+  if ( !chl.empty() ) { 
+    for ( auto h : chl ) { ATH_MSG_DEBUG( CaloRec::Helpers::fmtMsg("Cell hash %6zu not in CaloCellContainer",h) ); }
+  }
+
+  return true;
+}
+
diff --git a/Calorimeter/CaloRec/src/CaloTopoTowerFromClusterMaker.h b/Calorimeter/CaloRec/src/CaloTopoTowerFromClusterMaker.h
new file mode 100644
index 000000000000..9bfd45b6b7d5
--- /dev/null
+++ b/Calorimeter/CaloRec/src/CaloTopoTowerFromClusterMaker.h
@@ -0,0 +1,255 @@
+// -*- c++ -*- 
+/* Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */
+#ifndef CALOREC_CALOTOPOTOWERFROMCLUSTERMAKER_H
+#define CALOREC_CALOTOPOTOWERFROMCLUSTERMAKER_H
+
+#include "StoreGate/ReadHandleKey.h"
+#include "StoreGate/WriteHandleKey.h"
+
+#include "GaudiKernel/ServiceHandle.h"
+
+#include "AthenaBaseComps/AthAlgTool.h" 
+
+#include "CaloRec/CaloTowerCollectionProcessor.h"
+#include "CaloTowerGeometrySvc.h"
+#include "CaloProtoCluster.h"
+
+#include "CaloEvent/CaloCell.h"
+#include "CaloEvent/CaloClusterCellLink.h"
+#include "CaloEvent/CaloCellClusterWeights.h"
+#include "CaloEvent/CaloCellContainer.h"
+
+#include "CaloGeoHelpers/CaloSampling.h"
+
+#include "xAODCaloEvent/CaloClusterContainer.h"
+
+#include <string>
+#include <vector>
+#include <bitset>
+#include <map>
+
+#ifndef _CALOTOPOTOWERFROMCLUSTERMAKER_BITSET_SIZE
+#define _CALOTOPOTOWERFROMCLUSTERMAKER_BITSET_SIZE 28
+#endif
+
+class CaloTopoTowerFromClusterMaker : public AthAlgTool, virtual public CaloTowerCollectionProcessor
+{
+public:
+
+  ///@brief Tool constructor
+  CaloTopoTowerFromClusterMaker(const std::string& type,const std::string& name,const IInterface* pParent);
+  ///@name @c AthAlgTool and @c CaloClusterCellProcessor interface implementations
+  ///@{
+  virtual StatusCode initialize() override;                   ///< Setting up the operational mode and corresponding parameters
+  virtual StatusCode execute(const EventContext& ctx,
+                             xAOD::CaloClusterContainer* pClusCont,
+			                 CaloCellClusterWeights*     cellWeights) const override; ///< Execute the tool and fill the @c xAOD::CaloClusterContainer pointed to by @c pClusCont
+  virtual StatusCode finalize() override;                        ///< Finalize the tool (no action)
+  ///@}
+  
+
+private:
+
+  ///@name Internally used types
+  ///@{
+  typedef std::vector<CaloProtoCluster> protocont_t; ///< Container for @c CaloProtoCluster objects
+  typedef std::size_t                   uint_t;      ///< Unsigned integral type
+  ///@}
+
+  /// @name Tool properties
+  /// @{
+  ServiceHandle<CaloTowerGeometrySvc>           m_towerGeometrySvc;                         ///< Tower geometry service
+  SG::ReadHandleKey<xAOD::CaloClusterContainer> m_clusterContainerKey;                      ///< Topo-cluster container key
+  SG::ReadHandleKey<CaloCellContainer>          m_cellContainerKey;                         ///< Calorimeter cell container
+  bool                                          m_orderByPt = { false  };                   ///< Orders cluster container by @f$ p_{\text{T}} @f$, default @c true
+  bool                                          m_prepareLCW = { false  };                  ///< Prepare LCW calibration, default is @c false
+  bool                                          m_useCellsFromClusters = { true  };         ///< Use cells from topo-clusters if @c true, else use all cells, default is @c true
+  bool                                          m_applyCellEnergyThreshold = { false  };    ///< Apply cell energy threshold, default is @c false 
+  bool                                          m_doCellIndexCheck = { false  };            ///< Check cell hash index consistency if @c true (default @c false)
+  bool                                          m_buildCombinedSignal = { false  };         ///< Build topo-clusters within given @f$ y @f$ range, else topo-towers
+  double                                        m_energyThreshold;                          ///< Cell energy threshold, default is set in @c m_energyThresholdDef
+  double                                        m_clusterRange;                             ///< Range where topo-clusters are used when <tt>m_buildCombinedSignal = true</tt>
+  /// @}
+
+  /// @name Constants and parameters
+  /// @{
+  uint_t             m_numberOfCells;          ///< Number of cells (highest cell index + 1)
+  uint_t             m_maxCellHash;            ///< Maximum hash index of cell ( number of cells - 1)
+  uint_t             m_numberOfSamplings;      ///< Number of samplings
+  uint_t             m_numberOfTowers;         ///< Number of towers
+  static double      m_energyThresholdDef;     ///< Default energy threshold
+  static double      m_clusterRangeDef;        ///< Default cluster @f$ y @f$ range
+  static std::string m_defaultKey;             ///< Default container key
+  static uint_t      m_errorValueUINT;         ///< Error value for @c uint_t type values
+  /// @}
+
+  ///@name Internally used helpers
+  ///@{
+  xAOD::CaloCluster::ClusterSize getClusterSize(uint_t etaBins,uint_t phiBins) const; ///< Returns a cluster size tag from number of eta and phi bins in tower grid
+  xAOD::CaloCluster::ClusterSize getClusterSize(uint_t towerBins) const;              ///< Returns a cluster size tag from number of towers (bins) in tower grid
+  int cleanupCells(CaloClusterCellLink* clk,uint_t nclus) const;                      ///< Checks @c CaloClusterCellLink for consistency
+  ///@}
+
+  ///@name Tower builders
+  ///
+  ///@return @c false in case of problems with data access or inconsistent data structures 
+  ///
+  ///@param pCellCont reference to non-modifiable @c CaloCellContainer
+  ///@param pProtoCont reference to @c CaloProtoCluster container filled on output.
+  ///@param clusCont reference to non-modifiable @c xAOD::CaloClusterContainer
+  ///@param protoCont reference to modifiable proto-cluster container
+  ///
+  ///@return 
+  ///@{
+  uint_t buildInclTowers(const CaloCellContainer& pCellCont,protocont_t& pProtoCont)const;            ///< Inclusive towers
+  uint_t buildExclTowers(const CaloCellContainer& pCellCont,protocont_t& pProtoCont)const;            ///< Exclusive towers
+  uint_t buildEMTopoTowers(const xAOD::CaloClusterContainer& clusCont,protocont_t& protoCont)const;   ///< EM topo-towers
+  uint_t buildLCWTopoTowers(const xAOD::CaloClusterContainer& clusCont,protocont_t& protoCont,CaloCellClusterWeights* cellWeights) const;  ///< LCW topo-towers
+  ///@}
+  /// @brief Adding cells to proto-clusters
+  ///
+  /// @return @c true if cell successfully added to one (or more) proto-clusters
+  ///
+  /// @param cptr       pointer ton non-modifiable @c CaloCell object
+  /// @param pProtoCont reference to proto-cluster container
+  /// @param weight     additional (global) weight of cell (e.g. for geometrical weight for combined EM-scale signals)  
+  bool addCellToProtoCluster(const CaloCell* cptr,protocont_t& pProtoCont,double weight=1.) const;
+  
+  ///@name Helpers
+  ///@{
+  bool   filterProtoCluster(const CaloClusterCellLink& clnk)  const; ///< Checks for and removes invalid cell links  
+  bool   checkCellIndices(const CaloCellContainer* pCellCont) const; ///< Checks consistency between cell indices and hash identifiers
+  bool   isValidIndex(uint_t idx)                             const; ///< Checks if argument is a valid index value 
+  uint_t badIndexValue()                                      const; ///< Returns value indicating a bad index
+  ///@}
+
+  ///@name Excluded samplings
+  ///@{
+  std::vector<CaloSampling::CaloSample>                       m_excludedSamplings;         ///< List of excluded samplings (@c CaloSampling::CaloSample enumerators)
+  std::vector<std::string>                                    m_excludedSamplingsName;     ///< List of excluded samplings (human-readable names)
+  std::bitset< _CALOTOPOTOWERFROMCLUSTERMAKER_BITSET_SIZE >   m_excludedSamplingsPattern;  ///< Bit pattern indicates if sampling is excluded
+  ///@}
+
+  ///@name Monitoring
+  ///@{
+  ///@}
+};
+
+inline CaloTopoTowerFromClusterMaker::uint_t CaloTopoTowerFromClusterMaker::badIndexValue()          const { return m_errorValueUINT;       } 
+inline bool                                  CaloTopoTowerFromClusterMaker::isValidIndex(uint_t idx) const { return idx != badIndexValue(); }
+
+///@class CaloTopoTowerFromClusterMaker
+///
+/// @brief A cluster builder tool forming topo-clusters representing calorimeter tower signals on a regular grid in @f$ (\eta,\phi) @f$ space. By default,
+///        EM-scale <i>topo-towers</i> are created from cells in topo-clusters.
+///
+/// This tool fills EM-scale towers and stores them as @c xAOD::CaloCluster. It supports several operational modes, which are
+/// controlled by tool properties. It fills a container of type @c xAOD::CaloClusterContainer. The properties controlling its
+/// specific behavior are:  
+///
+/// <table width="90%" align="center" style="border-width:0px;">
+/// <tr><td align="center" colspan="4" style="background-color:rgb(245,245,220);color:rgb(165,42,42);"><b>Properties defining tool behavior</b></td></tr>
+/// <tr style="color:rgb(131,42,34);">
+/// <td align="left" width="25%">Property name</td>
+/// <td align="center" width="25%">Property type</td>
+/// <td align="center" width="25%">Default value</td>
+/// <td align="left" width="25%">Comment</td>
+/// </tr> 
+/// <tr>
+/// <td align="left" valign="top"><tt>OrderClusterByPt</tt></td>
+/// <td align="center" valign="top"><tt>bool</tt></td>
+/// <td align="center" valign="top"><tt>false</tt></td>
+/// <td align="left" valign="top">if @c true, the @c xAOD::CaloClusterContainer is ordered by @f$ p_{\rm T}^{\rm clus} @f$.  See further comments below.</td>
+/// </tr>
+/// <tr>
+/// <td align="left" valign="top"><tt>PrepareLCW</tt></td>
+/// <td align="center" valign="top"><tt>bool</tt></td>
+/// <td align="center" valign="top"><tt>false</tt></td>
+/// <td align="left" valign="top">if @c true, the tool fills a @c CaloCellClusterWeights object and records it into the event store to be used by @c CaloTopoClusterFromTowerCalibrator</td>
+/// </tr>
+/// <tr>
+/// <td align="left" valign="top"><tt>UseCellsFromClusters</tt></td>
+/// <td align="center" valign="top"><tt>bool</tt></td>
+/// <td align="center" valign="top"><tt>true</tt></td>
+/// <td align="left" valign="top">if @c true, only cells from topo-clusters are used to fill the towers (<i>topo-towers</i>); else, @a inclusive @a towers are filled with all cells.</td>
+/// </tr>
+/// <tr><td align="center" colspan="4" style="background-color:rgb(245,245,220);color:rgb(165,42,42);"><b>Properties setting variables for operational modes</b></td></tr>
+/// <tr style="color:rgb(131,42,34)">
+/// <td align="left" width="25%">Property name</td>
+/// <td align="center" width="25%">Property type</td>
+/// <td align="center" width="25%">Default value</td>
+/// <td align="left" width="25%">Comment</td>
+/// </tr> 
+/// <tr>
+/// <td align="left" valign="top"><tt>CellEnergyThreshold</tt></td>
+/// <td align="center" valign="top"><tt>double</tt></td>
+/// <td align="center" valign="top"><tt>m_energyThresholdDef</tt></td>
+/// <td align="left" valign="top">cell energy threshold used in exclusive mode only. See further comments below.</td>
+/// </tr>
+/// <tr>
+/// <td align="left" valign="top"><tt>CellContainerKey</tt></td>
+/// <td align="center" valign="top"><tt>SG::ReadHandleKey<CaloCellContainer></tt></td>
+/// <td align="center" valign="top"><tt>"AllCalo"</tt></td>
+/// <td align="left" valign="top">cell container key is needed to pick up @c CaloCellContainer for all operational modes.</td> 
+/// </tr>
+/// <tr>
+/// <td align="left" valign="top"><tt>ClusterContainerKey</tt></td>
+/// <td align="center" valign="top"><tt>SG::ReadHandleKey<xAOD::CaloClusterContainer></tt></td>
+/// <td align="center" valign="top"><tt>"CaloTopoCluster"</tt></td>
+/// <td align="left" valign="top">cluster container key is needed to pick up @c xAOD::CaloClusterContainer for filtered mode (<tt>UseCellsFromCluster = true</tt>)
+/// </tr>
+/// <tr>
+/// <td align="left" valign="top"><tt>CellClusterWeightKey</tt></td>
+/// <td align="center" valign="top"><tt>SG::WriteHandleKey<CaloCellClusterWeights></tt></td>
+/// <td align="center" valign="top"><tt>&minus;N/A&minus;</tt></td>
+/// <td align="left" valign="top">key for @c CaloCellClusterWeights object is needed if <tt>PrepareLCW = true</tt>. Default is empty key. 
+/// </tr>
+/// <tr>
+/// <td align="left" valign="top"><tt>BuildCombinedTopoSignal</tt></td>
+/// <td align="center" valign="top"><tt>bool</tt></td>
+/// <td align="center" valign="top"><tt>false</tt></td>
+/// <td align="left" valign="top">turns on combined topo-cluster/topo-tower output, with topo-clusters used within the rapidity range defined by <tt>TopoClusterRange</tt> and topo-towers elsewhere.</td></tr>
+/// </tr>
+/// <tr>
+/// <td align="left" valign="top"><tt>TopoClusterRange</tt></td>
+/// <td align="center" valign="top"><tt>double</tt></td>
+/// <td align="center" valign="top"><tt>5.</tt></td>
+/// <td align="left" valign="top">sets the range @f$ y_{\rm topo-cluster}^{\rm max} @f$ for using topo-clusters when <tt>BuildCombinedTopoSignal = true</tt>; 
+/// topo-clusters with @f$ \left|y_{\rm topo-cluster}\right| < y_{\rm topo-cluster}^{\rm max} @f$ are used. 
+/// </tr>
+/// </table> 
+///                                 
+/// The towers can be classified as:
+/// -# <b>inclusive cell towers</b>
+///    All cells are collected into inclusive towers, independent of their signal. Requires properties <tt>UseCellsFromClusters = false</tt> and <tt>UseCellEnergyThreshold = false</tt>. Only EM
+///    towers are possible, as cells not collected into topo-clustersdo not have a calibration applied.
+/// -# <b>exclusive cell towers</b> 
+///    Cells with @f$ E > E_{\rm min} @f$ are collected into exclusive towers. This behaviour is turned on by  <tt>UseCellsFromClusters = false</tt> and <tt>UseCellEnergyThreshold = true</tt>. A
+///    meaningful <tt>CellEnergyThreshold</tt> value needs to be provided in addition.
+/// -# <b>filtered mode</b>
+///    Cells contributing to standard topo-clusters are collected into topo-towers. This behaviour is triggered by <tt>UseCellsFromClusters = true</tt>. Optionally, LCW calibration can be applied
+///    to these towers by setting <tt>PrepareLCW = true</tt> and scheduling a @c CaloTopoClusterFromTowerCalibrator tool after the cluster moment calculators. The values of the <tt>UseEnergyThreshold</tt>
+///    and <tt>CellEnergyThreshold</tt> properties are ignored in this mode. A valid event store key needs to be provided in the to pick up the topo-cluster container. Note that building EM 
+///    topo-towers requires topo-clusters on EM scale (no LCW applied) to get the correct geometrical cell weights only. LCW topo-towers require LCW scale topo-clusters to get the correct full geometrical 
+///    and calibration weights.
+/// -# <b>mixed mode</b>
+///    Cells contributing to standard topo-clusters are collected into towers if these topo-clusters are outside of a give rapidity range. The rapidity range is defined by the <tt>TopoClusterRange</tt>
+///    property. This mode is turned on by setting the property <tt>BuildCombinedTopoSignal = true</tt>. It is turned off by default (<tt>BuildCombinedTopoSignal = false</tt>). 
+///    EM scale and LCW scale is possible, as in the filtered mode. 
+///
+///  Configuration 2 and 3 are exclusive, with 3 overwriting 2. The output topo-clusters represent calorimeter towers on the EM scale. The can be handed to cluster moment
+///  tools (needs EM scale) and, if desired, to a dedicated cluster calibration tool of type @c xAOD::CaloTowerClusterFromTowerCalibrator .  
+///
+///  To avoid multiple retrievals of the same weights by searching for cells in (many) topo-clusters, the overall weight of the cell signal is stored in a random access
+///  look-up table stored in a @c CaloCellClusterWeights object in the detector store. This object is created by this tool, if needed. If the tool property 
+///  @c CellWeightLookupKey is set, this object will be generated, filled, and recorded. This is essential for calibrated topo-towers!
+///
+///@note The @c OrderByPt property, which orders the container by descending transverse momentum, is only useful for EM towers. Applyin LCW may lead to a different 
+///      order - if a container with LCW towers should be ordered, the corresponding property @c OrderByPt of the @c CaloTopoClusterFromTowerCalibrator tool should
+///      be set to @c true. 
+///
+///@note Many more details on the towers are available on 
+///      <a href="https://twiki.cern.ch/twiki/bin/view/AtlasSandboxProtected/CaloTowerPerformance" title="https://twiki.cern.ch/twiki/bin/view/AtlasSandboxProtected/CaloTowerPerformance">this page</a>.
+///
+/// @author Peter Loch <loch@physics.arizona.edu>
+#endif
diff --git a/Calorimeter/CaloRec/src/CaloTopoTowerMaker.cxx b/Calorimeter/CaloRec/src/CaloTopoTowerMaker.cxx
new file mode 100644
index 000000000000..12be83c4c276
--- /dev/null
+++ b/Calorimeter/CaloRec/src/CaloTopoTowerMaker.cxx
@@ -0,0 +1,224 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+//-----------------------------------------------------------------------
+// File and Version Information:
+// $Id: CaloTopoTowerMaker.cxx,v 1.26 2009-04-18 02:56:18 ssnyder Exp $
+//
+// Description: see CaloTopoTowerMaker.h
+// 
+// Environment:
+//      Software developed for the ATLAS Detector at CERN LHC
+//
+// Author List:
+//      Sven Menke
+//
+// Modified: Feb 09, 2005 (DLelas)
+//          - CaloTopoTowerMaker applies correction type tool on a whole 
+//            cluster collection now. Needed for Sliding Window
+//            cell weights calculation.
+//
+// Modified Feb 2014 (W Lampl)
+//          - Migrate to xAOD::CaloCluster(Container)
+//          - Move to AthAlgorithm, some simplifications
+//
+// Modified Sep 2020 (T Chowdhury)
+//          - 
+//-----------------------------------------------------------------------
+
+//-----------------------
+// This Class's Header --
+//-----------------------
+#include "CaloTopoTowerMaker.h"
+
+//---------------
+// C++ Headers --
+//---------------
+#include "xAODCaloEvent/CaloClusterContainer.h"
+#include "xAODCaloEvent/CaloClusterAuxContainer.h"
+#include "CaloEvent/CaloClusterCellLinkContainer.h"
+#include "CaloEvent/CaloCellClusterWeights.h"
+
+#include "CaloUtils/CaloClusterSignalState.h"
+#include "CaloUtils/CaloClusterStoreHelper.h"
+#include "AthenaKernel/errorcheck.h"
+
+#include "GaudiKernel/IChronoStatSvc.h"
+
+#include "CaloTopoClusterFromTowerHelpers.h"
+
+#include <memory> // for the std::unique_ptr
+#include <cmath>
+
+//###############################################################################
+CaloTopoTowerMaker::CaloTopoTowerMaker(const std::string& name, 
+				   ISvcLocator* pSvcLocator) 
+  : AthReentrantAlgorithm(name, pSvcLocator)
+  , m_towerOutput("")
+  , m_towerCellLinkOutput("")
+  , m_towerMakerTool(this)
+  , m_towerCorrectionTools(this)
+  , m_towerCalibratorTool(this)
+  , m_chrono("ChronoStatSvc", name)
+{
+  // Name of Cluster Container to be registered in TDS
+  declareProperty("TowersOutputName",m_towerOutput);  
+  declareProperty("TowerCellLinkOutputName",m_towerCellLinkOutput);  
+  
+  // Name(s) of Cluster Maker Tools
+  declareProperty("TowerMakerTool",m_towerMakerTool);
+
+  // Name(s) of Cluster Correction Tools
+  declareProperty("TowerCorrectionTools",m_towerCorrectionTools);
+
+  // Tower calibrator tool
+  declareProperty("TowerCalibratorTool",m_towerCalibratorTool);
+
+  // save uncalibrated cluster signal state 
+  declareProperty("SaveUncalibratedSignalState",m_saveSignalState);
+
+  //Make Chrono Auditors for Cluster maker and correction tools
+  declareProperty("ChronoTools", m_chronoTools);
+
+  // apply LCW calibration for towers
+  declareProperty("UseLCWCalibration",m_useLCWCalibration);
+}
+
+//###############################################################################
+
+CaloTopoTowerMaker::~CaloTopoTowerMaker()
+{ }
+
+//###############################################################################
+
+StatusCode CaloTopoTowerMaker::initialize()
+{
+  // -- allocate tower geometry service
+  ATH_MSG_INFO("Allocate tower geometry service:");
+  if ( !m_towerGeometrySvc.isValid() ) { 
+    ATH_MSG_ERROR("[reject] cannot allocate tower geometry service - fatal");
+    return StatusCode::FAILURE; 
+  } else {
+    ATH_MSG_INFO( CaloRec::Helpers::fmtMsg("Tower geometry service is allocated, describes %6zu towers in grid:", m_towerGeometrySvc->towerBins()) );
+    ATH_MSG_INFO( CaloRec::Helpers::fmtMsg("[accept] %3zu eta bins in [%5.2f,%5.2f]",m_towerGeometrySvc->etaBins(),m_towerGeometrySvc->etaMin(),m_towerGeometrySvc->etaMax()) );
+    ATH_MSG_INFO( CaloRec::Helpers::fmtMsg("[accept] %3zu phi bins in [%5.2f,%5.2f]",m_towerGeometrySvc->phiBins(),m_towerGeometrySvc->phiMin(),m_towerGeometrySvc->phiMax()) );
+  }
+
+  // -- retrieve the needed tower maker tool
+  if (m_towerMakerTool.retrieve().isFailure()) {
+    ATH_MSG_ERROR("Failed to retrieve essential tower maker tool"
+                  << m_towerMakerTool);
+  } else {
+    ATH_MSG_DEBUG("Successfully retrieved tower maker tool "
+                  << m_towerMakerTool);
+  }
+  
+  // -- retrieve the (optional) list of correction tools
+  if (m_towerCorrectionTools.retrieve().isFailure()) {
+    ATH_MSG_ERROR("Failed to retrieve requested tower correction tools "
+                  << m_towerCorrectionTools);
+  } else {
+    ATH_MSG_DEBUG("Successfully retrieved tower correction tools "
+                  << m_towerCorrectionTools);
+  }
+
+  // -- retrieve tower calibrator tool
+  if ( m_useLCWCalibration ) {
+    if ( m_towerCalibratorTool.retrieve().isFailure() ) {
+      ATH_MSG_ERROR("Failed to retrieve requested tower calibrator tool " << m_towerCalibratorTool);
+    } else {
+      ATH_MSG_DEBUG("Sucessfully retrieved requested tower calibrator tool " << m_towerCalibratorTool);
+    }
+  }
+
+  if (m_chronoTools) {
+    msg(MSG::INFO) << "Will use ChronoStatSvc to monitor ClusterMaker and ClusterCorrection tools" << endmsg;
+    ATH_CHECK( m_chrono.retrieve() );
+  }
+
+  ATH_CHECK( m_towerOutput.initialize() );
+
+  if (m_towerCellLinkOutput.key().empty()) {
+    m_towerCellLinkOutput = m_towerOutput.key() + "_links";
+  }
+  ATH_CHECK( m_towerCellLinkOutput.initialize() );
+
+  return StatusCode::SUCCESS;
+}
+
+//###############################################################################
+
+StatusCode CaloTopoTowerMaker::finalize() {
+  return StatusCode::SUCCESS;
+}
+
+//###############################################################################
+
+StatusCode CaloTopoTowerMaker::execute (const EventContext& ctx) const
+{
+
+  // make a Cluster Container 
+  SG::WriteHandle<xAOD::CaloClusterContainer> clusColl (m_towerOutput, ctx);
+  ATH_CHECK(CaloClusterStoreHelper::AddContainerWriteHandle(&(*evtStore()), clusColl, msg()));
+
+  std::string chronoName(this->name()+std::string("_"));
+  if ( !m_useLCWCalibration ) {  
+    // fill the towers without preparing for calibratoin
+    if ( m_chronoTools ) { m_chrono->chronoStart(chronoName+m_towerMakerTool->name()); }
+    ATH_CHECK( m_towerMakerTool->execute(ctx,clusColl.ptr(),nullptr) );
+    if ( m_chronoTools ) { m_chrono->chronoStop(chronoName+m_towerMakerTool->name()); }
+    // save original signals bevore corrections and calibrations
+    if ( m_saveSignalState ) {
+      for (xAOD::CaloCluster* fClus : *clusColl) {
+	fClus->setRawE  (fClus->e()  );
+	fClus->setRawEta(fClus->eta());
+	fClus->setRawPhi(fClus->phi());
+	fClus->setRawM  (fClus->m()  );	
+      }//end loop over clusters
+    }
+    // apply the correction tools (really moment calculators)
+    for ( auto iter(m_towerCorrectionTools.begin()); iter != m_towerCorrectionTools.end(); ++iter ) {
+      if ( m_chronoTools ) { m_chrono->chronoStart(chronoName+iter->name()); }
+      ATH_CHECK( (*iter)->execute(ctx,clusColl.ptr()) );
+      if ( m_chronoTools ) { m_chrono->chronoStop(chronoName+iter->name()); }
+    } // correction tool loop
+  } else {
+    // fill the towers with LCW calibration 
+    std::unique_ptr<CaloCellClusterWeights> cellWeights(new CaloCellClusterWeights(std::max(m_towerGeometrySvc->maxCellHash(),m_towerGeometrySvc->totalNumberCells())));
+    if ( m_chronoTools ) { m_chrono->chronoStart(chronoName+m_towerMakerTool->name()); }
+    ATH_CHECK( m_towerMakerTool->execute(ctx,clusColl.ptr(),cellWeights.get()) );
+    if ( m_chronoTools ) { m_chrono->chronoStop(chronoName+m_towerMakerTool->name()); }
+    // save original signals bevore corrections and calibrations
+    if ( m_saveSignalState ) {
+      for (xAOD::CaloCluster* fClus : *clusColl) {
+	fClus->setRawE  (fClus->e()  );
+	fClus->setRawEta(fClus->eta());
+	fClus->setRawPhi(fClus->phi());
+	fClus->setRawM  (fClus->m()  );	
+      }//end loop over clusters
+    }
+    // apply the correction tools (really moment calculators)
+    for ( auto iter(m_towerCorrectionTools.begin()); iter != m_towerCorrectionTools.end(); ++iter ) {
+      if ( m_chronoTools ) { m_chrono->chronoStart(chronoName+iter->name()); }
+      ATH_CHECK( (*iter)->execute(ctx,clusColl.ptr()) );
+      if ( m_chronoTools ) { m_chrono->chronoStop(chronoName+iter->name()); }
+    } // correction tool loop
+    // apply calibration 
+    if ( m_chronoTools ) { m_chrono->chronoStart(chronoName+m_towerCalibratorTool->name()); }
+    ATH_CHECK( m_towerCalibratorTool->execute(ctx,clusColl.ptr(),cellWeights.get()) );
+    if ( m_chronoTools ) { m_chrono->chronoStop(chronoName+m_towerCalibratorTool->name()); }
+  } // end of processing blocks
+
+  ATH_MSG_DEBUG("Created tower container (of type xAOD::CaloClusterContainer) with " << clusColl->size() << " towers");
+  SG::WriteHandle<CaloClusterCellLinkContainer> cellLinks (m_towerCellLinkOutput, ctx);
+  ATH_CHECK(CaloClusterStoreHelper::finalizeClusters (cellLinks,
+                                                      clusColl.ptr()));
+  return StatusCode::SUCCESS;
+}
+
+
+const std::string& CaloTopoTowerMaker::getOutputContainerName() const {
+  return m_towerOutput.key();
+}
diff --git a/Calorimeter/CaloRec/src/CaloTopoTowerMaker.h b/Calorimeter/CaloRec/src/CaloTopoTowerMaker.h
new file mode 100644
index 000000000000..ae0f86c9bbb3
--- /dev/null
+++ b/Calorimeter/CaloRec/src/CaloTopoTowerMaker.h
@@ -0,0 +1,117 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+//Dear emacs, this is -*-c++-*-
+
+#ifndef CALOREC_CALOTOPOTOWERMAKER_H
+#define CALOREC_CALOTOPOTOWERMAKER_H
+
+/// @class  CaloTopoTowerMaker
+/// @author Tasnuva Chowdhury
+/// @date   16-September-2020
+/// @brief Top algorithm to reconstruct @c xAOD::CaloCluster objects representing topo-towers from CaloClusters 
+/// 
+/// This class is an Algorithm to reconstruct CaloTopoTowers which are represented by
+/// objects of type @c xAOD::CaloCluster from cells extracted from existing 
+/// topo-clusters (also represented by @c xAOD::CaloCluster type objects).
+/// The algorithm first extracts all cells form the topo-clusters, stores the
+/// LCW calibration weights for each cell (if configured), fills the towers
+/// with the cells and applys a topo-tower calibration using the LCW weights
+/// (if configured)>
+///
+
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
+
+#include "GaudiKernel/ToolHandle.h"
+#include "GaudiKernel/ServiceHandle.h"
+
+// -- interfaces
+#include "CaloRec/CaloClusterCollectionProcessor.h"
+#include "CaloRec/CaloTowerCollectionProcessor.h"
+#include "CaloEvent/CaloCellClusterWeights.h"
+
+#include "CaloTowerGeometrySvc.h"
+
+class CaloClusterCellLinkContainer;
+class IChronoStatSvc;
+
+class CaloTopoTowerMaker : public AthReentrantAlgorithm
+{
+
+ public:
+
+  CaloTopoTowerMaker(const std::string& name, ISvcLocator* pSvcLocator);
+  virtual ~CaloTopoTowerMaker() override;
+  virtual StatusCode initialize() override;
+  virtual StatusCode execute(const EventContext& ctx) const override;
+  virtual StatusCode finalize() override;
+
+  const std::string& getOutputContainerName() const;
+
+ private:
+
+  /**
+   * @brief Method to create a CaloClusterContainer together with it's AuxStore and Link container
+   *
+   */
+  StatusCode makeContainer();
+
+  
+  /** @brief the name of the key in StoreGate for the output
+      CaloClusterContainer */
+  SG::WriteHandleKey<xAOD::CaloClusterContainer> m_towerOutput;
+
+  /** @brief the name of the key in StoreGate for the output
+      CaloClusterCellLinkContainer */
+  SG::WriteHandleKey<CaloClusterCellLinkContainer> m_towerCellLinkOutput;
+
+  /// @brief Tower makers
+  /// 
+  /// This tool is the tower maker. It fills 
+  /// a @c xAOD::CaloClusterContainer with clusters representing 
+  /// towers and also retuns the LCW cell weights if configured. 
+  ToolHandle<CaloTowerCollectionProcessor>  m_towerMakerTool;
+
+  /// @brief Tower (cluster) moment makers
+  /// 
+  /// The tools in this list calculate cluster moments for towers after those
+  /// are filled. The tools are the as the ones used for topo-clusters.
+  /// Any number of tools can be scheduled. 
+  ToolHandleArray<CaloClusterCollectionProcessor> m_towerCorrectionTools; 
+
+  /// @brief Tower calibrator(s)
+  ///
+  /// This tool provides the (optional) LCW calibration.
+  ToolHandle<CaloTowerCollectionProcessor> m_towerCalibratorTool;
+
+  /// @brief Tower geometry service
+  ServiceHandle<CaloTowerGeometrySvc> m_towerGeometrySvc { this, "CaloTowerGeometrySvc", "CaloTowerGeometrySvc", "CaloTower geometry provider" };
+
+  /// Handle to the ChronoStatSvc
+  ServiceHandle<IChronoStatSvc> m_chrono;
+
+  /** @brief Keep the individual results of each correction.
+   *
+   * If true, we keep in StoreGate the complete list of clusters
+   * before each correction has been performed. */
+  //MT-unfriendly:bool m_keep_each_correction;
+
+  /** 
+   * @brief controls saving the uncalibrated signal state just before
+   * the first @c CaloClusterCorrectionTool is invoked. Is a configurable 
+   * property with default value @c true.
+   */
+  bool m_saveSignalState   = { true  };
+
+  ///Use ChronotStatSvc to monitor each tool
+  bool m_chronoTools       = { false };
+
+  /// @brief Use LCW calibration for topo-towers (default is @c true)
+  bool m_useLCWCalibration = { true  };
+
+};
+#endif // CALOREC_CALOTOPOTOWERMAKER_H
+
+
+
diff --git a/Calorimeter/CaloRec/src/CaloTowerGeometrySvc.cxx b/Calorimeter/CaloRec/src/CaloTowerGeometrySvc.cxx
new file mode 100644
index 000000000000..9e16b36f74ba
--- /dev/null
+++ b/Calorimeter/CaloRec/src/CaloTowerGeometrySvc.cxx
@@ -0,0 +1,410 @@
+/* Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */
+#include "CaloTowerGeometrySvc.h"
+#include "CaloTopoClusterFromTowerHelpers.h"
+
+#include <cmath>
+
+namespace { constexpr auto _pi = 3.14159265358979323846; }
+
+CaloTowerGeometrySvc::index_t CaloTowerGeometrySvc::m_invalidIndex = index_t(-1); 
+double                        CaloTowerGeometrySvc::m_invalidValue = -999.;
+
+CaloTowerGeometrySvc::CaloTowerGeometrySvc(const std::string& name,ISvcLocator* pSvcLocator)
+  : AthService(name,pSvcLocator)
+  , m_caloDDM((const CaloDetDescrManager*)0)
+  , m_logFileName("logfile")
+  , m_towerEtaWidth(0.)
+  , m_towerPhiWidth(0.)
+  , m_towerArea(0.)
+  , m_towerBins(0)                              
+  , m_maxCellHash(0)                            //----------------------------------------//
+  , m_towerEtaBins(100)                         // Default tower definition is "hadronic" //
+  , m_towerEtaMin(-5.0)                         // towers of size 0.1 x pi/32.            // 
+  , m_towerEtaMax(5.0)                          //----------------------------------------//
+  , m_adjustEta(true)
+  , m_towerPhiBins(64)                          
+  , m_towerPhiMin(-_pi)                         //----------------------------------------//
+  , m_towerPhiMax(_pi)                          // FCal vertical and horizontal cell      //
+  , m_fcal1Xslice(8.)                           // slicing creates "mini-cells" which are //
+  , m_fcal1Yslice(8.)                           // then projected onto towers. The mini-  //
+  , m_fcal2Xslice(8.)                           // cell signal is 1/(Nx x Ny) x Ecell,    //
+  , m_fcal2Yslice(12.)                          // where Nx(y) are the number of x(y)     //
+  , m_fcal3Xslice(12.)                          // slices.                                //
+  , m_fcal3Yslice(12.)                          //----------------------------------------//
+{
+  // Properties                                               
+  declareProperty("TowerEtaBins",               m_towerEtaBins, "Number of pseudorapidity bins in tower grid");
+  declareProperty("TowerEtaMin",                m_towerEtaMin,  "Lower boundary of pseudorapidity range");
+  declareProperty("TowerEtaMax",                m_towerEtaMax,  "Upper boundary of pseudorapidity range");
+  declareProperty("AdjustFCalToTowerEtaBounds", m_adjustEta,    "Adjust FCal cells to eta boundaries");
+  declareProperty("TowerPhiBins",               m_towerPhiBins, "Number of azimuthal bins in tower grid");
+  declareProperty("TowerPhiMin",                m_towerPhiMin,  "Lower boundary of azimuthal range");
+  declareProperty("TowerPhiMax",                m_towerPhiMax,  "Upper boundary of azimuthal range");
+  // change only for R&D
+  declareProperty("FCal1NSlicesX", m_fcal1Xslice,   "Number of X slices for FCal1 cells");
+  declareProperty("FCal1NSlicesY", m_fcal1Yslice,   "Number of Y slices for FCal1 cells");
+  declareProperty("FCal2NSlicesX", m_fcal2Xslice,   "Number of X slices for FCal2 cells");
+  declareProperty("FCal2NSlicesY", m_fcal2Yslice,   "Number of Y slices for FCal2 cells");
+  declareProperty("FCal3NSlicesX", m_fcal3Xslice,   "Number of X slices for FCal3 cells");
+  declareProperty("FCal3NSlicesY", m_fcal3Yslice,   "Number of Y slices for FCal3 cells");
+}
+
+//-------------//
+// Gaudi stuff //
+//-------------//
+
+StatusCode CaloTowerGeometrySvc::queryInterface(const InterfaceID& riid,void** ppvInterface)
+{
+  if ( CaloTowerGeometrySvc::interfaceID().versionMatch(riid) ) { 
+    *ppvInterface = this;
+    return StatusCode::SUCCESS;
+  } else {
+    return AthService::queryInterface(riid,ppvInterface); 
+  }
+}
+
+//-------------------------//
+// Initialize and Finalize //
+//-------------------------//
+
+StatusCode CaloTowerGeometrySvc::initialize()
+{
+  // set up services and managers
+  if ( f_setupSvc().isFailure() ) {
+    ATH_MSG_ERROR("Cannot allocate the calorimeter detector description manager");
+    return StatusCode::FAILURE;
+  }
+
+  // prepare FCal segmentation 
+  m_ndxFCal[0] = m_fcal1Xslice; m_ndxFCal[1] = m_fcal2Xslice; m_ndxFCal[2] = m_fcal3Xslice;
+  m_ndyFCal[0] = m_fcal1Yslice; m_ndyFCal[1] = m_fcal2Yslice; m_ndyFCal[2] = m_fcal3Yslice;
+  for ( uint_t i(0); i<m_ndxFCal.size(); ++i ) { m_wgtFCal[i] = 1./(m_ndxFCal.at(i)*m_ndyFCal.at(i)); }
+
+  // other derived quantities
+  if ( m_towerEtaBins > 0 ) { 
+    m_towerEtaWidth = (m_towerEtaMax-m_towerEtaMin)/((double)m_towerEtaBins); 
+  } else {
+    ATH_MSG_ERROR("Number of tower eta bins is invalid (" << m_towerEtaBins << " bins)");
+    return StatusCode::FAILURE;
+  }
+  if ( m_towerPhiBins > 0 ) { 
+    m_towerPhiWidth = (m_towerPhiMax-m_towerPhiMin)/((double)m_towerPhiBins);
+  } else {
+    ATH_MSG_ERROR("Number of tower phi bins is invalid (" << m_towerPhiBins << " bins)");
+    return StatusCode::FAILURE;
+  }
+
+  m_towerBins     = m_towerEtaBins*m_towerPhiBins;
+  m_towerArea     = m_towerEtaWidth*m_towerPhiWidth;
+  m_maxCellHash   = f_caloDDM()->element_size()-1;
+  m_numberOfCells = f_caloDDM()->element_size(); 
+
+  ATH_MSG_INFO( CaloRec::Helpers::fmtMsg("Tower description - Eta(bins,min,max,width) = (%3zu,%6.3f,%6.3f,%6.4f)",m_towerEtaBins,m_towerEtaMin,m_towerEtaMax,m_towerEtaWidth) );
+  ATH_MSG_INFO( CaloRec::Helpers::fmtMsg("Tower description - Phi(bins,min,max,width) = (%3zu,%6.3f,%6.3f,%6.4f)",m_towerPhiBins,m_towerPhiMin,m_towerPhiMax,m_towerPhiWidth) );
+  ATH_MSG_INFO( CaloRec::Helpers::fmtMsg("Tower description - maximum number of towers %5zu; (eta,phi)-space area %6.4f; maximum cell hash index %6zu",m_towerBins,m_towerArea,m_maxCellHash) );
+
+  if ( this->msgLvl(MSG::VERBOSE) ) {
+    std::vector<std::string> logger; logger.reserve(m_towerBins+10);
+    logger.push_back(CaloRec::Helpers::fmtMsg("[CaloTowerGeometrySvc::%s] +-------- Tower Index Mapping ---------+------------+------------+",this->name().c_str()));
+    logger.push_back(CaloRec::Helpers::fmtMsg("[CaloTowerGeometrySvc::%s] | %10.10s | %10.10s | %10.10s | %10.10s | %10.10s |",this->name().c_str(),"TowerIndex", " EtaIndex ", " PhiIndex ","     Eta     ","     Phi    "));
+    logger.push_back(CaloRec::Helpers::fmtMsg("[CaloTowerGeometrySvc::%s] +------------+------------+------------+------------+------------+",this->name().c_str()));
+    for ( size_t i(0); i<m_towerBins; ++i ) { 
+      size_t etaIndex(this->etaIndexFromTowerIndex(i));
+      size_t phiIndex(this->phiIndexFromTowerIndex(i));
+      double eta(this->towerEta(i)); double phi(this->towerPhi(i));
+      logger.push_back(CaloRec::Helpers::fmtMsg("[CaloTowerGeometrySvc::%s] |    %5zu   |    %5zu   |    %5zu   |   %6.3f   |   %6.3f   |",this->name().c_str(),i,etaIndex,phiIndex,eta,phi));
+    }
+    logger.push_back(CaloRec::Helpers::fmtMsg("[CaloTowerGeometrySvc::%s] +------------+------------+------------+------------+------------+",this->name().c_str()));
+    // 
+    std::string logFileName = m_logFileName+"."+this->name()+".dat";
+    std::ofstream logfile;
+    logfile.open(logFileName); for ( auto mlog : logger ) { logfile << mlog << std::endl; } logfile.close();
+  }
+  return f_setupTowerGrid(); 
+}
+
+StatusCode CaloTowerGeometrySvc::finalize()
+{ return StatusCode::SUCCESS; }
+
+//-------//
+// Setup //
+//-------//
+
+StatusCode CaloTowerGeometrySvc::f_setupTowerGrid()
+{
+  // initialized
+  if ( m_maxCellHash == 0 ) { 
+    ATH_MSG_ERROR("Service not initialized? Maximum cell hash is " << m_maxCellHash ); 
+    return StatusCode::FAILURE;
+  }
+
+  // payload template
+  elementvector_t ev;
+
+  // set up lookup table
+  ATH_MSG_INFO( "Setting up cell-to-tower lookup for " << m_numberOfCells << " calorimeter cells" );
+  m_towerLookup.resize(m_numberOfCells,ev);
+
+  // dump projections 
+  std::ofstream logger;
+  if ( msgLvl(MSG::DEBUG) ) { 
+    logger.open(CaloRec::Helpers::fmtMsg("%s.calocellprojections_dump.dat",this->name().c_str()));
+    logger << CaloRec::Helpers::fmtMsg("############################################################################") << std::endl;
+    logger << CaloRec::Helpers::fmtMsg("## CaloCell projections onto %3.1f x %3.1f tower grid (projective cells only) ##",m_towerEtaWidth,m_towerPhiWidth) << std::endl;
+    logger << CaloRec::Helpers::fmtMsg("############################################################################") << std::endl; 
+    logger << std::endl;
+  }
+
+  // loop cells
+  for ( auto fcell(m_caloDDM->element_begin()); fcell != m_caloDDM->element_end(); ++fcell ) {
+    // reference cell descriptor
+    const CaloDetDescrElement* pCaloDDE = *fcell; 
+    // check hash id validity
+    index_t cidx(pCaloDDE->calo_hash());
+    if ( cidx >= m_towerLookup.size() ) { 
+      ATH_MSG_WARNING( "Cell hash identifier out of range " << cidx << "/" << m_towerLookup.size() << ", ignore cell" );
+    } else {
+      if ( pCaloDDE->is_lar_fcal() ) { 
+	if ( this->f_setupTowerGridFCal(pCaloDDE,logger).isFailure() ) { return StatusCode::FAILURE; }
+      } else {
+	if ( this->f_setupTowerGridProj(pCaloDDE,logger).isFailure() ) { return StatusCode::FAILURE; }
+      } 
+    } // cell hash in range?    
+  } // loop cell descriptors
+  if ( logger.is_open() ) { logger.close(); }
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode CaloTowerGeometrySvc::f_setupTowerGridFCal(const CaloDetDescrElement* pCaloDDE,std::ofstream& /*logger*/)
+{
+  //-----------------------------------------------------------------------------------------//
+  // FCal special - the rectangular (in linear space) calorimeter cells are sub-divided into //
+  // small cells and then shared across as many towers as the small cells cover.             //
+  //-----------------------------------------------------------------------------------------//
+
+  // collect geometrical variables
+  int    cLayer(pCaloDDE->getLayer()-1);   // FCal layer number 1..3 -> array indices 0..2
+
+  double cXpos(pCaloDDE->x());             // FCal cell x position (cell center)             
+  double cYpos(pCaloDDE->y());             // FCal cell y position (cell center)
+  double cZpos(pCaloDDE->z());             // FCal cell z position (cell center)
+  double cZpos2(cZpos*cZpos); 
+
+  double cXwid(pCaloDDE->dx());            // FCal cell x full width 
+  double cYwid(pCaloDDE->dy());            // FCal cell y full width 
+
+  // double xSlice(cXwid/m_ndxFCal[cLayer]);  // FCal cell x slize width
+  // double ySlice(cYwid/m_ndyFCal[cLayer]);  // FCal cell y slice width
+  double cWght(m_wgtFCal[cLayer]);         // FCal cell geometrical (signal) weight
+
+  int nXslice((int)m_ndxFCal[cLayer]);     // FCal number of x slices
+  int nYslice((int)m_ndyFCal[cLayer]);     // FCal number of y slices
+  double cXstp(cXwid/((double)nXslice));   // FCal slice x width
+  double cYstp(cYwid/((double)nYslice));   // FCal slice y width 
+
+  // fill cell fragments
+  //  double xoff(cXpos-cXwid/2.+cXstp/2.); double yoff(cYpos-cYwid/2.+cYstp/2.);
+  double x(cXpos-(cXwid-cXstp)/2.); 
+  double xlim(cXpos+cXwid/2.); double ylim(cYpos+cYwid/2.);
+  double etaOrig(0.); 
+  //  for ( int ix(0); ix < nXslice; ++ix ) {
+  //   double x(xoff+ix*cXstp);
+  while ( x < xlim ) { 
+    //    for ( int iy(0); iy < nYslice; ++iy ) { 
+    //      double y(yoff+iy*cYstp);
+    double y(cYpos-(cYwid-cYstp)/2.);
+    while ( y < ylim ) { 
+      double r(std::sqrt(x*x+y*y+cZpos2));
+      double eta(-0.5*std::log((r-cZpos)/(r+cZpos)));
+      bool etaAdjusted(false);
+      if ( m_adjustEta ) { 
+	if ( eta < m_towerEtaMin ) {
+	  etaAdjusted = true;
+	  etaOrig     = eta;
+	  eta = m_towerEtaMin+m_towerEtaWidth/2.; 
+	} else if ( eta > m_towerEtaMax ) {
+	  etaAdjusted = true;
+	  etaOrig     = eta;
+	  eta = m_towerEtaMax-m_towerEtaWidth/2.;
+	}
+      }
+      double phi(CaloPhiRange::fix(std::atan2(y,x)));
+      index_t towerIdx(this->towerIndex(eta,phi));
+      // tower index not valid
+      if ( isInvalidIndex(towerIdx) ) { 
+	ATH_MSG_WARNING("Found invalid tower index for FCal cell (eta,phi) = (" << eta << "," << phi << ") at (x,y,z) = (" << x << "," << y << "," << cZpos << ") [cell ignored]");
+      } else { 
+	// add tower to lookup
+	if ( etaAdjusted ) { 
+	  ATH_MSG_WARNING("FCal cell direction (eta,phi) = (" << etaOrig << "," << phi << ") for cell at (x,y,z) = (" 
+			  << x << "," << y << "," << cZpos << ") adjusted to (eta,phi) = (" << eta << "," << phi << ") [cell adjusted]");
+	}
+	f_assign(pCaloDDE->calo_hash(),towerIdx,cWght);
+      } // tower index ok
+      y += cYstp;
+    } // loop on y fragments
+    x += cXstp;
+  } // loop on x fragments
+  return StatusCode::SUCCESS;
+}
+
+StatusCode CaloTowerGeometrySvc::f_setupTowerGridProj(const CaloDetDescrElement* pCaloDDE,std::ofstream& logger)
+{
+  // projective readout calos - collect geometrical variables
+  double cEtaPos(pCaloDDE->eta_raw());            // projective cell center in pseudorapidity
+  double cEtaWid(pCaloDDE->deta());               // projective cell width in pseudorapidity
+  double cPhiPos(pCaloDDE->phi_raw());            // projective cell center in azimuth
+  double cPhiWid(pCaloDDE->dphi());               // projective cell width in azimuth
+
+  // check cell-tower overlap area fractions
+  uint_t kEta(static_cast<uint_t>(cEtaWid/m_towerEtaWidth+0.5)); kEta = kEta == 0 ? 1 : kEta; // fully contained cell may have 0 fragments (protection)
+  uint_t kPhi(static_cast<uint_t>(cPhiWid/m_towerPhiWidth+0.5)); kPhi = kPhi == 0 ? 1 : kPhi; 
+
+  // print out
+  if ( kEta > 1 || kPhi > 1 ) {
+    ATH_MSG_VERBOSE("Found cell [" << pCaloDDE->calo_hash() << "/0x" << std::hex << pCaloDDE->identify().get_compact() << std::dec << "] spawning several towers."
+		    << " Neta = " << kEta << ", Nphi = " << kPhi );
+  }
+  
+  // share cells
+  double cWght(1./((double)kEta*kPhi));          // area weight
+  double sEta(cEtaWid/((double)kEta));           // step size (pseudorapidity)
+  double sPhi(cPhiWid/((double)kPhi));           // step size (azimuth)
+  double oEta(cEtaPos-sEta/2.);                  // offset (pseudorapidity)
+  double oPhi(cPhiPos-sPhi/2.);                  // offset (azimuth)
+
+  // loop over cell fragments
+  for ( uint_t ie(1); ie<=kEta; ++ie ) {
+    double ceta(oEta+((double)ie-0.5)*sEta);     // eta of fragment
+    for ( uint_t ip(1); ip<=kPhi; ++ip ) {
+      double cphi(oPhi+((double)ip-0.5)*sPhi);   // phi fragment
+      // tower index
+      index_t towerIdx(this->towerIndex(ceta,cphi));
+      if ( isInvalidIndex(towerIdx) ) { 
+	ATH_MSG_ERROR("Found invalid tower index for non-FCal cell (id,eta,phi) = (" << pCaloDDE->calo_hash() << "," << ceta << "," << cphi << ")");
+	return StatusCode::FAILURE;
+      } // invalid tower index
+      //      m_towerLookup[pCaloDDE->calo_hash()].emplace_back(towerIdx,cWght); // add to tower lookup
+      f_assign(pCaloDDE->calo_hash(),towerIdx,cWght);
+      if ( logger.is_open() ) { 
+	double el(this->towerEta(towerIdx)-this->etaWidth()/2.); double eh(this->towerEta(towerIdx)+this->etaWidth()/2.);
+	double pl(this->towerPhi(towerIdx)-this->phiWidth()/2.); double ph(this->towerPhi(towerIdx)+this->phiWidth()/2.);
+	if ( cEtaPos >= el && cEtaPos <= eh && cPhiPos >= pl && cPhiPos <= ph ) { 
+	  logger << CaloRec::Helpers::fmtMsg("Cell [%6zu] at (%6.3f,%6.3f) in Sampling %10.10s contributes to tower [%5zu] at ([%6.3f,%6.3f],[%6.3f,%6.3f]) with weight %6.4f [IN_BOUNDS]",
+					     (size_t)pCaloDDE->calo_hash(),cEtaPos,cPhiPos,CaloRec::Lookup::getSamplingName(pCaloDDE->getSampling()).c_str(),towerIdx,el,eh,pl,ph,cWght) << std::endl;
+	} else { 
+	  logger << CaloRec::Helpers::fmtMsg("Cell [%6zu] at (%6.3f,%6.3f) in Sampling %10.10s contributes to tower [%5zu] at ([%6.3f,%6.3f],[%6.3f,%6.3f]) with weight %6.4f [OUT_OF_BOUNDS]",
+					     (size_t)pCaloDDE->calo_hash(),cEtaPos,cPhiPos,CaloRec::Lookup::getSamplingName(pCaloDDE->getSampling()).c_str(),towerIdx,el,eh,pl,ph,cWght) << std::endl;
+	}
+      } // debugging central region
+    } // phi fragment loop
+  } // eta fragment loop
+  return StatusCode::SUCCESS;
+} 
+
+//------//
+// Fill //
+//------//
+
+double CaloTowerGeometrySvc::f_assign(IdentifierHash cellHash,index_t towerIdx,double wght) 
+{
+  // check if cell-tower already related
+  uint_t cidx(static_cast<uint_t>(cellHash));
+  for ( element_t& elm : m_towerLookup.at(cidx) ) { 
+    if ( towerIndex(elm) == towerIdx ) { std::get<1>(elm) += wght; return cellWeight(elm); }  
+  }
+  // not yet related
+  m_towerLookup[cidx].emplace_back(towerIdx,wght);
+  return cellWeight(m_towerLookup.at(cidx).back()); 
+}
+
+//--------//
+// Access //
+//--------//
+
+StatusCode CaloTowerGeometrySvc::access(const CaloCell* pCell,std::vector<index_t>& towerIdx,std::vector<double>& towerWghts) const
+{ return this->access(f_caloDDE(pCell)->calo_hash(),towerIdx,towerWghts); }
+
+StatusCode CaloTowerGeometrySvc::access(IdentifierHash cellHash,std::vector<index_t>& towerIdx,std::vector<double>& towerWghts) const 
+{
+  towerIdx.clear();
+  towerWghts.clear();
+
+  uint_t cidx(static_cast<uint_t>(cellHash));
+
+  if ( cidx >= m_towerLookup.size() ) { 
+    ATH_MSG_WARNING("Invalid cell hash index " << cellHash << ", corresponding index " << cidx << " not found in tower lookup");
+    return StatusCode::SUCCESS;
+  }
+
+  if ( towerIdx.capacity()   < m_towerLookup.at(cidx).size() ) { towerIdx.reserve(m_towerLookup.at(cidx).size());   }
+  if ( towerWghts.capacity() < m_towerLookup.at(cidx).size() ) { towerWghts.reserve(m_towerLookup.at(cidx).size()); }
+
+  for ( const auto& elm : m_towerLookup.at(cidx) ) { towerIdx.push_back(towerIndex(elm)); towerWghts.push_back(cellWeight(elm)); }
+
+  return StatusCode::SUCCESS;
+}
+
+CaloTowerGeometrySvc::elementvector_t CaloTowerGeometrySvc::getTowers(const CaloCell* pCell) const
+{ return pCell != 0 ? this->getTowers(f_caloDDE(pCell)->calo_hash()) : elementvector_t(); }
+
+CaloTowerGeometrySvc::elementvector_t CaloTowerGeometrySvc::getTowers(IdentifierHash cellHash) const
+{
+  // check input
+  uint_t cidx(static_cast<uint_t>(cellHash)); 
+  if ( cidx >= m_towerLookup.size() ) { 
+    ATH_MSG_WARNING( CaloRec::Helpers::fmtMsg("invalid cell hash %6zu beyond range (max hash is %6zu)",cidx,m_maxCellHash) ); 
+    return elementvector_t();
+  } else {
+    return m_towerLookup.at(cidx);
+  }
+} 
+
+//-----------------------//
+// Tower Geometry Helper //
+//-----------------------//
+
+double CaloTowerGeometrySvc::cellWeight(IdentifierHash cellHash,index_t towerIdx) const
+{
+  index_t cidx(static_cast<uint_t>(cellHash));
+  double cwght(0.);
+
+  if ( cidx < m_towerLookup.size() ) {
+    for ( auto elm : m_towerLookup.at(cidx) ) { 
+      if ( towerIndex(elm) == towerIdx ) { cwght = cellWeight(elm); break; } 
+    } 
+  }
+  return cwght;
+}
+
+//---------------//
+// Index Helpers //
+//---------------//
+
+CaloTowerGeometrySvc::index_t CaloTowerGeometrySvc::etaIndex(IdentifierHash cellHash) const
+{
+  const auto cdde = f_caloDDE(cellHash); 
+  return cdde != 0 ? etaIndex(cdde->eta()) : invalidIndex(); 
+}
+
+CaloTowerGeometrySvc::index_t CaloTowerGeometrySvc::etaIndex(double eta) const
+{ 
+  return eta >= m_towerEtaMin && eta <= m_towerEtaMax 
+    ? index_t(std::min(static_cast<uint_t>((eta-m_towerEtaMin)/m_towerEtaWidth),m_towerEtaBins-1))
+    : invalidIndex(); 
+}
+
+CaloTowerGeometrySvc::index_t CaloTowerGeometrySvc::phiIndex(IdentifierHash cellHash) const
+{
+  const auto cdde = f_caloDDE(cellHash);
+  return cdde != 0 ? phiIndex(cdde->phi()) : invalidIndex(); 
+}
+
+CaloTowerGeometrySvc::index_t CaloTowerGeometrySvc::phiIndex(double phi) const
+{
+  double dphi(CaloPhiRange::diff(phi,m_towerPhiMin));
+  return dphi >= m_towerPhiMin && dphi <= m_towerPhiMax 
+    ? index_t(std::min(static_cast<uint_t>((phi-m_towerPhiMin)/m_towerPhiWidth),m_towerPhiBins-1))
+    : invalidIndex();
+}
diff --git a/Calorimeter/CaloRec/src/CaloTowerGeometrySvc.h b/Calorimeter/CaloRec/src/CaloTowerGeometrySvc.h
new file mode 100644
index 000000000000..6d2f445548ea
--- /dev/null
+++ b/Calorimeter/CaloRec/src/CaloTowerGeometrySvc.h
@@ -0,0 +1,414 @@
+// -*- c++ -*-
+#ifndef CALOREC_CALOTOWERGEOMETRYSVC_H
+#define CALOREC_CALOTOWERGEOMETRYSVC_H
+
+/* Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */
+
+#include "AthenaBaseComps/AthService.h"
+
+#include "Identifier/IdentifierHash.h"
+
+#include "CaloGeoHelpers/CaloPhiRange.h"
+
+#include "CaloDetDescr/CaloDetDescrElement.h"
+#include "CaloDetDescr/CaloDetDescrManager.h"
+
+#include "CaloEvent/CaloCell.h"
+
+#include <string>
+#include <vector>
+#include <cmath>
+#include <array>
+#include <tuple>
+#include <fstream>
+
+///@name Forward declarations
+///@{
+///template<class T> class SvcFactory;
+///@}
+
+///@brief Interface accessor for @c CaloTowerGeometrySvc
+static const InterfaceID IID_CaloTowerGeometrySvc( "CaloTowerGeometrySvc", 1, 0 );
+
+class CaloTowerGeometrySvc : public AthService
+{
+protected:
+
+  ///@brief To allow interface queries by the service factory (?)
+  friend class SvcFactory<CaloTowerGeometrySvc>;
+
+public:
+
+  ///@name Gaudi interfaces and implementations
+  ///@{
+  static const InterfaceID& interfaceID() { return IID_CaloTowerGeometrySvc; }      ///< Interface indentifier needed by Gaudi
+  virtual StatusCode queryInterface(const InterfaceID& riid, void** ppcInterface);  ///< Interface query with fallbacks
+  ///@}
+
+  ///@{
+  typedef std::size_t                  uint_t;           ///< Type for unsigned integer
+  typedef IdentifierHash::value_type   index_t;          ///< Type for scalar (pseudorapidity,azimuth) index (is an unsigned int type)
+  typedef std::tuple<index_t,index_t>  towerindex_t;     ///< Type for composite (tower) index 
+  typedef std::tuple<index_t,double>   element_t;        ///< Type storing tower index and geometrical weight
+  typedef std::vector<element_t>       elementvector_t;  ///< Type for list of elements holding tower index and list of weights
+  typedef std::vector<elementvector_t> elementmap_t;     ///< Type for lists of lists of elements (lookup table type) 
+  ///@}
+
+  ///@brief Standard constructor
+  ///
+  /// Constructs towergrid as defined by properties.
+  ///
+  ///@param[in] name name of service (implementation of @c Gaudi::Service )
+  ///@param[in] pSvc pointer to service locator (from configuration framework)
+  CaloTowerGeometrySvc(const std::string& name,ISvcLocator* pSvc);
+  ///@brief Base class destructor
+  virtual ~CaloTowerGeometrySvc() { };
+
+  ///@name Implementation of (Ath)Service interfaces
+  ///@{
+  virtual StatusCode initialize() override;                                      ///< Initialize service
+  virtual StatusCode finalize()   override;                                      ///< Finalize service
+  //  virtual StatusCode queryInterface(const InterfaceID& iid,void** ppvInterface); ///< Need to fix compiler issue (FIXME)   
+  ///@}
+
+  // --- Full documentation of this block after end of class definition!
+  ///@name Retrieve towers for cells
+  ///@{
+  StatusCode      access(const CaloCell* pCell,std::vector<index_t>& towerIdx,std::vector<double>& towerWghts)   const;
+  StatusCode      access(IdentifierHash cellHash,std::vector<index_t>& towerIdx,std::vector<double>& towerWghts) const;
+  elementvector_t getTowers(const CaloCell* pCell)                                                               const;
+  elementvector_t getTowers(IdentifierHash cellHash)                                                             const; 
+  ///@}
+
+  ///@name Tower bin descriptors and other size information
+  ///@{
+  uint_t maxCellHash()      const; ///< Maximum cell hash value
+  uint_t totalNumberCells() const; ///< Total number of cells 
+  uint_t etaBins()          const; ///< Number of pseudorapidity bins
+  double etaMin()           const; ///< Lower boundary of pseudorapidity range
+  double etaMax()           const; ///< Upper boundary of pseudorapidity range 
+  double etaWidth()         const; ///< Width of pseudorapidity bin  
+  uint_t phiBins()          const; ///< Number of azimuth bins
+  double phiMin()           const; ///< Lower boundary of azimuth
+  double phiMax()           const; ///< Upper boundary of azimuth
+  double phiWidth()         const; ///< Width of azimuth bin
+  uint_t towerBins()        const; ///< Total number of towers
+  double towerArea()        const; ///< Area of individual tower 
+  ///@}
+
+  ///@name Tower index calculators, translaters, manipulators and converters
+  ///@{
+  index_t etaIndex(const CaloCell* pCell)            const; ///< Get tower @f$ \eta @f$ bin index for a calorimeter cell referenced by a pointer
+  index_t etaIndex(IdentifierHash cellHash)          const; ///< Get tower @f$ \eta @f$ bin index for a calorimeter cell referenced by its hash identifier
+  index_t etaIndex(double eta)                       const; ///< Get tower @f$ \eta @f$ bin index for a given value of @f$ \eta @f$
+  index_t etaIndexFromTowerIndex(index_t towerIdx)   const; ///< Get tower @f$ \eta @f$ bin index for a given global tower index
+  index_t phiIndex(const CaloCell* pCell)            const; ///< Get tower @f$ \phi @f$ bin index for a calorimeter cell referenced by a pointer
+  index_t phiIndex(IdentifierHash cellHash)          const; ///< Get tower @f$ \phi @f$ bin index for a calorimeter cell referenced by its hash identifier
+  index_t phiIndex(double phi)                       const; ///< Get tower @f$ \phi @f$ bin index for a given value of @f$ \phi @f$
+  index_t phiIndexFromTowerIndex(index_t towerIdx)   const; ///< Get tower @f$ \phi @f$ bin index for a given global tower index
+  index_t towerIndex(const CaloCell* pCell)          const; ///< Get global tower index for a calorimeter cell referenced by a pointer
+  index_t towerIndex(IdentifierHash cellHash)        const; ///< Get global tower index for a calorimeter cell referenced by its hash identifier
+  index_t towerIndex(double eta,double phi)          const; ///< Get global tower index for a pair of @f$ (\eta,\phi) @f$ values
+  index_t towerIndex(index_t etaIdx,index_t phiIdx)  const; ///< Get global tower index for a pair of @f$ (\eta,\phi) @f$ indices
+  index_t towerIndex(const element_t& elm)           const; ///< Get global tower index from payload data
+  index_t invalidIndex()                             const; ///< Returns value of invalid index
+  bool    isInvalidIndex(index_t idx)                const; ///< Returns @c true if argument is equal to the value provided by @c invalidIndex() 
+  bool    isInvalidIndex(index_t idx,index_t maxIdx) const; ///< Returns @c true if first argument is equal to the value provided by @c invalidIndex() or if first argument is not smaller than second argument
+  bool    isInvalidEtaIndex(index_t idx)             const; ///< Returns @c true if argument is not a valid pseudorapidity index
+  bool    isInvalidPhiIndex(index_t idx)             const; ///< Returns @c true if argumant is not a valid azimuth index
+  bool    isInvalidTowerIndex(index_t idx)           const; ///< Returns @c true if argument is not a valid tower index
+  ///@}
+
+  ///@name Variable generators using tower indices
+  ///@{
+  double towerEtaLocal(index_t etaIndex)    const; ///< Return pseudorapdity from local index (bin center) 
+  double towerPhiLocal(index_t phiIndex)    const; ///< Return azimuth from local index (bin center)
+  double towerEta(index_t towerIndex)       const; ///< Return pseudorapidity from global tower index (bin center)
+  double towerPhi(index_t towerIndex)       const; ///< Return azimuth from global tower index (bin center)
+  double invalidValue()                     const; ///< Return invalid value
+  bool   isInvalidValue(double val)         const; ///< Return @c true if given value is invalid
+  ///@}
+
+  ///@name Helper functions
+  ///@{
+  double  cellWeight(const element_t& elm)                     const; ///< Retrieve cell signal weight from lookup table entry
+  double  cellWeight(IdentifierHash cellHash,index_t towerIdx) const; ///< Retrieve cell signal weight from cell identifier and tower index
+  double  cellWeight(const CaloCell* pCell, index_t towerIdx)  const; ///< Retrieve cell signal weight from pointer to cell object and tower index
+  ///@}
+
+  ///@name Access to storage
+  ///@{
+  elementmap_t::const_iterator begin() const;  ///< Iterator points to first entry in internal look-up table (only @c const access!)
+  elementmap_t::const_iterator end()   const;  ///< Iterator marks end of internal look-up table (only @c const access)  
+  size_t                       size()  const;  ///< Size of internal look-up table
+  bool                         empty() const;  ///< Internal look-up table is empty if @c true
+  ///@}
+
+private:
+
+  ///@name Helpers
+  ///@{
+  StatusCode f_setupSvc();                                                                    ///< Internally used function setting up other services needed by this service
+  StatusCode f_setupTowerGrid();                                                              ///< Internally used function setting up the lookup store
+  StatusCode f_setupTowerGridFCal(const CaloDetDescrElement* pCaloDDE,std::ofstream& logger); ///< Internally used function mapping an FCal cell onto the tower grid
+  StatusCode f_setupTowerGridProj(const CaloDetDescrElement* pCaloDDE,std::ofstream& logger); ///< Internally used function mapping a projective cell onto the tower grid
+  double     f_assign(IdentifierHash cellHash,index_t towerIdx,double wgt);                   ///< Internally used function assigning tower to cell with update of weight if same tower is already assigned
+  ///@}
+
+  ///@name Access to detector store and other services and stores
+  ///@{
+  const CaloDetDescrManager* m_caloDDM;               ///< Pointer to calorimeter detector description 
+  std::string m_logFileName;                          ///< Name of log file
+  ///@}
+
+protected:
+
+  ///@name Internal stores and derived parameters
+  ///@{
+  elementmap_t m_towerLookup;   ///< Cell-to-tower mapping lookup store
+  double       m_towerEtaWidth; ///< Width of tower bin in pseudorapidity
+  double       m_towerPhiWidth; ///< Width of tower bin in azimuth 
+  double       m_towerArea;     ///< Area of individual tower
+  uint_t       m_towerBins;     ///< Maximum number of towers
+  uint_t       m_maxCellHash;   ///< Maximum cell hash value
+  uint_t       m_numberOfCells; ///< Total number of cells 
+  ///@}
+  
+  ///@name Properties
+  ///@{
+  ///@brief Internally stored tower grid descriptors
+  uint_t m_towerEtaBins; ///< Number of @f$ \eta @f$ bins 
+  double m_towerEtaMin;  ///< Lower boundary @f$ \eta_{\rm min} @f$
+  double m_towerEtaMax;  ///< Upper boundary @f$ \eta_{\rm max} @f$
+  bool   m_adjustEta;    ///< Adjust FCal cells to eta boundary (default @c true ) 
+  uint_t m_towerPhiBins; ///< Number of @f$ \phi @f$ bins 
+  double m_towerPhiMin;  ///< Lower boundary @f$ \phi_{\rm min} @f$
+  double m_towerPhiMax;  ///< Upper boundary @f$ \phi_{\rm max} @f$
+  double m_fcal1Xslice;  ///< Number of x slices for cells in FCal1
+  double m_fcal1Yslice;  ///< Number of y slices for cells in FCal1
+  double m_fcal2Xslice;  ///< Number of x slices for cells in FCal2
+  double m_fcal2Yslice;  ///< Number of y slices for cells in FCal2
+  double m_fcal3Xslice;  ///< Number of x slices for cells in FCal3
+  double m_fcal3Yslice;  ///< Number of y slices for cells in FCal3
+  ///@} 
+
+  ///@name Process flags, helpers and numerical constants
+  ///@{
+  static index_t m_invalidIndex;                                       ///< Invalid index indicator
+  static double  m_invalidValue;                                       ///< Return value for out-of-range indices andother invalid conversions to a physical quantity
+  const CaloDetDescrManager* f_caloDDM()                        const; ///< Pointer to calorimeter detector description manager
+  const CaloDetDescrElement* f_caloDDE(const CaloCell* pCell)   const; ///< Retrieve calorimeter detector description element for a cell object referenced by a pointer
+  const CaloDetDescrElement* f_caloDDE(IdentifierHash cellHash) const; ///< Retrieve calorimeter detector description element for a given cell hash identifier
+  double f_cellEta(const CaloCell* pCell)                       const; ///< Retrieve calorimeter cell pseudorapidity for a cell object referenced by a pointer
+  double f_cellEta(IdentifierHash cellHash)                     const; ///< Retrieve calorimeter cell pseudorapidity for a given cell hash identifier
+  double f_cellPhi(const CaloCell* pCell)                       const; ///< Retrieve calorimeter cell azimuth for a cell object referenced by a pointer
+  double f_cellPhi(IdentifierHash cellHash)                     const; ///< Retrieve calorimeter cell azimuth for a given cell hash identifier
+  ///@}
+
+  ///@name Stores
+  ///@{
+  std::array<double,3> m_ndxFCal; ///< Stores number of fragments along x for each FCal module
+  std::array<double,3> m_ndyFCal; ///< Stores number of fragments along y for each FCal module
+  std::array<double,3> m_wgtFCal; ///< Stores geometrical weights
+  ///@}
+};
+
+//-------------------------------------------------//
+// Documentation for grouped methods and functions //
+// (removed from before/after method for better    //
+// formatting by doxygen in html).                 //
+//-------------------------------------------------//
+
+///@fn StatusCode CaloTowerGeometrySvc::access(const CaloCell* pCell,std::vector<index_t>& towerIdx,std::vector<double>& towerWghts) const
+///
+///@brief Retrieve the list of towers associated with a calorimeter cell referenced by a pointer
+///
+/// The tower indices and weights are returned in two index-parallel vectors. 
+/// Previous content of these two vectors is removed if this method finds towers for the cell. 
+/// 
+///@return Returns @c StatusCode::SUCCESS if list of towers found, else @s StatusCode::FAILURE.
+///
+///@param[in] pCell      pointer to non-modifiable @c CaloCell object.
+///@param[in] towerIdx   reference to modifiable vector of indices (payload type @c index_t ); vector is filled if cell is successfully mapped. 
+///@param[in] towerWghts reference to modifiable vector of weights (payload type @c double ); vector is filled if cell is successfully mapped. 
+
+///@fn StatusCode CaloTowerGeometrySvc::access(IdentifierHash cellHash,std::vector<index_t>& towerIdx,std::vector<double>& towerWghts) const;
+///
+///@brief Retrieve the list of towers associated with a calorimeter cell referenced its hash identifier
+///
+/// The tower indices and weights are returned in two index-parallel vectors. 
+/// Previous content of these two vectors is removed if this method finds towers for the cell. 
+/// 
+///@return Returns @c StatusCode::SUCCESS if list of towers found, else @s StatusCode::FAILURE.
+///
+///@param[in] cellHash   hash identifier referencing a calorimeter cell.
+///@param[in] towerIdx   reference to modifiable vector of indices (payload type @c index_t ); vector is filled if cell is successfully mapped. 
+///@param[in] towerWghts reference to modifiable vector of weights (payload type @c double ); vector is filled if cell is successfully mapped.
+
+///@fn CaloTowerGeometrySvc::elementvector_t CaloTowerGeometrySvc::getTowers(const CaloCell* pCell) const;
+///
+///@brief Retrieve the list of towers associated with a calorimeter cell referenced by a pointer
+/// 
+///@return Returns a vector of (index,weight) pairs as a @c elementvector_t container. The container is empty
+/// if the cell does not have any overlap with a tower.
+///
+///@param[in] pCell      pointer to non-modifiable @c CaloCell object.
+
+///@fn CaloTowerGeometrySvc::elementvector_t CaloTowerGeometrySvc::getTowers(IdentifierHash cellHash) const; 
+///
+///@brief Retrieve the list of towers associated with a calorimeter cell referenced by its hash identifier
+///
+///@return Returns a vector of (index,weight) pairs as a @c elementvector_t container. The container is empty
+/// if the cell does not have any overlap with a tower.
+///
+///@param[in] cellHash   hash identifier referencing a calorimeter cell.
+
+//---------------------//
+// Class documentation //
+//---------------------//
+
+/// @class CaloTowerGeometrySvc
+///
+/// @brief Tower geometry store and description provider
+///
+/// This service sets up a lookup table storing the geometrical area overlap fraction of a calorimeter cell
+/// with towers in a given grid. This lookup table is set up at instantiation of the service. It can only be 
+/// defined at that time. The default setup is a @f$ \Delta\eta\times\Delta\phi = 0.1 \times \pi/32 @f$ grid.
+/// Any regular grid can be constructed. The grid definition can be provided as property.
+///
+/// The cell-to-tower information is stored internally as a (random access) lookup table. For a given cell,
+/// the hash index is used to retrieve a list of towers this cell overlaps with, and the overlap paramater
+/// (area fraction used as a geometrical weight). This indices and geometrical weights are represented by
+/// a list of pairs of @c int and @c double numbers. Each cell can potential overlap with more than one 
+/// tower. A more detailed description of towers and the geometrical overlap is available on the
+/// <a href="https://twiki.cern.ch/twiki/bin/view/AtlasSandboxProtected/CaloTowerPerformance">calorimeter tower project page</a>.  
+///
+/// The lookup table is implemented for random access and using the cell hash identifier to retrieve the 
+/// requested list of twoer indices and weights. Several retrieval mechanisms are supported (see documentation
+/// of the corresponding methods). 
+///
+/// To map the azimuth of a cell to a tower, @f$ -\pi < \phi < \pi @f$ is used (ATLAS standard). For
+/// consistency, all @f$ \phi @f$ values are mapped into this range. 
+///
+/// The service inherits from @c AthService and thus from the @c Service base class in Gaudi. The managed tower grid
+/// is defined by service properties, with the following naming convention:  
+/// - pseudorapidity range
+///     - number of bins <tt>TowerEtaBins</tt> (default 100)
+///     - lower boundary of pseudorapidity range <tt>TowerEtaMin</tt> (default -5.0)
+///     - upper boundary of pseudorapidity range <tt>TowerEtaMax</tt> (default  5.0)
+/// - azimuth range
+///     - number of bins <tt>TowerPhiBins</tt> (default 64)
+///     - lower boundary of azimuthal range <tt>TowerPhiMin</tt> (default -&pi;)
+///     - upper boundary of azimuthal range <tt>TowerPhiMax</tt> (default &pi;) 
+/// 
+/// Addtional properties of this service define the granularity of the cell splitting in the ATLAS FCal. This
+/// is used to map the FCal readout cells (rectangular slabs) onto the tower grid and calculate the geometrical
+/// (area) overlap fraction, which is used to distribute the cell energy to the towers. 
+/// - horizontal FCal cell splitting (along @a x axis)
+///     - number of @a x slices in FCal1 <tt>FCal1NSlicesX</tt> (default 4)
+///     - number of @a x slices in FCal2 <tt>FCal2NSlicesX</tt> (default 4)
+///     - number of @a x slices in FCal3 <tt>FCal3NSlicesX</tt> (default 6)
+/// - vertical FCal cell splitting (along @a y axis)
+///     - number of @a y slices in FCal1 <tt>FCal1NSlicesY</tt> (default 4)
+///     - number of @a y slices in FCal2 <tt>FCal2NSlicesY</tt> (default 6)
+///     - number of @a y slices in FCal3 <tt>FCal3NSlicesY</tt> (default 6)
+///
+/// @warning It is recommended to @b not change the parameters for the FCal cell slicing. This configuration option is provided for expert use for R & D purposes only.   
+///  
+/// @todo Allow regional grids (varying segmentation as function of @f$ \eta @f$ . This requires additional interfaces (or interface changes) and 
+///       and modifications of the index construction.
+///
+/// @author Peter Loch <loch@physics.arizona.edu>
+///
+
+//------------------//
+// Inline Functions //
+//------------------//
+
+//---------------------------//
+// Control and configuration //
+//---------------------------//
+inline CaloTowerGeometrySvc::index_t CaloTowerGeometrySvc::invalidIndex() const { return m_invalidIndex; }
+inline StatusCode CaloTowerGeometrySvc::f_setupSvc() { 
+  m_caloDDM = CaloDetDescrManager::instance(); 
+  return f_caloDDM() != 0 ? StatusCode::SUCCESS : StatusCode::FAILURE; 
+}
+
+//------------------------------------//
+// Public access to tower descriptors //
+//------------------------------------//
+inline CaloTowerGeometrySvc::uint_t CaloTowerGeometrySvc::maxCellHash()      const { return m_maxCellHash;   }
+inline CaloTowerGeometrySvc::uint_t CaloTowerGeometrySvc::totalNumberCells() const { return m_numberOfCells; }  
+
+inline CaloTowerGeometrySvc::uint_t CaloTowerGeometrySvc::etaBins()          const { return m_towerEtaBins;  }
+inline double                       CaloTowerGeometrySvc::etaMin()           const { return m_towerEtaMin;   }
+inline double                       CaloTowerGeometrySvc::etaMax()           const { return m_towerEtaMax;   }
+inline double                       CaloTowerGeometrySvc::etaWidth()         const { return m_towerEtaWidth; }
+
+inline CaloTowerGeometrySvc::uint_t CaloTowerGeometrySvc::phiBins()          const { return m_towerPhiBins;  }
+inline double                       CaloTowerGeometrySvc::phiMin()           const { return m_towerPhiMin;   }
+inline double                       CaloTowerGeometrySvc::phiMax()           const { return m_towerPhiMax;   }
+inline double                       CaloTowerGeometrySvc::phiWidth()         const { return m_towerPhiWidth; }
+
+inline CaloTowerGeometrySvc::uint_t CaloTowerGeometrySvc::towerBins()        const { return m_towerBins;     }
+inline double                       CaloTowerGeometrySvc::towerArea()        const { return m_towerArea;     } 
+
+//----------------//
+// Index checking //
+//----------------//
+inline bool CaloTowerGeometrySvc::isInvalidIndex(index_t idx)                const { return idx == invalidIndex(); }
+inline bool CaloTowerGeometrySvc::isInvalidIndex(index_t idx,index_t maxIdx) const { return idx == invalidIndex() || idx >= maxIdx; }
+inline bool CaloTowerGeometrySvc::isInvalidEtaIndex(index_t idx)             const { return isInvalidIndex(idx,m_towerEtaBins); }
+inline bool CaloTowerGeometrySvc::isInvalidPhiIndex(index_t idx)             const { return isInvalidIndex(idx,m_towerPhiBins); }
+inline bool CaloTowerGeometrySvc::isInvalidTowerIndex(index_t idx)           const { return isInvalidIndex(idx,m_towerBins); }
+
+//------------------------------//
+// Index retrieval/construction //
+//------------------------------// 
+inline CaloTowerGeometrySvc::index_t CaloTowerGeometrySvc::etaIndex(const CaloCell* pCell)           const { return etaIndex(pCell->eta()); }
+inline CaloTowerGeometrySvc::index_t CaloTowerGeometrySvc::phiIndex(const CaloCell* pCell)           const { return phiIndex(pCell->phi()); }
+
+inline CaloTowerGeometrySvc::index_t CaloTowerGeometrySvc::towerIndex(IdentifierHash cellHash)       const { return towerIndex(etaIndex(cellHash),phiIndex(cellHash)); }
+inline CaloTowerGeometrySvc::index_t CaloTowerGeometrySvc::towerIndex(double eta,double phi)         const { return towerIndex(etaIndex(eta),phiIndex(phi)); }
+inline CaloTowerGeometrySvc::index_t CaloTowerGeometrySvc::towerIndex(index_t etaIdx,index_t phiIdx) const { return !isInvalidEtaIndex(etaIdx) && !isInvalidPhiIndex(phiIdx) ? phiIdx+etaIdx*m_towerPhiBins :  invalidIndex(); } 
+inline CaloTowerGeometrySvc::index_t CaloTowerGeometrySvc::towerIndex(const CaloCell* pCell)         const { return towerIndex(pCell->eta(),pCell->phi()); }
+inline CaloTowerGeometrySvc::index_t CaloTowerGeometrySvc::towerIndex(const element_t& elm)          const { return std::get<0>(elm); }
+
+inline CaloTowerGeometrySvc::index_t CaloTowerGeometrySvc::etaIndexFromTowerIndex(index_t towerIdx)  const { return (index_t)(towerIdx/phiBins()); }
+inline CaloTowerGeometrySvc::index_t CaloTowerGeometrySvc::phiIndexFromTowerIndex(index_t towerIdx)  const { return (index_t)(towerIdx%phiBins()); } 
+
+//-----------------------------//
+// Access to tower description //
+//-----------------------------//
+
+inline double CaloTowerGeometrySvc::invalidValue()                const { return m_invalidValue; }
+inline bool   CaloTowerGeometrySvc::isInvalidValue(double val)    const { return val == invalidValue(); }
+inline double CaloTowerGeometrySvc::towerEtaLocal(index_t etaIdx) const { return !isInvalidEtaIndex(etaIdx) ? etaMin()+(static_cast<double>(etaIdx)+0.5)*etaWidth() : invalidValue(); }
+inline double CaloTowerGeometrySvc::towerPhiLocal(index_t phiIdx) const { return !isInvalidPhiIndex(phiIdx) ? phiMin()+(static_cast<double>(phiIdx)+0.5)*phiWidth() : invalidValue(); }
+inline double CaloTowerGeometrySvc::towerEta(index_t towerIdx)    const { return towerEtaLocal(etaIndexFromTowerIndex(towerIdx)); }
+inline double CaloTowerGeometrySvc::towerPhi(index_t towerIdx)    const { return towerPhiLocal(phiIndexFromTowerIndex(towerIdx)); }  
+
+inline CaloTowerGeometrySvc::elementmap_t::const_iterator CaloTowerGeometrySvc::begin() const { return m_towerLookup.begin(); }
+inline CaloTowerGeometrySvc::elementmap_t::const_iterator CaloTowerGeometrySvc::end()   const { return m_towerLookup.end(); }
+inline size_t                                             CaloTowerGeometrySvc::size()  const { return m_towerLookup.size(); }
+inline bool                                               CaloTowerGeometrySvc::empty() const { return m_towerLookup.empty(); }
+
+//-------------------//
+// Other data access //
+//-------------------//
+inline double CaloTowerGeometrySvc::cellWeight(const CaloCell* pCell,index_t towerIdx) const { return cellWeight(pCell->caloDDE()->calo_hash(),towerIdx); }
+inline double CaloTowerGeometrySvc::cellWeight(const element_t& elm)                   const { return std::get<1>(elm); }
+
+
+//----------------------------------//
+// Internal functions and accessors //
+//----------------------------------//
+inline const CaloDetDescrManager* CaloTowerGeometrySvc::f_caloDDM()                        const { return m_caloDDM; } 
+inline const CaloDetDescrElement* CaloTowerGeometrySvc::f_caloDDE(const CaloCell* pCell)   const { return pCell->caloDDE(); }
+inline const CaloDetDescrElement* CaloTowerGeometrySvc::f_caloDDE(IdentifierHash cellHash) const { return f_caloDDM()->get_element(cellHash); }
+
+inline double CaloTowerGeometrySvc::f_cellEta(IdentifierHash cellHash) const { return f_caloDDE(cellHash)->eta(); }
+inline double CaloTowerGeometrySvc::f_cellEta(const CaloCell* pCell)   const { return pCell->eta(); } 
+inline double CaloTowerGeometrySvc::f_cellPhi(IdentifierHash cellHash) const { return CaloPhiRange::fix(f_caloDDE(cellHash)->phi()); }
+inline double CaloTowerGeometrySvc::f_cellPhi(const CaloCell* pCell)   const { return pCell->phi(); } 
+#endif
diff --git a/Calorimeter/CaloRec/src/components/CaloRec_entries.cxx b/Calorimeter/CaloRec/src/components/CaloRec_entries.cxx
index d75f56a76f9d..00e961b95874 100644
--- a/Calorimeter/CaloRec/src/components/CaloRec_entries.cxx
+++ b/Calorimeter/CaloRec/src/components/CaloRec_entries.cxx
@@ -36,6 +36,13 @@
 #include "../CaloCellContainerAliasAlg.h"
 #include "../ToolConstantsCondAlg.h"
 
+//Includes for CaloTopoTowers
+#include "../CaloTowerGeometrySvc.h"
+#include "../CaloTopoClusterTowerMerger.h"
+#include "../CaloTopoClusterFromTowerMonitor.h"
+#include "../CaloTopoTowerFromClusterCalibrator.h"
+#include "../CaloTopoTowerFromClusterMaker.h"
+#include "../CaloTopoTowerMaker.h"
 
 DECLARE_COMPONENT( CaloTowerMonitor )
 DECLARE_COMPONENT( CaloTowerAlgorithm )
@@ -80,3 +87,10 @@ DECLARE_COMPONENT (CaloThinCellsByClusterAlg)
 DECLARE_COMPONENT (CaloThinCellsBySamplingAlg)
 DECLARE_COMPONENT (CaloCellContainerAliasAlg)
 DECLARE_COMPONENT (ToolConstantsCondAlg)
+
+DECLARE_COMPONENT( CaloTopoClusterFromTowerMonitor )
+DECLARE_COMPONENT( CaloTowerGeometrySvc )
+DECLARE_COMPONENT( CaloTopoClusterTowerMerger )
+DECLARE_COMPONENT( CaloTopoTowerFromClusterMaker )
+DECLARE_COMPONENT( CaloTopoTowerFromClusterCalibrator )
+DECLARE_COMPONENT( CaloTopoTowerMaker )
diff --git a/Event/xAOD/xAODCaloEvent/xAODCaloEvent/versions/CaloCluster_v1.h b/Event/xAOD/xAODCaloEvent/xAODCaloEvent/versions/CaloCluster_v1.h
index 8df01154389b..20c06777196b 100644
--- a/Event/xAOD/xAODCaloEvent/xAODCaloEvent/versions/CaloCluster_v1.h
+++ b/Event/xAOD/xAODCaloEvent/xAODCaloEvent/versions/CaloCluster_v1.h
@@ -87,8 +87,12 @@ namespace xAOD {
          Topo_633   = 12,
          // transient cluster for AODCellContainer
          SW_7_11    = 13,
-	 //New (2016) egamma cluster
-	 SuperCluster=14,
+	     //New (2016) egamma cluster
+	     SuperCluster=14,
+         //New (2020) cluster representation of towers
+         Tower_01_01 = 15,
+         Tower_005_005 = 16,
+         Tower_fixed_area = 17,
          CSize_Unknown = 99
       };
 
-- 
GitLab


From 1fd4380025916bcd636392cec76bc9675daceef9 Mon Sep 17 00:00:00 2001
From: Xiaozhong Huang <xiaozhong.huang@cern.ch>
Date: Sat, 3 Oct 2020 08:08:12 +0800
Subject: [PATCH 147/403] tauRec: add standalone test for EMPFlow jet seed

---
 ...art_tau_fromesd_compareSerialThreadings.sh |  2 +-
 .../share/tau_standalone_EMPFlow_ESDtoAOD.py  | 42 +++++++++++++++++++
 ...D.py => tau_standalone_LCTopo_ESDtoAOD.py} |  0
 .../test_tau_standalone_EMPFlow_serial.sh     | 38 +++++++++++++++++
 ...test_tau_standalone_LCTopo_multithread.sh} |  4 +-
 ...h => test_tau_standalone_LCTopo_serial.sh} |  4 +-
 6 files changed, 85 insertions(+), 5 deletions(-)
 create mode 100644 Reconstruction/tauRec/share/tau_standalone_EMPFlow_ESDtoAOD.py
 rename Reconstruction/tauRec/share/{tau_standalone_ESDtoAOD.py => tau_standalone_LCTopo_ESDtoAOD.py} (100%)
 create mode 100755 Reconstruction/tauRec/test/test_tau_standalone_EMPFlow_serial.sh
 rename Reconstruction/tauRec/test/{test_tau_standalone_multithread.sh => test_tau_standalone_LCTopo_multithread.sh} (83%)
 rename Reconstruction/tauRec/test/{test_tau_standalone_serial.sh => test_tau_standalone_LCTopo_serial.sh} (81%)

diff --git a/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_tau_fromesd_compareSerialThreadings.sh b/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_tau_fromesd_compareSerialThreadings.sh
index 25ebd8b04f99..26fc9a25146e 100755
--- a/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_tau_fromesd_compareSerialThreadings.sh
+++ b/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_tau_fromesd_compareSerialThreadings.sh
@@ -11,4 +11,4 @@
 
 export ATHENA_CORE_NUMBER=8
 
-test_compare_SerialAndThreadedAthenas.sh tauRec/tau_standalone_ESDtoAOD.py
+test_compare_SerialAndThreadedAthenas.sh tauRec/tau_standalone_LCTopo_ESDtoAOD.py
diff --git a/Reconstruction/tauRec/share/tau_standalone_EMPFlow_ESDtoAOD.py b/Reconstruction/tauRec/share/tau_standalone_EMPFlow_ESDtoAOD.py
new file mode 100644
index 000000000000..6db4f8ab4bcd
--- /dev/null
+++ b/Reconstruction/tauRec/share/tau_standalone_EMPFlow_ESDtoAOD.py
@@ -0,0 +1,42 @@
+from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+athenaCommonFlags.FilesInput=["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/tauRec/input/standalone.ESD.pool.root"]
+
+from RecExConfig.RecFlags import rec
+rec.doEgamma.set_Value_and_Lock(False)
+rec.doMuon.set_Value_and_Lock(False)
+
+from CaloRec.CaloRecFlags import jobproperties
+jobproperties.CaloRecFlags.Enabled.set_Value_and_Lock(False)
+jobproperties.CaloRecFlags.doCaloCluster.set_Value_and_Lock(False)
+jobproperties.CaloRecFlags.doCaloTopoCluster.set_Value_and_Lock(False)
+
+#this turns off CaloCluster2xAOD
+rec.doWritexAOD.set_Value_and_Lock(False)
+#nothing to say on these
+rec.doWriteTAG.set_Value_and_Lock(False)
+rec.doTruth.set_Value_and_Lock(True)
+rec.doAODCaloCells.set_Value_and_Lock(False)
+rec.doTrigger.set_Value_and_Lock(False)
+#Turns off xAODRingSetConfWriter
+rec.doCaloRinger.set_Value_and_Lock(False)
+
+#disables VertexCnvAlg
+from InDetRecExample.InDetJobProperties import jobproperties
+jobproperties.InDetJobProperties.doxAOD.set_Value_and_Lock(False)
+#Disables AllExecutedEvents
+rec.doFileMetaData.set_Value_and_Lock(False)
+
+athenaCommonFlags.EvtMax=10
+
+# Run TauVertexFinder with TJVA on 
+from tauRec.tauRecFlags import tauFlags
+tauFlags.isStandalone.set_Value_and_Lock(True)
+tauFlags.tauRecSeedJetCollection.set_Value_and_Lock("AntiKt4EMPFlowJets")
+
+UserAlgs = ["tauRec/tauRec_jobOptions.py"]
+
+include ("RecExCommon/RecExCommon_topOptions.py")
+
+condSeq = AthSequencer("AthCondSeq")
+if not hasattr( condSeq, "LumiBlockMuWriter" ):
+  include ("LumiBlockComps/LumiBlockMuWriter_jobOptions.py")
diff --git a/Reconstruction/tauRec/share/tau_standalone_ESDtoAOD.py b/Reconstruction/tauRec/share/tau_standalone_LCTopo_ESDtoAOD.py
similarity index 100%
rename from Reconstruction/tauRec/share/tau_standalone_ESDtoAOD.py
rename to Reconstruction/tauRec/share/tau_standalone_LCTopo_ESDtoAOD.py
diff --git a/Reconstruction/tauRec/test/test_tau_standalone_EMPFlow_serial.sh b/Reconstruction/tauRec/test/test_tau_standalone_EMPFlow_serial.sh
new file mode 100755
index 000000000000..75abe15b5b82
--- /dev/null
+++ b/Reconstruction/tauRec/test/test_tau_standalone_EMPFlow_serial.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+#
+# art-description: standalone tau reconstruction on MC in serial mode
+# art-type: grid
+# art-include: master/Athena
+# art-output: *.root
+# art-output: *.log
+# art-output: *.ps
+# art-output: dcube
+# art-html: dcube
+
+NEVENTS=1000
+REF_DIR="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/tauRec/reference/standalone"
+
+# run the reconstruction
+athena.py --evtMax ${NEVENTS}  tauRec/tau_standalone_EMPFlow_ESDtoAOD.py >> tau_standalone.log 2>&1
+echo "art-result: $? Reconstrution"
+
+# compare the AOD file
+art.py compare ref --entries ${NEVENTS} --mode detailed --order-trees --diff-root AOD.pool.root ${REF_DIR}/EMPFlow_AOD.pool.root >> AOD_diff_root.log 2>&1
+echo "art-result: $? diff-root"
+
+# run the physics validation
+Reco_tf.py --maxEvents ${NEVENTS} --validationFlags 'noExample,doTau' --inputAODFile AOD.pool.root  --outputNTUP_PHYSVALFile NTUP_PHYSVAL.root
+echo "art-result: $? PhysVal"
+
+# compare the histograms
+rootcomp.py NTUP_PHYSVAL.root ${REF_DIR}/NTUP_PHYSVAL.root >> rootcomp.log 2>&1
+echo "art-result: $? rootcomp"
+
+# run dcube
+INPUT_DIR="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/tauRec/input"
+$ATLAS_LOCAL_ROOT/dcube/current/DCubeClient/python/dcube.py \
+    --plot --output dcube \
+    --config ${INPUT_DIR}/config_mc.xml \
+    --reference ${REF_DIR}/NTUP_PHYSVAL.root \
+    NTUP_PHYSVAL.root
+echo "art-result: $? dcube"
diff --git a/Reconstruction/tauRec/test/test_tau_standalone_multithread.sh b/Reconstruction/tauRec/test/test_tau_standalone_LCTopo_multithread.sh
similarity index 83%
rename from Reconstruction/tauRec/test/test_tau_standalone_multithread.sh
rename to Reconstruction/tauRec/test/test_tau_standalone_LCTopo_multithread.sh
index 6e2de893c517..0d4cd79d42e7 100755
--- a/Reconstruction/tauRec/test/test_tau_standalone_multithread.sh
+++ b/Reconstruction/tauRec/test/test_tau_standalone_LCTopo_multithread.sh
@@ -14,11 +14,11 @@ NEVENTS=1000
 REF_DIR="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/tauRec/reference/standalone"
 
 # run the reconstruction
-athena.py --threads 4 --evtMax ${NEVENTS}  tauRec/tau_standalone_ESDtoAOD.py >> tau_standalone.log 2>&1
+athena.py --threads 4 --evtMax ${NEVENTS}  tauRec/tau_standalone_LCTopo_ESDtoAOD.py >> tau_standalone.log 2>&1
 echo "art-result: $? Reconstrution"
 
 # compare the AOD file
-art.py compare ref --entries ${NEVENTS} --mode semi-detailed --excluded-vars=mc_event_number --order-trees --diff-root AOD.pool.root ${REF_DIR}/AOD.pool.root >> AOD_diff_root.log 2>&1
+art.py compare ref --entries ${NEVENTS} --mode detailed --excluded-vars=mc_event_number --order-trees --diff-root AOD.pool.root ${REF_DIR}/LCTopo_AOD.pool.root >> AOD_diff_root.log 2>&1
 echo "art-result: $? diff-root"
 
 # run the physics validation
diff --git a/Reconstruction/tauRec/test/test_tau_standalone_serial.sh b/Reconstruction/tauRec/test/test_tau_standalone_LCTopo_serial.sh
similarity index 81%
rename from Reconstruction/tauRec/test/test_tau_standalone_serial.sh
rename to Reconstruction/tauRec/test/test_tau_standalone_LCTopo_serial.sh
index 1dbaf0c82c2f..bd8d31d55a55 100755
--- a/Reconstruction/tauRec/test/test_tau_standalone_serial.sh
+++ b/Reconstruction/tauRec/test/test_tau_standalone_LCTopo_serial.sh
@@ -13,11 +13,11 @@ NEVENTS=1000
 REF_DIR="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/tauRec/reference/standalone"
 
 # run the reconstruction
-athena.py --evtMax ${NEVENTS}  tauRec/tau_standalone_ESDtoAOD.py >> tau_standalone.log 2>&1
+athena.py --evtMax ${NEVENTS}  tauRec/tau_standalone_LCTopo_ESDtoAOD.py >> tau_standalone.log 2>&1
 echo "art-result: $? Reconstrution"
 
 # compare the AOD file
-art.py compare ref --entries ${NEVENTS} --mode semi-detailed --order-trees --diff-root AOD.pool.root ${REF_DIR}/AOD.pool.root >> AOD_diff_root.log 2>&1
+art.py compare ref --entries ${NEVENTS} --mode detailed --order-trees --diff-root AOD.pool.root ${REF_DIR}/LCTopo_AOD.pool.root >> AOD_diff_root.log 2>&1
 echo "art-result: $? diff-root"
 
 # run the physics validation
-- 
GitLab


From 0c3b4565f3285747ad9e9238c0aa9e455930c72d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nicolas=20K=C3=B6hler?= <nicolas.koehler@cern.ch>
Date: Sat, 3 Oct 2020 13:10:08 +0200
Subject: [PATCH 148/403] add temporary warning as long as no BI sMDT
 calibration constants exits in DB

---
 .../MuonCondAlg/src/MdtCalibDbAlg.cxx                | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/MdtCalibDbAlg.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/MdtCalibDbAlg.cxx
index 2845ef680bb0..8365ca781ac4 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/MdtCalibDbAlg.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/MdtCalibDbAlg.cxx
@@ -883,8 +883,16 @@ StatusCode MdtCalibDbAlg::loadTube(const MuonGM::MuonDetectorManager* muDetMgr){
     int size      = nml*nlayers*ntubesLay;
 
     if(size!=ntubes) {
-      ATH_MSG_ERROR( "Pre-existing MdtTubeCalibContainer for chamber ID " <<chId<< " size does not match the one found in DB ");
-      return StatusCode::FAILURE;
+      // currently there is no calibration DB for Run3 or Run4, i.e. nothing for the new
+      // sMDT chambers in the inner barrel layers (BI), so skip them for now until a DB is in place
+      if (m_idHelperSvc->issMdt(chId) && name.find("BI")!=std::string::npos) {
+        ATH_MSG_WARNING("Currently no entry for "<<name<<" sMDT chambers (eta="<<ieta<<") in database, skipping...");
+        return StatusCode::SUCCESS;
+      }
+      else {
+        ATH_MSG_ERROR( "Pre-existing MdtTubeCalibContainer for chamber ID " <<chId<< " size ("<<size<<") does not match the one found in DB ("<<ntubes<<")");
+        return StatusCode::FAILURE;
+      }
     }
 
     //Extract T0, ADCcal, valid flag for each tube from payload.
-- 
GitLab


From 3acbee4220a9731b7f3975db80a9be2245d5c034 Mon Sep 17 00:00:00 2001
From: Julie Kirk <Julie.Kirk@cern.ch>
Date: Sat, 3 Oct 2020 13:26:17 +0200
Subject: [PATCH 149/403] Fix typo in TrigInDetValidation

	modified:   Trigger/TrigValidation/TrigInDetValidation/python/TrigInDetArtSteps.py
---
 .../TrigInDetValidation/python/TrigInDetArtSteps.py             | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Trigger/TrigValidation/TrigInDetValidation/python/TrigInDetArtSteps.py b/Trigger/TrigValidation/TrigInDetValidation/python/TrigInDetArtSteps.py
index 6f6ac5738d2e..1fdbf0dd4623 100644
--- a/Trigger/TrigValidation/TrigInDetValidation/python/TrigInDetArtSteps.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/python/TrigInDetArtSteps.py
@@ -104,7 +104,7 @@ class TrigInDetReco(ExecStep):
             self.preexec_trig, self.preexec_all, self.preexec_reco, self.preexec_aod)
         if (self.postexec_trig != ' '):
             self.args += ' --postExec "RDOtoRDOTrigger:{:s};" "RAWtoESD:{:s};" '.format(self.postexec_trig, self.postexec_reco)
-        if (self.postinclude_trig != ' '):
+        if (self.postinclude_trig != ''):
             self.args += ' --postInclude "RDOtoRDOTrigger:{:s}" '.format(self.postinclude_trig)
         super(TrigInDetReco, self).configure(test)
 
-- 
GitLab


From dba523d37a2b033c3a1d64e338793cef0cedc8ae Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Sat, 3 Oct 2020 15:06:37 +0200
Subject: [PATCH 150/403] ATLASRECTS-4605 Make egammaRecBuilder Re-entrant

---
 .../egammaAlgs/src/egammaRecBuilder.cxx       | 25 +-----
 .../egamma/egammaAlgs/src/egammaRecBuilder.h  | 80 ++++++++++---------
 2 files changed, 44 insertions(+), 61 deletions(-)

diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaRecBuilder.cxx b/Reconstruction/egamma/egammaAlgs/src/egammaRecBuilder.cxx
index 1ec141ad9be4..c9b19ab18a16 100644
--- a/Reconstruction/egamma/egammaAlgs/src/egammaRecBuilder.cxx
+++ b/Reconstruction/egamma/egammaAlgs/src/egammaRecBuilder.cxx
@@ -21,32 +21,23 @@
 
 egammaRecBuilder::egammaRecBuilder(const std::string& name,
                                    ISvcLocator* pSvcLocator)
-  : AthAlgorithm(name, pSvcLocator)
+  : AthReentrantAlgorithm(name, pSvcLocator)
 {}
 
-// =================================================================
 StatusCode
 egammaRecBuilder::initialize()
 {
-  // initialize method
-
-  ATH_MSG_DEBUG("Initializing egammaRecBuilder");
-
   // First the data handle keys
   ATH_CHECK(m_inputTopoClusterContainerKey.initialize());
   ATH_CHECK(m_egammaRecContainerKey.initialize());
-
   //////////////////////////////////////////////////
   // retrieve track match builder
   CHECK(RetrieveEMTrackMatchBuilder());
   // retrieve conversion builder
   CHECK(RetrieveEMConversionBuilder());
-
-  ATH_MSG_DEBUG("Initialization completed successfully");
   return StatusCode::SUCCESS;
 }
 
-// ====================================================================
 StatusCode
 egammaRecBuilder::RetrieveEMTrackMatchBuilder()
 {
@@ -66,7 +57,6 @@ egammaRecBuilder::RetrieveEMTrackMatchBuilder()
     ATH_MSG_ERROR("Unable to retrieve " << m_trackMatchBuilder);
     return StatusCode::FAILURE;
   }
-    ATH_MSG_DEBUG("Retrieved Tool " << m_trackMatchBuilder);
 
   return StatusCode::SUCCESS;
 }
@@ -74,9 +64,7 @@ egammaRecBuilder::RetrieveEMTrackMatchBuilder()
 StatusCode
 egammaRecBuilder::RetrieveEMConversionBuilder()
 {
-  //
   // retrieve EMConversionBuilder tool
-  //
   if (!m_doConversions) {
     m_conversionBuilder.disable();
     return StatusCode::SUCCESS;
@@ -89,20 +77,11 @@ egammaRecBuilder::RetrieveEMConversionBuilder()
     ATH_MSG_ERROR("Unable to retrieve " << m_conversionBuilder);
     return StatusCode::FAILURE;
   }
-    ATH_MSG_DEBUG("Retrieved Tool " << m_conversionBuilder);
-
-  return StatusCode::SUCCESS;
-}
-
-StatusCode
-egammaRecBuilder::finalize()
-{
-  // finalize method
   return StatusCode::SUCCESS;
 }
 
 StatusCode
-egammaRecBuilder::execute_r(const EventContext& ctx) const
+egammaRecBuilder::execute(const EventContext& ctx) const
 {
   // athena execute method
 
diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaRecBuilder.h b/Reconstruction/egamma/egammaAlgs/src/egammaRecBuilder.h
index 9a45787f9563..a26e4f897a46 100644
--- a/Reconstruction/egamma/egammaAlgs/src/egammaRecBuilder.h
+++ b/Reconstruction/egamma/egammaAlgs/src/egammaRecBuilder.h
@@ -5,7 +5,7 @@
 #ifndef EGAMMAALGS_EGAMMARECBUILDER_H
 #define EGAMMAALGS_EGAMMARECBUILDER_H
 /**
-  @class egammaRecBuilder 
+  @class egammaRecBuilder
 
   This is algorithm produces the initial egammaRecs as a step of the
   egamma supercluster algorithms.
@@ -13,81 +13,85 @@
 */
 
 // INCLUDE HEADER FILES:
-#include <vector>
-#include "AthenaBaseComps/AthAlgorithm.h"
-#include "GaudiKernel/ToolHandle.h"
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
 #include "GaudiKernel/EventContext.h"
+#include "GaudiKernel/ToolHandle.h"
+#include <vector>
 
-#include "xAODCaloEvent/CaloClusterContainer.h"
 #include "StoreGate/ReadHandleKey.h"
 #include "StoreGate/WriteHandleKey.h"
 #include "egammaRecEvent/egammaRecContainer.h"
+#include "xAODCaloEvent/CaloClusterContainer.h"
 
 class IEMTrackMatchBuilder;
 class IEMConversionBuilder;
 
-class egammaRecBuilder : public AthAlgorithm
+class egammaRecBuilder : public AthReentrantAlgorithm
 {
- public:
-
+public:
   /** @brief Default constructor*/
   egammaRecBuilder(const std::string& name, ISvcLocator* pSvcLocator);
 
   /** @brief initialize method*/
-  StatusCode initialize() override final;
-  /** @brief finalize method*/
-  StatusCode finalize() override final;
+  virtual StatusCode initialize() override final;
   /** @brief execute method*/
-  virtual StatusCode execute() override final
-  {
-    return execute_r(Algorithm::getContext());
-  }
-  // This will become the normal execute when
-  // inheriting from AthReentrantAlgorithm
-  StatusCode execute_r(const EventContext& ctx) const;
-
- 
- private:
+  virtual StatusCode execute(const EventContext& ctx) const override final;
 
+private:
   /** @brief retrieve EMTrackMatchBuilder **/
   StatusCode RetrieveEMTrackMatchBuilder();
   /** @brief retrieve EMConversionBuilder **/
   StatusCode RetrieveEMConversionBuilder();
   /** @brief Key for the topo cluster input collection */
-  SG::ReadHandleKey<xAOD::CaloClusterContainer>  m_inputTopoClusterContainerKey {this,
-      "InputTopoClusterContainerName", "egammaTopoCluster",
-      "Name of input cluster container"};
+  SG::ReadHandleKey<xAOD::CaloClusterContainer> m_inputTopoClusterContainerKey{
+    this,
+    "InputTopoClusterContainerName",
+    "egammaTopoCluster",
+    "Name of input cluster container"
+  };
 
   /** @brief Key for egammaRec container */
-  SG::WriteHandleKey<EgammaRecContainer> m_egammaRecContainerKey {this, 
-      "egammaRecContainer", "egammaRecCollection",
-      "Output container for egammaRec objects"};
+  SG::WriteHandleKey<EgammaRecContainer> m_egammaRecContainerKey{
+    this,
+    "egammaRecContainer",
+    "egammaRecCollection",
+    "Output container for egammaRec objects"
+  };
 
   //
   // The tools
   //
   /** @brief Tool to perform track matching*/
   /** @brief Tool to perform track matching*/
-  ToolHandle<IEMTrackMatchBuilder> m_trackMatchBuilder {this,
-      "TrackMatchBuilderTool", "EMTrackMatchBuilder",
-      "Tool that matches tracks to egammaRecs"};
+  ToolHandle<IEMTrackMatchBuilder> m_trackMatchBuilder{
+    this,
+    "TrackMatchBuilderTool",
+    "EMTrackMatchBuilder",
+    "Tool that matches tracks to egammaRecs"
+  };
 
   /** @brief Tool to perfrom conversion vertex matching*/
-  ToolHandle<IEMConversionBuilder> m_conversionBuilder {this,
-      "ConversionBuilderTool", "EMConversionBuilder",
-      "Tool that matches conversion vertices to egammaRecs"};
+  ToolHandle<IEMConversionBuilder> m_conversionBuilder{
+    this,
+    "ConversionBuilderTool",
+    "EMConversionBuilder",
+    "Tool that matches conversion vertices to egammaRecs"
+  };
 
   //
   // All booleans
   //
   /** @brief private member flag to do the track matching */
-  Gaudi::Property<bool> m_doTrackMatching {this, "doTrackMatching", true,
-      "Boolean to do track matching"};
+  Gaudi::Property<bool> m_doTrackMatching{ this,
+                                           "doTrackMatching",
+                                           true,
+                                           "Boolean to do track matching" };
 
   /** @brief private member flag to do the conversion matching */
-  Gaudi::Property<bool> m_doConversions {this, "doConversions", true,
-      "Boolean to do conversion matching"};
-    
+  Gaudi::Property<bool> m_doConversions{ this,
+                                         "doConversions",
+                                         true,
+                                         "Boolean to do conversion matching" };
 };
 
 #endif
-- 
GitLab


From 05573a014cec0d0f9aec4668bf72b97cea83b045 Mon Sep 17 00:00:00 2001
From: sutt <sutt@cern.ch>
Date: Sat, 3 Oct 2020 15:29:14 +0200
Subject: [PATCH 151/403] Changes for the DummyUnseededAllTEAlgo

---
 .../TrigGenericAlgs/DummyUnseededAllTEAlgo.h  |  8 +++--
 .../GenericDummyUnseededAllTEAlgoConfig.py    | 16 +++++++++
 .../TrigGenericAlgs/python/__init__.py        |  3 ++
 .../src/DummyUnseededAllTEAlgo.cxx            | 35 ++++++++++++-------
 .../python/calibcosmicmon/BeamspotDef.py      | 11 ++++--
 .../python/calibcosmicmon/CosmicDef.py        |  5 +--
 .../python/calibcosmicmon/EnhancedBiasDefs.py |  6 ++--
 .../python/commonUtils/makeCaloSequences.py   | 31 +++++++++-------
 .../TriggerMenu/python/egamma/ElectronDef.py  |  4 +--
 .../TriggerMenu/python/egamma/PhotonDef.py    |  2 +-
 .../python/heavyion/HeavyIonDef.py            |  4 +--
 .../TriggerMenu/python/jet/AlgFactory.py      |  1 +
 .../python/jet/jetDefInstantiator_test.py     |  4 +--
 .../TriggerMenu/python/met/MissingETDef.py    |  8 ++---
 .../TriggerMenu/python/minbias/MinBiasDef.py  |  4 +--
 .../TriggerMenu/python/muon/MuonDef.py        | 14 ++++----
 .../TriggerMenu/python/muon/MuonDefIdTest.py  |  4 +--
 17 files changed, 104 insertions(+), 56 deletions(-)
 create mode 100644 Trigger/TrigAlgorithms/TrigGenericAlgs/python/GenericDummyUnseededAllTEAlgoConfig.py
 create mode 100755 Trigger/TrigAlgorithms/TrigGenericAlgs/python/__init__.py

diff --git a/Trigger/TrigAlgorithms/TrigGenericAlgs/TrigGenericAlgs/DummyUnseededAllTEAlgo.h b/Trigger/TrigAlgorithms/TrigGenericAlgs/TrigGenericAlgs/DummyUnseededAllTEAlgo.h
index 75fdd950b6b1..a896f38fef37 100755
--- a/Trigger/TrigAlgorithms/TrigGenericAlgs/TrigGenericAlgs/DummyUnseededAllTEAlgo.h
+++ b/Trigger/TrigAlgorithms/TrigGenericAlgs/TrigGenericAlgs/DummyUnseededAllTEAlgo.h
@@ -23,9 +23,10 @@
 #include <string>
 
 #include "TrigInterfaces/AllTEAlgo.h"
+#include "IRegionSelector/IRegSelTool.h"
+#include "GaudiKernel/ToolHandle.h"
 
 
-class IRegSelSvc;
 
 namespace HLT {
   class TriggerElement;
@@ -64,8 +65,9 @@ namespace PESA
     bool m_prefetchPIX;
     bool m_prefetchSCT;
 
-    std::string       m_regionSelectorName;
-    IRegSelSvc*       m_regionSelector;
+    std::string              m_regionSelectorName;
+    ToolHandle<IRegSelTool>  m_regionSelector_pix { this, "RegSelTool_Pixel", "RegSelTool/RegSelTool_Pixel" };
+    ToolHandle<IRegSelTool>  m_regionSelector_sct { this, "RegSelTool_SCT",   "RegSelTool/RegSelTool_SCT" };
 
   };
 } // end of namespace
diff --git a/Trigger/TrigAlgorithms/TrigGenericAlgs/python/GenericDummyUnseededAllTEAlgoConfig.py b/Trigger/TrigAlgorithms/TrigGenericAlgs/python/GenericDummyUnseededAllTEAlgoConfig.py
new file mode 100644
index 000000000000..60a4ecd26471
--- /dev/null
+++ b/Trigger/TrigAlgorithms/TrigGenericAlgs/python/GenericDummyUnseededAllTEAlgoConfig.py
@@ -0,0 +1,16 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
+
+from TrigGenericAlgs.TrigGenericAlgsConf import PESA__DummyUnseededAllTEAlgo
+
+class GenericDummyUnseededAllTEAlgo( PESA__DummyUnseededAllTEAlgo ) :
+  __slots__ = []
+  def __init__(self, name="GenericAllTEAlgo" ) :
+    super ( GenericDummyUnseededAllTEAlgo, self ).__init__(name)
+
+    from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
+    from RegionSelector.RegSelToolConfig import makeRegSelTool_SCT
+
+    self.RegSelTool_Pixel = makeRegSelTool_Pixel()
+    self.RegSelTool_SCT   = makeRegSelTool_SCT()
+
diff --git a/Trigger/TrigAlgorithms/TrigGenericAlgs/python/__init__.py b/Trigger/TrigAlgorithms/TrigGenericAlgs/python/__init__.py
new file mode 100755
index 000000000000..21595c979074
--- /dev/null
+++ b/Trigger/TrigAlgorithms/TrigGenericAlgs/python/__init__.py
@@ -0,0 +1,3 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+#needed for installation
diff --git a/Trigger/TrigAlgorithms/TrigGenericAlgs/src/DummyUnseededAllTEAlgo.cxx b/Trigger/TrigAlgorithms/TrigGenericAlgs/src/DummyUnseededAllTEAlgo.cxx
index 63a53e922ed9..a9518e6ba4b8 100755
--- a/Trigger/TrigAlgorithms/TrigGenericAlgs/src/DummyUnseededAllTEAlgo.cxx
+++ b/Trigger/TrigAlgorithms/TrigGenericAlgs/src/DummyUnseededAllTEAlgo.cxx
@@ -5,7 +5,7 @@
 
 #include "TrigGenericAlgs/DummyUnseededAllTEAlgo.h"
 #include "TrigNavigation/TriggerElement.h"
-#include "IRegionSelector/IRegSelSvc.h"
+
 
 #include "TrigSteeringEvent/TrigRoiDescriptor.h"
 
@@ -13,15 +13,13 @@ using namespace PESA;
 
 DummyUnseededAllTEAlgo::DummyUnseededAllTEAlgo(const std::string& name, ISvcLocator* pSvcLocator)
   : HLT::AllTEAlgo(name, pSvcLocator),
-    m_was_run(false),
-    m_regionSelector(0)
+    m_was_run(false)
 {
   declareProperty("NumberOfOutputTEs", m_numberOfOutputTEs = 1, "configure the number of output TEs this algorithm will create");
   declareProperty("createRoIDescriptors",  m_createRoIDescriptors=true, "create RoI descriptors ate eta&phi == 0 if set true");
   declareProperty("runOncePerEvent",  m_runOncePerEvent=false, "run opnly once per event");
   declareProperty("prefetchPIX",  m_prefetchPIX=false, "register ROB requests for pixels");
   declareProperty("prefetchSCT",  m_prefetchSCT=false, "register ROB requests for SCT");
-  declareProperty("RegionSelectorTool",    m_regionSelectorName = "RegSelSvc", "instance of the RegionSelector service");
 }
 
 
@@ -29,12 +27,15 @@ HLT::ErrorCode DummyUnseededAllTEAlgo::hltInitialize(){
 
   m_was_run=false; 
 
-  if ( (serviceLocator()->service( m_regionSelectorName, m_regionSelector)).isFailure() ) {
-    msg() << MSG::FATAL 
-	  << "Unable to retrieve RegionSelector Service  " << m_regionSelectorName << endmsg;
-    return HLT::BAD_JOB_SETUP;
-  };
-
+  if ( m_regionSelector_pix.retrieve().isFailure() ) {
+    ATH_MSG_FATAL( m_regionSelector_pix.propertyName()
+		   << m_regionSelector_pix.type() );
+  }
+  if ( m_regionSelector_sct.retrieve().isFailure() ) {
+    ATH_MSG_FATAL( m_regionSelector_sct.propertyName()
+		   << m_regionSelector_sct.type() );
+  }
+  
   return HLT::OK; 
 }
 
@@ -88,15 +89,23 @@ HLT::ErrorCode DummyUnseededAllTEAlgo::hltEndEvent() {
   return HLT::OK;
 }
 
-HLT::ErrorCode DummyUnseededAllTEAlgo::prepareRobRequests(const std::vector<HLT::TEConstVec>& /* inputTE */){
+HLT::ErrorCode DummyUnseededAllTEAlgo::prepareRobRequests(const std::vector<HLT::TEConstVec>& /* inputTE */) {
+
+  /// FIXME: this seems potentually problematic - this is dummy unseededAllTEAlgo, but will allways 
+  /// request ALL pixel and SCT robs, which would suggest that this is ONLT for fullscan ID processing
+  /// if this is the case, it should be renamed DummyFullscanUnseededAllTEAlgo
+  /// 
+  /// Additionally, could potentially cache these lists of robs, otherwise we are passing to and from 
+  /// the same maximal lists for every event. This is not a const method, so this should even work
 
   std::vector<unsigned int> uIntListOfRobs;
 
   if (m_prefetchPIX){
-    m_regionSelector->DetROBIDListUint( PIXEL, uIntListOfRobs);
+    m_regionSelector_pix->ROBIDList( RoiDescriptor(true), uIntListOfRobs );
   }
+
   if (m_prefetchSCT){
-    m_regionSelector->DetROBIDListUint( SCT, uIntListOfRobs);
+    m_regionSelector_sct->ROBIDList( RoiDescriptor(true), uIntListOfRobs );
   }
 
   config()->robRequestInfo()->addRequestScheduledRobIDs(uIntListOfRobs); 	
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/BeamspotDef.py b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/BeamspotDef.py
index b16166cd5753..a76295d395ac 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/BeamspotDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/BeamspotDef.py
@@ -109,9 +109,16 @@ class L2EFChain_Beamspot(L2EFChainDef):
      from TrigInDetConf.TrigInDetSequence import TrigInDetSequence
      [trk_alg] = TrigInDetSequence("BeamSpot", "beamSpot", "IDTrig", sequenceFlavour=["FTF"]).getSequence()
         
-     from TrigGenericAlgs.TrigGenericAlgsConf import  PESA__DummyUnseededAllTEAlgo
+     from TrigGenericAlgs.GenericDummyUnseededAllTEAlgoConfig import GenericDummyUnseededAllTEAlgo 
 
-     self.L2sequenceList += [ [[""], [PESA__DummyUnseededAllTEAlgo("L2DummyAlgo")]+trk_alg, 'L2_BeamSpottracks']]
+     dummyAllTEAlgo = GenericDummyUnseededAllTEAlgo("L2DummyAlgo")
+     
+#     from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
+#     from RegionSelector.RegSelToolConfig import makeRegSelTool_SCT
+#     dummyAllTEAlgo.RegSelTool_Pixel = makeRegSelTool_Pixel()
+#     dummyAttTEAlgo.RegSelTool_SCT  = makeRegSelTool_SCT()
+
+     self.L2sequenceList += [ [[""], [dummyAllTEAlgo]+trk_alg, 'L2_BeamSpottracks']]
 
      self.L2sequenceList +=[[['L2_BeamSpottracks'], [theFex], 'L2_fex']]
      self.L2sequenceList +=[[['L2_fex'], [theAlg], 'L2_']]  
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/CosmicDef.py b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/CosmicDef.py
index 9b34fcf6cf05..b654305120af 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/CosmicDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/CosmicDef.py
@@ -194,8 +194,9 @@ class L2EFChain_CosmicTemplate(L2EFChainDef):
             newchainName = self.chainName[:pos]
 
         # common L2 sequence
-        from TrigGenericAlgs.TrigGenericAlgsConf import PESA__DummyUnseededAllTEAlgo
-        theAllTEDummyFakeROI = PESA__DummyUnseededAllTEAlgo("Cosmic"+newchainName+"AllTEDummy")
+        from TrigGenericAlgs.GenericDummyUnseededAllTEAlgoConfig import GenericDummyUnseededAllTEAlgo
+
+        theAllTEDummyFakeROI = GenericDummyUnseededAllTEAlgo("Cosmic"+newchainName+"AllTEDummy")
 
         from TrigHypoCommonTools.TrigHypoCommonToolsConf import L1InfoHypo
         theL1InfoHypo = L1InfoHypo("L1InfoHypo"+newchainName)
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/EnhancedBiasDefs.py b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/EnhancedBiasDefs.py
index 73b28774b2d8..ff3686fb439c 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/EnhancedBiasDefs.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/EnhancedBiasDefs.py
@@ -70,10 +70,12 @@ class L2EFChain_EnhancedBiasTemplate(L2EFChainDef):
 
 
         # sequence/signature/TErenaming
-        from TrigGenericAlgs.TrigGenericAlgsConf import PESA__DummyUnseededAllTEAlgo        
         from TrigHypoCommonTools.TrigHypoCommonToolsConf import L1InfoHypo
         
-        self.dummyAlg = PESA__DummyUnseededAllTEAlgo("EF_DummyFEX_%s" %(self.algType))
+        from TrigGenericAlgs.GenericDummyUnseededAllTEAlgoConfig  import GenericDummyUnseededAllTEAlgo
+
+
+        self.dummyAlg = GenericDummyUnseededAllTEAlgo("EF_DummyFEX_%s" %(self.algType))
         self.dummyAlg.createRoIDescriptors  = False
         self.dummyAlg.NumberOfOutputTEs     = 1
             
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/commonUtils/makeCaloSequences.py b/Trigger/TriggerCommon/TriggerMenu/python/commonUtils/makeCaloSequences.py
index d8305ca86f48..1c05001d1fd0 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/commonUtils/makeCaloSequences.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/commonUtils/makeCaloSequences.py
@@ -6,6 +6,7 @@ import sys
 import traceback
 
 
+
 def exc2string2():
     """Provide traceback ehen an exception has been raised"""
     llist = sys.exc_info()
@@ -19,8 +20,6 @@ def exc2string2():
 try:
     from TriggerMenu.commonUtils.LeptonIsoEDConfig import TrigHLTEnergyDensityCentral, TrigHLTEnergyDensityForward
 
-    from TrigGenericAlgs.TrigGenericAlgsConf import PESA__DummyUnseededAllTEAlgo as DummyAlgo
-    
     from TrigCaloRec.TrigCaloRecConfig import (TrigCaloCellMaker_jet_fullcalo,
                                             TrigCaloClusterMaker_topo)
 
@@ -59,15 +58,19 @@ def EnergyDensitySequence(te_in):
 def fullScanTopoClusterSequence():
     te_in = ''
     te_out = 'EF_FSTopoClusters'
-
-    alglist = [DummyAlgo('RoiCreator'),
-               TrigCaloCellMaker_jet_fullcalo('TriggerCaloCellMaker_FS',
-                                              doNoise=0,
-                                              AbsE=True,
-                                              doPers=True),
-               TrigCaloClusterMaker_topo('TopoCaloClusterMaker_topo_FS',
-                                         doMoments=True,
-                                         doLC=True)]
+    
+    #   from TrigGenericAlgs.GenericDummyUnseededAllTEAlgoConfig import GenericDummyUnseededAllTEAlgo as DummyAlgp
+    
+    from TrigGenericAlgs.GenericDummyUnseededAllTEAlgoConfig import GenericDummyUnseededAllTEAlgo 
+
+    alglist = [ GenericDummyUnseededAllTEAlgo('RoiCreator'),
+                TrigCaloCellMaker_jet_fullcalo('TriggerCaloCellMaker_FS',
+                                               doNoise=0,
+                                               AbsE=True,
+                                               doPers=True),
+                TrigCaloClusterMaker_topo('TopoCaloClusterMaker_topo_FS',
+                                          doMoments=True,
+                                          doLC=True)]
     return SequenceSpecifier(te_in, te_out, alglist).generate()
 
 
@@ -83,7 +86,11 @@ def getFullScanCaloSequences():
     '''
     import collections
     caloSeqMap = collections.OrderedDict()
-    theDummyRoiCreator=DummyAlgo('RoiCreator')
+
+    from TrigGenericAlgs.GenericDummyUnseededAllTEAlgoConfig import GenericDummyUnseededAllTEAlgo # as DummyAlgp
+
+    theDummyRoiCreator = GenericDummyUnseededAllTEAlgo('RoiCreator')
+
     cellMaker=TrigCaloCellMaker_jet_fullcalo('TriggerCaloCellMaker_FS',
                                               doNoise=0,
                                               AbsE=True,
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/egamma/ElectronDef.py b/Trigger/TriggerCommon/TriggerMenu/python/egamma/ElectronDef.py
index f4be6aaa92aa..bc54e6d0a190 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/egamma/ElectronDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/egamma/ElectronDef.py
@@ -14,9 +14,9 @@ from TrigHIHypo.UE import theUEMaker, theFSCellMaker, theElectronUEMonitoring
 from TrigMultiVarHypo.TrigL2CaloRingerHypoConfig import TrigL2CaloRingerFexHypo_e_NoCut
 from TrigEgammaHypo.TrigEFCaloHypoConfig import TrigEFCaloHypo_EtCut
 from TrigEgammaHypo.TrigL2ElectronFexConfig import L2ElectronFex_Clean
-from TrigGenericAlgs.TrigGenericAlgsConf import PESA__DummyCopyAllTEAlgo
 from TriggerMenu.commonUtils.makeCaloSequences import getFullScanCaloSequences
-from TrigGenericAlgs.TrigGenericAlgsConf import PESA__DummyUnseededAllTEAlgo as DummyRoI
+from TrigGenericAlgs.TrigGenericAlgsConf import PESA__DummyCopyAllTEAlgo
+from TrigGenericAlgs.GenericDummyUnseededAllTEAlgoConfig import GenericDummyUnseededAllTEAlgo as DummyRoI
 from TriggerJobOpts.TriggerFlags import TriggerFlags
 logging.getLogger().info("Importing %s",__name__)
 log = logging.getLogger("TriggerMenu.egamma.ElectronDef")
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/egamma/PhotonDef.py b/Trigger/TriggerCommon/TriggerMenu/python/egamma/PhotonDef.py
index d3aacd655b00..fdd1a2b86f4d 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/egamma/PhotonDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/egamma/PhotonDef.py
@@ -15,7 +15,7 @@ from TriggerMenu.menu.HltConfig import L2EFChainDef, mergeRemovingOverlap
 from TrigHIHypo.UE import theUEMaker, theFSCellMaker
 from TrigInDetConf.TrigInDetSequence import TrigInDetSequence
 from TrigGenericAlgs.TrigGenericAlgsConf import PESA__DummyCopyAllTEAlgo
-from TrigGenericAlgs.TrigGenericAlgsConf import PESA__DummyUnseededAllTEAlgo as DummyRoI
+from TrigGenericAlgs.GenericDummyUnseededAllTEAlgoConfig import GenericDummyUnseededAllTEAlgo as DumyRoI
 from TriggerMenu.commonUtils.makeCaloSequences import getFullScanCaloSequences
 from TrigTRTHighTHitCounter.TrigTRTHighTHitCounterConf import TrigTRTHTHCounter, TrigTRTHTHhypo
 ##################
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/heavyion/HeavyIonDef.py b/Trigger/TriggerCommon/TriggerMenu/python/heavyion/HeavyIonDef.py
index ad15f3114274..a43fe4e0421d 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/heavyion/HeavyIonDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/heavyion/HeavyIonDef.py
@@ -21,8 +21,8 @@ efid = TrigEFIDSequence("minBias","minBias","InsideOut").getSequence()
 efid_heavyIon = TrigEFIDSequence("heavyIonFS","heavyIonFS","InsideOut").getSequence()
 efid2P = TrigEFIDSequence("minBias2P","minBias2","InsideOutLowPt").getSequence()
 
-from TrigGenericAlgs.TrigGenericAlgsConf import PESA__DummyUnseededAllTEAlgo as DummyRoI
-dummyRoI=DummyRoI(name='MinBiasDummyRoI', createRoIDescriptors = True, NumberOfOutputTEs=1)
+from TrigGenericAlgs.GenericDummyUnseededAllTEAlgoConfig import GenericDummyUnseededAllTEAlgo as DummyRoI
+dummyRoI=DummyRoI(name='MinBiasDummyRoI' ) #, createRoIDescriptors = True, NumberOfOutputTEs=1)
 
 # for HI
 from TrigHIHypo.TrigHIHypoConfig import HIEFTrackHypo_AtLeastOneTrack
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/jet/AlgFactory.py b/Trigger/TriggerCommon/TriggerMenu/python/jet/AlgFactory.py
index 728f807ba3f9..da7f85ffc9e4 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/jet/AlgFactory.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/jet/AlgFactory.py
@@ -471,6 +471,7 @@ class AlgFactory(object):
 
 
     def superRoIMaker(self):
+
         factory = 'SeededAlgo'
 
         name = '"SeededAlgo_%s"' % self.seed
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/jet/jetDefInstantiator_test.py b/Trigger/TriggerCommon/TriggerMenu/python/jet/jetDefInstantiator_test.py
index e3c123a5160d..1843e99de86b 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/jet/jetDefInstantiator_test.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/jet/jetDefInstantiator_test.py
@@ -14,11 +14,11 @@ class Test_jetDefInstantiator(unittest.TestCase):
         inst = Instantiator()
         self.assertTrue(len(inst.cache) == 0)
         self.assertTrue(
-            inst(alg).__class__.__name__ == 'PESA__DummyUnseededAllTEAlgo')
+            inst(alg).__class__.__name__ == 'GenericDummyUnseededAllTEAlgo')
         self.assertTrue(len(inst.cache) == 1)
         inst(alg)
         self.assertTrue(
-            inst(alg).__class__.__name__ == 'PESA__DummyUnseededAllTEAlgo')
+            inst(alg).__class__.__name__ == 'GenericDummyUnseededAllTEAlgo')
         
 
     def test_1(self):
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/met/MissingETDef.py b/Trigger/TriggerCommon/TriggerMenu/python/met/MissingETDef.py
index d46b3c6c2100..8c04cc348fff 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/met/MissingETDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/met/MissingETDef.py
@@ -52,7 +52,7 @@ from TrigMissingETMuon.TrigMissingETMuonConfig import (EFTrigMissingETMuon_Fex,
                                                        EFTrigMissingETMuon_Fex_topoclPUC,
                                                        L2TrigMissingETMuon_Fex)
 
-from TrigGenericAlgs.TrigGenericAlgsConf import PESA__DummyUnseededAllTEAlgo
+from TrigGenericAlgs.GenericDummyUnseededAllTEAlgoConfig import GenericDummyUnseededAllTEAlgo
 
 from TriggerMenu.jet.JetDef import generateHLTChainDef
 from TriggerMenu.menu import DictFromChainName
@@ -417,7 +417,7 @@ class L2EFChain_met(L2EFChainDef):
                 from TrigInDetConf.TrigInDetSequence import TrigInDetSequence
                 trk_algs = TrigInDetSequence("FullScan", "fullScan", "IDTrig", sequenceFlavour=["FTF"]).getSequence()
                 print (trk_algs[0])
-                dummyAlg = PESA__DummyUnseededAllTEAlgo("EF_DummyFEX_xe")
+                dummyAlg = GenericDummyUnseededAllTEAlgo("EF_DummyFEX_xe")
                 self.EFsequenceList +=[[ [''], [dummyAlg]+trk_algs[0], 'EF_xe_step3' ]]
 
         elif EFrecoAlg=='trkmht':
@@ -430,7 +430,7 @@ class L2EFChain_met(L2EFChainDef):
             #adding FullScan tracks
             from TrigInDetConf.TrigInDetSequence import TrigInDetSequence
             trk_algs = TrigInDetSequence("FullScan", "fullScan", "IDTrig", sequenceFlavour=["FTF"]).getSequence()
-            dummyAlg = PESA__DummyUnseededAllTEAlgo("EF_DummyFEX_xe")
+            dummyAlg = GenericDummyUnseededAllTEAlgo("EF_DummyFEX_xe")
             self.EFsequenceList +=[[ [''], [dummyAlg]+trk_algs[0], 'EF_xe_step0' ]]
 
             self.EFsequenceList +=[[ [output4,'EF_xe_step0',muonSeed], [theEFMETFex], 'EF_xe_step1' ]]                                                                               
@@ -447,7 +447,7 @@ class L2EFChain_met(L2EFChainDef):
             ##adding FullScan tracks
             from TrigInDetConf.TrigInDetSequence import TrigInDetSequence
             trk_algs = TrigInDetSequence("FullScan", "fullScan", "IDTrig", sequenceFlavour=["FTF"]).getSequence()
-            dummyAlg = PESA__DummyUnseededAllTEAlgo("EF_DummyFEX_xe")
+            dummyAlg = GenericDummyUnseededAllTEAlgo("EF_DummyFEX_xe")
             self.EFsequenceList +=[[ [''], [dummyAlg]+trk_algs[0], 'EF_xe_step0' ]]
 
             self.EFsequenceList +=[[ [output3,'EF_xe_step0',muonSeed], [theEFMETFex], 'EF_xe_step1' ]]                                                                               
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/minbias/MinBiasDef.py b/Trigger/TriggerCommon/TriggerMenu/python/minbias/MinBiasDef.py
index 3941483ed56a..50c316ac50d4 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/minbias/MinBiasDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/minbias/MinBiasDef.py
@@ -30,9 +30,9 @@ efid2P = TrigEFIDSequence("minBias2P","minBias2","InsideOutLowPt").getSequence()
 from TrigMinBias.TrigMinBiasConfig import (EFMbTrkFex,EFMbTrkHypoExclusiveLoose,EFMbTrkHypoExclusiveTight,EFMbTrkHypo,
                                            EFMbVxFex,MbVxHypo,MbTrkHypo)
 
-from TrigGenericAlgs.TrigGenericAlgsConf import PESA__DummyUnseededAllTEAlgo as DummyRoI
+from TrigGenericAlgs.GenericDummyUnseededAllTEAlgoConfig import GenericDummyUnseededAllTEAlgo
 from TrigGenericAlgs.TrigGenericAlgsConf import PrescaleAlgo
-dummyRoI=DummyRoI(name='MinBiasDummyRoI', createRoIDescriptors = True, NumberOfOutputTEs=1)
+dummyRoI=GenericDummyUnseededAllTEAlgo(name='MinBiasDummyRoI' ) # these aren't needed - they are he default settings already ! , createRoIDescriptors = True, NumberOfOutputTEs=1)
 terminateAlgo = PrescaleAlgo('terminateAlgo')
 
 # for HI
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonDef.py b/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonDef.py
index 40a8f83a9c38..1a8ff9653e6c 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonDef.py
@@ -1079,7 +1079,7 @@ class L2EFChain_mu(L2EFChainDef):
 
     ########### EF algos  #################
 
-    from TrigGenericAlgs.TrigGenericAlgsConf import PESA__DummyUnseededAllTEAlgo
+    from TrigGenericAlgs.GenericDummyUnseededAllTEAlgoConfig import GenericDummyUnseededAllTEAlgo 
 
     from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFExtrapolatorMultiHypoConfig, TrigMuonEFExtrapolatorHypoConfig
 
@@ -1171,7 +1171,7 @@ class L2EFChain_mu(L2EFChainDef):
     if 'msonly' in self.chainPart['reccalibInfo']:
 
       self.EFsequenceList += [['',
-                               [PESA__DummyUnseededAllTEAlgo("EFDummyAlgo")],
+                               [GenericDummyUnseededAllTEAlgo("EFDummyAlgo")],
                               'EF_dummy']]
       self.EFsequenceList += [['EF_dummy',
                                [CfgGetter.getAlgorithm("TrigMuSuperEF_FSSA")],
@@ -1181,7 +1181,7 @@ class L2EFChain_mu(L2EFChainDef):
                                'EF_SA_FS2']]
     else:
       self.EFsequenceList += [['',
-                               [PESA__DummyUnseededAllTEAlgo("EFDummyAlgo")],
+                               [GenericDummyUnseededAllTEAlgo("EFDummyAlgo")],
                                'EF_dummy']]
       self.EFsequenceList += [['EF_dummy',
                                [CfgGetter.getAlgorithm("TrigMuSuperEF_FSSA")],
@@ -1323,7 +1323,7 @@ class L2EFChain_mu(L2EFChainDef):
     ########### Sequence List ##############
     if "0eta010" in self.chainPart['etaRange'] or "0eta500" in self.chainPart["etaRange"]:
       #seed = '0eta0'
-      from TrigGenericAlgs.TrigGenericAlgsConf import PESA__DummyUnseededAllTEAlgo
+      from TrigGenericAlgs.GenericDummyUnseededAllTEAlgoConfig import GenericDummyUnseededAllTEAlgo 
       from TrigMuonEF.TrigMuonEFConfig import TrigMuonEFFSRoiMakerUnseededConfig, TrigMuonEFFSRoiMakerConfig
       if "0eta010" in self.chainPart['etaRange']:
         theEFRoIMaker = TrigMuonEFFSRoiMakerUnseededConfig("TrigMuonEFFSRoiMakerUnseeded_0eta010", RoISizeEta=0.1)
@@ -1338,7 +1338,7 @@ class L2EFChain_mu(L2EFChainDef):
       theEFRoIMakerCT = TrigMuonEFFSRoiMakerConfig("TrigMuonEFFSRoiMakerCT", RoISizeEta=0.1)
 
       self.EFsequenceList += [["",
-                              [PESA__DummyUnseededAllTEAlgo("EFDummyAlgo")],
+                              [GenericDummyUnseededAllTEAlgo("EFDummyAlgo")],
                                'EF_CT_seed']]
       self.EFsequenceList += [['EF_CT_seed',
                               [theEFRoIMaker],
@@ -1402,7 +1402,7 @@ class L2EFChain_mu(L2EFChainDef):
 
     ########### EF algos  #################
 
-    from TrigGenericAlgs.TrigGenericAlgsConf import PESA__DummyUnseededAllTEAlgo
+    from TrigGenericAlgs.GenericDummyUnseededAllTEAlgoConfig import GenericDummyUnseededAllTEAlgo
 
     from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFExtrapolatorMultiHypoConfig, TrigMuonEFExtrapolatorHypoConfig
 
@@ -1481,7 +1481,7 @@ class L2EFChain_mu(L2EFChainDef):
     ########### Sequence List ##############
 
     self.EFsequenceList += [['',
-                             [PESA__DummyUnseededAllTEAlgo("EFDummyAlgo",createRoIDescriptors=True)],
+                             [GenericDummyUnseededAllTEAlgo("EFDummyAlgo",createRoIDescriptors=True)],
                              'EF_dummy']]
     if "nscan03" in self.chainPart['FSinfo']:
       cone = "_cone03"
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonDefIdTest.py b/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonDefIdTest.py
index 1b5efadb3fa4..d42324547256 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonDefIdTest.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonDefIdTest.py
@@ -492,7 +492,7 @@ class L2EFChain_mu(L2EFChainDef):
 
     ########### EF algos  #################
 
-    from TrigGenericAlgs.TrigGenericAlgsConf import PESA__DummyUnseededAllTEAlgo
+    from TrigGenericAlgs.GenericDummyUnseededAllTEAlgoConfig import GenericDummyUnseededAllTEAlgo 
 
     from AthenaCommon import CfgGetter
 
@@ -562,7 +562,7 @@ class L2EFChain_mu(L2EFChainDef):
     ########### Sequence List ##############
 
     self.EFsequenceList += [['',
-                            [PESA__DummyUnseededAllTEAlgo("EFDummyAlgo")]+
+                            [GenericDummyUnseededAllTEAlgo("EFDummyAlgo")]+
                             [CfgGetter.getAlgorithm("TrigMuSuperEF_FSSA"),
                              theTrigMuonEFSA_FS_Hypo],
                              'EF_SA_FS']]
-- 
GitLab


From dcc79c3acddddc5d6ef5e55a82d8d22f55ab6102 Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Sat, 3 Oct 2020 16:07:17 +0200
Subject: [PATCH 152/403] Fix PixelLorentzAngleTool config

---
 .../SiLorentzAngleTool/python/SiLorentzAngleToolConfig.py | 8 ++++----
 .../PixelDigitization/python/PixelDigitizationConfig.py   | 3 ++-
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/InnerDetector/InDetConditions/SiLorentzAngleTool/python/SiLorentzAngleToolConfig.py b/InnerDetector/InDetConditions/SiLorentzAngleTool/python/SiLorentzAngleToolConfig.py
index 00c6e6103ce8..78610ad961a2 100644
--- a/InnerDetector/InDetConditions/SiLorentzAngleTool/python/SiLorentzAngleToolConfig.py
+++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/python/SiLorentzAngleToolConfig.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # https://twiki.cern.ch/twiki/bin/viewauth/AtlasComputing/ConfiguredFactory
 
@@ -6,12 +6,12 @@ from AthenaCommon import CfgMgr
 
 def getSCTLorentzAngleTool(name="SCTLorentzAngleTool", **kwargs):
     kwargs.setdefault("DetectorName", "SCT")
+    kwargs.setdefault("DetEleCollKey", "SCT_DetectorElementCollection")
     kwargs.setdefault("SiLorentzAngleCondData", "SCTSiLorentzAngleCondData")
-    from SiLorentzAngleTool.SiLorentzAngleToolConf import SiLorentzAngleTool
     return CfgMgr.SiLorentzAngleTool(name, **kwargs)
 
 def getPixelLorentzAngleTool(name="PixelLorentzAngleTool", **kwargs):
     kwargs.setdefault("DetectorName", "Pixel")
-    kwargs.setdefault("SiLorentzAngleCondData","PixelSiLorentzAngleCondData")
-    from SiLorentzAngleTool.SiLorentzAngleToolConf import SiLorentzAngleTool
+    kwargs.setdefault("DetEleCollKey", "PixelDetectorElementCollection")
+    kwargs.setdefault("SiLorentzAngleCondData", "PixelSiLorentzAngleCondData")
     return CfgMgr.SiLorentzAngleTool(name, **kwargs)
diff --git a/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py b/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py
index e21bc177cd54..3f173947ffbf 100644
--- a/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py
+++ b/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py
@@ -439,7 +439,8 @@ def BasicPixelDigitizationTool(name="PixelDigitizationTool", **kwargs):
         from SiLorentzAngleTool.SiLorentzAngleToolConf import SiLorentzAngleTool
         ToolSvc += SiLorentzAngleTool(name="PixelLorentzAngleTool", 
                                       DetectorName="Pixel", 
-                                      UseMagFieldCache = True,
+                                      DetEleCollKey="PixelDetectorElementCollection",
+                                      UseMagFieldCache=True,
                                       SiLorentzAngleCondData="PixelSiLorentzAngleCondData")
 
 ############################################################################################
-- 
GitLab


From 2c6c585463401c2fae07aa1678de6568be84d435 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Sat, 3 Oct 2020 16:43:31 +0200
Subject: [PATCH 153/403]  CaloDetMgrDetDescrCnv , Enable threads safety
 checker

---
 .../ATLAS_CHECK_THREAD_SAFETY                 |   1 +
 .../src/CaloMgrDetDescrCnv.cxx                | 262 +++++++++---------
 2 files changed, 135 insertions(+), 128 deletions(-)
 create mode 100644 Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/ATLAS_CHECK_THREAD_SAFETY

diff --git a/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/ATLAS_CHECK_THREAD_SAFETY b/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 000000000000..a82f9d0d88c1
--- /dev/null
+++ b/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv
diff --git a/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/src/CaloMgrDetDescrCnv.cxx b/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/src/CaloMgrDetDescrCnv.cxx
index 71802d794d10..b2e1bc8eebd6 100755
--- a/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/src/CaloMgrDetDescrCnv.cxx
+++ b/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/src/CaloMgrDetDescrCnv.cxx
@@ -8,7 +8,7 @@
 #include "DetDescrCnvSvc/DetDescrConverter.h"
 #include "DetDescrCnvSvc/DetDescrAddress.h"
 #include "GaudiKernel/MsgStream.h"
-#include "StoreGate/StoreGate.h" 
+#include "StoreGate/StoreGate.h"
 
 #include "CaloDetDescr/CaloDetDescrManager.h"
 #include "CaloDetDescr/CaloDetectorElements.h"
@@ -54,34 +54,40 @@ StatusCode CaloMgrDetDescrCnv::initialize()
   MsgStream log(msgSvc(), "CaloMgrDetDescrCnv");
   if (log.level()<=MSG::DEBUG) log << MSG::DEBUG << "in initialize" << endmsg;
 
-  if (sc.isFailure()) 
+  if (sc.isFailure())
   {
     log << MSG::ERROR << "DetDescrConverter::initialize failed" << endmsg;
     return sc;
   }
-    
-  return StatusCode::SUCCESS; 
+
+  return StatusCode::SUCCESS;
 }
 
 StatusCode CaloMgrDetDescrCnv::finalize()
 {
   MsgStream log(msgSvc(), "CaloMgrDetDescrCnv");
   if (log.level()<=MSG::DEBUG) log << MSG::DEBUG << "in finalize" << endmsg;
-  
-  return StatusCode::SUCCESS; 
+
+  return StatusCode::SUCCESS;
 }
 
-StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pObj) 
+StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pObj)
 {
   // Ensure that this object is created inside the event loop
-  auto ctx = Gaudi::Hive::currentContext();
-  MsgStream log( msgSvc(), "CaloMgrDetDescrCnv" );
-  if ( !ctx.valid() ) {
-    log << MSG::WARNING << "Attempting to create a Calo Detector Manager object outside of the event loop. Geometry may not be aligned." << endmsg;
+  const EventContext& ctx = Gaudi::Hive::currentContext();
+  MsgStream log(msgSvc(), "CaloMgrDetDescrCnv");
+  if (!ctx.valid()) {
+    log << MSG::WARNING
+        << "Attempting to create a Calo Detector Manager object outside of the "
+           "event loop. Geometry may not be aligned."
+        << endmsg;
   }
-  log << MSG::INFO << "in createObj: creating a Calo Detector Manager object in the detector store" << endmsg;
+  log << MSG::INFO
+      << "in createObj: creating a Calo Detector Manager object in the "
+         "detector store"
+      << endmsg;
 
-  bool debug = log.level()<=MSG::DEBUG; 
+  bool debug = log.level()<=MSG::DEBUG;
 
   DetDescrAddress* ddAddr;
   ddAddr = dynamic_cast<DetDescrAddress*> (pAddr);
@@ -102,7 +108,7 @@ StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb
   // --- --- Get CaloCell_ID and CaloIdManager helpers --- ---
   StoreGateSvc * detStore;
   StatusCode status = serviceLocator()->service("DetectorStore", detStore);
-  if (status.isFailure()) 
+  if (status.isFailure())
   {
     log << MSG::FATAL << "DetectorStore service not found !" << endmsg;
     return StatusCode::FAILURE;
@@ -110,25 +116,25 @@ StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb
 
   const CaloCell_ID* cell_id;
   status = detStore->retrieve(cell_id, "CaloCell_ID");
-  if (status.isFailure()) 
+  if (status.isFailure())
   {
     log << MSG::FATAL << "Could not get CaloCell_ID helper !" << endmsg;
     return status;
-  } 
-  else 
+  }
+  else
     log << MSG::DEBUG << " Found the CaloCell_ID helper. " << endmsg;
 
   const CaloIdManager* caloId_mgr;
   status = detStore->retrieve(caloId_mgr, "CaloIdManager");
-  if (status.isFailure()) 
+  if (status.isFailure())
   {
     log << MSG::ERROR << "Could not get CaloIdManager helper !" << endmsg;
     return status;
-  } 
-  else 
-    if (debug) log << MSG::DEBUG << " Found the CaloIdManager helper. " << endmsg;	
+  }
+  else
+    if (debug) log << MSG::DEBUG << " Found the CaloIdManager helper. " << endmsg;
   // --- --- Get CaloCell_ID and CaloIdManager helpers --- ---
-  
+
   // --- --- Create CaloDetDescrManager object --- ---
   CaloDetDescrManager* caloMgr = new CaloDetDescrManager();
   pObj = StoreGateSvc::asStorable(caloMgr);
@@ -149,7 +155,7 @@ StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb
   //unsigned int idhash;
   IdentifierHash min;
   IdentifierHash max;
-	
+
   const LArEM_ID* em_id = caloId_mgr->getEM_ID();
   const LArHEC_ID* hec_id = caloId_mgr->getHEC_ID();
   const LArFCAL_ID* fcal_id = caloId_mgr->getFCAL_ID();
@@ -177,18 +183,18 @@ StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb
     log << MSG::WARNING << "Could not get the EMBDetectorManager. No Calo Elements will be built for EMB" << endmsg;
   }
   else
-  {     
-    //         --- --- Iterate over EMB regions and cells --- --- 
+  {
+    //         --- --- Iterate over EMB regions and cells --- ---
     EMBDetectorManager::DetectorRegionConstIterator embregIt;
 
-    for (embregIt=embManager->beginDetectorRegion(); embregIt!=embManager->endDetectorRegion(); embregIt++) 
+    for (embregIt=embManager->beginDetectorRegion(); embregIt!=embManager->endDetectorRegion(); embregIt++)
     {
       const EMBDetectorRegion *embRegion = *embregIt;
-      
+
       // *** ***  Create descriptor for this region *** ***
-      // Region identifier. 
+      // Region identifier.
       // Do some mapping between LArReadoutGeometry and CaloID
-      
+
       int barrel_ec = 0;
       switch(embRegion->getEndcapIndex())
       {
@@ -215,7 +221,7 @@ StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb
 
       EMBDescriptor* embDescr = new EMBDescriptor(regId,(AtlasDetectorID *)cell_id,cell_id,embRegion);
       caloMgr->add(embDescr);
-      
+
       double phi_min = 0.;
       double z_min = 10000.;
       double z_max = -10000.;
@@ -224,7 +230,7 @@ StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb
 
       double reg_min = 10000.;
       double reg_max = -10000.;
-      
+
       std::vector<double> depth_in;
       std::vector<double> depth_out;
 
@@ -233,18 +239,18 @@ StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb
       //
       //            *** *** *** Iterate over cells *** *** ***
       //
-      for (unsigned int iPhi=embRegion->beginPhiIndex();iPhi<embRegion->endPhiIndex();iPhi++) 
+      for (unsigned int iPhi=embRegion->beginPhiIndex();iPhi<embRegion->endPhiIndex();iPhi++)
       {
-	for (unsigned int iEta=embRegion->beginEtaIndex();iEta<embRegion->endEtaIndex();iEta++) 
+	for (unsigned int iEta=embRegion->beginEtaIndex();iEta<embRegion->endEtaIndex();iEta++)
 	{
 	  EMBCellConstLink cellPtr = embRegion->getEMBCell(iEta,iPhi);
-	  
+
 	  // build hash identifier for this cell
 	  Identifier chanId = em_id->channel_id(barrel_ec,
 						cellPtr->getSamplingIndex(),
 						cellPtr->getRegionIndex(),
 						iEta,iPhi);
-	  
+
 	  // Create the element and store it
 	  EMBDetectorElement* embElement = new EMBDetectorElement(em_id->channel_hash(chanId),
 								  0,0,
@@ -257,24 +263,24 @@ StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb
 
 	  // cell volume
 	  embElement->set_volume(cellVol.CellVolume(chanId));
-	  
+
 	  caloMgr->add(embElement);
-	  
+
 	  if(r_min > embElement->r()-0.5*embElement->dr())
 	    r_min = embElement->r()-0.5*embElement->dr();
 	  if(r_max < embElement->r()+0.5*embElement->dr())
 	    r_max = embElement->r()+0.5*embElement->dr();
-	  
+
 	  if(z_min > fabs(embElement->z_raw())-0.5*embElement->dz())
 	    z_min = fabs(embElement->z_raw())-0.5*embElement->dz();
 	  if(z_max < fabs(embElement->z_raw())+0.5*embElement->dz())
 	    z_max = fabs(embElement->z_raw())+0.5*embElement->dz();
-	  
+
 	  if(reg_min > embElement->eta()-0.5*embElement->deta())
 	    reg_min = embElement->eta()-0.5*embElement->deta();
 	  if(reg_max < embElement->eta()+0.5*embElement->deta())
 	    reg_max = embElement->eta()+0.5*embElement->deta();
-	  
+
 	  // deal with depth
 	  if(iPhi==embRegion->beginPhiIndex())
 	  {
@@ -289,7 +295,7 @@ StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb
       if(embRegion->getSamplingIndex()==1 && embRegion->getRegionIndex()==0)
       {
 	// special case for this region: strip 0 is missing
-	eta_min = (embRegion->getDescriptor()->getEtaBinning()).getStart() - 
+	eta_min = (embRegion->getDescriptor()->getEtaBinning()).getStart() -
 				(embRegion->getDescriptor()->getEtaBinning()).getDelta();
       }
       else
@@ -339,21 +345,21 @@ StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb
   }
   else
   {
-    //         --- --- Iterate over EMEC regions and cells --- --- 
+    //         --- --- Iterate over EMEC regions and cells --- ---
     EMECDetectorManager::DetectorRegionConstIterator emecregIt;
 
-    for (emecregIt=emecManager->beginDetectorRegion(); emecregIt!=emecManager->endDetectorRegion(); emecregIt++) 
+    for (emecregIt=emecManager->beginDetectorRegion(); emecregIt!=emecManager->endDetectorRegion(); emecregIt++)
     {
       const EMECDetectorRegion *emecRegion = *emecregIt;
-      
+
       // *** ***  Create descriptor for this region *** ***
-      // Region identifier. 
+      // Region identifier.
       // Do some mapping between LArReadoutGeometry and CaloID
       EMECDetectorRegion::DetectorSide endcapInd = emecRegion->getEndcapIndex();
-      
+
       unsigned int radialInd = emecRegion->getRadialIndex();
       int barrel_ec;
-      
+
       switch(endcapInd)
       {
       case EMECDetectorRegion::NEG:
@@ -372,7 +378,7 @@ StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb
 	  return StatusCode::FAILURE;
 	}
       }// switch(endcapInd)
-      
+
       switch(radialInd)
       {
       case 0:
@@ -382,7 +388,7 @@ StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb
 	}
       case 1:
 	{
-	  barrel_ec *= 3;  // inner wheel 
+	  barrel_ec *= 3;  // inner wheel
 	  break;
 	}
       default:
@@ -391,41 +397,41 @@ StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb
 	  return StatusCode::FAILURE;
 	}
       }// switch(radialInd)
-      
+
       Identifier regId = em_id->region_id(barrel_ec,
 					  emecRegion->getSamplingIndex(),
 					  emecRegion->getRegionIndex());
-      
+
       EMECDescriptor* emecDescr = new EMECDescriptor(regId,(AtlasDetectorID *)cell_id,cell_id,emecRegion);
       caloMgr->add(emecDescr);
-      
+
       double phi_min = 0.;
       double z_min = 10000.;
       double z_max = -10000.;
       double r_min = 10000.;
       double r_max = -10000.;
-      
+
       double reg_min = 10000.;
       double reg_max = -10000.;
-      
+
       std::vector<double> depth_in;
-      std::vector<double> depth_out;      
+      std::vector<double> depth_out;
       // *** ***  Create descriptor for this region *** ***
-      
+
       //
       //            *** *** *** Iterate over cells *** *** ***
       //
-      for (unsigned int iPhi=emecRegion->beginPhiIndex();iPhi<emecRegion->endPhiIndex();iPhi++) 
+      for (unsigned int iPhi=emecRegion->beginPhiIndex();iPhi<emecRegion->endPhiIndex();iPhi++)
       {
-	for (unsigned int iEta=emecRegion->beginEtaIndex();iEta<emecRegion->endEtaIndex();iEta++) 
+	for (unsigned int iEta=emecRegion->beginEtaIndex();iEta<emecRegion->endEtaIndex();iEta++)
 	{
 	  EMECCellConstLink cellPtr = emecRegion->getEMECCell(iEta,iPhi);
-	  
+
 	  Identifier chanId = em_id->channel_id(barrel_ec,
 						cellPtr->getSamplingIndex(),
 						cellPtr->getRegionIndex(),
 						iEta,iPhi);
-	  
+
 	  // Create the element and store it
 	  EMECDetectorElement* emecElement = new EMECDetectorElement(em_id->channel_hash(chanId),
 								     0,0,
@@ -439,22 +445,22 @@ StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb
 	  // cell volume
 	  emecElement->set_volume(cellVol.CellVolume(chanId));
 	  caloMgr->add(emecElement);
-	  
+
 	  if(r_min > emecElement->r()-0.5*emecElement->dr())
 	    r_min = emecElement->r()-0.5*emecElement->dr();
 	  if(r_max < emecElement->r()+0.5*emecElement->dr())
 	    r_max = emecElement->r()+0.5*emecElement->dr();
-	  
+
 	  if(z_min > fabs(emecElement->z_raw())-0.5*emecElement->dz())
 	    z_min = fabs(emecElement->z_raw())-0.5*emecElement->dz();
 	  if(z_max < fabs(emecElement->z_raw())+0.5*emecElement->dz())
 	    z_max = fabs(emecElement->z_raw())+0.5*emecElement->dz();
-	  
+
 	  if(reg_min > emecElement->eta()-0.5*emecElement->deta())
 	    reg_min = emecElement->eta()-0.5*emecElement->deta();
 	  if(reg_max < emecElement->eta()+0.5*emecElement->deta())
 	    reg_max = emecElement->eta()+0.5*emecElement->deta();
-	  
+
 	  // depths
 	  if(iPhi==emecRegion->beginPhiIndex())
 	  {
@@ -478,12 +484,12 @@ StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb
       emecDescr->setCaloZMax(z_max);
       emecDescr->setCaloRMin(r_min);
       emecDescr->setCaloRMax(r_max);
-      
+
       // depths
       emecDescr->set_n_calo_depth(depth_in.size());
       emecDescr->set_depth_in(depth_in);
       emecDescr->set_depth_out(depth_out);
-      
+
       // 'alignable' values
       emecDescr->setLArRegMin(reg_min);
       emecDescr->setLArRegMax(reg_max);
@@ -495,7 +501,7 @@ StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb
   // ****************************************************************
   // **                   --- --- EMEC --- ---                     **
   // ****************************************************************
-  
+
 
   // ****************************************************************
   // **                    --- --- HEC --- ---                     **
@@ -510,56 +516,56 @@ StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb
   }
   else
   {
-    //         --- --- Iterate over HEC regions and cells --- --- 
+    //         --- --- Iterate over HEC regions and cells --- ---
     HECDetectorManager::DetectorRegionConstIterator hecregIt;
-    
-    for (hecregIt=hecManager->beginDetectorRegion(); hecregIt!=hecManager->endDetectorRegion(); hecregIt++) 
+
+    for (hecregIt=hecManager->beginDetectorRegion(); hecregIt!=hecManager->endDetectorRegion(); hecregIt++)
     {
       const HECDetectorRegion *hecregion = *hecregIt;
-      
+
       // *** ***  Create descriptor for this region *** ***
-      // Region identifier. 
+      // Region identifier.
       // Do some mapping between LArReadoutGeometry and CaloID
       HECDetectorRegion::DetectorSide endcapInd = hecregion->getEndcapIndex();
       int pos_neg = endcapInd==HECDetectorRegion::NEG ? -2 : 2;
-      
+
       Identifier regId = hec_id->region_id(pos_neg,
 					   hecregion->getSamplingIndex(),
 					   hecregion->getRegionIndex());
-      
+
       HECDescriptor* hecDescr = new HECDescriptor(regId,(AtlasDetectorID *)cell_id,cell_id,hecregion);
       caloMgr->add(hecDescr);
-      
+
       double phi_min = 0.;
       double z_min = 10000.;
       double z_max = -10000.;
       double r_min = 10000.;
       double r_max = -10000.;
-      
+
       double reg_min = 10000.;
       double reg_max = -10000.;
-      
+
       std::vector<double> depth_in;
       std::vector<double> depth_out;
-      
+
       //
       //            *** *** *** Iterate over cells *** *** ***
       //
-      for (unsigned int iPhi=hecregion->beginPhiIndex();iPhi<hecregion->endPhiIndex();iPhi++) 
+      for (unsigned int iPhi=hecregion->beginPhiIndex();iPhi<hecregion->endPhiIndex();iPhi++)
       {
-	for (unsigned int iEta=hecregion->beginEtaIndex();iEta<hecregion->endEtaIndex();iEta++) 
+	for (unsigned int iEta=hecregion->beginEtaIndex();iEta<hecregion->endEtaIndex();iEta++)
 	{
 	  HECCellConstLink cellPtr = hecregion->getHECCell(iEta,iPhi);
 	  // build hash identifier for this cell
 	  // Do some mapping between LArReadoutGeometry and CaloID
-	  
+
 	  if(cellPtr)
 	  {
 	    Identifier chanId = hec_id->channel_id(pos_neg,
 						   cellPtr->getSamplingIndex(),
 						   cellPtr->getRegionIndex(),
 						   iEta,iPhi);
-	    
+
 	    // Create the element and store it
 	    HECDetectorElement* hecElement = new HECDetectorElement(hec_id->channel_hash(chanId),
 								    0,0,
@@ -569,38 +575,38 @@ StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb
 								    isTestBeam);
 	    if(iPhi==hecregion->beginPhiIndex())
 	      phi_min = hecElement->phi() - 0.5*hecElement->dphi();
-	    
+
 	    // cell volume
 	    hecElement->set_volume(cellVol.CellVolume(chanId));
-	    
+
 	    caloMgr->add(hecElement);
 
 	    if(r_min > cellPtr->getRMinLocalNominal(HECCell::FRONT))
 	      r_min = cellPtr->getRMinLocalNominal(HECCell::FRONT);
-	    if(r_max < cellPtr->getRMaxLocalNominal(HECCell::FRONT)) 
-	      r_max = cellPtr->getRMaxLocalNominal(HECCell::FRONT);  
-	    
+	    if(r_max < cellPtr->getRMaxLocalNominal(HECCell::FRONT))
+	      r_max = cellPtr->getRMaxLocalNominal(HECCell::FRONT);
+
 	    if(z_min > fabs(hecElement->z_raw())-hecElement->dz())
 	      z_min = fabs(hecElement->z_raw())-hecElement->dz();
 	    if(z_max < fabs(hecElement->z_raw())+hecElement->dz())
 	      z_max = fabs(hecElement->z_raw())+hecElement->dz();
-	    
+
 	    if(reg_min > hecElement->eta()-0.5*hecElement->deta())
 	      reg_min = hecElement->eta()-0.5*hecElement->deta();
 	    if(reg_max < hecElement->eta()+0.5*hecElement->deta())
 	      reg_max = hecElement->eta()+0.5*hecElement->deta();
-	    
+
 	    if(iPhi==hecregion->beginPhiIndex() && iEta==hecregion->beginEtaIndex())
 	    {
 	      depth_in.push_back(fabs(hecElement->z_raw())-hecElement->dz());
 	      depth_out.push_back(fabs(hecElement->z_raw())+hecElement->dz());
 	    }
-	    
+
 	  }
 	} // Eta loop
       } // Phi loop
       //            *** *** *** Iterate over cells *** *** ***
-      
+
       double eta_min = (hecregion->getDescriptor()->getEtaBinning()).getStart();
       double eta_max = (hecregion->getDescriptor()->getEtaBinning()).getEnd();
       double phi_max = phi_min + fabs((hecregion->getDescriptor()->getPhiBinning()).getDelta())*hecDescr->n_phi();
@@ -614,12 +620,12 @@ StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb
       hecDescr->setCaloZMax(z_max);
       hecDescr->setCaloRMin(r_min);
       hecDescr->setCaloRMax(r_max);
-      
+
       // depths
       hecDescr->set_n_calo_depth(depth_in.size());
       hecDescr->set_depth_in(depth_in);
       hecDescr->set_depth_out(depth_out);
-      
+
       // 'alignable' values
       hecDescr->setLArRegMin(reg_min);
       hecDescr->setLArRegMax(reg_max);
@@ -646,40 +652,40 @@ StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb
   }
   else
   {
-    //         --- --- Iterate over FCAL modules and tiles --- --- 
+    //         --- --- Iterate over FCAL modules and tiles --- ---
     FCALDetectorManager::ConstIterator fcalmodIt;
-    
-    for (fcalmodIt=fcalManager->beginFCAL(); fcalmodIt!=fcalManager->endFCAL(); fcalmodIt++) 
+
+    for (fcalmodIt=fcalManager->beginFCAL(); fcalmodIt!=fcalManager->endFCAL(); fcalmodIt++)
     {
       const FCALModule* fcalmodule = *fcalmodIt;
-      
+
       // *** ***  Create descriptor for this module *** ***
-      // Module identifier. 
+      // Module identifier.
       // Do some mapping between LArReadoutGeometry and CaloID
-      
+
       FCALModule::Endcap endcapInd = fcalmodule->getEndcapIndex();
-      
+
       int pos_neg = endcapInd==FCALModule::NEG ? -2 : 2;
-      
+
       Identifier regId = fcal_id->module_id(pos_neg,
 					    (int)fcalmodule->getModuleIndex());
-      
+
       FCALDescriptor* fcalDescr = new FCALDescriptor(regId,(AtlasDetectorID *)cell_id,cell_id,fcalmodule);
       caloMgr->add(fcalDescr);
-      
+
       double eta_min = 10000.;
       double eta_max = -10000.;
       double z_min = 10000.;
       double z_max = -10000.;
       double r_min = 10000.;
       double r_max = -10000.;
-      
+
       double reg_min = 10000.;
       double reg_max = -10000.;
-      
+
       std::vector<double> depth_in;
       std::vector<double> depth_out;
-      
+
       //
       //            *** *** *** Iterate over cells *** *** ***
       //
@@ -690,7 +696,7 @@ StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb
 						(int)fcalmodule->getModuleIndex(),
 						fcaltileIt->getIndexJ(),   // eta
 						fcaltileIt->getIndexI());  // phi
-	
+
 	FCALDetectorElement* fcalElement = new FCALDetectorElement(fcal_id->channel_hash(chanId),
 								   0,0,
 								   fcalDescr,
@@ -704,7 +710,7 @@ StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb
 	fcalElement->set_volume(.5*sqrt(3)*numTubes*tubeSpacing*tubeSpacing*dz);
 
 	caloMgr->add(fcalElement);
-	
+
 	if(eta_min > std::fabs(fcalElement->eta_raw())-0.5*fcalElement->deta())
 	  eta_min = std::fabs(fcalElement->eta_raw())-0.5*fcalElement->deta();
 	if(eta_max < std::fabs(fcalElement->eta_raw())+0.5*fcalElement->deta())
@@ -721,14 +727,14 @@ StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb
 	  reg_min = fcalElement->eta()-0.5*fcalElement->deta();
 	if(reg_max < fcalElement->eta()+0.5*fcalElement->deta())
 	  reg_max = fcalElement->eta()+0.5*fcalElement->deta();
-	
+
 	if(fcaltileIt==fcalmodule->beginTiles())
 	{
 	  depth_in.push_back(fabs(fcalElement->z_raw()) - fcalElement->dz());
 	  depth_out.push_back(fabs(fcalElement->z_raw()) + fcalElement->dz());
 	}
       }
-      
+
       // These values have no importance for FCAL - hardwire them here.
       fcalDescr->setCaloPhiMin(0.);
       fcalDescr->setCaloPhiMax(2*M_PI);
@@ -743,17 +749,17 @@ StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb
       fcalDescr->setCaloRMax(r_max);
       fcalDescr->setLArRegMin(reg_min);
       fcalDescr->setLArRegMax(reg_max);
-      
+
       // depths
       fcalDescr->set_n_calo_depth(depth_in.size());
       fcalDescr->set_depth_in(depth_in);
       fcalDescr->set_depth_out(depth_out);
-      
+
       if(fcalmodule->getEndcapIndex()==FCALModule::NEG)
 	fcalDescr->setLArEtaMin(-reg_max);
       else
 	fcalDescr->setLArEtaMin(reg_min);
-      
+
     }// Module loop
   }// if FCAL manager has been retrieved
 
@@ -766,25 +772,25 @@ StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb
   // **                   --- --- Tile --- ---                      **
   // ****************************************************************
   const TileDetDescrManager* tile_mgr;
- 
+
   status = detStore->retrieve(tile_mgr);
-  if (status.isFailure()) 
+  if (status.isFailure())
   {
     log << MSG::WARNING << "Could not get the TileDetectorManager. No Calo Elements will be built for Tile" << endmsg;
-  } 
-  else 
+  }
+  else
   {
     if (debug) log << MSG::DEBUG << " Found the TileDetDescrManager " << endmsg;
     cell_id->calo_cell_hash_range((int)CaloCell_ID::TILE,min,max);
     for(unsigned int idhash=0; idhash < max-min; idhash++)
     {
-      CaloDetDescrElement* newelt = tile_mgr->get_cell_element(idhash); 
+      CaloDetDescrElement* newelt = tile_mgr->get_cell_element(idhash);
       if(newelt) caloMgr->add(newelt);
     }
- 
+
     std::vector<CaloDetDescriptor*>::const_iterator itr = tile_mgr->calo_descriptors_begin();
     std::vector<CaloDetDescriptor*>::const_iterator end = tile_mgr->calo_descriptors_end();
-           
+
     for(; itr != end; ++itr) caloMgr->add_tile(*itr);
   }
   // ****************************************************************
@@ -794,10 +800,10 @@ StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb
   // ****************************************************************
   // **                 --- Additional elements  ---               **
   // ****************************************************************
-  if(isTestBeam) 
-  { 
+  if(isTestBeam)
+  {
     CaloDetDescrElementContainer *cDDEvec;
-    if(detStore->retrieve(cDDEvec) == StatusCode::SUCCESS) 
+    if(detStore->retrieve(cDDEvec) == StatusCode::SUCCESS)
     { // We have additional elements
       for (CaloDetDescrElement* elt : *cDDEvec) {
 	caloMgr->add (elt);
@@ -805,7 +811,7 @@ StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb
     }
   }
 
-  return StatusCode::SUCCESS; 
+  return StatusCode::SUCCESS;
 }
 
 //--------------------------------------------------------------------
@@ -817,13 +823,13 @@ CaloMgrDetDescrCnv::storageType()
 }
 
 //--------------------------------------------------------------------
-const CLID& 
-CaloMgrDetDescrCnv::classID() { 
-    return ClassID_traits<CaloDetDescrManager>::ID(); 
+const CLID&
+CaloMgrDetDescrCnv::classID() {
+    return ClassID_traits<CaloDetDescrManager>::ID();
 }
 
 //--------------------------------------------------------------------
-CaloMgrDetDescrCnv::CaloMgrDetDescrCnv(ISvcLocator* svcloc) 
+CaloMgrDetDescrCnv::CaloMgrDetDescrCnv(ISvcLocator* svcloc)
     :
     DetDescrConverter(ClassID_traits<CaloDetDescrManager>::ID(), svcloc)
 {}
-- 
GitLab


From 53d54a58291d8cf3d39036f22c528476d4267fde Mon Sep 17 00:00:00 2001
From: Nils Krumnack <Nils.Erik.Krumnack@cern.ch>
Date: Sat, 3 Oct 2020 16:54:04 +0200
Subject: [PATCH 154/403] add missing include

---
 .../Root/InDetSecVtxTrackAccessor.h                              | 1 +
 1 file changed, 1 insertion(+)

diff --git a/InnerDetector/InDetRecTools/InDetSecVtxTrackSelectionTool/Root/InDetSecVtxTrackAccessor.h b/InnerDetector/InDetRecTools/InDetSecVtxTrackSelectionTool/Root/InDetSecVtxTrackAccessor.h
index 531b06679ecd..6c296201f49c 100644
--- a/InnerDetector/InDetRecTools/InDetSecVtxTrackSelectionTool/Root/InDetSecVtxTrackAccessor.h
+++ b/InnerDetector/InDetRecTools/InDetSecVtxTrackSelectionTool/Root/InDetSecVtxTrackAccessor.h
@@ -11,6 +11,7 @@
 
 #include "AsgMessaging/StatusCode.h"
 #include "AsgMessaging/AsgMessaging.h"
+#include "AsgTools/IAsgTool.h"
 
 #include "xAODTracking/TrackingPrimitives.h"
 #include "xAODTracking/TrackParticle.h"
-- 
GitLab


From b7c023c1152f55f2cd9ee6ed1dbbdf4d3795d762 Mon Sep 17 00:00:00 2001
From: Maximilian Goblirsch-Kolb <goblirsc@cern.ch>
Date: Sat, 3 Oct 2020 17:34:39 +0200
Subject: [PATCH 155/403] make the SiDetElementsRoadMaker more human-readable

---
 .../SiDetElementsLayer_xk.h                   |  27 ++-
 .../src/SiDetElementsLayer_xk.cxx             | 211 ++++++++++++------
 .../src/SiDetElementsRoadMaker_xk.cxx         | 208 +++++++++++------
 3 files changed, 302 insertions(+), 144 deletions(-)

diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsLayer_xk.h b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsLayer_xk.h
index 630b54ccb67b..7159fbe8831a 100644
--- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsLayer_xk.h
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsLayer_xk.h
@@ -57,14 +57,25 @@ namespace InDet{
       void  set(double,double,double,double,double);
       void  add(const SiDetElementLink_xk&);
       int   nElements() const;
+
+
+      ////////////////////////////////////////////////////////////////////
+      /// Get barrel detector elements
+      /// Input parameters: startPoint[0] - X     searchDirection[0] - Ax 
+      ///                   startPoint[1] - Y     searchDirection[1] - Ay
+      ///                   startPoint[2] - Z     searchDirection[2] - Az
+      ///                   startPoint[3] - R
+      ///                   startPoint[4] - width
+      ///                   startPoint[5] - step
+      ////////////////////////////////////////////////////////////////////
       void getBarrelDetElements
-        (float*,
-         float*,
+        (std::array<float,6> startingPoint,
+         std::array<float,3> searchDirection,
          std::vector<InDet::SiDetElementLink_xk::ElementWay> &lDE,
          std::vector<InDet::SiDetElementLink_xk::UsedFlag>   &used) const;
       void getEndcapDetElements
-	(float*,
-         float*,
+	      (std::array<float,6> startingPoint,
+         std::array<float,3> searchDirection,
          std::vector<InDet::SiDetElementLink_xk::ElementWay> &lDE,
          std::vector<InDet::SiDetElementLink_xk::UsedFlag>   &used) const;
 
@@ -86,10 +97,10 @@ namespace InDet{
       ///////////////////////////////////////////////////////////////////
       // Methods
       ///////////////////////////////////////////////////////////////////
-      void getDetElements(float*,
-                          float*,
-                          float,
-                          float,
+      void getDetElements(std::array<float,6> startingPoint,
+                          std::array<float,3> searchDirection,
+                          float Fc,
+                          float dW,
                           std::vector<InDet::SiDetElementLink_xk::ElementWay> &lDE,
                           std::vector<InDet::SiDetElementLink_xk::UsedFlag>   &used) const;
     };
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsLayer_xk.cxx b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsLayer_xk.cxx
index 6636827221c4..1af0d98d40c6 100644
--- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsLayer_xk.cxx
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsLayer_xk.cxx
@@ -17,106 +17,187 @@
 
 ///////////////////////////////////////////////////////////////////
 // Get barrel detector elements
-// Input parameters: P[0] - X     A[0] - Ax 
-//                   P[1] - Y     A[1] - Ay
-//                   P[2] - Z     A[2] - Az
-//                   P[3] - R
-//                   P[4] - width
-//                   P[5] - step
+// Input parameters: startPoint[0] - X     searchDirection[0] - Ax 
+//                   startPoint[1] - Y     searchDirection[1] - Ay
+//                   startPoint[2] - Z     searchDirection[2] - Az
+//                   startPoint[3] - R
+//                   startPoint[4] - width
+//                   startPoint[5] - step
 ///////////////////////////////////////////////////////////////////
 
 void InDet::SiDetElementsLayer_xk::getBarrelDetElements
-(float* P ,float* A,
+(std::array<float,6> startingPoint,
+ std::array<float,3> searchDirection,
  std::vector<InDet::SiDetElementLink_xk::ElementWay> &lDE,
  std::vector<InDet::SiDetElementLink_xk::UsedFlag>   &used) const
 {
-  float a  = (A[0]*P[0]+A[1]*P[1])*2.; 
-  float d  = (m_r-P[0]-P[1])*(m_r+P[0]+P[1])+2.*P[0]*P[1];
-  float b  = 2.*(A[0]*A[0]+A[1]*A[1]); if(b == 0.) return;
-  float sq = a*a+2.*d*b;  sq>0. ? sq=sqrt(sq) : sq=0.;
-  float s1 =-(a+sq)/b;
-  float s2 =-(a-sq)/b; 
+
+  /// In the following, identify where we cross the layer
+  /// by solving the quadratic equation 
+  /// ( startingPoint_xy + X * searchDirection_xy )² = r_layer² 
+  /// We only take into account the x-y plane for this
+
+
+  float minusB  =2*( searchDirection[0]*startingPoint[0]
+                    +searchDirection[1]*startingPoint[1]); 
+  float C  = (m_r-startingPoint[0]-startingPoint[1])
+            *(m_r+startingPoint[0]+startingPoint[1])
+            +2.*startingPoint[0]*startingPoint[1];
+  float twoA  = 2.*( searchDirection[0]*searchDirection[0]
+                    +searchDirection[1]*searchDirection[1]); 
+  if(twoA == 0.) return;
+  float sq = minusB*minusB+2.*C*twoA;  
+  if (sq > 0){ 
+    sq=sqrt(sq);
+  }
+  else {
+    sq=0.;
+  }
+  /// solutions of our equation
+  float s1 =-(minusB+sq)/twoA;
+  float s2 =-(minusB-sq)/twoA; 
   float s;
-  if((s1*s2) > 0.) {fabs(s1) < fabs(s2) ? s = s1 : s = s2;}
-  else             {     s1  > 0.       ? s = s1 : s = s2;}  
-  float zc   = P[2]+A[2]*s;
-  float At   = sqrt(1.-A[2]*A[2]);
-  if(At != 0. && fabs(zc-m_z) > (m_dz+(m_dr*fabs(A[2])+P[4])/At)) return;
-  float fc   = atan2(P[1]+A[1]*s,P[0]+A[0]*s);
-  float dw   = P[4]/m_r;
-  getDetElements(P,A,fc,dw,lDE,used);
+  /// pick one:
+  /// if both solution occur for the same direction, 
+  /// we pick the crossing that occurs first 
+  if((s1*s2) > 0.) {
+    if (fabs(s1) < fabs(s2)){
+      s = s1;
+    }
+    else {
+      s = s2;
+    }
+  }
+  /// otherwise, pick the one in the positive direction
+  else{     
+    if (s1  > 0.){
+      s = s1; 
+    }
+    else{
+      s = s2;
+    }
+  }  
+  /// Z-coordinate of the layer crossing 
+  float zc   = startingPoint[2]+searchDirection[2]*s;
+  /// radial component of the search direction 
+  float At   = sqrt(1.-searchDirection[2]*searchDirection[2]);
+  
+  /// Check if we miss the layer completely: 
+  /// If the distance of our crossing point to the layer centre along z exceeds the half width 
+  /// in z of the layer by more than a tolerance obtained as 
+  /// the z movement expected when traversing along the layer radial half-width (dr_half / tan(theta_searchDirection)) 
+  /// plus the road width divided by sin(theta)
+  if(At != 0. && fabs(zc-m_z) > (m_dz+(m_dr*fabs(searchDirection[2])+startingPoint[4])/At)) return;
+  /// Phi coordinate of the crossing
+  float phiCrossing   = atan2(startingPoint[1]+searchDirection[1]*s,startingPoint[0]+searchDirection[0]*s);
+  /// road width divided by the radius of the layer
+  float reducedRoadWidth   = startingPoint[4]/m_r;
+  getDetElements(startingPoint,searchDirection,phiCrossing,reducedRoadWidth,lDE,used);
 }
 
 ///////////////////////////////////////////////////////////////////
 // Get endcap detector elements
-// Input parameters: P[0] - X     A[0] - Ax 
-//                   P[1] - Y     A[1] - Ay
-//                   P[2] - Z     A[2] - Az
-//                   P[3] - R
-//                   P[4] - width
-//                   P[5] - step
+// Input parameters: startingPoint[0] - X     searchDirection[0] - Ax 
+//                   startingPoint[1] - Y     searchDirection[1] - Ay
+//                   startingPoint[2] - Z     searchDirection[2] - Az
+//                   startingPoint[3] - R
+//                   startingPoint[4] - width
+//                   startingPoint[5] - step
 ///////////////////////////////////////////////////////////////////
 
 void InDet::SiDetElementsLayer_xk::getEndcapDetElements
-(float* P ,
- float* A,
+(std::array<float,6> startingPoint,
+ std::array<float,3> searchDirection,
  std::vector<InDet::SiDetElementLink_xk::ElementWay> &lDE,
  std::vector<InDet::SiDetElementLink_xk::UsedFlag>   &used) const
 {
-  float s   =(m_z-P[2])/A[2];
-  float xc  = P[0]+A[0]*s;
-  float yc  = P[1]+A[1]*s;
+  /// solve the linear equation 
+  /// z_layer = z_startingPont + s * z_searchDirection
+  float s   =(m_z-startingPoint[2])/searchDirection[2];
+  /// obtain x,y,r coordinates of the layer crossing in z
+  float xc  = startingPoint[0]+searchDirection[0]*s;
+  float yc  = startingPoint[1]+searchDirection[1]*s;
   float rc  = sqrt(xc*xc+yc*yc);
-  float A23 = A[2]*P[3];
-  if(A23 != 0. && fabs(rc-m_r) > m_dr+fabs(2.*(P[0]*A[0]+P[1]*A[1])*m_dz/A23)+P[4]) return;
-  float fc  = atan2(yc,xc);
-  float dw  = P[4]/rc;
-  getDetElements(P,A,fc,dw,lDE,used);
+  /// search direction z (== cos(theta_search)) * radius of starting point
+  float A23 = searchDirection[2]*startingPoint[3];
+  /// Kick out cases where we do not expect to cross the layer at all. 
+  /// Do this by checking if the distance of the radial location of the z-crossing 
+  /// from the layer centre in r exceeds the r-half-width by more than 
+  /// the r-movement expected when traversing the half-width in z + the search road width
+  if(A23 != 0. && fabs(rc-m_r) > m_dr+fabs(2.*(startingPoint[0]*searchDirection[0]+startingPoint[1]*searchDirection[1])*m_dz/A23)+startingPoint[4]) return;
+  float phiCrossing  = atan2(yc,xc);
+  float reducedRoadWidth  = startingPoint[4]/rc;
+  getDetElements(startingPoint,searchDirection,phiCrossing,reducedRoadWidth,lDE,used);
 }
 
 ///////////////////////////////////////////////////////////////////
 // Get detector elements
-// Input parameters: P[0] - X     A[0] - Ax 
-//                   P[1] - Y     A[1] - Ay
-//                   P[2] - Z     A[2] - Az
-//                   P[3] - R
-//                   P[4] - width
-//                   P[5] - step
+// Input parameters: startingPoint[0] - X     searchDirection[0] - Ax 
+//                   startingPoint[1] - Y     searchDirection[1] - Ay
+//                   startingPoint[2] - Z     searchDirection[2] - Az
+//                   startingPoint[3] - R
+//                   startingPoint[4] - width
+//                   startingPoint[5] - step
 ///////////////////////////////////////////////////////////////////
 
 void InDet::SiDetElementsLayer_xk::getDetElements
-(float* P,
- float* A,
- float Fc,
- float dW,
+(std::array<float,6> startingPoint,
+ std::array<float,3> searchDirection,
+ float phiCrossing,
+ float reducedRoadWidth,
  std::vector<InDet::SiDetElementLink_xk::ElementWay> &lDE,
  std::vector<InDet::SiDetElementLink_xk::UsedFlag>   &used) const
 {
-  const float pi = M_PI, pi2 = 2.*pi; 
+  constexpr float pi = M_PI, pi2 = 2.*pi; 
   int im  = int(m_elements.size())-1; if(im<0) return;
   int i0  = 0, i1  = im;
 
-  if (Fc> m_elements[i0].phi() && Fc< m_elements[i1].phi()) {
-    while((i1-i0)>1) {int i = ((i0+i1)>>1); m_elements[i].phi() > Fc ? i1=i : i0=i;}
+  /// iteratively search for the index of the crossing by splitting the remaining search region in half
+  if (phiCrossing> m_elements[i0].phi() && phiCrossing< m_elements[i1].phi()) {
+    while((i1-i0)>1) {
+      int i = (i0+i1)/2; 
+      if (m_elements[i].phi() > phiCrossing){
+        i1=i;
+      }
+      else{
+        i0=i;
+      }
+    }
     i0 = i1;
   }
-  float O[3];
+  //
+  std::array<float,3> intersectionOutcome;
   int i = i0;
   while(1) {
-
     assert( static_cast<unsigned int>(i)<m_elements.size() );
+    /// if detector element i on this layer is not already used for this road
     if(!used[i].used()) {
-
-      float dF =fabs(m_elements[i].phi()-Fc); if(dF>pi) dF=fabs(dF-pi2);
-      if((dF-dW)>m_dfe) break;
-      m_elements[i].intersect(P,A,O);
-
-      if((O[0]-P[4])<=0 && (O[1]-P[4])<=0.) {
-         lDE.push_back(InDet::SiDetElementLink_xk::ElementWay(&m_elements[i],P[5]+O[2])); used[i].setUsed();
+      /// 
+      float dPhi =fabs(m_elements[i].phi()-phiCrossing); 
+      if(dPhi>pi) dPhi=fabs(dPhi-pi2);    /// project delta phi into -pi..pi
+      /// dPhi must be compatible with the phi half-width within a tolerance
+      /// specified by the road width divided by the radius 
+      if((dPhi-reducedRoadWidth)>m_dfe) break;
+      /// intersect our projection with the detector element. 
+      /// Output: intersectionOutcome[0] - close distance in azimuthal direction
+      ///         intersectionOutcome[1] - close distance in r or z    direction
+      ///         intersectionOutcome[2] - step to detector element 
+      m_elements[i].intersect(&(startingPoint[0]),&(searchDirection[0]),&(intersectionOutcome[0]));
+
+      /// closest distance in both directions has to be compatible within the road width
+      if  (     intersectionOutcome[0]<=startingPoint[4] 
+            && (intersectionOutcome[1]<=startingPoint[4])
+          ) {
+         /// we found a compatible detector element - add to our list  
+         lDE.push_back(InDet::SiDetElementLink_xk::ElementWay(&m_elements[i],startingPoint[5]+intersectionOutcome[2])); 
+         used[i].setUsed();
       }
     }
-    ++i; if(i>im) i=0; if(i==i0) return;
+    ++i; 
+    if(i>im) i=0; /// loop around if we have to 
+    if(i==i0) return; /// stop when we have tried all detector elements
   }
+  /// This is dead code?!
   i1 = i; i = i0;
   while(1) {
 
@@ -125,12 +206,12 @@ void InDet::SiDetElementsLayer_xk::getDetElements
     assert( static_cast<unsigned int>(i)<m_elements.size() );
     if(!used[i].used()) {
 
-      float dF =fabs(m_elements[i].phi()-Fc); if(dF>pi) dF=fabs(dF-pi2);
-      if((dF-dW)>m_dfe) return;
-      m_elements[i].intersect(P,A,O);
+      float dPhi =fabs(m_elements[i].phi()-phiCrossing); if(dPhi>pi) dPhi=fabs(dPhi-pi2);
+      if((dPhi-reducedRoadWidth)>m_dfe) return;
+      m_elements[i].intersect(&(startingPoint[0]),&(searchDirection[0]),&(intersectionOutcome[0]));
       
-      if((O[0]-P[4])<=0 && (O[1]-P[4])<=0.) {
-         lDE.push_back(InDet::SiDetElementLink_xk::ElementWay(&m_elements[i],P[5]+O[2])); used[i].setUsed();
+      if((intersectionOutcome[0]-startingPoint[4])<=0 && (intersectionOutcome[1]-startingPoint[4])<=0.) {
+         lDE.push_back(InDet::SiDetElementLink_xk::ElementWay(&m_elements[i],startingPoint[5]+intersectionOutcome[2])); used[i].setUsed();
       }
     }
   }
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx
index 570c835f6271..fac2edf457f3 100644
--- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx
@@ -297,124 +297,180 @@ void InDet::SiDetElementsRoadMaker_xk::detElementsRoad
 {  
   if (!m_usePIX && !m_useSCT) return;
 
+  /// this is a vector of vectors of detector elements
+  /// prepared by the SiDetElementsRoadCondAlg. 
+  /// The outer vector has 3 elements: 
+  /// 0 --> left endcap 
+  /// 1 --> barrel 
+  /// 2 --> right endcap
+  /// Each of the inner vectors is internally sorted.
+  /// For the endcaps, sorting is first in z, then for same Z in r, then 
+  /// for same r in phi.
+  /// For the barrel, we first sort in R, then for same R in phi, then for same 
+  /// phi in Z. 
   const SiDetElementsLayerVectors_xk &layer = *getLayers();
 
-  std::list<Amg::Vector3D>::iterator g=GP.begin(), ge=GP.end();
-  float Po[6] = {static_cast<float>((*g).x()), static_cast<float>((*g).y()), static_cast<float>((*g).z()),
-                 static_cast<float>(sqrt((*g).x()*(*g).x()+(*g).y()*(*g).y())), m_width, 0.};
+  std::list<Amg::Vector3D>::iterator currentPosition=GP.begin(), endPositions=GP.end();
+  std::array<float,6> par_prevPoint{static_cast<float>((*currentPosition).x()),            // x of first position
+                static_cast<float>((*currentPosition).y()),             // y of first position
+                static_cast<float>((*currentPosition).z()),             // Z of first position
+                static_cast<float>(sqrt((*currentPosition).x()*(*currentPosition).x()+(*currentPosition).y()*(*currentPosition).y())),    // r of first position 
+                m_width,    // road width 
+                0.};    
+  
+  /// check the left endcap layers
+  /// increment n0 until we are at the layer closest to 
+  /// the first position from the left side
   int n0 = 0;
   for (; n0!=static_cast<int>(layer[0].size()); ++n0) {
-    if (Po[2] > layer[0].at(n0).z()) break;
+    if (par_prevPoint[2] > layer[0].at(n0).z()) break;
   }
+
+  /// check the barrel layers
+  /// increment n1 until we are at the layer closest to 
+  /// the first position in the radial direction
   int n1 = 0;
   for (; n1!=static_cast<int>(layer[1].size()); ++n1) {
-    if (Po[3] < layer[1].at(n1).r()) break;
+    if (par_prevPoint[3] < layer[1].at(n1).r()) break;
   }
+  /// and finally, the left endcap. 
+  /// this time, look for the layer closest on the right side. 
   int n2 = 0;
   for (; n2!=static_cast<int>(layer[2].size()); ++n2) {
-    if (Po[2] < layer[2].at(n2).z()) break;
+    if (par_prevPoint[2] < layer[2].at(n2).z()) break;
   }
 
+  
   std::vector<InDet::SiDetElementLink_xk::ElementWay> lDE;
+  /// book an impressively nested structure to keep track of which detector elements we use 
   std::array<std::vector<std::vector<InDet::SiDetElementLink_xk::UsedFlag> >,3> used;
+
+  /// module_i: iterate over the detector side 
   for ( unsigned int module_i=0; module_i<3; ++module_i) {
-     used[module_i].resize( layer[module_i].size() );
+     used[module_i].resize( layer[module_i].size() ); /// for each side, book the number of layers we expect to see
      for (unsigned int layer_i=0; layer_i < layer[module_i].size(); ++layer_i) {
+        /// for each layer, book one slot for each detector element on the layer
         used[module_i][layer_i].resize( layer[module_i][layer_i].nElements() );
      }
   }
 
-  ++g;
-  while (g!=ge) {
-    float  Pn[4] = {static_cast<float>((*g).x()), static_cast<float>((*g).y()), static_cast<float>((*g).z()),
-		    static_cast<float>(sqrt((*g).x()*(*g).x()+(*g).y()*(*g).y()))};
-
-    float dx = Pn[0]-Po[0];
-    float dy = Pn[1]-Po[1];
-    float dz = Pn[2]-Po[2];
-    float st = sqrt(dx*dx+dy*dy+dz*dz);
-    if (st <=0.) {
-      ++g;
+  /// done with the first probed position. Now we look at the others
+  ++currentPosition;
+  /// do the following for every point
+  while (currentPosition!=endPositions) {
+    std::array<float,4>  par_currentPoint{static_cast<float>((*currentPosition).x()),         /// x of the current position
+                    static_cast<float>((*currentPosition).y()),         /// y of the current position
+                    static_cast<float>((*currentPosition).z()),         /// z of the current position
+		                static_cast<float>(sqrt((*currentPosition).x()*(*currentPosition).x()+(*currentPosition).y()*(*currentPosition).y()))   /// r of the current position
+                    };
+
+    float dx = par_currentPoint[0]-par_prevPoint[0];         /// dx between the current and the first position
+    float dy = par_currentPoint[1]-par_prevPoint[1];         /// dy between the current and the first position 
+    float dz = par_currentPoint[2]-par_prevPoint[2];         /// dz between the current and the first position 
+    float dist3D = sqrt(dx*dx+dy*dy+dz*dz);   /// 3D distance between the current and the first position
+    if (dist3D <=0.) {                   /// if geometry breaks down or two points are duplicates, 
+      ++currentPosition;                /// we whistle innocently and make a point of looking somewhere else 
       continue;
     }
-    float ds = 1./st;
-    float A[3]= {dx*ds, dy*ds, dz*ds};
-
-    // Min. radius test between this two points
-    //    
-    float at = A[0]*A[0]+A[1]*A[1];
-    float dr = 0.                 ;
-    if (at!=0.) {
-      float sm = -(A[0]*Po[0]+A[1]*Po[1])/at;
-      if (sm > 1. && sm < st) {
-	Pn[0] = Po[0]+A[0]*sm;
-	Pn[1] = Po[1]+A[1]*sm;
-	Pn[2] = Po[2]+A[2]*sm;
-	Pn[3] = sqrt(Pn[0]*Pn[0]+Pn[1]*Pn[1]);
-	dr    = 20.;
+    float inverseDistance = 1./dist3D;                   /// inverse distance to the first position 
+    std::array<float,3> unitSepVector{dx*inverseDistance, dy*inverseDistance, dz*inverseDistance};  /// unit vector with the linearised direction we are currently moving in 
+
+    /// Min. radius test between this two points
+    float unitSepTransverseComp = unitSepVector[0]*unitSepVector[0]+unitSepVector[1]*unitSepVector[1];     /// transverse component of the separation vector 
+    float dr = 0.                 ;     
+    if (unitSepTransverseComp!=0.) {                               
+      /// *negative* component of the global location of the previous position into the direction connecting our positions in the x-y plane 
+      float sm = -( unitSepVector[0]*par_prevPoint[0] +
+                    unitSepVector[1]*par_prevPoint[1])
+                    /unitSepTransverseComp; 
+
+      /// a positive value of SM means the closest approach to the beamline is between the two positions we are considering. 
+      /// This occasionally happens for the first position along the search trajectory generated by the propagator tool. 
+      /// In this case, we do not iterate, but instead repeat the current step with a different 'previous' point
+      /// which attempts to approximate the perigee location 
+      if (sm > 1. && sm < dist3D) {
+        par_currentPoint[0] = par_prevPoint[0]+unitSepVector[0]*sm;
+        par_currentPoint[1] = par_prevPoint[1]+unitSepVector[1]*sm;
+        par_currentPoint[2] = par_prevPoint[2]+unitSepVector[2]*sm;
+        par_currentPoint[3] = sqrt(par_currentPoint[0]*par_currentPoint[0]+par_currentPoint[1]*par_currentPoint[1]);
+        /// now, the current point is the perigee estimate and the previous point is 
+        /// the (likely innermost) one beyond the perigee 
+	      dr    = 20.;
       } else {
-        ++g;
+        ++currentPosition;
       }
     } else {
-      ++g;
+      ++currentPosition;
     }
 
-    // Barrel
-    //
-    if (Pn[3]>Po[3]) {
+    /// Barrel
+    /// if we are moving outwards in r: 
+    if (par_currentPoint[3]>par_prevPoint[3]) {
+      /// loop over all barrel layers (starting with the one previously identified)
       for (; n1<static_cast<int>(layer[1].size()); ++n1) {
-	if (Pn[3] < layer[1].at(n1).r()) break;
+        /// stop if we moved past the test point in R
+	      if (par_currentPoint[3] < layer[1].at(n1).r()) break;
         assert( used.at(1).size() > static_cast<unsigned int>(n1) );
-	layer[1].at(n1).getBarrelDetElements(Po, A, lDE, used[1][n1]);
+        /// collect all compatible detector elements
+	      layer[1].at(n1).getBarrelDetElements(par_prevPoint, unitSepVector, lDE, used[1][n1]);
       }
+      /// if we are moving inward in R, iterate the other way for the barrel
     } else {
       for (--n1; n1>=0; --n1) {
-	if (Pn[3] > layer[1].at(n1).r()+dr) break;
+        /// stop if we moved past the test point in R
+	      if (par_currentPoint[3] > layer[1].at(n1).r()+dr) break;
         assert( used.at(1).size() > static_cast<unsigned int>(n1) );
-	layer[1].at(n1).getBarrelDetElements(Po, A, lDE, used[1][n1]);
+        /// collect all compatible detector elements        
+	      layer[1].at(n1).getBarrelDetElements(par_prevPoint, unitSepVector, lDE, used[1][n1]);
       }
       ++n1;
     }
 
-    // Positive endcap
-    //
-    if (Pn[2]>Po[2]) {
+    /// Positive endcap
+    /// again check if we are moving forward or back in z
+    if (par_currentPoint[2]>par_prevPoint[2]) {
       for (; n2<static_cast<int>(layer[2].size()); ++n2) {
-	if (Pn[2] < layer[2].at(n2).z()) break;
+	      if (par_currentPoint[2] < layer[2].at(n2).z()) break;
         assert( used.at(2).size() > static_cast<unsigned int>(n2) );
-	layer[2].at(n2).getEndcapDetElements(Po, A, lDE,used[2][n2]);
+        /// collect all compatible detector elements        
+	      layer[2].at(n2).getEndcapDetElements(par_prevPoint, unitSepVector, lDE,used[2][n2]);
       }
     } else {
       for (--n2; n2>=0; --n2) {
-	if (Pn[2] > layer[2].at(n2).z()) break;
+	      if (par_currentPoint[2] > layer[2].at(n2).z()) break;
         assert( used.at(2).size() > static_cast<unsigned int>(n2) );
-	layer[2].at(n2).getEndcapDetElements(Po, A, lDE, used[2][n2]);
+        /// collect all compatible detector elements        
+	      layer[2].at(n2).getEndcapDetElements(par_prevPoint, unitSepVector, lDE, used[2][n2]);
       }
       ++n2;
     }
 
-    // Negative endcap
-    //
-    if (Pn[2]<Po[2]) {
+    /// Negative endcap
+    /// same game as above
+    if (par_currentPoint[2]<par_prevPoint[2]) {
       for (; n0<static_cast<int>(layer[0].size()); ++n0) {
-	if (Pn[2] > layer[0].at(n0).z()) break;
+	      if (par_currentPoint[2] > layer[0].at(n0).z()) break;
         assert( used.at(0).size() > static_cast<unsigned int>(n0) );
-	layer[0].at(n0).getEndcapDetElements(Po, A, lDE,used[0][n0]);
+        /// collect all compatible detector elements        
+	      layer[0].at(n0).getEndcapDetElements(par_prevPoint, unitSepVector, lDE,used[0][n0]);
       }
     } else {
       for (--n0; n0>=0; --n0) {
-	if (Pn[2] < layer[0].at(n0).z()) break;
+	      if (par_currentPoint[2] < layer[0].at(n0).z()) break;
         assert( used.at(0).size() > static_cast<unsigned int>(n0) );
-	layer[0].at(n0).getEndcapDetElements(Po, A, lDE,used[0][n0]);
+        /// collect all compatible detector elements        
+	      layer[0].at(n0).getEndcapDetElements(par_prevPoint, unitSepVector, lDE,used[0][n0]);
       }
       ++n0;
     }
 
-    Po[0] = Pn[0];
-    Po[1] = Pn[1];
-    Po[2] = Pn[2];
-    Po[3] = Pn[3];
-    Po[5]+= st;
+
+    /// update the "previous point" to be the current one
+    par_prevPoint[0] = par_currentPoint[0];
+    par_prevPoint[1] = par_currentPoint[1];
+    par_prevPoint[2] = par_currentPoint[2];
+    par_prevPoint[3] = par_currentPoint[3];
+    par_prevPoint[5]+= dist3D;
   }
 
   // Sort list in propogation order
@@ -459,10 +515,13 @@ void InDet::SiDetElementsRoadMaker_xk::detElementsRoad
  std::list<const InDetDD::SiDetectorElement*>& R) const
 {
   if (!m_usePIX && !m_useSCT) return;
-  
+  /// 500 MeV / pT 
   double qp   = fabs(500.*Tp.parameters()[4]);
+  /// truncate at huge pt 
   if (qp < 1.e-10) qp = 1.e-10; 
-  double S    = m_step/qp                    ;
+  /// step size - scaled by pt / 500 MeV 
+  double S    = m_step/qp;      
+  /// upper limit to step size: 1000               ;
   if (S  > 1000. ) S  = 1000. ;
 
   bool test = true;
@@ -478,27 +537,34 @@ void InDet::SiDetElementsRoadMaker_xk::detElementsRoad
   // Note: could also give fieldCache directly to propagator if it would be more efficient - would
   // need to add interface RDS 2020/03
   std::list<Amg::Vector3D> G;
+
+  /// get a list of global positions for the road search by starting from the first surface 
+  /// and walking along the trajectory using the RK propagator 
   m_proptool->globalPositions(ctx, G, Tp, fieldprop,getBound(fieldCache, Tp), S, Trk::pion);
+  /// should find at least 2 positions to sample 
   if (G.size()<2) return;
 
+  /// if we are extrapolating along them momentum direction, 
+  /// we pick out the part ascending in R 
   if (D > 0) {
-    std::list<Amg::Vector3D>::iterator g=G.begin(), gn, ge=G.end();
-    float r0 = (*g).x()*(*g).x()+(*g).y()*(*g).y();
+    std::list<Amg::Vector3D>::iterator currentPosition=G.begin(), nextPosition, endPositions=G.end();
+    float r0 = (*currentPosition).x()*(*currentPosition).x()+(*currentPosition).y()*(*currentPosition).y();
 
-    while (g!=ge) {
-      gn = g;
-      if (++gn == ge) break;
-      
-      float r = (*gn).x()*(*gn).x()+(*gn).y()*(*gn).y();
+    while (currentPosition!=endPositions) {
+      nextPosition = currentPosition;
+      if (++nextPosition == endPositions) break;
       
+      float r = (*nextPosition).x()*(*nextPosition).x()+(*nextPosition).y()*(*nextPosition).y();
+      /// if the next point is at lower r than the previous point, remove the previous one  
       if (r < r0) {
         r0 = r;
-        G.erase(g++);
+        G.erase(currentPosition++);
       } else {
         break;
       }
     }
   }
+  /// now perform the road building using our set of positions
   detElementsRoad(G, R,test);
 }
 
-- 
GitLab


From c7c9ab037425708c8718a0f11ab56903137c361f Mon Sep 17 00:00:00 2001
From: Maximilian Goblirsch-Kolb <goblirsc@cern.ch>
Date: Sat, 3 Oct 2020 21:55:54 +0200
Subject: [PATCH 156/403] try to improve clarity some more

---
 .../SiDetElementsLayer_xk.h                   |  31 ++--
 .../SiDetElementsRoadMaker_xk.h               |  12 +-
 .../src/SiDetElementLink_xk.cxx               |   2 +-
 .../src/SiDetElementsLayer_xk.cxx             |  62 ++++---
 .../src/SiDetElementsRoadMaker_xk.cxx         | 162 +++++++++---------
 5 files changed, 137 insertions(+), 132 deletions(-)

diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsLayer_xk.h b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsLayer_xk.h
index 7159fbe8831a..d0b28e3485fc 100644
--- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsLayer_xk.h
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsLayer_xk.h
@@ -67,15 +67,22 @@ namespace InDet{
       ///                   startPoint[3] - R
       ///                   startPoint[4] - width
       ///                   startPoint[5] - step
+      /// Will populate 'lDE' and update 'used' with the detector elements
+      /// compatible with a crossing by a straight trajectory starting 
+      /// at 'startPoint' and moving in direction 'searchDirection'. 
+      /// The two additional elements of startPoint are the 
+      /// road width used as tolerance in the crossing test (in mm) 
+      /// and the step (distance to travel to the module). 
       ////////////////////////////////////////////////////////////////////
       void getBarrelDetElements
-        (std::array<float,6> startingPoint,
-         std::array<float,3> searchDirection,
+        (const std::array<float,6> & startingPoint,
+         const std::array<float,3> & searchDirection,
          std::vector<InDet::SiDetElementLink_xk::ElementWay> &lDE,
          std::vector<InDet::SiDetElementLink_xk::UsedFlag>   &used) const;
+
       void getEndcapDetElements
-	      (std::array<float,6> startingPoint,
-         std::array<float,3> searchDirection,
+	      (const std::array<float,6> & startingPoint,
+         const std::array<float,3> & searchDirection,
          std::vector<InDet::SiDetElementLink_xk::ElementWay> &lDE,
          std::vector<InDet::SiDetElementLink_xk::UsedFlag>   &used) const;
 
@@ -94,13 +101,15 @@ namespace InDet{
       float  m_dfe ;                               // max azimuthal width of de
       std::vector<SiDetElementLink_xk> m_elements; // detector elements
  
-      ///////////////////////////////////////////////////////////////////
-      // Methods
-      ///////////////////////////////////////////////////////////////////
-      void getDetElements(std::array<float,6> startingPoint,
-                          std::array<float,3> searchDirection,
-                          float Fc,
-                          float dW,
+      /// internal helper which resolves the phi-multiplicity of elements
+      /// within a layer. Same logic as above. Extra args: 
+      /// 'phiCrossing' is the phi coordinate of the layer crossing
+      /// and 'reducedRoadWidth' is a phi tolerance obtained by 
+      /// dividing the search road width by the radius of the layer  
+      void getDetElements(const std::array<float,6> & startingPoint,
+                          const std::array<float,3> & searchDirection,
+                          float phiCrossing,
+                          float reducedRoadWidth,
                           std::vector<InDet::SiDetElementLink_xk::ElementWay> &lDE,
                           std::vector<InDet::SiDetElementLink_xk::UsedFlag>   &used) const;
     };
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsRoadMaker_xk.h b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsRoadMaker_xk.h
index db202a814f50..fff1588f5b08 100644
--- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsRoadMaker_xk.h
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsRoadMaker_xk.h
@@ -43,10 +43,14 @@ class MsgStream;
 namespace InDet{
   /**
      @class SiDetElementsRoadMaker_xk 
-     InDet::SiDetElementsRoadMaker_xk is algorithm which produce list of 
-     InDetDD::SiDetectorElement* sorted in propagation order according
-     global positions of the trajectory between perigee point and max radius
-     for direction along momentum.
+     InDet::SiDetElementsRoadMaker_xk is a tool which produces a list of 
+     InDetDD::SiDetectorElement* sorted in propagation order expected to be crossed
+     by a trajectory. 
+     The elements are found by locally linearising the trajectory between
+     pairs of space points obtained by propagating the track parameters between
+     the perigee point and max radius for direction along momentum, and 
+     testing the intersection of each local trajectory element with the layers
+     /// of the detector.  
      @author Igor.Gavrilenko@cern.ch     
   */
 
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementLink_xk.cxx b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementLink_xk.cxx
index c5904a5dbcd0..c8a309d0c748 100644
--- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementLink_xk.cxx
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementLink_xk.cxx
@@ -60,7 +60,7 @@ void InDet::SiDetElementLink_xk::intersect
 (const float* r ,const float* a,float* O) const
 {
   const float* g = &m_geo[0];
-  
+  /// deciphering this is left as an exercise to the reader. 
   float     s[3] = {g[3]*g[4],g[2]*g[4],g[5]}                         ;
   float     S    = a[0]*s[0]+a[1]*s[1]+a[2]*s[2]                      ;
   if(S!=0.) S    = (g[0]-(r[0]*s[0]+r[1]*s[1]+r[2]*s[2]))/S           ;
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsLayer_xk.cxx b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsLayer_xk.cxx
index 1af0d98d40c6..69cadc51f270 100644
--- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsLayer_xk.cxx
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsLayer_xk.cxx
@@ -26,18 +26,15 @@
 ///////////////////////////////////////////////////////////////////
 
 void InDet::SiDetElementsLayer_xk::getBarrelDetElements
-(std::array<float,6> startingPoint,
- std::array<float,3> searchDirection,
+(const std::array<float,6> & startingPoint,
+ const std::array<float,3> & searchDirection,
  std::vector<InDet::SiDetElementLink_xk::ElementWay> &lDE,
  std::vector<InDet::SiDetElementLink_xk::UsedFlag>   &used) const
 {
 
-  /// In the following, identify where we cross the layer
+  /// In the following, identify where we cross the layer in r
   /// by solving the quadratic equation 
-  /// ( startingPoint_xy + X * searchDirection_xy )² = r_layer² 
-  /// We only take into account the x-y plane for this
-
-
+  /// ( startingPoint_xy + s * searchDirection_xy )² = r_layer² 
   float minusB  =2*( searchDirection[0]*startingPoint[0]
                     +searchDirection[1]*startingPoint[1]); 
   float C  = (m_r-startingPoint[0]-startingPoint[1])
@@ -61,21 +58,11 @@ void InDet::SiDetElementsLayer_xk::getBarrelDetElements
   /// if both solution occur for the same direction, 
   /// we pick the crossing that occurs first 
   if((s1*s2) > 0.) {
-    if (fabs(s1) < fabs(s2)){
-      s = s1;
-    }
-    else {
-      s = s2;
-    }
+    s = (fabs(s1) < fabs(s2) ? s1 : s2); 
   }
   /// otherwise, pick the one in the positive direction
   else{     
-    if (s1  > 0.){
-      s = s1; 
-    }
-    else{
-      s = s2;
-    }
+    s = (s1  > 0. ? s1 : s2); 
   }  
   /// Z-coordinate of the layer crossing 
   float zc   = startingPoint[2]+searchDirection[2]*s;
@@ -106,8 +93,8 @@ void InDet::SiDetElementsLayer_xk::getBarrelDetElements
 ///////////////////////////////////////////////////////////////////
 
 void InDet::SiDetElementsLayer_xk::getEndcapDetElements
-(std::array<float,6> startingPoint,
- std::array<float,3> searchDirection,
+(const std::array<float,6> & startingPoint,
+ const std::array<float,3> & searchDirection,
  std::vector<InDet::SiDetElementLink_xk::ElementWay> &lDE,
  std::vector<InDet::SiDetElementLink_xk::UsedFlag>   &used) const
 {
@@ -141,16 +128,19 @@ void InDet::SiDetElementsLayer_xk::getEndcapDetElements
 ///////////////////////////////////////////////////////////////////
 
 void InDet::SiDetElementsLayer_xk::getDetElements
-(std::array<float,6> startingPoint,
- std::array<float,3> searchDirection,
+(const std::array<float,6> & startingPoint,
+ const std::array<float,3> & searchDirection,
  float phiCrossing,
  float reducedRoadWidth,
  std::vector<InDet::SiDetElementLink_xk::ElementWay> &lDE,
  std::vector<InDet::SiDetElementLink_xk::UsedFlag>   &used) const
 {
-  constexpr float pi = M_PI, pi2 = 2.*pi; 
-  int im  = int(m_elements.size())-1; if(im<0) return;
-  int i0  = 0, i1  = im;
+  constexpr float pi = M_PI;
+  constexpr float pi2 = 2.*pi; 
+  int im  = int(m_elements.size())-1; 
+  if(im<0) return;
+  int i0  = 0;
+  int i1  = im;
 
   /// iteratively search for the index of the crossing by splitting the remaining search region in half
   if (phiCrossing> m_elements[i0].phi() && phiCrossing< m_elements[i1].phi()) {
@@ -168,6 +158,7 @@ void InDet::SiDetElementsLayer_xk::getDetElements
   //
   std::array<float,3> intersectionOutcome;
   int i = i0;
+  /// first, rotate in the positive phi direction
   while(1) {
     assert( static_cast<unsigned int>(i)<m_elements.size() );
     /// if detector element i on this layer is not already used for this road
@@ -175,9 +166,11 @@ void InDet::SiDetElementsLayer_xk::getDetElements
       /// 
       float dPhi =fabs(m_elements[i].phi()-phiCrossing); 
       if(dPhi>pi) dPhi=fabs(dPhi-pi2);    /// project delta phi into -pi..pi
+
       /// dPhi must be compatible with the phi half-width within a tolerance
       /// specified by the road width divided by the radius 
       if((dPhi-reducedRoadWidth)>m_dfe) break;
+
       /// intersect our projection with the detector element. 
       /// Output: intersectionOutcome[0] - close distance in azimuthal direction
       ///         intersectionOutcome[1] - close distance in r or z    direction
@@ -197,21 +190,26 @@ void InDet::SiDetElementsLayer_xk::getDetElements
     if(i>im) i=0; /// loop around if we have to 
     if(i==i0) return; /// stop when we have tried all detector elements
   }
-  /// This is dead code?!
+  /// we get here by triggering the 'break' clause in the positive-direction loop above 
   i1 = i; i = i0;
   while(1) {
-
-    --i; if(i<0) i=im; if(i==i1) return;
-
+    /// now rotate in the negative phi direction
+    --i; 
+    /// loop around at zero
+    if(i<0) i=im; 
+    /// stop at full circle
+    if(i==i1) return;
     assert( static_cast<unsigned int>(i)<m_elements.size() );
     if(!used[i].used()) {
 
-      float dPhi =fabs(m_elements[i].phi()-phiCrossing); if(dPhi>pi) dPhi=fabs(dPhi-pi2);
+      float dPhi =fabs(m_elements[i].phi()-phiCrossing); 
+      if(dPhi>pi) dPhi=fabs(dPhi-pi2);
       if((dPhi-reducedRoadWidth)>m_dfe) return;
       m_elements[i].intersect(&(startingPoint[0]),&(searchDirection[0]),&(intersectionOutcome[0]));
       
       if((intersectionOutcome[0]-startingPoint[4])<=0 && (intersectionOutcome[1]-startingPoint[4])<=0.) {
-         lDE.push_back(InDet::SiDetElementLink_xk::ElementWay(&m_elements[i],startingPoint[5]+intersectionOutcome[2])); used[i].setUsed();
+         lDE.push_back(InDet::SiDetElementLink_xk::ElementWay(&m_elements[i],startingPoint[5]+intersectionOutcome[2])); 
+         used[i].setUsed();
       }
     }
   }
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx
index fac2edf457f3..073370977b70 100644
--- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx
@@ -293,7 +293,7 @@ std::ostream& InDet::operator <<
 void InDet::SiDetElementsRoadMaker_xk::detElementsRoad
 (std::list<Amg::Vector3D>& GP,
  std::list<const InDetDD::SiDetectorElement*>& Road,
- bool test) const
+ bool testDirection) const
 {  
   if (!m_usePIX && !m_useSCT) return;
 
@@ -310,8 +310,12 @@ void InDet::SiDetElementsRoadMaker_xk::detElementsRoad
   /// phi in Z. 
   const SiDetElementsLayerVectors_xk &layer = *getLayers();
 
+  /// iterators over the positions to consider
   std::list<Amg::Vector3D>::iterator currentPosition=GP.begin(), endPositions=GP.end();
-  std::array<float,6> par_prevPoint{static_cast<float>((*currentPosition).x()),            // x of first position
+
+  /// fill an array with the reference point (start with the first one), the road width and a placeholder
+  /// for the step length
+  std::array<float,6> par_startingPoint{static_cast<float>((*currentPosition).x()),            // x of first position
                 static_cast<float>((*currentPosition).y()),             // y of first position
                 static_cast<float>((*currentPosition).z()),             // Z of first position
                 static_cast<float>(sqrt((*currentPosition).x()*(*currentPosition).x()+(*currentPosition).y()*(*currentPosition).y())),    // r of first position 
@@ -323,7 +327,7 @@ void InDet::SiDetElementsRoadMaker_xk::detElementsRoad
   /// the first position from the left side
   int n0 = 0;
   for (; n0!=static_cast<int>(layer[0].size()); ++n0) {
-    if (par_prevPoint[2] > layer[0].at(n0).z()) break;
+    if (par_startingPoint[2] > layer[0].at(n0).z()) break;
   }
 
   /// check the barrel layers
@@ -331,13 +335,13 @@ void InDet::SiDetElementsRoadMaker_xk::detElementsRoad
   /// the first position in the radial direction
   int n1 = 0;
   for (; n1!=static_cast<int>(layer[1].size()); ++n1) {
-    if (par_prevPoint[3] < layer[1].at(n1).r()) break;
+    if (par_startingPoint[3] < layer[1].at(n1).r()) break;
   }
   /// and finally, the left endcap. 
   /// this time, look for the layer closest on the right side. 
   int n2 = 0;
   for (; n2!=static_cast<int>(layer[2].size()); ++n2) {
-    if (par_prevPoint[2] < layer[2].at(n2).z()) break;
+    if (par_startingPoint[2] < layer[2].at(n2).z()) break;
   }
 
   
@@ -354,48 +358,54 @@ void InDet::SiDetElementsRoadMaker_xk::detElementsRoad
      }
   }
 
-  /// done with the first probed position. Now we look at the others
+  /// done with the first probed position. Now we can start to move along the trajectory
   ++currentPosition;
-  /// do the following for every point
   while (currentPosition!=endPositions) {
-    std::array<float,4>  par_currentPoint{static_cast<float>((*currentPosition).x()),         /// x of the current position
+    /// store the point we are aiming towards
+    std::array<float,4>  par_targetPoint{static_cast<float>((*currentPosition).x()),         /// x of the current position
                     static_cast<float>((*currentPosition).y()),         /// y of the current position
                     static_cast<float>((*currentPosition).z()),         /// z of the current position
 		                static_cast<float>(sqrt((*currentPosition).x()*(*currentPosition).x()+(*currentPosition).y()*(*currentPosition).y()))   /// r of the current position
                     };
 
-    float dx = par_currentPoint[0]-par_prevPoint[0];         /// dx between the current and the first position
-    float dy = par_currentPoint[1]-par_prevPoint[1];         /// dy between the current and the first position 
-    float dz = par_currentPoint[2]-par_prevPoint[2];         /// dz between the current and the first position 
+    /// perform linearisation
+    float dx = par_targetPoint[0]-par_startingPoint[0];         /// dx between the current and the first position
+    float dy = par_targetPoint[1]-par_startingPoint[1];         /// dy between the current and the first position 
+    float dz = par_targetPoint[2]-par_startingPoint[2];         /// dz between the current and the first position 
     float dist3D = sqrt(dx*dx+dy*dy+dz*dz);   /// 3D distance between the current and the first position
-    if (dist3D <=0.) {                   /// if geometry breaks down or two points are duplicates, 
-      ++currentPosition;                /// we whistle innocently and make a point of looking somewhere else 
+    if (dist3D <=0.) {                    /// if geometry breaks down or two points are duplicates, 
+      ++currentPosition;                  /// we whistle innocently and make a point of looking somewhere else 
       continue;
     }
     float inverseDistance = 1./dist3D;                   /// inverse distance to the first position 
-    std::array<float,3> unitSepVector{dx*inverseDistance, dy*inverseDistance, dz*inverseDistance};  /// unit vector with the linearised direction we are currently moving in 
+    /// now we can book the linearised search direction 
+    std::array<float,3> searchDirection{dx*inverseDistance, dy*inverseDistance, dz*inverseDistance};
 
-    /// Min. radius test between this two points
-    float unitSepTransverseComp = unitSepVector[0]*unitSepVector[0]+unitSepVector[1]*unitSepVector[1];     /// transverse component of the separation vector 
+    /// Having found the search direction, we are ready to look for detector elements and iterate.
+    /// Before doing so, we add an additional test to ensure we probe the perigee point
+    /// if we cross it on the way. 
+    float unitSepTransverseComp = searchDirection[0]*searchDirection[0]+searchDirection[1]*searchDirection[1];     /// transverse component of the separation vector 
     float dr = 0.                 ;     
     if (unitSepTransverseComp!=0.) {                               
       /// *negative* component of the global location of the previous position into the direction connecting our positions in the x-y plane 
-      float sm = -( unitSepVector[0]*par_prevPoint[0] +
-                    unitSepVector[1]*par_prevPoint[1])
+      /// corresponds to the path length opposite to the linearised direction to reach the perigee 
+      float sm = -( searchDirection[0]*par_startingPoint[0] +
+                    searchDirection[1]*par_startingPoint[1])
                     /unitSepTransverseComp; 
 
       /// a positive value of SM means the closest approach to the beamline is between the two positions we are considering. 
-      /// This occasionally happens for the first position along the search trajectory generated by the propagator tool. 
-      /// In this case, we do not iterate, but instead repeat the current step with a different 'previous' point
-      /// which attempts to approximate the perigee location 
-      if (sm > 1. && sm < dist3D) {
-        par_currentPoint[0] = par_prevPoint[0]+unitSepVector[0]*sm;
-        par_currentPoint[1] = par_prevPoint[1]+unitSepVector[1]*sm;
-        par_currentPoint[2] = par_prevPoint[2]+unitSepVector[2]*sm;
-        par_currentPoint[3] = sqrt(par_currentPoint[0]*par_currentPoint[0]+par_currentPoint[1]*par_currentPoint[1]);
-        /// now, the current point is the perigee estimate and the previous point is 
-        /// the (likely innermost) one beyond the perigee 
-	      dr    = 20.;
+      /// In this case, we do not want to iterate to the next point, but instead insert an additional step where we use the 
+      /// perigee point as our reference. We do this by setting the target point to the perigee, which will be made the 
+      /// reference point when repeating the loop. 
+      /// Since the perigee is estimated using the linearised direction, this direction stays valid and does not need to be updated.
+      if (sm > 1. && sm < dist3D) {   /// only add the perigee point if the next point is beyond the perigee, and if we are not too close anyway
+        par_targetPoint[0] = par_startingPoint[0]+searchDirection[0]*sm;
+        par_targetPoint[1] = par_startingPoint[1]+searchDirection[1]*sm;
+        par_targetPoint[2] = par_startingPoint[2]+searchDirection[2]*sm;
+        par_targetPoint[3] = sqrt(par_targetPoint[0]*par_targetPoint[0]+par_targetPoint[1]*par_targetPoint[1]);
+        /// now, the target point is the perigee estimate, while 
+        /// the reference point for this round stays unchanged.
+	      dr    = 20.;  /// allow 2cm on top of the perigee location when extrapolating inward. 
       } else {
         ++currentPosition;
       }
@@ -403,103 +413,87 @@ void InDet::SiDetElementsRoadMaker_xk::detElementsRoad
       ++currentPosition;
     }
 
-    /// Barrel
+    /// Start collecting detector elements traversed by our linearised path. 
+
+    /// First, barrel elements
+
     /// if we are moving outwards in r: 
-    if (par_currentPoint[3]>par_prevPoint[3]) {
-      /// loop over all barrel layers (starting with the one previously identified)
+    if (par_targetPoint[3]>par_startingPoint[3]) {
+      /// loop over all barrel layers (starting with the closest one previously identified)
       for (; n1<static_cast<int>(layer[1].size()); ++n1) {
-        /// stop if we moved past the test point in R
-	      if (par_currentPoint[3] < layer[1].at(n1).r()) break;
+        /// stop if we moved past the targer point in R
+	      if (par_targetPoint[3] < layer[1].at(n1).r()) break;
         assert( used.at(1).size() > static_cast<unsigned int>(n1) );
-        /// collect all compatible detector elements
-	      layer[1].at(n1).getBarrelDetElements(par_prevPoint, unitSepVector, lDE, used[1][n1]);
+        /// collect all compatible detector elements from the current layer
+	      layer[1].at(n1).getBarrelDetElements(par_startingPoint, searchDirection, lDE, used[1][n1]);
       }
       /// if we are moving inward in R, iterate the other way for the barrel
     } else {
       for (--n1; n1>=0; --n1) {
         /// stop if we moved past the test point in R
-	      if (par_currentPoint[3] > layer[1].at(n1).r()+dr) break;
+	      if (par_targetPoint[3] > layer[1].at(n1).r()+dr) break;
         assert( used.at(1).size() > static_cast<unsigned int>(n1) );
         /// collect all compatible detector elements        
-	      layer[1].at(n1).getBarrelDetElements(par_prevPoint, unitSepVector, lDE, used[1][n1]);
+	      layer[1].at(n1).getBarrelDetElements(par_startingPoint, searchDirection, lDE, used[1][n1]);
       }
       ++n1;
     }
 
     /// Positive endcap
     /// again check if we are moving forward or back in z
-    if (par_currentPoint[2]>par_prevPoint[2]) {
+    if (par_targetPoint[2]>par_startingPoint[2]) {
       for (; n2<static_cast<int>(layer[2].size()); ++n2) {
-	      if (par_currentPoint[2] < layer[2].at(n2).z()) break;
+	      if (par_targetPoint[2] < layer[2].at(n2).z()) break;
         assert( used.at(2).size() > static_cast<unsigned int>(n2) );
         /// collect all compatible detector elements        
-	      layer[2].at(n2).getEndcapDetElements(par_prevPoint, unitSepVector, lDE,used[2][n2]);
+	      layer[2].at(n2).getEndcapDetElements(par_startingPoint, searchDirection, lDE,used[2][n2]);
       }
     } else {
       for (--n2; n2>=0; --n2) {
-	      if (par_currentPoint[2] > layer[2].at(n2).z()) break;
+	      if (par_targetPoint[2] > layer[2].at(n2).z()) break;
         assert( used.at(2).size() > static_cast<unsigned int>(n2) );
         /// collect all compatible detector elements        
-	      layer[2].at(n2).getEndcapDetElements(par_prevPoint, unitSepVector, lDE, used[2][n2]);
+	      layer[2].at(n2).getEndcapDetElements(par_startingPoint, searchDirection, lDE, used[2][n2]);
       }
       ++n2;
     }
 
     /// Negative endcap
     /// same game as above
-    if (par_currentPoint[2]<par_prevPoint[2]) {
+    if (par_targetPoint[2]<par_startingPoint[2]) {
       for (; n0<static_cast<int>(layer[0].size()); ++n0) {
-	      if (par_currentPoint[2] > layer[0].at(n0).z()) break;
+	      if (par_targetPoint[2] > layer[0].at(n0).z()) break;
         assert( used.at(0).size() > static_cast<unsigned int>(n0) );
         /// collect all compatible detector elements        
-	      layer[0].at(n0).getEndcapDetElements(par_prevPoint, unitSepVector, lDE,used[0][n0]);
+	      layer[0].at(n0).getEndcapDetElements(par_startingPoint, searchDirection, lDE,used[0][n0]);
       }
     } else {
       for (--n0; n0>=0; --n0) {
-	      if (par_currentPoint[2] < layer[0].at(n0).z()) break;
+	      if (par_targetPoint[2] < layer[0].at(n0).z()) break;
         assert( used.at(0).size() > static_cast<unsigned int>(n0) );
         /// collect all compatible detector elements        
-	      layer[0].at(n0).getEndcapDetElements(par_prevPoint, unitSepVector, lDE,used[0][n0]);
+	      layer[0].at(n0).getEndcapDetElements(par_startingPoint, searchDirection, lDE,used[0][n0]);
       }
       ++n0;
     }
-
-
-    /// update the "previous point" to be the current one
-    par_prevPoint[0] = par_currentPoint[0];
-    par_prevPoint[1] = par_currentPoint[1];
-    par_prevPoint[2] = par_currentPoint[2];
-    par_prevPoint[3] = par_currentPoint[3];
-    par_prevPoint[5]+= dist3D;
+    /// update the starting point to be the current target point
+    par_startingPoint[0] = par_targetPoint[0];
+    par_startingPoint[1] = par_targetPoint[1];
+    par_startingPoint[2] = par_targetPoint[2];
+    par_startingPoint[3] = par_targetPoint[3];
+    /// and increment the total propagation distance
+    par_startingPoint[5]+= dist3D;
   }
 
-  // Sort list in propogation order
-  //
-  std::vector<InDet::SiDetElementLink_xk::ElementWay>::iterator l=lDE.begin(), le=lDE.end(), n, m;
-  if (l==le) return;
-
-  bool nc =true;
-  while (nc) {
-    nc =false; m=l; n=l;
-    for (++n; n!=le; ++n) {
-      if (m->way() > n->way()) {
-        InDet::SiDetElementLink_xk::ElementWay d=(*m);
-        (*m)=(*n);
-        (*n)=d;
-        nc=true;
-      }
-      ++m;
-    }
-  }
+  // Sort list in propagation order
+  std::sort(lDE.begin(),lDE.end(),[](const InDet::SiDetElementLink_xk::ElementWay& l1, const InDet::SiDetElementLink_xk::ElementWay & l2){
+    return l1.way() < l2.way(); 
+  });
 
   // Fill list pointers to detector elements
-  //
-  for (l=lDE.begin(); l!=le; ++l) {
-    if (test) {
-      if (l->way() >= 0.) Road.push_back(l->link()->detElement());
-    } else {
-      Road.push_back(l->link()->detElement());
-    }
+  for (auto & d : lDE){
+    if (testDirection && d.way() < 0) continue; 
+    Road.push_back(d.link()->detElement());
   }
 }
 
@@ -524,9 +518,9 @@ void InDet::SiDetElementsRoadMaker_xk::detElementsRoad
   /// upper limit to step size: 1000               ;
   if (S  > 1000. ) S  = 1000. ;
 
-  bool test = true;
+  bool testDirection = true;
   if (D<0) {
-    test = false;
+    testDirection = false;
     S=-S;
   }
 
@@ -565,7 +559,7 @@ void InDet::SiDetElementsRoadMaker_xk::detElementsRoad
     }
   }
   /// now perform the road building using our set of positions
-  detElementsRoad(G, R,test);
+  detElementsRoad(G, R,testDirection);
 }
 
 
-- 
GitLab


From 1866e7064a3f7d6512d0bdbc979017412cb7d900 Mon Sep 17 00:00:00 2001
From: Adam Edward Barton <adam.edward.barton@cern.ch>
Date: Sat, 3 Oct 2020 23:18:19 +0100
Subject: [PATCH 157/403] Clang-tidy performance ran on TrigTrackSeedGenerator

---
 .../src/TrigTrackSeedGenerator.cxx            | 44 +++++++++----------
 .../TrigInDetPattRecoTools/test/mockSeeds.cxx |  3 +-
 2 files changed, 24 insertions(+), 23 deletions(-)

diff --git a/Trigger/TrigTools/TrigInDetPattRecoTools/src/TrigTrackSeedGenerator.cxx b/Trigger/TrigTools/TrigInDetPattRecoTools/src/TrigTrackSeedGenerator.cxx
index e6907a64206f..b1fea2e64d97 100644
--- a/Trigger/TrigTools/TrigInDetPattRecoTools/src/TrigTrackSeedGenerator.cxx
+++ b/Trigger/TrigTools/TrigInDetPattRecoTools/src/TrigTrackSeedGenerator.cxx
@@ -330,7 +330,7 @@ bool TrigTrackSeedGenerator::validateLayerPairNew(int layerI, int layerJ, float
 
   bool isBarrel = (typeJ == 0);
 
-  if(isBarrel && fabs(refCoordJ-rm)>m_maxDeltaRadius) return false;
+  if(isBarrel && std::fabs(refCoordJ-rm)>m_maxDeltaRadius) return false;
 
   //boundaries for nextLayer
 
@@ -343,8 +343,8 @@ bool TrigTrackSeedGenerator::validateLayerPairNew(int layerI, int layerJ, float
 
       m_minCoord = m_zMinus + refCoordJ*(zm-m_zMinus)/rm;//+deltaRefCoord
       m_maxCoord = m_zPlus + refCoordJ*(zm-m_zPlus)/rm;//-deltaRefCoord
-      m_minCoord -= deltaRefCoord*fabs(zm-m_zMinus)/rm;//corrections due to the layer width
-      m_maxCoord += deltaRefCoord*fabs(zm-m_zPlus)/rm;
+      m_minCoord -= deltaRefCoord*std::fabs(zm-m_zMinus)/rm;//corrections due to the layer width
+      m_maxCoord += deltaRefCoord*std::fabs(zm-m_zPlus)/rm;
       //if(m_minCoord>m_maxCoord) {
       //std::cout<<"1 WRONG ORDER: m_minCoord="<<m_minCoord<<" m_maxCoord="<<m_maxCoord<<std::endl;
       //}
@@ -353,8 +353,8 @@ bool TrigTrackSeedGenerator::validateLayerPairNew(int layerI, int layerJ, float
 
       m_minCoord = m_zPlus + refCoordJ*(zm-m_zPlus)/rm;//+deltaRefCoord
       m_maxCoord = m_zMinus + refCoordJ*(zm-m_zMinus)/rm;//-deltaRefCoord
-      m_minCoord -= deltaRefCoord*fabs(zm-m_zPlus)/rm;
-      m_maxCoord += deltaRefCoord*fabs(zm-m_zMinus)/rm;
+      m_minCoord -= deltaRefCoord*std::fabs(zm-m_zPlus)/rm;
+      m_maxCoord += deltaRefCoord*std::fabs(zm-m_zMinus)/rm;
       //if(m_minCoord>m_maxCoord) {
       //std::cout<<"2 WRONG ORDER: m_minCoord="<<m_minCoord<<" m_maxCoord="<<m_maxCoord<<std::endl;
       //}
@@ -382,8 +382,8 @@ bool TrigTrackSeedGenerator::validateLayerPairNew(int layerI, int layerJ, float
 
 	m_minCoord = (refCoordJ-m_zMinus)*rm/(zm-m_zMinus);
 	m_maxCoord = (refCoordJ-m_zPlus)*rm/(zm-m_zPlus);
-	m_minCoord -= deltaRefCoord*rm/fabs(zm-m_zMinus);
-	m_maxCoord += deltaRefCoord*rm/fabs(zm-m_zPlus);
+	m_minCoord -= deltaRefCoord*rm/std::fabs(zm-m_zMinus);
+	m_maxCoord += deltaRefCoord*rm/std::fabs(zm-m_zPlus);
 
 	if(zm <= m_zPlus) m_maxCoord = maxB;
 	
@@ -405,8 +405,8 @@ bool TrigTrackSeedGenerator::validateLayerPairNew(int layerI, int layerJ, float
 
 	m_minCoord = (refCoordJ-m_zPlus)*rm/(zm-m_zPlus);
 	m_maxCoord = (refCoordJ-m_zMinus)*rm/(zm-m_zMinus);
-	m_minCoord -= deltaRefCoord*rm/fabs(zm-m_zPlus);
-	m_maxCoord += deltaRefCoord*rm/fabs(zm-m_zMinus);
+	m_minCoord -= deltaRefCoord*rm/std::fabs(zm-m_zPlus);
+	m_maxCoord += deltaRefCoord*rm/std::fabs(zm-m_zMinus);
 	//if(m_minCoord>m_maxCoord) {
 	//std::cout<<"32 WRONG ORDER: m_minC="<<m_minCoord<<" m_maxC="<<m_maxCoord<<" rm="<<rm<<" zm="<<zm<<" refC="<<refCoordJ<<" zminus="<<m_zMinus<<" zplus="<<m_zPlus<<std::endl;
 	//}
@@ -429,8 +429,8 @@ bool TrigTrackSeedGenerator::validateLayerPairNew(int layerI, int layerJ, float
 
 	m_minCoord = (refCoordJ-m_zPlus)*rm/(zm-m_zPlus);
 	m_maxCoord = (refCoordJ-m_zMinus)*rm/(zm-m_zMinus);
-	m_minCoord -= deltaRefCoord*rm/fabs(zm-m_zPlus);
-	m_maxCoord += deltaRefCoord*rm/fabs(zm-m_zMinus);
+	m_minCoord -= deltaRefCoord*rm/std::fabs(zm-m_zPlus);
+	m_maxCoord += deltaRefCoord*rm/std::fabs(zm-m_zMinus);
 	if(zm > m_zMinus) m_maxCoord = maxB;	
 	if(m_minCoord > maxB) return false;
 	if(m_maxCoord < minB) return false;
@@ -450,8 +450,8 @@ bool TrigTrackSeedGenerator::validateLayerPairNew(int layerI, int layerJ, float
 
 	m_minCoord = (refCoordJ-m_zMinus)*rm/(zm-m_zMinus);
 	m_maxCoord = (refCoordJ-m_zPlus)*rm/(zm-m_zPlus);
-	m_minCoord -= deltaRefCoord*rm/fabs(zm-m_zMinus);
-	m_maxCoord += deltaRefCoord*rm/fabs(zm-m_zPlus);
+	m_minCoord -= deltaRefCoord*rm/std::fabs(zm-m_zMinus);
+	m_maxCoord += deltaRefCoord*rm/std::fabs(zm-m_zPlus);
 	//if(m_minCoord>m_maxCoord) {
 	//std::cout<<"42 WRONG ORDER: m_minC="<<m_minCoord<<" m_maxC="<<m_maxCoord<<" rm="<<rm<<" zm="<<zm<<" refC="<<refCoordJ<<" zminus="<<m_zMinus<<" zplus="<<m_zPlus<<std::endl;
 	//}
@@ -529,8 +529,8 @@ int TrigTrackSeedGenerator::processSpacepointRange(int lJ, float rm, float zm, b
     
     float dr = rsp - rm;
     
-    if(fabs(dr)>m_maxDeltaRadius ) continue;
-    if(fabs(dr)<m_minDeltaRadius ) continue;
+    if(std::fabs(dr)>m_maxDeltaRadius ) continue;
+    if(std::fabs(dr)<m_minDeltaRadius ) continue;
     
     //inner doublet check
     
@@ -538,7 +538,7 @@ int TrigTrackSeedGenerator::processSpacepointRange(int lJ, float rm, float zm, b
     
     float dz = zsp - zm;
     float tau = dz/dr;
-    if (fabs(tau) > 7.41) continue;
+    if (std::fabs(tau) > 7.41) continue;
     
     
     float z0  = zm - rm*tau;
@@ -573,8 +573,8 @@ int TrigTrackSeedGenerator::processSpacepointRangeZv(float rm, float zm, bool ch
     float zsp = (*spIt)->z();  
     float dr = rsp - rm;
 	      
-    if(fabs(dr)>m_maxDeltaRadius ) continue;
-    if(fabs(dr)<m_minDeltaRadius ) continue;
+    if(std::fabs(dr)>m_maxDeltaRadius ) continue;
+    if(std::fabs(dr)<m_minDeltaRadius ) continue;
 		
     //inner doublet check
 
@@ -582,7 +582,7 @@ int TrigTrackSeedGenerator::processSpacepointRangeZv(float rm, float zm, bool ch
  
     float dz = zsp - zm;
     float tau = dz/dr;
-    if (fabs(tau) > 7.41) continue;//|eta|<2.7
+    if (std::fabs(tau) > 7.41) continue;//|eta|<2.7
 
     if(dr<0) {
       m_SoA.m_spi[m_nInner++] = *spIt;
@@ -768,7 +768,7 @@ void TrigTrackSeedGenerator::createTriplets(const TrigSiSpacePointBase* pS, int
       const float Q = fabs_d0*fabs_d0;
       if(output.size()>=m_settings.m_maxTripletBufferLength) {
         std::sort(output.begin(), output.end(), 
-          [](TrigInDetTriplet A, const TrigInDetTriplet B) {
+          [](const TrigInDetTriplet& A, const TrigInDetTriplet& B) {
             return A.Q() > B.Q();
           }
         );
@@ -1056,7 +1056,7 @@ void TrigTrackSeedGenerator::createTripletsNew(const TrigSiSpacePointBase* pS, i
       const double Q = fabs_d0*fabs_d0;
       if(output.size()>=m_settings.m_maxTripletBufferLength) {
         std::sort(output.begin(), output.end(), 
-          [](const TrigInDetTriplet A, const TrigInDetTriplet B) {
+          [](const TrigInDetTriplet& A, const TrigInDetTriplet& B) {
             return A.Q() > B.Q();
           }
         );
@@ -1105,7 +1105,7 @@ void TrigTrackSeedGenerator::storeTriplets(std::vector<TrigInDetTriplet>& triple
 void TrigTrackSeedGenerator::getSeeds(std::vector<TrigInDetTriplet>& vs) {
   vs.clear();
   std::sort(m_triplets.begin(), m_triplets.end(), 
-    [](const TrigInDetTriplet A, const TrigInDetTriplet B) {
+    [](const TrigInDetTriplet& A, const TrigInDetTriplet& B) {
       return A.Q() < B.Q();
     }
   );
diff --git a/Trigger/TrigTools/TrigInDetPattRecoTools/test/mockSeeds.cxx b/Trigger/TrigTools/TrigInDetPattRecoTools/test/mockSeeds.cxx
index 0a202071155a..ccceccd70693 100644
--- a/Trigger/TrigTools/TrigInDetPattRecoTools/test/mockSeeds.cxx
+++ b/Trigger/TrigTools/TrigInDetPattRecoTools/test/mockSeeds.cxx
@@ -1,4 +1,5 @@
 #include <boost/tokenizer.hpp>
+#include <cmath>
 #include <string>
 #include <vector>
 #include <iostream>
@@ -245,7 +246,7 @@ int main()
   for (unsigned int i = 0; i < times.size(); i++) {
     dev_time += (times[i] - mean_time)*(times[i] - mean_time);
   }
-  dev_time = sqrt(dev_time/times.size());
+  dev_time = std::sqrt(dev_time/times.size());
     
   std::cout << "Seed making time: " << mean_time  << " +/- " << dev_time << " microseconds" << std::endl;
   
-- 
GitLab


From 912200723a2da646aea0a361318f06f86b98e377 Mon Sep 17 00:00:00 2001
From: John Derek Chapman <chapman@hep.phy.cam.ac.uk>
Date: Sat, 3 Oct 2020 23:34:12 +0000
Subject: [PATCH 158/403] Merge branch
 'MuonStationBuilder_fix_bug_in_printout_statement' into '21.3'

Fix printout statement in MuonStationBuilder

See merge request atlas/athena!36926

(cherry picked from commit 3e57a248d4c9271afb203198fd0a1eff0516320b)

c0e64353 Fix printout statement in MuonStationBuilder
---
 Control/AthenaConfiguration/python/iconfTool/gui/__init__.py    | 0
 .../MuonTrackingGeometry/src/MuonStationBuilder.cxx             | 2 +-
 2 files changed, 1 insertion(+), 1 deletion(-)
 mode change 100644 => 100755 Control/AthenaConfiguration/python/iconfTool/gui/__init__.py

diff --git a/Control/AthenaConfiguration/python/iconfTool/gui/__init__.py b/Control/AthenaConfiguration/python/iconfTool/gui/__init__.py
old mode 100644
new mode 100755
diff --git a/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonStationBuilder.cxx b/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonStationBuilder.cxx
index 829113ce6126..3102d20636f6 100644
--- a/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonStationBuilder.cxx
+++ b/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonStationBuilder.cxx
@@ -272,7 +272,7 @@ const std::vector<const Trk::DetachedTrackingVolume*>* Muon::MuonStationBuilder:
 	    if (isLargeSector) sectorL.push_back(layer);
 	    else sectorS.push_back(layer);
 	    if(isLargeSector) ATH_MSG_INFO( "new NSW prototype build for Large sector: " << protoName <<", "<<vols[ish].second.size() << " x0 " << mat.fullMaterial(layTransf.translation())->x0() << " thickness " << (mat.fullMaterial(layTransf.translation()))->thickness() );
-	    if(!isLargeSector) ATH_MSG_INFO( "new NSW prototype build for Large sector: " << protoName <<", "<<vols[ish].second.size() << " x0 " << mat.fullMaterial(layTransf.translation())->x0()<< " thickness " << (mat.fullMaterial(layTransf.translation()))->thickness() );
+	    if(!isLargeSector) ATH_MSG_INFO( "new NSW prototype build for Small sector: " << protoName <<", "<<vols[ish].second.size() << " x0 " << mat.fullMaterial(layTransf.translation())->x0()<< " thickness " << (mat.fullMaterial(layTransf.translation()))->thickness() );
 	  } else {
             ATH_MSG_DEBUG( " NO layer build for: " << protoName);
 	  }
-- 
GitLab


From 15b4c1e4a5b8a9c64bb7123b7086c5857e2125a4 Mon Sep 17 00:00:00 2001
From: Patrick Scholer <patrick.scholer@cern.ch>
Date: Sun, 4 Oct 2020 14:09:09 +0200
Subject: [PATCH 159/403] undo change of mod picked up by cherry pick

---
 Control/AthenaConfiguration/python/iconfTool/gui/__init__.py | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 mode change 100755 => 100644 Control/AthenaConfiguration/python/iconfTool/gui/__init__.py

diff --git a/Control/AthenaConfiguration/python/iconfTool/gui/__init__.py b/Control/AthenaConfiguration/python/iconfTool/gui/__init__.py
old mode 100755
new mode 100644
-- 
GitLab


From dae765059a7c647d2ec8f23f97285e91e2e0eab3 Mon Sep 17 00:00:00 2001
From: sutt <sutt@cern.ch>
Date: Sun, 4 Oct 2020 14:42:14 +0200
Subject: [PATCH 160/403] Remaining changes to remove the RegSelSvc ID use

These changes (hopefully) finish the change needed to remove the use of the RegSelSvc
for the ID sub-systems.

In addition, there are changes to the RegSelSvc code and the IDRegionSelector
code to remove the generation of the lookup tables using the old code, and remove
the RS functionality for the Pixel, SCT and TRT from the old RegSe;Svc.

In addition, to get round an issue with the PixelCablingCondAlg which seems to
report an unusable EventIDRange, there is a hack to get it to return a range
which should (mostly) work.

This hack should be replaced by a proper impementation of the PixelCablingCondAlg
which no longer needs to set up during the initialise (at least for the RegionSelector)

If the pixel cabling still needs to be configured during initialize() for some
other reason, then this range should be fixed such that it provides a valid range
for the subseuqnet use, or overwridden properly in the execute method.
---
 .../RegionSelector/src/RegSelSvc.cxx          | 487 ++----------------
 .../src/PixelCablingCondAlg.cxx               |   6 +-
 .../src/InDetRegionSelectorLUT.cxx            |  59 +--
 .../src/SiRegSelCondAlg.cxx                   |  14 +-
 .../src/SiRegionSelectorTable.cxx             | 170 +-----
 .../src/RegSelCondAlg_LAr.cxx                 |  11 +-
 .../TrigGenericAlgs/SeededSuperRoiAllTEAlgo.h |   5 -
 .../src/SeededSuperRoiAllTEAlgo.cxx           |  21 +-
 .../TrigT2MinBias/CMakeLists.txt              |   2 +-
 .../python/TrigT2MinBiasConfig.py             |   6 +
 .../src/TrigCountSpacePoints.cxx              |  20 +-
 .../TrigT2MinBias/src/TrigCountSpacePoints.h  |   6 +-
 .../TrigLongLivedParticlesHypo/CMakeLists.txt |   2 +-
 .../TrigLLPInnerDetectorHypo.h                |   9 +-
 .../src/TrigLLPInnerDetectorHypo.cxx          |  28 +-
 .../TrigInDetConf/python/RoiManipulators.py   |   6 -
 16 files changed, 116 insertions(+), 736 deletions(-)

diff --git a/DetectorDescription/RegionSelector/src/RegSelSvc.cxx b/DetectorDescription/RegionSelector/src/RegSelSvc.cxx
index 0ad022d9fb18..564a5ba1ec93 100755
--- a/DetectorDescription/RegionSelector/src/RegSelSvc.cxx
+++ b/DetectorDescription/RegionSelector/src/RegSelSvc.cxx
@@ -175,20 +175,6 @@ StatusCode RegSelSvc::initialize() {
   ATH_MSG_INFO( "DeltaZ = " << m_DeltaZ );
 
 
-  
-  std::string sctflag("enabled");
-  std::string pixelflag("enabled");
-  std::string trtflag("enabled");
-
-  if ( m_initOnlyID.value() ) { 
-    if ( !m_initSCT.value() )   sctflag   = "disabled"; 
-    else ATH_CHECK(m_SCTCablingToolInc.retrieve()); // SCT_CablingToolInc has to be retrieved now.
-    // Otherwise, SCT_RegionSelectorTable cannot use ready SCT_CablingToolInc.
-
-    if ( !m_initPixel.value() ) pixelflag = "disabled"; 
-    if ( !m_initTRT.value() )   trtflag   = "disabled"; 
-  }
-   
   std::string rpcflag("enabled");
   std::string mdtflag("enabled");
   std::string tgcflag("enabled");
@@ -209,8 +195,6 @@ StatusCode RegSelSvc::initialize() {
   
   msg(MSG::INFO) << "detector switches:" 
                  << " indet=" << (m_initOnlyID.value() ? "enabled":"disabled");
-  if( m_initOnlyID.value() )
-    msg() << " ( sct=" << sctflag << " pixel=" << pixelflag << " trt=" << trtflag << " )"; 
 
   msg() << " calo="  << (m_initOnlyCalo.value() ? "enabled":"disabled") 
         << " muon="  << (m_initOnlyMuon.value() ? "enabled":"disabled");
@@ -301,7 +285,6 @@ void RegSelSvc::handle(const Incident& incident) {
     initialised = true;
 
     // call Innr detector, Calo and Muon handlers 
-    if ( m_initOnlyID )    handleID();
     if ( m_initOnlyMuon )  handleMuon();
     //    if ( m_initOnlyCalo )  handleCalo();
 
@@ -312,122 +295,16 @@ void RegSelSvc::handle(const Incident& incident) {
         msg() << " " << *d;
       msg() << " detectors have been initialized" << endmsg; // " with Region Type " << m_regionType << endmsg;
     }
-    
-    if ( m_dumpTable ) { 
-      RegSelSiLUT* tables[7] = { m_newpixel, m_newsct, m_newtrt, m_newrpc, m_newmdt, m_newtgc, m_newcsc };
-      for ( int it=0 ; it<7 ; it++ ) { 
-	if ( tables[it] ) { 
-	  char table[64];
-	  std::sprintf( table, "table-%d.map", it ); 
-	  ATH_MSG_INFO( "dumping table " << it << " to file: " << table );
-	  tables[it]->write(table);
-	}
-      }
-    }
-    
-    //  if ( m_errorFlag ) return StatusCode::FAILURE;
-    //  else               return StatusCode::SUCCESS;
-  }
-
-}
-
-
-
-
-
-void RegSelSvc::disableIDFromConditions(RegSelSiLUT* detector, const std::string& serviceName) { 
 
-  ATH_MSG_INFO( " reading detector conditions from " << serviceName );
-
-  if (serviceName.empty()){
-    ATH_MSG_INFO( "Unspecified conditions summary service, skipping disableIDFromConditions" );
-    return;
   }
 
-  if ( detector ) { 
-
-    // get list of all detector elements for this detector
-
-    std::vector<IdentifierHash> IDList;
+}
 
-    if ( detector==m_newpixel )  DetHashIDList(PIXEL, IDList);
-    if ( detector==m_newsct )    DetHashIDList(SCT,   IDList);
-    if ( detector==m_newtrt )    DetHashIDList(TRT,   IDList);
-    
-    // there must be a nicer way to do this.
-    // basically, I have to enable all modules, 
-    // then go through them getting the list of 
-    // modules to enable and the list to disable, 
-    // then I have to enable and disable them 
-    // appropriately. hmmm 
-
-    // get lists of modules to enable and disable
-    std::vector<IdentifierHash> DisableList;
-    std::vector<IdentifierHash> EnableList;
-
-    int active_modules   = 0;
-    int disabled_modules = 0;
-
-    std::vector<IdentifierHash>::iterator mitr(IDList.begin());
-    std::vector<IdentifierHash>::iterator mend(IDList.end());
-    
-    if ( detector==m_newpixel or detector==m_newsct ) {
-      // get ConditionsSummaryTool
-      ToolHandle<IInDetConditionsTool> condsummary(serviceName, this);
-      if ( condsummary.retrieve().isFailure() ) {
-        ATH_MSG_ERROR( "failed to get " << serviceName );
-        return;
-      }
 
-      while ( mitr!=mend ) {
-        if ( condsummary->isActive(*mitr) )  {
-          EnableList.push_back(*mitr);
-          active_modules++;
-        }
-        else {
-          DisableList.push_back(*mitr);
-          disabled_modules++;
-        }
-        ATH_MSG_VERBOSE( serviceName << " module 0x" << std::hex << *mitr << std::dec
-                         << " isActive()=" << condsummary->isActive(*mitr) );
-        mitr++;
-      }
-    } else {
-      // get ConditionsSummarySvc
-      ServiceHandle<IInDetConditionsSvc> condsummary(serviceName, name());
-      if ( condsummary.retrieve().isFailure() ) {
-        ATH_MSG_ERROR( "failed to get " << serviceName );
-        return;
-      }
 
-      while ( mitr!=mend ) {
-        if ( condsummary->isActive(*mitr) )  {
-          EnableList.push_back(*mitr);
-          active_modules++;
-        }
-        else {
-          DisableList.push_back(*mitr);
-          disabled_modules++;
-        }
-        ATH_MSG_VERBOSE( serviceName << " module 0x" << std::hex << *mitr << std::dec
-                         << " isActive()=" << condsummary->isActive(*mitr) );
-        mitr++;
-      }
-    }
 
-    ATH_MSG_INFO( serviceName << " Number of modules active   " << active_modules );
-    ATH_MSG_INFO( serviceName << " Number of modules disabled " << disabled_modules );
-    
-    // these methods have to be tidied up, since they 
-    // each rebuild the Disabled module maps, I need 
-    // methods to enable/disable, and *after* to rebuild 
-    // the disabled module map 
-    
-    detector->disableModuleList(DisableList);
-    //    detector->enableModuleList(EnableList);
-	
-  }
 
+void RegSelSvc::disableIDFromConditions(RegSelSiLUT* /* detector */, const std::string& /* serviceName */ ) { 
 }
 
 
@@ -437,87 +314,8 @@ void RegSelSvc::disableIDFromConditions(RegSelSiLUT* detector, const std::string
 
 
 bool RegSelSvc::handleID() { 
-
-  bool errorFlag = false;
-
-  ATH_MSG_INFO( " Initialising Inner Detector maps" );
-
-  // new region selector code, we make the (reasonably simple) 
-  // structures in the SiRegionSelectorTable so we don't need to 
-  // do any more than just extract the tables.
-  
-
-  //! Read PIXEL data from Detector Store
-  if ( m_initPixel.value() ) { 
-    StatusCode sc = readFromSG(m_lutCreatorToolPixel, m_newpixel);
-    //     sc = m_detStore->retrieve(m_newpixel, "PixelRegSelSiLUT");
-    if (sc.isFailure()){
-      ATH_MSG_WARNING( "Failed to initialize pixel data" );
-      errorFlag = true;
-    } 
-    else { 
-      if ( m_newpixel ) { 
-        ATH_MSG_INFO( "retrieved new pixel RegSelSiLUT map " << m_newpixel->getName() );
-      }
-      else { 
-        ATH_MSG_ERROR( "retrieved new pixel RegSelSiLUT map is NULL" );
-	errorFlag = true;
-      }
-    }      
-  }
-  
-  //! Read SCT data from Detector Store
-  if ( m_initSCT.value() ) {  
-    StatusCode sc = readFromSG(m_lutCreatorToolSCT, m_newsct);
-    //     sc = m_detStore->retrieve(m_newsct, "SCTRegSelSiLUT");
-    if (sc.isFailure()){
-      ATH_MSG_WARNING( "Failed to initialize SCT data" );
-      errorFlag = true;
-    }
-    else { 
-      if ( m_newsct ) 
-	ATH_MSG_INFO( "retrieved new sct RegSelSiLUT map " << m_newsct->getName() );
-      else {
-	ATH_MSG_ERROR( "retrieved new sct RegSelSiLUT map is NULL" );
-	errorFlag = true;
-      }
-    }
-  }
-  
-  
-  //! Read TRT data from Detector Store
-  
-  if ( m_initTRT.value() ) { 
-    StatusCode sc = readFromSG(m_lutCreatorToolTRT, m_newtrt);
-    //     sc = m_detStore->retrieve(m_newtrt, "TRTRegSelSiLUT");
-    if (sc.isFailure()){
-      ATH_MSG_WARNING( "Failed to initialize TRT data" );
-      errorFlag = true;
-    }
-    else { 
-      if ( m_newtrt ) 
-	ATH_MSG_INFO( "retrieved new trt RegSelSiLUT map " << m_newtrt->getName() );
-      else {  
-	ATH_MSG_ERROR( "retrieved new trt RegSelSiLUT is NULL" );
-	errorFlag = true;
-      }
-    }    
-  }      
-
-  // now enable/disable requested robs and modules from OKS 
-  if ( !reinitialiseInternalFromOKS() )  { 
-    ATH_MSG_WARNING( " could not enable robs from OKS " );
-  }
-  
-  if ( !reinitialiseInternal() )  {
-    ATH_MSG_WARNING( " could not disable requested detector elements " );
-  }
-
-  m_enabledDetectors.emplace_back("Inner");
-  
-  m_errorFlag |= errorFlag; 
-
-  return errorFlag; 
+  ATH_MSG_INFO( " Initialising Inner Detector maps - no longer used" );
+  return true;
 }
 
 
@@ -823,22 +621,14 @@ void RegSelSvc::getRoIData(DETID detectorID,
   } 
   modules.clear();
 
-  //  std::cout << "RegSelSvc::getRoIData()" << detectorID << std::endl; 
-
 
   RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
 
   switch(detectorID){
-  case PIXEL: { // Pixel
-    if ( m_newpixel) m_newpixel->getRoIData( selroi, modules );
-    break;    
-  }
-  case SCT:  { // Semiconductor Tracker
-    if ( m_newsct ) m_newsct->getRoIData( selroi, modules );    
-    break;
-  }
-  case TRT:  { // TRT
-    if ( m_newtrt ) m_newtrt->getRoIData( selroi, modules );    
+  case PIXEL: 
+  case SCT:  
+  case TRT:  { 
+    ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID" << detectorID );
     break;
   }
   case RPC: { // RPC (obviously)
@@ -883,12 +673,11 @@ void RegSelSvc::DetHashIDList(DETID detectorID,
 			      const IRoiDescriptor& roi,
 			      std::vector<IdentifierHash>& IDList) 
 {
-  //  std::cout << "RegSelSvc::DetHashIDList() new map " << detectorID << std::endl; 
 
   if ( roi.composite() ) { 
     for ( unsigned iroi=roi.size() ; iroi-- ;  ) {
       DetHashIDList( detectorID, *(roi.at(iroi)), IDList );
-      // std::cout << "DetHashIDList:: SuperRoi memeber " << iroi << " IDList.size() " << IDList.size() << *roi.at(iroi) << std::endl;
+
     }  
     if ( roi.size()>1 ) RegSelSiLUT::removeDuplicates( IDList );
     return;
@@ -911,19 +700,10 @@ void RegSelSvc::DetHashIDList(DETID detectorID,
 
 
   switch(detectorID){
-  case PIXEL: { // Pixel    
-    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newpixel ) m_newpixel->getHashList(selroi, IDList); 
-    break;
-  }
-  case SCT: { // Semiconductor Tracker (and pixel)
-    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newsct ) m_newsct->getHashList(selroi, IDList); 
-    break;
-  }
+  case PIXEL:
+  case SCT:
   case TRT: { // TRT (obviously)
-    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newtrt ) m_newtrt->getHashList(selroi, IDList); 
+    ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID" << detectorID );
     break;
   }
   case MDT: { // etc
@@ -994,8 +774,6 @@ void RegSelSvc::DetHashIDList(DETID detectorID, long layer,
 			      const IRoiDescriptor& roi,
 			      std::vector<IdentifierHash>& IDList) 
 {
-  //  std::cout << "RegSelSvc::DetHashIDList() new map " << detectorID << std::endl; 
-
   if ( roi.composite() ) { 
     for ( unsigned iroi=roi.size() ; iroi-- ;  ) {
       DetHashIDList( detectorID, layer, *(roi.at(iroi)), IDList );
@@ -1022,19 +800,10 @@ void RegSelSvc::DetHashIDList(DETID detectorID, long layer,
   long sampling = layer; 
 
   switch(detectorID){
-  case PIXEL: { // Pixel    
-    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newpixel ) m_newpixel->getHashList(selroi, layer, IDList); 
-    break;
-  }
-  case SCT: { // Semiconductor Tracker 
-    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newsct ) m_newsct->getHashList(selroi, layer, IDList); 
-    break;
-  }
+  case PIXEL: 
+  case SCT: 
   case TRT: { // TRT (obviously)
-    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newtrt ) m_newtrt->getHashList(selroi, layer, IDList); 
+    ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID" << detectorID );
     break;
   }
   case MDT: { 
@@ -1106,7 +875,6 @@ void RegSelSvc::DetHashIDList(DETID detectorID, long layer,
 void RegSelSvc::DetHashIDList(DETID detectorID, 
 			      std::vector<IdentifierHash>& IDList ) 
 { 
-  //  std::cout << "RegSelSvc::DetHashIDList() new map " << detectorID << std::endl;   
   
   if(IDList.size()!=0 ){
     ATH_MSG_VERBOSE( " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID );
@@ -1115,16 +883,10 @@ void RegSelSvc::DetHashIDList(DETID detectorID,
   IDList.clear();
 
   switch(detectorID){
-  case PIXEL: { // Pixel    
-    if ( m_newpixel ) m_newpixel->getHashList(IDList); 
-    break;
-  }
-  case SCT: { // Semiconductor Tracker (and pixel)
-    if ( m_newsct ) m_newsct->getHashList(IDList); 
-    break;
-  }
+  case PIXEL:
+  case SCT:
   case TRT: { // TRT (obviously)
-    if ( m_newtrt ) m_newtrt->getHashList(IDList); 
+    ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID" << detectorID );
     break;
   }
   case MDT: { 
@@ -1194,7 +956,6 @@ void RegSelSvc::DetHashIDList(DETID detectorID,
 void RegSelSvc::DetHashIDList(DETID detectorID, long layer,
 			      std::vector<IdentifierHash>& IDList) 
 {
-  //  std::cout << "RegSelSvc::DetHashIDList() new map " << detectorID << std::endl; 
 
   if(IDList.size()!=0 ){
     ATH_MSG_VERBOSE( " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID );
@@ -1205,16 +966,10 @@ void RegSelSvc::DetHashIDList(DETID detectorID, long layer,
   long sampling = layer; 
 
   switch(detectorID){
-  case PIXEL: { // Pixel    
-    if ( m_newpixel ) m_newpixel->getHashList( layer, IDList); 
-    break;
-  }
-  case SCT: { // Semiconductor Tracker 
-    if ( m_newsct ) m_newsct->getHashList( layer, IDList); 
-    break;
-  }
+  case PIXEL:
+  case SCT:
   case TRT: { // TRT (obviously)
-    if ( m_newtrt ) m_newtrt->getHashList( layer, IDList); 
+    ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID" << detectorID );
     break;
   }
   case MDT: { 
@@ -1284,7 +1039,6 @@ void RegSelSvc::DetROBIDListUint(DETID detectorID,
     setDuplicateRemoval( false );
     for ( unsigned iroi=roi.size() ; iroi-- ;  ) {
       DetROBIDListUint( detectorID, *(roi.at(iroi)), outputROBIDList );
-      // std::cout << "DetROBIDListUint:: SuperRoi memeber " << iroi << " outputROBIDList.size() " << outputROBIDList.size() << std::endl;
     }  
     RegSelSiLUT::removeDuplicates( outputROBIDList );
     setDuplicateRemoval( true );
@@ -1293,8 +1047,6 @@ void RegSelSvc::DetROBIDListUint(DETID detectorID,
 
   if ( roi.isFullscan() ) return DetROBIDListUint( detectorID, outputROBIDList );
 
-  //  std::cout << "RegSelSvc::DetROBIDListUint() new map " << detectorID << std::endl; 
-
   if(outputROBIDList.size()!=0 ){
     ATH_MSG_VERBOSE( " input outputROBIDList vector not empty for RegSelSvc call for detectorID " << detectorID );
   }
@@ -1313,19 +1065,10 @@ void RegSelSvc::DetROBIDListUint(DETID detectorID,
 
 
   switch (detectorID) {
-  case PIXEL: { // Pixel
-    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newpixel ) m_newpixel->getRobList(selroi, outputROBIDList, m_duplicateRemoval ); 
-    break;
-  }
-  case SCT: {  // SCT
-    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newsct ) m_newsct->getRobList(selroi, outputROBIDList, m_duplicateRemoval ); 
-    break;
-  }
+  case PIXEL: 
+  case SCT:
   case TRT: {  // TRT
-    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newtrt ) m_newtrt->getRobList(selroi, outputROBIDList, m_duplicateRemoval ); 
+    ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID" << detectorID );
     break;
   }
   case MDT: { 
@@ -1395,8 +1138,6 @@ void RegSelSvc::DetROBIDListUint(DETID detectorID, long layer,
 				 const IRoiDescriptor& roi, 
 				 std::vector<uint32_t>& outputROBIDList) 
 {
-  //  std::cout << "RegSelSvc::DetROBIDListUint() new map " << detectorID << std::endl; 
-
   if ( roi.composite() ) { 
     setDuplicateRemoval(false);
     for ( unsigned iroi=roi.size() ; iroi-- ;  ) {
@@ -1425,19 +1166,10 @@ void RegSelSvc::DetROBIDListUint(DETID detectorID, long layer,
   long sampling = layer; 
 
   switch (detectorID) {
-  case PIXEL: { // Pixel
-    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newpixel ) m_newpixel->getRobList(selroi, layer, outputROBIDList, m_duplicateRemoval );
-    break;
-  }
-  case SCT: {  // SCT
-    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newsct ) m_newsct->getRobList(selroi, layer, outputROBIDList, m_duplicateRemoval ); 
-    break;
-  }
+  case PIXEL: 
+  case SCT: 
   case TRT: { // TRT
-    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newtrt ) m_newtrt->getRobList(selroi, layer, outputROBIDList, m_duplicateRemoval ); 
+    ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID" << detectorID );
     break;
   }
   case MDT: { 
@@ -1510,16 +1242,10 @@ void RegSelSvc::DetROBIDListUint(DETID detectorID,
   outputROBIDList.clear();
 
   switch (detectorID) {
-  case PIXEL: { // Pixel
-    if ( m_newpixel ) m_newpixel->getRobList(outputROBIDList); 
-    break;
-  }
-  case SCT: {  // SCT
-    if ( m_newsct ) m_newsct->getRobList(outputROBIDList); 
-    break;
-  }
+  case PIXEL: 
+  case SCT:
   case TRT: {  // TRT
-    if ( m_newtrt ) m_newtrt->getRobList(outputROBIDList); 
+    ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID" << detectorID );
     break;
   }
   case MDT: { 
@@ -1577,8 +1303,6 @@ void RegSelSvc::DetROBIDListUint(DETID detectorID,
 void RegSelSvc::DetROBIDListUint(DETID detectorID, long layer,
 				 std::vector<uint32_t>& outputROBIDList) 
 {
-  //  std::cout << "RegSelSvc::DetROBIDListUint() new map " << detectorID << std::endl; 
-
   if(outputROBIDList.size()!=0 ){
     ATH_MSG_VERBOSE( " input outputROBIDList vector not empty for RegSelSvc call for detectorID " << detectorID );
   }
@@ -1587,16 +1311,11 @@ void RegSelSvc::DetROBIDListUint(DETID detectorID, long layer,
   long sampling = layer;
 
   switch (detectorID) {
-  case PIXEL: { // Pixel
-    if ( m_newpixel ) m_newpixel->getRobList( layer, outputROBIDList ); 
-    break;
-  }
-  case SCT: {  // SCT
-    if ( m_newsct ) m_newsct->getRobList( layer, outputROBIDList ); 
-    break;
-  }
+  case PIXEL: 
+  case SCT: 
   case TRT: { // TRT
     if ( m_newtrt ) m_newtrt->getRobList( layer, outputROBIDList ); 
+    ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID" << detectorID );
     break;
   }
   case MDT: { 
@@ -2168,63 +1887,21 @@ void RegSelSvc::printTable(const RegionSelectorLUT * lut){
   }
 }
 
-void RegSelSvc::DisableSiRobList(const std::vector<uint32_t>& RobIdList) { 
-  // if the list of robs to disable is not empty... 
-  if ( RobIdList.size()>0 ) { 
-    // check the look up tables actually already exist before
-    // trying to disable the robs from them
-    if ( m_newpixel ) m_newpixel->disableRobList(RobIdList);
-    if ( m_newsct )   m_newsct->disableRobList(RobIdList);
-    if ( m_newtrt )   m_newtrt->disableRobList(RobIdList);
-  } 
+void RegSelSvc::DisableSiRobList(const std::vector<uint32_t>& /* RobIdList */ ) { 
 }
 
-void RegSelSvc::DisablePixelHashList(const std::vector<unsigned int>& HashList) { 
-  // if the list of hashids to disable is not empty... 
-  if ( HashList.size()>0 ) { 
-    // check the look up tables actually already exist before
-    // trying to disable the modules from them
-    
-    std::vector<IdentifierHash> hashlist;
-    for ( std::vector<unsigned int>::const_iterator hptr(HashList.begin()) ; 
-	  hptr!=HashList.end() ; hptr ++ ) hashlist.emplace_back(*hptr);
-
-    if ( m_newpixel ) m_newpixel->disableModuleList(hashlist);
-  } 
+void RegSelSvc::DisablePixelHashList(const std::vector<unsigned int>& /* HashList */ ) { 
 }
 
-void RegSelSvc::DisableSCTHashList(const std::vector<unsigned int>& HashList) { 
-  // if the list of hashids to disable is not empty... 
-  if ( HashList.size()>0 ) { 
-    // check the look up tables actually already exist before
-    // trying to disable the modules from them
-    std::vector<IdentifierHash> hashlist;
-    for ( std::vector<unsigned int>::const_iterator hptr(HashList.begin()) ; 
-	  hptr!=HashList.end() ; hptr ++ ) hashlist.emplace_back(*hptr);
-    if ( m_newsct )   m_newsct->disableModuleList(hashlist);
-  } 
+void RegSelSvc::DisableSCTHashList(const std::vector<unsigned int>& /* HashList */ ) { 
 }
 
 
-void RegSelSvc::DisableTRTHashList(const std::vector<unsigned int>& HashList) { 
-  // if the list of hashids to disable is not empty... 
-  if ( HashList.size()>0 ) { 
-    // check the look up tables actually already exist before
-    // trying to disable the modules from them
-    std::vector<IdentifierHash> hashlist;
-    for ( std::vector<unsigned int>::const_iterator hptr(HashList.begin()) ; 
-	  hptr!=HashList.end() ; hptr ++ ) hashlist.emplace_back(*hptr);
-    if ( m_newtrt )   m_newtrt->disableModuleList(hashlist);
-  } 
+void RegSelSvc::DisableTRTHashList(const std::vector<unsigned int>& /* HashList*/ ) { 
 }
 
 
 void RegSelSvc::RestoreSiRobList() {
-  // check the look up tables actually already exist before
-  // trying to disable the robs from them
-  if ( m_newpixel ) m_newpixel->enableRobs();
-  if ( m_newsct )   m_newsct->enableRobs();
-  if ( m_newtrt )   m_newtrt->enableRobs();
 }
 
 
@@ -2240,33 +1917,6 @@ StatusCode RegSelSvc::reinitialize() {
 // ids from oks and enable the modules corresponding to the 
 // specified robs
 bool RegSelSvc::reinitialiseInternalFromOKS() { 
-
-  // don't disable anything if not initialising from oks
-  if ( m_readSiROBListFromOKS.value()==false ) return true;
-
-  if ( m_initPixel.value() )  {   
-    // disable everything
-    m_newpixel->disableRobs();
-    
-    // enable the robs from OKS
-    m_newpixel->enableRobList(m_enabledROBs.value());
-  }
-
-  if ( m_initSCT.value() ) { 
-    m_newsct->disableRobs();
-    
-    // enable robs from list for pixel and sct
-    m_newsct->enableRobList(m_enabledROBs.value());
-  }
-  
-  if ( m_initTRT.value() )  {   
-    // disable everything
-    m_newtrt->disableRobs();
-    
-    // enable the robs from OKS
-    m_newtrt->enableRobList(m_enabledROBs.value());
-  }
-
   return true;
 }
 
@@ -2275,69 +1925,6 @@ bool RegSelSvc::reinitialiseInternalFromOKS() {
 
 
 bool RegSelSvc::reinitialiseInternal() { 
-
-  // NB: the conditions summary service names, and probably the services 
-  //     themselves should be setable from a job option, but why make
-  //     life even more complicated with configurability that may never
-  //     be used. If it needs it, it can easily be added  
-
-  // now handle all the disabling for the pixel ... 
-  if ( m_initPixel.value() )  { 
-
-    // first disable modules from the conditions summary services
-    //    if ( m_disableFromConditions ) disableIDFromConditions(m_newpixel, "PixelConditionsSummarySvc");
-    if ( m_disableFromConditions && m_disablePixelFromConditions ) disableIDFromConditions(m_newpixel, m_PixConditionsTool);
-
-    // now *disable* the modules from robs the user has flagged
-    if ( m_deleteRobList.size() ) m_newpixel->disableRobList(m_deleteRobList);
-
-    // and disable any other modules from the module list
-    // have to convert the std::vector<unsigned int> into std::vector<IdentifierHash>  
-    std::vector<IdentifierHash> hashlist;
-    for ( std::vector<unsigned int>::const_iterator hptr(m_deletePixelHashList.begin()) ; 
-	  hptr!=m_deletePixelHashList.end() ; hptr ++ ) hashlist.emplace_back(*hptr);
-    
-    if ( m_deletePixelHashList.size() ) m_newpixel->disableModuleList(hashlist);    
-  }
-  
-  // and now handle all the disabling for the sct ... 
-  if ( m_initSCT.value() ) { 
-    
-    // first disable modules from the conditions summary tool
-    if ( m_disableFromConditions  && m_disableSCTFromConditions ) disableIDFromConditions(m_newsct, m_SCTConditionsTool);
-
-    // now *disable* the modules from robs the user has flagged
-    if ( m_deleteRobList.size() ) m_newsct->disableRobList(m_deleteRobList);
-    
-    // and disable any other modules from the module list
-    // have to convert the std::vector<unsigned int> into std::vector<IdentifierHash>  
-    std::vector<IdentifierHash> hashlist;
-    for ( std::vector<unsigned int>::const_iterator hptr(m_deleteSCTHashList.begin()) ; 
-	  hptr!=m_deleteSCTHashList.end() ; hptr ++ ) hashlist.emplace_back(*hptr);
-    
-    if ( m_deleteSCTHashList.size() ) m_newsct->disableModuleList(hashlist);
-  }
-
-  // and now handle all the disabling for the trt ... 
-  if ( m_initTRT.value() ) { 
-
-    // first disable modules from the conditions summary services
-    //    if ( m_disableFromConditions ) disableIDFromConditions(m_newtrt, "TRT_ConditionsSummarySvc");
-    if ( m_disableFromConditions  && m_disableTRTFromConditions ) disableIDFromConditions(m_newtrt, m_TRTConditionsSvc);
-    
-    // now *disable* the modules from robs the user has flagged
-    if ( m_deleteRobList.size() ) m_newtrt->disableRobList(m_deleteRobList);
-
-    // and disable any other modules from the module list
-    // have to convert the std::vector<unsigned int> into std::vector<IdentifierHash>  
-    std::vector<IdentifierHash> hashlist;
-    for ( std::vector<unsigned int>::const_iterator hptr(m_deleteTRTHashList.begin()) ; 
-	  hptr!=m_deleteTRTHashList.end() ; hptr ++ ) hashlist.emplace_back(*hptr);
-    
-    if ( m_deleteTRTHashList.size() ) m_newtrt->disableModuleList(hashlist);
-  }
-
-
   return true;
 }
 
diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelCablingCondAlg.cxx b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelCablingCondAlg.cxx
index ef10e7d4be34..26aa988b7a06 100644
--- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelCablingCondAlg.cxx
+++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelCablingCondAlg.cxx
@@ -52,8 +52,12 @@ StatusCode PixelCablingCondAlg::initialize() {
   std::unique_ptr<PixelCablingCondData> writeCdo(std::make_unique<PixelCablingCondData>());
   const EventIDBase::number_type UNDEFNUM = EventIDBase::UNDEFNUM;
   const EventIDBase::event_number_t UNDEFEVT = EventIDBase::UNDEFEVT;
+
+  /// FIXME: this is a hack to get the code to work - the comfiguration should be 
+  ///        such that the cabling is now only configured with a proper IoV and not 
+  ///        in the initialise method
   EventIDRange rangeW (EventIDBase (0, UNDEFEVT, UNDEFNUM, 0, 0),
-                       EventIDBase (1, UNDEFEVT, UNDEFNUM, 0, 0));
+                       EventIDBase (9999999, UNDEFEVT, UNDEFNUM, 0, 0));
 
   // Signed values
   int barrel_ec, eta_module;
diff --git a/InnerDetector/InDetDetDescr/InDetRegionSelector/src/InDetRegionSelectorLUT.cxx b/InnerDetector/InDetDetDescr/InDetRegionSelector/src/InDetRegionSelectorLUT.cxx
index 1fdd7bb66e96..ac581221fab9 100755
--- a/InnerDetector/InDetDetDescr/InDetRegionSelector/src/InDetRegionSelectorLUT.cxx
+++ b/InnerDetector/InDetDetDescr/InDetRegionSelector/src/InDetRegionSelectorLUT.cxx
@@ -42,65 +42,8 @@ StatusCode InDetRegionSelectorLUT::initialize(){
   // get tools
   //
 
-  msg(MSG::INFO) << "InDetRegionSelectorLUT::initialize() " << name() << "\t" << m_lutCreatorToolPixel << endmsg;
+  ATH_MSG_INFO( "InDetRegionSelectorLUT::initialize() " << name() << " no longer used" );
   
-  // Pixel
-  if (!m_lutCreatorToolPixel) {  
-    msg(MSG::INFO) << "Pixel LUT Creator not configured " << m_lutCreatorToolPixel << endmsg;
-  } else {
-    if ( m_lutCreatorToolPixel.retrieve().isFailure() ) {
-      msg(MSG::FATAL) << "Failed to retrieve tool " << m_lutCreatorToolPixel << endmsg;
-      return StatusCode::FAILURE;
-    } else {
-      msg(MSG::INFO) << "Retrieved tool " << m_lutCreatorToolPixel << endmsg;
-      // compute LUT
-      const RegSelSiLUT* pixellut = m_lutCreatorToolPixel->getLUT();
-      if (!pixellut) { 
-		msg(MSG::ERROR) << "Pixel table missing" << endmsg;
-      } else if (m_doTests) {
-	msg(MSG::DEBUG) << "Test Pixel" << endmsg;
-	printTable(pixellut);
-      }
-    }
-  }
-  // SCT
-  if (!m_lutCreatorToolSCT) {  
-    msg(MSG::INFO) << "SCT LUT Creator not configured " << m_lutCreatorToolSCT << endmsg;
-  } else {
-    if ( m_lutCreatorToolSCT.retrieve().isFailure() ) {
-      msg(MSG::FATAL) << "Failed to retrieve tool " << m_lutCreatorToolSCT << endmsg;
-      return StatusCode::FAILURE;
-    } else {
-      msg(MSG::INFO) << "Retrieved tool " << m_lutCreatorToolSCT << endmsg;
-      // compute LUT
-      const RegSelSiLUT* sctlut = m_lutCreatorToolSCT->getLUT();
-      if (!sctlut) { 
-	msg(MSG::ERROR) << "SCT table missing" << endmsg;
-      } else if (m_doTests) {
-	msg(MSG::DEBUG) << "Test SCT" << endmsg;
-	printTable(sctlut);
-      }
-    }
-  }
-  // Pixel
-  if (!m_lutCreatorToolTRT) {  
-    msg(MSG::INFO) << "TRT LUT Creator not configured " << m_lutCreatorToolTRT << endmsg;
-  } else {
-    if ( m_lutCreatorToolTRT.retrieve().isFailure() ) {
-      msg(MSG::FATAL) << "Failed to retrieve tool " << m_lutCreatorToolSCT << endmsg;
-      return StatusCode::FAILURE;
-    } else {
-      msg(MSG::INFO) << "Retrieved tool " << m_lutCreatorToolSCT << endmsg;
-      // compute LUT
-      const RegSelSiLUT* trtlut = m_lutCreatorToolTRT->getLUT();
-      if (!trtlut) { 
-	msg(MSG::ERROR) << "TRT table missing" << endmsg;
-      } else if (m_doTests) {
-	msg(MSG::DEBUG) << "Test TRT" << endmsg;
-	printTable(trtlut);
-      }
-    }
-  }
   return StatusCode::SUCCESS;
 }
   
diff --git a/InnerDetector/InDetDetDescr/InDetRegionSelector/src/SiRegSelCondAlg.cxx b/InnerDetector/InDetDetDescr/InDetRegionSelector/src/SiRegSelCondAlg.cxx
index e11efe88f9d1..cf6249414984 100644
--- a/InnerDetector/InDetDetDescr/InDetRegionSelector/src/SiRegSelCondAlg.cxx
+++ b/InnerDetector/InDetDetDescr/InDetRegionSelector/src/SiRegSelCondAlg.cxx
@@ -81,6 +81,8 @@ StatusCode SiRegSelCondAlg::execute(const EventContext& ctx)  const
   std::unique_ptr<SG::ReadCondHandle<SCT_CablingData> >      sctCabling;
 
   EventIDRange id_range;
+
+  ATH_MSG_DEBUG( "RegSelCondAlg:" << name() );
   
   if (m_managerName=="SCT") { // SCT
     sctCabling = std::make_unique<SG::ReadCondHandle<SCT_CablingData> >( m_sctCablingKey, ctx );
@@ -90,13 +92,23 @@ StatusCode SiRegSelCondAlg::execute(const EventContext& ctx)  const
     }   
   }
   else { // PIXEL 
+
+    ATH_MSG_DEBUG( "RegSelCondAlg: " << name() << "\t" << m_pixCablingKey );
+    ATH_MSG_DEBUG( "RegSelCondAlg: " << ctx );
+    ATH_MSG_DEBUG( "RegSelCondAlg: " << id_range << "( initial range )" );
+
     pixCabling = std::make_unique<SG::ReadCondHandle<PixelCablingCondData> >( m_pixCablingKey, ctx );
     if( !pixCabling->range( id_range ) ) {
-      ATH_MSG_ERROR("Failed to retrieve validity range for " << pixCabling->key());
+      ATH_MSG_ERROR("Failed to retrieve validity range for " << pixCabling->key() << " : " << id_range );
       return StatusCode::FAILURE;
     }   
+    ATH_MSG_DEBUG( "RegSelCondAlg: " << id_range << "( final range )" );
+
   }
 
+  ATH_MSG_DEBUG( "RegSelCondAlg:" << name() << " done" );
+
+
   std::unique_ptr<RegSelSiLUT> rd;
 
   if   ( m_managerName=="Pixel" ) rd = std::make_unique<RegSelSiLUT>(RegSelSiLUT::PIXEL);
diff --git a/InnerDetector/InDetDetDescr/InDetRegionSelector/src/SiRegionSelectorTable.cxx b/InnerDetector/InDetDetDescr/InDetRegionSelector/src/SiRegionSelectorTable.cxx
index a67fd227535c..4e1d64da481b 100755
--- a/InnerDetector/InDetDetDescr/InDetRegionSelector/src/SiRegionSelectorTable.cxx
+++ b/InnerDetector/InDetDetDescr/InDetRegionSelector/src/SiRegionSelectorTable.cxx
@@ -73,18 +73,11 @@ SiRegionSelectorTable::initialize(){
 
   if (m_managerName.empty()) {
     msg(MSG::WARNING) << "Tool disabled." << endmsg;
-    return StatusCode::FAILURE;
   } 
  
-  ATH_CHECK(m_condCablingKey.initialize());
+  //  ATH_CHECK(m_condCablingKey.initialize());
 
   ATH_MSG_WARNING("So far, this prevents the conditions migration!! The createTable() should NOT be used in the initilization step...");
-  const EventIDBase::number_type UNDEFNUM = EventIDBase::UNDEFNUM;
-  const EventIDBase::event_number_t UNDEFEVT = EventIDBase::UNDEFEVT;
-  EventContext ctx = Gaudi::Hive::currentContext();
-  ctx.setEventID (EventIDBase (0, UNDEFEVT, UNDEFNUM, 0, 0));
-  Atlas::getExtendedEventContext(ctx).setConditionsRun (0);
-  ATH_CHECK(createTable (ctx));
 
   return StatusCode::SUCCESS;
 }
@@ -92,10 +85,6 @@ SiRegionSelectorTable::initialize(){
 
 SiRegionSelectorTable::~SiRegionSelectorTable()
 {
-  // table is stored in storegate so nothing to delete.
-#ifndef USE_STOREGATE
-  if ( m_regionLUT ) delete m_regionLUT;
-#endif
 }
 
 
@@ -109,162 +98,9 @@ RegSelSiLUT* SiRegionSelectorTable::getLUT()
 
 
 StatusCode 
-SiRegionSelectorTable::createTable (const EventContext& ctx)
+SiRegionSelectorTable::createTable (const EventContext& /* ctx */ )
 {
-
-  if ( msgLvl(MSG::DEBUG) )  msg(MSG::DEBUG) << "Creating region selector table"  << endmsg;
-
-  StatusCode sc;
-
-  // Retrieve manager
-  const SiDetectorManager * manager;
-  sc=detStore()->retrieve(manager, m_managerName);
-
-  if (sc.isFailure()) {
-    msg(MSG::FATAL) << "Could not find the Manager: "
-	<< m_managerName << " !" << endmsg;
-    return StatusCode::FAILURE;
-  } else {
-    if ( msgLvl(MSG::DEBUG) )  msg(MSG::DEBUG) << "Manager found" << endmsg;
-  }
-
-  ATH_CHECK(m_sctCablingToolInc.retrieve( DisableTool{manager->isPixel()} ));
-
-  // Create RegionSelectorLUT pointers for Pixel or Sct
-  //  RegionSelectorLUT*  rslut = new RegionSelectorLUT;
-  
-  RegSelSiLUT* rd;
-
-  if   ( manager->isPixel() ) rd = new RegSelSiLUT(RegSelSiLUT::PIXEL);
-  else                        rd = new RegSelSiLUT(RegSelSiLUT::SCT);
-
-
-  SG::ReadCondHandle<PixelCablingCondData> pixCabling(m_condCablingKey, ctx);
-
-  SiDetectorElementCollection::const_iterator iter;
-  for (iter = manager->getDetectorElementBegin(); iter != manager->getDetectorElementEnd(); ++iter){
-
-    const SiDetectorElement* element = *iter; 
-
-    if (element) {
-
-      IdentifierHash hashId = element->identifyHash();    
-      
-      if ( msgLvl(MSG::VERBOSE) ) msg(MSG::VERBOSE) << "Found element with HashId = " << hashId << endmsg;
-   
-      // new region selector detector element extent.
-      double rMin, rMax, zMin, zMax, phiMin, phiMax;
-
-      rMin    = element->rMin();
-      rMax    = element->rMax();
-      zMin    = element->zMin();
-      zMax    = element->zMax();
-      phiMin  = element->phiMin();
-      phiMax  = element->phiMax();
-
-
-      int barrelEC = 0; 
-      int layerDisk = 0;
-      uint32_t robId = 0;
-
-      if (element->isPixel()) {
-
-	const PixelID* pixelId = dynamic_cast<const PixelID*>(element->getIdHelper());
-	if ( pixelId!=0 ) { 
-	  barrelEC  = pixelId->barrel_ec(element->identify());
-
-	  if ( m_noDBM && std::fabs(barrelEC)>3 ) continue; // skip DBM modules
-
-	  layerDisk = pixelId->layer_disk(element->identify());
-    robId=pixCabling->find_entry_offrob(element->identify());
-	}
-	else { 
-	  msg(MSG::ERROR) << " could not get PixelID for " << element->getIdHelper() << endmsg;
-	}
-      } else { // Its an SCT.
-
-	const SCT_ID* sctId = dynamic_cast<const SCT_ID*>(element->getIdHelper());
-	if ( sctId!=0 ) {      
-	  barrelEC  = sctId->barrel_ec(element->identify());
-	  layerDisk = sctId->layer_disk(element->identify());
-	  robId=m_sctCablingToolInc->getRobIdFromOfflineId(element->identify());
-	}
-	else { 
-	  msg(MSG::ERROR) << " could not get SCT_ID for " << element->getIdHelper() << endmsg;
-	}
-      }
-
-      // write in new Region Selector Si LUT
-      // create module      
-      RegSelModule smod(zMin,zMax,rMin,rMax,phiMin,phiMax,layerDisk,barrelEC,robId,hashId);
-	
-      // if ( robId ) {
-      // add to the new RegionSelector map     
-      rd->addModule(smod);
-      // }
-      // else { 
-      //	msg(MSG::WARNING) << "module with RobID=0x0 - not added to look up table " << smod << endmsg;
-      // }
-      
-      if ( msgLvl(MSG::DEBUG) ) msg(MSG::DEBUG) << smod << endmsg;
-	
-      if ( msgLvl(MSG::VERBOSE) ) msg(MSG::VERBOSE) << "      " 
-						    << " robId = " << robId
-						    << " barrelEC = " << barrelEC 
-						    << ", layerDisk = " << layerDisk 
-						    << ", phiMin, phiMax = " << phiMin/CLHEP::degree << " " << phiMax/CLHEP::degree
-						    << ", rMin = " << rMin/CLHEP::mm << " mm, rMax = " << rMax/CLHEP::mm << " mm"  
-						    << endmsg;
-
-    }
-  }
-
-  msg(MSG::INFO) << " initialising new map " << endmsg;
-
-  rd->initialise();
-
-  // write out new new LUT to a file if need be
-  if ( m_printTable ) {
-    if ( manager->isPixel() ) rd->write("NewPixel"+m_roiFileName);
-    else                      rd->write("NewSCT"+m_roiFileName);
-  }
-
-  //  std::string key;
-  std::string detName;
-
-  std::string newkey;
-
-  if (manager->isPixel()) {
-    newkey = "PixelRegSelSiLUT";
-    detName = "Pixel";
-  } else {
-    newkey = "SCTRegSelSiLUT";
-    detName = "SCT";
-  }
-
-#ifndef USE_STOREGATE
-  if ( m_regionLUT ) delete m_regionLUT;
-#endif
-  m_regionLUT = rd;
-
-#ifdef USE_STOREGATE
-  // save new map in StoreGate RegSelSiLUT
-  if ( detStore()->contains< RegSelSiLUT >(newkey) ) {
-    msg(MSG::FATAL) << " RegSelSiLUT " << newkey << " already exists " << endmsg;
-  } else {
-    // create and store LUT
-    // needs to be modifiable so we can enable/disable modules 
-    // from the RegSelSvc
-    sc = detStore()->record(rd, newkey, true);
-    if ( sc.isFailure() ) {
-      msg(MSG::ERROR) << " could not register " << detName << " RegSelSiLUT" << endmsg;
-      return( StatusCode::FAILURE );
-    } else {
-      msg(MSG::INFO) << detName << " RegSelSiLUT successfully saved in detector Store" << endmsg;
-    }
-  }
-#endif
- 
+  ATH_MSG_INFO( "SiRegionSelectorTable::createTable() - no longer in use" );
   return StatusCode::SUCCESS;
 }
 
diff --git a/LArCalorimeter/LArRegionSelector/src/RegSelCondAlg_LAr.cxx b/LArCalorimeter/LArRegionSelector/src/RegSelCondAlg_LAr.cxx
index 80f83619e658..755a015b96b1 100644
--- a/LArCalorimeter/LArRegionSelector/src/RegSelCondAlg_LAr.cxx
+++ b/LArCalorimeter/LArRegionSelector/src/RegSelCondAlg_LAr.cxx
@@ -56,9 +56,9 @@ StatusCode RegSelCondAlg_LAr::initialize() {
 
 StatusCode RegSelCondAlg_LAr::execute(const EventContext& ctx)  const {
 
-  ATH_MSG_DEBUG("RegSelCondAlg_LAr::execute() -- enter -- ");
-
-   /// do stuff here ...  
+  ATH_MSG_INFO( "RegSelConfAlg_LAr:execute() " << name() );
+   
+  /// do stuff here ...  
   ATH_MSG_DEBUG( "Creating region selector table " << m_tableKey );
 
   SG::WriteCondHandle<IRegSelLUTCondData> lutCondData( m_tableKey, ctx );
@@ -72,7 +72,7 @@ StatusCode RegSelCondAlg_LAr::execute(const EventContext& ctx)  const {
     return StatusCode::SUCCESS;
   }
 
-   
+
   /// annoyingly take the pixel cabling to determine whether to build this
   /// calorimeter table using the EventIDRange.
   /// Once the calorimeter has it own conditions data cabling, then we can
@@ -87,7 +87,8 @@ StatusCode RegSelCondAlg_LAr::execute(const EventContext& ctx)  const {
     return StatusCode::FAILURE;
   }   
 
-  
+  ATH_MSG_DEBUG( "RegSelConfAlg_LAr: " << name() << " found range: " << id_range );
+
   ATH_MSG_INFO( "creating new LAr table" );
 
   /// create the new lookup table
diff --git a/Trigger/TrigAlgorithms/TrigGenericAlgs/TrigGenericAlgs/SeededSuperRoiAllTEAlgo.h b/Trigger/TrigAlgorithms/TrigGenericAlgs/TrigGenericAlgs/SeededSuperRoiAllTEAlgo.h
index e92833f1941d..05a841068725 100755
--- a/Trigger/TrigAlgorithms/TrigGenericAlgs/TrigGenericAlgs/SeededSuperRoiAllTEAlgo.h
+++ b/Trigger/TrigAlgorithms/TrigGenericAlgs/TrigGenericAlgs/SeededSuperRoiAllTEAlgo.h
@@ -25,7 +25,6 @@
 #include "TrigInterfaces/AllTEAlgo.h"
 
 
-class IRegSelSvc;
 
 namespace HLT {
   class TriggerElement;
@@ -69,10 +68,6 @@ namespace PESA
     double m_etaHalfWidth;
     double m_phiHalfWidth;
 
-
-    std::string       m_regionSelectorName;
-    IRegSelSvc*       m_regionSelector;
-
   };
 } // end of namespace
 
diff --git a/Trigger/TrigAlgorithms/TrigGenericAlgs/src/SeededSuperRoiAllTEAlgo.cxx b/Trigger/TrigAlgorithms/TrigGenericAlgs/src/SeededSuperRoiAllTEAlgo.cxx
index 027e31b9ff0f..0981eb37e106 100755
--- a/Trigger/TrigAlgorithms/TrigGenericAlgs/src/SeededSuperRoiAllTEAlgo.cxx
+++ b/Trigger/TrigAlgorithms/TrigGenericAlgs/src/SeededSuperRoiAllTEAlgo.cxx
@@ -5,7 +5,6 @@
 
 #include "TrigGenericAlgs/SeededSuperRoiAllTEAlgo.h"
 #include "TrigNavigation/TriggerElement.h"
-#include "IRegionSelector/IRegSelSvc.h"
 
 #include "TrigSteeringEvent/TrigRoiDescriptor.h"
 #include "CxxUtils/phihelper.h"
@@ -16,8 +15,7 @@ SeededSuperRoiAllTEAlgo::SeededSuperRoiAllTEAlgo(const std::string& name, ISvcLo
   : HLT::AllTEAlgo(name, pSvcLocator),
     m_runOncePerEvent(true),
     m_was_run(false),
-    m_useRoiSizes(true),
-    m_regionSelector(0)
+    m_useRoiSizes(true)
 {
   declareProperty("NumberOfOutputTEs", m_numberOfOutputTEs = 1, "configure the number of output TEs this algorithm will create");
   declareProperty("createRoIDescriptors",  m_createRoIDescriptors=true, "create SuperRoi descriptor if set true");
@@ -27,7 +25,6 @@ SeededSuperRoiAllTEAlgo::SeededSuperRoiAllTEAlgo(const std::string& name, ISvcLo
   declareProperty("UseRoiSizes",  m_useRoiSizes=true, "User RoI sizes rather than width parameters");
   declareProperty("EtaHalfWidth",  m_etaHalfWidth=0.1, "RoI eta half width");
   declareProperty("PhiHalfWidth",  m_phiHalfWidth=0.1, "RoI phi half width");
-  declareProperty("RegionSelectorTool",    m_regionSelectorName = "RegSelSvc", "instance of the RegionSelector service");
 }
 
 
@@ -35,12 +32,6 @@ HLT::ErrorCode SeededSuperRoiAllTEAlgo::hltInitialize(){
 
   m_was_run=false; 
 
-  if ( (serviceLocator()->service( m_regionSelectorName, m_regionSelector)).isFailure() ) {
-    msg() << MSG::FATAL 
-	  << "Unable to retrieve RegionSelector Service  " << m_regionSelectorName << endmsg;
-    return HLT::BAD_JOB_SETUP;
-  };
-
   return HLT::OK; 
 }
 
@@ -159,16 +150,6 @@ HLT::ErrorCode SeededSuperRoiAllTEAlgo::hltEndEvent() {
 
 HLT::ErrorCode SeededSuperRoiAllTEAlgo::prepareRobRequests(const std::vector<HLT::TEConstVec>& /* inputTE */){
 
-  std::vector<unsigned int> uIntListOfRobs;
-
-  if (m_prefetchPIX){
-    m_regionSelector->DetROBIDListUint( PIXEL, uIntListOfRobs);
-  }
-  if (m_prefetchSCT){
-    m_regionSelector->DetROBIDListUint( SCT, uIntListOfRobs);
-  }
-
-  config()->robRequestInfo()->addRequestScheduledRobIDs(uIntListOfRobs); 	
 
   return HLT::OK;
 } 
diff --git a/Trigger/TrigAlgorithms/TrigT2MinBias/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigT2MinBias/CMakeLists.txt
index b5617482676d..e4353a7b87dd 100644
--- a/Trigger/TrigAlgorithms/TrigT2MinBias/CMakeLists.txt
+++ b/Trigger/TrigAlgorithms/TrigT2MinBias/CMakeLists.txt
@@ -10,7 +10,7 @@ find_package( tdaq-common )
 atlas_add_component( TrigT2MinBias
                      src/*.cxx src/components/*.cxx
                      INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} AthViews AthenaBaseComps AthenaMonitoringKernelLib CaloEvent CaloIdentifier DecisionHandlingLib GaudiKernel IRegionSelector InDetIdentifier InDetPrepRawData InDetRawData StoreGateLib TileByteStreamLib TileConditionsLib TileEvent TileIdentifier TrigCaloEvent TrigCompositeUtilsLib TrigInDetEvent TrigInDetToolInterfacesLib TrigInterfacesLib TrigSteeringEvent TrigT2CaloCommonLib TrigTimeAlgsLib TrkSpacePoint ZdcConditions ZdcEvent ZdcIdentifier xAODEventInfo xAODTrigMinBias xAODTrigger )
+                     LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} AthViews AthenaBaseComps AthenaMonitoringKernelLib CaloEvent CaloIdentifier DecisionHandlingLib GaudiKernel IRegionSelector RoiDescriptor InDetIdentifier InDetPrepRawData InDetRawData StoreGateLib TileByteStreamLib TileConditionsLib TileEvent TileIdentifier TrigCaloEvent TrigCompositeUtilsLib TrigInDetEvent TrigInDetToolInterfacesLib TrigInterfacesLib TrigSteeringEvent TrigT2CaloCommonLib TrigTimeAlgsLib TrkSpacePoint ZdcConditions ZdcEvent ZdcIdentifier xAODEventInfo xAODTrigMinBias xAODTrigger )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-extensions=ATL900,ATL901 )
diff --git a/Trigger/TrigAlgorithms/TrigT2MinBias/python/TrigT2MinBiasConfig.py b/Trigger/TrigAlgorithms/TrigT2MinBias/python/TrigT2MinBiasConfig.py
index f72969c45a86..9a628e214298 100644
--- a/Trigger/TrigAlgorithms/TrigT2MinBias/python/TrigT2MinBiasConfig.py
+++ b/Trigger/TrigAlgorithms/TrigT2MinBias/python/TrigT2MinBiasConfig.py
@@ -416,6 +416,12 @@ class MbSpFex ( TrigCountSpacePoints ) :
         self.PixelClusSizeMin = trigT2MinBiasProperties.pixelClusSizeMin()
         self.PixelClusSizeMax = trigT2MinBiasProperties.pixelClusSizeMax()
 
+        from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
+        from RegionSelector.RegSelToolConfig import makeRegSelTool_SCT
+
+        self.RegSelTool_Pixel = makeRegSelTool_Pixel()
+        self.RegSelTool_SCT   = makeRegSelTool_SCT()
+
         #self.SpacePointProviderTool = ospTool
         time = TrigTimeHistToolConfig("MbSpFexTimers")
         time.NumberOfHistBins = 100
diff --git a/Trigger/TrigAlgorithms/TrigT2MinBias/src/TrigCountSpacePoints.cxx b/Trigger/TrigAlgorithms/TrigT2MinBias/src/TrigCountSpacePoints.cxx
index d5ffe2de2891..e0a280de66a6 100644
--- a/Trigger/TrigAlgorithms/TrigT2MinBias/src/TrigCountSpacePoints.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2MinBias/src/TrigCountSpacePoints.cxx
@@ -12,7 +12,8 @@
 #include "InDetIdentifier/SCT_ID.h"
 #include "InDetIdentifier/PixelID.h"
 
-#include "IRegionSelector/IRegSelSvc.h"
+#include "RoiDescriptor/RoiDescriptor.h"
+#include "IRegionSelector/IRegSelTool.h"
 
 #include "InDetPrepRawData/SiClusterContainer.h"
 #include "InDetPrepRawData/PixelClusterContainer.h"
@@ -33,7 +34,6 @@
 TrigCountSpacePoints::TrigCountSpacePoints(const std::string& name, ISvcLocator* pSvcLocator)
   : HLT::AllTEAlgo(name, pSvcLocator),
     m_hltExecuteInitialisationRun(kFALSE),
-    m_regionSelector("RegSelSvc", name),
     m_doPixelSp(true),
     m_doSctSp(true),
     m_doOnlyBLayer(false),
@@ -55,7 +55,6 @@ TrigCountSpacePoints::TrigCountSpacePoints(const std::string& name, ISvcLocator*
 
   declareProperty( "PixelSP_ContainerName",                   m_pixelSpName = "PixelTrigSpacePoints"  );
   declareProperty( "SCT_SP_ContainerName",                    m_sctSpName = "SCT_TrigSpacePoints"     );
-  declareProperty("RegionSelectorTool",                       m_regionSelector);
   declareProperty( "ReadPixelSp",                             m_doPixelSp = true );
   declareProperty( "ReadSctSp",                               m_doSctSp = true );
   declareProperty( "OnlyCountBLayer",                         m_doOnlyBLayer = false );
@@ -171,8 +170,15 @@ HLT::ErrorCode TrigCountSpacePoints::hltInitialize() {
   ATH_MSG_DEBUG("Initialize this TrigCountSpacePoints: " << name());
 
   // Retrieving Region Selector Tool
-  if ( m_regionSelector.retrieve().isFailure() ) {
-    ATH_MSG_FATAL("Unable to retrieve RegionSelector tool " << m_regionSelector.type());
+  if ( m_regionSelector_pix.retrieve().isFailure() ) {
+    ATH_MSG_FATAL("Unable to retrieve RegionSelector tool " << m_regionSelector_pix.type());
+    return HLT::ErrorCode(HLT::Action::ABORT_JOB, HLT::Reason::BAD_JOB_SETUP);
+  }
+
+
+  // Retrieving Region Selector Tool
+  if ( m_regionSelector_sct.retrieve().isFailure() ) {
+    ATH_MSG_FATAL("Unable to retrieve RegionSelector tool " << m_regionSelector_sct.type());
     return HLT::ErrorCode(HLT::Action::ABORT_JOB, HLT::Reason::BAD_JOB_SETUP);
   }
 
@@ -392,7 +398,7 @@ HLT::ErrorCode TrigCountSpacePoints::hltExecute(std::vector<std::vector<HLT::Tri
       //sc = StatusCode::FAILURE;
     }
 
-    m_regionSelector->DetHashIDList(PIXEL, m_listOfPixIds );
+    m_regionSelector_pix->HashIDList( RoiDescriptor(true), m_listOfPixIds );
     m_pixListSize = m_listOfPixIds.size();//.....................................................................
 
     if( m_pixListSize != 0 ){
@@ -612,7 +618,7 @@ HLT::ErrorCode TrigCountSpacePoints::hltExecute(std::vector<std::vector<HLT::Tri
     }
 
 
-    m_regionSelector->DetHashIDList(SCT, m_listOfSctIds );
+    m_regionSelector_sct->HashIDList( RoiDescriptor(true), m_listOfSctIds );
     m_sctListSize = m_listOfSctIds.size();
 
     if( m_sctListSize !=0 ){
diff --git a/Trigger/TrigAlgorithms/TrigT2MinBias/src/TrigCountSpacePoints.h b/Trigger/TrigAlgorithms/TrigT2MinBias/src/TrigCountSpacePoints.h
index e1ae048b3b8e..2e6ab53235a5 100644
--- a/Trigger/TrigAlgorithms/TrigT2MinBias/src/TrigCountSpacePoints.h
+++ b/Trigger/TrigAlgorithms/TrigT2MinBias/src/TrigCountSpacePoints.h
@@ -11,11 +11,12 @@
 
 #include "xAODTrigMinBias/TrigSpacePointCounts.h"
 #include "xAODTrigMinBias/TrigHisto2D.h"
+#include "IRegionSelector/IRegSelTool.h"
 
 class SCT_ID;
 class PixelID;
 class TrigSpacePointCounts;
-class IRegSelSvc;
+
 
 /** @class TrigCountSpacePoints
 
@@ -47,7 +48,8 @@ class TrigCountSpacePoints: public HLT::AllTEAlgo {
   HLT::ErrorCode checkDetectorMask();
   
   Bool_t                        m_hltExecuteInitialisationRun; //!< Flag to run extra initialisation on the first event when xAOD::EventInfo is present
-  ServiceHandle<IRegSelSvc>     m_regionSelector;      //!< region selector service
+  ToolHandle<IRegSelTool>     m_regionSelector_pix{ this, "RegSelTool_Pixel", "RegSelTool/RegSelTool_Pixel" };      //!< region selector service
+  ToolHandle<IRegSelTool>     m_regionSelector_sct{ this, "RegSelTool_SCT",   "RegSelTool/RegSelTool_SCT"   };      //!< region selector service
   
   bool m_doPixelSp; //!< Flag to switch on or off Pixel space point retrieval 
   bool m_doSctSp; //!< Flag to switch on or off SCT space point retrieval 
diff --git a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/CMakeLists.txt b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/CMakeLists.txt
index 7b1dcb881865..acc336c8781a 100644
--- a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/CMakeLists.txt
+++ b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/CMakeLists.txt
@@ -11,7 +11,7 @@ atlas_add_component( TrigLongLivedParticlesHypo
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} CaloEvent CxxUtils GaudiKernel IRegionSelector InDetIdentifier InDetPrepRawData TrigCaloEvent TrigInDetEvent TrigInterfacesLib TrigParticle TrigSteeringEvent TrigTimeAlgsLib TrkSpacePoint xAODEventInfo xAODJet xAODTracking xAODTrigger )
+                     LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} CaloEvent CxxUtils GaudiKernel IRegionSelector RoiDescriptor InDetIdentifier InDetPrepRawData TrigCaloEvent TrigInDetEvent TrigInterfacesLib TrigParticle TrigSteeringEvent TrigTimeAlgsLib TrkSpacePoint xAODEventInfo xAODJet xAODTracking xAODTrigger )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-extensions=ATL900,ATL901 )
diff --git a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/TrigLongLivedParticlesHypo/TrigLLPInnerDetectorHypo.h b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/TrigLongLivedParticlesHypo/TrigLLPInnerDetectorHypo.h
index 649d897c9c55..a97558a9b8c4 100644
--- a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/TrigLongLivedParticlesHypo/TrigLLPInnerDetectorHypo.h
+++ b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/TrigLongLivedParticlesHypo/TrigLLPInnerDetectorHypo.h
@@ -18,10 +18,13 @@
 #include "GaudiKernel/ToolHandle.h"
 #include "TrigInterfaces/HypoAlgo.h"
 
+#include "IRegionSelector/IRegSelTool.h"
+
+
 class StoreGateSvc;
 class SCT_ID;
 class PixelID;
-class IRegSelSvc;
+
 
 
 class TrigLLPInnerDetectorHypo: public HLT::HypoAlgo {
@@ -40,7 +43,9 @@ class TrigLLPInnerDetectorHypo: public HLT::HypoAlgo {
   HLT::ErrorCode checkDetectorMask();
   
   Bool_t                        m_hltExecuteInitialisationRun; //!< Flag to run extra initialisation on the first event when xAOD::EventInfo is present
-  ServiceHandle<IRegSelSvc>     m_regionSelector;      //!< region selector service
+
+  ToolHandle<IRegSelTool>  m_regionSelector_pix { this, "RegSelTool_Pixel", "RegSelTool/RegSelTool_Pixel" };      //!< region selector tool
+  ToolHandle<IRegSelTool>  m_regionSelector_sct { this, "RegSelTool_SCT",   "RegSelTool/RegSelTool_SCT"   };      //!< region selector tool
   
   const PixelID* m_pixHelper;   
   const SCT_ID* m_sctHelper;
diff --git a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigLLPInnerDetectorHypo.cxx b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigLLPInnerDetectorHypo.cxx
index 2482c6ff75bf..a2a2094b4727 100644
--- a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigLLPInnerDetectorHypo.cxx
+++ b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigLLPInnerDetectorHypo.cxx
@@ -8,12 +8,12 @@
 #include "eformat/DetectorMask.h"
 #include "eformat/SourceIdentifier.h"
 
+#include "RoiDescriptor/RoiDescriptor.h"
+
 #include "InDetPrepRawData/PixelCluster.h"
 #include "InDetIdentifier/SCT_ID.h"
 #include "InDetIdentifier/PixelID.h"
 
-#include "IRegionSelector/IRegSelSvc.h"
-
 #include "InDetPrepRawData/SiClusterContainer.h"
 #include "InDetPrepRawData/PixelClusterContainer.h"
 #include "InDetPrepRawData/SCT_ClusterContainer.h"
@@ -31,14 +31,12 @@
 TrigLLPInnerDetectorHypo::TrigLLPInnerDetectorHypo(const std::string& name, ISvcLocator* pSvcLocator)
   : HLT::HypoAlgo(name, pSvcLocator), 
     m_hltExecuteInitialisationRun(kFALSE),
-    m_regionSelector("RegSelSvc", name),
     m_pixHelper(0),
     m_sctHelper(0)
     {
 
       declareProperty("PixelSP_ContainerName",                   m_pixelSpName = "PixelTrigSpacePoints"  );
       declareProperty("SCT_SP_ContainerName",                    m_sctSpName = "SCT_TrigSpacePoints"     );
-      declareProperty("RegionSelectorTool",                      m_regionSelector);
       
       declareProperty("MaxNModIdentifier",                       m_maxnid = 100 );
       declareProperty("PixelModuleThreshold",                    m_pixModuleThreshold = 50 );
@@ -102,11 +100,21 @@ HLT::ErrorCode TrigLLPInnerDetectorHypo::hltInitialize() {
 
   ATH_MSG_DEBUG( "Initialize: " << name()  );
 
-  if ( m_regionSelector.retrieve().isFailure() ) {
-    ATH_MSG_FATAL( "Unable to retrieve RegionSelector tool " << m_regionSelector.type()  );
+  if ( m_regionSelector_pix.retrieve().isFailure() ) {
+    ATH_MSG_FATAL( "Unable to retrieve RegionSelector tool " << m_regionSelector_pix.type()  );
     return HLT::ErrorCode(HLT::Action::ABORT_JOB, HLT::Reason::BAD_JOB_SETUP);
-  } else
-    ATH_MSG_INFO( "Successfully initialised RegionSelector tool !"  );
+  } else { 
+    ATH_MSG_INFO( "Successfully initialised Pixel RegionSelector tool !"  );
+  }
+
+
+  if ( m_regionSelector_sct.retrieve().isFailure() ) {
+    ATH_MSG_FATAL( "Unable to retrieve RegionSelector tool " << m_regionSelector_sct.type()  );
+    return HLT::ErrorCode(HLT::Action::ABORT_JOB, HLT::Reason::BAD_JOB_SETUP);
+  } else { 
+    ATH_MSG_INFO( "Successfully initialised SCT RegionSelector tool !"  );
+  }
+
 
   StatusCode sc_pixH = detStore()->retrieve(m_pixHelper, "PixelID");
   if( sc_pixH.isFailure() ){
@@ -227,7 +235,7 @@ HLT::ErrorCode TrigLLPInnerDetectorHypo::hltExecute(const HLT::TriggerElement* /
     ATH_MSG_DEBUG( "Successfully retrieved pixel SP container!"  );
   }
   
-  m_regionSelector->DetHashIDList(PIXEL, m_listOfPixIds );
+  m_regionSelector_pix->HashIDList( RoiDescriptor(true), m_listOfPixIds );
   m_pixListSize = m_listOfPixIds.size();
   
   if( m_pixListSize != 0 ){
@@ -304,7 +312,7 @@ HLT::ErrorCode TrigLLPInnerDetectorHypo::hltExecute(const HLT::TriggerElement* /
     return HLT::TOOL_FAILURE;
   }
   
-  m_regionSelector->DetHashIDList(SCT, m_listOfSctIds );
+  m_regionSelector_sct->HashIDList( RoiDescriptor(true), m_listOfSctIds );
   m_sctListSize = m_listOfSctIds.size();
   
   if( m_sctListSize !=0 ){
diff --git a/Trigger/TrigTools/TrigInDetConf/python/RoiManipulators.py b/Trigger/TrigTools/TrigInDetConf/python/RoiManipulators.py
index d2bc90f67ff7..1f111e49f8d9 100644
--- a/Trigger/TrigTools/TrigInDetConf/python/RoiManipulators.py
+++ b/Trigger/TrigTools/TrigInDetConf/python/RoiManipulators.py
@@ -7,18 +7,12 @@ class IDTrigRoiUpdater ( PESA__TrigRoiUpdater ):
   def __init__(self, name="IDTrigRoiUpdater_Electron_IDT", type="electron"):
     super ( PESA__TrigRoiUpdater, self ).__init__(name)
 
-    print( "\n\n\n\nRoiUpdater:: ", name ) 
-    
-
     from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
     from RegionSelector.RegSelToolConfig import makeRegSelTool_SCT
 
     self.RegSelTool_Pixel = makeRegSelTool_Pixel()
     self.RegSelTool_SCT   = makeRegSelTool_SCT()
 
-    print( "added RegSelTools\n\n\n\n" ) 
-
-
     from InDetTrigRecExample.InDetTrigSliceSettings import InDetTrigSliceSettings
     self.EtaHalfWidth = InDetTrigSliceSettings[('etaHalfWidth',type)]
     self.PhiHalfWidth = InDetTrigSliceSettings[('phiHalfWidth',type)]
-- 
GitLab


From 360e537edecf3246063fb2fc6b53eddd72a81468 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Sun, 4 Oct 2020 16:15:44 +0200
Subject: [PATCH 161/403] Tidy magnetic filed under TrkGeometry

---
 .../TrkGeometry/MagneticFieldMode.h           |  49 ++++----
 .../TrkGeometry/MagneticFieldProperties.h     | 114 ++++++++----------
 .../TrkGeometry/MagneticFieldProperties.icc   |  38 ++++++
 .../src/MagneticFieldProperties.cxx           |  39 +++---
 4 files changed, 124 insertions(+), 116 deletions(-)
 create mode 100644 Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/MagneticFieldProperties.icc

diff --git a/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/MagneticFieldMode.h b/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/MagneticFieldMode.h
index bd22f5f71080..21ddbc804219 100755
--- a/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/MagneticFieldMode.h
+++ b/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/MagneticFieldMode.h
@@ -1,29 +1,26 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-///////////////////////////////////////////////////////////////////
-// MagneticFieldMode.h, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-
-#ifndef TRKGEOMETRY_MAGNETICFIELDMODE_H
-#define TRKGEOMETRY_MAGNETICFIELDMODE_H
-
-namespace Trk {
-
-      /** @enum MagneticFieldMode
-          MagneticFieldMode describing the field setup within a volume
-          
-          
-          
-        
-         @author Andreas.Salzburger@cern.ch
-        */
-      enum  MagneticFieldMode { NoField                 = 0,  //!< Field is set to 0., 0., 0.,
-                                ConstantField           = 1,  //!< Field is set to be constant
-                                FastField               = 2,  //!< call the fast field access method of the FieldSvc
-                                FullField               = 3  //!< Field is set to be realistic, but within a given Volume                                
-                                };
-      
-} // end of namespace
-#endif // TRKGEOMETRY_MAGNETICFIELDMODE_H
+///////////////////////////////////////////////////////////////////
+// MagneticFieldMode.h, (c) ATLAS Detector software
+///////////////////////////////////////////////////////////////////
+#ifndef TRKGEOMETRY_MAGNETICFIELDMODE_H
+#define TRKGEOMETRY_MAGNETICFIELDMODE_H
+
+namespace Trk {
+
+/** @enum MagneticFieldMode
+    MagneticFieldMode describing the field setup within a volume
+   @author Andreas.Salzburger@cern.ch
+  */
+enum MagneticFieldMode
+{
+  NoField = 0,       //!< Field is set to 0., 0., 0.,
+  ConstantField = 1, //!< Field is set to be constant
+  FastField = 2,     //!< call the fast field access method of the FieldSvc
+  FullField = 3 //!< Field is set to be realistic, but within a given Volume
+};
+
+} // end of namespace
+#endif // TRKGEOMETRY_MAGNETICFIELDMODE_H
diff --git a/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/MagneticFieldProperties.h b/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/MagneticFieldProperties.h
index 15b6aa418ee5..b2a4061ca0b7 100755
--- a/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/MagneticFieldProperties.h
+++ b/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/MagneticFieldProperties.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,79 +9,63 @@
 #ifndef TRKGEOMETRY_MAGNETICFIELDPROPERTIES_H
 #define TRKGEOMETRY_MAGNETICFIELDPROPERTIES_H
 
-//Gaudi
-#include "GaudiKernel/MsgStream.h"
+// Gaudi
 #include "GaudiKernel/GaudiException.h"
-//Trk
+#include "GaudiKernel/MsgStream.h"
+// Trk
 #include "TrkGeometry/MagneticFieldMode.h"
 // Amg
 #include "GeoPrimitives/GeoPrimitives.h"
-//STD
+// STD
 #include <iostream>
 
 namespace Trk {
 
-  /** 
-   @class MagneticFieldProperties
-
-     new magnetic field properties to steer the behavior of the extrapolation
-     
-   @author Andreas.Salzburger@cern.ch 
-   */
-  class MagneticFieldProperties {
-      
-    public:
-      /**Constructor for magnetic field mode - full field is default */
-      MagneticFieldProperties(MagneticFieldMode mode=Trk::FullField);
-
-      /**Constructor for magnetic field mode */
-      MagneticFieldProperties(const Amg::Vector3D& field);
-      
-      /**Copy Constructor */  
-      MagneticFieldProperties(const MagneticFieldProperties& matprop);
-    
-      /**Destructor*/
-      virtual ~MagneticFieldProperties(){}
-      
-      /**Assignment operator */
-      MagneticFieldProperties& operator=(const MagneticFieldProperties& matprop);
-
-      /**Move assignment operator */
-      MagneticFieldProperties& operator=(MagneticFieldProperties && matprop);
-      
-      /**Cast operator*/
-      operator MagneticFieldMode () const;
-            
-      /**Returns the MagneticFieldMode as specified */
-      MagneticFieldMode magneticFieldMode() const;
-            
-      /** Get the magnetic field - in case of constant field only - throws exception if mode is not constant */
-      const Amg::Vector3D& magneticField() const;
-
-    protected:
-      MagneticFieldMode              m_magneticFieldMode;
-      Amg::Vector3D                          m_magneticField;
-  };
-
+/**
+ @class MagneticFieldProperties
+  magnetic field properties to steer the behavior of the extrapolation
+ @author Andreas.Salzburger@cern.ch
+ @author (Athena MT) Christos Anastopoulos
+ */
+class MagneticFieldProperties
+{
+
+public:
+  /**Constructor for magnetic field mode - full field is default */
+  MagneticFieldProperties(MagneticFieldMode mode = Trk::FullField);
+  /**Constructor for magnetic field mode */
+  MagneticFieldProperties(const Amg::Vector3D& field);
+  // default copy/move/dtor
+  MagneticFieldProperties(const MagneticFieldProperties&) = default;
+  MagneticFieldProperties(MagneticFieldProperties&&) = default;
+  MagneticFieldProperties& operator=(const MagneticFieldProperties&) = default;
+  MagneticFieldProperties& operator=(MagneticFieldProperties&&) = default;
+  ~MagneticFieldProperties() = default;
+
+  /**Cast operator*/
+  operator MagneticFieldMode() const;
+
+  /**Returns the MagneticFieldMode as specified */
+  MagneticFieldMode magneticFieldMode() const;
+
+  /** Get the magnetic field - in case of constant field only - throws exception
+   * if mode is not constant */
+  const Amg::Vector3D& magneticField() const;
+
+protected:
+  MagneticFieldMode m_magneticFieldMode;
+  Amg::Vector3D m_magneticField;
+};
+
+/**Overload of << operator for both, MsgStream and std::ostream for debug
+ * output*/
+MsgStream&
+operator<<(MsgStream& sl, const MagneticFieldProperties& mprop);
+
+std::ostream&
+operator<<(std::ostream& sl, const MagneticFieldProperties& mprop);
 
-  inline MagneticFieldProperties::operator MagneticFieldMode () const { return m_magneticFieldMode; }  
-
-  inline MagneticFieldMode MagneticFieldProperties::magneticFieldMode() const { return m_magneticFieldMode; }  
-  
-  inline const Amg::Vector3D& MagneticFieldProperties::magneticField() const { 
-      if ( m_magneticFieldMode != Trk::ConstantField ) 
-          throw GaudiException("Trk::MagneticFieldProperties", "You can only ask for a field value if you have a constant field!", StatusCode::FAILURE);
-      return m_magneticField;
-  }
-
-
-/**Overload of << operator for both, MsgStream and std::ostream for debug output*/ 
-MsgStream& operator << ( MsgStream& sl, const MagneticFieldProperties& mprop);
-
-std::ostream& operator << ( std::ostream& sl, const MagneticFieldProperties& mprop);
-    
 } // end of namespace
-
+#include "TrkGeometry/MagneticFieldProperties.icc"
 #endif // TRKGEOMETRY_MAGNETICFIELDPROPERTIES_H
 
-
diff --git a/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/MagneticFieldProperties.icc b/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/MagneticFieldProperties.icc
new file mode 100644
index 000000000000..6d0b61b3489d
--- /dev/null
+++ b/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/MagneticFieldProperties.icc
@@ -0,0 +1,38 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+inline Trk::MagneticFieldProperties::MagneticFieldProperties(
+  Trk::MagneticFieldMode mode)
+  : m_magneticFieldMode(mode)
+  , m_magneticField(0., 0., 0.)
+{}
+
+inline Trk::MagneticFieldProperties::MagneticFieldProperties(
+  const Amg::Vector3D& field)
+  : m_magneticFieldMode(Trk::ConstantField)
+  , m_magneticField(field)
+{}
+
+inline Trk::MagneticFieldProperties::operator MagneticFieldMode() const
+{
+  return m_magneticFieldMode;
+}
+
+inline Trk::MagneticFieldMode
+Trk::MagneticFieldProperties::magneticFieldMode() const
+{
+  return m_magneticFieldMode;
+}
+
+inline const Amg::Vector3D&
+Trk::MagneticFieldProperties::magneticField() const
+{
+  if (m_magneticFieldMode != Trk::ConstantField)
+    throw GaudiException(
+      "Trk::MagneticFieldProperties",
+      "You can only ask for a field value if you have a constant field!",
+      StatusCode::FAILURE);
+  return m_magneticField;
+}
+
diff --git a/Tracking/TrkDetDescr/TrkGeometry/src/MagneticFieldProperties.cxx b/Tracking/TrkDetDescr/TrkGeometry/src/MagneticFieldProperties.cxx
index deed7bcc4c15..d1bc095be5e5 100755
--- a/Tracking/TrkDetDescr/TrkGeometry/src/MagneticFieldProperties.cxx
+++ b/Tracking/TrkDetDescr/TrkGeometry/src/MagneticFieldProperties.cxx
@@ -1,39 +1,28 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
 // MagneticFieldProperties.cxx, (c) ATLAS Detector software
 ///////////////////////////////////////////////////////////////////
 
-//Trk
+// Trk
 #include "TrkGeometry/MagneticFieldProperties.h"
 
-Trk::MagneticFieldProperties::MagneticFieldProperties(Trk::MagneticFieldMode mode) :
-  m_magneticFieldMode(mode),
-  m_magneticField(0., 0., 0.)
-{}
-
-Trk::MagneticFieldProperties::MagneticFieldProperties(const Amg::Vector3D& field) :
-  m_magneticFieldMode(Trk::ConstantField),
-  m_magneticField(field)
-{}
-
-Trk::MagneticFieldProperties::MagneticFieldProperties(const MagneticFieldProperties& matprop) = default;
-
-Trk::MagneticFieldProperties& Trk::MagneticFieldProperties::operator=(const MagneticFieldProperties& matprop) = default;
-
-Trk::MagneticFieldProperties& Trk::MagneticFieldProperties::operator=(MagneticFieldProperties && matprop) = default;
-
-/**Overload of << operator for both, MsgStream and std::ostream for debug output*/ 
-MsgStream& Trk::operator<<( MsgStream& sl, const Trk::MagneticFieldProperties& mprop)
+/**Overload of << operator for both, MsgStream and std::ostream for debug
+ * output*/
+MsgStream&
+Trk::operator<<(MsgStream& sl, const Trk::MagneticFieldProperties& mprop)
 {
-   sl << "Trk::MagneticFieldProperties, configuration: " << mprop.magneticFieldMode() << endmsg; 
-   return sl;
+  sl << "Trk::MagneticFieldProperties, configuration: "
+     << mprop.magneticFieldMode() << endmsg;
+  return sl;
 }
 
-std::ostream& Trk::operator << ( std::ostream& sl, const Trk::MagneticFieldProperties& mprop)
+std::ostream&
+Trk::operator<<(std::ostream& sl, const Trk::MagneticFieldProperties& mprop)
 {
-   sl << "Trk::MagneticFieldProperties, configuration: " << mprop.magneticFieldMode() << std::endl;
-   return sl;
+  sl << "Trk::MagneticFieldProperties, configuration: "
+     << mprop.magneticFieldMode() << std::endl;
+  return sl;
 }
-- 
GitLab


From 5c21865d4892059728ae0bbaf6237d20bc3b7501 Mon Sep 17 00:00:00 2001
From: Adam Edward Barton <adam.edward.barton@cern.ch>
Date: Sun, 4 Oct 2020 16:52:44 +0100
Subject: [PATCH 162/403] Clang Tidy for hotspots

---
 .../NnClusterizationFactory.h                 |  2 +-
 .../SiClusterizationTool/src/LWTNNCondAlg.cxx |  2 +-
 .../SiClusterizationTool/src/LWTNNCondAlg.h   |  2 +-
 .../src/NnClusterizationFactory.cxx           |  7 ++++---
 .../src/TotPixelClusterSplitter.cxx           |  2 +-
 .../src/TruthClusterizationFactory.cxx        |  2 +-
 .../src/SiDetElementsLayer_xk.cxx             | 20 ++++++++++---------
 7 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnClusterizationFactory.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnClusterizationFactory.h
index 01039990556a..1dc95e4df2bf 100644
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnClusterizationFactory.h
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnClusterizationFactory.h
@@ -138,7 +138,7 @@ namespace InDet {
     /* Method 1: using older TTrainedNetworks */
     std::vector<Amg::Vector2D> estimatePositionsTTN(
                                                  const TTrainedNetworkCollection &nn_collection,
-                                                 std::vector<double> inputData,
+                                                 const std::vector<double>& inputData,
                                                  const NNinput& input,
                                                  const InDet::PixelCluster& pCluster,
                                                  int sizeX,
diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/LWTNNCondAlg.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/LWTNNCondAlg.cxx
index 0a733ff61e79..994403f4fc4d 100644
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/LWTNNCondAlg.cxx
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/LWTNNCondAlg.cxx
@@ -54,7 +54,7 @@ namespace InDet {
   }
 
   StatusCode LWTNNCondAlg::configureLwtnn(std::unique_ptr<lwt::LightweightGraph> & thisNN, 
-                                        std::string thisJson) {
+                                        const std::string& thisJson) {
 
     // Read DNN weights from input json config
     lwt::GraphConfig config;
diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/LWTNNCondAlg.h b/InnerDetector/InDetRecTools/SiClusterizationTool/src/LWTNNCondAlg.h
index 23a94d535fa2..2678f02c1039 100644
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/LWTNNCondAlg.h
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/LWTNNCondAlg.h
@@ -49,7 +49,7 @@ class LWTNNCondAlg : public AthAlgorithm {
   ToolHandle<Trk::NeuralNetworkToHistoTool> m_networkToHistoTool
     {this,"NetworkToHistoTool", "Trk::NeuralNetworkToHistoTool/NeuralNetworkToHistoTool", "Tool to create a neural network from a set of histograms." };
 */
-  StatusCode configureLwtnn(std::unique_ptr<lwt::LightweightGraph> & thisNN, std::string thisJson);
+  StatusCode configureLwtnn(std::unique_ptr<lwt::LightweightGraph> & thisNN, const std::string& thisJson);
 
   SG::ReadCondHandleKey<CondAttrListCollection> m_readKey
     {this, "ReadKey", "/PIXEL/PixelClustering/PixelNNCalibJSON", "Cool folder name for the cluster NN input histogram file."};
diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx
index 28feb5fa6854..4d1d1b634827 100644
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx
@@ -463,7 +463,7 @@ namespace InDet {
 
   std::vector<Amg::Vector2D> NnClusterizationFactory::estimatePositionsTTN(
                                                 const TTrainedNetworkCollection &nn_collection,
-                                                std::vector<double> inputData,
+                                                const std::vector<double>& inputData,
                                                 const NNinput& input,
                                                 const InDet::PixelCluster& pCluster,
                                                 int sizeX,
@@ -545,7 +545,7 @@ namespace InDet {
       std::map<std::string, double> position = lwtnn_collection->at(numberSubClusters)->compute(input, {},outNodeName);
 
       ATH_MSG_DEBUG("Testing for numberSubClusters " << numberSubClusters << " and cluster " << cluster);
-      for (auto item : position) {
+      for (const auto& item : position) {
         ATH_MSG_DEBUG(item.first << ": " << item.second);
       }
       positionValues.push_back(position["mean_x"]);
@@ -1056,7 +1056,8 @@ namespace InDet {
   for (int a=0;a<sizeX;a++)
   {
     std::vector<float> Yvector;
-    for (int b=0;b<sizeY;b++)
+    Yvector.reserve(sizeY);
+for (int b=0;b<sizeY;b++)
     {
       Yvector.push_back(0);
     }
diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/TotPixelClusterSplitter.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/TotPixelClusterSplitter.cxx
index 4325c1099155..11c0b32e78b0 100644
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/TotPixelClusterSplitter.cxx
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/TotPixelClusterSplitter.cxx
@@ -196,7 +196,7 @@ std::vector<InDet::PixelClusterParts> InDet::TotPixelClusterSplitter::splitClust
   std::vector<int> Totgroups[2];
   std::vector<int> Lvl1groups[2];
 
-  const std::vector<int> OrigTots = OrigCluster.totList();
+  const std::vector<int>& OrigTots = OrigCluster.totList();
   const int Lvl1a = OrigCluster.LVL1A();
   
   const AtlasDetectorID* aid = Element->getIdHelper();
diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthClusterizationFactory.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthClusterizationFactory.cxx
index 95126f93a588..2587b31385b0 100644
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthClusterizationFactory.cxx
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthClusterizationFactory.cxx
@@ -84,7 +84,7 @@ namespace InDet {
           // get the SimData and count the individual contributions
           auto simData = (simDataIter->second);
           //auto simDataDeposits = simData.getdeposits();
-          for( auto deposit : simData.getdeposits() ){
+          for( const auto& deposit : simData.getdeposits() ){
             //If deposit exists
             if (deposit.first){
               //Now iterate over all barcodes
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsLayer_xk.cxx b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsLayer_xk.cxx
index 6636827221c4..07b7c6b788b1 100644
--- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsLayer_xk.cxx
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsLayer_xk.cxx
@@ -12,6 +12,8 @@
 // Version 1.0 21/04/2004 I.Gavrilenko
 ///////////////////////////////////////////////////////////////////
 
+#include <cmath>
+
 #include "SiDetElementsRoadTool_xk/SiDetElementsComparison.h"
 #include "SiDetElementsRoadTool_xk/SiDetElementsLayer_xk.h"
 
@@ -33,16 +35,16 @@ void InDet::SiDetElementsLayer_xk::getBarrelDetElements
   float a  = (A[0]*P[0]+A[1]*P[1])*2.; 
   float d  = (m_r-P[0]-P[1])*(m_r+P[0]+P[1])+2.*P[0]*P[1];
   float b  = 2.*(A[0]*A[0]+A[1]*A[1]); if(b == 0.) return;
-  float sq = a*a+2.*d*b;  sq>0. ? sq=sqrt(sq) : sq=0.;
+  float sq = a*a+2.*d*b;  sq>0. ? sq=std::sqrt(sq) : sq=0.;
   float s1 =-(a+sq)/b;
   float s2 =-(a-sq)/b; 
   float s;
-  if((s1*s2) > 0.) {fabs(s1) < fabs(s2) ? s = s1 : s = s2;}
+  if((s1*s2) > 0.) {std::fabs(s1) < std::fabs(s2) ? s = s1 : s = s2;}
   else             {     s1  > 0.       ? s = s1 : s = s2;}  
   float zc   = P[2]+A[2]*s;
   float At   = sqrt(1.-A[2]*A[2]);
-  if(At != 0. && fabs(zc-m_z) > (m_dz+(m_dr*fabs(A[2])+P[4])/At)) return;
-  float fc   = atan2(P[1]+A[1]*s,P[0]+A[0]*s);
+  if(At != 0. && std::fabs(zc-m_z) > (m_dz+(m_dr*std::fabs(A[2])+P[4])/At)) return;
+  float fc   = std::atan2(P[1]+A[1]*s,P[0]+A[0]*s);
   float dw   = P[4]/m_r;
   getDetElements(P,A,fc,dw,lDE,used);
 }
@@ -66,10 +68,10 @@ void InDet::SiDetElementsLayer_xk::getEndcapDetElements
   float s   =(m_z-P[2])/A[2];
   float xc  = P[0]+A[0]*s;
   float yc  = P[1]+A[1]*s;
-  float rc  = sqrt(xc*xc+yc*yc);
+  float rc  = std::sqrt(xc*xc+yc*yc);
   float A23 = A[2]*P[3];
-  if(A23 != 0. && fabs(rc-m_r) > m_dr+fabs(2.*(P[0]*A[0]+P[1]*A[1])*m_dz/A23)+P[4]) return;
-  float fc  = atan2(yc,xc);
+  if(A23 != 0. && std::fabs(rc-m_r) > m_dr+fabs(2.*(P[0]*A[0]+P[1]*A[1])*m_dz/A23)+P[4]) return;
+  float fc  = std::atan2(yc,xc);
   float dw  = P[4]/rc;
   getDetElements(P,A,fc,dw,lDE,used);
 }
@@ -107,7 +109,7 @@ void InDet::SiDetElementsLayer_xk::getDetElements
     assert( static_cast<unsigned int>(i)<m_elements.size() );
     if(!used[i].used()) {
 
-      float dF =fabs(m_elements[i].phi()-Fc); if(dF>pi) dF=fabs(dF-pi2);
+      float dF =std::fabs(m_elements[i].phi()-Fc); if(dF>pi) dF=std::fabs(dF-pi2);
       if((dF-dW)>m_dfe) break;
       m_elements[i].intersect(P,A,O);
 
@@ -125,7 +127,7 @@ void InDet::SiDetElementsLayer_xk::getDetElements
     assert( static_cast<unsigned int>(i)<m_elements.size() );
     if(!used[i].used()) {
 
-      float dF =fabs(m_elements[i].phi()-Fc); if(dF>pi) dF=fabs(dF-pi2);
+      float dF =std::fabs(m_elements[i].phi()-Fc); if(dF>pi) dF=std::fabs(dF-pi2);
       if((dF-dW)>m_dfe) return;
       m_elements[i].intersect(P,A,O);
       
-- 
GitLab


From ad3748234ea91884b36799ccf656529b645f59dd Mon Sep 17 00:00:00 2001
From: Maximilian Goblirsch-Kolb <goblirsc@cern.ch>
Date: Sun, 4 Oct 2020 18:23:41 +0200
Subject: [PATCH 163/403] extend si det element comparisons

---
 .../SiDetElementsComparison.h                 | 27 ++++++++++++++++---
 1 file changed, 23 insertions(+), 4 deletions(-)

diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsComparison.h b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsComparison.h
index f5d52b8ba0d5..eb146fdcfb1b 100644
--- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsComparison.h
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsComparison.h
@@ -18,7 +18,7 @@ namespace InDet{
   public:
 
     bool operator () (const InDetDD::SiDetectorElement* e1,
-		      const InDetDD::SiDetectorElement* e2) 
+		      const InDetDD::SiDetectorElement* e2) const
       {
       
 	Amg::Vector3D p1  = e1->center();
@@ -39,7 +39,7 @@ namespace InDet{
   public:
 
     bool operator () (const InDetDD::SiDetectorElement* e1,
-		      const InDetDD::SiDetectorElement* e2) 
+		      const InDetDD::SiDetectorElement* e2) const
       {
       
 	Amg::Vector3D p1  = e1->center();
@@ -64,7 +64,7 @@ namespace InDet{
   public:
     
     bool operator () (const InDetDD::SiDetectorElement* e1,
-		      const InDetDD::SiDetectorElement* e2) 
+		      const InDetDD::SiDetectorElement* e2) const
       {
       
 	Amg::Vector3D p1  = e1->center();
@@ -87,6 +87,25 @@ namespace InDet{
       }
   };
 
+  class compDetElementWays{
+    public:
+      bool operator() (const SiDetElementLink_xk::ElementWay& l1, const SiDetElementLink_xk::ElementWay & l2) const{
+        static const compDetElements_RAZ compRAZ;
+        static const compDetElements_ZRA compZRA;
+        /// in case of equality, use the sorting logic in the layer vectors
+        if (l1.way() == l2.way()){
+          if (l1.link()->detElement()->isBarrel()){
+            return compRAZ(l1.link()->detElement(), l2.link()->detElement()); 
+          }
+          else {
+            return compZRA(l1.link()->detElement(), l2.link()->detElement()); 
+          }
+        }
+        /// otherwise compare by distance
+        else return l1.way() < l2.way(); 
+      }
+  };
+
   ///////////////////////////////////////////////////////////////////
   // Object function for ordering InDet::SiDetElementLink_xk
   // in azimuthal angle order
@@ -97,7 +116,7 @@ namespace InDet{
   public:
 
     bool operator () (const InDet::SiDetElementLink_xk& l1,
-		      const InDet::SiDetElementLink_xk& l2) 
+		      const InDet::SiDetElementLink_xk& l2) const
       {
 	return (l1.phi() < l2.phi());
       }
-- 
GitLab


From 95f3cf5b03b2e3693d04ca0552d763155d86cded Mon Sep 17 00:00:00 2001
From: Maximilian Goblirsch-Kolb <goblirsc@cern.ch>
Date: Sun, 4 Oct 2020 18:24:39 +0200
Subject: [PATCH 164/403] update detector element sorting

---
 .../SiDetElementsRoadTool_xk/src/SiDetElementLink_xk.cxx  | 1 -
 .../src/SiDetElementsRoadMaker_xk.cxx                     | 8 ++------
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementLink_xk.cxx b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementLink_xk.cxx
index c8a309d0c748..26bff6438568 100644
--- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementLink_xk.cxx
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementLink_xk.cxx
@@ -60,7 +60,6 @@ void InDet::SiDetElementLink_xk::intersect
 (const float* r ,const float* a,float* O) const
 {
   const float* g = &m_geo[0];
-  /// deciphering this is left as an exercise to the reader. 
   float     s[3] = {g[3]*g[4],g[2]*g[4],g[5]}                         ;
   float     S    = a[0]*s[0]+a[1]*s[1]+a[2]*s[2]                      ;
   if(S!=0.) S    = (g[0]-(r[0]*s[0]+r[1]*s[1]+r[2]*s[2]))/S           ;
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx
index 073370977b70..2efef0e362ec 100644
--- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx
@@ -484,12 +484,8 @@ void InDet::SiDetElementsRoadMaker_xk::detElementsRoad
     /// and increment the total propagation distance
     par_startingPoint[5]+= dist3D;
   }
-
-  // Sort list in propagation order
-  std::sort(lDE.begin(),lDE.end(),[](const InDet::SiDetElementLink_xk::ElementWay& l1, const InDet::SiDetElementLink_xk::ElementWay & l2){
-    return l1.way() < l2.way(); 
-  });
-
+  auto vec2 = lDE; 
+  std::sort(lDE.begin(),lDE.end(),InDet::compDetElementWays());
   // Fill list pointers to detector elements
   for (auto & d : lDE){
     if (testDirection && d.way() < 0) continue; 
-- 
GitLab


From bfe4ab56237d413d57ce0409a40833539bd9940d Mon Sep 17 00:00:00 2001
From: abarton <Adam.Edward.Barton@cern.ch>
Date: Sun, 4 Oct 2020 17:29:23 +0100
Subject: [PATCH 165/403] Some optimizations

---
 .../src/NnClusterizationFactory.cxx           | 28 ++++++-------------
 1 file changed, 8 insertions(+), 20 deletions(-)

diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx
index 4d1d1b634827..529e02c1b0eb 100644
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx
@@ -22,9 +22,6 @@
 #include "GaudiKernel/ServiceHandle.h"
 
 #include <TMath.h>
-#include <TH1.h>
-#include <TH1F.h>
-#include <TH2F.h>
 #include "TrkNeuralNetworkUtils/TTrainedNetwork.h"
 #include "SiClusterizationTool/NnClusterizationFactory.h"
 #include "SiClusterizationTool/NnNormalization.h"
@@ -532,6 +529,8 @@ namespace InDet {
     // Save the output
     std::vector<double> positionValues;
     std::vector<Amg::MatrixX> errorMatrices;
+    errorMatrices.reserve(numberSubClusters);
+    positionValues.reserve(numberSubClusters * 2);
     for (int cluster = 1; cluster < numberSubClusters+1; cluster++) {
 
       // Check that the network is defined. 
@@ -1050,23 +1049,12 @@ namespace InDet {
     return input;
   }
 
-  std::vector<std::vector<float> > matrixOfToT;
-  std::vector<float> vectorOfPitchesY;
-
+  input.matrixOfToT.reserve(sizeX);
   for (int a=0;a<sizeX;a++)
   {
-    std::vector<float> Yvector;
-    Yvector.reserve(sizeY);
-for (int b=0;b<sizeY;b++)
-    {
-      Yvector.push_back(0);
-    }
-    input.matrixOfToT.push_back(Yvector);
-  }
-  for (int b=0;b<sizeY;b++)
-  {
-    input.vectorOfPitchesY.push_back(0.4);
+    input.matrixOfToT.emplace_back(sizeY, 0.0);
   }
+  input.vectorOfPitchesY.assign(sizeY, 0.4);
 
   rdosBegin = rdos.begin();
   //charge = chList.size() ? chList.begin() : chListRecreated.begin();
@@ -1163,9 +1151,9 @@ for (int b=0;b<sizeY;b++)
   Amg::Vector3D globalPos = element->globalPosition(centroid);
   Amg::Vector3D my_track = globalPos-beamSpotPosition;
 
-  Amg::Vector3D my_normal = element->normal();
-  Amg::Vector3D my_phiax = element->phiAxis();
-  Amg::Vector3D my_etaax = element->etaAxis();
+  const Amg::Vector3D &my_normal = element->normal();
+  const Amg::Vector3D &my_phiax = element->phiAxis();
+  const Amg::Vector3D &my_etaax = element->etaAxis();
   float trkphicomp = my_track.dot(my_phiax);
   float trketacomp = my_track.dot(my_etaax);
   float trknormcomp = my_track.dot(my_normal);
-- 
GitLab


From e53d8dfe65284f8f72445615f7f55a40b39d3021 Mon Sep 17 00:00:00 2001
From: Maximilian Goblirsch-Kolb <goblirsc@cern.ch>
Date: Sun, 4 Oct 2020 20:25:02 +0200
Subject: [PATCH 166/403] move to distance as secondary detector element
 sorting logic

---
 .../SiDetElementsRoadTool_xk/SiDetElementLink_xk.h       | 9 +++++----
 .../SiDetElementsRoadTool_xk/SiDetElementsComparison.h   | 9 +--------
 .../src/SiDetElementsLayer_xk.cxx                        | 4 ++--
 3 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementLink_xk.h b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementLink_xk.h
index 400e3a9617dd..e5bbd9608cc2 100644
--- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementLink_xk.h
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementLink_xk.h
@@ -40,13 +40,14 @@ namespace InDet{
           bool m_used;
        };
 
-       class ElementWay : public std::pair<const InDet::SiDetElementLink_xk*, float> {
+       class ElementWay : public std::pair<const InDet::SiDetElementLink_xk*, std::pair<float,float> > {
        public:
-          ElementWay(const InDet::SiDetElementLink_xk*link, float way)
-             : std::pair<const InDet::SiDetElementLink_xk*, float>(link,way) {}
+          ElementWay(const InDet::SiDetElementLink_xk*link, float way, float distance)
+             : std::pair<const InDet::SiDetElementLink_xk*, std::pair<float,float> >(link,std::make_pair(way,distance)) {}
 
           const InDet::SiDetElementLink_xk* link() const { return this->first; }
-          float way()                              const { return this->second; }
+          float way()                              const { return this->second.first; }
+          float distance()                              const { return this->second.second; }
        };
 
       SiDetElementLink_xk();
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsComparison.h b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsComparison.h
index eb146fdcfb1b..ac15b175dcee 100644
--- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsComparison.h
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsComparison.h
@@ -90,16 +90,9 @@ namespace InDet{
   class compDetElementWays{
     public:
       bool operator() (const SiDetElementLink_xk::ElementWay& l1, const SiDetElementLink_xk::ElementWay & l2) const{
-        static const compDetElements_RAZ compRAZ;
-        static const compDetElements_ZRA compZRA;
         /// in case of equality, use the sorting logic in the layer vectors
         if (l1.way() == l2.way()){
-          if (l1.link()->detElement()->isBarrel()){
-            return compRAZ(l1.link()->detElement(), l2.link()->detElement()); 
-          }
-          else {
-            return compZRA(l1.link()->detElement(), l2.link()->detElement()); 
-          }
+          return l1.distance() < l2.distance();
         }
         /// otherwise compare by distance
         else return l1.way() < l2.way(); 
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsLayer_xk.cxx b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsLayer_xk.cxx
index 69cadc51f270..0363f5535d4f 100644
--- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsLayer_xk.cxx
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsLayer_xk.cxx
@@ -182,7 +182,7 @@ void InDet::SiDetElementsLayer_xk::getDetElements
             && (intersectionOutcome[1]<=startingPoint[4])
           ) {
          /// we found a compatible detector element - add to our list  
-         lDE.push_back(InDet::SiDetElementLink_xk::ElementWay(&m_elements[i],startingPoint[5]+intersectionOutcome[2])); 
+         lDE.push_back(InDet::SiDetElementLink_xk::ElementWay(&m_elements[i],startingPoint[5]+intersectionOutcome[2],std::max(intersectionOutcome[0],intersectionOutcome[1]))); 
          used[i].setUsed();
       }
     }
@@ -208,7 +208,7 @@ void InDet::SiDetElementsLayer_xk::getDetElements
       m_elements[i].intersect(&(startingPoint[0]),&(searchDirection[0]),&(intersectionOutcome[0]));
       
       if((intersectionOutcome[0]-startingPoint[4])<=0 && (intersectionOutcome[1]-startingPoint[4])<=0.) {
-         lDE.push_back(InDet::SiDetElementLink_xk::ElementWay(&m_elements[i],startingPoint[5]+intersectionOutcome[2])); 
+         lDE.push_back(InDet::SiDetElementLink_xk::ElementWay(&m_elements[i],startingPoint[5]+intersectionOutcome[2],std::max(intersectionOutcome[0],intersectionOutcome[1]))); 
          used[i].setUsed();
       }
     }
-- 
GitLab


From 79df6de31da7aca161373b2abab58e61182320d7 Mon Sep 17 00:00:00 2001
From: Peter Onyisi <ponyisi@utexas.edu>
Date: Sun, 4 Oct 2020 22:04:24 +0200
Subject: [PATCH 167/403] Update DQ ART tests

---
 .../test/test_run3dq_r22_aod_trigger.sh       |  2 +-
 .../test/test_run3dq_r22_aod_trigger_mt.sh    |  2 +-
 .../test/test_run3dq_r22_recotf.sh            | 19 +++++++++++++++++++
 .../test/test_run3dq_r22_recotf_rawtoall.sh   | 19 +++++++++++++++++++
 4 files changed, 40 insertions(+), 2 deletions(-)
 create mode 100755 Control/AthenaMonitoring/test/test_run3dq_r22_recotf.sh
 create mode 100755 Control/AthenaMonitoring/test/test_run3dq_r22_recotf_rawtoall.sh

diff --git a/Control/AthenaMonitoring/test/test_run3dq_r22_aod_trigger.sh b/Control/AthenaMonitoring/test/test_run3dq_r22_aod_trigger.sh
index 171b265f584b..985cc5ca7d3c 100755
--- a/Control/AthenaMonitoring/test/test_run3dq_r22_aod_trigger.sh
+++ b/Control/AthenaMonitoring/test/test_run3dq_r22_aod_trigger.sh
@@ -6,7 +6,7 @@
 # art-output: ExampleMonitorOutput.root
 # art-output: log*
 
-art.py download TrigAnalysisTest test_trigAna_RDOtoAOD_mt1_grid.py
+art.py download TrigAnalysisTest test_trigAna_RDOtoAOD_v1Dev_grid.py
 AODFILE=(./ref-*/AOD.pool.root)
 Run3DQTestingDriver.py 'Input.Files=["'${AODFILE}'"]' DQ.Steering.doHLTMon=True DQ.Environment=AOD --dqOffByDefault > log.HIST_Creation 2>&1
 
diff --git a/Control/AthenaMonitoring/test/test_run3dq_r22_aod_trigger_mt.sh b/Control/AthenaMonitoring/test/test_run3dq_r22_aod_trigger_mt.sh
index 26a81ffdfb3d..f57f8a44ac64 100755
--- a/Control/AthenaMonitoring/test/test_run3dq_r22_aod_trigger_mt.sh
+++ b/Control/AthenaMonitoring/test/test_run3dq_r22_aod_trigger_mt.sh
@@ -6,7 +6,7 @@
 # art-output: ExampleMonitorOutput.root
 # art-output: log*
 
-art.py download TrigAnalysisTest test_trigAna_RDOtoAOD_mt1_grid.py
+art.py download TrigAnalysisTest test_trigAna_RDOtoAOD_v1Dev_grid.py
 AODFILE=(./ref-*/AOD.pool.root)
 Run3DQTestingDriver.py 'Input.Files=["'${AODFILE}'"]' DQ.Steering.doHLTMon=True DQ.Environment=AOD Concurrency.NumThreads=1 Concurrency.NumConcurrentEvents=1 --dqOffByDefault > log.HIST_Creation 2>&1
 
diff --git a/Control/AthenaMonitoring/test/test_run3dq_r22_recotf.sh b/Control/AthenaMonitoring/test/test_run3dq_r22_recotf.sh
new file mode 100755
index 000000000000..d6653eca3c38
--- /dev/null
+++ b/Control/AthenaMonitoring/test/test_run3dq_r22_recotf.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+# art-description: new DQ in Reco_tf, two-step, data q431
+# art-type: grid
+# art-memory: 3072
+# art-include: master/Athena
+# art-output: myHIST.root
+# art-output: log*
+
+Reco_tf.py --athenaopts='--threads=1' --AMI=q431 --preExec="DQMonFlags.doNewMonitoring=True;DQMonFlags.doHLTMon=False" > log.HIST_Creation 2>&1
+
+echo "art-result: $? HIST_Creation"
+rm -rf ref-*
+
+ArtPackage=$1
+ArtJobName=$2
+art.py download ${ArtPackage} ${ArtJobName}
+REFFILE=(./ref-*/myHIST.root)
+hist_diff.sh myHIST.root $REFFILE -x TIME_execute -i > log.HIST_Diff 2>&1
+echo "art-result: $? HIST_Diff"
diff --git a/Control/AthenaMonitoring/test/test_run3dq_r22_recotf_rawtoall.sh b/Control/AthenaMonitoring/test/test_run3dq_r22_recotf_rawtoall.sh
new file mode 100755
index 000000000000..958d3a3b3a65
--- /dev/null
+++ b/Control/AthenaMonitoring/test/test_run3dq_r22_recotf_rawtoall.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+# art-description: new DQ in Reco_tf, RAWtoALL, data q431
+# art-type: grid
+# art-memory: 4096
+# art-include: master/Athena
+# art-output: myHIST.root
+# art-output: log*
+
+Reco_tf.py --athenaopts='--threads=1' --AMI=q431 --preExec="DQMonFlags.doNewMonitoring=True;DQMonFlags.doHLTMon=False" --steering doRAWtoALL > log.HIST_Creation 2>&1
+
+echo "art-result: $? HIST_Creation"
+rm -rf ref-*
+
+ArtPackage=$1
+ArtJobName=$2
+art.py download ${ArtPackage} ${ArtJobName}
+REFFILE=(./ref-*/myHIST.root)
+hist_diff.sh myHIST.root $REFFILE -x TIME_execute -i > log.HIST_Diff 2>&1
+echo "art-result: $? HIST_Diff"
-- 
GitLab


From 4766d04eb20124c8c320571b9ca03b1d5ad5dd92 Mon Sep 17 00:00:00 2001
From: Andrew Beddall <Andrew.Beddall@cern.ch>
Date: Sun, 4 Oct 2020 23:30:59 +0200
Subject: [PATCH 168/403] TRT RDO Reduction 2 (change p2 to p3)

---
 .../InDetEventAthenaPool/src/TRT_RDO_ContainerCnv.h   | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv.h b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv.h
index 66f994bb2437..8e2d4c0c7dac 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv.h
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv.h
@@ -19,13 +19,10 @@
 #include "TRT_LoLumRawDataContainerCnv_p2.h"
 #include "TRT_LoLumRawDataContainerCnv_p3.h"
 
-
-// the latest persistent representation type of DataCollection:
-typedef  InDetRawDataContainer_p2         TRT_RDO_Container_PERS;
-typedef  TRT_LoLumRawDataContainerCnv_p2  TRT_RDO_ContainerCnv_PERS;
-// To switch to the p3 version (20% RDO size reduction), comment the two lines above and uncomment the two below.
-// typedef  InDetRawDataContainer_p3         TRT_RDO_Container_PERS;
-// typedef  TRT_LoLumRawDataContainerCnv_p3  TRT_RDO_ContainerCnv_PERS;
+// The latest persistent representation type of DataCollection:
+// p3 version (20% RDO size reduction)
+typedef  InDetRawDataContainer_p3         TRT_RDO_Container_PERS;
+typedef  TRT_LoLumRawDataContainerCnv_p3  TRT_RDO_ContainerCnv_PERS;
 
 typedef  T_AthenaPoolCustomCnv<TRT_RDO_Container, TRT_RDO_Container_PERS >   TRT_RDO_ContainerCnvBase;
 
-- 
GitLab


From 453f82f9b9cb8597377901dec34b4f7d6b157425 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Mon, 5 Oct 2020 00:35:57 +0200
Subject: [PATCH 169/403] add Helper for doing the 1x3 * 3x5 = 1x5 calculation

---
 .../TrkExUtils/src/RungeKuttaUtils.cxx        | 161 +++++++++---------
 1 file changed, 84 insertions(+), 77 deletions(-)

diff --git a/Tracking/TrkExtrapolation/TrkExUtils/src/RungeKuttaUtils.cxx b/Tracking/TrkExtrapolation/TrkExUtils/src/RungeKuttaUtils.cxx
index 7a46860b2b3c..d7fdc567f87f 100755
--- a/Tracking/TrkExtrapolation/TrkExUtils/src/RungeKuttaUtils.cxx
+++ b/Tracking/TrkExtrapolation/TrkExUtils/src/RungeKuttaUtils.cxx
@@ -27,20 +27,31 @@ namespace{
  * Hide all internal implementation methods
  * inside an anonymous namespace
  */
+/*The notation of this package
+in array P[42].
+                 /dL0    /dL1    /dPhi   /dThe   /dCM
+X  ->P[0]  dX /   P[ 7]   P[14]   P[21]   P[28]   P[35]
+Y  ->P[1]  dY /   P[ 8]   P[15]   P[22]   P[29]   P[36]
+Z  ->P[2]  dZ /   P[ 9]   P[16]   P[23]   P[30]   P[37]
+Ax ->P[3]  dAx/   P[10]   P[17]   P[24]   P[31]   P[38]
+Ay ->P[4]  dAy/   P[11]   P[18]   P[25]   P[32]   P[39]
+Az ->P[5]  dAz/   P[12]   P[19]   P[26]   P[33]   P[40]
+CM ->P[6]  dCM/   P[13]   P[20]   P[27]   P[34]   P[41]
+*/
 
-inline
-void globalToLocalVecHelper(double* ATH_RESTRICT P,
-    const double s0,
-       const double s1,
-       const double s2,
-       const double s3,
-       const double s4)
+inline void
+globalToLocalVecHelper(double* ATH_RESTRICT P,
+                       const double s0,
+                       const double s1,
+                       const double s2,
+                       const double s3,
+                       const double s4)
 {
   using namespace CxxUtils;
   using vec2 = CxxUtils::vec<double, 2>;
   using vec4 = CxxUtils::vec<double, 4>;
 
-  /*
+  /* Calculation
       P[ 7]-=(s0*P[ 3]); P[ 8]-=(s0*P[ 4]); P[ 9]-=(s0*P[ 5]);
       P[10]-=(s0*P[42]); P[11]-=(s0*P[43]); P[12]-=(s0*P[44]);
       P[14]-=(s1*P[ 3]); P[15]-=(s1*P[ 4]); P[16]-=(s1*P[ 5]);
@@ -52,32 +63,17 @@ void globalToLocalVecHelper(double* ATH_RESTRICT P,
       P[35]-=(s4*P[ 3]); P[36]-=(s4*P[ 4]); P[37]-=(s4*P[ 5]);
       P[38]-=(s4*P[42]); P[39]-=(s4*P[43]); P[40]-=(s4*P[44]);
       */
-
   /*
    * The naming convention we follow is
-   *
    * A_B -->SIMD vector of
    * of size 2 containing
    * {A,B}
    * For example :
    * dZdTheta_dAxdTheta --> {dZ/dTheta, dAx/dTheta}
    * --> {P[30],P[31]}
-   *
-   * using the notation of this package
-   *
-   *        /dL0    /dL1    /dPhi   /dThe   /dCM
-   * dX /   P[ 7]   P[14]   P[21]   P[28]   P[35]
-   * dY /   P[ 8]   P[15]   P[22]   P[29]   P[36]
-   * dZ /   P[ 9]   P[16]   P[23]   P[30]   P[37]
-   * dAx/   P[10]   P[17]   P[24]   P[31]   P[38]
-   * dAy/   P[11]   P[18]   P[25]   P[32]   P[39]
-   * dAz/   P[12]   P[19]   P[26]   P[33]   P[40]
-   * dCM/   P[13]   P[20]   P[27]   P[34]   P[41]
    */
-
   vec2 Pmult1 = { P[3], P[4] };
   vec4 Pmult2 = { P[5], P[42], P[43], P[44] };
-
   vec2 dXdL0_dYdL0;
   vload(dXdL0_dYdL0, &P[7]);
   vec4 dZdL0_dAxdL0_dAydL0_dAzdL0;
@@ -124,6 +120,49 @@ void globalToLocalVecHelper(double* ATH_RESTRICT P,
   vstore(&P[37], dZdCM_dAxdCM_AydCM_dAzdCM);
 }
 
+inline void
+mutl3x5Helper(double* ATH_RESTRICT Jac,
+              const double* ATH_RESTRICT V,
+              const double* ATH_RESTRICT P)
+{
+  /* The following matrix multiplication
+   * 5x1 = 5x3 * 3X1
+   * for the Jacobian
+   * is repeated multiple times
+   * Jac[ 0] = Ax[0]*P[ 7]+Ax[1]*P[ 8]+Ax[2]*P[ 9];                               // dL0/dL0
+   * Jac[ 1] = Ax[0]*P[14]+Ax[1]*P[15]+Ax[2]*P[16];                               // dL0/dL1
+   * Jac[ 2] = Ax[0]*P[21]+Ax[1]*P[22]+Ax[2]*P[23];                               // dL0/dPhi
+   * Jac[ 3] = Ax[0]*P[28]+Ax[1]*P[29]+Ax[2]*P[30];                               // dL0/dThe
+   * Jac[ 4] = Ax[0]*P[35]+Ax[1]*P[36]+Ax[2]*P[37];                               // dL0/dCM
+   * Jac[ 5] = Ay[0]*P[ 7]+Ay[1]*P[ 8]+Ay[2]*P[ 9];                               // dL1/dL0
+   * Jac[ 6] = Ay[0]*P[14]+Ay[1]*P[15]+Ay[2]*P[16];                               // dL1/dL1
+   * Jac[ 7] = Ay[0]*P[21]+Ay[1]*P[22]+Ay[2]*P[23];                               // dL1/dPhi
+   * Jac[ 8] = Ay[0]*P[28]+Ay[1]*P[29]+Ay[2]*P[30];                               // dL1/dThe
+   * Jac[ 9] = Ay[0]*P[35]+Ay[1]*P[36]+Ay[2]*P[37];                               // dL1/dCM
+  */
+  using vec2 = CxxUtils::vec<double, 2>;
+  vec2 V1 = { V[0], V[0] };
+  vec2 V2 = { V[1], V[1] };
+  vec2 V3 = { V[2], V[2] };
+
+  // 1st and 2nd element
+  vec2 P1v1 = { P[0], P[7] };
+  vec2 P1v2 = { P[1], P[8] };
+  vec2 P1v3 = { P[2], P[9] };
+  vec2 res1 = V1 * P1v1 + V2 * P1v2 + V3 * P1v3;
+  CxxUtils::vstore(&Jac[0], res1);
+
+  // 3th and 4th element
+  vec2 P2v1 = { P[14], P[21] };
+  vec2 P2v2 = { P[15], P[22] };
+  vec2 P2v3 = { P[16], P[23] };
+  vec2 res2 = V1 * P2v1 + V2 * P2v2 + V3 * P2v3;
+  CxxUtils::vstore(&Jac[2], res2);
+
+  // The 5th element
+  Jac[4] = V[0] * P[28] + V[1] * P[29] + V[2] * P[30];
+}
+
 void
 transformGlobalToPlane(const Amg::Transform3D&  T,
                        bool useJac,
@@ -158,17 +197,8 @@ transformGlobalToPlane(const Amg::Transform3D&  T,
   globalToLocalVecHelper(P, s0, s1, s2, s3, s4);
 
   // Jacobian production
-  //
-  Jac[ 0] = Ax[0]*P[ 7]+Ax[1]*P[ 8]+Ax[2]*P[ 9];                               // dL0/dL0
-  Jac[ 1] = Ax[0]*P[14]+Ax[1]*P[15]+Ax[2]*P[16];                               // dL0/dL1
-  Jac[ 2] = Ax[0]*P[21]+Ax[1]*P[22]+Ax[2]*P[23];                               // dL0/dPhi
-  Jac[ 3] = Ax[0]*P[28]+Ax[1]*P[29]+Ax[2]*P[30];                               // dL0/dThe
-  Jac[ 4] = Ax[0]*P[35]+Ax[1]*P[36]+Ax[2]*P[37];                               // dL0/dCM
-  Jac[ 5] = Ay[0]*P[ 7]+Ay[1]*P[ 8]+Ay[2]*P[ 9];                               // dL1/dL0
-  Jac[ 6] = Ay[0]*P[14]+Ay[1]*P[15]+Ay[2]*P[16];                               // dL1/dL1
-  Jac[ 7] = Ay[0]*P[21]+Ay[1]*P[22]+Ay[2]*P[23];                               // dL1/dPhi
-  Jac[ 8] = Ay[0]*P[28]+Ay[1]*P[29]+Ay[2]*P[30];                               // dL1/dThe
-  Jac[ 9] = Ay[0]*P[35]+Ay[1]*P[36]+Ay[2]*P[37];                               // dL1/dCM
+  mutl3x5Helper(&Jac[0],Ax,&P[7]);
+  mutl3x5Helper(&Jac[5],Ay,&P[7]);
 }
 
 /////////////////////////////////////////////////////////////////////////////////
@@ -214,25 +244,17 @@ transformGlobalToDisc(const Amg::Transform3D&  T,
   // Jacobian production
   //
   double Ri = 1./par[0];
-  const double A0 =(RC*Ax[0]+RS*Ay[0])*Ri;
-  const double A1 =(RC*Ax[1]+RS*Ay[1])*Ri;
-  const double A2 =(RC*Ax[2]+RS*Ay[2])*Ri;
-  const double B0 =(RC*Ay[0]-RS*Ax[0])*(Ri=1./R2);
-  const double B1 =(RC*Ay[1]-RS*Ax[1])*Ri;
-  const double B2 =(RC*Ay[2]-RS*Ax[2])*Ri;
-
-  Jac[ 0] = A0*P[ 7]+A1*P[ 8]+A2*P[ 9];                                        // dL0/dL0
-  Jac[ 1] = A0*P[14]+A1*P[15]+A2*P[16];                                        // dL0/dL1
-  Jac[ 2] = A0*P[21]+A1*P[22]+A2*P[23];                                        // dL0/dPhi
-  Jac[ 3] = A0*P[28]+A1*P[29]+A2*P[30];                                        // dL0/dThe
-  Jac[ 4] = A0*P[35]+A1*P[36]+A2*P[37];                                        // dL0/dCM
-  Jac[ 5] = B0*P[ 7]+B1*P[ 8]+B2*P[ 9];                                        // dL1/dL0
-  Jac[ 6] = B0*P[14]+B1*P[15]+B2*P[16];                                        // dL1/dL1
-  Jac[ 7] = B0*P[21]+B1*P[22]+B2*P[23];                                        // dL1/dPhi
-  Jac[ 8] = B0*P[28]+B1*P[29]+B2*P[30];                                        // dL1/dThe
-  Jac[ 9] = B0*P[35]+B1*P[36]+B2*P[37];                                        // dL1/dCM
-}
 
+  const double Av[3] = { (RC * Ax[0] + RS * Ay[0]) * Ri,
+                         (RC * Ax[1] + RS * Ay[1]) * Ri,
+                         (RC * Ax[2] + RS * Ay[2]) * Ri };
+  const double Bv[3] = { (RC * Ay[0] - RS * Ax[0]) * (Ri = 1. / R2),
+                         (RC * Ay[1] - RS * Ax[1]) * Ri,
+                         (RC * Ay[2] - RS * Ax[2]) * Ri };
+
+  mutl3x5Helper(&Jac[0],Av,&P[7]);
+  mutl3x5Helper(&Jac[5],Bv,&P[7]);
+}
 /////////////////////////////////////////////////////////////////////////////////
 // Global position transformation to local Cylinder system coordinate
 /////////////////////////////////////////////////////////////////////////////////
@@ -280,20 +302,12 @@ transformGlobalToCylinder(const Amg::Transform3D&  T,
 
   // Jacobian production
   //
-  const double A0 =(RC*Ay[0]-RS*Ax[0])*(R=1./R);
-  const double A1 =(RC*Ay[1]-RS*Ax[1])* R;
-  const double A2 =(RC*Ay[2]-RS*Ax[2])* R;
-
-  Jac[ 0] = A0*P[ 7]+A1*P[ 8]+A2*P[ 9];                                        // dL0/dL0
-  Jac[ 1] = A0*P[14]+A1*P[15]+A2*P[16];                                        // dL0/dL1
-  Jac[ 2] = A0*P[21]+A1*P[22]+A2*P[23];                                        // dL0/dPhi
-  Jac[ 3] = A0*P[28]+A1*P[29]+A2*P[30];                                        // dL0/dThe
-  Jac[ 4] = A0*P[35]+A1*P[36]+A2*P[37];                                        // dL0/dCM
-  Jac[ 5] = Az[0]*P[ 7]+Az[1]*P[ 8]+Az[2]*P[ 9];                               // dL1/dL0
-  Jac[ 6] = Az[0]*P[14]+Az[1]*P[15]+Az[2]*P[16];                               // dL1/dL1
-  Jac[ 7] = Az[0]*P[21]+Az[1]*P[22]+Az[2]*P[23];                               // dL1/dPhi
-  Jac[ 8] = Az[0]*P[28]+Az[1]*P[29]+Az[2]*P[30];                               // dL1/dThe
-  Jac[ 9] = Az[0]*P[35]+Az[1]*P[36]+Az[2]*P[37];                               // dL1/dP4
+  const double Av[3] = { (RC * Ay[0] - RS * Ax[0]) * (R = 1. / R),
+                         (RC * Ay[1] - RS * Ax[1]) * R,
+                         (RC * Ay[2] - RS * Ax[2]) * R };
+
+  mutl3x5Helper(&Jac[0], Av, &P[7]);
+  mutl3x5Helper(&Jac[5], Az, &P[7]);
 }
 
 /////////////////////////////////////////////////////////////////////////////////
@@ -344,16 +358,9 @@ transformGlobalToLine(const Amg::Transform3D&  T,
 
   // Jacobian production
   //
-  Jac[ 0] = Bx  *P[ 7]+By  *P[ 8]+Bz  *P[ 9];       // dL0/dL0
-  Jac[ 1] = Bx  *P[14]+By  *P[15]+Bz  *P[16];       // dL0/dL1
-  Jac[ 2] = Bx  *P[21]+By  *P[22]+Bz  *P[23];       // dL0/dPhi
-  Jac[ 3] = Bx  *P[28]+By  *P[29]+Bz  *P[30];       // dL0/dThe
-  Jac[ 4] = Bx  *P[35]+By  *P[36]+Bz  *P[37];       // dL0/dCM
-  Jac[ 5] = A[0]*P[ 7]+A[1]*P[ 8]+A[2]*P[ 9];       // dL1/dL0
-  Jac[ 6] = A[0]*P[14]+A[1]*P[15]+A[2]*P[16];       // dL1/dL1
-  Jac[ 7] = A[0]*P[21]+A[1]*P[22]+A[2]*P[23];       // dL1/dPhi
-  Jac[ 8] = A[0]*P[28]+A[1]*P[29]+A[2]*P[30];       // dL1/dThe
-  Jac[ 9] = A[0]*P[35]+A[1]*P[36]+A[2]*P[37];       // dL1/dCM
+  const double B[3]={Bx,By,Bz};
+  mutl3x5Helper(&Jac[0],B,&P[7]);
+  mutl3x5Helper(&Jac[5],A,&P[7]);
 }
 
 /////////////////////////////////////////////////////////////////////////////////
@@ -940,7 +947,7 @@ std::pair<double,int> Trk::RungeKuttaUtils::stepEstimator
     }
     */
   }
-  return std::make_pair(Sm,N);
+  return std::make_pair(Sm, N);
 }
 
 /////////////////////////////////////////////////////////////////////////////////
-- 
GitLab


From f8f3d4412dc13a368afdcd83c30e62f1248e3292 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Mon, 5 Oct 2020 02:07:21 +0200
Subject: [PATCH 170/403] tidy a bit the header file

---
 .../TrkExUtils/TrkExUtils/RungeKuttaUtils.h   | 21 +++++++++++--------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/Tracking/TrkExtrapolation/TrkExUtils/TrkExUtils/RungeKuttaUtils.h b/Tracking/TrkExtrapolation/TrkExUtils/TrkExUtils/RungeKuttaUtils.h
index 940308372258..7efcf8e09289 100755
--- a/Tracking/TrkExtrapolation/TrkExUtils/TrkExUtils/RungeKuttaUtils.h
+++ b/Tracking/TrkExtrapolation/TrkExUtils/TrkExUtils/RungeKuttaUtils.h
@@ -122,16 +122,25 @@ namespace RungeKuttaUtils
   /////////////////////////////////////////////////////////////////////////////////
 
   bool transformLocalToGlobal(bool, const Trk::TrackParameters&, double*);
-
   bool transformLocalToGlobal(bool, const Trk::NeutralParameters&, double*);
 
+  /////////////////////////////////////////////////////////////////////////////////
+  // Transformations from local to local system coordinates
+  /////////////////////////////////////////////////////////////////////////////////
+
+  bool
+  transformLocalToGlobal(bool,
+                         const Trk::Surface*,
+                         const double* ATH_RESTRICT,
+                         double* ATH_RESTRICT);
+
   /////////////////////////////////////////////////////////////////////////////////
   // Transformations from local to global system coordinates
   // for Trk::PatternTrackParameters
   /////////////////////////////////////////////////////////////////////////////////
 
   bool transformLocalToGlobal(bool, const Trk::PatternTrackParameters&, double*);
-
+  
   /////////////////////////////////////////////////////////////////////////////////
   // Transformations from global to local system coordinates
   /////////////////////////////////////////////////////////////////////////////////
@@ -142,9 +151,7 @@ namespace RungeKuttaUtils
                               double* ATH_RESTRICT,
                               double* ATH_RESTRICT,
                               double* ATH_RESTRICT);
-  /////////////////////////////////////////////////////////////////////////////////
-
-  /////////////////////////////////////////////////////////////////////////////////
+  ////////////////////////////////////////////////////////////////////////////////
   // Covariance matrix production for Trk::TrackParameters
   /////////////////////////////////////////////////////////////////////////////////
 
@@ -169,17 +176,13 @@ namespace RungeKuttaUtils
   /////////////////////////////////////////////////////////////////////////////////
 
   void jacobianTransformCurvilinearToLocal(const Trk::TrackParameters&, double*);
-
   void jacobianTransformCurvilinearToLocal(const Trk::PatternTrackParameters&, double*);
-
   void jacobianTransformCurvilinearToLocal(double* ATH_RESTRICT, const Trk::Surface*, double* ATH_RESTRICT);
-
   void jacobianTransformCurvilinearToDisc(double* ATH_RESTRICT, double* ATH_RESTRICT);
   void jacobianTransformCurvilinearToPlane(double* ATH_RESTRICT, double* ATH_RESTRICT);
   void jacobianTransformCurvilinearToCylinder(double* ATH_RESTRICT, double* ATH_RESTRICT);
   void jacobianTransformCurvilinearToStraightLine(const double* ATH_RESTRICT, double* ATH_RESTRICT);
 
-  bool transformLocalToGlobal(bool, const Trk::Surface*, const double* ATH_RESTRICT, double* ATH_RESTRICT);
 }
 }
 
-- 
GitLab


From 8f937595679dbbd774b2befb74cf623dd0979532 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Mon, 5 Oct 2020 05:39:19 +0200
Subject: [PATCH 171/403]  add Helper for doing the 1x3 * 3x5 = 1x5 calculation

---
 .../TrkExUtils/TrkExUtils/RungeKuttaUtils.h   |  2 +-
 .../TrkExUtils/src/RungeKuttaUtils.cxx        | 46 ++++++-------------
 2 files changed, 15 insertions(+), 33 deletions(-)

diff --git a/Tracking/TrkExtrapolation/TrkExUtils/TrkExUtils/RungeKuttaUtils.h b/Tracking/TrkExtrapolation/TrkExUtils/TrkExUtils/RungeKuttaUtils.h
index 7efcf8e09289..d87bbb85502d 100755
--- a/Tracking/TrkExtrapolation/TrkExUtils/TrkExUtils/RungeKuttaUtils.h
+++ b/Tracking/TrkExtrapolation/TrkExUtils/TrkExUtils/RungeKuttaUtils.h
@@ -155,7 +155,7 @@ namespace RungeKuttaUtils
   // Covariance matrix production for Trk::TrackParameters
   /////////////////////////////////////////////////////////////////////////////////
 
-  AmgSymMatrix(5)* newCovarianceMatrix(const double*, const AmgSymMatrix(5) &);
+  AmgSymMatrix(5)* newCovarianceMatrix(const double* ATH_RESTRICT, const AmgSymMatrix(5) &);
 
   /////////////////////////////////////////////////////////////////////////////////
   // Transformations from curvilinear to global system coordinates
diff --git a/Tracking/TrkExtrapolation/TrkExUtils/src/RungeKuttaUtils.cxx b/Tracking/TrkExtrapolation/TrkExUtils/src/RungeKuttaUtils.cxx
index d7fdc567f87f..b9579057e6ce 100755
--- a/Tracking/TrkExtrapolation/TrkExUtils/src/RungeKuttaUtils.cxx
+++ b/Tracking/TrkExtrapolation/TrkExUtils/src/RungeKuttaUtils.cxx
@@ -188,14 +188,9 @@ transformGlobalToPlane(const Amg::Transform3D&  T,
   if(A!=0.) A=1./A;
   S[0]*=A; S[1]*=A; S[2]*=A;
 
-  const double s0 = P[ 7]*S[0]+P[ 8]*S[1]+P[ 9]*S[2];
-  const double s1 = P[14]*S[0]+P[15]*S[1]+P[16]*S[2];
-  const double s2 = P[21]*S[0]+P[22]*S[1]+P[23]*S[2];
-  const double s3 = P[28]*S[0]+P[29]*S[1]+P[30]*S[2];
-  const double s4 = P[35]*S[0]+P[36]*S[1]+P[37]*S[2];
-
-  globalToLocalVecHelper(P, s0, s1, s2, s3, s4);
-
+  double s[5]={};
+  mutl3x5Helper(s,S,&P[7]);
+  globalToLocalVecHelper(P, s[0], s[1], s[2], s[3], s[4]);
   // Jacobian production
   mutl3x5Helper(&Jac[0],Ax,&P[7]);
   mutl3x5Helper(&Jac[5],Ay,&P[7]);
@@ -233,14 +228,9 @@ transformGlobalToDisc(const Amg::Transform3D&  T,
   if(A!=0.) A=1./A;
   S[0]*=A; S[1]*=A; S[2]*=A;
 
-  const double s0 = P[ 7]*S[0]+P[ 8]*S[1]+P[ 9]*S[2];
-  const double s1 = P[14]*S[0]+P[15]*S[1]+P[16]*S[2];
-  const double s2 = P[21]*S[0]+P[22]*S[1]+P[23]*S[2];
-  const double s3 = P[28]*S[0]+P[29]*S[1]+P[30]*S[2];
-  const double s4 = P[35]*S[0]+P[36]*S[1]+P[37]*S[2];
-
-  globalToLocalVecHelper(P, s0, s1, s2, s3, s4);
-
+  double s[5]={};
+  mutl3x5Helper(s,S,&P[7]);
+  globalToLocalVecHelper(P, s[0], s[1], s[2], s[3], s[4]);
   // Jacobian production
   //
   double Ri = 1./par[0];
@@ -292,14 +282,10 @@ transformGlobalToCylinder(const Amg::Transform3D&  T,
   const double az = P[5]-Az[2]*C; z-=(B*Az[2]);
   double A  =(ax*x+ay*y+az*z);  if(A!=0.) A=1./A; x*=A; y*=A; z*=A;
 
-  const double s0 = P[ 7]*x+P[ 8]*y+P[ 9]*z;
-  const double s1 = P[14]*x+P[15]*y+P[16]*z;
-  const double s2 = P[21]*x+P[22]*y+P[23]*z;
-  const double s3 = P[28]*x+P[29]*y+P[30]*z;
-  const double s4 = P[35]*x+P[36]*y+P[37]*z;
-
-  globalToLocalVecHelper(P, s0, s1, s2, s3, s4);
-
+  const double S[3] = { x, y, z };
+  double s[5] = {};
+  mutl3x5Helper(s, S, &P[7]);
+  globalToLocalVecHelper(P, s[0], s[1], s[2], s[3], s[4]);
   // Jacobian production
   //
   const double Av[3] = { (RC * Ay[0] - RS * Ax[0]) * (R = 1. / R),
@@ -955,7 +941,7 @@ std::pair<double,int> Trk::RungeKuttaUtils::stepEstimator
 /////////////////////////////////////////////////////////////////////////////////
 
 AmgSymMatrix(5) * Trk::RungeKuttaUtils::newCovarianceMatrix(
-                    const double* J,
+                    const double* ATH_RESTRICT J,
                     const AmgSymMatrix(5) & M)
 {
   AmgSymMatrix(5)* nM = new AmgSymMatrix(5);
@@ -1095,13 +1081,9 @@ void Trk::RungeKuttaUtils::transformGlobalToCurvilinear
   if(A!=0.) A=1./A;
   S[0]*=A; S[1]*=A; S[2]*=A;
 
-  const double s0 = P[ 7]*S[0]+P[ 8]*S[1]+P[ 9]*S[2];
-  const double s1 = P[14]*S[0]+P[15]*S[1]+P[16]*S[2];
-  const double s2 = P[21]*S[0]+P[22]*S[1]+P[23]*S[2];
-  const double s3 = P[28]*S[0]+P[29]*S[1]+P[30]*S[2];
-  const double s4 = P[35]*S[0]+P[36]*S[1]+P[37]*S[2];
-
-  globalToLocalVecHelper(P, s0, s1, s2, s3, s4);
+  double s[5]={};
+  mutl3x5Helper(s,S,&P[7]);
+  globalToLocalVecHelper(P, s[0], s[1], s[2], s[3], s[4]);
 
   double P3,P4,C = P[3]*P[3]+P[4]*P[4];
   if(C > 1.e-20) {C= 1./C ; P3 = P[3]*C; P4 =P[4]*C; C =-sqrt(C);}
-- 
GitLab


From abbcf80b1e1e4059a70ea6bdfa9fcdb5db0db609 Mon Sep 17 00:00:00 2001
From: Moe Wakida <wakida@hepl.phys.nagoya-u.ac.jp>
Date: Mon, 5 Oct 2020 08:46:47 +0200
Subject: [PATCH 172/403] Change for non-specific chain plots

---
 .../python/EFMuonMonConfig.py                 | 16 +++----
 .../TrigMuonMonitoringMT/src/EFMuonMonMT.cxx  | 48 +++++++++----------
 .../src/MuonMatchingTool.cxx                  |  6 +--
 .../src/MuonMatchingTool.h                    |  8 ++++
 4 files changed, 43 insertions(+), 35 deletions(-)

diff --git a/Trigger/TrigMonitoring/TrigMuonMonitoringMT/python/EFMuonMonConfig.py b/Trigger/TrigMonitoring/TrigMuonMonitoringMT/python/EFMuonMonConfig.py
index cfa4f9b2f381..aa18add7adfc 100644
--- a/Trigger/TrigMonitoring/TrigMuonMonitoringMT/python/EFMuonMonConfig.py
+++ b/Trigger/TrigMonitoring/TrigMuonMonitoringMT/python/EFMuonMonConfig.py
@@ -41,37 +41,37 @@ def EFMuonMonConfig(helper):
 
         # basic EDM variables
         # EFSA
-        histGroup.defineHistogram(chain+'_MSTrack_Pt;EFSA_Pt',
+        histGroup.defineHistogram(chain+'_EFSA_Pt;EFSA_Pt',
                                   title='EFSA Pt '+chain+';p_{T} [GeV];Events', 
                                   type='TH1F', path='',xbins=210,xmin=-105.,xmax=105.)
 
-        histGroup.defineHistogram(chain+'_MSTrack_Eta;EFSA_Eta',
+        histGroup.defineHistogram(chain+'_EFSA_Eta;EFSA_Eta',
                                   title='EFSA Eta '+chain+';#eta;Events', 
                                   type='TH1F', path='',xbins=108,xmin=-2.7,xmax=2.7)
 
-        histGroup.defineHistogram(chain+'_MSTrack_Phi;EFSA_Phi',
+        histGroup.defineHistogram(chain+'_EFSA_Phi;EFSA_Phi',
                                   title='EFSA Phi '+chain+';#phi;Events', 
                                   type='TH1F', path='',xbins=96,xmin=-ROOT.TMath.Pi(),xmax=ROOT.TMath.Pi())
 
-        histGroup.defineHistogram(chain+'_MSTrack_Eta,'+chain+'_MSTrack_Phi;EFSA_Eta_vs_Phi',
+        histGroup.defineHistogram(chain+'_EFSA_Eta,'+chain+'_EFSA_Phi;EFSA_Eta_vs_Phi',
                                   title='EFSA Eta vs Phi '+chain+';#eta;#phi', 
                                   type='TH2F', path='',xbins=108,xmin=-2.7,xmax=2.7, ybins=96,ymin=-ROOT.TMath.Pi(),ymax=ROOT.TMath.Pi())
 
 
         # EFCB
-        histGroup.defineHistogram(chain+'_CBTrack_Pt;EFCB_Pt',
+        histGroup.defineHistogram(chain+'_EFCB_Pt;EFCB_Pt',
                                   title='EFCB Pt '+chain+';p_{T} [GeV];Events', 
                                   type='TH1F', path='',xbins=210,xmin=-105.,xmax=105.)
 
-        histGroup.defineHistogram(chain+'_CBTrack_Eta;EFCB_Eta',
+        histGroup.defineHistogram(chain+'_EFCB_Eta;EFCB_Eta',
                                   title='EFCB Eta '+chain+';#eta;Events', 
                                   type='TH1F', path='',xbins=108,xmin=-2.7,xmax=2.7)
 
-        histGroup.defineHistogram(chain+'_CBTrack_Phi;EFCB_Phi',
+        histGroup.defineHistogram(chain+'_EFCB_Phi;EFCB_Phi',
                                   title='EFCB Phi '+chain+';#phi;Events', 
                                   type='TH1F', path='',xbins=96,xmin=-ROOT.TMath.Pi(),xmax=ROOT.TMath.Pi())
 
-        histGroup.defineHistogram(chain+'_CBTrack_Eta,'+chain+'_CBTrack_Phi;EFCB_Eta_vs_Phi',
+        histGroup.defineHistogram(chain+'_EFCB_Eta,'+chain+'_EFCB_Phi;EFCB_Eta_vs_Phi',
                                   title='EFCB Eta vs Phi '+chain+';#eta;#phi', 
                                   type='TH2F', path='',xbins=108,xmin=-2.7,xmax=2.7, ybins=96,ymin=-ROOT.TMath.Pi(),ymax=ROOT.TMath.Pi())
 
diff --git a/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/EFMuonMonMT.cxx b/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/EFMuonMonMT.cxx
index 683b35e95e70..3e6e8cbf7883 100644
--- a/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/EFMuonMonMT.cxx
+++ b/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/EFMuonMonMT.cxx
@@ -35,18 +35,18 @@ StatusCode EFMuonMonMT :: fillVariablesPerChain(const EventContext &ctx, const s
 
   for (const TrigCompositeUtils::LinkInfo<xAOD::MuonContainer>& muSALinkInfo : featureContSA) {
     ATH_CHECK( muSALinkInfo.isValid() );
-    auto MSTrackPt = Monitored::Scalar<float>(chain+"_MSTrack_Pt", -999.);
-    auto MSTrackEta = Monitored::Scalar<float>(chain+"_MSTrack_Eta", -999.);
-    auto MSTrackPhi = Monitored::Scalar<float>(chain+"_MSTrack_Phi", -999.);
-
-    const xAOD::TrackParticle* MatchedMSTrack = m_matchTool->SearchEFTrack(ctx, muSALinkInfo, m_MStrackContainerKey);
-    if(MatchedMSTrack){
-      MSTrackPt = MatchedMSTrack->pt()/1e3 * MatchedMSTrack->charge();
-      MSTrackEta = MatchedMSTrack->eta();
-      MSTrackPhi = MatchedMSTrack->phi(); 
-    }
+    const ElementLink<xAOD::MuonContainer> muSAEL = muSALinkInfo.link;
+    if ( (*muSAEL)->muonType() != xAOD::Muon::MuonType::MuonStandAlone ) continue;
+
+    auto EFSAPt = Monitored::Scalar<float>(chain+"_EFSA_Pt", -999.);
+    auto EFSAEta = Monitored::Scalar<float>(chain+"_EFSA_Eta", -999.);
+    auto EFSAPhi = Monitored::Scalar<float>(chain+"_EFSA_Phi", -999.);
+
+    EFSAPt = (*muSAEL)->pt()/1e3 * (*muSAEL)->charge();
+    EFSAEta = (*muSAEL)->eta();
+    EFSAPhi = (*muSAEL)->phi(); 
 
-    fill(m_group+"_"+chain, MSTrackPt, MSTrackEta, MSTrackPhi);
+    fill(m_group+"_"+chain, EFSAPt, EFSAEta, EFSAPhi);
   }
 
 
@@ -55,18 +55,18 @@ StatusCode EFMuonMonMT :: fillVariablesPerChain(const EventContext &ctx, const s
 
   for (const TrigCompositeUtils::LinkInfo<xAOD::MuonContainer>& muCBLinkInfo : featureContCB) {
     ATH_CHECK( muCBLinkInfo.isValid() );
-    auto CBTrackPt = Monitored::Scalar<float>(chain+"_CBTrack_Pt", -999.);
-    auto CBTrackEta = Monitored::Scalar<float>(chain+"_CBTrack_Eta", -999.);
-    auto CBTrackPhi = Monitored::Scalar<float>(chain+"_CBTrack_Phi", -999.);
-
-    const xAOD::TrackParticle* MatchedCBTrack = m_matchTool->SearchEFTrack(ctx, muCBLinkInfo, m_CBtrackContainerKey);
-    if(MatchedCBTrack){
-      CBTrackPt = MatchedCBTrack->pt()/1e3 * MatchedCBTrack->charge();
-      CBTrackEta = MatchedCBTrack->eta();
-      CBTrackPhi = MatchedCBTrack->phi(); 
-    }
+    const ElementLink<xAOD::MuonContainer> muCBEL = muCBLinkInfo.link;
+    if ( (*muCBEL)->muonType() != xAOD::Muon::MuonType::Combined ) continue;
+
+    auto EFCBPt = Monitored::Scalar<float>(chain+"_EFCB_Pt", -999.);
+    auto EFCBEta = Monitored::Scalar<float>(chain+"_EFCB_Eta", -999.);
+    auto EFCBPhi = Monitored::Scalar<float>(chain+"_EFCB_Phi", -999.);
+
+    EFCBPt = (*muCBEL)->pt()/1e3 * (*muCBEL)->charge();
+    EFCBEta = (*muCBEL)->eta();
+    EFCBPhi = (*muCBEL)->phi(); 
 
-    fill(m_group+"_"+chain, CBTrackPt, CBTrackEta, CBTrackPhi);
+    fill(m_group+"_"+chain, EFCBPt, EFCBEta, EFCBPhi);
   }
 
 
@@ -283,8 +283,8 @@ StatusCode EFMuonMonMT :: fillVariables(const EventContext &ctx) const {
 
   ATH_MSG_DEBUG ("Filling histograms for " << name() << "...");
 
-  ATH_CHECK( fillVariableEtaPhi<xAOD::Muon>(ctx, m_EFSAMuonContainerKey, "EFSA", &MuonMatchingTool::PosForMatchSATrack));
-  ATH_CHECK( fillVariableEtaPhi<xAOD::Muon>(ctx, m_EFCBMuonContainerKey, "EFCB", &MuonMatchingTool::PosForMatchCBTrack));
+  ATH_CHECK( fillVariableEtaPhi<xAOD::Muon>(ctx, m_EFSAMuonContainerKey, "EFSA", &MuonMatchingTool::trigPosForMatchSATrack));
+  ATH_CHECK( fillVariableEtaPhi<xAOD::Muon>(ctx, m_EFCBMuonContainerKey, "EFCB", &MuonMatchingTool::trigPosForMatchCBTrack));
 
   return StatusCode::SUCCESS;
 
diff --git a/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/MuonMatchingTool.cxx b/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/MuonMatchingTool.cxx
index 390ca20f0cc8..45f548c21739 100644
--- a/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/MuonMatchingTool.cxx
+++ b/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/MuonMatchingTool.cxx
@@ -106,7 +106,7 @@ const xAOD::Muon* MuonMatchingTool :: matchEFSAReadHandle( const EventContext& c
     MuonTrack = mu->trackParticle(type);
     if (MuonTrack) break;
   }
-  return MuonTrack ? matchReadHandle<xAOD::Muon>( MuonTrack, m_EFreqdR, m_EFSAMuonContainerKey, ctx, &MuonMatchingTool::PosForMatchSATrack) : nullptr;
+  return MuonTrack ? matchReadHandle<xAOD::Muon>( MuonTrack, m_EFreqdR, m_EFSAMuonContainerKey, ctx, &MuonMatchingTool::trigPosForMatchSATrack) : nullptr;
 }
 
 
@@ -127,7 +127,7 @@ const TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> MuonMatchingTool :: matc
 const xAOD::Muon* MuonMatchingTool :: matchEFCBReadHandle( const EventContext& ctx, const xAOD::Muon *mu) const {
   ATH_MSG_DEBUG("MuonMonitoring::matchEFCBReadHandle()");
   const xAOD::TrackParticle* MuonTrack = mu->trackParticle(xAOD::Muon::TrackParticleType::Primary);
-  return MuonTrack ? matchReadHandle<xAOD::Muon>( MuonTrack, m_EFreqdR, m_EFCBMuonContainerKey, ctx, &MuonMatchingTool::PosForMatchCBTrack) : nullptr;
+  return MuonTrack ? matchReadHandle<xAOD::Muon>( MuonTrack, m_EFreqdR, m_EFCBMuonContainerKey, ctx, &MuonMatchingTool::trigPosForMatchCBTrack) : nullptr;
 }
 
 
@@ -173,7 +173,7 @@ const TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> MuonMatchingTool :: matc
   bool pass = false;
   TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> muonLinkInfo;
   const xAOD::TrackParticle* MuonTrack = mu->trackParticle(xAOD::Muon::TrackParticleType::Primary);
-  return MuonTrack ? matchLinkInfo<xAOD::Muon>(MuonTrack, trig, m_EFreqdR, pass, "HLT_MuonsIso", &MuonMatchingTool::PosForMatchCBTrack) : muonLinkInfo;
+  return MuonTrack ? matchLinkInfo<xAOD::Muon>(MuonTrack, trig, m_EFreqdR, pass, "HLT_MuonsIso", &MuonMatchingTool::trigPosForMatchCBTrack) : muonLinkInfo;
 }
 
 
diff --git a/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/MuonMatchingTool.h b/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/MuonMatchingTool.h
index fa776b174fe1..1f35f6c17170 100644
--- a/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/MuonMatchingTool.h
+++ b/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/MuonMatchingTool.h
@@ -170,8 +170,16 @@ class MuonMatchingTool : public AthAlgTool {
   const TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> matchEFIsoLinkInfo( const xAOD::Muon *mu, std::string trig) const;
 
 
+  /**
+   * @brief Function that searches for an EF muon track (e.g. ExtrapolatedMuonSpectrometerTrackParticle, CombinedTrackParticle) matched to a EF muon.
+   * @param ctx Reference to the @c EventContext needed for accessing the @c TrackParticle container.
+   * @param muLinkInfo LinkInfo of EF muon.
+   * @param ReadHandleKey of TrackParticle container.
+   * @return Pointer to the matched TrackParticle. This is @c nullpt rwhen there is no TrackParticle found.
+   */
   const xAOD::TrackParticle* SearchEFTrack(const EventContext &ctx, const TrigCompositeUtils::LinkInfo<xAOD::MuonContainer>& muLinkInfo, SG::ReadHandleKey<xAOD::TrackParticleContainer> ReadHandleKey) const;
 
+
   /**
    * @brief Function that searches for an offline muon matched to L2SA muon
    * @param ctx Reference to the @c EventContext needed for accessing the @c Muons container.
-- 
GitLab


From c2877a17f9038ba0cb75ad895148929604ad5ec3 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Mon, 5 Oct 2020 09:31:33 +0200
Subject: [PATCH 173/403] PyUtils: Improvements for cmake_depends

Several improvements for `acmd.py cmake depends`:
- Dependencies of an external library where not displayed correctly.
  Also warn the user in case the `--external` option is not used.
- Improve filtering of custom targets. Instead of using a hard-coded
  list, parse the graphiz legend and use the target types for filtering.
- Add an `--all` option to disable any filtering of custom targets.
- Add a testing script. It's not run as a unit test because the output
  of the script would of course change from nightly to nightly. But it
  can be used as a manual test script to find regresssions.
---
 Tools/PyUtils/python/scripts/cmake_depends.py | 93 ++++++++++---------
 Tools/PyUtils/test/test_cmake_depends.sh      | 26 ++++++
 2 files changed, 75 insertions(+), 44 deletions(-)
 create mode 100755 Tools/PyUtils/test/test_cmake_depends.sh

diff --git a/Tools/PyUtils/python/scripts/cmake_depends.py b/Tools/PyUtils/python/scripts/cmake_depends.py
index 30b92b9a377a..3a9c6d658d64 100644
--- a/Tools/PyUtils/python/scripts/cmake_depends.py
+++ b/Tools/PyUtils/python/scripts/cmake_depends.py
@@ -9,29 +9,21 @@ name, the dependencies are printed as a plain list or DOT graph. The recursion
 depth is configurable.
 """
 
-import sys
 import os
 import re
 from collections import deque
 import PyUtils.acmdlib as acmdlib
 import argparse
 
-# Hack until we switched to LCG>=97a:
+# Hack until atlasexternals!747 is deployed:
 try:
    import pygraphviz
 except ImportError:
-   if sys.version_info[0]==2:
-      sys.path.append('/cvmfs/sft.cern.ch/lcg/releases/LCG_97a/pygraphviz/1.5/'+os.getenv('BINARY_TAG')+'/lib/python2.7/site-packages/')
-   else:
-      sys.path.append('/cvmfs/sft.cern.ch/lcg/releases/LCG_97apython3/pygraphviz/1.5/'+os.getenv('BINARY_TAG')+'/lib/python3.7/site-packages')
+   import sys
+   sys.path.append('/cvmfs/sft.cern.ch/lcg/releases/LCG_98python3/pygraphviz/1.5/'+os.getenv('BINARY_TAG')+'/lib/python3.7/site-packages')
    import pygraphviz
 
 
-# Targets ending in those strings are ignored:
-custom_targets = ['Pkg', 'PkgPrivate', 'ClidGen', 'ComponentsList', 'Configurables',
-                  'JobOptInstall', 'PythonBytecodeInstall', 'PythonInstall']
-
-
 def read_package_list(package_file):
    """Read packages.txt as a source for the full package path"""
 
@@ -53,17 +45,6 @@ def externals_name(lib):
       return os.path.basename(lib)
 
 
-def ignore_target(t):
-   """Check if target should be ignored"""
-   if t.startswith('__MUST_NOT_LINK_AGAINST') or t.startswith('-'):
-      return True
-
-   for s in custom_targets:
-      if t.endswith(s): return True
-
-   return False
-
-
 def lrstrip(s, prefix, postfix):
    """Strip `prefix` and `postfix` from string `s`"""
    if s.startswith(prefix): s = s[len(prefix):]
@@ -92,8 +73,6 @@ def traverse(graph, root, reverse=False, maxdepth=None, nodegetter=lambda n:n):
 
       if node not in visited_nodes:
          visited_nodes.add(node)
-         if ignore_target(node.attr['label']):
-            continue
 
          # Add edges to neighbors into queue:
          if maxdepth is None or level < maxdepth:
@@ -130,17 +109,20 @@ class AthGraph:
       # Read dot file:
       self.graph = pygraphviz.AGraph(dotfile)
 
+      # Build dictionary for node types:
+      legend = self.graph.get_subgraph('clusterLegend')
+      self.types = { n.attr['label'] : n.attr['shape'] for n in legend.iternodes() }
+
       # Build dictionary for node names:
       self.node = { n.attr['label'] : n.get_name() for n in self.graph.iternodes() }
 
       # Extract package dependencies:
       for e in self.graph.iteredges():
          p = e[0].attr['label']
-
-         # Decorate target with package name
+         # Decorate target with package name:
          if p.startswith('Package_'):
             pkg = lrstrip(p, 'Package_', '_tests')
-            e[1].attr['package'] = package_paths.get(pkg,pkg)
+            e[0].attr['package'] = e[1].attr['package'] = package_paths.get(pkg,pkg)
 
       # Assign "package" names to externals if possible:
       external_nodes = filter(lambda n : 'package' not in n.attr.keys(),
@@ -149,17 +131,18 @@ class AthGraph:
          name = externals_name(n.attr['label'])
          n.attr['package'] = name.split('::')[0]
          n.attr['label'] = name
-         n.attr['external'] = True
+         n.attr['external'] = 'yes'
 
    def get_node(self, label):
       """Return graph node for label/target"""
       return self.graph.get_node(self.node[label])
 
-   def get_labels(self, regex):
-      """Return labels matching regex"""
-      r = re.compile(regex)
-      return [l for l in self.node if r.match(l)]
-
+   def ignore_target(self, node):
+      """Check if target should be ignored"""
+      label = node.attr['label']
+      return True if (label.startswith('__') or   # internal targets
+                      label.startswith('-') or    # compiler flags (e.g. -pthread)
+                      node.attr['shape']==self.types['Custom Target']) else False
 
 #
 # Main function and command line arguments
@@ -189,6 +172,9 @@ class AthGraph:
 @acmdlib.argument('--regex', action='store_true',
                   help='treat NAME as regular expression')
 
+@acmdlib.argument('--all', action='store_true',
+                  help='do not apply any target filter (e.g. custom targets)')
+
 @acmdlib.argument('-d', '--dot', action='store_true',
                   help='print DOT graph')
 
@@ -224,25 +210,44 @@ def main(args):
 
    # Helper for graph traversal below:
    def getnode(node):
-      if args.externals or 'external' not in node.attr.keys():
+      if not args.all and d.ignore_target(node): return None
+      if args.externals or not node.attr['external']:
          a = 'label' if args.target else 'package'
          return node.attr[a]
 
    graph = pygraphviz.AGraph(name='AthGraph', directed=True)
    for p in args.names:
-      # In package mode construct relevant target:
-      target = p if args.target else 'Package_'+p.split('/')[-1]
-      targets = d.get_labels(target) if args.regex else [target]
+      target = p.split('/')[-1]  # in case of full package path
+
+      # With regex, find all matching targets:
+      if args.regex:
+         r = re.compile(target)
+         targets = [getnode(n) for n in d.graph.iternodes() if r.match(n.attr['label'])]
+         targets = list(filter(lambda t : t is not None, targets))
+      else:
+         targets = [target]
 
+      # Find the nodes from which graph traversal starts:
       sources = []
       for l in targets:
-         # To find clients of a package means finding clients of the targets
-         # within that package. First find all targets within the package:
-         if args.clients and not args.target:
-            sources.extend([b for a,b in traverse(d.graph, d.get_node(l), maxdepth=1)])
-         else:
-            sources.extend([d.get_node(l)])
-
+         if not args.target:
+            l = 'Package_'+l
+         try:
+            if d.get_node(l).attr['external'] and not args.externals:
+               print(f"{l} is an external target. Run with -e/--externals.")
+               return 1
+
+            # To find clients of a package means finding clients of the targets
+            # within that package. First find all targets within the package:
+            if args.clients and not args.target:
+               sources.extend([b for a,b in traverse(d.graph, d.get_node(l), maxdepth=1)])
+            else:
+               sources.extend([d.get_node(l)])
+         except KeyError:
+            print(f"Target with name {l} does not exist.")
+            return 1
+
+      # Extract the dependency subgraph:
       g = subgraph(d.graph, sources, reverse=args.clients,
                    maxdepth=args.recursive, nodegetter=getnode)
 
diff --git a/Tools/PyUtils/test/test_cmake_depends.sh b/Tools/PyUtils/test/test_cmake_depends.sh
new file mode 100755
index 000000000000..df9b4df251a8
--- /dev/null
+++ b/Tools/PyUtils/test/test_cmake_depends.sh
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+#
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+#
+# Test for cmake_depends.py.
+# Run this script with/without changes and diff output.
+#
+
+# Dependencies:
+cmds=("acmd.py cmake depends IOVDbSvc --long")
+cmds+=("acmd.py cmake depends xAODEventInfo --dot")
+cmds+=("acmd.py cmake depends xAODEventInfo --recursive --dot")
+cmds+=("acmd.py cmake depends xAODEventInfo --regex --dot")
+cmds+=("acmd.py cmake depends xAODEventInfo --recursive --regex --dot")
+# Clients:
+cmds+=("acmd.py cmake depends LArReadoutGeometry --clients --dot")
+cmds+=("acmd.py cmake depends LArReadoutGeometry --clients --target --dot")
+cmds+=("acmd.py cmake depends IOVDbDataModel --clients --recursive --dot")
+# Test of an external library:
+cmds+=("acmd.py cmake depends ActsCore --clients --target --recursive --external --dot")
+cmds+=("acmd.py cmake depends ActsCore --clients --target --recursive")
+
+for c in "${cmds[@]}"; do
+   echo "${c}"
+   eval "${c}"
+done
-- 
GitLab


From 053081657203d978224338c057096f83cce62d37 Mon Sep 17 00:00:00 2001
From: Maximilian Goblirsch-Kolb <goblirsc@cern.ch>
Date: Mon, 5 Oct 2020 10:08:44 +0200
Subject: [PATCH 174/403] update trigger ref file

---
 .../share/ref_RDOtoRDOTrig_v1Dev_build.ref    | 50 +++++++++----------
 1 file changed, 25 insertions(+), 25 deletions(-)

diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
index 009533aecf69..36ba9cc1a267 100644
--- a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
@@ -12,7 +12,7 @@ TrigSignatureMoniMT                                 INFO -- #2518246928 Events
 TrigSignatureMoniMT                                 INFO -- #2518246928 Features                             0          0          0          0          0          0          0          0          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_2e17_etcut_L12EM15VH #3136730292
 TrigSignatureMoniMT                                 INFO -- #3136730292 Events         2          2          2          2          2          -          -          -          -          -          -          -          -          -          -          2
-TrigSignatureMoniMT                                 INFO -- #3136730292 Features                             12         296        14         -          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #3136730292 Features                             12         294        14         -          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_2e17_lhvloose_L12EM15VH #2280638160
 TrigSignatureMoniMT                                 INFO -- #2280638160 Events         2          2          2          0          0          0          -          -          -          -          -          -          -          -          -          0
 TrigSignatureMoniMT                                 INFO -- #2280638160 Features                             2          0          0          0          -          -          -          -          -          -          -          -          -
@@ -24,7 +24,7 @@ TrigSignatureMoniMT                                 INFO -- #1796849979 Events
 TrigSignatureMoniMT                                 INFO -- #1796849979 Features                             2          0          0          0          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_2e3_etcut_L12EM3 #2613484113
 TrigSignatureMoniMT                                 INFO -- #2613484113 Events         20         20         20         20         20         -          -          -          -          -          -          -          -          -          -          20
-TrigSignatureMoniMT                                 INFO -- #2613484113 Features                             342        3678       780        -          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #2613484113 Features                             342        3676       780        -          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_2g10_loose_mu20_L1MU20 #3765708828
 TrigSignatureMoniMT                                 INFO -- #3765708828 Events         8          8          1          1          1          0          0          0          0          0          -          -          -          -          -          0
 TrigSignatureMoniMT                                 INFO -- #3765708828 Features                             2          2          6          0          0          0          0          0          -          -          -          -          -
@@ -249,34 +249,34 @@ TrigSignatureMoniMT                                 INFO -- #1745513164 Events
 TrigSignatureMoniMT                                 INFO -- #1745513164 Features                             55         55         55         -          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e3_etcut_L1EM3 #683953566
 TrigSignatureMoniMT                                 INFO -- #683953566 Events          20         20         20         20         20         -          -          -          -          -          -          -          -          -          -          20
-TrigSignatureMoniMT                                 INFO -- #683953566 Features                              171        1839       390        -          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #683953566 Features                              171        1838       390        -          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e5_etcut_L1EM3 #324908483
 TrigSignatureMoniMT                                 INFO -- #324908483 Events          20         20         20         20         20         -          -          -          -          -          -          -          -          -          -          20
 TrigSignatureMoniMT                                 INFO -- #324908483 Features                              137        1652       190        -          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e5_lhloose_L1EM3 #736648247
 TrigSignatureMoniMT                                 INFO -- #736648247 Events          20         20         18         18         18         4          -          -          -          -          -          -          -          -          -          4
-TrigSignatureMoniMT                                 INFO -- #736648247 Features                              54         586        109        5          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #736648247 Features                              54         585        109        5          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e5_lhloose_noringer_L1EM3 #1053337356
 TrigSignatureMoniMT                                 INFO -- #1053337356 Events         20         20         17         17         17         4          -          -          -          -          -          -          -          -          -          4
-TrigSignatureMoniMT                                 INFO -- #1053337356 Features                             56         652        116        5          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #1053337356 Features                             56         650        116        5          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e5_lhmedium_L1EM3 #2713915187
 TrigSignatureMoniMT                                 INFO -- #2713915187 Events         20         20         18         18         18         4          -          -          -          -          -          -          -          -          -          4
-TrigSignatureMoniMT                                 INFO -- #2713915187 Features                             53         581        106        5          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #2713915187 Features                             53         580        106        5          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e5_lhmedium_noringer_L1EM3 #176627878
 TrigSignatureMoniMT                                 INFO -- #176627878 Events          20         20         16         16         16         4          -          -          -          -          -          -          -          -          -          4
-TrigSignatureMoniMT                                 INFO -- #176627878 Features                              48         532        93         5          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #176627878 Features                              48         531        93         5          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e5_lhtight_L1EM3 #2070133824
 TrigSignatureMoniMT                                 INFO -- #2070133824 Events         20         20         18         18         18         4          -          -          -          -          -          -          -          -          -          4
-TrigSignatureMoniMT                                 INFO -- #2070133824 Features                             51         562        101        5          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #2070133824 Features                             51         561        101        5          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e5_lhtight_nod0_L1EM3 #3303895627
 TrigSignatureMoniMT                                 INFO -- #3303895627 Events         20         20         18         18         18         4          -          -          -          -          -          -          -          -          -          4
-TrigSignatureMoniMT                                 INFO -- #3303895627 Features                             51         562        101        5          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #3303895627 Features                             51         561        101        5          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e5_lhtight_noringer_L1EM3 #2758326765
 TrigSignatureMoniMT                                 INFO -- #2758326765 Events         20         20         16         16         16         4          -          -          -          -          -          -          -          -          -          4
-TrigSignatureMoniMT                                 INFO -- #2758326765 Features                             45         514        84         5          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #2758326765 Features                             45         513        84         5          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e5_lhtight_noringer_nod0_L1EM3 #1690619419
 TrigSignatureMoniMT                                 INFO -- #1690619419 Events         20         20         16         16         16         4          -          -          -          -          -          -          -          -          -          4
-TrigSignatureMoniMT                                 INFO -- #1690619419 Features                             45         514        84         5          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #1690619419 Features                             45         513        84         5          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e60_lhmedium_L1EM22VHI #298591874
 TrigSignatureMoniMT                                 INFO -- #298591874 Events          6          6          2          2          2          2          -          -          -          -          -          -          -          -          -          2
 TrigSignatureMoniMT                                 INFO -- #298591874 Features                              2          33         4          2          -          -          -          -          -          -          -          -          -
@@ -285,7 +285,7 @@ TrigSignatureMoniMT                                 INFO -- #4115486024 Events
 TrigSignatureMoniMT                                 INFO -- #4115486024 Features                             2          33         4          2          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e7_etcut_L1EM3 #1959043579
 TrigSignatureMoniMT                                 INFO -- #1959043579 Events         20         20         20         20         20         -          -          -          -          -          -          -          -          -          -          20
-TrigSignatureMoniMT                                 INFO -- #1959043579 Features                             89         1132       112        -          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #1959043579 Features                             89         1131       112        -          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e7_lhmedium_mu24_L1MU20 #2970063918
 TrigSignatureMoniMT                                 INFO -- #2970063918 Events         8          8          7          7          7          2          2          1          1          1          -          -          -          -          -          1
 TrigSignatureMoniMT                                 INFO -- #2970063918 Features                             9          92         17         2          2          1          1          1          -          -          -          -          -
@@ -393,7 +393,7 @@ TrigSignatureMoniMT                                 INFO -- #1364976160 Events
 TrigSignatureMoniMT                                 INFO -- #1364976160 Features                             0          0          0          0          0          0          0          0          0          49         -          -          -
 TrigSignatureMoniMT                                 INFO HLT_j45_csskpf_nojcalib_ftf_L1J20 #2528888897
 TrigSignatureMoniMT                                 INFO -- #2528888897 Events         19         19         0          0          0          0          0          0          0          0          0          16         -          -          -          16
-TrigSignatureMoniMT                                 INFO -- #2528888897 Features                             0          0          0          0          0          0          0          0          0          30         -          -          -
+TrigSignatureMoniMT                                 INFO -- #2528888897 Features                             0          0          0          0          0          0          0          0          0          31         -          -          -
 TrigSignatureMoniMT                                 INFO HLT_j45_cssktc_nojcalib_L1J20 #3295122398
 TrigSignatureMoniMT                                 INFO -- #3295122398 Events         19         19         0          0          0          0          0          0          0          0          0          15         -          -          -          15
 TrigSignatureMoniMT                                 INFO -- #3295122398 Features                             0          0          0          0          0          0          0          0          0          27         -          -          -
@@ -405,16 +405,16 @@ TrigSignatureMoniMT                                 INFO -- #2042444294 Events
 TrigSignatureMoniMT                                 INFO -- #2042444294 Features                             0          0          0          0          0          0          0          0          0          39         -          -          -
 TrigSignatureMoniMT                                 INFO HLT_j45_pf_ftf_L1J20 #3679554988
 TrigSignatureMoniMT                                 INFO -- #3679554988 Events         19         19         0          0          0          0          0          0          0          0          0          18         -          -          -          18
-TrigSignatureMoniMT                                 INFO -- #3679554988 Features                             0          0          0          0          0          0          0          0          0          38         -          -          -
+TrigSignatureMoniMT                                 INFO -- #3679554988 Features                             0          0          0          0          0          0          0          0          0          39         -          -          -
 TrigSignatureMoniMT                                 INFO HLT_j45_pf_nojcalib_ftf_L1J20 #4202219904
 TrigSignatureMoniMT                                 INFO -- #4202219904 Events         19         19         0          0          0          0          0          0          0          0          0          17         -          -          -          17
-TrigSignatureMoniMT                                 INFO -- #4202219904 Features                             0          0          0          0          0          0          0          0          0          37         -          -          -
+TrigSignatureMoniMT                                 INFO -- #4202219904 Features                             0          0          0          0          0          0          0          0          0          38         -          -          -
 TrigSignatureMoniMT                                 INFO HLT_j45_pf_subjesgscIS_ftf_L1J20 #2187173741
 TrigSignatureMoniMT                                 INFO -- #2187173741 Events         19         19         0          0          0          0          0          0          0          0          0          18         -          -          -          18
-TrigSignatureMoniMT                                 INFO -- #2187173741 Features                             0          0          0          0          0          0          0          0          0          38         -          -          -
+TrigSignatureMoniMT                                 INFO -- #2187173741 Features                             0          0          0          0          0          0          0          0          0          39         -          -          -
 TrigSignatureMoniMT                                 INFO HLT_j45_pf_subresjesgscIS_ftf_L1J20 #3567642453
 TrigSignatureMoniMT                                 INFO -- #3567642453 Events         19         19         0          0          0          0          0          0          0          0          0          18         -          -          -          18
-TrigSignatureMoniMT                                 INFO -- #3567642453 Features                             0          0          0          0          0          0          0          0          0          38         -          -          -
+TrigSignatureMoniMT                                 INFO -- #3567642453 Features                             0          0          0          0          0          0          0          0          0          39         -          -          -
 TrigSignatureMoniMT                                 INFO HLT_j45_sktc_nojcalib_L1J20 #1542468090
 TrigSignatureMoniMT                                 INFO -- #1542468090 Events         19         19         0          0          0          0          0          0          0          0          0          15         -          -          -          15
 TrigSignatureMoniMT                                 INFO -- #1542468090 Features                             0          0          0          0          0          0          0          0          0          26         -          -          -
@@ -941,17 +941,17 @@ TrigSignatureMoniMT                                 INFO HLT_xe100_mht_L1XE50 #5
 TrigSignatureMoniMT                                 INFO -- #532175988 Events          10         10         0          0          0          0          0          0          0          0          0          9          -          -          -          9
 TrigSignatureMoniMT                                 INFO -- #532175988 Features                              0          0          0          0          0          0          0          0          0          9          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_xe100_pfsum_L1XE50 #1890237897
-TrigSignatureMoniMT                                 INFO -- #1890237897 Events         10         10         0          0          0          0          0          0          0          0          0          4          -          -          -          4
-TrigSignatureMoniMT                                 INFO -- #1890237897 Features                             0          0          0          0          0          0          0          0          0          4          -          -          -
+TrigSignatureMoniMT                                 INFO -- #1890237897 Events         10         10         0          0          0          0          0          0          0          0          0          5          -          -          -          5
+TrigSignatureMoniMT                                 INFO -- #1890237897 Features                             0          0          0          0          0          0          0          0          0          5          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_xe100_tcpufit_L1XE50 #2803198799
 TrigSignatureMoniMT                                 INFO -- #2803198799 Events         10         10         0          0          0          0          0          0          0          0          0          6          -          -          -          6
 TrigSignatureMoniMT                                 INFO -- #2803198799 Features                             0          0          0          0          0          0          0          0          0          6          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_xe100_trkmht_L1XE50 #1055916731
-TrigSignatureMoniMT                                 INFO -- #1055916731 Events         10         10         0          0          0          0          0          0          0          0          0          7          -          -          -          7
-TrigSignatureMoniMT                                 INFO -- #1055916731 Features                             0          0          0          0          0          0          0          0          0          7          -          -          -
+TrigSignatureMoniMT                                 INFO -- #1055916731 Events         10         10         0          0          0          0          0          0          0          0          0          6          -          -          -          6
+TrigSignatureMoniMT                                 INFO -- #1055916731 Features                             0          0          0          0          0          0          0          0          0          6          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_xe100_trkmht_xe85_tcpufit_xe65_cell_L1XE50 #451622546
-TrigSignatureMoniMT                                 INFO -- #451622546 Events          10         10         0          0          0          0          0          0          0          0          0          6          -          -          -          6
-TrigSignatureMoniMT                                 INFO -- #451622546 Features                              0          0          0          0          0          0          0          0          0          6          -          -          -
+TrigSignatureMoniMT                                 INFO -- #451622546 Events          10         10         0          0          0          0          0          0          0          0          0          5          -          -          -          5
+TrigSignatureMoniMT                                 INFO -- #451622546 Features                              0          0          0          0          0          0          0          0          0          5          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_xe110_mht_L1XE50 #3030733259
 TrigSignatureMoniMT                                 INFO -- #3030733259 Events         10         10         0          0          0          0          0          0          0          0          0          7          -          -          -          7
 TrigSignatureMoniMT                                 INFO -- #3030733259 Features                             0          0          0          0          0          0          0          0          0          7          -          -          -
@@ -977,8 +977,8 @@ TrigSignatureMoniMT                                 INFO HLT_xe30_mhtpufit_em_su
 TrigSignatureMoniMT                                 INFO -- #689201557 Events          19         19         0          0          0          0          0          0          0          0          0          14         -          -          -          14
 TrigSignatureMoniMT                                 INFO -- #689201557 Features                              0          0          0          0          0          0          0          0          0          14         -          -          -
 TrigSignatureMoniMT                                 INFO HLT_xe30_mhtpufit_pf_subjesgscIS_L1XE10 #1886909707
-TrigSignatureMoniMT                                 INFO -- #1886909707 Events         19         19         0          0          0          0          0          0          0          0          0          15         -          -          -          15
-TrigSignatureMoniMT                                 INFO -- #1886909707 Features                             0          0          0          0          0          0          0          0          0          15         -          -          -
+TrigSignatureMoniMT                                 INFO -- #1886909707 Events         19         19         0          0          0          0          0          0          0          0          0          14         -          -          -          14
+TrigSignatureMoniMT                                 INFO -- #1886909707 Features                             0          0          0          0          0          0          0          0          0          14         -          -          -
 TrigSignatureMoniMT                                 INFO HLT_xe30_pfopufit_L1XE10 #2252641537
 TrigSignatureMoniMT                                 INFO -- #2252641537 Events         19         19         0          0          0          0          0          0          0          0          0          14         -          -          -          14
 TrigSignatureMoniMT                                 INFO -- #2252641537 Features                             0          0          0          0          0          0          0          0          0          14         -          -          -
-- 
GitLab


From 19ad60a96b612f7fc7872adaf3ad82b442c1d3d3 Mon Sep 17 00:00:00 2001
From: Maximilian Goblirsch-Kolb <goblirsc@cern.ch>
Date: Mon, 5 Oct 2020 10:36:47 +0200
Subject: [PATCH 175/403] update q221

---
 .../PROCTools/data/master_q221_AOD_digest.ref | 52 +++++++++----------
 1 file changed, 26 insertions(+), 26 deletions(-)

diff --git a/Tools/PROCTools/data/master_q221_AOD_digest.ref b/Tools/PROCTools/data/master_q221_AOD_digest.ref
index e4693da36223..6a9be0435125 100644
--- a/Tools/PROCTools/data/master_q221_AOD_digest.ref
+++ b/Tools/PROCTools/data/master_q221_AOD_digest.ref
@@ -1,26 +1,26 @@
-         run       event       nTopo   nIdTracks       nJets      nMuons       nElec   nTrueElec   nFakeElec       nPhot   nTruePhot   nFakePhot
-      284500    87473001         122         128           4           1           8           2           6           7           4           3
-      284500    87473014          83          80           6           1          10           1           9           7           5           2
-      284500    87473022          38          29           4           0           4           1           3           3           2           1
-      284500    87473032          30          33           4           1          10           4           6           5           2           3
-      284500    87473037          62          39           7           0          12           2          10           6           4           2
-      284500    87473040         107          97          10           0          17           1          16          10           5           5
-      284500    87473051         140         112          11           1          16           1          15          23          16           7
-      284500    87473063          62          76           5           2           7           1           6           6           4           2
-      284500    87473068          25          34           1           1           0           0           0           0           0           0
-      284500    87473075          60          85           6           0           5           0           5           6           5           1
-      284500    87473084          78          85           7           2          14           1          13           9           3           6
-      284500    87473091          41          49           3           0           4           2           2           4           2           2
-      284500    87473096          66          75           3           2           3           0           3           4           3           1
-      284500    87473104          64          63           6           0           5           1           4           4           3           1
-      284500    87473114          89          80           7           2          12           1          11           9           6           3
-      284500    87473121          93         100           6           3          15           3          12           7           6           1
-      284500    87473132          84          57           9           1          12           0          12           3           3           0
-      284500    87473137          94          70           8           3          15           0          15           8           8           0
-      284500    87473144          78          67           7           1           8           2           6           8           6           2
-      284500    87473154          86          89           7           0          14           3          11           9           4           5
-      284500    87473162          53          52           4           0           7           0           7           3           2           1
-      284500    87473167          77          54           6           3          14           2          12          13           8           5
-      284500    87473171          77          69           8           4           4           2           2           5           4           1
-      284500    87473184          75          86           5           2           8           1           7           5           3           2
-      284500    87473192          55          52           4           1           8           4           4           4           3           1
+run       event       nTopo   nIdTracks       nJets      nMuons       nElec   nTrueElec   nFakeElec       nPhot   nTruePhot   nFakePhot
+284500    87473001         122         128           4           1           8           2           6           7           4           3
+284500    87473014          83          80           6           1          10           1           9           7           5           2
+284500    87473022          38          29           4           0           4           1           3           3           2           1
+284500    87473032          30          33           4           1          10           4           6           5           2           3
+284500    87473037          62          39           7           0          12           2          10           6           4           2
+284500    87473040         107          97          10           0          17           1          16          10           5           5
+284500    87473051         140         112          11           1          16           1          15          23          16           7
+284500    87473063          62          76           5           2           7           1           6           6           4           2
+284500    87473068          25          34           1           1           0           0           0           0           0           0
+284500    87473075          60          85           6           0           5           0           5           6           5           1
+284500    87473084          78          85           7           2          14           1          13           9           3           6
+284500    87473091          41          49           3           0           4           2           2           4           2           2
+284500    87473096          66          75           3           2           3           0           3           4           3           1
+284500    87473104          64          63           6           0           5           1           4           4           3           1
+284500    87473114          89          79           7           2          12           1          11           9           6           3
+284500    87473121          93         100           6           3          15           3          12           7           6           1
+284500    87473132          84          57           9           1          12           0          12           3           3           0
+284500    87473137          94          70           8           3          15           0          15           8           8           0
+284500    87473144          78          67           7           1           8           2           6           8           6           2
+284500    87473154          86          89           7           0          14           3          11           9           4           5
+284500    87473162          53          52           4           0           7           0           7           3           2           1
+284500    87473167          77          54           6           3          14           2          12          13           8           5
+284500    87473171          77          69           8           4           4           2           2           5           4           1
+284500    87473184          75          86           5           2           8           1           7           5           3           2
+284500    87473192          55          52           4           1           8           4           4           4           3           1
-- 
GitLab


From b7c34f29edc8e21199c3d2edf6d2cda9a08e4d35 Mon Sep 17 00:00:00 2001
From: Mohsen Rezaei Estabragh <mohsen.rezaei.estabragh@cern.ch>
Date: Mon, 5 Oct 2020 11:45:41 +0200
Subject: [PATCH 176/403] modification of memory leak report (can report when
 job is killed). removing memory analysis from DQMerge.

---
 Tools/PyJobTransforms/python/trfExe.py | 65 ++++++++++++--------------
 1 file changed, 29 insertions(+), 36 deletions(-)

diff --git a/Tools/PyJobTransforms/python/trfExe.py b/Tools/PyJobTransforms/python/trfExe.py
index 5fed9864c15d..4f4c9701c963 100755
--- a/Tools/PyJobTransforms/python/trfExe.py
+++ b/Tools/PyJobTransforms/python/trfExe.py
@@ -1138,7 +1138,9 @@ class athenaExecutor(scriptExecutor):
         self.setValStart()
         self._hasValidated = True
         deferredException = None
-        
+        memLeakThreshold = 5000
+        _hasMemLeak = False
+
         ## Our parent will check the RC for us
         try:
             super(athenaExecutor, self).validate()
@@ -1146,7 +1148,26 @@ class athenaExecutor(scriptExecutor):
             # In this case we hold this exception until the logfile has been scanned
             msg.error('Validation of return code failed: {0!s}'.format(e))
             deferredException = e
-                
+
+        ## Get results of memory monitor analysis (slope and chi2)
+        # the analysis is a linear fit to 'pss' va 'Time' (fit to at least 5 data points)
+        # to obtain a good fit, tails are excluded from data
+        # if the slope of 'pss' is higher than 'memLeakThreshold' and an error is already caught,
+        # a message will be added to the exit message
+        # the memory leak threshold is defined based on analysing several jobs with memory leak,
+        # however it is rather arbitrary and could be modified
+        if self._memFullFile:
+            msg.info('Analysing memory monitor output file {0} for possible memory leak'.format(self._memFullFile))
+            self._memLeakResult = analytic().getFittedData(self._memFullFile)
+            if self._memLeakResult:
+                if self._memLeakResult['slope'] > memLeakThreshold:
+                    _hasMemLeak = True
+                    msg.warning('Possible memory leak; abnormally high values in memory monitor parameters (ignore this message if the job has finished successfully)')
+            else:
+                msg.warning('Failed to analyse the memory monitor file {0}'.format(self._memFullFile))
+        else:
+            msg.info('No memory monitor file to be analysed')
+
         # Logfile scan setup
         # Always use ignorePatterns from the command line
         # For patterns in files, pefer the command line first, then any special settings for
@@ -1190,6 +1211,9 @@ class athenaExecutor(scriptExecutor):
             # Add any logfile information we have
             if worstError['nLevel'] >= stdLogLevels['ERROR']:
                 deferredException.errMsg = deferredException.errMsg + "; {0}".format(exitErrorMessage)
+            # Add the result of memory analysis
+            if _hasMemLeak:
+                deferredException.errMsg = deferredException.errMsg + "; Possible memory leak: 'pss' slope: {0} KB/s".format(self._memLeakResult['slope'])
             raise deferredException
         
         
@@ -1199,6 +1223,9 @@ class athenaExecutor(scriptExecutor):
         elif worstError['nLevel'] >= stdLogLevels['ERROR']:
             self._isValidated = False
             msg.error('Fatal error in athena logfile (level {0})'.format(worstError['level']))
+            # Add the result of memory analysis
+            if _hasMemLeak:
+                exitErrorMessage = exitErrorMessage + "; Possible memory leak: 'pss' slope: {0} KB/s".format(self._memLeakResult['slope'])
             raise trfExceptions.TransformLogfileErrorException(trfExit.nameToCode('TRF_EXEC_LOGERROR'), 
                                                                    'Fatal error in athena logfile: "{0}"'.format(exitErrorMessage))
 
@@ -1209,24 +1236,6 @@ class athenaExecutor(scriptExecutor):
         self._valStop = os.times()
         msg.debug('valStop time is {0}'.format(self._valStop))
 
-        ## Get results of memory monitor analysis (slope and chi2)
-        # the analysis is a linear fit to 'Time' vs 'pss' (fit to at least 5 data points)
-        # to obtain a good fit, tails are excluded from data
-        # if the slope of 'pss' is high (>5MB/s) and an error is already caught,
-        # a message will be added to the exit message
-        if self._memFullFile:
-            msg.info('Analysing memory monitor output file {0} for possible memory leak'.format(self._memFullFile))
-            self._memLeakResult = analytic().getFittedData(self._memFullFile)
-            if self._memLeakResult:
-                if self._memLeakResult['slope'] > 5000:
-                    msg.warning('Possible memory leak; abnormal high values in memory monitor parameters (ignore this message if the job has finished successfully)')
-                    if deferredException is not None:
-                        deferredException.errMsg = deferredException.errMsg + "; Possible memory leak: 'pss' slope: {0} KB/s".format(self._memLeakResult['slope'])
-            else:
-                msg.warning('Failed to analyse the memory monitor file {0}'.format(self._memFullFile))
-        else:
-            msg.info('No memory monitor file to be analysed')
-
 
     ## @brief Prepare the correct command line to be used to invoke athena
     def _prepAthenaCommandLine(self):
@@ -1808,22 +1817,6 @@ class DQMergeExecutor(scriptExecutor):
         self._valStop = os.times()
         msg.debug('valStop time is {0}'.format(self._valStop))
 
-        ## Get results of memory monitor analysis (slope and chi2)
-        # the analysis is a linear fit to 'Time' vs 'pss' (fit to at least 5 data points)
-        # if the slope of 'pss' is high (>5MB/s) and an error is already caught,
-        # a message will be added to the exit message
-        if self._memFullFile:
-            msg.info('Analysing memory monitor output file {0} for possible memory leak'.format(self._memFullFile))
-            self._memLeakResult = analytic().getFittedData(self._memFullFile)
-            if self._memLeakResult:
-                if self._memLeakResult['slope'] > 5000:
-                    msg.warning('Possible memory leak; abnormal high values in memory monitor parameters (ignore this message if the job has finished successfully)')
-                    if deferredException is not None:
-                        deferredException.errMsg = deferredException.errMsg + "; Possible memory leak: 'pss' slope: {0} KB/s".format(self._memLeakResult['slope'])
-            else:
-                msg.warning('Failed to analyse the memory monitor file {0}'.format(self._memFullFile))
-        else:
-            msg.info('No memory monitor file to be analysed')
 
 
 ## @brief Specialist execution class for merging NTUPLE files
-- 
GitLab


From 284c4e5e96648ca3a9962f5c5b559b09e17f5b4b Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Mon, 5 Oct 2020 12:17:31 +0200
Subject: [PATCH 177/403] GeometryJiveXML: cmake cleanup

Remove `atlas_depends_on_subdirs`, cleanup link dependencies and remove
installation of unused public headers.
---
 graphics/GeometryJiveXML/CMakeLists.txt | 30 +++----------------------
 1 file changed, 3 insertions(+), 27 deletions(-)

diff --git a/graphics/GeometryJiveXML/CMakeLists.txt b/graphics/GeometryJiveXML/CMakeLists.txt
index bbb24b8182ed..eedb013fb12f 100644
--- a/graphics/GeometryJiveXML/CMakeLists.txt
+++ b/graphics/GeometryJiveXML/CMakeLists.txt
@@ -1,28 +1,8 @@
-################################################################################
-# Package: GeometryJiveXML
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( GeometryJiveXML )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          graphics/JiveXML
-                          PRIVATE
-                          Calorimeter/CaloDetDescr
-                          Control/StoreGate
-                          GaudiKernel
-                          InnerDetector/InDetDetDescr/InDetIdentifier
-                          InnerDetector/InDetDetDescr/InDetReadoutGeometry
-			  InnerDetector/InDetDetDescr/PixelReadoutGeometry
-			  InnerDetector/InDetDetDescr/SCT_ReadoutGeometry
-			  InnerDetector/InDetDetDescr/TRT_ReadoutGeometry
-                          LArCalorimeter/LArGeoModel/LArReadoutGeometry
-                          MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry
-                          MuonSpectrometer/MuonIdHelpers
-                          TileCalorimeter/TileDetDescr )
-
 # External dependencies:
 find_package( GeoModelCore )
 find_package( CLHEP )
@@ -31,9 +11,5 @@ find_package( CLHEP )
 atlas_add_component( GeometryJiveXML
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps JiveXMLLib CaloDetDescrLib StoreGateLib SGtests GaudiKernel InDetIdentifier InDetReadoutGeometry PixelReadoutGeometry SCT_ReadoutGeometry TRT_ReadoutGeometry LArReadoutGeometry MuonReadoutGeometry MuonIdHelpersLib TileDetDescr )
-
-# Install files from the package:
-atlas_install_headers( GeometryJiveXML )
-
+                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${CLHEP_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaBaseComps CaloDetDescrLib GaudiKernel InDetIdentifier InDetReadoutGeometry JiveXMLLib LArReadoutGeometry MuonIdHelpersLib MuonReadoutGeometry PixelReadoutGeometry SCT_ReadoutGeometry StoreGateLib TRT_ReadoutGeometry TileDetDescr )
-- 
GitLab


From f4a8d15493d2584d12dd88d7ca338d449193d03c Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Mon, 5 Oct 2020 12:18:24 +0200
Subject: [PATCH 178/403] JiveXML: cmake cleanup

---
 graphics/JiveXML/CMakeLists.txt | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

diff --git a/graphics/JiveXML/CMakeLists.txt b/graphics/JiveXML/CMakeLists.txt
index 7884c730f3d9..5d4ccc1f1b8c 100644
--- a/graphics/JiveXML/CMakeLists.txt
+++ b/graphics/JiveXML/CMakeLists.txt
@@ -1,29 +1,18 @@
-################################################################################
-# Package: JiveXML
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( JiveXML )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          PRIVATE
-                          Control/StoreGate
-                          Event/EventInfo
-                          Event/xAOD/xAODEventInfo
-                          GaudiKernel )
-
 # Component(s) in the package:
 atlas_add_library( JiveXMLLib
                    src/*.cxx
                    PUBLIC_HEADERS JiveXML
-                   LINK_LIBRARIES AthenaBaseComps StoreGateLib SGtests
+                   LINK_LIBRARIES AthenaBaseComps GaudiKernel
                    PRIVATE_LINK_LIBRARIES EventInfo xAODEventInfo )
 
 atlas_add_component( JiveXML
                      src/components/*.cxx
-                     LINK_LIBRARIES AthenaBaseComps StoreGateLib SGtests EventInfo xAODEventInfo JiveXMLLib )
+                     LINK_LIBRARIES JiveXMLLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
-- 
GitLab


From 16e9c65f3c96e9741603ca0a24d8fa2a3262ad4d Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Mon, 5 Oct 2020 12:18:36 +0200
Subject: [PATCH 179/403] EventDisplayFilters: cmake cleanup

Remove `atlas_depends_on_subdirs`, update link dependencies and remove
installation of unused public headers.
---
 graphics/EventDisplayFilters/CMakeLists.txt | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)

diff --git a/graphics/EventDisplayFilters/CMakeLists.txt b/graphics/EventDisplayFilters/CMakeLists.txt
index 5f659aa19c5f..d6d2b556d36a 100644
--- a/graphics/EventDisplayFilters/CMakeLists.txt
+++ b/graphics/EventDisplayFilters/CMakeLists.txt
@@ -1,28 +1,14 @@
-################################################################################
-# Package: EventDisplayFilters
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( EventDisplayFilters )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Control/StoreGate
-                          GaudiKernel
-                          PRIVATE
-                          TileCalorimeter/TileEvent
-                          TileCalorimeter/TileIdentifier
-                          Tracking/TrkEvent/TrkSpacePoint
-                          Trigger/TrigT1/TrigT1Result )
-
 # Component(s) in the package:
 atlas_add_component( EventDisplayFilters
                      src/*.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES AthenaBaseComps StoreGateLib SGtests GaudiKernel TileEvent TileIdentifier TrkSpacePoint TrigT1Result )
+                     LINK_LIBRARIES AthenaBaseComps TileEvent TileIdentifier TrkSpacePoint TrigT1Result )
 
 # Install files from the package:
-atlas_install_headers( EventDisplayFilters )
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-ignore=F401,F821 )
-- 
GitLab


From fb34b1e00602013e886a13fa895a62c2cb60146f Mon Sep 17 00:00:00 2001
From: abarton <Adam.Edward.Barton@cern.ch>
Date: Sat, 3 Oct 2020 23:24:16 +0100
Subject: [PATCH 180/403] use emplace to reduce a copy

---
 .../TrigFastTrackFinder/src/TrigFastTrackFinder.cxx       | 5 ++---
 .../TrigInDetPattRecoTools/src/TrigTrackSeedGenerator.cxx | 8 ++------
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.cxx b/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.cxx
index b8bd2079a362..825d9743efe7 100644
--- a/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.cxx
+++ b/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.cxx
@@ -585,7 +585,7 @@ StatusCode TrigFastTrackFinder::findTracks(InDet::SiTrackMakerEventData_xk &trac
 
   for(unsigned int tripletIdx=0;tripletIdx!=triplets.size();tripletIdx++) {
 
-    TrigInDetTriplet seed = triplets[tripletIdx];
+    const TrigInDetTriplet &seed = triplets[tripletIdx];
 
     const Trk::SpacePoint* osp1 = seed.s1().offlineSpacePoint();
     const Trk::SpacePoint* osp2 = seed.s2().offlineSpacePoint();
@@ -1278,8 +1278,7 @@ void TrigFastTrackFinder::makeSeedsOnGPU(const TrigCombinatorialSettings& tcs, c
       const TrigSiSpacePointBase& SPi = vsp[pOutput->m_innerIndex[k]];
       const TrigSiSpacePointBase& SPm = vsp[pOutput->m_middleIndex[k]];
       const TrigSiSpacePointBase& SPo = vsp[pOutput->m_outerIndex[k]];
-      TrigInDetTriplet t(SPi, SPm, SPo, pOutput->m_Q[k]);
-      output.push_back(t);
+      output.emplace_back(SPi, SPm, SPo, pOutput->m_Q[k]);
     }
   }
 
diff --git a/Trigger/TrigTools/TrigInDetPattRecoTools/src/TrigTrackSeedGenerator.cxx b/Trigger/TrigTools/TrigInDetPattRecoTools/src/TrigTrackSeedGenerator.cxx
index b1fea2e64d97..9e8d086b96bb 100644
--- a/Trigger/TrigTools/TrigInDetPattRecoTools/src/TrigTrackSeedGenerator.cxx
+++ b/Trigger/TrigTools/TrigInDetPattRecoTools/src/TrigTrackSeedGenerator.cxx
@@ -780,10 +780,7 @@ void TrigTrackSeedGenerator::createTriplets(const TrigSiSpacePointBase* pS, int
         output.erase(it);
       }
 
-      TrigInDetTriplet t(*m_SoA.m_spi[innIdx], *pS, *m_SoA.m_spo[outIdx-nInner], Q);
-
-
-      output.push_back(t);
+      output.emplace_back(*m_SoA.m_spi[innIdx], *pS, *m_SoA.m_spo[outIdx-nInner], Q);
     }
   }
 }
@@ -1082,8 +1079,7 @@ void TrigTrackSeedGenerator::createTripletsNew(const TrigSiSpacePointBase* pS, i
       const TrigSiSpacePointBase* pSPI = (type1==0) ? m_SoA.m_sorted_sp[iter1] : m_SoA.m_sorted_sp[iter2];
       const TrigSiSpacePointBase* pSPO = (type1==0) ? m_SoA.m_sorted_sp[iter2] : m_SoA.m_sorted_sp[iter1];
 
-      TrigInDetTriplet t(*pSPI, *pS, *pSPO, Q);
-      output.push_back(t);
+      output.emplace_back(*pSPI, *pS, *pSPO, Q);
     }
 
     iter1++;
-- 
GitLab


From d6d620b5677dec3504eb1a268edd033672af580e Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Mon, 5 Oct 2020 12:45:19 +0200
Subject: [PATCH 181/403] Delete VP12DGeometry[Systems,Plugin]

Delete VP12DGeometrySystems and VP12DGeometryPlugin, which do not seem
to be used and are not compiled in athena currently.
---
 Projects/Athena/package_filters.txt           |    1 -
 .../VP12DGeometryPlugin/CMakeLists.txt        |   14 -
 .../VP12DGeometryChannel.h                    |   32 -
 .../src/VP12DGeometryChannel.cxx              |   28 -
 .../VP12DGeometrySystems/CMakeLists.txt       |   42 -
 .../StoreGateGeometryReader.h                 |  209 ---
 .../VP12DGeometrySystem.h                     |   40 -
 .../src/2dgeometrycontroller.ui               |   57 -
 .../src/StoreGateGeometryReader.cxx           | 1402 ---------------
 .../src/VP12DGeometrySystem.cxx               | 1533 -----------------
 10 files changed, 3358 deletions(-)
 delete mode 100644 graphics/VP1/VP1Plugins/VP12DGeometryPlugin/CMakeLists.txt
 delete mode 100755 graphics/VP1/VP1Plugins/VP12DGeometryPlugin/VP12DGeometryPlugin/VP12DGeometryChannel.h
 delete mode 100755 graphics/VP1/VP1Plugins/VP12DGeometryPlugin/src/VP12DGeometryChannel.cxx
 delete mode 100644 graphics/VP1/VP1Systems/VP12DGeometrySystems/CMakeLists.txt
 delete mode 100644 graphics/VP1/VP1Systems/VP12DGeometrySystems/VP12DGeometrySystems/StoreGateGeometryReader.h
 delete mode 100755 graphics/VP1/VP1Systems/VP12DGeometrySystems/VP12DGeometrySystems/VP12DGeometrySystem.h
 delete mode 100644 graphics/VP1/VP1Systems/VP12DGeometrySystems/src/2dgeometrycontroller.ui
 delete mode 100644 graphics/VP1/VP1Systems/VP12DGeometrySystems/src/StoreGateGeometryReader.cxx
 delete mode 100755 graphics/VP1/VP1Systems/VP12DGeometrySystems/src/VP12DGeometrySystem.cxx

diff --git a/Projects/Athena/package_filters.txt b/Projects/Athena/package_filters.txt
index 877968202757..dd4978a56e77 100644
--- a/Projects/Athena/package_filters.txt
+++ b/Projects/Athena/package_filters.txt
@@ -19,7 +19,6 @@
 
 # Temporary VP1 compilation issues
 - graphics/VP1/VP1Systems/VP1TriggerSystems
-- graphics/VP1/VP1Systems/VP12DGeometrySystems
 - graphics/VP1/VP1Systems/VP1MCSystems
 - graphics/VP1/VP1Systems/VP1TriggerDecisionSystems
 + graphics/VP1/.*
diff --git a/graphics/VP1/VP1Plugins/VP12DGeometryPlugin/CMakeLists.txt b/graphics/VP1/VP1Plugins/VP12DGeometryPlugin/CMakeLists.txt
deleted file mode 100644
index 08739e2d1df2..000000000000
--- a/graphics/VP1/VP1Plugins/VP12DGeometryPlugin/CMakeLists.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-################################################################################
-# Package: VP12DGeometryPlugin
-################################################################################
-
-# Declare the package name:
-atlas_subdir( VP12DGeometryPlugin )
-
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          graphics/VP1/VP1Systems/VP12DGeometrySystems )
-
-# Install files from the package:
-atlas_install_headers( VP12DGeometryPlugin )
-
diff --git a/graphics/VP1/VP1Plugins/VP12DGeometryPlugin/VP12DGeometryPlugin/VP12DGeometryChannel.h b/graphics/VP1/VP1Plugins/VP12DGeometryPlugin/VP12DGeometryPlugin/VP12DGeometryChannel.h
deleted file mode 100755
index ea462944c1df..000000000000
--- a/graphics/VP1/VP1Plugins/VP12DGeometryPlugin/VP12DGeometryPlugin/VP12DGeometryChannel.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/////////////////////////////////////////////////////////////
-//                                                         //
-//  Header file for class VP12DGeometryChannel             //
-//                                                         //
-//  Author: Thomas Kittelmann <Thomas.Kittelmann@cern.ch>  //
-//                                                         //
-//  Initial version: June 2007                             //
-//                                                         //
-/////////////////////////////////////////////////////////////
-
-#ifndef VP12DGEOMETRYCHANNEL_H
-#define VP12DGEOMETRYCHANNEL_H
-
-#include "VP1Base/IVP12DDetViewsChannelWidget.h"
-
-class VP12DGeometryChannel : public IVP12DDetViewsChannelWidget {
-
-  Q_OBJECT
-
-public:
-
-  VP12DGeometryChannel();
-  void init();
-  virtual ~VP12DGeometryChannel(){}
-
-};
-
-#endif
diff --git a/graphics/VP1/VP1Plugins/VP12DGeometryPlugin/src/VP12DGeometryChannel.cxx b/graphics/VP1/VP1Plugins/VP12DGeometryPlugin/src/VP12DGeometryChannel.cxx
deleted file mode 100755
index 74286b4d09b1..000000000000
--- a/graphics/VP1/VP1Plugins/VP12DGeometryPlugin/src/VP12DGeometryChannel.cxx
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/////////////////////////////////////////////////////////////
-//                                                         //
-//  Implementation of class VP12DGeometryChannel           //
-//                                                         //
-//  Author: Thomas Kittelmann <Thomas.Kittelmann@cern.ch>  //
-//                                                         //
-//  Initial version: June 2007                             //
-//                                                         //
-/////////////////////////////////////////////////////////////
-
-#include "VP12DGeometryPlugin/VP12DGeometryChannel.h"
-#include "VP12DGeometrySystems/VP12DGeometrySystem.h"
-
-VP12DGeometryChannel::VP12DGeometryChannel()
-  : IVP12DDetViewsChannelWidget(VP1CHANNELNAMEINPLUGIN(VP12DGeometryChannel,"2D Geometry"),
-				"This channel shows a stylized 2D geometry based GeoModel information.",
-				"Thomas.Kittelmann@cern.ch")
-{
-}
-
-void VP12DGeometryChannel::init()
-{
-  addSystem(new VP12DGeometrySystem, 1);
-}
diff --git a/graphics/VP1/VP1Systems/VP12DGeometrySystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP12DGeometrySystems/CMakeLists.txt
deleted file mode 100644
index 821f811d8ce5..000000000000
--- a/graphics/VP1/VP1Systems/VP12DGeometrySystems/CMakeLists.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-################################################################################
-# Package: VP12DGeometrySystems
-################################################################################
-
-# Declare the package name:
-atlas_subdir( VP12DGeometrySystems )
-
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/StoreGate
-                          DetectorDescription/GeoPrimitives
-                          graphics/VP1/VP1Base
-                          PRIVATE
-                          Calorimeter/CaloDetDescr
-                          DetectorDescription/IdDictDetDescr
-                          InnerDetector/InDetDetDescr/InDetIdentifier
-                          InnerDetector/InDetDetDescr/InDetReadoutGeometry
-			  InnerDetector/InDetDetDescr/PixelReadoutGeometry
-			  InnerDetector/InDetDetDescr/SCT_ReadoutGeometry
-			  InnerDetector/InDetDetDescr/TRT_ReadoutGeometry
-                          LArCalorimeter/LArGeoModel/LArReadoutGeometry
-                          MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry
-                          MuonSpectrometer/MuonIdHelpers
-                          TileCalorimeter/TileDetDescr )
-
-# External dependencies:
-find_package( Eigen )
-find_package( GeoModelCore )
-find_package( Qt5 )
-
-# Run the QT build steps automatically.
-set( CMAKE_AUTOMOC TRUE )
-set( CMAKE_AUTOUIC TRUE )
-
-# Component(s) in the package:
-atlas_add_library( VP12DGeometrySystems
-		   VP12DGeometrySystems/*.h src/*.cxx src/*.ui
-                   PUBLIC_HEADERS VP12DGeometrySystems
-                   INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${EIGEN_LIBRARIES} GeoPrimitives VP1Base StoreGateLib SGtests CaloDetDescrLib MuonIdHelpersLib
-                   PRIVATE_LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} IdDictDetDescr InDetIdentifier InDetReadoutGeometry PixelReadoutGeometry SCT_ReadoutGeometry TRT_ReadoutGeometry LArReadoutGeometry MuonReadoutGeometry TileDetDescr )
-
diff --git a/graphics/VP1/VP1Systems/VP12DGeometrySystems/VP12DGeometrySystems/StoreGateGeometryReader.h b/graphics/VP1/VP1Systems/VP12DGeometrySystems/VP12DGeometrySystems/StoreGateGeometryReader.h
deleted file mode 100644
index c3859c4b4cc7..000000000000
--- a/graphics/VP1/VP1Systems/VP12DGeometrySystems/VP12DGeometrySystems/StoreGateGeometryReader.h
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef STOREGATEGEOMETRYREADER_H
-#define STOREGATEGEOMETRYREADER_H
-
-#include "StoreGate/StoreGate.h"
-#include <string>
-#include <vector>
-#include <QColor>
-
-//#include "CLHEP/Geometry/Point3D.h"
-#include "GeoPrimitives/GeoPrimitives.h"
-
-class CaloDetDescrManager;
-class CaloDetDescriptor;
-class Identifier;
-class TileDetDescrManager;
-class LArDetectorManager;
-
-namespace InDetDD
-{
-  class PixelDetectorManager;
-  class SCT_DetectorManager;
-  class TRT_DetectorManager;
-}
-
-namespace MuonGM
-{
-  class MuonDetectorManager;
-  class MuonStation;
-}
-
-class Detector
-{
- public:
-  enum detectorType
-    {
-      ABox, ATrd, ATBx,             //<--- Muon geometry
-      AGeometryConstant,            //      ^
-      AGeneralPath,                 //      |
-      ADisc, ARectangle,            //      |
-      ABarrelCalorimeter,           //      |
-      AEndcapCalorimeter,           //      |
-      AGapCalorimeter,              // Other Geometry
-      ABarrelSiliconDetector,       //      |
-      AEndcapSiliconDetector,       //      |
-      ABarrelTRTDetector,           //      |
-      AEndcapTRTDetector,           //      v
-      AEndcapCryostat,              // I haven't seen this part anywhere outside the GeomeryJiveXML code ???
-      ERROR_TYPE                    // Set this when tag is missing/error
-    };
-
-  Detector():name(""), type(ERROR_TYPE), zInner(0), zOuter(0), rInner(0), rOuter(0), eta(0), dphi(0),sh(0), RPCi(0), RPCo(0), w(0), zInnerS(0), zOuterS(0), wS(0), oR(0),
-    wInner(0), wOuter(0), alpha(0), agc_value(0), projection(""), numPoints(0), xReflect(true), yReflect(true), nInner(256), nOuter(256), xMin(0), xMax(0), yMin(0), yMax(0),
-    sampling(0), region(0), eta0(0), deta(0), neta(0), meta(0), nphi(0), phi0(0), rMin(0), rMax(0), zMin(0), zMax(0), layer(0), length(0), width(0), thickness(0), nz(0),
-    tilt(0), r0(0), phiIn(0), phiOut(0)
-    {
-    }
-
-  //elements common to ALL detectors
-  std::string name;
-  detectorType type;
-  QColor color;
-
-  //elements common to both ABox and ATrd
-  double zInner;
-  double zOuter;
-  double rInner;   //also possessed by ADisc
-  double rOuter;   //also possessed by ADisc
-  int eta;
-  std::vector<int>  phi;
-  double dphi;
-  double sh;
-
-  //elements only in ABox+ATBx
-  double RPCi;
-  double RPCo;
-  double w;
-
-  //elements only in ATBx
-  double zInnerS;
-  double zOuterS;
-  double wS;
-  double oR;
-
-  //elements only in ATrd
-  double wInner;
-  double wOuter;
-  double alpha;
-
-  //elements in AGeometryConstant
-  double agc_value;
-
-  //element common to AGeneralPath, ADisc, ARectangle
-  std::string projection;
-
-  //element only in AGeneralPath
-  int numPoints;
-
-  //element in AGeneralPath, ARectangle
-  bool xReflect;
-  bool yReflect;
-
-  //elements in ADisc
-  int nInner;
-  int  nOuter;
-
-  //elements in ARectangle
-  double xMin;
-  double xMax;
-  double yMin;
-  double yMax;
-
-  //elements in A*Calorimeter
-  int sampling;
-  int region;
-  double eta0;
-  double deta; //no (d-m)eta (except "eta") in AGapCalorimeter
-  int neta;
-  int meta;
-
-  //elements in A*Calorimeter, A*SiliconDetector, A*TRTDetector
-  int nphi;
-  double phi0; //no phi0 in ABarrelTRTDetector
-  double rMin; //no rMin or rMax in ABarrelSiliconDetector
-  double rMax;
-  double zMin;
-  double zMax;
-
-  //elements in A*SiliconDetector, A*TRTDetector
-  int layer;
-
-  //elements in A*SiliconDetector
-  double length;
-  double width;
-  double thickness;
-  int nz;
-
-  //elements in ABarrelSiliconDetector
-  double tilt;
-  double r0;
-
-  //elements in ABarrelTRTDetector
-  double phiIn;
-  double phiOut;
-
-};
-
-class StoreGateGeometryReader
-{
- public:
-  StoreGateGeometryReader();
-  void setDetStore(StoreGateSvc *detStore) {m_detStore = detStore;}
-  std::vector<Detector> mDetectors;
-  bool readGeometry();
-  bool readPixelGeometry();
-  bool readSCTGeometry();
-  bool readTRTGeometry();
-  bool readSolenoidGeometry();
-  bool readLArGeometry();
-  bool readMBTSGeometry();
-  bool readTILEGeometry();
-
-  bool readToDiscElement();
-  bool readToRectElement();
-  bool readToRectanglishElement(); //wtf?
-
-  bool readMuonGeometry();
-
- private:
-  /** Pixel detector manager. */
-  const InDetDD::PixelDetectorManager* m_pixel_manager;
-
-  /** Silicon detector manager. */
-  const InDetDD::SCT_DetectorManager* m_silicon_manager;
-
-  /** TRT detector manager. */
-  const InDetDD::TRT_DetectorManager* m_trt_manager;
-
-  /** Calorimeter detector manager. */
-  const CaloDetDescrManager* m_calo_manager;
-  const TileDetDescrManager* m_tile_manager;
-  const LArDetectorManager *m_lar_manager;
-
-  /** The number of calorimeter sampling types. */
-  static const int m_numCaloTypes = 24;
-
-  std::vector<double> m_larMin;
-  std::vector<double> m_larMax;
-
-  //helper functions for Muon parsing
-  Amg::Vector3D getPosition(const MuonGM::MuonStation *station, int maxPhi) const;
-
-  double getDeltaPhi(const Amg::Vector3D &pos, int maxPhi) const;
-  double getShift(const Amg::Vector3D &pos, double dphi) const;
-  double getAlpha(const Amg::Transform3D &trans) const;
-  std::vector<int> getPhiVectorFromString(std::string phiString);
-
-  const MuonGM::MuonDetectorManager *m_muon_manager;
-  static const double m_smallAngle, m_smallDistance;
-
-  // Detector Store
-  StoreGateSvc *m_detStore;
-
-};
-
-#endif
diff --git a/graphics/VP1/VP1Systems/VP12DGeometrySystems/VP12DGeometrySystems/VP12DGeometrySystem.h b/graphics/VP1/VP1Systems/VP12DGeometrySystems/VP12DGeometrySystems/VP12DGeometrySystem.h
deleted file mode 100755
index 5dcd1d04682c..000000000000
--- a/graphics/VP1/VP1Systems/VP12DGeometrySystems/VP12DGeometrySystems/VP12DGeometrySystem.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef VP12DGEOMETRYSYSTEM_H
-#define VP12DGEOMETRYSYSTEM_H
-
-/////////////////////////////////////////////////////////////////////////
-//                                                                     //
-//  Header file for class VP12DGeometrySystem                          //
-//                                                                     //
-//  Author: Brock Greman <bgreman@gmail.com>                           //
-//                                                                     //
-//  Initial version: August 2007                                       //
-//                                                                     //
-/////////////////////////////////////////////////////////////////////////
-
-#include "VP1Base/IVP12DDetViewsSystem.h"
-
-class VP12DGeometrySystem : public IVP12DDetViewsSystem {
-
-  Q_OBJECT
-
-public:
-  VP12DGeometrySystem();
-  ~VP12DGeometrySystem();
-  void systemcreate(StoreGateSvc*);
-  void buildPermanentItemCollections(StoreGateSvc* detstore,VP1GraphicsItemCollection*, VP1GraphicsItemCollection*);
-  //QWidget * buildController();  //Will implement a more specific controller
-
- private:
-  VP12DGeometrySystem( const VP12DGeometrySystem & );
-  VP12DGeometrySystem & operator= ( const VP12DGeometrySystem & );
-
-  class Imp;
-  Imp *m_d;
-
-};
-
-#endif
diff --git a/graphics/VP1/VP1Systems/VP12DGeometrySystems/src/2dgeometrycontroller.ui b/graphics/VP1/VP1Systems/VP12DGeometrySystems/src/2dgeometrycontroller.ui
deleted file mode 100644
index 20f866075978..000000000000
--- a/graphics/VP1/VP1Systems/VP12DGeometrySystems/src/2dgeometrycontroller.ui
+++ /dev/null
@@ -1,57 +0,0 @@
-<ui version="4.0" >
- <class>VP12DGeometryControllerForm</class>
- <widget class="QWidget" name="VP12DGeometryControllerForm" >
-  <property name="geometry" >
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>224</width>
-    <height>206</height>
-   </rect>
-  </property>
-  <property name="windowTitle" >
-   <string>Form</string>
-  </property>
-  <widget class="QGroupBox" name="projectionGroupBox" >
-   <property name="geometry" >
-    <rect>
-     <x>10</x>
-     <y>10</y>
-     <width>120</width>
-     <height>80</height>
-    </rect>
-   </property>
-   <property name="title" >
-    <string>Projection</string>
-   </property>
-   <widget class="QWidget" name="layoutWidget" >
-    <property name="geometry" >
-     <rect>
-      <x>10</x>
-      <y>20</y>
-      <width>40</width>
-      <height>54</height>
-     </rect>
-    </property>
-    <layout class="QVBoxLayout" >
-     <item>
-      <widget class="QRadioButton" name="radio_xy" >
-       <property name="text" >
-        <string>XY</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QRadioButton" name="radio_rz" >
-       <property name="text" >
-        <string>RZ</string>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </widget>
-  </widget>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/graphics/VP1/VP1Systems/VP12DGeometrySystems/src/StoreGateGeometryReader.cxx b/graphics/VP1/VP1Systems/VP12DGeometrySystems/src/StoreGateGeometryReader.cxx
deleted file mode 100644
index 43948283d3a0..000000000000
--- a/graphics/VP1/VP1Systems/VP12DGeometrySystems/src/StoreGateGeometryReader.cxx
+++ /dev/null
@@ -1,1402 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include "VP12DGeometrySystems/StoreGateGeometryReader.h"
-
-#include "CaloDetDescr/CaloDetDescrManager.h"
-#include "CaloDetDescr/CaloDetDescrElement.h"
-#include "CaloDetDescr/CaloDetDescriptor.h"
-#include "TileDetDescr/TileDetDescrManager.h"
-
-#include "LArReadoutGeometry/LArDetectorManager.h"
-#include "GeoModelKernel/GeoDefinitions.h"
-#include "GeoModelKernel/GeoPVConstLink.h"
-#include "GeoModelKernel/GeoTrd.h"
-
-#include "PixelReadoutGeometry/PixelDetectorManager.h"
-#include "SCT_ReadoutGeometry/SCT_DetectorManager.h"
-#include "InDetReadoutGeometry/SiDetectorElement.h"
-#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
-#include "TRT_ReadoutGeometry/TRT_DetectorManager.h"
-#include "TRT_ReadoutGeometry/TRT_BaseElement.h"
-#include "InDetIdentifier/PixelID.h"
-#include "InDetIdentifier/SCT_ID.h"
-#include "IdDictDetDescr/IdDictManager.h"
-
-#include "MuonIdHelpers/MdtIdHelper.h"
-#include "MuonReadoutGeometry/MuonDetectorManager.h"
-#include "MuonReadoutGeometry/MuonStation.h"
-
-#include "GeoPrimitives/GeoPrimitivesHelpers.h"
-#include "GeoPrimitives/EulerAnglesHelpers.h"
-#include "GeoPrimitives/CLHEPtoEigenConverter.h"
-
-
-StoreGateGeometryReader::StoreGateGeometryReader()
-  : m_pixel_manager(nullptr),
-    m_silicon_manager(nullptr),
-    m_trt_manager(nullptr),
-    m_calo_manager(nullptr),
-    m_tile_manager(nullptr),
-    m_lar_manager(nullptr),
-    m_muon_manager(nullptr),
-    m_detStore(nullptr)
-{}
-
-const double StoreGateGeometryReader::m_smallAngle    = 0.05;
-const double StoreGateGeometryReader::m_smallDistance = 100.;
-
-//attempt to parse geometry for each system, return true if succes, false if failure
-bool StoreGateGeometryReader::readGeometry()
-{
-  if (!m_detStore->retrieve(m_pixel_manager, "Pixel"))
-    {
-      std::cout << "Could not retrieve Pixel Manager!" << std::endl;
-      return false;
-    }
-  else
-    readPixelGeometry();
-
-  if (!m_detStore->retrieve(m_silicon_manager, "SCT"))
-    {
-      std::cout << "Could not retrieve SCT Manager!" << std::endl;
-      return false;
-    }
-  else
-    readSCTGeometry();
-
-  // check if SLHC geo is used (TRT not implemented)
-  // if not SLHC, get the TRT Det Descr manager
-  bool isSLHC = false;
-  const IdDictManager* idDictMgr;
-  if (m_detStore->retrieve(idDictMgr, "IdDict").isFailure()) {
-    std::cout << "Could not get IdDictManager !" << std::endl;
-    // return StatusCode::RECOVERABLE;
-  } else {
-    const IdDictDictionary* dict = idDictMgr->manager()->find_dictionary("InnerDetector"); 
-    if(!dict) {
-      std::cout << " Cannot access InnerDetector dictionary "<< std::endl;
-      // return StatusCode::RECOVERABLE;
-    }else{
-      //	if (dict->file_name().find("SLHC")!=std::string::npos) isSLHC=true;
-      if (dict->m_version.find("SLHC")!=std::string::npos) isSLHC=true;
-    }
-  }
- 
-  if(!isSLHC){
-    if (!m_detStore->retrieve(m_trt_manager, "TRT"))
-      {
-	std::cout << "Could not retrieve TRT Manager!" << std::endl;
-	return false;
-      }
-    else
-      readTRTGeometry();
-  }
-
-  readSolenoidGeometry();
-
-//   if (!m_detStore->retrieve(m_calo_manager, "CaloMgr"))
-//     {
-//       std::cout << "Could not retrieve Calo Manager!" << std::endl;
-//       return false;
-//     }
-//   else
-//     {
-//       //lots of weirdo stuff here?
-//       readLArGeometry();
-//     }
-
-  if (!m_detStore->retrieve(m_tile_manager, "Tile"))
-    {
-      std::cout << "Could not retrieve Tile Manager!" << std::endl;
-      return false;
-    }
-  else
-    readTILEGeometry();
-
-  if (!m_detStore->retrieve(m_lar_manager, "LArMgr"))
-    {
-      std::cout << "Could not retreive LAr Manager!" << std::endl;
-      return false;
-    }
-  else
-    readMBTSGeometry();
-
-  if (!m_detStore->retrieve(m_muon_manager))
-    {
-      std::cout << "Could not retrieve Muon Manager!" << std::endl;
-      return false;
-    }
-  else
-    readMuonGeometry();
-
-  return true;
-
-}
-
-
-bool StoreGateGeometryReader::readPixelGeometry()
-{
-  const PixelID* pixelIdHelper = 0;
-  if(m_detStore->retrieve(pixelIdHelper,"PixelID").isFailure() || !pixelIdHelper) return false;
-
-  InDetDD::SiDetectorElementCollection::const_iterator it;
-
-  for (it=m_pixel_manager->getDetectorElementBegin(); it<m_pixel_manager->getDetectorElementEnd(); it++)
-      {
-
-	const InDetDD::SiDetectorElement *element = *it;
-
-	// Just an extra precaution to avoid crashes.
-	if (!element) continue;
-
-	if (element->isBarrel() && pixelIdHelper->phi_module(element->identify()) == 0
-	    && pixelIdHelper->eta_module(element->identify()) == pixelIdHelper->eta_module_min(element->identify()))
-	  {
-
-	    double rMin = element->rMin();
-	    double rMax = element->rMax();
-	    double zMax = element->zMax();
-	    const InDetDD::SiDetectorElement *next = element->nextInEta();
-	    while (next)
-	      {
-		if (next->rMin() < rMin) rMin = next->rMin();
-		if (next->rMax() > rMax) rMax = next->rMax();
-		if (next->zMax() > zMax) zMax = next->zMax();
-		next = next->nextInEta();
-	      }
-	    zMax += 5;
-
-	    Detector* newDetector = new Detector;
-
-	    newDetector->type      = Detector::ABarrelSiliconDetector;
-	    newDetector->name      = "Pixel";
-	    newDetector->color     = Qt::blue;
-	    newDetector->layer     = pixelIdHelper->layer_disk(element->identify());
-	    newDetector->length    = element->length()/10.;
-	    newDetector->width     = element->width()/10.;
-	    newDetector->thickness = (rMax - rMin - element->sinTilt()*element->width())/40.;
-	    newDetector->tilt      = 180./M_PI * asin(element->sinTilt());
-	    newDetector->nz        = pixelIdHelper->eta_module_max(element->identify()) - pixelIdHelper->eta_module_min(element->identify())+1;
-	    newDetector->nphi      = pixelIdHelper->phi_module_max(element->identify())+1;
-	    newDetector->r0        = (rMin+rMax)/20.;
-	    newDetector->phi0      = 180./M_PI * (element->phiMin()+element->phiMax())/2.;
-	    newDetector->zMin      = -zMax/10.;
-	    newDetector->zMax      = zMax/10;
-
-	    mDetectors.push_back(*newDetector);
-
-// 	    out << "<ABarrelSiliconDetector c=\"" << "PIX" << "\" n=\"" << "Pixel" << "\""
-// 		<< " layer=\"" << pixelIdHelper->layer_disk(element->identify()) << "\""
-// 		<< " length=\"" << element->length()/10. << "\""
-// 		<< " width=\"" << element->width()/10. << "\""
-// 		<< " thickness=\"" << (rMax - rMin - element->sinTilt()*element->width())/40. << "\""
-// 		<< " tilt=\"" << 180./M_PI * asin(element->sinTilt()) << "\""
-// 		<< " nz=\"" << pixelIdHelper->eta_module_max(element->identify())
-// 	      - pixelIdHelper->eta_module_min(element->identify())+1 << "\""
-// 		<< " nphi=\"" << pixelIdHelper->phi_module_max(element->identify())+1 << "\""
-// 		<< " r0=\"" << (rMin+rMax)/20. << "\""
-// 		<< " phi0=\"" << 180./M_PI * (element->phiMin()+element->phiMax())/2. << "\""
-// 		<< " zMin=\"" << -zMax/10. << "\""
-// 		<< " zMax=\"" << zMax/10. << "\""
-// 		<< " />" << std::endl;
-	  }
-
-	if (element->isEndcap() && element->zMin() > 0 && pixelIdHelper->phi_module(element->identify()) == 0
-	    && pixelIdHelper->eta_module(element->identify()) == pixelIdHelper->eta_module_min(element->identify()))
-	  {
-
-	    double rMin = element->rMin();
-	    double rMax = element->rMax();
-	    double zMin = element->zMin();
-	    double zMax = element->zMax();
-	    const InDetDD::SiDetectorElement *next = element->nextInEta();
-	    while (next)
-	      {
-		if (next->zMin() < 0) continue;
-		if (next->rMin() < rMin) rMin = next->rMin();
-		if (next->rMax() > rMax) rMax = next->rMax();
-		if (next->zMin() < zMin) zMin = next->zMin();
-		if (next->zMax() > zMax) zMax = next->zMax();
-		next = next->nextInEta();
-	      }
-	    zMin -= 5;
-	    zMax += 5;
-
-	    Detector* newDetector = new Detector;
-
-	    newDetector->type      = Detector::AEndcapSiliconDetector;
-	    newDetector->name      = "Pixel";
-	    newDetector->color     = Qt::blue;
-	    newDetector->layer     = pixelIdHelper->layer_disk(element->identify());
-	    newDetector->length    = element->length()/10.;
-	    newDetector->width     = element->width()/10.;
-	    newDetector->thickness = (rMax - rMin - element->sinTilt()*element->width())/40.;
-	    //newDetector->tilt    = 180./M_PI * asin(element->sinTilt());
-	    newDetector->nz        = pixelIdHelper->eta_module_max(element->identify()) - pixelIdHelper->eta_module_min(element->identify())+1;
-	    newDetector->nphi      = pixelIdHelper->phi_module_max(element->identify())+1;
-	    //newDetector->r0      = (rMin+rMax)/20.;
-	    newDetector->rMin      = rMin/10.;
-	    newDetector->rMax      = rMax/10.;
-	    newDetector->phi0      = 180./M_PI * (element->phiMin()+element->phiMax())/2.;
-	    newDetector->zMin      = -zMax/10.;
-	    newDetector->zMax      = zMax/10;
-
-	    mDetectors.push_back(*newDetector);
-
-// 	    out << "<AEndcapSiliconDetector c=\"" << "PIX" << "\" n=\"" << "Pixel" << "\""
-// 		<< " layer=\"" << pixelIdHelper->layer_disk(element->identify()) << "\""
-// 		<< " length=\"" << element->length()/10. << "\""
-// 		<< " width=\"" << element->width()/10. << "\""
-// 		<< " thickness=\"" << (rMax - rMin - element->sinTilt()*element->width())/40. << "\""
-// 		<< " nz=\"" << pixelIdHelper->eta_module_max(element->identify())
-// 	      - pixelIdHelper->eta_module_min(element->identify())+1 << "\""
-// 		<< " nphi=\"" << pixelIdHelper->phi_module_max(element->identify())+1 << "\""
-// 		<< " rMin=\"" << rMin/10. << "\""
-// 		<< " rMax=\"" << rMax/10. << "\""
-// 		<< " phi0=\"" << 180./M_PI * (element->phiMin()+element->phiMax())/2. << "\""
-// 		<< " zMin=\"" << zMin/10. << "\""
-// 		<< " zMax=\"" << zMax/10. << "\""
-// 		<< " />" << std::endl;
-	  }
-      }
-
-
-    return true;
-}
-
-bool StoreGateGeometryReader::readSCTGeometry()
-{
-  const SCT_ID* siliconIdHelper = 0;
-  if(m_detStore->retrieve(siliconIdHelper,"SCT_ID").isFailure() || !siliconIdHelper)
-    return false;
-
-  InDetDD::SiDetectorElementCollection::const_iterator it;
-
-  for (it=m_silicon_manager->getDetectorElementBegin(); it<m_silicon_manager->getDetectorElementEnd(); it++)
-    {
-
-      const InDetDD::SiDetectorElement *element = *it;
-
-      // Just an extra precaution to avoid crashes.
-      if (!element) continue;
-
-      if (element->isBarrel() && element->zMax() > 0 && siliconIdHelper->phi_module(element->identify()) == 0
-	  && siliconIdHelper->eta_module(element->identify()) == siliconIdHelper->eta_module_min(element->identify())
-	  && siliconIdHelper->side(element->identify()) > 0)
-	{
-
-	  double rMin = element->rMin();
-	  double rMax = element->rMax();
-	  double zMax = element->zMax();
-	  const InDetDD::SiDetectorElement *next = element->nextInEta();
-	  while (next)
-	    {
-	      if (next->rMin() < rMin) rMin = next->rMin();
-	      if (next->rMax() > rMax) rMax = next->rMax();
-	      if (next->zMax() > zMax) zMax = next->zMax();
-	      next = next->nextInEta();
-	    }
-	  next = element->otherSide();
-	  while (next)
-	    {
-	      if (next->rMin() < rMin) rMin = next->rMin();
-	      if (next->rMax() > rMax) rMax = next->rMax();
-	      if (next->zMax() > zMax) zMax = next->zMax();
-	      next = next->nextInEta();
-	    }
-	  zMax += 5;
-
-	  Detector* newDetector = new Detector;
-
-	  newDetector->type      = Detector::ABarrelSiliconDetector;
-	  newDetector->name      = "Silicon";
-	  newDetector->color     = Qt::green;
-	  newDetector->layer     = siliconIdHelper->layer_disk(element->identify());
-	  newDetector->length    = element->length()/10.;
-	  newDetector->width     = element->width()/10.;
-	  newDetector->thickness = 2*(rMax-rMin-element->sinTilt()*element->width())/10.;
-	  newDetector->tilt      = 180./M_PI * asin(element->sinTilt());
-	  newDetector->nz        = siliconIdHelper->eta_module_max(element->identify()) - siliconIdHelper->eta_module_min(element->identify()) + 1;
-	  newDetector->nphi      = siliconIdHelper->phi_module_max(element->identify()) + 1;
-	  newDetector->r0        = (rMin+rMax)/20;
-	  newDetector->phi0      = 180./M_PI + (element->phiMin()+element->phiMax())/2.;
-	  newDetector->zMin      = -zMax/10.;
-	  newDetector->zMax      = zMax/10.;
-
-	  mDetectors.push_back(*newDetector);
-
-// 	  out << "<ABarrelSiliconDetector c=\"" << "SIL" << "\" n=\"" << "Silicon" << "\""
-// 	      << " layer=\"" << siliconIdHelper->layer_disk(element->identify()) << "\""
-// 	      << " length=\"" << element->length()/10. << "\""
-// 	      << " width=\"" << element->width()/10. << "\""
-// 	      << " thickness=\"" << 2. * (rMax - rMin - element->sinTilt()*element->width())/10. << "\""
-// 	      << " tilt=\"" << 180./M_PI * asin(element->sinTilt()) << "\""
-// 	      << " nz=\"" << siliconIdHelper->eta_module_max(element->identify())
-// 	    - siliconIdHelper->eta_module_min(element->identify())+1 << "\""
-// 	      << " nphi=\"" << siliconIdHelper->phi_module_max(element->identify())+1 << "\""
-// 	      << " r0=\"" << (rMin+rMax)/20. << "\""
-// 	      << " phi0=\"" << 180./M_PI * (element->phiMin()+element->phiMax())/2. << "\""
-// 	      << " zMin=\"" << -zMax/10. << "\""
-// 	      << " zMax=\"" << zMax/10. << "\""
-// 	      << " />" << std::endl;
-	}
-
-      if (element->isEndcap() && element->zMin() > 0 && siliconIdHelper->phi_module(element->identify()) == 0
-	  && siliconIdHelper->eta_module(element->identify()) == siliconIdHelper->eta_module_min(element->identify())
-	  && siliconIdHelper->side(element->identify()) > 0)
-	{
-
-	  double rMin = element->rMin();
-	  double rMax = element->rMax();
-	  double zMin = element->zMin();
-	  double zMax = element->zMax();
-	  const InDetDD::SiDetectorElement *next = element->nextInEta();
-	  while (next)
-	    {
-	      if (next->zMin() < 0) continue;
-	      if (next->rMin() < rMin) rMin = next->rMin();
-	      if (next->rMax() > rMax) rMax = next->rMax();
-	      if (next->zMin() < zMin) zMin = next->zMin();
-	      if (next->zMax() > zMax) zMax = next->zMax();
-	      next = next->nextInEta();
-	    }
-	  next = element->otherSide();
-	  while (next)
-	    {
-	      if (next->zMin() < 0) continue;
-	      if (next->rMin() < rMin) rMin = next->rMin();
-	      if (next->rMax() > rMax) rMax = next->rMax();
-	      if (next->zMin() < zMin) zMin = next->zMin();
-	      if (next->zMax() > zMax) zMax = next->zMax();
-	      next = next->nextInEta();
-	    }
-	  zMin -= 5;
-	  zMax += 5;
-
-	  Detector* newDetector = new Detector;
-
-	  newDetector->type      = Detector::AEndcapSiliconDetector;
-	  newDetector->name      = "Silicon";
-	  newDetector->color     = Qt::green;
-	  newDetector->layer     = siliconIdHelper->layer_disk(element->identify());
-	  newDetector->length    = element->length()/10.;
-	  newDetector->width     = element->width()/10.;
-	  newDetector->thickness = 2*(rMax-rMin-element->sinTilt()*element->width())/10.;
-	  //newDetector->tilt    = 180./M_PI * asin(element->sinTilt());
-	  newDetector->nz        = siliconIdHelper->eta_module_max(element->identify()) - siliconIdHelper->eta_module_min(element->identify()) + 1;
-	  newDetector->nphi      = siliconIdHelper->phi_module_max(element->identify()) + 1;
-	  //newDetector->r0      = (rMin+rMax)/20;
-	  newDetector->rMin      = rMin/10.;
-	  newDetector->rMax      = rMax/10.;
-	  newDetector->phi0      = 180./M_PI + (element->phiMin()+element->phiMax())/2.;
-	  newDetector->zMin      = -zMax/10.;
-	  newDetector->zMax      = zMax/10.;
-
-	  mDetectors.push_back(*newDetector);
-
-// 	  out << "<AEndcapSiliconDetector c=\"" << "SIL" << "\" n=\"" << "Silicon" << "\""
-// 	      << " layer=\"" << siliconIdHelper->layer_disk(element->identify()) << "\""
-// 	      << " length=\"" << element->length()/10. << "\""
-// 	      << " width=\"" << element->width()/10. << "\""
-// 	      << " thickness=\"" << 2. * (rMax - rMin - element->sinTilt()*element->width())/10. << "\""
-// 	      << " nz=\"" << siliconIdHelper->eta_module_max(element->identify())
-// 	    - siliconIdHelper->eta_module_min(element->identify())+1 << "\""
-// 	      << " nphi=\"" << siliconIdHelper->phi_module_max(element->identify())+1 << "\""
-// 	      << " rMin=\"" << rMin/10. << "\""
-// 	      << " rMax=\"" << rMax/10. << "\""
-// 	      << " phi0=\"" << 180./M_PI * (element->phiMin()+element->phiMax())/2. << "\""
-// 	      << " zMin=\"" << zMin/10. << "\""
-// 	      << " zMax=\"" << zMax/10. << "\""
-// 	      << " />" << std::endl;
-	}
-    }
-  return true;
-}
-
-bool StoreGateGeometryReader::readTRTGeometry()
-{
-
-  InDetDD::TRT_DetElementCollection::const_iterator it;
-  const TRT_ID *trtIdHelper = 0;
-  if(m_detStore->retrieve(trtIdHelper,"").isFailure() || !trtIdHelper)
-    return false;
-
-  for (it=m_trt_manager->getDetectorElementBegin(); it<m_trt_manager->getDetectorElementEnd(); it++)
-    {
-
-      const InDetDD::TRT_BaseElement *elementIn = *it;
-
-      // Just an extra precaution to avoid crashes.
-      if (!elementIn) continue;
-
-      Identifier id = elementIn->identify();
-
-
-      if (trtIdHelper->phi_module(id) != 0) continue;
-      if (trtIdHelper->straw_layer(id) != 0) continue;
-      Amg::Vector3D posIn = elementIn->strawTransform(0) * Amg::Vector3D(0., 0., 0.);
-      if (posIn.z() < 0) continue;
-
-      const InDetDD::TRT_BaseElement *elementOut;
-
-      if (trtIdHelper->is_barrel(id))
-	{
-	  elementOut = m_trt_manager->getBarrelElement(trtIdHelper->barrel_ec(id),
-						       trtIdHelper->layer_or_wheel(id),
-						       0,
-						       trtIdHelper->straw_layer_max(id));
-
-	  // Just an extra precaution to avoid crashes.
-	  if (!elementOut) continue;
-
-	  Amg::Vector3D posOut = elementOut->strawTransform(0) * Amg::Vector3D(0., 0., 0.);
-
-	  const InDetDD::TRT_BarrelElement *element = dynamic_cast<const InDetDD::TRT_BarrelElement *>(elementIn);
-	  if (!element) continue;
-	  int nphi = (int) round(2.*M_PI / fabs(element->nextInPhi()->center().phi() - element->center().phi()));
-	  double dphiIn = 2.*M_PI / (nphi * trtIdHelper->straw_max(elementIn->identify()));
-	  double dphiOut = 2.*M_PI / (nphi * trtIdHelper->straw_max(elementOut->identify()));
-
-	  Detector* newDetector = new Detector;
-
-	  newDetector->type   = Detector::ABarrelTRTDetector;
-	  newDetector->name   = "TRT";
-	  newDetector->color  = Qt::red;
-	  newDetector->layer  = trtIdHelper->layer_or_wheel(id);
-	  newDetector->nphi   = nphi;
-	  newDetector->rMin   = posIn.perp()/10. - 0.4;
-	  newDetector->rMax   = posOut.perp()/10. + 0.4;
-	  newDetector->phiIn  = 180./M_PI * (posIn.phi() - dphiIn - 2e-3);
-	  newDetector->phiOut = 180./M_PI * (posOut.phi() - dphiOut - 2e-3);
-	  newDetector->zMin   = -(posIn.z() + elementIn->strawLength()/2.)/10.;
-	  newDetector->zMax   = (posIn.z() + elementIn->strawLength()/2.)/10.;
-
-	  mDetectors.push_back(*newDetector);
-
-// 	  out << "<ABarrelTRTDetector c=\"TRT\" n=\"TRT\""
-// 	      << " layer=\"" << trtIdHelper->layer_or_wheel(id) << "\""
-// 	      << " nphi=\"" << nphi << "\""
-// 	      << " rMin=\"" << posIn.perp()/10. - .4 << "\""
-// 	      << " rMax=\"" << posOut.perp()/10. + .4 << "\""
-// 	      << " phiIn=\"" << 180./M_PI * (posIn.phi() - dphiIn - 2e-3) << "\""
-// 	      << " phiOut=\"" << 180./M_PI * (posOut.phi() - dphiOut - 2e-3) << "\""
-// 	      << " zMin=\"" << -(posIn.z() + elementIn->strawLength()/2.)/10. << "\""
-// 	      << " zMax=\"" << (posIn.z() + elementIn->strawLength()/2.)/10. << "\""
-// 	      << " />" << std::endl;
-	}
-
-      else
-	{
-	  elementOut = m_trt_manager->getEndcapElement(1,//trtIdHelper->barrel_ec(id),
-						       trtIdHelper->layer_or_wheel(id),
-						       trtIdHelper->straw_layer_max(id),
-						       0);
-
-	  // Just an extra precaution to avoid crashes.
-	  if (!elementOut) continue;
-
-	  Amg::Vector3D posOut = elementOut->strawTransform(trtIdHelper->straw_max(id)) * Amg::Vector3D(0., 0., 0.);
-
-	  // floor() instead of round() becuase we are neglecting the space between two modules
-	  int nphi = (int) floor(2.*M_PI / fabs(posOut.phi() - posIn.phi()));
-
-	  Detector* newDetector = new Detector;
-
-	  newDetector->type   = Detector::AEndcapTRTDetector;
-	  newDetector->name   = "TRT";
-	  newDetector->color  = Qt::red;
-	  newDetector->layer  = trtIdHelper->layer_or_wheel(id);
-	  newDetector->nphi   = nphi;
-	  newDetector->rMin   = (posIn.perp() - elementIn->strawLength()/2.)/10.;
-	  newDetector->rMax   = (posIn.perp() + elementIn->strawLength()/2.)/10.;
-	  newDetector->phi0   = 180./M_PI * posIn.phi();
-	  //newDetector->phiOut = 180./M_PI * (posOut.phi() - dphiOut - 2e-3);
-	  newDetector->zMin   = posIn.z()/10.;
-	  newDetector->zMax   = posOut.z()/10.;
-
-	  mDetectors.push_back(*newDetector);
-
-
-// 	  out << "<AEndcapTRTDetector c=\"TRT\" n=\"TRT\""
-// 	      << " layer=\"" << trtIdHelper->layer_or_wheel(id) << "\""
-// 	      << " nphi=\"" << nphi << "\""
-// 	      << " rMin=\"" << (posIn.perp()-elementIn->strawLength()/2.)/10. << "\""
-// 	      << " rMax=\"" << (posIn.perp()+elementIn->strawLength()/2.)/10. << "\""
-// 	      << " phi0=\"" << 180./M_PI * posIn.phi() << "\""
-// 	      << " zMin=\"" << posIn.z()/10. << "\""
-// 	      << " zMax=\"" << posOut.z()/10. << "\""
-// 	      << " />" << std::endl;
-	}
-
-    }
-  return true;
-}
-
-bool StoreGateGeometryReader::readSolenoidGeometry()
-{
-  double zIn = -265.0;
-  double zOut = 265.0;
-  double rIn = 122.9;
-  double rOut = 127.4;
-
-  Detector* newDetector = new Detector;
-
-  newDetector->type       = Detector::ADisc;
-  newDetector->name       = "Solenoid";
-  newDetector->color      = Qt::darkGray;
-  newDetector->projection = "YX";
-  newDetector->rInner     = rIn;
-  newDetector->rOuter     = rOut;
-
-  mDetectors.push_back(*newDetector);
-
-  //   out << "<ADisc p=\"YX\" c=\"Sol\"  n=\"Solenoid\""
-  //       << " rIn=\"" << rIn << "\""
-  //       << " rOut=\"" << rOut << "\" />"
-  //       << std::endl;
-
-  newDetector = new Detector;
-
-  newDetector->type       = Detector::ARectangle;
-  newDetector->color      = Qt::darkGray;
-  newDetector->name       = "Solenoid";
-  newDetector->projection = "RZ";
-  newDetector->xMin       = zIn;
-  newDetector->xMax       = zOut;
-  newDetector->yMin       = rIn;
-  newDetector->yMax       = rOut;
-  newDetector->xReflect   = false;//TK: was "NO" in the original code
-
-  mDetectors.push_back(*newDetector);
-
-//   out << "<ARectangle p=\"RZ\" c=\"Sol\" n=\"Solenoid\""
-//       << " xMin=\"" << zIn << "\""
-//       << " xMax=\"" << zOut << "\""
-//       << " yMin=\"" << rIn << "\""
-//       << " yMax=\"" << rOut << "\""
-//       << " xR=\"NO\" />"
-//       << std::endl;
-
-  return true;
-
-}
-
-bool StoreGateGeometryReader::readTILEGeometry()
-{
-  const TileID *tileIdHelper = m_tile_manager->get_id();
-  TileDetDescrManager::tile_descr_const_iterator tileIt;
-  for (tileIt=m_tile_manager->tile_descriptors_begin(); tileIt!=m_tile_manager->tile_descriptors_end(); tileIt++)
-    {
-      const TileDetDescriptor *descriptor = *tileIt;
-      if (!descriptor) continue;
-
-      int i;
-      for (i=0; i<descriptor->n_samp(); i++)
-	{
-
-	  if (descriptor->zcenter(i) <= 0) continue;
-
-	  std::string name;
-	  if (tileIdHelper->is_tile_barrel(descriptor->identify())) name = "TILE Barrel";
-	  else if (tileIdHelper->is_tile_extbarrel(descriptor->identify())) name = "Extended TILE";
-	  else if (tileIdHelper->is_tile_gap(descriptor->identify())) name = "ITC Gap";
-	  else if (tileIdHelper->is_tile_gapscin(descriptor->identify())) name = "ITC Gap Scintillator";
-	  else name = "TILE";
-
-	  if (!name.compare(0, 3, "ITC"))
-	    {
-	      Detector* newDetector = new Detector;
-
-	      newDetector->type     = Detector::AGapCalorimeter;
-	      newDetector->name     = name;
-	      newDetector->color    = Qt::cyan;
-	      newDetector->sampling = ( i < 3 ? i : 3);
-	      newDetector->region   = 0;
-	      newDetector->rMin     = (descriptor->rcenter(i) - descriptor->dr(i)/2.)/10.;
-	      newDetector->rMax     = (descriptor->rcenter(i) + descriptor->dr(i)/2.)/10.;
-	      newDetector->zMin     = (descriptor->zcenter(i) - descriptor->dz(i))/10.;
-	      newDetector->zMax     = (descriptor->zcenter(i) + descriptor->dz(i))/10.;
-	      newDetector->eta      = (i < 3 ? tileIdHelper->eta_min(descriptor->identify())-i+2 : i);
-	      newDetector->phi0     = descriptor->phi_min();
-	      newDetector->nphi     = descriptor->n_phi();
-
-	      mDetectors.push_back(*newDetector);
-
-// 	      out << "<AGapCalorimeter c=\"" << "HCAL" << "\" n=\"" << name << "\""
-// 		  << " sampling=\"" << (i < 3 ? i : 3)  << "\" region=\"" << 0 << "\""
-// 		  << " rMin=\"" << (descriptor->rcenter(i)-descriptor->dr(i)/2.)/10. << "\""
-// 		  << " rMax=\"" << (descriptor->rcenter(i)+descriptor->dr(i)/2.)/10. << "\""
-// 		  << " zMin=\"" << (descriptor->zcenter(i)-descriptor->dz(i))/10. << "\""
-// 		  << " zMax=\"" << (descriptor->zcenter(i)+descriptor->dz(i))/10. << "\""
-// 		  << " eta=\"" << (i < 3 ? tileIdHelper->eta_min(descriptor->identify())-i+2 : i) << "\""
-// 		  << " phi0=\"" << descriptor->phi_min() << "\""
-// 		  << " nphi=\"" << descriptor->n_phi() << "\""
-// 		  << " />" << std::endl;
-	    }
-
-	  else
-	    {
-	      int section = tileIdHelper->section(descriptor->identify());
-	      int side = tileIdHelper->side(descriptor->identify());
-	      int module = tileIdHelper->module(descriptor->identify());
-	      int tower = tileIdHelper->tower(descriptor->identify());
-	      Identifier id = tileIdHelper->cell_id(section, side, module, tower, i);
-
-	      Detector* newDetector = new Detector;
-
-	      newDetector->type     = Detector::ABarrelCalorimeter;
-	      newDetector->name     = name;
-	      newDetector->color    = Qt::cyan;
-	      newDetector->sampling = i;
-	      newDetector->region   = 0;
-	      newDetector->rMin     = (descriptor->rcenter(i) - descriptor->dr(i)/2.)/10.;
-	      newDetector->rMax     = (descriptor->rcenter(i) + descriptor->dr(i)/2.)/10.;
-	      newDetector->zMin     = (descriptor->zcenter(i) - descriptor->dz(i))/10.;
-	      newDetector->zMax     = (descriptor->zcenter(i) + descriptor->dz(i))/10.;
-	      newDetector->eta0     = descriptor->eta_min(i);
-	      newDetector->deta     = descriptor->deta(i);
-	      newDetector->neta     = descriptor->n_eta(i);
-	      newDetector->meta     = tileIdHelper->eta_min(id);
-	      newDetector->phi0     = descriptor->phi_min();
-	      newDetector->nphi     = descriptor->n_phi();
-
-	      mDetectors.push_back(*newDetector);
-
-// 	      out << "<ABarrelCalorimeter c=\"" << "HCAL" << "\" n=\"" << name << "\""
-// 		  << " sampling=\"" << i << "\" region=\"" << 0 << "\""
-// 		  << " rMin=\"" << (descriptor->rcenter(i)-descriptor->dr(i)/2.)/10. << "\""
-// 		  << " rMax=\"" << (descriptor->rcenter(i)+descriptor->dr(i)/2.)/10. << "\""
-// 		  << " zMin=\"" << (descriptor->zcenter(i)-descriptor->dz(i))/10. << "\""
-// 		  << " zMax=\"" << (descriptor->zcenter(i)+descriptor->dz(i))/10. << "\""
-// 		  << " eta0=\"" << descriptor->eta_min(i) << "\""
-// 		  << " deta=\"" << descriptor->deta(i) << "\""
-// 		  << " neta=\"" << descriptor->n_eta(i) << "\""
-// 		  << " meta=\"" << tileIdHelper->eta_min(id) << "\""
-// 		  << " phi0=\"" << descriptor->phi_min() << "\""
-// 		  << " nphi=\"" << descriptor->n_phi() << "\""
-// 		  << " />" << std::endl;
-	    }
-	}
-    }
-
-  return true;
-}
-
-bool StoreGateGeometryReader::readMBTSGeometry()
-{
-  PVConstLink myVol = m_lar_manager->getTreeTop(1U);
-  for (unsigned int c=0; c< myVol->getNChildVols();c++)
-    {
-      PVConstLink child = myVol->getChildVol(c);
-       if((child->getLogVol())->getName()=="MBTS_mother")
-	 {
-	   int sampling=0,numPhi=0;
-	   std::string stringOfNames="";
-	   GeoTrf::Vector3D translate = (child->getX()).translation();
-	   double zlocation = translate.z();
-    	  if(zlocation<0)
-	    zlocation=-zlocation;
-    	  for (unsigned int cc=0; cc< child->getNChildVols();cc++)
-	    {
-	      if(((child->getChildVol(cc))->getLogVol())->getName()=="MBTS1")
-    	        numPhi++;
-	    }
-    	  for (unsigned int cc=0; cc< child->getNChildVols();cc++)
-	    {
-	      PVConstLink childschild = child->getChildVol(cc);
-	      if((childschild->getLogVol())->getShape()->typeID() == GeoTrd::getClassTypeID() )
-		{
-		  std::string currentName = (childschild->getLogVol())->getName();
-		  if(stringOfNames.find(currentName,0) == std::string::npos)
-		    {
-		      stringOfNames+=" " + currentName;
-		      GeoTrf::Vector3D translateToChild = (child->getXToChildVol(cc)).translation();
-		      const GeoTrd* theTrd = dynamic_cast<const GeoTrd*> ((childschild->getLogVol())->getShape());
-		      double rho=pow(translateToChild.x(),2.0) + pow(translateToChild.y(),2.0);
-		      rho=pow(rho,0.5);
-		      double RMin=rho-theTrd->getZHalfLength();
-		      double RMax=rho+theTrd->getZHalfLength();
-		      double zmovement=translateToChild.z();
-		      double zthickness=theTrd->getXHalfLength1();
-
-		      Detector* newDetector = new Detector;
-
-		      newDetector->type = Detector::AEndcapCryostat;
-		      newDetector->name = "Minimum Bias Trigger Scintillators";
-		      newDetector->color= Qt::cyan;
-		      newDetector->sampling = sampling;
-		      newDetector->rMin = RMin/10.;
-		      newDetector->rMax = RMax/10.;
-		      newDetector->zMin = (zlocation + zmovement - zthickness)/10.;
-		      newDetector->zMax = (zlocation + zmovement + zthickness)/10.;
-		      newDetector->neta = 1;
-		      newDetector->nphi = numPhi;
-
-		      mDetectors.push_back(*newDetector);
-
-// 		      out << "<AEndcapCryostat c=\"HCAL\" n=\"Minimum Bias Trigger Scintillators\""
-// 			  << " sampling=\"" << sampling << "\" region=\"" << 0 << "\""
-// 			  << " rMin=\"" << RMin/10. << "\""
-// 			  << " rMax=\"" << RMax/10. << "\""
-// 			  << " zMin=\"" << (zlocation+zmovement-zthickness)/10. << "\""
-// 			  << " zMax=\"" << (zlocation+zmovement+zthickness)/10. << "\""
-// 			  << " neta=\"" << "1" << "\""
-// 			  << " nphi=\"" << numPhi << "\""
-// 			  << " />" << std::endl;
-
-		      sampling++;
-		    }
-		}
-	    }
-	 }
-    }
-  return true;
-}
-
-bool StoreGateGeometryReader::readLArGeometry()
-{
-  QColor lArColor;
-  const CaloCell_ID *idHelper = m_calo_manager->getCaloCell_ID();
-  CaloDetDescrManager::calo_element_const_iterator it;
-  Detector* newDetector{nullptr};
-
-  // This code is not very efficient in terms of speed. Since it will only be used
-  // when the geometry has changed, the code is made to be easily readable instead.
-  for (int type=0; type<m_numCaloTypes; type++)
-    {
-
-      for (int region=0; region<8; region++)
-	{
-
-	  for (int inner=0; inner<2; inner++)
-	    {
-
-	      int minEtaIndex = 0, maxEtaIndex = 0;
-	      double minEta = 0.0;
-	      const CaloDetDescrElement *oneSuchElement = 0;
-
-	      for (it=m_calo_manager->element_begin(); it<m_calo_manager->element_end(); it++)
-		{
-
-		  const CaloDetDescrElement *element = *it;
-		  int etaIndex, phiIndex;
-		  std::string technology;
-		  std::string name;
-
-		  if (!element) continue;
-
-		  Identifier id = element->identify();
-
-		  // Select everything but TILE.
-		  if (element->is_tile()) continue;
-
-		  // Select only this sampling.
-		  if (element->getSampling() != type) continue;
-
-		  // Select only this region.
-		  if (element->is_lar_fcal())
-		    {
-		      if (idHelper->eta(id) != idHelper->eta_min(id) || idHelper->side(id) < 0) continue;
-
-		    }
-
-		  else
-		    {
-		      if (idHelper->region(id) != region) continue;
-		    }
-
-		  // Differentiate between the LAr inner/outer endcap
-		  if (inner > 0 && !idHelper->is_em_endcap_inner(id)) continue;
-
-		  // Skip -z, we will mirror +z.
-		  if (element->z() < 0) continue;
-
-		  // Select only the first element in phi.
-		  etaIndex = idHelper->eta(id);
-		  phiIndex = idHelper->phi(id);
-		  if (phiIndex > 0) continue;
-
-		  if (!oneSuchElement)
-		    {
-		      oneSuchElement = element;
-		      minEtaIndex = maxEtaIndex = etaIndex;
-		      minEta = element->eta();
-		    }
-		  else
-		    {
-		      if (etaIndex < minEtaIndex)
-			{
-			  minEtaIndex = etaIndex;
-			  minEta = element->eta();
-			}
-		      if (etaIndex > maxEtaIndex) {
-
-			maxEtaIndex = etaIndex;
-		      }
-		    }
-		}
-
-	      if (oneSuchElement)
-		{
-
-		  std::string color;
-		  std::string name;
-		  int sampling = 0;
-		  enum {BARREL, ENDCAP, FORWARD} part;
-
-		  const CaloDetDescriptor *descriptor = oneSuchElement->descriptor();
-
-		  switch(type)
-		    {
-		    case CaloCell_ID::PreSamplerB:
-		      color = "ECAL";
-		      lArColor = Qt::cyan;
-		      name = "LAr Presampler";
-		      sampling = 0;
-		      part = BARREL;
-		      break;
-		    case CaloCell_ID::EMB1:
-		    case CaloCell_ID::EMB2:
-		    case CaloCell_ID::EMB3:
-		      color = "ECAL";
-		      lArColor = Qt::cyan;
-		      name = "LAr";
-		      sampling = type - CaloCell_ID::PreSamplerB;
-		      part = BARREL;
-		      break;
-		    case CaloCell_ID::PreSamplerE:
-		      color = "ECAL";
-		      lArColor = Qt::cyan;
-		      name = "LAr_EC_Presampler";
-		      part = ENDCAP;
-		      break;
-		    case CaloCell_ID::EME1:
-		    case CaloCell_ID::EME2:
-		    case CaloCell_ID::EME3:
-		      color = "ECAL";
-		      lArColor = Qt::cyan;
-		      name = inner ? "LAr Inner Endcap" : "LAr Outer Endcap";
-		      sampling = type - CaloCell_ID::PreSamplerE;
-		      part = ENDCAP;
-		      break;
-		    case CaloCell_ID::HEC0:
-		    case CaloCell_ID::HEC1:
-		    case CaloCell_ID::HEC2:
-		    case CaloCell_ID::HEC3:
-		      color = "HCAL";
-		      lArColor = Qt::darkCyan;
-		      name = "HEC";
-		      sampling = type - CaloCell_ID::HEC0;
-		      part = ENDCAP;
-		      break;
-		    case CaloCell_ID::FCAL0:
-		      color = "ECAL";
-		      lArColor = Qt::cyan;
-		      name = "FCAL EM";
-		      part = FORWARD;
-		      break;
-		    case CaloCell_ID::FCAL1:
-		      color = "HCAL";
-		      lArColor = Qt::darkCyan;
-		      name = "FCAL HAD 1";
-		      part = FORWARD;
-		      break;
-		    case CaloCell_ID::FCAL2:
-		      color = "HCAL";
-		      lArColor = Qt::darkCyan;
-		      name = "FCAL HAD 2";
-		      part = FORWARD;
-		      break;
-		    default:
-		      assert(0&&"Unknown CaloCell_ID type");
-		      part = BARREL;//To avoid compile warning - but should never happen.
-		    }
-
-		  double phi0 = 180./M_PI * (oneSuchElement->phi()-oneSuchElement->dphi()/2.);
-		  int numPhi = (int) round(2.*M_PI / oneSuchElement->dphi());
-		  int numEta = maxEtaIndex - minEtaIndex + 1;
-
-		  switch (part)
-		    {
-		    case BARREL:
-
-		      newDetector = new Detector;
-
-		      newDetector->type = Detector::ABarrelCalorimeter;
-		      newDetector->name = name;
-		      newDetector->color= lArColor;
-		      newDetector->sampling = sampling;
-		      newDetector->region = region % 8;
-		      newDetector->rMin = (oneSuchElement->r() - oneSuchElement->dr()/2.)/10.;
-		      newDetector->rMax = (oneSuchElement->r() + oneSuchElement->dr()/2.)/10.;
-		      newDetector->zMin = m_larMin[type];
-		      newDetector->zMax = m_larMax[type];
-		      newDetector->eta0 = minEta - oneSuchElement->deta()/2.;
-		      newDetector->deta = oneSuchElement->deta();
-		      newDetector->neta = numEta;
-		      newDetector->meta = minEtaIndex;
-		      newDetector->phi0 = phi0;
-		      newDetector->nphi = numPhi;
-
-		      mDetectors.push_back(*newDetector);
-
-// 		      out << "<ABarrelCalorimeter c=\"" << color << "\" n=\"" << name << "\""
-// 			  << " sampling=\"" << sampling << "\" region=\"" << region%8 << "\""
-// 			  << " rMin=\"" << (oneSuchElement->r()-oneSuchElement->dr()/2.)/10. << "\""
-// 			  << " rMax=\"" << (oneSuchElement->r()+oneSuchElement->dr()/2.)/10. << "\""
-// 			  << " zMin=\"" << m_larMin[type] << "\""
-// 			  << " zMax=\"" << m_larMax[type] << "\""
-// 			  << " eta0=\"" << minEta-oneSuchElement->deta()/2. << "\""
-// 			  << " deta=\"" << oneSuchElement->deta() << "\""
-// 			  << " neta=\"" << numEta << "\""
-// 			  << " meta=\"" << minEtaIndex << "\""
-// 			  << " phi0=\"" << phi0 << "\""
-// 			  << " nphi=\"" << numPhi << "\""
-// 			  << " />" << std::endl;
-		      break;
-		    case ENDCAP:
-
-		      newDetector = new Detector;
-
-		      newDetector->type     = Detector::AEndcapCalorimeter;
-		      newDetector->name     = name;
-		      newDetector->color    = lArColor;
-		      newDetector->sampling = sampling;
-		      newDetector->region   = region % 8;
-		      newDetector->rMin     = m_larMin[type];
-		      newDetector->rMax     = m_larMax[type];
-		      newDetector->zMin     = (oneSuchElement->z() - oneSuchElement->dz()/2.)/10.;
-		      newDetector->zMax     = (oneSuchElement->z() + oneSuchElement->dz()/2.)/10.;
-		      newDetector->eta0     = minEta - oneSuchElement->deta()/2.;
-		      newDetector->deta     = oneSuchElement->deta();
-		      newDetector->neta     = numEta;
-		      newDetector->meta     = minEtaIndex;
-		      newDetector->phi0     = phi0;
-		      newDetector->nphi     = numPhi;
-
-		      mDetectors.push_back(*newDetector);
-
-// 		      out << "<AEndcapCalorimeter c=\"" << color << "\" n=\"" << name << "\""
-// 			  << " sampling=\"" << sampling << "\" region=\"" << region%8 << "\""
-// 			  << " rMin=\"" << m_larMin[type] << "\""
-// 			  << " rMax=\"" << m_larMax[type] << "\""
-// 			  << " zMin=\"" << (oneSuchElement->z()-oneSuchElement->dz()/2.)/10. << "\""
-// 			  << " zMax=\"" << (oneSuchElement->z()+oneSuchElement->dz()/2.)/10. << "\""
-// 			  << " eta0=\"" << minEta-oneSuchElement->deta()/2. << "\""
-// 			  << " deta=\"" << oneSuchElement->deta() << "\""
-// 			  << " neta=\"" << numEta << "\""
-// 			  << " meta=\"" << minEtaIndex << "\""
-// 			  << " phi0=\"" << phi0 << "\""
-// 			  << " nphi=\"" << numPhi << "\""
-// 			  << " />" << std::endl;
-		      break;
-		    case FORWARD:
-
-		      newDetector = new Detector;
-
-		      newDetector->type = Detector::ADisc;
-		      newDetector->name = name;
-		      newDetector->color= lArColor;
-		      newDetector->projection = "YX";
-		      newDetector->rInner = descriptor->calo_r_min()/10.;
-		      newDetector->rOuter = descriptor->calo_r_max()/10.;
-
-		      mDetectors.push_back(*newDetector);
-
-// 		      out << "<ADisc p=\"YX\" c=\"" << color << "\" n=\"" << name << "\""
-// 			  << " rIn=\"" << descriptor->calo_r_min()/10. << "\""
-// 			  << " rOut=\"" << descriptor->calo_r_max()/10. << "\""
-// 			  << " />" << std::endl;
-
-		      newDetector = new Detector;
-
-		      newDetector->type = Detector::ARectangle;
-		      newDetector->name = name;
-		      newDetector->color= lArColor;
-		      newDetector->projection = "RZ";
-		      newDetector->xMin = descriptor->calo_z_min()/10.;
-		      newDetector->xMax = descriptor->calo_z_max()/10.;
-		      newDetector->yMin = descriptor->calo_r_min()/10.;
-		      newDetector->yMax = descriptor->calo_r_max()/10.;
-
-		      mDetectors.push_back(*newDetector);
-
-// 		      out << "<ARectangle p=\"RZ\" c=\"" << color << "\" n=\"" << name << "\""
-// 			  << " xMin=\"" << descriptor->calo_z_min()/10. << "\""
-// 			  << " xMax=\"" << descriptor->calo_z_max()/10. << "\""
-// 			  << " yMin=\"" << descriptor->calo_r_min()/10. << "\""
-// 			  << " yMax=\"" << descriptor->calo_r_max()/10. << "\""
-// 			  << " />" << std::endl;
-		    }
-		}
-	    }
-	}
-    }
-  return true;
-}
-
-bool StoreGateGeometryReader::readToDiscElement()
-{
-  return true;
-}
-
-bool StoreGateGeometryReader::readToRectElement()
-{
-  return true;
-}
-
-bool StoreGateGeometryReader::readToRectanglishElement()
-{
-  return true;
-}
-
-bool StoreGateGeometryReader::readMuonGeometry()
-{
-  QColor muonColor;
-  // While we retrieve the MdtIdHelper, we use the functionality provided by its parent class MuonIdHelper
-  // this is not MDT specific and any of the other IdHelpers would have worked as well.
-  const MdtIdHelper *mdtIdHelper = m_muon_manager->mdtIdHelper();
-  int snMax = mdtIdHelper->nStationNames()-1;
-  Detector* newDetector{nullptr};
-  
-  // Loop over all station types.
-  for (int sn=0; sn<=snMax; sn++)
-    {
-      std::string stationName = mdtIdHelper->stationNameString(sn);
-
-      // Determine the type of chamber from the stationName string.
-      std::string stationTech;
-      switch(stationName[0])
-	{
-	case 'B':
-	case 'E':
-	  stationTech = "MDT";
-	  muonColor = Qt::white;
-	  break;
-	case 'C':
-	  stationTech = "CSC";
-	  muonColor = Qt::gray;
-	  break;
-	case 'T':
-	  stationTech = "TGC";
-	  muonColor = Qt::darkGray;
-	  break;
-	default:
-	  stationTech = "???";
-	  muonColor = Qt::lightGray;
-	  break;
-	}
-
-      // The TGCs contain several stations in one sector. As this would create several stations with the same
-      // identifier, people apparently chose to let the phi index of the stations continue up to 3 or even 6
-      // times the "real" maximum value. We need to determine this maximum value in order to calculate the real
-      // phi index.
-      int maxPhi;
-      if (stationTech == "TGC")
-	{
-	  if (stationName[2] == 'E' && stationName[1] != '4')
-	    {
-	      maxPhi = 48;
-	    }
-	  else
-	    {
-	      maxPhi = 24;
-	    }
-	}
-      else
-	{
-	  maxPhi = 8;
-	}
-
-      // Loop over all eta values.
-      for (int eta=0; eta<=16; eta++)
-	{
-	  std::vector<const MuonGM::MuonStation *> *stations = new std::vector<const MuonGM::MuonStation *>;
-
-	  // And loop over all possible phi values.
-	  for (int phi=maxPhi; phi>0; phi--)
-	    {
-
-	      // Try to retrieve the station, it might not exist, but this seems to be the most
-	      // reliable way to find out.
-	      const MuonGM::MuonStation *station = m_muon_manager->getMuonStation(stationName, eta, phi);
-
-	      // If station != 0, the station exists and we add it to our vector.
-	      if (station) stations->push_back(station);
-	    }
-
-	  // While there are stations that haven't been written to XML, stay in this loop.
-	  while (stations->size() > 0)
-	    {
-
-	      // Take the parameters of a station and store them in the variables with the "1" suffix.
-	      const MuonGM::MuonStation *station1 = *(stations->end()-1);
-
-	      Amg::Vector3D pos1 = getPosition(station1, maxPhi);
-	      int phi1 = station1->getPhiIndex();
-	      double dphi1 = getDeltaPhi(pos1, maxPhi);
-	      double shift1 = getShift(pos1, dphi1);
-	      double alpha1 = getAlpha( Amg::CLHEPTransformToEigen(station1->getTransform()) );
-
-	      // Now determine the dimensions of a station of this station.
-	      double zi1 = pos1.z() - station1->Zsize()/2.;    // inner z
-	      double zo1 = pos1.z() + station1->Zsize()/2.;    // outer z
-	      double ri1 = pos1.perp() - station1->Rsize()/2.; // inner r
-	      double ro1 = pos1.perp() + station1->Rsize()/2.; // outer r
-	      double wi1 = station1->Ssize();                  // width at inner r
-	      double wo1 = station1->LongSsize();              // width at outer r
-
-	      // Create the string containing the phi sectors this station is in.
-	      std::stringstream sstream1;
-	      sstream1 << phi1;
-	      std::string phiString = sstream1.str();
-
-	      // Remove this station from the to-be-processed list.
-	      stations->erase(stations->end()-1, stations->end());
-
-	      // Now loop over the other stations and see if any of them have the same parameters. Do
-	      // this in reverse order to allow the current station to be erased from the vector.
-	      std::vector<const MuonGM::MuonStation *>::iterator it;
-	      for (it=stations->end()-1; it>=stations->begin(); it--)
-		{
-		  Amg::Vector3D pos2 = getPosition(*it, maxPhi);
-		  int phi2 = (*it)->getPhiIndex();
-		  double dphi2 = getDeltaPhi(pos2, maxPhi);
-		  double shift2 = getShift(pos2, dphi2);
-		  double alpha2 = getAlpha( Amg::CLHEPTransformToEigen( (*it)->getTransform()) );
-
-		  double zi2 = pos2.z() - (*it)->Zsize()/2.;    // inner z
-		  double zo2 = pos2.z() + (*it)->Zsize()/2.;    // outer z
-		  double ri2 = pos2.perp() - (*it)->Rsize()/2.; // inner r
-		  double ro2 = pos2.perp() + (*it)->Rsize()/2.; // outer r
-		  double wi2 = (*it)->Ssize();                  // width at inner r
-		  double wo2 = (*it)->LongSsize();              // width at outer r
-
-		  // If the parameters are indeed the same (within reasonable limits), then we
-		  // can simply add this chamber to the sectors attribute of the first one.
-		  if (Amg::distance(pos1, pos2) < m_smallDistance
-		      && fabs(dphi1 - dphi2) < m_smallAngle
-		      && fabs(shift1 - shift2) < m_smallDistance
-		      && fabs(alpha1 - alpha2) < m_smallAngle
-		      && fabs(zi1 - zi2) < m_smallDistance
-		      && fabs(zo1 - zo2) < m_smallDistance
-		      && fabs(ri1 - ri2) < m_smallDistance
-		      && fabs(ro1 - ro2) < m_smallDistance
-		      && fabs(wi1 - wi2) < m_smallDistance
-		      && fabs(wo1 - wo2) < m_smallDistance)
-		    {
-
-		      // Add the station to the phi sector string and remove it from the
-		      // to-be-processed list.
-		      std::stringstream sstream2;
-		      sstream2 << phi2;
-		      phiString += " " + sstream2.str();
-
-		      stations->erase(it, it+1);
-		    }
-		}
-
-	      // From here onwards we need to treat barrel chambers and endcap chambers differently.
-	      if (stationName[0] == 'B')
-		{
-
-		  // Barrel chambers can have inner and/or outer RPCs.
-		  // Let's take a default of 0. (no RPCs).
-		  double rpci = 0.;
-		  double rpco = 0.;
-
-		  // Determine the thickness of the RPC layer on this station.
-		  if (stationName[1] == 'M')
-		    {
-		      // Middle (BM*) stations have RPCs on both sides.
-		      rpci = rpco = 15.;
-		    }
-		  else if (stationName[1] == 'O')
-		    {
-		      // Outer (BO*) stations have RPCs on one side.
-		      if (stationName[2] == 'S')
-			{
-			  // On the side facing the IP for small sectors (BOS).
-			  rpci = 15.;
-			}
-		      else
-			{
-			  // On the outside for large sectors (BOL, BOF, BOG, BOH).
-			  rpco = 15.;
-			}
-		    }
-
-		  newDetector = new Detector;
-		  newDetector->type   = Detector::ABox;
-		  newDetector->name   = stationTech+"_"+stationName;
-		  newDetector->color  = muonColor;
-		  newDetector->zInner = zi1/10.;
-		  newDetector->zOuter = zo1/10.;
-		  newDetector->rInner = ri1/10.;
-		  newDetector->rOuter = ro1/10.;
-		  newDetector->w      = wi1/10.;
-		  newDetector->eta    = eta;
-		  newDetector->phi    = getPhiVectorFromString(phiString);
-
-// 		  // Barrel chambers are written as <ABox> elements.
-// 		  out << "<ABox n=\"" << stationTech << "_" << stationName << "\""
-// 		      << " zi=\"" << zi1/10. << "\"" << " zo=\"" << zo1/10. << "\""
-// 		      << " ri=\"" << ri1/10. << "\"" << " ro=\"" << ro1/10. << "\""
-// 		      << " w=\"" << wi1/10. << "\""
-// 		      << " eta=\"" << eta << "\""
-// 		      << " phi=\"" << phiString << "\"";
-
-		  // A rotation with respect to the large sector.
-		  if (fabs(dphi1) > m_smallAngle)
-		    newDetector->dphi = 180/M_PI * dphi1;
-		  //out << " dphi=\"" << 180/M_PI * dphi1 << "\"";
-
-		  // A shift perpendicular to r in the xy-plane.
-		  if (fabs(shift1) > m_smallDistance)
-		    newDetector->sh = shift1/10.;
-		  //out << " sh=\"" << shift1/10. << "\"";
-
-		  // RPCs.
-		  if (rpci > 0.)
-		    newDetector->RPCi = rpci;
-		  //out << " RPCi=\"" << rpci << "\"";
-		  if (rpco > 0.)
-		    newDetector->RPCo = rpco;
-		  //out << " RPCo=\"" << rpco << "\"";
-		  //out << " />" << std::endl;
-
-		  mDetectors.push_back(*newDetector);
-
-		}
-	      else
-		{
-		  std::stringstream etastream;
-		  etastream << eta;
-		  newDetector = new Detector;
-		  newDetector->name   = stationTech+"_"+stationName+etastream.str();
-		  newDetector->type   = Detector::ATrd;
-		  newDetector->color  = muonColor;
-		  newDetector->zInner = zi1/10.;
-		  newDetector->zOuter = zo1/10.;
-		  newDetector->rInner = ri1/10.;
-		  newDetector->rOuter = ro1/10.;
-		  newDetector->wInner = wi1/10.;
-		  newDetector->wOuter = wo1/10.;
-		  newDetector->eta    = eta;
-		  newDetector->phi    = getPhiVectorFromString(phiString);
-
-// 		  // Endcap chambers are written as <ATrd> elements, parameters are similar to <ABox>.
-// 		  out << "<ATrd n=\"" << stationTech << "_" << stationName << eta << "\""
-// 		      << " zi=\"" << zi1/10. << "\"" << " zo=\"" << zo1/10. << "\""
-// 		      << " ri=\"" << ri1/10. << "\"" << " ro=\"" << ro1/10. << "\""
-// 		      << " wi=\"" << wi1/10. << "\"" << " wo=\"" << wo1/10. << "\""
-// 		      << " eta=\"" << eta << "\""
-// 		      << " phi=\"" << phiString << "\"";
-
-		  if (fabs(dphi1) > m_smallAngle)
-		    newDetector->dphi = 180/M_PI * dphi1;
-		  //out << " dphi=\"" << 180/M_PI * dphi1 << "\"";
-
-		  if (fabs(shift1) > m_smallDistance)
-		    newDetector->sh = shift1/10.;
-		  //out << " sh=\"" << shift1/10. << "\"";
-
-		  // A tilt in the rz-plane, for the CSCs.
-		  if (fabs(alpha1) > m_smallAngle)
-		    newDetector->alpha = 180/M_PI * alpha1;
-		  //out << " a=\"" << 180/M_PI * alpha1 << "\"";
-		  //out << " />" << std::endl;
-
-		  mDetectors.push_back(*newDetector);
-		}
-	    }
-
-	  delete stations;
-	}
-    }
-
-  return true;
-}
-
-Amg::Vector3D StoreGateGeometryReader::getPosition(const MuonGM::MuonStation *station, int maxPhi) const
-{
-  // Take the position of the station.
-  Amg::Vector3D pos = Amg::CLHEPTransformToEigen( station->getTransform() ) * Amg::Vector3D(0., 0., 0.);
-
-  double phi = 2.*M_PI * ((double) station->getPhiIndex()-1.) / maxPhi;
-
-  // Rotate it to sector 1.
-  //return HepGeom::RotateZ3D((1-phi) * M_PI/4.) * pos;
-  return Amg::getRotateZ3D(-phi) * pos;
-}
-
-double StoreGateGeometryReader::getDeltaPhi(const Amg::Vector3D &pos, int maxPhi) const
-{
-  if (maxPhi > 8)
-    {
-      // For TGCs there is no shift, so we can just return the angle.
-      return pos.phi();
-    }
-  else if (fabs(pos.phi() - M_PI/8.) < m_smallAngle)
-    {
-      // For the others, we consider it to be the angle if it's reasonably close to M_PI/8.
-      // Any further deviation will be put in as a shift.
-      return M_PI/8.;
-    }
-  else
-    {
-      // No rotation at all.
-      return 0.;
-    }
-}
-
-double StoreGateGeometryReader::getShift(const Amg::Vector3D &pos, double dphi) const
-{
-  Amg::Vector3D rotpos;
-
-  // First we remove the shift caused by the rotation over dphi.
-  if (fabs(dphi) < m_smallAngle)
-    {
-      rotpos = pos;
-    }
-  else
-    {
-      rotpos = Amg::getRotateZ3D(-dphi) * pos;
-    }
-
-  // Then we return what is left as the shift.
-  if (fabs(rotpos.y()) < m_smallDistance)
-    {
-      return 0.;
-    }
-  else
-    {
-      return rotpos.y();
-    }
-}
-
-double StoreGateGeometryReader::getAlpha(const Amg::Transform3D &trans) const
-{
-  // Extract the rotation from the transformation.
-  Amg::RotationMatrix3D rot = trans.rotation();
-
-  // The theta component is what we're interested in.
-//  return M_PI/2. - rot.getTheta();
-  double theta = Amg::getPhiThetaPsi(rot)[1];
-  return M_PI/2. - theta;
-}
-
-std::vector<int> StoreGateGeometryReader::getPhiVectorFromString(std::string phiString)
-{
-  std::vector<int> phis;
-  QString lets_split = phiString.c_str();
-  QStringList phiList = lets_split.split(" ");
-  for (int i = 0; i < phiList.size(); i++)
-    {
-      QString phiString = phiList.at(i);
-      phis.push_back(phiString.toInt());
-    }
-  return phis;
-}
diff --git a/graphics/VP1/VP1Systems/VP12DGeometrySystems/src/VP12DGeometrySystem.cxx b/graphics/VP1/VP1Systems/VP12DGeometrySystems/src/VP12DGeometrySystem.cxx
deleted file mode 100755
index c876ae018185..000000000000
--- a/graphics/VP1/VP1Systems/VP12DGeometrySystems/src/VP12DGeometrySystem.cxx
+++ /dev/null
@@ -1,1533 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/////////////////////////////////////////////////////////////////////////
-//                                                                     //
-//  Implementation of class VP12DGeometrySystem                        //
-//                                                                     //
-//  Author: Brock Greman <bgreman@gmail.com>                           //
-//                                                                     //
-//  Initial version: August 2007                                       //
-//                                                                     //
-/////////////////////////////////////////////////////////////////////////
-
-#include "VP12DGeometrySystems/VP12DGeometrySystem.h"
-#include "VP12DGeometrySystems/StoreGateGeometryReader.h"
-#include "VP1Base/VP1GraphicsItemCollection.h"
-//TK: include when needed #include "ui_2dgeometrycontroller.h"
-
-#include <QGraphicsRectItem>
-#include <QBrush>
-#include <QPen>
-#include <cmath>
-
-// #include "StoreGate/StoreGate.h"
-
-//TK: This scale factor needs to go. CLHEP units is what both geomodel and VP1 uses.
-//TK: Worst of all - if I set it to 1., I seem to get different (better?) results...
-#define SCALE_FACTOR 1.
-
-#define DEG_2_RAD M_PI/180
-
-static int items_drawn = 0;
-static int ABox_drawn = 0;
-static int ATrd_drawn = 0;
-static int ATBx_drawn = 0;
-static int AGeometryConstant_read = 0;
-static int AGeneralPath_drawn = 0;
-static int ADisc_drawn = 0;
-static int ARectangle_drawn = 0;
-static int ABarrelCalorimeter_drawn = 0;
-static int AEndcapCalorimeter_drawn = 0;
-static int AGapCalorimeter_drawn = 0;
-static int ABarrelSiliconDetector_drawn = 0;
-static int AEndcapSiliconDetector_drawn = 0;
-static int ABarrelTRTDetector_drawn = 0;
-static int AEndcapTRTDetector_drawn = 0;
-static int ERROR_TYPE_drawn = 0;
-
-//implementation class for the system
-class VP12DGeometrySystem::Imp
-{
- public:
-  VP12DGeometrySystem * theclass;
-
-  //instance of the object which parses the geometry from the detector store
-  StoreGateGeometryReader mGeoReader;
-
-  //utility function needed for certain muon geometry elements
-  double calculatePhi(std::string name);
-
-  //Tk: uncomment when using:
-  //   QRadioButton *xy_RadioBtn;
-  //   QRadioButton *rz_RadioBtn;
-
-  //These functions perform the bulk of the drawing work
-  void addYXProjectionToCollection(VP1GraphicsItemCollection*);
-  void addRZProjectionToCollection(VP1GraphicsItemCollection*);
-  void addFRProjectionToCollection(VP1GraphicsItemCollection*);
-  void addFZProjectionToCollection(VP1GraphicsItemCollection*);
-
-  //Due to the complexity of the muon detector element drawing routines,
-  //these processes have been spun off into a separate function.
-  void processMuonDetector(const Detector&, VP1GraphicsItemCollection*, std::string);
-
-
-};
-
-double VP12DGeometrySystem::Imp::calculatePhi(std::string name)
-{
-  double phiRet;
-  std::string technology = name.substr(0,3);
-  if (technology == "TGC")
-    {
-      if (name.at(6)=='E' && name.at(5) !='4')
-	{
-	  phiRet = 24.;
-	  return phiRet;
-	}
-      else
-	{
-	  phiRet = 12.;
-	  return phiRet;
-	}
-    }
-  else
-    {
-      phiRet = 4.;
-      return phiRet;
-    }
-}
-
-//_____________________________________________________________________________________
-VP12DGeometrySystem::VP12DGeometrySystem()
-  : IVP12DDetViewsSystem("2DGeo",
-		       "This is an illustration of an extremely basic 2D system.\n "
-		       "It is a placeholder for the future 2D geometry system.",
-			 "Thomas.Kittelmann@cern.ch"), m_d(new Imp)
-{
-  m_d->theclass=this;
-}
-
-
-VP12DGeometrySystem::~VP12DGeometrySystem()
-{
-  delete m_d; m_d = nullptr;
-}
-
-//Initializes system members, loads geometry
-void VP12DGeometrySystem::systemcreate(StoreGateSvc *detStore)
-{
-  if (detStore)
-    {
-      //set detector store pointer of geometry reader
-      m_d->mGeoReader.setDetStore(detStore);
-
-      //read geometry and test for success
-      if (!m_d->mGeoReader.readGeometry())
-	{
-	  //here we had an error somewhere while reading geometry
-	  message("Error parsing DetStore geometry!");
-	}
-      else
-	{
-	  message("Geometry successfully read!");
-	}
-    }
-  else
-    {
-      message("Received null detector store pointer!");
-    }
-
-  //print number of detector elements found for sanity check
-  std::stringstream outputdata;
-  outputdata << "2D Geometry System finds: " << m_d->mGeoReader.mDetectors.size() << " elements." << std::endl;
-  QString qstrout = outputdata.str().c_str();
-  message(qstrout);
-}
-
-//_____________________________________________________________________________________
-void VP12DGeometrySystem::buildPermanentItemCollections(StoreGateSvc* /*detstore*/,VP1GraphicsItemCollection *ic_xy, VP1GraphicsItemCollection *ic_rz)
-{
-  //add appropriate projection data to the visible collection.
-  //todo: Add all four at once, but only make one visible, depending
-  //on a UI radio selector
-
-  m_d->addYXProjectionToCollection(ic_xy);
-  message("Just wrote X-Y Projection");
-
-  m_d->addRZProjectionToCollection(ic_rz);
-  message("Just wrote Rho-Z Projection");
-
-//   if (PROJECTION == "FR")
-//     {
-//       addFRProjectionToCollection(ic);
-//       message("Just wrote Phi-Rho Projection");
-//     }
-//   if (PROJECTION == "FZ")
-//     {
-//       addFZProjectionToCollection(ic);
-//       message("Just wrote Phi-Z Projection");
-//     }
-
-}
-
-//Each of the following four functions has the same general format, so I'll comment this one and
-//you can use it as a template for the others.  The differences are only in the details of drawing
-//the geometry for each shape.  All geometry drawing code adapted from the Atlantis Event Display
-void VP12DGeometrySystem::Imp::addYXProjectionToCollection(VP1GraphicsItemCollection *theCollection)
-{
-
-  //Iterate through the detector shape elements
-  for (unsigned int i=0;i<mGeoReader.mDetectors.size();i++)
-    {
-      //Create a brush containing the color used to paint the detector shape
-      QBrush elementBrush(mGeoReader.mDetectors[i].color);
-
-      //Create a pen to outline the elements in their own color
-      QPen elementPen(mGeoReader.mDetectors[i].color,0);
-
-
-      //ABox and ATrd are used to draw certain Muon detector elements
-      if (mGeoReader.mDetectors[i].type==Detector::ABox || mGeoReader.mDetectors[i].type==Detector::ATrd)
-	{
-	  processMuonDetector(mGeoReader.mDetectors[i], theCollection, "YX");
-	}
-      else if (mGeoReader.mDetectors[i].type==Detector::AGeneralPath)
-	{
-	  //will add later
-	  items_drawn++;
-	  AGeneralPath_drawn++;
-	}
-      //ADisc is used to represent various abstract circular shapes from various detector systems
-      else if (mGeoReader.mDetectors[i].type==Detector::ADisc && mGeoReader.mDetectors[i].projection=="YX" )
-	{
-	  double rInner = mGeoReader.mDetectors[i].rInner;
-	  double rOuter = mGeoReader.mDetectors[i].rOuter;
-	  int nInner    = mGeoReader.mDetectors[i].nInner;
-	  int nOuter    = mGeoReader.mDetectors[i].nOuter;
-
-	  rInner/=SCALE_FACTOR;
-	  rOuter/=SCALE_FACTOR;
-
-	  QPolygonF disc;
-
-	  for (int j=0; j<nInner+1; j++)
-	    {
-	      double cosTerm = cos((2*M_PI*j)/nInner);
-	      double sinTerm = sin((2*M_PI*j)/nInner);
-	      disc << QPointF(rInner*cosTerm, rInner*sinTerm);
-	    }
-
-	  for (int j=0; j<nOuter+1; j++)
-	    {
-	      double cosTerm = cos(2*M_PI*(nOuter-j)/nOuter);
-	      double sinTerm = sin(2*M_PI*(nOuter-j)/nOuter);
-	      disc << QPointF(rOuter*cosTerm, rInner*sinTerm);
-	    }
-
-	  QGraphicsPolygonItem *theDisc = new QGraphicsPolygonItem(disc);
-	  theDisc->setBrush(elementBrush);
-	  theDisc->setPen(elementPen);
-
-	  theCollection->addItem(theDisc);
-	  items_drawn++;
-	  ADisc_drawn++;
-	}
-
-      //ARectangles are used to represent various abstract rectangular shapes from various detector systems
-      else if (mGeoReader.mDetectors[i].type==Detector::ARectangle && mGeoReader.mDetectors[i].projection=="YX" )
-	{
-	  double xMin = mGeoReader.mDetectors[i].xMin;
-	  double xMax = mGeoReader.mDetectors[i].xMax;
-	  double yMin = mGeoReader.mDetectors[i].yMin;
-	  double yMax = mGeoReader.mDetectors[i].yMax;
-
-	  xMin/=SCALE_FACTOR;
-	  xMax/=SCALE_FACTOR;
-	  yMin/=SCALE_FACTOR;
-	  yMax/=SCALE_FACTOR;
-
-	  QPolygonF theBox;
-	  theBox << QPointF(xMin,yMin);
-	  theBox << QPointF(xMin,yMax);
-	  theBox << QPointF(xMax,yMax);
-	  theBox << QPointF(xMax,yMin);
-
-	  QGraphicsPolygonItem *theItem = new QGraphicsPolygonItem(theBox);
-	  theItem->setPen(elementPen);
-	  theItem->setBrush(elementBrush);
-	  theCollection->addItem(theItem);
-
-	  if (mGeoReader.mDetectors[i].xReflect)
-	    {
-	      QPolygonF theBoxXR;
-	      double xMinr = -xMin;
-	      double xMaxr = -xMax;
-	      theBoxXR << QPointF(xMinr,yMin);
-	      theBoxXR << QPointF(xMinr,yMax);
-	      theBoxXR << QPointF(xMaxr,yMax);
-	      theBoxXR << QPointF(xMaxr,yMin);
-
-	      theItem = new QGraphicsPolygonItem(theBoxXR);
-	      theItem->setPen(elementPen);
-	      theItem->setBrush(elementBrush);
-	      theCollection->addItem(theItem);
-	    }
-
-	  if (mGeoReader.mDetectors[i].yReflect)
-	    {
-	      QPolygonF theBoxYR;
-	      double yMinr = -yMin;
-	      double yMaxr = -yMax;
-	      theBoxYR << QPointF(xMin,yMinr);
-	      theBoxYR << QPointF(xMin,yMaxr);
-	      theBoxYR << QPointF(xMax,yMaxr);
-	      theBoxYR << QPointF(xMax,yMinr);
-
-	      theItem = new QGraphicsPolygonItem(theBoxYR);
-	      theItem->setPen(elementPen);
-	      theItem->setBrush(elementBrush);
-	      theCollection->addItem(theItem);
-	    }
-
-	  if (mGeoReader.mDetectors[i].xReflect && mGeoReader.mDetectors[i].yReflect)
-	    {
-	      QPolygonF theBoxXYR;
-	      double xMinr = -xMin;
-	      double xMaxr = -xMax;
-	      double yMinr = -yMin;
-	      double yMaxr = -yMax;
-	      theBoxXYR << QPointF(xMinr,yMinr);
-	      theBoxXYR << QPointF(xMinr,yMaxr);
-	      theBoxXYR << QPointF(xMaxr,yMaxr);
-	      theBoxXYR << QPointF(xMaxr,yMinr);
-
-	      theItem = new QGraphicsPolygonItem(theBoxXYR);
-	      theItem->setPen(elementPen);
-	      theItem->setBrush(elementBrush);
-	      theCollection->addItem(theItem);
-	    }
-
-	  items_drawn++;
-	  ARectangle_drawn++;
-	}
-
-      //ABarrelCalorimeter represents barrel calorimeters detector elements
-      else if (mGeoReader.mDetectors[i].type==Detector::ABarrelCalorimeter )
-	{
-	  double rMin = mGeoReader.mDetectors[i].rMin;
-	  double rMax = mGeoReader.mDetectors[i].rMax;
-	  int numPhi = mGeoReader.mDetectors[i].nphi;
-	  double delPhi = 2*M_PI/numPhi;
-	  double phi0 = DEG_2_RAD * mGeoReader.mDetectors[i].phi0;
-
-	  rMin/=SCALE_FACTOR;
-	  rMax/=SCALE_FACTOR;
-
-	  QPolygonF barCal;
-
-	  for (int i = 0; i < numPhi + 1; i++)
-	    {
-	      double cosTermMin = cos(phi0 + i*delPhi);
-	      double sinTermMin = sin(phi0 + i*delPhi);
-
-	      barCal << QPointF(rMin*cosTermMin, rMin*sinTermMin);
-	    }
-	  for (int i = 0; i < numPhi + 1; i++)
-	    {
-	      double cosTermMax = cos(phi0 - i*delPhi);
-	      double sinTermMax = sin(phi0 - i*delPhi);
-
-	      barCal << QPointF(rMax*cosTermMax, rMax*sinTermMax);
-	    }
-
-	  QGraphicsPolygonItem *theBarCal = new QGraphicsPolygonItem(barCal);
-	  theBarCal->setPen(elementPen);
-	  theBarCal->setBrush(elementBrush);
-
-	  theCollection->addItem(theBarCal);
-	  items_drawn++;
-	  ABarrelCalorimeter_drawn++;
-	}
-
-      //AEndcapCalorimeters represent endcap calorimeter elements
-      else if (mGeoReader.mDetectors[i].type==Detector::AEndcapCalorimeter )
-	{
-	  double etaMax = mGeoReader.mDetectors[i].eta0 + mGeoReader.mDetectors[i].neta * mGeoReader.mDetectors[i].deta;
-	  double etaMin = mGeoReader.mDetectors[i].eta0;
-	  int numPhi = mGeoReader.mDetectors[i].nphi;
-	  double delPhi = 2*M_PI/numPhi;
-	  double phi0 = DEG_2_RAD * mGeoReader.mDetectors[i].phi0;
-	  double rMin, rMax;
-
-	  if (mGeoReader.mDetectors[i].name == "HEC")
-	    {
-	      rMin = mGeoReader.mDetectors[i].rMin;
-	      rMax = mGeoReader.mDetectors[i].rMax;
-	    }
-	  else
-	    {
-	      if (mGeoReader.mDetectors[i].name.find("Inner") != std::string::npos || mGeoReader.mDetectors[i].name.find("Presampler") != std::string::npos)
-		{
-		  rMax = mGeoReader.mDetectors[i].zMin/sinh(etaMin);
-		  rMin = 0.0;//TK - added this line since rMin is otherwise unitialized. Is 0 the right value?????? Fixme.
-		  //BG: In the constructor for StoreGateGeometryReader::Detector, every member is initialized to 0 to take care of situations like this.
-		  //I believe that Atlantis uses the same technique, so when I came across this line in the Atlantis code, rMax was the only variable init'd.
-		}
-	      else
-		{
-		  rMax = mGeoReader.mDetectors[i].rMax;
-		  rMin = mGeoReader.mDetectors[i].zMin/sinh(etaMax);
-		}
-	    }
-
-	  rMax/=SCALE_FACTOR;
-	  rMin/=SCALE_FACTOR;
-
-	  QPolygonF ecCal;
-
-	  for (int i=0; i < numPhi + 1; i++)
-	    {
-	      double cosTermMin = cos(phi0 + i*delPhi);
-	      double sinTermMin = sin(phi0 + i*delPhi);
-
-	      ecCal << QPointF(rMin*cosTermMin, rMin*sinTermMin);
-	    }
-	  for (int i=0; i < numPhi + 1; i++)
-	    {
-	      double cosTermMax = cos(phi0 - i*delPhi);
-	      double sinTermMax = sin(phi0 - i*delPhi);
-
-	      ecCal << QPointF(rMax*cosTermMax, rMax*sinTermMax);
-	    }
-
-	  QGraphicsPolygonItem *theEcCal = new QGraphicsPolygonItem(ecCal);
-	  theEcCal->setPen(elementPen);
-	  theEcCal->setBrush(elementBrush);
-
-	  theCollection->addItem(theEcCal);
-	  items_drawn++;
-	  AEndcapCalorimeter_drawn++;
-	}
-
-      //AGapCalorimeters represent gap calorimeter elements
-      else if (mGeoReader.mDetectors[i].type==Detector::AGapCalorimeter)
-	{
-	  //only has an RZ and VP projection
-	}
-
-      //ABarrelSiliconDetectors represent barrel silicon (pixel and silicon) detectors
-      else if (mGeoReader.mDetectors[i].type==Detector::ABarrelSiliconDetector )
-	{
-	  double r0 = mGeoReader.mDetectors[i].r0;
-	  double width = mGeoReader.mDetectors[i].width;
-	  double thickness = mGeoReader.mDetectors[i].thickness;
-	  double tilt = DEG_2_RAD * mGeoReader.mDetectors[i].tilt;
-	  int numPhi = mGeoReader.mDetectors[i].nphi;
-	  double delPhi = 2*M_PI/numPhi;
-	  double phi0 = DEG_2_RAD * mGeoReader.mDetectors[i].phi0;
-
-	  double rMin = r0 - fabs(thickness*cos(tilt)) - fabs(width*sin(tilt));
-	  double rMax = r0 + fabs(thickness*cos(tilt)) + fabs(width*sin(tilt));
-
-	  rMin/=SCALE_FACTOR;
-	  rMax/=SCALE_FACTOR;
-
-	  QPolygonF barSil;
-
-	  for (int i = 0; i < numPhi + 1; i++)
-	    {
-	      double cosTermMin = cos(phi0 + (0.5+i)*delPhi);
-	      double sinTermMin = sin(phi0 + (0.5+i)*delPhi);
-
-	      barSil << QPointF(rMin*cosTermMin, rMin*sinTermMin);
-	    }
-	  for (int i = 0; i < numPhi + 1; i++)
-	    {
-	      double cosTermMax = cos(phi0 - (0.5+i)*delPhi);
-	      double sinTermMax = sin(phi0 - (0.5+i)*delPhi);
-
-	      barSil << QPointF(rMax*cosTermMax, rMax*sinTermMax);
-	    }
-
-	  QGraphicsPolygonItem *theBarSil = new QGraphicsPolygonItem(barSil);
-	  theBarSil->setPen(elementPen);
-	  theBarSil->setBrush(elementBrush);
-
-	  theCollection->addItem(theBarSil);
-	  items_drawn++;
-	  ABarrelSiliconDetector_drawn++;
-	}
-
-      //AEndcapSiliconDetectors represent endcap silicon (pixel and silicon) detector elements
-      else if (mGeoReader.mDetectors[i].type==Detector::AEndcapSiliconDetector )
-	{
-	  int numPhi = mGeoReader.mDetectors[i].nphi;
-	  double delPhi = 2*M_PI/numPhi;
-	  double phi0 = DEG_2_RAD * mGeoReader.mDetectors[i].phi0;
-	  double rMin = mGeoReader.mDetectors[i].rMin;
-	  double rMax = mGeoReader.mDetectors[i].rMax;
-
-	  rMin/=SCALE_FACTOR;
-	  rMax/=SCALE_FACTOR;
-
-	  QPolygonF ecSil;
-
-	  for (int i = 0; i < numPhi + 1; i++)
-	    {
-	      double cosTermMin = cos(phi0 + (0.5+i)*delPhi);
-	      double sinTermMin = sin(phi0 + (0.5+i)*delPhi);
-
-	      ecSil << QPointF(rMin*cosTermMin, rMin*sinTermMin);
-	    }
-	  for (int i = 0; i < numPhi + 1; i++)
-	    {
-	      double cosTermMax = cos(phi0 - (0.5+i)*delPhi);
-	      double sinTermMax = sin(phi0 - (0.5+i)*delPhi);
-	      ecSil << QPointF(rMax*cosTermMax, rMax*sinTermMax);
-	    }
-
-	  QGraphicsPolygonItem *theEcSil = new QGraphicsPolygonItem(ecSil);
-	  theEcSil->setPen(elementPen);
-	  theEcSil->setBrush(elementBrush);
-
-	  theCollection->addItem(theEcSil);
-	  items_drawn++;
-	  AEndcapSiliconDetector_drawn++;
-	}
-
-      //ABarrelTRTDetectors represent barrel TRT detector elements
-      else if (mGeoReader.mDetectors[i].type==Detector::ABarrelTRTDetector )
-	{
-	  int numPhi = mGeoReader.mDetectors[i].nphi;
-	  double delPhi = 2*M_PI/numPhi;
-	  double phiIn = DEG_2_RAD * mGeoReader.mDetectors[i].phiIn;
-	  double phiOut= DEG_2_RAD * mGeoReader.mDetectors[i].phiOut;
-	  double rMin = mGeoReader.mDetectors[i].rMin;
-	  double rMax = mGeoReader.mDetectors[i].rMax;
-
-	  rMin/=SCALE_FACTOR;
-	  rMax/=SCALE_FACTOR;
-
-	  QPolygonF barTRT;
-
-	  for (int i = 0; i < numPhi + 1; i++)
-	    {
-	      double cosTermMin = cos(phiIn + i*delPhi);
-	      double sinTermMin = sin(phiIn + i*delPhi);
-
-	      barTRT << QPointF(rMin*cosTermMin, rMin*sinTermMin);
-	    }
-	  for (int i = 0; i < numPhi + 1; i++)
-	    {
-	      double cosTermMax = cos(phiOut - i*delPhi);
-	      double sinTermMax = sin(phiOut - i*delPhi);
-	      barTRT << QPointF(rMax*cosTermMax, rMax*sinTermMax);
-	    }
-
-	  QGraphicsPolygonItem *theBarTRT = new QGraphicsPolygonItem(barTRT);
-	  theBarTRT->setPen(elementPen);
-	  theBarTRT->setBrush(elementBrush);
-
-	  theCollection->addItem(theBarTRT);
-	  items_drawn++;
-	  ABarrelTRTDetector_drawn++;
-	}
-
-      //AEndcapTRTDetectors represent endcap TRT detector elements
-      else if (mGeoReader.mDetectors[i].type==Detector::AEndcapTRTDetector)
-	{
-	  // has no YX projection
-	}
-
-      //I'm not quite sure what this is.  JiveXML apparently creates these when it loads MBTS geometry,
-      //but I've never seen one in any of the Atlantis xml files
-      else if (mGeoReader.mDetectors[i].type==Detector::AEndcapCryostat)
-	{
-	  // does this even exist?"
-	}
-
-      //these aren't drawn, and are tracked merely for internal debuggin purposes
-      else if (mGeoReader.mDetectors[i].type==Detector::ERROR_TYPE)
-	{
-	  ERROR_TYPE_drawn++;
-	}
-    }
-}
-
-//This function adds the Rho-Z projection.  See the XY projection for detailed comments
-void VP12DGeometrySystem::Imp::addRZProjectionToCollection(VP1GraphicsItemCollection* theCollection)
-{
-  //TK  QPen elementPen(Qt::black,0);
-  QPen elementPen(Qt::transparent);//TK
-
-  //needs heavy fixing
-  for (unsigned int i = 0; i < mGeoReader.mDetectors.size(); i++)
-  {
-    QBrush elementBrush(mGeoReader.mDetectors[i].color);
-
-    if (mGeoReader.mDetectors[i].type == Detector::ABox || mGeoReader.mDetectors[i].type == Detector::ATrd)
-      {
-	processMuonDetector(mGeoReader.mDetectors[i], theCollection, "RZ");
-      }
-    else if (mGeoReader.mDetectors[i].type == Detector::ATBx)
-      {
-	//only used in FZ projection
-	items_drawn++;
-	ATBx_drawn++;
-      }
-    else if (mGeoReader.mDetectors[i].type == Detector::AGeometryConstant)
-      {
-	//nothing to draw
-	AGeometryConstant_read++;
-      }
-    else if (mGeoReader.mDetectors[i].type == Detector::AGeneralPath)
-      {
-	//to be added later
-	items_drawn++;
-	AGeneralPath_drawn++;
-      }
-    else if (mGeoReader.mDetectors[i].type == Detector::ARectangle && mGeoReader.mDetectors[i].projection == "RZ" )
-      {
-	double xMin = mGeoReader.mDetectors[i].xMin;
-	double xMax = mGeoReader.mDetectors[i].xMax;
-	double yMin = mGeoReader.mDetectors[i].yMin;
-	double yMax = mGeoReader.mDetectors[i].yMax;
-
-	xMin/=SCALE_FACTOR;
-	xMax/=SCALE_FACTOR;
-	yMin/=SCALE_FACTOR;
-	yMax/=SCALE_FACTOR;
-
-	QPolygonF theBox;
-	theBox << QPointF(xMin,yMin);
-	theBox << QPointF(xMin,yMax);
-	theBox << QPointF(xMax,yMax);
-	theBox << QPointF(xMax,yMin);
-	;
-	QGraphicsPolygonItem *theItem = new QGraphicsPolygonItem(theBox);
-	theItem->setPen(elementPen);
-	theItem->setBrush(elementBrush);
-	theCollection->addItem(theItem);
-
-	if (mGeoReader.mDetectors[i].xReflect)
-	  {
-	    QPolygonF theBoxXR;
-	    double xMinr = -xMin;
-	    double xMaxr = -xMax;
-	    theBoxXR << QPointF(xMinr,yMin);
-	    theBoxXR << QPointF(xMinr,yMax);
-	    theBoxXR << QPointF(xMaxr,yMax);
-	    theBoxXR << QPointF(xMaxr,yMin);
-
-	    theItem = new QGraphicsPolygonItem(theBoxXR);
-	    theItem->setPen(elementPen);
-	    theItem->setBrush(elementBrush);
-	    theCollection->addItem(theItem);
-	  }
-
-	if (mGeoReader.mDetectors[i].yReflect)
-	  {
-	    QPolygonF theBoxYR;
-	    double yMinr = -yMin;
-	    double yMaxr = -yMax;
-	    theBoxYR << QPointF(xMin,yMinr);
-	    theBoxYR << QPointF(xMin,yMaxr);
-	    theBoxYR << QPointF(xMax,yMaxr);
-	    theBoxYR << QPointF(xMax,yMinr);
-
-	    theItem = new QGraphicsPolygonItem(theBoxYR);
-	    theItem->setPen(elementPen);
-	    theItem->setBrush(elementBrush);
-	    theCollection->addItem(theItem);
-	  }
-
-	if (mGeoReader.mDetectors[i].xReflect && mGeoReader.mDetectors[i].yReflect)
-	  {
-	    QPolygonF theBoxXYR;
-	    double xMinr = -xMin;
-	    double xMaxr = -xMax;
-	    double yMinr = -yMin;
-	    double yMaxr = -yMax;
-	    theBoxXYR << QPointF(xMinr,yMinr);
-	    theBoxXYR << QPointF(xMinr,yMaxr);
-	    theBoxXYR << QPointF(xMaxr,yMaxr);
-	    theBoxXYR << QPointF(xMaxr,yMinr);
-
-	    theItem = new QGraphicsPolygonItem(theBoxXYR);
-	    theItem->setPen(elementPen);
-	    theItem->setBrush(elementBrush);
-	    theCollection->addItem(theItem);
-	  }
-
-    items_drawn++;
-    ARectangle_drawn++;
-  }
-    else if (mGeoReader.mDetectors[i].type == Detector::ABarrelCalorimeter)
-      {
-	//need to implement clipper
-	double rMin = mGeoReader.mDetectors[i].rMin;
-	double rMax = mGeoReader.mDetectors[i].rMax;
-	double zMin = mGeoReader.mDetectors[i].zMin;
-	double zMax = mGeoReader.mDetectors[i].zMax;
-	double eta0 = mGeoReader.mDetectors[i].eta0;
-	double dEta = mGeoReader.mDetectors[i].deta;
-	int    nEta = mGeoReader.mDetectors[i].neta;
-
-	double etaMax = eta0 + nEta*dEta;
-	double etaMin;
-	if (eta0 <= 0.0)
-	  {etaMin = -etaMax;}
-	else
-	  {etaMin = eta0;}
-
-	rMin/=SCALE_FACTOR;
-	rMax/=SCALE_FACTOR;
-	zMin/=SCALE_FACTOR;
-	zMax/=SCALE_FACTOR;
-	QPolygonF barCal;
-
-	double z0, z1, z2, z3;
-
-	if (mGeoReader.mDetectors[i].name.find("TILE") != std::string::npos)
-	  {
-	    z0 = zMax; z1 = zMin; z2 = zMin; z3 = zMax;
-	    theclass->message("Here thar be tiles!");
-	  }
-	else
-	  {
-	    z0 = rMax * sinh(etaMax);
-	    z1 = rMax * sinh(etaMin);
-	    z2 = rMin * sinh(etaMin);
-	    z3 = rMin * sinh(etaMax);
-	  }
-
-	barCal << QPointF(z0, rMax);
-	barCal << QPointF(z1, rMax);
-	barCal << QPointF(z2, rMin);
-	barCal << QPointF(z3, rMin);
-	barCal << QPointF(z0, -rMin);
-	barCal << QPointF(z1, -rMin);
-	barCal << QPointF(z2, -rMax);
-	barCal << QPointF(z3, -rMax);
-
-	QGraphicsPolygonItem *theBarCal = new QGraphicsPolygonItem(barCal);
-	theBarCal->setPen(elementPen);
-	theBarCal->setBrush(elementBrush);
-	theCollection->addItem(theBarCal);
-
-	if (eta0 > 0.0)
-	  {
-	    QPolygonF barCal2;
-	    barCal2 << QPointF(-z1, rMax);
-	    barCal2 << QPointF(-z0, rMax);
-	    barCal2 << QPointF(-z3, rMin);
-	    barCal2 << QPointF(-z2, rMin);
-	    barCal2 << QPointF(-z2, -rMin);
-	    barCal2 << QPointF(-z3, -rMin);
-	    barCal2 << QPointF(-z0, -rMax);
-	    barCal2 << QPointF(-z1, -rMax);
-	    QGraphicsPolygonItem *theBarCal2 = new QGraphicsPolygonItem(barCal2);
-	    theBarCal2->setPen(elementPen);
-	    theBarCal2->setBrush(elementBrush);
-	    theCollection->addItem(theBarCal2);
-	  }
-
-	items_drawn++;
-	ABarrelCalorimeter_drawn++;
-      }
-    else if (mGeoReader.mDetectors[i].type == Detector::AEndcapCalorimeter)
-      {
-	//need to implement clipper
-	double rMin = mGeoReader.mDetectors[i].rMin;
-	double rMax = mGeoReader.mDetectors[i].rMax;
-	double zMin = mGeoReader.mDetectors[i].zMin;
-	double zMax = mGeoReader.mDetectors[i].zMax;
-	double eta0 = mGeoReader.mDetectors[i].eta0;
-	double dEta = mGeoReader.mDetectors[i].deta;
-	int    nEta = mGeoReader.mDetectors[i].neta;
-
-	double etaMax = eta0 + nEta*dEta;
-	double etaMin = eta0;
-
-	rMin/=SCALE_FACTOR;
-	rMax/=SCALE_FACTOR;
-	zMin/=SCALE_FACTOR;
-	zMax/=SCALE_FACTOR;
-	QPolygonF ecCal;
-
-	double r0, r1, r2, r3;
-
-	if (mGeoReader.mDetectors[i].name.find("HEC") != std::string::npos)
-	  {
-	    r0 = rMax; r1 = zMax; r2 = rMin; r3 = rMin;
-	    theclass->message("Here thar be HECs");
-	  }
-	else
-	  {
-	    r0 = zMax / sinh(etaMin);
-	    r1 = zMin / sinh(etaMin);
-	    r2 = zMin / sinh(etaMax);
-	    r3 = zMax / sinh(etaMax);
-	  }
-
-	ecCal << QPointF(zMax, r0);
-	ecCal << QPointF(zMin, r1);
-	ecCal << QPointF(zMin, r2);
-	ecCal << QPointF(zMax, r3);
-	ecCal << QPointF(zMax, -r3);
-	ecCal << QPointF(zMin, -r2);
-	ecCal << QPointF(zMin, -r1);
-	ecCal << QPointF(zMax, -r0);
-
-	QGraphicsPolygonItem *theEcCal = new QGraphicsPolygonItem(ecCal);
-	theEcCal->setPen(elementPen);
-	theEcCal->setBrush(elementBrush);
-	theCollection->addItem(theEcCal);
-
-	if (eta0 > 0.0)
-	  {
-	    QPolygonF ecCal2;
-	    ecCal2 << QPointF(-zMin, r1);
-	    ecCal2 << QPointF(-zMax, r0);
-	    ecCal2 << QPointF(-zMax, r3);
-	    ecCal2 << QPointF(-zMin, r2);
-	    ecCal2 << QPointF(-zMin, -r2);
-	    ecCal2 << QPointF(-zMax, -r3);
-	    ecCal2 << QPointF(-zMax, -r0);
-	    ecCal2 << QPointF(-zMin, -r1);
-	    QGraphicsPolygonItem *theEcCal2 = new QGraphicsPolygonItem(ecCal2);
-	    theEcCal2->setPen(elementPen);
-	    theEcCal2->setBrush(elementBrush);
-	    theCollection->addItem(theEcCal2);
-	  }
-
-	items_drawn++;
-	AEndcapCalorimeter_drawn++;
-      }
-    else if (mGeoReader.mDetectors[i].type == Detector::AGapCalorimeter )
-      {
-	double rMin = mGeoReader.mDetectors[i].rMin;
-	double rMax = mGeoReader.mDetectors[i].rMax;
-	double zMin = mGeoReader.mDetectors[i].zMin;
-	double zMax = mGeoReader.mDetectors[i].zMax;
-
-	rMin/=SCALE_FACTOR;
-	rMax/=SCALE_FACTOR;
-	zMin/=SCALE_FACTOR;
-	zMax/=SCALE_FACTOR;
-
-	//this double polygon system is hackish, and I don't like it.  Look into how atlantis does this separated geometry.
-	//also used in the endcap detectors ohgod rargh I used it everywhere QPolygons suck it hard
-	QPolygonF gapCal;
-	QPolygonF gapCal2;
-
-	if (zMin < 0)
-	  {
-	    gapCal << QPointF(zMax, rMax);
-	    gapCal << QPointF(zMin, rMax);
-	    gapCal << QPointF(zMin, rMin);
-	    gapCal << QPointF(zMax, rMin);
-	    gapCal << QPointF(zMax, -rMin);
-	    gapCal << QPointF(zMin, -rMin);
-	    gapCal << QPointF(zMin, -rMax);
-	    gapCal << QPointF(zMax, -rMax);
-	  }
-
-	else
-	  {
-	    gapCal << QPointF(zMax, rMax);
-	    gapCal << QPointF(zMin, rMax);
-	    gapCal << QPointF(zMin, rMin);
-	    gapCal << QPointF(zMax, rMin);
-	    gapCal << QPointF(zMax, -rMin);
-	    gapCal << QPointF(zMin, -rMin);
-	    gapCal << QPointF(zMin, -rMax);
-	    gapCal << QPointF(zMax, -rMax);
-
-	    gapCal2 << QPointF(-zMin, rMax);
-	    gapCal2 << QPointF(-zMax, rMax);
-	    gapCal2 << QPointF(-zMax, rMin);
-	    gapCal2 << QPointF(-zMin, rMin);
-	    gapCal2 << QPointF(-zMin, -rMin);
-	    gapCal2 << QPointF(-zMax, -rMin);
-	    gapCal2 << QPointF(-zMax, -rMax);
-	    gapCal2 << QPointF(-zMin, -rMax);
-	  }
-
-	QGraphicsPolygonItem *theGapCal = new QGraphicsPolygonItem(gapCal);
-	QGraphicsPolygonItem *theGapCal2= new QGraphicsPolygonItem(gapCal2);
-	theGapCal->setPen(elementPen);
-	theGapCal->setBrush(elementBrush);
-	theGapCal2->setPen(elementPen);
-	theGapCal2->setBrush(elementBrush);
-	theCollection->addItem(theGapCal);
-	theCollection->addItem(theGapCal2);
-
-	items_drawn++;
-	AGapCalorimeter_drawn++;
-      }
-    else if (mGeoReader.mDetectors[i].type == Detector::ABarrelSiliconDetector)
-      {
-	double r0   = mGeoReader.mDetectors[i].r0;
-	double width = mGeoReader.mDetectors[i].width;
-	double thickness = mGeoReader.mDetectors[i].thickness;
-	double tilt = DEG_2_RAD * mGeoReader.mDetectors[i].tilt;
-	double zMin = mGeoReader.mDetectors[i].zMin;
-	double zMax = mGeoReader.mDetectors[i].zMax;
-
-	double rMin = r0 - fabs(thickness*cos(tilt)) - fabs(width*sin(tilt));
-	double rMax = r0 + fabs(thickness*cos(tilt)) + fabs(width*sin(tilt));
-
-
-	rMin/=SCALE_FACTOR;
-	rMax/=SCALE_FACTOR;
-	zMin/=SCALE_FACTOR;
-	zMax/=SCALE_FACTOR;
-
-	QPolygonF barSil;
-
-	barSil << QPointF(zMax, rMax);
-	barSil << QPointF(zMin, rMax);
-	barSil << QPointF(zMin, rMin);
-	barSil << QPointF(zMax, rMin);
-	barSil << QPointF(zMax, -rMin);
-	barSil << QPointF(zMin, -rMin);
-	barSil << QPointF(zMin, -rMax);
-	barSil << QPointF(zMax, -rMax);
-
-	QBrush aBarSilBrush(Qt::blue);
-	QGraphicsPolygonItem *theBarSil = new QGraphicsPolygonItem(barSil);
-	theBarSil->setPen(elementPen);
-	theBarSil->setBrush(aBarSilBrush);
-	theCollection->addItem(theBarSil);
-
-	items_drawn++;
-	ABarrelSiliconDetector_drawn++;
-      }
-    else if (mGeoReader.mDetectors[i].type == Detector::AEndcapSiliconDetector)
-      {
-	double rMax = mGeoReader.mDetectors[i].rMax;
-	double rMin = mGeoReader.mDetectors[i].rMin;
-	double zMax = mGeoReader.mDetectors[i].zMax;
-	double zMin = mGeoReader.mDetectors[i].zMin;
-
-	rMin/=SCALE_FACTOR;
-	rMax/=SCALE_FACTOR;
-	zMin/=SCALE_FACTOR;
-	zMax/=SCALE_FACTOR;
-
-	QPolygonF ecSil;
-	QPolygonF ecSil2;
-
-	ecSil << QPointF(zMax, rMax);
-	ecSil << QPointF(zMin, rMax);
-	ecSil << QPointF(zMin, rMin);
-	ecSil << QPointF(zMax, rMin);
-
-	ecSil << QPointF(zMax, -rMin);
-	ecSil << QPointF(zMin, -rMin);
-	ecSil << QPointF(zMin, -rMax);
-	ecSil << QPointF(zMax, -rMax);
-
-	ecSil2 << QPointF(-zMax, rMax);
-	ecSil2 << QPointF(-zMin, rMax);
-	ecSil2 << QPointF(-zMin, rMin);
-	ecSil2 << QPointF(-zMax, rMin);
-
-	ecSil2 << QPointF(-zMax, -rMin);
-	ecSil2 << QPointF(-zMin, -rMin);
-	ecSil2 << QPointF(-zMin, -rMax);
-	ecSil2 << QPointF(-zMax, -rMax);
-;
-	QGraphicsPolygonItem *theEcSil = new QGraphicsPolygonItem(ecSil);
-	QGraphicsPolygonItem *theEcSil2 = new QGraphicsPolygonItem(ecSil2);
-	theEcSil->setPen(elementPen);
-	theEcSil->setBrush(elementBrush);
-	theEcSil2->setPen(elementPen);
-	theEcSil2->setBrush(elementBrush);
-	theCollection->addItem(theEcSil);
-	theCollection->addItem(theEcSil2);
-
-	items_drawn++;
-	AEndcapSiliconDetector_drawn++;
-      }
-    else if (mGeoReader.mDetectors[i].type == Detector::ABarrelTRTDetector)
-      {
-	double rMin = mGeoReader.mDetectors[i].rMin;
-	double rMax = mGeoReader.mDetectors[i].rMax;
-	double zMin = mGeoReader.mDetectors[i].zMin;
-	double zMax = mGeoReader.mDetectors[i].zMax;
-
-	rMin/=SCALE_FACTOR;
-	rMax/=SCALE_FACTOR;
-	zMin/=SCALE_FACTOR;
-	zMax/=SCALE_FACTOR;
-
-	QPolygonF barTRT;
-
-	barTRT << QPointF(zMax, rMax);
-	barTRT << QPointF(zMin, rMax);
-	barTRT << QPointF(zMin, rMin);
-	barTRT << QPointF(zMax, rMin);
-
-	barTRT << QPointF(zMax, -rMin);
-	barTRT << QPointF(zMin, -rMin);
-	barTRT << QPointF(zMin, -rMax);
-	barTRT << QPointF(zMax, -rMax);
-
-	//TKQPen aBarTRTPen(Qt::black, 0);
-	QPen aBarTRTPen(Qt::transparent);//TK
-	QBrush aBarTRTBrush(Qt::yellow);
-	QGraphicsPolygonItem *theBarTRT = new QGraphicsPolygonItem(barTRT);
-	theBarTRT->setPen(aBarTRTPen);
-	theBarTRT->setBrush(aBarTRTBrush);
-	theCollection->addItem(theBarTRT);
-
-	items_drawn++;
-	ABarrelTRTDetector_drawn++;
-      }
-    else if (mGeoReader.mDetectors[i].type == Detector::AEndcapTRTDetector)
-      {
-	double rMin = mGeoReader.mDetectors[i].rMin;
-	double rMax = mGeoReader.mDetectors[i].rMax;
-	double zMin = mGeoReader.mDetectors[i].zMin;
-	double zMax = mGeoReader.mDetectors[i].zMax;
-
-	rMin/=SCALE_FACTOR;
-	rMax/=SCALE_FACTOR;
-	zMin/=SCALE_FACTOR;
-	zMax/=SCALE_FACTOR;
-
-	QPolygonF ecTRT;
-	QPolygonF ecTRT2;
-
-	ecTRT << QPointF(zMax, rMax);
-	ecTRT << QPointF(zMin, rMax);
-	ecTRT << QPointF(zMin, rMin);
-	ecTRT << QPointF(zMax, rMin);
-
-	ecTRT << QPointF(zMax, -rMin);
-	ecTRT << QPointF(zMin, -rMin);
-	ecTRT << QPointF(zMin, -rMax);
-	ecTRT << QPointF(zMax, -rMax);
-
-	ecTRT2 << QPointF(-zMax, rMax);
-	ecTRT2 << QPointF(-zMin, rMax);
-	ecTRT2 << QPointF(-zMin, rMin);
-	ecTRT2 << QPointF(-zMax, rMin);
-
-	ecTRT2 << QPointF(-zMax, -rMin);
-	ecTRT2 << QPointF(-zMin, -rMin);
-	ecTRT2 << QPointF(-zMin, -rMax);
-	ecTRT2 << QPointF(-zMax, -rMax);
-
-	QGraphicsPolygonItem *theEcTRT = new QGraphicsPolygonItem(ecTRT);
-	QGraphicsPolygonItem *theEcTRT2 = new QGraphicsPolygonItem(ecTRT2);
-	theEcTRT->setPen(elementPen);
-	theEcTRT->setBrush(elementBrush);
-	theEcTRT2->setPen(elementPen);
-	theEcTRT2->setBrush(elementBrush);
-	theCollection->addItem(theEcTRT);
-	theCollection->addItem(theEcTRT2);
-
-	items_drawn++;
-	AEndcapTRTDetector_drawn++;
-      }
-    else if (mGeoReader.mDetectors[i].type==Detector::AEndcapCryostat)
-      {
-	// does this even exist?"
-      }
-    else if (mGeoReader.mDetectors[i].type == Detector::ERROR_TYPE)
-      {
-	ERROR_TYPE_drawn++;
-      }
-  }
-}
-
-//This function adds the phi-rho projection.  See the XY projection for detailed comments.
-void VP12DGeometrySystem::Imp::addFRProjectionToCollection(VP1GraphicsItemCollection* theCollection)
-{
-  //TK  QPen elementPen(Qt::black,0);
-  QPen elementPen(Qt::transparent);//TK
-
-  for (unsigned int i=0; i<mGeoReader.mDetectors.size(); i++)
-    {
-      QBrush elementBrush(mGeoReader.mDetectors[i].color);
-      if (mGeoReader.mDetectors[i].type==Detector::ABox)
-	{
-
-	  for (unsigned int p=0;p<mGeoReader.mDetectors[i].phi.size();p++)
-	    {
-	      int phiIndex=mGeoReader.mDetectors[i].phi[p];
-	      double phi0 =mGeoReader.mDetectors[i].dphi;
-	      double phiDiv = calculatePhi(mGeoReader.mDetectors[i].name);
-	      double phi = phi0 * DEG_2_RAD + (phiIndex - 1) * M_PI / phiDiv;
-	      double rMin=mGeoReader.mDetectors[i].rInner+mGeoReader.mDetectors[i].RPCi;
-	      double rMax=mGeoReader.mDetectors[i].rInner-mGeoReader.mDetectors[i].RPCo;
-	      double sinPhi=sin(phi), cosPhi=cos(phi);
-
-	      rMin/=SCALE_FACTOR;
-	      rMax/=SCALE_FACTOR;
-	      double wd=M_PI*(mGeoReader.mDetectors[i].w)/64;
-
-	      double x1 = rMin*cosPhi - wd*sinPhi; double y1 = rMin*sinPhi + wd*cosPhi;
-	      double x2 = rMin*cosPhi + wd*sinPhi; double y2 = rMin*sinPhi - wd*cosPhi;
-	      double x3 = rMax*cosPhi + wd*sinPhi; double y3 = rMax*sinPhi - wd*cosPhi;
-	      double x4 = rMax*cosPhi - wd*sinPhi; double y4 = rMax*sinPhi + wd*cosPhi;
-
-	      double r1 = sqrt(x1*x1 + y1*y1); double f1 = atan2(y1, x1);
-	      double r2 = sqrt(x2*x2 + y2*y2); double f2 = atan2(y2, x2);
-	      double r3 = sqrt(x3*x3 + y3*y3); double f3 = atan2(y3, x3);
-	      double r4 = sqrt(x4*x4 + y4*y4); double f4 = atan2(y4, x4);
-
-	      if (f1 < 0) {f1 += 360;}
-	      if (f2 < 0) {f2 += 360;}
-	      if (f3 < 0) {f3 += 360;}
-	      if (f4 < 0) {f4 += 360;}
-
-	      QPolygonF poly;
-	      poly << QPointF(r1,f1);
-	      if (f2 - f1 > 180.) {f2 -= 360;}
-	      if (f2 - f1 < -180.) {f2 += 360;}
-	      poly << QPointF(r2,f2);
-	      if (f3 - f2 > 180.) {f2 -= 360;}
-	      if (f3 - f2 < -180.) {f2 += 360;}
-	      poly << QPointF(r3,f3);
-	      if (f4 - f3 > 180.) {f2 -= 360;}
-	      if (f4 - f3 < -180.) {f2 += 360;}
-	      poly << QPointF(r4,f4);
-
-	      QGraphicsPolygonItem * item = new QGraphicsPolygonItem(poly);
-	      item->setBrush(elementBrush);
-	      item->setPen(elementPen);
-	      theCollection->addItem(item);
-	      items_drawn++;
-	      ABox_drawn++;
-	    }
-	}
-      else if (mGeoReader.mDetectors[i].type==Detector::ATrd)
-	{
-	}
-      else if (mGeoReader.mDetectors[i].type==Detector::ATBx)
-	{
-	}
-      else if (mGeoReader.mDetectors[i].type==Detector::AGeometryConstant)
-	{
-	}
-      else if (mGeoReader.mDetectors[i].type==Detector::AGeneralPath)
-	{
-	}
-      else if (mGeoReader.mDetectors[i].type==Detector::ADisc)
-	{
-	}
-      else if (mGeoReader.mDetectors[i].type==Detector::ARectangle)
-	{
-	}
-      else if (mGeoReader.mDetectors[i].type==Detector::ABarrelCalorimeter)
-	{
-	}
-      else if (mGeoReader.mDetectors[i].type==Detector::AEndcapCalorimeter)
-	{
-	}
-      else if (mGeoReader.mDetectors[i].type==Detector::AGapCalorimeter)
-	{
-	}
-      else if (mGeoReader.mDetectors[i].type==Detector::ABarrelSiliconDetector)
-	{
-	}
-      else if (mGeoReader.mDetectors[i].type==Detector::AEndcapSiliconDetector)
-	{
-	}
-      else if (mGeoReader.mDetectors[i].type==Detector::ABarrelTRTDetector)
-	{
-	}
-      else if (mGeoReader.mDetectors[i].type==Detector::AEndcapTRTDetector)
-	{
-	}
-      else if (mGeoReader.mDetectors[i].type==Detector::AEndcapCryostat)
-	{
-	  // does this even exist?"
-	}
-      else if (mGeoReader.mDetectors[i].type == Detector::ERROR_TYPE)
-	{
-	  ERROR_TYPE_drawn++;
-	}
-    }
-}
-
-//This function adds the phi-z projection.  See the XY projection function for detailed comments.
-void VP12DGeometrySystem::Imp::addFZProjectionToCollection(VP1GraphicsItemCollection* /*theCollection*/)
-{
-  //TKQPen elementPen(Qt::black,0);
-  QPen elementPen(Qt::transparent);//TK
-
-  for (unsigned int i = 0; i < mGeoReader.mDetectors.size(); i++)
-    {
-      QBrush elementBrush(mGeoReader.mDetectors[i].color);
-      if (mGeoReader.mDetectors[i].type==Detector::ABox)
-	{
-
-	}
-      else if (mGeoReader.mDetectors[i].type==Detector::ATrd)
-	{
-	}
-      else if (mGeoReader.mDetectors[i].type==Detector::ATBx)
-	{
-	}
-      else if (mGeoReader.mDetectors[i].type==Detector::AGeometryConstant)
-	{
-	}
-      else if (mGeoReader.mDetectors[i].type==Detector::AGeneralPath)
-	{
-	}
-      else if (mGeoReader.mDetectors[i].type==Detector::ADisc)
-	{
-	}
-      else if (mGeoReader.mDetectors[i].type==Detector::ARectangle)
-	{
-	}
-      else if (mGeoReader.mDetectors[i].type==Detector::ABarrelCalorimeter)
-	{
-	}
-      else if (mGeoReader.mDetectors[i].type==Detector::AEndcapCalorimeter)
-	{
-	}
-      else if (mGeoReader.mDetectors[i].type==Detector::AGapCalorimeter)
-	{
-	}
-      else if (mGeoReader.mDetectors[i].type==Detector::ABarrelSiliconDetector)
-	{
-	}
-      else if (mGeoReader.mDetectors[i].type==Detector::AEndcapSiliconDetector)
-	{
-	}
-      else if (mGeoReader.mDetectors[i].type==Detector::ABarrelTRTDetector)
-	{
-	}
-      else if (mGeoReader.mDetectors[i].type==Detector::AEndcapTRTDetector)
-	{
-	}
-      else if (mGeoReader.mDetectors[i].type==Detector::AEndcapCryostat)
-	{
-	  // does this even exist?"
-	}
-      else if (mGeoReader.mDetectors[i].type == Detector::ERROR_TYPE)
-	{
-	  ERROR_TYPE_drawn++;
-	}
-    }
-}
-
-void VP12DGeometrySystem::Imp::processMuonDetector(const Detector& theDetector, VP1GraphicsItemCollection *theCollection, std::string projection)
-{
-  //Create a brush containing the color used to paint the detector shape
-  QBrush elementBrush(theDetector.color);
-
-  //Create a pen to outline the elements in their own color
-  QPen elementPen(theDetector.color,0);
-
-  switch (theDetector.type)
-    {
-    case Detector::ABox:
-      if (projection == "YX")
-	{
-	  if (theDetector.eta>=-100)
-	    {
-	      for (unsigned int p=0;p<theDetector.phi.size();p++)
-		for (int rpiter = 0; rpiter < 3; rpiter++)
-		  {
-		    {
-		      //in general, acquire the parameters needed to draw the shape
-		      int phiIndex=theDetector.phi[p];
-		      double phi0 =theDetector.dphi;
-		      double phiDiv = calculatePhi(theDetector.name);
-		      double phi = phi0 * DEG_2_RAD + (phiIndex - 1) * M_PI / phiDiv;
-		      double rMin(0), rMax(0);
-
-		      //Add the RPC layers on either side of the main detector if necessary
-
-		      //The main detector element
-		      if (rpiter == 0)
-			{
-			  rMin=theDetector.rInner+theDetector.RPCi;
-			  rMax=theDetector.rOuter-theDetector.RPCo;
-			}
-
-		      //Inner RPC layer
-		      else if (rpiter == 1)
-			{
-			  if (theDetector.RPCi > 0)
-			    {
-			      rMin = theDetector.rInner;
-			      rMax = theDetector.rInner + theDetector.RPCi;
-			    }
-			  else
-			    break;
-			}
-
-		      //Outer RPC layer
-		      else if (rpiter == 2)
-			{
-			  if (theDetector.RPCo > 0)
-			    {
-			      rMin = theDetector.rOuter - theDetector.RPCo;
-			      rMax = theDetector.rOuter;
-			    }
-			  else
-			    break;
-			}
-		      double sinPhi=sin(phi), cosPhi=cos(phi);
-		      double s = theDetector.sh;
-		      double d = theDetector.w/2.;
-
-		      //all parameters are scaled by a global #define, which can be tuned as necessary (currently set to 1.)
-		      rMin/=SCALE_FACTOR;
-		      rMax/=SCALE_FACTOR;
-
-		      double xMin = rMin*cosPhi-s*sinPhi; double xMax = rMax*cosPhi - s*sinPhi;
-		      double yMin = rMin*sinPhi+s*cosPhi; double yMax = rMax*sinPhi + s*cosPhi;
-		      double dx = d*sinPhi; double dy = d*cosPhi;
-
-		      //Create and add points to QPolygonF representing the geometry
-		      QPolygonF poly;
-		      poly << QPointF(xMin+dx, yMin-dy);
-		      poly << QPointF(xMin-dx, yMin+dy);
-		      poly << QPointF(xMax-dx, yMax+dy);
-		      poly << QPointF(xMax+dx, yMax-dy);
-
-		      //Create a new QGraphicsPolygonItem from the poly,
-		      //initialize its pen and brush, and add it to the collection
-		      QGraphicsPolygonItem * item = new QGraphicsPolygonItem(poly);
-		      item->setBrush(elementBrush);
-		      item->setPen(elementPen);
-		      theCollection->addItem(item);
-
-
-		      //Internal debugging/information statics
-		      items_drawn++;
-		      ABox_drawn++;
-		    }
-		  }
-	    }
-	}
-      else if (projection == "RZ")
-	{
-	  for (int zSide = -1; zSide <=1; zSide += 2)
-	    {
-	      for (int rpiter = 0; rpiter < 3; rpiter++)
-		{
-		  double rMin(0), rMax(0);
-		  if (rpiter == 0)
-		    {
-		      rMin = theDetector.rInner - theDetector.RPCi;
-		      rMax = theDetector.rOuter + theDetector.RPCo;
-		    }
-		  else if (rpiter == 1)
-		    {
-		      if (theDetector.RPCi > 0)
-			{
-			  rMin = theDetector.rInner;
-			  rMax = theDetector.rInner + theDetector.RPCi;
-			}
-		      else
-			break;
-		    }
-		  else if (rpiter == 2)
-		    {
-		      if (theDetector.RPCo > 0)
-			{
-			  rMin = theDetector.rOuter - theDetector.RPCo;
-			  rMax = theDetector.rOuter;
-			}
-		      else
-			break;
-		    }
-
-		  double zMin = theDetector.zInner*zSide;
-		  double zMax = theDetector.zOuter*zSide;
-
-		  rMin/=SCALE_FACTOR;
-		  rMax/=SCALE_FACTOR;
-		  zMin/=SCALE_FACTOR;
-		  zMax/=SCALE_FACTOR;
-
-		  QPolygonF aBox;
-		  aBox << QPointF(zMin,rMin);
-		  aBox << QPointF(zMin,rMax);
-		  aBox << QPointF(zMax,rMax);
-		  aBox << QPointF(zMax,rMin);
-
-		  QPolygonF aBoxFlip;
-		  aBoxFlip << QPointF(zMin,-rMax);
-		  aBoxFlip << QPointF(zMin, -rMin);
-		  aBoxFlip << QPointF(zMax,-rMin);
-		  aBoxFlip << QPointF(zMax, -rMax);
-
-		  QGraphicsPolygonItem *theBox = new QGraphicsPolygonItem(aBox);
-		  QGraphicsPolygonItem *theBoxFlip = new QGraphicsPolygonItem(aBoxFlip);
-		  theBox->setPen(elementPen);
-		  theBox->setBrush(elementBrush);
-		  theBoxFlip->setPen(elementPen);
-		  theBoxFlip->setBrush(elementBrush);
-		  theCollection->addItem(theBox);
-		  theCollection->addItem(theBoxFlip);
-
-		  items_drawn++;
-		  ABox_drawn++;
-		}
-	    }
-	}
-      break;
-
-    case Detector::ATrd:
-      if (projection == "YX")
-	{
-	  std::string technology = theDetector.name.substr(0,3);
-	  double phiDiv = calculatePhi(theDetector.name);
-	  for (unsigned int p=0; p < theDetector.phi.size(); p++)
-	    {
-	      int phiIndex = theDetector.phi[p];
-	      double phi0 = theDetector.dphi;
-	      double phi = phi0 * DEG_2_RAD + (phiIndex - 1) + M_PI/phiDiv;
-	      double rMin = theDetector.rInner;
-	      double rMax = theDetector.rOuter;
-	      double dS = theDetector.wInner/2.;
-	      double dL = theDetector.wOuter/2.;
-	      double sinPhi= sin(phi), cosPhi=cos(phi);
-
-	      rMin/=SCALE_FACTOR;
-	      rMax/=SCALE_FACTOR;
-
-	      double xMin = rMin*cosPhi, yMin = rMin*sinPhi;
-	      double xMax = rMax*cosPhi, yMax = rMax*sinPhi;
-	      double dxMin = dS*sinPhi, dyMin = dS*cosPhi;
-	      double dxMax = dL*sinPhi, dyMax = dL*cosPhi;
-
-	      QPolygonF poly;
-	      poly << QPointF(xMin+dxMin, yMin-dyMin);
-	      poly << QPointF(xMin-dxMin, yMin+dyMin);
-	      poly << QPointF(xMax-dxMax, yMax+dyMax);
-	      poly << QPointF(xMax+dxMax, yMax-dyMax);
-
-
-	      //Create a new QGraphicsPolygonItem from the poly,
-	      //initialize its pen and brush, and add it to the collection
-	      QGraphicsPolygonItem * item = new QGraphicsPolygonItem(poly);
-	      item->setBrush(elementBrush);
-	      item->setPen(elementPen);
-	      theCollection->addItem(item);
-
-
-	      //Internal debugging/information statics
-	      items_drawn++;
-	      ATrd_drawn++;
-	    }
-	}
-
-      else if (projection == "RZ")
-      	{
-	  for (int zSide = -1; zSide <= 1; zSide+=2)
-	    {
-	      double rMin = theDetector.rInner;
-	      double rMax = theDetector.rOuter;
-	      double zMin = theDetector.zInner*zSide;
-	      double zMax = theDetector.zOuter*zSide;
-	      double alpha= theDetector.alpha*DEG_2_RAD;
-
-	      rMin/=SCALE_FACTOR;
-	      rMax/=SCALE_FACTOR;
-	      zMin/=SCALE_FACTOR;
-	      zMax/=SCALE_FACTOR;
-
-	      QPolygonF aTrd, aTrdFlip;
-
-	      if (alpha == 0.)
-		{
-		  aTrd << QPointF(zMin, rMin);
-		  aTrd << QPointF(zMin, rMax);
-		  aTrd << QPointF(zMax, rMax);
-		  aTrd << QPointF(zMax, rMin);
-
-		  aTrdFlip << QPointF(zMin, -rMin);
-		  aTrdFlip << QPointF(zMin, -rMax);
-		  aTrdFlip << QPointF(zMax, -rMax);
-		  aTrdFlip << QPointF(zMax, -rMin);
-		}
-
-	      else
-		{
-		  double zMid = (zMin + zMax) / 2;
-		  double rMid = (rMin + rMax) / 2;
-		  double dRho = (rMax - rMin) / 2;
-		  double dZ   = (zMax - zMin) / 2;
-		  double sinAlpha = sin(alpha);
-		  double cosAlpha = cos(alpha);
-
-		  if (zMid * rMid > 0)
-		    { sinAlpha *= -1.;}
-
-		  double x1 = zMid - sinAlpha*dRho - cosAlpha*dZ;
-		  double x2 = zMid - sinAlpha*dRho + cosAlpha*dZ;
-		  double x3 = zMid + sinAlpha*dRho + cosAlpha*dZ;
-		  double x4 = zMid + sinAlpha*dRho - cosAlpha*dZ;
-
-		  std::stringstream debugger;
-		  debugger << x1 << " " << x2 << " " << x3 << " " << x4 << std::endl;
-
-		  double y1 = rMid + cosAlpha*dRho - sinAlpha*dZ;
-		  double y2 = rMid + cosAlpha*dRho + sinAlpha*dZ;
-		  double y3 = rMid - cosAlpha*dRho + sinAlpha*dZ;
-		  double y4 = rMid - cosAlpha*dRho - sinAlpha*dZ;
-
-		  debugger << y1 << " " << y2 << " " << y3 << " " << y4 << std::endl;
-
-		  QString debugout = debugger.str().c_str();
-		  theclass->message(debugout);
-
-		  aTrd << QPointF(x1, y1);
-		  aTrd << QPointF(x2, y2);
-		  aTrd << QPointF(x3, y3);
-		  aTrd << QPointF(x4, y4);
-
-		  aTrdFlip << QPointF(x1, -y1);
-		  aTrdFlip << QPointF(x2, -y2);
-		  aTrdFlip << QPointF(x3, -y3);
-		  aTrdFlip << QPointF(x4, -y4);
-		}
-
-	      QGraphicsPolygonItem *theTrd = new QGraphicsPolygonItem(aTrd);
-	      QGraphicsPolygonItem *theTrdFlip = new QGraphicsPolygonItem(aTrdFlip);
-	      theTrd->setPen(elementPen);
-	      theTrd->setBrush(elementBrush);
-	      theTrdFlip->setPen(elementPen);
-	      theTrdFlip->setBrush(elementBrush);
-	      theCollection->addItem(theTrd);
-	      theCollection->addItem(theTrdFlip);
-	      items_drawn++;
-	      ATrd_drawn++;
-	    }
-	}
-
-      break;
-
-    default:
-      break;
-    }
-
-}
-
-//More specific controller implementation to come
-// QWidget *VP12DGeometrySystem::buildController()
-// {
-//   QWidget *theWidget = new QWidget;
-//   Ui::VP12DGeometryControllerForm ui;
-//   ui.setupUi(theWidget);
-
-//   m_d->xy_RadioBtn = ui.radio_xy;
-//   m_d->xrz_RadioBtn = ui.radio_rz;
-
-//   return theWidget;
-// }
-- 
GitLab


From cd05fb62c82094412b3dc16b67f0eb5d851f231e Mon Sep 17 00:00:00 2001
From: Pavol Strizenec <pavol.strizenec@cern.ch>
Date: Mon, 5 Oct 2020 12:52:47 +0200
Subject: [PATCH 182/403] initial commit

---
 .../LArRawEvent/LArRawEvent/LArRawEventDict.h |   4 +
 .../LArRawEvent/LArRawEvent/LArRawSC.h        | 105 ++++++++++++++++++
 .../LArRawEvent/LArRawSCContainer.h           |  46 ++++++++
 .../LArRawEvent/LArRawEvent/LArSCDigit.h      |  59 ++++++++++
 .../LArRawEvent/LArSCDigitContainer.h         |  35 ++++++
 .../LArRawEvent/LArRawEvent/selection.xml     |   4 +
 LArCalorimeter/LArRawEvent/src/LArRawSC.cxx   |  48 ++++++++
 .../LArRawEvent/src/LArRawSCContainer.cxx     |  58 ++++++++++
 LArCalorimeter/LArRawEvent/src/LArSCDigit.cxx |  15 +++
 .../LArRawEvent/src/LArSCDigitContainer.cxx   |   8 ++
 10 files changed, 382 insertions(+)
 create mode 100755 LArCalorimeter/LArRawEvent/LArRawEvent/LArRawSC.h
 create mode 100755 LArCalorimeter/LArRawEvent/LArRawEvent/LArRawSCContainer.h
 create mode 100755 LArCalorimeter/LArRawEvent/LArRawEvent/LArSCDigit.h
 create mode 100755 LArCalorimeter/LArRawEvent/LArRawEvent/LArSCDigitContainer.h
 create mode 100755 LArCalorimeter/LArRawEvent/src/LArRawSC.cxx
 create mode 100755 LArCalorimeter/LArRawEvent/src/LArRawSCContainer.cxx
 create mode 100755 LArCalorimeter/LArRawEvent/src/LArSCDigit.cxx
 create mode 100755 LArCalorimeter/LArRawEvent/src/LArSCDigitContainer.cxx

diff --git a/LArCalorimeter/LArRawEvent/LArRawEvent/LArRawEventDict.h b/LArCalorimeter/LArRawEvent/LArRawEvent/LArRawEventDict.h
index 66d925be54e0..f9c99d8b8284 100755
--- a/LArCalorimeter/LArRawEvent/LArRawEvent/LArRawEventDict.h
+++ b/LArCalorimeter/LArRawEvent/LArRawEvent/LArRawEventDict.h
@@ -11,3 +11,7 @@
 #include "LArRawEvent/LArFebErrorSummary.h" 
 #include "LArRawEvent/LArLATOMEHeaderContainer.h" 
 //#include "LArRawEvent/LArRawChannelContainer.h" 
+#include "LArRawEvent/LArSCDigit.h" 
+#include "LArRawEvent/LArSCDigitContainer.h" 
+#include "LArRawEvent/LArRawSC.h" 
+#include "LArRawEvent/LArRawSCContainer.h" 
diff --git a/LArCalorimeter/LArRawEvent/LArRawEvent/LArRawSC.h b/LArCalorimeter/LArRawEvent/LArRawEvent/LArRawSC.h
new file mode 100755
index 000000000000..94f115f85c62
--- /dev/null
+++ b/LArCalorimeter/LArRawEvent/LArRawEvent/LArRawSC.h
@@ -0,0 +1,105 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef LARRAWSC_H
+#define LARRAWSC_H
+#include <vector>
+
+#include "Identifier/HWIdentifier.h"
+
+/**
+   @class LArRawSC
+   @brief Liquid Argon SuperCell raw data
+
+   represents the output of the LATOME
+*/
+
+class LArRawSC  {
+  
+ private:
+  
+  /** @brief Online Identifier */
+  HWIdentifier m_hardwareID;
+  
+  /** @brief Latome channel */
+  short m_chan;
+  
+  /** @brief LATOME source Id*/
+  unsigned int m_sourceId;
+
+  /** @brief vector of energies */
+  std::vector < int > m_energies;
+  
+  /** @brief vector of bcids */
+  std::vector < unsigned short > m_BCId;
+  
+  /** @brief vector of saturation flags */
+  std::vector < bool > m_satur;
+  
+ public:
+  /** @brief constructor 
+      @param[in] channel_value  Online identifier
+      @param[in] gain_value  Gain
+      @param[in] sample_value Reference of vector with ADC samples
+  */
+  LArRawSC(const HWIdentifier & channel_value, const short chan, const unsigned int sourceId, const std::vector < int > & energies, const std::vector<unsigned short> bcids, std::vector<bool> satur):
+    m_hardwareID(channel_value), m_chan(chan),m_sourceId(sourceId), m_energies(energies), m_BCId(bcids), m_satur(satur) {}
+
+  LArRawSC(const HWIdentifier & channel_value,
+           const short chan,
+           const unsigned int sourceId,
+           std::vector < int > && energies,
+           std::vector < unsigned short > && bcids,
+           std::vector < bool > && satur)
+    : m_hardwareID(channel_value),
+      m_chan(chan),
+      m_sourceId(sourceId),
+      m_energies(std::move(energies)),
+      m_BCId(std::move(bcids)),
+      m_satur(std::move(satur))
+  {}
+    
+    /** @return HWIdentifier */
+    const HWIdentifier & hardwareID() const {return m_hardwareID; }
+
+    /** @return channel */
+    short chan() const { return m_chan; }
+
+    /** @return source Id value */
+    unsigned int SourceId() const {return m_sourceId;}
+
+    /** @return number of samples */
+    int nsamples() const { return m_energies.size(); }
+
+    /** @return a reference to a stl vector containing the energies values */
+    const std::vector < int > & energies() const { return m_energies; }
+
+    /** @return a reference to a stl vector containing the bcid values */
+    const std::vector < unsigned short > & bcids() const { return m_BCId; }
+
+    /** @return a reference to a stl vector containing the saturation flags */
+    const std::vector < bool > & satur() const { return m_satur; }
+
+    /** @brief Conversion operator to a std::string <br> Can be used in a cast operation : (std::string) digit <br> */
+    virtual operator std::string() const;
+    
+    /** @brief Set energies .
+        @param[in] samples  vector of energies
+    */
+    void setEnergies( std::vector < int > energies);
+
+    /** @brief Set bcids.
+        @param[in] samples  vector of bcids
+    */
+    void setBCIds( std::vector < unsigned short > bcids);
+
+    /** @brief Destructor */
+    virtual ~LArRawSC() { }
+
+    /** @brief default constructor for persistency */
+    LArRawSC();
+};
+
+#endif //LArRawSC_H
+
diff --git a/LArCalorimeter/LArRawEvent/LArRawEvent/LArRawSCContainer.h b/LArCalorimeter/LArRawEvent/LArRawEvent/LArRawSCContainer.h
new file mode 100755
index 000000000000..07d8e04311e5
--- /dev/null
+++ b/LArCalorimeter/LArRawEvent/LArRawEvent/LArRawSCContainer.h
@@ -0,0 +1,46 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef LARRAWSCCONTAINER_H
+#define LARRAWSCCONTAINER_H
+
+#include "AthContainers/DataVector.h"
+#include "AthenaKernel/CLASS_DEF.h"
+#include "AthenaKernel/BaseInfo.h"
+#include "LArRawEvent/LArRawSC.h"
+
+/**
+   @class LArRawSCContainer
+   @brief Container class for LArRawSC */
+
+class LArRawSCContainer : public DataVector<LArRawSC> {
+
+ public :
+ 
+  /** @brief Constructor */
+   LArRawSCContainer() : DataVector<LArRawSC>() { }
+
+  /** @brief Alternative Construction with ownership policy*/
+  LArRawSCContainer(SG::OwnershipPolicy ownPolicy) : DataVector<LArRawSC>(ownPolicy) { }
+   
+/**
+  * Conversion operator to a std::string <br><br>
+  * Can be used in a cast operation : (std::string) digit_container
+  */
+  
+  virtual operator std::string() const;
+
+/**
+  * destructor 
+  */
+  virtual ~LArRawSCContainer() { }
+private:    
+
+} ;
+
+
+CLASS_DEF(LArRawSCContainer, 1169658673, 1)
+SG_BASE(LArRawSCContainer, DataVector<LArRawSC> );
+
+#endif
diff --git a/LArCalorimeter/LArRawEvent/LArRawEvent/LArSCDigit.h b/LArCalorimeter/LArRawEvent/LArRawEvent/LArSCDigit.h
new file mode 100755
index 000000000000..6d76280a4645
--- /dev/null
+++ b/LArCalorimeter/LArRawEvent/LArRawEvent/LArSCDigit.h
@@ -0,0 +1,59 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef LARSCDIGIT_H
+#define LARSCDIGIT_H
+#include "LArDigit.h"
+
+/**
+
+@class LArSCDigit
+@brief Base class for LArDigits taken by LATOME
+
+Additional data members to LArDigits are the LATOME channel number and the vector of BCIDs
+
+@author Pavol Strizenec
+*/
+
+class LArSCDigit : public LArDigit  {
+  
+private:
+  
+  /** @brief LATOME channel*/
+  uint16_t m_chan;
+
+  /** @brief LATOME source Id*/
+  uint32_t m_sourceId;
+
+  /** @brief vector of BCID*/
+  std::vector<uint16_t> m_BCId;
+
+public:
+
+  LArSCDigit(const HWIdentifier & channel_value, short channel, unsigned int sourceId, 
+             const std::vector<short> & sample_values,
+     	     const std::vector<unsigned short> & bcids) : 
+    LArDigit(channel_value, CaloGain::LARHIGHGAIN, sample_values), 
+    m_chan(channel), m_sourceId(sourceId), m_BCId(std::move(bcids))
+    {};
+
+  /** @return channel value */
+  short Channel() const {return static_cast<short>(m_chan);}
+
+  /** @return source Id value */
+  unsigned int SourceId() const {return static_cast<unsigned int>(m_sourceId);}
+
+  /** @return bcids */
+  const std::vector<unsigned short> &BCId() const {return m_BCId;}
+
+  /** @brief Destructor */
+  virtual ~LArSCDigit();
+
+  /** @brief default constructor for persistency */
+  LArSCDigit();
+
+};
+
+#endif //LARDIGIT_H
+
diff --git a/LArCalorimeter/LArRawEvent/LArRawEvent/LArSCDigitContainer.h b/LArCalorimeter/LArRawEvent/LArRawEvent/LArSCDigitContainer.h
new file mode 100755
index 000000000000..eabcddfbb3c8
--- /dev/null
+++ b/LArCalorimeter/LArRawEvent/LArRawEvent/LArSCDigitContainer.h
@@ -0,0 +1,35 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef LARSCDIGITCONTAINER_H
+#define LARSCDIGITCONTAINER_H
+
+#include "AthContainers/DataVector.h"
+#include "AthenaKernel/CLASS_DEF.h"
+#include "LArRawEvent/LArSCDigit.h"
+
+/**
+@class LArSCDigitContainer
+@brief Container class for LArSCDigit
+@author Pavol Strizenec
+*/
+
+class LArSCDigitContainer : public DataVector<LArSCDigit> {
+
+ public :
+  /**
+   @brief constructor
+   */
+  LArSCDigitContainer() : DataVector<LArSCDigit>() { }
+  
+/**
+   @brief destructor 
+  */
+  virtual ~LArSCDigitContainer();
+} ;
+
+
+CLASS_DEF(LArSCDigitContainer,1153794060,0)
+
+#endif
diff --git a/LArCalorimeter/LArRawEvent/LArRawEvent/selection.xml b/LArCalorimeter/LArRawEvent/LArRawEvent/selection.xml
index 785c3bd61501..485ed267612a 100755
--- a/LArCalorimeter/LArRawEvent/LArRawEvent/selection.xml
+++ b/LArCalorimeter/LArRawEvent/LArRawEvent/selection.xml
@@ -15,6 +15,10 @@
   <class name="LArDigitContainer" id="B15FFDA0-206D-4062-8B5F-582A1ECD5502" />
   <class name="DataVector<LArDigit>" />
   <class name="std::vector<LArDigit*>" />
+  <class name="LArSCDigit" />
+  <class name="LArSCDigitContainer" id="A9F35100-49CB-4A1B-AA25-5FCF1737BBE5" />
+  <class name="LArRawSC" />
+  <class name="LArRawSCContainer" id="CEBA32C8-FA00-4FCB-97DC-37F7F7C841BD" />
  
 <!--  <class name="std::vector<float>" /> -->
   <class name="LArTTL1Container" id="38FAECC7-D0C5-4DD8-8FAE-8D35F0542ECD" />
diff --git a/LArCalorimeter/LArRawEvent/src/LArRawSC.cxx b/LArCalorimeter/LArRawEvent/src/LArRawSC.cxx
new file mode 100755
index 000000000000..f09c03c9ce75
--- /dev/null
+++ b/LArCalorimeter/LArRawEvent/src/LArRawSC.cxx
@@ -0,0 +1,48 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include <typeinfo>
+
+#include "LArRawEvent/LArRawSC.h"
+
+
+// default constructor 
+LArRawSC::LArRawSC()  {}
+
+LArRawSC::operator std::string() const{
+
+ char * stSamples = new char[20] ;
+ char * stNumberOfSamples = new char[30] ;
+ char * classNameOfDigit = new char[48] ;
+ 
+ const char * stname = typeid( *this ).name() ; 
+ int lname ; 
+ sscanf( stname , "%80d%47s" , &lname , classNameOfDigit ) ;
+ 
+ 
+ sprintf( stNumberOfSamples , "# of samples = %d " , this->nsamples() ) ;
+ 
+ 
+ std::string digitString = classNameOfDigit ;
+ delete[] stSamples ;
+ delete[] classNameOfDigit ;
+ delete[] stNumberOfSamples ;
+ 
+ return digitString ;
+
+
+}
+
+// set method
+void LArRawSC::setEnergies(std::vector<int> energies)
+{
+  m_energies.clear();
+  m_energies = energies;
+}
+
+void LArRawSC::setBCIds(std::vector<unsigned short> bcids)
+{
+  m_BCId.clear();
+  m_BCId = bcids;
+}
diff --git a/LArCalorimeter/LArRawEvent/src/LArRawSCContainer.cxx b/LArCalorimeter/LArRawEvent/src/LArRawSCContainer.cxx
new file mode 100755
index 000000000000..1117287a7662
--- /dev/null
+++ b/LArCalorimeter/LArRawEvent/src/LArRawSCContainer.cxx
@@ -0,0 +1,58 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "LArRawEvent/LArRawSCContainer.h"
+#include "AthenaKernel/BaseInfo.h"
+#include <typeinfo>
+
+
+
+LArRawSCContainer::operator std::string () const {
+ 
+ char * stCounter = new char[48] ;
+ char * nameOfContainer = new char[48] ;
+ 
+ const char * stname = typeid( *this ).name() ; 
+ int lname ; 
+ sscanf( stname , "%80d%47s" , &lname , nameOfContainer ) ;
+ 
+ std::string newline( "\n" ) ;    
+ std::string digitContainerString = nameOfContainer ;
+             digitContainerString +=   ": content " ;
+             digitContainerString +=  newline ;
+ 
+ LArRawSCContainer::const_iterator it ;
+ int counter = 0 ;
+ const LArRawSC * digit ;    
+ 
+     for(it = this->begin() ; it != this->end() ; it++ ){ // Loop over Hits
+     
+       digit = *it ;
+             
+       sprintf( stCounter , "%d" , counter ) ;     
+        
+       digitContainerString += "LArRawSC[" ;
+       digitContainerString += stCounter ;
+       digitContainerString += "] = " ;
+       digitContainerString += (std::string) (*digit) ;
+       digitContainerString += newline ;
+     
+       counter ++ ; 
+       
+     }
+     
+     sprintf( stCounter , "%d" , counter ) ;
+     digitContainerString += newline ;
+     digitContainerString += "Number of Digits in this container : " ;
+     digitContainerString += stCounter ;
+ 
+ 
+ delete[] stCounter ;
+ delete[] nameOfContainer ;
+ 
+ return digitContainerString ;
+
+}
+
+SG_ADD_BASE (LArRawSCContainer, DataVector<LArRawSC> );
diff --git a/LArCalorimeter/LArRawEvent/src/LArSCDigit.cxx b/LArCalorimeter/LArRawEvent/src/LArSCDigit.cxx
new file mode 100755
index 000000000000..4c105b612bad
--- /dev/null
+++ b/LArCalorimeter/LArRawEvent/src/LArSCDigit.cxx
@@ -0,0 +1,15 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "LArRawEvent/LArSCDigit.h"
+
+/** Destructor */
+LArSCDigit::~LArSCDigit()
+{}
+
+/** default constructor for persistency */
+LArSCDigit::LArSCDigit()
+  : LArDigit(),
+    m_chan(0),m_sourceId(0)
+{}
diff --git a/LArCalorimeter/LArRawEvent/src/LArSCDigitContainer.cxx b/LArCalorimeter/LArRawEvent/src/LArSCDigitContainer.cxx
new file mode 100755
index 000000000000..c8916bd8eb12
--- /dev/null
+++ b/LArCalorimeter/LArRawEvent/src/LArSCDigitContainer.cxx
@@ -0,0 +1,8 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "LArRawEvent/LArSCDigitContainer.h"
+
+LArSCDigitContainer::~LArSCDigitContainer()
+{}
-- 
GitLab


From ed710ad9939452c2d9819cbfdc74b3e4df2f7813 Mon Sep 17 00:00:00 2001
From: Pavol Strizenec <pavol.strizenec@cern.ch>
Date: Mon, 5 Oct 2020 13:02:44 +0200
Subject: [PATCH 183/403] cond handles

---
 .../LArRecUtils/LArOFPeakRecoTool.h           | 14 ++---
 .../LArRecUtils/src/LArOFPeakRecoTool.cxx     | 59 +++++++++++++------
 2 files changed, 47 insertions(+), 26 deletions(-)

diff --git a/LArCalorimeter/LArRecUtils/LArRecUtils/LArOFPeakRecoTool.h b/LArCalorimeter/LArRecUtils/LArRecUtils/LArOFPeakRecoTool.h
index 26998706c330..77623a28e022 100755
--- a/LArCalorimeter/LArRecUtils/LArRecUtils/LArOFPeakRecoTool.h
+++ b/LArCalorimeter/LArRecUtils/LArRecUtils/LArOFPeakRecoTool.h
@@ -8,15 +8,15 @@
 #define LARCALIBUTILS_LAROFPEAKRECOTOOL_H
 
 #include "AthenaBaseComps/AthAlgTool.h"
-#include "StoreGate/DataHandle.h"
 #include "AthenaKernel/IOVSvcDefs.h"
 
 #include "LArElecCalib/ILArOFC.h"
 #include "LArElecCalib/ILArShape.h"
 #include "CaloIdentifier/CaloGain.h"
 #include "LArRawEvent/LArOFIterResults.h"
+#include "StoreGate/ReadCondHandleKey.h"
 
-class LArOnlineID;
+class LArOnlineID_Base;
 
 /**
   @brief Given a set of multiple samples, this class finds a peak using OFC.
@@ -77,17 +77,15 @@ class LArOFPeakRecoTool: public AthAlgTool
 
  private:
   bool m_iterate;
-  const DataHandle<ILArOFC>    m_dd_ofc;
-  const DataHandle<ILArShape>    m_dd_shape;
-  std::string m_keyOFC ;
-  std::string m_keyShape ;
+  SG::ReadCondHandleKey<ILArOFC>    m_keyOFC {this, "OFCKey", "LArOFC", "SG key for OFC object"};
+  SG::ReadCondHandleKey<ILArShape>  m_keyShape {this, "ShapeKey", "LArShape", "SG key for Shape object"};
   bool m_useShape;
   bool m_useShapeDer;
   int m_delayShift;
   float m_samplingPeriod;
   bool m_forceHighGain;
-
-  const LArOnlineID*        m_lar_on_id; 
+  bool m_isSC;
+  const LArOnlineID_Base*        m_lar_on_id; 
 
 };
 
diff --git a/LArCalorimeter/LArRecUtils/src/LArOFPeakRecoTool.cxx b/LArCalorimeter/LArRecUtils/src/LArOFPeakRecoTool.cxx
index 2b80865ae40c..e03488903ac5 100644
--- a/LArCalorimeter/LArRecUtils/src/LArOFPeakRecoTool.cxx
+++ b/LArCalorimeter/LArRecUtils/src/LArOFPeakRecoTool.cxx
@@ -7,6 +7,7 @@
 #include "CLHEP/Matrix/Vector.h"
 #include "GaudiKernel/SystemOfUnits.h"
 #include "LArIdentifier/LArOnlineID.h"
+#include "LArIdentifier/LArOnline_SuperCellID.h"
 #include <algorithm>
 #include <cmath>
 
@@ -23,10 +24,9 @@ LArOFPeakRecoTool::LArOFPeakRecoTool(const std::string& type, const std::string&
   //m_nSamples(0xFFFFFFFF) //shall compare false to any possible number of samples
 {
   declareProperty("Iterate",m_iterate=false) ;
-  declareProperty("KeyOFC",m_keyOFC="LArOFC") ;
-  declareProperty("KeyShape",m_keyShape="LArShape") ;
   declareProperty("UseShape",m_useShape=false,"Use the LArShape to compute quality factor");
   declareProperty("UseShapeDer",m_useShapeDer=true,"Use the shape derivative in the quality factor computation");
+  declareProperty("isSuperCell",m_isSC=false,"switch to use SuperCells");
 // DelayShift = different with delay run in 25/24 ns units
 //   23 is the ad-hoc value for run 5640-5641
   declareProperty("DelayShift",m_delayShift=23);
@@ -43,20 +43,30 @@ LArOFPeakRecoTool::~LArOFPeakRecoTool() {
 StatusCode LArOFPeakRecoTool::initialize() {
   ATH_MSG_DEBUG("initializing LArOFPeakRecoTool...");
   
-// call back for OFC 
-  
-  ATH_CHECK(  detStore()->regHandle(m_dd_ofc,m_keyOFC) );
-  ATH_MSG_INFO( " register callback for OFC "  );
+  ATH_CHECK(  m_keyOFC.initialize() );
 
   if (m_useShape) {
-    ATH_CHECK(  detStore()->regHandle(m_dd_shape,m_keyShape) );
+    ATH_CHECK(  m_keyShape.initialize() );
   }
   else {
     ATH_MSG_WARNING( "jobOption 'UseShape' set to false. Will work without shape"  );
   }
 
-  ATH_CHECK( detStore()->retrieve(m_lar_on_id,"LArOnlineID") );
-
+  if(!m_isSC) {
+     const LArOnlineID* laron;
+     StatusCode sc = detStore()->retrieve(laron,"LArOnlineID");
+     if (sc.isFailure()) {
+         ATH_MSG_ERROR("Unable to retrieve  LArOnlineID from DetectorStore");
+         return StatusCode::FAILURE;
+      } else m_lar_on_id = (LArOnlineID_Base*) laron;
+  } else {
+       const LArOnline_SuperCellID* laron;
+       StatusCode sc = detStore()->retrieve(laron,"LArOnline_SuperCellID");
+       if (sc.isFailure()) {
+           ATH_MSG_ERROR("Unable to retrieve  LArOnlineID from DetectorStore");
+           return StatusCode::FAILURE;
+       } else m_lar_on_id = (LArOnlineID_Base*) laron;
+  }
   return StatusCode::SUCCESS;
 }
 
@@ -131,9 +141,16 @@ LArOFIterResults LArOFPeakRecoTool::peak(const std::vector<float>& samples, // r
       else                                 usedGain = CaloGain::LARHIGHGAIN;
   }
 
+  const ILArOFC* dd_ofc=nullptr;
+  StatusCode sc=detStore()->retrieve(dd_ofc);
+  if (sc.isFailure()){
+     ATH_MSG_ERROR("Failed to retrieve LArOFC object " );
+     return result;
+  }
+
   // Quantities depending on this cell
-  const unsigned nOFCPhase=m_dd_ofc->nTimeBins(chID,usedGain);
-  float timeOffset = m_dd_ofc->timeOffset(chID,usedGain);
+  const unsigned nOFCPhase=dd_ofc->nTimeBins(chID,usedGain);
+  float timeOffset = dd_ofc->timeOffset(chID,usedGain);
 
   // convert delay to internal OFC delay (from 0 to Nphases*timeBinWidth)
   delay = delay-timeOffset;
@@ -145,7 +162,7 @@ LArOFIterResults LArOFPeakRecoTool::peak(const std::vector<float>& samples, // r
     timeBinWidth=25.; //ns
     timeMax=(nOFCPhase-1)*timeBinWidth;
   } else { //Have more than one OFC bin
-    timeBinWidth=m_dd_ofc->timeBinWidth(chID,usedGain);
+    timeBinWidth=dd_ofc->timeBinWidth(chID,usedGain);
     timeMax =  (nOFCPhase-1)*timeBinWidth;
     if (timeBinWidth==0.) {
       ATH_MSG_ERROR( "timeBinWidth is zero for channel " << m_lar_on_id->channel_name(chID)  );
@@ -161,8 +178,8 @@ LArOFIterResults LArOFPeakRecoTool::peak(const std::vector<float>& samples, // r
   //std::cout << "Timebinwidth=" << timeBinWidth << " nOFCPhase=" << nOFCPhase << std::endl; 
   //std::cout << "Delay= " << delay << " Index=" << delayIdx << std::endl;
   //Get first set of OFC's
-  ILArOFC::OFCRef_t this_OFC_a = m_dd_ofc->OFC_a(chID,(int)usedGain,delayIdx);
-  ILArOFC::OFCRef_t this_OFC_b = m_dd_ofc->OFC_b(chID,(int)usedGain,delayIdx);
+  ILArOFC::OFCRef_t this_OFC_a = dd_ofc->OFC_a(chID,(int)usedGain,delayIdx);
+  ILArOFC::OFCRef_t this_OFC_b = dd_ofc->OFC_b(chID,(int)usedGain,delayIdx);
   const unsigned ofcSize=this_OFC_a.size(); //Assumed to be the same of all delay-indices
   //std::cout << " got OFC " << this_OFC_a.size() << " " << this_OFC_b.size() << std::endl;
 
@@ -332,8 +349,8 @@ LArOFIterResults LArOFPeakRecoTool::peak(const std::vector<float>& samples, // r
     if (delayIdx>=nOFCPhase) delayIdx = nOFCPhase-1;
     //std::cout << " new kMax, delay,delayIdx " << kMax << " " << delay << " " << delayIdx << std::endl;
     //Get next set of OFC's
-    this_OFC_a = m_dd_ofc->OFC_a(chID,(int)usedGain,delayIdx);
-    this_OFC_b = m_dd_ofc->OFC_b(chID,(int)usedGain,delayIdx);
+    this_OFC_a = dd_ofc->OFC_a(chID,(int)usedGain,delayIdx);
+    this_OFC_b = dd_ofc->OFC_b(chID,(int)usedGain,delayIdx);
   }
   while(1);  // end for iteration loop 
 
@@ -343,10 +360,16 @@ LArOFIterResults LArOFPeakRecoTool::peak(const std::vector<float>& samples, // r
   //std::cout << "Done! A= " << result.m_amplitude << " ; tau= " << result.m_tau << " kIter=" << kIter << " nIter=" << nIter << std::endl;
   // get shape
   if (m_useShape){
+    const ILArShape* dd_shape=nullptr;
+    StatusCode sc=detStore()->retrieve(dd_shape);
+    if (sc.isFailure()){
+       ATH_MSG_ERROR("Failed to retrieve LArShape object with " );
+       return result;
+    } 
     q = 0.; 
-    ILArShape::ShapeRef_t thisShape    = m_dd_shape->Shape(chID,(int)usedGain,delayIdx) ;
+    ILArShape::ShapeRef_t thisShape    = dd_shape->Shape(chID,(int)usedGain,delayIdx) ;
     ILArShape::ShapeRef_t thisShapeDer;
-    if (m_useShapeDer) thisShapeDer = m_dd_shape->ShapeDer(chID,(int)usedGain,delayIdx) ;
+    if (m_useShapeDer) thisShapeDer = dd_shape->ShapeDer(chID,(int)usedGain,delayIdx) ;
     if( thisShape.size() >= ofcSize ) {
       for ( unsigned k=0 ; k<ofcSize ; k++ ) {
 	const float& this_sample = samples[kMax-2+k];
-- 
GitLab


From 348e14593e4371f872982171069151978ca8d595 Mon Sep 17 00:00:00 2001
From: Johannes Josef Junggeburth <johannes.josef.junggeburth@CERN.CH>
Date: Mon, 5 Oct 2020 13:08:08 +0200
Subject: [PATCH 184/403] Migrate the tool setup to MuonCombineAlgs and
 MuonCombinedTools. What a useless task... But let's make la Tortuga happy

---
 .../share/InDetRec_jobOptions.py              |   1 -
 .../python/MuonCombinedAlgs.py                | 109 +++++++++++++++---
 .../python/MuonCombinedKeys.py                |   2 +-
 .../python/MuonCombinedRecExampleConfigDb.py  |  70 ++---------
 .../python/MuonCombinedTools.py               |  46 ++++++++
 5 files changed, 148 insertions(+), 80 deletions(-)

diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_jobOptions.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_jobOptions.py
index f7c2d58b1b9f..ef83516a4e12 100755
--- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_jobOptions.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_jobOptions.py
@@ -1109,7 +1109,6 @@ else:
        merger_track_summary_tool = TrackingCommon.getInDetTrackSummaryToolSharedHits(namePrefix                 = 'DisappearingSplitProb',
                                                                                      ClusterSplitProbabilityName= DisappearingClusterSplitProbContainer)
        from InDetRecExample.TrackingCommon                        import getInDetPRDtoTrackMapToolGangedPixels
-       #assert( TrackingCommon.pixelClusterSplitProbName() == DisappearingClusterSplitProbContainer)
        TrkTrackCollectionMerger_pix = Trk__TrackCollectionMerger(name                    = "InDetTrackCollectionMerger_pix",
                                                                  TracksLocation          = DummyCollection,
                                                                  OutputTracksLocation    = InDetKeys.DisappearingTracks(),
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
index 597454a2dbfc..abc43efb1bf5 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.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 MuonCombinedRecExample.MuonCombinedRecFlags import muonCombinedRecFlags
 from AthenaCommon.CfgGetter import getPublicTool, getAlgorithm,getPublicToolClone
@@ -11,6 +11,9 @@ from AthenaCommon import CfgMgr
 from AthenaCommon.BeamFlags import jobproperties
 
 from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags
+from MuonCombinedRecExample.MuonCombinedKeys import MuonCombinedKeys as MuonCbKeys
+from InDetRecExample.InDetKeys import InDetKeys
+from InDetRecExample.InDetJobProperties import InDetFlags
 from TriggerJobOpts.TriggerFlags import TriggerFlags
 
 def MuonCombinedInDetExtensionAlg(name="MuonCombinedInDetExtensionAlg",**kwargs):
@@ -36,13 +39,34 @@ def MuonCaloTagAlg(name="MuonCaloTagAlg",**kwargs):
     kwargs.setdefault("HasMM", MuonGeometryFlags.hasMM() )
     return CfgMgr.MuonCombinedInDetExtensionAlg(name,**kwargs)
 
+def MuonCaloTagAlg_LRT(name="MuonCaloTagAlg_LRT", **kwargs):
+    tools = [getPublicTool("MuonCaloTagTool")]
+    kwargs.setdefault("MuonCombinedInDetExtensionTools", tools )
+    kwargs.setdefault("TagMap","caloTagMap_LRT")
+    kwargs.setdefault("InDetCandidateLocation",MuonCbKeys.InDetTrackParticlesLargeD0())  
+    kwargs.setdefault("CombinedTrackCollection","")
+    kwargs.setdefault("METrackCollection","")
+    kwargs.setdefault("SegmentCollection","")
+    kwargs.setdefault("HasCSC", MuonGeometryFlags.hasCSC() )
+    kwargs.setdefault("HasSTgc", MuonGeometryFlags.hasSTGC() )
+    kwargs.setdefault("HasMM", MuonGeometryFlags.hasMM() )
+    return CfgMgr.MuonCombinedInDetExtensionAlg(name,**kwargs)
+
+
 def MuonSegmentTagAlg( name="MuonSegmentTagAlg", **kwargs ):
     kwargs.setdefault("MuonSegmentTagTool", getPublicTool("MuonSegmentTagTool") )
     return CfgMgr.MuonSegmentTagAlg(name,**kwargs)
 
+def MuonSegmentTagAlg_LRT( name="MuonSegmentTagAlg_LRT", **kwargs ):
+    kwargs.setdefault("MuonSegmentTagTool", getPublicTool("MuonSegmentTagTool") )
+    kwargs.setdefault("InDetCandidateLocation", MuonCbKeys.InDetTrackParticlesLargeD0())
+    kwargs.setdefault("TagMap","segmentTagMap_LRT")
+    kwargs.setdefault("MuonSegmentLocation","MuonSegments")
+    return CfgMgr.MuonSegmentTagAlg(name,**kwargs)
+
+                                                                        
 def MuonInsideOutRecoAlg( name="MuonInsideOutRecoAlg", **kwargs ):
     tools = [getPublicTool("MuonInsideOutRecoTool") ]
-
     kwargs.setdefault("MuonCombinedInDetExtensionTools", tools )
     kwargs.setdefault("usePRDs",True)
     kwargs.setdefault("HasCSC", MuonGeometryFlags.hasCSC() )
@@ -51,6 +75,25 @@ def MuonInsideOutRecoAlg( name="MuonInsideOutRecoAlg", **kwargs ):
     kwargs.setdefault("TagMap","muGirlTagMap")
     return CfgMgr.MuonCombinedInDetExtensionAlg(name,**kwargs)
 
+
+def MuGirlAlg_LRT( name="MuGirlAlg_LRT", **kwargs ):
+    tools = [getPublicTool("MuonInsideOutRecoTool") ]
+    kwargs.setdefault("MuonCombinedInDetExtensionTools", tools )
+    kwargs.setdefault("usePRDs",True)
+    kwargs.setdefault("HasCSC", MuonGeometryFlags.hasCSC() )
+    kwargs.setdefault("HasSTgc", MuonGeometryFlags.hasSTGC() )
+    kwargs.setdefault("HasMM", MuonGeometryFlags.hasMM() )
+    kwargs.setdefault("TagMap","MuGirlMap_LRT")
+    kwargs.setdefault("METrackCollection","MuGirlMETracks_LRT")
+    kwargs.setdefault("SegmentCollection","MuGirlSegments_LRT")
+    kwargs.setdefault("CombinedTrackCollection",MuonCbKeys.MuGirlMuonsLargeD0())
+    kwargs.setdefault("InDetCandidateLocation",MuonCbKeys.InDetTrackParticlesLargeD0())
+    return CfgMgr.MuonCombinedInDetExtensionAlg(name,**kwargs)
+    
+
+                                  
+                               
+                                 
 def MuGirlStauAlg(name="MuGirlStauAlg",**kwargs):
     tools = [getPublicTool("MuonStauRecoTool")]
     kwargs.setdefault("MuonCombinedInDetExtensionTools", tools )
@@ -63,17 +106,26 @@ def MuGirlStauAlg(name="MuGirlStauAlg",**kwargs):
     kwargs.setdefault("SegmentCollection","MuGirlStauSegments")
     return CfgMgr.MuonCombinedInDetExtensionAlg(name,**kwargs)
 
-def MuonCombinedInDetCandidateAlg( name="MuonCombinedInDetCandidateAlg",**kwargs ):
-    from InDetRecExample.InDetJobProperties import InDetFlags
+def MuonCombinedInDetCandidateAlg( name="MuonCombinedInDetCandidateAlg",**kwargs ):    
     kwargs.setdefault("TrackSelector",getPublicTool("MuonCombinedInDetDetailedTrackSelectorTool") )
     if muonCombinedRecFlags.doSiAssocForwardMuons() and InDetFlags.doForwardTracks():
         kwargs.setdefault("DoSiliconAssocForwardMuons", True )
         kwargs.setdefault("InDetForwardTrackSelector", getPublicTool("MuonCombinedInDetDetailedForwardTrackSelectorTool") )
 
     kwargs.setdefault("MuonSystemExtensionTool", getPublicTool("MuonSystemExtensionTool"))
+    return CfgMgr.MuonCombinedInDetCandidateAlg(name,**kwargs)
 
+def MuonCombinedInDetCandidateAlg_LRT( name="MuonCombinedInDetCandidateAlg_LRT",**kwargs ):
+    kwargs.setdefault("TrackSelector",getPublicTool("MuonCombinedInDetDetailedTrackSelectorTool_LRT") )
+    kwargs.setdefault("MuonSystemExtensionTool", getPublicTool("MuonSystemExtensionTool"))
+    kwargs.setdefault("TrackParticleLocation",[InDetKeys.xAODLargeD0TrackParticleContainer()])
+    kwargs.setdefault("InDetCandidateLocation",MuonCbKeys.InDetTrackParticlesLargeD0())
+    kwargs.setdefault("DoSiliconAssocForwardMuons", False)
+    kwargs.setdefault("InDetForwardTrackSelector", getPublicTool("MuonCombinedInDetDetailedForwardTrackSelectorTool") )
     return CfgMgr.MuonCombinedInDetCandidateAlg(name,**kwargs)
 
+
+
 def MuonCombinedMuonCandidateAlg( name="MuonCombinedMuonCandidateAlg", **kwargs ):
     kwargs.setdefault("MuonCandidateTool",getPublicTool("MuonCandidateTool"))
     return CfgMgr.MuonCombinedMuonCandidateAlg(name,**kwargs)
@@ -91,6 +143,14 @@ def MuonCombinedAlg( name="MuonCombinedAlg",**kwargs ):
     kwargs.setdefault("CombinedTagMaps", tagmaps)
     return CfgMgr.MuonCombinedAlg(name,**kwargs)
 
+def MuonCombinedAlg_LRT( name="MuonCombinedAlg_LRT",**kwargs ):
+    kwargs.setdefault("MuonCombinedTool",getPublicTool("MuonCombinedTool"))
+    kwargs.setdefault("InDetCandidateLocation",MuonCbKeys.InDetTrackParticlesLargeD0())
+    kwargs.setdefault("CombinedTagMaps", ["muidcoTagMap_LRT","stacoTagMap_LRT"])
+    kwargs.setdefault("MuidCombinedTracksLocation", "MuidCombinedTracks_LRT")
+    kwargs.setdefault("MuidMETracksLocation", "MuidMETracks_LRT")    
+    return CfgMgr.MuonCombinedAlg(name,**kwargs)
+
 def recordMuonCreatorAlgObjs (kw):
     Alg = CfgMgr.MuonCreatorAlg
     def val (prop):
@@ -126,6 +186,26 @@ def MuonCreatorAlg( name="MuonCreatorAlg",**kwargs ):
         kwargs.setdefault("ClusterContainerName", "")
     return CfgMgr.MuonCreatorAlg(name,**kwargs)
 
+
+def MuonCreatorAlg_LRT( name="MuonCreatorAlg_LRT",**kwargs ):
+    kwargs.setdefault("MuonCreatorTool",getPublicTool("MuonCreatorTool_LRT"))
+    recordMuonCreatorAlgObjs (kwargs)
+    kwargs.setdefault("TagMaps",["muidcoTagMap_LRT","stacoTagMap_LRT","segmentTagMap_LRT","MuGirlMap_LRT","caloTagMap_LRT"])
+    kwargs.setdefault("MuonContainerLocation", MuonCbKeys.FinalMuonsLargeD0())
+    kwargs.setdefault("InDetCandidateLocation", MuonCbKeys.InDetTrackParticlesLargeD0())
+    kwargs.setdefault("ExtrapolatedLocation", "ExtraPolated"+MuonCbKeys.FinalMuonsLargeD0())
+    kwargs.setdefault("MSOnlyExtrapolatedLocation", "MSOnlyExtraPolated"+MuonCbKeys.FinalMuonsLargeD0())
+    kwargs.setdefault("CombinedLocation", "Combined"+MuonCbKeys.FinalMuonsLargeD0())
+    kwargs.setdefault("SegmentContainerName", "MuonSegments_LRT")
+    kwargs.setdefault("TrackSegmentContainerName", "TrackMuonSegments_LRT")
+    kwargs.setdefault("BuildSlowMuon", False)
+    kwargs.setdefault("MakeClusters", False)
+    kwargs.setdefault("ClusterContainerName", "")
+    return CfgMgr.MuonCreatorAlg(name,**kwargs)
+
+
+
+
 def StauCreatorAlg( name="StauCreatorAlg", **kwargs ):
     kwargs.setdefault("MuonCreatorTool",getPublicTool("StauCreatorTool"))
     kwargs.setdefault("MuonContainerLocation","Staus")
@@ -156,16 +236,13 @@ class MuonCombinedReconstruction(ConfiguredMuonRec):
             # creates input collections for ID and MS candidates
         topSequence += getAlgorithm("MuonCombinedInDetCandidateAlg")
         topSequence += getAlgorithm("MuonCombinedMuonCandidateAlg")
-
-        from InDetRecExample.InDetJobProperties import InDetFlags
-        if InDetFlags.doR3LargeD0():
-            topSequence += getAlgorithm("MuonCombinedInDetCandidateAlg_LargeD0")
+             
+        if InDetFlags.doR3LargeD0(): topSequence += getAlgorithm("MuonCombinedInDetCandidateAlg_LRT")
 
         # runs ID+MS combinations (fit, staco, mugirl, ID-taggers)
         if muonCombinedRecFlags.doStatisticalCombination() or muonCombinedRecFlags.doCombinedFit():
             topSequence += getAlgorithm("MuonCombinedAlg")
-            if InDetFlags.doR3LargeD0():
-                topSequence += getAlgorithm("MuonCombinedAlg_LargeD0")
+            if InDetFlags.doR3LargeD0(): topSequence += getAlgorithm("MuonCombinedAlg_LRT")
 
 
 
@@ -173,24 +250,20 @@ class MuonCombinedReconstruction(ConfiguredMuonRec):
             topSequence += getAlgorithm("MuonInsideOutRecoAlg")
             if muonCombinedRecFlags.doMuGirlLowBeta():
                 topSequence += getAlgorithm("MuGirlStauAlg")
-            if InDetFlags.doR3LargeD0():
-                topSequence += getAlgorithm("MuGirlAlg_LargeD0")
+            if InDetFlags.doR3LargeD0(): topSequence += getAlgorithm("MuGirlAlg_LRT")
 
         if muonCombinedRecFlags.doCaloTrkMuId():
             topSequence += getAlgorithm("MuonCaloTagAlg")
-            if InDetFlags.doR3LargeD0():
-                topSequence += getAlgorithm("MuonCaloTagAlg_LargeD0")
+            if InDetFlags.doR3LargeD0(): topSequence += getAlgorithm("MuonCaloTagAlg_LRT")
 
         if muonCombinedRecFlags.doMuonSegmentTagger():
             getPublicTool("MuonSegmentTagTool")
             topSequence += getAlgorithm("MuonSegmentTagAlg")
-            if InDetFlags.doR3LargeD0():
-                topSequence += getAlgorithm("MuonSegmentTagAlg_LargeD0")
+            if InDetFlags.doR3LargeD0(): topSequence += getAlgorithm("MuonSegmentTagAlg_LRT")
 
         # runs over outputs and create xAODMuon collection
         topSequence += getAlgorithm("MuonCreatorAlg")
-        if InDetFlags.doR3LargeD0():
-            topSequence += getAlgorithm("MuonCreatorAlg_LargeD0")
+        if InDetFlags.doR3LargeD0(): topSequence += getAlgorithm("MuonCreatorAlg_LRT")
  
         # setting this here, in the new configuration it will be easier to do
         topSequence.MuonCreatorAlg.MuonCreatorTool.ParticleCaloExtensionTool.StartFromPerigee=True
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedKeys.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedKeys.py
index 75f85ea4e78c..e7b4c7306caf 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedKeys.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedKeys.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 MuonCombinedRecExample/python/MuonCombinedKeys.py
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py
index 82dc5ab82b1d..0a3cd804794c 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.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.CfgGetter import addTool, addToolClone, addService, addAlgorithm, \
      addTypesToExcludeIfDefaultValue, addNamesToExcludeIfDefaultValue, addFullNamesToExcludeIfDefaultValue, \
@@ -7,8 +7,6 @@ from AthenaCommon.CfgGetter import addTool, addToolClone, addService, addAlgorit
      addTypesOnlyToSkip
 
 from AthenaCommon.Constants import *  # FATAL,ERROR etc.
-from InDetRecExample.InDetKeys import InDetKeys
-from MuonCombinedRecExample.MuonCombinedKeys import MuonCombinedKeys as MuonCbKeys
 # combined tools
 addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCombinedTool","MuonCombinedTool")
 
@@ -38,69 +36,26 @@ addTool("MuonCombinedRecExample.MuonCombinedFitTools.MuonMaterialProviderTool","
 
 
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCaloTagAlg","MuonCaloTagAlg")
-addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCaloTagAlg","MuonCaloTagAlg_LargeD0",
-                                                                      InDetCandidateLocation=MuonCbKeys.InDetTrackParticlesLargeD0(),  
-                                                                                                     
-                                                                      TagMap="caloTagMap_LargeD0")
+addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCaloTagAlg_LRT","MuonCaloTagAlg_LRT")
 
 
 
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonInsideOutRecoAlg","MuonInsideOutRecoAlg")
-addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonInsideOutRecoAlg","MuGirlAlg_LargeD0",
-                                  InDetCandidateLocation=MuonCbKeys.InDetTrackParticlesLargeD0(),
-                                  CombinedTrackCollection=MuonCbKeys.MuGirlMuonsLargeD0(),
-                                  METrackCollection="MuGirlMETracksLargeD0",
-                                  SegmentCollection="MuGirlSegmentsLargeD0",
-                                  TagMap="MuGirlMap_LargeD0")
-
+addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuGirlAlg_LRT","MuGirlAlg_LRT")
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuGirlStauAlg","MuGirlStauAlg")
 
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCombinedInDetCandidateAlg","MuonCombinedInDetCandidateAlg")
-addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCombinedInDetCandidateAlg",
-                                    "MuonCombinedInDetCandidateAlg_LargeD0",
-                                    TrackParticleLocation=[InDetKeys.xAODLargeD0TrackParticleContainer()],
-                                    InDetCandidateLocation=MuonCbKeys.InDetTrackParticlesLargeD0(),  
-									TrackSelector="MuonCombinedInDetDetailedTrackSelectorTool_LargeD0",
-                                    DoSiliconAssocForwardMuons=False)
-
-
+addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCombinedInDetCandidateAlg_LRT","MuonCombinedInDetCandidateAlg_LRT")
 
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCombinedMuonCandidateAlg","MuonCombinedMuonCandidateAlg")
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCombinedAlg","MuonCombinedAlg")
-## Large D0 version
-addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCombinedAlg", "MuonCombinedAlg_LargeD0",
-                                                                        InDetCandidateLocation=MuonCbKeys.InDetTrackParticlesLargeD0(),
-                                                                        CombinedTagMaps=["muidcoTagMap_LargeD0","stacoTagMap_LargeD0"],
-                                                                        MuidCombinedTracksLocation="MuidCombinedTracks_LargeD0",
-                                                                        MuidMETracksLocation="MuidMETracks_LargeD0")
-
+addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCombinedAlg_LRT", "MuonCombinedAlg_LRT")
 
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonSegmentTagAlg","MuonSegmentTagAlg")
-addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonSegmentTagAlg","MuonSegmentTagAlg_LargeD0",
-                                                                        InDetCandidateLocation=MuonCbKeys.InDetTrackParticlesLargeD0(),
-                                                                        TagMap="segmentTagMap_LargeD0",
-                                                                        MuonSegmentLocation="MuonSegments")
-
-
-
-
+addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonSegmentTagAlg_LRT","MuonSegmentTagAlg_LRT")
 
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCreatorAlg","MuonCreatorAlg")
-addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCreatorAlg","MuonCreatorAlg_LargeD0",
-                                                                      MuonContainerLocation=MuonCbKeys.FinalMuonsLargeD0(),
-                                                                      InDetCandidateLocation=MuonCbKeys.InDetTrackParticlesLargeD0(),
-                                                                      ExtrapolatedLocation="ExtraPolated"+MuonCbKeys.FinalMuonsLargeD0(),
-                                                                      #ExtrapolatedTrackLocation="ExtraPolatedMuonLRT",
-                                                                      MSOnlyExtrapolatedLocation="MSOnlyExtraPolated"+MuonCbKeys.FinalMuonsLargeD0(),
-                                                                      #MSOnlyExtrapolatedTrackLocation="MSOnlyExtraPolated"+MuonCbKeys.FinalMuonsLargeD0(),
-                                                                      CombinedLocation="Combined"+MuonCbKeys.FinalMuonsLargeD0(),
-                                                                      SegmentContainerName="MuonSegments_LargeD0",
-                                                                      TrackSegmentContainerName="TrakMuonSegments_LargeD0",
-                                                                      TagMaps=["muidcoTagMap_LargeD0","stacoTagMap_LargeD0","segmentTagMap_LargeD0","MuGirlMap_LargeD0","caloTagMap_LargeD0"],
-                                                                      BuildSlowMuon= False,
-                                                                      MakeClusters=False ,
-                                                                      MuonCreatorTool="MuonCombined::MuonCreatorTool/MuonCreatorTool_LRT",
-                                                                      OutputLevel=DEBUG   )
+addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCreatorAlg_LRT","MuonCreatorAlg_LRT" )
 
 
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.StauCreatorAlg","StauCreatorAlg")
@@ -115,13 +70,8 @@ addTool("MuonCombinedRecExample.MuonSegmentTaggerTools.MuTagAmbiguitySolverTool"
 addTool("MuonCombinedRecExample.MuonSegmentTaggerTools.MuonSegmentTagTool","MuonSegmentTagTool")
 
 addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCombinedInDetDetailedTrackSelectorTool","MuonCombinedInDetDetailedTrackSelectorTool")
-addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCombinedInDetDetailedTrackSelectorTool",
-        "MuonCombinedInDetDetailedTrackSelectorTool_LargeD0",
-        IPd0Max=1.e4,
-        nHitPix=0,
-        nHitSct=4,
-        
-)
+
+addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCombinedInDetDetailedTrackSelectorTool_LRT", "MuonCombinedInDetDetailedTrackSelectorTool_LRT")
 
 addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCombinedInDetDetailedTrackSelectorTool","MuonCombinedInDetDetailedForwardTrackSelectorTool", nHitSct=0)
 addTool("MuonCombinedRecExample.MuonCombinedTools.MuonInDetForwardCandidateTool","MuonInDetForwardCandidateTool")
@@ -129,7 +79,7 @@ addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCombinedParticleCreator","
 addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCaloParticleCreator","MuonCaloParticleCreator")
 addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCreatorTool","MuonCreatorTool")
 addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCreatorTool","StauCreatorTool",BuildStauContainer=True)
-addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCreatorTool","MuonCreatorTool_LRT",RequireIDTrack=True)
+addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCreatorTool_LRT","MuonCreatorTool_LRT")
 
 addTool("MuonCombinedRecExample.MuonCombinedTools.ExtrapolateMuonToIPTool","ExtrapolateMuonToIPTool")
 addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCandidateTool","MuonCandidateTool")
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedTools.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedTools.py
index bb6f1691087a..b8813836f425 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedTools.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedTools.py
@@ -41,6 +41,26 @@ def MuonCombinedInDetDetailedTrackSelectorTool( name='MuonCombinedInDetDetailedT
     kwargs.setdefault("Extrapolator", getPublicTool("AtlasExtrapolator") )
     return CfgMgr.InDet__InDetDetailedTrackSelectorTool(name,**kwargs)
 
+
+def MuonCombinedInDetDetailedTrackSelectorTool_LRT(name='MuonCombinedInDetDetailedTrackSelectorTool_LRT', **kwargs):
+    kwargs.setdefault("pTMin", 2000 )
+    kwargs.setdefault("IPd0Max", 1.e4 )
+    kwargs.setdefault("IPz0Max",  1.e4 )
+    kwargs.setdefault("z0Max",  1.e4  )
+    kwargs.setdefault("useTrackSummaryInfo", True )
+    kwargs.setdefault("nHitBLayer", 0 )
+    kwargs.setdefault("nHitPix", 0 )
+    kwargs.setdefault("nHitBLayerPlusPix", 0 )
+    kwargs.setdefault("nHitSct", 4 )
+    kwargs.setdefault("nHitSi", 4 )
+    kwargs.setdefault("nHitTrt", 0 )
+    kwargs.setdefault("useTrackQualityInfo", False )    
+    kwargs.setdefault("TrackSummaryTool", getPublicTool("AtlasTrackSummaryTool") )
+    kwargs.setdefault("Extrapolator", getPublicTool("AtlasExtrapolator") )
+    return CfgMgr.InDet__InDetDetailedTrackSelectorTool(name,**kwargs)
+    
+
+
 def MuonInDetForwardCandidateTool( name = 'MuonInDetForwardCandidateTool', **kwargs):
    #import pdb ; pdb.set_trace()
    idCandTool = getPublicToolClone("InDetForwardCandidateTool","InDetCandidateTool", TrackSelector = getPublicTool("MuonCombinedInDetDetailedForwardTrackSelectorTool") )
@@ -97,6 +117,32 @@ def MuonCreatorTool(name="MuonCreatorTool",**kwargs):
     kwargs.setdefault("MuonPrinter", getPublicTool("MuonPrintingTool") )
     return CfgMgr.MuonCombined__MuonCreatorTool(name,**kwargs)
 
+def MuonCreatorTool_LRT(name="MuonCreatorTool_LRT",**kwargs):
+    kwargs.setdefault("CaloMaterialProvider", getPublicTool("MuonMaterialProviderTool"))
+    if TriggerFlags.MuonSlice.doTrigMuonConfig:
+        kwargs.setdefault('MakeTrackAtMSLink',True)
+        kwargs.setdefault("FillTimingInformation",False)
+        kwargs.setdefault("MuonSelectionTool", "")
+        kwargs.setdefault("UseCaloCells", False)
+        kwargs.setdefault("TrackSegmentAssociationTool", "")
+    else:
+        getPublicTool("MuonMomentumBalanceSignificanceTool")
+        getPublicTool("MuonScatteringAngleSignificanceTool")
+        getPublicTool("MuonCaloParticleCreator")
+    import MuonCombinedRecExample.CombinedMuonTrackSummary
+    from AthenaCommon.AppMgr import ToolSvc
+    kwargs.setdefault("TrackSummaryTool", ToolSvc.CombinedMuonTrackSummary)
+
+    kwargs.setdefault("TrackParticleCreator", getPublicTool("MuonCombinedParticleCreator") )
+    kwargs.setdefault("ParticleCaloExtensionTool", getPublicTool("MuonParticleCaloExtensionTool") )
+    kwargs.setdefault("MuonPrinter", getPublicTool("MuonPrintingTool") )
+    kwargs.setdefault("RequireIDTrack", True)
+    return CfgMgr.MuonCombined__MuonCreatorTool(name,**kwargs)
+    
+    
+
+
+
 def ExtrapolateMuonToIPTool(name="ExtrapolateMuonToIPTool",**kwargs):
     if TriggerFlags.MuonSlice.doTrigMuonConfig:
         kwargs.setdefault("TrackSummaryTool", getPublicTool("MuonTrackSummaryTool"))
-- 
GitLab


From c10b89570253ee999b4a5abf16fdbc7f22ff78eb Mon Sep 17 00:00:00 2001
From: Johannes Josef Junggeburth <johannes.josef.junggeburth@cern.ch>
Date: Mon, 5 Oct 2020 11:21:06 +0000
Subject: [PATCH 185/403] Revert change

---
 .../MuonCombinedRecExample/python/MuonCombinedRecFlags.py     | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecFlags.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecFlags.py
index 759c35cd2cef..a86481d3335f 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecFlags.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecFlags.py
@@ -109,10 +109,6 @@ class doxAOD(JobProperty):
     allowedTypes=['bool']
     StoredValue=True
 
-class doLargeRadius(JobProperty):
-    satusOn = True
-    allowedTypes=['bool']
-    StoredValue=False
 # @brief run truth-matching on tracks to evaluate tracking performance
 #
 # It will enable matching for the Combined Muon algorithms that are running
-- 
GitLab


From a037fd5e1ee0f6e892e55e952219b90747cad08b Mon Sep 17 00:00:00 2001
From: Debo <debottam.bakshi.gupta@cern.ch>
Date: Mon, 5 Oct 2020 13:41:51 +0200
Subject: [PATCH 186/403] Switching off DEBUG options and renaming
 topoHypoTools to more inclusive names for electron and photon

---
 ...ypoTool.cxx => TrigEgammaDPhiHypoTool.cxx} | 22 ++++++++++---------
 ...PhiHypoTool.h => TrigEgammaDPhiHypoTool.h} | 21 +++++++++---------
 ...ypoTool.cxx => TrigEgammaMassHypoTool.cxx} | 22 ++++++++++---------
 ...assHypoTool.h => TrigEgammaMassHypoTool.h} | 18 +++++++--------
 .../src/components/TrigEgammaHypo_entries.cxx |  8 +++----
 .../share/ref_RDOtoRDOTrig_v1Dev_build.ref    |  3 +++
 .../share/ref_data_v1Dev_build.ref            |  3 +++
 .../HLTMenuConfig/Egamma/ElectronDef.py       |  9 ++++++--
 .../python/HLTMenuConfig/Egamma/PhotonDef.py  | 13 ++++++-----
 .../Egamma/PhotonSequenceSetup.py             |  5 +----
 .../python/HLTMenuConfig/Menu/LS2_v1.py       |  2 +-
 11 files changed, 69 insertions(+), 57 deletions(-)
 rename Trigger/TrigHypothesis/TrigEgammaHypo/src/{TrigEgammaDiphotonDPhiHypoTool.cxx => TrigEgammaDPhiHypoTool.cxx} (65%)
 rename Trigger/TrigHypothesis/TrigEgammaHypo/src/{TrigEgammaDiphotonDPhiHypoTool.h => TrigEgammaDPhiHypoTool.h} (74%)
 rename Trigger/TrigHypothesis/TrigEgammaHypo/src/{TrigEgammaDielectronMassHypoTool.cxx => TrigEgammaMassHypoTool.cxx} (65%)
 rename Trigger/TrigHypothesis/TrigEgammaHypo/src/{TrigEgammaDielectronMassHypoTool.h => TrigEgammaMassHypoTool.h} (80%)

diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDPhiHypoTool.cxx
similarity index 65%
rename from Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.cxx
rename to Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDPhiHypoTool.cxx
index 4996af7b514c..dbac3449532d 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.cxx
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDPhiHypoTool.cxx
@@ -4,7 +4,7 @@
 
 /**************************************************************************
  **
- **   File: Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.h
+ **   File: Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDPhiHypoTool.h
  **
  **   Description: - Hypothesis Tool: search for photon pairs with
  **                deltaPhi more than a threshold value; intended for H->gg
@@ -14,17 +14,17 @@
  **************************************************************************/
 
 
-#include "TrigEgammaDiphotonDPhiHypoTool.h"
+#include "TrigEgammaDPhiHypoTool.h"
 
 #include <cmath>
 
 using namespace TrigCompositeUtils;
 
-TrigEgammaDiphotonDPhiHypoTool::TrigEgammaDiphotonDPhiHypoTool(const std::string& type, const std::string& name, const IInterface* parent)
+TrigEgammaDPhiHypoTool::TrigEgammaDPhiHypoTool(const std::string& type, const std::string& name, const IInterface* parent)
     : ComboHypoToolBase(type, name, parent) {}
 
 
-StatusCode TrigEgammaDiphotonDPhiHypoTool::initialize()
+StatusCode TrigEgammaDPhiHypoTool::initialize()
 {
   ATH_MSG_DEBUG("AcceptAll            = " << m_acceptAll );
   ATH_MSG_DEBUG("ThresholdDPhiCut         = " << m_thresholdDPhiCut );
@@ -39,8 +39,10 @@ StatusCode TrigEgammaDiphotonDPhiHypoTool::initialize()
   return StatusCode::SUCCESS;
 }
 
-bool TrigEgammaDiphotonDPhiHypoTool::executeAlg(std::vector<LegDecision> &combination) const {
+bool TrigEgammaDPhiHypoTool::executeAlg(std::vector<LegDecision> &combination) const {
 
+  auto dphiOfAccepted = Monitored::Scalar( "DphiOfAccepted"   , -99 );
+  auto monitorIt    = Monitored::Group( m_monTool, dphiOfAccepted);
 //retrieve the electrons 
   std::vector<ElementLink<xAOD::IParticleContainer>> selected_photons;
   for (auto el: combination){
@@ -52,18 +54,18 @@ bool TrigEgammaDiphotonDPhiHypoTool::executeAlg(std::vector<LegDecision> &combin
   auto photonLink2=selected_photons[1];
   TLorentzVector hlv1 = (*photonLink1)->p4();
   TLorentzVector hlv2 = (*photonLink2)->p4();
-  double dPhi = hlv1.DeltaPhi(hlv2);
-  ATH_MSG_DEBUG("Found two Photons with deltaPhi " <<dPhi);
+  dphiOfAccepted = hlv1.DeltaPhi(hlv2);
+  ATH_MSG_DEBUG("Found two Photons with deltaPhi " <<dphiOfAccepted);
 
   // apply the cut
   bool pass=true;
-  if (dPhi<m_thresholdDPhiCut){ 
-      ATH_MSG_DEBUG("Combination failed deltaPhi cut: " << dPhi << " not in " << m_thresholdDPhiCut);
+  if (dphiOfAccepted<m_thresholdDPhiCut){ 
+      ATH_MSG_DEBUG("Combination failed deltaPhi cut: " << dphiOfAccepted << " is below " << m_thresholdDPhiCut);
       pass=false;
   }
 
   if (pass)
-     ATH_MSG_DEBUG( " deltaPhi " << dPhi << " is above the threshold "<<m_thresholdDPhiCut<<" This seleciton passed! ");
+     ATH_MSG_DEBUG( " deltaPhi " << dphiOfAccepted << " is above the threshold "<<m_thresholdDPhiCut<<" This seleciton passed! ");
   
 return pass;
 
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDPhiHypoTool.h
similarity index 74%
rename from Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.h
rename to Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDPhiHypoTool.h
index 3a16342ae085..4133d609766e 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.h
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDPhiHypoTool.h
@@ -2,17 +2,17 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef TRIGEGAMMAHYPO_TRIGEGAMMADIPHOTONDPHIHYPOTOOL_H
-#define TRIGEGAMMAHYPO_TRIGEGAMMADIPHOTONDPHIHYPOTOOL_H
+#ifndef TRIGEGAMMAHYPO_TRIGEGAMMADPHIHYPOTOOL_H
+#define TRIGEGAMMAHYPO_TRIGEGAMMADPHIHYPOTOOL_H
 
 /**************************************************************************
  **
- **   File: Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDiphotonDPhiHypoTool.h
+ **   File: Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDPhiHypoTool.h
  **
  **   Description: - Hypothesis Tool: search for photon pairs with 
  **                deltaPhi more than a threshold value; intended for H->gg
  **
- **   Author: D. BakshiGupta  <debottam.bakshigupta@cern.ch>
+ **   Author: Debottam BakshiGupta  <debottam.bakshigupta@cern.ch>
  **
  **************************************************************************/ 
 
@@ -35,23 +35,23 @@
 
 
 /**
- * \class TrigEgammaDiphotonDPhiHypoTool
- * \brief TrigEgammaDiphotonDPhiHypoTool is a ComboHypoTool that calculates the deltaPhi distance 
+ * \class TrigEgammaDPhiHypoTool
+ * \brief TrigEgammaDPhiHypoTool is a ComboHypoTool that calculates the deltaPhi distance 
  * Apply the threshold cut and accepts the event if condition is 
  * satisfied
  *
  */
 
 
-class TrigEgammaDiphotonDPhiHypoTool:  public ComboHypoToolBase {
+class TrigEgammaDPhiHypoTool:  public ComboHypoToolBase {
 
  public:
   
-  TrigEgammaDiphotonDPhiHypoTool(const std::string& type,
+  TrigEgammaDPhiHypoTool(const std::string& type,
                     const std::string& name,
                     const IInterface* parent);
   
-  virtual ~TrigEgammaDiphotonDPhiHypoTool() {};
+  virtual ~TrigEgammaDPhiHypoTool() {};
   virtual StatusCode initialize() override;
 
 
@@ -68,8 +68,7 @@ class TrigEgammaDiphotonDPhiHypoTool:  public ComboHypoToolBase {
   // monitoring
   ToolHandle<GenericMonitoringTool> m_monTool { this, "MonTool", "", "Monitoring tool" };
 
-
-}; // TRIGEGAMMAHYPO_TRIGEGAMMADIPHOTONDPHIHYPOTOOL_H
+}; // TRIGEGAMMAHYPO_TRIGEGAMMADPHIHYPOTOOL_H
 #endif
 
 
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDielectronMassHypoTool.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaMassHypoTool.cxx
similarity index 65%
rename from Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDielectronMassHypoTool.cxx
rename to Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaMassHypoTool.cxx
index dbe59bbab759..10bc2d6cba71 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDielectronMassHypoTool.cxx
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaMassHypoTool.cxx
@@ -4,7 +4,7 @@
 
 /**************************************************************************
  **
- **   File: Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDielectronMassHypoTool.h
+ **   File: Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaMassHypoTool.h
  **
  **   Description: - Hypothesis Tool: search for electron pairs with
  **                invariant mass in some interval; intended for Z->ee
@@ -19,17 +19,17 @@
  **************************************************************************/
 
 
-#include "TrigEgammaDielectronMassHypoTool.h"
+#include "TrigEgammaMassHypoTool.h"
 
 #include <cmath>
 
 using namespace TrigCompositeUtils;
 
-TrigEgammaDielectronMassHypoTool::TrigEgammaDielectronMassHypoTool(const std::string& type, const std::string& name, const IInterface* parent)
+TrigEgammaMassHypoTool::TrigEgammaMassHypoTool(const std::string& type, const std::string& name, const IInterface* parent)
     : ComboHypoToolBase(type, name, parent) {}
 
 
-StatusCode TrigEgammaDielectronMassHypoTool::initialize()
+StatusCode TrigEgammaMassHypoTool::initialize()
 {
   ATH_MSG_DEBUG("AcceptAll            = " << m_acceptAll );
   ATH_MSG_DEBUG("LowerMassCut         = " << m_lowerMassElectronClusterCut );
@@ -45,7 +45,9 @@ StatusCode TrigEgammaDielectronMassHypoTool::initialize()
   return StatusCode::SUCCESS;
 }
 
-bool TrigEgammaDielectronMassHypoTool::executeAlg(std::vector<LegDecision> &combination) const {
+bool TrigEgammaMassHypoTool::executeAlg(std::vector<LegDecision> &combination) const {
+  auto massOfAccepted = Monitored::Scalar( "MassOfAccepted"   , -1.0 );
+  auto monitorIt    = Monitored::Group( m_monTool, massOfAccepted);
 
 //retrieve the electrons 
   std::vector<ElementLink<xAOD::IParticleContainer>> selected_electrons;
@@ -58,18 +60,18 @@ bool TrigEgammaDielectronMassHypoTool::executeAlg(std::vector<LegDecision> &comb
   auto electronLink2=selected_electrons[1];
   TLorentzVector hlv1 = (*electronLink1)->p4();
   TLorentzVector hlv2 = (*electronLink2)->p4();
-  double mass = (hlv1+hlv2).M();
-  ATH_MSG_DEBUG("Found two Electrons with mass " <<mass);
+  massOfAccepted = (hlv1+hlv2).M();
+  ATH_MSG_DEBUG("Found two Electrons with mass " <<massOfAccepted);
 
   // apply the cut
   bool pass=true;
-  if (mass<m_lowerMassElectronClusterCut || mass>m_upperMassElectronClusterCut){ 
-      ATH_MSG_DEBUG("Combination failed mass cut: " << mass << " not in [" << m_lowerMassElectronClusterCut << "," <<  m_upperMassElectronClusterCut << "]");
+  if (massOfAccepted < m_lowerMassElectronClusterCut || massOfAccepted > m_upperMassElectronClusterCut){ 
+      ATH_MSG_DEBUG("Combination failed mass cut: " << massOfAccepted << " not in [" << m_lowerMassElectronClusterCut << "," <<  m_upperMassElectronClusterCut << "]");
       pass=false;
   }
 
   if (pass)
-     ATH_MSG_DEBUG( " Invariant mass " << mass << " is  within [" <<m_lowerMassElectronClusterCut<< "," << m_upperMassElectronClusterCut << "] This seleciton passed! ");
+     ATH_MSG_DEBUG( " Invariant mass " << massOfAccepted << " is  within [" <<m_lowerMassElectronClusterCut<< "," << m_upperMassElectronClusterCut << "] This seleciton passed! ");
   
   return pass;
 
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDielectronMassHypoTool.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaMassHypoTool.h
similarity index 80%
rename from Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDielectronMassHypoTool.h
rename to Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaMassHypoTool.h
index 74ef72358963..f64ac521ba7f 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDielectronMassHypoTool.h
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaMassHypoTool.h
@@ -2,12 +2,12 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef TRIGEGAMMAHYPO_TRIGEGAMMADIELECTRONMASSHYPOTOOL_H
-#define TRIGEGAMMAHYPO_TRIGEGAMMADIELECTRONMASSHYPOTOOL_H
+#ifndef TRIGEGAMMAHYPO_TRIGEGAMMAMASSHYPOTOOL_H
+#define TRIGEGAMMAHYPO_TRIGEGAMMAMASSHYPOTOOL_H
 
 /**************************************************************************
  **
- **   File: Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDielectronMassHypoTool.h
+ **   File: Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaMassHypoTool.h
  **
  **   Description: - Hypothesis Tool: search for electron pairs with 
  **                invariant mass in some interval; intended for Z->ee
@@ -39,23 +39,23 @@
 
 
 /**
- * \class TrigEgammaDielectronMassHypoTool
- * \brief TrigEgammaDielectronMassHypoTool is a ComboHypoTool that calculates the inv mass
+ * \class TrigEgammaMassHypoTool
+ * \brief TrigEgammaMassHypoTool is a ComboHypoTool that calculates the inv mass
  * Apply inv mass cuts (upper and lower cut) to the two electrons and accepts the event if condition is 
  * satisfied
  *
  */
 
 
-class TrigEgammaDielectronMassHypoTool:  public ComboHypoToolBase {
+class TrigEgammaMassHypoTool:  public ComboHypoToolBase {
 
  public:
   
-  TrigEgammaDielectronMassHypoTool(const std::string& type,
+  TrigEgammaMassHypoTool(const std::string& type,
                     const std::string& name,
                     const IInterface* parent);
   
-  virtual ~TrigEgammaDielectronMassHypoTool() {};
+  virtual ~TrigEgammaMassHypoTool() {};
   virtual StatusCode initialize() override;
 
 
@@ -74,7 +74,7 @@ class TrigEgammaDielectronMassHypoTool:  public ComboHypoToolBase {
   ToolHandle<GenericMonitoringTool> m_monTool { this, "MonTool", "", "Monitoring tool" };
 
 
-}; // TRIGEGAMMAHYPO_TRIGEGAMMADIELECTRONMASSHYPOTOOL_H
+}; // TRIGEGAMMAHYPO_TRIGEGAMMAMASSHYPOTOOL_H
 #endif
 
 
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/components/TrigEgammaHypo_entries.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/components/TrigEgammaHypo_entries.cxx
index 183a9e868b7e..07f91d749343 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/components/TrigEgammaHypo_entries.cxx
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/components/TrigEgammaHypo_entries.cxx
@@ -26,8 +26,8 @@
 #include "../TrigEgammaPrecisionCaloHypoAlgMT.h"
 #include "../TrigEgammaPrecisionPhotonHypoAlgMT.h"
 #include "../TrigEgammaPrecisionElectronHypoAlgMT.h"
-#include "../TrigEgammaDielectronMassHypoTool.h"
-#include "../TrigEgammaDiphotonDPhiHypoTool.h"
+#include "../TrigEgammaMassHypoTool.h"
+#include "../TrigEgammaDPhiHypoTool.h"
 
 DECLARE_COMPONENT( TrigL2CaloHypo )
 DECLARE_COMPONENT( TrigL2ElectronFex )
@@ -57,5 +57,5 @@ DECLARE_COMPONENT( TrigEgammaFastPhotonHypoTool )
 DECLARE_COMPONENT( TrigEgammaPrecisionCaloHypoAlgMT )
 DECLARE_COMPONENT( TrigEgammaPrecisionPhotonHypoAlgMT )
 DECLARE_COMPONENT( TrigEgammaPrecisionElectronHypoAlgMT )
-DECLARE_COMPONENT( TrigEgammaDielectronMassHypoTool )
-DECLARE_COMPONENT( TrigEgammaDiphotonDPhiHypoTool )
+DECLARE_COMPONENT( TrigEgammaMassHypoTool )
+DECLARE_COMPONENT( TrigEgammaDPhiHypoTool )
diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
index 009533aecf69..267f6019949c 100644
--- a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
@@ -28,6 +28,9 @@ TrigSignatureMoniMT                                 INFO -- #2613484113 Features
 TrigSignatureMoniMT                                 INFO HLT_2g10_loose_mu20_L1MU20 #3765708828
 TrigSignatureMoniMT                                 INFO -- #3765708828 Events         8          8          1          1          1          0          0          0          0          0          -          -          -          -          -          0
 TrigSignatureMoniMT                                 INFO -- #3765708828 Features                             2          2          6          0          0          0          0          0          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_2g15_tight_dPhi15_L1DPHI-M70-2EM12I #2606736960
+TrigSignatureMoniMT                                 INFO -- #2606736960 Events         0          0          0          0          0          0          -          -          -          -          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #2606736960 Features                             0          0          0          0          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_2g20_tight_L12EM15VH #3837353071
 TrigSignatureMoniMT                                 INFO -- #3837353071 Events         2          2          2          0          0          0          -          -          -          -          -          -          -          -          -          0
 TrigSignatureMoniMT                                 INFO -- #3837353071 Features                             2          0          0          0          -          -          -          -          -          -          -          -          -
diff --git a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
index e6bce93957dd..680f6ae95b04 100644
--- a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
@@ -28,6 +28,9 @@ TrigSignatureMoniMT                                 INFO -- #2613484113 Features
 TrigSignatureMoniMT                                 INFO HLT_2g10_loose_mu20_L1MU20 #3765708828
 TrigSignatureMoniMT                                 INFO -- #3765708828 Events         20         20         0          0          0          0          0          0          0          0          -          -          -          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #3765708828 Features                             0          0          0          0          0          0          0          0          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_2g15_tight_dPhi15_L1DPHI-M70-2EM12I #2606736960
+TrigSignatureMoniMT                                 INFO -- #2606736960 Events         20         20         0          0          0          0          -          -          -          -          -          -          -          -          -          0          
+TrigSignatureMoniMT                                 INFO -- #2606736960 Features                             0          0          0          0          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_2g20_tight_L12EM15VH #3837353071
 TrigSignatureMoniMT                                 INFO -- #3837353071 Events         20         20         0          0          0          0          -          -          -          -          -          -          -          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #3837353071 Features                             0          0          0          0          -          -          -          -          -          -          -          -          -          
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py
index c720effd018a..b1e35ad0e275 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py
@@ -12,6 +12,7 @@ from TriggerMenuMT.HLTMenuConfig.Egamma.ElectronSequenceSetup import fastElectro
 from TriggerMenuMT.HLTMenuConfig.Egamma.PrecisionCaloSequenceSetup import precisionCaloMenuSequence
 from TriggerMenuMT.HLTMenuConfig.Egamma.PrecisionElectronSequenceSetup import precisionElectronMenuSequence
 
+from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool, defineHistogram
 #----------------------------------------------------------------
 # fragments generating configuration will be functions in New JO,
 # so let's make them functions already now
@@ -32,11 +33,15 @@ def precisionElectronSequenceCfg( flags ):
 
 # this must be moved to the HypoTool file:
 def diElectronMassComboHypoToolFromDict(chainDict):
-    from TrigEgammaHypo.TrigEgammaHypoConf import TrigEgammaDielectronMassHypoTool
+    from TrigEgammaHypo.TrigEgammaHypoConf import TrigEgammaMassHypoTool
     name = chainDict['chainName']
-    tool= TrigEgammaDielectronMassHypoTool(name)
+    monTool = GenericMonitoringTool("MonTool_"+name)
+    monTool.Histograms = [defineHistogram('MassOfAccepted', type='TH1F', path='EXPERT', title="Mass in accepted combinations [MeV]", xbins=75, xmin=0, xmax=150000)]
+    tool= TrigEgammaMassHypoTool(name)
     tool.LowerMassElectronClusterCut = 50000
     tool.UpperMassElectronClusterCut = 130000
+    monTool.HistPath = 'EgammaMassHypo/'+tool.getName()
+    tool.MonTool = monTool
     return tool
 
 #----------------------------------------------------------------
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonDef.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonDef.py
index 69879d416c01..d5505e52f60b 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonDef.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonDef.py
@@ -2,8 +2,6 @@
 # Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 #
 
-from AthenaCommon.Constants import DEBUG
-
 from AthenaCommon.Logging import logging
 logging.getLogger().info("Importing %s",__name__)
 log = logging.getLogger("TriggerMenuMT.HLTMenuConfig.Egamma.PhotonDef")
@@ -15,7 +13,7 @@ from TriggerMenuMT.HLTMenuConfig.CommonSequences.CaloSequenceSetup import fastCa
 from TriggerMenuMT.HLTMenuConfig.Egamma.PhotonSequenceSetup import fastPhotonMenuSequence, precisionPhotonMenuSequence
 from TriggerMenuMT.HLTMenuConfig.Egamma.PrecisionCaloSequenceSetup import precisionCaloMenuSequence
 
-
+from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool, defineHistogram
 #----------------------------------------------------------------
 # fragments generating configuration will be functions in New JO, 
 # so let's make them functions already now
@@ -33,11 +31,14 @@ def precisionPhotonSequenceCfg( flags ):
     return precisionPhotonMenuSequence('Photon')
 
 def diphotonDPhiHypoToolFromDict(chainDict):
-    from TrigEgammaHypo.TrigEgammaHypoConf import TrigEgammaDiphotonDPhiHypoTool
+    from TrigEgammaHypo.TrigEgammaHypoConf import TrigEgammaDPhiHypoTool
     name = chainDict['chainName']
-    tool= TrigEgammaDiphotonDPhiHypoTool(name)
+    monTool = GenericMonitoringTool("MonTool_"+name)
+    monTool.Histograms = [defineHistogram('DphiOfAccepted', type='TH1F', path='EXPERT', title="PrecisionCalo Hypo entries per Phi;Phi", xbins=128, xmin=-3.2, xmax=3.2)]
+    tool= TrigEgammaDPhiHypoTool(name)
     tool.ThresholdDPhiCut = 1.5
-    tool.OutputLevel = DEBUG
+    monTool.HistPath = 'EgammaDphiHypo/'+tool.getName()
+    tool.MonTool = monTool
     return tool
 
 #----------------------------------------------------------------
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonSequenceSetup.py
index aabeba28db84..906e8cf658bd 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonSequenceSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonSequenceSetup.py
@@ -1,6 +1,4 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-
-from AthenaCommon.Constants import DEBUG
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # menu components   
 from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import MenuSequence, RecoFragmentsPool
@@ -103,7 +101,6 @@ def precisionPhotonMenuSequence(name):
 
     thePrecisionPhotonHypo = TrigEgammaPrecisionPhotonHypoAlgMT(name+"precisionPhotonHypo")
     thePrecisionPhotonHypo.Photons = sequenceOut
-    thePrecisionPhotonHypo.OutputLevel = DEBUG
 
     return MenuSequence( Sequence    = sequence,
                          Maker       = precisionPhotonViewsMaker, 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
index b8e6236f7c3d..5cefc600f9aa 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
@@ -173,7 +173,7 @@ def setupMenu():
 
         #ATR-21882
         ChainProp(name='HLT_2g15_tight_dPhi15_L1DPHI-M70-2EM12I', l1SeedThresholds=['EM12'], groups=MultiPhotonGroup),
-        ChainProp(name='HLT_2g15_tight_dPhi15_L12EM7', groups=MultiPhotonGroup),
+
         ChainProp(name='HLT_g300_etcut_L1EM22VHI', groups=SinglePhotonGroup),
     ]
 
-- 
GitLab


From 4258a7d702a8e57c844ae355ba710d3f2bb682d6 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Mon, 5 Oct 2020 13:55:14 +0200
Subject: [PATCH 187/403] VP1: cmake cleanup

- remove `atlas_depends_on_subdirs`
- cleanup link dependencies
- remove unused externals

Possible that a few extra fixes will be needed for VP1Light once that is
being built again.
---
 graphics/VP1/RunVP1Light/CMakeLists.txt       | 12 +--
 graphics/VP1/VP1Algs/CMakeLists.txt           | 16 +---
 graphics/VP1/VP1AlgsBatch/CMakeLists.txt      | 15 +---
 graphics/VP1/VP1AlgsEventProd/CMakeLists.txt  | 17 +---
 graphics/VP1/VP1Base/CMakeLists.txt           | 16 +---
 graphics/VP1/VP1Gui/CMakeLists.txt            | 22 ++---
 graphics/VP1/VP1HEPVis/CMakeLists.txt         |  7 +-
 .../VP13DCocktailPlugin/CMakeLists.txt        | 27 +-----
 .../VP1Plugins/VP1AODPlugin/CMakeLists.txt    | 12 +--
 .../VP1Plugins/VP1BanksPlugin/CMakeLists.txt  |  9 +-
 .../VP1Plugins/VP1CaloPlugin/CMakeLists.txt   | 12 +--
 .../VP1GeometryPlugin/CMakeLists.txt          | 12 +--
 .../VP1Plugins/VP1LegoPlugin/CMakeLists.txt   |  8 +-
 .../VP1Plugins/VP1LightPlugin/CMakeLists.txt  | 11 +--
 .../VP1/VP1Plugins/VP1MCPlugin/CMakeLists.txt |  8 +-
 .../VP1Plugins/VP1PlugUtils/CMakeLists.txt    | 13 +--
 .../VP1Plugins/VP1TestPlugin/CMakeLists.txt   |  9 +-
 .../VP1Plugins/VP1TrackPlugin/CMakeLists.txt  | 16 +---
 .../VP1TriggerDecisionPlugin/CMakeLists.txt   |  8 +-
 .../VP1Systems/VP1AODSystems/CMakeLists.txt   | 27 +-----
 .../VP1Systems/VP1BPhysSystems/CMakeLists.txt | 33 +-------
 .../VP1Systems/VP1BanksSystems/CMakeLists.txt | 14 +---
 .../VP1CaloClusterSystems/CMakeLists.txt      | 13 +--
 .../VP1CaloReadoutSystems/CMakeLists.txt      | 15 +---
 .../VP1Systems/VP1CaloSystems/CMakeLists.txt  | 40 +--------
 .../VP1GeometrySystems/CMakeLists.txt         | 25 +-----
 .../VP1GuideLineSystems/CMakeLists.txt        | 15 +---
 .../VP1Systems/VP1LegoSystems/CMakeLists.txt  | 20 +----
 .../VP1Systems/VP1MCSystems/CMakeLists.txt    | 15 +---
 .../VP1MissingEtSystems/CMakeLists.txt        | 12 +--
 .../VP1Systems/VP1PRDSystems/CMakeLists.txt   | 45 +---------
 .../VP1RawDataSystems/CMakeLists.txt          | 23 +-----
 .../VP1SimHitSystems/CMakeLists.txt           | 16 +---
 .../VP1Systems/VP1TestSystems/CMakeLists.txt  | 16 +---
 .../VP1Systems/VP1TrackSystems/CMakeLists.txt | 82 +------------------
 .../VP1TrackingGeometrySystems/CMakeLists.txt | 29 +------
 .../VP1TriggerDecisionSystems/CMakeLists.txt  | 11 +--
 .../VP1TriggerSystems/CMakeLists.txt          | 19 +----
 .../VP1UtilitySystems/CMakeLists.txt          | 12 +--
 .../VP1VertexSystems/CMakeLists.txt           | 26 +-----
 graphics/VP1/VP1TrkAuxAlgs/CMakeLists.txt     | 20 +----
 graphics/VP1/VP1Utils/CMakeLists.txt          | 41 +---------
 graphics/VP1/VP1UtilsBase/CMakeLists.txt      |  6 +-
 43 files changed, 71 insertions(+), 754 deletions(-)

diff --git a/graphics/VP1/RunVP1Light/CMakeLists.txt b/graphics/VP1/RunVP1Light/CMakeLists.txt
index 52604369f72b..9e18e17a6c9c 100644
--- a/graphics/VP1/RunVP1Light/CMakeLists.txt
+++ b/graphics/VP1/RunVP1Light/CMakeLists.txt
@@ -1,18 +1,8 @@
-###############################################################################
-# Package: RunVP1Light
-################################################################################
-# Author: Riccardo Maria BIANCHI <rbianchi@cern.ch>
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( RunVP1Light )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC graphics/VP1/VP1Gui
-   PUBLIC graphics/VP1/VP1UtilsBase
-   )
-
 # External dependencies:
 find_package( Qt5 COMPONENTS Core OpenGL )
 find_package( Coin3D )
diff --git a/graphics/VP1/VP1Algs/CMakeLists.txt b/graphics/VP1/VP1Algs/CMakeLists.txt
index 12161cc57f2b..d1a869af0806 100644
--- a/graphics/VP1/VP1Algs/CMakeLists.txt
+++ b/graphics/VP1/VP1Algs/CMakeLists.txt
@@ -1,20 +1,8 @@
-################################################################################
-# Package: VP1Algs
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1Algs )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          PRIVATE
-                          Event/EventInfo
-                          Tools/PathResolver
-                          graphics/VP1/VP1Gui
-                          graphics/VP1/VP1UtilsBase )
-
 # "Externals" dependencies - They are needed at runtime, only
 find_package( libxkbcommon ) 
 find_package( glib ) 
@@ -28,7 +16,6 @@ atlas_add_component( VP1Algs
                      PRIVATE_LINK_LIBRARIES VP1Gui VP1UtilsBase )
 
 # Install files from the package:
-atlas_install_headers( VP1Algs )
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py )
 atlas_install_scripts( share/vp1 )
@@ -59,4 +46,3 @@ set( VP1AlgsEnvironment_DIR ${CMAKE_CURRENT_BINARY_DIR}
 find_package( VP1AlgsEnvironment )
 # message( "VP1PLUGINPATH has been set to: " $ENV{VP1PLUGINPATH} )
 
-
diff --git a/graphics/VP1/VP1AlgsBatch/CMakeLists.txt b/graphics/VP1/VP1AlgsBatch/CMakeLists.txt
index 4cb6b3bda4c0..c718c2be6893 100644
--- a/graphics/VP1/VP1AlgsBatch/CMakeLists.txt
+++ b/graphics/VP1/VP1AlgsBatch/CMakeLists.txt
@@ -1,21 +1,8 @@
-################################################################################
-# Package: VP1AlgsBatch
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1AlgsBatch )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/AthenaBaseComps
-   GaudiKernel
-   PRIVATE
-   Database/APR/StorageSvc
-   Event/EventInfo
-   Tools/PathResolver
-   graphics/VP1/VP1UtilsBase )
-
 # Component(s) in the package:
 atlas_add_component( VP1AlgsBatch
    VP1AlgsBatch/*.h src/*.cxx src/components/*.cxx
diff --git a/graphics/VP1/VP1AlgsEventProd/CMakeLists.txt b/graphics/VP1/VP1AlgsEventProd/CMakeLists.txt
index 7ee316846f77..df7e5cbbb30f 100644
--- a/graphics/VP1/VP1AlgsEventProd/CMakeLists.txt
+++ b/graphics/VP1/VP1AlgsEventProd/CMakeLists.txt
@@ -1,23 +1,10 @@
-################################################################################
-# Package: VP1AlgsEventProd
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1AlgsEventProd )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/AthenaBaseComps
-   GaudiKernel
-   PRIVATE
-   Database/APR/StorageSvc
-   Event/EventInfo
-   Tools/PathResolver
-   graphics/VP1/VP1UtilsBase )
-
 # Component(s) in the package:
 atlas_add_component( VP1AlgsEventProd
    VP1AlgsEventProd/*.h src/*.cxx src/components/*.cxx
-   LINK_LIBRARIES AthenaBaseComps GaudiKernel StorageSvc EventInfo PathResolver
+   LINK_LIBRARIES AthenaBaseComps GaudiKernel StorageSvc PathResolver
    VP1UtilsBase )
diff --git a/graphics/VP1/VP1Base/CMakeLists.txt b/graphics/VP1/VP1Base/CMakeLists.txt
index cd295c6587b8..5a9f355703c1 100644
--- a/graphics/VP1/VP1Base/CMakeLists.txt
+++ b/graphics/VP1/VP1Base/CMakeLists.txt
@@ -1,20 +1,8 @@
-# $Id: CMakeLists.txt 784633 2016-11-16 16:16:34Z rbianchi $
-################################################################################
-# Package: VP1Base
-################################################################################
-# Author: Riccardo Maria BIANCHI <rbianchi@cern.ch>
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Set the name of the package:
 atlas_subdir( VP1Base )
 
-# Set up the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC 
-                          DetectorDescription/GeoPrimitives
-    	                  Event/xAOD/xAODBase
-                          PRIVATE 
-                          graphics/VP1/VP1HEPVis )
-
 # Get OS version
 atlas_os_id( _os _isValid )
 if( NOT _isValid )
@@ -46,5 +34,5 @@ atlas_add_library( VP1Base VP1Base/*.h src/*.cxx src/*.qrc
    PUBLIC_HEADERS VP1Base
    INCLUDE_DIRS ${QT5_INCLUDE_DIRS} ${SOQT_INCLUDE_DIRS} ${COIN3D_INCLUDE_DIRS}
    PRIVATE_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}
-   LINK_LIBRARIES ${QT5_LIBRARIES} ${SOQT_LIBRARIES} ${COIN3D_LIBRARIES} GeoPrimitives
+   LINK_LIBRARIES ${QT5_LIBRARIES} ${SOQT_LIBRARIES} ${COIN3D_LIBRARIES} GeoPrimitives xAODBase
    PRIVATE_LINK_LIBRARIES VP1HEPVis )
diff --git a/graphics/VP1/VP1Gui/CMakeLists.txt b/graphics/VP1/VP1Gui/CMakeLists.txt
index f22b57b391e9..0a8e0a93547d 100644
--- a/graphics/VP1/VP1Gui/CMakeLists.txt
+++ b/graphics/VP1/VP1Gui/CMakeLists.txt
@@ -1,20 +1,8 @@
-################################################################################
-# Package: VP1Gui
-################################################################################
-# Author: Thomas Kittelmann <Thomas.Kittelmann@cern.ch>
-# Author: Riccardo Maria BIANCHI <rbianchi@cern.ch>
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1Gui )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC Event/xAOD/xAODBase
-   PUBLIC graphics/VP1/VP1Base
-   PUBLIC graphics/VP1/VP1UtilsBase 
-   )
-
 # External dependencies:
 find_package( Qt5 COMPONENTS Core OpenGL Gui Network PrintSupport Widgets )
 find_package( Coin3D )
@@ -32,7 +20,7 @@ atlas_add_library( VP1Gui VP1Gui/*.h src/*.h src/*.cxx src/*.qrc
    PUBLIC_HEADERS VP1Gui
    PRIVATE_INCLUDE_DIRS ${COIN3D_INCLUDE_DIRS} ${SOQT_INCLUDE_DIRS}
    ${CMAKE_CURRENT_BINARY_DIR}
-   LINK_LIBRARIES VP1Base Qt5::Core Qt5::OpenGL Qt5::Gui VP1UtilsBase
-   Qt5::PrintSupport
-   PRIVATE_LINK_LIBRARIES ${COIN3D_LIBRARIES} ${SOQT_LIBRARIES} PathResolver xAODBase
-   xAODRootAccess xAODEventInfo xAODRootAccessInterfaces Qt5::Network )
+   LINK_LIBRARIES VP1Base Qt5::Core Qt5::OpenGL Qt5::Gui
+   Qt5::PrintSupport xAODBase
+   PRIVATE_LINK_LIBRARIES ${COIN3D_LIBRARIES} ${SOQT_LIBRARIES} xAODCore
+   xAODRootAccess xAODEventInfo xAODRootAccessInterfaces Qt5::Network VP1UtilsBase )
diff --git a/graphics/VP1/VP1HEPVis/CMakeLists.txt b/graphics/VP1/VP1HEPVis/CMakeLists.txt
index cef68e6843ad..f46cbe1480ed 100644
--- a/graphics/VP1/VP1HEPVis/CMakeLists.txt
+++ b/graphics/VP1/VP1HEPVis/CMakeLists.txt
@@ -1,9 +1,4 @@
-################################################################################
-# Package: VP1HEPVis
-################################################################################
-# Author: Joe Boudreau (Importer)
-# Author: Riccardo Maria BIANCHI <rbianchi@cern.ch>
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1HEPVis )
diff --git a/graphics/VP1/VP1Plugins/VP13DCocktailPlugin/CMakeLists.txt b/graphics/VP1/VP1Plugins/VP13DCocktailPlugin/CMakeLists.txt
index 73ec2ad7697f..7d455cc0ab3e 100644
--- a/graphics/VP1/VP1Plugins/VP13DCocktailPlugin/CMakeLists.txt
+++ b/graphics/VP1/VP1Plugins/VP13DCocktailPlugin/CMakeLists.txt
@@ -1,30 +1,8 @@
-################################################################################
-# Package: VP13DCocktailPlugin
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP13DCocktailPlugin )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          graphics/VP1/VP1Base
-                          PRIVATE
-                          graphics/VP1/VP1Plugins/VP1PlugUtils
-                          graphics/VP1/VP1Systems/VP1GeometrySystems
-                          graphics/VP1/VP1Systems/VP1GuideLineSystems
-                          graphics/VP1/VP1Systems/VP1PRDSystems
-                          graphics/VP1/VP1Systems/VP1TrackSystems
-                          graphics/VP1/VP1Systems/VP1AODSystems
-                          graphics/VP1/VP1Systems/VP1BPhysSystems
-                          graphics/VP1/VP1Systems/VP1CaloSystems
-                          graphics/VP1/VP1Systems/VP1UtilitySystems 
-                          graphics/VP1/VP1Systems/VP1RawDataSystems
-                          graphics/VP1/VP1Systems/VP1CaloReadoutSystems
-                          graphics/VP1/VP1Systems/VP1SimHitSystems
-                          graphics/VP1/VP1Systems/VP1TrackingGeometrySystems
-                          )
-                          #graphics/VP1/VP1Systems/VP1CaloClusterSystems --> now in the xAOD/VP1AODSystems
-
 # External dependencies:
 find_package( Qt5 COMPONENTS Core OpenGL Gui Widgets )
 find_package( SoQt )
@@ -38,7 +16,6 @@ set( CMAKE_AUTOMOC TRUE )
 # get the package name into the variable 'pkgName', to be used below
 atlas_get_package_name( pkgName )
 
-   
 # Build the library. // TODO: I removed the TrackCalo plugin so far, because it does not compile with the new plugin system. I should get it back, later.
 atlas_add_library( ${pkgName} ${pkgName}/VP13DCocktail*.h src/VP13DCocktail*.cxx src/*.qrc 
    PUBLIC_HEADERS ${pkgName}
@@ -52,5 +29,3 @@ atlas_add_library( ${pkgName} ${pkgName}/VP13DCocktail*.h src/VP13DCocktail*.cxx
 #add_dependencies( Package_VP13DCocktailPlugin Package_VP1PlugUtils Package_VP1PRDSystems Package_VP1TrackSystems Package_VP1AODSystems Package_VP1BPhysSystems )
 add_dependencies( VP13DCocktailPlugin VP1PlugUtils VP1GeometrySystems VP1GuideLineSystems VP1PRDSystems VP1TrackSystems VP1AODSystems VP1BPhysSystems VP1CaloSystems VP1CaloReadoutSystems VP1UtilitySystems VP1RawDataSystems VP1SimHitSystems VP1TrackingGeometrySystems)
 
-
-
diff --git a/graphics/VP1/VP1Plugins/VP1AODPlugin/CMakeLists.txt b/graphics/VP1/VP1Plugins/VP1AODPlugin/CMakeLists.txt
index 597f287e5f7c..32bf9f52ab67 100644
--- a/graphics/VP1/VP1Plugins/VP1AODPlugin/CMakeLists.txt
+++ b/graphics/VP1/VP1Plugins/VP1AODPlugin/CMakeLists.txt
@@ -1,18 +1,8 @@
-################################################################################
-# Package: VP1AODPlugin
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1AODPlugin )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   graphics/VP1/VP1Base
-   PRIVATE
-   graphics/VP1/VP1Systems/VP1AODSystems
-   graphics/VP1/VP1Systems/VP1GuideLineSystems )
-
 # External dependencies:
 find_package( Qt5 COMPONENTS Core )
 
diff --git a/graphics/VP1/VP1Plugins/VP1BanksPlugin/CMakeLists.txt b/graphics/VP1/VP1Plugins/VP1BanksPlugin/CMakeLists.txt
index 4af18c4fded7..c8efcbb7910a 100644
--- a/graphics/VP1/VP1Plugins/VP1BanksPlugin/CMakeLists.txt
+++ b/graphics/VP1/VP1Plugins/VP1BanksPlugin/CMakeLists.txt
@@ -1,14 +1,7 @@
-################################################################################
-# Package: VP1BanksPlugin
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1BanksPlugin )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          graphics/VP1/VP1Systems/VP1BanksSystems )
-
 # Install files from the package:
 atlas_install_headers( VP1BanksPlugin )
-
diff --git a/graphics/VP1/VP1Plugins/VP1CaloPlugin/CMakeLists.txt b/graphics/VP1/VP1Plugins/VP1CaloPlugin/CMakeLists.txt
index 56f23459bccf..292f38edd49b 100644
--- a/graphics/VP1/VP1Plugins/VP1CaloPlugin/CMakeLists.txt
+++ b/graphics/VP1/VP1Plugins/VP1CaloPlugin/CMakeLists.txt
@@ -1,18 +1,8 @@
-################################################################################
-# Package: VP1CaloPlugin
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1CaloPlugin )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          graphics/VP1/VP1Systems/VP1CaloClusterSystems
-                          graphics/VP1/VP1Systems/VP1CaloReadoutSystems
-                          graphics/VP1/VP1Systems/VP1CaloSystems
-                          graphics/VP1/VP1Systems/VP1GeometrySystems
-                          graphics/VP1/VP1Systems/VP1GuideLineSystems )
-
 # Install files from the package:
 atlas_install_headers( VP1CaloPlugin )
 
diff --git a/graphics/VP1/VP1Plugins/VP1GeometryPlugin/CMakeLists.txt b/graphics/VP1/VP1Plugins/VP1GeometryPlugin/CMakeLists.txt
index 1bd7581411b7..cbe795278584 100644
--- a/graphics/VP1/VP1Plugins/VP1GeometryPlugin/CMakeLists.txt
+++ b/graphics/VP1/VP1Plugins/VP1GeometryPlugin/CMakeLists.txt
@@ -1,18 +1,8 @@
-################################################################################
-# Package: VP1GeometryPlugin
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1GeometryPlugin )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   graphics/VP1/VP1Base
-   PRIVATE
-   graphics/VP1/VP1Systems/VP1GeometrySystems
-   graphics/VP1/VP1Systems/VP1GuideLineSystems )
-
 # External dependencies:
 find_package( Qt5 COMPONENTS Core Gui Widgets )
 
diff --git a/graphics/VP1/VP1Plugins/VP1LegoPlugin/CMakeLists.txt b/graphics/VP1/VP1Plugins/VP1LegoPlugin/CMakeLists.txt
index fdc14aed74fe..6f962c42f173 100644
--- a/graphics/VP1/VP1Plugins/VP1LegoPlugin/CMakeLists.txt
+++ b/graphics/VP1/VP1Plugins/VP1LegoPlugin/CMakeLists.txt
@@ -1,14 +1,8 @@
-################################################################################
-# Package: VP1LegoPlugin
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1LegoPlugin )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          graphics/VP1/VP1Systems/VP1LegoSystems )
-
 # Install files from the package:
 atlas_install_headers( VP1LegoPlugin )
 
diff --git a/graphics/VP1/VP1Plugins/VP1LightPlugin/CMakeLists.txt b/graphics/VP1/VP1Plugins/VP1LightPlugin/CMakeLists.txt
index 9f8f5395dce4..845a4817ab29 100644
--- a/graphics/VP1/VP1Plugins/VP1LightPlugin/CMakeLists.txt
+++ b/graphics/VP1/VP1Plugins/VP1LightPlugin/CMakeLists.txt
@@ -1,16 +1,8 @@
-################################################################################
-# Package: VP1LightPlugin
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1LightPlugin )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          graphics/VP1/VP1Systems/VP1GeometrySystems
-                          graphics/VP1/VP1Systems/VP1GuideLineSystems
-                          graphics/VP1/VP1Systems/VP1AODSystems )
-
 # Install files from the package:
 atlas_install_headers( VP1LightPlugin )
 
@@ -27,7 +19,6 @@ set( CMAKE_AUTOMOC TRUE )
 # get the package name into the variable 'pkgName', to be used below
 atlas_get_package_name( pkgName )
 
-
 # Build the library.
 atlas_add_library( ${pkgName} ${pkgName}/*.h src/*.cxx src/*.qrc 
    PUBLIC_HEADERS ${pkgName}
diff --git a/graphics/VP1/VP1Plugins/VP1MCPlugin/CMakeLists.txt b/graphics/VP1/VP1Plugins/VP1MCPlugin/CMakeLists.txt
index fbdf7f6b0166..2cbf365f93e5 100644
--- a/graphics/VP1/VP1Plugins/VP1MCPlugin/CMakeLists.txt
+++ b/graphics/VP1/VP1Plugins/VP1MCPlugin/CMakeLists.txt
@@ -1,14 +1,8 @@
-################################################################################
-# Package: VP1MCPlugin
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1MCPlugin )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          graphics/VP1/VP1Systems/VP1MCSystems )
-
 # Install files from the package:
 atlas_install_headers( VP1MCPlugin )
 
diff --git a/graphics/VP1/VP1Plugins/VP1PlugUtils/CMakeLists.txt b/graphics/VP1/VP1Plugins/VP1PlugUtils/CMakeLists.txt
index be7d42a6f6db..0ebc11873e6a 100644
--- a/graphics/VP1/VP1Plugins/VP1PlugUtils/CMakeLists.txt
+++ b/graphics/VP1/VP1Plugins/VP1PlugUtils/CMakeLists.txt
@@ -1,19 +1,8 @@
-################################################################################
-# Package: VP1PlugUtils
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1PlugUtils )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          graphics/VP1/VP1Base
-                          graphics/VP1/VP1Systems/VP1GeometrySystems
-                          graphics/VP1/VP1Systems/VP1GuideLineSystems
-                          graphics/VP1/VP1Systems/VP1PRDSystems
-                          graphics/VP1/VP1Systems/VP1TrackSystems
-                          graphics/VP1/VP1Systems/VP1VertexSystems )
-
 # Component(s) in the package:
 atlas_add_library( VP1PlugUtils
                    src/*.c*
diff --git a/graphics/VP1/VP1Plugins/VP1TestPlugin/CMakeLists.txt b/graphics/VP1/VP1Plugins/VP1TestPlugin/CMakeLists.txt
index a0745e34f13c..78c7699ecb77 100644
--- a/graphics/VP1/VP1Plugins/VP1TestPlugin/CMakeLists.txt
+++ b/graphics/VP1/VP1Plugins/VP1TestPlugin/CMakeLists.txt
@@ -1,15 +1,8 @@
-################################################################################
-# Package: VP1TestPlugin
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1TestPlugin )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          graphics/VP1/VP1Systems/VP1GeometrySystems
-                          graphics/VP1/VP1Systems/VP1TestSystems )
-
 # Install files from the package:
 atlas_install_headers( VP1TestPlugin )
 
diff --git a/graphics/VP1/VP1Plugins/VP1TrackPlugin/CMakeLists.txt b/graphics/VP1/VP1Plugins/VP1TrackPlugin/CMakeLists.txt
index 572531cd0547..bce633aa44f2 100644
--- a/graphics/VP1/VP1Plugins/VP1TrackPlugin/CMakeLists.txt
+++ b/graphics/VP1/VP1Plugins/VP1TrackPlugin/CMakeLists.txt
@@ -1,22 +1,8 @@
-################################################################################
-# Package: VP1TrackPlugin
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1TrackPlugin )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          graphics/VP1/VP1Base
-                          graphics/VP1/VP1Plugins/VP1PlugUtils
-                          graphics/VP1/VP1Systems/VP1GeometrySystems
-                          graphics/VP1/VP1Systems/VP1GuideLineSystems
-                          graphics/VP1/VP1Systems/VP1PRDSystems
-                          graphics/VP1/VP1Systems/VP1RawDataSystems
-                          graphics/VP1/VP1Systems/VP1SimHitSystems
-                          graphics/VP1/VP1Systems/VP1TrackSystems
-                          graphics/VP1/VP1Systems/VP1VertexSystems )
-
 # External dependencies:
 find_package( Qt5 COMPONENTS Core Gui Widgets )
 
diff --git a/graphics/VP1/VP1Plugins/VP1TriggerDecisionPlugin/CMakeLists.txt b/graphics/VP1/VP1Plugins/VP1TriggerDecisionPlugin/CMakeLists.txt
index 9ffb87df1c5c..81cde3fa090e 100644
--- a/graphics/VP1/VP1Plugins/VP1TriggerDecisionPlugin/CMakeLists.txt
+++ b/graphics/VP1/VP1Plugins/VP1TriggerDecisionPlugin/CMakeLists.txt
@@ -1,14 +1,8 @@
-################################################################################
-# Package: VP1TriggerDecisionPlugin
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1TriggerDecisionPlugin )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          graphics/VP1/VP1Systems/VP1TriggerDecisionSystems )
-
 # Install files from the package:
 atlas_install_headers( VP1TriggerDecisionPlugin )
 
diff --git a/graphics/VP1/VP1Systems/VP1AODSystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1AODSystems/CMakeLists.txt
index 8612f2e27980..2492091c766e 100644
--- a/graphics/VP1/VP1Systems/VP1AODSystems/CMakeLists.txt
+++ b/graphics/VP1/VP1Systems/VP1AODSystems/CMakeLists.txt
@@ -1,31 +1,8 @@
-################################################################################
-# Package: VP1AODSystems
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1AODSystems )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Event/xAOD/xAODMuon
-   Event/xAOD/xAODEgamma
-   Event/xAOD/xAODTracking
-   GaudiKernel
-   graphics/VP1/VP1Base
-   PRIVATE
-   Control/StoreGate
-   DetectorDescription/GeoPrimitives
-   Event/EventPrimitives
-   Event/xAOD/xAODBase
-   Event/xAOD/xAODCaloEvent
-   Event/xAOD/xAODJet
-   Event/xAOD/xAODMissingET
-   Tools/PathResolver
-   Tracking/TrkExtrapolation/TrkExInterfaces
-   graphics/VP1/VP1HEPVis
-   graphics/VP1/VP1Utils )
-
 # External dependencies:
 find_package( Coin3D )
 find_package( Qt5 COMPONENTS Core Gui Widgets )
@@ -57,7 +34,7 @@ else()
        LINK_LIBRARIES xAODMuon xAODEgamma xAODTracking VP1Base
        Qt5::Core Qt5::Gui
        PRIVATE_LINK_LIBRARIES ${COIN3D_LIBRARIES} GeoPrimitives EventPrimitives
-       xAODBase xAODCaloEvent xAODJet xAODMissingET PathResolver xAODEventInfo
+       xAODBase xAODCaloEvent xAODJet xAODMissingET PathResolver TrkExInterfaces xAODEventInfo
        VP1HEPVis VP1Utils xAODRootAccess Qt5::Gui )
 endif()
 
diff --git a/graphics/VP1/VP1Systems/VP1BPhysSystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1BPhysSystems/CMakeLists.txt
index 05c1a29339bc..485c2ca445bc 100644
--- a/graphics/VP1/VP1Systems/VP1BPhysSystems/CMakeLists.txt
+++ b/graphics/VP1/VP1Systems/VP1BPhysSystems/CMakeLists.txt
@@ -1,31 +1,13 @@
-################################################################################
-# Package: VP1BPhysSystems
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1BPhysSystems )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          DetectorDescription/GeoPrimitives
-                          graphics/VP1/VP1Base
-                          graphics/VP1/VP1Systems/VP1TrackSystems
-                          PRIVATE
-                          Control/StoreGate
-                          Event/EventInfo
-                          Reconstruction/Particle
-                          Tracking/TrkEvent/TrkParameters
-                          Tracking/TrkEvent/TrkTrack
-                          Tracking/TrkExtrapolation/TrkExInterfaces
-                          graphics/VP1/VP1Utils )
-
 # External dependencies:
 find_package( Coin3D )
-find_package( Eigen )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread Table MathMore Minuit Minuit2 Matrix Physics HistPainter Rint Graf Graf3d Gpad Html Postscript Gui GX11TTF GX11 )
+find_package( ROOT COMPONENTS Core Tree RIO )
 find_package( Qt5 COMPONENTS Core Widgets)
 
-
 # Generate UI files automatically:
 set( CMAKE_AUTOUIC TRUE )
 # Generate MOC files automatically:
@@ -35,16 +17,9 @@ set( CMAKE_AUTORCC TRUE )
 # to let CMake find .h files automatically-generated from .ui files
 set(CMAKE_INCLUDE_CURRENT_DIR ON)
 
-
-# tag ROOTSTLDictLibs was not recognized in automatic conversion in cmt2cmake
-
-# tag ROOTBasicLibs was not recognized in automatic conversion in cmt2cmake
-
 # Component(s) in the package:
 atlas_add_library( VP1BPhysSystems VP1BPhysSystems/*.h src/*.h src/*.cxx src/*.qrc  
                    PUBLIC_HEADERS VP1BPhysSystems
-                   INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${COIN3D_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${EIGEN_LIBRARIES} GeoPrimitives VP1Base VP1TrackSystems GL StoreGateLib SGtests
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${COIN3D_LIBRARIES} EventInfo Particle TrkParameters TrkTrack TrkExInterfaces VP1Utils )
-
+                   LINK_LIBRARIES GeoPrimitives VP1Base VP1TrackSystems GL
+                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${COIN3D_LIBRARIES} EventInfo Particle StoreGateLib TrkExInterfaces TrkParameters TrkTrack VP1Utils )
diff --git a/graphics/VP1/VP1Systems/VP1BanksSystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1BanksSystems/CMakeLists.txt
index 9ddbe3b5892a..5aea26fb8ce9 100644
--- a/graphics/VP1/VP1Systems/VP1BanksSystems/CMakeLists.txt
+++ b/graphics/VP1/VP1Systems/VP1BanksSystems/CMakeLists.txt
@@ -1,20 +1,8 @@
-# $Id: CMakeLists.txt 732153 2016-03-24 12:45:45Z krasznaa $
-################################################################################
-# Package: VP1BanksSystems
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1BanksSystems )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   graphics/VP1/VP1Base
-   PRIVATE
-   Control/AthenaKernel
-   GaudiKernel
-   graphics/VP1/VP1Utils )
-
 # External package(s):
 find_package( Qt5 COMPONENTS Core Gui Widgets )
 
diff --git a/graphics/VP1/VP1Systems/VP1CaloClusterSystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1CaloClusterSystems/CMakeLists.txt
index 56bb59970785..366e5a9061c8 100644
--- a/graphics/VP1/VP1Systems/VP1CaloClusterSystems/CMakeLists.txt
+++ b/graphics/VP1/VP1Systems/VP1CaloClusterSystems/CMakeLists.txt
@@ -1,18 +1,8 @@
-################################################################################
-# Package: VP1CaloClusterSystems
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1CaloClusterSystems )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          graphics/VP1/VP1Base
-                          PRIVATE
-                          Calorimeter/CaloEvent
-                          graphics/VP1/VP1HEPVis
-                          graphics/VP1/VP1Utils )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( Coin3D )
@@ -27,7 +17,6 @@ set( CMAKE_AUTORCC TRUE )
 # to let CMake find .h files automatically-generated from .ui files
 set(CMAKE_INCLUDE_CURRENT_DIR ON)
 
-
 # Component(s) in the package:
 atlas_add_library( VP1CaloClusterSystems VP1CaloClusterSystems/*.h src/*.h src/*.cxx src/*.qrc
                    PUBLIC_HEADERS VP1CaloClusterSystems
diff --git a/graphics/VP1/VP1Systems/VP1CaloReadoutSystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1CaloReadoutSystems/CMakeLists.txt
index b9f8e46c76db..bc26bf960611 100644
--- a/graphics/VP1/VP1Systems/VP1CaloReadoutSystems/CMakeLists.txt
+++ b/graphics/VP1/VP1Systems/VP1CaloReadoutSystems/CMakeLists.txt
@@ -1,24 +1,12 @@
-################################################################################
-# Package: VP1CaloReadoutSystems
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1CaloReadoutSystems )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          graphics/VP1/VP1Base
-                          PRIVATE
-                          LArCalorimeter/LArGeoModel/LArHV
-                          LArCalorimeter/LArGeoModel/LArReadoutGeometry
-			  DetectorDescription/GeoPrimitives
-                          graphics/VP1/VP1Utils )
-
 # External dependencies:
 find_package( Coin3D )
 find_package( Qt5 COMPONENTS Core Gui Widgets )
 
-
 # Generate UI files automatically:
 set( CMAKE_AUTOUIC TRUE )
 # Generate MOC files automatically:
@@ -28,7 +16,6 @@ set( CMAKE_AUTORCC TRUE )
 # to let CMake find .h files automatically-generated from .ui files
 set(CMAKE_INCLUDE_CURRENT_DIR ON)
 
-
 # Component(s) in the package:
 atlas_add_library( VP1CaloReadoutSystems VP1CaloReadoutSystems/*.h src/*.h src/*.cxx src/*.qrc  
                    PUBLIC_HEADERS VP1CaloReadoutSystems
diff --git a/graphics/VP1/VP1Systems/VP1CaloSystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1CaloSystems/CMakeLists.txt
index b0ef86b809c4..5f1914f35467 100644
--- a/graphics/VP1/VP1Systems/VP1CaloSystems/CMakeLists.txt
+++ b/graphics/VP1/VP1Systems/VP1CaloSystems/CMakeLists.txt
@@ -1,37 +1,9 @@
-# $Id: CMakeLists.txt 731930 2016-03-23 16:08:20Z krasznaa $
-################################################################################
-# Package: VP1CaloSystems
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1CaloSystems )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   DetectorDescription/Identifier
-   graphics/VP1/VP1Base
-   PRIVATE
-   Calorimeter/CaloConditions
-   Calorimeter/CaloDetDescr
-   Calorimeter/CaloEvent
-   Calorimeter/CaloIdentifier
-   Control/StoreGate
-   DetectorDescription/GeoModel/GeoModelUtilities
-   GaudiKernel
-   LArCalorimeter/LArIdentifier
-   LArCalorimeter/LArRawEvent
-   LArCalorimeter/LArCabling
-   TileCalorimeter/TileConditions
-   TileCalorimeter/TileDetDescr
-   TileCalorimeter/TileEvent
-   TileCalorimeter/TileIdentifier
-   graphics/VP1/VP1Systems/VP1UtilitySystems
-   graphics/VP1/VP1HEPVis
-   graphics/VP1/VP1Utils )
-
 # External dependencies:
-find_package( CLHEP )
 find_package( Coin3D )
 find_package( Qt5 COMPONENTS Core Gui Widgets )
 #find_package( Qwt )
@@ -46,13 +18,7 @@ set( CMAKE_AUTOMOC TRUE )
 atlas_add_library( VP1CaloSystems
    VP1CaloSystems/*.h src/*.cxx
    PUBLIC_HEADERS VP1CaloSystems
-   INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
    PRIVATE_INCLUDE_DIRS ${COIN3D_INCLUDE_DIRS} ${QWT_INCLUDE_DIRS}
    ${CMAKE_CURRENT_BINARY_DIR}
-   DEFINITIONS ${CLHEP_DEFINITIONS}
-   LINK_LIBRARIES ${CLHEP_LIBRARIES} Identifier VP1Base Qt5::Core
-   PRIVATE_LINK_LIBRARIES ${COIN3D_LIBRARIES} ${QWT_LIBRARIES} ${GEOMODELCORE_LIBRARIES} CaloDetDescrLib
-   StoreGateLib LArCablingLib TileConditionsLib CaloConditions CaloEvent
-   CaloIdentifier GeoModelUtilities GaudiKernel LArIdentifier
-   LArRawEvent TileDetDescr TileEvent TileIdentifier VP1HEPVis VP1Utils
-   Qt5::Gui )
+   LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} GaudiKernel GeoPrimitives Identifier VP1Base Qt5::Core
+   PRIVATE_LINK_LIBRARIES ${COIN3D_LIBRARIES} ${QWT_LIBRARIES} CaloConditions CaloDetDescrLib CaloEvent CaloIdentifier GeoModelUtilities LArCablingLib LArIdentifier LArRawEvent StoreGateLib TileConditionsLib TileDetDescr TileEvent TileIdentifier VP1HEPVis VP1Utils Qt5::Gui )
diff --git a/graphics/VP1/VP1Systems/VP1GeometrySystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1GeometrySystems/CMakeLists.txt
index 2b90f2ff20c8..faf5fada2201 100644
--- a/graphics/VP1/VP1Systems/VP1GeometrySystems/CMakeLists.txt
+++ b/graphics/VP1/VP1Systems/VP1GeometrySystems/CMakeLists.txt
@@ -1,27 +1,8 @@
-# $Id: CMakeLists.txt 732131 2016-03-24 11:03:29Z krasznaa $
-################################################################################
-# Package: VP1GeometrySystems
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1GeometrySystems )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   DetectorDescription/GeoPrimitives
-   MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry
-   Generators/TruthUtils
-   Event/xAOD/xAODTruth
-   graphics/VP1/VP1Base
-   PRIVATE
-   DetectorDescription/GeoModel/GeoModelUtilities
-   DetectorDescription/GeoModel/GeoModelExamples
-   DetectorDescription/GeoModel/GeoModelStandalone/GeoModelDBManager
-   DetectorDescription/GeoModel/GeoModelStandalone/GeoRead
-   graphics/VP1/VP1HEPVis
-   graphics/VP1/VP1Utils )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( Coin3D )
@@ -86,7 +67,7 @@ if( APPLE )
      INCLUDE_DIRS ${COIN3D_INCLUDE_DIRS}
      PRIVATE_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}
      PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-     LINK_LIBRARIES ${COIN3D_LIBRARIES} ${GEOMODELCORE_LIBRARIES} GeoModelDBManager GeoRead TruthUtils xAODTruth VP1Base ${OPENGL_gl_LIBRARY} Qt5::Core Qt5::Widgets
+     LINK_LIBRARIES ${COIN3D_LIBRARIES} ${GEOMODELCORE_LIBRARIES} GeoModelDBManager GeoRead MuonReadoutGeometry TruthUtils xAODTruth VP1Base ${OPENGL_gl_LIBRARY} Qt5::Core Qt5::Widgets
      PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} GeoModelUtilities GeoModelExamplesLib VP1HEPVis VP1Utils Qt5::Gui Qt5::Sql )
 endif()
 if( UNIX AND NOT APPLE )
@@ -96,7 +77,7 @@ if( UNIX AND NOT APPLE )
     INCLUDE_DIRS ${COIN3D_INCLUDE_DIRS}
     PRIVATE_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}
     PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-    LINK_LIBRARIES ${COIN3D_LIBRARIES} ${GEOMODELCORE_LIBRARIES} GeoModelDBManager GeoRead TruthUtils xAODTruth VP1Base GL Qt5::Core Qt5::Widgets
+    LINK_LIBRARIES ${COIN3D_LIBRARIES} ${GEOMODELCORE_LIBRARIES} GeoModelDBManager GeoRead MuonReadoutGeometry TruthUtils xAODTruth VP1Base GL Qt5::Core Qt5::Widgets
     PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} GeoModelUtilities GeoModelExamplesLib VP1HEPVis VP1Utils Qt5::Gui Qt5::Sql )
 endif()
 endif()
diff --git a/graphics/VP1/VP1Systems/VP1GuideLineSystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1GuideLineSystems/CMakeLists.txt
index ecd38c072d4a..234bd749b7e5 100644
--- a/graphics/VP1/VP1Systems/VP1GuideLineSystems/CMakeLists.txt
+++ b/graphics/VP1/VP1Systems/VP1GuideLineSystems/CMakeLists.txt
@@ -1,21 +1,8 @@
-# $Id: CMakeLists.txt 728676 2016-03-09 15:11:49Z krasznaa $
-################################################################################
-# Package: VP1GuideLineSystems
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1GuideLineSystems )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   DetectorDescription/GeoPrimitives
-   graphics/VP1/VP1Base
-   graphics/VP1/VP1Utils
-   PRIVATE
-   GaudiKernel
-   graphics/VP1/VP1HEPVis )
-
 # External dependencies:
 find_package( Coin3D )
 find_package( Qt5 COMPONENTS Core Gui Widgets )
diff --git a/graphics/VP1/VP1Systems/VP1LegoSystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1LegoSystems/CMakeLists.txt
index e6270959a1d1..3746387f64f2 100644
--- a/graphics/VP1/VP1Systems/VP1LegoSystems/CMakeLists.txt
+++ b/graphics/VP1/VP1Systems/VP1LegoSystems/CMakeLists.txt
@@ -1,20 +1,8 @@
-################################################################################
-# Package: VP1LegoSystems
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1LegoSystems )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          graphics/VP1/VP1Base
-                          PRIVATE
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloEvent
-                          LArCalorimeter/LArGeoModel/LArReadoutGeometry
-                          LArCalorimeter/LArIdentifier
-                          graphics/VP1/VP1Utils )
-
 # External dependencies:
 find_package( Coin3D )
 find_package( Qt5 COMPONENTS Core Gui Widgets )
@@ -28,11 +16,9 @@ set( CMAKE_AUTORCC TRUE )
 # to let CMake find .h files automatically-generated from .ui files
 set(CMAKE_INCLUDE_CURRENT_DIR ON)
 
-
 # Component(s) in the package:
 atlas_add_library( VP1LegoSystems VP1LegoSystems/*.h src/*.h src/*.cxx src/*.qrc  
                    PUBLIC_HEADERS VP1LegoSystems
                    INCLUDE_DIRS ${COIN3D_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${COIN3D_LIBRARIES} VP1Base GL CaloDetDescrLib
-                   PRIVATE_LINK_LIBRARIES CaloEvent LArReadoutGeometry LArIdentifier VP1Utils )
-
+                   LINK_LIBRARIES ${COIN3D_LIBRARIES} VP1Base GL
+                   PRIVATE_LINK_LIBRARIES ${COIN3D_LIBRARIES} CaloDetDescrLib CaloEvent LArIdentifier LArReadoutGeometry VP1Utils )
diff --git a/graphics/VP1/VP1Systems/VP1MCSystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1MCSystems/CMakeLists.txt
index 645c04e21f8a..31af59a74564 100644
--- a/graphics/VP1/VP1Systems/VP1MCSystems/CMakeLists.txt
+++ b/graphics/VP1/VP1Systems/VP1MCSystems/CMakeLists.txt
@@ -1,21 +1,8 @@
-################################################################################
-# Package: VP1MCSystems
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1MCSystems )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          graphics/VP1/VP1Base
-                          PRIVATE
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          GaudiKernel
-                          Generators/AtlasHepMC
-                          Generators/GeneratorObjects
-                          graphics/VP1/VP1Utils )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( HepPDT )
diff --git a/graphics/VP1/VP1Systems/VP1MissingEtSystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1MissingEtSystems/CMakeLists.txt
index 686d86c0ebae..40fa08efdc47 100644
--- a/graphics/VP1/VP1Systems/VP1MissingEtSystems/CMakeLists.txt
+++ b/graphics/VP1/VP1Systems/VP1MissingEtSystems/CMakeLists.txt
@@ -1,17 +1,8 @@
-################################################################################
-# Package: VP1MissingEtSystems
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1MissingEtSystems )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          graphics/VP1/VP1Base
-                          PRIVATE
-                          Reconstruction/MissingETEvent
-                          graphics/VP1/VP1Utils )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( Coin3D )
@@ -26,7 +17,6 @@ set( CMAKE_AUTORCC TRUE )
 # to let CMake find .h files automatically-generated from .ui files
 set(CMAKE_INCLUDE_CURRENT_DIR ON)
 
-
 # Component(s) in the package:
 atlas_add_library( VP1MissingEtSystems VP1MissingEtSystems/*.h src/*.h src/*.cxx src/*.qrc 
                    PUBLIC_HEADERS VP1MissingEtSystems
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1PRDSystems/CMakeLists.txt
index 58d6daaf9f29..c157adcd5798 100644
--- a/graphics/VP1/VP1Systems/VP1PRDSystems/CMakeLists.txt
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/CMakeLists.txt
@@ -1,41 +1,9 @@
-# $Id: CMakeLists.txt 728680 2016-03-09 15:15:07Z krasznaa $
-################################################################################
-# Package: VP1PRDSystems
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1PRDSystems )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   DetectorDescription/GeoPrimitives
-   InnerDetector/InDetDetDescr/InDetReadoutGeometry
-   InnerDetector/InDetDetDescr/TRT_ReadoutGeometry
-   InnerDetector/InDetRecEvent/InDetPrepRawData
-   MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData
-   Tracking/TrkEvent/TrkPrepRawData
-   Tracking/TrkEvent/TrkSpacePoint
-   graphics/VP1/VP1Base
-   graphics/VP1/VP1Utils
-   PRIVATE
-   Control/AthContainers
-   DetectorDescription/GeoModel/GeoModelUtilities
-   Event/EventPrimitives
-   InnerDetector/InDetDetDescr/InDetIdentifier
-   MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry
-   MuonSpectrometer/MuonIdHelpers
-   Tracking/TrkDetDescr/TrkSurfaces
-   Tracking/TrkEvent/TrkCompetingRIOsOnTrack
-   Tracking/TrkEvent/TrkMeasurementBase
-   Tracking/TrkEvent/TrkRIO_OnTrack
-   Tracking/TrkEvent/TrkSegment
-   Tracking/TrkEvent/TrkTrack
-   graphics/VP1/VP1HEPVis
-   graphics/VP1/VP1Systems/VP1GuideLineSystems )
-
 # External dependencies:
-find_package( CLHEP )
 find_package( Coin3D )
 find_package( Qt5 COMPONENTS Core Gui Widgets)
 find_package( GeoModelCore )
@@ -48,12 +16,7 @@ set( CMAKE_AUTOMOC TRUE )
 # Component(s) in the package:
 atlas_add_library( VP1PRDSystems VP1PRDSystems/*.h src/*.cxx
    PUBLIC_HEADERS VP1PRDSystems
-   PRIVATE_INCLUDE_DIRS ${COIN3D_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
+   PRIVATE_INCLUDE_DIRS ${COIN3D_INCLUDE_DIRS}
    ${CMAKE_CURRENT_BINARY_DIR}
-   LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} GeoPrimitives InDetReadoutGeometry TRT_ReadoutGeometry
-   InDetPrepRawData MuonPrepRawData TrkPrepRawData TrkSpacePoint VP1Base
-   VP1Utils MuonIdHelpersLib Qt5::Core Qt5::Gui
-   PRIVATE_LINK_LIBRARIES ${COIN3D_LIBRARIES} ${CLHEP_LIBRARIES} AthContainers
-   GeoModelUtilities EventPrimitives InDetIdentifier MuonReadoutGeometry
-   TrkSurfaces TrkCompetingRIOsOnTrack TrkMeasurementBase TrkRIO_OnTrack
-   TrkSegment TrkTrack VP1HEPVis VP1GuideLineSystems  )
+   LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} GeoPrimitives InDetPrepRawData InDetReadoutGeometry MuonPrepRawData TrkPrepRawData TrkSpacePoint VP1Base VP1Utils Qt5::Core Qt5::Gui
+   PRIVATE_LINK_LIBRARIES ${COIN3D_LIBRARIES} AthContainers EventPrimitives GeoModelUtilities InDetIdentifier MuonIdHelpersLib MuonReadoutGeometry TRT_ReadoutGeometry TrkCompetingRIOsOnTrack TrkMeasurementBase TrkRIO_OnTrack TrkSegment TrkSurfaces TrkTrack VP1GuideLineSystems VP1HEPVis )
diff --git a/graphics/VP1/VP1Systems/VP1RawDataSystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1RawDataSystems/CMakeLists.txt
index 664fdf9fe90f..8f1d5f0bc89a 100644
--- a/graphics/VP1/VP1Systems/VP1RawDataSystems/CMakeLists.txt
+++ b/graphics/VP1/VP1Systems/VP1RawDataSystems/CMakeLists.txt
@@ -1,28 +1,8 @@
-################################################################################
-# Package: VP1RawDataSystems
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1RawDataSystems )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          DetectorDescription/GeoPrimitives
-                          graphics/VP1/VP1Base
-                          PRIVATE
-                          Event/EventPrimitives
-                          ForwardDetectors/LUCID/LUCID_RawEvent
-                          GaudiKernel
-                          InnerDetector/InDetDetDescr/InDetIdentifier
-                          InnerDetector/InDetDetDescr/InDetReadoutGeometry
-			  InnerDetector/InDetDetDescr/PixelReadoutGeometry
-			  InnerDetector/InDetDetDescr/SCT_ReadoutGeometry
-			  InnerDetector/InDetDetDescr/TRT_ReadoutGeometry
-                          InnerDetector/InDetRawEvent/InDetBCM_RawData
-                          InnerDetector/InDetRawEvent/InDetRawData
-                          graphics/VP1/VP1HEPVis
-                          graphics/VP1/VP1Utils )
-
 # External dependencies:
 find_package( Coin3D )
 find_package( Eigen )
@@ -38,7 +18,6 @@ set( CMAKE_AUTORCC TRUE )
 # to let CMake find .h files automatically-generated from .ui files
 set(CMAKE_INCLUDE_CURRENT_DIR ON)
 
-
 # Component(s) in the package:
 atlas_add_library( VP1RawDataSystems VP1RawDataSystems/*.h src/*.h src/*.cxx src/*.qrc  
                    PUBLIC_HEADERS VP1RawDataSystems
diff --git a/graphics/VP1/VP1Systems/VP1SimHitSystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1SimHitSystems/CMakeLists.txt
index 040354e04116..49d8b7c66347 100644
--- a/graphics/VP1/VP1Systems/VP1SimHitSystems/CMakeLists.txt
+++ b/graphics/VP1/VP1Systems/VP1SimHitSystems/CMakeLists.txt
@@ -1,22 +1,8 @@
-################################################################################
-# Package: VP1SimHitSystems
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1SimHitSystems )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          graphics/VP1/VP1Base
-                          PRIVATE
-                          Control/StoreGate
-                          DetectorDescription/GeoModel/GeoAdaptors
-                          DetectorDescription/GeoPrimitives
-                          ForwardDetectors/ForwardSimulation/ForwardRegion_SimEv
-                          InnerDetector/InDetSimEvent
-                          MuonSpectrometer/MuonSimEvent
-                          graphics/VP1/VP1Utils )
-
 # External dependencies:
 find_package( Coin3D )
 find_package( Eigen )
diff --git a/graphics/VP1/VP1Systems/VP1TestSystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1TestSystems/CMakeLists.txt
index 8e29e65aa963..baf53a9c6135 100644
--- a/graphics/VP1/VP1Systems/VP1TestSystems/CMakeLists.txt
+++ b/graphics/VP1/VP1Systems/VP1TestSystems/CMakeLists.txt
@@ -1,22 +1,8 @@
-################################################################################
-# Package: VP1TestSystems
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1TestSystems )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          graphics/VP1/VP1Base
-                          graphics/VP1/VP1Utils
-                          PRIVATE
-                          Control/StoreGate
-                          DetectorDescription/GeoPrimitives
-                          GaudiKernel
-                          Tracking/TrkDetDescr/TrkSurfaces
-                          Tracking/TrkEvent/TrkParameters
-                          Tracking/TrkEvent/TrkTrack )
-
 # External dependencies:
 find_package( Coin3D )
 find_package( Eigen )
diff --git a/graphics/VP1/VP1Systems/VP1TrackSystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1TrackSystems/CMakeLists.txt
index ac160920e020..de28a0a27c5e 100644
--- a/graphics/VP1/VP1Systems/VP1TrackSystems/CMakeLists.txt
+++ b/graphics/VP1/VP1Systems/VP1TrackSystems/CMakeLists.txt
@@ -1,69 +1,8 @@
-# $Id: CMakeLists.txt 728682 2016-03-09 15:17:26Z krasznaa $
-################################################################################
-# Package: VP1TrackSystems
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1TrackSystems )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   DetectorDescription/GeoPrimitives
-   DetectorDescription/Identifier
-   Event/xAOD/xAODTracking
-   GaudiKernel
-   Generators/GeneratorObjects
-   Simulation/G4Sim/TrackRecord
-   Tracking/TrkDetDescr/TrkDetDescrInterfaces
-   Tracking/TrkDetDescr/TrkSurfaces
-   Tracking/TrkEvent/TrkEventPrimitives
-   Tracking/TrkEvent/TrkParameters
-   graphics/VP1/VP1Base
-   graphics/VP1/VP1Utils
-   PRIVATE
-   Control/AthContainers
-   Control/StoreGate
-   DetectorDescription/AtlasDetDescr
-   Event/EventPrimitives
-   ForwardDetectors/ForwardSimulation/ForwardRegion_SimEv
-   InnerDetector/InDetDetDescr/InDetIdentifier
-   InnerDetector/InDetDetDescr/InDetReadoutGeometry
-   InnerDetector/InDetDetDescr/PixelReadoutGeometry
-   InnerDetector/InDetDetDescr/SCT_ReadoutGeometry
-   InnerDetector/InDetDetDescr/TRT_ReadoutGeometry
-   InnerDetector/InDetRecEvent/InDetPrepRawData
-   InnerDetector/InDetRecEvent/InDetRIO_OnTrack
-   InnerDetector/InDetSimEvent
-   MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry
-   MuonSpectrometer/MuonIdHelpers
-   MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonChamberT0s
-   MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData
-   MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack
-   MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment
-   MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecHelperTools
-   MuonSpectrometer/MuonSimEvent
-   Reconstruction/Particle
-   Tracking/TrkDetDescr/TrkDetDescrUtils
-   Tracking/TrkDetDescr/TrkDetElementBase
-   Tracking/TrkDetDescr/TrkVolumes
-   Tracking/TrkEvent/TrkCompetingRIOsOnTrack
-   Tracking/TrkEvent/TrkMaterialOnTrack
-   Tracking/TrkEvent/TrkMeasurementBase
-   Tracking/TrkEvent/TrkPrepRawData
-   Tracking/TrkEvent/TrkPseudoMeasurementOnTrack
-   Tracking/TrkEvent/TrkRIO_OnTrack
-   Tracking/TrkEvent/TrkSegment
-   Tracking/TrkEvent/TrkTrack
-   Tracking/TrkEvent/TrkTrackSummary
-   Tracking/TrkExtrapolation/TrkExInterfaces
-   Tracking/TrkFitter/TrkFitterInterfaces
-   graphics/VP1/VP1HEPVis
-   graphics/VP1/VP1Systems/VP1GuideLineSystems
-   graphics/VP1/VP1Systems/VP1PRDSystems 
-   Generators/AtlasHepMC
-   )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( Coin3D )
@@ -79,19 +18,6 @@ set( CMAKE_AUTOMOC TRUE )
 # Component(s) in the package:
 atlas_add_library( VP1TrackSystems VP1TrackSystems/*.h src/*.cxx
    PUBLIC_HEADERS VP1TrackSystems
-   PRIVATE_INCLUDE_DIRS ${COIN3D_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-    ${CMAKE_CURRENT_BINARY_DIR}
-   LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} GeoPrimitives Identifier xAODTracking
-   GaudiKernel GeneratorObjects TrkDetDescrInterfaces TrkSurfaces
-   TrkEventPrimitives TrkParameters VP1Base VP1Utils StoreGateLib SGtests
-   MuonIdHelpersLib MuonRecHelperToolsLib Qt5::Core Qt5::Gui
-   PRIVATE_LINK_LIBRARIES ${COIN3D_LIBRARIES} ${CLHEP_LIBRARIES}
-   AtlasHepMCLib AthContainers AtlasDetDescr EventPrimitives
-   ForwardRegion_SimEv InDetIdentifier InDetReadoutGeometry PixelReadoutGeometry SCT_ReadoutGeometry TRT_ReadoutGeometry InDetPrepRawData
-   InDetRIO_OnTrack InDetSimEvent MuonReadoutGeometry MuonChamberT0s
-   MuonPrepRawData MuonRIO_OnTrack MuonSegment MuonSimEvent Particle
-   TrkDetDescrUtils TrkDetElementBase TrkVolumes TrkCompetingRIOsOnTrack
-   TrkMaterialOnTrack TrkMeasurementBase TrkPrepRawData
-   TrkPseudoMeasurementOnTrack TrkRIO_OnTrack TrkSegment TrkTrack
-   TrkTrackSummary TrkExInterfaces TrkFitterInterfaces VP1HEPVis
-   VP1GuideLineSystems VP1PRDSystems )
+   PRIVATE_INCLUDE_DIRS ${COIN3D_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR}
+   LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} AtlasHepMCLib GaudiKernel GeneratorObjects GeoPrimitives TrackRecordLib TrkDetDescrInterfaces TrkEventPrimitives TrkParameters TrkSurfaces VP1Base VP1Utils xAODTracking Qt5::Core Qt5::Gui
+   PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} ${COIN3D_LIBRARIES} AthContainers AtlasDetDescr EventPrimitives ForwardRegion_SimEv InDetIdentifier InDetPrepRawData InDetRIO_OnTrack InDetReadoutGeometry InDetSimEvent MuonChamberT0s MuonIdHelpersLib MuonPrepRawData MuonRIO_OnTrack MuonReadoutGeometry MuonRecHelperToolsLib MuonSegment MuonSimEvent Particle PixelReadoutGeometry SCT_ReadoutGeometry StoreGateLib TRT_ReadoutGeometry TrkCompetingRIOsOnTrack TrkDetElementBase TrkExInterfaces TrkFitterInterfaces TrkMaterialOnTrack TrkMeasurementBase TrkPrepRawData TrkPseudoMeasurementOnTrack TrkRIO_OnTrack TrkSegment TrkTrack TrkTrackSummary TrkVolumes VP1GuideLineSystems VP1HEPVis VP1PRDSystems )
diff --git a/graphics/VP1/VP1Systems/VP1TrackingGeometrySystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1TrackingGeometrySystems/CMakeLists.txt
index 1fc3b2faf2b2..93bb1ebc0aa7 100644
--- a/graphics/VP1/VP1Systems/VP1TrackingGeometrySystems/CMakeLists.txt
+++ b/graphics/VP1/VP1Systems/VP1TrackingGeometrySystems/CMakeLists.txt
@@ -1,27 +1,10 @@
-################################################################################
-# Package: VP1TrackingGeometrySystems
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1TrackingGeometrySystems )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Tracking/TrkDetDescr/TrkVolumes
-                          graphics/VP1/VP1Base
-                          PRIVATE
-                          Control/StoreGate
-                          DetectorDescription/GeoPrimitives
-                          GaudiKernel
-                          Tracking/TrkDetDescr/TrkDetDescrInterfaces
-                          Tracking/TrkDetDescr/TrkDetDescrUtils
-                          Tracking/TrkDetDescr/TrkGeometry
-                          graphics/VP1/VP1HEPVis
-                          graphics/VP1/VP1Utils )
-
 # External dependencies:
 find_package( Coin3D )
-find_package( Eigen )
 find_package( Qt5 COMPONENTS Core Gui Widgets )
 find_package( GeoModelCore )
 
@@ -34,13 +17,9 @@ set( CMAKE_AUTORCC TRUE )
 # to let CMake find .h files automatically-generated from .ui files
 set(CMAKE_INCLUDE_CURRENT_DIR ON)
 
-
-
-
 # Component(s) in the package:
 atlas_add_library( VP1TrackingGeometrySystems VP1TrackingGeometrySystems/*.h src/*.h src/*.cxx src/*.qrc  
                    PUBLIC_HEADERS VP1TrackingGeometrySystems
-                   PRIVATE_INCLUDE_DIRS ${COIN3D_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} TrkVolumes VP1Base GL StoreGateLib SGtests
-                   PRIVATE_LINK_LIBRARIES ${COIN3D_LIBRARIES} ${EIGEN_LIBRARIES} GeoPrimitives GaudiKernel TrkDetDescrInterfaces TrkDetDescrUtils TrkGeometry VP1HEPVis VP1Utils )
-
+                   PRIVATE_INCLUDE_DIRS ${COIN3D_INCLUDE_DIRS}
+                   LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} TrkVolumes VP1Base GL
+                   PRIVATE_LINK_LIBRARIES ${COIN3D_LIBRARIES} GeoPrimitives GaudiKernel StoreGateLib TrkDetDescrInterfaces TrkDetDescrUtils TrkGeometry VP1HEPVis VP1Utils )
diff --git a/graphics/VP1/VP1Systems/VP1TriggerDecisionSystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1TriggerDecisionSystems/CMakeLists.txt
index bd4533d6caa2..9df3758e0188 100644
--- a/graphics/VP1/VP1Systems/VP1TriggerDecisionSystems/CMakeLists.txt
+++ b/graphics/VP1/VP1Systems/VP1TriggerDecisionSystems/CMakeLists.txt
@@ -1,17 +1,8 @@
-################################################################################
-# Package: VP1TriggerDecisionSystems
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1TriggerDecisionSystems )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          graphics/VP1/VP1Base
-                          PRIVATE
-                          Trigger/TrigAnalysis/TrigDecisionTool
-                          Trigger/TrigEvent/TrigSteeringEvent )
-
 # Component(s) in the package:
 atlas_add_library( VP1TriggerDecisionSystems
                    src/*.c*
diff --git a/graphics/VP1/VP1Systems/VP1TriggerSystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1TriggerSystems/CMakeLists.txt
index 6a26a5149bba..049af8c74696 100644
--- a/graphics/VP1/VP1Systems/VP1TriggerSystems/CMakeLists.txt
+++ b/graphics/VP1/VP1Systems/VP1TriggerSystems/CMakeLists.txt
@@ -1,25 +1,8 @@
-################################################################################
-# Package: VP1TriggerSystems
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1TriggerSystems )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/StoreGate
-                          PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerEvent
-                          Trigger/TrigAnalysis/TrigDecisionTool
-                          Trigger/TrigAnalysis/TrigObjectMatching
-                          Trigger/TrigEvent/TrigMuonEvent
-                          Trigger/TrigEvent/TrigSteeringEvent
-                          graphics/VP1/VP1Base
-                          PRIVATE
-                          DetectorDescription/GeoPrimitives
-                          GaudiKernel
-                          Tracking/TrkEvent/TrkParameters
-                          Tracking/TrkEvent/TrkTrack )
-
 # External dependencies:
 find_package( Coin3D )
 find_package( Eigen )
diff --git a/graphics/VP1/VP1Systems/VP1UtilitySystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1UtilitySystems/CMakeLists.txt
index a2e71596d139..ed9d0f0dbfa0 100644
--- a/graphics/VP1/VP1Systems/VP1UtilitySystems/CMakeLists.txt
+++ b/graphics/VP1/VP1Systems/VP1UtilitySystems/CMakeLists.txt
@@ -1,16 +1,8 @@
-################################################################################
-# Package: VP1UtilitySystems
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1UtilitySystems )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          graphics/VP1/VP1Base
-                          PRIVATE
-                        )
-
 # External dependencies:
 find_package( Coin3D )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
@@ -25,8 +17,6 @@ set( CMAKE_AUTORCC TRUE )
 # to let CMake find .h files automatically-generated from .ui files
 set(CMAKE_INCLUDE_CURRENT_DIR ON)
 
-
-
 # Component(s) in the package:
 atlas_add_library( VP1UtilitySystems VP1UtilitySystems/*.h src/*.h src/*.cxx src/*.qrc  
                    PUBLIC_HEADERS VP1UtilitySystems
diff --git a/graphics/VP1/VP1Systems/VP1VertexSystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1VertexSystems/CMakeLists.txt
index 3410988d2512..d10a731674ba 100644
--- a/graphics/VP1/VP1Systems/VP1VertexSystems/CMakeLists.txt
+++ b/graphics/VP1/VP1Systems/VP1VertexSystems/CMakeLists.txt
@@ -1,27 +1,10 @@
-################################################################################
-# Package: VP1VertexSystems
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1VertexSystems )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          graphics/VP1/VP1Base
-                          PRIVATE
-                          DetectorDescription/GeoPrimitives
-                          GaudiKernel
-                          Generators/GeneratorObjects
-                          Generators/AtlasHepMC
-                          Tracking/TrkEvent/TrkParticleBase
-                          Tracking/TrkEvent/TrkTrack
-                          Tracking/TrkEvent/TrkTrackLink
-                          Tracking/TrkEvent/VxVertex
-                          graphics/VP1/VP1Utils )
-
 # External dependencies:
 find_package( Coin3D )
-find_package( Eigen )
 find_package( Qt5 COMPONENTS Core Gui Widgets )
 
 # Generate UI files automatically:
@@ -33,12 +16,9 @@ set( CMAKE_AUTORCC TRUE )
 # to let CMake find .h files automatically-generated from .ui files
 set(CMAKE_INCLUDE_CURRENT_DIR ON)
 
-
-
 # Component(s) in the package:
 atlas_add_library( VP1VertexSystems VP1VertexSystems/*.h src/*.h src/*.cxx src/*.qrc  
                    PUBLIC_HEADERS VP1VertexSystems
-                   PRIVATE_INCLUDE_DIRS ${COIN3D_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} 
+                   PRIVATE_INCLUDE_DIRS ${COIN3D_INCLUDE_DIRS}
                    LINK_LIBRARIES VP1Base GL Qt5::Core Qt5::Gui
-                   PRIVATE_LINK_LIBRARIES ${COIN3D_LIBRARIES} ${EIGEN_LIBRARIES} AtlasHepMCLib GeoPrimitives GaudiKernel GeneratorObjects TrkParticleBase TrkTrack VxVertex VP1Utils )
-
+                   PRIVATE_LINK_LIBRARIES ${COIN3D_LIBRARIES} AtlasHepMCLib GaudiKernel GeneratorObjects GeoPrimitives TrkParticleBase TrkTrack TrkTrackLink VP1Utils VxVertex )
diff --git a/graphics/VP1/VP1TrkAuxAlgs/CMakeLists.txt b/graphics/VP1/VP1TrkAuxAlgs/CMakeLists.txt
index 5c76fa58807f..0fdbad807ae8 100644
--- a/graphics/VP1/VP1TrkAuxAlgs/CMakeLists.txt
+++ b/graphics/VP1/VP1TrkAuxAlgs/CMakeLists.txt
@@ -1,23 +1,8 @@
-################################################################################
-# Package: VP1TrkAuxAlgs
-################################################################################
-# Author: <abandoned>
-################################################################################
+# Copyright (C) 2020 2002, 2020-CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1TrkAuxAlgs )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/AthenaBaseComps
-   PRIVATE
-   GaudiKernel
-   Tracking/TrkExtrapolation/TrkExInterfaces
-   Tracking/TrkFitter/TrkFitterInterfaces
-   graphics/VP1/VP1Base
-   graphics/VP1/VP1Utils )
-
 # External dependencies:
 find_package( Qt5 COMPONENTS Core  )
 
@@ -25,6 +10,3 @@ find_package( Qt5 COMPONENTS Core  )
 atlas_add_component( VP1TrkAuxAlgs src/*.cxx src/components/*.cxx
    LINK_LIBRARIES Qt5::Core AthenaBaseComps GaudiKernel TrkExInterfaces ${SOQT_LIBRARIES}
    TrkFitterInterfaces VP1Base VP1Utils )
-
-# Install files from the package:
-atlas_install_headers( VP1TrkAuxAlgs )
diff --git a/graphics/VP1/VP1Utils/CMakeLists.txt b/graphics/VP1/VP1Utils/CMakeLists.txt
index 50b42464a919..98eb2a10b525 100644
--- a/graphics/VP1/VP1Utils/CMakeLists.txt
+++ b/graphics/VP1/VP1Utils/CMakeLists.txt
@@ -1,45 +1,8 @@
-################################################################################
-# Package: VP1Utils
-################################################################################
-# Author: Thomas Kittelmann
-# Author: Riccardo Maria BIANCHI <rbianchi@cern.ch>
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1Utils )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/AthenaKernel
-   Control/StoreGate
-   DetectorDescription/GeoPrimitives
-   Event/EventPrimitives
-   GaudiKernel
-   graphics/VP1/VP1Base
-   PRIVATE
-   Calorimeter/CaloIdentifier
-   Calorimeter/CaloTTDetDescr
-   Control/CxxUtils
-   DetectorDescription/AtlasDetDescr
-   DetectorDescription/GeoModel/GeoModelUtilities
-   DetectorDescription/GeoModel/GeoSpecialShapes
-   DetectorDescription/Identifier
-   InnerDetector/InDetDetDescr/InDetIdentifier
-   InnerDetector/InDetDetDescr/InDetReadoutGeometry
-   InnerDetector/InDetDetDescr/PixelReadoutGeometry
-   InnerDetector/InDetDetDescr/SCT_ReadoutGeometry
-   InnerDetector/InDetDetDescr/TRT_ReadoutGeometry
-   InnerDetector/InDetRecEvent/InDetRIO_OnTrack
-   LArCalorimeter/LArGeoModel/LArReadoutGeometry
-   MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry
-   MuonSpectrometer/MuonIdHelpers
-   MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack
-   TileCalorimeter/TileDetDescr
-   Tracking/TrkDetDescr/TrkSurfaces
-   Tracking/TrkEvent/TrkRIO_OnTrack
-   graphics/VP1/VP1HEPVis )
-
 # External dependencies:
 find_package( CLHEP ) # TODO: to be removed when fully migrated to Eigen-based GeoTrf
 find_package( Coin3D )
@@ -97,6 +60,6 @@ atlas_add_library( VP1Utils ${SOURCES} ${HEADERS}
    GeoPrimitives Qt5::Core
    PRIVATE_LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${COIN3D_LIBRARIES}
    ${EIGEN_LIBRARIES} CxxUtils
-   GeoModelUtilities
+   GeoModelUtilities GeoSpecialShapes
    VP1HEPVis )
 endif()
diff --git a/graphics/VP1/VP1UtilsBase/CMakeLists.txt b/graphics/VP1/VP1UtilsBase/CMakeLists.txt
index 371b777769cd..9ad2a7110b1b 100644
--- a/graphics/VP1/VP1UtilsBase/CMakeLists.txt
+++ b/graphics/VP1/VP1UtilsBase/CMakeLists.txt
@@ -1,8 +1,4 @@
-################################################################################
-# Package: VP1UtilsBase
-################################################################################
-# Author: Riccardo Maria BIANCHI <rbianchi@cern.ch>
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( VP1UtilsBase )
-- 
GitLab


From fa0a15a31253876efc65629664553ff02b3edc3e Mon Sep 17 00:00:00 2001
From: Stephen Nicholas Swatman <stephen.nicholas.swatman@cern.ch>
Date: Mon, 5 Oct 2020 14:12:35 +0200
Subject: [PATCH 188/403] Remove the default boundary tool from GX2 fitter

Previously, the GlobalChi2Fitter can equipped with a default value for
its boundary checking tool tool handle. However, I now believe that this
might be causing some CI test failures, so to be safe I am removing this
default value from the fitter. It now comes with an empty default value,
and the hole search functionality is automatically disabled if no tool
is provided.
---
 .../TrkGlobalChi2Fitter/GlobalChi2Fitter.h                | 2 +-
 .../TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx          | 8 +++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h
index 0ad04e70aab5..eb0d98f5298d 100755
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h
@@ -882,7 +882,7 @@ namespace Trk {
     ToolHandle<Trk::ITrkMaterialProviderTool> m_caloMaterialProvider {this, "CaloMaterialProvider", "Trk::TrkMaterialProviderTool/TrkMaterialProviderTool", ""};
     ToolHandle<IMaterialEffectsOnTrackProvider> m_calotool {this, "MuidTool", "Rec::MuidMaterialEffectsOnTrackProvider/MuidMaterialEffectsOnTrackProvider", ""};
     ToolHandle<IMaterialEffectsOnTrackProvider> m_calotoolparam {this, "MuidToolParam", "", ""};
-    ToolHandle<IBoundaryCheckTool> m_boundaryCheckTool {this, "BoundaryCheckTool", "InDet::InDetBoundaryCheckTool", "Boundary checking tool for detector sensitivities" };
+    ToolHandle<IBoundaryCheckTool> m_boundaryCheckTool {this, "BoundaryCheckTool", "", "Boundary checking tool for detector sensitivities" };
 
     ServiceHandle<ITrackingGeometrySvc> m_trackingGeometrySvc;
 
diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
index 96c1d0421450..13d8f739e384 100644
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
@@ -183,7 +183,13 @@ namespace Trk {
     ATH_CHECK(m_navigator.retrieve());
     ATH_CHECK(m_residualPullCalculator.retrieve());
     ATH_CHECK(m_propagator.retrieve());
-    ATH_CHECK(m_boundaryCheckTool.retrieve());
+
+    if (!m_boundaryCheckTool.name().empty()) {
+      ATH_CHECK(m_boundaryCheckTool.retrieve());
+    } else if (m_holeSearch.value()) {
+      ATH_MSG_WARNING("Hole search requested but no boundary check tool provided, disabling hole search.");
+      m_holeSearch.set(false);
+    }
 
     if (m_calomat) {
       ATH_CHECK(m_calotool.retrieve());
-- 
GitLab


From 8337c653a43f30bdf6aeb690d260aefc6f6a814a Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Mon, 5 Oct 2020 12:23:02 +0000
Subject: [PATCH 189/403] Update RunTier0TestsTools.py

---
 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 75597784c7a5..c41bd90ad43d 100644
--- a/Tools/PROCTools/python/RunTier0TestsTools.py
+++ b/Tools/PROCTools/python/RunTier0TestsTools.py
@@ -28,7 +28,7 @@ ciRefFileMap = {
                 's3505-22.0'           : 'v7',
                 # OverlayTier0Test_required-test
                 'overlay-d1498-21.0'   : 'v2',
-                'overlay-d1498-22.0'   : 'v37',
+                'overlay-d1498-22.0'   : 'v38',
                 'overlay-bkg-21.0'     : 'v1',
                 'overlay-bkg-22.0'     : 'v4',
                }
-- 
GitLab


From 47d06d472fa1ca809020553c85bfd9c9259623f4 Mon Sep 17 00:00:00 2001
From: Susumu Oda <Susumu.Oda@cern.ch>
Date: Mon, 5 Oct 2020 21:33:02 +0900
Subject: [PATCH 190/403] Remove unnecessary ID detector managers from
 ActsGeometry package

---
 .../ActsGeometry/ActsAlignmentCondAlg.h             | 13 +------------
 .../ActsGeometry/ActsGeometry/GeomShiftCondAlg.h    | 12 +-----------
 Tracking/Acts/ActsGeometry/CMakeLists.txt           |  4 ----
 .../Acts/ActsGeometry/src/ActsAlignmentCondAlg.cxx  |  9 +--------
 Tracking/Acts/ActsGeometry/src/GeomShiftCondAlg.cxx |  5 +----
 5 files changed, 4 insertions(+), 39 deletions(-)

diff --git a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsAlignmentCondAlg.h b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsAlignmentCondAlg.h
index 47475f6c4bb8..7d7ead55d610 100644
--- a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsAlignmentCondAlg.h
+++ b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsAlignmentCondAlg.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 ACTSGEOMETRY_ACTSALIGNMENTCONDALG_H
@@ -16,13 +16,6 @@
 // STL
 #include <string>
 
-namespace InDetDD {
-class InDetDetectorManager;
-class PixelDetectorManager;
-class SCT_DetectorManager;
-class TRT_DetectorManager;
-} // namespace InDetDD
-
 class EventInfo;
 class ICondSvc;
 class StoreGateSvc;
@@ -57,10 +50,6 @@ private:
 
   ServiceHandle<ICondSvc> m_cs;
   ServiceHandle<IActsTrackingGeometrySvc> m_trackingGeometrySvc;
-
-  const InDetDD::PixelDetectorManager *p_pixelManager;
-  const InDetDD::SCT_DetectorManager *p_SCTManager;
-  const InDetDD::TRT_DetectorManager *p_TRTManager;
 };
 
 #endif
diff --git a/Tracking/Acts/ActsGeometry/ActsGeometry/GeomShiftCondAlg.h b/Tracking/Acts/ActsGeometry/ActsGeometry/GeomShiftCondAlg.h
index 6802600ea2b4..ab48e3c30b0b 100644
--- a/Tracking/Acts/ActsGeometry/ActsGeometry/GeomShiftCondAlg.h
+++ b/Tracking/Acts/ActsGeometry/ActsGeometry/GeomShiftCondAlg.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
 */
 
 #pragma once
@@ -15,12 +15,6 @@
 // STL
 #include <string>
 
-namespace InDetDD {
-  class PixelDetectorManager;
-  class SCT_DetectorManager;
-  class TRT_DetectorManager;
-}
-
 class EventInfo;
 class ICondSvc;
 class IActsTrackingGeometrySvc;
@@ -53,10 +47,6 @@ private:
   ServiceHandle<ICondSvc> m_cs;
   ServiceHandle<IActsTrackingGeometrySvc> m_trackingGeometrySvc;
 
-  const InDetDD::PixelDetectorManager* p_pixelManager;
-  const InDetDD::SCT_DetectorManager* p_SCTManager;
-  const InDetDD::TRT_DetectorManager* p_TRTManager;
-
   std::vector<const GeoAlignableTransform*> m_topAligns;
 
 };
diff --git a/Tracking/Acts/ActsGeometry/CMakeLists.txt b/Tracking/Acts/ActsGeometry/CMakeLists.txt
index 9f516690bfe7..9d9c8e3a817f 100755
--- a/Tracking/Acts/ActsGeometry/CMakeLists.txt
+++ b/Tracking/Acts/ActsGeometry/CMakeLists.txt
@@ -9,8 +9,6 @@ atlas_depends_on_subdirs( PUBLIC
                           DetectorDescription/Identifier
                           InnerDetector/InDetDetDescr/InDetIdentifier
                           InnerDetector/InDetDetDescr/InDetReadoutGeometry
-                          InnerDetector/InDetDetDescr/PixelReadoutGeometry
-                          InnerDetector/InDetDetDescr/SCT_ReadoutGeometry
                           InnerDetector/InDetDetDescr/TRT_ReadoutGeometry
                           Control/AthenaBaseComps
                           AthenaKernel
@@ -50,8 +48,6 @@ atlas_add_library( ActsGeometryLib
                    ActsCore
                    ActsJsonPlugin
                    TrkGeometry
-                   PixelReadoutGeometry
-                   SCT_ReadoutGeometry
                    TRT_ReadoutGeometry
                    MagFieldElements MagFieldConditions)
 
diff --git a/Tracking/Acts/ActsGeometry/src/ActsAlignmentCondAlg.cxx b/Tracking/Acts/ActsGeometry/src/ActsAlignmentCondAlg.cxx
index 59ded683bf4b..97bbf4df466a 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsAlignmentCondAlg.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsAlignmentCondAlg.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 "ActsGeometry/ActsAlignmentCondAlg.h"
@@ -11,9 +11,6 @@
 #include "GaudiKernel/EventIDRange.h"
 #include "GaudiKernel/ICondSvc.h"
 #include "GeoModelKernel/GeoAlignableTransform.h"
-#include "PixelReadoutGeometry/PixelDetectorManager.h"
-#include "SCT_ReadoutGeometry/SCT_DetectorManager.h"
-#include "TRT_ReadoutGeometry/TRT_DetectorManager.h"
 #include "StoreGate/StoreGateSvc.h"
 #include "StoreGate/WriteCondHandle.h"
 
@@ -50,10 +47,6 @@ StatusCode ActsAlignmentCondAlg::initialize() {
     return StatusCode::FAILURE;
   }
 
-  ATH_CHECK(detStore()->retrieve(p_pixelManager, "Pixel"));
-  ATH_CHECK(detStore()->retrieve(p_SCTManager, "SCT"));
-  ATH_CHECK(detStore()->retrieve(p_TRTManager, "TRT"));
-
   if (m_wchk.initialize().isFailure()) {
     ATH_MSG_ERROR("unable to initialize WriteCondHandle with key"
                   << m_wchk.key());
diff --git a/Tracking/Acts/ActsGeometry/src/GeomShiftCondAlg.cxx b/Tracking/Acts/ActsGeometry/src/GeomShiftCondAlg.cxx
index 6572e23b1715..0e40a3448726 100644
--- a/Tracking/Acts/ActsGeometry/src/GeomShiftCondAlg.cxx
+++ b/Tracking/Acts/ActsGeometry/src/GeomShiftCondAlg.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 "ActsGeometry/GeomShiftCondAlg.h"
@@ -11,9 +11,6 @@
 #include "EventInfo/EventInfo.h"
 #include "EventInfo/EventID.h"
 #include "GeoModelKernel/GeoAlignableTransform.h"
-#include "PixelReadoutGeometry/PixelDetectorManager.h"
-#include "SCT_ReadoutGeometry/SCT_DetectorManager.h"
-#include "TRT_ReadoutGeometry/TRT_DetectorManager.h"
 #include "GeoPrimitives/CLHEPtoEigenConverter.h"
 #include "InDetReadoutGeometry/ExtendedAlignableTransform.h"
 #include "GaudiKernel/ICondSvc.h"
-- 
GitLab


From 08be5d08c44acac8b3877a49252e220c59fbf20b Mon Sep 17 00:00:00 2001
From: Mohsen Rezaei Estabragh <mohsen.rezaei.estabragh@cern.ch>
Date: Mon, 5 Oct 2020 12:57:26 +0000
Subject: [PATCH 191/403] removing extra lines

---
 Tools/PyJobTransforms/python/trfExe.py | 2 --
 1 file changed, 2 deletions(-)

diff --git a/Tools/PyJobTransforms/python/trfExe.py b/Tools/PyJobTransforms/python/trfExe.py
index 4f4c9701c963..7b0f9d9fadb9 100755
--- a/Tools/PyJobTransforms/python/trfExe.py
+++ b/Tools/PyJobTransforms/python/trfExe.py
@@ -1236,7 +1236,6 @@ class athenaExecutor(scriptExecutor):
         self._valStop = os.times()
         msg.debug('valStop time is {0}'.format(self._valStop))
 
-
     ## @brief Prepare the correct command line to be used to invoke athena
     def _prepAthenaCommandLine(self):
         ## Start building up the command line
@@ -1818,7 +1817,6 @@ class DQMergeExecutor(scriptExecutor):
         msg.debug('valStop time is {0}'.format(self._valStop))
 
 
-
 ## @brief Specialist execution class for merging NTUPLE files
 class NTUPMergeExecutor(scriptExecutor):
 
-- 
GitLab


From e655ce04928925738dff96a345cb44907b1b9d62 Mon Sep 17 00:00:00 2001
From: fernando <Fernando.Monticelli@cern.ch>
Date: Mon, 5 Oct 2020 15:09:02 +0200
Subject: [PATCH 192/403] adding other tracking isolated chains

---
 .../TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py           | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
index 189c2fb1f085..1de3bddb6213 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
@@ -119,6 +119,8 @@ def setupMenu():
         ChainProp(name='HLT_e17_lhvloose_nod0_L1EM15VH',  groups=SingleElectronGroup),
         ChainProp(name='HLT_e26_lhtight_L1EM22VHI', groups=SingleElectronGroup),
         ChainProp(name='HLT_e26_lhtight_ivarloose_L1EM22VHI', groups=SingleElectronGroup),
+        ChainProp(name='HLT_e26_lhtight_ivarmedium_L1EM22VHI', groups=SingleElectronGroup),
+        ChainProp(name='HLT_e26_lhtight_ivartight_L1EM22VHI', groups=SingleElectronGroup),
         ChainProp(name='HLT_e26_lhtight_nod0_L1EM22VHI', groups=SingleElectronGroup),
         ChainProp(name='HLT_e26_lhtight_nod0_L1EM24VHI', groups=SingleElectronGroup),
         ChainProp(name='HLT_e60_lhmedium_L1EM22VHI', groups=SingleElectronGroup),
-- 
GitLab


From 48fc45243085dd8bbec6412557c2fa3e6e6fc879 Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Mon, 5 Oct 2020 15:15:49 +0200
Subject: [PATCH 193/403] Add comment to SCT_FlaggedCondData.

---
 .../InDetConditions/SCT_ConditionsData/doc/packagedoc.h         | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/doc/packagedoc.h b/InnerDetector/InDetConditions/SCT_ConditionsData/doc/packagedoc.h
index f1a0fa25858c..41450913d694 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/doc/packagedoc.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/doc/packagedoc.h
@@ -47,7 +47,7 @@ This package provides data classes used to access data in the conditions
   - SCT_DCSStatCondData
 
 @subsection Class for SCT_FlaggedConditionTool
-  - SCT_FlaggedCondData
+  - SCT_FlaggedCondData: Obsolete. SCT_FlaggedConditionTool uses IDCInDetBSErrContainer now.
 
 @subsection Class for SCT_MajorityConditionsTool, SCT_MajorityCondAlg
   - SCT_MajorityCondData
-- 
GitLab


From 06d01e21cee0cf1cd9997cb91af03efed816140e Mon Sep 17 00:00:00 2001
From: Christian Gutschow <chris.g@cern.ch>
Date: Mon, 5 Oct 2020 14:19:28 +0100
Subject: [PATCH 194/403] make Rivet_i compatible with Rrivet/YODA 3.1.2/1.8.3

---
 Generators/Rivet_i/examples/convert2root      |  30 ++++
 Generators/Rivet_i/examples/grid_jO.py        |  19 +++
 .../jobOptions.rivet-readevgenfile.py         |  27 ----
 .../Rivet_i/examples/jobOptions.rivet.py      |  31 ----
 Generators/Rivet_i/examples/local_jO.py       |  20 +++
 Generators/Rivet_i/src/Rivet_i.cxx            | 152 ++++++++++--------
 Generators/Rivet_i/src/Rivet_i.h              |  11 +-
 7 files changed, 159 insertions(+), 131 deletions(-)
 create mode 100755 Generators/Rivet_i/examples/convert2root
 create mode 100644 Generators/Rivet_i/examples/grid_jO.py
 delete mode 100644 Generators/Rivet_i/examples/jobOptions.rivet-readevgenfile.py
 delete mode 100644 Generators/Rivet_i/examples/jobOptions.rivet.py
 create mode 100644 Generators/Rivet_i/examples/local_jO.py

diff --git a/Generators/Rivet_i/examples/convert2root b/Generators/Rivet_i/examples/convert2root
new file mode 100755
index 000000000000..d5ef4ca467ec
--- /dev/null
+++ b/Generators/Rivet_i/examples/convert2root
@@ -0,0 +1,30 @@
+#! /usr/bin/env python
+
+from array import array
+import ROOT as rt
+import yoda, sys
+
+fName = str(sys.argv[1])
+yodaAOs = yoda.read(fName)
+rtFile = rt.TFile(fName[:fName.find('.yoda')] + '.root', 'recreate')
+for name in yodaAOs:
+  yodaAO = yodaAOs[name];  rtAO = None
+  if 'Histo1D' in str(yodaAO):
+    rtAO = rt.TH1D(name, '', yodaAO.numBins(), array('d', yodaAO.xEdges()))
+    rtAO.Sumw2(); rtErrs = rtAO.GetSumw2()
+    for i in range(rtAO.GetNbinsX()):
+      rtAO.SetBinContent(i + 1, yodaAO.bin(i).sumW())
+      rtErrs.AddAt(yodaAO.bin(i).sumW2(), i+1)
+  elif 'Scatter2D' in str(yodaAO):
+    rtAO = rt.TGraphAsymmErrors(yodaAO.numPoints())
+    for i in range(yodaAO.numPoints()):
+      x = yodaAO.point(i).x(); y = yodaAO.point(i).y()
+      xLo, xHi = yodaAO.point(i).xErrs()
+      yLo, yHi = yodaAO.point(i).yErrs()
+      rtAO.SetPoint(i, x, y)
+      rtAO.SetPointError(i, xLo, xHi, yLo, yHi)
+  else:
+    continue
+  rtAO.Write(name)
+rtFile.Close()
+
diff --git a/Generators/Rivet_i/examples/grid_jO.py b/Generators/Rivet_i/examples/grid_jO.py
new file mode 100644
index 000000000000..43132985b0f3
--- /dev/null
+++ b/Generators/Rivet_i/examples/grid_jO.py
@@ -0,0 +1,19 @@
+theApp.EvtMax = -1
+
+import AthenaPoolCnvSvc.ReadAthenaPool
+
+from AthenaCommon.AlgSequence import AlgSequence
+job = AlgSequence()
+
+from Rivet_i.Rivet_iConf import Rivet_i
+rivet = Rivet_i()
+import os
+rivet.AnalysisPath = os.environ['PWD']
+
+rivet.Analyses += [ 'MC_JETS' ]
+rivet.RunName = ''
+rivet.HistoFile = 'MyOutput.yoda.gz'
+rivet.CrossSection = 1.0
+#rivet.IgnoreBeamCheck = True
+job += rivet
+
diff --git a/Generators/Rivet_i/examples/jobOptions.rivet-readevgenfile.py b/Generators/Rivet_i/examples/jobOptions.rivet-readevgenfile.py
deleted file mode 100644
index 096697599657..000000000000
--- a/Generators/Rivet_i/examples/jobOptions.rivet-readevgenfile.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-## Example job option script to run Rivet inside Athena
-## using events read in from an EVGEN POOL/ROOT file.
-##
-## Author: James Monk <jmonk@hep.ucl.ac.uk>
-## Author: Andy Buckley <andy.buckley@cern.ch>
-
-include("GeneratorUtils/StdAnalysisSetup.py")
-theApp.EvtMax = 1000
-
-## Specify input evgen files
-import glob, AthenaPoolCnvSvc.ReadAthenaPool
-svcMgr.EventSelector.InputCollections = ["/afs/cern.ch/atlas/offline/ProdData/16.6.X/16.6.7.6/minbias-pythia8-7000.evgen.pool.root"]
-
-## Now set up Rivet
-from Rivet_i.Rivet_iConf import Rivet_i
-topAlg += Rivet_i("Rivet")
-topAlg.Rivet.Analyses = ["EXAMPLE", "MC_GENERIC"]
-topAlg.Rivet.Analyses += ["ATLAS_2012_I1082936"]
-
-## Configure ROOT file output
-from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-from GaudiSvc.GaudiSvcConf import THistSvc
-svcMgr += THistSvc()
-svcMgr.THistSvc.Output = ["Rivet DATAFILE='Rivet.root' OPT='RECREATE'"]
-#svcMgr.MessageSvc.OutputLevel = ERROR
diff --git a/Generators/Rivet_i/examples/jobOptions.rivet.py b/Generators/Rivet_i/examples/jobOptions.rivet.py
deleted file mode 100644
index f00d807b4df1..000000000000
--- a/Generators/Rivet_i/examples/jobOptions.rivet.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-## Example job option script to run an event generator
-## and Rivet inside Athena
-##
-## Author: James Monk <jmonk@hep.ucl.ac.uk>
-## Author: Andy Buckley <andy.buckley@cern.ch>
-
-include("GeneratorUtils/StdEvgenSetup.py")
-theApp.EvtMax = 1000
-
-## Configure and add an event generator to the alg seq
-from Pythia8_i.Pythia8_iConf import Pythia8_i
-topAlg += Pythia8_i("Pythia8")
-topAlg.Pythia8.CollisionEnergy = 7000.0
-topAlg.Pythia8.Commands += ['HardQCD:all = on', 'PhaseSpace:pTHatMin = 30.0']
-
-## Now set up Rivet
-from Rivet_i.Rivet_iConf import Rivet_i
-topAlg += Rivet_i("Rivet")
-topAlg.Rivet.Analyses = ["MC_GENERIC"]
-#topAlg.Rivet.Analyses += ["ATLAS_2012_I1082936"]
-#topAlg.Rivet.DoRootHistos = False
-#topAlg.Rivet.OutputLevel = DEBUG
-
-## Configure ROOT file output
-from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-from GaudiSvc.GaudiSvcConf import THistSvc
-svcMgr += THistSvc()
-svcMgr.THistSvc.Output = ["Rivet DATAFILE='Rivet.root' OPT='RECREATE'"]
-#svcMgr.MessageSvc.OutputLevel = ERROR
diff --git a/Generators/Rivet_i/examples/local_jO.py b/Generators/Rivet_i/examples/local_jO.py
new file mode 100644
index 000000000000..01c4089f2add
--- /dev/null
+++ b/Generators/Rivet_i/examples/local_jO.py
@@ -0,0 +1,20 @@
+theApp.EvtMax = -1
+
+import AthenaPoolCnvSvc.ReadAthenaPool
+svcMgr.EventSelector.InputCollections = [ 'EVNT.root' ]
+
+from AthenaCommon.AlgSequence import AlgSequence
+job = AlgSequence()
+
+from Rivet_i.Rivet_iConf import Rivet_i
+rivet = Rivet_i()
+import os
+rivet.AnalysisPath = os.environ['PWD']
+
+rivet.Analyses += [ 'MC_JETS' ]
+rivet.RunName = ''
+rivet.HistoFile = 'MyOutput.yoda.gz'
+rivet.CrossSection = 1.0
+#rivet.IgnoreBeamCheck = True
+job += rivet
+
diff --git a/Generators/Rivet_i/src/Rivet_i.cxx b/Generators/Rivet_i/src/Rivet_i.cxx
index a9399d0b62c7..e5f1d048a7d8 100644
--- a/Generators/Rivet_i/src/Rivet_i.cxx
+++ b/Generators/Rivet_i/src/Rivet_i.cxx
@@ -10,7 +10,6 @@
 #include "AtlasHepMC/GenEvent.h"
 
 #include "GeneratorObjects/McEventCollection.h"
-#include "GenInterfaces/IHepMCWeightSvc.h"
 #include "AthenaKernel/errorcheck.h"
 #include "PathResolver/PathResolver.h"
 
@@ -36,15 +35,14 @@
 
 Rivet_i::Rivet_i(const std::string& name, ISvcLocator* pSvcLocator) :
   AthAlgorithm(name, pSvcLocator),
-  m_hepMCWeightSvc("HepMCWeightSvc", name),
   m_analysisHandler(0),
   m_init(false)
 {
   // Options
   declareProperty("McEventKey", m_genEventKey="GEN_EVENT");
   declareProperty("Analyses", m_analysisNames);
-  declareProperty("CrossSection", m_crossSection=-1.0);
-  declareProperty("CrossSectionUncertainty", m_crossSection_uncert=-1.0);
+  declareProperty("CrossSection", m_crossSection=0.0);
+  declareProperty("CrossSectionUncertainty", m_crossSection_uncert=0.0);
   declareProperty("Stream", m_stream="/Rivet");
   declareProperty("RunName", m_runname="");
   declareProperty("HistoFile", m_file="Rivet.yoda");
@@ -53,8 +51,8 @@ Rivet_i::Rivet_i(const std::string& name, ISvcLocator* pSvcLocator) :
   declareProperty("IgnoreBeamCheck", m_ignorebeams=false);
   declareProperty("DoRootHistos", m_doRootHistos=false);
   declareProperty("SkipWeights", m_skipweights=false);
-  //declareProperty("MatchWeights", m_matchWeights="");
-  //declareProperty("UnmatchWeights", m_unmatchWeights="");
+  declareProperty("MatchWeights", m_matchWeights="");
+  declareProperty("UnmatchWeights", m_unmatchWeights="");
   declareProperty("WeightCap", m_weightcap=-1.0);
 }
 
@@ -123,7 +121,7 @@ StatusCode Rivet_i::initialize() {
   m_analysisHandler = new Rivet::AnalysisHandler(m_runname);
   assert(m_analysisHandler);
   m_analysisHandler->setIgnoreBeams(m_ignorebeams); //< Whether to do beam ID/energy consistency checks
-  m_analysisHandler->skipMultiWeights(m_skipweights); //< Whether to skip weights or not
+  m_analysisHandler->skipMultiWeights(m_skipweights); //< Only run on the nominal weight
   //m_analysisHandler->selectMultiWeights(m_matchWeights); //< Only run on a subset of the multi-weights
   //m_analysisHandler->deselectMultiWeights(m_unmatchWeights); //< Veto a subset of the multi-weights
   if (m_weightcap>0) m_analysisHandler->setWeightCap(m_weightcap);
@@ -208,11 +206,11 @@ StatusCode Rivet_i::execute() {
 StatusCode Rivet_i::finalize() {
   ATH_MSG_INFO("Rivet_i finalizing");
 
-  // Set xsec in Rivet
-  // Set xsec in Rivet
-  double custom_xs = m_crossSection > 0 ? m_crossSection : 1.0;
-  double custom_xserr = m_crossSection_uncert > 0 ? m_crossSection_uncert : 0.0;
-  m_analysisHandler->setCrossSection({custom_xs, custom_xserr});
+  // Setting cross-section in Rivet
+  // If no user-specified cross-section available,
+  // set AMI cross-section at plotting time 
+  double custom_xs = m_crossSection != 0 ? m_crossSection : 1.0;
+  m_analysisHandler->setCrossSection({custom_xs, m_crossSection_uncert});
 
   // Call Rivet finalize
   m_analysisHandler->finalize();
@@ -256,45 +254,36 @@ const HepMC::GenEvent* Rivet_i::checkEvent(const HepMC::GenEvent* event) {
 
   // weight-name cleaning
 #ifdef HEPMC3
-  std::vector<std::string>  w_names = event->weight_names();
-  std::vector<std::pair<std::string,std::string> > w_subs = {
-    {" nominal ",""},
-    {" set = ","_"},
-    {" = ","_"},
-    {"=",""},
-    {",",""},
-    {".",""},
-    {":",""},
-    {" ","_"},
-    {"#","num"},
-    {"\n","_"},
-    {"/","over"}
-  };
-  for (std::string& wname : w_names) {
-    for (const auto& sub : w_subs) {
-      size_t start_pos = wname.find(sub.first);
-      while (start_pos != std::string::npos) {
-        wname.replace(start_pos, sub.first.length(), sub.second);
-        start_pos = wname.find(sub.first);
+  std::vector<std::string>  w_wnames = event->weight_names();
+  if (w_names.size()) {
+    std::vector<std::pair<std::string,std::string> > w_subs = {
+      {" nominal ",""},
+      {" set = ","_"},
+      {" = ","_"},
+      {"=",""},
+      {",",""},
+      {".",""},
+      {":",""},
+      {" ","_"},
+      {"#","num"},
+      {"\n","_"},
+      {"/","over"}
+    };
+    for (std::string& wname : w_names) {
+      for (const auto& sub : w_subs) {
+        size_t start_pos = wname.find(sub.first);
+        while (start_pos != std::string::npos) {
+          wname.replace(start_pos, sub.first.length(), sub.second);
+          start_pos = wname.find(sub.first);
+        }
       }
     }
+    modEvent->run_info()->set_weight_names(w_names);
   }
-  modEvent->run_info()->set_weight_names(w_names);
 #else
   const HepMC::WeightContainer& old_wc = event->weights();
-  std::ostringstream stream;
-  old_wc.print(stream);
-  std::string str =  stream.str();
-  // if it only has one element, 
-  // then it doesn't use named weights
-  // --> no need for weight-name cleaning
-  if (str.size() > 1) {
-    std::vector<std::string> orig_order(m_hepMCWeightSvc->weightNames().size());
-    for (const auto& item : m_hepMCWeightSvc->weightNames()) {
-      orig_order[item.second] = item.first;
-    }
-    std::map<std::string, double> new_name_to_value;
-    std::map<std::string, std::string> old_name_to_new_name;
+  std::vector<std::string> old_wnames = old_wc.weight_names();
+  if (old_wnames.size()) {
     HepMC::WeightContainer& new_wc = modEvent->weights();
     new_wc.clear();
     std::vector<std::pair<std::string,std::string> > w_subs = {
@@ -311,33 +300,66 @@ const HepMC::GenEvent* Rivet_i::checkEvent(const HepMC::GenEvent* event) {
       {"/","over"}
     };
     std::regex re("(([^()]+))"); // Regex for stuff enclosed by parentheses ()
-    for (std::sregex_iterator i = std::sregex_iterator(str.begin(), str.end(), re);
-         i != std::sregex_iterator(); ++i ) {
-      std::smatch m = *i;
-      std::vector<std::string> temp = ::split(m.str(), "[,]");
-      if (temp.size() == 2 || temp.size() == 3) {
-        std::string wname = temp[0];
-        if (temp.size() == 3)  wname += "," + temp[1];
-        std::string old_name = std::string(wname);
-        double value = old_wc[wname];
-        for (const auto& sub : w_subs) {
-          size_t start_pos = wname.find(sub.first);
-          while (start_pos != std::string::npos) {
-            wname.replace(start_pos, sub.first.length(), sub.second);
-            start_pos = wname.find(sub.first);
-          }
+    // TEMP from Rivet dev branch
+    std::vector<std::std::regex> select_patterns, deselect_patterns;
+    if (m_matchWeights != "") {
+      // Compile regex from each string in the comma-separated list
+      for (const std::string& pattern : split(m_matchWeights, ",")) {
+        select_patterns.push_back( std::regex(pattern) );
+      }
+    }
+    if (m_unmatchWeights != "") {
+      // Compile regex from each string in the comma-separated list
+      for (const std::string& pattern : split(m_unmatchWeights, ",")) {
+        deselect_patterns.push_back( std::regex(pattern) );
+      }
+    }
+    // END OF TEMP
+
+    std::map<std::string, double> new_name_to_value;
+    std::map<std::string, std::string> old_name_to_new_name;
+    for (const std::string& old_name : old_wnames) {
+      std::string wname = std::string(old_name);
+      double value = old_wc[old_name];
+      for (const auto& sub : w_subs) {
+        size_t start_pos = wname.find(sub.first);
+        while (start_pos != std::string::npos) {
+          wname.replace(start_pos, sub.first.length(), sub.second);
+          start_pos = wname.find(sub.first);
+        }
+      }
+      // Pulling some logic from the Rivet development branch
+      // until we have a release with this patch:
+
+      // Check if weight name matches a supplied string/regex and filter to select those only
+      bool match = select_patterns.empty();
+      for (const std::regex& re : select_patterns) {
+        if ( std::regex_match(wname, re) ) {
+          match = true;
+          break;
         }
-        new_name_to_value[wname] = value;
-        old_name_to_new_name[old_name] = wname;
       }
+      // Check if the remaining weight names match supplied string/regexes and *de*select accordingly
+      bool unmatch = false;
+      for (const std::regex& re : deselect_patterns) {
+        if ( std::regex_match(wname, re) ) { unmatch = true; break; }
+      }
+      if (!match || unmatch) continue;
+
+      // end of borrowing logic from the Rivet development branch
+      new_name_to_value[wname] = value;
+      old_name_to_new_name[old_name] = wname;
     }
-    for (const std::string& old_name : orig_order) {
-      const std::string& new_name = old_name_to_new_name[old_name];
+    auto itEnd = old_name_to_new_name.end();
+    for (const string& old_name : old_wnames) {
+      if (old_name_to_new_name.find(old_name) == itEnd)  continue;
+      const string& new_name = old_name_to_new_name[old_name];
       new_wc[ new_name ] = new_name_to_value[new_name];
     }
     // end of weight-name cleaning
   }
 #endif
+
 #ifdef HEPMC3
   if (
   false//!modEvent->valid_beam_particles()//FIXME!
diff --git a/Generators/Rivet_i/src/Rivet_i.h b/Generators/Rivet_i/src/Rivet_i.h
index dd236df9e71a..25d97878cffc 100644
--- a/Generators/Rivet_i/src/Rivet_i.h
+++ b/Generators/Rivet_i/src/Rivet_i.h
@@ -6,22 +6,20 @@
 #define RIVET_I_H
 
 #include "AthenaBaseComps/AthAlgorithm.h"
-#include "GaudiKernel/ServiceHandle.h"
 
 #include "Rivet/AnalysisHandler.hh"
-#include "AtlasHepMC/GenEvent.h"
 
 #include <vector>
 #include <string>
 
 class ISvcLocator;
-class IHepMCWeightSvc;
 //class ITHistSvc;
 
 
 /// Interface to the Rivet analysis package
 /// @author James Monk <jmonk@cern.ch>
 /// @author Andy Buckley <andy.buckley@cern.ch>
+/// @author Christian Gutschow <chris.g@cern.ch>
 class Rivet_i : public AthAlgorithm {
 public:
 
@@ -56,9 +54,6 @@ private:
   /// A pointer to the THistSvc
   //ServiceHandle<ITHistSvc> m_histSvc;
 
-  /// A pointer to the HepMCWeightSvc
-  ServiceHandle<IHepMCWeightSvc> m_hepMCWeightSvc;
-
   /// The stream name for storing the output plots under (default "/Rivet")
   std::string m_stream;
 
@@ -111,10 +106,10 @@ private:
   bool m_skipweights;
 
   /// String of weight names (or regex) to select multiweights
-  //std::string m_matchWeights;
+  std::string m_matchWeights;
 
   /// String of weight names (or regex) to veto multiweights
-  //std::string m_unmatchWeights;
+  std::string m_unmatchWeights;
 
   ///Weight cap to set allowed maximum for weights 
   double m_weightcap;
-- 
GitLab


From 76e443be68e89dca90e4c3bf322d23a08cda4602 Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Mon, 5 Oct 2020 15:33:27 +0200
Subject: [PATCH 195/403] Update documentation of InDetRawData package
 (ATLASRECTS-5238)

---
 .../InDetRawData/doc/packagedoc.h              | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/InnerDetector/InDetRawEvent/InDetRawData/doc/packagedoc.h b/InnerDetector/InDetRawEvent/InDetRawData/doc/packagedoc.h
index 3dc252d5777f..59b79b82a4a1 100644
--- a/InnerDetector/InDetRawEvent/InDetRawData/doc/packagedoc.h
+++ b/InnerDetector/InDetRawEvent/InDetRawData/doc/packagedoc.h
@@ -1,17 +1,17 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
 @page InDetRawData_page InDetRawData Package
-@author David Candlin, Veronique Boisvert, Maria.Jose.Costa@cern.ch
+@author David Candlin, Veronique Boisvert, Maria.Jose.Costa@cern.ch, Susumu.Oda@cern.ch
 
 @section InDetRawData_InDetRawDataIntro Introduction
 
 This package is meant to contain the classes defining the Inner Detector
 RawDataObjects, their collections and containers. There are different
-classes for DC1/DC2 and combined test beam RawDataObjects (all of them
-deriving from the same base class).
+classes for LHC, DC1/DC2 and combined test beam RawDataObjects (all of them
+deriving from the same base class, InDetRawData).
 
 @section InDetRawData_InDetRawDataOverview Class Overview
   The InDetRawData package contains the following classes:
@@ -24,19 +24,23 @@ deriving from the same base class).
    - InDetRawDataContainer: Container for Raw Data Objects collections for 
    Pixel, SCT and TRT
 
-   - PixelRDORawData: Class to implement RawData for Pixel
+   - PixelRDORawData: Abstract class to implement RawData for Pixel
 
    - Pixel1RawData: Class to implement DC1/DC2 RawData for Pixel
    
    - PixelTB04RawData: Class to implement test beam 2004 RawData for Pixel
 
-   - SCT_RDORawData: Class to implement RawData for SCT
+   - SCT_RDORawData: Abstract class to implement RawData for SCT
 
    - SCT1_RawData: Class to implement DC1/DC2 RawData for SCT
    
+   - SCT3_RawData: Class to implement LHC (Run 1, Run 2, Run 3) RawData for SCT
+
+   - SCT_TB03_RawData: Class to implement test beam 2003 RawData for SCT
+
    - SCT_TB04_RawData: Class to implement test beam 2004 RawData for SCT
 
-   - TRT_RDORawData: Class to implement RawData for TRT
+   - TRT_RDORawData: Abstract class to implement RawData for TRT
 
    - TRT_LoLumRawData: Class to implement DC1/DC2 RawData for TRT
 
-- 
GitLab


From 839efa10ac789ecc975d2f95ca2fc896850121b9 Mon Sep 17 00:00:00 2001
From: Maximilian Goblirsch-Kolb <goblirsc@cern.ch>
Date: Mon, 5 Oct 2020 15:34:59 +0200
Subject: [PATCH 196/403] indentation is fun

---
 .../PROCTools/data/master_q221_AOD_digest.ref | 52 +++++++++----------
 1 file changed, 26 insertions(+), 26 deletions(-)

diff --git a/Tools/PROCTools/data/master_q221_AOD_digest.ref b/Tools/PROCTools/data/master_q221_AOD_digest.ref
index 6a9be0435125..a587886ed598 100644
--- a/Tools/PROCTools/data/master_q221_AOD_digest.ref
+++ b/Tools/PROCTools/data/master_q221_AOD_digest.ref
@@ -1,26 +1,26 @@
-run       event       nTopo   nIdTracks       nJets      nMuons       nElec   nTrueElec   nFakeElec       nPhot   nTruePhot   nFakePhot
-284500    87473001         122         128           4           1           8           2           6           7           4           3
-284500    87473014          83          80           6           1          10           1           9           7           5           2
-284500    87473022          38          29           4           0           4           1           3           3           2           1
-284500    87473032          30          33           4           1          10           4           6           5           2           3
-284500    87473037          62          39           7           0          12           2          10           6           4           2
-284500    87473040         107          97          10           0          17           1          16          10           5           5
-284500    87473051         140         112          11           1          16           1          15          23          16           7
-284500    87473063          62          76           5           2           7           1           6           6           4           2
-284500    87473068          25          34           1           1           0           0           0           0           0           0
-284500    87473075          60          85           6           0           5           0           5           6           5           1
-284500    87473084          78          85           7           2          14           1          13           9           3           6
-284500    87473091          41          49           3           0           4           2           2           4           2           2
-284500    87473096          66          75           3           2           3           0           3           4           3           1
-284500    87473104          64          63           6           0           5           1           4           4           3           1
-284500    87473114          89          79           7           2          12           1          11           9           6           3
-284500    87473121          93         100           6           3          15           3          12           7           6           1
-284500    87473132          84          57           9           1          12           0          12           3           3           0
-284500    87473137          94          70           8           3          15           0          15           8           8           0
-284500    87473144          78          67           7           1           8           2           6           8           6           2
-284500    87473154          86          89           7           0          14           3          11           9           4           5
-284500    87473162          53          52           4           0           7           0           7           3           2           1
-284500    87473167          77          54           6           3          14           2          12          13           8           5
-284500    87473171          77          69           8           4           4           2           2           5           4           1
-284500    87473184          75          86           5           2           8           1           7           5           3           2
-284500    87473192          55          52           4           1           8           4           4           4           3           1
+      run       event       nTopo   nIdTracks       nJets      nMuons       nElec   nTrueElec   nFakeElec       nPhot   nTruePhot   nFakePhot
+      284500    87473001         122         128           4           1           8           2           6           7           4           3
+      284500    87473014          83          80           6           1          10           1           9           7           5           2
+      284500    87473022          38          29           4           0           4           1           3           3           2           1
+      284500    87473032          30          33           4           1          10           4           6           5           2           3
+      284500    87473037          62          39           7           0          12           2          10           6           4           2
+      284500    87473040         107          97          10           0          17           1          16          10           5           5
+      284500    87473051         140         112          11           1          16           1          15          23          16           7
+      284500    87473063          62          76           5           2           7           1           6           6           4           2
+      284500    87473068          25          34           1           1           0           0           0           0           0           0
+      284500    87473075          60          85           6           0           5           0           5           6           5           1
+      284500    87473084          78          85           7           2          14           1          13           9           3           6
+      284500    87473091          41          49           3           0           4           2           2           4           2           2
+      284500    87473096          66          75           3           2           3           0           3           4           3           1
+      284500    87473104          64          63           6           0           5           1           4           4           3           1
+      284500    87473114          89          79           7           2          12           1          11           9           6           3
+      284500    87473121          93         100           6           3          15           3          12           7           6           1
+      284500    87473132          84          57           9           1          12           0          12           3           3           0
+      284500    87473137          94          70           8           3          15           0          15           8           8           0
+      284500    87473144          78          67           7           1           8           2           6           8           6           2
+      284500    87473154          86          89           7           0          14           3          11           9           4           5
+      284500    87473162          53          52           4           0           7           0           7           3           2           1
+      284500    87473167          77          54           6           3          14           2          12          13           8           5
+      284500    87473171          77          69           8           4           4           2           2           5           4           1
+      284500    87473184          75          86           5           2           8           1           7           5           3           2
+      284500    87473192          55          52           4           1           8           4           4           4           3           1
-- 
GitLab


From 22defb5d53661bd531fd484f2479cd59193e685e Mon Sep 17 00:00:00 2001
From: Maximilian Goblirsch-Kolb <goblirsc@cern.ch>
Date: Mon, 5 Oct 2020 15:36:00 +0200
Subject: [PATCH 197/403] more whitespaces, since I don't have anything better
 to do

---
 Tools/PROCTools/data/master_q221_AOD_digest.ref | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Tools/PROCTools/data/master_q221_AOD_digest.ref b/Tools/PROCTools/data/master_q221_AOD_digest.ref
index a587886ed598..0a22186ef95f 100644
--- a/Tools/PROCTools/data/master_q221_AOD_digest.ref
+++ b/Tools/PROCTools/data/master_q221_AOD_digest.ref
@@ -1,4 +1,4 @@
-      run       event       nTopo   nIdTracks       nJets      nMuons       nElec   nTrueElec   nFakeElec       nPhot   nTruePhot   nFakePhot
+         run       event       nTopo   nIdTracks       nJets      nMuons       nElec   nTrueElec   nFakeElec       nPhot   nTruePhot   nFakePhot
       284500    87473001         122         128           4           1           8           2           6           7           4           3
       284500    87473014          83          80           6           1          10           1           9           7           5           2
       284500    87473022          38          29           4           0           4           1           3           3           2           1
-- 
GitLab


From dcadfd764485dc93615708946237fdbbf25a20a3 Mon Sep 17 00:00:00 2001
From: fernando <Fernando.Monticelli@cern.ch>
Date: Mon, 5 Oct 2020 15:42:43 +0200
Subject: [PATCH 198/403] updated refs

---
 .../TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref | 6 ++++++
 .../TriggerTest/share/ref_data_v1Dev_build.ref              | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
index 009533aecf69..8af7b6551ce9 100644
--- a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
@@ -235,6 +235,12 @@ TrigSignatureMoniMT                                 INFO -- #1995263521 Features
 TrigSignatureMoniMT                                 INFO HLT_e26_lhtight_ivarloose_L1EM22VHI #2918307206
 TrigSignatureMoniMT                                 INFO -- #2918307206 Events         6          6          5          5          5          3          -          -          -          -          -          -          -          -          -          3
 TrigSignatureMoniMT                                 INFO -- #2918307206 Features                             5          64         8          3          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_e26_lhtight_ivarmedium_L1EM22VHI #2653558903
+TrigSignatureMoniMT                                 INFO -- #2653558903 Events         6          6          5          5          5          3          -          -          -          -          -          -          -          -          -          3
+TrigSignatureMoniMT                                 INFO -- #2653558903 Features                             5          64         8          3          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_e26_lhtight_ivartight_L1EM22VHI #1679339192
+TrigSignatureMoniMT                                 INFO -- #1679339192 Events         6          6          5          5          5          3          -          -          -          -          -          -          -          -          -          3
+TrigSignatureMoniMT                                 INFO -- #1679339192 Features                             5          64         8          3          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e26_lhtight_nod0_L1EM22VHI #939763520
 TrigSignatureMoniMT                                 INFO -- #939763520 Events          6          6          5          5          5          4          -          -          -          -          -          -          -          -          -          4
 TrigSignatureMoniMT                                 INFO -- #939763520 Features                              5          64         8          4          -          -          -          -          -          -          -          -          -
diff --git a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
index e6bce93957dd..ef12cdb5d310 100644
--- a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
@@ -235,6 +235,12 @@ TrigSignatureMoniMT                                 INFO -- #1995263521 Features
 TrigSignatureMoniMT                                 INFO HLT_e26_lhtight_ivarloose_L1EM22VHI #2918307206
 TrigSignatureMoniMT                                 INFO -- #2918307206 Events         20         20         0          0          0          0          -          -          -          -          -          -          -          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #2918307206 Features                             0          0          0          0          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_e26_lhtight_ivarmedium_L1EM22VHI #2653558903
+TrigSignatureMoniMT                                 INFO -- #2653558903 Events         20         20         0          0          0          0          -          -          -          -          -          -          -          -          -          0          
+TrigSignatureMoniMT                                 INFO -- #2653558903 Features                             0          0          0          0          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_e26_lhtight_ivartight_L1EM22VHI #1679339192
+TrigSignatureMoniMT                                 INFO -- #1679339192 Events         20         20         0          0          0          0          -          -          -          -          -          -          -          -          -          0          
+TrigSignatureMoniMT                                 INFO -- #1679339192 Features                             0          0          0          0          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e26_lhtight_nod0_L1EM22VHI #939763520
 TrigSignatureMoniMT                                 INFO -- #939763520 Events          20         20         0          0          0          0          -          -          -          -          -          -          -          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #939763520 Features                              0          0          0          0          -          -          -          -          -          -          -          -          -          
-- 
GitLab


From 5374e396d7e3f0ee8ae4f6689073554f1ef61cfc Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Mon, 5 Oct 2020 16:04:15 +0200
Subject: [PATCH 199/403] Update documentation of SiSpacePoint package.

---
 .../InDetRecEvent/SiSpacePoint/doc/packagedoc.h | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/InnerDetector/InDetRecEvent/SiSpacePoint/doc/packagedoc.h b/InnerDetector/InDetRecEvent/SiSpacePoint/doc/packagedoc.h
index f5c76f3bfdf7..fef1a36bb4c7 100644
--- a/InnerDetector/InDetRecEvent/SiSpacePoint/doc/packagedoc.h
+++ b/InnerDetector/InDetRecEvent/SiSpacePoint/doc/packagedoc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -9,19 +9,16 @@
 @section SiSpacePoint_SiSpacePointIntro Introduction
 
 This package contains the definition and implementation for the
-classes SCT_SpacePoint and PixelSpacePoint. Both classes are derived from
-TrkSpacePoint. 
+InDet::PixelSpacePoint and InDet::SCT_SpacePoint classes. Both classes are derived from
+Trk::TrkSpacePoint.
 
 @section SiSpacePoint_SiSpacePoint Class Overview
   The SiSpacePoint package contains the following classes:
 
-   - PixelSpacePoint: The SpacePoints for the PixelDetector.
-     Most information is taken from PrepRawData, which is
-     given to the constructor. Local errors are set
-     (assumed constant for the time being) and global errors
-     are derived from them.  Local errors are
-     assumed constant for the time being. They are only initialized when
-     inquired and buffered after that.
+   - InDet::PixelSpacePoint: The SpacePoints for the PixelDetector.
+     Most information including local errors is taken from PrepRawData, which is
+     given to the constructor.
+     Global errors are derived from them local errors.
 
    - SCT_SpacePoint: The SpacePoints for the SCT. Most
      information is derived from the GlobalPosition, which
-- 
GitLab


From 1f7f13a79c23fe48110f4e786cce1eee42f5ebfd Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Mon, 5 Oct 2020 16:28:34 +0200
Subject: [PATCH 200/403] Calorimeter: cmake cleanup

Cleanup cmake configuration of Calorimeter packages:
- remove `atlas_depends_on_subdirs`
- update link dependencies
- remove unused externals
- remove installation of headers if they are not used outside the
  package
---
 Calorimeter/CaloBadChannelTool/CMakeLists.txt | 17 +---
 Calorimeter/CaloCalibHitRec/CMakeLists.txt    | 41 ++--------
 Calorimeter/CaloCellCorrection/CMakeLists.txt | 22 +----
 .../CaloClusterCorrection/CMakeLists.txt      | 44 ++--------
 .../CaloCnv/CaloCondAthenaPool/CMakeLists.txt | 16 +---
 Calorimeter/CaloCnv/CaloIdCnv/CMakeLists.txt  | 19 +----
 .../CaloCnv/CaloJiveXML/CMakeLists.txt        | 29 +------
 .../CaloSimEventAthenaPool/CMakeLists.txt     | 14 +---
 .../CaloCnv/CaloSimEventTPCnv/CMakeLists.txt  | 42 +++-------
 Calorimeter/CaloCnv/CaloTPCnv/CMakeLists.txt  | 51 ++----------
 .../CaloCnv/CaloTTDetDescrCnv/CMakeLists.txt  | 19 +----
 Calorimeter/CaloCondBlobAlgs/CMakeLists.txt   | 20 +----
 Calorimeter/CaloCondBlobObjs/CMakeLists.txt   | 22 +----
 Calorimeter/CaloCondPhysAlgs/CMakeLists.txt   | 42 ++--------
 Calorimeter/CaloConditions/CMakeLists.txt     | 28 ++-----
 Calorimeter/CaloDmDetDescr/CMakeLists.txt     | 15 +---
 Calorimeter/CaloEvent/CMakeLists.txt          | 31 +------
 .../CaloExample/CaloTests/CMakeLists.txt      | 33 +-------
 Calorimeter/CaloIdentifier/CMakeLists.txt     | 81 +++++--------------
 Calorimeter/CaloInterface/CMakeLists.txt      | 22 +----
 Calorimeter/CaloLocalHadCalib/CMakeLists.txt  | 35 +-------
 Calorimeter/CaloLumiConditions/CMakeLists.txt | 25 +-----
 Calorimeter/CaloRec/CMakeLists.txt            | 41 +---------
 Calorimeter/CaloSimEvent/CMakeLists.txt       | 24 +-----
 Calorimeter/CaloTTDetDescr/CMakeLists.txt     | 13 +--
 Calorimeter/CaloTools/CMakeLists.txt          | 52 +-----------
 Calorimeter/CaloTrackUtils/CMakeLists.txt     | 28 +------
 .../CaloTrackingGeometry/CMakeLists.txt       | 32 +-------
 Calorimeter/CaloTriggerTool/CMakeLists.txt    | 31 ++-----
 Calorimeter/CaloUtils/CMakeLists.txt          | 16 ++--
 30 files changed, 126 insertions(+), 779 deletions(-)

diff --git a/Calorimeter/CaloBadChannelTool/CMakeLists.txt b/Calorimeter/CaloBadChannelTool/CMakeLists.txt
index c39f645f516c..3e3f350e1a0e 100644
--- a/Calorimeter/CaloBadChannelTool/CMakeLists.txt
+++ b/Calorimeter/CaloBadChannelTool/CMakeLists.txt
@@ -1,28 +1,15 @@
-################################################################################
-# Package: CaloBadChannelTool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CaloBadChannelTool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloConditions
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaBaseComps
-                          LArCalorimeter/LArRecConditions
-                          GaudiKernel
-                          PRIVATE
-                          Control/StoreGate )
-
 # Component(s) in the package:
 atlas_add_component( CaloBadChannelTool
                      src/*.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES CaloConditions LArRecConditions CaloIdentifier AthenaBaseComps GaudiKernel StoreGateLib SGtests )
+                     LINK_LIBRARIES CaloConditions LArRecConditions CaloIdentifier AthenaBaseComps GaudiKernel StoreGateLib )
 
 # Install files from the package:
-atlas_install_headers( CaloBadChannelTool )
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 
 # Tests:
diff --git a/Calorimeter/CaloCalibHitRec/CMakeLists.txt b/Calorimeter/CaloCalibHitRec/CMakeLists.txt
index 3342db7af759..2b0ab6d53ff4 100644
--- a/Calorimeter/CaloCalibHitRec/CMakeLists.txt
+++ b/Calorimeter/CaloCalibHitRec/CMakeLists.txt
@@ -1,50 +1,23 @@
-################################################################################
-# Package: CaloCalibHitRec
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CaloCalibHitRec )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloDmDetDescr
-                          Calorimeter/CaloGeoHelpers
-                          Calorimeter/CaloIdentifier
-                          Calorimeter/CaloRec
-                          Calorimeter/CaloSimEvent
-                          Control/AthenaBaseComps
-                          Control/StoreGate
-                          DetectorDescription/Identifier
-                          Event/xAOD/xAODCaloEvent
-			  Event/xAOD/xAODTruth
-                          Control/CxxUtils
-                          GaudiKernel
-                          PRIVATE
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloEvent
-                          Control/AthenaKernel
-                          DetectorDescription/AtlasDetDescr
-                          LArCalorimeter/LArRecEvent
-                          PhysicsAnalysis/TruthParticleID/McParticleEvent
-                          TileCalorimeter/TileEvent
-                          Tools/PathResolver )
-
 # External dependencies:
 find_package( CLHEP )
 
 # Component(s) in the package:
 atlas_add_library( CaloCalibHitRecLib
-                     src/*.cxx
-		     PUBLIC_HEADERS CaloCalibHitRec
-                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CLHEP_LIBRARIES} CaloDmDetDescr CaloGeoHelpers CaloIdentifier CaloRecLib CaloSimEvent AthenaBaseComps StoreGateLib SGtests Identifier xAODCaloEvent xAODTruth GaudiKernel CaloDetDescrLib CaloEvent AthenaKernel AtlasDetDescr LArRecEvent McParticleEvent TileEvent PathResolver CxxUtils )
+                   src/*.cxx
+		           PUBLIC_HEADERS CaloCalibHitRec
+                   INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
+                   LINK_LIBRARIES AthenaBaseComps AthenaKernel CaloDmDetDescr CaloGeoHelpers CaloIdentifier CaloRecLib CaloSimEvent CxxUtils GaudiKernel Identifier StoreGateLib xAODCaloEvent xAODTruth
+                   PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasDetDescr CaloDetDescrLib CaloEvent CaloUtilsLib LArRecEvent McParticleEvent PathResolver TileEvent )
 
 # Component(s) in the package:
 atlas_add_component( CaloCalibHitRec
-                     src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CLHEP_LIBRARIES} CaloDmDetDescr CaloGeoHelpers CaloIdentifier CaloRecLib CaloSimEvent AthenaBaseComps StoreGateLib SGtests Identifier xAODCaloEvent xAODTruth GaudiKernel CaloDetDescrLib CaloEvent AthenaKernel AtlasDetDescr LArRecEvent McParticleEvent TileEvent PathResolver CxxUtils )
+                     LINK_LIBRARIES CaloCalibHitRecLib )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
diff --git a/Calorimeter/CaloCellCorrection/CMakeLists.txt b/Calorimeter/CaloCellCorrection/CMakeLists.txt
index dc5e7573e31a..c809277d207f 100644
--- a/Calorimeter/CaloCellCorrection/CMakeLists.txt
+++ b/Calorimeter/CaloCellCorrection/CMakeLists.txt
@@ -1,26 +1,8 @@
-################################################################################
-# Package: CaloCellCorrection
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CaloCellCorrection )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloCondBlobObjs
-                          Calorimeter/CaloIdentifier
-                          Calorimeter/CaloInterface
-                          Calorimeter/CaloUtils
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          GaudiKernel
-                          PRIVATE
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloEvent
-                          DetectorDescription/Identifier )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
@@ -30,7 +12,7 @@ atlas_add_component( CaloCellCorrection
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} CaloCondBlobObjs CaloIdentifier CaloUtilsLib AthenaBaseComps AthenaKernel StoreGateLib SGtests AthenaPoolUtilities GaudiKernel CaloDetDescrLib CaloEvent Identifier )
+                     LINK_LIBRARIES ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel AthenaPoolUtilities CaloCondBlobObjs CaloConditions CaloDetDescrLib CaloEvent CaloIdentifier CaloInterfaceLib CaloUtilsLib GaudiKernel Identifier StoreGateLib )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
diff --git a/Calorimeter/CaloClusterCorrection/CMakeLists.txt b/Calorimeter/CaloClusterCorrection/CMakeLists.txt
index 0503a4e6690d..c25ec3234ed0 100644
--- a/Calorimeter/CaloClusterCorrection/CMakeLists.txt
+++ b/Calorimeter/CaloClusterCorrection/CMakeLists.txt
@@ -1,40 +1,10 @@
-################################################################################
-# Package: CaloClusterCorrection
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CaloClusterCorrection )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloConditions
-			  TileCalorimeter/TileConditions
-			  LArCalorimeter/LArRecConditions
-                          Calorimeter/CaloEvent
-                          Calorimeter/CaloInterface
-                          Calorimeter/CaloRec
-                          Control/AthenaKernel
-                          Control/CxxUtils
-                          Control/StoreGate
-                          Event/xAOD/xAODCaloEvent
-                          GaudiKernel
-                          PRIVATE
-                          AtlasTest/TestTools
-                          Control/AthenaBaseComps
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloGeoHelpers
-                          Calorimeter/CaloUtils
-                          Calorimeter/CaloCondBlobObjs
-                          Calorimeter/CaloIdentifier
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArCabling
-                          Control/AthContainers
-                          DetectorDescription/Identifier
-                          Event/EventKernel
-                          Tools/PathResolver )
-
 # External dependencies:
+find_package( Boost )
 find_package( CLHEP )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
@@ -44,19 +14,19 @@ atlas_add_library( CaloClusterCorrectionLib
                    PUBLIC_HEADERS CaloClusterCorrection
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES CaloCondBlobObjs CaloConditions CaloEvent CaloIdentifier AthenaBaseComps AthenaKernel CxxUtils AthenaPoolUtilities xAODCaloEvent GaudiKernel LArIdentifier LArRecConditions TileConditionsLib CaloRecLib StoreGateLib SGtests LArToolsLib CaloDetDescrLib CaloUtilsLib
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} TestTools CaloGeoHelpers Identifier EventKernel PathResolver )
+                   LINK_LIBRARIES AthenaKernel CaloConditions CaloEvent CaloInterfaceLib CaloRecLib CaloUtilsLib CxxUtils GaudiKernel StoreGateLib TileConditionsLib xAODCaloEvent
+                   PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} ${ROOT_LIBRARIES} AthContainers AthenaBaseComps CaloDetDescrLib CaloGeoHelpers CaloIdentifier LArRecConditions PathResolver )
 
 atlas_add_component( CaloClusterCorrection
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
                      LINK_LIBRARIES CaloClusterCorrectionLib )
 
+# Test(s) in the package:
 atlas_add_test( interpolate_test
                 SOURCES
                 test/interpolate_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} CaloCondBlobObjs CaloConditions CaloEvent CaloIdentifier CaloRecLib AthenaBaseComps AthenaKernel CxxUtils StoreGateLib SGtests AthenaPoolUtilities xAODCaloEvent GaudiKernel LArIdentifier LArToolsLib TestTools CaloDetDescrLib CaloGeoHelpers CaloUtilsLib Identifier EventKernel PathResolver CaloClusterCorrectionLib )
+                INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
+                LINK_LIBRARIES ${Boost_LIBRARIES} CaloClusterCorrectionLib )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
diff --git a/Calorimeter/CaloCnv/CaloCondAthenaPool/CMakeLists.txt b/Calorimeter/CaloCnv/CaloCondAthenaPool/CMakeLists.txt
index 9998079e5a23..b95ae7934287 100644
--- a/Calorimeter/CaloCnv/CaloCondAthenaPool/CMakeLists.txt
+++ b/Calorimeter/CaloCnv/CaloCondAthenaPool/CMakeLists.txt
@@ -1,26 +1,14 @@
-################################################################################
-# Package: CaloCondAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CaloCondAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          PRIVATE
-                          Calorimeter/CaloConditions
-                          Calorimeter/CaloTriggerTool
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          Database/AthenaPOOL/AthenaPoolCnvSvc )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( CaloCondAthenaPoolPoolCnv
                            src/*.cxx
                            FILES CaloTriggerTool/LArTTCellMap.h CaloTriggerTool/CaloTTOnOffIdMap.h CaloTriggerTool/CaloTTOnAttrIdMap.h CaloTriggerTool/CaloTTPpmRxIdMap.h CaloConditions/ToolConstants.h CaloConditions/CaloCellFactor.h CaloConditions/CaloCellPositionShift.h CaloConditions/CaloHadWeight.h CaloConditions/CaloEMFrac.h CaloConditions/CaloHadDMCoeff.h CaloConditions/CaloHadDMCoeff2.h CaloConditions/CaloLocalHadCoeff.h
                            TYPES_WITH_NAMESPACE CaloRec::ToolConstants CaloRec::CaloCellFactor CaloRec::CaloCellPositionShift
-                           LINK_LIBRARIES AthenaPoolUtilities CaloConditions CaloTriggerToolLib AthenaKernel StoreGateLib SGtests AthenaPoolCnvSvcLib )
+                           LINK_LIBRARIES CaloConditions CaloTriggerToolLib AthenaKernel GaudiKernel AthenaPoolCnvSvcLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/Calorimeter/CaloCnv/CaloIdCnv/CMakeLists.txt b/Calorimeter/CaloCnv/CaloIdCnv/CMakeLists.txt
index 6fa74fd3844b..7e37acc4f0d8 100644
--- a/Calorimeter/CaloCnv/CaloIdCnv/CMakeLists.txt
+++ b/Calorimeter/CaloCnv/CaloIdCnv/CMakeLists.txt
@@ -1,27 +1,12 @@
-################################################################################
-# Package: CaloIdCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CaloIdCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaKernel
-                          DetectorDescription/DetDescrCnvSvc
-                          PRIVATE
-                          Control/StoreGate
-                          DetectorDescription/IdDictDetDescr
-                          DetectorDescription/Identifier
-                          GaudiKernel )
-
 # Component(s) in the package:
 atlas_add_component( CaloIdCnv
                      src/*.cxx
-                     LINK_LIBRARIES CaloIdentifier AthenaKernel DetDescrCnvSvcLib StoreGateLib SGtests IdDictDetDescr Identifier GaudiKernel )
+                     LINK_LIBRARIES CaloIdentifier AthenaKernel DetDescrCnvSvcLib StoreGateLib IdDictDetDescr Identifier GaudiKernel )
 
 # Install files from the package:
-atlas_install_headers( CaloIdCnv )
 atlas_install_joboptions( share/*.py )
-
diff --git a/Calorimeter/CaloCnv/CaloJiveXML/CMakeLists.txt b/Calorimeter/CaloCnv/CaloJiveXML/CMakeLists.txt
index 9d62b72a25c3..9c75e75f6953 100644
--- a/Calorimeter/CaloCnv/CaloJiveXML/CMakeLists.txt
+++ b/Calorimeter/CaloCnv/CaloJiveXML/CMakeLists.txt
@@ -1,31 +1,8 @@
-################################################################################
-# Package: CaloJiveXML
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CaloJiveXML )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          LArCalorimeter/LArCabling
-                          TileCalorimeter/TileConditions
-                          TileCalorimeter/TileEvent
-                          graphics/JiveXML
-                          PRIVATE
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloEvent
-                          Control/AthenaKernel
-                          DetectorDescription/Identifier
-                          Event/EventContainers
-                          LArCalorimeter/LArElecCalib
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRawEvent
-                          TileCalorimeter/TileCalib/TileCalibBlobObjs
-                          TileCalorimeter/TileIdentifier )
-
 # External dependencies:
 find_package( CLHEP )
 
@@ -34,9 +11,7 @@ atlas_add_component( CaloJiveXML
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CLHEP_LIBRARIES} CaloIdentifier AthenaBaseComps GaudiKernel LArToolsLib TileConditionsLib TileEvent JiveXMLLib CaloDetDescrLib CaloEvent AthenaKernel Identifier LArIdentifier LArRawEvent TileCalibBlobObjs TileIdentifier )
+                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel CaloDetDescrLib CaloEvent CaloIdentifier EventContainers GaudiKernel Identifier JiveXMLLib LArCablingLib LArElecCalib LArIdentifier LArRawEvent TileCalibBlobObjs TileConditionsLib TileEvent TileIdentifier )
 
 # Install files from the package:
-atlas_install_headers( CaloJiveXML )
 atlas_install_joboptions( share/*.py )
-
diff --git a/Calorimeter/CaloCnv/CaloSimEventAthenaPool/CMakeLists.txt b/Calorimeter/CaloCnv/CaloSimEventAthenaPool/CMakeLists.txt
index d0060d22782d..6266d001a50e 100644
--- a/Calorimeter/CaloCnv/CaloSimEventAthenaPool/CMakeLists.txt
+++ b/Calorimeter/CaloCnv/CaloSimEventAthenaPool/CMakeLists.txt
@@ -1,20 +1,10 @@
-################################################################################
-# Package: CaloSimEventAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CaloSimEventAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          PRIVATE
-                          Calorimeter/CaloCnv/CaloSimEventTPCnv
-                          Calorimeter/CaloSimEvent
-                          Database/AthenaPOOL/AthenaPoolCnvSvc )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( CaloSimEventAthenaPoolPoolCnv
                            src/*.cxx
                            FILES CaloSimEvent/CaloCalibrationHitContainer.h
-                           LINK_LIBRARIES AthenaPoolUtilities CaloSimEventTPCnv CaloSimEvent AthenaPoolCnvSvcLib )
+                           LINK_LIBRARIES CaloSimEventTPCnv CaloSimEvent AthenaPoolCnvSvcLib GaudiKernel )
diff --git a/Calorimeter/CaloCnv/CaloSimEventTPCnv/CMakeLists.txt b/Calorimeter/CaloCnv/CaloSimEventTPCnv/CMakeLists.txt
index c80dbcb477bc..212f2f9fecd6 100644
--- a/Calorimeter/CaloCnv/CaloSimEventTPCnv/CMakeLists.txt
+++ b/Calorimeter/CaloCnv/CaloSimEventTPCnv/CMakeLists.txt
@@ -1,73 +1,49 @@
-################################################################################
-# Package: CaloSimEventTPCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CaloSimEventTPCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloSimEvent
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          DetectorDescription/Identifier
-                          PRIVATE
-                          AtlasTest/TestTools
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaKernel
-                          GaudiKernel )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_tpcnv_library( CaloSimEventTPCnv
                          src/*.cxx
                          PUBLIC_HEADERS CaloSimEventTPCnv
-                         PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                         LINK_LIBRARIES ${ROOT_LIBRARIES} CaloSimEvent AthenaPoolCnvSvcLib Identifier TestTools CaloIdentifier AthenaKernel GaudiKernel )
+                         LINK_LIBRARIES CaloSimEvent AthenaPoolCnvSvcLib Identifier TestTools CaloIdentifier AthenaKernel GaudiKernel )
 
 atlas_add_dictionary( CaloSimEventTPCnvDict
                       CaloSimEventTPCnv/CaloSimEventTPCnvDict.h
                       CaloSimEventTPCnv/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} CaloSimEvent AthenaPoolCnvSvcLib Identifier TestTools CaloIdentifier AthenaKernel GaudiKernel CaloSimEventTPCnv )
+                      LINK_LIBRARIES CaloSimEventTPCnv )
 
 atlas_add_dictionary( OLD_CaloSimEventTPCnvDict
                       CaloSimEventTPCnv/CaloSimEventTPCnvDict.h
                       CaloSimEventTPCnv/OLD_selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} CaloSimEvent AthenaPoolCnvSvcLib Identifier TestTools CaloIdentifier AthenaKernel GaudiKernel CaloSimEventTPCnv )
+                      LINK_LIBRARIES CaloSimEventTPCnv )
 
 atlas_add_test( CaloCalibrationHitCnv_p1_test
                 SOURCES
                 test/CaloCalibrationHitCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} CaloSimEvent AthenaPoolCnvSvcLib Identifier TestTools CaloIdentifier AthenaKernel GaudiKernel CaloSimEventTPCnv )
+                LINK_LIBRARIES CaloSimEventTPCnv )
 
 atlas_add_test( CaloCalibrationHitCnv_p2_test
                 SOURCES
                 test/CaloCalibrationHitCnv_p2_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} CaloSimEvent AthenaPoolCnvSvcLib Identifier TestTools CaloIdentifier AthenaKernel GaudiKernel CaloSimEventTPCnv )
+                LINK_LIBRARIES CaloSimEventTPCnv )
 
 atlas_add_test( CaloCalibrationHitContainerCnv_p1_test
                 SOURCES
                 test/CaloCalibrationHitContainerCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} CaloSimEvent AthenaPoolCnvSvcLib Identifier TestTools CaloIdentifier AthenaKernel GaudiKernel CaloSimEventTPCnv
+                LINK_LIBRARIES CaloSimEventTPCnv
                 LOG_IGNORE_PATTERN "Athena::getMessageSvc" )
 
 atlas_add_test( CaloCalibrationHitContainerCnv_p2_test
                 SOURCES
                 test/CaloCalibrationHitContainerCnv_p2_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} CaloSimEvent AthenaPoolCnvSvcLib Identifier TestTools CaloIdentifier AthenaKernel GaudiKernel CaloSimEventTPCnv
+                LINK_LIBRARIES CaloSimEventTPCnv
                 LOG_IGNORE_PATTERN "Athena::getMessageSvc" )
 
 atlas_add_test( CaloCalibrationHitContainerCnv_p3_test
                 SOURCES
                 test/CaloCalibrationHitContainerCnv_p3_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} CaloSimEvent AthenaPoolCnvSvcLib Identifier TestTools CaloIdentifier AthenaKernel GaudiKernel CaloSimEventTPCnv
+                LINK_LIBRARIES CaloSimEventTPCnv
                 LOG_IGNORE_PATTERN "Athena::getMessageSvc" )
 
diff --git a/Calorimeter/CaloCnv/CaloTPCnv/CMakeLists.txt b/Calorimeter/CaloCnv/CaloTPCnv/CMakeLists.txt
index 36e1c9be4c97..a67dbc1210aa 100644
--- a/Calorimeter/CaloCnv/CaloTPCnv/CMakeLists.txt
+++ b/Calorimeter/CaloCnv/CaloTPCnv/CMakeLists.txt
@@ -1,79 +1,44 @@
-################################################################################
-# Package: CaloTPCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CaloTPCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloEvent
-                          Control/AthenaKernel
-                          Control/AthAllocators
-                          Control/AthLinks
-                          Control/DataModelAthenaPool
-                          Control/Navigation
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          Event/EventCommonTPCnv
-                          GaudiKernel
-                          PRIVATE
-                          AtlasTest/TestTools
-                          Calorimeter/CaloConditions
-                          Calorimeter/CaloGeoHelpers
-                          #Calorimeter/CaloInterface
-                          Calorimeter/CaloUtils
-                          Control/CxxUtils
-                          Control/SGTools
-                          Event/EventKernel
-			  LArCalorimeter/LArRecEvent 
-			  TileCalorimeter/TileEvent
-                          DetectorDescription/IdDictParser
-                          )
-
 # External dependencies:
 find_package( CLHEP )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
 atlas_add_tpcnv_library( CaloTPCnv
                          src/*.cxx
                          PUBLIC_HEADERS CaloTPCnv
-                         PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
+                         PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
                          PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-                         LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} CaloEvent AthenaKernel AthAllocators AthLinks DataModelAthenaPoolLib Navigation AthenaPoolCnvSvcLib EventCommonTPCnv GaudiKernel TestTools CaloConditions CaloGeoHelpers CaloUtilsLib SGTools EventKernel LArRecEvent TileEvent )
+                         LINK_LIBRARIES ${CLHEP_LIBRARIES} CaloEvent AthenaKernel AthAllocators AthLinks DataModelAthenaPoolLib Navigation AthenaPoolCnvSvcLib EventCommonTPCnv GaudiKernel TestTools CaloConditions CaloGeoHelpers CaloUtilsLib SGTools EventKernel LArRecEvent TileEvent )
 
 atlas_add_dictionary( CaloTPCnvDict
                       CaloTPCnv/CaloTPCnvDict.h
                       CaloTPCnv/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} CaloEvent AthenaKernel AthAllocators AthLinks DataModelAthenaPoolLib Navigation AthenaPoolCnvSvcLib EventCommonTPCnv GaudiKernel TestTools CaloConditions CaloGeoHelpers CaloUtilsLib SGTools EventKernel CaloTPCnv  LArRecEvent TileEvent)
+                      LINK_LIBRARIES CaloTPCnv )
 
 atlas_add_dictionary( OLD_CaloTPCnvDict
                       CaloTPCnv/CaloTPCnvDict.h
                       CaloTPCnv/OLD_selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} CaloEvent AthenaKernel AthAllocators AthLinks DataModelAthenaPoolLib Navigation AthenaPoolCnvSvcLib EventCommonTPCnv GaudiKernel TestTools CaloConditions CaloGeoHelpers CaloUtilsLib SGTools EventKernel CaloTPCnv  LArRecEvent TileEvent)
+                      LINK_LIBRARIES CaloTPCnv )
 
 atlas_add_test( CaloCellLinkContainerCnv_p2_test
                 SOURCES
                 test/CaloCellLinkContainerCnv_p2_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} CaloEvent AthenaKernel AthAllocators AthLinks DataModelAthenaPoolLib Navigation AthenaPoolCnvSvcLib EventCommonTPCnv GaudiKernel TestTools CaloConditions CaloGeoHelpers CaloUtilsLib SGTools EventKernel CaloTPCnv
+                LINK_LIBRARIES CaloTPCnv
                 LOG_IGNORE_PATTERN "Athena::getMessageSvc" )
 
 atlas_add_test( CaloClusterContainerCnv_test
                 SOURCES
                 test/CaloClusterContainerCnv_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} CaloEvent AthenaKernel AthAllocators AthLinks DataModelAthenaPoolLib Navigation AthenaPoolCnvSvcLib EventCommonTPCnv GaudiKernel TestTools CaloConditions CaloGeoHelpers CaloUtilsLib SGTools EventKernel CaloTPCnv )
-
+                LINK_LIBRARIES CaloTPCnv )
 
 atlas_add_test( CaloClusterCellLinkContainerCnv_p1_test
                 SOURCES
                 test/CaloClusterCellLinkContainerCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} CaloEvent AthenaKernel AthAllocators AthLinks DataModelAthenaPoolLib Navigation AthenaPoolCnvSvcLib EventCommonTPCnv GaudiKernel TestTools CaloConditions CaloGeoHelpers CaloUtilsLib SGTools EventKernel CaloTPCnv )
-
+                LINK_LIBRARIES CaloTPCnv )
 
 atlas_add_test( CaloCellPackerUtils_test
    SOURCES test/CaloCellPackerUtils_test.cxx
diff --git a/Calorimeter/CaloCnv/CaloTTDetDescrCnv/CMakeLists.txt b/Calorimeter/CaloCnv/CaloTTDetDescrCnv/CMakeLists.txt
index 307036458fb8..3de2fffe7d33 100644
--- a/Calorimeter/CaloCnv/CaloTTDetDescrCnv/CMakeLists.txt
+++ b/Calorimeter/CaloCnv/CaloTTDetDescrCnv/CMakeLists.txt
@@ -1,24 +1,9 @@
-################################################################################
-# Package: CaloTTDetDescrCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CaloTTDetDescrCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel
-                          PRIVATE
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloIdentifier
-                          Calorimeter/CaloTTDetDescr
-                          Calorimeter/CaloTriggerTool
-                          Control/StoreGate
-                          DetectorDescription/DetDescrCnvSvc
-                          LArCalorimeter/LArCabling )
-
 # Component(s) in the package:
 atlas_add_component( CaloTTDetDescrCnv
                      src/*.cxx
-                     LINK_LIBRARIES GaudiKernel CaloDetDescrLib CaloIdentifier CaloTTDetDescr CaloTriggerToolLib StoreGateLib SGtests DetDescrCnvSvcLib LArCablingLib )
-
+                     LINK_LIBRARIES GaudiKernel CaloDetDescrLib CaloIdentifier CaloTTDetDescr CaloTriggerToolLib StoreGateLib DetDescrCnvSvcLib )
diff --git a/Calorimeter/CaloCondBlobAlgs/CMakeLists.txt b/Calorimeter/CaloCondBlobAlgs/CMakeLists.txt
index 50707e0da7fc..572963c1df70 100644
--- a/Calorimeter/CaloCondBlobAlgs/CMakeLists.txt
+++ b/Calorimeter/CaloCondBlobAlgs/CMakeLists.txt
@@ -1,23 +1,8 @@
-################################################################################
-# Package: CaloCondBlobAlgs
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CaloCondBlobAlgs )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloCondBlobObjs
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          DetectorDescription/Identifier
-                          Event/xAOD/xAODEventInfo
-                          GaudiKernel )
-
 # External dependencies:
 find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
 
@@ -26,9 +11,8 @@ atlas_add_component( CaloCondBlobAlgs
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CORAL_LIBRARIES} CaloCondBlobObjs CaloDetDescrLib CaloIdentifier AthenaBaseComps AthenaKernel StoreGateLib SGtests AthenaPoolUtilities Identifier xAODEventInfo GaudiKernel )
+                     LINK_LIBRARIES ${CORAL_LIBRARIES} CaloCondBlobObjs CaloDetDescrLib CaloIdentifier AthenaBaseComps AthenaKernel StoreGateLib AthenaPoolUtilities Identifier xAODEventInfo GaudiKernel )
 
 # Install files from the package:
-atlas_install_headers( CaloCondBlobAlgs )
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-ignore=F401,F821 )
diff --git a/Calorimeter/CaloCondBlobObjs/CMakeLists.txt b/Calorimeter/CaloCondBlobObjs/CMakeLists.txt
index 0e9c07db0f1f..19a1ac916d00 100644
--- a/Calorimeter/CaloCondBlobObjs/CMakeLists.txt
+++ b/Calorimeter/CaloCondBlobObjs/CMakeLists.txt
@@ -1,38 +1,24 @@
-################################################################################
-# Package: CaloCondBlobObjs
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CaloCondBlobObjs )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel
-                          PRIVATE
-                          Control/AthenaKernel
-                          AtlasTest/TestTools )
-
 # External dependencies:
-find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
+find_package( CORAL COMPONENTS CoralBase )
 find_package( Boost COMPONENTS unit_test_framework )
 
-# tag NEEDS_CORAL_BASE was not recognized in automatic conversion in cmt2cmake
-
 # Component(s) in the package:
 atlas_add_library( CaloCondBlobObjs
                    src/*.cxx
                    PUBLIC_HEADERS CaloCondBlobObjs
                    INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                    LINK_LIBRARIES ${CORAL_LIBRARIES} GaudiKernel
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaKernel )
+                   PRIVATE_LINK_LIBRARIES AthenaKernel )
 
 atlas_add_dictionary( CaloCondBlobObjsDict
                       CaloCondBlobObjs/CaloCondBlobObjsDict.h
                       CaloCondBlobObjs/selection.xml
-                      INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} GaudiKernel AthenaKernel CaloCondBlobObjs )
+                      LINK_LIBRARIES CaloCondBlobObjs )
 
 atlas_add_test( CaloCondBlobBase_test
   SOURCES
diff --git a/Calorimeter/CaloCondPhysAlgs/CMakeLists.txt b/Calorimeter/CaloCondPhysAlgs/CMakeLists.txt
index 2a7b7ca629b8..07375e965d69 100644
--- a/Calorimeter/CaloCondPhysAlgs/CMakeLists.txt
+++ b/Calorimeter/CaloCondPhysAlgs/CMakeLists.txt
@@ -1,45 +1,13 @@
-################################################################################
-# Package: CaloCondPhysAlgs
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CaloCondPhysAlgs )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloCondBlobObjs
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloGeoHelpers
-                          Calorimeter/CaloIdentifier
-                          Calorimeter/CaloInterface
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          GaudiKernel
-                          LArCalorimeter/LArCabling
-                          LArCalorimeter/LArElecCalib
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRecUtils
-                          LArCalorimeter/LArTools
-                          LArCalorimeter/LArRawConditions
-                          Trigger/TrigAnalysis/TrigDecisionTool
-                          PRIVATE
-                          Calorimeter/CaloConditions
-                          Calorimeter/CaloEvent
-                          Calorimeter/CaloUtils
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          DetectorDescription/Identifier
-                          Event/xAOD/xAODEventInfo
-                          LArCalorimeter/LArGeoModel/LArHV
-                          LArCalorimeter/LArGeoModel/LArReadoutGeometry
-                          LArCalorimeter/LArSimEvent 
-			  Control/CxxUtils)
-
 # External dependencies:
 find_package( CLHEP )
 find_package( COOL COMPONENTS CoolKernel )
-find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
+find_package( CORAL COMPONENTS CoralBase )
+find_package( ROOT COMPONENTS Core Tree )
 
 # Component(s) in the package:
 atlas_add_component( CaloCondPhysAlgs
@@ -47,8 +15,8 @@ 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 LArRawConditions
-		     CaloConditions CaloEvent CaloUtilsLib AthenaPoolUtilities Identifier xAODEventInfo LArHV LArReadoutGeometry LArSimEvent CxxUtils)
+		             CaloIdentifier AthenaBaseComps AthenaKernel StoreGateLib GaudiKernel LArCablingLib LArElecCalib LArIdentifier TrigDecisionToolLib LArRawConditions
+		             CaloConditions CaloEvent CaloInterfaceLib CaloUtilsLib AthenaPoolUtilities Identifier xAODEventInfo LArHV LArReadoutGeometry LArSimEvent CxxUtils)
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/Calorimeter/CaloConditions/CMakeLists.txt b/Calorimeter/CaloConditions/CMakeLists.txt
index 2f59bd843129..660f86bec23a 100644
--- a/Calorimeter/CaloConditions/CMakeLists.txt
+++ b/Calorimeter/CaloConditions/CMakeLists.txt
@@ -1,21 +1,8 @@
-################################################################################
-# Package: CaloConditions
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CaloConditions )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/CxxUtils
-			  Control/AthenaKernel
-                          DetectorDescription/Identifier
-			  Calorimeter/CaloCondBlobObjs
-			  Calorimeter/CaloIdentifier
-                          GaudiKernel
-                          PRIVATE
-                          AtlasTest/TestTools )
-
 # External dependencies:
 find_package( Boost COMPONENTS filesystem thread system timer )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
@@ -25,22 +12,19 @@ atlas_add_library( CaloConditions
                    src/*.cxx
                    PUBLIC_HEADERS CaloConditions
                    PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES CxxUtils Identifier CaloIdentifier CaloCondBlobObjs AthenaKernel GaudiKernel 
-                   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} TestTools )
+                   LINK_LIBRARIES ${Boost_LIBRARIES} CxxUtils Identifier CaloIdentifier CaloCondBlobObjs AthenaKernel GaudiKernel
+                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
 
 atlas_add_dictionary( CaloConditionsDict
                       CaloConditions/CaloConditionsDict.h
                       CaloConditions/selection.xml
-                      INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CxxUtils Identifier GaudiKernel TestTools CaloConditions )
+                      LINK_LIBRARIES CaloConditions )
 
 atlas_add_test( ToolConstants_test
                 SOURCES
                 test/ToolConstants_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CxxUtils Identifier GaudiKernel TestTools CaloConditions )
+                LINK_LIBRARIES CaloConditions )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
-atlas_install_python_modules( python/*.py )
-
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/Calorimeter/CaloDmDetDescr/CMakeLists.txt b/Calorimeter/CaloDmDetDescr/CMakeLists.txt
index a8030ad3bf59..be2ccb33fab3 100644
--- a/Calorimeter/CaloDmDetDescr/CMakeLists.txt
+++ b/Calorimeter/CaloDmDetDescr/CMakeLists.txt
@@ -1,24 +1,13 @@
-################################################################################
-# Package: CaloDmDetDescr
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CaloDmDetDescr )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-                          Control/StoreGate
-                          PRIVATE
-                          Control/AthenaKernel
-                          GaudiKernel
-                          Tools/PathResolver )
-
 # Component(s) in the package:
 atlas_add_library( CaloDmDetDescr
                    src/*.cxx
                    PUBLIC_HEADERS CaloDmDetDescr
-                   LINK_LIBRARIES CaloIdentifier StoreGateLib SGtests
+                   LINK_LIBRARIES CaloIdentifier StoreGateLib
                    PRIVATE_LINK_LIBRARIES AthenaKernel GaudiKernel PathResolver )
 
 # Install files from the package:
diff --git a/Calorimeter/CaloEvent/CMakeLists.txt b/Calorimeter/CaloEvent/CMakeLists.txt
index 39776224fdd0..5a2cab4b510e 100644
--- a/Calorimeter/CaloEvent/CMakeLists.txt
+++ b/Calorimeter/CaloEvent/CMakeLists.txt
@@ -1,43 +1,14 @@
-################################################################################
-# Package: CaloEvent
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CaloEvent )
 
 # Extra dependencies, based on the environment:
-set( extra_deps )
 set( extra_libs )
 if( NOT GENERATIONBASE )
-   set( extra_deps LArCalorimeter/LArRawConditions ) # not ideal... LAr should depend on Calo
    set( extra_libs LArRawConditions )
 endif()
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Calorimeter/CaloConditions
-   Calorimeter/CaloDetDescr
-   Calorimeter/CaloGeoHelpers
-   Calorimeter/CaloIdentifier
-   Control/AthAllocators
-   Control/AthContainers
-   Control/AthLinks
-   Control/AthenaKernel
-   Control/CxxUtils
-   Control/Navigation
-   DetectorDescription/GeoPrimitives
-   DetectorDescription/Identifier
-   Event/EventKernel
-   Event/FourMom
-   Event/NavFourMom
-   ${extra_deps}
-   PRIVATE
-   AtlasTest/TestTools
-   Control/StoreGate
-   DetectorDescription/IdDictParser
-   GaudiKernel )
-
 # External dependencies:
 find_package( Boost )
 find_package( CLHEP )
diff --git a/Calorimeter/CaloExample/CaloTests/CMakeLists.txt b/Calorimeter/CaloExample/CaloTests/CMakeLists.txt
index a5f2473b8234..4b3ddcb9c00a 100644
--- a/Calorimeter/CaloExample/CaloTests/CMakeLists.txt
+++ b/Calorimeter/CaloExample/CaloTests/CMakeLists.txt
@@ -1,46 +1,19 @@
-################################################################################
-# Package: CaloTests
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CaloTests )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaBaseComps
-                          Control/StoreGate
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          LArCalorimeter/LArElecCalib
-                          PRIVATE
-                          Calorimeter/CaloEvent
-                          Calorimeter/CaloGeoHelpers
-                          Calorimeter/CaloSimEvent
-                          Control/AthenaKernel
-                          DetectorDescription/AtlasDetDescr
-                          Generators/AtlasHepMC
-                          Generators/GeneratorObjects
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRawEvent
-                          LArCalorimeter/LArRawUtils
-                          LArCalorimeter/LArSimEvent
-                          LArCalorimeter/LArCabling )
-
 # External dependencies:
 find_package( AIDA )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
 atlas_add_component( CaloTests
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${AIDA_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} AtlasHepMCLib CaloDetDescrLib CaloIdentifier AthenaBaseComps StoreGateLib SGtests Identifier GaudiKernel CaloEvent CaloGeoHelpers CaloSimEvent AthenaKernel AtlasDetDescr GeneratorObjects LArIdentifier LArRawEvent LArRawUtilsLib LArSimEvent LArCablingLib )
+                     INCLUDE_DIRS ${AIDA_INCLUDE_DIRS}
+                     LINK_LIBRARIES AtlasHepMCLib CaloDetDescrLib CaloIdentifier AthenaBaseComps StoreGateLib SGtests Identifier GaudiKernel CaloEvent CaloGeoHelpers CaloSimEvent AthenaKernel AtlasDetDescr GeneratorObjects LArIdentifier LArRawEvent LArRawUtilsLib LArSimEvent LArCablingLib )
 
 # Install files from the package:
-atlas_install_headers( CaloTests )
 atlas_install_joboptions( share/*.py )
 atlas_install_runtime( test/CaloTests_TestConfiguration.xml share/*.C share/rttTest.css share/CaloTests_HistoComparison.txt share/*Checks.py )
 
diff --git a/Calorimeter/CaloIdentifier/CMakeLists.txt b/Calorimeter/CaloIdentifier/CMakeLists.txt
index 9a645822a8bf..48b3b8ca1568 100644
--- a/Calorimeter/CaloIdentifier/CMakeLists.txt
+++ b/Calorimeter/CaloIdentifier/CMakeLists.txt
@@ -1,68 +1,43 @@
-################################################################################
-# Package: CaloIdentifier
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CaloIdentifier )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloGeoHelpers
-                          Control/AthenaKernel
-                          DetectorDescription/AtlasDetDescr
-                          DetectorDescription/IdDict
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          PRIVATE
-                          AtlasTest/TestTools
-                          Control/CxxUtils
-                          Control/StoreGate
-                          DetectorDescription/IdDictParser
-                          Tools/PathResolver )
-
 # External dependencies:
 find_package( Boost COMPONENTS filesystem thread system )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
 atlas_add_library( CaloIdentifier
                    src/*.cxx
                    PUBLIC_HEADERS CaloIdentifier
                    INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${Boost_LIBRARIES} CaloGeoHelpers AthenaKernel AtlasDetDescr IdDict Identifier GaudiKernel StoreGateLib SGtests
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} TestTools CxxUtils IdDictParser PathResolver )
+                   LINK_LIBRARIES ${Boost_LIBRARIES} CaloGeoHelpers AthenaKernel AtlasDetDescr IdDict Identifier GaudiKernel
+                   PRIVATE_LINK_LIBRARIES CxxUtils IdDictParser PathResolver )
 
 atlas_add_dictionary( CaloIdentifierDict
                       CaloIdentifier/CaloIdentifierDict.h
                       CaloIdentifier/selection.xml
-                      INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloGeoHelpers AthenaKernel AtlasDetDescr IdDict Identifier GaudiKernel TestTools CxxUtils StoreGateLib SGtests IdDictParser PathResolver CaloIdentifier )
+                      LINK_LIBRARIES CaloIdentifier )
 
 atlas_add_executable( test_lar_id
                       test/test_lar_id.cxx
-                      INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloGeoHelpers AthenaKernel AtlasDetDescr IdDict Identifier GaudiKernel TestTools CxxUtils StoreGateLib SGtests IdDictParser PathResolver CaloIdentifier )
+                      LINK_LIBRARIES CaloIdentifier IdDictParser )
 
 atlas_add_executable( test_calo_dm_id
                       test/test_calo_dm_id.cxx
-                      INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloGeoHelpers AthenaKernel AtlasDetDescr IdDict Identifier GaudiKernel TestTools CxxUtils StoreGateLib SGtests IdDictParser PathResolver CaloIdentifier )
+                      LINK_LIBRARIES CaloIdentifier IdDictParser )
 
 atlas_add_executable( test_cell_id
                       test/test_cell_id.cxx
-                      INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloGeoHelpers AthenaKernel AtlasDetDescr IdDict Identifier GaudiKernel TestTools CxxUtils StoreGateLib SGtests IdDictParser PathResolver CaloIdentifier )
+                      LINK_LIBRARIES CaloIdentifier IdDictParser )
 
 atlas_add_executable( test_lvl1_id
                       test/test_lvl1_id.cxx
-                      INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloGeoHelpers AthenaKernel AtlasDetDescr IdDict Identifier GaudiKernel TestTools CxxUtils StoreGateLib SGtests IdDictParser PathResolver CaloIdentifier )
+                      LINK_LIBRARIES CaloIdentifier IdDictParser )
 
 atlas_add_executable( caloCellLookup
                       utils/caloCellLookup.cxx
-                      INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloGeoHelpers AthenaKernel AtlasDetDescr IdDict Identifier GaudiKernel TestTools CxxUtils StoreGateLib SGtests IdDictParser PathResolver CaloIdentifier )
+                      LINK_LIBRARIES CaloIdentifier IdDictParser )
 
 #atlas_add_test( GTower_ID_test
 #                SOURCES
@@ -81,91 +56,79 @@ atlas_add_executable( caloCellLookup
 atlas_add_test( LArEM_ID_test
                 SOURCES
                 test/LArEM_ID_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloGeoHelpers AthenaKernel AtlasDetDescr IdDict Identifier GaudiKernel TestTools CxxUtils StoreGateLib SGtests IdDictParser PathResolver CaloIdentifier
+                LINK_LIBRARIES CaloIdentifier IdDictParser
                 LOG_IGNORE_PATTERN "mask/zero|Reading file|^AtlasDetectorID(Helper)?::" )
 
 atlas_add_test( LArEM_SuperCell_ID_test
                 SOURCES
                 test/LArEM_SuperCell_ID_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloGeoHelpers AthenaKernel AtlasDetDescr IdDict Identifier GaudiKernel TestTools CxxUtils StoreGateLib SGtests IdDictParser PathResolver CaloIdentifier
+                LINK_LIBRARIES CaloIdentifier IdDictParser
                 LOG_IGNORE_PATTERN "mask/zero|Reading file|^AtlasDetectorID(Helper)?::" )
 
 atlas_add_test( LArHEC_ID_test
                 SOURCES
                 test/LArHEC_ID_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloGeoHelpers AthenaKernel AtlasDetDescr IdDict Identifier GaudiKernel TestTools CxxUtils StoreGateLib SGtests IdDictParser PathResolver CaloIdentifier
+                LINK_LIBRARIES CaloIdentifier IdDictParser
                 LOG_IGNORE_PATTERN "mask/zero|Reading file|^AtlasDetectorID(Helper)?::" )
 
 atlas_add_test( LArHEC_SuperCell_ID_test
                 SOURCES
                 test/LArHEC_SuperCell_ID_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloGeoHelpers AthenaKernel AtlasDetDescr IdDict Identifier GaudiKernel TestTools CxxUtils StoreGateLib SGtests IdDictParser PathResolver CaloIdentifier
+                LINK_LIBRARIES CaloIdentifier IdDictParser
                 LOG_IGNORE_PATTERN "mask/zero|Reading file|^AtlasDetectorID(Helper)?::" )
 
 atlas_add_test( LArFCAL_ID_test
                 SOURCES
                 test/LArFCAL_ID_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloGeoHelpers AthenaKernel AtlasDetDescr IdDict Identifier GaudiKernel TestTools CxxUtils StoreGateLib SGtests IdDictParser PathResolver CaloIdentifier
+                LINK_LIBRARIES CaloIdentifier IdDictParser
                 LOG_IGNORE_PATTERN "mask/zero|Reading file|^AtlasDetectorID(Helper)?::" )
 
 atlas_add_test( LArFCAL_SuperCell_ID_test
                 SOURCES
                 test/LArFCAL_SuperCell_ID_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloGeoHelpers AthenaKernel AtlasDetDescr IdDict Identifier GaudiKernel TestTools CxxUtils StoreGateLib SGtests IdDictParser PathResolver CaloIdentifier
+                LINK_LIBRARIES CaloIdentifier IdDictParser
                 LOG_IGNORE_PATTERN "mask/zero|Reading file|^AtlasDetectorID(Helper)?::" )
 
 atlas_add_test( LArMiniFCAL_ID_test
                 SOURCES
                 test/LArMiniFCAL_ID_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloGeoHelpers AthenaKernel AtlasDetDescr IdDict Identifier GaudiKernel TestTools CxxUtils StoreGateLib SGtests IdDictParser PathResolver CaloIdentifier
+                LINK_LIBRARIES CaloIdentifier IdDictParser
                 LOG_IGNORE_PATTERN "mask/zero|Reading file|^AtlasDetectorID(Helper)?::" )
 
 atlas_add_test( TileID_test
                 SOURCES
                 test/TileID_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloGeoHelpers AthenaKernel AtlasDetDescr IdDict Identifier GaudiKernel TestTools CxxUtils StoreGateLib SGtests IdDictParser PathResolver CaloIdentifier
+                LINK_LIBRARIES CaloIdentifier IdDictParser
                 LOG_IGNORE_PATTERN "mask/zero|Reading file|^AtlasDetectorID(Helper)?::" )
 
 atlas_add_test( Tile_SuperCell_ID_test
                 SOURCES
                 test/Tile_SuperCell_ID_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloGeoHelpers AthenaKernel AtlasDetDescr IdDict Identifier GaudiKernel TestTools CxxUtils StoreGateLib SGtests IdDictParser PathResolver CaloIdentifier
+                LINK_LIBRARIES CaloIdentifier IdDictParser
                 LOG_IGNORE_PATTERN "mask/zero|Reading file|^AtlasDetectorID(Helper)?::" )
 
 atlas_add_test( CaloCell_ID_test
                 SOURCES
                 test/CaloCell_ID_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloGeoHelpers AthenaKernel AtlasDetDescr IdDict Identifier GaudiKernel TestTools CxxUtils StoreGateLib SGtests IdDictParser PathResolver CaloIdentifier
+                LINK_LIBRARIES CaloIdentifier IdDictParser
                 LOG_IGNORE_PATTERN "mask/zero|Reading file|^AtlasDetectorID(Helper)?::" )
 
 atlas_add_test( CaloCell_SuperCell_ID_test
                 SOURCES
                 test/CaloCell_SuperCell_ID_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloGeoHelpers AthenaKernel AtlasDetDescr IdDict Identifier GaudiKernel TestTools CxxUtils StoreGateLib SGtests IdDictParser PathResolver CaloIdentifier
+                LINK_LIBRARIES CaloIdentifier IdDictParser
                 LOG_IGNORE_PATTERN "mask/zero|Reading file|^AtlasDetectorID(Helper)?::" )
 
 atlas_add_test( CaloIDHelper_test
                 SOURCES
                 test/CaloIDHelper_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloGeoHelpers AthenaKernel AtlasDetDescr IdDict Identifier GaudiKernel TestTools CxxUtils StoreGateLib SGtests IdDictParser PathResolver CaloIdentifier
+                LINK_LIBRARIES CaloIdentifier IdDictParser
                 LOG_IGNORE_PATTERN "mask/zero|Reading file|^AtlasDetectorID(Helper)?::" )
 
 atlas_add_test( CaloHelpersTest_test
                 SOURCES
                 test/CaloHelpersTest_test.cxx
-                LINK_LIBRARIES CaloIdentifier )
+                LINK_LIBRARIES CaloIdentifier IdDictParser)
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
diff --git a/Calorimeter/CaloInterface/CMakeLists.txt b/Calorimeter/CaloInterface/CMakeLists.txt
index cb86afa8e98d..d88a1b539a28 100644
--- a/Calorimeter/CaloInterface/CMakeLists.txt
+++ b/Calorimeter/CaloInterface/CMakeLists.txt
@@ -1,32 +1,16 @@
-################################################################################
-# Package: CaloInterface
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CaloInterface )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloEvent
-                          Calorimeter/CaloIdentifier
-                          Calorimeter/CaloConditions
-                          Control/AthenaKernel
-                          DetectorDescription/Identifier
-                          Event/xAOD/xAODCaloEvent
-                          GaudiKernel )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_library( CaloInterfaceLib
                    CaloInterface/*.h
                    INTERFACE
                    PUBLIC_HEADERS CaloInterface
-                   LINK_LIBRARIES AthenaKernel CaloConditions CaloEvent CaloIdentifier GaudiKernel xAODCaloEvent )
+                   LINK_LIBRARIES AthenaKernel CaloConditions CaloEvent CaloIdentifier CxxUtils GaudiKernel xAODCaloEvent )
 
 atlas_add_dictionary( CaloInterfaceDict
                       CaloInterface/CaloInterfaceDict.h
                       CaloInterface/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} CaloInterfaceLib )
+                      LINK_LIBRARIES CaloInterfaceLib )
diff --git a/Calorimeter/CaloLocalHadCalib/CMakeLists.txt b/Calorimeter/CaloLocalHadCalib/CMakeLists.txt
index 39c7914a7451..2b2959e79460 100644
--- a/Calorimeter/CaloLocalHadCalib/CMakeLists.txt
+++ b/Calorimeter/CaloLocalHadCalib/CMakeLists.txt
@@ -1,56 +1,27 @@
-################################################################################
-# Package: CaloLocalHadCalib
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CaloLocalHadCalib )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloConditions
-                          Calorimeter/CaloGeoHelpers
-                          Control/AthenaBaseComps
-                          Control/StoreGate
-			  Control/CxxUtils
-                          Event/xAOD/xAODCaloEvent
-                          GaudiKernel
-                          PRIVATE
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloDmDetDescr
-                          Calorimeter/CaloEvent
-                          Calorimeter/CaloIdentifier
-                          Calorimeter/CaloSimEvent
-                          Calorimeter/CaloUtils
-                          Control/AthenaKernel
-                          Generators/GeneratorObjects
-                          TestBeam/TBEvent
-                          Tools/PathResolver )
-
 # External dependencies:
 find_package( Boost COMPONENTS filesystem thread system )
 find_package( CLHEP )
 find_package( ROOT COMPONENTS Gpad Graf Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint Graf3d Html Postscript Gui GX11TTF GX11 )
 
-# this line failed automatic conversion in cmt2cmake :
-# use AtlasReflex   AtlasReflex-*    External -no_CALOATHENAPOOL_ROOTauto_imports
-
 # Component(s) in the package:
 atlas_add_component( CaloLocalHadCalib
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-		     LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} CaloConditions CaloGeoHelpers AthenaBaseComps StoreGateLib CxxUtils 
-		     SGtests xAODCaloEvent GaudiKernel CaloDetDescrLib CaloDmDetDescr CaloEvent CaloIdentifier CaloSimEvent CaloUtilsLib AthenaKernel GeneratorObjects TBEvent PathResolver )
+		             LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel CaloConditions CaloDetDescrLib CaloDmDetDescr CaloEvent CaloGeoHelpers CaloIdentifier CaloSimEvent CaloUtilsLib CxxUtils GaudiKernel GeneratorObjects PathResolver StoreGateLib TBEvent xAODCaloEvent )
 
 atlas_add_dictionary( CaloLocalHadCalibDict
                       CaloLocalHadCalib/CaloLocalHadCalibDict.h
                       CaloLocalHadCalib/selection.xml
                       INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-		      LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} CaloConditions CaloGeoHelpers AthenaBaseComps StoreGateLib CxxUtils
-		      SGtests xAODCaloEvent GaudiKernel CaloDetDescrLib CaloDmDetDescr CaloEvent CaloIdentifier CaloSimEvent CaloUtilsLib AthenaKernel GeneratorObjects TBEvent PathResolver )
+		              LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel CaloConditions CaloDetDescrLib CaloDmDetDescr CaloEvent CaloGeoHelpers CaloIdentifier CaloSimEvent CaloUtilsLib CxxUtils GaudiKernel GeneratorObjects PathResolver StoreGateLib TBEvent xAODCaloEvent )
 
 # Install files from the package:
-atlas_install_headers( CaloLocalHadCalib )
 atlas_install_joboptions( share/*.txt share/*.py )
 atlas_install_runtime( share/CaloHadDMCoeff_init_v1.txt share/CaloHadDMCoeff_init_v2.txt )
 
diff --git a/Calorimeter/CaloLumiConditions/CMakeLists.txt b/Calorimeter/CaloLumiConditions/CMakeLists.txt
index e2cf193fd6fc..55ba96083f61 100644
--- a/Calorimeter/CaloLumiConditions/CMakeLists.txt
+++ b/Calorimeter/CaloLumiConditions/CMakeLists.txt
@@ -1,22 +1,8 @@
-################################################################################
-# Package: CaloLumiConditions
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CaloLumiConditions )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/CxxUtils
-			  Control/AthenaKernel
-                          DetectorDescription/Identifier
-                          PRIVATE
-                          DetectorDescription/IdDictParser
-                          AtlasTest/TestTools
-                          LumiBlock/LumiBlockData
-                          LArCalorimeter/LArElecCalib
-                          LArCalorimeter/LArIdentifier )
-
 # External dependencies:
 find_package( Boost COMPONENTS timer )
 
@@ -24,21 +10,18 @@ find_package( Boost COMPONENTS timer )
 atlas_add_library( CaloLumiConditions
                    src/*.cxx
                    PUBLIC_HEADERS CaloLumiConditions
-                   PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} 
                    LINK_LIBRARIES CxxUtils Identifier AthenaKernel LArElecCalib
-                   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} TestTools LArIdentifier LumiBlockData )
+                   PRIVATE_LINK_LIBRARIES LArIdentifier LumiBlockData )
 
 atlas_add_test( CaloBCIDCoeffs_test
                 SOURCES
                 test/CaloBCIDCoeffs_test.cxx
                 INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} CxxUtils Identifier TestTools CaloLumiConditions IdDictParser LArIdentifier LArElecCalib )
+                LINK_LIBRARIES ${Boost_LIBRARIES} CaloLumiConditions IdDictParser LArIdentifier TestTools )
 
 atlas_add_test( CaloBCIDLumi_test
                 SOURCES
                 test/CaloBCIDLumi_test.cxx
                 INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} CxxUtils Identifier TestTools CaloLumiConditions IdDictParser LumiBlockData LArIdentifier LArElecCalib
+                LINK_LIBRARIES CaloLumiConditions IdDictParser LArIdentifier LumiBlockData TestTools
                 PROPERTIES TIMEOUT 300 )
-
-
diff --git a/Calorimeter/CaloRec/CMakeLists.txt b/Calorimeter/CaloRec/CMakeLists.txt
index 4ab7bf01e16e..14602ddaf605 100644
--- a/Calorimeter/CaloRec/CMakeLists.txt
+++ b/Calorimeter/CaloRec/CMakeLists.txt
@@ -1,44 +1,8 @@
-################################################################################
-# Package: CaloRec
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CaloRec )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Calorimeter/CaloConditions
-   Calorimeter/CaloEvent
-   Control/AthenaBaseComps
-   Control/AthenaKernel
-   Control/StoreGate
-   Database/AthenaPOOL/AthenaPoolUtilities
-   Event/xAOD/xAODCaloEvent
-   GaudiKernel
-   PRIVATE
-   AtlasTest/TestTools
-   Control/CxxUtils
-   Control/AthAllocators
-   DetectorDescription/IdDictParser
-   DetectorDescription/Identifier
-   Event/EventKernel
-   Event/FourMom
-   Event/NavFourMom
-   Event/xAOD/xAODEventInfo	
-   Calorimeter/CaloDetDescr
-   Calorimeter/CaloGeoHelpers
-   Calorimeter/CaloIdentifier
-   Calorimeter/CaloInterface
-   Calorimeter/CaloUtils
-   Calorimeter/CaloLumiConditions
-   LArCalorimeter/LArTools
-   LArCalorimeter/LArElecCalib
-   LArCalorimeter/LArIdentifier
-   LArCalorimeter/LArRawConditions
-   LumiBlock/LumiBlockComps
-   Control/AthenaMonitoringKernel )
-
 # External dependencies:
 find_package( AIDA )
 find_package( CLHEP )
@@ -60,8 +24,7 @@ atlas_add_library( CaloRecLib
    StoreGateLib LArToolsLib LumiBlockCompsLib AthenaMonitoringKernelLib
    PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES}
    ${EIGEN_LIBRARIES} AthAllocators IdDictParser EventKernel CaloLumiConditions
-   LArRawConditions
-   FourMom NavFourMom )
+   LArRawConditions FourMom NavFourMom )
 
 atlas_add_component( CaloRec
    src/components/*.cxx
diff --git a/Calorimeter/CaloSimEvent/CMakeLists.txt b/Calorimeter/CaloSimEvent/CMakeLists.txt
index 4c30237f5bba..9feef2e380a8 100644
--- a/Calorimeter/CaloSimEvent/CMakeLists.txt
+++ b/Calorimeter/CaloSimEvent/CMakeLists.txt
@@ -1,32 +1,16 @@
-################################################################################
-# Package: CaloSimEvent
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CaloSimEvent )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          DetectorDescription/Identifier
-                          Simulation/HitManagement
-                          PRIVATE
-                          GaudiKernel )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_library( CaloSimEvent
                    src/*.cxx
                    PUBLIC_HEADERS CaloSimEvent
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES Identifier HitManagement
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel )
+                   LINK_LIBRARIES AthenaKernel Identifier HitManagement
+                   PRIVATE_LINK_LIBRARIES GaudiKernel )
 
 atlas_add_dictionary( CaloSimEventDict
                       CaloSimEvent/CaloSimEventDict.h
                       CaloSimEvent/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} Identifier HitManagement GaudiKernel CaloSimEvent )
-
+                      LINK_LIBRARIES CaloSimEvent )
diff --git a/Calorimeter/CaloTTDetDescr/CMakeLists.txt b/Calorimeter/CaloTTDetDescr/CMakeLists.txt
index 000a484ae74a..f156ec2c91eb 100644
--- a/Calorimeter/CaloTTDetDescr/CMakeLists.txt
+++ b/Calorimeter/CaloTTDetDescr/CMakeLists.txt
@@ -1,21 +1,12 @@
-################################################################################
-# Package: CaloTTDetDescr
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CaloTTDetDescr )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          DetectorDescription/Identifier
-                          PRIVATE
-                          Calorimeter/CaloIdentifier )
-
 # Component(s) in the package:
 atlas_add_library( CaloTTDetDescr
                    src/*.cxx
                    PUBLIC_HEADERS CaloTTDetDescr
-                   LINK_LIBRARIES Identifier
+                   LINK_LIBRARIES AthenaKernel Identifier
                    PRIVATE_LINK_LIBRARIES CaloIdentifier )
 
diff --git a/Calorimeter/CaloTools/CMakeLists.txt b/Calorimeter/CaloTools/CMakeLists.txt
index a14f3bfad85e..28fc0847ed4c 100644
--- a/Calorimeter/CaloTools/CMakeLists.txt
+++ b/Calorimeter/CaloTools/CMakeLists.txt
@@ -1,45 +1,8 @@
-# $Id: CMakeLists.txt 740701 2016-04-15 18:22:55Z ssnyder $
-################################################################################
-# Package: CaloTools
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CaloTools )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Calorimeter/CaloConditions
-   Calorimeter/CaloDetDescr
-   Calorimeter/CaloEvent
-   Calorimeter/CaloGeoHelpers
-   Calorimeter/CaloIdentifier
-   Calorimeter/CaloInterface
-   Control/AthenaBaseComps
-   Control/AthenaKernel
-   Control/AthAllocators
-   Control/StoreGate
-   Database/AthenaPOOL/AthenaPoolUtilities
-   DetectorDescription/AtlasDetDescr
-   DetectorDescription/Identifier
-   GaudiKernel
-   LArCalorimeter/LArElecCalib
-   LArCalorimeter/LArIdentifier
-   LArCalorimeter/LArRecEvent
-   LArCalorimeter/LArCabling
-   LArCalorimeter/LArRawConditions
-   LumiBlock/LumiBlockComps
-   TileCalorimeter/TileConditions
-   TileCalorimeter/TileEvent
-   Control/CxxUtils
-   PRIVATE
-   Calorimeter/CaloCondBlobObjs
-   Control/AthAllocators
-   DetectorDescription/IdDictParser
-   Event/xAOD/xAODBase
-   Event/xAOD/xAODEventInfo
-   TileCalorimeter/TileIdentifier )
-
 # External dependencies:
 find_package( Boost )
 find_package( CLHEP )
@@ -49,22 +12,13 @@ find_package( ROOT COMPONENTS Core MathCore )
 # Component(s) in the package:
 atlas_add_component( CaloTools
    CaloTools/*.h CaloTools/*.icc src/*.cxx src/components/*.cxx
-   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
-   ${CLHEP_INCLUDE_DIRS}
-   LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CORAL_LIBRARIES}
-   ${CLHEP_LIBRARIES} CaloConditions CaloDetDescrLib CaloEvent CaloGeoHelpers
-   CaloIdentifier AthenaBaseComps AthenaKernel StoreGateLib
-   AthenaPoolUtilities AtlasDetDescr Identifier GaudiKernel LArIdentifier
-   LArRecEvent LArToolsLib LumiBlockCompsLib TileConditionsLib TileEvent
-   CxxUtils CaloCondBlobObjs AthAllocators IdDictParser xAODBase xAODEventInfo
-   TileIdentifier LArRawConditions CaloInterfaceLib )
+   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
+   LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel AthenaPoolUtilities AtlasDetDescr CaloCondBlobObjs CaloConditions CaloDetDescrLib CaloEvent CaloGeoHelpers CaloIdentifier CaloInterfaceLib CxxUtils GaudiKernel Identifier LArCablingLib LArElecCalib LArRawConditions LArRecEvent StoreGateLib TileConditionsLib TileEvent TileIdentifier xAODBase )
 
 # Install files from the package:
-atlas_install_headers( CaloTools )
 atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/*.py )
 
-
 atlas_add_test( CaloEstimatedGainToolConfig_test
                 SCRIPT python -m CaloTools.CaloEstimatedGainToolConfig
                 LOG_SELECT_PATTERN "ComponentAccumulator|^---|^IOVDbSvc" )
diff --git a/Calorimeter/CaloTrackUtils/CMakeLists.txt b/Calorimeter/CaloTrackUtils/CMakeLists.txt
index 3ce63604af14..a4898da6daa1 100644
--- a/Calorimeter/CaloTrackUtils/CMakeLists.txt
+++ b/Calorimeter/CaloTrackUtils/CMakeLists.txt
@@ -1,39 +1,15 @@
-################################################################################
-# Package: CaloTrackUtils
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CaloTrackUtils )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloRec
-                          GaudiKernel
-                          PRIVATE
-                          DetectorDescription/GeoPrimitives
-                          Event/xAOD/xAODCaloEvent
-                          Reconstruction/Particle
-                          Tracking/TrkDetDescr/TrkSurfaces
-                          Tracking/TrkEvent/TrkParameters
-                          Tracking/TrkEvent/TrkParticleBase
-                          Tracking/TrkEvent/TrkTrackLink
-                          Tracking/TrkEvent/VxVertex
-                          Tracking/TrkExtrapolation/TrkExInterfaces )
-
-# External dependencies:
-find_package( Eigen )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint )
-
 # Component(s) in the package:
 atlas_add_library( CaloTrackUtilsLib
                    src/*.cxx
                    PUBLIC_HEADERS CaloTrackUtils
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
                    LINK_LIBRARIES GaudiKernel CaloRecLib
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} GeoPrimitives xAODCaloEvent Particle TrkSurfaces TrkParameters TrkParticleBase VxVertex TrkExInterfaces )
+                   PRIVATE_LINK_LIBRARIES GeoPrimitives Particle TrkExInterfaces TrkParameters TrkParticleBase TrkSurfaces TrkTrackLink VxVertex xAODCaloEvent )
 
 atlas_add_component( CaloTrackUtils
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
                      LINK_LIBRARIES CaloTrackUtilsLib )
-
diff --git a/Calorimeter/CaloTrackingGeometry/CMakeLists.txt b/Calorimeter/CaloTrackingGeometry/CMakeLists.txt
index 6465c5c24b46..4e3a1b0b5e32 100644
--- a/Calorimeter/CaloTrackingGeometry/CMakeLists.txt
+++ b/Calorimeter/CaloTrackingGeometry/CMakeLists.txt
@@ -1,44 +1,18 @@
-################################################################################
-# Package: CaloTrackingGeometry
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CaloTrackingGeometry )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          AtlasGeometryCommon/SubDetectorEnvelopes
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloGeoHelpers
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaBaseComps
-                          DetectorDescription/GeoPrimitives
-                          GaudiKernel
-                          Tracking/TrkDetDescr/TrkDetDescrInterfaces
-                          PRIVATE
-                          Control/StoreGate
-                          TileCalorimeter/TileDetDescr
-                          Tracking/TrkDetDescr/TrkDetDescrUtils
-                          Tracking/TrkDetDescr/TrkGeometry
-                          Tracking/TrkDetDescr/TrkGeometrySurfaces
-                          Tracking/TrkDetDescr/TrkSurfaces
-                          Tracking/TrkDetDescr/TrkVolumes )
-
-# External dependencies:
-find_package( Eigen )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 atlas_add_library( CaloTrackingGeometryLib
                    INTERFACE
                    PUBLIC_HEADERS CaloTrackingGeometry
-                   LINK_LIBRARIES GaudiKernel GeoPrimitives CaloIdentifier CaloGeoHelpers CaloDetDescrLib )
+                   LINK_LIBRARIES AthenaBaseComps CaloDetDescrLib CaloGeoHelpers CaloIdentifier GaudiKernel GeoPrimitives SubDetectorEnvelopesLib TrkDetDescrInterfaces TrkDetDescrUtils )
 
 # Component(s) in the package:
 atlas_add_component( CaloTrackingGeometry
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} CaloDetDescrLib CaloGeoHelpers CaloIdentifier AthenaBaseComps GeoPrimitives GaudiKernel TrkDetDescrInterfaces StoreGateLib SGtests TileDetDescr TrkDetDescrUtils TrkGeometry TrkGeometrySurfaces TrkSurfaces TrkVolumes SubDetectorEnvelopesLib CaloTrackingGeometryLib )
+                     LINK_LIBRARIES CaloTrackingGeometryLib TileDetDescr TrkGeometry TrkGeometrySurfaces TrkSurfaces TrkVolumes)
 
 atlas_add_dictionary( CaloTrackingGeometryDict
                       CaloTrackingGeometry/CaloTrackingGeometryDict.h
diff --git a/Calorimeter/CaloTriggerTool/CMakeLists.txt b/Calorimeter/CaloTriggerTool/CMakeLists.txt
index 41987f4cd29f..c24a672fa974 100644
--- a/Calorimeter/CaloTriggerTool/CMakeLists.txt
+++ b/Calorimeter/CaloTriggerTool/CMakeLists.txt
@@ -1,44 +1,23 @@
-################################################################################
-# Package: CaloTriggerTool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CaloTriggerTool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          Trigger/TrigT1/TrigT1CaloCalibConditions
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArCabling )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_library( CaloTriggerToolLib
                    src/*.cxx
                    PUBLIC_HEADERS CaloTriggerTool
-                   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${ROOT_LIBRARIES} CaloIdentifier AthenaKernel Identifier GaudiKernel TrigT1CaloCalibConditions StoreGateLib SGtests
-                   PRIVATE_LINK_LIBRARIES AthenaBaseComps LArIdentifier LArCablingLib )
+                   LINK_LIBRARIES AthenaBaseComps AthenaKernel CaloIdentifier GaudiKernel Identifier StoreGateLib TrigT1CaloCalibConditions
+                   PRIVATE_LINK_LIBRARIES LArCablingLib LArIdentifier )
 
 atlas_add_component( CaloTriggerTool
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES CaloTriggerToolLib AthenaBaseComps )
+                     LINK_LIBRARIES CaloTriggerToolLib )
 
 atlas_add_dictionary( CaloTriggerToolDict
                       CaloTriggerTool/CaloTriggerToolDict.h
                       CaloTriggerTool/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} CaloIdentifier AthenaKernel StoreGateLib SGtests Identifier GaudiKernel TrigT1CaloCalibConditions AthenaBaseComps LArIdentifier CaloTriggerToolLib )
+                      LINK_LIBRARIES CaloTriggerToolLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/Calorimeter/CaloUtils/CMakeLists.txt b/Calorimeter/CaloUtils/CMakeLists.txt
index a7a37b92e2a3..709f5a9381ad 100644
--- a/Calorimeter/CaloUtils/CMakeLists.txt
+++ b/Calorimeter/CaloUtils/CMakeLists.txt
@@ -11,11 +11,8 @@ find_package( CLHEP )
 atlas_add_library( CaloUtilsLib CaloUtils/*.h CaloUtils/*.icc src/*.h src/*.cxx
    PUBLIC_HEADERS CaloUtils
    PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-   LINK_LIBRARIES CaloConditions CaloEvent CaloGeoHelpers CaloIdentifier
-   AthenaBaseComps AthenaKernel Navigation FourMom xAODCaloEvent xAODCore GaudiKernel
-   CaloDetDescrLib StoreGateLib CaloInterfaceLib
-   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} CxxUtils
-   SGTools IdDictParser Identifier )
+   LINK_LIBRARIES AthenaBaseComps AthenaKernel CaloConditions CaloDetDescrLib CaloEvent CaloGeoHelpers CaloIdentifier CaloInterfaceLib CxxUtils FourMom GaudiKernel Navigation StoreGateLib xAODCaloEvent
+   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} GeoModelInterfaces Identifier SGTools )
 
 atlas_add_component( CaloUtils src/components/*.cxx
    LINK_LIBRARIES CaloUtilsLib )
@@ -33,24 +30,21 @@ set( _jobOPath "${_jobOPath}:$ENV{JOBOPTSEARCHPATH}" )
 atlas_add_test( CaloLayerCalculator_test
    SOURCES test/CaloLayerCalculator_test.cxx
    INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-   LINK_LIBRARIES ${CLHEP_LIBRARIES} CaloDetDescrLib CaloEvent CaloIdentifier
-   StoreGateLib xAODCaloEvent GaudiKernel TestTools IdDictParser CaloUtilsLib
+   LINK_LIBRARIES LINK_LIBRARIES ${CLHEP_LIBRARIES} CaloUtilsLib CxxUtils IdDictParser TestTools
    LOG_IGNORE_PATTERN "^lar decode|mask/zero|initialize_from_dict|^ channel range|^AtlasDetectorID::"
    ENVIRONMENT "JOBOPTSEARCHPATH=${_jobOPath}" )
 
 atlas_add_test( CaloVertexedCell_test
    SOURCES test/CaloVertexedCell_test.cxx
    INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-   LINK_LIBRARIES ${CLHEP_LIBRARIES} CaloDetDescrLib CaloEvent CaloIdentifier
-   StoreGateLib GaudiKernel TestTools IdDictParser CaloUtilsLib
+   LINK_LIBRARIES ${CLHEP_LIBRARIES} CaloUtilsLib TestTools
    LOG_IGNORE_PATTERN "^lar decode|mask/zero|initialize_from_dict|^ channel range|^AtlasDetectorID::"
    ENVIRONMENT "JOBOPTSEARCHPATH=${_jobOPath}" )
 
 atlas_add_test( CaloVertexedCluster_test
    SOURCES test/CaloVertexedCluster_test.cxx
    INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-   LINK_LIBRARIES ${CLHEP_LIBRARIES} CaloDetDescrLib CaloIdentifier StoreGateLib
-   xAODCaloEvent GaudiKernel TestTools IdDictParser CaloUtilsLib
+   LINK_LIBRARIES ${CLHEP_LIBRARIES} CaloUtilsLib TestTools
    LOG_IGNORE_PATTERN "^lar decode|mask/zero|initialize_from_dict|^ channel range|^AtlasDetectorID::"
    ENVIRONMENT "JOBOPTSEARCHPATH=${_jobOPath}" )
 
-- 
GitLab


From 8cdd8c4045f9097ce7937072053d5b7d10438436 Mon Sep 17 00:00:00 2001
From: abarton <Adam.Edward.Barton@cern.ch>
Date: Mon, 5 Oct 2020 15:40:03 +0100
Subject: [PATCH 201/403] Correct BLS monitoring histogram labels

---
 .../python/TrigMultiTrkComboHypoMonitoringConfig.py    | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigMultiTrkComboHypoMonitoringConfig.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigMultiTrkComboHypoMonitoringConfig.py
index c571b0e8ae18..be62d8360a9e 100644
--- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigMultiTrkComboHypoMonitoringConfig.py
+++ b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigMultiTrkComboHypoMonitoringConfig.py
@@ -23,7 +23,7 @@ class TrigMultiTrkComboHypoMonitoring(GenericMonitoringTool):
             defineHistogram('bphysChi2', type='TH1F', path='EXPERT', title="chi2 fit of N tracks; fit chi2 of N selected tracks", xbins=100, xmin=0, xmax=100),
             defineHistogram('bphysFitMass', type='TH1F', path='EXPERT', title="fit mass of N tracks; fit mass of N selected tracks [GeV]", xbins=100, xmin=0, xmax=20),
             defineHistogram('bphysMass', type='TH1F', path='EXPERT', title="mass of N tracks; mass of N selected tracks [GeV]", xbins=100, xmin=0, xmax=20),
-            defineHistogram('bphysCharge', type='TH1F', path='EXPERT', title="total charge of N tracks", xbins=20, xmin=-10, xmax=10),
+            defineHistogram('bphysCharge', type='TH1F', path='EXPERT', title="total charge of N tracks; Total Charge", xbins=20, xmin=-10, xmax=10),
             defineHistogram('TIME_all', type='TH1F', path='EXPERT', title='execution time; [microseconds]', xbins=100, xmin=0, xmax=1000),
             ]
 
@@ -31,9 +31,9 @@ class TrigMultiTrkComboHypoToolMonitoring(GenericMonitoringTool):
     def __init__ (self, name):
         super(TrigMultiTrkComboHypoToolMonitoring, self).__init__(name)
         self.Histograms = [
-        defineHistogram('totCharge', type='TH1F', path='EXPERT', title="Total Charge of tracks", xbins=21, xmin=-10, xmax=10),
-        defineHistogram('CutCounter', type='TH1F', path='EXPERT', title="mass of track pairs; m_{#mu#mu} [GeV]", xbins=5, xmin=-0.5, xmax=4.5),
+        defineHistogram('totCharge', type='TH1F', path='EXPERT', title="Total Charge of N tracks; Total Charge", xbins=21, xmin=-10, xmax=10),
+        defineHistogram('CutCounter', type='TH1F', path='EXPERT', title="Checksum of passed cuts; N passed cuts", xbins=5, xmin=-0.5, xmax=4.5),
         defineHistogram('FitChi2', type='TH1F', path='EXPERT', title="chi2 fit of N tracks; fit chi2 of N selected tracks", xbins=100, xmin=0, xmax=100),
-        defineHistogram('VertexMass', type='TH1F', path='EXPERT', title="Number of tracks selected; N selected tracks", xbins=100, xmin=0, xmax=20),
-        defineHistogram('trackPts', type='TH1F', path='EXPERT', title="pair mass of N tracks; pair mass of N selected tracks [GeV]", xbins=100, xmin=0, xmax=20)
+        defineHistogram('VertexMass', type='TH1F', path='EXPERT', title="mass of track pairs; m_{#mu#mu} [GeV]", xbins=100, xmin=0, xmax=20),
+        defineHistogram('trackPts', type='TH1F', path='EXPERT', title="p_{T} of tracks before cut; tracks before selection p_{T} [GeV]", xbins=100, xmin=0, xmax=40)
         ]
-- 
GitLab


From 96c94f3dde07c954ad2b5ea01bdd5a77846f388c Mon Sep 17 00:00:00 2001
From: MihaMuskinja <miha.muskinja@gmail.com>
Date: Mon, 5 Oct 2020 17:47:14 +0200
Subject: [PATCH 202/403] python syntax fix

---
 Simulation/G4Extensions/ExtraParticles/python/PDGParser.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Simulation/G4Extensions/ExtraParticles/python/PDGParser.py b/Simulation/G4Extensions/ExtraParticles/python/PDGParser.py
index 4de1f36931fd..d16ef850fbc2 100644
--- a/Simulation/G4Extensions/ExtraParticles/python/PDGParser.py
+++ b/Simulation/G4Extensions/ExtraParticles/python/PDGParser.py
@@ -149,8 +149,8 @@ class PDGParser(object):
                         self.extraParticles[name] = ExtraParticle(**kwargs)
                     else:
                         if getattr(self.extraParticles[name], prop) != -1:
-                            self.log.warning("Property %s is already set for particle %s. Current value is %s and incoming value is %s." ,
-                                             (prop, name, getattr(self.extraParticles[name], prop), value))
+                            self.log.warning("Property %s is already set for particle %s. Current value is %s and incoming value is %s." % (
+                                prop, name, getattr(self.extraParticles[name], prop), value))
                             continue
                         setattr(self.extraParticles[name], prop, value)
 
-- 
GitLab


From 5e34aa3c39a63c0bf673c36382ced84a835c23d9 Mon Sep 17 00:00:00 2001
From: williams <sarah.louise.williams@cern.ch>
Date: Mon, 5 Oct 2020 17:07:06 +0100
Subject: [PATCH 203/403] Removing thread safety checks to get MR in

---
 .../METReconstruction/ATLAS_CHECK_THREAD_SAFETY            | 7 -------
 .../MET/METReconstruction/Root/METTruthAssociator.cxx      | 2 +-
 2 files changed, 1 insertion(+), 8 deletions(-)
 delete mode 100644 Reconstruction/MET/METReconstruction/METReconstruction/ATLAS_CHECK_THREAD_SAFETY

diff --git a/Reconstruction/MET/METReconstruction/METReconstruction/ATLAS_CHECK_THREAD_SAFETY b/Reconstruction/MET/METReconstruction/METReconstruction/ATLAS_CHECK_THREAD_SAFETY
deleted file mode 100644
index 86c3c72891a2..000000000000
--- a/Reconstruction/MET/METReconstruction/METReconstruction/ATLAS_CHECK_THREAD_SAFETY
+++ /dev/null
@@ -1,7 +0,0 @@
-Reconstruction/MET/METReconstruction/METAssociationTool
-Reconstruction/MET/METReconstruction/METAssociator
-Reconstruction/MET/METReconstruction/METSoftTermsTool
-Reconstruction/MET/METReconstruction/METSoftAssociator
-Reconstruction/MET/METReconstruction/METJetAssocTool
-Reconstruction/MET/METReconstruction/METElectronAssociator
-Reconstruction/MET/METReconstruction/METMuonAssociator
diff --git a/Reconstruction/MET/METReconstruction/Root/METTruthAssociator.cxx b/Reconstruction/MET/METReconstruction/Root/METTruthAssociator.cxx
index 58af810cba3d..3f43e510b311 100644
--- a/Reconstruction/MET/METReconstruction/Root/METTruthAssociator.cxx
+++ b/Reconstruction/MET/METReconstruction/Root/METTruthAssociator.cxx
@@ -40,7 +40,7 @@ namespace met {
 
   using namespace xAOD;
 
-  static SG::AuxElement::ConstAccessor<std::vector<ElementLink<IParticleContainer> > > cacc_ghosttruth("GhostTruth");
+  static const SG::AuxElement::ConstAccessor<std::vector<ElementLink<IParticleContainer> > > cacc_ghosttruth("GhostTruth");
 
   // Constructors
   ////////////////
-- 
GitLab


From b516e2d57f26d16efbf169d079a8256d68cae3a8 Mon Sep 17 00:00:00 2001
From: Peter Onyisi <ponyisi@utexas.edu>
Date: Mon, 5 Oct 2020 16:30:50 +0000
Subject: [PATCH 204/403] Fix a few issues with new InDetGlobal monitoring

---
 .../share/DataQualitySteering_jobOptions.py   |  2 +-
 .../ATLAS_CHECK_THREAD_SAFETY                 |  0
 .../CMakeLists.txt                            | 35 +------------------
 .../InDetGlobalMonitoringRun3TestConfig.py    |  7 ++--
 .../src/InDetGlobalBeamSpotMonAlg.cxx         |  2 +-
 .../InDetGlobalBeamSpotMonAlg.h               |  0
 .../src/InDetGlobalPrimaryVertexMonAlg.cxx    |  2 +-
 .../InDetGlobalPrimaryVertexMonAlg.h          |  0
 .../src/InDetGlobalTrackMonAlg.cxx            |  2 +-
 .../InDetGlobalTrackMonAlg.h                  |  0
 .../InDetGlobalMonitoringRun3Test_entries.cxx |  6 ++--
 .../src/LArAffectedRegionsAlg.cxx             |  2 +-
 12 files changed, 13 insertions(+), 45 deletions(-)
 rename InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/{InDetGlobalMonitoringRun3Test => }/ATLAS_CHECK_THREAD_SAFETY (100%)
 rename InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/{InDetGlobalMonitoringRun3Test => src}/InDetGlobalBeamSpotMonAlg.h (100%)
 rename InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/{InDetGlobalMonitoringRun3Test => src}/InDetGlobalPrimaryVertexMonAlg.h (100%)
 rename InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/{InDetGlobalMonitoringRun3Test => src}/InDetGlobalTrackMonAlg.h (100%)

diff --git a/Control/AthenaMonitoring/share/DataQualitySteering_jobOptions.py b/Control/AthenaMonitoring/share/DataQualitySteering_jobOptions.py
index 38542637d0cb..b5c2e04adbe7 100644
--- a/Control/AthenaMonitoring/share/DataQualitySteering_jobOptions.py
+++ b/Control/AthenaMonitoring/share/DataQualitySteering_jobOptions.py
@@ -358,7 +358,7 @@ if DQMonFlags.doMonitoring():
       Steering.doPixelMon=DQMonFlags.doPixelMon()
       Steering.doSCTMon=DQMonFlags.doSCTMon()
       Steering.doTRTMon=DQMonFlags.doTRTMon()
-      Steering.doInDetGlobalMon=DQMonFlags.doInDetGlobalMon()
+      Steering.doInDetMon=DQMonFlags.doInDetGlobalMon()
       Steering.doLArMon=DQMonFlags.doLArMon()
       Steering.doTileMon=DQMonFlags.doTileMon()
       Steering.doCaloGlobalMon=DQMonFlags.doCaloMon()
diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/InDetGlobalMonitoringRun3Test/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/ATLAS_CHECK_THREAD_SAFETY
similarity index 100%
rename from InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/InDetGlobalMonitoringRun3Test/ATLAS_CHECK_THREAD_SAFETY
rename to InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/ATLAS_CHECK_THREAD_SAFETY
diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/CMakeLists.txt b/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/CMakeLists.txt
index d61850233029..d78d12aa18d6 100644
--- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/CMakeLists.txt
+++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/CMakeLists.txt
@@ -5,40 +5,6 @@
 # Declare the package name:
 atlas_subdir( InDetGlobalMonitoringRun3Test )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/AthenaMonitoring
-   DetectorDescription/AtlasDetDescr
-   GaudiKernel
-   InnerDetector/InDetDetDescr/PixelGeoModel
-   InnerDetector/InDetRawEvent/InDetRawData
-   InnerDetector/InDetRecEvent/InDetPrepRawData
-   Tracking/TrkEvent/TrkTrack
-   PRIVATE
-   Database/AthenaPOOL/AthenaPoolUtilities
-   DetectorDescription/GeoPrimitives
-   Event/xAOD/xAODEventInfo
-   Event/xAOD/xAODTracking
-   Event/EventPrimitives
-   InnerDetector/InDetConditions/InDetConditionsSummaryService
-   InnerDetector/InDetConditions/InDetByteStreamErrors
-   InnerDetector/InDetConditions/PixelConditionsTools
-   InnerDetector/InDetDetDescr/InDetIdentifier
-   InnerDetector/InDetDetDescr/InDetReadoutGeometry
-   InnerDetector/InDetDetDescr/PixelCabling
-   InnerDetector/InDetRecEvent/InDetRIO_OnTrack
-   InnerDetector/InDetRecTools/InDetTrackSelectionTool
-   InnerDetector/InDetConditions/BeamSpotConditionsData
-   Tools/LWHists
-   Tools/PathResolver
-   Tracking/TrkEvent/TrkParameters
-   Tracking/TrkEvent/TrkSpacePoint
-   Tracking/TrkEvent/TrkTrackSummary
-   Tracking/TrkEvent/VxVertex
-   Tracking/TrkVertexFitter/TrkVertexFitterInterfaces
-   Tracking/TrkTools/TrkToolInterfaces )
-
 # External dependencies:
 find_package( ROOT COMPONENTS Core MathCore Hist )
 
@@ -46,6 +12,7 @@ find_package( ROOT COMPONENTS Core MathCore Hist )
 atlas_add_component( InDetGlobalMonitoringRun3Test
    InDetGlobalMonitoringRun3Test/*.h src/*.cxx src/components/*.cxx
    INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+   PRIVATE_LINK_LIBRARIES InDetConditionsSummaryService
    LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaMonitoringLib AtlasDetDescr
    GaudiKernel InDetRawData InDetPrepRawData TrkTrack InDetByteStreamErrors 
    AthenaPoolUtilities GeoPrimitives xAODEventInfo EventPrimitives InDetIdentifier
diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/python/InDetGlobalMonitoringRun3TestConfig.py b/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/python/InDetGlobalMonitoringRun3TestConfig.py
index 79e20f002b58..1e2c540f1de7 100644
--- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/python/InDetGlobalMonitoringRun3TestConfig.py
+++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/python/InDetGlobalMonitoringRun3TestConfig.py
@@ -38,7 +38,7 @@ def InDetGlobalMonitoringRun3TestConfig(flags):
         for k, v in kwargsInDetGlobalTrackMonAlg.items():
             setattr(inDetGlobalTrackMonAlg, k, v)
 
-        inDetGlobalTrackMonAlg.TrackSelectionTool = CompFactory.InDet.InDetTrackSelectionTool()
+        inDetGlobalTrackMonAlg.TrackSelectionTool = CompFactory.InDet.InDetTrackSelectionTool('InDetGlobalTrackMonAlg_TrackSelectionTool')
         inDetGlobalTrackMonAlg.TrackSelectionTool.UseTrkTrackTools = True
         inDetGlobalTrackMonAlg.TrackSelectionTool.CutLevel         = "TightPrimary"
         inDetGlobalTrackMonAlg.TrackSelectionTool.maxNPixelHoles   = 1
@@ -46,7 +46,7 @@ def InDetGlobalMonitoringRun3TestConfig(flags):
         #        InDetGlobalTrackMonAlg.Baseline_TrackSelectionTool.TrackSummaryTool = InDetTrackSummaryTool
         #        InDetGlobalTrackMonAlg.Baseline_TrackSelectionTool.Extrapolator     = InDetExtrapolator
         #
-        inDetGlobalTrackMonAlg.Tight_TrackSelectionTool = CompFactory.InDet.InDetTrackSelectionTool()
+        inDetGlobalTrackMonAlg.Tight_TrackSelectionTool = CompFactory.InDet.InDetTrackSelectionTool('InDetGlobalTrackMonAlg_TightTrackSelectionTool')
         inDetGlobalTrackMonAlg.Tight_TrackSelectionTool.UseTrkTrackTools = True
         inDetGlobalTrackMonAlg.Tight_TrackSelectionTool.CutLevel         = "TightPrimary"
         inDetGlobalTrackMonAlg.Tight_TrackSelectionTool.minPt            = 5000
@@ -111,5 +111,6 @@ def InDetGlobalMonitoringRun3TestConfig(flags):
         InDetGlobalBeamSpotMonAlgCfg(helper, myInDetGlobalBeamSpotMonAlg, **kwargsInDetGlobalBeamSpotMonAlg)
 
         ########### here ends InDetGlobalBeamSpotMonAlg ###########
-        acc.merge(helper.result())
+        
+    acc.merge(helper.result())
     return acc
diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/InDetGlobalBeamSpotMonAlg.cxx b/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/InDetGlobalBeamSpotMonAlg.cxx
index be7e6913a5dc..69782a6506bb 100644
--- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/InDetGlobalBeamSpotMonAlg.cxx
+++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/InDetGlobalBeamSpotMonAlg.cxx
@@ -15,7 +15,7 @@
  ****************************************************************************/
 
 //main header
-#include "InDetGlobalMonitoringRun3Test/InDetGlobalBeamSpotMonAlg.h"
+#include "InDetGlobalBeamSpotMonAlg.h"
 
 #include "TrkEventPrimitives/ParamDefs.h"
 
diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/InDetGlobalMonitoringRun3Test/InDetGlobalBeamSpotMonAlg.h b/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/InDetGlobalBeamSpotMonAlg.h
similarity index 100%
rename from InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/InDetGlobalMonitoringRun3Test/InDetGlobalBeamSpotMonAlg.h
rename to InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/InDetGlobalBeamSpotMonAlg.h
diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/InDetGlobalPrimaryVertexMonAlg.cxx b/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/InDetGlobalPrimaryVertexMonAlg.cxx
index 5c4cc7da7f88..a160cbcac39e 100644
--- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/InDetGlobalPrimaryVertexMonAlg.cxx
+++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/InDetGlobalPrimaryVertexMonAlg.cxx
@@ -15,7 +15,7 @@
  ****************************************************************************/
 
 //main header
-#include "InDetGlobalMonitoringRun3Test/InDetGlobalPrimaryVertexMonAlg.h"
+#include "InDetGlobalPrimaryVertexMonAlg.h"
 
 #include "TrkEventPrimitives/ParamDefs.h"
 #include "xAODTracking/TrackParticleContainer.h"
diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/InDetGlobalMonitoringRun3Test/InDetGlobalPrimaryVertexMonAlg.h b/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/InDetGlobalPrimaryVertexMonAlg.h
similarity index 100%
rename from InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/InDetGlobalMonitoringRun3Test/InDetGlobalPrimaryVertexMonAlg.h
rename to InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/InDetGlobalPrimaryVertexMonAlg.h
diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/InDetGlobalTrackMonAlg.cxx b/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/InDetGlobalTrackMonAlg.cxx
index 31b21a47d960..b9a1e564c2a9 100644
--- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/InDetGlobalTrackMonAlg.cxx
+++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/InDetGlobalTrackMonAlg.cxx
@@ -15,7 +15,7 @@
  ****************************************************************************/
 
 //main header
-#include "InDetGlobalMonitoringRun3Test/InDetGlobalTrackMonAlg.h"
+#include "InDetGlobalTrackMonAlg.h"
 
 //Standard c++
 #include <vector>
diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/InDetGlobalMonitoringRun3Test/InDetGlobalTrackMonAlg.h b/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/InDetGlobalTrackMonAlg.h
similarity index 100%
rename from InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/InDetGlobalMonitoringRun3Test/InDetGlobalTrackMonAlg.h
rename to InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/InDetGlobalTrackMonAlg.h
diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/components/InDetGlobalMonitoringRun3Test_entries.cxx b/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/components/InDetGlobalMonitoringRun3Test_entries.cxx
index b778c8ca79d5..f471a85c112a 100644
--- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/components/InDetGlobalMonitoringRun3Test_entries.cxx
+++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/components/InDetGlobalMonitoringRun3Test_entries.cxx
@@ -1,6 +1,6 @@
-#include "InDetGlobalMonitoringRun3Test/InDetGlobalTrackMonAlg.h"
-#include "InDetGlobalMonitoringRun3Test/InDetGlobalPrimaryVertexMonAlg.h"
-#include "InDetGlobalMonitoringRun3Test/InDetGlobalBeamSpotMonAlg.h"
+#include "../InDetGlobalTrackMonAlg.h"
+#include "../InDetGlobalPrimaryVertexMonAlg.h"
+#include "../InDetGlobalBeamSpotMonAlg.h"
 
 DECLARE_COMPONENT( InDetGlobalTrackMonAlg )
 DECLARE_COMPONENT( InDetGlobalPrimaryVertexMonAlg )
diff --git a/LArCalorimeter/LArMonitoring/src/LArAffectedRegionsAlg.cxx b/LArCalorimeter/LArMonitoring/src/LArAffectedRegionsAlg.cxx
index d932d56433ab..d49ff569bba7 100644
--- a/LArCalorimeter/LArMonitoring/src/LArAffectedRegionsAlg.cxx
+++ b/LArCalorimeter/LArMonitoring/src/LArAffectedRegionsAlg.cxx
@@ -432,7 +432,7 @@ LArAffectedRegionsAlg::fillHistograms( const EventContext& ctx ) const
     }
     
     // FCAL
-    ATH_MSG_INFO("layermin=" << layermin << " layermin-21=" << layermin-21);
+    ATH_MSG_DEBUG("layermin=" << layermin << " layermin-21=" << layermin-21);
     if(layermin>=21 && layermin<=23){
       //set the group to fill(only depends on layer)
       std::string fcal_layer_name=m_MonGroupName;
-- 
GitLab


From 16adc5e9e6c6b01b3d403b371ebc552bfc15744d Mon Sep 17 00:00:00 2001
From: Pavol Strizenec <pavol.strizenec@cern.ch>
Date: Mon, 5 Oct 2020 17:15:45 +0000
Subject: [PATCH 205/403] Protect against Latome ROB fragments in bytestream

---
 .../LArByteStream/LArRawDataContByteStreamTool.icc          | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/LArCalorimeter/LArCnv/LArByteStream/LArByteStream/LArRawDataContByteStreamTool.icc b/LArCalorimeter/LArCnv/LArByteStream/LArByteStream/LArRawDataContByteStreamTool.icc
index 2f4b3472faa9..0995b390c826 100644
--- a/LArCalorimeter/LArCnv/LArByteStream/LArByteStream/LArRawDataContByteStreamTool.icc
+++ b/LArCalorimeter/LArCnv/LArByteStream/LArByteStream/LArRawDataContByteStreamTool.icc
@@ -47,7 +47,13 @@ StatusCode LArRawDataContByteStreamTool::convert(const RawEvent* re, COLLECTION*
             try {
               OFFLINE_FRAGMENTS_NAMESPACE::PointerType p;
 	      OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment robFrag(*rob_add);
+              uint32_t fragSourceID = robFrag.rod_source_id();
             
+              if( fragSourceID & 0x1000 ){
+                  ATH_MSG_DEBUG(" skip Latome fragment with source ID "<< std::hex << fragSourceID);
+                  continue;
+              }
+
 	      if (!m_decoder->check_valid (&robFrag, msg())) {
 	        ATH_MSG_WARNING ( "Error reading bytestream event: "
                                   << "Invalid ROB fragment for source ID " << robFrag.rod_source_id() );
-- 
GitLab


From 1e4cfb41ecf57e21392f6a72fca0926df74872df Mon Sep 17 00:00:00 2001
From: Bertrand Martin Dit Latour <bertrand.martindl@cern.ch>
Date: Mon, 5 Oct 2020 17:54:05 +0000
Subject: [PATCH 206/403] auRecTools: use consistently tau track IP w.r.t. tau
 vertex

Hello,

This MR is harmonising the use of tau track IP and IP significance parameters across the tau reconstruction.
We now use everywhere the impact parameters w.r.t. the tau vertex instead of w.r.t. beam line (relevant for d0).
New methods are introduced to retrieve the track IP and IP significances directly from the tau track (before, we would use e.g. d0 from the associated TrackParticle, i.e. d0 w.r.t. the beam line).

Because we need track IPs early in the reconstruction (right after tau vertex finding and tau track association, and before tau track classification), I had to move the track IP calculation from TauVertexVariables to TauTrackFinder, as TauVertexVariables is scheduled late in the reconstruction chain.

Two variables have been discontinued: TauJetsAux.ipSigLeadTrk TauJetsAux.ipZ0SinThetaSigLeadTrk. These are track IPs defined for the leading track. Now that we compute these for all tau tracks, we can drop these "leading track" variables.

Using standalone tau reconstruction from ESD, I have checked that the tau reconstruction output is unchanged if I fall back to the "old" calculations for track IPs, i.e. if I set d0TJVA = track()->d0(), and z0sinthetaTJVA = z0sinThetaTJVA(tau) in Track_v1.
Meaning, this MR is mostly code reorganisation. The only modification that changes the reconstruction is the new definition of d0TJVA and z0sinthetaTJVA.
With these new definitions, we get slight changes on the BDT ID score and the RNN ID score, as well as the track classification scores, as expected.

Cheers,
Bertrand
---
 Event/xAOD/xAODTau/Root/TauTrack_v1.cxx       | 31 ++++--
 .../xAODTau/xAODTau/versions/TauTrack_v1.h    | 15 ++-
 .../tauRec/python/TauAlgorithmsHolder.py      |  2 +-
 .../tauRec/python/TauRecRunConfigured.py      |  7 +-
 Reconstruction/tauRec/python/TauRecRunner.py  |  3 +-
 .../tauRec/share/tauRec_jobOptions.py         |  2 +-
 Reconstruction/tauRec/src/TauProcessorAlg.cxx |  2 -
 .../tauRecTools/Root/TauIDVarCalculator.cxx   |  6 +-
 .../tauRecTools/Root/TauJetRNNUtils.cxx       | 19 ++--
 .../tauRecTools/Root/TauTrackClassifier.cxx   | 21 ++---
 .../Root/TauTrackRNNClassifier.cxx            | 10 +-
 .../tauRecTools/src/TauTrackFinder.cxx        | 54 ++++++++++-
 .../tauRecTools/src/TauTrackFinder.h          | 17 ++--
 .../tauRecTools/src/TauVertexVariables.cxx    | 94 ++-----------------
 .../tauRecTools/src/TauVertexVariables.h      |  5 -
 .../python/TrigTauAlgorithmsHolder.py         |  4 +-
 16 files changed, 135 insertions(+), 157 deletions(-)

diff --git a/Event/xAOD/xAODTau/Root/TauTrack_v1.cxx b/Event/xAOD/xAODTau/Root/TauTrack_v1.cxx
index 253665627e41..24ef62ab567e 100644
--- a/Event/xAOD/xAODTau/Root/TauTrack_v1.cxx
+++ b/Event/xAOD/xAODTau/Root/TauTrack_v1.cxx
@@ -103,6 +103,7 @@ namespace xAOD {
   // AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( TauTrack_v1, float, rConvII, setRConvII)
   // AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( TauTrack_v1, float, dRJetSeedAxis, setDRJetSeedAxis)
 
+  // superseded by z0sinthetaTJVA()
   float TauTrack_v1::z0sinThetaTJVA(const xAOD::IParticle& part ) const{
     const xAOD::TrackParticle* xTrackParticle = this->track();
     const xAOD::TauJet* tau = dynamic_cast<const xAOD::TauJet*> (&part);
@@ -119,14 +120,32 @@ namespace xAOD {
     }
   }
 
-  float TauTrack_v1::rConv(const xAOD::IParticle& ) const{
-    const xAOD::TrackParticle* xTrackParticle = this->track();
-    return std::sqrt(std::fabs(xTrackParticle->d0())*xTrackParticle->pt()/(.3 /*0.15*2.*/));
+  static const SG::AuxElement::Accessor< float > d0TJVAAcc( "d0TJVA" );
+  float TauTrack_v1::d0TJVA() const {
+    return d0TJVAAcc(*this);
   }
 
-  float TauTrack_v1::rConvII(const xAOD::IParticle& ) const{
-    const xAOD::TrackParticle* xTrackParticle = this->track();
-    return std::sqrt( std::fabs( xTrackParticle->d0() * xTrackParticle->pt() ) / (0.3)  )*(xTrackParticle->d0()/fabs(xTrackParticle->d0()))*xTrackParticle->charge();
+  static const SG::AuxElement::Accessor< float > d0SigTJVAAcc( "d0SigTJVA" );  
+  float TauTrack_v1::d0SigTJVA() const {
+    return d0SigTJVAAcc(*this);
+  }
+
+  static const SG::AuxElement::Accessor< float > z0sinthetaTJVAAcc( "z0sinthetaTJVA" );
+  float TauTrack_v1::z0sinthetaTJVA() const {
+    return z0sinthetaTJVAAcc(*this);
+  }
+
+  static const SG::AuxElement::Accessor< float > z0sinthetaSigTJVAAcc( "z0sinthetaSigTJVA" );
+  float TauTrack_v1::z0sinthetaSigTJVA() const {
+    return z0sinthetaSigTJVAAcc(*this);
+  }
+
+  float TauTrack_v1::rConv() const{
+    return std::sqrt(std::fabs(this->d0TJVA())*this->pt()/(0.3 /*0.15*2.*/));
+  }
+
+  float TauTrack_v1::rConvII() const{
+    return std::sqrt( std::fabs( this->d0TJVA() * this->pt() ) / (0.3)  )*(this->d0TJVA()/fabs(this->d0TJVA()))*this->track()->charge();
   }
 
   float TauTrack_v1::dRJetSeedAxis(const xAOD::IParticle& part) const{
diff --git a/Event/xAOD/xAODTau/xAODTau/versions/TauTrack_v1.h b/Event/xAOD/xAODTau/xAODTau/versions/TauTrack_v1.h
index fe831abb9c9f..b197f37ae760 100644
--- a/Event/xAOD/xAODTau/xAODTau/versions/TauTrack_v1.h
+++ b/Event/xAOD/xAODTau/xAODTau/versions/TauTrack_v1.h
@@ -1,7 +1,5 @@
-// Dear emacs, this is -*- c++ -*-
-
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef XAODTAU_VERSIONS_TAUTRACK_V1_H
@@ -67,9 +65,16 @@ namespace xAOD {
     // additional bdt input variables
     float z0sinThetaTJVA(const xAOD::IParticle&) const;
     //    void setZ0sinThetaTJVA(float z0sinThetaTJVA);
-    float rConv(const xAOD::IParticle&) const;
+
+    // track IP w.r.t. TJVA vertex
+    float d0TJVA() const;
+    float d0SigTJVA() const;
+    float z0sinthetaTJVA() const;
+    float z0sinthetaSigTJVA() const;
+
+    float rConv() const;
     //    void setRConv(float rConv);
-    float rConvII(const xAOD::IParticle&) const;
+    float rConvII() const;
     //    void setRConvII(float rConvII);
     float dRJetSeedAxis(const xAOD::IParticle&) const;
     //    void setDRJetSeedAxis(float dRJetSeedAxis);
diff --git a/Reconstruction/tauRec/python/TauAlgorithmsHolder.py b/Reconstruction/tauRec/python/TauAlgorithmsHolder.py
index bd7199b0e902..080de883f7f8 100644
--- a/Reconstruction/tauRec/python/TauAlgorithmsHolder.py
+++ b/Reconstruction/tauRec/python/TauAlgorithmsHolder.py
@@ -291,7 +291,6 @@ def getTauVertexVariables():
 
     from tauRecTools.tauRecToolsConf import TauVertexVariables
     TauVertexVariables = TauVertexVariables(  name = _name,
-                                              TrackToVertexIPEstimator = getTauTrackToVertexIPEstimator(),
                                               VertexFitter = getTauAdaptiveVertexFitter(),
                                               SeedFinder = getTauCrossDistancesSeedFinder(),
                                               )
@@ -665,6 +664,7 @@ def getTauTrackFinder(removeDuplicateTracks=True):
                                     tauParticleCache = getParticleCache(),
                                     removeDuplicateCoreTracks = removeDuplicateTracks,
                                     Key_trackPartInputContainer = _DefaultTrackContainer,
+                                    TrackToVertexIPEstimator = getTauTrackToVertexIPEstimator(),
                                     #maxDeltaZ0wrtLeadTrk = 2, #in mm
                                     #removeTracksOutsideZ0wrtLeadTrk = True
                                     )
diff --git a/Reconstruction/tauRec/python/TauRecRunConfigured.py b/Reconstruction/tauRec/python/TauRecRunConfigured.py
index e43f0143ed5f..1112fdd4f3ec 100644
--- a/Reconstruction/tauRec/python/TauRecRunConfigured.py
+++ b/Reconstruction/tauRec/python/TauRecRunConfigured.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
 
 ################################################################################
 ##
@@ -57,13 +57,8 @@ class TauRecRunConfigured ( Configured ) :
         from AthenaCommon.AppMgr import ToolSvc
         from tauRec.tauRecFlags import tauFlags
         for tool in tools :
-            # if tool.__slots__['calibFolder'].count('TauDiscriminant'):
-            #     tool.calibFolder = tauFlags.TauDiscriminantCVMFSPath()
-            # else :
-            #     tool.calibFolder = tauFlags.tauRecToolsCVMFSPath()
             tool.calibFolder = tauFlags.tauRecToolsCVMFSPath()
             if tool not in ToolSvc : ToolSvc += tool
-            pass
 
     def TauRunnerAlgHandle(self):
         return self._TauRunnerAlgHandle
diff --git a/Reconstruction/tauRec/python/TauRecRunner.py b/Reconstruction/tauRec/python/TauRecRunner.py
index 42613a673f93..45af59f4640d 100644
--- a/Reconstruction/tauRec/python/TauRecRunner.py
+++ b/Reconstruction/tauRec/python/TauRecRunner.py
@@ -42,10 +42,9 @@ class TauRecRunner ( TauRecRunConfigured ) :
   
     _output     = { _outputType:_outputKey , _outputAuxType:_outputAuxKey }
     
-    def __init__(self, name = "TauRecRunner",doPi0Clus=False, doTJVA=False):
+    def __init__(self, name = "TauRecRunner",doPi0Clus=False):
         self.name = name
         self.doPi0Clus = doPi0Clus
-        self.do_TJVA = doTJVA # not used in the TauRecRunner?
         TauRecRunConfigured.__init__(self, name)
 
 
diff --git a/Reconstruction/tauRec/share/tauRec_jobOptions.py b/Reconstruction/tauRec/share/tauRec_jobOptions.py
index 7523c60066c9..fb791607f514 100644
--- a/Reconstruction/tauRec/share/tauRec_jobOptions.py
+++ b/Reconstruction/tauRec/share/tauRec_jobOptions.py
@@ -27,4 +27,4 @@ if _doPi0Clus:
     include("tauRec/Pi0ClusterMaker_jobOptions.py")
 
 from tauRec.TauRecRunner import TauRecRunner
-TauRecRunner(doPi0Clus=_doPi0Clus, doTJVA=_doTJVA)
+TauRecRunner(doPi0Clus=_doPi0Clus)
diff --git a/Reconstruction/tauRec/src/TauProcessorAlg.cxx b/Reconstruction/tauRec/src/TauProcessorAlg.cxx
index 3d7d313906c4..717b5996e3dd 100644
--- a/Reconstruction/tauRec/src/TauProcessorAlg.cxx
+++ b/Reconstruction/tauRec/src/TauProcessorAlg.cxx
@@ -7,7 +7,6 @@
 #include "xAODJet/Jet.h"
 #include "xAODJet/JetContainer.h"
 
-#include "xAODTau/TauJetContainer.h"
 #include "xAODTau/TauJetAuxContainer.h"
 #include "xAODTau/TauDefs.h"
 #include "xAODTau/TauTrackContainer.h"
@@ -17,7 +16,6 @@
 #include "StoreGate/ReadHandle.h"
 #include "StoreGate/WriteHandle.h"
 
-#include "CaloInterface/ICaloCellMakerTool.h"
 #include "NavFourMom/INavigable4MomentumCollection.h"
 
 using Gaudi::Units::GeV;
diff --git a/Reconstruction/tauRecTools/Root/TauIDVarCalculator.cxx b/Reconstruction/tauRecTools/Root/TauIDVarCalculator.cxx
index 1c6e8997e496..b2606be19621 100644
--- a/Reconstruction/tauRecTools/Root/TauIDVarCalculator.cxx
+++ b/Reconstruction/tauRecTools/Root/TauIDVarCalculator.cxx
@@ -35,10 +35,8 @@ StatusCode TauIDVarCalculator::initialize()
 StatusCode TauIDVarCalculator::execute(xAOD::TauJet& tau) const
 {
   static const SG::AuxElement::Accessor<float> acc_absipSigLeadTrk("absipSigLeadTrk");
-  float ipSigLeadTrk=0.;
-  if(!tau.detail(xAOD::TauJetParameters::ipSigLeadTrk, ipSigLeadTrk))
-    return StatusCode::FAILURE;
-  acc_absipSigLeadTrk(tau) = std::abs(ipSigLeadTrk);
+
+  acc_absipSigLeadTrk(tau) = (tau.nTracks()>0) ? std::abs(tau.track(0)->d0SigTJVA()) : 0.;
   
   if(inTrigger()) return StatusCode::SUCCESS;
   
diff --git a/Reconstruction/tauRecTools/Root/TauJetRNNUtils.cxx b/Reconstruction/tauRecTools/Root/TauJetRNNUtils.cxx
index 2e3737ceb981..5418e2a5db42 100644
--- a/Reconstruction/tauRecTools/Root/TauJetRNNUtils.cxx
+++ b/Reconstruction/tauRecTools/Root/TauJetRNNUtils.cxx
@@ -187,10 +187,9 @@ bool innerTrkAvgDist(const xAOD::TauJet &tau, double &out) {
 }
 
 bool absipSigLeadTrk(const xAOD::TauJet &tau, double &out) {
-    float ipSigLeadTrk;
-    const auto success = tau.detail(TauDetail::ipSigLeadTrk, ipSigLeadTrk);
-    out = std::min(TMath::Abs(ipSigLeadTrk), 30.0f);
-    return success;
+    float ipSigLeadTrk = (tau.nTracks()>0) ? tau.track(0)->d0SigTJVA() : 0.;
+    out = std::min(std::abs(ipSigLeadTrk), 30.0f);
+    return true;
 }
 
 bool SumPtTrkFrac(const xAOD::TauJet &tau, double &out) {
@@ -360,13 +359,13 @@ bool pt_jetseed_log(const xAOD::TauJet &tau, const xAOD::TauTrack& /*track*/,
 
 bool d0_abs_log(const xAOD::TauJet& /*tau*/, const xAOD::TauTrack &track,
                 double &out) {
-    out = std::log10(TMath::Abs(track.track()->d0()) + 1e-6);
+    out = std::log10(TMath::Abs(track.d0TJVA()) + 1e-6);
     return true;
 }
 
-bool z0sinThetaTJVA_abs_log(const xAOD::TauJet& tau, const xAOD::TauTrack &track,
+bool z0sinThetaTJVA_abs_log(const xAOD::TauJet& /*tau*/, const xAOD::TauTrack &track,
                             double &out) {
-    out = std::log10(TMath::Abs(track.z0sinThetaTJVA(tau)) + 1e-6);
+    out = std::log10(TMath::Abs(track.z0sinthetaTJVA()) + 1e-6);
     return true;
 }
 
@@ -496,7 +495,7 @@ bool CENTER_LAMBDA(const xAOD::TauJet& /*tau*/, const xAOD::CaloCluster &cluster
     return success;
 }
 
-bool SECOND_LAMBDAOverClustersMeanSecondLambda   (const xAOD::TauJet &tau, const xAOD::CaloCluster &cluster, double &out){
+bool SECOND_LAMBDAOverClustersMeanSecondLambda(const xAOD::TauJet &tau, const xAOD::CaloCluster &cluster, double &out) {
   float ClustersMeanSecondLambda = tau.auxdata<float>("ClustersMeanSecondLambda");
 
   double secondLambda(0);
@@ -507,7 +506,7 @@ bool SECOND_LAMBDAOverClustersMeanSecondLambda   (const xAOD::TauJet &tau, const
   return success;
 }
 
-bool CENTER_LAMBDAOverClustersMeanCenterLambda   (const xAOD::TauJet &tau, const xAOD::CaloCluster &cluster, double &out){
+bool CENTER_LAMBDAOverClustersMeanCenterLambda(const xAOD::TauJet &tau, const xAOD::CaloCluster &cluster, double &out) {
   float ClustersMeanCenterLambda = tau.auxdata<float>("ClustersMeanCenterLambda");
 
   double centerLambda(0);
@@ -524,7 +523,7 @@ bool CENTER_LAMBDAOverClustersMeanCenterLambda   (const xAOD::TauJet &tau, const
 }
 
 
-bool FirstEngDensOverClustersMeanFirstEngDens    (const xAOD::TauJet &tau, const xAOD::CaloCluster &cluster, double &out){
+bool FirstEngDensOverClustersMeanFirstEngDens(const xAOD::TauJet &tau, const xAOD::CaloCluster &cluster, double &out) {
   // the ClustersMeanFirstEngDens is the log10 of the energy weighted average of the First_ENG_DENS 
   // divided by ETot to make it dimension-less, 
   // so we need to evaluate the differance of log10(clusterFirstEngDens/clusterTotalEnergy) and the ClustersMeanFirstEngDens
diff --git a/Reconstruction/tauRecTools/Root/TauTrackClassifier.cxx b/Reconstruction/tauRecTools/Root/TauTrackClassifier.cxx
index d669aabd04fa..f320f1f94a76 100644
--- a/Reconstruction/tauRecTools/Root/TauTrackClassifier.cxx
+++ b/Reconstruction/tauRecTools/Root/TauTrackClassifier.cxx
@@ -81,7 +81,6 @@ StatusCode TauTrackClassifier::executeTrackClassifier(xAOD::TauJet& xTau, xAOD::
   }
   xTau.setDetail(xAOD::TauJetParameters::nModifiedIsolationTracks, (int) xTau.nTracks(xAOD::TauJetParameters::modifiedIsolationTrack));
 
-
   return StatusCode::SUCCESS;
 }
 
@@ -198,14 +197,14 @@ StatusCode TrackMVABDT::calculateVariables(const xAOD::TauTrack& xTrack, const x
   valueMap["TracksAuxDyn.jetSeedPt"] = xTau.ptJetSeed();
   valueMap["TracksAuxDyn.tauPt"] = xTau.ptIntermediateAxis();
   valueMap["TracksAuxDyn.tauEta"] = xTau.etaIntermediateAxis();
-  valueMap["TracksAuxDyn.z0sinThetaTJVA"] = xTrack.z0sinThetaTJVA(xTau);
-  valueMap["TracksAuxDyn.rConv"] = xTrack.rConv(xTau);
-  valueMap["TracksAuxDyn.rConvII"] = xTrack.rConvII(xTau);
-  valueMap["TauTracksAuxDyn.rConv/TauTracksAuxDyn.rConvII"] = xTrack.rConv(xTau)/xTrack.rConvII(xTau);
+  valueMap["TracksAuxDyn.z0sinThetaTJVA"] = xTrack.z0sinthetaTJVA();
+  valueMap["TracksAuxDyn.rConv"] = xTrack.rConv();
+  valueMap["TracksAuxDyn.rConvII"] = xTrack.rConvII();
+  valueMap["TauTracksAuxDyn.rConv/TauTracksAuxDyn.rConvII"] = xTrack.rConv()/xTrack.rConvII();
   valueMap["TracksAuxDyn.DRJetSeedAxis"] = xTrack.dRJetSeedAxis(xTau);
   valueMap["TracksAuxDyn.dRJetSeedAxis"] = xTrack.dRJetSeedAxis(xTau);
   valueMap["TracksAuxDyn.trackEta"] = xTrackParticle->eta();
-  valueMap["TracksAux.d0"] = xTrackParticle->d0();
+  valueMap["TracksAux.d0"] = xTrack.d0TJVA();
   valueMap["TracksAux.qOverP"] = xTrackParticle->qOverP();
   valueMap["TracksAux.theta"] = xTrackParticle->theta();
   valueMap["TracksAux.eProbabilityHT"] = fTracksEProbabilityHT;
@@ -224,13 +223,13 @@ StatusCode TrackMVABDT::calculateVariables(const xAOD::TauTrack& xTrack, const x
   valueMap["TauTracksAuxDyn.jetSeedPt"] = xTau.ptJetSeed();
   valueMap["TauTracksAuxDyn.tauPt"] = xTau.ptIntermediateAxis();
   valueMap["TauTracksAuxDyn.tauEta"] = xTau.etaIntermediateAxis();
-  valueMap["TauTracksAuxDyn.z0sinThetaTJVA"] = xTrack.z0sinThetaTJVA(xTau);
-  valueMap["TauTracksAuxDyn.rConv"] = xTrack.rConv(xTau);
-  valueMap["TauTracksAuxDyn.rConvII"] = xTrack.rConvII(xTau);
-  valueMap["TauTracksAuxDyn.rConv/TauTracksAuxDyn.rConvII"] = xTrack.rConv(xTau)/xTrack.rConvII(xTau);
+  valueMap["TauTracksAuxDyn.z0sinThetaTJVA"] = xTrack.z0sinthetaTJVA();
+  valueMap["TauTracksAuxDyn.rConv"] = xTrack.rConv();
+  valueMap["TauTracksAuxDyn.rConvII"] = xTrack.rConvII();
+  valueMap["TauTracksAuxDyn.rConv/TauTracksAuxDyn.rConvII"] = xTrack.rConv()/xTrack.rConvII();
   valueMap["TauTracksAuxDyn.dRJetSeedAxis"] = xTrack.dRJetSeedAxis(xTau);
   valueMap["TauTracksAuxDyn.trackEta"] = xTrackParticle->eta();
-  valueMap["TauTracksAuxDyn.d0"] = xTrackParticle->d0();
+  valueMap["TauTracksAuxDyn.d0"] = xTrack.d0TJVA();
   valueMap["TauTracksAuxDyn.qOverP"] = xTrackParticle->qOverP();
   valueMap["TauTracksAuxDyn.theta"] = xTrackParticle->theta();
   valueMap["TauTracksAuxDyn.eProbabilityHT"] = fTracksEProbabilityHT;
diff --git a/Reconstruction/tauRecTools/Root/TauTrackRNNClassifier.cxx b/Reconstruction/tauRecTools/Root/TauTrackRNNClassifier.cxx
index 71b34dc43e82..d779e8d230de 100644
--- a/Reconstruction/tauRecTools/Root/TauTrackRNNClassifier.cxx
+++ b/Reconstruction/tauRecTools/Root/TauTrackRNNClassifier.cxx
@@ -272,11 +272,11 @@ StatusCode TrackRNN::calulateVars(const std::vector<xAOD::TauTrack*>& vTracks, c
     double fTrackPt = xTrackParticle->pt();
     double fTrackEta = xTrackParticle->eta();
     double fTrackCharge = xTrackParticle->charge();
-    double fZ0SinthetaTJVA = xTrack->z0sinThetaTJVA(xTau);
-    double fRConv = xTrack->rConv(xTau);
-    double fRConvII = xTrack->rConvII(xTau);
+    double fZ0SinthetaTJVA = xTrack->z0sinthetaTJVA();
+    double fRConv = xTrack->rConv();
+    double fRConvII = xTrack->rConvII();
     double fDRJetSeedAxis = xTrack->dRJetSeedAxis(xTau);
-    double fD0 = xTrackParticle->d0();
+    double fD0 = xTrack->d0TJVA();
     double fQoverP = xTrackParticle->qOverP();
 
     uint8_t iTracksNumberOfInnermostPixelLayerHits = 0; ATH_CHECK( xTrackParticle->summaryValue(iTracksNumberOfInnermostPixelLayerHits, xAOD::numberOfInnermostPixelLayerHits) );
@@ -306,7 +306,7 @@ StatusCode TrackRNN::calulateVars(const std::vector<xAOD::TauTrack*>& vTracks, c
     valueMap["log(rConv)"][i] = std::log(fRConv);
     valueMap["tanh(rConvII/500)"][i] = std::tanh(fRConvII/500.0);
     valueMap["dRJetSeedAxis"][i] = fDRJetSeedAxis;
-    valueMap["tanh(d0/10)"][i] = std::tanh(fD0/10);
+    valueMap["tanh(d0/10)"][i] = std::tanh(fD0/10.);
     valueMap["qOverP*1000"][i] = fQoverP*1000.0;
     valueMap["numberOfInnermostPixelLayerHits"][i] = (float) iTracksNumberOfInnermostPixelLayerHits;
     valueMap["numberOfPixelSharedHits"][i] = (float) iTracksNPixelSharedHits;
diff --git a/Reconstruction/tauRecTools/src/TauTrackFinder.cxx b/Reconstruction/tauRecTools/src/TauTrackFinder.cxx
index 7819dcef8aa0..829ba59ab80c 100644
--- a/Reconstruction/tauRecTools/src/TauTrackFinder.cxx
+++ b/Reconstruction/tauRecTools/src/TauTrackFinder.cxx
@@ -30,13 +30,18 @@ StatusCode TauTrackFinder::initialize() {
     ATH_CHECK( m_trackSelectorTool_tau.retrieve() );
     ATH_CHECK( m_trackToVertexTool.retrieve() );
     ATH_CHECK( m_caloExtensionTool.retrieve() );
-    
+    ATH_CHECK( m_trackToVertexIPEstimator.retrieve() );
+
     // initialize ReadHandleKey
     // allow empty for trigger
     ATH_CHECK( m_trackPartInputContainer.initialize(SG::AllowEmpty) );
     // use CaloExtensionTool when key is empty 
     ATH_CHECK( m_ParticleCacheKey.initialize(SG::AllowEmpty) );
 
+    if (inTrigger()) {
+      ATH_CHECK(m_beamSpotKey.initialize());
+    }
+
     return StatusCode::SUCCESS;
 }
 
@@ -198,6 +203,53 @@ StatusCode TauTrackFinder::executeTrackFinder(xAOD::TauJet& pTau, xAOD::TauTrack
   ATH_MSG_DEBUG("numTrack: " << "/" << pTau.nTracks());
   ATH_MSG_DEBUG("charge: " << "/" << pTau.charge());
 
+  // impact parameter variables w.r.t. tau vertex 
+  const xAOD::Vertex* vxcand = nullptr;
+
+  xAOD::Vertex theBeamspot;
+  theBeamspot.makePrivateStore();
+
+  if (inTrigger()) { // online: use beamspot
+    SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
+    if(beamSpotHandle.isValid()) {
+      theBeamspot.setPosition(beamSpotHandle->beamPos());
+      const auto& cov = beamSpotHandle->beamVtx().covariancePosition();
+      theBeamspot.setCovariancePosition(cov);
+      vxcand = &theBeamspot;
+    }
+    else {
+      ATH_MSG_DEBUG("No Beamspot object in tau candidate");
+    }
+  }
+  else if (pTau.vertexLink().isValid() && pTau.vertex()->vertexType() != xAOD::VxType::NoVtx) {
+    vxcand = pTau.vertex();
+  }
+
+  static const SG::AuxElement::Decorator<float> dec_d0TJVA("d0TJVA");
+  static const SG::AuxElement::Decorator<float> dec_z0sinthetaTJVA("z0sinthetaTJVA");
+  static const SG::AuxElement::Decorator<float> dec_d0SigTJVA("d0SigTJVA");
+  static const SG::AuxElement::Decorator<float> dec_z0sinthetaSigTJVA("z0sinthetaSigTJVA");
+
+  for(auto track : pTau.allTracks()) {      
+    dec_d0TJVA(*track) = track->track()->d0();
+    dec_z0sinthetaTJVA(*track) = track->z0sinThetaTJVA(pTau);
+    dec_d0SigTJVA(*track) = -999.;
+    dec_z0sinthetaSigTJVA(*track) = -999.;
+
+    // in the trigger, z0sintheta and corresponding significance are meaningless if we use the beamspot
+    if(vxcand) {
+      std::unique_ptr<const Trk::ImpactParametersAndSigma> myIPandSigma 
+	= std::unique_ptr<const Trk::ImpactParametersAndSigma>(m_trackToVertexIPEstimator->estimate(track->track(), vxcand));
+      
+      if(myIPandSigma) {
+	dec_d0TJVA(*track) = myIPandSigma->IPd0;
+	dec_z0sinthetaTJVA(*track) = myIPandSigma->IPz0SinTheta;
+	dec_d0SigTJVA(*track) = (myIPandSigma->sigmad0 != 0.) ? (float)( myIPandSigma->IPd0 / myIPandSigma->sigmad0 ) : -999.;
+	dec_z0sinthetaSigTJVA(*track) = (myIPandSigma->sigmaz0SinTheta != 0.) ? (float)( myIPandSigma->IPz0SinTheta / myIPandSigma->sigmaz0SinTheta ) : -999.;
+      }
+    }
+  }
+
   // extrapolate core tracks to calorimeter surface
   // store information only in ExtraDetailsContainer
   if(!m_bypassExtrapolator)
diff --git a/Reconstruction/tauRecTools/src/TauTrackFinder.h b/Reconstruction/tauRecTools/src/TauTrackFinder.h
index 42888b907383..0850ce3b5f3a 100644
--- a/Reconstruction/tauRecTools/src/TauTrackFinder.h
+++ b/Reconstruction/tauRecTools/src/TauTrackFinder.h
@@ -16,11 +16,11 @@
 #include "xAODTracking/TrackParticle.h"
 #include "xAODTracking/TrackParticleContainer.h"
 
-#include "VxVertex/RecVertex.h"
-
 #include "InDetTrackSelectionTool/IInDetTrackSelectionTool.h"
 #include "TrkToolInterfaces/ITrackSelectorTool.h"
 #include "RecoToolInterfaces/IParticleCaloExtensionTool.h"
+#include "TrkVertexFitterInterfaces/ITrackToVertexIPEstimator.h"
+#include "BeamSpotConditionsData/BeamSpotData.h"
 
 /////////////////////////////////////////////////////////////////////////////
 
@@ -95,23 +95,22 @@ private:
     ToolHandle<Trk::IParticleCaloExtensionTool> m_caloExtensionTool {this, "ParticleCaloExtensionTool", "Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool", "Tool for the extrapolation of charged tracks"};
     ToolHandle<Trk::ITrackSelectorTool> m_trackSelectorTool_tau {this, "TrackSelectorToolTau", "", "Tool for track selection"};
     ToolHandle<Reco::ITrackToVertex> m_trackToVertexTool {this, "TrackToVertexTool", "Reco::TrackToVertex"};
-    //output particle calo extension collection
-    SG::ReadHandleKey<CaloExtensionCollection>  m_ParticleCacheKey{this,
-      "tauParticleCache", "ParticleCaloExtension", "Name of the particle measurement extrapolation cache for TauTrackFinder"};
+    ToolHandle<Trk::ITrackToVertexIPEstimator> m_trackToVertexIPEstimator {this, "TrackToVertexIPEstimator", ""};
     
     Gaudi::Property<double>  m_maxJetDr_tau {this, "MaxJetDrTau", 0.2};
-    Gaudi::Property<double> m_maxJetDr_wide {this, "MaxJetDrWide", 0.4};
-   
+    Gaudi::Property<double> m_maxJetDr_wide {this, "MaxJetDrWide", 0.4};   
     Gaudi::Property<bool> m_applyZ0cut {this, "removeTracksOutsideZ0wrtLeadTrk", false};
-    Gaudi::Property<float> m_z0maxDelta {this, "maxDeltaZ0wrtLeadTrk", 1000};
-    
+    Gaudi::Property<float> m_z0maxDelta {this, "maxDeltaZ0wrtLeadTrk", 1000};    
     Gaudi::Property<bool> m_storeInOtherTrks {this, "StoreRemovedCoreWideTracksInOtherTracks", true};
     Gaudi::Property<bool> m_removeDuplicateCoreTracks {this, "removeDuplicateCoreTracks", true};
     Gaudi::Property<bool> m_bypassSelector {this, "BypassSelector", false};
     Gaudi::Property<bool> m_bypassExtrapolator {this, "BypassExtrapolator", false};
 
     SG::ReadHandleKey<xAOD::TrackParticleContainer> m_trackPartInputContainer{this,"Key_trackPartInputContainer", "InDetTrackParticles", "input track particle container key"};
+    SG::ReadHandleKey<CaloExtensionCollection>  m_ParticleCacheKey{this,"tauParticleCache", "ParticleCaloExtension", "Name of the particle measurement extrapolation cache for TauTrackFinder"};
     
+    SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
+
     std::set<CaloSampling::CaloSample> m_EMSamplings;
     std::set<CaloSampling::CaloSample> m_HadSamplings;
 };
diff --git a/Reconstruction/tauRecTools/src/TauVertexVariables.cxx b/Reconstruction/tauRecTools/src/TauVertexVariables.cxx
index b8ce1f397581..5af776c5628a 100644
--- a/Reconstruction/tauRecTools/src/TauVertexVariables.cxx
+++ b/Reconstruction/tauRecTools/src/TauVertexVariables.cxx
@@ -35,14 +35,9 @@ TauVertexVariables::~TauVertexVariables() {
 
 StatusCode TauVertexVariables::initialize() {
   
-  ATH_CHECK( m_trackToVertexIPEstimator.retrieve() );
   ATH_CHECK( m_fitTool.retrieve() );
   ATH_CHECK( m_SeedFinder.retrieve() );
 
-  if (inTrigger()) {
-    ATH_CHECK(m_beamSpotKey.initialize());
-  }
-
   return StatusCode::SUCCESS;
 }
 
@@ -51,76 +46,6 @@ StatusCode TauVertexVariables::initialize() {
 //-----------------------------------------------------------------------------
 StatusCode TauVertexVariables::executeVertexVariables(xAOD::TauJet& pTau, xAOD::VertexContainer& pSecVtxContainer) const {
 
-  // impact parameter variables for standard tracks
-  if (pTau.nTracks() > 0) {
-
-    std::unique_ptr<const Trk::ImpactParametersAndSigma> myIPandSigma;
-    const xAOD::Vertex* vxcand = nullptr;
-
-    xAOD::Vertex theBeamspot;
-    theBeamspot.makePrivateStore();
-
-    if (inTrigger()) { // online: use beamspot
-      SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
-      if(beamSpotHandle.isValid()){
-        theBeamspot.setPosition(beamSpotHandle->beamPos());
-        const auto& cov = beamSpotHandle->beamVtx().covariancePosition();
-        theBeamspot.setCovariancePosition(cov);
-        vxcand = &theBeamspot;
-
-	myIPandSigma = std::unique_ptr<const Trk::ImpactParametersAndSigma>(m_trackToVertexIPEstimator->estimate(pTau.track(0)->track(), vxcand));
-      }
-      else {
-        ATH_MSG_DEBUG("No Beamspot object in tau candidate");
-      }
-    }
-    else if (pTau.vertexLink().isValid()) { // offline: obtain tau vertex by link
-      vxcand = pTau.vertex() ;
-      //check if vertex has a valid type (skip if vertex has type NoVtx)
-      if (vxcand->vertexType() != xAOD::VxType::NoVtx) {
-	myIPandSigma = std::unique_ptr<const Trk::ImpactParametersAndSigma>(m_trackToVertexIPEstimator->estimate(pTau.track(0)->track(), vxcand));
-      }
-    }
-
-    if (myIPandSigma) {
-      // kept for now, but will be discontinued as we now store these for all tracks, not only the leading one
-      pTau.setDetail(xAOD::TauJetParameters::ipSigLeadTrk, (float)( myIPandSigma->IPd0 / myIPandSigma->sigmad0 ));
-      pTau.setDetail(xAOD::TauJetParameters::ipZ0SinThetaSigLeadTrk, (float)( myIPandSigma->IPz0SinTheta / myIPandSigma->sigmaz0SinTheta ));
-    }
-    else {
-      ATH_MSG_DEBUG("trackToVertexIPestimator failed for a standard track!");
-      pTau.setDetail(xAOD::TauJetParameters::ipSigLeadTrk, (float)(-999.));
-      pTau.setDetail(xAOD::TauJetParameters::ipZ0SinThetaSigLeadTrk, (float)(-999.));
-    }
-
-    // in the trigger, z0sintheta IP and corresponding significance are meaningless if we use the beamspot
-    if(vxcand && (inTrigger() || (!inTrigger() && vxcand->vertexType() != xAOD::VxType::NoVtx))) {
-      static const SG::AuxElement::Decorator<float> dec_d0_TV("d0_TV");
-      static const SG::AuxElement::Decorator<float> dec_z0sintheta_TV("z0sintheta_TV");
-      static const SG::AuxElement::Decorator<float> dec_d0_sig_TV("d0_sig_TV");
-      static const SG::AuxElement::Decorator<float> dec_z0sintheta_sig_TV("z0sintheta_sig_TV");
-
-      for(auto track : pTau.allTracks()) {
-	myIPandSigma = std::unique_ptr<const Trk::ImpactParametersAndSigma>(m_trackToVertexIPEstimator->estimate(track->track(), vxcand));
-	if(myIPandSigma) {
-	  dec_d0_TV(*track) = myIPandSigma->IPd0;
-	  dec_z0sintheta_TV(*track) = myIPandSigma->IPz0SinTheta;
-	  dec_d0_sig_TV(*track) = (myIPandSigma->sigmad0 != 0.) ? (float)( myIPandSigma->IPd0 / myIPandSigma->sigmad0 ) : -999.;
-	  dec_z0sintheta_sig_TV(*track) = (myIPandSigma->sigmaz0SinTheta != 0.) ? (float)( myIPandSigma->IPz0SinTheta / myIPandSigma->sigmaz0SinTheta ) : -999.;
-	}
-	else {
-	  dec_d0_TV(*track) = -999.;
-	  dec_z0sintheta_TV(*track) = -999.;
-	  dec_d0_sig_TV(*track) = -999.;
-	  dec_z0sintheta_sig_TV(*track) = -999.;
-	}
-      }
-    }
-  }
-  else {
-    ATH_MSG_DEBUG("Tau has no tracks");
-  }
-
   pTau.setDetail(xAOD::TauJetParameters::trFlightPathSig, (float)(-1111.));
   
   // try to find secondary vertex if more than 1 track and the tau vertex is available
@@ -135,20 +60,15 @@ StatusCode TauVertexVariables::executeVertexVariables(xAOD::TauJet& pTau, xAOD::
   // reconstruction from xAOD uses Trk::TrackParameters (Trk::Track not available)
   std::vector<const Trk::TrackParameters*> origTrackParameters;
 
-  for (unsigned i = 0; i < pTau.nTracks(); ++i) {
-    xaodTracks.push_back(pTau.track(i)->track());
-
-    if (pTau.track(i)->track()) {
-      if(pTau.track(i)->track()->track()) {
-	origTracks.push_back(pTau.track(i)->track()->track());
-      }
-      else {
-	const Trk::Perigee& perigee = pTau.track(i)->track()->perigeeParameters();
-	origTrackParameters.push_back(static_cast<const Trk::TrackParameters*>(&perigee));
-      }
+  for (const xAOD::TauTrack* track : pTau.tracks()) {
+    xaodTracks.push_back(track->track());
+
+    if(track->track()->track()) {
+      origTracks.push_back(track->track()->track());
     }
     else {
-      ATH_MSG_WARNING("No TrackParticle found.");
+      const Trk::Perigee& perigee = track->track()->perigeeParameters();
+      origTrackParameters.push_back(static_cast<const Trk::TrackParameters*>(&perigee));
     }
   }
 
diff --git a/Reconstruction/tauRecTools/src/TauVertexVariables.h b/Reconstruction/tauRecTools/src/TauVertexVariables.h
index a54aadb3ad39..469cee574aa4 100644
--- a/Reconstruction/tauRecTools/src/TauVertexVariables.h
+++ b/Reconstruction/tauRecTools/src/TauVertexVariables.h
@@ -10,8 +10,6 @@
 #include "tauRecTools/TauRecToolBase.h"
 #include "GaudiKernel/ToolHandle.h"
 
-#include "BeamSpotConditionsData/BeamSpotData.h"
-#include "TrkVertexFitterInterfaces/ITrackToVertexIPEstimator.h"
 #include "TrkVertexFitterInterfaces/IVertexFitter.h"
 #include "TrkVertexFitterInterfaces/IVertexSeedFinder.h"
 
@@ -41,11 +39,8 @@ public:
     double trFlightPathSig(const xAOD::TauJet& pTau, const xAOD::Vertex& secVertex) const;
 
 private:
-    ToolHandle<Trk::ITrackToVertexIPEstimator> m_trackToVertexIPEstimator {this, "TrackToVertexIPEstimator", ""};
     ToolHandle<Trk::IVertexFitter> m_fitTool {this, "VertexFitter", "Trk::AdaptiveVertexFitter"};
     ToolHandle<Trk::IVertexSeedFinder> m_SeedFinder {this, "SeedFinder", "Trk::CrossDistancesSeedFinder"};
-
-    SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };    
 };
 
 #endif	/* TAUREC_TAUVERTEXVARIABLES_H */
diff --git a/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauAlgorithmsHolder.py b/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauAlgorithmsHolder.py
index 322a14c5c333..551d1853df18 100644
--- a/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauAlgorithmsHolder.py
+++ b/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauAlgorithmsHolder.py
@@ -364,7 +364,6 @@ def getTauVertexVariables():
 
     from tauRecTools.tauRecToolsConf import TauVertexVariables
     TauVertexVariables = TauVertexVariables(  name = _name,
-                                              TrackToVertexIPEstimator = getTauTrackToVertexIPEstimator(),
                                               VertexFitter = getTauAdaptiveVertexFitter(),
                                               SeedFinder = getTauCrossDistancesSeedFinder(),
                                               )
@@ -708,7 +707,8 @@ def getTauTrackFinder(applyZ0cut=False, maxDeltaZ0=2, noSelector = False, prefix
                                     removeTracksOutsideZ0wrtLeadTrk = applyZ0cut,
                                     ParticleCaloExtensionTool = getParticleCaloExtensionTool(),
                                     BypassSelector = noSelector,
-                                    BypassExtrapolator = True
+                                    BypassExtrapolator = True,
+                                    TrackToVertexIPEstimator = getTauTrackToVertexIPEstimator()
                                     )
     # Selector not needed for fast-tracks
     # Extrapolator never needed
-- 
GitLab


From 39cec1813970c4e7835ae52469c03e09500cc5c7 Mon Sep 17 00:00:00 2001
From: Frank Berghaus <frank.berghaus@cern.ch>
Date: Mon, 5 Oct 2020 17:57:25 +0000
Subject: [PATCH 207/403] Use the GaudiKernel to handle ouput service interface

The extends template takes care of the onerous tasks of implementing the
functionality required for interactions with the service interface. This
just streamlines the code a bit and ensures the interface accessors are
correctly implemented.
---
 .../ByteStreamCnvSvc/ByteStreamOutputSvc.h    |  27 +-
 Event/ByteStreamCnvSvc/CMakeLists.txt         |  32 +-
 .../python/ByteStreamConfig.py                |  13 +
 .../share/BSEventSelector.ref                 |  69 +-
 .../src/ByteStreamDataWriter.cxx              |  85 ++-
 .../src/ByteStreamDataWriter.h                |  75 ++
 .../src/ByteStreamEventStorageOutputSvc.cxx   | 683 +++++++++---------
 .../src/ByteStreamEventStorageOutputSvc.h     | 227 ++++--
 .../ByteStreamData/ByteStreamMetadata.h       |  14 +-
 9 files changed, 752 insertions(+), 473 deletions(-)

diff --git a/Event/ByteStreamCnvSvc/ByteStreamCnvSvc/ByteStreamOutputSvc.h b/Event/ByteStreamCnvSvc/ByteStreamCnvSvc/ByteStreamOutputSvc.h
index 0871f3c65b40..5d773c986ef7 100644
--- a/Event/ByteStreamCnvSvc/ByteStreamCnvSvc/ByteStreamOutputSvc.h
+++ b/Event/ByteStreamCnvSvc/ByteStreamCnvSvc/ByteStreamOutputSvc.h
@@ -1,28 +1,29 @@
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
-
+/* Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */
 #ifndef BYTESTREAMCNVSVC_BYTESTREAMOUTPUTSVC_H
 #define BYTESTREAMCNVSVC_BYTESTREAMOUTPUTSVC_H
 
 /** @file ByteStreamOutputSvc.h
- *  @brief This file contains the class definition for the ByteStreamOutputSvc class.
+ *  @brief This file contains the class definition for the ByteStreamOutputSvcr
+ *         class.
  *  @author Peter van Gemmeren <gemmeren@anl.gov>
  *  $Id: ByteStreamOutputSvc.h,v 1.51 2009-03-03 16:03:22 gemmeren Exp $
  **/
 
 #include "AthenaBaseComps/AthService.h"
-
 #include "ByteStreamData/RawEvent.h"
-
 #include "GaudiKernel/EventContext.h"
 
+#include <string>
+
+
 /** @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.
+ *  @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.
  **/
 class ByteStreamOutputSvc : public ::AthService {
-public:
+ public:
   /// constructor
   ByteStreamOutputSvc(const std::string& name, ISvcLocator* svcloc);
   /// destructor
@@ -38,10 +39,12 @@ public:
   virtual bool putEvent(RawEvent* re, const EventContext& ctx) = 0;
 };
 
+
 inline const InterfaceID& ByteStreamOutputSvc::interfaceID() {
-  /// Declaration of the interface ID ( interface id, major version, minor version)
+  /// Declaration of the interface ID ( interface id, major version, minor
+  /// version)
   static const InterfaceID IID_ByteStreamOutputSvc("ByteStreamOutputSvc", 1, 0);
   return(IID_ByteStreamOutputSvc);
 }
 
-#endif
+#endif  // BYTESTREAMCNVSVC_BYTESTREAMOUTPUTSVC_H
diff --git a/Event/ByteStreamCnvSvc/CMakeLists.txt b/Event/ByteStreamCnvSvc/CMakeLists.txt
index 7ebfa49d91c1..91e915fd767a 100644
--- a/Event/ByteStreamCnvSvc/CMakeLists.txt
+++ b/Event/ByteStreamCnvSvc/CMakeLists.txt
@@ -14,11 +14,11 @@ atlas_add_library( ByteStreamCnvSvcLib
    ByteStreamCnvSvc/*.h src/*.cxx
    PUBLIC_HEADERS ByteStreamCnvSvc
    PRIVATE_INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
-   LINK_LIBRARIES AthenaBaseComps ByteStreamData GaudiKernel
+   LINK_LIBRARIES AthenaBaseComps ByteStreamData EventInfo GaudiKernel
    ByteStreamCnvSvcBaseLib StoreGateLib rt
    PRIVATE_LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ${Boost_LIBRARIES}
    AthenaKernel SGTools CollectionBase FileCatalog
-   AthenaPoolUtilities PersistentDataModel EventInfo xAODEventInfo xAODTrigger
+   AthenaPoolUtilities PersistentDataModel xAODEventInfo xAODTrigger
    ByteStreamCnvSvcLegacy )
 
 atlas_add_component( ByteStreamCnvSvc
@@ -42,40 +42,40 @@ atlas_add_executable( AtlListBSEvents test/AtlListBSEvents.cxx
 
 # Test(s) in the package:
 atlas_add_test( BSEventSelector
-   SCRIPT "athena.py ByteStreamCnvSvc/BSEventSelector_test_jobOptions.py"
+   SCRIPT "athena.py --threads 1 ByteStreamCnvSvc/BSEventSelector_test_jobOptions.py"
    LOG_SELECT_PATTERN "ByteStream.*Svc" )
 
-atlas_add_test( AtlCopyBSEvent1_test
+atlas_add_test( AtlCopyBSEvent1
    PRE_EXEC_SCRIPT "rm -f test.data"
    SCRIPT "AtlCopyBSEvent -e 186882810,187403142,187404922,187419528 -o test.data /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1"
-   PROPERTIES DEPENDS ByteStreamCnvSvc_BSEventSelector_ctest )
+   PROPERTIES DEPENDS "ByteStreamCnvSvc_BSEventSelector_ctest")
 
-atlas_add_test( AtlFindBSEvent2_test
+atlas_add_test( AtlFindBSEvent2
    SCRIPT "AtlFindBSEvent -e 187403142 test.data"
-   PROPERTIES DEPENDS ByteStreamCnvSvc_AtlCopyBSEvent1_test_ctest )
+   PROPERTIES DEPENDS "ByteStreamCnvSvc_AtlCopyBSEvent1_ctest")
 
-atlas_add_test( AtlCopyBSEvent3_test
+atlas_add_test( AtlCopyBSEvent3
    PRE_EXEC_SCRIPT "rm -f test_defl.data"
    SCRIPT "AtlCopyBSEvent -d -e 186882810,187403142,187419528 -o test_defl.data test.data"
-   PROPERTIES DEPENDS ByteStreamCnvSvc_AtlCopyBSEvent1_test_ctest )
+   PROPERTIES DEPENDS "ByteStreamCnvSvc_AtlCopyBSEvent1_ctest")
 
-atlas_add_test( AtlFindBSEvent4_test
+atlas_add_test( AtlFindBSEvent4
    SCRIPT "AtlFindBSEvent -e 187403142 test_defl.data"
    LOG_IGNORE_PATTERN "+Timestamp"
-   PROPERTIES DEPENDS ByteStreamCnvSvc_AtlCopyBSEvent3_test_ctest )
+   PROPERTIES DEPENDS "ByteStreamCnvSvc_AtlCopyBSEvent3_ctest")
 
-atlas_add_test( AtlCopyBSEvent5_test
+atlas_add_test( AtlCopyBSEvent5
    PRE_EXEC_SCRIPT "rm -f test_infl.data"
    SCRIPT "AtlCopyBSEvent -e 186882810,187403142,187419528 -o test_infl.data test_defl.data"
-   PROPERTIES DEPENDS ByteStreamCnvSvc_AtlCopyBSEvent3_test_ctest )
+   PROPERTIES DEPENDS "ByteStreamCnvSvc_AtlCopyBSEvent3_ctest")
 
-atlas_add_test( AtlCopyBSEvent6_test
+atlas_add_test( AtlCopyBSEvent6
    PRE_EXEC_SCRIPT "rm -f empty*.data && python ${CMAKE_CURRENT_SOURCE_DIR}/test/create_empty_bsfile.py"
    SCRIPT "AtlCopyBSEvent -e all -o empty.data empty._0001.data"
-   PROPERTIES DEPENDS ByteStreamCnvSvc_AtlCopyBSEvent5_test_ctest )
+   PROPERTIES DEPENDS "ByteStreamCnvSvc_AtlCopyBSEvent5_ctest")
 
 atlas_add_test( ByteStreamConfigTest
-   SCRIPT python -m ByteStreamCnvSvc.ByteStreamConfig
+   SCRIPT "python -m ByteStreamCnvSvc.ByteStreamConfig"
    POST_EXEC_SCRIPT nopost.sh )
 
 # Install files from the package:
diff --git a/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py b/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py
index 81e839e26de8..06a0eba988af 100644
--- a/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py
+++ b/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py
@@ -23,6 +23,7 @@ from AthenaConfiguration.MainServicesConfig import MainServicesCfg
 from AthenaCommon.Configurable import Configurable
 from AthenaCommon.Logging import logging
 from AthenaServices.MetaDataSvcConfig import MetaDataSvcCfg
+from IOVDbSvc.IOVDbSvcConfig import IOVDbSvcCfg
 
 
 def ByteStreamReadCfg(flags, type_names=None):
@@ -129,6 +130,7 @@ def ByteStreamWriteCfg(flags, type_names=None):
         OutputDirectory="./",
         AppName="Athena",
         RunNumber=all_runs.pop(),
+        OutputLevel=2,
     )
     result.addService(event_storage_output)
     # release variable depends the way the env is configured
@@ -137,6 +139,7 @@ def ByteStreamWriteCfg(flags, type_names=None):
     bytestream_conversion = comp_factory.ByteStreamCnvSvc(
         name="ByteStreamCnvSvc",
         ByteStreamOutputSvcList=[event_storage_output.getName()],
+        OutputLevel=2,
     )
     result.addService(bytestream_conversion)
 
@@ -145,9 +148,16 @@ def ByteStreamWriteCfg(flags, type_names=None):
         EvtConversionSvc=bytestream_conversion.name,
         OutputFile="ByteStreamEventStorageOutputSvc",
         ItemList=type_names if type_names else list(),
+        OutputLevel=2,
     )
     result.addEventAlgo(output_stream, primary=True)
 
+    result.merge(IOVDbSvcCfg(flags))
+
+    result.merge(
+        MetaDataSvcCfg(flags, ["IOVDbMetaDataTool", "ByteStreamMetadataTool"])
+    )
+
     return result
 
 
@@ -175,6 +185,9 @@ def main():
     acc.printConfig()
     log.info("Config OK")
 
+    with open('ByteStreamConfig.pkl', 'wb') as pkl:
+        acc.store(pkl)
+
     acc.run(10)
 
 
diff --git a/Event/ByteStreamCnvSvc/share/BSEventSelector.ref b/Event/ByteStreamCnvSvc/share/BSEventSelector.ref
index 9a5cc37a2b3d..d4efeb9bc7a4 100644
--- a/Event/ByteStreamCnvSvc/share/BSEventSelector.ref
+++ b/Event/ByteStreamCnvSvc/share/BSEventSelector.ref
@@ -1,29 +1,40 @@
-ByteStreamAddre...   INFO Initializing ByteStreamAddressProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
-ToolSvc.ByteStr...   INFO Initializing ToolSvc.ByteStreamMetadataTool - package version ByteStreamCnvSvc-00-00-00
-ByteStreamInputSvc  DEBUG Property update for OutputLevel : new value = 2
-ByteStreamInputSvc   INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00
-ByteStreamInputSvc  DEBUG Service base class initialized successfully
-ROBDataProviderSvc   INFO Initializing ROBDataProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
-ByteStreamInputSvc  DEBUG ByteStreamMetadata:
-ByteStreamInputSvc  DEBUG Recorded ByteStreamMetadata in InputMetaDataStore
-ByteStreamInputSvc   INFO Picked valid file: /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1
-ByteStreamInputSvc  DEBUG nextEvent _above_ high water mark
-ByteStreamInputSvc  DEBUG Event Size 1038508
-ByteStreamInputSvc  DEBUG First word of the fragment aa1234aa
-ByteStreamInputSvc  DEBUG Format version500
-ByteStreamInputSvc  DEBUG Made an FullEventFragment from ES 0x15bd2000
-ByteStreamInputSvc  DEBUG switched to next event in slot INVALID
-ByteStreamInputSvc  DEBUG ByteStream File GUID:              1C43C4AA-2555-E711-BB1F-02163E01794D
-ByteStreamInputSvc  DEBUG ByteStream Event Position in File: 1324
-ByteStreamCnvSvc    DEBUG Property update for OutputLevel : new value = 2
-EventPersistenc...   INFO Added successfully Conversion service:ByteStreamCnvSvc
-ByteStreamInputSvc  DEBUG nextEvent _above_ high water mark
-ByteStreamInputSvc  DEBUG Event Size 1000648
-ByteStreamInputSvc  DEBUG First word of the fragment aa1234aa
-ByteStreamInputSvc  DEBUG Format version500
-ByteStreamInputSvc  DEBUG Made an FullEventFragment from ES 0x15cd0000
-ByteStreamInputSvc  DEBUG switched to next event in slot s: 0  e: 0
-ByteStreamInputSvc  DEBUG ByteStream File GUID:              1C43C4AA-2555-E711-BB1F-02163E01794D
-ByteStreamInputSvc  DEBUG ByteStream Event Position in File: 1039848
-ByteStreamInputSvc  DEBUG Calling ByteStreamInputSvc::stop()
-ByteStreamCnvSvc    DEBUG releasing all workers
+Py:Athena            INFO including file "ByteStreamCnvSvc/BSEventSelector_test_jobOptions.py"
+ByteStreamAddressProviderSvc                       DEBUG Property update for OutputLevel : new value = 2
+ByteStreamAddressProviderSvc                        INFO Initializing ByteStreamAddressProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
+ByteStreamAddressProviderSvc                       DEBUG Service base class initialized successfully
+ByteStreamAddressProviderSvc                        INFO initialized 
+ByteStreamAddressProviderSvc                        INFO -- Will fill Store with id =  0
+ToolSvc.ByteStreamMetadataTool                      INFO Initializing ToolSvc.ByteStreamMetadataTool - package version ByteStreamCnvSvc-00-00-00
+ByteStreamAddressProviderSvc                       DEBUG in preLoadAddress
+ByteStreamAddressProviderSvc                       DEBUG StoreID = 3 does not match required id (0) skip
+ByteStreamAddressProviderSvc                       DEBUG in preLoadAddress
+ByteStreamAddressProviderSvc                       DEBUG StoreID = 3 does not match required id (0) skip
+ByteStreamAddressProviderSvc                       DEBUG in preLoadAddress
+ByteStreamAddressProviderSvc                       DEBUG in preLoadAddress
+ByteStreamInputSvc                             0   DEBUG Property update for OutputLevel : new value = 2
+ByteStreamInputSvc                             0    INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00
+ByteStreamInputSvc                             0   DEBUG Service base class initialized successfully
+ROBDataProviderSvc                             0    INFO Initializing ROBDataProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
+ByteStreamInputSvc                             0   DEBUG ByteStreamMetadata:
+ByteStreamInputSvc                             0   DEBUG Recorded ByteStreamMetadata in InputMetaDataStore
+ByteStreamInputSvc                             0    INFO Picked valid file: /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1
+ByteStreamInputSvc                         0   0   DEBUG nextEvent _above_ high water mark
+ByteStreamInputSvc                         0   0   DEBUG Event Size 1038508
+ByteStreamInputSvc                         0   0   DEBUG First word of the fragment aa1234aa
+ByteStreamInputSvc                         0   0   DEBUG Format version500
+ByteStreamInputSvc                         0   0   DEBUG Made an FullEventFragment from ES 0x17f98000
+ByteStreamInputSvc                         0   0   DEBUG switched to next event in slot s: 0  e: 0
+ByteStreamInputSvc                         0   0   DEBUG ByteStream File GUID:              1C43C4AA-2555-E711-BB1F-02163E01794D
+ByteStreamInputSvc                         0   0   DEBUG ByteStream Event Position in File: 1324
+ByteStreamCnvSvc                           0   0   DEBUG Property update for OutputLevel : new value = 2
+EventPersistencySvc                        0   0    INFO Added successfully Conversion service:ByteStreamCnvSvc
+ByteStreamInputSvc                         1   0   DEBUG nextEvent _above_ high water mark
+ByteStreamInputSvc                         1   0   DEBUG Event Size 1000648
+ByteStreamInputSvc                         1   0   DEBUG First word of the fragment aa1234aa
+ByteStreamInputSvc                         1   0   DEBUG Format version500
+ByteStreamInputSvc                         1   0   DEBUG Made an FullEventFragment from ES 0x18096000
+ByteStreamInputSvc                         1   0   DEBUG switched to next event in slot s: 0  e: 1
+ByteStreamInputSvc                         1   0   DEBUG ByteStream File GUID:              1C43C4AA-2555-E711-BB1F-02163E01794D
+ByteStreamInputSvc                         1   0   DEBUG ByteStream Event Position in File: 1039848
+ByteStreamInputSvc                                 DEBUG Calling ByteStreamInputSvc::stop()
+ByteStreamCnvSvc                                   DEBUG releasing all workers
diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamDataWriter.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamDataWriter.cxx
index c33950ac4c44..9d3b4164a59c 100644
--- a/Event/ByteStreamCnvSvc/src/ByteStreamDataWriter.cxx
+++ b/Event/ByteStreamCnvSvc/src/ByteStreamDataWriter.cxx
@@ -166,6 +166,41 @@ ByteStreamDataWriter::makeWriter(int version,
     return std::unique_ptr<ByteStreamDataWriter>(res);
 }
 
+std::unique_ptr<ByteStreamDataWriter>
+ByteStreamDataWriter::makeWriter(const DataWriterParameters& parameters) {
+  // initiate with production file name
+  if (parameters.theFNCB == nullptr)
+    return makeWriter(
+      parameters.version,
+      parameters.writingPath,
+      parameters.fileNameCore,
+      parameters.rPar,
+      parameters.fmdStrings,
+      parameters.maxFileNE,
+      parameters.maxFileMB,
+      parameters.startIndex,
+      parameters.compression,
+      parameters.compLevel);
+
+  // initiate for user-defined file name
+  return makeWriter(
+      parameters.version,
+      parameters.writingPath,
+      parameters.theFNCB,
+      parameters.rPar,
+      parameters.project,
+      parameters.streamType,
+      parameters.streamName,
+      parameters.stream,
+      parameters.lumiBlockNumber,
+      parameters.applicationName,
+      parameters.fmdStrings,
+      parameters.maxFileNE,
+      parameters.maxFileMB,
+      parameters.compression,
+      parameters.compLevel);
+}
+
 namespace {
 
 ByteStreamDataWriterCurrent::ByteStreamDataWriterCurrent(const std::string& writingPath,
@@ -178,15 +213,15 @@ ByteStreamDataWriterCurrent::ByteStreamDataWriterCurrent(const std::string& writ
                                                          EventStorage::CompressionType compression,
                                                          unsigned int compLevel)
 {
-    m_writer.reset(new EventStorage::DataWriter(writingPath,
-                                                fileNameCore,
-                                                rPar,
-                                                fmdStrings,
-                                                startIndex,
-                                                compression,
-                                                compLevel));
-    m_writer->setMaxFileNE(maxFileNE);
-    m_writer->setMaxFileMB(maxFileMB);
+  m_writer.reset(new EventStorage::DataWriter(writingPath,
+                                              fileNameCore,
+                                              rPar,
+                                              fmdStrings,
+                                              startIndex,
+                                              compression,
+                                              compLevel));
+  m_writer->setMaxFileNE(maxFileNE);
+  m_writer->setMaxFileMB(maxFileMB);
 }
 
 ByteStreamDataWriterCurrent::ByteStreamDataWriterCurrent(const std::string& writingPath,
@@ -204,32 +239,32 @@ ByteStreamDataWriterCurrent::ByteStreamDataWriterCurrent(const std::string& writ
                                                          EventStorage::CompressionType compression,
                                                          unsigned int compLevel)
 {
-    m_writer.reset(new EventStorage::DataWriter(writingPath,
-                                                theFNCB,
-                                                rPar,
-                                                project,
-                                                streamType,
-                                                streamName,
-                                                stream,
-                                                lumiBlockNumber,
-                                                applicationName,
-                                                fmdStrings,
-                                                compression,
-                                                compLevel));
-    m_writer->setMaxFileNE(maxFileNE);
-    m_writer->setMaxFileMB(maxFileMB);
+  m_writer.reset(new EventStorage::DataWriter(writingPath,
+                                              theFNCB,
+                                              rPar,
+                                              project,
+                                              streamType,
+                                              streamName,
+                                              stream,
+                                              lumiBlockNumber,
+                                              applicationName,
+                                              fmdStrings,
+                                              compression,
+                                              compLevel));
+  m_writer->setMaxFileNE(maxFileNE);
+  m_writer->setMaxFileMB(maxFileMB);
 }
 
 EventStorage::DWError
 ByteStreamDataWriterCurrent::putData(unsigned int dataSize, const void *data)
 {
-    return m_writer->putData(dataSize, data);
+  return m_writer->putData(dataSize, data);
 }
 
 bool
 ByteStreamDataWriterCurrent::good() const
 {
-    return m_writer->good();
+  return m_writer->good();
 }
 
 } // namespace
diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamDataWriter.h b/Event/ByteStreamCnvSvc/src/ByteStreamDataWriter.h
index 29802d647e4e..a772bddf8c20 100644
--- a/Event/ByteStreamCnvSvc/src/ByteStreamDataWriter.h
+++ b/Event/ByteStreamCnvSvc/src/ByteStreamDataWriter.h
@@ -21,6 +21,7 @@
 #include "EventStorage/FileNameCallback.h"
 #include "boost/shared_ptr.hpp"
 
+struct DataWriterParameters;
 
 /** @class ByteStreamDataWriter
  *  @brief This class defines abstract interface for data writing.
@@ -107,6 +108,17 @@ public:
                EventStorage::CompressionType compression = EventStorage::NONE,
                unsigned int compLevel = 1);
 
+    /**
+     *  Factory method returning data writer instance for specified version.
+     *  Throws exception in case of problems, never returns zero pointer.
+     *
+     *  @param parameters: set of parameters needed to initiate DataWriter
+     *
+     *  @throw std::exception (or sub-class) is thrown in case of problems.
+     */
+    static std::unique_ptr<ByteStreamDataWriter>
+        makeWriter(const DataWriterParameters& parameters);
+
 
     ByteStreamDataWriter() {}
     virtual ~ByteStreamDataWriter() {}
@@ -133,4 +145,67 @@ public:
 };
 
 
+/** Class containing parameters needed to initiayte DataWriter
+ *
+ *  This class is meant to given to the factory method creating data writer
+ *  instances. The parameters need to be set to valid values.
+ */
+struct DataWriterParameters {
+  /** Writer version to instantiate, 0 for most current version
+   *
+   *  Other supported values: 5 for run1-compatible output. Exception is thrown
+   *  is version is not supported.
+   **/
+  int version{0};
+
+  /// Directory where to write data
+  std::string writingPath{""};
+
+  /// File name not including the ending "._NNNN.data"
+  std::string fileNameCore{""};
+
+  /// Other parameters from IS including the run number
+  EventStorage::run_parameters_record rPar{
+    0, 0, 0, 0, 0, 0, 0xFFFFFFFFFFFFFFFFULL, 0xFFFFFFFFFFFFFFFFULL, 0, 0 };
+
+  /// Optional vector of strings containing metadata
+  std::vector<std::string> fmdStrings;
+
+  /// Max size of a file in number of data blocks (or events)
+  unsigned int maxFileNE{0};
+
+  /// Max size of a file in MB. The file is closed before this limit is overrun
+  unsigned int maxFileMB{0};
+
+  /// Initial file sequence index
+  unsigned int startIndex{1};
+
+  /// Compression type
+  EventStorage::CompressionType compression{EventStorage::NONE};
+
+  /// Compression level
+  unsigned int compLevel{1};
+
+  /// callback method for generating file names
+  boost::shared_ptr<EventStorage::FileNameCallback> theFNCB;
+
+  /// project name for use with simple file name
+  std::string project{""};
+
+  /// stream type for use with simple file name
+  std::string streamType{""};
+
+  /// stream name for use with simple file name
+  std::string streamName{""};
+
+  /// not sure for use with simple file name
+  std::string stream{""};
+  
+  /// luminosity block number for use with simple file name
+  unsigned int lumiBlockNumber{0};
+
+  /// application name for use with simple file name
+  std::string applicationName{""};
+};
+
 #endif // BYTESTREAMCNVSVC_BYTESTREAMDATAWRITER_H
diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx
index 84d10073ffcc..3ccda05b67df 100644
--- a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx
+++ b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx
@@ -1,425 +1,456 @@
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
-
+/* Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */
 #include "ByteStreamEventStorageOutputSvc.h"
 
-#include "GaudiKernel/ServiceHandle.h"
-#include "GaudiKernel/IIoComponentMgr.h"
-
-#include "EventStorage/EventStorageRecords.h"
-#include "EventStorage/RawFileName.h"
-#include "EventStorage/SimpleFileName.h"
+#include <stdexcept>
+#include <stdlib.h>
+#include <sstream>
 
-#include "ByteStreamData/RawEvent.h"
-#include "ByteStreamData/ByteStreamMetadataContainer.h"
+#include <boost/shared_ptr.hpp>
+#include <boost/format.hpp>
 
-#include "EventInfo/EventInfo.h"
-#include "EventInfo/EventID.h"
-#include "EventInfo/EventType.h"
-#include "EventInfo/TagInfo.h"
+#include "ByteStreamDataWriter.h"
 
-#include "StoreGate/StoreGateSvc.h"
+#include "AthenaKernel/StoreID.h"
 
 #include "ByteStreamCnvSvcLegacy/offline_eformat/old/util.h"
+#include "ByteStreamData/RawEvent.h"
 
-#include "ByteStreamDataWriter.h"
+#include "EventStorage/EventStorageRecords.h"
+#include "EventStorage/RawFileName.h"
+#include "EventStorage/SimpleFileName.h"
 
-#include <boost/shared_ptr.hpp>
-#include <stdlib.h>
+#include "xAODEventInfo/EventInfo.h"
+
+#include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/IIoComponentMgr.h"
+
+#include "StoreGate/ReadHandle.h"
 
 
-/******************************************************************************/
 ByteStreamEventStorageOutputSvc::ByteStreamEventStorageOutputSvc(
     const std::string& name, ISvcLocator* pSvcLocator)
-  : ByteStreamOutputSvc(name, pSvcLocator)
-  , m_totalEventCounter  (0)
-  , m_inputDir           (this,     "OutputDirectory",        "", "directory for the data files")
-  , m_projectTag         (this,          "ProjectTag",        "", "part of filename")
-  , m_appName            (this,             "AppName",        "", "part of filename")
-  , m_fileTag            (this,             "FileTag",        "", "part of filename")
-  , m_streamType         (this,          "StreamType",  "Single", "part of filename")
-  , m_streamName         (this,          "StreamName",  "Stream", "part of filename")
-  , m_lumiBlockNumber    (this,     "LumiBlockNumber",         0, "part of filename")
-  , m_run                (this,           "RunNumber",         0, "part of filename")
-  , m_dump               (this,            "DumpFlag",     false, "dump fragments")
-  , m_writeEventless     (this, "WriteEventlessFiles",      true, "")
-  , m_compressEvents     (this,      "CompressEvents",     false, "")
-  , m_maxFileMB          (this,           "MaxFileMB",     10000, "MB per file")
-  , m_maxFileNE          (this,           "MaxFileNE",    100000, "evens per file")
-  , m_eformatVersion     (this,      "EformatVersion", "current",
-      "Version of the event format data, use \"v40\" or \"run1\" "
-      "for run1, \"current\" for most current version (default).")
-  , m_eventStorageVersion(this, "EventStorageVersion", "current",
-      "Version of the ByteStream file data, use \"v5\" or \"run1\" "
-      "for run1, \"current\" for most current version (default).")
-  , m_bsOutputStreamName (this,  "BSOutputStreamName",      name, "stream name for muliple output")
-  , m_simpleFileName     (this,      "SimpleFileName",        "", "for filename not from AgreedFileName")
-{
-  assert(pSvcLocator != nullptr);
+  : ByteStreamOutputSvc(name, pSvcLocator) {
 }
 
 
-/******************************************************************************/
-ByteStreamEventStorageOutputSvc::~ByteStreamEventStorageOutputSvc()
-{}
+StatusCode
+ByteStreamEventStorageOutputSvc::initialize() {
+  ATH_MSG_INFO("Initializing " << name() << " - package version "
+               << PACKAGE_VERSION);
 
+  ATH_CHECK(ByteStreamOutputSvc::initialize());
 
-/******************************************************************************/
-StatusCode
-ByteStreamEventStorageOutputSvc::initialize()
-{
-  ATH_MSG_INFO("Initializing " << name() << " - package version " << PACKAGE_VERSION);
-  if (!ByteStreamOutputSvc::initialize().isSuccess()) {
-    ATH_MSG_FATAL("Cannot initialize ByteStreamOutputSvc base class.");
-    return(StatusCode::FAILURE);
-  }
+  ATH_CHECK(m_eventInfoKey.initialize());
+  ATH_CHECK(m_byteStreamMetadataKey.initialize());
 
   // register this service for 'I/O' events
-  ServiceHandle<IIoComponentMgr> iomgr("IoComponentMgr", name());
-  if (!iomgr.retrieve().isSuccess()) {
-    ATH_MSG_FATAL("Could not retrieve IoComponentMgr !");
-    return(StatusCode::FAILURE);
-  }
-  if (!iomgr->io_register(this).isSuccess()) {
-    ATH_MSG_FATAL("Could not register myself with the IoComponentMgr !");
-    return(StatusCode::FAILURE);
-  }
+  ATH_CHECK(m_ioMgr.retrieve());
+  ATH_CHECK(m_ioMgr->io_register(this));
 
   // Register output file's name with the I/O manager
-  if (!m_simpleFileName.value().empty()) {
-    if (!iomgr->io_register(this, IIoComponentMgr::IoMode::WRITE, m_simpleFileName.value()).isSuccess()) {
-      ATH_MSG_FATAL("could not register [" << m_simpleFileName.value() << "] for output !");
-      return(StatusCode::FAILURE);
-    } else {
-      ATH_MSG_VERBOSE("io_register[" << this->name() << "](" << m_simpleFileName.value() << ") [ok]");
-    }
+  if (!m_simpleFileName.empty()) {
+    ATH_CHECK(m_ioMgr->io_register(this, IIoComponentMgr::IoMode::WRITE,
+                                   m_simpleFileName));
+    ATH_MSG_VERBOSE("io_register[" << this->name() << "]("
+                    << m_simpleFileName << ") [ok]");
   }
 
-  // validate m_eformatVersion and m_eventStorageVersion
-  const char* choices_ef[] = {"current", "v40", "run1"};
-  if (std::find(std::begin(choices_ef), std::end(choices_ef), m_eformatVersion.value()) == std::end(choices_ef)) {
-    ATH_MSG_FATAL("Unexpected value for EformatVersion property: " << m_eformatVersion);
-    return(StatusCode::FAILURE);
+  // validate m_eformatVersion
+  const std::vector< std::string > choices_ef{"current", "v40", "run1"};
+  if (std::find(choices_ef.begin(), choices_ef.end(), m_eformatVersion)
+      == choices_ef.end()) {
+    ATH_MSG_FATAL("Unexpected value for EformatVersion property: "
+                  << m_eformatVersion);
+    return StatusCode::FAILURE;
   }
-  const char* choices_es[] = {"current", "v5", "run1"};
-  if (std::find(std::begin(choices_es), std::end(choices_es), m_eventStorageVersion.value()) == std::end(choices_es)) {
-    ATH_MSG_FATAL("Unexpected value for EventStorageVersion property: " << m_eventStorageVersion);
-    return(StatusCode::FAILURE);
+  ATH_MSG_INFO("eformat version to use: \"" << m_eformatVersion << "\"");
+
+  // validate m_eventStorageVersion
+  const std::vector< std::string > choices_es{"current", "v5", "run1"};
+  if (std::find(choices_es.begin(), choices_es.end(), m_eventStorageVersion)
+      == choices_es.end()) {
+    ATH_MSG_FATAL("Unexpected value for EventStorageVersion property: "
+                  << m_eventStorageVersion);
+    return StatusCode::FAILURE;
   }
-  ATH_MSG_INFO("eformat version to use: \"" << m_eformatVersion.value() << "\"");
-  ATH_MSG_INFO("event storage (BS) version to use: \"" << m_eventStorageVersion.value() << "\"");
+  ATH_MSG_INFO("event storage (BS) version to use: \""
+               << m_eventStorageVersion << "\"");
+
+  m_isRun1 = (m_eformatVersion == "v40" or m_eformatVersion == "run1");
 
-  return(this->reinit());
+  ATH_CHECK(reinit());
 
+  return StatusCode::SUCCESS;
 }
 
 
-/******************************************************************************/
 StatusCode
-ByteStreamEventStorageOutputSvc::reinit()
-{
+ByteStreamEventStorageOutputSvc::reinit() {
   ATH_MSG_INFO("Reinitialization...");
-  return(StatusCode::SUCCESS);
+  return StatusCode::SUCCESS;
 }
 
 
-/******************************************************************************/
 StatusCode
-ByteStreamEventStorageOutputSvc::stop()
-{
-  // Check whether anything has been written && whether the user wants metadata only files
-  bool dWok = false; 
-  if (m_dataWriter == 0 && m_writeEventless) {
-    const ByteStreamMetadataContainer* metaDataCont = 0;
-    const ByteStreamMetadata* metaData = 0;
-    ServiceHandle<StoreGateSvc> mds("StoreGateSvc/MetaDataStore", name());
-    if (mds.retrieve().isFailure()) {
-      ATH_MSG_WARNING("Cannot get MetaDataStore");
-    } else {
-      if (mds->retrieve(metaDataCont, "ByteStreamMetadata").isSuccess()) metaData = *(metaDataCont->begin());
-    }
-    // Try to write metadata to file
-    dWok = initDataWriterContents(0, metaData);
+ByteStreamEventStorageOutputSvc::stop() {
+  // Check whether anything has been written and whether the user wants metadata
+  // only files
+  if (m_dataWriter == 0 and m_writeEventless) {
+    const ByteStreamMetadata* metaData = getByteStreamMetadata();
+
+    // Try to write metadata to eventless file
+    bool dWok = initDataWriterContents(nullptr, metaData);
     if (!dWok) ATH_MSG_WARNING("Could not write Metadata for eventless file");
   }
-  return(StatusCode::SUCCESS);
+
+  return StatusCode::SUCCESS;
 }
 
 
-/******************************************************************************/
 StatusCode
-ByteStreamEventStorageOutputSvc::finalize()
-{
+ByteStreamEventStorageOutputSvc::finalize() {
   // clean up
   ATH_MSG_DEBUG("deleting DataWriter");
   m_dataWriter.reset();
   ATH_MSG_INFO("number of events written: " << m_totalEventCounter);
-  return(StatusCode::SUCCESS);
+  return StatusCode::SUCCESS;
 }
 
 
-/******************************************************************************/
-// Open the first input file and read the first event.
 bool
-ByteStreamEventStorageOutputSvc::initDataWriter()
-{
-  // Retrieve EventInfo to get run number, detector mask and event type
-  const EventInfo* evtInfo = 0;
-  ServiceHandle<StoreGateSvc> sg("StoreGateSvc", name());
-  if (sg.retrieve().isFailure()) {
-    ATH_MSG_ERROR("Cannot get StoreGateSvc");
-    return(false);
-  }
-  if (sg->retrieve(evtInfo).isFailure() || evtInfo == 0) {
-    ATH_MSG_ERROR("Cannot retrieve EventInfo");
-    return(false);
-  }
-  const ByteStreamMetadataContainer* metaDataCont = 0;
-  const ByteStreamMetadata* metaData = 0;
-  ServiceHandle<StoreGateSvc> mds("InputMetaDataStore", name());
-  if (mds.retrieve().isFailure()) {
-    ATH_MSG_WARNING("Cannot get InputMetaDataStore");
-  } else {
-    if (mds->retrieve(metaDataCont, "ByteStreamMetadata").isSuccess()) metaData = *(metaDataCont->begin());
-  }
-  // Now try to write metadata to file
-  return initDataWriterContents(evtInfo, metaData);
+ByteStreamEventStorageOutputSvc::initDataWriter(const EventContext* ctx) {
+  // Called on first event. Reads run parameters first event and/or first event
+  const xAOD::EventInfo* eventInfo = ctx == nullptr
+      ? SG::get(m_eventInfoKey)
+      : SG::get(m_eventInfoKey, *ctx);
+  if (eventInfo == nullptr) ATH_MSG_WARNING("failed to retrieve EventInfo");
+
+  const ByteStreamMetadata* metaData = getByteStreamMetadata(ctx);
+  if (metaData == nullptr)
+    ATH_MSG_WARNING("failed to retrieve ByteStreamMetaData");
+
+  // Now open a file for writing from retrieved parameters
+  return initDataWriterContents(eventInfo, metaData);
 }
 
 
-/******************************************************************************/
-// Open the first input file and read the first event.
 bool
 ByteStreamEventStorageOutputSvc::initDataWriterContents(
-    const EventInfo* evtInfo, const ByteStreamMetadata* metaData)
-{
-  // Initialize parameters
-  EventStorage::run_parameters_record runPara = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-  EventStorage::freeMetaDataStrings freeMetaDataStrings;
-  runPara.detector_mask_LS=0xFFFFFFFFFFFFFFFFULL;
-  runPara.detector_mask_MS=0xFFFFFFFFFFFFFFFFULL;
-  int run = 0;
-  int lumiNum = 0;
+    const xAOD::EventInfo* evtInfo,
+    const ByteStreamMetadata* metaData) {
+  // check that we have sufficient information to do what we need
+  if (evtInfo or metaData)
+    ATH_MSG_DEBUG("Looking up data writer parameters");
+  else
+    throw std::runtime_error("Cannot write data without run parameters");
+
   // The heirarchy of run/lumiblock number, GNARR
-  // 1) User override
-  // 2) Event data
-  // 3) File metadata
-  // 4) default = unknown = 0
-  if (m_run != 0) {
-    run = m_run;
-  } else if (evtInfo != 0) {
-    run = evtInfo->event_ID()->run_number();
-  } else if (metaData != 0) {
-    run = metaData->getRunNumber();
-  } 
-  runPara.run_number = run;
-
-  if (m_lumiBlockNumber != 0) {
-    lumiNum = m_lumiBlockNumber;
-  } else if (evtInfo != 0) {
-    lumiNum = evtInfo->event_ID()->lumi_block();
-  } else if (metaData != 0) {
-    lumiNum = metaData->getLumiBlock();
-  }
+  //
+  //   1) User override
+  //   2) Event data
+  //   3) File metadata
+  //   4) default = unknown = 0
+  //
+  // Go from 4 to 1 and overwrite
+  DataWriterParameters params; 
+  if (metaData != nullptr) updateDataWriterParameters(params, *metaData);
+  if (evtInfo != nullptr) updateDataWriterParameters(params, *evtInfo);
+  updateDataWriterParameters(params);
+
+  m_dataWriter = ByteStreamDataWriter::makeWriter(params);
+
+  bool result = m_dataWriter->good();
+  if (result)
+    ATH_MSG_DEBUG("initialized output stream to file with name "
+                  << params.fileNameCore);
+  else
+    ATH_MSG_ERROR("Unable to initialize file");
 
-  if (evtInfo != 0) {   
-    uint64_t result = evtInfo->event_ID()->detector_mask1();
-    result = result << 32;
-    result |= evtInfo->event_ID()->detector_mask0();
-    runPara.detector_mask_LS = result;
-    result = evtInfo->event_ID()->detector_mask3();
-    result = result << 32;
-    result |= evtInfo->event_ID()->detector_mask2();
-    runPara.detector_mask_MS = result;
-
-    freeMetaDataStrings.push_back(evtInfo->event_type()->EventType::typeToString());
-  } else {
-    runPara.detector_mask_LS=0xFFFFFFFFFFFFFFFFULL;
-    runPara.detector_mask_MS=0xFFFFFFFFFFFFFFFFULL;
-  }
-  if (metaData != 0) {
-    runPara.max_events   = metaData->getMaxEvents();
-    runPara.rec_enable   = metaData->getRecEnable();
-    runPara.trigger_type = metaData->getTriggerType();
-    runPara.beam_type    = metaData->getBeamType();
-    runPara.beam_energy  = metaData->getBeamEnergy();
-    for (EventStorage::freeMetaDataStrings::const_iterator iter = metaData->getFreeMetaDataStrings().begin(),
-        iterEnd = metaData->getFreeMetaDataStrings().end(); iter != iterEnd; iter++) {
-      if((*iter).find("Compression=") == std::string::npos) {
-        freeMetaDataStrings.push_back(*iter);
-      }
-    }
-  } else {
-    ATH_MSG_DEBUG("Cannot retrieve MetaData");
-    metaData = 0;
-    runPara.max_events = 0;
-    runPara.rec_enable = 0;
-    runPara.trigger_type = 0;
-    runPara.beam_type = 0;
-    runPara.beam_energy = 0;
-  }
-  const TagInfo* tagInfo = 0;
-  ServiceHandle<StoreGateSvc> ds("DetectorStore", name());
-  if (ds.retrieve().isSuccess()) {
-    if (ds->retrieve(tagInfo).isFailure() || tagInfo == 0) {
-      ATH_MSG_DEBUG("Cannot retrieve TagInfo");
-    } else {
-      std::string tagName, tagValue;
-      if (metaData == 0) {
-        tagName = "beam_type";
-        tagInfo->findTag(tagName, tagValue);
-        runPara.beam_type = atof(tagValue.c_str());
-        tagName = "beam_energy";
-        tagInfo->findTag(tagName, tagValue);
-        runPara.beam_energy = atof(tagValue.c_str());
-      }
-      tagName = "GeoAtlas";
-      tagInfo->findTag(tagName, tagValue);
-      freeMetaDataStrings.push_back(tagName + ": " + tagValue);
-      tagName = "IOVDbGlobalTag";
-      tagInfo->findTag(tagName, tagValue);
-      freeMetaDataStrings.push_back(tagName + ": " + tagValue);
-    }
-  }
+  return result;
+}
 
-  std::string fileNameCore;
-  EventStorage::CompressionType compression = m_compressEvents ? EventStorage::ZLIB : EventStorage::NONE;
-  int eventStorageVersion = 0;
-  if (m_eventStorageVersion.value() == "v5" || m_eventStorageVersion.value() == "run1") {
-    eventStorageVersion = 5;
-  }
-  if (!m_simpleFileName.value().empty()) {
-    fileNameCore = m_simpleFileName.value();
-    boost::shared_ptr<EventStorage::SimpleFileName> sfn(new EventStorage::SimpleFileName(m_simpleFileName.value()));
-    m_dataWriter = ByteStreamDataWriter::makeWriter(eventStorageVersion,
-        m_inputDir.value(), sfn, runPara, m_projectTag.value(),
-        m_streamType.value(), m_streamName.value(),
-        m_streamType.value() + "_" + m_streamName.value(),
-        lumiNum, m_appName.value(), freeMetaDataStrings,
-        m_maxFileNE.value(), m_maxFileMB.value(), compression);
-  } else {
-    // construct file name
-    daq::RawFileName fileNameObj(m_projectTag.value(), run, m_streamType.value(), m_streamName.value(), lumiNum, m_appName.value());
-    fileNameCore = fileNameObj.fileNameCore();
-    m_dataWriter = ByteStreamDataWriter::makeWriter(eventStorageVersion,
-        m_inputDir.value(), fileNameCore, runPara, freeMetaDataStrings,
-        m_maxFileNE.value(), m_maxFileMB.value(), compression);
-  }
-  if (!m_dataWriter->good()) {
-    ATH_MSG_ERROR("Unable to initialize file");
-    return(false);
-  } else {
-    ATH_MSG_DEBUG("initialized file for with name " << fileNameCore);
-  }
-  return(true);
+
+bool
+ByteStreamEventStorageOutputSvc::putEvent(RawEvent* re) {
+  // Read the next event.
+  return putEvent(re, Gaudi::Hive::currentContext());
 }
 
-/******************************************************************************/
-// Read the next event.
+
 bool
-ByteStreamEventStorageOutputSvc::putEvent(RawEvent* re)
-{
-  if (!m_dataWriter) {
-    if (!initDataWriter()) {
-      ATH_MSG_ERROR("Failed to initialize DataWriter");
-      return(false);
-    }
-  }
-  uint32_t size = re->fragment_size_word();
-  // write
-  OFFLINE_FRAGMENTS_NAMESPACE::PointerType st;
-  re->start(st);
-  ATH_MSG_DEBUG("event size =  " << size << "  start = " << st);
-
-  // convert to different version
-  bool deleteBuffer = false;
-  if (m_eformatVersion.value() == "v40" or m_eformatVersion.value() == "run1") {
+ByteStreamEventStorageOutputSvc::putEvent(
+    RawEvent* re, const EventContext& ctx) {
+  // Read the next event.
+  using OFFLINE_FRAGMENTS_NAMESPACE::DataType;
+  using OFFLINE_FRAGMENTS_NAMESPACE::PointerType;
+
+  EventCache* cache = m_eventCache.get(ctx);
+  cache->releaseEvent();
+
+  // we need the size and the start of the event to give to the data writer
+  cache->size = re->fragment_size_word();
+  ATH_MSG_DEBUG("event size = " << cache->size << ", start = " << re->start());
+
+  if (m_isRun1) {
+    // convert to current eformat
     // allocate some extra space just in case
-    uint32_t bufSize = size + 128;
-    auto buf = new OFFLINE_FRAGMENTS_NAMESPACE::DataType[bufSize];
+    ATH_MSG_DEBUG("converting Run 1 format ");
+
+    cache->size += 128;
+    cache->buffer = std::make_unique< DataType[] >(cache->size);
+    ATH_MSG_DEBUG("created buffer 0x"
+                  << std::hex << cache->buffer.get() << std::dec);
 
     // This builds no-checksum headers, should use the same
     // checksum type as original event
-    size = offline_eformat::old::convert_to_40(st, buf, bufSize);
-    if (size == 0) {
+    cache->size = offline_eformat::old::convert_to_40(
+        re->start(), cache->buffer.get(), cache->size);
+    ATH_MSG_DEBUG("filled buffer");
+
+    if (cache->size == 0) {
       // not enough space in buffer
       ATH_MSG_ERROR("Failed to convert event, buffer is too small");
-      delete [] buf;
       return false;
     }
 
-    st = buf;
-    deleteBuffer = true;
-    ATH_MSG_DEBUG("event size after conversion =  " << size << "  version = " << st[3]);
-  }
+    ATH_MSG_DEBUG("event size after conversion =  " << cache->size
+                  << "  version = " << cache->buffer.get()[3]);
 
-  if (m_dataWriter->putData(sizeof(OFFLINE_FRAGMENTS_NAMESPACE::DataType) * size,
-        reinterpret_cast<void*>(const_cast<OFFLINE_FRAGMENTS_NAMESPACE::DataType*>(st))) != EventStorage::DWOK) {
-    ATH_MSG_ERROR("Failed to write event to DataWriter");
-    if (deleteBuffer) delete [] st;
-    return(false);
+  } else {
+    cache->buffer = std::make_unique< DataType[] >(cache->size);
+    std::copy(re->start(), re->start() + cache->size, cache->buffer.get());
   }
-  ++m_totalEventCounter;
-  if (deleteBuffer) delete [] st;
-  return(true);
-}
 
-bool ByteStreamEventStorageOutputSvc::putEvent(RawEvent* /*re*/, const EventContext& /*ctx*/) {
-  ATH_MSG_FATAL(name() << " does not implement the context-aware putEvent method");
-  return false;
-}
+  {
+    // multiple data writers concurrently sounds like a bad idea
+    std::lock_guard< std::mutex > lock(m_dataWriterMutex);
 
+    // make sure the data writer is ready
+    ATH_MSG_DEBUG("looking up data writer");
+    if (!m_dataWriter) {
+      if (!initDataWriter(&ctx)) {
+        ATH_MSG_ERROR("Failed to initialize DataWriter");
+        return false;
+      }
+    }
 
-/******************************************************************************/
-StatusCode
-ByteStreamEventStorageOutputSvc::queryInterface(
-    const InterfaceID& riid, void** ppvInterface)
-{
-  if (ByteStreamOutputSvc::interfaceID().versionMatch(riid)) {
-    *ppvInterface = dynamic_cast<ByteStreamOutputSvc*>(this);
-  } else {
-    // Interface is not directly available: try out a base class
-    return(::AthService::queryInterface(riid, ppvInterface));
+    // write event to disk
+    EventStorage::DWError write_result = m_dataWriter->putData(
+        sizeof(DataType) * cache->size,
+        reinterpret_cast< void* >(cache->buffer.get()));
+
+    // Report success or failure
+    if (write_result != EventStorage::DWOK) {
+      ATH_MSG_ERROR("Failed to write event to DataWriter");
+      return false;
+    }
+    ++m_totalEventCounter;
   }
-  addRef();
-  return(StatusCode::SUCCESS);
+
+  return true;
 }
 
 
-/******************************************************************************/
 StatusCode
-ByteStreamEventStorageOutputSvc::io_reinit()
-{
+ByteStreamEventStorageOutputSvc::io_reinit() {
   ATH_MSG_INFO("I/O reinitialization...");
-  ServiceHandle<IIoComponentMgr> iomgr("IoComponentMgr", name());
-  if (!iomgr.retrieve().isSuccess()) {
-    ATH_MSG_FATAL("Could not retrieve IoComponentMgr !");
-    return(StatusCode::FAILURE);
-  }
-  if (!iomgr->io_hasitem(this)) {
+
+  if (!m_ioMgr->io_hasitem(this)) {
     ATH_MSG_FATAL("IoComponentMgr does not know about myself !");
-    return(StatusCode::FAILURE);
+    return StatusCode::FAILURE;
   }
-  if (!m_simpleFileName.value().empty()) {
-    std::string outputFile = m_simpleFileName.value();
+
+  if (!m_simpleFileName.empty()) {
+    std::string outputFile = m_simpleFileName;
     ATH_MSG_INFO("I/O reinitialization, file = "  << outputFile);
     std::string &fname = outputFile;
-    if (!iomgr->io_contains(this, fname)) {
+    if (!m_ioMgr->io_contains(this, fname)) {
       ATH_MSG_ERROR("IoComponentMgr does not know about [" << fname << "] !");
       return(StatusCode::FAILURE);
     }
-    if (!iomgr->io_retrieve(this, fname).isSuccess()) {
+    if (!m_ioMgr->io_retrieve(this, fname).isSuccess()) {
       ATH_MSG_FATAL("Could not retrieve new value for [" << fname << "] !");
       return(StatusCode::FAILURE);
     }
     // all good... copy over.
     // modify directory
     m_inputDir.setValue(outputFile.substr(0, outputFile.find_last_of("/")));
-    // FIXME: modify file name, not done for now because of IoUtils.update_io_registry vs. merge conflict.
-    //m_simpleFileName.setValue(outputFile.substr(outputFile.find_last_of("/") + 1));
+    // FIXME: modify file name, not done for now because of
+    // IoUtils.update_io_registry vs. merge conflict.
+    //m_simpleFileName.setValue(
+    //    outputFile.substr(outputFile.find_last_of("/") + 1));
   }
   ATH_MSG_DEBUG("Deleting DataWriter");
   m_dataWriter.reset();
-  return(this->reinit());
+
+  ATH_CHECK(reinit());
+
+  return StatusCode::SUCCESS;
+}
+
+
+const ByteStreamMetadata *
+ByteStreamEventStorageOutputSvc::getByteStreamMetadata(
+    const EventContext* ctx) {
+  const ByteStreamMetadataContainer* metaDataCont = ctx == nullptr
+      ? SG::get(m_byteStreamMetadataKey)
+      : SG::get(m_byteStreamMetadataKey, *ctx);
+
+  if (metaDataCont == nullptr) return nullptr;
+
+  if (metaDataCont->size() > 1)
+    ATH_MSG_WARNING("Multiple run parameters in MetaDataStore. "
+                    "Bytestream format only supports one. Arbitrarily "
+                    "choosing first.");
+
+  return metaDataCont->front();
+}
+
+
+void
+ByteStreamEventStorageOutputSvc::updateDataWriterParameters(
+    DataWriterParameters& params) const {
+
+  if (m_eventStorageVersion == "v5" or m_eventStorageVersion == "run1")
+    params.version = 5;
+  else params.version = 0;
+
+  params.writingPath = m_inputDir;
+
+  if (m_run != 0) params.rPar.run_number = m_run;
+  ATH_MSG_DEBUG("Run number: " << params.rPar.run_number);
+
+  if (m_lumiBlockNumber != 0) params.lumiBlockNumber = m_lumiBlockNumber;
+  ATH_MSG_DEBUG("LB number: " << params.lumiBlockNumber);
+
+  if (!m_streamType.empty()) params.streamType = m_streamType;
+  if (!m_streamName.empty()) params.streamName = m_streamName;
+
+  if (params.streamType.empty()) params.streamType = "Single";
+  if (params.streamName.empty()) params.streamName = "Stream";
+
+  params.stream = params.streamType + "_" + params.streamName;
+
+  if (!m_projectTag.empty()) params.project = m_projectTag;
+
+  params.applicationName = m_appName;
+
+  if (!m_simpleFileName.empty()) {
+    // set up for simple file name
+    boost::shared_ptr<EventStorage::SimpleFileName> simple_file_name(
+        new EventStorage::SimpleFileName(m_simpleFileName));
+    params.theFNCB = simple_file_name;
+  } else {
+    // set up for production file name
+    daq::RawFileName fileNameObj(
+        params.project,
+        params.rPar.run_number,
+        params.streamType,
+        params.streamName,
+        params.lumiBlockNumber,
+        params.applicationName);
+    params.fileNameCore = fileNameObj.fileNameCore();
+  }
+
+  params.compression = m_compressEvents
+      ? EventStorage::ZLIB
+      : EventStorage::NONE;
+
+  params.maxFileMB = m_maxFileMB;
+  params.maxFileNE = params.rPar.max_events = m_maxFileNE;
+}
+
+
+void
+ByteStreamEventStorageOutputSvc::updateDataWriterParameters(
+    DataWriterParameters& params, const xAOD::EventInfo& eventInfo) const {
+  ATH_MSG_DEBUG("Parsing run parameters from EventInfo" << eventInfo);
+  
+  params.rPar.run_number = eventInfo.runNumber();
+  params.lumiBlockNumber = eventInfo.lumiBlock();
+
+  for (const xAOD::EventInfo::StreamTag& tag : eventInfo.streamTags())
+    if(!tag.type().empty()) {
+      params.streamType = tag.type();
+      break;
+    }
+
+  for (const xAOD::EventInfo::StreamTag& tag : eventInfo.streamTags())
+    if (!tag.name().empty()) {
+      params.streamName = tag.name();
+      break;
+    }
+
+  for (const auto& tag : eventInfo.detDescrTags())
+    params.fmdStrings.push_back(tag.first + ' ' + tag.second);
+
+  params.rPar.trigger_type = eventInfo.level1TriggerType();
+  params.rPar.detector_mask_LS = eventInfo.detectorMask();
+  params.rPar.detector_mask_MS = eventInfo.detectorMaskExt();
+
+  std::string event_type = "Event type: sim/data - ";
+  if (eventInfo.eventType(xAOD::EventInfo::EventType::IS_SIMULATION))
+    event_type += "is sim";
+  else event_type += "is data";
+
+  event_type += " , testbeam/atlas - ";
+  if (eventInfo.eventType(xAOD::EventInfo::EventType::IS_TESTBEAM))
+    event_type += "is testbeam";
+  else event_type += "is atlas";
+
+  event_type += " , calibration/physics - ";
+  if (eventInfo.eventType(xAOD::EventInfo::EventType::IS_CALIBRATION))
+    event_type += "is calibration";
+  else event_type += "is physics";
+
+  params.fmdStrings.push_back(event_type);
+}
+
+
+void
+ByteStreamEventStorageOutputSvc::updateDataWriterParameters(
+    DataWriterParameters& params, const ByteStreamMetadata& metaData) const {
+  ATH_MSG_DEBUG("Parsing run parameters from metadata:\n" << metaData); 
+
+  params.rPar.run_number = metaData.getRunNumber();
+  params.lumiBlockNumber = metaData.getLumiBlock();
+
+  const std::string stream = metaData.getStream();
+  const std::string::size_type split = stream.find('_');
+
+  if (split != std::string::npos and params.streamType.empty())
+    params.streamType = stream.substr(0,split);
+
+  if (split != std::string::npos and params.streamName.empty())
+    params.streamName = stream.substr(split+1);
+
+  params.project = metaData.getProject();
+  params.maxFileNE = params.rPar.max_events = metaData.getMaxEvents();
+
+  params.rPar.rec_enable = metaData.getRecEnable();
+  params.rPar.trigger_type = metaData.getTriggerType();
+  params.rPar.beam_type = metaData.getBeamType();
+  if (metaData.getBeamEnergy() != 0)
+    params.rPar.beam_energy = metaData.getBeamEnergy();
+
+  params.rPar.detector_mask_LS = metaData.getDetectorMask(); 
+  params.rPar.detector_mask_MS = metaData.getDetectorMask2();
+
+  for (const std::string& fmd : metaData.getFreeMetaDataStrings())
+    params.fmdStrings.push_back(fmd);
+  // if(fmd.find("Compression=") == std::string::npos)
+}
+
+
+StatusCode
+ByteStreamEventStorageOutputSvc::queryInterface(
+    const InterfaceID& riid, void** ppvInterface) {
+  if (ByteStreamOutputSvc::interfaceID().versionMatch(riid)) {
+    *ppvInterface = dynamic_cast<ByteStreamOutputSvc*>(this);
+  } else {
+    // Interface is not directly available: try out a base class
+    ATH_CHECK(::AthService::queryInterface(riid, ppvInterface));
+  }
+  addRef();
+  return StatusCode::SUCCESS;
 }
diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.h b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.h
index 8c9daa9a515e..cf2bc19a2052 100644
--- a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.h
+++ b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.h
@@ -1,24 +1,40 @@
-/*
-   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-   */
+/* Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */
 
-#ifndef BYTESTREAMEVENTSTORAGEOUTPUTSVC_H
-#define BYTESTREAMEVENTSTORAGEOUTPUTSVC_H
+#ifndef EVENT_BYTESTREAMCNVSVC_SRC_BYTESTREAMEVENTSTORAGEOUTPUTSVC_H_
+#define EVENT_BYTESTREAMCNVSVC_SRC_BYTESTREAMEVENTSTORAGEOUTPUTSVC_H_
 
 /** @file ByteStreamEventStorageOutputSvc.h
- *  @brief This file contains the class definition for the ByteStreamEventStorageOutputSvc class.
+ *  @brief This file contains the class definition for the
+ *         ByteStreamEventStorageOutputSvc class.
+ *
+ *  Writes out BS events to a file, the most obvious thing to do. Used to test 
+ *  running trigger code in offline athena and to write DRAW output, for example
+ *    * Trigger test:    test_trig_data_v1Dev_writeBS_build.py.
+ *    * DRAW production:
+ *        from ByteStreamCnvSvc import WriteByteStream
+ *        StreamBSFileOutput = WriteByteStream.getStream("EventStorage",
+ *                                                       "StreamBSFileOutput")
+ *
  *  @author Peter van Gemmeren <gemmeren@anl.gov>
+ *  @author Frank Berghaus <fberghaus@anl.gov>
  **/
-
 #include <memory>
+#include <mutex>
+#include <string>
 
-#include "EventStorage/EventStorageRecords.h"
 #include "ByteStreamDataWriter.h"
-
 #include "ByteStreamCnvSvc/ByteStreamOutputSvc.h"
+
+#include "AthenaKernel/SlotSpecificObj.h"
+#include "ByteStreamData/ByteStreamMetadataContainer.h"
 #include "ByteStreamData/RawEvent.h"
+#include "EventStorage/EventStorageRecords.h"
+#include "StoreGate/ReadHandleKey.h"
+#include "xAODEventInfo/EventInfo.h"
 
+#include "GaudiKernel/extends.h"
 #include "GaudiKernel/IIoComponent.h"
+#include "GaudiKernel/IIoComponentMgr.h" 
 #include "GaudiKernel/ServiceHandle.h"
 
 
@@ -27,69 +43,166 @@ class ByteStreamMetadata;
 
 
 /** @class ByteStreamEventStorageOutputSvc
- *  @brief This class provides the services for writing FullEventFragment into file.
- *  This class implements the interface ByteStreamOutputSvc for the conversion service to write the output.
+ *  @brief This class provides the services for writing FullEventFragment into
+ *         file.
+ *  This class implements the interface ByteStreamOutputSvc for the conversion
+ *  service to write the output to a file.
  **/
-class ByteStreamEventStorageOutputSvc
-:         public ByteStreamOutputSvc
-, virtual public IIoComponent
-{
-public:
+class ByteStreamEventStorageOutputSvc:
+    public ByteStreamOutputSvc,
+    virtual public IIoComponent {
+ public:
+  //using extends::extends;
   /// Constructors:
-  ByteStreamEventStorageOutputSvc(const std::string& name, ISvcLocator* pSvcLocator);
+  ByteStreamEventStorageOutputSvc(
+      const std::string& name, ISvcLocator* pSvcLocator);
 
-  /// Destructor.
-  virtual ~ByteStreamEventStorageOutputSvc();
+   /// Destructor.
+  virtual ~ByteStreamEventStorageOutputSvc() {}
 
   /// Required of all Gaudi Services
-  virtual StatusCode initialize() override;
-  virtual StatusCode stop      () override;
-  virtual StatusCode finalize  () override;
+  StatusCode initialize() override;
+  StatusCode stop() override;
+  StatusCode finalize() override;
+  StatusCode
+      queryInterface(const InterfaceID& riid, void** ppvInterface) override;
 
-  /// Required of all Gaudi services:  see Gaudi documentation for details
-  StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
 
   /// Implementation of the ByteStreamOutputSvc interface method putEvent.
-  virtual bool putEvent(RawEvent* re) override;
-  virtual bool putEvent(RawEvent* re, const EventContext& ctx) override;
+  bool putEvent(RawEvent* re) override;
+  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() override;
+  StatusCode io_reinit() override;
+
+ private:  // properties
+  //!< directory for the data files
+  Gaudi::Property<std::string> m_inputDir{this, "OutputDirectory", "",
+    "directory for the data files"};
+
+  //!< Project Tag
+  Gaudi::Property<std::string> m_projectTag{this, "ProjectTag", "",
+    "part of filename"};
+
+  //!< Application Name
+  Gaudi::Property<std::string> m_appName{this, "AppName", "",
+    "part of filename"};
+
+  //!< File Tag
+  Gaudi::Property<std::string> m_fileTag{this, "FileTag", "",
+    "part of filename"};
+
+  //!< stream type
+  Gaudi::Property<std::string> m_streamType{this, "StreamType",  "",
+    "part of filename"};
+
+  //!< stream name
+  Gaudi::Property<std::string> m_streamName{this, "StreamName", "",
+    "part of filename"};
+
+  //!< eformat event version to produce, "v40" for run1, or "current"
+  Gaudi::Property<std::string> m_eformatVersion{this, "EformatVersion",
+    "current", "Version of the event format data, use \"v40\" or \"run1\" "
+    "for run1, \"current\" for most current version (default)."};
+
+  //!< EventStorage BS version to produce, "v5" for run1, or "current"
+  Gaudi::Property<std::string> m_eventStorageVersion{this,
+    "EventStorageVersion", "current", "Version of the ByteStream file data, "
+        "use \"v5\" or \"run1\" for run1, \"current\" for most current version "
+        "(default)."};
+
+  //!< stream name for multiple output
+  Gaudi::Property<std::string> m_bsOutputStreamName{this, "BSOutputStreamName",
+    name(), "stream name for muliple output"};
+
+  //! use this string for filename, not from the "AgreedFileName"
+  Gaudi::Property<std::string> m_simpleFileName{this, "SimpleFileName", "",
+    "for filename not from AgreedFileName"};
+
+  //!< luminosity block number
+  Gaudi::Property<int> m_lumiBlockNumber{this, "LumiBlockNumber", 0,
+    "part of filename"};
+
+  //!< run number
+  Gaudi::Property<int> m_run{this, "RunNumber", 0, "part of filename"};
+
+  //!< Dump fragments
+  Gaudi::Property<bool> m_dump{this, "DumpFlag", false, "dump fragments"};
+
+  //!< Write eventless files
+  Gaudi::Property<bool> m_writeEventless{this, "WriteEventlessFiles", true,
+    ""};
 
+  //!< Compress events
+  Gaudi::Property<bool> m_compressEvents{this, "CompressEvents", false, ""};
 
-private: // internal member functions
+  //!< number of MB per file
+  Gaudi::Property<unsigned int> m_maxFileMB{this, "MaxFileMB", 10000,
+    "MB per file"};
+
+  //!< number of events per file
+  Gaudi::Property<unsigned int> m_maxFileNE{this, "MaxFileNE", 100000,
+    "evens per file"};
+
+  SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey{this, "EventInfoKey",
+    "EventInfo", "Key for EventInfo object in event store"};
+
+  SG::ReadHandleKey< ByteStreamMetadataContainer > m_byteStreamMetadataKey{this,
+    "ByteStreamMetadataKey", "MetaDataStore+ByteStreamMetadata",
+    "Key for bytestream metadata object in metadata store"};
+
+  ServiceHandle< IIoComponentMgr > m_ioMgr{"IoComponentMgr", name()};
+
+ private:  // data
+  //! number of event counter
+  int m_totalEventCounter{0};
+
+  bool m_isRun1{false};
+
+  //! pointer to DataWriter
+  std::unique_ptr<ByteStreamDataWriter> m_dataWriter;
+
+  //! mutex to lock data writer during initialization or writing
+  std::mutex m_dataWriterMutex;
+
+ private:  // internal helper functions
   /// reinitialize the service when a @c fork() occured/was-issued
   StatusCode reinit();
-  void checkForUserMetadata(EventStorage::freeMetaDataStrings& freeMetaDataStrings);
-
-private: // data
-  int                                   m_totalEventCounter; //!< number of event counter
-  std::unique_ptr<ByteStreamDataWriter> m_dataWriter;        //!< pointer to DataWriter
-
-private: // properties
-  Gaudi::Property<std::string>  m_inputDir;       //!< directory for the data files
-  Gaudi::Property<std::string>  m_projectTag;     //!< Project Tag
-  Gaudi::Property<std::string>  m_appName;        //!< Application Name
-  Gaudi::Property<std::string>  m_fileTag;        //!< File Tag
-  Gaudi::Property<std::string>  m_streamType;     //!< stream type
-  Gaudi::Property<std::string>  m_streamName;     //!< stream name
-  Gaudi::Property<int>          m_lumiBlockNumber;//!< luminosity block number
-  Gaudi::Property<int>          m_run;	          //!< run number
-  Gaudi::Property<bool>         m_dump;	          //!< Dump fragments
-  Gaudi::Property<bool>         m_writeEventless; //!< Write eventless files
-  Gaudi::Property<bool>         m_compressEvents; //!< Compress events
-  Gaudi::Property<unsigned int> m_maxFileMB;      //!< number of MB per file
-  Gaudi::Property<unsigned int> m_maxFileNE;      //!< number of events per file
-  Gaudi::Property<std::string>  m_eformatVersion; //!< eformat event version to produce, "v40" for run1, or "current"
-  Gaudi::Property<std::string>  m_eventStorageVersion;  //!< EventStorage BS version to produce, "v5" for run1, or "current"
-  Gaudi::Property<std::string>  m_bsOutputStreamName;//!< stream name for multiple output
-  Gaudi::Property<std::string>  m_simpleFileName; //!< use this string for filename, not from the "AgreedFileName"
-
-private: // internal helper functions
+
   /// initialize EventStorage's DataWriter
-  bool initDataWriter();
-  bool initDataWriterContents(const EventInfo*, const ByteStreamMetadata* );
+  bool initDataWriter(const EventContext* ctx = nullptr);
+  bool initDataWriterContents(
+      const xAOD::EventInfo*, const ByteStreamMetadata*);
+  const ByteStreamMetadata * getByteStreamMetadata(
+      const EventContext* ctx = nullptr);
+
+  struct EventCache {
+    inline void releaseEvent() {
+      buffer.reset(nullptr);
+      size = 0;
+    }
+
+    //! Underlying data structure
+    std::unique_ptr< uint32_t[] > buffer{nullptr};
+
+    unsigned int size{0};
+  };
+
+  //! Cache of event data for each slot
+  SG::SlotSpecificObj<EventCache> m_eventCache;
+
+  /// Create DataWriter parameters from job properties
+  void updateDataWriterParameters(DataWriterParameters&) const;
+
+  /// Create DataWriter parameters from EventInfo
+  void updateDataWriterParameters(DataWriterParameters& params,
+                                  const xAOD::EventInfo& evtInfo) const;
+
+  /// Create DataWriter parameters from MetaData
+  void updateDataWriterParameters(DataWriterParameters& params,
+                                  const ByteStreamMetadata& metaData) const;
+
 };
 
-#endif // BYTESTREAMEVENTSTORAGEOUTPUTSVC_H
+#endif  // EVENT_BYTESTREAMCNVSVC_SRC_BYTESTREAMEVENTSTORAGEOUTPUTSVC_H_
diff --git a/Event/ByteStreamData/ByteStreamData/ByteStreamMetadata.h b/Event/ByteStreamData/ByteStreamData/ByteStreamMetadata.h
index 83066ab18bea..bb8db3e2d1cc 100644
--- a/Event/ByteStreamData/ByteStreamData/ByteStreamMetadata.h
+++ b/Event/ByteStreamData/ByteStreamData/ByteStreamMetadata.h
@@ -92,14 +92,6 @@ public:
   unsigned int       getLumiBlock() const;
   const std::vector<std::string>& getFreeMetaDataStrings() const;
 
-
-  /**
-   * pretty print bytestream metadata content
-   */
-  friend std::ostream& operator<<(std::ostream& os,
-      const ByteStreamMetadata& bsmd);
-
-
 private:
   unsigned int m_runNumber;
   unsigned int m_numEvents;
@@ -118,6 +110,12 @@ private:
 };
 
 
+/**
+ * pretty print bytestream metadata content
+ */
+std::ostream& operator<<(std::ostream& os, const ByteStreamMetadata& bsmd);
+
+
 #include "AthenaKernel/CLASS_DEF.h"
 CLASS_DEF(ByteStreamMetadata, 170625359, 1)
 #endif
-- 
GitLab


From afc5bf32db3887658641526644222f9fd043b2ce Mon Sep 17 00:00:00 2001
From: Andrii Verbytskyi <andrii.verbytskyi@cern.ch>
Date: Mon, 5 Oct 2020 18:20:55 +0000
Subject: [PATCH 208/403] Migrate ifs core to  HepMC3,  part2

---
 .../TruthUtils/TruthUtils/HepMCHelpers.h      |   7 +-
 .../ISF_Services/src/InputConverter.cxx       | 179 +++++++++++++++++-
 .../ISF_Services/src/InputConverter.h         |  20 ++
 .../ISF_Core/ISF_Services/src/TruthSvc.cxx    |  67 ++++++-
 4 files changed, 262 insertions(+), 11 deletions(-)

diff --git a/Generators/TruthUtils/TruthUtils/HepMCHelpers.h b/Generators/TruthUtils/TruthUtils/HepMCHelpers.h
index ded69543e7e1..6f3ac4f0f4e5 100644
--- a/Generators/TruthUtils/TruthUtils/HepMCHelpers.h
+++ b/Generators/TruthUtils/TruthUtils/HepMCHelpers.h
@@ -138,11 +138,12 @@ template <class T>  std::vector<T> findChildren(T p)
       {
       std::vector<T> ret;
       if (!p) return ret;
+      auto v=p->end_vertex();
+      if (!v) return ret;
 #ifdef HEPMC3
-      ret=HepMC::children_particles(p);
+      for (auto pp: v->particles_out()) ret.push_back(pp);
 #else
-      auto v=p->end_vertex();
-      if (p) for (auto pp=v->particles_out_const_begin();pp!=v->particles_out_const_end();++pp) ret.push_back(*pp);
+      for (auto pp=v->particles_out_const_begin();pp!=v->particles_out_const_end();++pp) ret.push_back(*pp);
 #endif
       if (ret.size()==1) if (ret.at(0)->pdg_id()==p->pdg_id()) ret=findChildren(ret.at(0));
       return ret;
diff --git a/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.cxx b/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.cxx
index 02a3746d867e..7b8a496748fc 100644
--- a/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.cxx
+++ b/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.cxx
@@ -187,6 +187,39 @@ StatusCode ISF::InputConverter::convertHepMCToG4Event(McEventCollection& inputGe
 
 
 /** get all generator particles which pass filters */
+#ifdef HEPMC3
+std::vector<HepMC::ConstGenParticlePtr>
+ISF::InputConverter::getSelectedParticles(const HepMC::GenEvent& evnt, bool legacyOrdering) const {
+  auto allGenPartBegin = evnt.particles().begin();
+  auto allGenPartEnd = evnt.particles().end();
+
+  // reserve destination container with maximum size, i.e. number of particles in input event
+  std::vector<HepMC::ConstGenParticlePtr> passedGenParticles{};
+  size_t maxParticles = std::distance(allGenPartBegin, allGenPartEnd);
+  passedGenParticles.reserve(maxParticles);
+
+  if (legacyOrdering) {
+    // FIXME: remove this block and the 'legacyOrdering' flag
+    //        once we don't need the legacy order any longer
+    for (auto vtx: evnt.vertices() ) {
+      std::copy_if(vtx->particles_out().begin(),
+                   vtx->particles_out().end(),
+                   std::back_inserter(passedGenParticles),
+                   [this](HepMC::ConstGenParticlePtr p){return this->passesFilters(p);});
+    }
+  }
+  else {
+    std::copy_if(allGenPartBegin,
+                 allGenPartEnd,
+                 std::back_inserter(passedGenParticles),
+                 [this](HepMC::ConstGenParticlePtr p){return this->passesFilters(p);});
+  }
+
+  passedGenParticles.shrink_to_fit();
+
+  return passedGenParticles;
+}
+#else
 std::vector<HepMC::GenParticlePtr>
 ISF::InputConverter::getSelectedParticles(const HepMC::GenEvent& evnt, bool legacyOrdering) const {
   auto allGenPartBegin = evnt.particles_begin();
@@ -221,11 +254,16 @@ ISF::InputConverter::getSelectedParticles(const HepMC::GenEvent& evnt, bool lega
 
   return passedGenParticles;
 }
+#endif
 
 
 /** get all generator particles which pass filters */
 ISF::ISFParticle*
+#ifdef HEPMC3
+ISF::InputConverter::convertParticle(HepMC::ConstGenParticlePtr genPartPtr, EBC_EVCOLL kindOfCollection) const {
+#else
 ISF::InputConverter::convertParticle(HepMC::GenParticlePtr genPartPtr, EBC_EVCOLL kindOfCollection) const {
+#endif
   if (!genPartPtr) { return nullptr; }
 
   auto  pVertex = genPartPtr->production_vertex();
@@ -264,7 +302,11 @@ ISF::InputConverter::convertParticle(HepMC::GenParticlePtr genPartPtr, EBC_EVCOL
   /// particle origin (TODO: add proper GeoID, collision/cosmics)
   DetRegionSvcIDPair origin(AtlasDetDescr::fUndefinedAtlasRegion, ISF::fEventGeneratorSimID);
   const auto pBarcode = HepMC::barcode(genPartPtr);
+#ifdef HEPMC3
+  auto tBinding = std::make_unique<ISF::TruthBinding>(std::const_pointer_cast<HepMC3::GenParticle>(genPartPtr));
+#else
   auto tBinding = std::make_unique<ISF::TruthBinding>(genPartPtr);
+#endif
   // @FIXME: set the bunch-crossing identifier for pile-up dynamically
   // rather than a constant '1' (e.g. could use GenEvent index for that?)
   const int bcid = (kindOfCollection==EBC_MAINEVCOLL) ? 0 : 1;
@@ -286,6 +328,30 @@ ISF::InputConverter::convertParticle(HepMC::GenParticlePtr genPartPtr, EBC_EVCOL
 
 
 /** get right GenParticle mass */
+#ifdef HEPMC3
+double
+ISF::InputConverter::getParticleMass(HepMC::ConstGenParticlePtr part) const{
+  // default value: generated particle mass
+  double mass = part->generated_mass();
+  ATH_MSG_VERBOSE("part->generated_mass, mass="<<mass);
+
+  // 1. use PDT mass?
+  if ( !m_useGeneratedParticleMass ) {
+    const int absPDG = std::abs(part->pdg_id());
+    HepPDT::ParticleData const *pData = (m_particleDataTable)
+      ? m_particleDataTable->particle(absPDG)
+      : nullptr;
+    if (pData) {
+      mass = pData->mass();
+      ATH_MSG_VERBOSE("using pData mass, mass="<<mass);
+    }
+    else {
+      ATH_MSG_WARNING( "Unable to find mass of particle with PDG ID '" << absPDG << "' in ParticleDataTable. Will set mass to generated_mass: " << mass);
+    }
+  }
+  return mass;
+}
+#else
 double
 ISF::InputConverter::getParticleMass(const HepMC::GenParticle &part) const
 {
@@ -309,9 +375,36 @@ ISF::InputConverter::getParticleMass(const HepMC::GenParticle &part) const
   }
   return mass;
 }
+#endif
 
 
 /** check if the given particle passes all filters */
+#ifdef HEPMC3
+bool
+ISF::InputConverter::passesFilters(HepMC::ConstGenParticlePtr part) const
+{
+  // TODO: implement this as a std::find_if with a lambda function
+  for ( const auto& filter : m_genParticleFilters ) {
+    // determine if the particle passes current filter
+    bool passFilter = filter->pass(part);
+    ATH_MSG_VERBOSE("GenParticleFilter '" << filter.typeAndName() << "' returned: "
+                    << (passFilter ? "true, will keep particle."
+                        : "false, will remove particle."));
+    const auto& momentum = part->momentum();
+    ATH_MSG_VERBOSE("Particle: ("
+                    <<momentum.px()<<", "
+                    <<momentum.py()<<", "
+                    <<momentum.pz()<<"), pdgCode: "
+                    <<part->pdg_id() );
+
+    if (!passFilter) {
+      return false;
+    }
+  }
+
+  return true;	
+}	
+#else
 bool
 ISF::InputConverter::passesFilters(const HepMC::GenParticle& part) const
 {
@@ -336,6 +429,7 @@ ISF::InputConverter::passesFilters(const HepMC::GenParticle& part) const
 
   return true;
 }
+#endif
 
 
 //________________________________________________________________________
@@ -396,6 +490,78 @@ const G4ParticleDefinition* ISF::InputConverter::getG4ParticleDefinition(int pdg
 }
 
 //________________________________________________________________________
+#ifdef HEPMC3
+G4PrimaryParticle* ISF::InputConverter::getG4PrimaryParticle(HepMC::ConstGenParticlePtr genpart) const{
+ ATH_MSG_VERBOSE("Creating G4PrimaryParticle from GenParticle.");
+
+  const G4ParticleDefinition *particleDefinition = this->getG4ParticleDefinition(genpart->pdg_id());
+
+  if(particleDefinition==nullptr) {
+    ATH_MSG_ERROR("ISF_to_G4Event particle conversion failed. ISF_Particle PDG code = " << genpart->pdg_id() <<
+                  "\n This usually indicates a problem with the evgen step.\n" <<
+                  "Please report this to the Generators group, mentioning the release and generator used for evgen and the PDG code above." );
+    return nullptr;
+  }
+
+  // create new primaries and set them to the vertex
+  //  G4double mass =  particleDefinition->GetPDGMass();
+  auto &genpartMomentum = genpart->momentum();
+  G4double px = genpartMomentum.x();
+  G4double py = genpartMomentum.y();
+  G4double pz = genpartMomentum.z();
+
+  std::unique_ptr<G4PrimaryParticle> g4particle = std::make_unique<G4PrimaryParticle>(particleDefinition,px,py,pz);
+
+  if (genpart->end_vertex()) {
+    // Set the lifetime appropriately - this is slow but rigorous, and we
+    //  don't want to end up with something like vertex time that we have
+    //  to validate for every generator on earth...
+    const auto& prodVtx = genpart->production_vertex()->position();
+    const auto& endVtx = genpart->end_vertex()->position();
+    const G4LorentzVector lv0 ( prodVtx.x(), prodVtx.y(), prodVtx.z(), prodVtx.t() );
+    const G4LorentzVector lv1 ( endVtx.x(), endVtx.y(), endVtx.z(), endVtx.t() );
+    g4particle->SetProperTime( (lv1-lv0).mag()/Gaudi::Units::c_light );
+
+    if(m_quasiStableParticlesIncluded) {
+      ATH_MSG_VERBOSE( "Detected primary particle with end vertex." );
+      ATH_MSG_VERBOSE( "Will add the primary particle set on." );
+      ATH_MSG_VERBOSE( "Primary Particle: " << genpart );
+      ATH_MSG_VERBOSE( "Number of daughters of "<<HepMC::barcode(genpart)<<": " << genpart->end_vertex()->particles_out().size() );
+    }
+    else {
+      ATH_MSG_WARNING( "Detected primary particle with end vertex." );
+      ATH_MSG_WARNING( "Will add the primary particle set on." );
+      ATH_MSG_WARNING( "Primary Particle: " << genpart );
+      ATH_MSG_WARNING( "Number of daughters of "<<HepMC::barcode(genpart)<<": " << genpart->end_vertex()->particles_out().size() );
+    }
+    // Add all necessary daughter particles
+    for ( auto daughter: genpart->end_vertex()->particles_out() ) {
+      if(m_quasiStableParticlesIncluded) {
+        ATH_MSG_VERBOSE ( "Attempting to add daughter particle of "<<HepMC::barcode(genpart)<<": " << daughter );
+      }
+      else {
+        ATH_MSG_WARNING ( "Attempting to add daughter particle of "<<HepMC::barcode(genpart)<<": " << daughter );
+      }
+      G4PrimaryParticle *daughterG4Particle = this->getG4PrimaryParticle( daughter );
+      if(!daughterG4Particle) {
+        ATH_MSG_ERROR("Bailing out of loop over daughters of particle with barcode: "<<HepMC::barcode(genpart) <<
+                      " due to errors - will not return G4Particle.");
+        return nullptr;
+      }
+      g4particle->SetDaughter( daughterG4Particle );
+    }
+  }
+
+  // Set the user information for this primary to point to the HepMcParticleLink...
+  PrimaryParticleInformation* ppi = new PrimaryParticleInformation(genpart);
+  ppi->SetParticle(genpart);
+  ppi->SetRegenerationNr(0);
+  g4particle->SetUserInformation(ppi);
+  ATH_MSG_VERBOSE("Making primary down the line with barcode " << ppi->GetParticleBarcode());
+
+  return g4particle.release();
+}
+#else
 G4PrimaryParticle* ISF::InputConverter::getG4PrimaryParticle(const HepMC::GenParticle& genpart) const
 {
   ATH_MSG_VERBOSE("Creating G4PrimaryParticle from GenParticle.");
@@ -468,6 +634,7 @@ G4PrimaryParticle* ISF::InputConverter::getG4PrimaryParticle(const HepMC::GenPar
 
   return g4particle.release();
 }
+#endif
 
 
 //________________________________________________________________________
@@ -540,7 +707,11 @@ G4PrimaryParticle* ISF::InputConverter::getG4PrimaryParticle(const ISF::ISFParti
         ATH_MSG_VERBOSE( "Will add the primary particle set on." );
         ATH_MSG_VERBOSE( "ISF Particle: " << isp );
         ATH_MSG_VERBOSE( "Primary Particle: " << genpart );
-        ATH_MSG_VERBOSE( "Number of daughters of "<<genpart->barcode()<<": " << genpart->end_vertex()->particles_out_size() );
+#ifdef HEPMC3
+        ATH_MSG_VERBOSE( "Number of daughters of "<<HepMC::barcode(genpart)<<": " << genpart->end_vertex()->particles_out().size() );
+#else
+        ATH_MSG_VERBOSE( "Number of daughters of "<<HepMC::barcode(genpart)<<": " << genpart->end_vertex()->particles_out_size() );
+#endif
       }
       else {
         ATH_MSG_WARNING( "Detected primary particle with end vertex. This should only be the case if" );
@@ -549,7 +720,11 @@ G4PrimaryParticle* ISF::InputConverter::getG4PrimaryParticle(const ISF::ISFParti
         ATH_MSG_WARNING( "particle set on." );
         ATH_MSG_WARNING( "ISF Particle: " << isp );
         ATH_MSG_WARNING( "Primary Particle: " << genpart );
-        ATH_MSG_WARNING( "Number of daughters of "<<genpart->barcode()<<": " << genpart->end_vertex()->particles_out_size() );
+#ifdef HEPMC3
+        ATH_MSG_VERBOSE( "Number of daughters of "<<HepMC::barcode(genpart)<<": " << genpart->end_vertex()->particles_out().size() );
+#else
+        ATH_MSG_WARNING( "Number of daughters of "<<HepMC::barcode(genpart)<<": " << genpart->end_vertex()->particles_out_size() );
+#endif
       }
       // Add all necessary daughter particles
       for ( auto daughter: *(genpart->end_vertex())) {
diff --git a/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.h b/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.h
index 562aa431070c..21c747f2d67b 100644
--- a/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.h
+++ b/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.h
@@ -83,7 +83,11 @@ namespace ISF {
 
     const G4ParticleDefinition* getG4ParticleDefinition(int pdgcode) const;
 
+#ifdef HEPMC3
+    G4PrimaryParticle* getG4PrimaryParticle(HepMC::ConstGenParticlePtr gp) const;
+#else
     G4PrimaryParticle* getG4PrimaryParticle(const HepMC::GenParticle& gp) const;
+#endif
 
     G4PrimaryParticle* getG4PrimaryParticle(const ISF::ISFParticle& isp, bool useHepMC) const;
 
@@ -93,16 +97,32 @@ namespace ISF {
     bool isInsideG4WorldVolume(const ISF::ISFParticle& isp, const G4VSolid* worldSolid) const;
 
     /** get right GenParticle mass */
+#ifdef HEPMC3
+    double getParticleMass(HepMC::ConstGenParticlePtr p) const;
+#else
     double getParticleMass(const HepMC::GenParticle& p) const;
+#endif
 
     /** get all generator particles which pass filters */
+#ifdef HEPMC3
+    std::vector<HepMC::ConstGenParticlePtr > getSelectedParticles(const HepMC::GenEvent& evnt, bool legacyOrdering=false) const;
+#else
     std::vector<HepMC::GenParticlePtr > getSelectedParticles(const HepMC::GenEvent& evnt, bool legacyOrdering=false) const;
+#endif
 
     /** check if the given particle passes all filters */
+#ifdef HEPMC3
+    bool passesFilters(HepMC::ConstGenParticlePtr p) const;
+#else
     bool passesFilters(const HepMC::GenParticle& p) const;
+#endif
 
     /** convert GenParticle to ISFParticle */
+#ifdef HEPMC3
+    ISF::ISFParticle* convertParticle(HepMC::ConstGenParticlePtr genPartPtr, EBC_EVCOLL kindOfCollection=EBC_MAINEVCOLL) const;
+#else
     ISF::ISFParticle* convertParticle(HepMC::GenParticlePtr genPartPtr, EBC_EVCOLL kindOfCollection=EBC_MAINEVCOLL) const;
+#endif
 
     /** ParticlePropertyService and ParticleDataTable */
     ServiceHandle<IPartPropSvc>           m_particlePropSvc;          //!< particle properties svc to retrieve PDT
diff --git a/Simulation/ISF/ISF_Core/ISF_Services/src/TruthSvc.cxx b/Simulation/ISF/ISF_Core/ISF_Services/src/TruthSvc.cxx
index 041a868249c8..289dc593a5d4 100644
--- a/Simulation/ISF/ISF_Core/ISF_Services/src/TruthSvc.cxx
+++ b/Simulation/ISF/ISF_Core/ISF_Services/src/TruthSvc.cxx
@@ -25,6 +25,7 @@
 #include "AtlasHepMC/GenParticle.h"
 #include "AtlasHepMC/GenEvent.h"
 #include "AtlasHepMC/GenVertex.h"
+#include "AtlasHepMC/Relatives.h"
 // CLHEP includes
 #include "CLHEP/Geometry/Point3D.h"
 
@@ -132,6 +133,15 @@ StatusCode ISF::TruthSvc::initializeTruthCollection()
 }
 
 /** Delete child vertex */
+#ifdef HEPMC3
+void ISF::TruthSvc::deleteChildVertex(HepMC::GenVertexPtr vertex) const {
+  HepMC::GenEvent* parent=vertex->parent_event(); 
+  std::vector<HepMC::GenVertexPtr> verticesToDelete=HepMC::descendant_vertices(vertex);
+  for (auto v: verticesToDelete) parent->remove_vertex(v);
+  verticesToDelete.clear();
+  return;
+}
+#else
 void ISF::TruthSvc::deleteChildVertex(HepMC::GenVertexPtr vertex) const {
   std::vector<HepMC::GenVertexPtr> verticesToDelete;
   verticesToDelete.resize(0);
@@ -148,6 +158,7 @@ void ISF::TruthSvc::deleteChildVertex(HepMC::GenVertexPtr vertex) const {
   }
   return;
 }
+#endif
 
 
 StatusCode ISF::TruthSvc::releaseEvent() {
@@ -277,7 +288,7 @@ void ISF::TruthSvc::recordIncidentToMCTruth( ISF::ITruthIncident& ti) const {
   HepMC::GenParticlePtr  parentBeforeIncident = ti.parentParticle();
   HepMC::GenParticlePtr  parentAfterIncident = ti.parentParticleAfterIncident( newPrimBC ); // This call changes ti.parentParticle() output
   if(parentAfterIncident) {
-    ATH_MSG_VERBOSE ( "Parent After Incident: " << *parentAfterIncident);
+    ATH_MSG_VERBOSE ( "Parent After Incident: " << parentAfterIncident);
     if (classification==ISF::QS_SURV_VTX) {
       // Special case when a particle with a pre-defined decay
       // interacts and survives.
@@ -286,7 +297,11 @@ void ISF::TruthSvc::recordIncidentToMCTruth( ISF::ITruthIncident& ti) const {
       parentAfterIncident->set_status(2);
       // 2) A new GenVertex for the intermediate interaction should be
       // added.
+#ifdef HEPMC3
+      auto newVtx = HepMC::newGenVertexPtr( vtx->position(), vtx->id());
+#else
       std::unique_ptr<HepMC::GenVertex> newVtx = std::make_unique<HepMC::GenVertex>( vtx->position(), vtx->id(), vtx->weights() );
+#endif
 #ifdef DEBUG_TRUTHSVC
       ATH_MSG_INFO("New GenVertex 1: " << *(newVtx.get()) );
       ATH_MSG_INFO("New QS GenVertex 1: " << *(newVtx.get()) );
@@ -296,14 +311,24 @@ void ISF::TruthSvc::recordIncidentToMCTruth( ISF::ITruthIncident& ti) const {
 #ifdef DEBUG_TRUTHSVC
       ATH_MSG_INFO("New QSGenVertex 2: " << *(newVtx.get()) );
 #endif
+#ifdef HEPMC3
+      auto tmpVtx = newVtx;
+#else
       auto tmpVtx = newVtx.get();
+#endif
 #ifdef DEBUG_TRUTHSVC
       ATH_MSG_INFO("New QS GenVertex 3: " << (*tmpVtx) );
 #endif
+#ifdef HEPMC3
+      mcEvent->add_vertex( newVtx);
+      auto vtx_weights=newVtx->attribute<HepMC3::VectorDoubleAttribute>("weights");
+      if (vtx_weights) newVtx->add_attribute("weights",std::make_shared<HepMC3::VectorDoubleAttribute>(vtx_weights->value()));
+#else
       if(!mcEvent->add_vertex( newVtx.release() )) {
         ATH_MSG_FATAL("Failed to add GenVertex to GenEvent.");
         abort();
       }
+#endif
       tmpVtx->add_particle_in( parentBeforeIncident );
       tmpVtx->add_particle_out( parentAfterIncident );
       vtx->add_particle_in( parentAfterIncident );
@@ -323,7 +348,11 @@ void ISF::TruthSvc::recordIncidentToMCTruth( ISF::ITruthIncident& ti) const {
     // FIXME should probably make this part a separate function and
     // also check if the pdgids of the child particles are the same
     // too.
+#ifdef HEPMC3
+    unsigned short nVertexChildren=vtx->particles_out().size();
+#else
     unsigned short nVertexChildren=vtx->particles_out_size();
+#endif
     if(parentAfterIncident) { nVertexChildren-=1; }
     if(nVertexChildren!=numSec) {
       ATH_MSG_WARNING("Existing vertex has " << nVertexChildren << " children. " <<
@@ -347,7 +376,7 @@ void ISF::TruthSvc::recordIncidentToMCTruth( ISF::ITruthIncident& ti) const {
         for(auto childParticle : childParticleVector) {
           if( (childParticle->pdg_id() == childPDGcode) && std::count(matchedChildParticles.begin(),matchedChildParticles.end(),childParticle)==0) {
             noMatch=false;
-            ATH_MSG_VERBOSE("Found a matching Quasi-stable GenParticle with PDGcode " << childPDGcode << ":\n\t" << *childParticle );
+            ATH_MSG_VERBOSE("Found a matching Quasi-stable GenParticle with PDGcode " << childPDGcode << ":\n\t" << childParticle );
             matchedChildParticles.push_back(childParticle);
             // FIXME There is a weakness in the code here for
             // vertices with multiple children with the same
@@ -382,7 +411,7 @@ void ISF::TruthSvc::recordIncidentToMCTruth( ISF::ITruthIncident& ti) const {
         // add particle to vertex
         vtx->add_particle_out( p);
       }
-      ATH_MSG_VERBOSE ( "Writing out " << i << "th child particle: " << *p);
+      ATH_MSG_VERBOSE ( "Writing out " << i << "th child particle: " << p);
     } // <-- if write out child particle
     else {
       ATH_MSG_VERBOSE ( "Not writing out " << i << "th child particle." );
@@ -429,7 +458,11 @@ HepMC::GenVertexPtr  ISF::TruthSvc::createGenVertexFromTruthIncident( ISF::ITrut
     }
   }
   int vtxID = 1000 + static_cast<int>(processCode);
+#ifdef HEPMC3
+  auto vtx = HepMC::newGenVertexPtr( ti.position(),vtxID);
+#else
   std::unique_ptr<HepMC::GenVertex> vtx = std::make_unique<HepMC::GenVertex>( ti.position(), vtxID, weights );
+#endif
   HepMC::suggest_barcode( vtx.get(), vtxbcode );
 
   if (parent->end_vertex()){
@@ -439,23 +472,32 @@ HepMC::GenVertexPtr  ISF::TruthSvc::createGenVertexFromTruthIncident( ISF::ITrut
       ATH_MSG_WARNING("is not yet validated in ISF, so you'd better know what you're doing.");
       ATH_MSG_WARNING("Will delete the old vertex and swap in the new one.");
     }
-    auto* oldVertex = parent->end_vertex();
+    auto oldVertex = parent->end_vertex();
 #ifdef DEBUG_TRUTHSVC
     ATH_MSG_VERBOSE("createGVfromTI Existing QS GenVertex 1: " << *oldVertex );
     ATH_MSG_VERBOSE("createGVfromTI QS Parent 1: " << *parent);
 #endif
     if(replaceExistingGenVertex) {
       vtx->add_particle_in( parent );
-      ATH_MSG_VERBOSE("createGVfromTI Replacement QS GenVertex: " << *(vtx.get()) );
+      ATH_MSG_VERBOSE("createGVfromTI Replacement QS GenVertex: " << vtx.get() );
+#ifdef HEPMC3
+      mcEvent->add_vertex(vtx);
+      vtx->add_attribute("weights",std::make_shared<HepMC3::VectorDoubleAttribute>(weights));
+#else
       mcEvent->add_vertex( vtx.release() );
+#endif
       // Delete oldVertex and children here
       this->deleteChildVertex(oldVertex);
     }
     else {
-      //oldVertex->suggest_barcode( vtxbcode );
       oldVertex->set_position( ti.position() );
+#ifdef HEPMC3
+      oldVertex->set_status( vtxID );
+      oldVertex->add_attribute("weights",std::make_shared<HepMC3::VectorDoubleAttribute>(weights));
+#else
       oldVertex->set_id( vtxID );
       oldVertex->weights() = weights;
+#endif
 #ifdef DEBUG_TRUTHSVC
       ATH_MSG_VERBOSE("createGVfromTI Existing QS GenVertex 2: " << *oldVertex );
 #endif
@@ -474,7 +516,12 @@ HepMC::GenVertexPtr  ISF::TruthSvc::createGenVertexFromTruthIncident( ISF::ITrut
     ATH_MSG_VERBOSE ( "createGVfromTI End Vertex representing process: " << processCode << ", for parent with barcode "<<parentBC<<". Creating." );
     ATH_MSG_VERBOSE ( "createGVfromTI Parent 2: " << *parent);
 #endif
+#ifdef HEPMC3
+    mcEvent->add_vertex(vtx);
+    vtx->add_attribute("weights",std::make_shared<HepMC3::VectorDoubleAttribute>(weights));
+#else
     mcEvent->add_vertex( vtx.release() );
+#endif
   }
 
   return parent->end_vertex();
@@ -509,6 +556,13 @@ int ISF::TruthSvc::maxGeneratedParticleBarcode(HepMC::GenEvent *genEvent) const
 
 int ISF::TruthSvc::maxGeneratedVertexBarcode(HepMC::GenEvent *genEvent) const {
   int maxBarcode=0;
+#ifdef HEPMC3
+  const int firstSecondaryVertexBarcode(m_barcodeSvc->secondaryVertexBcOffset());
+  for (auto currentGenVertex: genEvent->vertices()) {
+    const int barcode=HepMC::barcode(currentGenVertex);
+    if(barcode < maxBarcode && barcode > firstSecondaryVertexBarcode) { maxBarcode=barcode; }
+  }
+#else
   const int firstSecondaryVertexBarcode(m_barcodeSvc->secondaryVertexBcOffset());
   HepMC::GenEvent::vertex_const_iterator currentGenVertexIter;
   for (currentGenVertexIter= genEvent->vertices_begin();
@@ -517,5 +571,6 @@ int ISF::TruthSvc::maxGeneratedVertexBarcode(HepMC::GenEvent *genEvent) const {
     const int barcode((*currentGenVertexIter)->barcode());
     if(barcode < maxBarcode && barcode > firstSecondaryVertexBarcode) { maxBarcode=barcode; }
   }
+#endif
   return maxBarcode;
 }
-- 
GitLab


From 086133e46faa0c1c5f127ca2230b840f2a1b421d Mon Sep 17 00:00:00 2001
From: Shaun Roe <shaun.roe@cern.ch>
Date: Mon, 5 Oct 2020 18:25:17 +0000
Subject: [PATCH 209/403] 22.0-tidy-eflowRec

---
 .../src/PFONeutralCreatorAlgorithm.cxx        | 301 +++++++-----------
 1 file changed, 120 insertions(+), 181 deletions(-)

diff --git a/Reconstruction/eflowRec/src/PFONeutralCreatorAlgorithm.cxx b/Reconstruction/eflowRec/src/PFONeutralCreatorAlgorithm.cxx
index 00dd296913bb..c2075141e6d4 100644
--- a/Reconstruction/eflowRec/src/PFONeutralCreatorAlgorithm.cxx
+++ b/Reconstruction/eflowRec/src/PFONeutralCreatorAlgorithm.cxx
@@ -4,37 +4,36 @@
 
 #include "eflowRec/PFONeutralCreatorAlgorithm.h"
 
-#include <algorithm>
+
 
 #include "eflowRec/eflowCaloObject.h"
 #include "eflowRec/eflowRecCluster.h"
 #include "eflowRec/eflowTrackClusterLink.h"
 
 #include "xAODPFlow/PFOAuxContainer.h"
+#include <algorithm>
+#include <cmath>
+#include <array>
+#include <utility> //for std::pair
+
 
 PFONeutralCreatorAlgorithm::PFONeutralCreatorAlgorithm( const std::string& name, ISvcLocator* pSvcLocator) :
-  AthReentrantAlgorithm(name, pSvcLocator)
-{
+  AthReentrantAlgorithm(name, pSvcLocator){
 }
 
 StatusCode PFONeutralCreatorAlgorithm::initialize(){
-
   ATH_CHECK(m_eflowCaloObjectContainerReadHandleKey.initialize());
   ATH_CHECK(m_neutralPFOContainerWriteHandleKey.initialize());
   if(!m_LCMode) {
     ATH_CHECK(m_neutralPFOContainerWriteHandleKey_nonModified.initialize());
   }
   return StatusCode::SUCCESS;
-  
 }
 
 StatusCode PFONeutralCreatorAlgorithm::execute(const EventContext& ctx) const {
-
   ATH_MSG_DEBUG("Executing");
-
   /* Create Neutral PFOs from all eflowCaloObjects */
   SG::ReadHandle<eflowCaloObjectContainer> eflowCaloObjectContainerReadHandle(m_eflowCaloObjectContainerReadHandleKey,ctx);
-
   // Always create at least one PFO container & aux
   auto neutralPFOContainer = std::make_unique<xAOD::PFOContainer>();
   auto neutralPFOContainerAux = std::make_unique<xAOD::PFOAuxContainer>();
@@ -47,7 +46,6 @@ StatusCode PFONeutralCreatorAlgorithm::execute(const EventContext& ctx) const {
     neutralPFOContainerAux_nonModified = std::make_unique<xAOD::PFOAuxContainer>();
     neutralPFOContainer->setStore(neutralPFOContainerAux_nonModified.get());
   }
-
   ATH_MSG_DEBUG("Looping over eflowCaloObjects");
   // Create PFOs and fill the containers
   for (auto thisEflowCaloObject : *eflowCaloObjectContainerReadHandle) {
@@ -56,7 +54,6 @@ StatusCode PFONeutralCreatorAlgorithm::execute(const EventContext& ctx) const {
       return StatusCode::SUCCESS;
     }
   }
-
   // Record the output containers
   SG::WriteHandle<xAOD::PFOContainer> neutralPFOContainerWriteHandle(m_neutralPFOContainerWriteHandleKey,ctx);
   std::sort(neutralPFOContainer->begin(), neutralPFOContainer->end(), [] (const xAOD::PFO* pfo1, const xAOD::PFO* pfo2) {return pfo1->pt()>pfo2->pt();});
@@ -66,20 +63,16 @@ StatusCode PFONeutralCreatorAlgorithm::execute(const EventContext& ctx) const {
     SG::WriteHandle<xAOD::PFOContainer> neutralPFOContainerWriteHandle_nonModified(m_neutralPFOContainerWriteHandleKey,ctx);
     ATH_CHECK( neutralPFOContainerWriteHandle_nonModified.record(std::move(neutralPFOContainer_nonModified),std::move(neutralPFOContainerAux_nonModified)) );
   }
-
   return StatusCode::SUCCESS;
 }
 
 StatusCode PFONeutralCreatorAlgorithm::finalize(){ return StatusCode::SUCCESS; }
 
 StatusCode PFONeutralCreatorAlgorithm::createNeutralPFO(const eflowCaloObject& energyFlowCaloObject, xAOD::PFOContainer* neutralPFOContainer, xAOD::PFOContainer* neutralPFOContainer_nonModified) const {
-
   unsigned int nClusters = energyFlowCaloObject.nClusters();
-
   ATH_MSG_VERBOSE("  eflowCaloObject with " << nClusters << " clusters");
   for (unsigned int iCluster = 0; iCluster < nClusters; ++iCluster){
     eflowRecCluster* thisEfRecCluster = energyFlowCaloObject.efRecCluster(iCluster);
-    
     /* Skip empty clusters (presumably subtraction remnants) */
     const CaloClusterCellLink* theCellLink = energyFlowCaloObject.efRecCluster(iCluster)->getCluster()->getCellLinks();
     CaloClusterCellLink::const_iterator it=theCellLink->begin();
@@ -89,26 +82,23 @@ StatusCode PFONeutralCreatorAlgorithm::createNeutralPFO(const eflowCaloObject& e
     }
     //this vetoes rare examples where only two cells are left, and they have equal and opposite energy
     if (0.0 == energyFlowCaloObject.efRecCluster(iCluster)->getCluster()->e() ) continue;
-
     /* Create the efo, add the cluster and set the four-momentum, charge and type */
-
     ATH_MSG_VERBOSE("  Creating PFO");
     xAOD::PFO* thisPFO = new xAOD::PFO();
     if (m_LCMode) {
       if (thisEfRecCluster->isTouchable()) {
         neutralPFOContainer->push_back(thisPFO);
       } else {
-	if(neutralPFOContainer_nonModified) {
-	  neutralPFOContainer_nonModified->push_back(thisPFO);
-	} else {
-	  ATH_MSG_WARNING("Got a nullptr for non-modified nPFO container!");
-	  return StatusCode::FAILURE;
-	}
+        if(neutralPFOContainer_nonModified) {
+          neutralPFOContainer_nonModified->push_back(thisPFO);
+        } else {
+          ATH_MSG_WARNING("Got a nullptr for non-modified nPFO container!");
+          return StatusCode::FAILURE;
+        }
       }
     } else {
       neutralPFOContainer->push_back(thisPFO);
     }
-
     ATH_MSG_VERBOSE("  Get original cluster link");
     ElementLink<xAOD::CaloClusterContainer> theOriginalClusterLink = thisEfRecCluster->getOriginalClusElementLink();
     ATH_MSG_VERBOSE("  Get sister cluster link");
@@ -120,191 +110,140 @@ StatusCode PFONeutralCreatorAlgorithm::createNeutralPFO(const eflowCaloObject& e
       bool isSet = thisPFO->setClusterLink(theOriginalClusterLink);
       if (!isSet) { ATH_MSG_WARNING( "Could not set Cluster in PFO " ); }
     }
-
-    if (true == m_addShowerSubtractedClusters) thisPFO->setAttribute("PFOShowerSubtractedClusterLink",thisEfRecCluster->getClusElementLink());
-
+    if (m_addShowerSubtractedClusters) thisPFO->setAttribute("PFOShowerSubtractedClusterLink",thisEfRecCluster->getClusElementLink());
     ATH_MSG_VERBOSE("  Sucessfully set cluster link");
-
     const xAOD::CaloCluster* cluster = thisEfRecCluster->getCluster();
     ATH_MSG_VERBOSE("  Got CaloCluster from EfRecCluster");
     //be careful here - cluster p4 methods do not store sign. Thus -ve energy clusters have +ve pt and hence +ve energy
     if (!m_LCMode) {
       //in EM->EM/LC mode we use eta,phi at EM scale for both 4-vectors
       thisPFO->setP4(cluster->pt(), cluster->rawEta(), cluster->rawPhi(), cluster->m());
-      thisPFO->setP4EM(cluster->rawE()/cosh(cluster->rawEta()), cluster->rawEta(),cluster->rawPhi(),cluster->rawM());
-    }
-    else{
+      thisPFO->setP4EM(cluster->rawE()/std::cosh(cluster->rawEta()), cluster->rawEta(),cluster->rawPhi(),cluster->rawM());
+    } else {
       //in LC-> mode we use the LC 4-vector for the LC scale
       thisPFO->setP4(cluster->pt(), cluster->eta(), cluster->phi(), cluster->m());
       //we cannot access geometric weights for LC clusters, so we make an approximation of the EM energy by looping over the calocells
       //Then the EM 4-vector uses the energy/pt at this EM scale + eta,phi from LC 4-vector
       const CaloClusterCellLink* theCellLink = cluster->getCellLinks();
       float emPt = 0.0;
-      for (auto thisCaloCell : *theCellLink) emPt += thisCaloCell->e()/cosh(thisCaloCell->eta());
-      
+      for (auto thisCaloCell : *theCellLink) emPt += thisCaloCell->e()/std::cosh(thisCaloCell->eta());
       thisPFO->setP4EM(emPt,cluster->eta(),cluster->phi(),0.0);//mass is always zero at EM scale
-
     }
-
     ATH_MSG_DEBUG("Created neutral PFO with E, pt, eta and phi of " << thisPFO->e() << ", " << thisPFO->pt() << ", " << thisPFO->eta() << " and " << thisPFO->phi());
-    
     thisPFO->setCharge(0);
-
     //Set the CENTER_MAG moment. This has its own dedicated getter in the PFO EDM, and so is not dealt with by the generic addMoment function.
     double center_mag = 0.0;
     bool isRetrieved = cluster->retrieveMoment(xAOD::CaloCluster::CENTER_MAG, center_mag );
-    if (true == isRetrieved) thisPFO->setCenterMag(center_mag);
+    if (isRetrieved) thisPFO->setCenterMag(center_mag);
     else ATH_MSG_WARNING("Could not retreve CENTER_MAG from xAOD::CaloCluster");
-
     if(m_doClusterMoments) {
-    
+      //definitions to reduce verbosity
+      using Cluster = xAOD::CaloCluster;
+      using Attributes = xAOD::PFODetails::PFOAttributes;
       //now set the moments for touchable clusters (i.e. ones we modify) in LC mode or all clusters in EM mode
       if ( (m_LCMode && thisEfRecCluster->isTouchable()) || !m_LCMode) {
-	this->addMoment(xAOD::CaloCluster::SECOND_R,xAOD::PFODetails::PFOAttributes::eflowRec_SECOND_R,*cluster, *thisPFO);
-	this->addMoment(xAOD::CaloCluster::CENTER_LAMBDA,xAOD::PFODetails::PFOAttributes::eflowRec_CENTER_LAMBDA,*cluster, *thisPFO);
-	this->addMoment(xAOD::CaloCluster::ENG_BAD_CELLS,xAOD::PFODetails::PFOAttributes::eflowRec_ENG_BAD_CELLS,*cluster, *thisPFO);
-	this->addMoment(xAOD::CaloCluster::N_BAD_CELLS,xAOD::PFODetails::PFOAttributes::eflowRec_N_BAD_CELLS,*cluster, *thisPFO);
-	this->addMoment(xAOD::CaloCluster::BADLARQ_FRAC,xAOD::PFODetails::PFOAttributes::eflowRec_BADLARQ_FRAC,*cluster, *thisPFO);
-	this->addMoment(xAOD::CaloCluster::ENG_POS,xAOD::PFODetails::PFOAttributes::eflowRec_ENG_POS,*cluster, *thisPFO);
-	this->addMoment(xAOD::CaloCluster::AVG_LAR_Q,xAOD::PFODetails::PFOAttributes::eflowRec_AVG_LAR_Q,*cluster, *thisPFO);
-	this->addMoment(xAOD::CaloCluster::AVG_TILE_Q,xAOD::PFODetails::PFOAttributes::eflowRec_AVG_TILE_Q,*cluster, *thisPFO);
-	this->addMoment(xAOD::CaloCluster::ISOLATION,xAOD::PFODetails::PFOAttributes::eflowRec_ISOLATION,*cluster, *thisPFO);
-	this->addMoment(xAOD::CaloCluster::SECOND_LAMBDA,xAOD::PFODetails::PFOAttributes::eflowRec_SECOND_LAMBDA,*cluster, *thisPFO);
-	this->addMoment(xAOD::CaloCluster::EM_PROBABILITY,xAOD::PFODetails::PFOAttributes::eflowRec_EM_PROBABILITY,*cluster, *thisPFO);
-	if (m_useCalibHitTruth){
-	  this->addMoment(xAOD::CaloCluster::ENG_CALIB_TOT,xAOD::PFODetails::PFOAttributes::eflowRec_ENG_CALIB_TOT,*cluster, *thisPFO);
-	  this->addMoment(xAOD::CaloCluster::ENG_CALIB_FRAC_EM,xAOD::PFODetails::PFOAttributes::eflowRec_ENG_CALIB_FRAC_EM,*cluster, *thisPFO);
-	  this->addMoment(xAOD::CaloCluster::ENG_CALIB_FRAC_HAD,xAOD::PFODetails::PFOAttributes::eflowRec_ENG_CALIB_FRAC_HAD,*cluster, *thisPFO);
-	  this->addMoment(xAOD::CaloCluster::ENG_CALIB_FRAC_REST,xAOD::PFODetails::PFOAttributes::eflowRec_ENG_CALIB_FRAC_REST,*cluster, *thisPFO);
-	}
+        //Block of code to set moments/attributes
+        auto conciseAddMoment = [&cluster, &thisPFO, this](const Cluster::MomentType & c, const Attributes & a){
+          return this->addMoment(c, a, *cluster, *thisPFO);
+        };
+        const std::array< std::pair<Cluster::MomentType, Attributes>, 11> momentAttributePairs{{ //tricky: one more brace than expected, and is necessary
+          {Cluster::SECOND_R, Attributes::eflowRec_SECOND_R},
+          {Cluster::CENTER_LAMBDA, Attributes::eflowRec_CENTER_LAMBDA},
+          {Cluster::ENG_BAD_CELLS, Attributes::eflowRec_ENG_BAD_CELLS},
+          {Cluster::N_BAD_CELLS, Attributes::eflowRec_N_BAD_CELLS},
+          {Cluster::BADLARQ_FRAC, Attributes::eflowRec_BADLARQ_FRAC},
+          {Cluster::ENG_POS, Attributes::eflowRec_ENG_POS},
+          {Cluster::AVG_LAR_Q, Attributes::eflowRec_AVG_LAR_Q},
+          {Cluster::AVG_TILE_Q, Attributes::eflowRec_AVG_TILE_Q},
+          {Cluster::ISOLATION, Attributes::eflowRec_ISOLATION},
+          {Cluster::SECOND_LAMBDA, Attributes::eflowRec_SECOND_LAMBDA},
+          {Cluster::EM_PROBABILITY, Attributes::eflowRec_EM_PROBABILITY} 
+        }};
+        for (const auto & [moment,attribute]:momentAttributePairs) conciseAddMoment(moment, attribute);
+        if (m_useCalibHitTruth){
+          const std::array< std::pair<Cluster::MomentType, Attributes>, 4> momentAttributeTruthPairs{{
+            {Cluster::ENG_CALIB_TOT, Attributes::eflowRec_ENG_CALIB_TOT},
+            {Cluster::ENG_CALIB_FRAC_EM, Attributes::eflowRec_ENG_CALIB_FRAC_EM},
+            {Cluster::ENG_CALIB_FRAC_HAD, Attributes::eflowRec_ENG_CALIB_FRAC_HAD},
+            {Cluster::ENG_CALIB_FRAC_REST, Attributes::eflowRec_ENG_CALIB_FRAC_REST}
+          }};
+          for (const auto & [moment,attribute]:momentAttributeTruthPairs) conciseAddMoment(moment, attribute);
+        }
       }
-
-      //First set all the layer energies
-      float layerEnergy_preSamplerB = cluster->eSample(xAOD::CaloCluster::CaloSample::PreSamplerB);
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_PreSamplerB = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_PreSamplerB;
-      thisPFO->setAttribute( myAttribute_layerEnergy_PreSamplerB, layerEnergy_preSamplerB);
-
-      float layerEnergy_EMB1 = cluster->eSample(xAOD::CaloCluster::CaloSample::EMB1);
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_EMB1 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_EMB1;
-      thisPFO->setAttribute( myAttribute_layerEnergy_EMB1, layerEnergy_EMB1);
-
-      float layerEnergy_EMB2 = cluster->eSample(xAOD::CaloCluster::CaloSample::EMB2);
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_EMB2 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_EMB2;
-      thisPFO->setAttribute( myAttribute_layerEnergy_EMB2, layerEnergy_EMB2);
-
-      float layerEnergy_EMB3 = cluster->eSample(xAOD::CaloCluster::CaloSample::EMB3);
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_EMB3 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_EMB3;
-      thisPFO->setAttribute( myAttribute_layerEnergy_EMB3, layerEnergy_EMB3);
-
-      float layerEnergy_preSamplerE = cluster->eSample(xAOD::CaloCluster::CaloSample::PreSamplerE);
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_PreSamplerE = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_PreSamplerE;
-      thisPFO->setAttribute( myAttribute_layerEnergy_PreSamplerE, layerEnergy_preSamplerE);
-
-      float layerEnergy_EME1 = cluster->eSample(xAOD::CaloCluster::CaloSample::EME1);
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_EME1 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_EME1;
-      thisPFO->setAttribute( myAttribute_layerEnergy_EME1, layerEnergy_EME1);
-
-      float layerEnergy_EME2 = cluster->eSample(xAOD::CaloCluster::CaloSample::EME2);
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_EME2 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_EME2;
-      thisPFO->setAttribute( myAttribute_layerEnergy_EME2, layerEnergy_EME2);
-
-      float layerEnergy_EME3 = cluster->eSample(xAOD::CaloCluster::CaloSample::EME3);
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_EME3 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_EME3;
-      thisPFO->setAttribute( myAttribute_layerEnergy_EME3, layerEnergy_EME3);
-
-      float layerEnergy_HEC0 = cluster->eSample(xAOD::CaloCluster::CaloSample::HEC0);
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_HEC0 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_HEC0;
-      thisPFO->setAttribute( myAttribute_layerEnergy_HEC0, layerEnergy_HEC0);
-
-      float layerEnergy_HEC1 = cluster->eSample(xAOD::CaloCluster::CaloSample::HEC1);
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_HEC1 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_HEC1;
-      thisPFO->setAttribute( myAttribute_layerEnergy_HEC1, layerEnergy_HEC1);
-
-      float layerEnergy_HEC2 = cluster->eSample(xAOD::CaloCluster::CaloSample::HEC2);
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_HEC2 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_HEC2;
-      thisPFO->setAttribute( myAttribute_layerEnergy_HEC2, layerEnergy_HEC2);
-
-      float layerEnergy_HEC3 = cluster->eSample(xAOD::CaloCluster::CaloSample::HEC3);
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_HEC3 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_HEC3;
-      thisPFO->setAttribute( myAttribute_layerEnergy_HEC3, layerEnergy_HEC3);
-
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_TileBar0 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_TileBar0;
-      thisPFO->setAttribute( myAttribute_layerEnergy_TileBar0, cluster->eSample(xAOD::CaloCluster::CaloSample::TileBar0));
-
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_TileBar1 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_TileBar1;
-      thisPFO->setAttribute( myAttribute_layerEnergy_TileBar1, cluster->eSample(xAOD::CaloCluster::CaloSample::TileBar1));
-
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_TileBar2 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_TileBar2;
-      thisPFO->setAttribute( myAttribute_layerEnergy_TileBar2, cluster->eSample(xAOD::CaloCluster::CaloSample::TileBar2));
-
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_TileGap1 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_TileGap1;
-      thisPFO->setAttribute( myAttribute_layerEnergy_TileGap1, cluster->eSample(xAOD::CaloCluster::CaloSample::TileGap1));
-
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_TileGap2 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_TileGap2;
-      thisPFO->setAttribute( myAttribute_layerEnergy_TileGap2, cluster->eSample(xAOD::CaloCluster::CaloSample::TileGap2));
-
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_TileGap3 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_TileGap3;
-      thisPFO->setAttribute( myAttribute_layerEnergy_TileGap3, cluster->eSample(xAOD::CaloCluster::CaloSample::TileGap3));
-
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_TileExt0 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_TileExt0;
-      thisPFO->setAttribute( myAttribute_layerEnergy_TileExt0, cluster->eSample(xAOD::CaloCluster::CaloSample::TileExt0));
-
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_TileExt1 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_TileExt1;
-      thisPFO->setAttribute( myAttribute_layerEnergy_TileExt1, cluster->eSample(xAOD::CaloCluster::CaloSample::TileExt1));
-
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_TileExt2 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_TileExt2;
-      thisPFO->setAttribute( myAttribute_layerEnergy_TileExt2, cluster->eSample(xAOD::CaloCluster::CaloSample::TileExt2));
-
-      float layerEnergy_FCAL0 = cluster->eSample(xAOD::CaloCluster::CaloSample::FCAL0);
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_FCAL0 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_FCAL0;
-      thisPFO->setAttribute( myAttribute_layerEnergy_FCAL0, layerEnergy_FCAL0);
-
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_FCAL1 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_FCAL1;
-      thisPFO->setAttribute( myAttribute_layerEnergy_FCAL1, cluster->eSample(xAOD::CaloCluster::CaloSample::FCAL1));
-
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_FCAL2 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_FCAL2;
-      thisPFO->setAttribute( myAttribute_layerEnergy_FCAL2, cluster->eSample(xAOD::CaloCluster::CaloSample::FCAL2));
-
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_MINIFCAL0 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_MINIFCAL0;
-      thisPFO->setAttribute( myAttribute_layerEnergy_MINIFCAL0, cluster->eSample(xAOD::CaloCluster::CaloSample::MINIFCAL0));
-
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_MINIFCAL1 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_MINIFCAL1;
-      thisPFO->setAttribute( myAttribute_layerEnergy_MINIFCAL1, cluster->eSample(xAOD::CaloCluster::CaloSample::MINIFCAL1));
-
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_MINIFCAL2 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_MINIFCAL2;
-      thisPFO->setAttribute( myAttribute_layerEnergy_MINIFCAL2, cluster->eSample(xAOD::CaloCluster::CaloSample::MINIFCAL2));
-
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_MINIFCAL3 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_MINIFCAL3;
-      thisPFO->setAttribute( myAttribute_layerEnergy_MINIFCAL3, cluster->eSample(xAOD::CaloCluster::CaloSample::MINIFCAL3));
-
+      //
+      //block of code to calculate and set the layer energies
+      auto setLayerEnergy = [&cluster, &thisPFO](const Cluster::CaloSample &layer, const Attributes & a){
+        const auto layerEnergy{cluster->eSample(layer)};
+        thisPFO->setAttribute(a, layerEnergy);
+        return layerEnergy;
+      };
+      enum LayerEnergyIndices{preSamplerB, EMB1, EMB2, EMB3, preSamplerE, EME1, EME2, EME3, HEC0, HEC1, HEC2, HEC3,FCAL0,  NumberOfLayerEnergies};
+      std::array<float, NumberOfLayerEnergies> layerEnergies{};
+      const std::array< std::pair<Cluster::CaloSample, Attributes>, NumberOfLayerEnergies> sampleAttributePairs{{
+        {Cluster::CaloSample::PreSamplerB, Attributes::eflowRec_LAYERENERGY_PreSamplerB},
+        {Cluster::CaloSample::EMB1, Attributes::eflowRec_LAYERENERGY_EMB1},
+        {Cluster::CaloSample::EMB2, Attributes::eflowRec_LAYERENERGY_EMB2},
+        {Cluster::CaloSample::EMB3, Attributes::eflowRec_LAYERENERGY_EMB3},
+        {Cluster::CaloSample::PreSamplerE, Attributes::eflowRec_LAYERENERGY_PreSamplerE},
+        {Cluster::CaloSample::EME1, Attributes::eflowRec_LAYERENERGY_EME1},
+        {Cluster::CaloSample::EME2, Attributes::eflowRec_LAYERENERGY_EME2},
+        {Cluster::CaloSample::EME3, Attributes::eflowRec_LAYERENERGY_EME3},
+        {Cluster::CaloSample::HEC0, Attributes::eflowRec_LAYERENERGY_HEC0},
+        {Cluster::CaloSample::HEC1, Attributes::eflowRec_LAYERENERGY_HEC1},
+        {Cluster::CaloSample::HEC2, Attributes::eflowRec_LAYERENERGY_HEC2},
+        {Cluster::CaloSample::HEC3, Attributes::eflowRec_LAYERENERGY_HEC3},
+        {Cluster::CaloSample::FCAL0, Attributes::eflowRec_LAYERENERGY_FCAL0}
+      }};
+      size_t layerIndex{0};
+      for (const auto & [sample, attribute]: sampleAttributePairs) {
+        layerEnergies[layerIndex++] = setLayerEnergy(sample, attribute);
+      }
+      //
+      //block of code purely to set attributes of the PFO
+      auto setPfoAttribute = [&thisPFO, &cluster](const Cluster::CaloSample &layer, const Attributes & a){
+        thisPFO->setAttribute( a, cluster->eSample(layer));
+      };
+      //
+      constexpr size_t numberOfSampleAttributePairs{15};
+      const std::array< std::pair<Cluster::CaloSample, Attributes>, numberOfSampleAttributePairs> sampleAttributePairsTileFcal{{
+        {Cluster::CaloSample::TileBar0, Attributes::eflowRec_LAYERENERGY_TileBar0},
+        {Cluster::CaloSample::TileBar1, Attributes::eflowRec_LAYERENERGY_TileBar1},
+        {Cluster::CaloSample::TileBar2, Attributes::eflowRec_LAYERENERGY_TileBar2},
+        {Cluster::CaloSample::TileGap1, Attributes::eflowRec_LAYERENERGY_TileGap1},
+        {Cluster::CaloSample::TileGap2, Attributes::eflowRec_LAYERENERGY_TileGap2},
+        {Cluster::CaloSample::TileGap3, Attributes::eflowRec_LAYERENERGY_TileGap3},
+        {Cluster::CaloSample::TileExt0, Attributes::eflowRec_LAYERENERGY_TileExt0},
+        {Cluster::CaloSample::TileExt1, Attributes::eflowRec_LAYERENERGY_TileExt1},
+        {Cluster::CaloSample::TileExt2, Attributes::eflowRec_LAYERENERGY_TileExt2},
+        {Cluster::CaloSample::FCAL1, Attributes::eflowRec_LAYERENERGY_FCAL1},
+        {Cluster::CaloSample::FCAL2, Attributes::eflowRec_LAYERENERGY_FCAL2},
+        {Cluster::CaloSample::MINIFCAL0, Attributes::eflowRec_LAYERENERGY_MINIFCAL0},
+        {Cluster::CaloSample::MINIFCAL1, Attributes::eflowRec_LAYERENERGY_MINIFCAL1},
+        {Cluster::CaloSample::MINIFCAL2, Attributes::eflowRec_LAYERENERGY_MINIFCAL2},
+        {Cluster::CaloSample::MINIFCAL3, Attributes::eflowRec_LAYERENERGY_MINIFCAL3}
+      }};
+      for (const auto & [sample, attribute]: sampleAttributePairsTileFcal){
+        setPfoAttribute(sample, attribute);
+      }
+      //
       //now set the layer energies for EMB3 and Tile0 - these are needed if we want to run a GSC style jet calibration, which is binned in EMB3 and Tile0 layer energies
-    
-      float layerEnergy_EM3 = layerEnergy_EMB3 + layerEnergy_EME3;
-
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_EM3 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_EM3;
-      thisPFO->setAttribute( myAttribute_layerEnergy_EM3, layerEnergy_EM3);
-
-      float layerEnergy_TileBar0 = cluster->eSample(xAOD::CaloCluster::CaloSample::TileBar0);
-      float layerEnergy_TileExt0 = cluster->eSample(xAOD::CaloCluster::CaloSample::TileExt0);
+      float layerEnergy_EM3 = layerEnergies[EMB3] + layerEnergies[EME3];
+      thisPFO->setAttribute( Attributes::eflowRec_LAYERENERGY_EM3, layerEnergy_EM3);
+      //
+      float layerEnergy_TileBar0 = cluster->eSample(Cluster::CaloSample::TileBar0);
+      float layerEnergy_TileExt0 = cluster->eSample(Cluster::CaloSample::TileExt0);
       float layerEnergy_Tile0 = layerEnergy_TileBar0 + layerEnergy_TileExt0;
-
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_Tile0 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_Tile0;
-      thisPFO->setAttribute(myAttribute_layerEnergy_Tile0, layerEnergy_Tile0);
-
+      thisPFO->setAttribute(Attributes::eflowRec_LAYERENERGY_Tile0, layerEnergy_Tile0);
+      //
       //now set properties that are required for jet cleaning
-      float layerEnergy_HEC = layerEnergy_HEC0 + layerEnergy_HEC1 + layerEnergy_HEC2 + layerEnergy_HEC3;
-
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_HEC = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_HEC;
-      thisPFO->setAttribute(myAttribute_layerEnergy_HEC, layerEnergy_HEC);
-
-      float layerEnergy_EM = layerEnergy_preSamplerB + layerEnergy_preSamplerE + layerEnergy_EMB1 + layerEnergy_EMB2 + layerEnergy_EMB3 + layerEnergy_EME1 + layerEnergy_EME2 + layerEnergy_EME3 + layerEnergy_FCAL0;
-      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_EM = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_EM;
-      thisPFO->setAttribute(myAttribute_layerEnergy_EM, layerEnergy_EM);
-    
-      float clusterTiming = cluster->time();
-
-      xAOD::PFODetails::PFOAttributes myAttribute_TIMING = xAOD::PFODetails::PFOAttributes::eflowRec_TIMING;
-      thisPFO->setAttribute(myAttribute_TIMING, clusterTiming);
+      const float layerEnergy_HEC = layerEnergies[HEC0] + layerEnergies[HEC1] + layerEnergies[HEC2] + layerEnergies[HEC3];
+      thisPFO->setAttribute(Attributes::eflowRec_LAYERENERGY_HEC, layerEnergy_HEC);
+      //
+      const float layerEnergy_EM = layerEnergies[preSamplerB] + layerEnergies[preSamplerE] + layerEnergies[EMB1] + layerEnergies[EMB2] + layerEnergies[EMB3] + layerEnergies[EME1] + layerEnergies[EME2] + layerEnergies[EME3] + layerEnergies[FCAL0];
+      thisPFO->setAttribute(Attributes::eflowRec_LAYERENERGY_EM, layerEnergy_EM);
+      //
+      const float clusterTiming = cluster->time();
+      thisPFO->setAttribute(Attributes::eflowRec_TIMING, clusterTiming);
     }
   }
   return StatusCode::SUCCESS;
@@ -314,7 +253,7 @@ void PFONeutralCreatorAlgorithm::addMoment(const xAOD::CaloCluster::MomentType&
 
   double moment = 0.0;
   bool isRetrieved = theCluster.retrieveMoment(momentType, moment);
-  if (true == isRetrieved) {
+  if (isRetrieved) {
     xAOD::PFODetails::PFOAttributes myAttribute = pfoAttribute;
     float float_moment = static_cast<float>(moment);
     thePFO.setAttribute(myAttribute, float_moment);
-- 
GitLab


From 7e645ce0b3e81648226d514275529c4b71d45697 Mon Sep 17 00:00:00 2001
From: xiaozhon Huang <xiaozhong.huang@cern.ch>
Date: Mon, 5 Oct 2020 18:46:57 +0000
Subject: [PATCH 210/403] tauRecTools: style fix for CombinedP4FromRecoTaus
 (ATLTAU-1729)

---
 .../MET/METUtilities/Root/METSignificance.cxx |   3 +-
 .../Root/CombinedP4FromRecoTaus.cxx           | 681 ++++++++----------
 .../tauRecTools/CombinedP4FromRecoTaus.h      | 156 ++--
 3 files changed, 392 insertions(+), 448 deletions(-)

diff --git a/Reconstruction/MET/METUtilities/Root/METSignificance.cxx b/Reconstruction/MET/METUtilities/Root/METSignificance.cxx
index e17514831ae0..e1a0fce43ebc 100644
--- a/Reconstruction/MET/METUtilities/Root/METSignificance.cxx
+++ b/Reconstruction/MET/METUtilities/Root/METSignificance.cxx
@@ -563,8 +563,7 @@ namespace met {
     else{
       const xAOD::TauJet* tau(static_cast<const xAOD::TauJet*>(obj));
       pt_reso = dynamic_cast<CombinedP4FromRecoTaus*>(m_tCombinedP4FromRecoTaus.get())->getCaloResolution(*tau);
-      // For taus, this is not a relative resolution. So we divide by pT
-      pt_reso /=tau->pt();
+      
       if(m_doPhiReso) phi_reso = tau->pt()*0.01;
       ATH_MSG_VERBOSE("tau: " << pt_reso << " " << tau->pt() << " " << tau->p4().Eta() << " " << tau->p4().Phi() << " phi reso: " << phi_reso);
     }
diff --git a/Reconstruction/tauRecTools/Root/CombinedP4FromRecoTaus.cxx b/Reconstruction/tauRecTools/Root/CombinedP4FromRecoTaus.cxx
index 88d6d9c988df..bf27a5976c94 100644
--- a/Reconstruction/tauRecTools/Root/CombinedP4FromRecoTaus.cxx
+++ b/Reconstruction/tauRecTools/Root/CombinedP4FromRecoTaus.cxx
@@ -2,525 +2,448 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-// local include(s)
 #include "tauRecTools/CombinedP4FromRecoTaus.h"
 
-//Root includes(s)
 #include "TFile.h"
 
-//C++ includes
 #include <cmath>
-#include <string.h>
 
-//_____________________________________________________________________________
+
+
 CombinedP4FromRecoTaus::CombinedP4FromRecoTaus(const std::string& name) : 
   TauRecToolBase(name) {
-
   declareProperty("addCalibrationResultVariables", m_addCalibrationResultVariables = false);
-  declareProperty("addUseCaloPtFlag", m_addUseCaloPtFlag = false);
-  declareProperty("WeightFileName", m_sWeightFileName = "");
+  declareProperty("WeightFileName", m_calFileName = "");
 }
 
-//_____________________________________________________________________________
-StatusCode CombinedP4FromRecoTaus::initialize() {
-  
-  m_correlationHists.resize(m_modeNames.size());  
-  m_meanTGraph_CellBased2PanTau.resize(m_etaBinNames.size());
-  m_resTGraph_CellBased2PanTau.resize(m_etaBinNames.size());
-  m_meanTGraph_tauRec.resize(m_etaBinNames.size());
-  m_resTGraph_tauRec.resize(m_etaBinNames.size());
-
-  for (size_t i=0; i<m_etaBinNames.size(); ++i) {
-    m_meanTGraph_CellBased2PanTau[i].resize(m_modeNames.size());
-    m_resTGraph_CellBased2PanTau[i].resize(m_modeNames.size());
-    m_meanTGraph_tauRec[i].resize(m_modeNames.size());
-    m_resTGraph_tauRec[i].resize(m_modeNames.size());
-  }
-
-  std::string calibFilePath = find_file(m_sWeightFileName);
-  std::unique_ptr<TFile> file(TFile::Open(calibFilePath.c_str(), "READ"));
 
-  m_Nsigma_compatibility=std::make_unique<TF1>("Nsigma_compatibility", "pol1", 0, 500000); // needs to go beyond ~420 where it crosses y=0
-  m_Nsigma_compatibility->SetParameter(0, 3.809); // derived from fit
-  m_Nsigma_compatibility->SetParameter(1, -9.58/1000000.); // derived from fit
 
-  //retrieve correlation histgram
-  TH1F* histogram(nullptr);
-  std::string histname="";
-  
-  //loop over decay modes
-  for(size_t imode=0; imode < m_modeNames.size(); ++imode){
-    
-    ATH_MSG_DEBUG("mode = " << imode);
-
-    histname="CorrelationCoeff_tauRec_" + m_modeNames[imode];
-    histogram = dynamic_cast<TH1F*> (file->Get(histname.c_str()));
-    if(histogram){
-      histogram->SetDirectory(0);
-      m_correlationHists[imode] = std::unique_ptr<TH1F>(histogram);
-      ATH_MSG_DEBUG("Adding corr hist: " << histname);
+StatusCode CombinedP4FromRecoTaus::initialize() {
+  // It would be better to retrieve the function from calibration file 
+  m_nSigmaCompatibility=std::make_unique<TF1>("nSigmaCompatibility", "pol1", 0, 500000);
+  m_nSigmaCompatibility->SetParameter(0, 3.809); // derived from fit
+  m_nSigmaCompatibility->SetParameter(1, -9.58/1000000.); // derived from fit
+
+  std::string calFilePath = find_file(m_calFileName);
+  std::unique_ptr<TFile> calFile(TFile::Open(calFilePath.c_str(), "READ"));
+
+  // 1D array with decay mode as index
+  TH1F* hist = nullptr;
+  std::string histName = "";
+  for (size_t decayModeIndex = 0; decayModeIndex < DecayModeBinning; ++ decayModeIndex) {
+    histName="CorrelationCoeff_tauRec_" + m_decayModeNames[decayModeIndex];
+    hist = dynamic_cast<TH1F*> (calFile->Get(histName.c_str()));
+    if(hist){
+      hist->SetDirectory(0);
+      m_correlationHists[decayModeIndex] = std::unique_ptr<TH1F>(hist);
+      ATH_MSG_DEBUG("Adding corr hist: " << histName);
     }
     else {
-      ATH_MSG_FATAL("Failed to get an object with name " << histname);
+      ATH_MSG_FATAL("Failed to get an object with name " << histName);
       return StatusCode::FAILURE;
     }
   }
-
-  //retrieve mean and resolution graph
-  TGraph* Graph(nullptr);
-  std::string Graphname="";
-
-  //loop over eta bins
-  for(size_t ietaBin=0; ietaBin < m_etaBinNames.size(); ++ietaBin){
   
-    //loop over decay modes
-    for(size_t imode=0; imode < m_modeNames.size(); ++imode){
-
-      ATH_MSG_DEBUG("eta bin = " << ietaBin << " / mode = " << imode );
-      
-      // retrieve resolution graph 
-      Graphname = "tauRec/Graph_from_ResolutionEt_tauRec_" + m_modeNames[imode] + "_" + m_etaBinNames[ietaBin];
-      Graph = dynamic_cast<TGraph*> (file->Get(Graphname.c_str()));
-      if(Graph){
-        m_resTGraph_tauRec[ietaBin][imode] = std::unique_ptr<TGraph>(Graph);
-        ATH_MSG_DEBUG("Adding graph: " << Graphname);
+  // 2D array with (eta, decay mode) as index
+  TGraph* graph = nullptr;
+  std::string graphName="";
+  for (size_t decayModeIndex = 0; decayModeIndex < DecayModeBinning; ++decayModeIndex) {
+    for (size_t etaIndex = 0; etaIndex < EtaBinning; ++etaIndex) {
+      // Calo TES: relative bias 
+      graphName = "tauRec/Graph_from_MeanEt_tauRec_" + m_decayModeNames[decayModeIndex] + "_" + m_etaBinNames[etaIndex];
+      graph = dynamic_cast<TGraph*> (calFile->Get(graphName.c_str()));
+      if(graph) {
+        m_caloRelBiasMaxEt[decayModeIndex][etaIndex] = TMath::MaxElement(graph->GetN(), graph->GetX());
+        m_caloRelBias[decayModeIndex][etaIndex] = std::unique_ptr<TGraph>(graph);
+        ATH_MSG_DEBUG("Adding graph: " << graphName);
       } 
       else {
-       	ATH_MSG_FATAL("Failed to get an object with name " << Graphname);
-        return StatusCode::FAILURE;
+       	ATH_MSG_FATAL("Failed to get an object with name " << graphName);
+       	return StatusCode::FAILURE;
       }
-
-      // retrieve mean graph
-      Graphname = "tauRec/Graph_from_MeanEt_tauRec_" + m_modeNames[imode] + "_" + m_etaBinNames[ietaBin];
-      Graph = dynamic_cast<TGraph*> (file->Get(Graphname.c_str()));
-      if(Graph) {
-        m_meanTGraph_tauRec[ietaBin][imode] = std::unique_ptr<TGraph>(Graph);
-        ATH_MSG_DEBUG("Adding graph: " << Graphname);
+      
+      // Calo TES: resolution
+      graphName = "tauRec/Graph_from_ResolutionEt_tauRec_" + m_decayModeNames[decayModeIndex] + "_" + m_etaBinNames[etaIndex];
+      graph = dynamic_cast<TGraph*> (calFile->Get(graphName.c_str()));
+      if(graph){
+        m_caloResMaxEt[decayModeIndex][etaIndex] = TMath::MaxElement(graph->GetN(), graph->GetX());
+        m_caloRes[decayModeIndex][etaIndex] = std::unique_ptr<TGraph>(graph);
+        ATH_MSG_DEBUG("Adding graph: " << graphName);
       } 
       else {
-       	ATH_MSG_FATAL("Failed to get an object with name " << Graphname);
-       	return StatusCode::FAILURE;
+       	ATH_MSG_FATAL("Failed to get an object with name " << graphName);
+        return StatusCode::FAILURE;
       }
-      
-      Graphname = "ConstituentEt/Graph_from_ResolutionEt_ConstituentEt_" + m_modeNames[imode] + "_" + m_etaBinNames[ietaBin];
-      Graph = dynamic_cast<TGraph*> (file->Get(Graphname.c_str()));
-      if(Graph){
-        m_resTGraph_CellBased2PanTau[ietaBin][imode] = std::unique_ptr<TGraph>(Graph);
-        ATH_MSG_DEBUG("Adding graph: " << Graphname);
+     
+      // PanTau: relative bias 
+      graphName = "ConstituentEt/Graph_from_MeanEt_ConstituentEt_" + m_decayModeNames[decayModeIndex] + "_" + m_etaBinNames[etaIndex];
+      graph = dynamic_cast<TGraph*> (calFile->Get(graphName.c_str()));
+      if(graph){
+        m_panTauRelBiasMaxEt[decayModeIndex][etaIndex] = TMath::MaxElement(graph->GetN(), graph->GetX());
+        m_panTauRelBias[decayModeIndex][etaIndex] = std::unique_ptr<TGraph>(graph);
+        ATH_MSG_DEBUG("Adding graph: " << graphName);
       } 
       else {
-        ATH_MSG_FATAL("Failed to get an object with name " << Graphname);
+       	ATH_MSG_FATAL("Failed to get an object with name " << graphName);
        	return StatusCode::FAILURE;
       }
-      
-      Graphname = "ConstituentEt/Graph_from_MeanEt_ConstituentEt_" + m_modeNames[imode] + "_" + m_etaBinNames[ietaBin];
-      Graph = dynamic_cast<TGraph*> (file->Get(Graphname.c_str()));
-      if(Graph){
-        m_meanTGraph_CellBased2PanTau[ietaBin][imode] = std::unique_ptr<TGraph>(Graph);
-        ATH_MSG_DEBUG("Adding graph: " << Graphname);
+
+      // PanTau: resolution
+      graphName = "ConstituentEt/Graph_from_ResolutionEt_ConstituentEt_" + m_decayModeNames[decayModeIndex] + "_" + m_etaBinNames[etaIndex];
+      graph = dynamic_cast<TGraph*> (calFile->Get(graphName.c_str()));
+      if(graph){
+        m_panTauResMaxEt[decayModeIndex][etaIndex] = TMath::MaxElement(graph->GetN(), graph->GetX());
+        m_panTauRes[decayModeIndex][etaIndex] = std::unique_ptr<TGraph>(graph);
+        ATH_MSG_DEBUG("Adding graph: " << graphName);
       } 
       else {
-       	ATH_MSG_FATAL("Failed to get an object with name " << Graphname);
+        ATH_MSG_FATAL("Failed to get an object with name " << graphName);
        	return StatusCode::FAILURE;
       }
     }
   }
-  file->Close();
+  calFile->Close();
 
   return StatusCode::SUCCESS;
 }
 
-//_____________________________________________________________________________
-StatusCode CombinedP4FromRecoTaus::execute(xAOD::TauJet& xTau) const {
 
+
+StatusCode CombinedP4FromRecoTaus::execute(xAOD::TauJet& tau) const {
+  TLorentzVector combinedP4(tau.p4(xAOD::TauJetParameters::TauEtaCalib));
+  
+  // used to store immediate results
   Variables variables;
 
+  // Parameterization is only valid for |eta| < 2.5, and decay modes of 1p0n, 1p1n, 1pXn, 3p0n, 3pXn
+  // If these variables of the given tau candidate are outside the range, we just use calo TES
+  if(isValid(tau)) {
+    combinedP4 = getCombinedP4(tau, variables);
+  }
+  
   static const SG::AuxElement::Decorator<float> decPtCombined("pt_combined");
   static const SG::AuxElement::Decorator<float> decEtaCombined("eta_combined");
   static const SG::AuxElement::Decorator<float> decPhiCombined("phi_combined");
   static const SG::AuxElement::Decorator<float> decMCombined("m_combined");
 
-  decPtCombined(xTau) = 0.;
-  decEtaCombined(xTau) = 0.;
-  decPhiCombined(xTau) = 0.;
-  decMCombined(xTau) = 0.;
-  
-  TLorentzVector CombinedP4(xTau.p4());
-  int tmpDecayMode;
-  //Needs to be proto, by default PanTau_DecyMode==0 for invalid
-  //(pan)taus which is "valid"
-  //maybe we should initialize PanTau_DecyMode to NotSet
-  //Do we want to apply to Mode_Other? 2,4,5 prongs, I think yes
-  xTau.panTauDetail(xAOD::TauJetParameters::PanTauDetails::PanTau_DecayModeProto, tmpDecayMode);
-  if(tmpDecayMode>=xAOD::TauJetParameters::Mode_1p0n && tmpDecayMode<=xAOD::TauJetParameters::Mode_Other) CombinedP4=getCombinedP4(xTau, variables);
-
-  // create xAOD variables and fill:
-  decPtCombined(xTau) = CombinedP4.Pt();
-  decEtaCombined(xTau) = CombinedP4.Eta();
-  decPhiCombined(xTau) = CombinedP4.Phi();
-  decMCombined(xTau) = CombinedP4.M();  
-
-  if (m_addUseCaloPtFlag){
-    static const SG::AuxElement::Decorator<char> decUseCaloPtFlag("UseCaloPtFlag");
-    decUseCaloPtFlag(xTau) = getUseCaloPtFlag(xTau);
-  }
+  decPtCombined(tau) = combinedP4.Pt();
+  decEtaCombined(tau) = combinedP4.Eta();
+  decPhiCombined(tau) = combinedP4.Phi();
+  decMCombined(tau) = combinedP4.M();  
 
   if (m_addCalibrationResultVariables){
-
     static const SG::AuxElement::Decorator<float> decPtConstituent("pt_constituent");
     static const SG::AuxElement::Decorator<float> decPtTauRecCalibrated("pt_tauRecCalibrated");
     static const SG::AuxElement::Decorator<float> decPtWeighted("pt_weighted");
-    decPtConstituent(xTau) = variables.et_cb2PT_postcalib;
-    decPtTauRecCalibrated(xTau) = variables.et_postcalib;
-    decPtWeighted(xTau) = variables.et_weighted;
-
     static const SG::AuxElement::Decorator<float> decWeightWeighted("weight_weighted");
     static const SG::AuxElement::Decorator<float> decSigmaCombined("sigma_combined");
     static const SG::AuxElement::Decorator<float> decSigmaTaurec("sigma_tauRec");
     static const SG::AuxElement::Decorator<float> decSigmaConstituent("sigma_constituent");    
     static const SG::AuxElement::Decorator<float> decCorrelationCoefficient("correlation_coefficient");    
-    decWeightWeighted(xTau)         = variables.weight; 
-    decSigmaCombined(xTau)          = variables.combined_res;
-    decSigmaTaurec(xTau)            = variables.sigma_tauRec;
-    decSigmaConstituent(xTau)       = variables.sigma_constituent;
-    decCorrelationCoefficient(xTau) = variables.corrcoeff;
+    
+    decPtConstituent(tau) = variables.pt_constituent;
+    decPtTauRecCalibrated(tau) = variables.pt_tauRecCalibrated;
+    decPtWeighted(tau) = variables.pt_weighted;
+    decWeightWeighted(tau) = variables.weight; 
+    decSigmaCombined(tau) = variables.sigma_combined;
+    decSigmaTaurec(tau) = variables.sigma_tauRec;
+    decSigmaConstituent(tau) = variables.sigma_constituent;
+    decCorrelationCoefficient(tau) = variables.corrcoeff;
   }
 
   return StatusCode::SUCCESS;
 }
 
-//_____________________________________________________________________________
-// it would be better to retrieve eta bins from the calibration file, e.g. for upgrade studies!
-int CombinedP4FromRecoTaus::getIndexEta(const float& eta) const {
 
-  if( std::abs(eta) < 0.3 ) {
+
+bool CombinedP4FromRecoTaus::getUseCaloPtFlag(const xAOD::TauJet& tau) const {
+  if (! isValid(tau)) return true;
+  
+  xAOD::TauJetParameters::DecayMode decayMode = getDecayMode(tau);  
+  int decayModeIndex = getDecayModeIndex(decayMode);
+
+  int etaIndex = getEtaIndex(tau.etaTauEtaCalib());
+  
+  double caloSigma = tau.ptTauEtaCalib() * getCaloResolution(tau.ptTauEtaCalib(), decayModeIndex, etaIndex);
+  double deltaEt = tau.ptFinalCalib() - tau.ptTauEtaCalib();
+  
+  bool useCaloPt = false;
+  
+  // FIXME: should we use combinedSigma here ??
+  if (std::abs(deltaEt) > 5 * caloSigma) {
+    useCaloPt = true;
+  }
+  
+  return useCaloPt;
+}
+
+
+
+int CombinedP4FromRecoTaus::getEtaIndex(const float& eta) const {
+  // It would be better to retrieve eta bins from the calibration file, e.g. for upgrade studies!
+  if (std::abs(eta) < 0.3) {
     return 0;
   }
-  if( std::abs(eta) < 0.8 ) {
+  if (std::abs(eta) < 0.8) {
     return 1;
   }
-  if( std::abs(eta) < 1.3 ) {
+  if (std::abs(eta) < 1.3) {
     return 2;
   }
-  if( std::abs(eta) < 1.6 ) {
+  if (std::abs(eta) < 1.6) {
     return 3;
   }
-  if( std::abs(eta) < 2.7 ) {
+  if (std::abs(eta) < 2.5) {
     return 4;
   }
 
   return 99;
 }
 
-//_____________________________________________________________________________
-double CombinedP4FromRecoTaus::getCorrelationCoefficient(const int& etaIndex, const xAOD::TauJetParameters::DecayMode& mode) const {
+
+
+xAOD::TauJetParameters::DecayMode CombinedP4FromRecoTaus::getDecayMode(const xAOD::TauJet& tau) const{
+  int decayMode = xAOD::TauJetParameters::DecayMode::Mode_Error;
   
-  ATH_MSG_DEBUG("Entering getCorrelationCoefficient!");
-  if( mode < xAOD::TauJetParameters::Mode_1p0n || mode > xAOD::TauJetParameters::Mode_3pXn ){
-    ATH_MSG_WARNING("Warning! decay mode not defined!");
-    return 0.;
+  // When PanTau fails, the decay mode will be set to 1p0n !
+  int isPanTauCandidate;
+  tau.panTauDetail(xAOD::TauJetParameters::PanTauDetails::PanTau_isPanTauCandidate, isPanTauCandidate);
+  if (isPanTauCandidate) {
+    tau.panTauDetail(xAOD::TauJetParameters::PanTauDetails::PanTau_DecayMode, decayMode);
   }
-
-  return m_correlationHists[mode]->GetBinContent(etaIndex);
+ 
+  return static_cast<xAOD::TauJetParameters::DecayMode>(decayMode);
 } 
 
-//_____________________________________________________________________________
-double CombinedP4FromRecoTaus::getWeightedEt(const double& et_tauRec, 
-					     const double& et_cb2PT,
-					     const int& etaIndex,
-					     const xAOD::TauJetParameters::DecayMode& mode,
-                                             Variables& variables) const {
-  ATH_MSG_DEBUG("Entering CombinedP4FromRecoTaus::getWeightedEt!");
 
-  if( mode < xAOD::TauJetParameters::Mode_1p0n || mode > xAOD::TauJetParameters::Mode_3pXn ){
-    ATH_MSG_WARNING("Warning! decay mode not defined!");
-    return et_tauRec;
-  }
 
-  float res_tauRec = getResolutionTaurec( et_tauRec, etaIndex, mode );  
-  float res_substruct = getResolutionCellBased2PanTau( et_cb2PT, etaIndex, mode );
-  
-  if( res_tauRec == 0. || res_substruct == 0. ) {
-    ATH_MSG_WARNING( "Warning! res_tauRec or res_substruct is 0!" );
-    ATH_MSG_WARNING( "bin_taurec = " << et_tauRec );
-    ATH_MSG_WARNING( "bin_substruct = " << et_cb2PT );
-    m_resTGraph_tauRec[etaIndex][mode]->Print("all");
-    m_resTGraph_CellBased2PanTau[etaIndex][mode]->Print("all");
-    return 0.;
-  }
+int CombinedP4FromRecoTaus::getDecayModeIndex(const xAOD::TauJetParameters::DecayMode& decayMode) const {
+  return static_cast<int>(decayMode);
+}
 
-  variables.weight=( std::pow(res_substruct, 2) - getCorrelationCoefficient(etaIndex, mode )*res_tauRec*res_substruct )
-    / ( std::pow(res_tauRec, 2) + std::pow(res_substruct, 2) - 2*getCorrelationCoefficient(etaIndex, mode )*res_tauRec*res_substruct );
-  variables.et_weighted = variables.weight*getTauRecEt( et_tauRec, etaIndex, mode, variables.et_postcalib ) + (1 - variables.weight)*getCellbased2PantauEt( et_cb2PT, etaIndex, mode, variables.et_cb2PT_postcalib );
 
-  return variables.et_weighted;
-}
 
-//_____________________________________________________________________________
-double CombinedP4FromRecoTaus::getResolutionTaurec(const double& et, const int& etaIndex, const xAOD::TauJetParameters::DecayMode& mode) const {
-  ATH_MSG_DEBUG("Entering GetResolution_tauRec!");
-  if( mode < xAOD::TauJetParameters::Mode_1p0n || mode > xAOD::TauJetParameters::Mode_3pXn ){
-    ATH_MSG_WARNING("Warning! decay mode not defined!");
-    return 0.;
+bool CombinedP4FromRecoTaus::isValid(const xAOD::TauJet& tau) const {
+  xAOD::TauJetParameters::DecayMode decayMode = getDecayMode(tau); 
+  if (decayMode < xAOD::TauJetParameters::Mode_1p0n || decayMode > xAOD::TauJetParameters::Mode_3pXn) {
+    ATH_MSG_DEBUG("Decay mode is not supported !");
+    return false;
   }
-  
-  double MaxEt = TMath::MaxElement(m_resTGraph_tauRec[etaIndex][mode]->GetN(),m_resTGraph_tauRec[etaIndex][mode]->GetX()); 
-  if (et > MaxEt){
-    return m_resTGraph_tauRec[etaIndex][mode]->Eval(MaxEt) * et;
+
+  // FIXME: At which calibration state ???
+  int etaIndex = getEtaIndex(tau.eta()); 
+  if (etaIndex > 4) {
+    ATH_MSG_DEBUG("Eta is out of the supported range !");
+    return false;
   }
 
-  return m_resTGraph_tauRec[etaIndex][mode]->Eval(et) * et;
+  return true;
 }
 
-//_____________________________________________________________________________
-double CombinedP4FromRecoTaus::getResolutionCellBased2PanTau(const double& et, const int& etaIndex, const xAOD::TauJetParameters::DecayMode& mode) const {
-  ATH_MSG_DEBUG("Entering GetResolution_CellBased2Pantau!");
-  if( mode < xAOD::TauJetParameters::Mode_1p0n || mode > xAOD::TauJetParameters::Mode_3pXn ){
-    ATH_MSG_WARNING("Warning! decay mode not defined!");
-    return 0.;
-  }
-  
-  double MaxEt = TMath::MaxElement(m_resTGraph_CellBased2PanTau[etaIndex][mode]->GetN(),m_resTGraph_CellBased2PanTau[etaIndex][mode]->GetX()); 
-  if (et > MaxEt){
-    return m_resTGraph_CellBased2PanTau[etaIndex][mode]->Eval(MaxEt) * et;
-  }
 
-  return m_resTGraph_CellBased2PanTau[etaIndex][mode]->Eval(et) * et;
-}
- 
-//_____________________________________________________________________________ 
-double CombinedP4FromRecoTaus::getMeanCellBased2PanTau(const double& et, const int& etaIndex, const xAOD::TauJetParameters::DecayMode& mode) const {
- 
-  if( mode < xAOD::TauJetParameters::Mode_1p0n || mode > xAOD::TauJetParameters::Mode_3pXn ){
-    ATH_MSG_WARNING( "Warning! decay mode not defined!" );
-    return 0.;
-  }
 
-  double MaxEt = TMath::MaxElement(m_meanTGraph_CellBased2PanTau[etaIndex][mode]->GetN(),m_meanTGraph_CellBased2PanTau[etaIndex][mode]->GetX()); 
-  if (et > MaxEt){
-    return 0.;
-  }
+double CombinedP4FromRecoTaus::getCorrelation(const int& decayModeIndex, const int& etaIndex) const {
+  return m_correlationHists[decayModeIndex]->GetBinContent(etaIndex);
+} 
 
-  return m_meanTGraph_CellBased2PanTau[etaIndex][mode]->Eval(et) * et;
-}
- 
-//_____________________________________________________________________________ 
-double CombinedP4FromRecoTaus::getMeanTauRec(const double& et, const int& etaIndex, const xAOD::TauJetParameters::DecayMode& mode) const {
- 
-  if( mode < xAOD::TauJetParameters::Mode_1p0n || mode > xAOD::TauJetParameters::Mode_3pXn ){
-    ATH_MSG_WARNING( "Warning! decay mode not defined!" );
-    return 0.;
-  }
-    
-  double MaxEt = TMath::MaxElement(m_meanTGraph_tauRec[etaIndex][mode]->GetN(),m_meanTGraph_tauRec[etaIndex][mode]->GetX()); 
-  if (et > MaxEt){
-    return 0;
-  }
 
-  return m_meanTGraph_tauRec[etaIndex][mode]->Eval(et) * et;
-}
 
-//_____________________________________________________________________________ 
-double CombinedP4FromRecoTaus::getCombinedResolution(const double& et_tauRec,
-                                                     const double& et_cb2PT,
-                                                     const int& etaIndex,
-                                                     const xAOD::TauJetParameters::DecayMode& mode,
-                                                     Variables& variables) const {
- 
-  if( mode < xAOD::TauJetParameters::Mode_1p0n || mode > xAOD::TauJetParameters::Mode_3pXn ){
-    ATH_MSG_WARNING( "Warning! decay mode not defined!" );
-    return 0.;
+double CombinedP4FromRecoTaus::getCaloCalEt(const double& caloEt,
+                                            const int& decayModeIndex,
+                                            const int& etaIndex) const {
+  // ratio stored in the calibration graph equals (caloEt-truthEt)/caloEt
+  double ratio = 0.0;
+  
+  // FIXME: If caloEt is larger then max et, could we use the ratio at 
+  // max et, instead of setting it to zero
+  if (caloEt <= m_caloRelBiasMaxEt[decayModeIndex][etaIndex]) {
+    ratio = m_caloRelBias[decayModeIndex][etaIndex]->Eval(caloEt);
   }
- 
-  double sigma_tauRec = getResolutionTaurec( et_tauRec, etaIndex, mode );
-  double sigma_cb2PT = getResolutionCellBased2PanTau( et_cb2PT, etaIndex, mode ); 
-
-  variables.sigma_tauRec = sigma_tauRec;
-  variables.sigma_constituent = sigma_cb2PT;
-  variables.corrcoeff = getCorrelationCoefficient(etaIndex, mode );
+  
+  double caloCalEt = caloEt - ratio * caloEt;
 
-  double combined_res = std::sqrt( std::pow( variables.sigma_tauRec, 2) 
-				   + std::pow( sigma_cb2PT, 2) 
-				   - 2 * getCorrelationCoefficient(etaIndex, mode ) * variables.sigma_tauRec * sigma_cb2PT );
- 
-  return combined_res;
+  return caloCalEt;
 }
 
-//_____________________________________________________________________________
-// WARNING! likely unexpected behaviour for et_cb2PT_postcalib in case of non-supported DecayMode, FIXME
-double CombinedP4FromRecoTaus::getCellbased2PantauEt(const double& et_cb2PT,
-                                                     const int& etaIndex,
-                                                     const xAOD::TauJetParameters::DecayMode& mode,
-                                                     double& et_cb2PT_postcalib) const {
+
+
+double CombinedP4FromRecoTaus::getPanTauCalEt(const double& panTauEt,
+                                                  const int& decayModeIndex,
+                                                  const int& etaIndex) const {
+  // ratio stored in the calibration graph equals (panTauEt-truthEt)/panTauEt
+  double ratio = 0.0;
  
-  if( mode < xAOD::TauJetParameters::Mode_1p0n || mode > xAOD::TauJetParameters::Mode_3pXn ){
-    return et_cb2PT;
+  // Substructure is bad determined at high pt, as track momentum is pooryly measured 
+  if (panTauEt <= m_panTauRelBiasMaxEt[decayModeIndex][etaIndex]) {
+    ratio = m_panTauRelBias[decayModeIndex][etaIndex]->Eval(panTauEt);
   }
 
-  et_cb2PT_postcalib = et_cb2PT - getMeanCellBased2PanTau(et_cb2PT,etaIndex, mode);
+  double panTauCalEt = panTauEt - ratio * panTauEt;
 
-  return et_cb2PT_postcalib; 
+  return panTauCalEt;
 }
 
-//_____________________________________________________________________________
-// WARNING! likely unexpected behaviour for et_cb2PT_postcalib in case of non-supported DecayMode, FIXME
-double CombinedP4FromRecoTaus::getTauRecEt(const double& et,
-                                           const int& etaIndex,
-                                           const xAOD::TauJetParameters::DecayMode& mode, 
-                                           double& et_postcalib) const {
- 
-  if( mode < xAOD::TauJetParameters::Mode_1p0n || mode > xAOD::TauJetParameters::Mode_3pXn ){
-    return et;
-  }
-  
-  et_postcalib = et - getMeanTauRec(et, etaIndex, mode);
 
-  return et_postcalib; 
-}
 
-//_____________________________________________________________________________
-double CombinedP4FromRecoTaus::getCombinedEt(const double& et_tauRec,
-					     const double& et_substructure,
-					     const float& eta,
-					     const xAOD::TauJetParameters::DecayMode& mode,
-                                             Variables& variables) const {
-  ATH_MSG_DEBUG("Entering CombinedP4FromRecoTaus::getCombinedEt");
+double CombinedP4FromRecoTaus::getCaloResolution(const xAOD::TauJet& tau) const {
+  // Assume the resolution to be 100% when no calibraction is available
+  if (! isValid(tau)) return 1.0;
+  
+  xAOD::TauJetParameters::DecayMode decayMode = getDecayMode(tau);  
+  int decayModeIndex = getDecayModeIndex(decayMode);
 
-  int etaIndex = getIndexEta(eta);
-  ATH_MSG_DEBUG("Eta = " << eta << " , eta bin = " << etaIndex );
+  // FIXME: At which calibration state ???
+  int etaIndex = getEtaIndex(tau.eta());
+  
+  // FIXME: At which calibration state ???
+  return getCaloResolution(tau.pt(), etaIndex, decayModeIndex);
+}
 
-  double et_reco = getWeightedEt( et_tauRec, et_substructure, etaIndex, mode, variables);
-  ATH_MSG_DEBUG( "getWeightedEt: " << et_reco );
-  variables.combined_res = getCombinedResolution( et_tauRec, et_substructure, etaIndex, mode, variables );
-  ATH_MSG_DEBUG( "Combined_resolution: " << variables.combined_res );
-  ATH_MSG_DEBUG( getNsigmaCompatibility(et_tauRec) << "*Combined_resolution: " << getNsigmaCompatibility(et_tauRec)*variables.combined_res);
-  double et_diff = getTauRecEt( et_tauRec, etaIndex, mode, variables.et_postcalib ) - getCellbased2PantauEt( et_substructure, etaIndex, mode, variables.et_cb2PT_postcalib );
-  ATH_MSG_DEBUG( "et_diff (getTauRecEt - GetCellb2PEt): " << et_diff );
 
-  if( std::abs( et_diff ) > getNsigmaCompatibility(et_tauRec)*variables.combined_res) {
-    et_reco = et_tauRec;
-  }
 
-  return et_reco;
+double CombinedP4FromRecoTaus::getCaloResolution(const double& et, const int& decayModeIndex, const int& etaIndex) const {
+  double x = std::min(et, m_caloResMaxEt[decayModeIndex][etaIndex]);
+  double resolution = m_caloRes[decayModeIndex][etaIndex]->Eval(x);
+ 
+  return resolution;
 }
 
-//_____________________________________________________________________________
-TLorentzVector CombinedP4FromRecoTaus::getCombinedP4(const xAOD::TauJet& tau, Variables& variables) const {
-  ATH_MSG_DEBUG( "In CombinedP4FromRecoTaus::getCombinedP4..." );
 
-  const TLorentzVector& tauRecP4 = tau.p4();
-  const TLorentzVector& substructureP4 = tau.p4(xAOD::TauJetParameters::PanTauCellBased);
-    
-  ATH_MSG_DEBUG( "TauRecET: " << tauRecP4.Et() );
-  ATH_MSG_DEBUG( "ConstituentET: " << substructureP4.Et() );
 
-  xAOD::TauJetParameters::DecayMode decayMode = xAOD::TauJetParameters::DecayMode::Mode_Error;
-  int tmpDecayMode;
-  if (tau.panTauDetail(xAOD::TauJetParameters::PanTauDetails::PanTau_DecayMode, tmpDecayMode)) {
-    decayMode = static_cast< xAOD::TauJetParameters::DecayMode>(tmpDecayMode);
-  }
+double CombinedP4FromRecoTaus::getPanTauResolution(const double& et, const int& decayModeIndex, const int& etaIndex) const {
+  double x = std::min(et, m_panTauResMaxEt[decayModeIndex][etaIndex]);
+  double resolution = m_panTauRes[decayModeIndex][etaIndex]->Eval(x);
+ 
+  return resolution;
+}
 
-  //Return tauRec P4 if tau is no pantau candidate or pantau decay mode is unequal 1P or 3P
-  int isPanTauCandidate;  
-  tau.panTauDetail(xAOD::TauJetParameters::PanTauDetails::PanTau_isPanTauCandidate, isPanTauCandidate);  
-  int DecayMode;
-  tau.panTauDetail(xAOD::TauJetParameters::PanTauDetails::PanTau_DecayMode, DecayMode);
 
-  ATH_MSG_DEBUG( "tau IsPanTauCandidate = " << isPanTauCandidate );
 
-  if (isPanTauCandidate == 0 || DecayMode>xAOD::TauJetParameters::Mode_3pXn || std::abs(tauRecP4.Eta()) > 2.5) {
-    variables.et_cb2PT_postcalib = substructureP4.Et();
-    variables.et_postcalib = tauRecP4.Et();
-    variables.et_weighted = tauRecP4.Et();
-    return tauRecP4;
-  }
+double CombinedP4FromRecoTaus::getWeight(const double& caloSigma,
+                                         const double& panTauSigma,
+                                         const double& correlation) const {
+  double cov = correlation * caloSigma * panTauSigma;
+  double caloWeight = std::pow(panTauSigma, 2) - cov;
+  double panTauWeight = std::pow(caloSigma, 2) - cov;
 
-  double combinedEt = getCombinedEt(tauRecP4.Et(), substructureP4.Et(), tauRecP4.Eta(), decayMode, variables);
-  ATH_MSG_DEBUG( "combinedET: " << combinedEt );
+  return caloWeight/(caloWeight + panTauWeight);
+}
 
-  TLorentzVector combinedP4;
-  
-  //double combinedM = 0;
-  //double combinedPt = std::sqrt(std::pow(combinedEt,2) - std::pow(combinedM,2));
-  //combinedP4.SetPtEtaPhiM(combinedPt, substructureP4.Eta(), substructureP4.Phi(), combinedM);
 
-  combinedP4.SetPtEtaPhiM(combinedEt, substructureP4.Eta(), substructureP4.Phi(), 0.);
 
-  return combinedP4;
+double CombinedP4FromRecoTaus::getCombinedSigma(const double& caloSigma,
+					                            const double& panTauSigma,
+                                                const double& correlation) const {
+  // FIXME: the calculation seems not right
+  double combinedSigma2 = std::pow(caloSigma, 2) + std::pow(panTauSigma, 2) 
+                          - 2 * correlation * caloSigma * panTauSigma;
+  
+  return std::sqrt(combinedSigma2);
 }
 
-//_____________________________________________________________________________
-float CombinedP4FromRecoTaus::getNsigmaCompatibility(const float& et_TauRec) const {
 
-  float nsigma = m_Nsigma_compatibility->Eval(et_TauRec);
 
-  if(nsigma<0) return 0.;
+double CombinedP4FromRecoTaus::getNsigmaCompatibility(const double& et) const {
+  double nsigma = m_nSigmaCompatibility->Eval(et);
+  
+  if (nsigma < 0.) return 0.;
 
   return nsigma;
 }
 
-//_____________________________________________________________________________
-double CombinedP4FromRecoTaus::getCaloResolution(const xAOD::TauJet& tau) const {
-  ATH_MSG_DEBUG("Entering getCaloResolution!");
-
-  double et = tau.pt();
 
-  xAOD::TauJetParameters::DecayMode mode = xAOD::TauJetParameters::DecayMode::Mode_Error;
 
-  int tmpDecayMode;
-  if (tau.panTauDetail(xAOD::TauJetParameters::PanTauDetails::PanTau_DecayMode, tmpDecayMode)) {
-    mode = static_cast< xAOD::TauJetParameters::DecayMode>(tmpDecayMode);
+double CombinedP4FromRecoTaus::getCombinedEt(const double& caloEt,
+					                         const double& panTauEt,
+					                         const xAOD::TauJetParameters::DecayMode& decayMode,
+					                         const float& eta,
+                                             Variables& variables) const {
+  // Obtain the index of calibration graph
+  int decayModeIndex = getDecayModeIndex(decayMode);
+  int etaIndex = getEtaIndex(eta);
+  
+  // Obtain the calibration parameter based on the index
+  // -- Correlation between calo TES and PanTau
+  double correlation = getCorrelation(decayModeIndex, etaIndex);
+
+  // -- Sigma of the difference between reconstruted et and truth et at calo TES
+  double caloSigma = caloEt * getCaloResolution(caloEt, decayModeIndex, etaIndex);
+  if (0. == caloSigma) {
+    ATH_MSG_WARNING("Calo TES: Et resolution at " << caloEt << " is 0");
+    m_caloRes[decayModeIndex][etaIndex]->Print("all");
+    return 0.;
   }
-
-  if( mode < xAOD::TauJetParameters::Mode_1p0n || mode > xAOD::TauJetParameters::Mode_3pXn ){
-    ATH_MSG_DEBUG("PanTau decay mode > 3PXN! Return false");
-    // need to derive 2p parametrisation, undefined behaviour, for now return Et
-    return et;
+  
+  // -- Sigma of the difference between reconstruted et and truth et at PanTau
+  double panTauSigma = panTauEt * getPanTauResolution(panTauEt, decayModeIndex, etaIndex);
+  if (0. == panTauSigma) {
+    ATH_MSG_WARNING("PanTau: Et resolution at " << panTauEt << " is 0");
+    m_panTauRes[decayModeIndex][etaIndex]->Print("all");
+    return 0.;
   }
+ 
+  // -- Et at calo TES with bias corrected
+  double caloCalEt = getCaloCalEt(caloEt, decayModeIndex, etaIndex); 
+  
+  // -- Et at PanTau with bias corrected
+  double panTauCalEt = getPanTauCalEt(panTauEt, decayModeIndex, etaIndex);
+ 
+  // Combination of calo TES and PanTau
+  // FIXME: A more consistent way would be calculating the weight use bias corrected Et as input
+  double weight = getWeight(caloSigma, panTauSigma, correlation);
+  double weightedEt = weight * caloCalEt + (1 - weight) * panTauCalEt;
+  double combinedSigma = getCombinedSigma(caloSigma, panTauSigma, correlation);
+  
+  // FIXME: weighteEt will be updated in case the difference of calo TES and PanTau is too large
+  variables.pt_weighted = weightedEt;
+  
+  // If the difference of calo TES and PanTau is too large, the combined result
+  // may not be reliable 
+  // FIXME: A more consistent way would be calculating the NsigmaCompatibility use caloCalEt
+  double deltaEt = caloCalEt - panTauCalEt;
+  if (std::abs(deltaEt) > getNsigmaCompatibility(caloEt) * combinedSigma) {
+    // FIXME: Why not use caloCalEt here ?
+    weightedEt = caloEt;
+  }
+
+  // Store the results
+  variables.corrcoeff = correlation;
+  variables.sigma_tauRec = caloSigma;
+  variables.sigma_constituent = panTauSigma;
+  variables.pt_tauRecCalibrated = caloCalEt;
+  variables.pt_constituent = panTauCalEt;
+  variables.weight = weight;
+  variables.sigma_combined = combinedSigma;
+
+  ATH_MSG_DEBUG("Intermediate results\n" << 
+                "coff: " << correlation << " sigma(calo): " << caloSigma << " sigma(constituent): " << panTauSigma << 
+                "\ncalibrated et(calo): " << caloCalEt << " calibrated et(constituent): " << panTauCalEt << 
+                "\nweight:" << weight << " combined et: " << weightedEt << " combined sigma: " << combinedSigma);
+  
+  return weightedEt;
+}
 
-  int etaIndex = getIndexEta(tau.eta());
-  if( etaIndex > 4 ){
-    ATH_MSG_DEBUG("eta > 2.7. Return false");
-    // not upgrade-friendly, undefined behaviour, for now return Et
-    return et;
-  }
 
-  double MaxEt = TMath::MaxElement(m_resTGraph_tauRec[etaIndex][mode]->GetN(),m_resTGraph_tauRec[etaIndex][mode]->GetX()); 
-  if (et > MaxEt){
-    return m_resTGraph_tauRec[etaIndex][mode]->Eval(MaxEt) * et;
-  }
 
-  return m_resTGraph_tauRec[etaIndex][mode]->Eval(et) * et;
-}
+TLorentzVector CombinedP4FromRecoTaus::getCombinedP4(const xAOD::TauJet& tau, Variables& variables) const {
+  const TLorentzVector& caloP4 = tau.p4(xAOD::TauJetParameters::TauEtaCalib);
+  const TLorentzVector& panTauP4 = tau.p4(xAOD::TauJetParameters::PanTauCellBased);
+    
+  ATH_MSG_DEBUG("Four momentum at calo TES, pt: " << caloP4.Pt() << " eta: " << caloP4.Eta() << 
+                " phi: " << caloP4.Phi() << " mass: " << caloP4.M());
+  ATH_MSG_DEBUG("Four momentum at PanTau, pt: " << panTauP4.Pt() << " eta: " << panTauP4.Eta() << 
+                " phi: " << panTauP4.Phi() << " mass: " << panTauP4.M());
 
-//_____________________________________________________________________________
-bool CombinedP4FromRecoTaus::getUseCaloPtFlag(const xAOD::TauJet& tau) const {
-  ATH_MSG_DEBUG("Entering getUseCaloPtFlag!");
+  xAOD::TauJetParameters::DecayMode decayMode = getDecayMode(tau);
   
-  xAOD::TauJetParameters::DecayMode mode = xAOD::TauJetParameters::DecayMode::Mode_Error;
-  int tmpDecayMode;
-  if (tau.panTauDetail(xAOD::TauJetParameters::PanTauDetails::PanTau_DecayMode, tmpDecayMode)) {
-    mode = static_cast< xAOD::TauJetParameters::DecayMode>(tmpDecayMode);
-  }
-
-  if( mode < xAOD::TauJetParameters::Mode_1p0n || mode > xAOD::TauJetParameters::Mode_3pXn ){
-    ATH_MSG_DEBUG("PanTau decay mode > 3PXN! Return false");
-    return false;
-  }
+  double combinedEt = getCombinedEt(caloP4.Et(), panTauP4.Et(), decayMode, caloP4.Eta(), variables);
 
-  int etaIndex = getIndexEta(tau.eta()); 
-  if( etaIndex > 4 ){
-    ATH_MSG_DEBUG("eta > 2.7. Return false");
-    return false;
-  }
-  
-  double tauRec_res = getCaloResolution(tau);
-  double et_diff = tau.ptFinalCalib() - tau.pt();
-  
-  bool UseCaloPt = false;
-  if( et_diff > 5*tauRec_res) {
-    UseCaloPt = true;
-  }
+  // Et is the combination of calo TES and PanTau, but eta and phi is from PanTau 
+  TLorentzVector combinedP4;
+  combinedP4.SetPtEtaPhiM(combinedEt, panTauP4.Eta(), panTauP4.Phi(), 0.);
   
-  return UseCaloPt;
+  ATH_MSG_DEBUG("Combined four momentum, pt: " << combinedP4.Pt() << " eta: " << combinedP4.Eta() << 
+                " phi: " << combinedP4.Phi() << " mass: " << combinedP4.M());
+
+  return combinedP4;
 }
diff --git a/Reconstruction/tauRecTools/tauRecTools/CombinedP4FromRecoTaus.h b/Reconstruction/tauRecTools/tauRecTools/CombinedP4FromRecoTaus.h
index 462e7610d47c..8057e25b46f4 100644
--- a/Reconstruction/tauRecTools/tauRecTools/CombinedP4FromRecoTaus.h
+++ b/Reconstruction/tauRecTools/tauRecTools/CombinedP4FromRecoTaus.h
@@ -5,113 +5,135 @@
 #ifndef TAURECTOOLS_COMBINEDP4FROMRECOTAUS_H
 #define TAURECTOOLS_COMBINEDP4FROMRECOTAUS_H
 
-//Root include(s)
+#include "tauRecTools/TauRecToolBase.h"
+
+#include "xAODTau/TauJet.h"
+
 #include "TH1F.h"
 #include "TF1.h"
 #include "TGraph.h"
 
-//tauRecTools include(s)
-#include "tauRecTools/TauRecToolBase.h"
-
-//xAOD include(s)
-#include "xAODTau/TauJet.h"
+#include <array>
+#include <string>
 
-class CombinedP4FromRecoTaus
-: public TauRecToolBase
-{
+class CombinedP4FromRecoTaus : public TauRecToolBase {
 public:
   ASG_TOOL_CLASS2( CombinedP4FromRecoTaus, TauRecToolBase, ITauToolBase )
 
-  //standard constructor
   CombinedP4FromRecoTaus(const std::string& name="CombinedP4FromRecoTaus");  
     
-  //function where variables are computed and decorated
   virtual StatusCode initialize() override;
-        
+      
   virtual StatusCode execute(xAOD::TauJet& xTau) const override;
 
+  /** Whether to use calo pt, invoked by TauSmearing tool */
   bool getUseCaloPtFlag(const xAOD::TauJet& tau) const;
   
+  /** Get the resolution of Et at the calo TES, invoked by METSignificance */
   double getCaloResolution(const xAOD::TauJet& tau) const;
 
 private:
   struct Variables
   {
+    double pt_constituent{0.0};
+    double pt_tauRecCalibrated{0.0};
+    double pt_weighted{0.0};
     double weight{-1111.0};
-    double combined_res{-1111.};
+    double sigma_combined{-1111.};
     double sigma_tauRec{-1111.0};
     double sigma_constituent{-1111.0};
     double corrcoeff{-1111.0};
-    double et_weighted{0.0};
-    double et_cb2PT_postcalib{0.0};
-    double et_postcalib{0.0};
   };
 
-  // Get correlation coefficient for the given decay mode
-  double getCorrelationCoefficient(const int& etaIndex, const xAOD::TauJetParameters::DecayMode& decayMode) const;
-    
-  double getWeightedEt(const double& et_tauRec, 
-		       const double& et_cb2PT,
-		       const int& etaIndex,
-		       const xAOD::TauJetParameters::DecayMode& mode,
-                       Variables& variables) const;
-
-  double getResolutionTaurec(const double& et, const int& etaIndex, const xAOD::TauJetParameters::DecayMode& mode) const;
-
-  double getResolutionCellBased2PanTau(const double& et, const int& etaIndex, const xAOD::TauJetParameters::DecayMode& mode) const;
+  /** Get the weighted four momentum of calo TES and PanTau */
+  TLorentzVector getCombinedP4(const xAOD::TauJet& tau, Variables& variables) const;
 
-  double getMeanTauRec(const double& et, const int& etaIndex, const xAOD::TauJetParameters::DecayMode& mode) const;
+  /** Whether the tau candidate is valid for the calculation */
+  bool isValid(const xAOD::TauJet& tau) const;
 
-  double getMeanCellBased2PanTau(const double& et, const int& etaIndex, const xAOD::TauJetParameters::DecayMode& mode) const;
+  /** Get the index of eta in the calibration histogram */
+  int getEtaIndex(const float& eta) const;
 
-  double getCombinedResolution(const double& et_tauRec,
-                               const double& et_cb2PT,
-                               const int& etaIndex,
-                               const xAOD::TauJetParameters::DecayMode& mode,
-                               Variables& variables) const;
+  /** Get the decay mode of the tau candidate */
+  xAOD::TauJetParameters::DecayMode getDecayMode(const xAOD::TauJet& tau) const;
+  
+  /** Get the index of decay mode in the calibration histogram */
+  int getDecayModeIndex(const xAOD::TauJetParameters::DecayMode& decayMode) const;
 
-  double getTauRecEt(const double& et, const int& etaIndex, const xAOD::TauJetParameters::DecayMode& mode, double& et_postcalib) const;
+  /** Get correlation coefficient between the calo TES and PanTau */
+  double getCorrelation(const int& decayModeIndex, const int& etaIndex) const;
+  
+  /** Get the resolution of Et at the calo TES */
+  double getCaloResolution(const double& et, const int& decayModeIndex, const int& etaIndex) const;
+  
+  /** Get the resolution of Et at PanTau */
+  double getPanTauResolution(const double& et, const int& decayModeIndex, const int& etaIndex) const;
+  
+  /** Get the Et at the calo TES after calibration correction */ 
+  double getCaloCalEt(const double& et, const int& decayModeIndex, const int& etaIndex) const;
+
+  /** Get the Et at PanTau after calibration correction */ 
+  double getPanTauCalEt(const double& panTauEt, const int& decayModeIndex, 
+                          const int& etaIndex) const;
+ 
+  /** Get the weight of calo TES */
+  double getWeight(const double& caloSigma, const double& panTauSigma, const double& correlatioon) const;
+
+  /** Get the combined sigma of calo TES and PanTau */
+  double getCombinedSigma(const double& caloSigma, const double& panTauSigma, const double& correlation) const;
+
+  /** Get the combined Et of calo TES and PanTau */
+  double getCombinedEt(const double& caloEt, const double& et_substructure,
+		               const xAOD::TauJetParameters::DecayMode& decayMode, const float& eta, 
+                       Variables& variables) const;
+  
+  /** Get the allowed difference between calo TES and PanTau */ 
+  double getNsigmaCompatibility(const double& caloEt) const;
 
-  double getCellbased2PantauEt(const double& et_cb2PT,
-                               const int& etaIndex,
-                               const xAOD::TauJetParameters::DecayMode& mode,
-                               double& et_cb2PT_postcalib) const;
+  /// Switch of adding the intermediate results
+  bool m_addCalibrationResultVariables;
+  
+  /// Name of the calibration file 
+  std::string m_calFileName;
+  
+  /// Binning in the calibraction graph/hist
+  enum Binning {DecayModeBinning = 5, EtaBinning = 5};
 
-  //Calculates the optimal tau Et 
-  double getCombinedEt(const double& et_tauRec,
-		       const double& et_substructure,
-		       const float& eta,
-		       const xAOD::TauJetParameters::DecayMode& mode,
-                       Variables& variables) const;
+  /// Decay mode binning in the calibration graph/hist
+  const std::array<std::string, DecayModeBinning> m_decayModeNames = {"1p0n","1p1n","1pXn","3p0n","3pXn"}; //!
+  
+  /// Eta binning in the calibration graph
+  const std::array<std::string, EtaBinning> m_etaBinNames = {"0", "1", "2", "3", "4"}; //!
+  
+  /// Calibration graph: mean of bias/caloEt as a function of caloEt
+  std::array<std::array<std::unique_ptr<TGraph>, DecayModeBinning>, EtaBinning> m_caloRelBias; //!
 
+  /// Maximum Et of m_caloRelBias
+  std::array<std::array<double, DecayModeBinning>, EtaBinning> m_caloRelBiasMaxEt; //!
 
-  //Calculates the optimal tau 4-vector
-  TLorentzVector getCombinedP4(const xAOD::TauJet& tau,
-                               Variables& variables) const;
+  /// Calibration graph: resolution at Calo TES as a function of caloEt
+  std::array<std::array<std::unique_ptr<TGraph>, DecayModeBinning>, EtaBinning> m_caloRes; //!
 
-  // Get the enum-value for eta corresponding to the eta value
-  int getIndexEta(const float& eta) const;
+  /// Maximum Et of m_caloRes
+  std::array<std::array<double, DecayModeBinning>, EtaBinning> m_caloResMaxEt; //!
 
-  float getNsigmaCompatibility(const float& et_TauRec) const;
+  /// Calibration graph: mean of bias/panTauEt as a funtion of panTauEt
+  std::array<std::array<std::unique_ptr<TGraph>, DecayModeBinning>, EtaBinning> m_panTauRelBias; //!
+  
+  /// Maximum Et of m_panTauRelBias
+  std::array<std::array<double, DecayModeBinning>, EtaBinning> m_panTauRelBiasMaxEt; //!
 
-  const std::vector<std::string> m_modeNames = {"1p0n","1p1n","1pXn","3p0n","3pXn"};
-  const std::vector<std::string> m_etaBinNames = {"0", "1", "2", "3", "4"};//("<0.3"), ("<0.8"), ("<1.3"), ("<1.6"), ("<2.5")
+  /// Calibration graph: resolution at PanTau as a function of panTauEt
+  std::array<std::array<std::unique_ptr<TGraph>, DecayModeBinning>, EtaBinning> m_panTauRes; //!
   
-  /// row: size of m_etaBinNames, column: size of m_modeNames
-  std::vector<std::vector<std::unique_ptr<TGraph>>> m_meanTGraph_CellBased2PanTau; 
-  std::vector<std::vector<std::unique_ptr<TGraph>>> m_resTGraph_CellBased2PanTau;
+  /// Maximum Et of m_panTauRes
+  std::array<std::array<double, DecayModeBinning>, EtaBinning> m_panTauResMaxEt; //!
   
-  std::vector<std::vector<std::unique_ptr<TGraph>>> m_meanTGraph_tauRec;
-  std::vector<std::vector<std::unique_ptr<TGraph>>> m_resTGraph_tauRec;
+  /// Calibration histogram: correlation coefficient of calo TES and PanTau
+  std::array<std::unique_ptr<TH1F>, DecayModeBinning> m_correlationHists; //!
 
-  /// size of m_modeNames
-  std::vector<std::unique_ptr<TH1F>> m_correlationHists;
-
-  bool m_addCalibrationResultVariables;
-  bool m_addUseCaloPtFlag;
-  std::string m_sWeightFileName;
-  
-  std::unique_ptr<TF1> m_Nsigma_compatibility; //!
+  /// Calibration histogram: maximum tolerence in unit of combined sigma
+  std::unique_ptr<TF1> m_nSigmaCompatibility; //!
 };
 
 #endif // TAURECTOOLS_COMBINEDP4FROMRECOTAUS_H
-- 
GitLab


From cec8526b7c0148e61289c80b59e4b8a0dc36c308 Mon Sep 17 00:00:00 2001
From: Bertrand Martin <martindl@cern.ch>
Date: Mon, 5 Oct 2020 21:43:34 +0200
Subject: [PATCH 211/403] tauRec: more work on pi0s

Hello,

This is one more small iteration towards rerunning tau reconstruction from xAOD.
The tau AOD content has been slightly revised, we keep a new pi0 collection and drop another, but otherwise, this MR does not change the reconstruction output.
Further changes are expected, as the pi0 cell thinning is still work in progress.
Some modest memory improvement was made in the bookkeeping of already-processed pi0 cells, replacing a std::vector<CaloCell*> with a boost::dynamic_bitset<>.

Cheers,
Bertrand
---
 .../tauRec/python/TauRecRunConfigured.py      |  1 -
 Reconstruction/tauRec/python/TauRecRunner.py  | 19 ++++----------
 Reconstruction/tauRec/share/TauAODList.py     | 25 +++++--------------
 .../tauRec/share/tauRec_jobOptions.py         |  8 ++----
 Reconstruction/tauRec/src/TauProcessorAlg.cxx |  9 +++----
 .../tauRecTools/Root/TauRecToolBase.cxx       |  2 +-
 .../tauRecTools/src/TauPi0CreateROI.cxx       | 10 +++-----
 .../tauRecTools/src/TauPi0CreateROI.h         |  4 +--
 .../tauRecTools/tauRecTools/ITauToolBase.h    |  4 +--
 .../tauRecTools/tauRecTools/TauRecToolBase.h  |  2 +-
 10 files changed, 25 insertions(+), 59 deletions(-)

diff --git a/Reconstruction/tauRec/python/TauRecRunConfigured.py b/Reconstruction/tauRec/python/TauRecRunConfigured.py
index 1112fdd4f3ec..b31874fd000c 100644
--- a/Reconstruction/tauRec/python/TauRecRunConfigured.py
+++ b/Reconstruction/tauRec/python/TauRecRunConfigured.py
@@ -14,7 +14,6 @@
 ################################################################################
 
 from RecExConfig.Configured import Configured
-from AthenaCommon.SystemOfUnits import *
 
 ################################################################################
 ## @class TauRecRunConfigured
diff --git a/Reconstruction/tauRec/python/TauRecRunner.py b/Reconstruction/tauRec/python/TauRecRunner.py
index 45af59f4640d..04cc5c067417 100644
--- a/Reconstruction/tauRec/python/TauRecRunner.py
+++ b/Reconstruction/tauRec/python/TauRecRunner.py
@@ -42,9 +42,8 @@ class TauRecRunner ( TauRecRunConfigured ) :
   
     _output     = { _outputType:_outputKey , _outputAuxType:_outputAuxKey }
     
-    def __init__(self, name = "TauRecRunner",doPi0Clus=False):
+    def __init__(self, name = "TauRecRunner"):
         self.name = name
-        self.doPi0Clus = doPi0Clus
         TauRecRunConfigured.__init__(self, name)
 
 
@@ -67,26 +66,18 @@ class TauRecRunner ( TauRecRunConfigured ) :
         
         tools = []
                         
-        ### TauRecPi0EflowProcessor ###
-        # Tools in this section were originally in TauRecPi0EflowProcessor
-        if self.doPi0Clus: tools.append(taualgs.getPi0ClusterCreator())
-            
-        ###############################
+        tools.append(taualgs.getPi0ClusterCreator())
+        tools.append(taualgs.getPi0ClusterScaler())
+        tools.append(taualgs.getPi0ScoreCalculator())
+        tools.append(taualgs.getPi0Selector())
         
-        ### TauRecVariablesProcessor ###
         from InDetRecExample.InDetJobProperties import InDetFlags
-        # Tools in this section were originally in TauRecVariablesProcessor
         if tauFlags.isStandalone() or InDetFlags.doVertexFinding():
             tools.append(taualgs.getTauVertexVariables())
 
         tools.append(taualgs.getTauCommonCalcVars())
         tools.append(taualgs.getTauSubstructure())
 
-        if self.doPi0Clus:
-            tools.append(taualgs.getPi0ClusterScaler())
-            tools.append(taualgs.getPi0ScoreCalculator())
-            tools.append(taualgs.getPi0Selector())
-
         tools.append(taualgs.getEnergyCalibrationLC(correctEnergy=False, correctAxis=True, postfix='_onlyAxis'))
 
         # PanTau:
diff --git a/Reconstruction/tauRec/share/TauAODList.py b/Reconstruction/tauRec/share/TauAODList.py
index e86c77b4f020..0df44446948e 100644
--- a/Reconstruction/tauRec/share/TauAODList.py
+++ b/Reconstruction/tauRec/share/TauAODList.py
@@ -10,33 +10,21 @@
 #------------------------------------------------------------------------------
 TauAODList = []
 
-#------------------------------------------------------------------------------
-# Tau1P3P cell cluster
-#------------------------------------------------------------------------------
-#TauAODList += [ "CaloClusterContainer#Tau1P3PCellCluster" ]
-
-#------------------------------------------------------------------------------
-# TauRec cell cluster
-#------------------------------------------------------------------------------
-#TauAODList += [ "CaloClusterContainer#TauRecCellCluster" ]
-
 #------------------------------------------------------------------------------
 # Tau Pi0 cluster
 #------------------------------------------------------------------------------
-TauAODList += [ "xAOD::CaloClusterContainer#TauPi0Clusters" ]
-TauAODList += [ "xAOD::CaloClusterAuxContainer#TauPi0ClustersAux." ]
+#TauAODList += [ "xAOD::CaloClusterContainer#TauPi0Clusters" ]
+#TauAODList += [ "xAOD::CaloClusterAuxContainer#TauPi0ClustersAux." ]
 
-#------------------------------------------------------------------------------
-# Tau1P3P cell EM012 cluster
-#------------------------------------------------------------------------------
-#TauAODList += [ "CaloClusterContainer#Tau1P3PCellEM012ClusterContainer" ]
+TauAODList += [ "xAOD::CaloClusterContainer#TauPi0SubtractedClusters" ]
+TauAODList += [ "xAOD::CaloClusterAuxContainer#TauPi0SubtractedClustersAux." ]
+TauAODList += [ "CaloClusterCellLinkContainer#TauPi0SubtractedClusters_links" ]
 
 #------------------------------------------------------------------------------
 # TauRec main xAOD containers
 #------------------------------------------------------------------------------
 TauAODList += [ "xAOD::TauJetContainer#TauJets" ]
-#TauAODList += [ "xAOD::TauJetAuxContainer#TauJetsAux.-ABS_ETA_LEAD_TRACK.-CORRCENTFRAC.-CORRFTRK.-EMFRACTIONATEMSCALE_MOVEE3.-HADLEAKET.-NUMTRACK.-TAU_ABSDELTAETA.-TAU_ABSDELTAPHI.-TAU_SEEDTRK_SECMAXSTRIPETOVERPT.-TAU_TRT_NHT_OVER_NLT.-NUMVERTICES" ]
-TauAODList += [ "xAOD::TauJetAuxContainer#TauJetsAux.-mu.-nVtx.-NUMTRACK.-NUMVERTICES.-nVtxPU.-MU" ]
+TauAODList += [ "xAOD::TauJetAuxContainer#TauJetsAux.-mu.-nVtxPU.-ABS_ETA_LEAD_TRACK.-TAU_ABSDELTAPHI.-TAU_ABSDELTAETA.-absipSigLeadTrk" ]
 
 #------------------------------------------------------------------------------
 # TauRec tauTrack xAOD containers
@@ -84,7 +72,6 @@ from DiTauRec.DiTauRecFlags import jobproperties
 if jobproperties.DiTauRecFlags.doDiTauRec():
     include("DiTauRec/DiTauAODList.py")
     TauAODList += DiTauAODList
-    pass
 
 
 #-------------------------------------------------------------------------
diff --git a/Reconstruction/tauRec/share/tauRec_jobOptions.py b/Reconstruction/tauRec/share/tauRec_jobOptions.py
index fb791607f514..e3b237dd66d0 100644
--- a/Reconstruction/tauRec/share/tauRec_jobOptions.py
+++ b/Reconstruction/tauRec/share/tauRec_jobOptions.py
@@ -7,17 +7,13 @@
 #@author Felix Friedrich <felix.friedrich@cern.ch>
 ################################################################################
 
-#TODO: everything needed here?
 from RecExConfig.RecFlags import rec
-from AthenaCommon.BeamFlags import jobproperties
-from AthenaCommon.GlobalFlags import globalflags
-import AthenaCommon.SystemOfUnits as Units
 from tauRec.tauRecFlags import tauFlags
 
 # use Tau Jet Vertex Association Tool
 _doTJVA = tauFlags.doTJVA()
 
-# Pi0-finding algorithm
+# Pi0 cell RoI making and topoclustering
 _doPi0Clus = tauFlags.doPi0()
 
 from tauRec.TauRecBuilder import TauRecCoreBuilder
@@ -27,4 +23,4 @@ if _doPi0Clus:
     include("tauRec/Pi0ClusterMaker_jobOptions.py")
 
 from tauRec.TauRecRunner import TauRecRunner
-TauRecRunner(doPi0Clus=_doPi0Clus)
+TauRecRunner()
diff --git a/Reconstruction/tauRec/src/TauProcessorAlg.cxx b/Reconstruction/tauRec/src/TauProcessorAlg.cxx
index 717b5996e3dd..00fc38816f67 100644
--- a/Reconstruction/tauRec/src/TauProcessorAlg.cxx
+++ b/Reconstruction/tauRec/src/TauProcessorAlg.cxx
@@ -3,20 +3,17 @@
 */
 
 #include "tauRec/TauProcessorAlg.h"
-
 #include "xAODJet/Jet.h"
 #include "xAODJet/JetContainer.h"
-
 #include "xAODTau/TauJetAuxContainer.h"
 #include "xAODTau/TauDefs.h"
 #include "xAODTau/TauTrackContainer.h"
 #include "xAODTau/TauTrackAuxContainer.h"
-
 #include "StoreGate/ReadCondHandleKey.h"
 #include "StoreGate/ReadHandle.h"
 #include "StoreGate/WriteHandle.h"
-
 #include "NavFourMom/INavigable4MomentumCollection.h"
+#include <boost/dynamic_bitset.hpp>
 
 using Gaudi::Units::GeV;
 
@@ -99,7 +96,7 @@ StatusCode TauProcessorAlg::execute(const EventContext& ctx) const {
   xAOD::PFOContainer* tauShotPFOContainer = tauShotPFOHandle.ptr();
 
   CaloCellContainer* Pi0CellContainer = nullptr;
-  std::vector<CaloCell*> addedCellsMap;
+  boost::dynamic_bitset<> addedCellsMap;
 
   if(!m_tauPi0CellOutputContainer.empty()) {
     SG::WriteHandle<CaloCellContainer> tauPi0CellHandle( m_tauPi0CellOutputContainer, ctx );
@@ -109,7 +106,7 @@ StatusCode TauProcessorAlg::execute(const EventContext& ctx) const {
     // Initialize the cell map per event, used to avoid dumplicate cell in TauPi0CreateROI
     IdentifierHash hashMax = m_cellID->calo_cell_hash_max();
     ATH_MSG_DEBUG("CaloCell Hash Max: " << hashMax);
-    addedCellsMap.resize(hashMax,NULL);
+    addedCellsMap.resize(hashMax,false);
   }
 
   // retrieve the input jet seed container
diff --git a/Reconstruction/tauRecTools/Root/TauRecToolBase.cxx b/Reconstruction/tauRecTools/Root/TauRecToolBase.cxx
index a0d2165874ae..a7a912ba553d 100644
--- a/Reconstruction/tauRecTools/Root/TauRecToolBase.cxx
+++ b/Reconstruction/tauRecTools/Root/TauRecToolBase.cxx
@@ -148,7 +148,7 @@ StatusCode TauRecToolBase::executeDev(xAOD::TauJet&) {
   return StatusCode::FAILURE;
 }
 #else
-StatusCode TauRecToolBase::executePi0CreateROI(xAOD::TauJet& /*pTau*/, CaloCellContainer& /*caloCellContainer*/, std::vector<CaloCell*>& /*map*/ ) const {
+StatusCode TauRecToolBase::executePi0CreateROI(xAOD::TauJet& /*pTau*/, CaloCellContainer& /*caloCellContainer*/, boost::dynamic_bitset<>& /*map*/ ) const {
   ATH_MSG_ERROR("function not implemented");
   return StatusCode::FAILURE;
 }
diff --git a/Reconstruction/tauRecTools/src/TauPi0CreateROI.cxx b/Reconstruction/tauRecTools/src/TauPi0CreateROI.cxx
index 6611aea2e5f7..586d7b68d0d1 100644
--- a/Reconstruction/tauRecTools/src/TauPi0CreateROI.cxx
+++ b/Reconstruction/tauRecTools/src/TauPi0CreateROI.cxx
@@ -33,16 +33,13 @@ TauPi0CreateROI::~TauPi0CreateROI() {
 
 StatusCode TauPi0CreateROI::initialize() {
     
-    // retrieve tools
-    ATH_MSG_DEBUG( "Retrieving tools" );
-    
     ATH_CHECK( m_caloCellInputContainer.initialize() );
 
     return StatusCode::SUCCESS;
 }
 
 //______________________________________________________________________________
-StatusCode TauPi0CreateROI::executePi0CreateROI(xAOD::TauJet& pTau, CaloCellContainer& pPi0CellContainer, std::vector<CaloCell*>& addedCellsMap) const {
+StatusCode TauPi0CreateROI::executePi0CreateROI(xAOD::TauJet& pTau, CaloCellContainer& pPi0CellContainer, boost::dynamic_bitset<>& addedCellsMap) const {
 
     //---------------------------------------------------------------------
     // only run on 1-5 prong taus 
@@ -84,12 +81,11 @@ StatusCode TauPi0CreateROI::executePi0CreateROI(xAOD::TauJet& pTau, CaloCellCont
 
         // Store cell in output container
         const IdentifierHash cellHash = cell->caloDDE()->calo_hash();
-        bool isNewCell = (addedCellsMap.at(cellHash)==NULL);
 
-        if(isNewCell){
+	if(!addedCellsMap.test(cellHash)) {
             CaloCell* copyCell = cell->clone();
             pPi0CellContainer.push_back(copyCell);
-            addedCellsMap[cellHash] = copyCell;
+	    addedCellsMap.set(cellHash);
         }
     }
 
diff --git a/Reconstruction/tauRecTools/src/TauPi0CreateROI.h b/Reconstruction/tauRecTools/src/TauPi0CreateROI.h
index 61413ebbab5f..ee9e0ea640ae 100644
--- a/Reconstruction/tauRecTools/src/TauPi0CreateROI.h
+++ b/Reconstruction/tauRecTools/src/TauPi0CreateROI.h
@@ -7,6 +7,7 @@
 
 #include <string>
 #include <vector>
+#include <boost/dynamic_bitset.hpp>
 
 #include "GaudiKernel/ToolHandle.h"
 #include "tauRecTools/TauRecToolBase.h"
@@ -31,11 +32,10 @@ public:
     virtual ~TauPi0CreateROI();
 
     virtual StatusCode initialize() override;
-    virtual StatusCode executePi0CreateROI(xAOD::TauJet& pTau, CaloCellContainer& Pi0CellContainer, std::vector<CaloCell*>& map) const override;
+    virtual StatusCode executePi0CreateROI(xAOD::TauJet& pTau, CaloCellContainer& Pi0CellContainer, boost::dynamic_bitset<>& map) const override;
 
 private:
     SG::ReadHandleKey<CaloCellContainer> m_caloCellInputContainer{this,"Key_caloCellInputContainer", "AllCalo", "input vertex container key"};
-
 };
 
 #endif	/* TAUPI0CREATEROI_H */
diff --git a/Reconstruction/tauRecTools/tauRecTools/ITauToolBase.h b/Reconstruction/tauRecTools/tauRecTools/ITauToolBase.h
index 24c33d823fb3..17df4edfe2e3 100644
--- a/Reconstruction/tauRecTools/tauRecTools/ITauToolBase.h
+++ b/Reconstruction/tauRecTools/tauRecTools/ITauToolBase.h
@@ -6,13 +6,13 @@
 #define ITOOLBASE_TAU_H
 
 #include "AsgTools/IAsgTool.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 <boost/dynamic_bitset.hpp>
 
 #ifndef XAOD_ANALYSIS
 #include "CaloEvent/CaloCellContainer.h"
@@ -68,7 +68,7 @@ class ITauToolBase : virtual public asg::IAsgTool
   virtual StatusCode executeDev(xAOD::TauJet& pTau) = 0;
 #else
   // CaloCellContainer not available in AnalysisBase
-  virtual StatusCode executePi0CreateROI(xAOD::TauJet& pTau, CaloCellContainer& caloCellContainer, std::vector<CaloCell*>& map ) const = 0;
+  virtual StatusCode executePi0CreateROI(xAOD::TauJet& pTau, CaloCellContainer& caloCellContainer, boost::dynamic_bitset<>& map ) const = 0;
 #endif
   
   //-----------------------------------------------------------------
diff --git a/Reconstruction/tauRecTools/tauRecTools/TauRecToolBase.h b/Reconstruction/tauRecTools/tauRecTools/TauRecToolBase.h
index b762e5252867..b5d404ea695f 100644
--- a/Reconstruction/tauRecTools/tauRecTools/TauRecToolBase.h
+++ b/Reconstruction/tauRecTools/tauRecTools/TauRecToolBase.h
@@ -43,7 +43,7 @@ class TauRecToolBase : public asg::AsgTool, virtual public ITauToolBase {
 #ifdef XAOD_ANALYSIS
   virtual StatusCode executeDev(xAOD::TauJet& pTau) override;
 #else
-  virtual StatusCode executePi0CreateROI(xAOD::TauJet& pTau, CaloCellContainer& caloCellContainer, std::vector<CaloCell*>& map ) const override;
+  virtual StatusCode executePi0CreateROI(xAOD::TauJet& pTau, CaloCellContainer& caloCellContainer, boost::dynamic_bitset<>& map) const override;
 #endif
   virtual StatusCode executeVertexFinder(xAOD::TauJet& pTau, 
                                          const xAOD::VertexContainer* vertexContainer = nullptr, 
-- 
GitLab


From 6f5dec810ec14d12c21808b363794ee19dd20a36 Mon Sep 17 00:00:00 2001
From: sutt <sutt@cern.ch>
Date: Mon, 5 Oct 2020 22:14:02 +0200
Subject: [PATCH 212/403] Added some outstanding algorithms that needed to be
 modified

The RegSelTestAlg, TRTRawDataProvider and the RoIPEBInfoWriterTool were still accessing
the old RegSelSvc, the TRTRawDataPRovider was just overlooked, whereas the other two were
looping over the RegSelEnum to call the RegSelSvc on all the systems.

These have been fixed now.
---
 .../RegSelSvcTest/src/RegSelTestAlg.cxx       |    5 +-
 .../RegionSelector/src/RegSelSvc.cxx          |   19 +-
 .../RegionSelector/src/obsolete.h             |  178 --
 .../RegionSelector/src/obsolete.icc           | 1594 -----------------
 .../src/TRTRawDataProvider.cxx                |    5 +-
 .../src/TRTRawDataProvider.h                  |    5 +-
 .../share/InDetReadBS_jobOptions.py           |    4 +-
 .../python/TrigFastTrackFinder_Config.py      |    4 +-
 .../src/RoIPEBInfoWriterTool.cxx              |   58 +-
 .../src/RoIPEBInfoWriterTool.h                |   19 +-
 .../TrigInDetConfig/python/InDetPT.py         |    8 +
 .../src/TrigSpacePointConversionTool.cxx      |    7 +-
 .../src/TrigSpacePointConversionTool.h        |    4 +-
 .../TrigP1Test/share/PEBDSTest.py             |    8 +
 .../EventBuildingSequenceSetup.py             |    6 +
 15 files changed, 112 insertions(+), 1812 deletions(-)
 delete mode 100644 DetectorDescription/RegionSelector/src/obsolete.h
 delete mode 100644 DetectorDescription/RegionSelector/src/obsolete.icc

diff --git a/DetectorDescription/RegSelSvcTest/src/RegSelTestAlg.cxx b/DetectorDescription/RegSelSvcTest/src/RegSelTestAlg.cxx
index 0e29bb5d5601..1673c2949498 100644
--- a/DetectorDescription/RegSelSvcTest/src/RegSelTestAlg.cxx
+++ b/DetectorDescription/RegSelSvcTest/src/RegSelTestAlg.cxx
@@ -73,7 +73,7 @@ StatusCode RegSelTestAlg::dumpOne( const std::string& message, double eta, const
 StatusCode RegSelTestAlg::dump() const {
   // generate list of RoIs for ID 
   
-  CHECK( dumpOne("Inner Detector ", 2.5,  { PIXEL, SCT, TRT } ) ); 
+  //  CHECK( dumpOne("Inner Detector ", 2.5,  { PIXEL, SCT, TRT } ) ); 
   CHECK( dumpOne("Calorimeters ", 5., { LAR, TTEM, TTHEC, TILE, FCALEM, FCALHAD } ) );
   CHECK( dumpOne("Muons ", 5., { MDT, RPC, TGC, CSC } ) );
   return StatusCode::SUCCESS;
@@ -185,7 +185,8 @@ StatusCode RegSelTestAlg::mt() const {
   std::vector<ParallelCallTest*>  tests;
 
   
-  for ( auto detector: {PIXEL, SCT, TRT, LAR, TTEM, TTHEC, TILE, MDT, RPC, TGC, CSC, FCALEM, FCALHAD, FTK} ) {
+  //  for ( auto detector: {PIXEL, SCT, TRT, LAR, TTEM, TTHEC, TILE, MDT, RPC, TGC, CSC, FCALEM, FCALHAD, FTK} ) {
+  for ( auto detector: { LAR, TTEM, TTHEC, TILE, MDT, RPC, TGC, CSC, FCALEM, FCALHAD } ) {
     for ( auto& roi : rois ) {
       tests.push_back( new RoIReqTest( roi, detector, msg(), m_regSelSvc ) );
     }
diff --git a/DetectorDescription/RegionSelector/src/RegSelSvc.cxx b/DetectorDescription/RegionSelector/src/RegSelSvc.cxx
index 564a5ba1ec93..aa6c71ae682e 100755
--- a/DetectorDescription/RegionSelector/src/RegSelSvc.cxx
+++ b/DetectorDescription/RegionSelector/src/RegSelSvc.cxx
@@ -628,7 +628,7 @@ void RegSelSvc::getRoIData(DETID detectorID,
   case PIXEL: 
   case SCT:  
   case TRT:  { 
-    ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID" << detectorID );
+    ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID: " << detectorID );
     break;
   }
   case RPC: { // RPC (obviously)
@@ -703,7 +703,7 @@ void RegSelSvc::DetHashIDList(DETID detectorID,
   case PIXEL:
   case SCT:
   case TRT: { // TRT (obviously)
-    ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID" << detectorID );
+    ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID: " << detectorID );
     break;
   }
   case MDT: { // etc
@@ -803,7 +803,7 @@ void RegSelSvc::DetHashIDList(DETID detectorID, long layer,
   case PIXEL: 
   case SCT: 
   case TRT: { // TRT (obviously)
-    ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID" << detectorID );
+    ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID: " << detectorID );
     break;
   }
   case MDT: { 
@@ -886,7 +886,7 @@ void RegSelSvc::DetHashIDList(DETID detectorID,
   case PIXEL:
   case SCT:
   case TRT: { // TRT (obviously)
-    ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID" << detectorID );
+    ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID: " << detectorID );
     break;
   }
   case MDT: { 
@@ -969,7 +969,7 @@ void RegSelSvc::DetHashIDList(DETID detectorID, long layer,
   case PIXEL:
   case SCT:
   case TRT: { // TRT (obviously)
-    ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID" << detectorID );
+    ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID: " << detectorID );
     break;
   }
   case MDT: { 
@@ -1068,7 +1068,7 @@ void RegSelSvc::DetROBIDListUint(DETID detectorID,
   case PIXEL: 
   case SCT:
   case TRT: {  // TRT
-    ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID" << detectorID );
+    ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID: " << detectorID );
     break;
   }
   case MDT: { 
@@ -1169,7 +1169,7 @@ void RegSelSvc::DetROBIDListUint(DETID detectorID, long layer,
   case PIXEL: 
   case SCT: 
   case TRT: { // TRT
-    ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID" << detectorID );
+    ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID: " << detectorID );
     break;
   }
   case MDT: { 
@@ -1245,7 +1245,7 @@ void RegSelSvc::DetROBIDListUint(DETID detectorID,
   case PIXEL: 
   case SCT:
   case TRT: {  // TRT
-    ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID" << detectorID );
+    ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID: " << detectorID );
     break;
   }
   case MDT: { 
@@ -1314,8 +1314,7 @@ void RegSelSvc::DetROBIDListUint(DETID detectorID, long layer,
   case PIXEL: 
   case SCT: 
   case TRT: { // TRT
-    if ( m_newtrt ) m_newtrt->getRobList( layer, outputROBIDList ); 
-    ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID" << detectorID );
+    ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID: " << detectorID );
     break;
   }
   case MDT: { 
diff --git a/DetectorDescription/RegionSelector/src/obsolete.h b/DetectorDescription/RegionSelector/src/obsolete.h
deleted file mode 100644
index 35d3604ff244..000000000000
--- a/DetectorDescription/RegionSelector/src/obsolete.h
+++ /dev/null
@@ -1,178 +0,0 @@
-// emacs: this is -*- c++ -*-
-
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-///////////////////////////////////////////////////////////////////////
-/// obsolete methods DO NOT USE
-///////////////////////////////////////////////////////////////////////
-
-
-public:
-
-  /// obsolete HashID methods
-
-  void DetHashIDList(DETID detectorID, 
-		     double etaMin, double etaMax,
-		     double phiMin, double phiMax, 
-		     std::vector<IdentifierHash>* IDList );
-
-  // inner detector 
-  void DetHashIDList(DETID detectorID,
-		     double zMin,   double zMax,
-		     double etaMin, double etaMax,
-		     double phiMin, double phiMax, 
-		     std::vector<IdentifierHash>* IDList);
-
-
-  void DetHashIDList(DETID detectorID,
-		     double zMin,   double zMax,
-		     double etaMin, double etaMax,
-		     double phiMin, double phiMax, 
-		     double xBeam,  double yBeam,
-		     std::vector<IdentifierHash>* IDList);
-
-
-  void DetHashIDList(DETID detectorID,
-		     const IRoiDescriptor& roi,
-		     std::vector<IdentifierHash>* IDList);
-
-  // inner detector layer
-  void DetHashIDList(DETID detectorID, long layer, 
-		     double zMin,   double zMax,
-		     double etaMin, double etaMax,
-		     double phiMin, double phiMax,
-		     std::vector<IdentifierHash>* IDList);
-
-  void DetHashIDList(DETID detectorID, long layer,
-		     const IRoiDescriptor& roi,
-		     std::vector<IdentifierHash>* IDList);
-
-  // inner detector full scan
-  void DetHashIDList(DETID detectorID, 
-		     std::vector<IdentifierHash>* IDList );
-
-  // calorimeter 
-  void DetHashIDList(DETID detectorID, long sampling, 
-		     double etaMin, double etaMax,
-		     double phiMin, double phiMax,
-		     std::vector<IdentifierHash>* IDList);
-				
-  // muon
-  void DetHashIDList(DETID detectorID, TYPEID typeID, 
-		     double etaMin, double etaMax,
-		     double phiMin, double phiMax, 
-		     std::vector<IdentifierHash>* IDList);
-	
-
-
-  /// obsolete rob identifier methods
-	    
-  void DetROBIDListUint(DETID detectorID, 
-			double etaMin,double etaMax,
-			double phiMin, double phiMax, 
-			std::vector<uint32_t>& outputROBIDList);
-				
-  // inner detector  
-  void DetROBIDListUint(DETID detectorID,
-			double zMin,   double zMax,
-			double etaMin, double etaMax,
-			double phiMin, double phiMax, 
-			std::vector<uint32_t>& outputROBIDList);
-
-
-  void DetROBIDListUint(DETID detectorID,
-			double zMin,   double zMax,
-			double etaMin, double etaMax,
-			double phiMin, double phiMax, 
-			double xBeam,  double yBeam,
-			std::vector<uint32_t>& outputROBIDList);
-
-
-  // inner detector by layer 
-  void DetROBIDListUint(DETID detectorID, long layer, 
-			double zMin,   double zMax,
-			double etaMin, double etaMax,
-			double phiMin, double phiMax, 
-			std::vector<uint32_t>& outputROBIDList);
-
-
-
-  // calorimeter
-  void DetROBIDListUint(DETID detectorID, long sampling, 
-			double etaMin, double etaMax,
-			double phiMin, double phiMax, 
-			std::vector<uint32_t>& outputROBIDList);
-
-
-
-
-
-  // Combined inner detector rob id and hash id methods
- 
-  void DetROBHashIDList(DETID detectorID,
-			double zMin,   double zMax,
-			double etaMin, double etaMax,
-			double phiMin, double phiMax, 
-			std::vector<uint32_t>&       outputROBIDList,
-			std::vector<IdentifierHash>* IDList );
-
-  void DetROBHashIDList(DETID detectorID, 
-			const IRoiDescriptor& roi,
-			std::vector<uint32_t>&       outputROBIDList,
-			std::vector<IdentifierHash>* IDList);
-
-
-  // inner detector layer
-  void DetROBHashIDList(DETID detectorID, long layer, 
-			double zMin,   double zMax,
-			double etaMin, double etaMax,
-			double phiMin, double phiMax,
-			std::vector<uint32_t>&       outputROBIDList,
-			std::vector<IdentifierHash>* IDList);
-
-  void DetROBHashIDList(DETID detectorID, long layer, 
-			const IRoiDescriptor& roi, 
-			std::vector<uint32_t>&       outputROBIDList,
-			std::vector<IdentifierHash>* IDList);
-
-  // inner detector full scan
-  void DetROBHashIDList(DETID detectorID, 
-			std::vector<uint32_t>&       outputROBIDList,
-			std::vector<IdentifierHash>* IDList );
-
-
-
-
-
-
-  // Find disabled inner detector modules from a layer
-  void DetDisabledHashIDList(DETID detectorID, long layer, 
-			     double zMin,   double zMax,
-			     double etaMin, double etaMax,
-			     double phiMin, double phiMax,
-			     std::vector<IdentifierHash>* IDList);
-
-#if 0
-  void DetDisabledHashIDList(DETID detectorID, long layer, 
-			     const IRoiDescriptor& roi,
-			     std::vector<IdentifierHash>* IDList);
-#endif
-
-
-  void getDisabledLayers(DETID detectorID, 
-			 int subdetector,
-			 double zMin,   double zMax,
-			 double etaMin, double etaMax,
-			 double phiMin, double phiMax,
-			 std::vector<int>& layers);
-
-  void getDisabledLayers(DETID detectorID, 
-			 double zMin,   double zMax,
-			 double etaMin, double etaMax,
-			 double phiMin, double phiMax,
-			 std::vector<int>& barrellayers, 
-			 std::vector<int>& endAlayers, 
-			 std::vector<int>& endClayers );
-	      
diff --git a/DetectorDescription/RegionSelector/src/obsolete.icc b/DetectorDescription/RegionSelector/src/obsolete.icc
deleted file mode 100644
index dea79b16ab50..000000000000
--- a/DetectorDescription/RegionSelector/src/obsolete.icc
+++ /dev/null
@@ -1,1594 +0,0 @@
-// emacs: this is -*- c++ -*-
-
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-///////////////////////////////////////////////////////////////////////
-/// obsolete HashID methods
-///////////////////////////////////////////////////////////////////////
-
-
-// calorimeter
-
-void RegSelSvc::DetROBIDListUint(DETID detectorID, 
-				 long sampling, 
-				 double etaMin, double etaMax,
-				 double phiMin, double phiMax, 
-				 std::vector<uint32_t>& outputROBIDList) {
-
-  static bool first = true;
-  if ( first ) { 
-    first = false;
-    (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg;	
-  }
-
-  if(m_msgOutputLevel <= MSG::DEBUG && outputROBIDList.size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " input outputROBIDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  outputROBIDList.clear();
-
-  if ( !checkinput(etaMin, etaMax, phiMin, phiMax) ) { 
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" 
-	       << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax 
-	       << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg;
-    
-    return;
-  }
-
-
-  switch(detectorID){
-  case PIXEL: 
-  case SCT:   
-    return DetROBIDListUint(detectorID, sampling, -m_DeltaZ, m_DeltaZ, etaMin, etaMax, phiMin, phiMax, outputROBIDList); 
-    break;
-  case TRT:   
-    break;
-  case LAR: // Liquid Argon Calorimeter
-    verifyInputs(LAR, etaMin, etaMax, phiMin, phiMax);
-    m_larData.regionSelectorRobIdUint(sampling, etaMin, etaMax, phiMin, phiMax, outputROBIDList);
-    //log<< MSG::DEBUG << "LAR verifyOutput" << endmsg; larData.verifyOutput(ROBID, sampling, etaMin, etaMax, phiMin, phiMax,outputROBIDList);
-    break;
-  case TTEM: // Liquid Argon Trigger Tower EM Calorimeter
-    verifyInputs(TTEM, etaMin, etaMax, phiMin, phiMax);
-    m_ttemData.regionSelectorRobIdUint(sampling, etaMin, etaMax, phiMin, phiMax, outputROBIDList);
-    //log<< MSG::DEBUG << "TTEM verifyOutput" << endmsg; ttemData.verifyOutput(ROBID, sampling, etaMin, etaMax, phiMin, phiMax,outputROBIDList);
-    break;
-  case TTHEC: // Liquid Argon Trigger Tower HEC Calorimeter
-    verifyInputs(TTHEC, etaMin, etaMax, phiMin, phiMax);
-    m_tthecData.regionSelectorRobIdUint(sampling, etaMin, etaMax, phiMin, phiMax, outputROBIDList);
-    //log<< MSG::DEBUG << "TTHEC verifyOutput" << endmsg; tthecData.verifyOutput(ROBID, sampling, etaMin, etaMax, phiMin, phiMax,outputROBIDList);
-    break;
-  case FCALEM: // Liquid Argon Trigger Tower FCALEM Calorimeter
-    verifyInputs(FCALEM, etaMin, etaMax, phiMin, phiMax);
-    m_ttfcalemData.regionSelectorRobIdUint(sampling, etaMin, etaMax, phiMin, phiMax, outputROBIDList);
-    //log<< MSG::DEBUG << "FCALEM verifyOutput" << endmsg; ttfcalemData.verifyOutput(ROBID, sampling, etaMin, etaMax, phiMin, phiMax,outputROBIDList);
-    break;
-  case FCALHAD: // Liquid Argon Trigger Tower FCALHAD Calorimeter
-    verifyInputs(FCALHAD, etaMin, etaMax, phiMin, phiMax);
-    m_ttfcalhadData.regionSelectorRobIdUint(sampling, etaMin, etaMax, phiMin, phiMax, outputROBIDList);
-    //log<< MSG::DEBUG << "FCALHAD verifyOutput" << endmsg; ttfcalhadData.verifyOutput(ROBID, sampling, etaMin, etaMax, phiMin, phiMax,outputROBIDList);
-    break;
-  case TILE: // Tile Calorimeters
-    break;
-  case MDT: // MDT Calorimeter
-    break;
-  case RPC: // RPC Calorimeters
-    break;
-  case TGC: // TGC Calorimeters
-    break;
-  case CSC: // CSC Calorimeters
-    break;
-  default:
-    break;
-  }
-
-  if(m_msgOutputLevel <= MSG::DEBUG){
-    (*m_log) << MSG::DEBUG << "DetROBIDListUint for detector " << detectorID 
-	<< " got " << outputROBIDList.size() << " ROB IDs" << endmsg;
-  }
-
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-// Combiner inner detector rob id and hash id methods
-
-void RegSelSvc::DetROBHashIDList(DETID detectorID,
-				 double zMin,   double zMax,
-				 double etaMin, double etaMax,
-				 double phiMin, double phiMax,
-				 std::vector<uint32_t>&      outputROBIDList,
-				 std::vector<IdentifierHash> *IDList) 
-{
-
-  static bool first = true;
-  if ( first ) { 
-    first = false;
-    (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg;	
-  }
-
-  //  std::cout << "RegSelSvc::DetROBHashIDList() new map " << detectorID << std::endl; 
-
-  //  if(m_msgOutputLevel <= MSG::WARNING ) 
-  //    (*m_log) << MSG::WARNING << " This method is obsolete - please replace" << endmsg;
-
-
-  if(m_msgOutputLevel <= MSG::DEBUG && outputROBIDList.size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " input outputROBIDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  outputROBIDList.clear();
-
-  if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  IDList->clear();
-
-  if ( !checkinput(zMin, zMax, etaMin, etaMax, phiMin, phiMax) ) { 
-    (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" 
-	     <<    "zMin=" <<   zMin <<   "\tzMax=" <<   zMax 
-	     << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax 
-	     << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg;
-    
-    return;
-  }
-
-  RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax );
-
-  switch(detectorID){
-  case PIXEL: { // Pixel    
-    if ( m_newpixel ) m_newpixel->getRobHashList(roi, outputROBIDList, *IDList); 
-    break;
-  }
-  case SCT: { // Semiconductor Tracker (and pixel)
-    if ( m_newsct ) m_newsct->getRobHashList(roi, outputROBIDList, *IDList); 
-    break;
-  }
-  case TRT: { // TRT (obviously)
-    if ( m_newtrt ) m_newtrt->getRobHashList(roi, outputROBIDList, *IDList); 
-    break;
-  }
-  default:
-    break;
-  }
-
-  if(m_msgOutputLevel <= MSG::DEBUG){
-    (*m_log) << MSG::DEBUG << "DetROBHashIDList for detector " << detectorID 
-	<< " got " << IDList->size() << " hash IDs" << endmsg;
-  }
-
-}
-
-
-
-#if 1
-void RegSelSvc::DetROBHashIDList(DETID detectorID,
-				 const IRoiDescriptor& roi,
-				 std::vector<uint32_t>&      outputROBIDList,
-				 std::vector<IdentifierHash> *IDList) 
-{
-  //  std::cout << "RegSelSvc::DetROBHashIDList() new map " << detectorID << std::endl; 
-
-  static bool first = true;
-  if ( first ) { 
-    first = false;
-    (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg;	
-  }
-
-  if(m_msgOutputLevel <= MSG::DEBUG && outputROBIDList.size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " input outputROBIDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  outputROBIDList.clear();
-
-  if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  IDList->clear();
-
-  RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), 
-		  roi.phiMinus(), roi.phiPlus(),
-		  roi.etaMinus(), roi.etaPlus() );
-
-  switch(detectorID){
-  case PIXEL: { // Pixel    
-    if ( m_newpixel ) m_newpixel->getRobHashList(_roi, outputROBIDList, *IDList); 
-    break;
-  }
-  case SCT: { // Semiconductor Tracker (and pixel)
-    if ( m_newsct ) m_newsct->getRobHashList(_roi, outputROBIDList, *IDList); 
-    break;
-  }
-  case TRT: { // TRT (obviously)
-    if ( m_newtrt ) m_newtrt->getRobHashList(_roi, outputROBIDList, *IDList); 
-    break;
-  }
-  default:
-    break;
-  }
-
-  if(m_msgOutputLevel <= MSG::DEBUG){
-    (*m_log) << MSG::DEBUG << "DetROBHashIDList for detector " << detectorID 
-	<< " got " << IDList->size() << " hash IDs" << endmsg;
-  }
-
-}
-#endif
-
-
-
-
-// inner detector by layer  
-
-void RegSelSvc::DetROBHashIDList(DETID detectorID, long layer,
-				 double zMin,   double zMax,
-				 double etaMin, double etaMax,
-				 double phiMin, double phiMax,
-				 std::vector<uint32_t>&      outputROBIDList,
-				 std::vector<IdentifierHash> *IDList) 
-{
-  
-  static bool first = true;
-  if ( first ) { 
-    first = false;
-    (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg;	
-  }
-
-  //  std::cout << "RegSelSvc::DetROBHashIDList() new map " << detectorID << std::endl; 
-
-  if(m_msgOutputLevel <= MSG::DEBUG && outputROBIDList.size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " input outputROBIDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  outputROBIDList.clear();
-
-  if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  IDList->clear();
-
-  if ( !checkinput(zMin, zMax, etaMin, etaMax, phiMin, phiMax) ) { 
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" 
-	       <<    "zMin=" <<   zMin <<   "\tzMax=" <<   zMax 
-	       << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax 
-	       << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg;
-    
-    return;
-  }
-
-  RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax );
-
-  switch(detectorID){
-  case PIXEL: { // Pixel    
-    if ( m_newpixel ) m_newpixel->getRobHashList(roi, layer, outputROBIDList, *IDList); 
-    break;
-  }
-  case SCT: { // Semiconductor Tracker (and pixel)
-     if ( m_newsct ) m_newsct->getRobHashList(roi, layer, outputROBIDList, *IDList); 
-    break;
-  }
-  case TRT: { // TRT (obviously)
-     if ( m_newtrt ) m_newtrt->getRobHashList(roi, layer, outputROBIDList, *IDList); 
-    break;
-  }
-  default:
-    break;
-  }
-
-  if(m_msgOutputLevel <= MSG::DEBUG){
-    (*m_log) << MSG::DEBUG << "DetROBHashIDList for detector " << detectorID 
-	<< " got " << IDList->size() << " hash IDs" << endmsg;
-  }
-
-}
-
-
-#if 1
-void RegSelSvc::DetROBHashIDList(DETID detectorID, long layer,
-				 const IRoiDescriptor& roi, 
-				 std::vector<uint32_t>&      outputROBIDList,
-				 std::vector<IdentifierHash> *IDList) 
-{
-
-  static bool first = true;
-  if ( first ) { 
-    first = false;
-    (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg;	
-  }
-
-  //  std::cout << "RegSelSvc::DetROBHashIDList() new map " << detectorID << std::endl; 
-
-
-  if(m_msgOutputLevel <= MSG::DEBUG && outputROBIDList.size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " input outputROBIDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  outputROBIDList.clear();
-
-  if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  IDList->clear();
-
-  RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), 
-		  roi.phiMinus(), roi.phiPlus(),
-		  roi.etaMinus(), roi.etaPlus() );
-
-
-  switch(detectorID){
-  case PIXEL: { // Pixel    
-    if ( m_newpixel ) m_newpixel->getRobHashList(_roi, layer, outputROBIDList, *IDList); 
-    break;
-  }
-  case SCT: { // Semiconductor Tracker (and pixel)
-    if ( m_newsct ) m_newsct->getRobHashList(_roi, layer, outputROBIDList, *IDList); 
-    break;
-  }
-  case TRT: { // TRT (obviously)
-    if ( m_newtrt ) m_newtrt->getRobHashList(_roi, layer, outputROBIDList, *IDList); 
-    break;
-  }
-  default:
-    break;
-  }
-
-  if(m_msgOutputLevel <= MSG::DEBUG){
-    (*m_log) << MSG::DEBUG << "DetROBHashIDList for detector " << detectorID 
-	<< " got " << IDList->size() << " hash IDs" << endmsg;
-  }
-
-}
-#endif
-
-
-
-// inner detector full scan
-
-void RegSelSvc::DetROBHashIDList(DETID detectorID, 
-				 std::vector<uint32_t>&       outputROBIDList,
-				 std::vector<IdentifierHash>* IDList ) 
-{ 
-
-  static bool first = true;
-  if ( first ) { 
-    first = false;
-    (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg;	
-  }
-
-  if(m_msgOutputLevel <= MSG::DEBUG && outputROBIDList.size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " input outputROBIDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  outputROBIDList.clear();
-
-  if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  IDList->clear();
-
-  switch (detectorID) {
-  case PIXEL: { // Pixel
-    if ( m_newpixel ) m_newpixel->getRobHashList(outputROBIDList, *IDList); 
-    break;
-  }
-  case SCT: {  // SCT
-    if ( m_newsct ) m_newsct->getRobHashList(outputROBIDList, *IDList); 
-    break;
-  }
-  case TRT: {  // TRT
-    if ( m_newtrt ) m_newtrt->getRobHashList(outputROBIDList, *IDList); 
-    break;
-  }
-  default:
-    break;
-  }
-} 
-
-
-
-
-
-
-
-
-
-
-
-
-// methods to return the list of disabled modules from the inner 
-// within and roi in a given layer
-
-void RegSelSvc::DetDisabledHashIDList(DETID detectorID, long layer, 
-				      double zMin,   double zMax,
-				      double etaMin, double etaMax,
-				      double phiMin, double phiMax,
-				      std::vector<IdentifierHash>* IDList) 
-{ 
-
-  static bool first = true;
-  if ( first ) { 
-    first = false;
-    (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg;	
-  }
-
-  //  std::cout << "RegSelSvc::DetDisabledHashIDList() new map " << detectorID << std::endl; 
-
-  if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  IDList->clear();
-
-  if ( !checkinput(zMin, zMax, etaMin, etaMax, phiMin, phiMax) ) { 
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" 
-	       <<    "zMin=" <<   zMin <<   "\tzMax=" <<   zMax 
-	       << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax 
-	       << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg;
-    
-    return;
-  }
-
-  RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax );
-   
-  switch(detectorID){
-  case PIXEL: { // Pixel    
-    if ( m_newpixel ) m_newpixel->getDisabledHashList(roi, layer, *IDList); 
-    break;
-  }
-  case SCT: { // Semiconductor Tracker (and pixel)
-    if ( m_newsct ) m_newsct->getDisabledHashList(roi, layer, *IDList); 
-    break;
-  }
-  case TRT: { // TRT (obviously)
-    if ( m_newtrt ) m_newtrt->getDisabledHashList(roi, layer, *IDList); 
-    break;
-  }
-  default:
-    break;
-  }
-
-  if(m_msgOutputLevel <= MSG::DEBUG){
-    (*m_log) << MSG::DEBUG << "DetDisabledHashIDList for detector " << detectorID 
-	<< " got " << IDList->size() << " hash IDs" << endmsg;
-  }
-  
-}
-
-
-
-
-void RegSelSvc::getDisabledLayers(DETID detectorID, 
-				  int subdetector, 
-				  double zMin,   double zMax,
-				  double etaMin, double etaMax,
-				  double phiMin, double phiMax,
-				  std::vector<int>& layers) 
-{ 
-
-  static bool first = true;
-  if ( first ) { 
-    first = false;
-    (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg;	
-  }
-
-  if(m_msgOutputLevel <= MSG::DEBUG && layers.size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " input layers vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  layers.clear();
-
-  if ( !checkinput(zMin, zMax, etaMin, etaMax, phiMin, phiMax) ) { 
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" 
-	       <<    "zMin=" <<   zMin <<   "\tzMax=" <<   zMax 
-	       << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax 
-	       << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg;
-    
-    return;
-  }
-
-  RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax );
-
-  switch(detectorID){
-  case PIXEL: { // Pixel    
-    if ( m_newpixel ) m_newpixel->getDisabledLayers(roi, subdetector, layers); 
-    break;
-  }
-  case SCT: { // Semiconductor Tracker (and pixel)
-    if ( m_newsct ) m_newsct->getDisabledLayers(roi, subdetector, layers); 
-    break;
-  }
-  default:
-    break;
-  }
-
-} 
-
-
-
-void RegSelSvc::getDisabledLayers(DETID detectorID, 
-				  double zMin,   double zMax,
-				  double etaMin, double etaMax,
-				  double phiMin, double phiMax,
-				  std::vector<int>& barrellayers,
-				  std::vector<int>& endAlayers,
-				  std::vector<int>& endClayers)
-{
-
-  static bool first = true;
-  if ( first ) { 
-    first = false;
-    (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg;	
-  }
-
-  if(m_msgOutputLevel <= MSG::DEBUG && barrellayers.size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " input barrellayers vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  barrellayers.clear();
-
-
-  if(m_msgOutputLevel <= MSG::DEBUG && endAlayers.size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " input endAlayers vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  endAlayers.clear();
- 
-  if(m_msgOutputLevel <= MSG::DEBUG && endClayers.size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " input endClayers vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  endClayers.clear();
- 
-  if ( !checkinput(zMin, zMax, etaMin, etaMax, phiMin, phiMax) ) { 
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" 
-	       <<    "zMin=" <<   zMin <<   "\tzMax=" <<   zMax 
-	       << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax 
-	       << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg;
-    
-    return;
-  }
-
-  RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax );
-
-  switch(detectorID){
-  case PIXEL: { // Pixel    
-    if ( m_newpixel ) { 
-      m_newpixel->getDisabledLayers(roi,  0, barrellayers); 
-      m_newpixel->getDisabledLayers(roi, -2, endAlayers); 
-      m_newpixel->getDisabledLayers(roi,  2, endClayers); 
-    }
-    break;
-  }
-  case SCT: { // Semiconductor Tracker (and pixel)
-    if ( m_newsct ) { 
-      m_newsct->getDisabledLayers(roi,  0, barrellayers); 
-      m_newsct->getDisabledLayers(roi, -2, endAlayers); 
-      m_newsct->getDisabledLayers(roi,  2, endClayers);    
-    }  
-    break;
-  }
-  default:
-    break;
-  }
-
-} 
-
-
-
-
-
-#if 0
-void RegSelSvc::DetDisabledHashIDList(DETID detectorID, long layer, 
-				      const IRoiDescriptor& roi, 
-				      std::vector<IdentifierHash>* IDList) 
-{ 
-  //  std::cout << "RegSelSvc::DetDisabledHashIDList() new map " << detectorID << std::endl; 
-
-  if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  IDList->clear();
-
-  RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), 
-		  roi.phiMinus(), roi.phiPlus(),
-		  roi.etaMinus(), roi.etaPlus() );
-
-
-  switch(detectorID){
-  case PIXEL: { // Pixel    
-    if ( m_newpixel ) m_newpixel->getDisabledHashList(_roi, layer, *IDList); 
-    break;
-  }
-  case SCT: { // Semiconductor Tracker (and pixel)
-    if ( m_newsct ) m_newsct->getDisabledHashList(_roi, layer, *IDList); 
-    break;
-  }
-  case TRT: { // TRT (obviously) 
-    if ( m_newtrt ) m_newtrt->getDisabledHashList(_roi, layer, *IDList); 
-    break;
-  }
-  default:
-    break;
-  }
-
-  if(m_msgOutputLevel <= MSG::DEBUG){
-    (*m_log) << MSG::DEBUG << "DetDisabledHashIDList for detector " << detectorID 
-	<< " got " << IDList->size() << " hash IDs" << endmsg;
-  }
-  
-}
-#endif
-
-
-
-
-
-// old Region Selector interface
-
-void RegSelSvc::DetHashIDList(DETID detectorID, 
-			      double etaMin,double etaMax,
-			      double phiMin, double phiMax, 
-			      std::vector<IdentifierHash>* IDList) {
-
-  static bool first = true;
-  if ( first ) { 
-    first = false;
-    (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg;	
-  }
-
-  //  if(m_msgOutputLevel <= MSG::WARNING ) 
-  //   (*m_log) << MSG::WARNING << " THIS METHOD IS OBSOLETE - PLEASE REPLACE" << endmsg; 
-
-
-  if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  IDList->clear();
-  
-  if ( !checkinput(etaMin, etaMax, phiMin, phiMax) ) { 
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" 
-	       << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax 
-	       << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg;
-    
-    return;
-  }
-  
-  switch(detectorID){
-  case PIXEL: 
-  case SCT:   
-  case TRT:   
-  case MDT:   
-  case RPC:   
-  case TGC:   
-  case CSC:   
-    return DetHashIDList(detectorID, -m_DeltaZ, m_DeltaZ, etaMin, etaMax, phiMin, phiMax, IDList); 
-    break;
-  case LAR:  // Liquid Argon Calorimeter
-    verifyInputs(LAR, etaMin, etaMax, phiMin, phiMax);
-    m_larData.regionSelector(etaMin, etaMax, phiMin, phiMax,(*IDList));
-    //log<< MSG::DEBUG << "LAR hashID verifyOutput" << endmsg; larDataIdentHash.verifyOutput(etaMin, etaMax, phiMin, phiMax,IDList);
-    break;
-  case TTEM: // Liquid Argon Trigger Tower EM Calorimeter
-    verifyInputs(TTEM, etaMin, etaMax, phiMin, phiMax);
-    m_ttemData.regionSelector(etaMin, etaMax, phiMin, phiMax,(*IDList));
-    //log<< MSG::DEBUG << "TTEM hashID verifyOutput" << endmsg;  ttemDataIdentHash.verifyOutput(etaMin, etaMax, phiMin, phiMax,IDList);
-    break;
-  case TTHEC: // Liquid Argon Trigger Tower HEC Calorimeter
-    verifyInputs(TTHEC, etaMin, etaMax, phiMin, phiMax);
-    m_tthecData.regionSelector(etaMin, etaMax, phiMin, phiMax,(*IDList));
-    //log<< MSG::DEBUG << "TTHEC hashID verifyOutput" << endmsg; tthecDataIdentHash.verifyOutput(etaMin, etaMax, phiMin, phiMax,IDList);
-    break;
-  case FCALEM: // Liquid Argon Trigger Tower HEC Calorimeter
-    verifyInputs(FCALEM, etaMin, etaMax, phiMin, phiMax);
-    m_ttfcalemData.regionSelector(etaMin, etaMax, phiMin, phiMax,(*IDList));
-    //log<< MSG::DEBUG << "TTHEC hashID verifyOutput" << endmsg; ttfcalemDataIdentHash.verifyOutput(etaMin, etaMax, phiMin, phiMax,IDList);
-    break;
-  case FCALHAD: // Liquid Argon Trigger Tower HEC Calorimeter
-    verifyInputs(FCALHAD, etaMin, etaMax, phiMin, phiMax);
-    m_ttfcalhadData.regionSelector(etaMin, etaMax, phiMin, phiMax,(*IDList));
-    //log<< MSG::DEBUG << "TTHEC hashID verifyOutput" << endmsg; ttfcalhadDataIdentHash.verifyOutput(etaMin, etaMax, phiMin, phiMax,IDList);
-    break;
-  case TILE: // Tile Calorimeters
-    verifyInputs(TILE, etaMin, etaMax, phiMin, phiMax);
-    m_tileData.regionSelector(TILE,etaMin, etaMax, phiMin, phiMax,(*IDList));
-    break;
-  default:
-    break;
-  }
-
-  if(m_msgOutputLevel <= MSG::DEBUG){
-    (*m_log) << MSG::DEBUG << "DetHashIDList for detector " << detectorID 
-	<< " got " << IDList->size() << " hash IDs" << endmsg;
-  }
-
-}
-
-
-
-
-
-// detector with new lookup tables
-
-void RegSelSvc::DetHashIDList(DETID detectorID,
-			      double zMin,   double zMax,
-			      double etaMin, double etaMax,
-			      double phiMin, double phiMax,
-			      std::vector<IdentifierHash> *IDList) 
-{
-
-  static bool first = true;
-  if ( first ) { 
-    first = false;
-    (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg;	
-  }
-
-  //  if(m_msgOutputLevel <= MSG::WARNING ) 
-  //    (*m_log) << MSG::WARNING << " THIS METHOD IS OBSOLETE - PLEASE REPLACE" << endmsg; 
-
-  //  std::cout << "RegSelSvc::DetHashIDList() new map " << detectorID << std::endl; 
-
-  if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING )       
-      (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  IDList->clear();
-
-  if ( !checkinput(zMin, zMax, etaMin, etaMax, phiMin, phiMax) ) { 
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" 
-	       <<    "zMin=" <<   zMin <<   "\tzMax=" <<   zMax 
-	       << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax 
-	       << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg;
-    
-    return;
-  }
-
-  RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax );
-
-
-  switch(detectorID){
-  case PIXEL: { // Pixel    
-    if ( m_newpixel ) m_newpixel->getHashList(roi, *IDList); 
-    break;
-  }
-  case SCT: { // Semiconductor Tracker (and pixel)
-    if ( m_newsct ) m_newsct->getHashList(roi, *IDList); 
-    break;
-  }
-  case TRT: { // TRT (obviously)
-    if ( m_newtrt ) m_newtrt->getHashList(roi, *IDList); 
-    break;
-  }
-  case RPC: { // RPC (obviously)
-    if ( m_newrpc ) m_newrpc->getHashList(roi, *IDList); 
-    break;
-  }
-  case MDT: { // MDT (obviously)
-    if ( m_newmdt ) m_newmdt->getHashList(roi, *IDList); 
-    break;
-  }
-  case TGC: { // TGC (obviously)
-    if ( m_newtgc ) m_newtgc->getHashList(roi, *IDList); 
-    break;
-  }
-  case CSC: { // CSC (obviously)
-    if ( m_newcsc ) m_newcsc->getHashList(roi, *IDList); 
-    break;
-  }
-  default:
-    break;
-  }
-
-  if(m_msgOutputLevel <= MSG::DEBUG){
-    (*m_log) << MSG::DEBUG << "DetHashIDList for detector " << detectorID 
-	<< " got " << IDList->size() << " hash IDs" << endmsg;
-  }
-
-}
-
-
-
-
-
-
-void RegSelSvc::DetHashIDList(DETID detectorID,
-			      double zMin,   double zMax,
-			      double etaMin, double etaMax,
-			      double phiMin, double phiMax, 
-			      double xBeam,  double yBeam, 
-			      std::vector<IdentifierHash> *IDList) 
-{
-
-  static bool first = true;
-  if ( first ) { 
-    first = false;
-    (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg;	
-  }
-
-  //  if(m_msgOutputLevel <= MSG::WARNING ) 
-  //    (*m_log) << MSG::WARNING << " THIS METHOD IS OBSOLETE - PLEASE REPLACE" << endmsg; 
-
-  //  std::cout << "RegSelSvc::DetHashIDList() new map " << detectorID << std::endl; 
-
-  if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  IDList->clear();
-
-  if ( !checkinput(zMin, zMax, etaMin, etaMax, phiMin, phiMax) ) { 
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" 
-	       <<    "zMin=" <<   zMin <<   "\tzMax=" <<   zMax 
-	       << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax 
-	       << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg;
-    
-    return;
-  }
-
-  RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax );
-
-  switch(detectorID){
-  case PIXEL: { // Pixel    
-    if ( m_newpixel ) m_newpixel->getHashList(roi, *IDList, xBeam, yBeam ); 
-    break;
-  }
-  case SCT: { // Semiconductor Tracker (and pixel)
-    if ( m_newsct ) m_newsct->getHashList(roi, *IDList, xBeam, yBeam ); 
-    break;
-  }
-  case TRT: { // TRT (obviously)
-    if ( m_newtrt ) m_newtrt->getHashList(roi, *IDList, xBeam, yBeam ); 
-    break;
-  }
-  case MDT: { 
-    if ( m_newmdt ) m_newmdt->getHashList(roi, *IDList, xBeam, yBeam ); 
-    break;
-  }
-  case RPC: { 
-    if ( m_newrpc ) m_newrpc->getHashList(roi, *IDList, xBeam, yBeam ); 
-    break;
-  }
-  case TGC: { 
-    if ( m_newtgc ) m_newtgc->getHashList(roi, *IDList, xBeam, yBeam ); 
-    break;
-  }
-  case CSC: { 
-    if ( m_newcsc ) m_newcsc->getHashList(roi, *IDList, xBeam, yBeam ); 
-    break;
-  }
-  default:
-    break;
-  }
-
-  if(m_msgOutputLevel <= MSG::DEBUG){
-    (*m_log) << MSG::DEBUG << "DetHashIDList for detector " << detectorID 
-	<< " got " << IDList->size() << " hash IDs" << endmsg;
-  }
-
-}
-
-
-
-#if 1
-void RegSelSvc::DetHashIDList(DETID detectorID,
-			      const IRoiDescriptor& roi,
-			      std::vector<IdentifierHash> *IDList) 
-{
-
-  static bool first = true;
-  if ( first ) { 
-    first = false;
-    (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg;	
-  }
-
-  if ( roi.isFullscan() ) return DetHashIDList( detectorID, IDList );
-
-  //  std::cout << "RegSelSvc::DetHashIDList() new map " << detectorID << std::endl; 
-
-  //  if(m_msgOutputLevel <= MSG::WARNING ) 
-  //    (*m_log) << MSG::WARNING << " THIS METHOD IS OBSOLETE - PLEASE REPLACE" << endmsg; 
-
-
-  if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  IDList->clear();
-
-  RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), 
-		  roi.phiMinus(), roi.phiPlus(),
-		  roi.etaMinus(), roi.etaPlus() );
-
-
-  switch(detectorID){
-  case PIXEL: { // Pixel    
-    if ( m_newpixel ) m_newpixel->getHashList(_roi, *IDList); 
-    break;
-  }
-  case SCT: { // Semiconductor Tracker (and pixel)
-    if ( m_newsct ) m_newsct->getHashList(_roi, *IDList); 
-    break;
-  }
-  case TRT: { // TRT (obviously)
-    if ( m_newtrt ) m_newtrt->getHashList(_roi, *IDList); 
-    break;
-  }
-  case MDT: { 
-    if ( m_newmdt ) m_newmdt->getHashList(_roi, *IDList); 
-    break;
-  }
-  case RPC: { 
-    if ( m_newrpc ) m_newrpc->getHashList(_roi, *IDList); 
-    break;
-  }
-  case TGC: { 
-    if ( m_newtgc ) m_newtgc->getHashList(_roi, *IDList); 
-    break;
-  }
-  case CSC: { 
-    if ( m_newcsc ) m_newcsc->getHashList(_roi, *IDList); 
-    break;
-  }
-  default:
-    break;
-  }
-
-  if(m_msgOutputLevel <= MSG::DEBUG){
-    (*m_log) << MSG::DEBUG << "DetHashIDList for detector " << detectorID 
-	<< " got " << IDList->size() << " hash IDs" << endmsg;
-  }
-
-}
-
-
-
-// detector by layer
-
-void RegSelSvc::DetHashIDList(DETID detectorID, long layer,
-			      double zMin,   double zMax,
-			      double etaMin, double etaMax,
-			      double phiMin, double phiMax, 
-			      std::vector<IdentifierHash> *IDList) 
-{
-
-  static bool first = true;
-  if ( first ) { 
-    first = false;
-    (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg;	
-  }
-
-  //  std::cout << "RegSelSvc::DetHashIDList() new map " << detectorID << std::endl; 
-
-  if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  IDList->clear();
-
-  if ( !checkinput(zMin, zMax, etaMin, etaMax, phiMin, phiMax) ) { 
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" 
-	       <<    "zMin=" <<   zMin <<   "\tzMax=" <<   zMax 
-	       << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax 
-	       << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg;
-    
-    return;
-  }
-
-  RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax );
-   
-  switch(detectorID){
-  case PIXEL: { // Pixel    
-    if ( m_newpixel ) m_newpixel->getHashList(roi, layer, *IDList); 
-    break;
-  }
-  case SCT: { // Semiconductor Tracker 
-    if ( m_newsct ) m_newsct->getHashList(roi, layer, *IDList); 
-    break;
-  }
-  case TRT: { // TRT (obviously)
-    if ( m_newtrt ) m_newtrt->getHashList(roi, layer, *IDList); 
-    break;
-  }
-  case MDT: { 
-    if ( m_newmdt ) m_newmdt->getHashList(roi, layer, *IDList); 
-    break;
-  }
-  case RPC: { 
-    if ( m_newrpc ) m_newrpc->getHashList(roi, layer, *IDList); 
-    break;
-  }
-  case TGC: {
-    if ( m_newtgc ) m_newtgc->getHashList(roi, layer, *IDList); 
-    break;
-  }
-  case CSC: { 
-    if ( m_newcsc ) m_newcsc->getHashList(roi, layer, *IDList); 
-    break;
-  }
-  default:
-    break;
-  }
-
-  if(m_msgOutputLevel <= MSG::DEBUG){
-    (*m_log) << MSG::DEBUG << "DetHashIDList for detector " << detectorID 
-	<< " got " << IDList->size() << " hash IDs" << endmsg;
-  }
-
-}
-
-
-void RegSelSvc::DetHashIDList(DETID detectorID, long layer,
-			      const IRoiDescriptor& roi,
-			      std::vector<IdentifierHash> *IDList) 
-{
-  static bool first = true;
-  if ( first ) { 
-    first = false;
-    (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg;	
-  }
-
-  if ( roi.isFullscan() ) return DetHashIDList( detectorID, layer, *IDList );
-
-  //  std::cout << "RegSelSvc::DetHashIDList() new map " << detectorID << std::endl; 
-
-  if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  IDList->clear();
-
-  RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), 
-		  roi.phiMinus(), roi.phiPlus(),
-		  roi.etaMinus(), roi.etaPlus() );
-  
-  switch(detectorID){
-  case PIXEL: { // Pixel    
-    if ( m_newpixel ) m_newpixel->getHashList(_roi, layer, *IDList); 
-    break;
-  }
-  case SCT: { // Semiconductor Tracker 
-    if ( m_newsct ) m_newsct->getHashList(_roi, layer, *IDList); 
-    break;
-  }
-  case TRT: { // TRT (obviously)
-    if ( m_newtrt ) m_newtrt->getHashList(_roi, layer, *IDList); 
-    break;
-  }
-  case MDT: { 
-    if ( m_newmdt ) m_newmdt->getHashList(_roi, layer, *IDList); 
-    break;
-  }
-  case RPC: { 
-    if ( m_newrpc ) m_newrpc->getHashList(_roi, layer, *IDList); 
-    break;
-  }
-  case TGC: {
-    if ( m_newtgc ) m_newtgc->getHashList(_roi, layer, *IDList); 
-    break;
-  }
-  case CSC: { 
-    if ( m_newcsc ) m_newcsc->getHashList(_roi, layer, *IDList); 
-    break;
-  }
-  default:
-    break;
-  }
-
-  
-  if(m_msgOutputLevel <= MSG::DEBUG){
-    (*m_log) << MSG::DEBUG << "DetHashIDList for detector " << detectorID 
-	<< " got " << IDList->size() << " hash IDs" << endmsg;
-  }
-
-}
-#endif
-
-
-
-
-
-
-
-
-// detector full scan
-
-void RegSelSvc::DetHashIDList(DETID detectorID, 
-			      std::vector<IdentifierHash>* IDList ) 
-{ 
-  static bool first = true;
-  if ( first ) { 
-    first = false;
-    (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg;	
-  }
-
-  //  std::cout << "RegSelSvc::DetHashIDList() new map " << detectorID << std::endl;   
-
-  if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  IDList->clear();
-
-  switch(detectorID){
-  case PIXEL: { // Pixel    
-    if ( m_newpixel ) m_newpixel->getHashList(*IDList); 
-    break;
-  }
-  case SCT: { // Semiconductor Tracker (and pixel)
-    if ( m_newsct ) m_newsct->getHashList(*IDList); 
-    break;
-  }
-  case TRT: { // TRT (obviously)
-    if ( m_newtrt ) m_newtrt->getHashList(*IDList); 
-    break;
-  }
-  case MDT: { 
-    if ( m_newmdt ) m_newmdt->getHashList(*IDList); 
-    break;
-  }
-  case RPC: { 
-    if ( m_newrpc ) m_newrpc->getHashList(*IDList); 
-    break;
-  }
-  case TGC: {
-    if ( m_newtgc ) m_newtgc->getHashList(*IDList); 
-    break;
-  }
-  case CSC: { 
-    if ( m_newcsc ) m_newcsc->getHashList(*IDList); 
-    break;
-  }
-  default:
-    break;
-  }
-} 
-
-
-
-
-
-// calorimeter
-
-void RegSelSvc::DetHashIDList(DETID detectorID, 
-			      long sampling, 
-			      double etaMin, double etaMax ,
-			      double phiMin, double phiMax, 
-			      std::vector<IdentifierHash> *IDList) {
-
-  static bool first = true;
-  if ( first ) { 
-    first = false;
-    (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg;	
-  }
-
-  if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  IDList->clear();
-
-  if ( !checkinput(etaMin, etaMax, phiMin, phiMax) ) { 
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" 
-	       << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax 
-	       << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg;
-    
-    return;
-  }
-
-
-  switch(detectorID){
-  case PIXEL: 
-  case SCT:    
-  case TRT:
-  case MDT: 
-  case RPC:
-  case TGC: 
-  case CSC: 
-    return DetHashIDList(detectorID, sampling, -m_DeltaZ, m_DeltaZ, etaMin, etaMax, phiMin, phiMax, IDList); 
-    break;   
-  case LAR: // Liquid Argon Calorimeter
-    verifyInputs(LAR, etaMin, etaMax, phiMin, phiMax);
-    m_larData.regionSelector(sampling, etaMin, etaMax, phiMin, phiMax,(*IDList));
-    //log<< MSG::DEBUG << "LAR hashID verifyOutput sampling " << sampling << endmsg; larDataIdentHash.verifyOutput(sampling,etaMin, etaMax, phiMin, phiMax,IDList);
-    break;
-  case TTEM: // Liquid Argon Trigger Tower EM Calorimeter
-    verifyInputs(TTEM, etaMin, etaMax, phiMin, phiMax);
-    m_ttemData.regionSelector(sampling, etaMin, etaMax, phiMin, phiMax,(*IDList));
-    //log<< MSG::DEBUG << "TTEM hashID verifyOutput sampling " << sampling << endmsg; ttemDataIdentHash.verifyOutput(sampling,etaMin, etaMax, phiMin, phiMax,IDList);
-    break;
-  case TTHEC: // Liquid Argon Trigger Tower HEC Calorimeter
-    verifyInputs(TTHEC, etaMin, etaMax, phiMin, phiMax);
-    m_tthecData.regionSelector(sampling, etaMin, etaMax, phiMin, phiMax,(*IDList));
-    //log<< MSG::DEBUG << "TTEC hashID verifyOutput sampling " << sampling << endmsg;  tthecDataIdentHash.verifyOutput(sampling,etaMin, etaMax, phiMin, phiMax,IDList);
-    break;
-  case FCALEM: // Liquid Argon Trigger Tower FCALEM Calorimeter
-    verifyInputs(FCALEM, etaMin, etaMax, phiMin, phiMax);
-    m_ttfcalemData.regionSelector(sampling, etaMin, etaMax, phiMin, phiMax,(*IDList));
-    //log<< MSG::DEBUG << "FCALEM hashID verifyOutput sampling " << sampling << endmsg;  ttfcalemDataIdentHash.verifyOutput(sampling,etaMin, etaMax, phiMin, phiMax,IDList);
-    break;
-  case FCALHAD: // Liquid Argon Trigger Tower FCALHAD Calorimeter
-    verifyInputs(FCALHAD, etaMin, etaMax, phiMin, phiMax);
-    m_ttfcalhadData.regionSelector(sampling, etaMin, etaMax, phiMin, phiMax,(*IDList));
-    //log<< MSG::DEBUG << "FCALHAD hashID verifyOutput sampling " << sampling << endmsg;  ttfcalhadDataIdentHash.verifyOutput(sampling,etaMin, etaMax, phiMin, phiMax,IDList);
-    break;
-  case TILE: // Tile Calorimeters
-    break;
-  default:
-    break;
-  }
-
-  if(m_msgOutputLevel <= MSG::DEBUG){
-    (*m_log) << MSG::DEBUG << "DetHashIDList for detector " << detectorID 
-	<< " got " << IDList->size() << " hash IDs" << endmsg;
-  }
-
-}
-
-
-// muon 
-
-void RegSelSvc::DetHashIDList(DETID detectorID, 
-			      TYPEID typeID, 
-			      double etaMin, double etaMax ,
-			      double phiMin, double phiMax, 
-			      std::vector<IdentifierHash> *IDList) 
-{
-  static bool first = true;
-  if ( first ) { 
-    first = false;
-    (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg;	
-  }
-
-  if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  IDList->clear();
-
-  if ( !checkinput(etaMin, etaMax, phiMin, phiMax) ) { 
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" 
-	       << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax 
-	       << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg;
-    
-    return;
-  }
-
-  if ( detectorID==MDT ) {   
-    long layer = typeID;
-    DetHashIDList(detectorID, layer, -m_DeltaZ, m_DeltaZ, etaMin, etaMax, phiMin, phiMax, IDList); 
-  }
-  
-  
-  if(m_msgOutputLevel <= MSG::DEBUG){
-    (*m_log) << MSG::DEBUG << "DetHashIDList for detector " << detectorID 
-	     << " got " << IDList->size() << " hash IDs" << endmsg;
-  }
-  
-}
-
-
-
-
-
-// Methods to retrieve the rob is list  
-
-// old region selector interface
-
-void RegSelSvc::DetROBIDListUint(DETID detectorID, 
-				 double etaMin, double etaMax ,
-				 double phiMin, double phiMax, 
-				 std::vector<uint32_t>& outputROBIDList) 
-{
-
-  static bool first = true;
-  if ( first ) { 
-    first = false;
-    (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg;	
-  }
-
-  if(m_msgOutputLevel <= MSG::DEBUG && outputROBIDList.size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " input outputROBIDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  outputROBIDList.clear();
-
-  if ( !checkinput(etaMin, etaMax, phiMin, phiMax) ) { 
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" 
-	       << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax 
-	       << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg;
-    
-    return;
-  }
-
-
-  switch(detectorID){
-  case PIXEL: 
-  case SCT:   
-  case TRT:   
-    return DetROBIDListUint(detectorID, -m_DeltaZ, m_DeltaZ, etaMin, etaMax, phiMin, phiMax, outputROBIDList); 
-    break;
-  case LAR: // Liquid Argon Calorimeter
-    verifyInputs(LAR, etaMin, etaMax, phiMin, phiMax);
-    m_larData.regionSelectorRobIdUint(etaMin, etaMax, phiMin, phiMax, outputROBIDList);
-    //log<< MSG::DEBUG << "LAR verifyOutput" << endmsg; larData.verifyOutput(ROBID, etaMin, etaMax, phiMin, phiMax,outputROBIDList);
-    break;
-  case TTEM: // Liquid Argon Trigger Tower EM Calorimeter
-    verifyInputs(TTEM, etaMin, etaMax, phiMin, phiMax);
-    m_ttemData.regionSelectorRobIdUint(etaMin, etaMax, phiMin, phiMax, outputROBIDList);
-    //log<< MSG::DEBUG << "TTEM verifyOutput" << endmsg; ttemData.verifyOutput(ROBID, etaMin, etaMax, phiMin, phiMax,outputROBIDList);
-    break;
-  case TTHEC: // Liquid Argon Trigger Tower HEC Calorimeter
-    verifyInputs(TTHEC, etaMin, etaMax, phiMin, phiMax);
-    m_tthecData.regionSelectorRobIdUint(etaMin, etaMax, phiMin, phiMax, outputROBIDList);
-    //log<< MSG::DEBUG << "TTHEC verifyOutput" << endmsg; tthecData.verifyOutput(ROBID, etaMin, etaMax, phiMin, phiMax,outputROBIDList);
-    break;
-  case FCALEM: // Liquid Argon Trigger Tower FCALEM Calorimeter
-    verifyInputs(FCALEM, etaMin, etaMax, phiMin, phiMax);
-    m_ttfcalemData.regionSelectorRobIdUint(etaMin, etaMax, phiMin, phiMax, outputROBIDList);
-    //log<< MSG::DEBUG << "FCALEM verifyOutput" << endmsg; ttfcalemData.verifyOutput(ROBID, etaMin, etaMax, phiMin, phiMax,outputROBIDList);
-    break;
-  case FCALHAD: // Liquid Argon Trigger Tower FCALHAD Calorimeter
-    verifyInputs(FCALHAD, etaMin, etaMax, phiMin, phiMax);
-    m_ttfcalhadData.regionSelectorRobIdUint(etaMin, etaMax, phiMin, phiMax, outputROBIDList);
-    //log<< MSG::DEBUG << "FCALHAD verifyOutput" << endmsg; ttfcalhadData.verifyOutput(ROBID, etaMin, etaMax, phiMin, phiMax,outputROBIDList);
-    break;
-  case TILE: // Tile Calorimeters
-    verifyInputs(TILE, etaMin, etaMax, phiMin, phiMax);
-    m_tileData.regionSelectorRobIdUint(TILE,etaMin, etaMax, phiMin, phiMax, outputROBIDList);
-    break;
-  case MDT: // MDT Calorimeter
-    //verifyInputs(MDT, etaMin, etaMax, phiMin, phiMax);
-    //m_mdtData.regionSelectorRobIdUint(MDT,etaMin, etaMax, phiMin, phiMax, outputROBIDList);
-    break;
-  case RPC: // RPC Calorimeters
-    //verifyInputs(RPC, etaMin, etaMax, phiMin, phiMax);
-    //m_rpcData.regionSelectorRobIdUint(RPC,etaMin, etaMax, phiMin, phiMax, outputROBIDList);
-    break;
-  case TGC: // TGC Calorimeters
-    //verifyInputs(TGC, etaMin, etaMax, phiMin, phiMax);
-    //m_tgcData.regionSelectorRobIdUint(TGC,etaMin, etaMax, phiMin, phiMax, outputROBIDList);
-    break;
-  case CSC: // CSC Calorimeters
-    //verifyInputs(CSC, etaMin, etaMax, phiMin, phiMax);
-    //m_cscData.regionSelectorRobIdUint(CSC,etaMin, etaMax, phiMin, phiMax, outputROBIDList);
-    break;
-  default:
-    break;
-  }
-
-  if(m_msgOutputLevel <= MSG::DEBUG){
-    (*m_log) << MSG::DEBUG << "DetROBIDListUint for detector " << detectorID 
-	<< " got " << outputROBIDList.size() << " ROB IDs" << endmsg;
-  }
-
-}
-
-
-
-
-// inner detector
-
-void RegSelSvc::DetROBIDListUint(DETID detectorID,
-				 double zMin,   double zMax,
-				 double etaMin, double etaMax,
-				 double phiMin, double phiMax, 
-				 std::vector<uint32_t>& outputROBIDList) 
-{
-
-  static bool first = true;
-  if ( first ) { 
-    first = false;
-    (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg;	
-  }
-
-  //  std::cout << "RegSelSvc::DetROBIDListUint() new map " << detectorID << std::endl; 
-
-  if(m_msgOutputLevel <= MSG::DEBUG && outputROBIDList.size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " input outputROBIDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  outputROBIDList.clear();
-
-  if ( !checkinput(zMin, zMax, etaMin, etaMax, phiMin, phiMax) ) { 
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" 
-	       <<    "zMin=" <<   zMin <<   "\tzMax=" <<   zMax 
-	       << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax 
-	       << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg;
-    
-    return;
-  }
-
-
-  switch (detectorID) {
-  case PIXEL: { // Pixel
-    RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax );
-    if ( m_newpixel ) m_newpixel->getRobList(roi, outputROBIDList); 
-    break;
-  }
-  case SCT: {  // SCT
-    RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax );
-    if ( m_newsct ) m_newsct->getRobList(roi, outputROBIDList); 
-    break;
-  }
-  case TRT: {  // TRT
-    RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax );
-    if ( m_newtrt ) m_newtrt->getRobList(roi, outputROBIDList); 
-    break;
-  }
-  default:
-    break;
-  }
-  
-  if(m_msgOutputLevel <= MSG::DEBUG){
-    (*m_log) << MSG::DEBUG << "DetROBIDListUint for detector " << detectorID 
-	<< " got " << outputROBIDList.size() << " ROB IDs" << endmsg;
-  }
-
-}
-
-
-
-
-
-void RegSelSvc::DetROBIDListUint(DETID detectorID,
-				 double zMin,   double zMax,
-				 double etaMin, double etaMax,
-				 double phiMin, double phiMax, 
-				 double xBeam,  double yBeam,
-				 std::vector<uint32_t>& outputROBIDList) 
-{
-
-  static bool first = true;
-  if ( first ) { 
-    first = false;
-    (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg;	
-  }
-
-  //  std::cout << "RegSelSvc::DetROBIDListUint() new map " << detectorID << std::endl; 
-
-  if(m_msgOutputLevel <= MSG::DEBUG && outputROBIDList.size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " input outputROBIDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  outputROBIDList.clear();
-
-  if ( !checkinput(zMin, zMax, etaMin, etaMax, phiMin, phiMax) ) { 
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" 
-	       <<    "zMin=" <<   zMin <<   "\tzMax=" <<   zMax 
-	       << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax 
-	       << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg;
-    
-    return;
-  }
-
-
-  switch (detectorID) {
-  case PIXEL: { // Pixel
-    RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax );
-    if ( m_newpixel ) m_newpixel->getRobList(roi, outputROBIDList, xBeam, yBeam ); 
-    break;
-  }
-  case SCT: {  // SCT
-    RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax );
-    if ( m_newsct ) m_newsct->getRobList(roi, outputROBIDList, xBeam, yBeam ); 
-    break;
-  }
-  case TRT: {  // TRT
-    RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax );
-    if ( m_newtrt ) m_newtrt->getRobList(roi, outputROBIDList, xBeam, yBeam ); 
-    break;
-  }
-  default:
-    break;
-  }
-  
-  if(m_msgOutputLevel <= MSG::DEBUG){
-    (*m_log) << MSG::DEBUG << "DetROBIDListUint for detector " << detectorID 
-	<< " got " << outputROBIDList.size() << " ROB IDs" << endmsg;
-  }
-
-}
-
-
-
-// inner detector by layer
-
-void RegSelSvc::DetROBIDListUint(DETID detectorID, long layer,
-				 double zMin,   double zMax,
-				 double etaMin, double etaMax,
-				 double phiMin, double phiMax, 
-				 std::vector<uint32_t>& outputROBIDList) 
-{
-
-  static bool first = true;
-  if ( first ) { 
-    first = false;
-    (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg;	
-  }
-
-  //  std::cout << "RegSelSvc::DetROBIDListUint() new map " << detectorID << std::endl; 
-
-  if(m_msgOutputLevel <= MSG::DEBUG && outputROBIDList.size()!=0 ){
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " input outputROBIDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; 
-  }
-  outputROBIDList.clear();
-
-  if ( !checkinput(zMin, zMax, etaMin, etaMax, phiMin, phiMax) ) { 
-    if(m_msgOutputLevel <= MSG::WARNING ) 
-      (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" 
-	       <<    "zMin=" <<   zMin <<   "\tzMax=" <<   zMax 
-	       << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax 
-	       << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg;
-    
-    return;
-  }
-
-  RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax );
-
-  switch (detectorID) {
-  case PIXEL: { // Pixel
-    if ( m_newpixel ) m_newpixel->getRobList(roi, layer, outputROBIDList); 
-    break;
-  }
-  case SCT: {  // SCT
-    if ( m_newsct ) m_newsct->getRobList(roi, layer, outputROBIDList); 
-    break;
-  }
-  case TRT: { // TRT
-    if ( m_newtrt ) m_newtrt->getRobList(roi, layer, outputROBIDList); 
-    break;
-  }
-  default:
-    break;
-  }
-  
-  if(m_msgOutputLevel <= MSG::DEBUG){
-    (*m_log) << MSG::DEBUG << "DetROBIDListUint for detector " << detectorID 
-	<< " got " << outputROBIDList.size() << " ROB IDs" << endmsg;
-  }
-
-}
-
-
-
-
-
-
-
-
-
-
diff --git a/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawDataProvider.cxx b/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawDataProvider.cxx
index 9c3b8cc1b79e..fdd454ead890 100644
--- a/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawDataProvider.cxx
+++ b/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawDataProvider.cxx
@@ -14,7 +14,6 @@ using OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment;
 TRTRawDataProvider::TRTRawDataProvider(const std::string& name,
 				       ISvcLocator* pSvcLocator) :
   AthAlgorithm      ( name, pSvcLocator ),
-  m_regionSelector  ("RegSelSvc", name), 
   m_robDataProvider ( "ROBDataProviderSvc", name ),
   m_rawDataTool     ( "TRTRawDataProviderTool",this ),
   m_CablingSvc      ( "TRT_CablingSvc", name ),
@@ -117,9 +116,7 @@ StatusCode TRTRawDataProvider::execute()
       for (; roi!=roiE; ++roi) {
         superRoI.push_back(*roi);
       }
-      m_regionSelector->DetROBIDListUint( TRT, 
-					  superRoI,
-					  listOfRobs);
+      m_regionSelector->ROBIDList( superRoI, listOfRobs );
   }
   std::vector<const ROBFragment*> listOfRobf;
   m_robDataProvider->getROBData( listOfRobs, listOfRobf);
diff --git a/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawDataProvider.h b/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawDataProvider.h
index 8a4be6d46a72..75e61d3dbc30 100755
--- a/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawDataProvider.h
+++ b/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawDataProvider.h
@@ -17,7 +17,7 @@
 #include "InDetRawData/TRT_RDO_Container.h"
 #include "TRT_RawDataByteStreamCnv/ITRTRawDataProviderTool.h"
 #include "TRT_Cabling/ITRT_CablingSvc.h"
-#include "IRegionSelector/IRegSelSvc.h" 
+#include "IRegionSelector/IRegSelTool.h" 
 #include "TrigSteeringEvent/TrigRoiDescriptorCollection.h"
 
 #include "AthenaBaseComps/AthAlgorithm.h"
@@ -54,7 +54,8 @@ public:
 
 private:
 
-  ServiceHandle<IRegSelSvc>             m_regionSelector;     
+  ToolHandle<IRegSelTool>             m_regionSelector { this, "RegSelTool", "RegSelTool/RegSelTool_TRT" }
+;     
   ServiceHandle<IROBDataProviderSvc>  m_robDataProvider;
   ToolHandle<ITRTRawDataProviderTool> m_rawDataTool;
   ServiceHandle<ITRT_CablingSvc>     m_CablingSvc;
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetReadBS_jobOptions.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetReadBS_jobOptions.py
index e5d39621d692..227fa7380844 100755
--- a/InnerDetector/InDetExample/InDetRecExample/share/InDetReadBS_jobOptions.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetReadBS_jobOptions.py
@@ -99,8 +99,8 @@ if DetFlags.readRDOBS.TRT_on():
                                               RDOKey       = InDetKeys.TRT_RDOs(),
                                               ProviderTool = InDetTRTRawDataProviderTool)
 
-# from RegionSelector.RegSelToolConfig import makeRegSelTool_TRT
-# InDetTRTRawDataProvider.RegSelTool = makeRegSelTool_TRT()
+  from RegionSelector.RegSelToolConfig import makeRegSelTool_TRT
+  InDetTRTRawDataProvider.RegSelTool = makeRegSelTool_TRT()
 
   topSequence += InDetTRTRawDataProvider
   if (InDetFlags.doPrintConfigurables()):
diff --git a/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py b/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py
index 88098c10d29d..189943c2024a 100755
--- a/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py
+++ b/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py
@@ -237,8 +237,8 @@ class TrigFastTrackFinderBase(TrigFastTrackFinder):
         from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
         from RegionSelector.RegSelToolConfig import makeRegSelTool_SCT
       
-        spTool.RegSel_Pixel = makeRegSelTool_Pixel()
-        spTool.RegSel_SCT   = makeRegSelTool_SCT()
+        spTool.RegSelTool_Pixel = makeRegSelTool_Pixel()
+        spTool.RegSelTool_SCT   = makeRegSelTool_SCT()
 
         ToolSvc += spTool
         self.SpacePointProviderTool=spTool
diff --git a/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.cxx b/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.cxx
index 5823bcb2dd20..94caec1619e0 100644
--- a/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.cxx
+++ b/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.cxx
@@ -25,10 +25,8 @@ StatusCode RoIPEBInfoWriterTool::initialize() {
   ATH_MSG_DEBUG("Extra PEBInfo attached to every passed event: " << m_extraPebInfo);
 
   // Ugly solution - need to translate strings into enums. Wouldn't be needed if DETID enum was accessible from python.
+
   const std::unordered_map<std::string_view,DETID> detNameDict = {
-    {"PIXEL",   DETID::PIXEL},
-    {"SCT",     DETID::SCT},
-    {"TRT",     DETID::TRT},
     {"LAR",     DETID::LAR},
     {"TTEM",    DETID::TTEM},
     {"TTHEC",   DETID::TTHEC},
@@ -43,18 +41,46 @@ StatusCode RoIPEBInfoWriterTool::initialize() {
     {"MM",      DETID::MM},
     {"STGC",    DETID::STGC},
   };
+
+#if 1
+  const std::unordered_map< std::string_view, ToolHandle<IRegSelTool> > detTools = {
+    { "PIXEL",   m_regionSelector_pix },
+    { "SCT",     m_regionSelector_sct },
+    { "TRT",     m_regionSelector_trt }
+  };
+#else
+
+  std::unordered_map< std::string_view, ToolHandle<IRegSelTool> > detTools;
+
+  detTools.insert( std::unordered_map< std::string_view, ToolHandle<IRegSelTool> >::value_type( "PIXEL",   m_regionSelector_pix ) );
+  detTools.insert( std::unordered_map< std::string_view, ToolHandle<IRegSelTool> >::value_type( "SCT",     m_regionSelector_sct ) );
+  detTools.insert( std::unordered_map< std::string_view, ToolHandle<IRegSelTool> >::value_type( "TRT",     m_regionSelector_trt ) );
+
+
+#endif
+
   for (std::string_view name : m_detNames) {
     if (name=="All") {
       for (const auto& p : detNameDict) m_dets.insert(p.second);
+      for (const auto& p : detTools)    m_tools.insert(p.second);
       break;
     }
-    const auto it = detNameDict.find(name);
-    if (it==detNameDict.cend()) {
-      ATH_MSG_ERROR("The detector name " << name << " cannot be translated into RegSelEnum DETID");
-      return StatusCode::FAILURE;
+
+    const auto itt = detTools.find(name);
+    if ( itt!=detTools.cend() ) {
+      ATH_MSG_DEBUG("The detector name " << name << " being inserted from the RegSelTools database");
+      m_tools.insert(itt->second);
+    }
+    else {  
+      ATH_MSG_DEBUG("The detector name " << name << " not in the RegSelTools database - trying RegSelEnum database");
+      const auto it = detNameDict.find(name);
+      if (it==detNameDict.cend()) {
+	ATH_MSG_ERROR("The detector name " << name << " cannot be translated into RegSelEnum DETID");
+	return StatusCode::FAILURE;
+      }
+      ATH_MSG_DEBUG("Adding " << name << "=" << it->second << " to detector list");
+      m_dets.insert(it->second);
     }
-    ATH_MSG_DEBUG("Adding " << name << "=" << it->second << " to detector list");
-    m_dets.insert(it->second);
   }
 
   return StatusCode::SUCCESS;
@@ -86,6 +112,20 @@ PEBInfoWriterToolBase::PEBInfo RoIPEBInfoWriterTool::createPEBInfo(const PEBInfo
 
   TrigRoiDescriptor roiForPEB(eta, etaMin, etaMax, phi, phiMin, phiMax);
 
+#if 0
+  std::vector<IRegSelTool*> tools = { 
+    m_regionSelectot_pix, 
+    m_regionSelectot_sct, 
+    m_regionSelectot_trt 
+  }; 
+#endif
+
+  for ( auto tool : m_tools ) { 
+    std::vector<uint32_t> detROBs;
+    tool->ROBIDList( roiForPEB, detROBs);
+    pebi.robs.insert(detROBs.begin(),detROBs.end());
+  }
+
   for (const DETID detid : m_dets) {
     std::vector<uint32_t> detROBs;
     m_regionSelector->DetROBIDListUint(detid, roiForPEB, detROBs);
diff --git a/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.h b/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.h
index 253c420d906b..f1f893825978 100644
--- a/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.h
+++ b/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.h
@@ -8,6 +8,7 @@
 #include "TrigPartialEventBuilding/PEBInfoWriterToolBase.h"
 #include "IRegionSelector/RegSelEnums.h"
 #include "IRegionSelector/IRegSelSvc.h"
+#include "IRegionSelector/IRegSelTool.h"
 
 /** @class RoIPEBInfoWriterTool
  *  @brief Tool writing ROB list corresponding to an RoI in given detectors for use in PEBInfoWriterAlg
@@ -31,6 +32,20 @@ private:
     this, "RegionSelector", "RegSelSvc/RegSelSvc", "Region Selector service"
   };
 
+  ToolHandle<IRegSelTool> m_regionSelector_pix {
+    this, "RegSelTool_Pixel", "RegSelTool/RegSelTool_Pixel", "Region Selector Tool"
+  };
+
+  ToolHandle<IRegSelTool> m_regionSelector_sct {
+    this, "RegSelTool_SCT", "RegSelTool/RegSelTool_SCT", "Region Selector Tool"
+  };
+
+  ToolHandle<IRegSelTool> m_regionSelector_trt {
+    this, "RegSelTool_TRT", "RegSelTool/RegSelTool_TRT", "Region Selector Tool"
+  };
+
+
+
   // ------------------------- Properties --------------------------------------
   Gaudi::Property<float> m_etaEdge {
     this, "EtaEdge", 5.0, "Upper limit of |eta| range"
@@ -58,7 +73,9 @@ private:
   /// Static PEB Info which contains ExtraROBs and ExtraSubDets
   PEBInfoWriterToolBase::PEBInfo m_extraPebInfo;
   /// m_detNames translated into set of DETID, filled at initialisation
-  std::set<DETID> m_dets;
+  std::set<DETID>       m_dets;
+  std::set<ToolHandle<IRegSelTool> > m_tools;
+
 };
 
 #endif // TrigPartialEventBuilding_RoIPEBInfoWriterTool_h
diff --git a/Trigger/TrigTools/TrigInDetConfig/python/InDetPT.py b/Trigger/TrigTools/TrigInDetConfig/python/InDetPT.py
index 6a2e8ff95bac..c6c2a91ffd35 100644
--- a/Trigger/TrigTools/TrigInDetConfig/python/InDetPT.py
+++ b/Trigger/TrigTools/TrigInDetConfig/python/InDetPT.py
@@ -122,13 +122,21 @@ def makeInDetPrecisionTracking( config = None,
                 from TRT_RawDataByteStreamCnv.TRT_RawDataByteStreamCnvConf import TRTRawDataProviderTool
                 InDetTRTRawDataProviderTool = TRTRawDataProviderTool( name    = "%sTRTRawDataProviderTool%s"%(algNamePrefix, signature),
                                                                       Decoder = InDetTRTRodDecoder )
+
                 ToolSvc += InDetTRTRawDataProviderTool
              
+
+
+
                 # load the TRTRawDataProvider
                 from TRT_RawDataByteStreamCnv.TRT_RawDataByteStreamCnvConf import TRTRawDataProvider
                 InDetTRTRawDataProvider = TRTRawDataProvider(name         = "%sTRTRawDataProvider%s"%(algNamePrefix, signature),
                                                              RDOKey       = TrigTRTKeys.RDOs,
                                                              ProviderTool = InDetTRTRawDataProviderTool)
+
+                from RegionSelector.RegSelToolConfig import makeRegSelTool_TRT
+                InDetTRTRawDataProvider.RegSelTool = makeRegSelTool_TRT()
+
                 InDetTRTRawDataProvider.isRoI_Seeded = True
                 InDetTRTRawDataProvider.RoIs = rois
 
diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/TrigSpacePointConversionTool.cxx b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/TrigSpacePointConversionTool.cxx
index 54eda180a1d2..5206c65d27f5 100644
--- a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/TrigSpacePointConversionTool.cxx
+++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/TrigSpacePointConversionTool.cxx
@@ -24,15 +24,10 @@ TrigSpacePointConversionTool::TrigSpacePointConversionTool(const std::string& t,
 					     const std::string& n,
 					     const IInterface*  p ) : 
   AthAlgTool(t,n,p),
-  m_layerNumberTool("TrigL2LayerNumberTool"),
-  m_regsel_pix( "RegSelTool/RegSelTool_Pixel", this),
-  m_regsel_sct( "RegSelTool/RegSel_SCT", this)
+  m_layerNumberTool("TrigL2LayerNumberTool")
 {
   declareInterface< ITrigSpacePointConversionTool >( this );
 
-  declareProperty( "RegSel_Pixel",           m_regsel_pix);
-  declareProperty( "RegSel_SCT",             m_regsel_sct);
-
   declareProperty( "DoPhiFiltering",         m_filter_phi = true );
   declareProperty( "UseBeamTilt",            m_useBeamTilt = true );
   declareProperty( "UseNewLayerScheme",      m_useNewScheme = false );
diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/TrigSpacePointConversionTool.h b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/TrigSpacePointConversionTool.h
index 284bf60acc22..3e2dfc61d0d7 100644
--- a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/TrigSpacePointConversionTool.h
+++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/TrigSpacePointConversionTool.h
@@ -62,8 +62,8 @@ class TrigSpacePointConversionTool : virtual public ITrigSpacePointConversionToo
   void transformSpacePoints(std::vector<TrigSiSpacePointBase>&, const EventContext&) const;
 
   /// new region selector tools
-  ToolHandle<IRegSelTool> m_regsel_pix;
-  ToolHandle<IRegSelTool> m_regsel_sct;
+  ToolHandle<IRegSelTool> m_regsel_pix { this, "RegSelTool_Pixel",  "RegSelTool/RegSelTool_Pixel" };
+  ToolHandle<IRegSelTool> m_regsel_sct { this, "RegSelTool_SCT",    "RegSelTool/RegSelTool_SCT"   };
 
 };
 #endif
diff --git a/Trigger/TrigValidation/TrigP1Test/share/PEBDSTest.py b/Trigger/TrigValidation/TrigP1Test/share/PEBDSTest.py
index 646180b431ba..8b1e2772cb86 100644
--- a/Trigger/TrigValidation/TrigP1Test/share/PEBDSTest.py
+++ b/Trigger/TrigValidation/TrigP1Test/share/PEBDSTest.py
@@ -87,6 +87,10 @@ def myPebInfoWriterTool(name, eventBuildType):
         tool.EtaWidth = 0.1
         tool.PhiWidth = 0.1
         tool.DetNames = ['All']
+        from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel, makeRegSelTool_SCT, makeRegSelTool_TRT 
+        tool.RegSelTool_Pixel = makeRegSelTool_Pixel()
+        tool.RegSelTool_SCT   = makeRegSelTool_SCT()
+        tool.RegSelTool_TRT   = makeRegSelTool_TRT()
         tool.ExtraROBs = []
         tool.ExtraSubDets = []
         tool.addHLTResultToROBList() # add the main (full) HLT result to the list
@@ -110,6 +114,10 @@ def myPebInfoWriterTool(name, eventBuildType):
         tool.EtaWidth = 0.3
         tool.PhiWidth = 0.3
         tool.DetNames = ['PIXEL', 'SCT', 'TRT', 'TTEM', 'TTHEC', 'FCALEM', 'FCALHAD']
+        from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel, makeRegSelTool_SCT, makeRegSelTool_TRT 
+        tool.RegSelTool_Pixel = makeRegSelTool_Pixel()
+        tool.RegSelTool_SCT   = makeRegSelTool_SCT()
+        tool.RegSelTool_TRT   = makeRegSelTool_TRT()
         tool.ExtraROBs = []
         tool.ExtraSubDets = []
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CommonSequences/EventBuildingSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CommonSequences/EventBuildingSequenceSetup.py
index 4bf4949af662..62cecf49b001 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CommonSequences/EventBuildingSequenceSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CommonSequences/EventBuildingSequenceSetup.py
@@ -61,6 +61,12 @@ def pebInfoWriterTool(name, eventBuildType):
     elif 'LArPEB' in eventBuildType:
         tool = RoIPEBInfoWriterToolCfg(name)
         tool.DetNames = ['PIXEL', 'SCT', 'TRT', 'TTEM', 'TTHEC', 'FCALEM', 'FCALHAD']
+
+        from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel, makeRegSelTool_SCT, makeRegSelTool_TRT 
+        tool.RegSelTool_Pixel = makeRegSelTool_Pixel()
+        tool.RegSelTool_SCT   = makeRegSelTool_SCT()
+        tool.RegSelTool_TRT   = makeRegSelTool_TRT()
+
         tool.MaxRoIs = 5
         tool.addHLTResultToROBList()  # add the main (full) HLT result to the list
         tool.addCTPResultToROBList()  # add the CTP result to the list
-- 
GitLab


From e2360a0dcddd1e2eb5e804a7d5bcc20c879d7edb Mon Sep 17 00:00:00 2001
From: sutt <sutt@cern.ch>
Date: Mon, 5 Oct 2020 22:25:06 +0200
Subject: [PATCH 213/403] remove some forgotten #ifdef'd code

---
 .../src/RoIPEBInfoWriterTool.cxx                      | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.cxx b/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.cxx
index 94caec1619e0..de106f1762c8 100644
--- a/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.cxx
+++ b/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.cxx
@@ -42,22 +42,11 @@ StatusCode RoIPEBInfoWriterTool::initialize() {
     {"STGC",    DETID::STGC},
   };
 
-#if 1
   const std::unordered_map< std::string_view, ToolHandle<IRegSelTool> > detTools = {
     { "PIXEL",   m_regionSelector_pix },
     { "SCT",     m_regionSelector_sct },
     { "TRT",     m_regionSelector_trt }
   };
-#else
-
-  std::unordered_map< std::string_view, ToolHandle<IRegSelTool> > detTools;
-
-  detTools.insert( std::unordered_map< std::string_view, ToolHandle<IRegSelTool> >::value_type( "PIXEL",   m_regionSelector_pix ) );
-  detTools.insert( std::unordered_map< std::string_view, ToolHandle<IRegSelTool> >::value_type( "SCT",     m_regionSelector_sct ) );
-  detTools.insert( std::unordered_map< std::string_view, ToolHandle<IRegSelTool> >::value_type( "TRT",     m_regionSelector_trt ) );
-
-
-#endif
 
   for (std::string_view name : m_detNames) {
     if (name=="All") {
-- 
GitLab


From fe4b4c93354a947a38c4467c4da8f996737aa2d5 Mon Sep 17 00:00:00 2001
From: Tasnuva Chowdhury <ch.tasnuva@cern.ch>
Date: Mon, 5 Oct 2020 22:44:06 +0200
Subject: [PATCH 214/403] fix warning in compilation

---
 Calorimeter/CaloRec/src/CaloTopoClusterFromTowerHelpers.cxx | 6 +++---
 Calorimeter/CaloRec/src/CaloTowerGeometrySvc.cxx            | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Calorimeter/CaloRec/src/CaloTopoClusterFromTowerHelpers.cxx b/Calorimeter/CaloRec/src/CaloTopoClusterFromTowerHelpers.cxx
index a5e4ca3288c3..59b8c88544a9 100644
--- a/Calorimeter/CaloRec/src/CaloTopoClusterFromTowerHelpers.cxx
+++ b/Calorimeter/CaloRec/src/CaloTopoClusterFromTowerHelpers.cxx
@@ -11,12 +11,12 @@
 #include <cmath>
 
 std::string CaloRec::Helpers::fmtMsg(const char* fmt,...) {
-      char _buffer[1024];
+      char buffer[1024];
       va_list args;
       va_start(args,fmt);
-      vsprintf(_buffer,fmt,args);
+      vsprintf(buffer,fmt,args);
       va_end(args);
-      return std::string(_buffer);
+      return std::string(buffer);
 }
 
 
diff --git a/Calorimeter/CaloRec/src/CaloTowerGeometrySvc.cxx b/Calorimeter/CaloRec/src/CaloTowerGeometrySvc.cxx
index 9e16b36f74ba..acc274e89f4b 100644
--- a/Calorimeter/CaloRec/src/CaloTowerGeometrySvc.cxx
+++ b/Calorimeter/CaloRec/src/CaloTowerGeometrySvc.cxx
@@ -4,7 +4,7 @@
 
 #include <cmath>
 
-namespace { constexpr auto _pi = 3.14159265358979323846; }
+namespace { constexpr auto pi = 3.14159265358979323846; }
 
 CaloTowerGeometrySvc::index_t CaloTowerGeometrySvc::m_invalidIndex = index_t(-1); 
 double                        CaloTowerGeometrySvc::m_invalidValue = -999.;
@@ -23,8 +23,8 @@ CaloTowerGeometrySvc::CaloTowerGeometrySvc(const std::string& name,ISvcLocator*
   , m_towerEtaMax(5.0)                          //----------------------------------------//
   , m_adjustEta(true)
   , m_towerPhiBins(64)                          
-  , m_towerPhiMin(-_pi)                         //----------------------------------------//
-  , m_towerPhiMax(_pi)                          // FCal vertical and horizontal cell      //
+  , m_towerPhiMin(-pi)                         //----------------------------------------//
+  , m_towerPhiMax(pi)                          // FCal vertical and horizontal cell      //
   , m_fcal1Xslice(8.)                           // slicing creates "mini-cells" which are //
   , m_fcal1Yslice(8.)                           // then projected onto towers. The mini-  //
   , m_fcal2Xslice(8.)                           // cell signal is 1/(Nx x Ny) x Ecell,    //
-- 
GitLab


From 225c4a083ca9d52c402b51b1082d40abdd2f5fb9 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Tue, 6 Oct 2020 01:50:47 +0200
Subject: [PATCH 215/403] TRT_ToT_dEdx pass EventContext to internal methods

---
 .../TRT_ElectronPidTools/src/TRT_ToT_dEdx.cxx | 24 ++++++++++++++-----
 .../TRT_ElectronPidTools/src/TRT_ToT_dEdx.h   | 16 ++++++++++---
 2 files changed, 31 insertions(+), 9 deletions(-)

diff --git a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.cxx b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.cxx
index d2a667a933bf..b6fc721127e2 100644
--- a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.cxx
+++ b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.cxx
@@ -841,9 +841,9 @@ TRT_ToT_dEdx::correctToT_corrRZ(const EventContext& ctx,
   double valToT = 0;
   if(m_divideByL){
     if (abs(hitPart)==1) // Barrel
-      valToT = fitFuncBarrel_corrRZL(gasType, hitRtrack, hitZ, Layer, StrawLayer);
+      valToT = fitFuncBarrel_corrRZL(ctx,gasType, hitRtrack, hitZ, Layer, StrawLayer);
     else // End-cap
-      valToT = fitFuncEndcap_corrRZL(gasType, hitRtrack, hitPosR, Layer, hitZ>0?1:(hitZ<0?-1:0));
+      valToT = fitFuncEndcap_corrRZL(ctx,gasType, hitRtrack, hitPosR, Layer, hitZ>0?1:(hitZ<0?-1:0));
   }else{
     if (abs(hitPart)==1) // Barrel
       valToT = fitFuncBarrel_corrRZ(gasType, hitRtrack, hitZ, Layer, StrawLayer);
@@ -985,13 +985,19 @@ double TRT_ToT_dEdx::fitFuncPol_corrRZ(EGasType gasType, int parameter, double d
   return a+b*r+c*r*r+d*r*r*r+e*r*r*r*r+f*r*r*r*r*r;
 }
 
-double TRT_ToT_dEdx::fitFuncEndcap_corrRZL(EGasType gasType, double driftRadius,double radialPosition, int Layer, int sign) const
+double
+TRT_ToT_dEdx::fitFuncEndcap_corrRZL(const EventContext& ctx,
+                                    EGasType gasType,
+                                    double driftRadius,
+                                    double radialPosition,
+                                    int Layer,
+                                    int sign) const
 {
   /*
    * T(r,R) = T0(r)+ a(r)*R
    */
 
-  SG::ReadCondHandle<TRTDedxcorrection> readHandle{m_ReadKey};
+  SG::ReadCondHandle<TRTDedxcorrection> readHandle{m_ReadKey,ctx};
   const TRTDedxcorrection* dEdxCorrection{*readHandle};
   if(dEdxCorrection==nullptr) {
     ATH_MSG_ERROR(" fitFuncEndcap_corrRZL: Could not find any dEdxCorrection in CondStore. Return zero.");
@@ -1030,12 +1036,18 @@ double TRT_ToT_dEdx::fitFuncEndcap_corrRZL(EGasType gasType, double driftRadius,
   return T0+T1+slope*radialPosition;
 }
 
-double TRT_ToT_dEdx::fitFuncBarrel_corrRZL(EGasType gasType, double driftRadius,double zPosition, int Layer, int Strawlayer) const
+double
+TRT_ToT_dEdx::fitFuncBarrel_corrRZL(const EventContext& ctx,
+                                    EGasType gasType,
+                                    double driftRadius,
+                                    double zPosition,
+                                    int Layer,
+                                    int Strawlayer) const
 {
   /*
    * T(r,z) = T0(r)+ b(r)*z*z
    */
-  SG::ReadCondHandle<TRTDedxcorrection> readHandle{m_ReadKey};
+  SG::ReadCondHandle<TRTDedxcorrection> readHandle{m_ReadKey,ctx};
   const TRTDedxcorrection* dEdxCorrection{*readHandle};
   if(dEdxCorrection==nullptr) {
     ATH_MSG_ERROR(" fitFuncBarrel_corrRZL: Could not find any dEdxCorrection in CondStore. Return zero.");
diff --git a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.h b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.h
index 05e33f860725..09902e5c1c75 100644
--- a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.h
+++ b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.h
@@ -296,8 +296,13 @@ private:
    * @param bool variable to specify whether data or MC correction
    * @return correction
    */
-  double fitFuncEndcap_corrRZL(EGasType gasType, double driftRadius,double radialPosition, int Layer, int sign) const;
-   
+  double fitFuncEndcap_corrRZL(const EventContext& ctx,
+                               EGasType gasType,
+                               double driftRadius,
+                               double radialPosition,
+                               int Layer,
+                               int sign) const;
+
   /**  
    * @brief function to compute correction factor in barrel region  
    * @param driftradius
@@ -308,7 +313,12 @@ private:
    * @param bool variable to specify whether data or MC correction  
    * @return correction
    */
-  double fitFuncBarrel_corrRZL(EGasType gasType, double driftRadius,double zPosition, int Layer, int StrawLayer) const;
+  double fitFuncBarrel_corrRZL(const EventContext& ctx,
+                               EGasType gasType,
+                               double driftRadius,
+                               double zPosition,
+                               int Layer,
+                               int StrawLayer) const;
 
   /* Calibration functions for occupancy corrections */
   double hitOccupancyCorrection(const Trk::TrackStateOnSurface *itr) const;
-- 
GitLab


From fa875b488a188d768e77751e4a64255ccc48512c Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Sat, 3 Oct 2020 10:28:20 -0400
Subject: [PATCH 216/403] ZdcIdentifier: Enable thread-safety checking.

Missed committing this file earlier.
---
 .../ZDC/ZdcIdentifier/ZdcIdentifier/ATLAS_CHECK_THREAD_SAFETY    | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 ForwardDetectors/ZDC/ZdcIdentifier/ZdcIdentifier/ATLAS_CHECK_THREAD_SAFETY

diff --git a/ForwardDetectors/ZDC/ZdcIdentifier/ZdcIdentifier/ATLAS_CHECK_THREAD_SAFETY b/ForwardDetectors/ZDC/ZdcIdentifier/ZdcIdentifier/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 000000000000..a62654cc2108
--- /dev/null
+++ b/ForwardDetectors/ZDC/ZdcIdentifier/ZdcIdentifier/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+ForwardDetectors/ZDC/ZdcIdentifier
-- 
GitLab


From 8d70f4a5943db3b5c9d55325fc8cbaf65f166307 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Sun, 27 Sep 2020 21:13:51 -0400
Subject: [PATCH 217/403] ZdcByteStream: Fix cppcheck warnings.

 - Prefer pre-increment (or range-for) to postincrement.
---
 .../ZdcByteStream/ZdcPpmSubBlock.h            |  1 +
 .../src/ZdcByteStreamReadV1V2Tool.cxx         | 25 ++++++++-----------
 .../ZdcByteStream/src/ZdcByteStreamTool.cxx   |  2 +-
 3 files changed, 13 insertions(+), 15 deletions(-)

diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/ZdcByteStream/ZdcPpmSubBlock.h b/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/ZdcByteStream/ZdcPpmSubBlock.h
index 7fd51026e2bd..00121b9cba74 100644
--- a/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/ZdcByteStream/ZdcPpmSubBlock.h
+++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/ZdcByteStream/ZdcPpmSubBlock.h
@@ -34,6 +34,7 @@ class ZdcPpmSubBlock : public ZdcSubBlock {
    ~ZdcPpmSubBlock();
 
    /// Clear all data
+   // cppcheck-suppress duplInheritedMember
    void clear();
 
    /// Store PPM header
diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/src/ZdcByteStreamReadV1V2Tool.cxx b/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/src/ZdcByteStreamReadV1V2Tool.cxx
index 77cd2678c4d4..02556856ad94 100644
--- a/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/src/ZdcByteStreamReadV1V2Tool.cxx
+++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/src/ZdcByteStreamReadV1V2Tool.cxx
@@ -1170,18 +1170,15 @@ ZdcDigitsCollection* ZdcByteStreamReadV1V2Tool::convertTT2ZD(xAOD::TriggerTowerC
   typedef std::map<uint32_t,ZdcDigits*> hashmapType;
   hashmapType digits_map;
   Identifier chan_id;
-  
-  xAOD::TriggerTowerContainer::iterator tt_itr = ttCollection->begin();
-  xAOD::TriggerTowerContainer::iterator tt_end = ttCollection->end();
-  
-  for (;tt_itr != tt_end;tt_itr++)
+
+  for (const xAOD::TriggerTower* tt : *ttCollection)
     {
       //std::cout << "dumping TT" << std::endl;
-      //std::cout << ZdcToString(*(*tt_itr) ) << std::endl;
+      //std::cout << ZdcToString(*tt ) << std::endl;
 
-      //uint32_t coolId = (*tt_itr).coolId();
-      //uint32_t coolId = (*tt_itr)->auxdata<uint32_t>("coolId");
-      uint32_t coolId = (*tt_itr)->coolId();
+      //uint32_t coolId = tt->coolId();
+      //uint32_t coolId = tt->auxdata<uint32_t>("coolId");
+      uint32_t coolId = tt->coolId();
       uint32_t pin = (coolId>>8) & 0xf;
       uint32_t asic = coolId & 0xf;
       uint32_t slinkChannel = asic*16 + pin;
@@ -1208,10 +1205,10 @@ ZdcDigitsCollection* ZdcByteStreamReadV1V2Tool::convertTT2ZD(xAOD::TriggerTowerC
       if (iter != digits_map.end())
 	{
 	  ATH_MSG_DEBUG("new auxdata for " << chan_id);
-	  if (gain==0&&delay==0) (*iter).second->set_digits_gain0_delay0( (*tt_itr)->adc() );
-	  if (gain==1&&delay==0) (*iter).second->set_digits_gain1_delay0( (*tt_itr)->adc() );
-	  if (gain==0&&delay==1) (*iter).second->set_digits_gain0_delay1( (*tt_itr)->adc() );
-	  if (gain==1&&delay==1) (*iter).second->set_digits_gain1_delay1( (*tt_itr)->adc() );
+	  if (gain==0&&delay==0) (*iter).second->set_digits_gain0_delay0( tt->adc() );
+	  if (gain==1&&delay==0) (*iter).second->set_digits_gain1_delay0( tt->adc() );
+	  if (gain==0&&delay==1) (*iter).second->set_digits_gain0_delay1( tt->adc() );
+	  if (gain==1&&delay==1) (*iter).second->set_digits_gain1_delay1( tt->adc() );
 	}
       
     }
@@ -1234,7 +1231,7 @@ ZdcDigitsCollection* ZdcByteStreamReadV1V2Tool::convertTT2ZD(xAOD::TriggerTowerC
 	((*iter).second)->print();
       */ 
       zdcCollection->push_back((*iter).second);
-      iter++;
+      ++iter;
     }
 
   return zdcCollection;
diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/src/ZdcByteStreamTool.cxx b/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/src/ZdcByteStreamTool.cxx
index 756ac9f9f949..8f77b1cab0b7 100644
--- a/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/src/ZdcByteStreamTool.cxx
+++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/src/ZdcByteStreamTool.cxx
@@ -561,7 +561,7 @@ StatusCode ZdcByteStreamTool::convert( const IROBDataProviderSvc::VROBFRAG& robF
   while (iter != iter_end)
     {
       ttCollection->push_back((*iter).second);
-      iter++;
+      ++iter;
     }
 
   msg(MSG::DEBUG) << "-->ZDC: Collection has " << ttCollection->size() << " elements " << endmsg;
-- 
GitLab


From 7ed9ac8ce1d7c3e7a76e5d2c2c2d6bbd5dbdd054 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Wed, 19 Aug 2020 23:29:35 -0400
Subject: [PATCH 218/403] xAODMissingET: Remove unneeded thread annotation.

Remove unneeded thread annotation.
---
 Event/xAOD/xAODMissingET/test/ut_edmTest.cxx | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/Event/xAOD/xAODMissingET/test/ut_edmTest.cxx b/Event/xAOD/xAODMissingET/test/ut_edmTest.cxx
index c660d7795388..0d6bcdea0b4e 100644
--- a/Event/xAOD/xAODMissingET/test/ut_edmTest.cxx
+++ b/Event/xAOD/xAODMissingET/test/ut_edmTest.cxx
@@ -2,14 +2,6 @@
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
-/* 
- * This test is no thread safe
- * but we are fine with it
- */
-
-#include "CxxUtils/checker_macros.h"
-ATLAS_NO_CHECK_FILE_THREAD_SAFETY;
-
 #define BOOST_TEST_DYN_LINK
 #define BOOST_TEST_MAIN
 #define BOOST_TEST_MODULE TEST_XAOD_MET_EDM
-- 
GitLab


From f45815e6c0a0a44165cec7314b74f0083fdfaefb Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Sat, 12 Sep 2020 16:11:25 -0400
Subject: [PATCH 219/403] G4AtlasTools: Enable thread-safety checking.

Enable thread-safety checking.
Suppress a few warnings due to Geant interface problems.
---
 Simulation/G4Atlas/G4AtlasTools/CMakeLists.txt  |  2 +-
 .../G4AtlasTools/ATLAS_CHECK_THREAD_SAFETY      |  1 +
 .../G4AtlasTools/src/G4ThreadInitTool.cxx       | 17 ++++++++++-------
 .../src/TightMuonElseNoFieldManager.cxx         | 11 +++++++++--
 4 files changed, 21 insertions(+), 10 deletions(-)
 create mode 100644 Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/ATLAS_CHECK_THREAD_SAFETY

diff --git a/Simulation/G4Atlas/G4AtlasTools/CMakeLists.txt b/Simulation/G4Atlas/G4AtlasTools/CMakeLists.txt
index ed856ea9949a..8f143bf38c42 100644
--- a/Simulation/G4Atlas/G4AtlasTools/CMakeLists.txt
+++ b/Simulation/G4Atlas/G4AtlasTools/CMakeLists.txt
@@ -21,7 +21,7 @@ atlas_add_library( G4AtlasToolsLib
                    PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
                    LINK_LIBRARIES ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${TBB_LIBRARIES} AthenaBaseComps G4AtlasInterfaces SubDetectorEnvelopesLib
-                   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel )
+                   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} CxxUtils GaudiKernel )
 
 atlas_add_component( G4AtlasTools
                      src/components/*.cxx
diff --git a/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/ATLAS_CHECK_THREAD_SAFETY b/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 000000000000..0f83ad2b32e3
--- /dev/null
+++ b/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Simulation/G4Atlas/G4AtlasTools
diff --git a/Simulation/G4Atlas/G4AtlasTools/src/G4ThreadInitTool.cxx b/Simulation/G4Atlas/G4AtlasTools/src/G4ThreadInitTool.cxx
index c9716c25046a..1d7cb7f3cc58 100644
--- a/Simulation/G4Atlas/G4AtlasTools/src/G4ThreadInitTool.cxx
+++ b/Simulation/G4Atlas/G4AtlasTools/src/G4ThreadInitTool.cxx
@@ -1,9 +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
 */
 
 // Main header include
 #include "G4ThreadInitTool.h"
+#include "CxxUtils/checker_macros.h"
 
 // Geant4 includes
 #include "G4WorkerRunManager.hh"
@@ -69,15 +70,17 @@ void G4ThreadInitTool::initThread()
 
   // Share detector from master with worker.
   ATH_MSG_INFO("Assigning detector construction");
-  const G4VUserDetectorConstruction* detector =
-    masterRM->GetUserDetectorConstruction();
   // I don't want to const-cast here, but this is what they do in G4's
   // StartThread function, so there is likely no alternative.
-  wrm->G4RunManager::SetUserInitialization
-    (const_cast<G4VUserDetectorConstruction*>(detector));
+  // Should not be a problem for threading.
+  G4VUserDetectorConstruction* detector ATLAS_THREAD_SAFE =
+    const_cast<G4VUserDetectorConstruction*> (masterRM->GetUserDetectorConstruction());
+  wrm->G4RunManager::SetUserInitialization (detector);
   // Share physics list from master with worker.
-  const G4VUserPhysicsList* physicslist = masterRM->GetUserPhysicsList();
-  wrm->SetUserInitialization(const_cast<G4VUserPhysicsList*>(physicslist));
+  // Should not be a problem for threading.
+  G4VUserPhysicsList* physicslist ATLAS_THREAD_SAFE =
+    const_cast<G4VUserPhysicsList*>(masterRM->GetUserPhysicsList());
+  wrm->SetUserInitialization(physicslist);
 
   // Build thread-local user actions - NOT CURRENTLY USED.
   if(masterRM->GetUserActionInitialization()) {
diff --git a/Simulation/G4Atlas/G4AtlasTools/src/TightMuonElseNoFieldManager.cxx b/Simulation/G4Atlas/G4AtlasTools/src/TightMuonElseNoFieldManager.cxx
index 2838d13fe216..97bccab6d462 100644
--- a/Simulation/G4Atlas/G4AtlasTools/src/TightMuonElseNoFieldManager.cxx
+++ b/Simulation/G4Atlas/G4AtlasTools/src/TightMuonElseNoFieldManager.cxx
@@ -1,8 +1,9 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TightMuonElseNoFieldManager.h"
+#include "CxxUtils/checker_macros.h"
 #include "G4Track.hh"
 #include "G4MuonPlus.hh"
 #include "G4MuonMinus.hh"
@@ -24,7 +25,13 @@ void TightMuonElseNoFieldManager::ConfigureForTrack(const G4Track * track)
 {
   // If they have not been set yet, get the settings for the global field manager
   if (nullptr==m_globalField){
-    m_globalField = const_cast<G4Field*>(GetDetectorField());
+    // Ok, we're just holding it and giving it back to the base class,
+    // and this method is not const.
+    // But the G4 base class interface makes this impossible to avoid
+    // (We could avoid it if G4FieldManager also had a non-const
+    // GetDetectorField.)
+    G4Field* field_nc ATLAS_THREAD_SAFE = const_cast<G4Field*>(GetDetectorField());
+    m_globalField = field_nc;
   }
 
   // If this is a muon, move it in the magnetic field; otherwise turn off the stepping
-- 
GitLab


From bfcd27a6d806cbdd15709e52666acf52fb16dc2e Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Fri, 2 Oct 2020 12:41:05 -0400
Subject: [PATCH 220/403] TrigCompositeUtils: Make test results reproducible.

TrigTraversal_test depends on printing lists of objects derived
from iterating over a set of pointers.  The ordering of this
is not reproducible.

Make the test reproducible by sorting these lists when we print them.
---
 .../TrigCompositeUtils/Root/NavGraph.cxx      |  15 ++-
 .../share/TrigTraversal_test.ref              | 127 +++++++++---------
 .../test/TrigTraversal_test.cxx               |  14 +-
 3 files changed, 89 insertions(+), 67 deletions(-)

diff --git a/Trigger/TrigSteer/TrigCompositeUtils/Root/NavGraph.cxx b/Trigger/TrigSteer/TrigCompositeUtils/Root/NavGraph.cxx
index cd7e5476855c..b142c11527a2 100644
--- a/Trigger/TrigSteer/TrigCompositeUtils/Root/NavGraph.cxx
+++ b/Trigger/TrigSteer/TrigCompositeUtils/Root/NavGraph.cxx
@@ -66,7 +66,18 @@ namespace TrigCompositeUtils {
 
 
   void NavGraph::printAllPaths(MsgStream& log, MSG::Level msgLevel) const {
-    for (const NavGraphNode* finalNode : finalNodes()) {
+    // finalNodes() is a set<NavGraphNode*>, so iteration over it
+    // will not be in any well-defined order.  Sort the set of pointers
+    // by name so that the output is predictable.
+    std::vector<const NavGraphNode*> nodes (finalNodes().begin(),
+                                            finalNodes().end());
+    std::sort (nodes.begin(), nodes.end(),
+               [] (const NavGraphNode* a, const NavGraphNode* b)
+               {
+                 return a->node()->name() < b->node()->name();
+               });
+
+    for (const NavGraphNode* finalNode : nodes) {
       recursivePrintNavPath(*finalNode, 0, log, msgLevel);
     }
   }
@@ -86,4 +97,4 @@ namespace TrigCompositeUtils {
     }
   }
 
-}
\ No newline at end of file
+}
diff --git a/Trigger/TrigSteer/TrigCompositeUtils/share/TrigTraversal_test.ref b/Trigger/TrigSteer/TrigCompositeUtils/share/TrigTraversal_test.ref
index dc820ea3ae65..90da1821f2ac 100644
--- a/Trigger/TrigSteer/TrigCompositeUtils/share/TrigTraversal_test.ref
+++ b/Trigger/TrigSteer/TrigCompositeUtils/share/TrigTraversal_test.ref
@@ -1,15 +1,15 @@
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr  (GaudiCoreSvc v33r1)
-                                          running on pc-tbed-pub-21.cern.ch on Mon Aug  3 16:45:27 2020
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
+                                          running on karma on Fri Oct  2 12:36:26 2020
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 EventLoopMgr      WARNING Unable to locate service "EventSelector" 
 EventLoopMgr      WARNING No events will be processed from external input.
 ApplicationMgr       INFO Application Manager Initialized successfully
 ApplicationMgr Ready
-ClassIDSvc           INFO  getRegistryEntries: read 5171 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 372 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 7552 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 379 CLIDRegistry entries for module ALL
 TrigTraversal        INFO HLT_mufast_chain
 TrigTraversal        INFO |-> HLTNav_MyDecisionContainer #3 (HLTPassRaw)
 TrigTraversal        INFO   |-> HLTNav_MyDecisionContainer #13 (MU_H_1__MU1)
@@ -97,46 +97,46 @@ TrigTraversal        INFO               |-> HLTNav_MyDecisionContainer #32 (MUEM
 TrigTraversal        INFO                 |-> HLTNav_MyDecisionContainer #31 (MUEM_F_1__EM0)
 TrigTraversal        INFO                   |-> HLTNav_MyDecisionContainer #2 (EM0)
 TrigTraversal        INFO [All passing features] HLT_mufast_chain features size:1
-  Feature 0 pt:20, state:ACTIVE
+  Feature  pt:20, state:ACTIVE
 
 TrigTraversal        INFO [All passing features] HLT_mu_chain features size:2
-  Feature 0 pt:20, state:ACTIVE
-  Feature 1 pt:21, state:ACTIVE
+  Feature  pt:20, state:ACTIVE
+  Feature  pt:21, state:ACTIVE
 
 TrigTraversal        INFO [All passing features] HLT_mu_em_chain features size:4
-  Feature 0 pt:21, state:ACTIVE
-  Feature 1 pt:20, state:ACTIVE
-  Feature 2 pt:31, state:ACTIVE
-  Feature 3 pt:30, state:ACTIVE
+  Feature  pt:20, state:ACTIVE
+  Feature  pt:21, state:ACTIVE
+  Feature  pt:30, state:ACTIVE
+  Feature  pt:31, state:ACTIVE
 
 TrigTraversal        INFO [All passing features] HLT_em_chain features size:2
-  Feature 0 pt:31, state:ACTIVE
-  Feature 1 pt:30, state:ACTIVE
+  Feature  pt:30, state:ACTIVE
+  Feature  pt:31, state:ACTIVE
 
 TrigTraversal        INFO [All passing features] All chains features size:4
-  Feature 0 pt:20, state:ACTIVE
-  Feature 1 pt:21, state:ACTIVE
-  Feature 2 pt:31, state:ACTIVE
-  Feature 3 pt:30, state:ACTIVE
+  Feature  pt:20, state:ACTIVE
+  Feature  pt:21, state:ACTIVE
+  Feature  pt:30, state:ACTIVE
+  Feature  pt:31, state:ACTIVE
 
 TrigTraversal        INFO [Final passing feature] HLT_mufast_chain features size:1
-  Feature 0 pt:20, state:ACTIVE
+  Feature  pt:20, state:ACTIVE
 
 TrigTraversal        INFO [Final passing feature] HLT_mu_chain features size:2
-  Feature 0 pt:20, state:ACTIVE
-  Feature 1 pt:21, state:ACTIVE
+  Feature  pt:20, state:ACTIVE
+  Feature  pt:21, state:ACTIVE
 
 TrigTraversal        INFO [Final passing feature] HLT_mu_em_chain features size:2
-  Feature 0 pt:21, state:ACTIVE
-  Feature 1 pt:31, state:ACTIVE
+  Feature  pt:21, state:ACTIVE
+  Feature  pt:31, state:ACTIVE
 
 TrigTraversal        INFO [Final passing feature] HLT_em_chain features size:1
-  Feature 0 pt:31, state:ACTIVE
+  Feature  pt:31, state:ACTIVE
 
 TrigTraversal        INFO [Final passing feature] All chains features size:3
-  Feature 0 pt:20, state:ACTIVE
-  Feature 1 pt:21, state:ACTIVE
-  Feature 2 pt:31, state:ACTIVE
+  Feature  pt:20, state:ACTIVE
+  Feature  pt:21, state:ACTIVE
+  Feature  pt:31, state:ACTIVE
 
  ---------- Now Include Failing Features 
 TrigTraversal        INFO HLT_mufast_chain
@@ -237,68 +237,69 @@ TrigTraversal        INFO             |-> HLTNav_MyDecisionContainer #33 (MUEM_H
 TrigTraversal        INFO               |-> HLTNav_MyDecisionContainer #32 (MUEM_IM_1__EM0)
 TrigTraversal        INFO                 |-> HLTNav_MyDecisionContainer #31 (MUEM_F_1__EM0)
 TrigTraversal        INFO                   |-> HLTNav_MyDecisionContainer #2 (EM0)
-TrigTraversal        INFO |-> HLTNav_MyDecisionContainer #6 (MU_H_1__MU0)
-TrigTraversal        INFO   |-> HLTNav_MyDecisionContainer #5 (MU_IM_1__MU0)
-TrigTraversal        INFO     |-> HLTNav_MyDecisionContainer #4 (MU_F_1__MU0)
-TrigTraversal        INFO       |-> HLTNav_MyDecisionContainer #0 (MU0)
 TrigTraversal        INFO |-> HLTNav_MyDecisionContainer #9 (MUEM_H_1__MU0)
 TrigTraversal        INFO   |-> HLTNav_MyDecisionContainer #8 (MUEM_IM_1__MU0)
 TrigTraversal        INFO     |-> HLTNav_MyDecisionContainer #7 (MUEM_F_1__MU0)
 TrigTraversal        INFO       |-> HLTNav_MyDecisionContainer #0 (MU0)
+TrigTraversal        INFO |-> HLTNav_MyDecisionContainer #6 (MU_H_1__MU0)
+TrigTraversal        INFO   |-> HLTNav_MyDecisionContainer #5 (MU_IM_1__MU0)
+TrigTraversal        INFO     |-> HLTNav_MyDecisionContainer #4 (MU_F_1__MU0)
+TrigTraversal        INFO       |-> HLTNav_MyDecisionContainer #0 (MU0)
 TrigTraversal        INFO [All passing/failing features] HLT_mufast_chain features size:2
-  Feature 0 pt:20, state:ACTIVE
-  Feature 1 pt:5, state:INACTIVE
+  Feature  pt:20, state:ACTIVE
+  Feature  pt:5, state:INACTIVE
 
 TrigTraversal        INFO [All passing/failing features] HLT_mu_chain features size:3
-  Feature 0 pt:20, state:ACTIVE
-  Feature 1 pt:21, state:ACTIVE
-  Feature 2 pt:5, state:INACTIVE
+  Feature  pt:20, state:ACTIVE
+  Feature  pt:21, state:ACTIVE
+  Feature  pt:5, state:INACTIVE
 
 TrigTraversal        INFO [All passing/failing features] HLT_mu_em_chain features size:5
-  Feature 0 pt:21, state:ACTIVE
-  Feature 1 pt:20, state:ACTIVE
-  Feature 2 pt:31, state:ACTIVE
-  Feature 3 pt:30, state:ACTIVE
-  Feature 4 pt:5, state:INACTIVE
+  Feature  pt:20, state:ACTIVE
+  Feature  pt:21, state:ACTIVE
+  Feature  pt:30, state:ACTIVE
+  Feature  pt:31, state:ACTIVE
+  Feature  pt:5, state:INACTIVE
 
 TrigTraversal        INFO [All passing/failing features] HLT_em_chain features size:2
-  Feature 0 pt:31, state:ACTIVE
-  Feature 1 pt:30, state:ACTIVE
+  Feature  pt:30, state:ACTIVE
+  Feature  pt:31, state:ACTIVE
 
 TrigTraversal        INFO [All passing/failing features] All chains features size:5
-  Feature 0 pt:20, state:ACTIVE
-  Feature 1 pt:21, state:ACTIVE
-  Feature 2 pt:31, state:ACTIVE
-  Feature 3 pt:30, state:ACTIVE
-  Feature 4 pt:5, state:INACTIVE
+  Feature  pt:20, state:ACTIVE
+  Feature  pt:21, state:ACTIVE
+  Feature  pt:30, state:ACTIVE
+  Feature  pt:31, state:ACTIVE
+  Feature  pt:5, state:INACTIVE
 
 TrigTraversal        INFO [Final passing/failing feature] HLT_mufast_chain features size:2
-  Feature 0 pt:20, state:ACTIVE
-  Feature 1 pt:5, state:INACTIVE
+  Feature  pt:20, state:ACTIVE
+  Feature  pt:5, state:INACTIVE
 
 TrigTraversal        INFO [Final passing/failing feature] HLT_mu_chain features size:3
-  Feature 0 pt:20, state:ACTIVE
-  Feature 1 pt:21, state:ACTIVE
-  Feature 2 pt:5, state:INACTIVE
+  Feature  pt:20, state:ACTIVE
+  Feature  pt:21, state:ACTIVE
+  Feature  pt:5, state:INACTIVE
 
 TrigTraversal        INFO [Final passing/failing feature] HLT_mu_em_chain features size:3
-  Feature 0 pt:21, state:ACTIVE
-  Feature 1 pt:31, state:ACTIVE
-  Feature 2 pt:5, state:INACTIVE
+  Feature  pt:21, state:ACTIVE
+  Feature  pt:31, state:ACTIVE
+  Feature  pt:5, state:INACTIVE
 
 TrigTraversal        INFO [Final passing/failing feature] HLT_em_chain features size:1
-  Feature 0 pt:31, state:ACTIVE
+  Feature  pt:31, state:ACTIVE
 
 TrigTraversal        INFO [Final passing/failing feature] All chains features size:4
-  Feature 0 pt:20, state:ACTIVE
-  Feature 1 pt:21, state:ACTIVE
-  Feature 2 pt:31, state:ACTIVE
-  Feature 3 pt:5, state:INACTIVE
+  Feature  pt:20, state:ACTIVE
+  Feature  pt:21, state:ACTIVE
+  Feature  pt:31, state:ACTIVE
+  Feature  pt:5, state:INACTIVE
 
  ---------- Check Explicit Type 
 TrigTraversal        INFO [Explicit Final Muon Features] HLT_mu_em_chain features size:2
-  Feature 0 pt:21, state:UNSET
-  Feature 1 pt:5, state:UNSET
+  Feature  pt:21, state:UNSET
+  Feature  pt:5, state:UNSET
 
 TrigTraversal        INFO [Explicit Final Electron Features] HLT_mu_em_chain features size:1
-  Feature 0 pt:31, state:UNSET
+  Feature  pt:31, state:UNSET
+
diff --git a/Trigger/TrigSteer/TrigCompositeUtils/test/TrigTraversal_test.cxx b/Trigger/TrigSteer/TrigCompositeUtils/test/TrigTraversal_test.cxx
index 7ae89a7d3f02..189d79312996 100644
--- a/Trigger/TrigSteer/TrigCompositeUtils/test/TrigTraversal_test.cxx
+++ b/Trigger/TrigSteer/TrigCompositeUtils/test/TrigTraversal_test.cxx
@@ -510,15 +510,25 @@ void printFeatures(const std::vector< TrigCompositeUtils::LinkInfo<CONTAINER> >&
   using namespace TrigCompositeUtils;
   std::stringstream ss;
   ss << name << " features size:" << featureContainer.size() << std::endl;
-  size_t count = 0;
+  std::vector<std::string> strings;
   for (const TrigCompositeUtils::LinkInfo<CONTAINER>& featureLinkInfo : featureContainer) {
+    std::stringstream ss1;
     std::string stateStr;
     switch (featureLinkInfo.state) {
       case ActiveState::ACTIVE: stateStr = "ACTIVE"; break;
       case ActiveState::INACTIVE: stateStr = "INACTIVE"; break;
       case ActiveState::UNSET: default: stateStr = "UNSET"; break;
     }
-    ss << "  Feature " << count++ << " pt:" << (*featureLinkInfo.link)->pt() << ", state:" << stateStr << std::endl;
+    ss1 << "  Feature  pt:" << (*featureLinkInfo.link)->pt() << ", state:" << stateStr << std::endl;
+    strings.push_back (ss1.str());
+  }
+
+  // The ordering of elements in featureContainer is unpredictable
+  // due to the iteration over set<NavGraphNode*>.
+  // Sort the results so that the output is reproducible.
+  std::sort (strings.begin(), strings.end());
+  for (const std::string& s : strings) {
+    ss << s;
   }
   log << MSG::INFO << ss.str() << endmsg;
 }
-- 
GitLab


From 8934f432063b20b9f00d6b5e9dbc69db18949fbd Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Sat, 3 Oct 2020 18:22:27 -0400
Subject: [PATCH 221/403] TrackVertexAssociationTool: Fix clang warnings.

If a class has  final destructor, the whole class should be final
(not possible to derive from it).

Also avoid using non-portable __attribute__.
---
 .../Root/MVAInputEvaluator.cxx                | 108 +++++++++---------
 1 file changed, 54 insertions(+), 54 deletions(-)

diff --git a/InnerDetector/InDetRecTools/TrackVertexAssociationTool/Root/MVAInputEvaluator.cxx b/InnerDetector/InDetRecTools/TrackVertexAssociationTool/Root/MVAInputEvaluator.cxx
index a2742eb20f70..55c81e9c2849 100644
--- a/InnerDetector/InDetRecTools/TrackVertexAssociationTool/Root/MVAInputEvaluator.cxx
+++ b/InnerDetector/InDetRecTools/TrackVertexAssociationTool/Root/MVAInputEvaluator.cxx
@@ -19,182 +19,182 @@ namespace {
 
 using MiniEvaluator = CP::MVAInputEvaluator::MiniEvaluator;
 
-class Pt: public MiniEvaluator {
+class Pt final : public MiniEvaluator {
 public:
   Pt() {};
   ~Pt() override final {};
-  float eval(const xAOD::TrackParticle& trk, __attribute__((unused)) const xAOD::Vertex& vx, __attribute__((unused)) const xAOD::EventInfo& evt) const override final {
+  virtual float eval(const xAOD::TrackParticle& trk, const xAOD::Vertex& /*vx*/, const xAOD::EventInfo& /*evt*/) const override final {
     return trk.pt();
   }
 };
 
-class Eta: public MiniEvaluator {
+class Eta final: public MiniEvaluator {
 public:
   Eta() {};
   ~Eta() override final {};
-  float eval(const xAOD::TrackParticle& trk, __attribute__((unused)) const xAOD::Vertex& vx, __attribute__((unused)) const xAOD::EventInfo& evt) const override final {
+  virtual float eval(const xAOD::TrackParticle& trk, const xAOD::Vertex& /*vx*/, const xAOD::EventInfo& /*evt*/) const override final {
     return trk.eta();
   }
 };
 
-class M: public MiniEvaluator {
+class M final: public MiniEvaluator {
 public:
   M() {};
   ~M() override final {};
-  float eval(const xAOD::TrackParticle& trk, __attribute__((unused)) const xAOD::Vertex& vx, __attribute__((unused)) const xAOD::EventInfo& evt) const override final {
+  virtual float eval(const xAOD::TrackParticle& trk, const xAOD::Vertex& /*vx*/, const xAOD::EventInfo& /*evt*/) const override final {
     return trk.m();
   }
 };
 
-class D0: public MiniEvaluator {
+class D0 final: public MiniEvaluator {
 public:
   D0() {};
   ~D0() override final {};
-  float eval(const xAOD::TrackParticle& trk, __attribute__((unused)) const xAOD::Vertex& vx, __attribute__((unused)) const xAOD::EventInfo& evt) const override final {
+  virtual float eval(const xAOD::TrackParticle& trk, const xAOD::Vertex& /*vx*/, const xAOD::EventInfo& /*evt*/) const override final {
     return trk.d0();
   }
 };
 
-class ErrD0: public MiniEvaluator {
+class ErrD0 final: public MiniEvaluator {
 public:
   ErrD0() {};
   ~ErrD0() override final {};
-  float eval(const xAOD::TrackParticle& trk, __attribute__((unused)) const xAOD::Vertex& vx, __attribute__((unused)) const xAOD::EventInfo& evt) const override final {
+  virtual float eval(const xAOD::TrackParticle& trk, const xAOD::Vertex& /*vx*/, const xAOD::EventInfo& /*evt*/) const override final {
     return std::sqrt(trk.definingParametersCovMatrix()(0, 0));
   }
 };
 
-class Z0: public MiniEvaluator {
+class Z0 final : public MiniEvaluator {
 public:
   Z0() {};
   ~Z0() override final {};
-  float eval(const xAOD::TrackParticle& trk, __attribute__((unused)) const xAOD::Vertex& vx, __attribute__((unused)) const xAOD::EventInfo& evt) const override final {
+  virtual float eval(const xAOD::TrackParticle& trk, const xAOD::Vertex& /*vx*/, const xAOD::EventInfo& /*evt*/) const override final {
     return trk.z0();
   }
 };
 
-class ErrZ0: public MiniEvaluator {
+class ErrZ0 final : public MiniEvaluator {
 public:
   ErrZ0() {};
   ~ErrZ0() override final {};
-  float eval(const xAOD::TrackParticle& trk, __attribute__((unused)) const xAOD::Vertex& vx, __attribute__((unused)) const xAOD::EventInfo& evt) const override final {
+  virtual float eval(const xAOD::TrackParticle& trk, const xAOD::Vertex& /*vx*/, const xAOD::EventInfo& /*evt*/) const override final {
     return std::sqrt(trk.definingParametersCovMatrix()(1, 1));
   }
 };
 
-class Phi: public MiniEvaluator {
+class Phi final : public MiniEvaluator {
 public:
   Phi() {};
   ~Phi() override final {};
-  float eval(const xAOD::TrackParticle& trk, __attribute__((unused)) const xAOD::Vertex& vx, __attribute__((unused)) const xAOD::EventInfo& evt) const override final {
+  virtual float eval(const xAOD::TrackParticle& trk, const xAOD::Vertex& /*vx*/, const xAOD::EventInfo& /*evt*/) const override final {
     return trk.phi();
   }
 };
 
-class ErrPhi: public MiniEvaluator {
+class ErrPhi final : public MiniEvaluator {
 public:
   ErrPhi() {};
   ~ErrPhi() override final {};
-  float eval(const xAOD::TrackParticle& trk, __attribute__((unused)) const xAOD::Vertex& vx, __attribute__((unused)) const xAOD::EventInfo& evt) const override final {
+  virtual float eval(const xAOD::TrackParticle& trk, const xAOD::Vertex& /*vx*/, const xAOD::EventInfo& /*evt*/) const override final {
     return std::sqrt(trk.definingParametersCovMatrix()(2, 2));
   }
 };
 
-class Theta: public MiniEvaluator {
+class Theta final : public MiniEvaluator {
 public:
   Theta() {};
   ~Theta() override final {};
-  float eval(const xAOD::TrackParticle& trk, __attribute__((unused)) const xAOD::Vertex& vx, __attribute__((unused)) const xAOD::EventInfo& evt) const override final {
+  virtual float eval(const xAOD::TrackParticle& trk, const xAOD::Vertex& /*vx*/, const xAOD::EventInfo& /*evt*/) const override final {
     return trk.theta();
   }
 };
 
-class ErrTheta: public MiniEvaluator {
+class ErrTheta final : public MiniEvaluator {
 public:
   ErrTheta() {};
   ~ErrTheta() override final {};
-  float eval(const xAOD::TrackParticle& trk, __attribute__((unused)) const xAOD::Vertex& vx, __attribute__((unused)) const xAOD::EventInfo& evt) const override final {
+  virtual float eval(const xAOD::TrackParticle& trk, const xAOD::Vertex& /*vx*/, const xAOD::EventInfo& /*evt*/) const override final {
     return std::sqrt(trk.definingParametersCovMatrix()(3, 3));
   }
 };
 
-class QOverP: public MiniEvaluator {
+class QOverP final : public MiniEvaluator {
 public:
   QOverP() {};
   ~QOverP() override final {};
-  float eval(const xAOD::TrackParticle& trk, __attribute__((unused)) const xAOD::Vertex& vx, __attribute__((unused)) const xAOD::EventInfo& evt) const override final {
+  virtual float eval(const xAOD::TrackParticle& trk, const xAOD::Vertex& /*vx*/, const xAOD::EventInfo& /*evt*/) const override final {
     return trk.qOverP();
   }
 };
 
-class ErrQOverP: public MiniEvaluator {
+class ErrQOverP final : public MiniEvaluator {
 public:
   ErrQOverP() {};
   ~ErrQOverP() override final {};
-  float eval(const xAOD::TrackParticle& trk, __attribute__((unused)) const xAOD::Vertex& vx, __attribute__((unused)) const xAOD::EventInfo& evt) const override final {
+  virtual float eval(const xAOD::TrackParticle& trk, const xAOD::Vertex& /*vx*/, const xAOD::EventInfo& /*evt*/) const override final {
     return std::sqrt(trk.definingParametersCovMatrix()(4, 4));
   }
 };
 
-class ChiSq: public MiniEvaluator {
+class ChiSq final : public MiniEvaluator {
 public:
   ChiSq() {};
   ~ChiSq() override final {};
-  float eval(const xAOD::TrackParticle& trk, __attribute__((unused)) const xAOD::Vertex& vx, __attribute__((unused)) const xAOD::EventInfo& evt) const override final {
+  virtual float eval(const xAOD::TrackParticle& trk, const xAOD::Vertex& /*vx*/, const xAOD::EventInfo& /*evt*/) const override final {
     return trk.chiSquared();
   }
 };
 
-class RedChiSq: public MiniEvaluator {
+class RedChiSq final : public MiniEvaluator {
 public:
   RedChiSq() {};
   ~RedChiSq() override final {};
-  float eval(const xAOD::TrackParticle& trk, __attribute__((unused)) const xAOD::Vertex& vx, __attribute__((unused)) const xAOD::EventInfo& evt) const override final {
+  virtual float eval(const xAOD::TrackParticle& trk, const xAOD::Vertex& /*vx*/, const xAOD::EventInfo& /*evt*/) const override final {
     return (trk.chiSquared() / trk.numberDoF());
   }
 };
 
-class D0Sig: public MiniEvaluator {
+class D0Sig final : public MiniEvaluator {
 public:
   D0Sig() {};
   ~D0Sig() override final {};
-  float eval(const xAOD::TrackParticle& trk, __attribute__((unused)) const xAOD::Vertex& vx, const xAOD::EventInfo& evt) const override final {
+  virtual float eval(const xAOD::TrackParticle& trk, const xAOD::Vertex& /*vx*/, const xAOD::EventInfo& evt) const override final {
     return xAOD::TrackingHelpers::d0significance(&trk, evt.beamPosSigmaX(), evt.beamPosSigmaY(), evt.beamPosSigmaXY());
   }
 };
 
-class DZ: public MiniEvaluator {
+class DZ final : public MiniEvaluator {
 public:
   DZ() {};
   ~DZ() override final {};
-  float eval(const xAOD::TrackParticle& trk, const xAOD::Vertex& vx, __attribute__((unused)) const xAOD::EventInfo& evt) const override final {
+  virtual float eval(const xAOD::TrackParticle& trk, const xAOD::Vertex& vx, const xAOD::EventInfo& /*evt*/) const override final {
     return (trk.z0() + trk.vz() - vx.z());
   }
 };
 
-class ErrDZ: public MiniEvaluator {
+class ErrDZ final : public MiniEvaluator {
 public:
   ErrDZ() {};
   ~ErrDZ() override final {};
-  float eval(const xAOD::TrackParticle& trk, const xAOD::Vertex& vx, __attribute__((unused)) const xAOD::EventInfo& evt) const override final {
+  virtual float eval(const xAOD::TrackParticle& trk, const xAOD::Vertex& vx, const xAOD::EventInfo& /*evt*/) const override final {
     return std::sqrt(trk.definingParametersCovMatrix()(1, 1) + vx.covariancePosition()(2, 2));
   }
 };
 
-class DZSinTheta: public MiniEvaluator {
+class DZSinTheta final : public MiniEvaluator {
 public:
   DZSinTheta() {};
   ~DZSinTheta() override final {};
-  float eval(const xAOD::TrackParticle& trk, const xAOD::Vertex& vx, __attribute__((unused)) const xAOD::EventInfo& evt) const override final {
+  virtual float eval(const xAOD::TrackParticle& trk, const xAOD::Vertex& vx, const xAOD::EventInfo& /*evt*/) const override final {
     return (trk.z0() + trk.vz() - vx.z()) * std::sin(trk.theta());
   }
 };
 
-class ErrDZSinTheta: public MiniEvaluator {
+class ErrDZSinTheta final : public MiniEvaluator {
 public:
   ErrDZSinTheta() {};
   ~ErrDZSinTheta() override final {};
-  float eval(const xAOD::TrackParticle& trk, const xAOD::Vertex& vx, __attribute__((unused)) const xAOD::EventInfo& evt) const override final {
+  virtual float eval(const xAOD::TrackParticle& trk, const xAOD::Vertex& vx, const xAOD::EventInfo& /*evt*/) const override final {
     float dz         = (trk.z0() + trk.vz() - vx.z());
     float sinTheta   = std::sin(trk.theta());
     float cosTheta   = std::cos(trk.theta());
@@ -226,11 +226,11 @@ int inVector(const xAOD::TrackParticle* trk, const std::vector<const xAOD::Track
   return -1;
 }
 
-class FitWeight: public MiniEvaluator {
+class FitWeight final : public MiniEvaluator {
 public:
   FitWeight() {};
   ~FitWeight() override final {};
-  float eval(const xAOD::TrackParticle& trk, const xAOD::Vertex& vx, __attribute__((unused)) const xAOD::EventInfo& evt) const override final {
+  virtual float eval(const xAOD::TrackParticle& trk, const xAOD::Vertex& vx, const xAOD::EventInfo& /*evt*/) const override final {
     std::vector<const xAOD::TrackParticle*> fitTrks = toVector(vx.trackParticleLinks());
     float weight = 0.0;
     int pos = inVector(&trk, fitTrks);
@@ -241,56 +241,56 @@ public:
   }
 };
 
-class VxX: public MiniEvaluator {
+class VxX final : public MiniEvaluator {
 public:
   VxX() {};
   ~VxX() override final {};
-  float eval(__attribute__((unused)) const xAOD::TrackParticle& trk, const xAOD::Vertex& vx, __attribute__((unused)) const xAOD::EventInfo& evt) const override final {
+  virtual float eval(const xAOD::TrackParticle& /*trk*/, const xAOD::Vertex& vx, const xAOD::EventInfo& /*evt*/) const override final {
     return vx.x();
   }
 };
 
-class ErrVxX: public MiniEvaluator {
+class ErrVxX final : public MiniEvaluator {
 public:
   ErrVxX() {};
   ~ErrVxX() override final {};
-  float eval(__attribute__((unused)) const xAOD::TrackParticle& trk, const xAOD::Vertex& vx, __attribute__((unused)) const xAOD::EventInfo& evt) const override final {
+  virtual float eval(const xAOD::TrackParticle& /*trk*/, const xAOD::Vertex& vx, const xAOD::EventInfo& /*evt*/) const override final {
     return std::sqrt(vx.covariancePosition()(0, 0));
   }
 };
 
-class VxY: public MiniEvaluator {
+class VxY final : public MiniEvaluator {
 public:
   VxY() {};
   ~VxY() override final {};
-  float eval(__attribute__((unused)) const xAOD::TrackParticle& trk, const xAOD::Vertex& vx, __attribute__((unused)) const xAOD::EventInfo& evt) const override final {
+  virtual float eval(const xAOD::TrackParticle& /*trk*/, const xAOD::Vertex& vx, const xAOD::EventInfo& /*evt*/) const override final {
     return vx.y();
   }
 };
 
-class ErrVxY: public MiniEvaluator {
+class ErrVxY final : public MiniEvaluator {
 public:
   ErrVxY() {};
   ~ErrVxY() override final {};
-  float eval(__attribute__((unused)) const xAOD::TrackParticle& trk, const xAOD::Vertex& vx, __attribute__((unused)) const xAOD::EventInfo& evt) const override final {
+  virtual float eval(const xAOD::TrackParticle& /*trk*/, const xAOD::Vertex& vx, const xAOD::EventInfo& /*evt*/) const override final {
     return std::sqrt(vx.covariancePosition()(1, 1));
   }
 };
 
-class VxZ: public MiniEvaluator {
+class VxZ final : public MiniEvaluator {
 public:
   VxZ() {};
   ~VxZ() override final {};
-  float eval(__attribute__((unused)) const xAOD::TrackParticle& trk, const xAOD::Vertex& vx, __attribute__((unused)) const xAOD::EventInfo& evt) const override final {
+  virtual float eval(const xAOD::TrackParticle& /*trk*/, const xAOD::Vertex& vx, const xAOD::EventInfo& /*evt*/) const override final {
     return vx.z();
   }
 };
 
-class ErrVxZ: public MiniEvaluator {
+class ErrVxZ final : public MiniEvaluator {
 public:
   ErrVxZ() {};
   ~ErrVxZ() override final {};
-  float eval(__attribute__((unused)) const xAOD::TrackParticle& trk, const xAOD::Vertex& vx, __attribute__((unused)) const xAOD::EventInfo& evt) const override final {
+  virtual float eval(const xAOD::TrackParticle& /*trk*/, const xAOD::Vertex& vx, const xAOD::EventInfo& /*evt*/) const override final {
     return std::sqrt(vx.covariancePosition()(2, 2));
   }
 };
-- 
GitLab


From c7451c14c31e7770e3791900a6b9b4bb0d65c73a Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 5 Oct 2020 11:02:00 -0400
Subject: [PATCH 222/403] egammaD3PDAnalysis: Remove egammaShowerDepthAlg.

egammaShowerDepthAlg needs to be reworked to work properly
with the new ToolWithConstants.  For now, just remove it.
---
 .../egammaD3PDAnalysis/python/__init__.py     |  3 -
 .../python/egammaShowerDepthAlg.py            | 36 --------
 .../python/egammaShowerDepthConfig.py         | 59 -------------
 .../components/egammaD3PDAnalysis_entries.cxx |  2 -
 .../src/egammaShowerDepthAlg.cxx              | 67 ---------------
 .../src/egammaShowerDepthAlg.h                | 85 -------------------
 6 files changed, 252 deletions(-)
 delete mode 100644 PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/python/egammaShowerDepthAlg.py
 delete mode 100644 PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/python/egammaShowerDepthConfig.py
 delete mode 100644 PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/egammaShowerDepthAlg.cxx
 delete mode 100644 PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/egammaShowerDepthAlg.h

diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/python/__init__.py b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/python/__init__.py
index 21a086f03bcb..18b5e91cbf2c 100644
--- a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/python/__init__.py
+++ b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/python/__init__.py
@@ -16,6 +16,3 @@ for k, v in egammaD3PDAnalysisConf.__dict__.items():
     if k.startswith ('D3PD__'):
         globals()[k[6:]] = v
 
-# Bring this into this scope.
-from .egammaShowerDepthAlg import egammaShowerDepthAlg
-
diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/python/egammaShowerDepthAlg.py b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/python/egammaShowerDepthAlg.py
deleted file mode 100644
index a0bbe1380d6d..000000000000
--- a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/python/egammaShowerDepthAlg.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-
-# $Id$
-#
-# @file egammaD3PDMakerAnalysis/python/egammaShowerDepthAlg.py
-# @author scott snyder <snyder@bnl.gov>
-# @date Aug, 2010
-# @brief Configure the shower depth algorithm.
-#
-
-
-from egammaD3PDAnalysis import egammaD3PDAnalysisConf
-from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-from AthenaCommon.GlobalFlags   import globalflags
-
-def egammaShowerDepthAlg (name, **kwin):
-    # Set up database access.
-    if globalflags.DataSource() == 'data':    
-        folder  = '/CALO/CaloSwClusterCorrections/calhits'
-    else:
-        folder  = '/CALO/Ofl/CaloSwClusterCorrections/calhits'
-    tag = D3PDMakerFlags.EgammaShowerDepthTag()
-    if not tag:
-        tag = '@GLOBAL'
-
-    # Create the algorithm.
-    kw = {'prefix' : 'ele55.'}
-    kw.update (kwin)
-    alg = egammaD3PDAnalysisConf.D3PD__egammaShowerDepthAlg (name, **kw)
-
-    from CaloClusterCorrection.common import config_from_cool
-    config_from_cool (alg, folder, tag)
-
-    return alg
-
-    
diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/python/egammaShowerDepthConfig.py b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/python/egammaShowerDepthConfig.py
deleted file mode 100644
index d28fb244266b..000000000000
--- a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/python/egammaShowerDepthConfig.py
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# $Id$
-#
-# @file egammaD3PDAnalysis/python/egammaShowerDepthConfig.py
-# @author scott snyder <snyder@bnl.gov>
-# @date Nov, 2011
-# @brief Configure egammaShowerDepthAlg to fill UserData.
-#
-
-
-from D3PDMakerConfig.D3PDMakerFlags          import D3PDMakerFlags
-from D3PDMakerCoreComps.resolveSGKey         import resolveSGKey
-from AthenaCommon.AlgSequence                import AlgSequence
-import D3PDMakerCoreComps
-import egammaD3PDAnalysis
-
-
-def egammaShowerDepthConfig \
-        (seq = AlgSequence(D3PDMakerFlags.PreD3PDAlgSeqName()),
-         prefix = '',
-         sgkey = D3PDMakerFlags.ElectronSGKey(),
-         typeName = 'DataVector<xAOD::Electron_v1>',
-         allowMissing = False):
-    """Configure egammaShowerDepthAlg for D3PD making.
-
-    SEQ is the Gaudi sequence to which the algorithm should be added.
-    Default is that given by PreD3PDAlgSeqName.
-
-    PREFIX is a prefix to add to the name of the algorithm scheduled.
-
-    SGKEY/TYPENAME is the StoreGate key of the input electron container
-    and the name of its type.
-
-    If ALLOWMISSING is true, don't fail if the SG key doesn't exist.
-"""
-
-    if (not D3PDMakerFlags.MakeEgammaUserData() or
-        D3PDMakerFlags.HaveEgammaUserData()):
-        return
-
-    DVGetter = D3PDMakerCoreComps.SGDataVectorGetterTool
-    resolved_sgkey = resolveSGKey (typeName, sgkey)
-    auxprefix = (D3PDMakerFlags.EgammaUserDataPrefix() + '_' +
-                 resolved_sgkey + '_')
-
-    depthname = 'egammaShowerDepthAlg_' + resolved_sgkey
-    if not hasattr (seq, depthname):
-        seq += egammaD3PDAnalysis.egammaShowerDepthAlg \
-               (depthname,
-                Getter = DVGetter
-                  (prefix + 'egammaShowerDepthGetter',
-                   TypeName = typeName,
-                   SGKey = sgkey),
-                AllowMissing = allowMissing,
-                AuxPrefix = auxprefix
-                )
-
-    return
diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/components/egammaD3PDAnalysis_entries.cxx b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/components/egammaD3PDAnalysis_entries.cxx
index 51a82d7f0521..8ab296c25ee9 100644
--- a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/components/egammaD3PDAnalysis_entries.cxx
+++ b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/components/egammaD3PDAnalysis_entries.cxx
@@ -1,5 +1,4 @@
 #include "../egammaDeltaEmax2Alg.h"
-#include "../egammaShowerDepthAlg.h"
 #include "../PhotonTruthAlg.h"
 #include "../ElectronRedoOQAlg.h"
 #include "../PhotonRedoOQAlg.h"
@@ -16,7 +15,6 @@
 
 
 DECLARE_COMPONENT( D3PD::egammaDeltaEmax2Alg )
-DECLARE_COMPONENT( D3PD::egammaShowerDepthAlg )
 DECLARE_COMPONENT( D3PD::PhotonTruthAlg )
 DECLARE_COMPONENT( D3PD::ElectronRedoOQAlg )
 DECLARE_COMPONENT( D3PD::PhotonRedoOQAlg )
diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/egammaShowerDepthAlg.cxx b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/egammaShowerDepthAlg.cxx
deleted file mode 100644
index 3a832b914c27..000000000000
--- a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/egammaShowerDepthAlg.cxx
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
-/**
- * @file egammaD3PDAnalysis/src/egammaShowerDepthAlg.cxx
- * @author scott snyder <snyder@bnl.gov>
- * @date Jul, 2010
- * @brief Store in UserData the shower depth for an egamma object.
- */
-
-
-#include "egammaShowerDepthAlg.h"
-#include "D3PDMakerInterfaces/ICollectionGetterTool.h"
-#include "xAODEgamma/Egamma.h"
-#include "AthenaKernel/errorcheck.h"
-#include "GaudiKernel/ThreadLocalContext.h"
-
-
-namespace D3PD {
-
-
-/**
- * @brief Standard Gaudi @c initialize method.
- */
-StatusCode egammaShowerDepthAlg::initialize()
-{
-  CHECK( base_class::initialize() );
-  CHECK( m_getter.retrieve() );
-  CHECK( m_getter->configureD3PD<xAOD::Egamma>() );
-
-  return StatusCode::SUCCESS;
-}
-
-
-/**
- * @brief Standard Gaudi @c execute method.
- */
-StatusCode egammaShowerDepthAlg::execute()
-{
-  Context myctx = context (Gaudi::Hive::currentContext());
-
-  xAOD::Egamma::Decorator<float> depth (m_auxPrefix + "calibHitsShowerDepth");
-
-  // FIXME: Using the adjusted eta value isn't implemented.
-  if (!m_use_raw_eta(myctx)) {
-    REPORT_MESSAGE (MSG::WARNING) << "use_raw_eta==false is not implemented.";
-  }
-
-  CHECK( m_getter->reset (m_allowMissing) );
-  while (const xAOD::Egamma* eg = m_getter->next<xAOD::Egamma>())
-  {
-    const xAOD::CaloCluster* cl = eg->caloCluster();
-    depth(*eg) = -999;
-    if (cl)
-      depth(*eg) = m_depthCalc.depth (std::abs (cl->etaBE(2)),
-                                      m_eta_start_crack(myctx),
-                                      m_eta_end_crack(myctx),
-                                      m_sampling_depth(myctx),
-                                      m_etamax(myctx),
-                                      cl, msg());
-  }
-
-  return StatusCode::SUCCESS;
-}
-
-
-} // namespace D3PD
diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/egammaShowerDepthAlg.h b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/egammaShowerDepthAlg.h
deleted file mode 100644
index d14db8596d68..000000000000
--- a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/egammaShowerDepthAlg.h
+++ /dev/null
@@ -1,85 +0,0 @@
-// This file's extension implies that it's C, but it's really -*- C++ -*-.
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
-/**
- * @file egammaD3PDAnalysis/src/egammaShowerDepthAlg.h
- * @author scott snyder <snyder@bnl.gov>
- * @date Jul, 2010
- * @brief Store in UserData the shower depth for an egamma object.
- */
-
-
-#ifndef EGAMMAD3PDANALYSIS_EGAMMASHOWERDEPTHALG_H
-#define EGAMMAD3PDANALYSIS_EGAMMASHOWERDEPTHALG_H
-
-
-#include "AthenaBaseComps/AthAlgorithm.h"
-#include "CaloClusterCorrection/CaloSwCalibHitsShowerDepth.h"
-#include "CaloUtils/ToolWithConstants.h"
-#include "GaudiKernel/ToolHandle.h"
-
-
-namespace D3PD {
-
-
-class ICollectionGetterTool;
-
-
-/**
- * @brief Store in UserData the shower depth for an egamma object.
- */
-class egammaShowerDepthAlg
-  : public CaloUtils::ToolWithConstants<AthAlgorithm>
-{
-public:
-  /// Inherit constructor.
-  using base_class::base_class;
-
-
-  /// Standard Gaudi @c initialize method.
-  virtual StatusCode initialize() override;
-
-
-  /// Standard Gaudi @c execute method.
-  virtual StatusCode execute() override;
-
-
-private:
-  /// Property: Prefix to add to aux data items.
-  StringProperty m_auxPrefix
-  { this, "AuxPrefix", "", "Prefix to add to aux data items." };
-
-  /// Property: Getter for input egamma objects.
-  ToolHandle<ICollectionGetterTool> m_getter
-  { this, "Getter", "", "Getter instance for the input egamma objects." };
-
-  /// Property: If true, don't complain if input objects are missing.
-  BooleanProperty m_allowMissing
-  { this, "AllowMissing", false, "If true, don't complain if input objects are missing." };
-
-  /// Property: Table of sampling depth weights.
-  Constant<CxxUtils::Array<2> > m_sampling_depth { this, "sampling_depth" };
-
-  /// Property: Eta of the start of the crack.
-  Constant<float> m_eta_start_crack { this, "eta_start_crack" };
-
-  /// Property: Eta of the end of the crack.
-  Constant<float> m_eta_end_crack { this, "eta_end_crack" };
-
-  /// Property: Maximum eta range of the depth weight table.
-  Constant<float> m_etamax { this, "etamax" };
-
-  /// Property: Use raw eta value for region comparisons?
-  // FIXME: The false setting of this is not implemented.
-  Constant<bool> m_use_raw_eta { this, "use_raw_eta" };
-
-  /// Depth calculator.
-  CaloClusterCorr::CaloSwCalibHitsShowerDepth m_depthCalc;
-};
-
-
-} // namespace D3PD
-
-
-#endif // not EGAMMAD3PDANALYSIS_EGAMMASHOWERDEPTHALG_H
-- 
GitLab


From b0ff7cf1b8d0c65498a354e69f5e9f395ce69a32 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 5 Oct 2020 11:07:55 -0400
Subject: [PATCH 223/403] egammaD3PDMaker: Remove use of egammaShowerDepthAlg.

egammaShowerDepthAlg needs to be reworked to work properly
with the new ToolWithConstants.  For now, just remove it.
---
 .../egammaD3PDMaker/python/ElectronD3PDObject.py       | 10 ----------
 .../egammaD3PDMaker/python/PhotonD3PDObject.py         |  8 --------
 2 files changed, 18 deletions(-)

diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/ElectronD3PDObject.py b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/ElectronD3PDObject.py
index 70032fc0ce29..a7327726cea8 100644
--- a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/ElectronD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/ElectronD3PDObject.py
@@ -358,16 +358,6 @@ if D3PDMakerFlags.HaveEgammaUserData() or D3PDMakerFlags.MakeEgammaUserData():
     #                           ])
 
 
-    defineBlockAndAlg \
-      (ElectronD3PDObject,
-       1, 'UDShowerDepth',
-       D3PDMakerCoreComps.AuxDataFillerTool,
-       'egammaShowerDepthConfig',
-       AuxPrefix = auxprefix,
-       Vars = ['calibHitsShowerDepth #Shower depth as defined by the calib hits cluster correction',
-               ])
-
-
     # `target' arg needs to be passed in from the caller;
     # otherwise, we don't make this block.
     def _jetAssocLevel (reqlev, args):
diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/PhotonD3PDObject.py b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/PhotonD3PDObject.py
index 7ff696c52cc4..8362699959af 100644
--- a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/PhotonD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/PhotonD3PDObject.py
@@ -370,14 +370,6 @@ if D3PDMakerFlags.HaveEgammaUserData() or D3PDMakerFlags.MakeEgammaUserData():
                        AuxPrefix = auxprefix,
                        Vars = ['deltaEmax2',
                                ])
-    defineBlockAndAlg \
-      (PhotonD3PDObject,
-       1, 'UDShowerDepth',
-       D3PDMakerCoreComps.AuxDataFillerTool,
-       'egammaShowerDepthConfig',
-       AuxPrefix = auxprefix,
-       Vars = ['calibHitsShowerDepth #Shower depth as defined by the calib hits cluster correction',
-               ])
 
         
 
-- 
GitLab


From 17a619c56730e5c5c44bc8784c7790b20087adc6 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Mon, 5 Oct 2020 15:48:58 +0200
Subject: [PATCH 224/403] ControlTest: Remove reference to StoreGate.h.

Remove reference to obsolete header StoreGate.h.
---
 AtlasTest/ControlTest/test/StoreGateSvcClient_test.cxx | 1 -
 1 file changed, 1 deletion(-)

diff --git a/AtlasTest/ControlTest/test/StoreGateSvcClient_test.cxx b/AtlasTest/ControlTest/test/StoreGateSvcClient_test.cxx
index 3801d5de860f..85ad686f6608 100644
--- a/AtlasTest/ControlTest/test/StoreGateSvcClient_test.cxx
+++ b/AtlasTest/ControlTest/test/StoreGateSvcClient_test.cxx
@@ -16,7 +16,6 @@
 #include <cassert>
 
 
-#include "StoreGate/StoreGate.h"
 #include "StoreGate/StoreGateSvc.h"
 #include "StoreGate/SGtests.h"
 #include "AthenaKernel/ILockable.h"
-- 
GitLab


From ade23b9dd8a2e55f5546d1ade6bc2d50b0633a13 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Mon, 5 Oct 2020 15:52:12 +0200
Subject: [PATCH 225/403] AthViews: Remove reference to StoreGate.h.

Remove reference to obsolete header StoreGate.h.
---
 Control/AthViews/test/ViewLinking_test.cxx | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Control/AthViews/test/ViewLinking_test.cxx b/Control/AthViews/test/ViewLinking_test.cxx
index 565846bbc34c..eee8ae53b168 100644
--- a/Control/AthViews/test/ViewLinking_test.cxx
+++ b/Control/AthViews/test/ViewLinking_test.cxx
@@ -4,7 +4,6 @@
 
 #include "GaudiKernel/ClassID.h"
 #include "GaudiKernel/MsgStream.h"
-#include "StoreGate/StoreGate.h"
 #include "StoreGate/StoreGateSvc.h"
 #include "AthenaKernel/getMessageSvc.h"
 #include "StoreGate/ReadHandle.h"
-- 
GitLab


From c734fe0f4f37107d090d640fe6ce6622aacfa13d Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Mon, 5 Oct 2020 15:50:58 +0200
Subject: [PATCH 226/403] CaloClusterCorrectiont: Remove reference to
 StoreGate.h.

Remove reference to obsolete header StoreGate.h.
---
 Calorimeter/CaloClusterCorrection/src/CaloClusterLogPos.cxx      | 1 -
 .../CaloClusterCorrection/src/CaloSwTransitionRegionsCorr.cxx    | 1 -
 2 files changed, 2 deletions(-)

diff --git a/Calorimeter/CaloClusterCorrection/src/CaloClusterLogPos.cxx b/Calorimeter/CaloClusterCorrection/src/CaloClusterLogPos.cxx
index 035deb219b6e..81159bacf912 100644
--- a/Calorimeter/CaloClusterCorrection/src/CaloClusterLogPos.cxx
+++ b/Calorimeter/CaloClusterCorrection/src/CaloClusterLogPos.cxx
@@ -8,7 +8,6 @@
 #include "CaloIdentifier/CaloCell_ID.h"
 #include "GaudiKernel/MsgStream.h"
 #include <CLHEP/Units/SystemOfUnits.h>
-#include "StoreGate/StoreGate.h"
 
 using CLHEP::deg;
 
diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwTransitionRegionsCorr.cxx b/Calorimeter/CaloClusterCorrection/src/CaloSwTransitionRegionsCorr.cxx
index 28321b8e202f..7a304c60bfa3 100755
--- a/Calorimeter/CaloClusterCorrection/src/CaloSwTransitionRegionsCorr.cxx
+++ b/Calorimeter/CaloClusterCorrection/src/CaloSwTransitionRegionsCorr.cxx
@@ -20,7 +20,6 @@ PURPOSE:  Effective corrections for transition regions like eta=0
 
 #include "CaloSwTransitionRegionsCorr.h"
 #include "GaudiKernel/StatusCode.h"
-#include "StoreGate/StoreGate.h" 
 #include "GaudiKernel/MsgStream.h"
 #include <iostream>
 
-- 
GitLab


From ae8b8bb2bb26da07654ac3aade12770b6e4ab0fd Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Mon, 5 Oct 2020 15:55:44 +0200
Subject: [PATCH 227/403] LArReadoutGeometry: Remove reference to StoreGate.h.

Remove reference to obsolete header StoreGate.h.
---
 LArCalorimeter/LArGeoModel/LArReadoutGeometry/doc/packagedoc.h | 3 +--
 .../LArGeoModel/LArReadoutGeometry/src/EMBDetectorManager.cxx  | 3 +--
 .../LArGeoModel/LArReadoutGeometry/src/FCALDetectorManager.cxx | 3 +--
 LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCALTile.cxx | 3 +--
 .../LArGeoModel/LArReadoutGeometry/src/HECDetectorManager.cxx  | 3 +--
 5 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/doc/packagedoc.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/doc/packagedoc.h
index 5a305a276041..60ee1f1b0ef5 100644
--- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/doc/packagedoc.h
+++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/doc/packagedoc.h
@@ -30,8 +30,7 @@ following access pattern:
 
 <pre>
   const EMBDetectorManager * manager=NULL;
-  StoreGateSvc *detStore = StoreGate::pointer("DetectorStore");
-  detStore->retrieve(manager);
+  ATH_CHECK( detStore()->retrieve(manager) );
   if (manager) {
   }
 </pre>
diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMBDetectorManager.cxx b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMBDetectorManager.cxx
index 42e133934483..cbfe87f0a0f9 100755
--- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMBDetectorManager.cxx
+++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMBDetectorManager.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 "GaudiKernel/MsgStream.h"
@@ -16,7 +16,6 @@
 
 #include "LArReadoutGeometry/EMBDetectorManager.h"
 #include "LArHV/LArHVManager.h"
-#include "StoreGate/StoreGate.h"
 
 class OrderBySampling {
     
diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCALDetectorManager.cxx b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCALDetectorManager.cxx
index c25f0991baa8..814772c20604 100755
--- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCALDetectorManager.cxx
+++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCALDetectorManager.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 "GaudiKernel/Bootstrap.h"
@@ -8,7 +8,6 @@
 #include "LArReadoutGeometry/FCALDetectorManager.h"
 #include "LArReadoutGeometry/FCAL_ChannelMap.h"
 #include "LArHV/LArHVManager.h"
-#include "StoreGate/StoreGate.h"
 
 FCALDetectorManager::FCALDetectorManager (const FCALHVManager* hvManager)
   : GeoVDetectorManager()
diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCALTile.cxx b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCALTile.cxx
index 1fd2702b74e6..34c3717d95c9 100755
--- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCALTile.cxx
+++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCALTile.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 "LArReadoutGeometry/FCALTile.h"
@@ -11,7 +11,6 @@
 #include "GaudiKernel/Bootstrap.h"
 #include "GaudiKernel/ISvcLocator.h"
 #include "StoreGate/StoreGateSvc.h"
-#include "StoreGate/StoreGate.h"
 
 FCALTile::FCALTile(const FCALTile &right)
   :m_module(right.m_module),m_tile(right.m_tile)
diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECDetectorManager.cxx b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECDetectorManager.cxx
index acaf30b356c2..a62161e8d07b 100755
--- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECDetectorManager.cxx
+++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECDetectorManager.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 "LArReadoutGeometry/HECDetDescr.h"
@@ -15,7 +15,6 @@
 #include "GeoModelUtilities/DecodeVersionKey.h"
 #include "LArReadoutGeometry/HECDetectorManager.h"
 #include "LArHV/LArHVManager.h"
-#include "StoreGate/StoreGate.h"
 
 // Class HECDetectorManager 
 
-- 
GitLab


From 124118bc445c321874a183abcdca9953328c4604 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Mon, 5 Oct 2020 15:59:54 +0200
Subject: [PATCH 228/403] IOVDbTestAlg: Remove reference to StoreGate.h.

Remove reference to obsolete header StoreGate.h.
---
 AtlasTest/DatabaseTest/IOVDbTestAlg/src/IOVDbTestAlg.cxx | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/AtlasTest/DatabaseTest/IOVDbTestAlg/src/IOVDbTestAlg.cxx b/AtlasTest/DatabaseTest/IOVDbTestAlg/src/IOVDbTestAlg.cxx
index 0d1368cc2771..d275488a9d30 100755
--- a/AtlasTest/DatabaseTest/IOVDbTestAlg/src/IOVDbTestAlg.cxx
+++ b/AtlasTest/DatabaseTest/IOVDbTestAlg/src/IOVDbTestAlg.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 "IOVDbTestAlg.h"
@@ -11,7 +11,6 @@
 #include "IOVDbTestConditions/IOVDbTestAmdbCorrection.h"
 
 // Athena includes
-#include "StoreGate/StoreGate.h"
 #include "AthenaKernel/IAthenaOutputStreamTool.h"
 
 // Gaudi includes
-- 
GitLab


From 49ab6e2bad9ce54a1d86b99288051fd1453596df Mon Sep 17 00:00:00 2001
From: ychow <ychow@cern.ch>
Date: Tue, 6 Oct 2020 05:39:39 +0200
Subject: [PATCH 229/403] added STGC/MM hits, removing debug printout

---
 .../src/MuonTruthDecorationAlg.cxx            | 105 +++++++++---------
 1 file changed, 55 insertions(+), 50 deletions(-)

diff --git a/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.cxx b/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.cxx
index 5fe49d5908c1..aeb75bbaaf10 100644
--- a/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.cxx
+++ b/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.cxx
@@ -25,7 +25,7 @@ namespace Muon {
   // Constructor with parameters:
   MuonTruthDecorationAlg::MuonTruthDecorationAlg(const std::string &name, ISvcLocator *pSvcLocator) :
     AthAlgorithm(name,pSvcLocator),
-    m_muonMgr(nullptr) {  
+    m_muonMgr(nullptr) {
   }
 
   // Initialize method:
@@ -47,9 +47,8 @@ namespace Muon {
   }
 
   // Execute method:
-  StatusCode MuonTruthDecorationAlg::execute() 
+  StatusCode MuonTruthDecorationAlg::execute()
   {
-    
     // skip if no input data found
     SG::ReadHandle<xAOD::TruthParticleContainer> truthContainer(m_truthParticleContainerName);
     if(!truthContainer.isPresent()) return StatusCode::SUCCESS;
@@ -74,7 +73,7 @@ namespace Muon {
       if( truth->status() != 1 ) continue;
       if( abs(truth->pdgId()) != 13 || truth->pt() < 1000. ) continue;
       xAOD::TruthParticle* truthParticle = new xAOD::TruthParticle();
-      muonTruthContainer->push_back( truthParticle ); 
+      muonTruthContainer->push_back( truthParticle );
       truthParticle->setPdgId(truth->pdgId());
       truthParticle->setBarcode(truth->barcode());
       truthParticle->setStatus(truth->status());
@@ -88,7 +87,7 @@ namespace Muon {
       truthLink.toPersistent();
       MCTruthPartClassifier::ParticleType type = MCTruthPartClassifier::Unknown;
       MCTruthPartClassifier::ParticleOrigin origin = MCTruthPartClassifier::NonDefined;
-      ATH_MSG_DEBUG("Found stable muon: " << truth->pt() << " eta " << truth->eta() << " phi " << truth->phi() << " mass " << truth->m() 
+      ATH_MSG_DEBUG("Found stable muon: " << truth->pt() << " eta " << truth->eta() << " phi " << truth->phi() << " mass " << truth->m()
                     << " barcode " << truth->barcode() << " truthParticle->barcode " << truthParticle->barcode() << " (*truthLink)->barcode " << (*truthLink)->barcode() <<" " << truthLink );
       int iType = 0;
       int iOrigin = 0;
@@ -129,13 +128,13 @@ namespace Muon {
 	createSegments(truthLink,segmentContainer,ids);
       }
     }
-    
+
     ATH_MSG_DEBUG("Registered " << muonTruthContainer->size() << " truth muons ");
     if(m_createTruthSegment) ATH_MSG_DEBUG("Registered " << segmentContainer->size() << " truth muon segments ");
-    
+
     return StatusCode::SUCCESS;
   }
-  
+
   void MuonTruthDecorationAlg::createSegments( const ElementLink< xAOD::TruthParticleContainer >& truthLink, SG::WriteHandle<xAOD::MuonSegmentContainer> segmentContainer,
                                                const MuonTruthDecorationAlg::ChamberIdMap& ids) const {
 
@@ -175,7 +174,7 @@ namespace Muon {
       std::set<int> etaLayers;
       std::set<int> precLayers;
       ATH_MSG_DEBUG(" new chamber layer " << Muon::MuonStationIndex::chName(lay.first) << " hits " << ids.size() );
-      // loop over hits 
+      // loop over hits
       for( const auto& id : lay.second ){
 	ATH_MSG_VERBOSE(" hit " << m_idHelperSvc->toString(id) );
 	bool measPhi = m_idHelperSvc->measuresPhi(id);
@@ -194,7 +193,7 @@ namespace Muon {
               int iid =  10*m_idHelperSvc->mdtIdHelper().multilayer(id) + m_idHelperSvc->mdtIdHelper().tubeLayer(id);
               precLayers.insert( iid );
               //ATH_MSG_VERBOSE("iid " << iid << " precLayers size " << precLayers.size() );
-            } 
+            }
 	  }else{
 	    etaLayers.insert( m_idHelperSvc->gasGap(id) );
 	  }
@@ -212,12 +211,12 @@ namespace Muon {
 		if( gpos.perp() > 0.1 ) ok = true; // sanity check
 	      }
 	    }
-	    // look up successfull, calculate 
+	    // look up successfull, calculate
 	    if( ok ){
 	      // small comparison function
-	      auto isSmaller = [isEndcap]( const Amg::Vector3D& p1, const Amg::Vector3D& p2 ){ 
-		if( isEndcap ) return fabs(p1.z()) < fabs(p2.z()); 
-		else           return p1.perp() < p2.perp(); 
+	      auto isSmaller = [isEndcap]( const Amg::Vector3D& p1, const Amg::Vector3D& p2 ){
+		if( isEndcap ) return fabs(p1.z()) < fabs(p2.z());
+		else           return p1.perp() < p2.perp();
 	      };
 	      if( !firstPos ) firstPos  = new Amg::Vector3D(gpos);
 	      else if( !secondPos ){
@@ -256,10 +255,10 @@ namespace Muon {
       if( precLayers.size() > 2 ){
 	matchMap[lay.first] = index;
 	if( !phiLayers.empty() ) nphiLayers = phiLayers.size();
-	ntrigEtaLayers = etaLayers.size(); 
+	ntrigEtaLayers = etaLayers.size();
 	nprecLayers = precLayers.size();
-	ATH_MSG_DEBUG(" total counts: precision " << static_cast<int>(nprecLayers) 
-		      << " phi layers " << static_cast<int>(nphiLayers) 
+	ATH_MSG_DEBUG(" total counts: precision " << static_cast<int>(nprecLayers)
+		      << " phi layers " << static_cast<int>(nphiLayers)
 		      << " eta trig layers " << static_cast<int>(ntrigEtaLayers) << " associated reco muon " << index
                       << " barcode " << (*truthLink)->barcode() << " truthLink " << truthLink );
 	xAOD::MuonSegment* segment = new xAOD::MuonSegment();
@@ -276,7 +275,7 @@ namespace Muon {
 	if( firstPos && secondPos ){
           Amg::Vector3D gpos = (*firstPos+*secondPos)/2.;
           Amg::Vector3D gdir = (*firstPos-*secondPos).unit();
-	  ATH_MSG_DEBUG(" got position : r " << gpos.perp() << " z " << gpos.z()  
+	  ATH_MSG_DEBUG(" got position : r " << gpos.perp() << " z " << gpos.z()
                         << "  and direction: theta " << gdir.theta() << " phi " << gdir.phi() );
           segment->setPosition(gpos.x(),gpos.y(),gpos.z());
           segment->setDirection(gdir.x(),gdir.y(),gdir.z());
@@ -287,13 +286,13 @@ namespace Muon {
     }
   }
 
-  void MuonTruthDecorationAlg::addTrackRecords( xAOD::TruthParticle& truthParticle, 
+  void MuonTruthDecorationAlg::addTrackRecords( xAOD::TruthParticle& truthParticle,
                                                 const xAOD::TruthVertex* vertex ) const {
-    
+
     // first loop over track records, store parameters at the different positions
     int barcode = truthParticle.barcode();
-    std::vector< std::pair< Amg::Vector3D, Amg::Vector3D > > parameters; 
-    if( vertex ) parameters.push_back( std::make_pair(Amg::Vector3D(vertex->x(),vertex->y(),vertex->z()), 
+    std::vector< std::pair< Amg::Vector3D, Amg::Vector3D > > parameters;
+    if( vertex ) parameters.push_back( std::make_pair(Amg::Vector3D(vertex->x(),vertex->y(),vertex->z()),
                                                       Amg::Vector3D(truthParticle.px(),truthParticle.py(),truthParticle.pz())) );
 
     for( SG::ReadHandle<TrackRecordCollection>& col : m_trackRecordCollectionNames.makeHandles() ){
@@ -311,7 +310,7 @@ namespace Muon {
       px=-99999.;
       py=-99999.;
       pz=-99999.;
-      
+
       // Need to always make these, to avoid crashes later
       float& ex   = truthParticle.auxdata<float>(name+"_x_extr");
       float& ey   = truthParticle.auxdata<float>(name+"_y_extr");
@@ -326,10 +325,10 @@ namespace Muon {
       epx=-99999.;
       epy=-99999.;
       epz=-99999.;
-      
+
       // loop over collection and find particle with the same bar code
       for( const auto& particle : *col ){
-      
+
         if( (particle.GetBarCode())%m_barcodeOffset != barcode ) continue;
         CLHEP::Hep3Vector pos = particle.GetPosition();
         CLHEP::Hep3Vector mom = particle.GetMomentum();
@@ -344,7 +343,7 @@ namespace Muon {
         break;
       }
     }
-    
+
     // second loop, extrapolate between the points
     if( vertex &&  /// require vertex
         parameters.size() == m_trackRecordCollectionNames.size()+1 && // logic assumes there is one more parameter than track records
@@ -406,8 +405,8 @@ namespace Muon {
           }
           ATH_MSG_VERBOSE(" Extrapolated to " << name << std::endl
                           << " truth: r " << parameters[i+1].first.perp() << " z " << parameters[i+1].first.z() << " p " << parameters[i+1].second.mag() << std::endl
-                          << " extrp: r " << exPars->position().perp() << " z " << exPars->position().z() << " p " << exPars->momentum().mag() 
-                          << " res p " << (parameters[i+1].second.mag() - exPars->momentum().mag()) 
+                          << " extrp: r " << exPars->position().perp() << " z " << exPars->position().z() << " p " << exPars->momentum().mag()
+                          << " res p " << (parameters[i+1].second.mag() - exPars->momentum().mag())
                           << " error " << errorp << " cov " << (*exPars->covariance())(Trk::qOverP,Trk::qOverP)
                           << " pull p " << (parameters[i+1].second.mag() - exPars->momentum().mag())/errorp);
           delete exPars;
@@ -424,9 +423,8 @@ namespace Muon {
   }
 
 
-  void MuonTruthDecorationAlg::addHitCounts( xAOD::TruthParticle& truthParticle, 
+  void MuonTruthDecorationAlg::addHitCounts( xAOD::TruthParticle& truthParticle,
 					     MuonTruthDecorationAlg::ChamberIdMap* ids) const {
-
     int barcode = truthParticle.barcode();
 
     std::vector<unsigned int> nprecHitsPerChamberLayer;
@@ -456,7 +454,7 @@ namespace Muon {
 
 	// add identifier to map
 	if( ids ) {
-	  if( isTgc ){ // TGCS should be added to both EIL and EIS 
+	  if( isTgc ){ // TGCS should be added to both EIL and EIS
 	    Muon::MuonStationIndex::PhiIndex index = m_idHelperSvc->phiIndex(id);
 	    if( index == Muon::MuonStationIndex::T4 ){
 	      (*ids)[Muon::MuonStationIndex::EIS].push_back(id);
@@ -487,14 +485,14 @@ namespace Muon {
 	    ++nphiHitsPerChamberLayer[index];
 	  }else{
 	    ++nprecHitsPerChamberLayer[chIndex];
-	  }           
+	  }
 	}
       }
     }
 
-    uint8_t innerSmallHits = nprecHitsPerChamberLayer[Muon::MuonStationIndex::BIS] + nprecHitsPerChamberLayer[Muon::MuonStationIndex::EIS] 
+    uint8_t innerSmallHits = nprecHitsPerChamberLayer[Muon::MuonStationIndex::BIS] + nprecHitsPerChamberLayer[Muon::MuonStationIndex::EIS]
       + nprecHitsPerChamberLayer[Muon::MuonStationIndex::CSS];
-    uint8_t innerLargeHits = nprecHitsPerChamberLayer[Muon::MuonStationIndex::BIL] + nprecHitsPerChamberLayer[Muon::MuonStationIndex::EIL] 
+    uint8_t innerLargeHits = nprecHitsPerChamberLayer[Muon::MuonStationIndex::BIL] + nprecHitsPerChamberLayer[Muon::MuonStationIndex::EIL]
       + nprecHitsPerChamberLayer[Muon::MuonStationIndex::CSL];
     uint8_t middleSmallHits = nprecHitsPerChamberLayer[Muon::MuonStationIndex::BMS] + nprecHitsPerChamberLayer[Muon::MuonStationIndex::EMS];
     uint8_t middleLargeHits = nprecHitsPerChamberLayer[Muon::MuonStationIndex::BML] + nprecHitsPerChamberLayer[Muon::MuonStationIndex::EML];
@@ -504,14 +502,14 @@ namespace Muon {
     uint8_t extendedLargeHits = nprecHitsPerChamberLayer[Muon::MuonStationIndex::EEL];
 
     uint8_t phiLayer1Hits = nphiHitsPerChamberLayer[Muon::MuonStationIndex::BM1] + nphiHitsPerChamberLayer[Muon::MuonStationIndex::T4]
-      + nphiHitsPerChamberLayer[Muon::MuonStationIndex::CSC] + nphiHitsPerChamberLayer[Muon::MuonStationIndex::STGC1] 
+      + nphiHitsPerChamberLayer[Muon::MuonStationIndex::CSC] + nphiHitsPerChamberLayer[Muon::MuonStationIndex::STGC1]
       + nphiHitsPerChamberLayer[Muon::MuonStationIndex::STGC2];
     uint8_t phiLayer2Hits = nphiHitsPerChamberLayer[Muon::MuonStationIndex::BM2] + nphiHitsPerChamberLayer[Muon::MuonStationIndex::T1];
     uint8_t phiLayer3Hits = nphiHitsPerChamberLayer[Muon::MuonStationIndex::BO1] + nphiHitsPerChamberLayer[Muon::MuonStationIndex::T2];
     uint8_t phiLayer4Hits = nphiHitsPerChamberLayer[Muon::MuonStationIndex::BO2] + nphiHitsPerChamberLayer[Muon::MuonStationIndex::T3];
 
     uint8_t etaLayer1Hits = ntrigEtaHitsPerChamberLayer[Muon::MuonStationIndex::BM1] + ntrigEtaHitsPerChamberLayer[Muon::MuonStationIndex::T4]
-      + ntrigEtaHitsPerChamberLayer[Muon::MuonStationIndex::CSC] + ntrigEtaHitsPerChamberLayer[Muon::MuonStationIndex::STGC1] 
+      + ntrigEtaHitsPerChamberLayer[Muon::MuonStationIndex::CSC] + ntrigEtaHitsPerChamberLayer[Muon::MuonStationIndex::STGC1]
       + ntrigEtaHitsPerChamberLayer[Muon::MuonStationIndex::STGC2];
     uint8_t etaLayer2Hits = ntrigEtaHitsPerChamberLayer[Muon::MuonStationIndex::BM2] + ntrigEtaHitsPerChamberLayer[Muon::MuonStationIndex::T1];
     uint8_t etaLayer3Hits = ntrigEtaHitsPerChamberLayer[Muon::MuonStationIndex::BO1] + ntrigEtaHitsPerChamberLayer[Muon::MuonStationIndex::T2];
@@ -578,15 +576,15 @@ namespace Muon {
 
 
     if( msgLvl(MSG::DEBUG) ){
-      ATH_MSG_DEBUG("Precision layers " << static_cast<int>(nprecLayers) 
-        << " phi layers " << static_cast<int>(nphiLayers) 
+      ATH_MSG_DEBUG("Precision layers " << static_cast<int>(nprecLayers)
+        << " phi layers " << static_cast<int>(nphiLayers)
           << " triggerEta layers " << static_cast<int>(ntrigEtaLayers) );
 
       if( nprecLayers > 0 ) {
         msg(MSG::VERBOSE) << " Precision chambers ";
-      
+
         for( int index = 0; index < static_cast<int>(nprecHitsPerChamberLayer.size()) ; ++index ) {
-          if( nprecHitsPerChamberLayer[index] > 0 ) msg(MSG::VERBOSE) << " " << Muon::MuonStationIndex::chName(static_cast<Muon::MuonStationIndex::ChIndex>(index)) 
+          if( nprecHitsPerChamberLayer[index] > 0 ) msg(MSG::VERBOSE) << " " << Muon::MuonStationIndex::chName(static_cast<Muon::MuonStationIndex::ChIndex>(index))
             << " hits " << nprecHitsPerChamberLayer[index];
         }
       }
@@ -601,7 +599,7 @@ namespace Muon {
       if( ntrigEtaLayers > 0 ){
         msg(MSG::VERBOSE) << endmsg << " Trigger Eta ";
         for( int index = 0; index < static_cast<int>(ntrigEtaHitsPerChamberLayer.size()) ; ++index ) {
-          if( ntrigEtaHitsPerChamberLayer[index] > 0 ) msg(MSG::VERBOSE) << " " << Muon::MuonStationIndex::phiName(static_cast<Muon::MuonStationIndex::PhiIndex>(index)) 
+          if( ntrigEtaHitsPerChamberLayer[index] > 0 ) msg(MSG::VERBOSE) << " " << Muon::MuonStationIndex::phiName(static_cast<Muon::MuonStationIndex::PhiIndex>(index))
             << " hits " << ntrigEtaHitsPerChamberLayer[index];
         }
       }
@@ -613,7 +611,9 @@ namespace Muon {
     std::vector<unsigned long long> mdtTruthHits;
     std::vector<unsigned long long> cscTruthHits;
     std::vector<unsigned long long> tgcTruthHits;
+    std::vector<unsigned long long> stgcTruthHits;
     std::vector<unsigned long long> rpcTruthHits;
+    std::vector<unsigned long long> mmTruthHits;
 
     // loop over chamber layers
     int nEI=0,nEM=0;
@@ -622,20 +622,25 @@ namespace Muon {
       if(lay.first==Muon::MuonStationIndex::EIS || lay.first==Muon::MuonStationIndex::EIL) nEI++;
       if(lay.first==Muon::MuonStationIndex::EMS || lay.first==Muon::MuonStationIndex::EML) nEM++;
       for( const auto& id : lay.second ){
-	if(m_idHelperSvc->isMdt(id)) mdtTruthHits.push_back(id.get_compact());
-	else if(m_idHelperSvc->isCsc(id)) cscTruthHits.push_back(id.get_compact());
-	else if(m_idHelperSvc->isTgc(id)){
-	  if((lay.first==Muon::MuonStationIndex::EIS || lay.first==Muon::MuonStationIndex::EIL) && nEI>1) continue; //otherwise we double-count
-	  if((lay.first==Muon::MuonStationIndex::EMS || lay.first==Muon::MuonStationIndex::EML) && nEM>1) continue; //otherwise we double-count
-	  tgcTruthHits.push_back(id.get_compact());
-	}
-	else if(m_idHelperSvc->isRpc(id)) rpcTruthHits.push_back(id.get_compact());
+	      if(m_idHelperSvc->isMdt(id)) mdtTruthHits.push_back(id.get_compact());
+        else if(m_idHelperSvc->isCsc(id)) cscTruthHits.push_back(id.get_compact());
+        else if(m_idHelperSvc->isTgc(id)){
+        	  if((lay.first==Muon::MuonStationIndex::EIS || lay.first==Muon::MuonStationIndex::EIL) && nEI>1) continue; //otherwise we double-count
+        	  if((lay.first==Muon::MuonStationIndex::EMS || lay.first==Muon::MuonStationIndex::EML) && nEM>1) continue; //otherwise we double-count
+        	  tgcTruthHits.push_back(id.get_compact());
+        }
+        else if(m_idHelperSvc->issTgc(id)) stgcTruthHits.push_back(id.get_compact());
+        else if(m_idHelperSvc->isRpc(id)) rpcTruthHits.push_back(id.get_compact());
+        else if(m_idHelperSvc->isMM(id)) mmTruthHits.push_back(id.get_compact());
       }
     }
     truthParticle.auxdata<std::vector<unsigned long long> >("truthMdtHits")=mdtTruthHits;
     truthParticle.auxdata<std::vector<unsigned long long> >("truthCscHits")=cscTruthHits;
-    truthParticle.auxdata<std::vector<unsigned long long> >("truthRpcHits")=rpcTruthHits;
     truthParticle.auxdata<std::vector<unsigned long long> >("truthTgcHits")=tgcTruthHits;
+    truthParticle.auxdata<std::vector<unsigned long long> >("truthRpcHits")=rpcTruthHits;
+    truthParticle.auxdata<std::vector<unsigned long long> >("truthStgcHits")=stgcTruthHits;
+    truthParticle.auxdata<std::vector<unsigned long long> >("truthMMHits")=mmTruthHits;
+
     ATH_MSG_VERBOSE("Added "<<mdtTruthHits.size()<<" mdt truth hits, "<<cscTruthHits.size()<<" csc truth hits, "<<rpcTruthHits.size()<<" rpc truth hits, and "<<tgcTruthHits.size()<<" tgc truth hits");
   }
 
-- 
GitLab


From 4bdfabb84ef3d913ed5a84fc22431224741df920 Mon Sep 17 00:00:00 2001
From: Edwin Chow <edwin.chow@cern.ch>
Date: Tue, 6 Oct 2020 03:47:54 +0000
Subject: [PATCH 230/403] Update MuonTruthDecorationAlg.cxx

---
 MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.cxx b/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.cxx
index aeb75bbaaf10..ac46b1792724 100644
--- a/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.cxx
+++ b/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.cxx
@@ -622,7 +622,7 @@ namespace Muon {
       if(lay.first==Muon::MuonStationIndex::EIS || lay.first==Muon::MuonStationIndex::EIL) nEI++;
       if(lay.first==Muon::MuonStationIndex::EMS || lay.first==Muon::MuonStationIndex::EML) nEM++;
       for( const auto& id : lay.second ){
-	      if(m_idHelperSvc->isMdt(id)) mdtTruthHits.push_back(id.get_compact());
+	    if(m_idHelperSvc->isMdt(id)) mdtTruthHits.push_back(id.get_compact());
         else if(m_idHelperSvc->isCsc(id)) cscTruthHits.push_back(id.get_compact());
         else if(m_idHelperSvc->isTgc(id)){
         	  if((lay.first==Muon::MuonStationIndex::EIS || lay.first==Muon::MuonStationIndex::EIL) && nEI>1) continue; //otherwise we double-count
-- 
GitLab


From 33f2e07b1cf4ea101c354289a09d419f838b6a03 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Tue, 6 Oct 2020 05:40:48 +0100
Subject: [PATCH 231/403] GsfBetheHeitlerEffects, Use std::array when we have a
 fixed small max size

---
 .../GsfBetheHeitlerEffects.h                  | 12 ++--
 .../KLGaussianMixtureReduction.h              |  2 +-
 .../src/GsfBetheHeitlerEffects.cxx            | 67 ++++++++++---------
 3 files changed, 43 insertions(+), 38 deletions(-)

diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfBetheHeitlerEffects.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfBetheHeitlerEffects.h
index 4dd080aa15b8..9337cccbf714 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfBetheHeitlerEffects.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfBetheHeitlerEffects.h
@@ -108,12 +108,12 @@ private:
   // Read coeffients for a single polynomial fit
   Polynomial readPolynomial(std::ifstream&, const int);
 
-  std::vector<Polynomial> m_polynomialWeights;
-  std::vector<Polynomial> m_polynomialMeans;
-  std::vector<Polynomial> m_polynomialVariances;
-  std::vector<Polynomial> m_polynomialWeightsHighX0;
-  std::vector<Polynomial> m_polynomialMeansHighX0;
-  std::vector<Polynomial> m_polynomialVariancesHighX0;
+  std::array<Polynomial,maxNumberofComponents> m_polynomialWeights;
+  std::array<Polynomial,maxNumberofComponents> m_polynomialMeans;
+  std::array<Polynomial,maxNumberofComponents> m_polynomialVariances;
+  std::array<Polynomial,maxNumberofComponents> m_polynomialWeightsHighX0;
+  std::array<Polynomial,maxNumberofComponents> m_polynomialMeansHighX0;
+  std::array<Polynomial,maxNumberofComponents> m_polynomialVariancesHighX0;
 
   int m_numberOfComponents;
   int m_transformationCode;
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/KLGaussianMixtureReduction.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/KLGaussianMixtureReduction.h
index 2de1daca8f86..eb225a2f91d3 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/KLGaussianMixtureReduction.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/KLGaussianMixtureReduction.h
@@ -8,7 +8,7 @@
  * @date 26th November 2019
  *
  *
- * @brief Uyilities to facilitate the calculation of the
+ * @brief Utilities to facilitate the calculation of the
  * divergence between components of the mixture
  * and the merging of similar componets.
  *
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfBetheHeitlerEffects.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfBetheHeitlerEffects.cxx
index 4607881ddba3..58430f20d571 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfBetheHeitlerEffects.cxx
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfBetheHeitlerEffects.cxx
@@ -20,6 +20,9 @@
 #include <fstream>
 
 namespace {
+
+using BH = Trk::GsfBetheHeitlerEffects;
+
 template<class T>
 bool
 inRange(const T& var, const T& lo, const T& hi)
@@ -49,8 +52,7 @@ betheHeitlerVariance(const double r)
 }
 
 void
-correctWeights(Trk::GsfBetheHeitlerEffects::MixtureParameters& mixture,
-               const int numberOfComponents)
+correctWeights(BH::MixtureParameters& mixture, const int numberOfComponents)
 {
 
   if (numberOfComponents < 1) {
@@ -68,10 +70,9 @@ correctWeights(Trk::GsfBetheHeitlerEffects::MixtureParameters& mixture,
 }
 
 double
-correctedFirstMean(
-  const double pathlengthInX0,
-  const Trk::GsfBetheHeitlerEffects::MixtureParameters& mixture,
-  const int numberOfComponents)
+correctedFirstMean(const double pathlengthInX0,
+                   const BH::MixtureParameters& mixture,
+                   const int numberOfComponents)
 {
   if (numberOfComponents < 1) {
     return 0;
@@ -87,10 +88,9 @@ correctedFirstMean(
 }
 
 double
-correctedFirstVariance(
-  const double pathlengthInX0,
-  const Trk::GsfBetheHeitlerEffects::MixtureParameters& mixture,
-  const int numberOfComponents)
+correctedFirstVariance(const double pathlengthInX0,
+                       const BH::MixtureParameters& mixture,
+                       const int numberOfComponents)
 {
   if (numberOfComponents < 1) {
     return 0;
@@ -111,39 +111,41 @@ correctedFirstVariance(
   return std::max(varianceBH / mixture[0].weight, 0.);
 }
 
-Trk::GsfBetheHeitlerEffects::MixtureParameters
+BH::MixtureParameters
 getTranformedMixtureParameters(
-  const std::vector<Trk::GsfBetheHeitlerEffects::Polynomial>& polynomialWeights,
-  const std::vector<Trk::GsfBetheHeitlerEffects::Polynomial>& polynomialMeans,
-  const std::vector<Trk::GsfBetheHeitlerEffects::Polynomial>&
+  const std::array<BH::Polynomial, BH::maxNumberofComponents>&
+    polynomialWeights,
+  const std::array<BH::Polynomial, BH::maxNumberofComponents>& polynomialMeans,
+  const std::array<BH::Polynomial, BH::maxNumberofComponents>&
     polynomialVariances,
   const double pathlengthInX0,
   const int numberOfComponents)
 {
 
-  Trk::GsfBetheHeitlerEffects::MixtureParameters mixture{};
+  BH::MixtureParameters mixture{};
   for (int i = 0; i < numberOfComponents; ++i) {
     const double updatedWeight = polynomialWeights[i](pathlengthInX0);
     const double updatedMean = polynomialMeans[i](pathlengthInX0);
     const double updatedVariance = polynomialVariances[i](pathlengthInX0);
     mixture[i] = { logisticFunction(updatedWeight),
                    logisticFunction(updatedMean),
-                   exp(updatedVariance) };
+                   std::exp(updatedVariance) };
   }
   return mixture;
 }
 
-Trk::GsfBetheHeitlerEffects::MixtureParameters
+BH::MixtureParameters
 getMixtureParameters(
-  const std::vector<Trk::GsfBetheHeitlerEffects::Polynomial>& polynomialWeights,
-  const std::vector<Trk::GsfBetheHeitlerEffects::Polynomial>& polynomialMeans,
-  const std::vector<Trk::GsfBetheHeitlerEffects::Polynomial>&
+  const std::array<BH::Polynomial, BH::maxNumberofComponents>&
+    polynomialWeights,
+  const std::array<BH::Polynomial, BH::maxNumberofComponents>& polynomialMeans,
+  const std::array<BH::Polynomial, BH::maxNumberofComponents>&
     polynomialVariances,
   const double pathlengthInX0,
   const int numberOfComponents)
 {
 
-  Trk::GsfBetheHeitlerEffects::MixtureParameters mixture{};
+  BH::MixtureParameters mixture{};
   for (int i = 0; i < numberOfComponents; ++i) {
     const double updatedWeight = polynomialWeights[i](pathlengthInX0);
     const double updatedMean = polynomialMeans[i](pathlengthInX0);
@@ -256,9 +258,10 @@ Trk::GsfBetheHeitlerEffects::readParameters()
 
   int componentIndex = 0;
   for (; componentIndex < m_numberOfComponents; ++componentIndex) {
-    m_polynomialWeights.push_back(readPolynomial(fin, orderPolynomial));
-    m_polynomialMeans.push_back(readPolynomial(fin, orderPolynomial));
-    m_polynomialVariances.push_back(readPolynomial(fin, orderPolynomial));
+    m_polynomialWeights[componentIndex] = readPolynomial(fin, orderPolynomial);
+    m_polynomialMeans[componentIndex] = readPolynomial(fin, orderPolynomial);
+    m_polynomialVariances[componentIndex] =
+      readPolynomial(fin, orderPolynomial);
   }
 
   // Read the high X0 polynomial
@@ -313,10 +316,12 @@ Trk::GsfBetheHeitlerEffects::readParameters()
 
     int componentIndex = 0;
     for (; componentIndex < m_numberOfComponentsHighX0; ++componentIndex) {
-      m_polynomialWeightsHighX0.push_back(readPolynomial(fin, orderPolynomial));
-      m_polynomialMeansHighX0.push_back(readPolynomial(fin, orderPolynomial));
-      m_polynomialVariancesHighX0.push_back(
-        readPolynomial(fin, orderPolynomial));
+      m_polynomialWeightsHighX0[componentIndex] =
+        readPolynomial(fin, orderPolynomial);
+      m_polynomialMeansHighX0[componentIndex] =
+        readPolynomial(fin, orderPolynomial);
+      m_polynomialVariancesHighX0[componentIndex] =
+        readPolynomial(fin, orderPolynomial);
     }
   }
   return true;
@@ -366,10 +371,10 @@ Trk::GsfBetheHeitlerEffects::compute(
   // If the amount of material is between 0.0001 and 0.01 return the gaussian
   // approximation to the Bethe-Heitler distribution
   if (pathlengthInX0 < m_lowerRange) {
-    const double meanZ = exp(-1. * pathlengthInX0);
+    const double meanZ = std::exp(-1. * pathlengthInX0);
     const double sign = (direction == Trk::oppositeMomentum) ? 1. : -1.;
-    const double varZ =
-      exp(-1. * pathlengthInX0 * log(3.) / log(2.)) - exp(-2. * pathlengthInX0);
+    const double varZ = std::exp(-1. * pathlengthInX0 * log(3.) / log(2.)) -
+                        std::exp(-2. * pathlengthInX0);
     double deltaP(0.);
     double varQoverP(0.);
     if (direction == Trk::alongMomentum) {
-- 
GitLab


From 3f1df2fada9813dfef7adec0a908e30d1be4d5a6 Mon Sep 17 00:00:00 2001
From: sutt <sutt@cern.ch>
Date: Tue, 6 Oct 2020 08:40:42 +0200
Subject: [PATCH 232/403] remove extraneous comments and unused code

---
 DetectorDescription/RegSelSvcTest/src/RegSelTestAlg.cxx   | 5 +++--
 .../share/InnerDetectorOverlay_jobOptions.py              | 7 -------
 .../InDetRegionSelector/src/SiRegionSelectorTable.cxx     | 2 --
 .../python/InDetTrigConfigRecBackTracking.py              | 1 +
 .../python/InDetTrigConfigRecPreProcessing.py             | 6 ------
 .../InDetTrigRecExample/share/InDetTrigRec_jobOptions.py  | 4 +++-
 .../python/GenericDummyUnseededAllTEAlgoConfig.py         | 2 +-
 .../TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.cxx | 8 --------
 .../TrigTools/TrigInDetConfig/python/TrigInDetConfig.py   | 6 +++---
 .../TriggerMenu/python/calibcosmicmon/BeamspotDef.py      | 5 -----
 10 files changed, 11 insertions(+), 35 deletions(-)

diff --git a/DetectorDescription/RegSelSvcTest/src/RegSelTestAlg.cxx b/DetectorDescription/RegSelSvcTest/src/RegSelTestAlg.cxx
index 1673c2949498..2e7735f658bc 100644
--- a/DetectorDescription/RegSelSvcTest/src/RegSelTestAlg.cxx
+++ b/DetectorDescription/RegSelSvcTest/src/RegSelTestAlg.cxx
@@ -72,7 +72,8 @@ StatusCode RegSelTestAlg::dumpOne( const std::string& message, double eta, const
 
 StatusCode RegSelTestAlg::dump() const {
   // generate list of RoIs for ID 
-  
+
+  /// commented as a reminder until a fix for the new RegSelTools is added  
   //  CHECK( dumpOne("Inner Detector ", 2.5,  { PIXEL, SCT, TRT } ) ); 
   CHECK( dumpOne("Calorimeters ", 5., { LAR, TTEM, TTHEC, TILE, FCALEM, FCALHAD } ) );
   CHECK( dumpOne("Muons ", 5., { MDT, RPC, TGC, CSC } ) );
@@ -184,7 +185,7 @@ StatusCode RegSelTestAlg::mt() const {
   
   std::vector<ParallelCallTest*>  tests;
 
-  
+  /// commented as a reminder until a fix is added for the new RegSelTools
   //  for ( auto detector: {PIXEL, SCT, TRT, LAR, TTEM, TTHEC, TILE, MDT, RPC, TGC, CSC, FCALEM, FCALHAD, FTK} ) {
   for ( auto detector: { LAR, TTEM, TTHEC, TILE, MDT, RPC, TGC, CSC, FCALEM, FCALHAD } ) {
     for ( auto& roi : rois ) {
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/InnerDetectorOverlay_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/InnerDetectorOverlay_jobOptions.py
index 304e723bf901..a080d7b9f4e8 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/InnerDetectorOverlay_jobOptions.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/InnerDetectorOverlay_jobOptions.py
@@ -69,10 +69,6 @@ if DetFlags.overlay.pixel_on() or DetFlags.overlay.SCT_on() or DetFlags.overlay.
             #ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "SCT_RDO_Container/SCT_RDOs" ]
             #ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "Trk::SCT_ClusterContainer/SCT_OnlineClusters" ]
 
-#           from RegionSelector.RegSelToolConfig import makeRegSelTool_SCT
-#           job.InDetSCTRawDataProvider.RegSelTool_SCT = makeRegSelTool_SCT()
-
-
     if DetFlags.overlay.TRT_on():
         if overlayFlags.isDataOverlay():
             conddb.blockFolder("/TRT/Cond/DigVers")
@@ -100,9 +96,6 @@ if DetFlags.overlay.pixel_on() or DetFlags.overlay.SCT_on() or DetFlags.overlay.
                 job.InDetTRTRawDataProvider.RDOKey = overlayFlags.dataStore()+"+TRT_RDOs"
             #ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "TRT_RDO_Container/TRT_RDOs" ]
 
-#           from RegionSelector.RegSelToolConfig import makeRegSelTool_TRT
-#           job.InDetTRTRawDataProvider.RegSelTool = makeRegSelTool_TRT()
-
             #from IOVDbSvc.CondDB import conddb
             #conddb.addFolder("TRT","/TRT/Calib/T0","<tag>TrtCalibt0-UPD2-FDR2-01</tag>")
             #conddb.addFolder("TRT","/TRT/Calib/RT","<tag>TrtCalibRt-UPD2-FDR2-01</tag>")
diff --git a/InnerDetector/InDetDetDescr/InDetRegionSelector/src/SiRegionSelectorTable.cxx b/InnerDetector/InDetDetDescr/InDetRegionSelector/src/SiRegionSelectorTable.cxx
index 4e1d64da481b..ba6d489b3785 100755
--- a/InnerDetector/InDetDetDescr/InDetRegionSelector/src/SiRegionSelectorTable.cxx
+++ b/InnerDetector/InDetDetDescr/InDetRegionSelector/src/SiRegionSelectorTable.cxx
@@ -75,8 +75,6 @@ SiRegionSelectorTable::initialize(){
     msg(MSG::WARNING) << "Tool disabled." << endmsg;
   } 
  
-  //  ATH_CHECK(m_condCablingKey.initialize());
-
   ATH_MSG_WARNING("So far, this prevents the conditions migration!! The createTable() should NOT be used in the initilization step...");
 
   return StatusCode::SUCCESS;
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecBackTracking.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecBackTracking.py
index 95ba698ec6e6..b4b209b8d95f 100755
--- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecBackTracking.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecBackTracking.py
@@ -180,6 +180,7 @@ class TRT_TrigSeededTrackFinder_EF( InDet__TRT_TrigSeededTrackFinder ):
            InDetTrigTRT_SeededSpacePointFinder.PRDtoTrackMap = 'InDetTrigPRDtoTrackMap_Photon_EF'
 
       elif InDetTrigFlags.loadSimpleTRTSeededSPFinder():
+         # Old RegSelSvc configuration - leave commented until the dust has settled
          # from RegionSelector.RegSelSvcDefault import RegSelSvcDefault
          # InDetTrigRegSelSvc = RegSelSvcDefault()
          # InDetTrigRegSelSvc.enablePixel = DetFlags.pixel_on()
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPreProcessing.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPreProcessing.py
index e5fdf17b536a..e83655fb0d60 100755
--- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPreProcessing.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPreProcessing.py
@@ -330,12 +330,6 @@ class SiTrigSpacePointFinder_EF( InDet__SiTrigSpacePointFinder ):
       self.ProcessSCTs = True
       self.ProcessOverlaps = InDetTrigFlags.doOverlapSP()
 
-#      from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
-#      from RegionSelector.RegSelToolConfig import makeRegSelTool_SCT
-
-#      self.RegSelTool_Pixel = makeRegSelTool_Pixel()
-#      self.RegSelTool_SCT   = makeRegSelTool_SCT()
-
       if type=='cosmicsN':
          from InDetTrigRecExample.InDetTrigConfigRecLoadToolsCosmics import \
              InDetTrigSiSpacePointMakerToolCosmics, SCT_TrigSpacePointToolCosmics
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/share/InDetTrigRec_jobOptions.py b/InnerDetector/InDetExample/InDetTrigRecExample/share/InDetTrigRec_jobOptions.py
index 85d5fbef1c05..5f120409dab5 100755
--- a/InnerDetector/InDetExample/InDetTrigRecExample/share/InDetTrigRec_jobOptions.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/share/InDetTrigRec_jobOptions.py
@@ -59,7 +59,9 @@ if InDetTrigFlags.useConditionsClasses():
 else:
   include ("InDetRecExample/InDetRecConditionsAccess.py")
 
-#manipulate RegSelSvc settings to be aware of the inactive detelems
+# remove all the old RegSelSvc setting - leave commented 
+# while we determinte whether the RegSel migration has been successful
+# manipulate RegSelSvc settings to be aware of the inactive detelems
 # from RegionSelector.RegSelSvcDefault import RegSelSvcDefault
 # RegSelSvc = RegSelSvcDefault()
 
diff --git a/Trigger/TrigAlgorithms/TrigGenericAlgs/python/GenericDummyUnseededAllTEAlgoConfig.py b/Trigger/TrigAlgorithms/TrigGenericAlgs/python/GenericDummyUnseededAllTEAlgoConfig.py
index 60a4ecd26471..54131fc50a16 100644
--- a/Trigger/TrigAlgorithms/TrigGenericAlgs/python/GenericDummyUnseededAllTEAlgoConfig.py
+++ b/Trigger/TrigAlgorithms/TrigGenericAlgs/python/GenericDummyUnseededAllTEAlgoConfig.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 TrigGenericAlgs.TrigGenericAlgsConf import PESA__DummyUnseededAllTEAlgo
diff --git a/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.cxx b/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.cxx
index de106f1762c8..5a5b19a347d7 100644
--- a/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.cxx
+++ b/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.cxx
@@ -101,14 +101,6 @@ PEBInfoWriterToolBase::PEBInfo RoIPEBInfoWriterTool::createPEBInfo(const PEBInfo
 
   TrigRoiDescriptor roiForPEB(eta, etaMin, etaMax, phi, phiMin, phiMax);
 
-#if 0
-  std::vector<IRegSelTool*> tools = { 
-    m_regionSelectot_pix, 
-    m_regionSelectot_sct, 
-    m_regionSelectot_trt 
-  }; 
-#endif
-
   for ( auto tool : m_tools ) { 
     std::vector<uint32_t> detROBs;
     tool->ROBIDList( roiForPEB, detROBs);
diff --git a/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetConfig.py b/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetConfig.py
index c35b373ab85d..af506b4c5f2f 100644
--- a/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetConfig.py
+++ b/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetConfig.py
@@ -665,9 +665,9 @@ def TrigInDetConfig( flags, roisKey="EMRoIs", signatureName='' ):
                                                                  DoPhiFiltering = True,
                                                                  UseBeamTilt = False,
                                                                  UseNewLayerScheme = True,
-                                                                 RegSel_Pixel = pixRegSelTool,
-                                                                 RegSel_SCT = sctRegSelTool,
-                                                                 layerNumberTool = acc.getPublicTool("TrigL2LayerNumberTool_FTF") ) )
+                                                                 RegSelTool_Pixel = pixRegSelTool,
+                                                                 RegSelTool_SCT   = sctRegSelTool,
+                                                                 layerNumberTool  = acc.getPublicTool("TrigL2LayerNumberTool_FTF") ) )
 
 
   # TODO remove once offline configured counterparts are available?
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/BeamspotDef.py b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/BeamspotDef.py
index a76295d395ac..cdd5b876965e 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/BeamspotDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/BeamspotDef.py
@@ -113,11 +113,6 @@ class L2EFChain_Beamspot(L2EFChainDef):
 
      dummyAllTEAlgo = GenericDummyUnseededAllTEAlgo("L2DummyAlgo")
      
-#     from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
-#     from RegionSelector.RegSelToolConfig import makeRegSelTool_SCT
-#     dummyAllTEAlgo.RegSelTool_Pixel = makeRegSelTool_Pixel()
-#     dummyAttTEAlgo.RegSelTool_SCT  = makeRegSelTool_SCT()
-
      self.L2sequenceList += [ [[""], [dummyAllTEAlgo]+trk_alg, 'L2_BeamSpottracks']]
 
      self.L2sequenceList +=[[['L2_BeamSpottracks'], [theFex], 'L2_fex']]
-- 
GitLab


From f55c7eac07d1a63617ee810b809bb9e65caa86bd Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Tue, 6 Oct 2020 09:26:24 +0200
Subject: [PATCH 233/403] TBTPCnv: cmake cleanup

---
 TestBeam/TBTPCnv/CMakeLists.txt | 122 +++++++-------------------------
 1 file changed, 24 insertions(+), 98 deletions(-)

diff --git a/TestBeam/TBTPCnv/CMakeLists.txt b/TestBeam/TBTPCnv/CMakeLists.txt
index c0ee9e57d6a7..89c29ac376be 100644
--- a/TestBeam/TBTPCnv/CMakeLists.txt
+++ b/TestBeam/TBTPCnv/CMakeLists.txt
@@ -1,111 +1,37 @@
-################################################################################
-# Package: TBTPCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TBTPCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          TestBeam/TBEvent
-                          PRIVATE
-                          DetectorDescription/Identifier )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_library( TBTPCnv
                    src/*.cxx
                    PUBLIC_HEADERS TBTPCnv
-                   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${ROOT_LIBRARIES} TBEvent AthenaPoolCnvSvcLib
+                   LINK_LIBRARIES TBEvent AthenaPoolCnvSvcLib
                    PRIVATE_LINK_LIBRARIES Identifier )
 
 atlas_add_dictionary( TBTPCnvDict
                       TBTPCnv/TBTPCnvDict.h
                       TBTPCnv/selection.xml
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib TBEvent Identifier TBTPCnv )
-
-
-atlas_add_test( TBADCRawContCnv_p1_test
-                SOURCES
-                test/TBADCRawContCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} TBTPCnv )
-
-atlas_add_test( TBBPCCont_p1_test
-                SOURCES
-                test/TBBPCContCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} TBTPCnv )
-
-atlas_add_test( TBEventInfoCnv_p1_test
-                SOURCES
-                test/TBEventInfoCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} TBTPCnv )
-
-atlas_add_test( TBLArDigitContainerCnv_p1_test
-                SOURCES
-                test/TBLArDigitContainerCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} TBTPCnv )
-
-atlas_add_test( TBMWPCContCnv_p1_test
-                SOURCES
-                test/TBMWPCContCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} TBTPCnv )
-
-atlas_add_test( TBPhaseCnv_p1_test
-                SOURCES
-                test/TBPhaseCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} TBTPCnv )
-
-atlas_add_test( TBScintillatorContCnv_p1_test
-                SOURCES
-                test/TBScintillatorContCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} TBTPCnv )
-
-atlas_add_test( TBTailCatcherCnv_p1_test
-                SOURCES
-                test/TBTailCatcherCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} TBTPCnv )
-
-atlas_add_test( TBTDCCnv_p1_test
-                SOURCES
-                test/TBTDCCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} TBTPCnv )
-
-atlas_add_test( TBTDCRawContCnv_p1_test
-                SOURCES
-                test/TBTDCRawContCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} TBTPCnv )
-
-atlas_add_test( TBTrackCnv_p1_test
-                SOURCES
-                test/TBTrackCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} TBTPCnv )
-
-atlas_add_test( TBTrackInfoCnv_p1_test
-                SOURCES
-                test/TBTrackInfoCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} TBTPCnv )
-
-atlas_add_test( TBTriggerPatternUnitCnv_p1_test
-                SOURCES
-                test/TBTriggerPatternUnitCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} TBTPCnv )
-
-
-                    
+                      LINK_LIBRARIES TBTPCnv )
+
+# Tests in the package:
+function( _add_test name )
+   atlas_add_test( ${name}
+                   SOURCES test/${name}.cxx
+                   LINK_LIBRARIES GaudiKernel TBTPCnv TestTools )
+endfunction( _add_test )
+
+_add_test( TBADCRawContCnv_p1_test )
+_add_test( TBBPCContCnv_p1_test )
+_add_test( TBEventInfoCnv_p1_test )
+_add_test( TBLArDigitContainerCnv_p1_test )
+_add_test( TBMWPCContCnv_p1_test )
+_add_test( TBPhaseCnv_p1_test )
+_add_test( TBScintillatorContCnv_p1_test )
+_add_test( TBTailCatcherCnv_p1_test )
+_add_test( TBTDCCnv_p1_test )
+_add_test( TBTDCRawContCnv_p1_test )
+_add_test( TBTrackCnv_p1_test )
+_add_test( TBTrackInfoCnv_p1_test )
+_add_test( TBTriggerPatternUnitCnv_p1_test )
-- 
GitLab


From a97ce5aa5ccc45e2223864b8d6c70492b2f4059c Mon Sep 17 00:00:00 2001
From: Ivan Sayago Galvan <isayagog@lxplus784.cern.ch>
Date: Tue, 6 Oct 2020 10:32:14 +0200
Subject: [PATCH 234/403] Cosmic muon monitoring AthenaMT

---
 .../python/TileMonitoringCfgHelper.py         |  55 +++++
 .../python/TileTMDBDigitsMonitorAlgorithm.py  | 192 ++++++++++++++++++
 .../src/TileTMDBDigitsMonitorAlgorithm.cxx    | 172 ++++++++++++++++
 .../src/TileTMDBDigitsMonitorAlgorithm.h      |  46 +++++
 .../src/components/TileMonitoring_entries.cxx |   2 +
 5 files changed, 467 insertions(+)
 create mode 100644 TileCalorimeter/TileMonitoring/python/TileTMDBDigitsMonitorAlgorithm.py
 create mode 100644 TileCalorimeter/TileMonitoring/src/TileTMDBDigitsMonitorAlgorithm.cxx
 create mode 100644 TileCalorimeter/TileMonitoring/src/TileTMDBDigitsMonitorAlgorithm.h

diff --git a/TileCalorimeter/TileMonitoring/python/TileMonitoringCfgHelper.py b/TileCalorimeter/TileMonitoring/python/TileMonitoringCfgHelper.py
index 418bfb06bad5..72312f926ff4 100644
--- a/TileCalorimeter/TileMonitoring/python/TileMonitoringCfgHelper.py
+++ b/TileCalorimeter/TileMonitoring/python/TileMonitoringCfgHelper.py
@@ -23,6 +23,9 @@ _partitionName = {0: 'AUX', 1 : 'LBA', 2 : 'LBC', 3 : 'EBA', 4 : 'EBC', 5 : 'All
 _gainName = {0 : 'LG', 1 : 'HG'}
 _sampleName = {0 : 'SampA', 1 : 'SampB', 2 : 'SampD', 3 : 'SampE', 4 : 'AllSamp'}
 
+_cellNameTMDB_LB = ["D0", "D1L", "D1R", "D2R", "D2L", "D3L", "D3R", ""]
+_cellNameTMDB_EB = ["D5L", "D5R", "D6L", "D6R"]
+
 def getCellName(partition, channel):
     '''
     This function returns name of Tile cell for given partition and channel.
@@ -188,6 +191,13 @@ def getLabels(labels, partition = ''):
     return labels
 
 
+def getCellNameTMDB(partition, channel):
+        return _cellNameTMDB_LB[channel] if partition.startswith('L') else _cellNameTMDB_EB[channel]
+
+def getCellChannelTMDB_Labels(partition):
+        return _cellNameTMDB_LB if partition.startswith('L') else _cellNameTMDB_EB
+
+
 def addValueVsModuleAndChannelMaps(group, name, title, path, subDirectory = False, type = 'TH2D', value = '', trigger = '', run = ''):
     '''
     This function configures 2D histograms (maps) with Tile monitored value vs module and channel per partion.
@@ -575,3 +585,48 @@ def addTileModuleArray(helper, algorithm, name, title, path,
                                     xbins = Tile.MAX_DRAWER, xmin = -0.5, xmax = Tile.MAX_DRAWER - 0.5,
                                     run = run, triggers = triggers, subDirectory = subDirectory,
                                     xlabels = ('modules'), perPartition = True, separator = separator )
+
+
+
+def addTileTMDB_2DHistogramsArray(helper, algorithm, name = '', value = '',
+                                    title = '', path = '', type = 'TH2D', run = ''):
+
+    array = helper.addArray([int(Tile.MAX_ROS - 1)], algorithm, name)
+    for postfix, tool in array.Tools.items():
+        ros = int(postfix.split('_').pop()) + 1
+        
+        partition = getPartitionName(ros)
+        nxlabels = getModuleLabels(partition)
+        nylabels = getCellChannelTMDB_Labels(partition)
+        ybins = len(nylabels)
+                    
+        fullName = 'module,channel' + (',' + value if 'Profile' in type else '') + ';'
+        fullName += getTileHistogramName(name, partition = partition)
+        
+        fullTitle = getTileHistogramTitle(title, run = run, partition = partition)
+        
+        tool.defineHistogram( fullName, path = path, type = type, title = fullTitle,
+                                xlabels = nxlabels, ylabels = nylabels,
+                                xbins = Tile.MAX_DRAWER, xmin = -0.5, xmax = Tile.MAX_DRAWER - 0.5,
+                                ybins = ybins, ymin = -0.5, ymax = ybins - 0.5)
+
+
+
+def addTileTMDB_1DHistogramsArray(helper, algorithm, name = '', xvalue = '', value = '', title = '',
+                                path = '', xbins = 0, xmin = 0, xmax = 0, type = 'TH1D', run = ''):
+
+    for ros in range(1, Tile.MAX_ROS):
+        partition = getPartitionName(ros)
+        histName = "{}_{}".format(name, partition)
+        nChannels = len(_cellNameTMDB_LB) if partition.startswith('L') else len(_cellNameTMDB_EB)
+        array = helper.addArray([nChannels], algorithm,  histName)
+        for postfix, tool in array.Tools.items():
+            channel = int(postfix.split('_').pop())
+
+            fullName = xvalue + (',' + value if 'Profile' in type else '') + ';'
+            fullName += histName + '_' + getCellNameTMDB(partition, channel)
+
+            fullTitle = getTileHistogramTitle(title, run = run, partition = partition)
+
+            tool.defineHistogram( fullName, path = path, type = type, title = fullTitle,
+                                 xbins = xbins, xmin = xmin, xmax = xmax)
\ No newline at end of file
diff --git a/TileCalorimeter/TileMonitoring/python/TileTMDBDigitsMonitorAlgorithm.py b/TileCalorimeter/TileMonitoring/python/TileTMDBDigitsMonitorAlgorithm.py
new file mode 100644
index 000000000000..1dc7e8073f9d
--- /dev/null
+++ b/TileCalorimeter/TileMonitoring/python/TileTMDBDigitsMonitorAlgorithm.py
@@ -0,0 +1,192 @@
+#
+#  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+#
+
+'''@file TileTMDBDigitsMonitorAlgorithm.py
+@author
+@date
+@brief Python configuration of TileTMDBDigitsMonitorAlgorithm algorithm for the Run III
+'''
+
+def TileTMDBDigitsMonitoringConfig(flags):
+    '''Function to configures some algorithms in the monitoring system.'''
+    from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+    result = ComponentAccumulator()
+
+    from TileConditions.TileCablingSvcConfig import TileCablingSvcCfg
+    result.merge( TileCablingSvcCfg(flags) )
+
+    
+    ### STEP 1 ###
+    # If you need to set up special tools, etc., you will need your own ComponentAccumulator;
+    # uncomment the following 2 lines and use the last three lines of this function instead of the ones
+    # just before
+    # from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+    # result = ComponentAccumulator()
+
+    # The following class will make a sequence, configure algorithms, and link
+    # them to GenericMonitoringTools
+    from AthenaMonitoring import AthMonitorCfgHelper
+    helper = AthMonitorCfgHelper(flags, 'TileTMDBDigitsMonitoring')
+
+
+    ### STEP 2 ###
+    # Adding an algorithm to the helper. Here, we will use the example 
+    # algorithm in the AthenaMonitoring package. Just pass the type to the 
+    # helper. Then, the helper will instantiate an instance and set up the 
+    # base class configuration following the flags. The returned object 
+    # is the algorithm.
+    from AthenaConfiguration.ComponentFactory import CompFactory
+    tileTMDBDigitsMonAlg = helper.addAlgorithm(CompFactory.TileTMDBDigitsMonitorAlgorithm, 'TileTMDBDigitsMonAlg')
+    
+
+    # # If for some really obscure reason you need to instantiate an algorithm
+    # # yourself, the AddAlgorithm method will still configure the base 
+    # # properties and add the algorithm to the monitoring sequence.
+    # helper.AddAlgorithm(myExistingAlg)
+
+
+    ### STEP 3 ###
+    # Edit properties of a algorithm
+    # some generic property
+    # tileTMDBDigitsMonAlg.RandomHist = True
+    # to enable a trigger filter, for example:
+    # tileTMDBDigitsMonAlg.TriggerChain = 'HLT_mu26_ivarmedium'
+    tileTMDBDigitsMonAlg.TriggerChain = ''
+
+    ### STEP 4 ###
+    # Add some tools. N.B. Do not use your own trigger decion tool. Use the
+    # standard one that is included with AthMonitorAlgorithm.
+
+    # # First, add a tool that's set up by a different configuration function. 
+    # # In this case, CaloNoiseToolCfg returns its own component accumulator, 
+    # # which must be merged with the one from this function.
+    # from CaloTools.CaloNoiseToolConfig import CaloNoiseToolCfg
+    # caloNoiseAcc, caloNoiseTool = CaloNoiseToolCfg(flags)
+    # result.merge(caloNoiseAcc)
+    # tileTMDBDigitsMonAlg.CaloNoiseTool = caloNoiseTool
+
+    # # Then, add a tool that doesn't have its own configuration function. In
+    # # this example, no accumulator is returned, so no merge is necessary.
+    # from MyDomainPackage.MyDomainPackageConf import MyDomainTool
+    # tileTMDBDigitsMonAlg.MyDomainTool = MyDomainTool()
+
+    # Add a generic monitoring tool (a "group" in old language). The returned 
+    # object here is the standard GenericMonitoringTool.
+    # myGroup = helper.addGroup(
+    #     tileTMDBDigitsMonAlg,
+    #     'ExampleMonitor',
+    #     'OneRing/'
+    #)
+
+    # Add a GMT for the other example monitor algorithm
+    # anotherGroup = helper.addGroup(anotherExampleMonAlg,'ExampleMonitor')
+
+
+    # Configure histogram with tileTMDBDigitsMonAlg algorithm execution time
+
+
+
+    ### STEP 5 ###
+    # Configure histograms
+
+
+
+    run = str(flags.Input.RunNumber[0])
+    from TileCalibBlobObjs.Classes import TileCalibUtils as Tile
+    from TileMonitoring.TileMonitoringCfgHelper import addTileTMDB_1DHistogramsArray, addTileTMDB_2DHistogramsArray
+
+
+
+
+    addTileTMDB_2DHistogramsArray(helper, tileTMDBDigitsMonAlg, name = 'TMDBDigitsPedestal',
+                                  value = 'pedestal', title = 'Mean pedestal (sample[0])',
+                                  path = 'Tile/TMDBDigits', type='TProfile2D', run = run)   
+    
+    addTileTMDB_2DHistogramsArray(helper, tileTMDBDigitsMonAlg, name = 'TMDBDigitsAmplitude',
+                                  value = 'amplitude', title = 'Difference between maximum and minimum sample',
+                                  path = 'Tile/TMDBDigits', type='TProfile2D', run = run)
+                                    
+    addTileTMDB_2DHistogramsArray(helper, tileTMDBDigitsMonAlg, name = 'TMDBDigitsHFN',
+                                  value = 'HFN', title = 'Mean RMS of 7 samples (HFN)',
+                                  path = 'Tile/TMDBDigits', type='TProfile2D', run = run)                                     
+     
+
+    addTileTMDB_1DHistogramsArray(helper, tileTMDBDigitsMonAlg, name = 'TMDBDigitsCellPedestal', 
+                                    xvalue = 'pedestal', title = 'Pedestal (sample[0]);[ADC]', 
+                                    path = 'Tile/TMDBDigits', type='TH1D', run = run,
+                                    xbins = 101, xmin = -0.5, xmax = 100.5)
+
+    addTileTMDB_1DHistogramsArray(helper, tileTMDBDigitsMonAlg, name = 'TMDBDigitsCellHFN',
+                                    xvalue = 'HFN', title = 'Mean RMS (HFN);[ADC]', 
+                                    path = 'Tile/TMDBDigits', type='TH1D', run = run,
+                                    xbins = 41, xmin = -0.5, xmax = 40.5)
+
+    addTileTMDB_1DHistogramsArray(helper, tileTMDBDigitsMonAlg, name = 'TMDBDigitsCellAmplitude', 
+                                    xvalue = 'amplitude', title = 'Difference between maximum and minimum sample;[ADC]',
+                                    path = 'Tile/TMDBDigits', type='TH1D', run = run,
+                                    xbins = 101, xmin = -0.5, xmax = 100.5)
+
+
+    ### STEP 6 ###
+    # Finalize. The return value should be a tuple of the ComponentAccumulator
+    # and the sequence containing the created algorithms. If we haven't called
+    # any configuration other than the AthMonitorCfgHelper here, then we can 
+    # just return directly (and not create "result" above)
+    # return helper.result()
+    
+    # # Otherwise, merge with result object and return
+    accumalator = helper.result()
+    result.merge(accumalator)
+    return result
+
+
+
+if __name__=='__main__':
+    # Setup the Run III behavior
+    from AthenaCommon.Configurable import Configurable
+    Configurable.configurableRun3Behavior = 1
+
+    # Setup logs
+    from AthenaCommon.Logging import log
+    from AthenaCommon.Constants import INFO, VERBOSE
+    log.setLevel(INFO)
+
+    # Set the Athena configuration flags
+    from AthenaConfiguration.AllConfigFlags import ConfigFlags
+
+    from AthenaConfiguration.TestDefaults import defaultTestFiles
+    ConfigFlags.Input.Files = defaultTestFiles.RAW
+    ConfigFlags.Output.HISTFileName = 'TileTMDBDigitsMonitorOutput.root'
+    ConfigFlags.DQ.useTrigger = False
+    ConfigFlags.DQ.enableLumiAccess = False
+
+    ConfigFlags.lock()
+
+    # Initialize configuration object, add accumulator, merge, and run.
+    from AthenaConfiguration.MainServicesConfig import MainServicesCfg 
+    # from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
+    cfg = MainServicesCfg(ConfigFlags)
+    # cfg.merge(PoolReadCfg(ConfigFlags))
+
+    from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
+    tileTypeNames = ['TileDigitsContainer/MuRcvDigitsCnt']
+    cfg.merge( ByteStreamReadCfg(ConfigFlags, type_names = tileTypeNames) )
+
+  
+
+    tileTMDBDigitsMonitorAccumulator  = TileTMDBDigitsMonitoringConfig(ConfigFlags)
+
+    cfg.merge(tileTMDBDigitsMonitorAccumulator)
+
+    cfg.printConfig(withDetails = True, summariseProps = True)
+    ConfigFlags.dump()
+
+    
+    cfg.store( open('TileTMDBDigitsMonitorAlgorithm.pkl','wb') )
+
+    sc = cfg.run(maxEvents=-1)
+
+    import sys
+    # Success should be 0
+    sys.exit(not sc.isSuccess())
diff --git a/TileCalorimeter/TileMonitoring/src/TileTMDBDigitsMonitorAlgorithm.cxx b/TileCalorimeter/TileMonitoring/src/TileTMDBDigitsMonitorAlgorithm.cxx
new file mode 100644
index 000000000000..4b5c4ff46f0f
--- /dev/null
+++ b/TileCalorimeter/TileMonitoring/src/TileTMDBDigitsMonitorAlgorithm.cxx
@@ -0,0 +1,172 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+// Tile includes
+#include "TileTMDBDigitsMonitorAlgorithm.h"
+#include "TileIdentifier/TileHWID.h"
+#include "TileCalibBlobObjs/TileCalibUtils.h"
+
+#include <math.h> 
+// Athena includes
+#include "StoreGate/ReadHandle.h"
+
+
+TileTMDBDigitsMonitorAlgorithm::TileTMDBDigitsMonitorAlgorithm( const std::string& name, ISvcLocator* pSvcLocator )
+  :AthMonitorAlgorithm(name, pSvcLocator)
+  , m_tileHWID(nullptr)
+{
+
+}
+
+TileTMDBDigitsMonitorAlgorithm::~TileTMDBDigitsMonitorAlgorithm() {
+}
+
+
+StatusCode TileTMDBDigitsMonitorAlgorithm::initialize() {
+
+  ATH_CHECK( AthMonitorAlgorithm::initialize() );
+
+  ATH_MSG_INFO("in initialize()");
+
+  ATH_CHECK( detStore()->retrieve(m_tileHWID) );
+
+  ATH_CHECK( m_digitsContainerKey.initialize() );
+
+  using Tile = TileCalibUtils;
+  using namespace Monitored;
+
+  m_hfnGroups = buildToolMap<int>(m_tools, "TMDBDigitsHFN", Tile::MAX_ROS - 1);
+  m_pedGroups = buildToolMap<int>(m_tools, "TMDBDigitsPedestal", Tile::MAX_ROS - 1);    
+  m_ampGroups = buildToolMap<int>(m_tools, "TMDBDigitsAmplitude", Tile::MAX_ROS - 1);
+
+
+    if (m_nChannels.size() != (Tile::MAX_ROS - 1)) {
+       ATH_MSG_FATAL( "Size of NumberOfChannels should be 4 (LBA, LBC, EBA, EBC), but is " << m_nChannels.size() );
+       return StatusCode::FAILURE;
+    }
+
+    std::vector<std::string> partitionName = {"LBA", "LBC", "EBA", "EBC"}; // ROS - 1 to partition name map
+    for (unsigned int partition = 0; partition < Tile::MAX_ROS-1; ++partition) {
+      m_cellPedGroups.push_back(buildToolMap<int>(m_tools,
+                                                  "TMDBDigitsCellPedestal_" + partitionName[partition],
+                                                  m_nChannels[partition]));
+      m_cellHFNGroups.push_back(buildToolMap<int>(m_tools,
+                                                  "TMDBDigitsCellHFN_" + partitionName[partition],
+                                                  m_nChannels[partition]));
+      m_cellAmpGroups.push_back(buildToolMap<int>(m_tools,
+                                                  "TMDBDigitsCellAmplitude_" + partitionName[partition],
+                                                  m_nChannels[partition]));                                                                                        
+    }
+    
+
+  return StatusCode::SUCCESS;
+}
+
+
+StatusCode TileTMDBDigitsMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const {
+
+  ATH_MSG_DEBUG( "in fillHistograms()" );
+  using Tile = TileCalibUtils;
+  std::vector<int> drawers[Tile::MAX_ROS - 1];
+  std::vector<int> channels[Tile::MAX_ROS - 1];
+  std::vector<float> pedestals[Tile::MAX_ROS - 1];
+  std::vector<float> amplitudes[Tile::MAX_ROS - 1];
+  std::vector<float> hfns[Tile::MAX_ROS - 1];
+  int maxChannel = *std::max_element(std::begin(m_nChannels), std::end(m_nChannels));
+  std::vector<float> cellPedestals[Tile::MAX_ROS - 1][maxChannel];
+  std::vector<float> cellHFNs[Tile::MAX_ROS - 1][maxChannel];
+  std::vector<float> cellAmplitudes[Tile::MAX_ROS - 1][maxChannel];
+
+  SG::ReadHandle<TileDigitsContainer> digitsContainer(m_digitsContainerKey, ctx);
+  ATH_CHECK( digitsContainer.isValid() );
+
+  for (IdentifierHash hash : digitsContainer->GetAllCurrentHashes()) {
+    const TileDigitsCollection* digitsCollection = digitsContainer->indexFindPtr (hash);
+ 
+    int fragId = digitsCollection->identify();
+    unsigned int drawer = (fragId & 0x3F);
+    unsigned int ros = fragId >> 8;
+    unsigned int partition = ros - 1;
+
+    for (const TileDigits* tile_digits : *digitsCollection) {
+
+      HWIdentifier adc_id = tile_digits->adc_HWID();
+      int channel = m_tileHWID->channel(adc_id);
+      std::vector<float> digits = tile_digits->samples();
+
+      double mean_samp = 0.0;
+      double rms_samp = 0.0;
+      unsigned int n_digits = digits.size();
+
+      for (double digit : digits) {
+        mean_samp += digit;
+        rms_samp += digit * digit;
+      }
+
+      if (n_digits > 1) {
+        drawers[partition].push_back(drawer);
+        channels[partition].push_back(channel);
+
+        double ped = digits[0];
+        pedestals[partition].push_back(ped);
+  
+        mean_samp /= n_digits;
+        rms_samp = rms_samp / n_digits - mean_samp * mean_samp;
+        rms_samp = (rms_samp > 0.0) ? sqrt(rms_samp * n_digits / (n_digits - 1)) : 0.0;
+        hfns[partition].push_back(rms_samp);
+
+        //-- temporary until TMDB raw channel monitoring tool be ready --//
+
+        auto min_max = std::minmax_element(digits.begin(), digits.end());
+        float min_digit = *min_max.first;
+        float max_digit = *min_max.second;
+        float amplitude = max_digit - min_digit;
+        amplitudes[partition].push_back(amplitude);
+
+
+        //---------------------------------------------------------------//
+        if (channel < m_nChannels[partition]) {
+         cellPedestals[partition][channel].push_back(ped);
+         cellHFNs[partition][channel].push_back(rms_samp);
+         cellAmplitudes[partition][channel].push_back(amplitude);
+        }
+
+      } 
+    }
+  }
+
+
+  for (unsigned int partition = 0; partition < Tile::MAX_ROS - 1; ++partition) {
+    if (!pedestals[partition].empty()) {
+      auto monModule = Monitored::Collection("module", drawers[partition]);
+      auto monChannel = Monitored::Collection("channel", channels[partition]);
+      auto monPedestal = Monitored::Collection("pedestal", pedestals[partition]);
+      fill(m_tools[m_pedGroups[partition]], monModule, monChannel, monPedestal);
+
+      auto monHFN = Monitored::Collection("HFN", hfns[partition]);
+      fill(m_tools[m_hfnGroups[partition]], monModule, monChannel, monHFN);
+    
+      auto monAmplitude = Monitored::Collection("amplitude", amplitudes[partition]);
+      fill(m_tools[m_ampGroups[partition]], monModule, monChannel, monAmplitude);   
+
+      for (unsigned int channel = 0; channel <  m_nChannels[partition]; ++channel) {
+        if (!cellPedestals[partition][channel].empty()) {
+          auto monPedestal = Monitored::Collection("pedestal", cellPedestals[partition][channel]);
+          fill(m_tools[m_cellPedGroups[partition][channel]], monPedestal);          
+        }
+        if (!cellHFNs[partition][channel].empty()) {
+          auto monHFN = Monitored::Collection("HFN", cellHFNs[partition][channel]);
+          fill(m_tools[m_cellHFNGroups[partition][channel]], monHFN);          
+        }
+        if (!cellAmplitudes[partition][channel].empty()) {
+          auto monAmplitude = Monitored::Collection("amplitude", cellAmplitudes[partition][channel]);
+          fill(m_tools[m_cellAmpGroups[partition][channel]], monAmplitude);          
+        }
+      }      
+    }
+  }   
+
+    
+  return StatusCode::SUCCESS;
+}
diff --git a/TileCalorimeter/TileMonitoring/src/TileTMDBDigitsMonitorAlgorithm.h b/TileCalorimeter/TileMonitoring/src/TileTMDBDigitsMonitorAlgorithm.h
new file mode 100644
index 000000000000..7ea2f4dc01c9
--- /dev/null
+++ b/TileCalorimeter/TileMonitoring/src/TileTMDBDigitsMonitorAlgorithm.h
@@ -0,0 +1,46 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TILEMONITORING_TILETMDBDIGITSMONITORALGORITHM_H
+#define TILEMONITORING_TILETMDBDIGITSMONITORALGORITHM_H
+
+// Tile includes
+#include "TileEvent/TileDigitsContainer.h"
+
+
+// Atlas includes
+#include "AthenaMonitoring/AthMonitorAlgorithm.h"
+#include "AthenaMonitoringKernel/Monitored.h"
+#include "StoreGate/ReadHandleKey.h"
+
+class TileHWID;
+
+class TileTMDBDigitsMonitorAlgorithm : public AthMonitorAlgorithm {
+  public:
+    TileTMDBDigitsMonitorAlgorithm( const std::string& name, ISvcLocator* pSvcLocator );
+    virtual ~TileTMDBDigitsMonitorAlgorithm();
+    virtual StatusCode initialize() override;
+    virtual StatusCode fillHistograms( const EventContext& ctx ) const override;
+  private:
+
+    std::string m_digitsContainerName;
+    const TileHWID* m_tileHWID;
+    //int m_nSamples;
+
+    std::vector<int> m_pedGroups;
+    std::vector<int> m_hfnGroups;
+    std::vector<int> m_ampGroups;
+
+    SG::ReadHandleKey<TileDigitsContainer> m_digitsContainerKey{this,
+    "MuRcvDigitsCnt", "MuRcvDigitsCnt", "Muon digits container"};
+
+    Gaudi::Property<std::vector<int>> m_nChannels{this,
+    "NumberOfChannels", {8, 8, 4, 4}, "Number of TMDB channels per module in (LBA, LBC, EBA, EBC)"};
+
+    std::vector<std::vector<int>> m_cellPedGroups;
+    std::vector<std::vector<int>> m_cellHFNGroups;
+    std::vector<std::vector<int>> m_cellAmpGroups;
+    
+};
+#endif // TILEMONITORING_TILETMDBDIGITSMONITORALGORITHM_H
diff --git a/TileCalorimeter/TileMonitoring/src/components/TileMonitoring_entries.cxx b/TileCalorimeter/TileMonitoring/src/components/TileMonitoring_entries.cxx
index e5df98c9de6c..6b42257bfd6f 100644
--- a/TileCalorimeter/TileMonitoring/src/components/TileMonitoring_entries.cxx
+++ b/TileCalorimeter/TileMonitoring/src/components/TileMonitoring_entries.cxx
@@ -36,6 +36,7 @@
 #include "../TileRawChannelNoiseMonitorAlgorithm.h"
 #include "../TileMuonFitMonitorAlgorithm.h"
 #include "../TileRODMonitorAlgorithm.h"
+#include "../TileTMDBDigitsMonitorAlgorithm.h"
 
 DECLARE_COMPONENT( TileFatherMonTool )
 DECLARE_COMPONENT( TilePaterMonTool )
@@ -75,3 +76,4 @@ DECLARE_COMPONENT( TileRawChannelTimeMonitorAlgorithm )
 DECLARE_COMPONENT( TileRawChannelNoiseMonitorAlgorithm )
 DECLARE_COMPONENT( TileMuonFitMonitorAlgorithm )
 DECLARE_COMPONENT( TileRODMonitorAlgorithm )
+DECLARE_COMPONENT( TileTMDBDigitsMonitorAlgorithm )
-- 
GitLab


From 253549bef036b5f92b3d5f2e93e71e10106ae02c Mon Sep 17 00:00:00 2001
From: Soshi Tsuno <soshi.tsuno@cern.ch>
Date: Tue, 6 Oct 2020 10:49:56 +0200
Subject: [PATCH 235/403] update to reflect comments.

---
 .../PixelCalibAlgs/OccupancyMapMaker.h        |  6 ++++--
 .../PixelCalibAlgs/src/OccupancyMapMaker.cxx  | 19 +++++++------------
 2 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/OccupancyMapMaker.h b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/OccupancyMapMaker.h
index 687dd46d1345..6880b883bdb3 100755
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/OccupancyMapMaker.h
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/OccupancyMapMaker.h
@@ -96,10 +96,12 @@ class OccupancyMapMaker: public AthAlgorithm{
 
     unsigned int m_nBCReadout;
 
-    int m_evt_lbMin; // lower limit for LB to be taken into account
-    int m_evt_lbMax; // upper limit for LB to be taken into account
+    unsigned int m_evt_lbMin; // lower limit for LB to be taken into account
+    unsigned int m_evt_lbMax; // upper limit for LB to be taken into account
 
     bool m_calculateNoiseMaps;
+
+    std::string m_mapFile;
 };
 
 #endif  // PIXELCONDITIONSALGS_OCCUPANCYMAPMAKERH_
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/OccupancyMapMaker.cxx b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/OccupancyMapMaker.cxx
index c721c8a0a2d9..b235a2e19927 100755
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/OccupancyMapMaker.cxx
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/OccupancyMapMaker.cxx
@@ -62,7 +62,8 @@ OccupancyMapMaker::OccupancyMapMaker(const std::string& name, ISvcLocator* pSvcL
   m_nBCReadout(2),
   m_evt_lbMin(0),
   m_evt_lbMax(-1),
-  m_calculateNoiseMaps(false)
+  m_calculateNoiseMaps(false),
+  m_mapFile("PixelMapping_Run2.dat")
 {
   declareProperty("PixelRDOKey", m_pixelRDOKey, "StoreGate key of pixel RDOs");
   declareProperty("Disk1ACut", m_disk1ACut, "Occupancy cut for Disk1A pixels");
@@ -83,6 +84,7 @@ OccupancyMapMaker::OccupancyMapMaker(const std::string& name, ISvcLocator* pSvcL
   declareProperty("GangedPixelMultiplier", m_gangedPixelMultiplier, "Multiplier for ganged pixels");
   declareProperty("OccupancyPerBC", m_occupancyPerBC, "Calculate occupancy per BC or per event");
   declareProperty("CalculateNoiseMaps", m_calculateNoiseMaps, "If false only build hit maps");
+  declareProperty("InputPixelMap", m_mapFile);
   declareProperty("THistSvc", m_tHistSvc, "THistSvc");
 }
 
@@ -163,7 +165,6 @@ std::vector<std::string> OccupancyMapMaker::splitter(const std::string &str,
 
 StatusCode OccupancyMapMaker::registerHistograms(){
 
-  const std::string mapFile = "PixelMapping_Run2.dat";
   char* getenvPath = std::getenv("DATAPATH");
   const unsigned int maxPathStringLength{3000};
   if((not getenvPath) or (strlen(getenvPath) > maxPathStringLength) ){
@@ -177,9 +178,9 @@ StatusCode OccupancyMapMaker::registerHistograms(){
   std::vector<std::string> paths = splitter(tmppath, ':'); 
   bool found(false);  
   for(const auto& x : paths){
-    std::ifstream infile( (x+"/"+mapFile).c_str() );
+    std::ifstream infile( (x+"/"+m_mapFile).c_str() );
     if( infile.is_open() ){
-      ATH_MSG_INFO("Mapping file '" << mapFile << "' found in " << x);
+      ATH_MSG_INFO("Mapping file '" << m_mapFile << "' found in " << x);
 
       int tmp_barrel_ec; int tmp_layer; int tmp_modPhi; int tmp_module_eta; std::string tmp_module_name;
       std::vector<int> tmp_position;
@@ -199,7 +200,7 @@ StatusCode OccupancyMapMaker::registerHistograms(){
   }
   
   if( !found ){
-    ATH_MSG_FATAL("Mapping file '" << mapFile << "' not found in DATAPATH !!!");
+    ATH_MSG_FATAL("Mapping file '" << m_mapFile << "' not found in DATAPATH !!!");
     return StatusCode::FAILURE;
   }
 
@@ -309,7 +310,7 @@ StatusCode OccupancyMapMaker::execute(){
   } ATH_MSG_DEBUG("Event info retrieved");
 
   // check LB is in allowed range
-  int LB =  static_cast<int>(eventInfo->event_ID()->lumi_block());
+  unsigned int LB =  eventInfo->event_ID()->lumi_block();
   if( (LB < m_evt_lbMin) || (m_evt_lbMax >= m_evt_lbMin && LB > m_evt_lbMax) ){
     ATH_MSG_VERBOSE("Event in lumiblock " << eventInfo->event_ID()->lumi_block() <<
 		    " not in selected range [" << m_evt_lbMin << "," << m_evt_lbMax << "] => skipped");    
@@ -522,12 +523,6 @@ StatusCode OccupancyMapMaker::finalize() {
   int modulesWithHits=0;
   int modulesWithDisabledPixels=0;
 
- 
-  //  std::sort(m_moduleHashList.begin(), m_moduleHashList.end());
-  //  if(m_pixelID->wafer_hash_max() > 1744) m_isIBL = true; // #modules only Pixel is 1744
-  //for(unsigned int moduleHash = 0; moduleHash < m_pixelID->wafer_hash_max(); moduleHash++)
-  //for(std::vector<int>::iterator it = m_moduleHashList.begin(); it != m_moduleHashList.end(); ++it)
-
   for (PixelID::const_id_iterator wafer_it=m_pixelID->wafer_begin(); wafer_it!=m_pixelID->wafer_end(); ++wafer_it) {
     Identifier ident = *wafer_it;
     if(!m_pixelID->is_pixel(ident)) continue;  
-- 
GitLab


From f8881a43de7509f393456dd51535f7742d7b4416 Mon Sep 17 00:00:00 2001
From: Debo <debottam.bakshi.gupta@cern.ch>
Date: Tue, 6 Oct 2020 11:11:17 +0200
Subject: [PATCH 236/403] fixing typos

---
 .../TrigEgammaHypo/src/TrigEgammaDPhiHypoTool.cxx             | 4 ++--
 .../TrigEgammaHypo/src/TrigEgammaMassHypoTool.cxx             | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDPhiHypoTool.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDPhiHypoTool.cxx
index dbac3449532d..774ae3deb100 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDPhiHypoTool.cxx
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaDPhiHypoTool.cxx
@@ -43,7 +43,7 @@ bool TrigEgammaDPhiHypoTool::executeAlg(std::vector<LegDecision> &combination) c
 
   auto dphiOfAccepted = Monitored::Scalar( "DphiOfAccepted"   , -99 );
   auto monitorIt    = Monitored::Group( m_monTool, dphiOfAccepted);
-//retrieve the electrons 
+//retrieve the elements 
   std::vector<ElementLink<xAOD::IParticleContainer>> selected_photons;
   for (auto el: combination){
     auto EL= el.second;    
@@ -65,7 +65,7 @@ bool TrigEgammaDPhiHypoTool::executeAlg(std::vector<LegDecision> &combination) c
   }
 
   if (pass)
-     ATH_MSG_DEBUG( " deltaPhi " << dphiOfAccepted << " is above the threshold "<<m_thresholdDPhiCut<<" This seleciton passed! ");
+     ATH_MSG_DEBUG( " deltaPhi " << dphiOfAccepted << " is above the threshold "<<m_thresholdDPhiCut<<" This selection passed! ");
   
 return pass;
 
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaMassHypoTool.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaMassHypoTool.cxx
index 10bc2d6cba71..f54cb97af906 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaMassHypoTool.cxx
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaMassHypoTool.cxx
@@ -49,7 +49,7 @@ bool TrigEgammaMassHypoTool::executeAlg(std::vector<LegDecision> &combination) c
   auto massOfAccepted = Monitored::Scalar( "MassOfAccepted"   , -1.0 );
   auto monitorIt    = Monitored::Group( m_monTool, massOfAccepted);
 
-//retrieve the electrons 
+//retrieve the elements
   std::vector<ElementLink<xAOD::IParticleContainer>> selected_electrons;
   for (auto el: combination){
     auto EL= el.second;    
@@ -71,7 +71,7 @@ bool TrigEgammaMassHypoTool::executeAlg(std::vector<LegDecision> &combination) c
   }
 
   if (pass)
-     ATH_MSG_DEBUG( " Invariant mass " << massOfAccepted << " is  within [" <<m_lowerMassElectronClusterCut<< "," << m_upperMassElectronClusterCut << "] This seleciton passed! ");
+     ATH_MSG_DEBUG( " Invariant mass " << massOfAccepted << " is  within [" <<m_lowerMassElectronClusterCut<< "," << m_upperMassElectronClusterCut << "] This selection passed! ");
   
   return pass;
 
-- 
GitLab


From 12326f3b5e5598859882c7c9dd89f8e4632efd23 Mon Sep 17 00:00:00 2001
From: sutt <sutt@cern.ch>
Date: Tue, 6 Oct 2020 11:29:44 +0200
Subject: [PATCH 237/403] Add the vertex analyses to the post-processing

---
 .../TrigInDetAnalysisUser/share/TIDAdata-chains-run3.dat    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-chains-run3.dat b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-chains-run3.dat
index 9704e02ecdfe..69774a2b07a2 100644
--- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-chains-run3.dat
+++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-chains-run3.dat
@@ -28,9 +28,9 @@ testChains = {
     "HLT_j45_subjesgscIS_ftf_boffperf_split_L1J20:HLT_IDTrack_Bjet_FTF",
     "HLT_j45_subjesgscIS_ftf_boffperf_split_L1J20:HLT_IDTrack_Bjet_IDTrig",
     
-    "HLT_j45_subjesgscIS_ftf_boffperf_split_L1J20:HLT_IDTrack_FS_FTF:HLT_FSRoI:HLT_IDVertex_FS",
-    "HLT_j45_ftf_subjesgscIS_boffperf_split_L1J20:HLT_IDTrack_FS_FTF:HLT_FSRoI:HLT_IDVertex_FS",
-    "HLT_j45_ftf_L1J15:HLT_IDTrack_FS_FTF:HLT_FSRoI:HLT_IDVertex_FS",
+    "HLT_j45_subjesgscIS_ftf_boffperf_split_L1J20:HLT_IDTrack_FS_FTF:HLT_FSRoI:HLT_IDVertex_FS:post:rvtx=HLT_IDVertex_FS",
+    "HLT_j45_ftf_subjesgscIS_boffperf_split_L1J20:HLT_IDTrack_FS_FTF:HLT_FSRoI:HLT_IDVertex_FS:post:rvtx=HLT_IDVertex_FS",
+    "HLT_j45_ftf_L1J15:HLT_IDTrack_FS_FTF:HLT_FSRoI:HLT_IDVertex_FS:post:rvtx=HLT_IDVertex_FS",
 
     "HLT_mb_sptrk_L1RD0_FILLED:HLT_IDTrack_MinBias_FTF",
 
-- 
GitLab


From a0fd6d0c2b285fb19fc5d6d094a2074a41dc948e Mon Sep 17 00:00:00 2001
From: sutt <sutt@cern.ch>
Date: Tue, 6 Oct 2020 12:00:48 +0200
Subject: [PATCH 238/403] Add vertex analysis dat file for the post processing

---
 .../share/TIDAdata-vtx.dat                    | 62 +++++++++++++++++++
 1 file changed, 62 insertions(+)
 create mode 100644 Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-vtx.dat

diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-vtx.dat b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-vtx.dat
new file mode 100644
index 000000000000..a04c564b5e7b
--- /dev/null
+++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-vtx.dat
@@ -0,0 +1,62 @@
+// emacs: this is -*- c++ -*-
+
+pT     = 1000;
+eta    = 2.5;
+// npix   = 1;
+// nsct   = 2;
+npix   = 2; /// double up, this is number of degrees of freedomw and really means 2 pixel "clusters"  
+nsct   = 4;
+
+nsiholes = 2;
+
+expectBL = 1;
+
+pT_rec  = 0;
+eta_rec = 5;
+Rmatch = 0.05;
+
+
+dumpflag = 0;
+
+a0v = 10.5;
+z0v = 10.5;
+
+refChain = "Offline";
+//refChain = "Electrons";
+//refChain = "Muons";
+//refChain = "Taus";
+
+/// NB: For the "Truth" chains, need to specify what 
+///     sort of particle (ie which pdgID) is needed
+/// Fixme: should add a flag to enable/disable this
+///        what if we want all final state particles
+///        independent of pdgID?
+
+//pdgId=11; // electron --entered in command line now
+
+// Nentries = 10000;
+
+MinVertices = 0;
+
+VertexSelection    = "0"; // possible flags: BestPT2, LeadPT, Ntracks
+// VertexSelectionRec = "0";
+
+// FilterRoi = { 2.4, 1, 2 };
+ntracks = 2;
+
+#include "TIDAdata-chains-run3.dat" 
+
+InitialiseFirstEvent = 1;
+
+outputFile = "data-vtx.root";
+
+// #include "dataset.dat"
+
+
+// GRL = "/afs/cern.ch/user/s/sutt/tida/data16_13TeV.periodAllYear_HEAD_DQDefects-00-02-02_PHYS_StandardGRL_All_Good_25ns.xml";
+
+#include "grl.dat"
+
+
+DataFiles = { "TrkNtuple-0000.root"};
+
-- 
GitLab


From 058712e51021604125a4d4adcc21793769288189 Mon Sep 17 00:00:00 2001
From: Mohsen Rezaei Estabragh <mohsen.rezaei.estabragh@cern.ch>
Date: Tue, 6 Oct 2020 10:04:24 +0000
Subject: [PATCH 239/403] resolving L1 review.

---
 Tools/PyJobTransforms/python/trfUtils.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Tools/PyJobTransforms/python/trfUtils.py b/Tools/PyJobTransforms/python/trfUtils.py
index c108eaf2ad92..6bb8596ddcfc 100644
--- a/Tools/PyJobTransforms/python/trfUtils.py
+++ b/Tools/PyJobTransforms/python/trfUtils.py
@@ -1256,7 +1256,7 @@ class analytic():
                 y = y[tail:]
                 y = y[:-tail]
 
-            if len(x) > minPoints and len(y) > minPoints:
+            if len(x)==len(y) and len(x) > minPoints:
                 msg.info('fitting {0} vs {1}'.format(y_name, x_name))
                 try:
                     fit = self.fit(x, y)
@@ -1276,7 +1276,7 @@ class analytic():
 
         return fitResult
 
-    # Extrcat wanted columns. e.g. x: Time , y: pss+swap
+    # Extract wanted columns. e.g. x: Time , y: pss+swap
     # @param x_name: column name to be extracted (string).
     # @param y_name: column name to be extracted (may contain '+'-sign) (string).
     # @return: x (list), y (list).
@@ -1319,7 +1319,7 @@ class analytic():
         return round(size, 2), power_labels[n]+'B/s'
 
 
-## @breif Low-level fitting class
+## @brief Low-level fitting class
 class Fit():
     _model = 'linear'  # fitting model
     _x = None  # x values
-- 
GitLab


From 79ccb695a8620b2e9027b19b7d53586d5add08a4 Mon Sep 17 00:00:00 2001
From: Kate Whalen <kate.whalen@cern.ch>
Date: Tue, 6 Oct 2020 12:36:16 +0200
Subject: [PATCH 240/403] PPM bugfix

---
 .../python/PprMonitorAlgorithm.py                    | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Trigger/TrigT1/TrigT1CaloMonitoring/python/PprMonitorAlgorithm.py b/Trigger/TrigT1/TrigT1CaloMonitoring/python/PprMonitorAlgorithm.py
index 34d39834237e..b08a4acf744d 100644
--- a/Trigger/TrigT1/TrigT1CaloMonitoring/python/PprMonitorAlgorithm.py
+++ b/Trigger/TrigT1/TrigT1CaloMonitoring/python/PprMonitorAlgorithm.py
@@ -76,9 +76,9 @@ def PprMonitoringConfig(inputFlags):
     # Eta-phi maps
     histPath = trigPath+'/LUT-CP/EtaPhiMaps'
 
-    myGroup.defineHistogram('etaTT_EM,phiTT_2d_EM;h_ppm_em_2d_etaPhi_tt_lutcp_AverageEt', title='EM Average LUT-CP Et for Et > 5 GeV/2', type='TH2F', path=histPath, xbins=etabins, ybins=phibins, ymin=phimin, ymax=phimax_2d, cutmask='mask_EM_cpET_5_phiBins', weight='cpET_EM')
+    myGroup.defineHistogram('etaTT_EM,phiTT_2d_EM,cpET_EM;h_ppm_em_2d_etaPhi_tt_lutcp_AverageEt', title='EM Average LUT-CP Et for Et > 5 GeV/2', type='TProfile2D', path=histPath, xbins=etabins, ybins=phibins, ymin=phimin, ymax=phimax_2d, cutmask='mask_EM_cpET_5_phiBins')
     
-    myGroup.defineHistogram('etaTT_HAD,phiTT_2d_HAD;h_ppm_had_2d_etaPhi_tt_lutcp_AverageEt', title='HAD Average LUT-CP Et for Et > 5 GeV/2', type='TH2F', path=histPath, xbins=etabins, ybins=phibins, ymin=phimin, ymax=phimax_2d, cutmask='mask_HAD_cpET_5_phiBins', weight='cpET_HAD')
+    myGroup.defineHistogram('etaTT_HAD,phiTT_2d_HAD,cpET_HAD;h_ppm_had_2d_etaPhi_tt_lutcp_AverageEt', title='HAD Average LUT-CP Et for Et > 5 GeV/2', type='TProfile2D', path=histPath, xbins=etabins, ybins=phibins, ymin=phimin, ymax=phimax_2d, cutmask='mask_HAD_cpET_5_phiBins')
 
     
     ########################   
@@ -103,9 +103,9 @@ def PprMonitoringConfig(inputFlags):
     # Eta-phi maps
     histPath = trigPath+'/LUT-JEP/EtaPhiMaps'
 
-    myGroup.defineHistogram('etaTT_EM,phiTT_2d_EM;h_ppm_em_2d_etaPhi_tt_lutjep_AverageEt', title='EM Average LUT-JEP Et for Et > 5 GeV', type='TH2F', path=histPath, xbins=etabins, ybins=phibins, ymin=phimin, ymax=phimax_2d, cutmask='mask_EM_jepET_5_phiBins', weight='jepET_EM')
+    myGroup.defineHistogram('etaTT_EM,phiTT_2d_EM,jepET_EM;h_ppm_em_2d_etaPhi_tt_lutjep_AverageEt', title='EM Average LUT-JEP Et for Et > 5 GeV', type='TProfile2D', path=histPath, xbins=etabins, ybins=phibins, ymin=phimin, ymax=phimax_2d, cutmask='mask_EM_jepET_5_phiBins')
 
-    myGroup.defineHistogram('etaTT_HAD,phiTT_2d_HAD;h_ppm_had_2d_etaPhi_tt_lutjep_AverageEt', title='HAD Average LUT-JEP Et for Et > 5 GeV', type='TH2F', path=histPath, xbins=etabins, ybins=phibins, ymin=phimin, ymax=phimax_2d, cutmask='mask_HAD_jepET_5_phiBins', weight='jepET_HAD')
+    myGroup.defineHistogram('etaTT_HAD,phiTT_2d_HAD,jepET_HAD;h_ppm_had_2d_etaPhi_tt_lutjep_AverageEt', title='HAD Average LUT-JEP Et for Et > 5 GeV', type='TProfile2D', path=histPath, xbins=etabins, ybins=phibins, ymin=phimin, ymax=phimax_2d, cutmask='mask_HAD_jepET_5_phiBins')
 
 
     ####################
@@ -116,13 +116,13 @@ def PprMonitoringConfig(inputFlags):
     # EM tower maps 
     myGroup.defineHistogram('etaTT_EM,phiTT_2d_EM;h_ppm_em_2d_etaPhi_tt_adc_HitMap', title='#eta - #phi map of EM FADC > ' +str(threshADC)+ ' for triggered timeslice; Tower #eta; Tower #phi', type='TH2F', path=histPath, xbins=etabins, ybins=phibins, ymin=phimin, ymax=phimax_2d, cutmask='mask_EM_timeslice') 
    
-    myGroup.defineHistogram('etaTT_EM,phiTT_2d_EM;h_ppm_em_2d_etaPhi_tt_adc_ProfileHitMap', title='#eta - #phi profile map of EM FADC > ' +str(threshADC)+ ' for triggered timeslice; Tower #eta; Tower #phi', type='TH2F', path=histPath, xbins=etabins, ybins=phibins, ymin=phimin, ymax=phimax_2d, cutmask='mask_EM_timeslice', weight='emTT_ADC') 
+    myGroup.defineHistogram('etaTT_EM,phiTT_2d_EM,emTT_ADC;h_ppm_em_2d_etaPhi_tt_adc_ProfileHitMap', title='#eta - #phi profile map of EM FADC > ' +str(threshADC)+ ' for triggered timeslice; Tower #eta; Tower #phi', type='TProfile2D', path=histPath, xbins=etabins, ybins=phibins, ymin=phimin, ymax=phimax_2d, cutmask='mask_EM_timeslice') 
 
  
     # HAD tower maps 
     myGroup.defineHistogram('etaTT_HAD,phiTT_2d_HAD;h_ppm_had_2d_etaPhi_tt_adc_HitMap', title='#eta - #phi map of HAD FADC > ' +str(threshADC)+ ' for triggered timeslice; Tower #eta; Tower #phi', type='TH2F', path=histPath, xbins=etabins, ybins=phibins, ymin=phimin, ymax=phimax_2d, cutmask='mask_HAD_timeslice')
  
-    myGroup.defineHistogram('etaTT_HAD,phiTT_2d_HAD;h_ppm_had_2d_etaPhi_tt_adc_ProfileHitMap', title='#eta - #phi profile map of HAD FADC > ' +str(threshADC)+ ' for triggered timeslice; Tower #eta; Tower #phi', type='TH2F', path=histPath, xbins=etabins, ybins=phibins, ymin=phimin, ymax=phimax_2d, cutmask='mask_HAD_timeslice', weight='hadTT_ADC')
+    myGroup.defineHistogram('etaTT_HAD,phiTT_2d_HAD,hadTT_ADC;h_ppm_had_2d_etaPhi_tt_adc_ProfileHitMap', title='#eta - #phi profile map of HAD FADC > ' +str(threshADC)+ ' for triggered timeslice; Tower #eta; Tower #phi', type='TProfile2D', path=histPath, xbins=etabins, ybins=phibins, ymin=phimin, ymax=phimax_2d, cutmask='mask_HAD_timeslice')
  
   
     
-- 
GitLab


From 9c2596110827fff21634f83a79ef30b115515abb Mon Sep 17 00:00:00 2001
From: Maximilian Goblirsch-Kolb <goblirsc@cern.ch>
Date: Tue, 6 Oct 2020 13:09:44 +0200
Subject: [PATCH 241/403] clean up fake flag in jet plot filling

---
 .../src/InDetPhysValMonitoringTool.cxx              | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPhysValMonitoringTool.cxx b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPhysValMonitoringTool.cxx
index 8f8a2e008c4e..847a361f5f68 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPhysValMonitoringTool.cxx
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPhysValMonitoringTool.cxx
@@ -452,7 +452,6 @@ InDetPhysValMonitoringTool::fillHistograms() {
         }
       }
       for (auto thisTrack: *tracks) {    // The beginning of the track loop
-        bool isFakeJet = false;
         if (m_useTrackSelection and not (m_trackSelectionTool->accept(*thisTrack, primaryvertex))) {
           continue;
         }
@@ -463,15 +462,11 @@ InDetPhysValMonitoringTool::fillHistograms() {
         if(std::isnan(prob)) prob = 0.0;
       
         const xAOD::TruthParticle* associatedTruth = getAsTruth.getTruth(thisTrack); 
-        bool unlinked = (associatedTruth==nullptr);
-        bool isFake = (associatedTruth && prob < m_lowProb);  
-        m_monPlots->fill(*thisTrack, *thisJet,isBjet,isFake,unlinked);
-                                                                                         
+        const bool unlinked = (associatedTruth==nullptr);
+        const bool isFake = (associatedTruth && prob < m_lowProb);  
+        m_monPlots->fill(*thisTrack, *thisJet,isBjet,isFake,unlinked);                                   
         if (associatedTruth){
-          if(prob < m_lowProb ) {
-            isFakeJet = true;
-          } 
-          m_monPlots->fillFakeRate(*thisTrack, *thisJet, isFakeJet,isBjet);
+          m_monPlots->fillFakeRate(*thisTrack, *thisJet, isFake,isBjet);
        }
       }
     }
-- 
GitLab


From 54c74a92828e524360939303b199abd78c489fa5 Mon Sep 17 00:00:00 2001
From: Ivan Sayago Galvan <isayagog@lxplus784.cern.ch>
Date: Tue, 6 Oct 2020 14:04:09 +0200
Subject: [PATCH 242/403] Warning fixes

---
 .../python/TileTMDBDigitsMonitorAlgorithm.py           |  3 +--
 .../src/TileTMDBDigitsMonitorAlgorithm.cxx             | 10 +++++-----
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/TileCalorimeter/TileMonitoring/python/TileTMDBDigitsMonitorAlgorithm.py b/TileCalorimeter/TileMonitoring/python/TileTMDBDigitsMonitorAlgorithm.py
index 1dc7e8073f9d..34172705d2c7 100644
--- a/TileCalorimeter/TileMonitoring/python/TileTMDBDigitsMonitorAlgorithm.py
+++ b/TileCalorimeter/TileMonitoring/python/TileTMDBDigitsMonitorAlgorithm.py
@@ -93,7 +93,6 @@ def TileTMDBDigitsMonitoringConfig(flags):
 
 
     run = str(flags.Input.RunNumber[0])
-    from TileCalibBlobObjs.Classes import TileCalibUtils as Tile
     from TileMonitoring.TileMonitoringCfgHelper import addTileTMDB_1DHistogramsArray, addTileTMDB_2DHistogramsArray
 
 
@@ -149,7 +148,7 @@ if __name__=='__main__':
 
     # Setup logs
     from AthenaCommon.Logging import log
-    from AthenaCommon.Constants import INFO, VERBOSE
+    from AthenaCommon.Constants import INFO
     log.setLevel(INFO)
 
     # Set the Athena configuration flags
diff --git a/TileCalorimeter/TileMonitoring/src/TileTMDBDigitsMonitorAlgorithm.cxx b/TileCalorimeter/TileMonitoring/src/TileTMDBDigitsMonitorAlgorithm.cxx
index 4b5c4ff46f0f..782ce2670d1a 100644
--- a/TileCalorimeter/TileMonitoring/src/TileTMDBDigitsMonitorAlgorithm.cxx
+++ b/TileCalorimeter/TileMonitoring/src/TileTMDBDigitsMonitorAlgorithm.cxx
@@ -73,10 +73,10 @@ StatusCode TileTMDBDigitsMonitorAlgorithm::fillHistograms( const EventContext& c
   std::vector<float> pedestals[Tile::MAX_ROS - 1];
   std::vector<float> amplitudes[Tile::MAX_ROS - 1];
   std::vector<float> hfns[Tile::MAX_ROS - 1];
-  int maxChannel = *std::max_element(std::begin(m_nChannels), std::end(m_nChannels));
-  std::vector<float> cellPedestals[Tile::MAX_ROS - 1][maxChannel];
-  std::vector<float> cellHFNs[Tile::MAX_ROS - 1][maxChannel];
-  std::vector<float> cellAmplitudes[Tile::MAX_ROS - 1][maxChannel];
+  static constexpr int TMDB_MAX_CHANNEL = 8;
+  std::vector<float> cellPedestals[Tile::MAX_ROS - 1][TMDB_MAX_CHANNEL];
+  std::vector<float> cellHFNs[Tile::MAX_ROS - 1][TMDB_MAX_CHANNEL];
+  std::vector<float> cellAmplitudes[Tile::MAX_ROS - 1][TMDB_MAX_CHANNEL];
 
   SG::ReadHandle<TileDigitsContainer> digitsContainer(m_digitsContainerKey, ctx);
   ATH_CHECK( digitsContainer.isValid() );
@@ -150,7 +150,7 @@ StatusCode TileTMDBDigitsMonitorAlgorithm::fillHistograms( const EventContext& c
       auto monAmplitude = Monitored::Collection("amplitude", amplitudes[partition]);
       fill(m_tools[m_ampGroups[partition]], monModule, monChannel, monAmplitude);   
 
-      for (unsigned int channel = 0; channel <  m_nChannels[partition]; ++channel) {
+      for (int channel = 0; channel < int(m_nChannels[partition]); ++channel) {
         if (!cellPedestals[partition][channel].empty()) {
           auto monPedestal = Monitored::Collection("pedestal", cellPedestals[partition][channel]);
           fill(m_tools[m_cellPedGroups[partition][channel]], monPedestal);          
-- 
GitLab


From 4a0ce6dc90e4003cb27a92d0f3c4a92b56302c86 Mon Sep 17 00:00:00 2001
From: Stephen Nicholas Swatman <stephen.nicholas.swatman@cern.ch>
Date: Tue, 6 Oct 2020 14:08:23 +0200
Subject: [PATCH 243/403] Throw configuration errors instead of continuing

In my previous implementation, I was checking for some non-sensical
configurations in the GlobalChi2Fitter and adjusting them to make sense.
However, this is apparently not recommended as it can mess with
configuration in the trigger, and the recommended way of going about it
is to simply throw a configuration error. This commit does exactly that.
---
 .../TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx          | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
index 13d8f739e384..14727f1955b4 100644
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
@@ -187,8 +187,8 @@ namespace Trk {
     if (!m_boundaryCheckTool.name().empty()) {
       ATH_CHECK(m_boundaryCheckTool.retrieve());
     } else if (m_holeSearch.value()) {
-      ATH_MSG_WARNING("Hole search requested but no boundary check tool provided, disabling hole search.");
-      m_holeSearch.set(false);
+      ATH_MSG_ERROR("Hole search requested but no boundary check tool provided.");
+      return StatusCode::FAILURE;
     }
 
     if (m_calomat) {
@@ -237,8 +237,8 @@ namespace Trk {
      * the hole search in the case that track summaries are disabled.
      */
     if (m_holeSearch.value() && !m_createSummary.value()) {
-      ATH_MSG_WARNING("Hole search requested but track summaries disabled, disabling hole search.");
-      m_holeSearch.set(false);
+      ATH_MSG_ERROR("Hole search requested but track summaries are disabled.");
+      return StatusCode::FAILURE;
     }
 
     ATH_MSG_INFO("fixed momentum: " << m_p);
-- 
GitLab


From 408d6699838164c58fc3cde98f6a5fe88ccc9f37 Mon Sep 17 00:00:00 2001
From: Stephen Nicholas Swatman <stephen.nicholas.swatman@cern.ch>
Date: Mon, 5 Oct 2020 16:14:51 +0200
Subject: [PATCH 244/403] Use Eigen types in transformPlaneToGlobal

Currently, the transformPlaneToGlobal method in the Runge Kutta
utilities package uses bare arrays of doubles. This means that data
needs to be copied out of AMG (Eigen) vectors in order to use them
there. This commit changes the signature of this function to take
AmgVector(5) references as argument instead, which should reduce data
copying a little, and bring the method more in line with the design of
the track parameter classes.
---
 .../TrkExUtils/TrkExUtils/RungeKuttaUtils.h   |  2 +-
 .../TrkExUtils/src/RungeKuttaUtils.cxx        | 27 +++++++++----------
 2 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/Tracking/TrkExtrapolation/TrkExUtils/TrkExUtils/RungeKuttaUtils.h b/Tracking/TrkExtrapolation/TrkExUtils/TrkExUtils/RungeKuttaUtils.h
index d87bbb85502d..90f406b03cad 100755
--- a/Tracking/TrkExtrapolation/TrkExUtils/TrkExUtils/RungeKuttaUtils.h
+++ b/Tracking/TrkExtrapolation/TrkExUtils/TrkExUtils/RungeKuttaUtils.h
@@ -131,7 +131,7 @@ namespace RungeKuttaUtils
   bool
   transformLocalToGlobal(bool,
                          const Trk::Surface*,
-                         const double* ATH_RESTRICT,
+                         const AmgVector(5)& ATH_RESTRICT,
                          double* ATH_RESTRICT);
 
   /////////////////////////////////////////////////////////////////////////////////
diff --git a/Tracking/TrkExtrapolation/TrkExUtils/src/RungeKuttaUtils.cxx b/Tracking/TrkExtrapolation/TrkExUtils/src/RungeKuttaUtils.cxx
index b9579057e6ce..9d99cae54bef 100755
--- a/Tracking/TrkExtrapolation/TrkExUtils/src/RungeKuttaUtils.cxx
+++ b/Tracking/TrkExtrapolation/TrkExUtils/src/RungeKuttaUtils.cxx
@@ -395,7 +395,7 @@ transformGlobalToCone(const Amg::Transform3D&  T,
 void
 transformPlaneToGlobal(bool useJac,
                        const Amg::Transform3D& T,
-                       const double* ATH_RESTRICT p,
+                       const AmgVector(5)& ATH_RESTRICT p,
                        double* ATH_RESTRICT P)
 {
   const double Ax[3] = {T(0,0),T(1,0),T(2,0)};
@@ -422,7 +422,7 @@ transformPlaneToGlobal(bool useJac,
 void
 transformDiscToGlobal(bool useJac,
                       const Amg::Transform3D& T,
-                      const double* ATH_RESTRICT p,
+                      const AmgVector(5)& ATH_RESTRICT p,
                       double* ATH_RESTRICT P)
 {
   const double Ax[3] = {T(0,0),T(1,0),T(2,0)};
@@ -452,7 +452,7 @@ void
 transformCylinderToGlobal(bool useJac,
                           const Amg::Transform3D& T,
                           double R,
-                          const double* ATH_RESTRICT p,
+                          const AmgVector(5)& ATH_RESTRICT p,
                           double* ATH_RESTRICT P)
 {
   const double Ax[3] = {T(0,0),T(1,0),T(2,0)};
@@ -481,7 +481,7 @@ transformCylinderToGlobal(bool useJac,
 void
 transformLineToGlobal(bool useJac,
                       const Amg::Transform3D& T,
-                      const double* ATH_RESTRICT p,
+                      const AmgVector(5)& ATH_RESTRICT p,
                       double* ATH_RESTRICT P)
 {
   const double A[3] = {T(0,2),T(1,2),T(2,2)};
@@ -525,10 +525,7 @@ bool Trk::RungeKuttaUtils::transformLocalToGlobal
 {
   const Trk::TrackParameters* pTp  = &Tp; if(!pTp) return false;
 
-  const AmgVector(5) Vp = Tp.parameters();
-  double p[5] = {Vp[0],Vp[1],Vp[2],Vp[3],Vp[4]};
-
-  return transformLocalToGlobal(useJac,&Tp.associatedSurface(),p,P);
+  return transformLocalToGlobal(useJac,&Tp.associatedSurface(),Tp.parameters(),P);
 }
 
 /////////////////////////////////////////////////////////////////////////////////
@@ -541,10 +538,7 @@ bool Trk::RungeKuttaUtils::transformLocalToGlobal
 {
   const Trk::NeutralParameters* pTp = &Tp; if(!pTp) return false;
 
-  const AmgVector(5) Vp = Tp.parameters();
-  double p[5] = {Vp[0],Vp[1],Vp[2],Vp[3],Vp[4]};
-
-  return transformLocalToGlobal(useJac,&Tp.associatedSurface(),p,P);
+  return transformLocalToGlobal(useJac,&Tp.associatedSurface(),Tp.parameters(),P);
 }
 
 /////////////////////////////////////////////////////////////////////////////////
@@ -555,7 +549,12 @@ bool Trk::RungeKuttaUtils::transformLocalToGlobal
 bool Trk::RungeKuttaUtils::transformLocalToGlobal
 (bool useJac,const Trk::PatternTrackParameters& Tp,double* P)
 {
-  return transformLocalToGlobal(useJac,Tp.associatedSurface(),Tp.par(),P);
+  // TODO: Remove copies when Trk::PatternTrackParameters migrates uses AMG types.
+  const double * p = Tp.par();
+  AmgVector(5) tmp;
+  tmp << p[0], p[1], p[2], p[3], p[4];
+
+  return transformLocalToGlobal(useJac,Tp.associatedSurface(),tmp,P);
 }
 
 /////////////////////////////////////////////////////////////////////////////////
@@ -996,7 +995,7 @@ AmgSymMatrix(5) * Trk::RungeKuttaUtils::newCovarianceMatrix(
 bool
 Trk::RungeKuttaUtils::transformLocalToGlobal(bool useJac,
                                              const Trk::Surface* Su,
-                                             const double* ATH_RESTRICT p,
+                                             const AmgVector(5)& ATH_RESTRICT p,
                                              double* ATH_RESTRICT P)
 {
   if(!Su) return false;
-- 
GitLab


From 3cbc9eebcaf65b9a98cefe43c45bfb67565fc913 Mon Sep 17 00:00:00 2001
From: Tim Martin <Tim.Martin@cern.ch>
Date: Tue, 6 Oct 2020 14:40:44 +0200
Subject: [PATCH 245/403] Remove conflict markers

---
 .../TrigMuonMonitoringMT/src/MuonMatchingTool.cxx   | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/MuonMatchingTool.cxx b/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/MuonMatchingTool.cxx
index 8aa60bc5946c..a071cbcc3573 100644
--- a/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/MuonMatchingTool.cxx
+++ b/Trigger/TrigMonitoring/TrigMuonMonitoringMT/src/MuonMatchingTool.cxx
@@ -107,18 +107,13 @@ const xAOD::Muon* MuonMatchingTool :: matchEFSAReadHandle( const EventContext& c
     if (MuonTrack) break;
   }
   return MuonTrack ? matchReadHandle<xAOD::Muon>( MuonTrack, m_EFreqdR, m_EFSAMuonContainerKey, ctx, &MuonMatchingTool::trigPosForMatchSATrack) : nullptr;
->>>>>>> upstream/master
 }
 
 
 const xAOD::Muon* MuonMatchingTool :: matchEFCB(  const xAOD::Muon *mu, std::string trig, bool &pass) const {
   ATH_MSG_DEBUG("MuonMonitoring::matchEFCB()");
   const xAOD::TrackParticle* MuonTrack = mu->trackParticle(xAOD::Muon::TrackParticleType::Primary);
-<<<<<<< HEAD
-  return MuonTrack ? match<xAOD::Muon>( MuonTrack, trig, m_EFreqdR, pass, "HLT_MuonsCB.*", &MuonMatchingTool::PosForMatchCBTrack) : nullptr;
-=======
-  return MuonTrack ? match<xAOD::Muon>( MuonTrack, trig, m_EFreqdR, pass, "HLT_MuonsCB", &MuonMatchingTool::trigPosForMatchCBTrack) : nullptr;
->>>>>>> upstream/master
+  return MuonTrack ? match<xAOD::Muon>( MuonTrack, trig, m_EFreqdR, pass, "HLT_MuonsCB.*", &MuonMatchingTool::trigPosForMatchCBTrack) : nullptr;
 }
 
 const TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> MuonMatchingTool :: matchEFCBLinkInfo( const xAOD::Muon *mu, std::string trig) const {
@@ -126,17 +121,13 @@ const TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> MuonMatchingTool :: matc
   bool pass = false;
   TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> muonLinkInfo;
   const xAOD::TrackParticle* MuonTrack = mu->trackParticle(xAOD::Muon::TrackParticleType::Primary);
-<<<<<<< HEAD
-  return MuonTrack ? matchLinkInfo<xAOD::Muon>(MuonTrack, trig, m_EFreqdR, pass, "HLT_MuonsCB.*", &MuonMatchingTool::PosForMatchCBTrack) : muonLinkInfo;
-=======
-  return MuonTrack ? matchLinkInfo<xAOD::Muon>(MuonTrack, trig, m_EFreqdR, pass, "HLT_MuonsCB", &MuonMatchingTool::trigPosForMatchCBTrack) : muonLinkInfo;
+  return MuonTrack ? matchLinkInfo<xAOD::Muon>(MuonTrack, trig, m_EFreqdR, pass, "HLT_MuonsCB.*", &MuonMatchingTool::trigPosForMatchCBTrack) : muonLinkInfo;
 }
 
 const xAOD::Muon* MuonMatchingTool :: matchEFCBReadHandle( const EventContext& ctx, const xAOD::Muon *mu) const {
   ATH_MSG_DEBUG("MuonMonitoring::matchEFCBReadHandle()");
   const xAOD::TrackParticle* MuonTrack = mu->trackParticle(xAOD::Muon::TrackParticleType::Primary);
   return MuonTrack ? matchReadHandle<xAOD::Muon>( MuonTrack, m_EFreqdR, m_EFCBMuonContainerKey, ctx, &MuonMatchingTool::trigPosForMatchCBTrack) : nullptr;
->>>>>>> upstream/master
 }
 
 
-- 
GitLab


From 22cd0f279e2eaa7f46c6979c1befff78d049b717 Mon Sep 17 00:00:00 2001
From: Savanna Marie Shaw <savanna.marie.shaw@cern.ch>
Date: Tue, 6 Oct 2020 15:02:16 +0200
Subject: [PATCH 246/403] Update to Run 2 muon trigger RDO decoding
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Updating the Run 2 muon triggers to use the hashIDs from all decoded ROBs when we use the ROB-based RDO decoding. This just brings the Run 2 triggers inline with the Run 3 triggers to make comparisons easier. Also fixing a typo in some debug output in the HoughLayerTool·
---
 .../src/MuonLayerHoughTool.cxx                |  2 +-
 .../TrigAlgorithms/TrigMuonEF/CMakeLists.txt  |  2 +-
 .../src/TrigMuonEFStandaloneTrackTool.cxx     | 23 ++++++++++++++++++-
 .../src/TrigMuonEFStandaloneTrackTool.h       |  4 ++++
 4 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughTool.cxx
index cca10df314b6..7544613cd3b0 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughTool.cxx
@@ -1851,7 +1851,7 @@ namespace Muon {
       if( m_idHelperSvc->rpcIdHelper().measuresPhi((*mit)->identify()) )  ++nphi;
       else ++neta;
     }
-    ATH_MSG_DEBUG("fillTGC: Filling " << m_idHelperSvc->toStringChamber(chid) 
+    ATH_MSG_DEBUG("fillRPC: Filling " << m_idHelperSvc->toStringChamber(chid) 
                                       << ": loc s"    << sector << " " << MuonStationIndex::regionName(region) << " " << MuonStationIndex::layerName(layer) 
                                       << " -> eta hits " << neta 
                                       << " phi hits "  << nphi );
diff --git a/Trigger/TrigAlgorithms/TrigMuonEF/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigMuonEF/CMakeLists.txt
index f937005ae5fa..4913e6602b6e 100644
--- a/Trigger/TrigAlgorithms/TrigMuonEF/CMakeLists.txt
+++ b/Trigger/TrigAlgorithms/TrigMuonEF/CMakeLists.txt
@@ -12,7 +12,7 @@ atlas_add_component( TrigMuonEF
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CLHEP_LIBRARIES} ${ROOT_LIBRARIES} AthContainers AthenaBaseComps AthenaKernel AthenaMonitoringKernelLib CaloEvent CscClusterizationLib CxxUtils EventPrimitives FourMomUtils GaudiKernel IRegionSelector InDetTrackSelectionToolLib MuidInterfaces MuonCnvToolInterfacesLib MuonCombinedEvent MuonCombinedToolInterfaces MuonIdHelpersLib MuonPattern MuonPrepRawData MuonRIO_OnTrack MuonReadoutGeometry MuonRecToolInterfaces MuonSegment MuonSegmentCombinerToolInterfaces MuonSegmentMakerToolInterfaces Particle RecoToolInterfaces StoreGateLib TrigCompositeUtilsLib TrigConfHLTData TrigInDetEvent TrigInterfacesLib TrigMuonEvent TrigMuonToolInterfaces TrigNavigationLib TrigParticle TrigSteeringEvent TrigTimeAlgsLib TrkEventPrimitives TrkParameters TrkSegment TrkToolInterfaces TrkTrack TrkTrackSummary xAODCaloEvent xAODMuon xAODTracking xAODTrigMuon )
+                     LINK_LIBRARIES ${CLHEP_LIBRARIES} ${ROOT_LIBRARIES} AthContainers AthenaBaseComps AthenaKernel AthenaMonitoringKernelLib CaloEvent CscClusterizationLib CxxUtils EventPrimitives FourMomUtils GaudiKernel IRegionSelector InDetTrackSelectionToolLib MuidInterfaces MuonCablingData MuonCnvToolInterfacesLib MuonCombinedEvent MuonCombinedToolInterfaces MuonIdHelpersLib MuonPattern MuonPrepRawData MuonRIO_OnTrack MuonReadoutGeometry MuonRecToolInterfaces MuonSegment MuonSegmentCombinerToolInterfaces MuonSegmentMakerToolInterfaces Particle RecoToolInterfaces RPC_CondCablingLib StoreGateLib TrigCompositeUtilsLib TrigConfHLTData TrigInDetEvent TrigInterfacesLib TrigMuonEvent TrigMuonToolInterfaces TrigNavigationLib TrigParticle TrigSteeringEvent TrigTimeAlgsLib TrkEventPrimitives TrkParameters TrkSegment TrkToolInterfaces TrkTrack TrkTrackSummary xAODCaloEvent xAODMuon xAODTracking xAODTrigMuon )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-extensions=ATL900,ATL901 )
diff --git a/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFStandaloneTrackTool.cxx b/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFStandaloneTrackTool.cxx
index f8ce12efabcf..0b79de7ca0b6 100644
--- a/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFStandaloneTrackTool.cxx
+++ b/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFStandaloneTrackTool.cxx
@@ -486,6 +486,8 @@ StatusCode TrigMuonEFStandaloneTrackTool::initialize()
   ATH_CHECK(m_cscClustersKey.initialize());
   //segment overlap removal
   ATH_CHECK( m_segmentOverlapRemovalTool.retrieve() );
+  ATH_CHECK(m_mdtCablingKey.initialize());
+  ATH_CHECK(m_rpcCablingKey.initialize());
 
   return StatusCode::SUCCESS;
 }
@@ -902,6 +904,18 @@ if (m_useMdtData>0) {
       }
       if (m_rpcPrepDataProvider->decode( getRpcRobList(muonRoI) ).isSuccess()) {
 	ATH_MSG_DEBUG("ROB-based seeded PRD decoding of RPC done successfully");
+	SG::ReadCondHandle<RpcCablingCondData> rpcCableHandle{m_rpcCablingKey};
+	const RpcCablingCondData* rpcCabling{*rpcCableHandle};
+	if(!rpcCabling){
+	  ATH_MSG_ERROR("nullptr to the read rpc cabling conditions object");
+	  return HLT::NAV_ERROR;
+	}
+	rpc_hash_ids.clear();
+	if(rpcCabling->giveRDO_fromROB(m_RpcRobList, rpc_hash_ids).isFailure()){
+	  ATH_MSG_ERROR("could not convert RPC robs to hash ID vector");
+	  return HLT::NAV_ERROR;
+	}
+
       } else {
 	ATH_MSG_WARNING("ROB-based seeded PRD decoding of RPC failed");
       }
@@ -941,6 +955,13 @@ if (m_useMdtData>0) {
       }
       if (m_mdtPrepDataProvider->decode( getMdtRobList(muonRoI) ).isSuccess()) {
 	ATH_MSG_DEBUG("ROB-based seeded decoding of MDT done successfully");
+	SG::ReadCondHandle<MuonMDT_CablingMap> mdtCableHandle{m_mdtCablingKey};
+	const MuonMDT_CablingMap* mdtCabling{*mdtCableHandle};
+	if(!mdtCabling){
+	  ATH_MSG_ERROR("nullptr to the read mdt cabling conditions object");
+	  return HLT::NAV_ERROR;
+	}
+	mdt_hash_ids = mdtCabling->getChamberHashVec(m_MdtRobList);
       } else {
 	ATH_MSG_WARNING("ROB-based seeded decoding of MDT failed");
       }
@@ -1170,7 +1191,7 @@ if (m_useMdtData>0) {
   
   // Get MDT container
   if (m_useMdtData && !mdt_hash_ids.empty()) {
-    
+
     const MdtPrepDataContainer* mdtPrds = 0;
     SG::ReadHandle<Muon::MdtPrepDataContainer> MdtCont(m_mdtKey);
     if( !MdtCont.isValid() ) {
diff --git a/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFStandaloneTrackTool.h b/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFStandaloneTrackTool.h
index 0e8940203969..b883e5b20081 100644
--- a/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFStandaloneTrackTool.h
+++ b/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFStandaloneTrackTool.h
@@ -35,6 +35,8 @@
 #include "xAODTracking/TrackParticleAuxContainer.h"
 #include "MuonCombinedEvent/MuonCandidateCollection.h"
 #include <fstream>
+#include "MuonCablingData/MuonMDT_CablingMap.h"
+#include "RPC_CondCabling/RpcCablingCondData.h"
 
 #include "MuonSegmentMakerToolInterfaces/IMuonSegmentOverlapRemovalTool.h"
 #include "CxxUtils/checker_macros.h"
@@ -383,6 +385,8 @@ class TrigMuonEFStandaloneTrackTool : public AthAlgTool,
 
   bool m_ignoreCSC;
   ToolHandle<Muon::IMuonSegmentOverlapRemovalTool> m_segmentOverlapRemovalTool;
+  SG::ReadCondHandleKey<MuonMDT_CablingMap> m_mdtCablingKey{this, "MdtCablingKey", "MuonMDT_CablingMap", "Key of MuonMDT_CablingMap"};
+  SG::ReadCondHandleKey<RpcCablingCondData> m_rpcCablingKey{this, "RpcCablingKey", "RpcCablingCondData", "Key of RpcCablingCondData"};
 
 };
 
-- 
GitLab


From 0d06c7bfa1de9dfd6c810c10cbf8b17037fae7ee Mon Sep 17 00:00:00 2001
From: John Derek Chapman <chapman@hep.phy.cam.ac.uk>
Date: Fri, 2 Oct 2020 14:05:38 +0000
Subject: [PATCH 247/403] Merge branch '21.3' into '21.3'

Fixes in RPC active area for BIS78

See merge request atlas/athena!36895
---
 .../MuonGeoModel/src/RpcLayer.cxx             | 30 +++++++++++--------
 1 file changed, 18 insertions(+), 12 deletions(-)

diff --git a/MuonSpectrometer/MuonGeoModel/src/RpcLayer.cxx b/MuonSpectrometer/MuonGeoModel/src/RpcLayer.cxx
index 123910170f79..2c8c60ca3b1e 100755
--- a/MuonSpectrometer/MuonGeoModel/src/RpcLayer.cxx
+++ b/MuonSpectrometer/MuonGeoModel/src/RpcLayer.cxx
@@ -2,10 +2,10 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
+#include "MuonGeoModel/RpcLayer.h"
 
 #include "MuonGeoModel/Rpc.h"
 #include "MuonGeoModel/RPC_Technology.h"
-#include "MuonGeoModel/RpcLayer.h"
 #include "MuonGeoModel/Cutout.h"
 #include "MuonGeoModel/MYSQL.h"
 #include "GeoModelKernel/GeoCutVolAction.h"
@@ -18,9 +18,10 @@
 #include "GeoModelKernel/GeoIdentifierTag.h"
 #include "GeoModelKernel/GeoDefinitions.h"
 #include "MuonReadoutGeometry/GlobalUtilities.h"
+#include "GeoModelKernel/GeoShapeSubtraction.h" // for cutouts
+
 #include <iomanip>
 #include <TString.h> // for Form
-#include "GeoModelKernel/GeoShapeSubtraction.h" // for cutouts
 
 namespace {
   static constexpr double const& rpc3GapLayerThickness = 11.8; // gas vol. + ( bakelite + graphite + PET )x2
@@ -112,10 +113,15 @@ GeoVPhysVol* RpcLayer::build(int cutoutson, std::vector<Cutout*> vcutdef)
                                     strpanWidth/2.-strpanCopperThickness,
                                     strpanLength/2.-strpanCopperThickness);
   const GeoShape* scustrpan = sstrpan;
+
+  auto stripMaterial = getMaterialManager()->getMaterial("muo::RpcFoam");
+  if (m->nGasGaps()==3) { // for BIS RPCs
+    stripMaterial = getMaterialManager()->getMaterial("muo::Forex");
+  }
+
   GeoLogVol* lcustrpan = new GeoLogVol("RPC_StripPanelCuSkin", scustrpan,
                                         getMaterialManager()->getMaterial("std::Copper"));
-  GeoLogVol* lfoamstrpan = new GeoLogVol("RPC_StripPanelFoam", sfoamstrpan,
-                                          getMaterialManager()->getMaterial("muo::RpcFoam"));
+  GeoLogVol* lfoamstrpan = new GeoLogVol("RPC_StripPanelFoam", sfoamstrpan, stripMaterial);
 
   newpos += strpanThickness/2. + tol/2.;
   GeoPhysVol* pcustrpan11 = new GeoPhysVol(lcustrpan);
@@ -202,23 +208,23 @@ GeoVPhysVol* RpcLayer::build(int cutoutson, std::vector<Cutout*> vcutdef)
     if (name == "RPC26" ) { //big RPC7
       gasLength   = ggLength - 93.25; // ggLength - deadframesizeEta
       gasWidth    = ggWidth - 109.52; // ggWidth - deadframesizePhi
-      y_translation = -45.715;
-      z_translation = -37.85;
+      y_translation = -9.1;
+      z_translation = 3.22;
     } else if (name == "RPC27" ){//small RPC7
       gasLength   = ggLength - 93.12; // ggLength - deadframesizeEta
       gasWidth    = ggWidth - 109.52; // ggWidth - deadframesizePhi
-      y_translation = -45.715;
-      z_translation = -37.63;
+      y_translation = -9.1;
+      z_translation = 3.06;
     } else if (name == "RPC28"){//big RPC8
       gasLength   = ggLength - 93.04; // ggLength - deadframesizeEta
       gasWidth    = ggWidth - 109.52; // ggWidth - deadframesizePhi
-      y_translation = -26.99;
-      z_translation = -37.64;
+      y_translation = -27.7;
+      z_translation = 3.11;
     } else if (name == "RPC29"){//small RPC8
       gasLength   = ggLength - 93.04; // ggLength - deadframesizeEta
       gasWidth    = ggWidth - 109.2; // ggWidth - deadframesizePhi
-      y_translation = -45.8;
-      z_translation = -37.64;
+      y_translation = -8.8;
+      z_translation = 3.11;
     }
   }
 
-- 
GitLab


From 6611c06921cbf9b4a95cb773697fe97d675e2167 Mon Sep 17 00:00:00 2001
From: Walter Lampl <Walter.Lampl@cern.ch>
Date: Tue, 6 Oct 2020 15:15:08 +0200
Subject: [PATCH 248/403] LArCellConditions.py: Get (partially) working in
 master. Fixes for py3 and cppyy

---
 .../python/LArCellConditionsAlg.py            | 19 ++++-----
 .../share/LArCellConditions.py                | 40 +++++++++----------
 .../LArConditionsCommon_comm_jobOptions.py    |  1 +
 3 files changed, 29 insertions(+), 31 deletions(-)

diff --git a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCellConditionsAlg.py b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCellConditionsAlg.py
index 112370304eb4..bd4b4128dc93 100644
--- a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCellConditionsAlg.py
+++ b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCellConditionsAlg.py
@@ -16,9 +16,9 @@ __doc__ = " An athena-like algorithm to interactivly convert LAr Identifiers and
 from AthenaPython.PyAthena import StatusCode
 import AthenaPython.PyAthena as PyAthena
 
-import cppyy 
+import ROOT,cppyy 
 
-from ROOT import HWIdentifier, Identifier, Identifier32, IdentifierHash, LArBadChannel
+from ROOT import HWIdentifier, Identifier, Identifier32, IdentifierHash, LArBadChannel, LArBadChanBitPacking
 from ROOT import CaloDetDescrManager
 
 from ctypes import c_uint
@@ -86,8 +86,7 @@ class LArCellConditionsAlg(PyAthena.Alg):
 
 
 
-        self.class_larBCBitPacking=cppyy.makeClass("LArBadChanBitPacking")
-        self.bc_packing=self.class_larBCBitPacking()
+        self.bc_packing=LArBadChanBitPacking()
 
         self.noisepattern=0
         for n in ("lowNoiseHG","highNoiseHG","unstableNoiseHG","lowNoiseMG","highNoiseMG","unstableNoiseMG","lowNoiseLG","highNoiseLG","unstableNoiseLG","sporadicBurstNoise"):
@@ -202,7 +201,6 @@ class LArCellConditionsAlg(PyAthena.Alg):
             id=None
             chid=None
             rep_in=self.readInput() #"Enter Id >").upper().strip()
-            #print ("User Input...")
             #rep_in="EMBA 0 0 60 2"
             rep=rep_in.upper()
             
@@ -283,7 +281,7 @@ class LArCellConditionsAlg(PyAthena.Alg):
         return StatusCode.Success
 
     def printChannelInfo(self,id,chid):
-        
+        print(self.IdentifiersToString(chid,id))
         if id!=self.noid: #Don't try to show anything more for disconnected channels
             if self.includeLocation:
                 try:
@@ -347,7 +345,6 @@ class LArCellConditionsAlg(PyAthena.Alg):
                     print("DSP Thresholds: None")
 
 
-
     def finalize(self):
         self.msg.info('finalizing...')
         return StatusCode.Success
@@ -358,7 +355,7 @@ class LArCellConditionsAlg(PyAthena.Alg):
         print(out)
         self.nLinesPrinted=self.nLinesPrinted+1
         if self.nLinesPrinted%40 is 0:
-            c=raw_input("Press 'q' to quit, 'a' for all ...")
+            c=input("Press 'q' to quit, 'a' for all ...")
             if c.upper().startswith("Q"):
                 return True
             if c.upper().startswith("A"):
@@ -369,7 +366,7 @@ class LArCellConditionsAlg(PyAthena.Alg):
     def readInput(self):
         self.nLinesPrinted=0
         try:
-            rep=raw_input("Enter Id >")
+            rep=input("Enter Id >")
         except:
             return ""
 
@@ -480,7 +477,7 @@ class LArCellConditionsAlg(PyAthena.Alg):
                 return None
 
         else: #given as expanded ID
-            tbl=maketrans(",:;/\#","      "); 
+            tbl=str.maketrans(",:;/\#","      "); 
             fields=[]
             for f in upInput.translate(tbl).split():
                 if len(f):
@@ -619,7 +616,7 @@ class LArCellConditionsAlg(PyAthena.Alg):
                 return None
 
         else: #given as expanded ID
-            tbl=maketrans(",:;/\#","      "); 
+            tbl=str.maketrans(",:;/\#","      "); 
             fields=[]
             for f in upInput.translate(tbl).split():
                 if len(f):
diff --git a/LArCalorimeter/LArExample/LArConditionsCommon/share/LArCellConditions.py b/LArCalorimeter/LArExample/LArConditionsCommon/share/LArCellConditions.py
index 08b36ecbb1b6..657f176031c7 100755
--- a/LArCalorimeter/LArExample/LArConditionsCommon/share/LArCellConditions.py
+++ b/LArCalorimeter/LArExample/LArConditionsCommon/share/LArCellConditions.py
@@ -17,24 +17,24 @@ fhistory = os.path.expanduser("~/.LArCellConditionsHist")
 
 
 def usage():
-    print sys.argv[0]+": Convert and expand LAr Identifiers, print some database content"
-    print "Options:"
-    print "-c Print also (some) electronic calibration constants"
-    print "-s Use SingleVersion folders (default)"
-    print "-m Use MultiVersion folders (the opposite of -s)"
-    print "-g Include geometrical position (true eta/phi)"
-    print "-d Include DSP thresholds"
-    print "-r <run> Specify a run number"
-    print "-t <tag> Specify global tag"
-    print "--detdescr <DetDescrVersion>"
-    print "--sqlite <sqlitefile>"
-    print "-h Print this help text and exit"
+    print(sys.argv[0]+": Convert and expand LAr Identifiers, print some database content")
+    print("Options:")
+    print("-c Print also (some) electronic calibration constants")
+    print("-s Use SingleVersion folders (default)")
+    print("-m Use MultiVersion folders (the opposite of -s)")
+    print("-g Include geometrical position (true eta/phi)")
+    print("-d Include DSP thresholds")
+    print("-r <run> Specify a run number")
+    print("-t <tag> Specify global tag")
+    print("--detdescr <DetDescrVersion>")
+    print("--sqlite <sqlitefile>")
+    print("-h Print this help text and exit")
         
 try:
     opts,args=getopt.getopt(sys.argv[1:],"csmgdhr:t:",["help","detdescr=","sqlite="])
-except Exception,e:
+except Exception as e:
     usage()
-    print e
+    print(e)
     sys.exit(-1)
 
     
@@ -70,15 +70,15 @@ try:
     if run is None:
         defRun=0x7fffffff
         prompt= "Enter run number [%i]:" % defRun
-        runIn=raw_input(prompt).strip()
+        runIn=input(prompt).strip()
         if runIn=="":
             run=defRun
         else:
             if runIn.isdigit():
-                run=long(runIn)
+                run=int(runIn)
             else:
                 usage()
-                print "Expect numerical parameter for run, got",runIn
+                print("Expect numerical parameter for run, got",runIn)
                 sys.exit(0)
                 pass
             pass
@@ -91,7 +91,7 @@ try:
             defTag="COMCOND-BLKPA-RUN1-06"
             pass
         prompt= "Enter conditions tag [%s]:" % defTag
-        tagIn=raw_input(prompt).strip()
+        tagIn=input(prompt).strip()
         if tagIn=="":
             tag=defTag
         else:
@@ -100,12 +100,12 @@ try:
 
     if geo and not detdescrset:
         prompt="Enter DetectorDescripton tag [%s]:" % detdescrtag
-        detdescrtagIn=raw_input(prompt).strip()
+        detdescrtagIn=input(prompt).strip()
         if detdescrtagIn != "":
             detdescrtag=detdescrtagIn
                 
 except:
-    print "Failed to get run number and/or conditions tag"
+    print("Failed to get run number and/or conditions tag")
     sys.exit(0)
 
 
diff --git a/LArCalorimeter/LArExample/LArConditionsCommon/share/LArConditionsCommon_comm_jobOptions.py b/LArCalorimeter/LArExample/LArConditionsCommon/share/LArConditionsCommon_comm_jobOptions.py
index 3d4060768e14..aa56af2711a8 100755
--- a/LArCalorimeter/LArExample/LArConditionsCommon/share/LArConditionsCommon_comm_jobOptions.py
+++ b/LArCalorimeter/LArExample/LArConditionsCommon/share/LArConditionsCommon_comm_jobOptions.py
@@ -284,6 +284,7 @@ if larCondFlags.LoadElecCalib():
 
 
 #special case for overlay jobs: We need LArfSampl 
+from AthenaCommon.DetFlags import DetFlags
 if DetFlags.overlay.LAr_on() and larCondFlags.LArfSamplTag()!="":
    printfunc ("Tag=%s" % larCondFlags.LArfSamplTag())
    conddb.addFolderWithTag("LAR_OFL","/LAR/ElecCalibMC/fSampl",larCondFlags.LArfSamplTag(),force=True,forceMC=True,className="LArfSamplMC")
-- 
GitLab


From 1de4fae71dc7fa6637d412d6a381e353219c2c68 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Tue, 6 Oct 2020 15:36:51 +0200
Subject: [PATCH 249/403] InDetOverlay: remove unused IJobOptionsSvc include

---
 .../InDetRawAlgs/InDetOverlay/test/TRTOverlay_test.cxx       | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlay_test.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlay_test.cxx
index cdca82780706..c9de5b8a2e91 100644
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlay_test.cxx
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlay_test.cxx
@@ -35,7 +35,6 @@
 #include "AthenaBaseComps/AthService.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/IAppMgrUI.h"
-#include "GaudiKernel/IJobOptionsSvc.h"
 #include "GaudiKernel/SmartIF.h"
 #include "GaudiKernel/SystemOfUnits.h"
 #include "GaudiKernel/PhysicalConstants.h"
@@ -154,9 +153,6 @@ namespace OverlayTesting {
 
       ASSERT_TRUE( m_appMgr->configure().isSuccess() );
       ASSERT_TRUE( m_appMgr->initialize().isSuccess() );
-
-      m_jobOptionsSvc = m_svcLoc->service("JobOptionsSvc");
-      ASSERT_TRUE( m_jobOptionsSvc.isValid() );
     }
 
     void TearDownGaudi() {
@@ -172,7 +168,6 @@ namespace OverlayTesting {
     IAppMgrUI*               m_appMgr = nullptr;
     SmartIF<ISvcLocator>     m_svcLoc;
     SmartIF<ISvcManager>     m_svcMgr;
-    SmartIF<IJobOptionsSvc>  m_jobOptionsSvc;
     SmartIF<IToolSvc>        m_toolSvc;
     SmartIF<IProperty>       m_propMgr;
   };
-- 
GitLab


From 9ca79d8e594c8b11c09626b40a826d04668b54c2 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Tue, 6 Oct 2020 15:37:20 +0200
Subject: [PATCH 250/403] AANTupleStream: Migrate to IOptionsSvc

---
 .../AnalysisTools/src/AANTupleStream.cxx       | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisTools/src/AANTupleStream.cxx b/PhysicsAnalysis/AnalysisCommon/AnalysisTools/src/AANTupleStream.cxx
index 2576ccd5a387..585b8271c772 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisTools/src/AANTupleStream.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisTools/src/AANTupleStream.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 "AnalysisTools/AANTupleStream.h"
@@ -9,17 +9,17 @@
 
 #include "AthenaPoolUtilities/AthenaAttributeList.h"
 
+#include "Gaudi/Interfaces/IOptionsSvc.h"
 #include "GaudiKernel/IAlgManager.h"
 #include "GaudiKernel/ISvcLocator.h"
 #include "GaudiKernel/IAddressCreator.h"
 #include "GaudiKernel/IOpaqueAddress.h"
 #include "GaudiKernel/MsgStream.h"
 #include "GaudiKernel/ITHistSvc.h"
-#include "GaudiKernel/IJobOptionsSvc.h"
 #include "GaudiKernel/ListItem.h"
 #include "GaudiKernel/ServiceHandle.h"
-
 #include "GaudiKernel/IIoComponentMgr.h"
+
 #include "StoreGate/StoreGateSvc.h"
 #include "SGTools/DataProxy.h"
 #include "PersistentDataModel/DataHeader.h"
@@ -766,9 +766,9 @@ AANTupleStream::io_reinit()
     return StatusCode::FAILURE;
   }
 
-  ServiceHandle<IJobOptionsSvc> josvc ("JobOptionsSvc", this->name());
+  ServiceHandle<Gaudi::Interfaces::IOptionsSvc> josvc ("JobOptionsSvc", this->name());
   if ( !josvc.retrieve().isSuccess() ) {
-    ATH_MSG_ERROR ("Could not retrieve IJobOptionsSvc/JobOptionsSvc !");
+    ATH_MSG_ERROR ("Could not retrieve IOptionsSvc/JobOptionsSvc !");
     return StatusCode::FAILURE;
   }
 
@@ -791,12 +791,8 @@ AANTupleStream::io_reinit()
   }
   
   // recreate the proper property value...
-  std::vector<std::string> outvec(1);
-  outvec[0] = "AANT DATAFILE='" + m_fileName + "' OPT='RECREATE'";
-  StringArrayProperty prop ("Output", outvec);
-  if ( !josvc->addPropertyToCatalogue ("THistSvc", prop).isSuccess() ) {
-    ATH_MSG_ERROR ("Could not update THistSvc.Output property with new name !");
-  }
+  std::vector<std::string> outvec = {"AANT DATAFILE='" + m_fileName + "' OPT='RECREATE'"};
+  josvc->set("THistSvc.Output", Gaudi::Utils::toString(outvec));
 
   // handle schema...
   if (!m_schemaDone) {
-- 
GitLab


From bfcb9a6247da791cee2e04f2216f00fd22f8d58a Mon Sep 17 00:00:00 2001
From: Frank Berghaus <frank.berghaus@cern.ch>
Date: Tue, 6 Oct 2020 15:38:22 +0200
Subject: [PATCH 251/403] Make ByteStreamOutputSvc interface available Fix
 ATLASSIM-4900

Using ATH_CHECK to handle the return of querying the interface of the
base class means a return here only happens on failure. This is exactly
the opposite of what we wanted. Introduced by mistake.
---
 .../src/ByteStreamEventStorageOutputSvc.cxx            | 10 ++++++++--
 .../src/ByteStreamEventStorageOutputSvc.h              |  8 ++++----
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx
index 3ccda05b67df..7124fab87e0f 100644
--- a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx
+++ b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx
@@ -29,7 +29,7 @@
 
 ByteStreamEventStorageOutputSvc::ByteStreamEventStorageOutputSvc(
     const std::string& name, ISvcLocator* pSvcLocator)
-  : ByteStreamOutputSvc(name, pSvcLocator) {
+  : base_class(name, pSvcLocator) {
 }
 
 
@@ -445,11 +445,17 @@ ByteStreamEventStorageOutputSvc::updateDataWriterParameters(
 StatusCode
 ByteStreamEventStorageOutputSvc::queryInterface(
     const InterfaceID& riid, void** ppvInterface) {
+
+  if ( !ppvInterface ) return StatusCode::FAILURE;
+
+  // find indirect interfaces :
   if (ByteStreamOutputSvc::interfaceID().versionMatch(riid)) {
     *ppvInterface = dynamic_cast<ByteStreamOutputSvc*>(this);
+  } else if (base_class::queryInterface(riid, ppvInterface).isSuccess()) {
+    return StatusCode::SUCCESS;
   } else {
     // Interface is not directly available: try out a base class
-    ATH_CHECK(::AthService::queryInterface(riid, ppvInterface));
+    return ::AthService::queryInterface(riid, ppvInterface);
   }
   addRef();
   return StatusCode::SUCCESS;
diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.h b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.h
index cf2bc19a2052..9f768e3c4811 100644
--- a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.h
+++ b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.h
@@ -48,11 +48,11 @@ class ByteStreamMetadata;
  *  This class implements the interface ByteStreamOutputSvc for the conversion
  *  service to write the output to a file.
  **/
-class ByteStreamEventStorageOutputSvc:
-    public ByteStreamOutputSvc,
-    virtual public IIoComponent {
+class ByteStreamEventStorageOutputSvc :
+    public extends< ByteStreamOutputSvc, IIoComponent > {
  public:
-  //using extends::extends;
+  using extends::extends;
+
   /// Constructors:
   ByteStreamEventStorageOutputSvc(
       const std::string& name, ISvcLocator* pSvcLocator);
-- 
GitLab


From b6b19a862e9b0df9a1cfb726c119285ac673aec2 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Tue, 6 Oct 2020 15:43:40 +0200
Subject: [PATCH 252/403] CalibratedEgammaProvider: Migrate to IOptionsSvc

---
 .../src/CalibratedEgammaProvider.cxx                   | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/src/CalibratedEgammaProvider.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/src/CalibratedEgammaProvider.cxx
index 6e5f468aa973..f749e11c625e 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/src/CalibratedEgammaProvider.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/src/CalibratedEgammaProvider.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
 */
 
 // EDM include(s):
@@ -11,7 +11,7 @@
 
 #include "xAODBase/IParticleHelpers.h"
 
-#include "GaudiKernel/IJobOptionsSvc.h"
+#include "Gaudi/Interfaces/IOptionsSvc.h"
 
 namespace CP {
 
@@ -30,10 +30,8 @@ StatusCode CalibratedEgammaProvider::initialize() {
 
   if(m_tool.empty()) { //set up a default tool with the es2012c calibration
       m_tool.setTypeAndName("CP::EgammaCalibrationAndSmearingTool/AutoConfiguredEgammaCalibTool");
-      ServiceHandle<IJobOptionsSvc> josvc("JobOptionsSvc",name());
-      std::string fullToolName = "ToolSvc.AutoConfiguredEgammaCalibTool";
-      StringProperty pESModel("esModel","es2012c");
-      CHECK( josvc->addPropertyToCatalogue(fullToolName,pESModel) );
+      ServiceHandle<Gaudi::Interfaces::IOptionsSvc> josvc("JobOptionsSvc",name());
+      josvc->set("ToolSvc.AutoConfiguredEgammaCalibTool.esModel", "es2012c");
   }
 
    ATH_CHECK(m_tool.retrieve());
-- 
GitLab


From b00ad92edb34ed4a00c9cbd9fd18bb4e1a6aa3d3 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Tue, 6 Oct 2020 16:04:39 +0200
Subject: [PATCH 253/403] POOLRootAccess: Migrate to IOptionsSvc

Migrate the `TEvent` class to `IOptionsSvc`. Remove the unused
`setEvtLoopProperty` method.
---
 .../POOLRootAccess/POOLRootAccess/TEvent.h       | 16 +++++++++-------
 PhysicsAnalysis/POOLRootAccess/src/TEvent.cxx    |  7 ++-----
 2 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/PhysicsAnalysis/POOLRootAccess/POOLRootAccess/TEvent.h b/PhysicsAnalysis/POOLRootAccess/POOLRootAccess/TEvent.h
index bf993e129448..2627451a5640 100644
--- a/PhysicsAnalysis/POOLRootAccess/POOLRootAccess/TEvent.h
+++ b/PhysicsAnalysis/POOLRootAccess/POOLRootAccess/TEvent.h
@@ -10,7 +10,7 @@
 
 #include "GaudiKernel/Bootstrap.h"
 
-#include "GaudiKernel/IJobOptionsSvc.h"
+#include "Gaudi/Interfaces/IOptionsSvc.h"
 #include "AthenaKernel/IEvtSelectorSeek.h"
 #include "AthenaKernel/IEventSeek.h"
 
@@ -60,12 +60,14 @@ namespace POOL {
          ServiceHandle<StoreGateSvc>& evtStore() { return m_evtStore; }
          ServiceHandle<StoreGateSvc>& inputMetaStore() { return m_inputMetaStore; }
 
-         template<typename T> void setEvtLoopProperty( const char* name, const T& val ) {
-            m_joSvc->addPropertyToCatalogue( m_evtLoop.name() , StringProperty( name,  Gaudi::Utils::toString ( val ) ) ).ignore();
-         }
-
          template<typename T> void setEvtSelProperty( const char* name, const T& val ) {
-            m_joSvc->addPropertyToCatalogue( m_evtSelect.name() , StringProperty( name,  Gaudi::Utils::toString ( val ) ) ).ignore();
+            if constexpr (std::is_convertible_v<T, std::string>) {
+               // Gaudi::Utils::toString adds extra quotes, don't do this for strings:
+               m_joSvc->set(m_evtSelect.name() + "." + name, std::string(val));
+            }
+            else {
+               m_joSvc->set(m_evtSelect.name() + "." + name, Gaudi::Utils::toString(val));
+            }
          }
 
          //forward retrieve calls to the evtStore
@@ -112,7 +114,7 @@ namespace POOL {
          long m_size = -1; //cache of the event size, filled on first call to getEntries
 
          IEventProcessor* m_evtProcessor;
-         ServiceHandle<IJobOptionsSvc> m_joSvc;
+         ServiceHandle<Gaudi::Interfaces::IOptionsSvc> m_joSvc;
 
          ServiceHandle<IEventSeek> m_evtLoop; //the AthenaEventLoopMgr
          ServiceHandle<IEvtSelectorSeek> m_evtSelect; //the EventSelectorAthenaPool
diff --git a/PhysicsAnalysis/POOLRootAccess/src/TEvent.cxx b/PhysicsAnalysis/POOLRootAccess/src/TEvent.cxx
index ec3dba1c77eb..c0a458457ff9 100644
--- a/PhysicsAnalysis/POOLRootAccess/src/TEvent.cxx
+++ b/PhysicsAnalysis/POOLRootAccess/src/TEvent.cxx
@@ -78,11 +78,8 @@ TEvent::TEvent(EReadMode mode, const std::string& name) :
 
    //check if a SelectorType has been specified in the joSvc 
    //should retire this code at some point (hangover from basicxAOD.opts)
-   auto properties = m_joSvc->getProperties("TEvent");
-   if(properties) {
-      for(auto prop : *properties) {
-	if(prop->name()=="EventSelectorType") m_evtSelect.setTypeAndName(prop->toString() + "/" + m_evtSelect.name());
-      }
+   if (m_joSvc->has("TEvent.EventSelectorType")) {
+     m_evtSelect.setTypeAndName(m_joSvc->get("TEvent.EventSelectorType") + "/" + m_evtSelect.name());
    }
 
    AAH::setProperty( m_evtLoop , "ClearStorePolicy", "BeginEvent" ).ignore();    //for interactive use of storegate
-- 
GitLab


From 04fd6688ccefb87f8ef342dda414b6c81080f50c Mon Sep 17 00:00:00 2001
From: Walter Lampl <Walter.Lampl@cern.ch>
Date: Tue, 6 Oct 2020 16:07:16 +0200
Subject: [PATCH 254/403] LArCellConditionsAlg.py: Make Elec-Calib value
 printout working with CondCont

---
 .../python/LArCellConditionsAlg.py            | 30 ++++++++++++++-----
 1 file changed, 22 insertions(+), 8 deletions(-)

diff --git a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCellConditionsAlg.py b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCellConditionsAlg.py
index bd4b4128dc93..f677055139d9 100644
--- a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCellConditionsAlg.py
+++ b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCellConditionsAlg.py
@@ -62,6 +62,12 @@ class LArCellConditionsAlg(PyAthena.Alg):
         if self._detStore is None:
             self.msg.error("Failed to get DetectorStore")
             return StatusCode.Failure
+
+        self._condStore = StoreGate.pointer("ConditionStore")
+        if (self._condStore is None):
+            self.msg.error("Failed to get ConditionStore")
+            return StatusCode.Failure
+
         # Get LArOnlineID helper class
         self.onlineID=self._detStore.retrieve("LArOnlineID","LArOnlineID")
         if self.onlineID is None:
@@ -125,13 +131,16 @@ class LArCellConditionsAlg(PyAthena.Alg):
         self.msg.info('running execute...')
 
         #for some obscure reason, we need run dump before we can retrieve the flat objects using their abstract interface
-        garbagedump = open(os.devnull, 'w')
-        self._detStore.dump(garbagedump)
+        garbagedump = open("sgdump.txt", 'w')
+        self._condStore.dump(garbagedump)
         garbagedump.close()
 
+        eid=ROOT.Gaudi.Hive.currentContext().eventID()
+
         if self.includeConditions:
             try:
-                self.larPedestal=self._detStore.retrieve("ILArPedestal","Pedestal")
+                condCont=self._condStore.retrieve("CondCont<ILArPedestal>","LArPedestal")
+                self.larPedestal=condCont.find(eid)
             except Exception:
                 print ("WARNING: Failed to retrieve Pedestal from DetStore")
                 import traceback
@@ -139,7 +148,8 @@ class LArCellConditionsAlg(PyAthena.Alg):
                 self.larPedestal=None
                 
             try:
-                self.larMphysOverMcal=self._detStore.retrieve("ILArMphysOverMcal","LArMphysOverMcal")
+                condCont=self._condStore.retrieve("CondCont<ILArMphysOverMcal>","LArMphysOverMcal")
+                self.larMphysOverMcal=condCont.find(eid)
             except Exception:
                 print ("WARNING: Failed to retrieve MphysOverMcal from DetStore")
                 import traceback
@@ -147,7 +157,8 @@ class LArCellConditionsAlg(PyAthena.Alg):
                 self.larMphysOverMcal=None
 
             try:
-                self.larRamp=self._detStore.retrieve("ILArRamp","LArRamp")
+                condCont=self._condStore.retrieve("CondCont<ILArRamp>","LArRamp")
+                self.larRamp=condCont.find(eid)
             except Exception:
                 print ("WARNING: Failed to retrieve LArRamp from DetStore")
                 import traceback
@@ -155,7 +166,8 @@ class LArCellConditionsAlg(PyAthena.Alg):
                 self.larRamp=None
                 
             try:
-                self.larDAC2uA=self._detStore.retrieve("ILArDAC2uA","LArDAC2uA")
+                condCont=self._condStore.retrieve("CondCont<ILArDAC2uA>","LArDAC2uA")
+                self.larDAC2uA=condCont.find(eid)
             except Exception:
                 print ("WARNING: Failed to retrieve LArDAC2uA from DetStore")
                 import traceback
@@ -163,7 +175,8 @@ class LArCellConditionsAlg(PyAthena.Alg):
                 self.larDAC2uA=None
 
             try:
-                self.laruA2MeV=self._detStore.retrieve("ILAruA2MeV","LAruA2MeV")
+                condCont=self._condStore.retrieve("CondCont<ILAruA2MeV>","LAruA2MeV")
+                self.laruA2MeV=condCont.find(eid)
             except Exception:
                 print ("WARNING: Failed to retrieve LAruA2MeV from DetStore")
                 import traceback
@@ -171,7 +184,8 @@ class LArCellConditionsAlg(PyAthena.Alg):
                 self.laruA2MeV=None
 
             try:
-                self.larhvScaleCorr=self._detStore.retrieve("ILArHVScaleCorr","LArHVScaleCorr")
+                condCont=self._condStore.retrieve("CondCont<ILArHVScaleCorr>","LArHVScaleCorr")
+                self.larhvScaleCorr=condCont.find(eid)
             except Exception:
                 print ("WARNING: Failed to retrieve LArHVScaleCorr from DetStore")
                 import traceback
-- 
GitLab


From e747bb743088eb3fd4b31d583529b11f43002e9a Mon Sep 17 00:00:00 2001
From: MihaMuskinja <miha.muskinja@gmail.com>
Date: Tue, 6 Oct 2020 16:39:48 +0200
Subject: [PATCH 255/403] flake8

---
 .../python/ExtraParticlesConfigDb.py              |  3 ++-
 .../ExtraParticles/python/PDGParser.py            | 15 +++++++++++----
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/Simulation/G4Extensions/ExtraParticles/python/ExtraParticlesConfigDb.py b/Simulation/G4Extensions/ExtraParticles/python/ExtraParticlesConfigDb.py
index 044372cae7a6..0d2b14e65916 100644
--- a/Simulation/G4Extensions/ExtraParticles/python/ExtraParticlesConfigDb.py
+++ b/Simulation/G4Extensions/ExtraParticles/python/ExtraParticlesConfigDb.py
@@ -1,4 +1,5 @@
 # Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon.CfgGetter import addTool
-addTool("ExtraParticles.ExtraParticlesConfig.getExtraParticlesPhysicsTool", "ExtraParticlesPhysicsTool" )
+addTool("ExtraParticles.ExtraParticlesConfig.getExtraParticlesPhysicsTool",
+        "ExtraParticlesPhysicsTool")
diff --git a/Simulation/G4Extensions/ExtraParticles/python/PDGParser.py b/Simulation/G4Extensions/ExtraParticles/python/PDGParser.py
index d16ef850fbc2..1ea091ff8eb0 100644
--- a/Simulation/G4Extensions/ExtraParticles/python/PDGParser.py
+++ b/Simulation/G4Extensions/ExtraParticles/python/PDGParser.py
@@ -131,7 +131,8 @@ class PDGParser(object):
                     prop = 'width'
                 else:
                     raise ValueError(
-                        'Unidentified symbol %s for particle %s' % (symbol, baseName))
+                        'Unidentified symbol %s for particle %s' % (
+                            symbol, baseName))
 
                 pdgs = splitLine[1:1+len(charges)]
                 value = float(splitLine[1+len(charges)])
@@ -149,8 +150,14 @@ class PDGParser(object):
                         self.extraParticles[name] = ExtraParticle(**kwargs)
                     else:
                         if getattr(self.extraParticles[name], prop) != -1:
-                            self.log.warning("Property %s is already set for particle %s. Current value is %s and incoming value is %s." % (
-                                prop, name, getattr(self.extraParticles[name], prop), value))
+                            self.log.warning(
+                                "Property %s is already"
+                                "set for particle %s."
+                                "Current value is %s and"
+                                "incoming value is %s.",
+                                prop, name,
+                                getattr(self.extraParticles[name], prop),
+                                value)
                             continue
                         setattr(self.extraParticles[name], prop, value)
 
@@ -189,7 +196,7 @@ class PDGParser(object):
 
     def createList(self):
 
-        # make a new whitelist for GenParticleSimWhiteList (only pdgId is needed)
+        # make a new whitelist for GenParticleSimWhiteList
         with open('G4particle_whitelist_ExtraParticles.txt', 'w') as writer:
             for name in self.extraParticles:
                 writer.write('%s\n' % self.extraParticles[name].pdg)
-- 
GitLab


From 729ad4622ce8a73441f1b198aae93dc5142ca9d2 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Tue, 6 Oct 2020 16:49:25 +0200
Subject: [PATCH 256/403] ThinningUtils: Migrate to IOptionsSvc

---
 .../ThinningUtils/src/ThinCaloCellsAlg.cxx    | 12 +++++------
 .../ThinningUtils/src/ThinCaloCellsAlg.h      |  6 +++---
 .../ThinningUtils/src/ThinCaloClustersAlg.cxx | 12 +++++------
 .../ThinningUtils/src/ThinCaloClustersAlg.h   |  6 +++---
 .../ThinningUtils/src/ThinIParticlesAlg.cxx   | 12 +++++------
 .../ThinningUtils/src/ThinIParticlesAlg.h     |  6 +++---
 .../src/ThinTrackParticlesAlg.cxx             | 20 +++++++++----------
 .../ThinningUtils/src/ThinTrackParticlesAlg.h |  6 +++---
 8 files changed, 36 insertions(+), 44 deletions(-)

diff --git a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloCellsAlg.cxx b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloCellsAlg.cxx
index 6ee792ac79c5..8b98cbffd072 100644
--- a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloCellsAlg.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloCellsAlg.cxx
@@ -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
 */
 
 // ThinCaloCellsAlg.cxx
@@ -16,7 +16,6 @@
 
 // FrameWork includes
 #include "Gaudi/Property.h"
-#include "GaudiKernel/IJobOptionsSvc.h"
 #include "DerivationFrameworkInterfaces/IThinningTool.h"
 
 
@@ -86,20 +85,19 @@ StatusCode ThinCaloCellsAlg::initialize()
   ATH_MSG_DEBUG( "Got the full name of the tool: " << fullToolName );
 
   // Now, set all properties of the private skimTool that were acutally configured
-	ATH_MSG_DEBUG( "Setting property" << m_streamName
+  ATH_MSG_DEBUG( "Setting property" << m_streamName
                  << " of private tool with name: '" << fullToolName << "'" );
-  ATH_CHECK( m_jos->addPropertyToCatalogue ( fullToolName,
-                                             StringProperty("StreamName",m_streamName) ) );
+  m_jos->set (fullToolName + ".StreamName", m_streamName.value());
 
   if (m_setCaloCellKey) {
     ATH_MSG_DEBUG( "Setting property" << m_caloCellKey
                    << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_caloCellKey) );
+    m_jos->set (fullToolName + "." + m_caloCellKey.name(), m_caloCellKey.value() );
   }
   if (m_setInCollKey) {
     ATH_MSG_DEBUG( "Setting property" << m_inCollKeyList
                    << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_inCollKeyList) );
+    m_jos->set (fullToolName + "." + m_inCollKeyList.name(), m_inCollKeyList.toString());
   }
   ATH_MSG_DEBUG( "Done setting properties of the tool");
 
diff --git a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloCellsAlg.h b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloCellsAlg.h
index 4fbe27324280..462a55ce358c 100644
--- a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloCellsAlg.h
+++ b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloCellsAlg.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
 */
 
 
@@ -23,13 +23,13 @@
 #include <string>
 
 // FrameWork includes
+#include "Gaudi/Interfaces/IOptionsSvc.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/ServiceHandle.h"
 #include "AthenaBaseComps/AthAlgorithm.h"
 
 
 // forward declarations
-class IJobOptionsSvc;
 namespace DerivationFramework {
   class IThinningTool;
 }
@@ -73,7 +73,7 @@ private:
  private:
   /// The job options service (will be used to forward this algs properties to
   /// the private tool)
-  ServiceHandle<IJobOptionsSvc> m_jos;
+  ServiceHandle<Gaudi::Interfaces::IOptionsSvc> m_jos;
 
   StringProperty m_streamName
   { this, "StreamName", "", "Name of the stream being thinned" };
diff --git a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloClustersAlg.cxx b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloClustersAlg.cxx
index 56028209af2c..db99028ed4d2 100644
--- a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloClustersAlg.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloClustersAlg.cxx
@@ -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
 */
 
 // ThinCaloClustersAlg.cxx
@@ -16,7 +16,6 @@
 
 // FrameWork includes
 #include "Gaudi/Property.h"
-#include "GaudiKernel/IJobOptionsSvc.h"
 #include "DerivationFrameworkInterfaces/IThinningTool.h"
 
 
@@ -94,23 +93,22 @@ StatusCode ThinCaloClustersAlg::initialize()
   // Now, set all properties of the private skimTool that were acutally configured
 	ATH_MSG_DEBUG( "Setting property" << m_streamName
                        << " of private tool with name: '" << fullToolName << "'" );
-        ATH_CHECK( m_jos->addPropertyToCatalogue ( fullToolName,
-                                                   StringProperty("StreamName",m_streamName) ) );
+    m_jos->set (fullToolName + ".StreamName", m_streamName);
 
   if (m_setCaloClusKey) {
     ATH_MSG_DEBUG( "Setting property" << m_caloClusKey
                    << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_caloClusKey) );
+    m_jos->set (fullToolName + "." + m_caloClusKey.name(), m_caloClusKey.value());
   }
   if (m_setInCollKey) {
     ATH_MSG_DEBUG( "Setting property" << m_inCollKeyList
                    << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_inCollKeyList) );
+    m_jos->set (fullToolName + "." + m_inCollKeyList.name(), m_inCollKeyList.toString());
   }
   if (m_setSelection) {
     ATH_MSG_DEBUG( "Setting property" << m_selection
                    << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_selection) );
+    m_jos->set (fullToolName + "." + m_selection.name(), m_selection.value());
   }
   ATH_MSG_DEBUG( "Done setting properties of the tool");
 
diff --git a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloClustersAlg.h b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloClustersAlg.h
index db6d844fd80a..f95b232b6dff 100644
--- a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloClustersAlg.h
+++ b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloClustersAlg.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
 */
 
 
@@ -25,13 +25,13 @@
 #include <string>
 
 // FrameWork includes
+#include "Gaudi/Interfaces/IOptionsSvc.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/ServiceHandle.h"
 #include "AthenaBaseComps/AthAlgorithm.h"
 
 
 // forward declarations
-class IJobOptionsSvc;
 namespace DerivationFramework {
   class IThinningTool;
 }
@@ -78,7 +78,7 @@ private:
  private:
   /// The job options service (will be used to forward this algs properties to
   /// the private tool)
-  ServiceHandle<IJobOptionsSvc> m_jos;
+  ServiceHandle<Gaudi::Interfaces::IOptionsSvc> m_jos;
 
   StringProperty m_streamName
   { this, "StreamName", "", "Name of the stream being thinned" };
diff --git a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinIParticlesAlg.cxx b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinIParticlesAlg.cxx
index 223e8d9b520b..ac72ea70a1b1 100644
--- a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinIParticlesAlg.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinIParticlesAlg.cxx
@@ -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
 */
 
 // ThinIParticlesAlg.cxx
@@ -16,7 +16,6 @@
 
 // FrameWork includes
 #include "Gaudi/Property.h"
-#include "GaudiKernel/IJobOptionsSvc.h"
 #include "DerivationFrameworkInterfaces/IThinningTool.h"
 
 
@@ -94,23 +93,22 @@ StatusCode ThinIParticlesAlg::initialize()
   // Now, set all properties of the private skimTool that were acutally configured
 	ATH_MSG_DEBUG( "Setting property" << m_streamName
                  << " of private tool with name: '" << fullToolName << "'" );
-        ATH_CHECK( m_jos->addPropertyToCatalogue ( fullToolName,
-                                                   StringProperty("StreamName",m_streamName) ) );
+    m_jos->set (fullToolName + ".StreamName", m_streamName.value());
 
   if (m_setIPartKey) {
     ATH_MSG_DEBUG( "Setting property" << m_ipartKey
                    << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_ipartKey) );
+    m_jos->set (fullToolName + "." + m_ipartKey.name(), m_ipartKey.value());
   }
   if (m_setInCollKey) {
     ATH_MSG_DEBUG( "Setting property" << m_inCollKeyList
                    << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_inCollKeyList) );
+    m_jos->set (fullToolName + "." + m_inCollKeyList.name(), m_inCollKeyList.toString());
   }
   if (m_setSelection) {
     ATH_MSG_DEBUG( "Setting property" << m_selection
                    << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_selection) );
+    m_jos->set (fullToolName + "." + m_selection.name(), m_selection.value());
   }
   ATH_MSG_DEBUG( "Done setting properties of the tool");
 
diff --git a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinIParticlesAlg.h b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinIParticlesAlg.h
index 794cae00b620..b55cb51ae664 100644
--- a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinIParticlesAlg.h
+++ b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinIParticlesAlg.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
 */
 
 
@@ -25,13 +25,13 @@
 #include <string>
 
 // FrameWork includes
+#include "Gaudi/Interfaces/IOptionsSvc.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/ServiceHandle.h"
 #include "AthenaBaseComps/AthAlgorithm.h"
 
 
 // forward declarations
-class IJobOptionsSvc;
 namespace DerivationFramework {
   class IThinningTool;
 }
@@ -78,7 +78,7 @@ private:
  private:
   /// The job options service (will be used to forward this algs properties to
   /// the private tool)
-  ServiceHandle<IJobOptionsSvc> m_jos;
+  ServiceHandle<Gaudi::Interfaces::IOptionsSvc> m_jos;
 
   StringProperty m_streamName
   { this, "StreamName", "", "Name of the stream for which thinning is done" };
diff --git a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinTrackParticlesAlg.cxx b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinTrackParticlesAlg.cxx
index 1f06f106c17e..a95bd23513c3 100644
--- a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinTrackParticlesAlg.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinTrackParticlesAlg.cxx
@@ -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
 */
 
 // ThinTrackParticlesAlg.cxx
@@ -16,7 +16,6 @@
 
 // FrameWork includes
 #include "Gaudi/Property.h"
-#include "GaudiKernel/IJobOptionsSvc.h"
 #include "DerivationFrameworkInterfaces/IThinningTool.h"
 
 
@@ -119,43 +118,42 @@ StatusCode ThinTrackParticlesAlg::initialize()
   // Now, set all properties of the private skimTool that were acutally configured
   ATH_MSG_DEBUG( "Setting property" << m_streamName
                  << " of private tool with name: '" << fullToolName << "'" );
-  ATH_CHECK( m_jos->addPropertyToCatalogue ( fullToolName,
-                                             StringProperty("StreamName",m_streamName) ) );
+  m_jos->set (fullToolName + ".StreamName", m_streamName.value());
 
   if (m_setTrackPartKey) {
     ATH_MSG_DEBUG( "Setting property" << m_trackParticleKey
                    << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_trackParticleKey) );
+    m_jos->set (fullToolName + "." + m_trackParticleKey.name(), m_trackParticleKey.value());
   }
   if (m_setInCollKey) {
     ATH_MSG_DEBUG( "Setting property" << m_inCollKeyList
                    << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_inCollKeyList) );
+    m_jos->set (fullToolName + "." + m_inCollKeyList.name(), m_inCollKeyList.toString());
   }
   if (m_setSelection) {
     ATH_MSG_DEBUG( "Setting property" << m_selection
                    << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_selection) );
+    m_jos->set (fullToolName + "." + m_selection.name(), m_selection.value() );
   }
   if (m_setTauConv) {
     ATH_MSG_DEBUG( "Setting property" << m_tauConversion
                    << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_tauConversion) );
+    m_jos->set (fullToolName + "." + m_tauConversion.name(), m_tauConversion.toString());
   }
   if (m_setTauWide) {
     ATH_MSG_DEBUG( "Setting property" << m_tauWide
                    << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_tauWide) );
+    m_jos->set (fullToolName + "." + m_tauWide.name(), m_tauWide.toString());
   }
   if (m_setTauOther) {
     ATH_MSG_DEBUG( "Setting property" << m_tauOther
                    << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_tauOther) );
+    m_jos->set (fullToolName + "." + m_tauOther.name(), m_tauOther.toString());
   }
   if (m_setNEleTPMax) {
     ATH_MSG_DEBUG( "Setting property" << m_nElectronPTMax
                    << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_nElectronPTMax) );
+    m_jos->set (fullToolName + "." + m_nElectronPTMax.name(), m_nElectronPTMax.toString());
   }
   ATH_MSG_DEBUG( "Done setting properties of the tool");
 
diff --git a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinTrackParticlesAlg.h b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinTrackParticlesAlg.h
index 1b0b65eecbaa..0769bceaf3c3 100644
--- a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinTrackParticlesAlg.h
+++ b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinTrackParticlesAlg.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
 */
 
 
@@ -25,13 +25,13 @@
 #include <string>
 
 // FrameWork includes
+#include "Gaudi/Interfaces/IOptionsSvc.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/ServiceHandle.h"
 #include "AthenaBaseComps/AthAlgorithm.h"
 
 
 // forward declarations
-class IJobOptionsSvc;
 namespace DerivationFramework {
   class IThinningTool;
 }
@@ -90,7 +90,7 @@ private:
  private:
   /// The job options service (will be used to forward this algs properties to
   /// the private tool)
-  ServiceHandle<IJobOptionsSvc> m_jos;
+  ServiceHandle<Gaudi::Interfaces::IOptionsSvc> m_jos;
 
   StringProperty m_streamName
   { this, "StreamName", "", "Name of the stream being thinned" };
-- 
GitLab


From f22dd0eb637513f20fec3b3c592561007bf8470d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nicolas=20K=C3=B6hler?= <nicolas.koehler@cern.ch>
Date: Tue, 6 Oct 2020 17:19:24 +0200
Subject: [PATCH 257/403] add missing includes

---
 MuonSpectrometer/MuonGeoModel/MuonGeoModel/RpcLayer.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/MuonSpectrometer/MuonGeoModel/MuonGeoModel/RpcLayer.h b/MuonSpectrometer/MuonGeoModel/MuonGeoModel/RpcLayer.h
index c8660272d224..384db52ba294 100755
--- a/MuonSpectrometer/MuonGeoModel/MuonGeoModel/RpcLayer.h
+++ b/MuonSpectrometer/MuonGeoModel/MuonGeoModel/RpcLayer.h
@@ -1,11 +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 RpcLayer_H
 #define RpcLayer_H
 
+#include "MuonGeoModel/DetectorElement.h"
+#include "GeoModelKernel/GeoVPhysVol.h"
+
 #include <string>
+#include <vector>
 
 namespace MuonGM {
 
-- 
GitLab


From 21ac6e2b83940a4a6b36448bde571ac450183842 Mon Sep 17 00:00:00 2001
From: Peter van Gemmeren <gemmeren@anl.gov>
Date: Tue, 6 Oct 2020 10:34:46 -0500
Subject: [PATCH 258/403] No need to flush merged output here, will be done
 after merge anyway.

---
 .../AthenaPoolCnvSvc/src/AthenaRootSharedWriterSvc.cxx        | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaRootSharedWriterSvc.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaRootSharedWriterSvc.cxx
index 368fa14cec2c..ae52fa8e12ea 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaRootSharedWriterSvc.cxx
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaRootSharedWriterSvc.cxx
@@ -125,9 +125,7 @@ struct ParallelFileMerger : public TObject
          if (syncBranches(outCollTree, inCollTree)) {
             input->Write();
          }
-         if (syncBranches(inCollTree, outCollTree)) {
-            fMerger.GetOutputFile()->Write();
-         }
+         syncBranches(inCollTree, outCollTree);
       }
       Bool_t result = fMerger.PartialMerge(TFileMerger::kIncremental | TFileMerger::kResetable | TFileMerger::kKeepCompression);
       TIter nextKey(input->GetListOfKeys());
-- 
GitLab


From 313262a9bad0dd88dfb9ed632be3b538e08067bd Mon Sep 17 00:00:00 2001
From: Nicholas Styles <nstyles@atlas07.desy.de>
Date: Tue, 22 Sep 2020 18:14:36 +0200
Subject: [PATCH 259/403] Add intial ITk flags implementation, and use to steer
 loading of local Geometry XML files

---
 Control/AthenaConfiguration/python/AllConfigFlags.py  |  7 ++++++-
 InnerDetector/InDetConfig/python/ITkConfigFlags.py    | 11 +++++++++++
 .../StripGeoModelXml/python/ITkStripGeoModelConfig.py |  3 +++
 3 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 InnerDetector/InDetConfig/python/ITkConfigFlags.py

diff --git a/Control/AthenaConfiguration/python/AllConfigFlags.py b/Control/AthenaConfiguration/python/AllConfigFlags.py
index e44e8143355e..89cfa2833b86 100644
--- a/Control/AthenaConfiguration/python/AllConfigFlags.py
+++ b/Control/AthenaConfiguration/python/AllConfigFlags.py
@@ -168,7 +168,12 @@ def _createCfgFlags():
     def __indet():
         from InDetConfig.InDetConfigFlags import createInDetConfigFlags
         return createInDetConfigFlags()
-    _addFlagsCategory(acf, "InDet", __indet, 'InDetConfig' )    
+    _addFlagsCategory(acf, "InDet", __indet, 'InDetConfig' )
+
+    def __itk():
+        from InDetConfig.ITkConfigFlags import createITkConfigFlags
+        return createITkConfigFlags()
+    _addFlagsCategory(acf, "ITk", __itk, 'InDetConfig' )
 
     def __muon():
         from MuonConfig.MuonConfigFlags import createMuonConfigFlags
diff --git a/InnerDetector/InDetConfig/python/ITkConfigFlags.py b/InnerDetector/InDetConfig/python/ITkConfigFlags.py
new file mode 100644
index 000000000000..077bb9d58ae0
--- /dev/null
+++ b/InnerDetector/InDetConfig/python/ITkConfigFlags.py
@@ -0,0 +1,11 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+from AthenaConfiguration.AthConfigFlags import AthConfigFlags
+# TODO: clean up flags, should only contain general settings but no alg config
+# TODO : Add some exta levels?
+
+def createITkConfigFlags():
+  itkcf=AthConfigFlags()
+  itkcf.addFlag("ITk.useLocalGeometry", False) #take geometry XML files from local instance rather than Detector Database, for development
+  itkcf.addFlag("ITk.stripGeometryFilename", 'ITkStrip.gmx')
+  return itkcf
diff --git a/InnerDetector/InDetDetDescr/StripGeoModelXml/python/ITkStripGeoModelConfig.py b/InnerDetector/InDetDetDescr/StripGeoModelXml/python/ITkStripGeoModelConfig.py
index 642c5a5b4f3b..f4093350e752 100644
--- a/InnerDetector/InDetDetDescr/StripGeoModelXml/python/ITkStripGeoModelConfig.py
+++ b/InnerDetector/InDetDetDescr/StripGeoModelXml/python/ITkStripGeoModelConfig.py
@@ -15,6 +15,9 @@ def ITkStripGeometryCfg( flags ):
     #ITkStripDetectorTool.useDynamicAlignFolders = flags.GeoModel.Align.Dynamic
     ITkStripDetectorTool.Alignable = False # make this a flag? Set true as soon as decided on folder structure
     ITkStripDetectorTool.DetectorName = "ITkStrip"
+    if flags.ITk.useLocalGeometry:
+      #Setting this filename triggers reading from local file rather than DB  
+      ITkStripDetectorTool.GmxFilename = flags.ITk.stripGeometryFilename 
     geoModelSvc.DetectorTools += [ ITkStripDetectorTool ]
     
     """
-- 
GitLab


From ad8c44813911ea863b4de0818c8dc3ddecb49137 Mon Sep 17 00:00:00 2001
From: Sebastien Rettie <srettie@lxplus736.cern.ch>
Date: Tue, 6 Oct 2020 18:00:06 +0200
Subject: [PATCH 260/403] Add proper error statements

---
 .../src/NnClusterizationFactory.cxx           | 27 +++++++------------
 1 file changed, 10 insertions(+), 17 deletions(-)

diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx
index 1486f67471c4..f88b01f9be18 100644
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx
@@ -97,9 +97,9 @@ namespace InDet {
           else {
             if (m_nParticleGroup[network_i]>0) {
 	      if (m_nParticleGroup[network_i]>=match_result.size()) {
-		      std::stringstream msg; msg << "Regex and match group of particle multiplicity do not coincide (groups=" << match_result.size() << " n particle group=" << m_nParticleGroup[network_i]
-			                        << "; type=" << network_i << ")";
-		      throw std::logic_error(msg.str());
+		ATH_MSG_ERROR("Regex and match group of particle multiplicity do not coincide (groups=" << match_result.size()
+			      << " n particle group=" << m_nParticleGroup[network_i]
+			      << "; type=" << network_i << ")");
 	      }
               int n_particles=atoi( match_result[m_nParticleGroup[network_i]].str().c_str());
               if (n_particles<=0 || static_cast<unsigned int>(n_particles)>m_maxSubClusters) {
@@ -321,8 +321,7 @@ namespace InDet {
     if (m_useTTrainedNetworks) {
       SG::ReadCondHandle<TTrainedNetworkCollection> nn_collection( m_readKeyWithoutTrack );
       if (!nn_collection.isValid()) {
-        std::stringstream msg; msg  << "Failed to get trained network collection with key " << m_readKeyWithoutTrack.key();
-        throw std::runtime_error( msg.str() );
+	ATH_MSG_ERROR( "Failed to get trained network collection with key " << m_readKeyWithoutTrack.key() );
       }
       return estimateNumberOfParticlesTTN(**nn_collection, inputData);
     }
@@ -364,8 +363,7 @@ namespace InDet {
     if (m_useTTrainedNetworks) {
       SG::ReadCondHandle<TTrainedNetworkCollection> nn_collection( m_readKeyWithTrack );
       if (!nn_collection.isValid()) {
-        std::stringstream msg; msg << "Failed to get trained network collection with key " << m_readKeyWithTrack.key();
-        throw std::runtime_error( msg.str() );
+	ATH_MSG_ERROR( "Failed to get trained network collection with key " << m_readKeyWithoutTrack.key() );
       }
       return estimateNumberOfParticlesTTN(**nn_collection, inputData);
     }
@@ -394,8 +392,7 @@ namespace InDet {
   {
     SG::ReadCondHandle<LWTNNCollection> lwtnn_collection(m_readKeyJSON) ;
     if (!lwtnn_collection.isValid()) {
-      std::stringstream msg; msg << "Failed to get LWTNN network collection with key " << m_readKeyJSON.key();
-      throw std::runtime_error( msg.str() );      
+      ATH_MSG_ERROR( "Failed to get LWTNN network collection with key " << m_readKeyJSON.key() );
     }
     ATH_MSG_DEBUG("Using lwtnn number network");
     // Evaluate the number network once per cluster
@@ -446,8 +443,7 @@ namespace InDet {
     if (m_useTTrainedNetworks) {
       SG::ReadCondHandle<TTrainedNetworkCollection> nn_collection( m_readKeyWithoutTrack );
       if (!nn_collection.isValid()) {
-        std::stringstream msg; msg << "Failed to get trained network collection with key " << m_readKeyWithoutTrack.key();
-        throw std::runtime_error( msg.str() );
+	ATH_MSG_ERROR( "Failed to get trained network collection with key " << m_readKeyWithoutTrack.key() );
       }
       // *(ReadCondHandle<>) returns a pointer rather than a reference ...
       return estimatePositionsTTN(**nn_collection, inputData,input,pCluster,sizeX,sizeY,numberSubClusters,errors);
@@ -495,8 +491,7 @@ namespace InDet {
     if (m_useTTrainedNetworks) {
       SG::ReadCondHandle<TTrainedNetworkCollection> nn_collection( m_readKeyWithTrack );
       if (!nn_collection.isValid()) {
-        std::stringstream msg; msg << "Failed to get trained network collection with key " << m_readKeyWithTrack.key();
-        throw std::runtime_error( msg.str() );
+	ATH_MSG_ERROR( "Failed to get trained network collection with key " << m_readKeyWithTrack.key() );
       }
 
       return estimatePositionsTTN(**nn_collection, inputData,input,pCluster,sizeX,sizeY,numberSubClusters,errors);
@@ -571,8 +566,7 @@ namespace InDet {
     
     SG::ReadCondHandle<LWTNNCollection> lwtnn_collection(m_readKeyJSON) ;
     if (!lwtnn_collection.isValid()) {
-      std::stringstream msg; msg << "Failed to get LWTNN network collection with key " << m_readKeyJSON.key();
-      throw std::runtime_error( msg.str() );      
+      ATH_MSG_ERROR(  "Failed to get LWTNN network collection with key " << m_readKeyJSON.key() );
     }
 
     // Need to evaluate the correct network once per cluster we're interested in.
@@ -584,8 +578,7 @@ namespace InDet {
       // Check that the network is defined. 
       // If not, we are outside an IOV and should fail
       if (not lwtnn_collection->at(numberSubClusters)) {
-        std::stringstream msg; msg << "No lwtnn network configured for this run! If you are outside the valid range for lwtnn-based configuration, plesae run with useNNTTrainedNetworks instead." << m_readKeyJSON.key();
-        throw std::runtime_error( msg.str() );
+	ATH_MSG_ERROR( "No lwtnn network configured for this run! If you are outside the valid range for lwtnn-based configuration, plesae run with useNNTTrainedNetworks instead." << m_readKeyJSON.key() );
       }
 
       std::string outNodeName = "merge_"+std::to_string(cluster);
-- 
GitLab


From 23e6c777ec95871b71d05269975c4283dbd46812 Mon Sep 17 00:00:00 2001
From: Nicholas Styles <nicholas.styles@desy.de>
Date: Tue, 6 Oct 2020 18:01:04 +0200
Subject: [PATCH 261/403] fix typo in cut definition

---
 InnerDetector/InDetConfig/python/TrackingCutsFlags.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/InnerDetector/InDetConfig/python/TrackingCutsFlags.py b/InnerDetector/InDetConfig/python/TrackingCutsFlags.py
index fb4bad8789e6..a98f93709d0b 100644
--- a/InnerDetector/InDetConfig/python/TrackingCutsFlags.py
+++ b/InnerDetector/InDetConfig/python/TrackingCutsFlags.py
@@ -515,7 +515,7 @@ def createLowPtLargeD0TrackingFlags():
 def createLowPtTrackingFlags():
     icf = createTrackingFlags()
     icf.extension        = "LowPt"
-    icf.maxPT = lambda pcf: (1e6  if pcf.InDet.doMinBias else pcf.InDet.Tracking.minPt + 0.3) * Units.GeV
+    icf.maxPT = lambda pcf: (1e6  if pcf.InDet.doMinBias else pcf.InDet.Tracking.minPT + 0.3) * Units.GeV
     icf.minPT            = 0.050 * Units.GeV
     icf.minClusters      = 5
     icf.minSiNotShared   = 4
-- 
GitLab


From b43834c9b077ae5abfcb18eea9a26f37e8c8b271 Mon Sep 17 00:00:00 2001
From: Frank Berghaus <frank.berghaus@cern.ch>
Date: Tue, 6 Oct 2020 17:11:13 +0000
Subject: [PATCH 262/403] Update test output references new content Fix
 ATEAM-657

The updates to EventFormatStreamHelperTool mean that there are
additional and updates information from the StreamHelperTool and
EventFormat content in the output streams. The references should relect
those changes.
---
 .../share/AthenaPoolExample_Concat.ref        |  76 ++++--
 .../share/AthenaPoolExample_Copy.ref          |  64 +++--
 .../share/AthenaPoolExample_RCond.ref         |  49 ++--
 .../share/AthenaPoolExample_RMeta.ref         |  49 ++--
 .../share/AthenaPoolExample_ReWrite.ref       | 116 +++++++--
 .../share/AthenaPoolExample_ReWriteAgain.ref  | 114 +++++++--
 .../share/AthenaPoolExample_ReWriteNext.ref   | 116 +++++++--
 .../share/AthenaPoolExample_Read.ref          | 219 +++++++++--------
 .../share/AthenaPoolExample_ReadAgain.ref     | 219 +++++++++--------
 .../share/AthenaPoolExample_ReadConcat.ref    | 223 ++++++++++--------
 .../share/AthenaPoolExample_WCond.ref         |  57 ++---
 .../share/AthenaPoolExample_WMeta.ref         |  53 +++--
 .../share/AthenaPoolExample_Write.ref         |  98 ++++++--
 13 files changed, 947 insertions(+), 506 deletions(-)

diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Concat.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Concat.ref
index 2e91e610786e..ddee97751d9b 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Concat.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Concat.ref
@@ -1,17 +1,17 @@
-Fri Sep 11 23:47:28 CEST 20?0
+Tue Oct  6 16:04:23 CEST 20?0
 Preloading tcmalloc_minimal.so
 Athena               INFO including file "AthenaCommon/Preparation.py"
 Athena               INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Athena               INFO executing ROOT6Setup
 Athena               INFO including file "AthenaCommon/Execution.py"
 Athena               INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ConcatJobOptions.py"
-Py:ConfigurableDb    INFO Read module info for 5568 configurables from 4 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 4 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Athena               INFO including file "AthenaCommon/runbatch.py"
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
                                                    Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
-                                          running on aibuild028.cern.ch on Fri Sep 11 23:47:40 20?0
+                                          running on 58dd451bc47f on Tue Oct  6 16:04:28 20?0
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 AthDictLoaderSvc     INFO in initialize...
@@ -30,9 +30,10 @@ PoolSvc             DEBUG Service base class initialized successfully
 PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:Catalog1.xml) [ok]
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
-DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/20?0-09-10T2101/Athena/22.0.18/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/20?0-10-05T2101/Athena/22.0.19/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 58dd451bc47f [ATLF atlas_dd ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc             DEBUG OutputLevel is 2
 PoolSvc              INFO Setting up APR FileCatalog and Streams
@@ -74,9 +75,11 @@ Stream1.Stream1...  DEBUG Property update for OutputLevel : new value = 2
 Stream1.Stream1...   INFO Initializing Stream1.Stream1Tool - package version AthenaServices-00-00-00
 Stream1.Stream1...  DEBUG Property update for OutputLevel : new value = 2
 Stream1.Stream1...   INFO Initializing Stream1.Stream1_MakeEventStreamInfo - package version OutputStreamAthenaPool-00-00-00
+Stream1.Stream1...  DEBUG Property update for OutputLevel : new value = 2
 Stream1.Thinnin...  DEBUG Property update for OutputLevel : new value = 2
-Stream1              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream1_MakeEventStreamInfo','Athena::ThinningCacheTool/ThinningCacheTool_Stream1'])
+Stream1              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream1_MakeEventStreamInfo','xAODMaker::EventFormatStreamHelperTool/Stream1_MakeEventFormat','Athena::ThinningCacheTool/ThinningCacheTool_Stream1'])
 Stream1              INFO Data output: SimplePoolFile1.root
+ClassIDSvc           INFO  getRegistryEntries: read 171 CLIDRegistry entries for module ALL
 Stream1              INFO I/O reinitialization...
 Stream1.Stream1...  DEBUG Property update for OutputLevel : new value = 2
 Stream1             DEBUG End initialize
@@ -84,6 +87,7 @@ Stream1             DEBUG input handles: 0
 Stream1             DEBUG output handles: 2
 Stream1             DEBUG Registering all Tools in ToolHandleArray HelperTools
 Stream1             DEBUG Adding private ToolHandle tool Stream1.Stream1_MakeEventStreamInfo (MakeEventStreamInfo)
+Stream1             DEBUG Adding private ToolHandle tool Stream1.Stream1_MakeEventFormat (xAODMaker::EventFormatStreamHelperTool)
 Stream1             DEBUG Adding private ToolHandle tool Stream1.ThinningCacheTool_Stream1 (Athena::ThinningCacheTool)
 Stream1             DEBUG Adding private ToolHandle tool Stream1.Stream1Tool (AthenaOutputStreamTool)
 Stream1             DEBUG Data Deps for Stream1
@@ -109,8 +113,9 @@ Stream2.Stream2...  DEBUG Property update for OutputLevel : new value = 2
 Stream2.Stream2...   INFO Initializing Stream2.Stream2Tool - package version AthenaServices-00-00-00
 Stream2.Stream2...  DEBUG Property update for OutputLevel : new value = 2
 Stream2.Stream2...   INFO Initializing Stream2.Stream2_MakeEventStreamInfo - package version OutputStreamAthenaPool-00-00-00
+Stream2.Stream2...  DEBUG Property update for OutputLevel : new value = 2
 Stream2.Thinnin...  DEBUG Property update for OutputLevel : new value = 2
-Stream2              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream2_MakeEventStreamInfo','Athena::ThinningCacheTool/ThinningCacheTool_Stream2'])
+Stream2              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream2_MakeEventStreamInfo','xAODMaker::EventFormatStreamHelperTool/Stream2_MakeEventFormat','Athena::ThinningCacheTool/ThinningCacheTool_Stream2'])
 Stream2              INFO Data output: SimplePoolFile3.root
 Stream2              INFO I/O reinitialization...
 Stream2.Stream2...  DEBUG Property update for OutputLevel : new value = 2
@@ -119,6 +124,7 @@ Stream2             DEBUG input handles: 0
 Stream2             DEBUG output handles: 2
 Stream2             DEBUG Registering all Tools in ToolHandleArray HelperTools
 Stream2             DEBUG Adding private ToolHandle tool Stream2.Stream2_MakeEventStreamInfo (MakeEventStreamInfo)
+Stream2             DEBUG Adding private ToolHandle tool Stream2.Stream2_MakeEventFormat (xAODMaker::EventFormatStreamHelperTool)
 Stream2             DEBUG Adding private ToolHandle tool Stream2.ThinningCacheTool_Stream2 (Athena::ThinningCacheTool)
 Stream2             DEBUG Adding private ToolHandle tool Stream2.Stream2Tool (AthenaOutputStreamTool)
 Stream2             DEBUG Data Deps for Stream2
@@ -1602,12 +1608,17 @@ AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #1 20 events
 Stream1             DEBUG AthenaOutputStream Stream1 ::stop()
 Stream2             DEBUG AthenaOutputStream Stream2 ::stop()
 Stream1             DEBUG slot 0  handle() incident type: MetaDataStop
-Stream1             DEBUG metadataItemList: [EventStreamInfo#Stream1, IOVMetaDataContainer#*]
+Stream1             DEBUG metadataItemList: [EventStreamInfo#Stream1, IOVMetaDataContainer#*, xAOD::EventFormat#EventFormatStream1]
 Stream1             DEBUG addItemObjects(167728019,"Stream1") called
 Stream1             DEBUG            Key:Stream1
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
 Stream1             DEBUG  Added object 167728019,"Stream1"
+Stream1             DEBUG addItemObjects(243004407,"EventFormatStream1") called
+Stream1             DEBUG            Key:EventFormatStream1
+Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
+Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+Stream1             DEBUG  Added object 243004407,"EventFormatStream1"
 Stream1             DEBUG addItemObjects(1316383046,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
@@ -1625,30 +1636,47 @@ SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Adding Shape[9 , ????]:  [1 Column(s)] 
 SimplePoolFile1...  DEBUG ---->Class:EventStreamInfo_p3
 SimplePoolFile1...  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
+StorageSvc           INFO Building shape according to reflection information using shape ID for:
+StorageSvc           INFO xAOD::EventFormat_v1 [????]
+SimplePoolFile1...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaData(xAOD::EventFormat_v1/EventFormatStream1)
+MetaData(xAOD::...  DEBUG Opening
+MetaData(xAOD::...  DEBUG    attributes# = 1
+MetaData(xAOD::...  DEBUG Branch container 'xAOD::EventFormat_v1_EventFormatStream1'
+MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::EventFormat_v1/EventFormatStream1) of type ROOT_Tree
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (15 , ffffffff)
+SimplePoolFile1...  DEBUG ---->ClassID:????
+SimplePoolFile1...  DEBUG --->Adding Shape[10 , ????]:  [1 Column(s)] 
+SimplePoolFile1...  DEBUG ---->Class:xAOD::EventFormat_v1
+SimplePoolFile1...  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
 SimplePoolFile1...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaDataHdr(DataHeader)
 MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (15 , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (16 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
 MetaDataHdrForm...  DEBUG    attributes# = 1
 MetaDataHdrForm...  DEBUG Branch container 'DataHeaderForm'
 MetaDataHdrForm...  DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (16 , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (17 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-ClassIDSvc           INFO  getRegistryEntries: read 7 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 14 CLIDRegistry entries for module ALL
 Stream1              INFO Metadata records written: 21
 Stream1             DEBUG Leaving incident handler for MetaDataStop
 Stream2             DEBUG slot 0  handle() incident type: MetaDataStop
-Stream2             DEBUG metadataItemList: [EventStreamInfo#Stream2, IOVMetaDataContainer#*]
+Stream2             DEBUG metadataItemList: [EventStreamInfo#Stream2, IOVMetaDataContainer#*, xAOD::EventFormat#EventFormatStream2]
 Stream2             DEBUG addItemObjects(167728019,"Stream2") called
 Stream2             DEBUG            Key:Stream2
 Stream2             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream2             DEBUG      Comp Attr 0 with 15 mantissa bits.
 Stream2             DEBUG  Added object 167728019,"Stream2"
+Stream2             DEBUG addItemObjects(243004407,"EventFormatStream2") called
+Stream2             DEBUG            Key:EventFormatStream2
+Stream2             DEBUG      Comp Attr 0 with 7 mantissa bits.
+Stream2             DEBUG      Comp Attr 0 with 15 mantissa bits.
+Stream2             DEBUG  Added object 243004407,"EventFormatStream2"
 Stream2             DEBUG addItemObjects(1316383046,"*") called
 Stream2             DEBUG            Key:*
 Stream2             DEBUG      Comp Attr 0 with 7 mantissa bits.
@@ -1664,19 +1692,29 @@ SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[4 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:EventStreamInfo_p3
 SimplePoolFile3...  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
+SimplePoolFile3...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaData(xAOD::EventFormat_v1/EventFormatStream2)
+MetaData(xAOD::...  DEBUG Opening
+MetaData(xAOD::...  DEBUG    attributes# = 1
+MetaData(xAOD::...  DEBUG Branch container 'xAOD::EventFormat_v1_EventFormatStream2'
+MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::EventFormat_v1/EventFormatStream2) of type ROOT_Tree
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream2) [20?]  (8 , ffffffff)
+SimplePoolFile3...  DEBUG ---->ClassID:????
+SimplePoolFile3...  DEBUG --->Adding Shape[5 , ????]:  [1 Column(s)] 
+SimplePoolFile3...  DEBUG ---->Class:xAOD::EventFormat_v1
+SimplePoolFile3...  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
 SimplePoolFile3...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaDataHdr(DataHeader)
 MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (8 , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (9 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
 MetaDataHdrForm...  DEBUG    attributes# = 1
 MetaDataHdrForm...  DEBUG Branch container 'DataHeaderForm'
 MetaDataHdrForm...  DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (9 , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (a , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 Stream2              INFO Metadata records written: 21
 Stream2             DEBUG Leaving incident handler for MetaDataStop
@@ -1704,10 +1742,10 @@ ToolSvc              INFO Removing all tools created by ToolSvc
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
 commitOutput         INFO Time User   : Tot=    0 [us] Ave/Min/Max=       0(+-       0)/       0/       0 [us] #= 42
-cRep_ALL             INFO Time User   : Tot=   30 [ms] Ave/Min/Max=   0.242(+-    1.54)/       0/      10 [ms] #=124
-cRepR_ALL            INFO Time User   : Tot=   50 [ms] Ave/Min/Max=   0.128(+-    1.12)/       0/      10 [ms] #=390
-fRep_ALL             INFO Time User   : Tot=   80 [ms] Ave/Min/Max=   0.645(+-    2.46)/       0/      10 [ms] #=124
-ChronoStatSvc        INFO Time User   : Tot=  370 [ms]  #=  1
+cRep_ALL             INFO Time User   : Tot=   30 [ms] Ave/Min/Max=   0.238(+-    1.52)/       0/      10 [ms] #=126
+cRepR_ALL            INFO Time User   : Tot=   30 [ms] Ave/Min/Max=  0.0765(+-   0.871)/       0/      10 [ms] #=392
+fRep_ALL             INFO Time User   : Tot=   30 [ms] Ave/Min/Max=   0.238(+-    1.52)/       0/      10 [ms] #=126
+ChronoStatSvc        INFO Time User   : Tot=  210 [ms]  #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Copy.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Copy.ref
index 1f1e7202e3df..ca92aa4462ba 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Copy.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Copy.ref
@@ -1,17 +1,17 @@
-Fri Sep 11 23:46:29 CEST 20?0
+Tue Oct  6 16:03:57 CEST 20?0
 Preloading tcmalloc_minimal.so
 Athena               INFO including file "AthenaCommon/Preparation.py"
 Athena               INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Athena               INFO executing ROOT6Setup
 Athena               INFO including file "AthenaCommon/Execution.py"
 Athena               INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_CopyJobOptions.py"
-Py:ConfigurableDb    INFO Read module info for 5568 configurables from 4 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 4 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Athena               INFO including file "AthenaCommon/runbatch.py"
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
                                                    Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
-                                          running on aibuild028.cern.ch on Fri Sep 11 23:46:41 20?0
+                                          running on 58dd451bc47f on Tue Oct  6 16:04:02 20?0
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 AthDictLoaderSvc     INFO in initialize...
@@ -29,9 +29,10 @@ PoolSvc             DEBUG Service base class initialized successfully
 PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:Catalog1.xml) [ok]
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
-DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/20?0-09-10T2101/Athena/22.0.18/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/20?0-10-05T2101/Athena/22.0.19/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 58dd451bc47f [ATLF atlas_dd ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc             DEBUG OutputLevel is 2
 PoolSvc              INFO Setting up APR FileCatalog and Streams
@@ -65,7 +66,9 @@ SimplePoolFile1...  DEBUG --->Reading Shape[5 , ????]: [1 Column(s)]
 SimplePoolFile1...  DEBUG ---->[0]:unsigned int Typ:unsigned int [3] Size:0 Offset:0 #Elements:1
 SimplePoolFile1...  DEBUG --->Reading Shape[6 , ????]: [1 Column(s)]
 SimplePoolFile1...  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
-##Shapes            DEBUG No objects passing selection criteria... Container has 7 Entries in total.
+SimplePoolFile1...  DEBUG --->Reading Shape[7 , ????]: [1 Column(s)]
+SimplePoolFile1...  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
+##Shapes            DEBUG No objects passing selection criteria... Container has 8 Entries in total.
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opening
 ##Links             DEBUG    attributes# = 1
@@ -90,11 +93,13 @@ SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(MagicNumber)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (b , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (c , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (c , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (d , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (d , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-##Links             DEBUG No objects passing selection criteria... Container has 12 Entries in total.
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (e , ffffffff)
+SimplePoolFile1...  DEBUG ---->ClassID:????
+##Links             DEBUG No objects passing selection criteria... Container has 13 Entries in total.
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
 ##Params            DEBUG Opening
 ##Params            DEBUG    attributes# = 1
@@ -139,9 +144,11 @@ Stream1.Stream1...  DEBUG Property update for OutputLevel : new value = 2
 Stream1.Stream1...   INFO Initializing Stream1.Stream1Tool - package version AthenaServices-00-00-00
 Stream1.Stream1...  DEBUG Property update for OutputLevel : new value = 2
 Stream1.Stream1...   INFO Initializing Stream1.Stream1_MakeEventStreamInfo - package version OutputStreamAthenaPool-00-00-00
+Stream1.Stream1...  DEBUG Property update for OutputLevel : new value = 2
 Stream1.Thinnin...  DEBUG Property update for OutputLevel : new value = 2
-Stream1              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream1_MakeEventStreamInfo','Athena::ThinningCacheTool/ThinningCacheTool_Stream1'])
+Stream1              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream1_MakeEventStreamInfo','xAODMaker::EventFormatStreamHelperTool/Stream1_MakeEventFormat','Athena::ThinningCacheTool/ThinningCacheTool_Stream1'])
 Stream1              INFO Data output: SimplePoolReplica1.root
+ClassIDSvc           INFO  getRegistryEntries: read 171 CLIDRegistry entries for module ALL
 Stream1              INFO I/O reinitialization...
 Stream1.Stream1...  DEBUG Property update for OutputLevel : new value = 2
 Stream1             DEBUG End initialize
@@ -149,6 +156,7 @@ Stream1             DEBUG input handles: 0
 Stream1             DEBUG output handles: 2
 Stream1             DEBUG Registering all Tools in ToolHandleArray HelperTools
 Stream1             DEBUG Adding private ToolHandle tool Stream1.Stream1_MakeEventStreamInfo (MakeEventStreamInfo)
+Stream1             DEBUG Adding private ToolHandle tool Stream1.Stream1_MakeEventFormat (xAODMaker::EventFormatStreamHelperTool)
 Stream1             DEBUG Adding private ToolHandle tool Stream1.ThinningCacheTool_Stream1 (Athena::ThinningCacheTool)
 Stream1             DEBUG Adding private ToolHandle tool Stream1.Stream1Tool (AthenaOutputStreamTool)
 Stream1             DEBUG Data Deps for Stream1
@@ -858,12 +866,17 @@ Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All]
 AthenaEventLoopMgr   INFO No more events in event selection 
 Stream1             DEBUG AthenaOutputStream Stream1 ::stop()
 Stream1             DEBUG slot 0  handle() incident type: MetaDataStop
-Stream1             DEBUG metadataItemList: [EventStreamInfo#Stream1, IOVMetaDataContainer#*]
+Stream1             DEBUG metadataItemList: [EventStreamInfo#Stream1, IOVMetaDataContainer#*, xAOD::EventFormat#EventFormatStream1]
 Stream1             DEBUG addItemObjects(167728019,"Stream1") called
 Stream1             DEBUG            Key:Stream1
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
 Stream1             DEBUG  Added object 167728019,"Stream1"
+Stream1             DEBUG addItemObjects(243004407,"EventFormatStream1") called
+Stream1             DEBUG            Key:EventFormatStream1
+Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
+Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+Stream1             DEBUG  Added object 243004407,"EventFormatStream1"
 Stream1             DEBUG addItemObjects(1316383046,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
@@ -881,20 +894,33 @@ SimplePoolRepli...  DEBUG ---->ClassID:????
 SimplePoolRepli...  DEBUG --->Adding Shape[9 , ????]:  [1 Column(s)] 
 SimplePoolRepli...  DEBUG ---->Class:EventStreamInfo_p3
 SimplePoolRepli...  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
+StorageSvc           INFO Building shape according to reflection information using shape ID for:
+StorageSvc           INFO xAOD::EventFormat_v1 [????]
+SimplePoolRepli...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaData(xAOD::EventFormat_v1/EventFormatStream1)
+MetaData(xAOD::...  DEBUG Opening
+MetaData(xAOD::...  DEBUG    attributes# = 1
+MetaData(xAOD::...  DEBUG Branch container 'xAOD::EventFormat_v1_EventFormatStream1'
+MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::EventFormat_v1/EventFormatStream1) of type ROOT_Tree
+SimplePoolRepli...  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (15 , ffffffff)
+SimplePoolRepli...  DEBUG ---->ClassID:????
+SimplePoolRepli...  DEBUG --->Adding Shape[10 , ????]:  [1 Column(s)] 
+SimplePoolRepli...  DEBUG ---->Class:xAOD::EventFormat_v1
+SimplePoolRepli...  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
 SimplePoolRepli...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaDataHdr(DataHeader)
 MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
-SimplePoolRepli...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (15 , ffffffff)
+SimplePoolRepli...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (16 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
 SimplePoolRepli...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
 MetaDataHdrForm...  DEBUG    attributes# = 1
 MetaDataHdrForm...  DEBUG Branch container 'DataHeaderForm'
 MetaDataHdrForm...  DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree
-SimplePoolRepli...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (16 , ffffffff)
+SimplePoolRepli...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (17 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
+ClassIDSvc           INFO  getRegistryEntries: read 7 CLIDRegistry entries for module ALL
 Stream1              INFO Metadata records written: 21
 Stream1             DEBUG Leaving incident handler for MetaDataStop
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   CREATE    [ROOT_All] ????
@@ -911,12 +937,12 @@ ToolSvc              INFO Removing all tools created by ToolSvc
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
 commitOutput         INFO Time User   : Tot=    0 [us] Ave/Min/Max=       0(+-       0)/       0/       0 [us] #= 21
-cRep_ALL             INFO Time User   : Tot=    0 [us] Ave/Min/Max=       0(+-       0)/       0/       0 [us] #= 62
+cObj_ALL             INFO Time User   : Tot=    0 [us] Ave/Min/Max=       0(+-       0)/       0/       0 [us] #= 62
+cRep_ALL             INFO Time User   : Tot=    0 [us] Ave/Min/Max=       0(+-       0)/       0/       0 [us] #= 63
 cObjR_ALL            INFO Time User   : Tot=    0 [us] Ave/Min/Max=       0(+-       0)/       0/       0 [us] #= 65
-cRepR_ALL            INFO Time User   : Tot=   20 [ms] Ave/Min/Max=  0.0617(+-   0.783)/       0/      10 [ms] #=324
-cObj_ALL             INFO Time User   : Tot=   30 [ms] Ave/Min/Max=   0.484(+-     2.8)/       0/      20 [ms] #= 62
-fRep_ALL             INFO Time User   : Tot=   40 [ms] Ave/Min/Max=   0.645(+-    3.04)/       0/      20 [ms] #= 62
-ChronoStatSvc        INFO Time User   : Tot=  430 [ms]  #=  1
+cRepR_ALL            INFO Time User   : Tot=   10 [ms] Ave/Min/Max=  0.0308(+-   0.554)/       0/      10 [ms] #=325
+fRep_ALL             INFO Time User   : Tot=   20 [ms] Ave/Min/Max=   0.317(+-    1.75)/       0/      10 [ms] #= 63
+ChronoStatSvc        INFO Time User   : Tot=  210 [ms]  #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RCond.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RCond.ref
index 9c9e89381bda..39dc8733fe7c 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RCond.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RCond.ref
@@ -1,28 +1,24 @@
-Sat Nov  2 01:41:28 CET 2019
+Tue Oct  6 16:04:43 CEST 20?0
 Preloading tcmalloc_minimal.so
 Athena               INFO including file "AthenaCommon/Preparation.py"
 Athena               INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Athena               INFO executing ROOT6Setup
 Athena               INFO including file "AthenaCommon/Execution.py"
 Athena               INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_RCondJobOptions.py"
-Py:ConfigurableDb    INFO Read module info for 5598 configurables from 9 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 4 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 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
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r2)
-                                          running on aibuild028.cern.ch on Sat Nov  2 01:41:38 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on 58dd451bc47f on Tue Oct  6 16:04:49 20?0
 ====================================================================================================================================
 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 3286 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3308 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 846 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 861 CLIDRegistry entries for module ALL
 ReadCond            DEBUG Property update for OutputLevel : new value = 2
 ReadCond             INFO in initialize()
 ReadCond            DEBUG input handles: 0
@@ -33,14 +29,14 @@ ReadData             INFO in initialize()
 MetaDataSvc         DEBUG Property update for OutputLevel : new value = 2
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 MetaDataSvc         DEBUG Service base class initialized successfully
-AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 PoolSvc             DEBUG Property update for OutputLevel : new value = 2
 PoolSvc             DEBUG Service base class initialized successfully
 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-10-31T2131/Athena/22.0.7/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/20?0-10-05T2101/Athena/22.0.19/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 58dd451bc47f [ATLF atlas_dd ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc             DEBUG OutputLevel is 2
 PoolSvc              INFO Setting up APR FileCatalog and Streams
@@ -84,7 +80,9 @@ SimplePoolFile1...  DEBUG --->Reading Shape[8 , ????]: [1 Column(s)]
 SimplePoolFile1...  DEBUG ---->[0]:float Typ:float [10] Size:0 Offset:0 #Elements:1
 SimplePoolFile1...  DEBUG --->Reading Shape[9 , ????]: [1 Column(s)]
 SimplePoolFile1...  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
-##Shapes            DEBUG No objects passing selection criteria... Container has 10 Entries in total.
+SimplePoolFile1...  DEBUG --->Reading Shape[10 , ????]: [1 Column(s)]
+SimplePoolFile1...  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
+##Shapes            DEBUG No objects passing selection criteria... Container has 11 Entries in total.
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opening
 ##Links             DEBUG    attributes# = 1
@@ -127,11 +125,13 @@ SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventWeight)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (14 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (15 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (15 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (16 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (16 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-##Links             DEBUG No objects passing selection criteria... Container has 21 Entries in total.
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (17 , ffffffff)
+SimplePoolFile1...  DEBUG ---->ClassID:????
+##Links             DEBUG No objects passing selection criteria... Container has 22 Entries in total.
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
 ##Params            DEBUG Opening
 ##Params            DEBUG    attributes# = 1
@@ -146,7 +146,7 @@ MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
-ClassIDSvc           INFO  getRegistryEntries: read 2053 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1666 CLIDRegistry entries for module ALL
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
@@ -155,6 +155,7 @@ MetaDataHdrForm...  DEBUG Branch container 'DataHeaderForm'
 MetaDataHdrForm...  DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree
 MetaDataSvc         DEBUG Loaded input meta data store proxies
 ClassIDSvc           INFO  getRegistryEntries: read 2 CLIDRegistry entries for module ALL
+OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 AthenaPoolAddre...  DEBUG Property update for OutputLevel : new value = 2
 AthenaPoolAddre...  DEBUG Service base class initialized successfully
 CondProxyProvider   DEBUG Property update for OutputLevel : new value = 2
@@ -202,7 +203,6 @@ ReadData            DEBUG output handles: 0
 ReadData            DEBUG Data Deps for ReadData
   + INPUT   ( 'ExampleHitContainer' , 'StoreGateSvc+MyHits' ) 
   + INPUT   ( 'ExampleTrackContainer' , 'StoreGateSvc+MyTracks' ) 
-HistogramPersis...WARNING Histograms saving not required.
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
 EventSelector       DEBUG Try item: "SimplePoolFile1.root" from the collection list.
@@ -333,7 +333,7 @@ EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
 EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001].
 EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001].
-ClassIDSvc           INFO  getRegistryEntries: read 27 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 21 CLIDRegistry entries for module ALL
 EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
@@ -958,6 +958,7 @@ ReadData             INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = Du
 ReadData             INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #1 20 events processed so far  <<<===
 MetaDataSvc         DEBUG handle() EndInputFile for FID:????
+MetaDataSvc         DEBUG retireMetadataSource: FID:????
 EventSelector        INFO Disconnecting input sourceID: ????
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
 AthenaEventLoopMgr   INFO No more events in event selection 
@@ -974,9 +975,9 @@ ToolSvc              INFO Removing all tools created by ToolSvc
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot=   10 [ms] Ave/Min/Max=0.204(+- 1.41)/    0/   10 [ms] #= 49
-cObj_ALL             INFO Time User   : Tot=   20 [ms] Ave/Min/Max=0.444(+- 2.06)/    0/   10 [ms] #= 45
-ChronoStatSvc        INFO Time User   : Tot=  450 [ms]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot=   10 [ms] Ave/Min/Max=   0.204(+-    1.41)/       0/      10 [ms] #= 49
+cObj_ALL             INFO Time User   : Tot=   20 [ms] Ave/Min/Max=   0.444(+-    2.06)/       0/      10 [ms] #= 45
+ChronoStatSvc        INFO Time User   : Tot=  160 [ms]  #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RMeta.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RMeta.ref
index 7d016fd5f3f7..3c77f1afb29b 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RMeta.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RMeta.ref
@@ -1,43 +1,39 @@
-Sat Nov  2 01:41:54 CET 2019
+Tue Oct  6 16:04:56 CEST 20?0
 Preloading tcmalloc_minimal.so
 Athena               INFO including file "AthenaCommon/Preparation.py"
 Athena               INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Athena               INFO executing ROOT6Setup
 Athena               INFO including file "AthenaCommon/Execution.py"
 Athena               INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_RMetaJobOptions.py"
-Py:ConfigurableDb    INFO Read module info for 5598 configurables from 9 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 4 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 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
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r2)
-                                          running on aibuild028.cern.ch on Sat Nov  2 01:42:03 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on 58dd451bc47f on Tue Oct  6 16:05:02 20?0
 ====================================================================================================================================
 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 3286 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3308 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 846 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 861 CLIDRegistry entries for module ALL
 ReadData            DEBUG Property update for OutputLevel : new value = 2
 ReadData             INFO in initialize()
 MetaDataSvc         DEBUG Property update for OutputLevel : new value = 2
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 MetaDataSvc         DEBUG Service base class initialized successfully
-AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 PoolSvc             DEBUG Property update for OutputLevel : new value = 2
 PoolSvc             DEBUG Service base class initialized successfully
 PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:Catalog2.xml) [ok]
 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-10-31T2131/Athena/22.0.7/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/20?0-10-05T2101/Athena/22.0.19/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 58dd451bc47f [ATLF atlas_dd ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc             DEBUG OutputLevel is 2
 PoolSvc              INFO Setting up APR FileCatalog and Streams
@@ -81,7 +77,9 @@ SimplePoolFile5...  DEBUG --->Reading Shape[8 , ????]: [1 Column(s)]
 SimplePoolFile5...  DEBUG ---->[0]:float Typ:float [10] Size:0 Offset:0 #Elements:1
 SimplePoolFile5...  DEBUG --->Reading Shape[9 , ????]: [1 Column(s)]
 SimplePoolFile5...  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
-##Shapes            DEBUG No objects passing selection criteria... Container has 10 Entries in total.
+SimplePoolFile5...  DEBUG --->Reading Shape[10 , ????]: [1 Column(s)]
+SimplePoolFile5...  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
+##Shapes            DEBUG No objects passing selection criteria... Container has 11 Entries in total.
 SimplePoolFile5...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opening
 ##Links             DEBUG    attributes# = 1
@@ -126,11 +124,13 @@ SimplePoolFile5...  DEBUG --->Reading Assoc:????/MetaData(ExampleHitContainer_p1
 SimplePoolFile5...  DEBUG ---->ClassID:????
 SimplePoolFile5...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (15 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
-SimplePoolFile5...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (16 , ffffffff)
+SimplePoolFile5...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (16 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
-SimplePoolFile5...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (17 , ffffffff)
+SimplePoolFile5...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (17 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
-##Links             DEBUG No objects passing selection criteria... Container has 22 Entries in total.
+SimplePoolFile5...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (18 , ffffffff)
+SimplePoolFile5...  DEBUG ---->ClassID:????
+##Links             DEBUG No objects passing selection criteria... Container has 23 Entries in total.
 SimplePoolFile5...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
 ##Params            DEBUG Opening
 ##Params            DEBUG    attributes# = 1
@@ -145,7 +145,7 @@ MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
-ClassIDSvc           INFO  getRegistryEntries: read 2053 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1666 CLIDRegistry entries for module ALL
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 SimplePoolFile5...  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
@@ -154,6 +154,7 @@ MetaDataHdrForm...  DEBUG Branch container 'DataHeaderForm'
 MetaDataHdrForm...  DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree
 MetaDataSvc         DEBUG Loaded input meta data store proxies
 ClassIDSvc           INFO  getRegistryEntries: read 2 CLIDRegistry entries for module ALL
+OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 AthenaPoolAddre...  DEBUG Property update for OutputLevel : new value = 2
 AthenaPoolAddre...  DEBUG Service base class initialized successfully
 ReadData            DEBUG input handles: 2
@@ -161,7 +162,6 @@ ReadData            DEBUG output handles: 0
 ReadData            DEBUG Data Deps for ReadData
   + INPUT   ( 'ExampleHitContainer' , 'StoreGateSvc+MyHits' ) 
   + INPUT   ( 'ExampleTrackContainer' , 'StoreGateSvc+MyTracks' ) 
-HistogramPersis...WARNING Histograms saving not required.
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
 EventSelector       DEBUG Try item: "SimplePoolFile5.root" from the collection list.
@@ -185,7 +185,7 @@ EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
 EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000].
 EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000].
-ClassIDSvc           INFO  getRegistryEntries: read 12 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 6 CLIDRegistry entries for module ALL
 EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000]
 SimplePoolFile5...  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] POOLContainer(DataHeader)
 POOLContainer(D...  DEBUG Opening
@@ -826,6 +826,7 @@ ReadData             INFO Hit x = 1926.91 y = -47.7762 z = -1855.07 detector = D
 ReadData             INFO Hit x = 1930.12 y = -53.4551 z = -1856.17 detector = DummyHitDetector
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #0 20 events processed so far  <<<===
 MetaDataSvc         DEBUG handle() EndInputFile for FID:????
+MetaDataSvc         DEBUG retireMetadataSource: FID:????
 EventSelector        INFO Disconnecting input sourceID: ????
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
@@ -841,9 +842,9 @@ ToolSvc.AthPool...   INFO in finalize()
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot=   10 [ms] Ave/Min/Max=0.213(+- 1.44)/    0/   10 [ms] #= 47
-cObj_ALL             INFO Time User   : Tot=   30 [ms] Ave/Min/Max=0.682(+- 2.52)/    0/   10 [ms] #= 44
-ChronoStatSvc        INFO Time User   : Tot=  450 [ms]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot=    0 [us] Ave/Min/Max=       0(+-       0)/       0/       0 [us] #= 47
+cObj_ALL             INFO Time User   : Tot=   10 [ms] Ave/Min/Max=   0.227(+-    1.49)/       0/      10 [ms] #= 44
+ChronoStatSvc        INFO Time User   : Tot=  150 [ms]  #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWrite.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWrite.ref
index 814f5dd5a1bd..ba91a2a9f3f7 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWrite.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWrite.ref
@@ -1,17 +1,17 @@
-Wed Sep 23 17:58:44 CEST 20?0
+Tue Oct  6 16:03:44 CEST 20?0
 Preloading tcmalloc_minimal.so
 Athena               INFO including file "AthenaCommon/Preparation.py"
 Athena               INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Athena               INFO executing ROOT6Setup
 Athena               INFO including file "AthenaCommon/Execution.py"
 Athena               INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_RWJobOptions.py"
-Py:ConfigurableDb    INFO Read module info for 5565 configurables from 45 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 4 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Athena               INFO including file "AthenaCommon/runbatch.py"
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
                                                    Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
-                                          running on lxplus750.cern.ch on Wed Sep 23 17:58:51 20?0
+                                          running on 58dd451bc47f on Tue Oct  6 16:03:49 20?0
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 AthDictLoaderSvc     INFO in initialize...
@@ -31,9 +31,10 @@ PoolSvc             DEBUG Property update for OutputLevel : new value = 2
 PoolSvc             DEBUG Service base class initialized successfully
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
-DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/20?0-09-22T2101/Athena/22.0.18/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host lxplus750.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/20?0-10-05T2101/Athena/22.0.19/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 58dd451bc47f [ATLF atlas_dd ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc             DEBUG OutputLevel is 2
 PoolSvc              INFO Setting up APR FileCatalog and Streams
@@ -70,7 +71,9 @@ SimplePoolFile1...  DEBUG --->Reading Shape[5 , ????]: [1 Column(s)]
 SimplePoolFile1...  DEBUG ---->[0]:unsigned int Typ:unsigned int [3] Size:0 Offset:0 #Elements:1
 SimplePoolFile1...  DEBUG --->Reading Shape[6 , ????]: [1 Column(s)]
 SimplePoolFile1...  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
-##Shapes            DEBUG No objects passing selection criteria... Container has 7 Entries in total.
+SimplePoolFile1...  DEBUG --->Reading Shape[7 , ????]: [1 Column(s)]
+SimplePoolFile1...  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
+##Shapes            DEBUG No objects passing selection criteria... Container has 8 Entries in total.
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opening
 ##Links             DEBUG    attributes# = 1
@@ -95,11 +98,13 @@ SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(MagicNumber)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (b , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (c , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (c , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (d , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (d , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-##Links             DEBUG No objects passing selection criteria... Container has 12 Entries in total.
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (e , ffffffff)
+SimplePoolFile1...  DEBUG ---->ClassID:????
+##Links             DEBUG No objects passing selection criteria... Container has 13 Entries in total.
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
 ##Params            DEBUG Opening
 ##Params            DEBUG    attributes# = 1
@@ -161,16 +166,21 @@ Stream1.Stream1...  DEBUG Property update for OutputLevel : new value = 2
 Stream1.Stream1...   INFO Initializing Stream1.Stream1Tool - package version AthenaServices-00-00-00
 Stream1.Stream1...  DEBUG Property update for OutputLevel : new value = 2
 Stream1.Stream1...   INFO Initializing Stream1.Stream1_MakeEventStreamInfo - package version OutputStreamAthenaPool-00-00-00
+Stream1.Stream1...  DEBUG Property update for OutputLevel : new value = 2
 Stream1.Thinnin...  DEBUG Property update for OutputLevel : new value = 2
-Stream1              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream1_MakeEventStreamInfo','Athena::ThinningCacheTool/ThinningCacheTool_Stream1'])
+Stream1              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream1_MakeEventStreamInfo','xAODMaker::EventFormatStreamHelperTool/Stream1_MakeEventFormat','Athena::ThinningCacheTool/ThinningCacheTool_Stream1'])
 Stream1              INFO Data output: SimplePoolFile3.root
+ClassIDSvc           INFO  getRegistryEntries: read 171 CLIDRegistry entries for module ALL
+MetaDataSvc         DEBUG MetaDataSvc will handle ClassID 167728019
 Stream1              INFO I/O reinitialization...
+MetaDataSvc         DEBUG MetaDataSvc will handle ClassID 167728019
 Stream1.Stream1...  DEBUG Property update for OutputLevel : new value = 2
 Stream1             DEBUG End initialize
 Stream1             DEBUG input handles: 0
 Stream1             DEBUG output handles: 2
 Stream1             DEBUG Registering all Tools in ToolHandleArray HelperTools
 Stream1             DEBUG Adding private ToolHandle tool Stream1.Stream1_MakeEventStreamInfo (MakeEventStreamInfo)
+Stream1             DEBUG Adding private ToolHandle tool Stream1.Stream1_MakeEventFormat (xAODMaker::EventFormatStreamHelperTool)
 Stream1             DEBUG Adding private ToolHandle tool Stream1.ThinningCacheTool_Stream1 (Athena::ThinningCacheTool)
 Stream1             DEBUG Adding private ToolHandle tool Stream1.Stream1Tool (AthenaOutputStreamTool)
 Stream1             DEBUG Data Deps for Stream1
@@ -284,11 +294,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 1
@@ -400,6 +412,10 @@ SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLCollectionTree(MagicNumber)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 AthenaPoolCnvSvc    DEBUG setAttribute BRANCH_BASKET_SIZE to 256000 for db: SimplePoolFile3.root and cont: POOLContainer(DataHeader)
 AthenaPoolCnvSvc    DEBUG setAttribute BRANCH_BASKET_SIZE to 1024000 for db: SimplePoolFile3.root and cont: POOLContainerForm(DataHeaderForm)
+MetaDataSvc         DEBUG MetaDataSvc will handle ClassID 167728019
+MetaDataSvc         DEBUG MetaDataSvc will handle ClassID 167728019
+MetaDataSvc         DEBUG MetaDataSvc will handle ClassID 243004407
+MetaDataSvc         DEBUG MetaDataSvc will handle ClassID 243004407
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #1 1 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -465,11 +481,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 2
@@ -540,11 +558,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 3
@@ -615,11 +635,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 4
@@ -690,11 +712,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 5
@@ -765,11 +789,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 6
@@ -840,11 +866,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 7
@@ -915,11 +943,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 8
@@ -990,11 +1020,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 9
@@ -1065,11 +1097,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 10
@@ -1140,11 +1174,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 11
@@ -1215,11 +1251,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 12
@@ -1290,11 +1328,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 13
@@ -1365,11 +1405,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 14
@@ -1440,11 +1482,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 15
@@ -1515,11 +1559,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 16
@@ -1590,11 +1636,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 17
@@ -1665,11 +1713,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 18
@@ -1740,11 +1790,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 19
@@ -1815,11 +1867,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 20
@@ -1827,6 +1881,7 @@ Stream1             DEBUG  Object/count: ExampleTrackContainer_MyTracks, 20
 Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #1 20 events processed so far  <<<===
 MetaDataSvc         DEBUG handle() EndInputFile for FID:????
+MetaDataSvc         DEBUG retireMetadataSource: FID:????
 EventSelector        INFO Disconnecting input sourceID: ????
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
@@ -1836,16 +1891,24 @@ MetaDataSvc         DEBUG MetaDataSvc::stop()
 Stream1             DEBUG slot 0  handle() incident type: MetaDataStop
 MetaDataSvc         DEBUG  calling metaDataStop for ToolSvc.IOVDbMetaDataTool
 MetaDataSvc         DEBUG Locking metadata tools
-Stream1             DEBUG metadataItemList: [EventStreamInfo#Stream1, IOVMetaDataContainer#*]
+Stream1             DEBUG metadataItemList: [EventStreamInfo#Stream1, IOVMetaDataContainer#*, xAOD::EventFormat#EventFormatStream1]
 Stream1             DEBUG addItemObjects(167728019,"Stream1") called
 Stream1             DEBUG            Key:Stream1
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Transforming MetaCont<EventStreamInfo> to EventStreamInfo for output
 Stream1             DEBUG  Added object 167728019,"Stream1"
+Stream1             DEBUG addItemObjects(243004407,"EventFormatStream1") called
+Stream1             DEBUG            Key:EventFormatStream1
+Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
+Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Transforming MetaCont<xAOD::EventFormat> to xAOD::EventFormat for output
+Stream1             DEBUG  Added object 243004407,"EventFormatStream1"
 Stream1             DEBUG addItemObjects(1316383046,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #1316383046
 Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 StorageSvc           INFO Building shape according to reflection information using shape ID for:
 StorageSvc           INFO EventStreamInfo_p3 [????]
@@ -1859,20 +1922,33 @@ SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[6 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:EventStreamInfo_p3
 SimplePoolFile3...  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
+StorageSvc           INFO Building shape according to reflection information using shape ID for:
+StorageSvc           INFO xAOD::EventFormat_v1 [????]
+SimplePoolFile3...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaData(xAOD::EventFormat_v1/EventFormatStream1)
+MetaData(xAOD::...  DEBUG Opening
+MetaData(xAOD::...  DEBUG    attributes# = 1
+MetaData(xAOD::...  DEBUG Branch container 'xAOD::EventFormat_v1_EventFormatStream1'
+MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::EventFormat_v1/EventFormatStream1) of type ROOT_Tree
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (c , ffffffff)
+SimplePoolFile3...  DEBUG ---->ClassID:????
+SimplePoolFile3...  DEBUG --->Adding Shape[7 , ????]:  [1 Column(s)] 
+SimplePoolFile3...  DEBUG ---->Class:xAOD::EventFormat_v1
+SimplePoolFile3...  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
 SimplePoolFile3...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaDataHdr(DataHeader)
 MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (c , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (d , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
 MetaDataHdrForm...  DEBUG    attributes# = 1
 MetaDataHdrForm...  DEBUG Branch container 'DataHeaderForm'
 MetaDataHdrForm...  DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (d , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (e , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
+ClassIDSvc           INFO  getRegistryEntries: read 7 CLIDRegistry entries for module ALL
 Stream1              INFO Metadata records written: 21
 MetaDataSvc         DEBUG Unlocking metadata tools
 Stream1             DEBUG Leaving incident handler for MetaDataStop
@@ -1893,13 +1969,13 @@ ToolSvc              INFO Removing all tools created by ToolSvc
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-cRep_ALL             INFO Time User   : Tot=    0 [us] Ave/Min/Max=       0(+-       0)/       0/       0 [us] #= 62
-cObjR_ALL            INFO Time User   : Tot=    0 [us] Ave/Min/Max=       0(+-       0)/       0/       0 [us] #= 66
 commitOutput         INFO Time User   : Tot=    0 [us] Ave/Min/Max=       0(+-       0)/       0/       0 [us] #= 21
-cObj_ALL             INFO Time User   : Tot=   10 [ms] Ave/Min/Max=   0.159(+-    1.25)/       0/      10 [ms] #= 63
-fRep_ALL             INFO Time User   : Tot=   20 [ms] Ave/Min/Max=   0.323(+-    1.77)/       0/      10 [ms] #= 62
-cRepR_ALL            INFO Time User   : Tot=   20 [ms] Ave/Min/Max=   0.139(+-    1.17)/       0/      10 [ms] #=144
-ChronoStatSvc        INFO Time User   : Tot=  280 [ms]  #=  1
+cObjR_ALL            INFO Time User   : Tot=    0 [us] Ave/Min/Max=       0(+-       0)/       0/       0 [us] #= 66
+cRep_ALL             INFO Time User   : Tot=   10 [ms] Ave/Min/Max=   0.159(+-    1.25)/       0/      10 [ms] #= 63
+cObj_ALL             INFO Time User   : Tot=   20 [ms] Ave/Min/Max=   0.317(+-    1.75)/       0/      10 [ms] #= 63
+cRepR_ALL            INFO Time User   : Tot=   10 [ms] Ave/Min/Max=   0.069(+-   0.828)/       0/      10 [ms] #=145
+fRep_ALL             INFO Time User   : Tot=   20 [ms] Ave/Min/Max=   0.317(+-    1.75)/       0/      10 [ms] #= 63
+ChronoStatSvc        INFO Time User   : Tot=  210 [ms]  #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteAgain.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteAgain.ref
index 4ec01f4e859a..758f74e9a89f 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteAgain.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteAgain.ref
@@ -1,17 +1,17 @@
-Wed Sep 23 17:41:03 CEST 20?0
+Tue Oct  6 16:04:03 CEST 20?0
 Preloading tcmalloc_minimal.so
 Athena               INFO including file "AthenaCommon/Preparation.py"
 Athena               INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Athena               INFO executing ROOT6Setup
 Athena               INFO including file "AthenaCommon/Execution.py"
 Athena               INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ReWriteAgainJobOptions.py"
-Py:ConfigurableDb    INFO Read module info for 5565 configurables from 45 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 4 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Athena               INFO including file "AthenaCommon/runbatch.py"
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
                                                    Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
-                                          running on lxplus750.cern.ch on Wed Sep 23 17:41:10 20?0
+                                          running on 58dd451bc47f on Tue Oct  6 16:04:09 20?0
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 AthDictLoaderSvc     INFO in initialize...
@@ -31,9 +31,10 @@ PoolSvc             DEBUG Property update for OutputLevel : new value = 2
 PoolSvc             DEBUG Service base class initialized successfully
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
-DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/20?0-09-22T2101/Athena/22.0.18/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host lxplus750.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/20?0-10-05T2101/Athena/22.0.19/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 58dd451bc47f [ATLF atlas_dd ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc             DEBUG OutputLevel is 2
 PoolSvc              INFO Setting up APR FileCatalog and Streams
@@ -76,7 +77,9 @@ SimplePoolRepli...  DEBUG --->Reading Shape[8 , ????]: [1 Column(s)]
 SimplePoolRepli...  DEBUG ---->[0]:float Typ:float [10] Size:0 Offset:0 #Elements:1
 SimplePoolRepli...  DEBUG --->Reading Shape[9 , ????]: [1 Column(s)]
 SimplePoolRepli...  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
-##Shapes            DEBUG No objects passing selection criteria... Container has 10 Entries in total.
+SimplePoolRepli...  DEBUG --->Reading Shape[10 , ????]: [1 Column(s)]
+SimplePoolRepli...  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
+##Shapes            DEBUG No objects passing selection criteria... Container has 11 Entries in total.
 SimplePoolRepli...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opening
 ##Links             DEBUG    attributes# = 1
@@ -119,11 +122,13 @@ SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventWeight)
 SimplePoolRepli...  DEBUG ---->ClassID:????
 SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (14 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (15 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (15 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (16 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (16 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-##Links             DEBUG No objects passing selection criteria... Container has 21 Entries in total.
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (17 , ffffffff)
+SimplePoolRepli...  DEBUG ---->ClassID:????
+##Links             DEBUG No objects passing selection criteria... Container has 22 Entries in total.
 SimplePoolRepli...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
 ##Params            DEBUG Opening
 ##Params            DEBUG    attributes# = 1
@@ -185,16 +190,21 @@ Stream1.Stream1...  DEBUG Property update for OutputLevel : new value = 2
 Stream1.Stream1...   INFO Initializing Stream1.Stream1Tool - package version AthenaServices-00-00-00
 Stream1.Stream1...  DEBUG Property update for OutputLevel : new value = 2
 Stream1.Stream1...   INFO Initializing Stream1.Stream1_MakeEventStreamInfo - package version OutputStreamAthenaPool-00-00-00
+Stream1.Stream1...  DEBUG Property update for OutputLevel : new value = 2
 Stream1.Thinnin...  DEBUG Property update for OutputLevel : new value = 2
-Stream1              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream1_MakeEventStreamInfo','Athena::ThinningCacheTool/ThinningCacheTool_Stream1'])
+Stream1              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream1_MakeEventStreamInfo','xAODMaker::EventFormatStreamHelperTool/Stream1_MakeEventFormat','Athena::ThinningCacheTool/ThinningCacheTool_Stream1'])
 Stream1              INFO Data output: SimplePoolFile3.root
+ClassIDSvc           INFO  getRegistryEntries: read 171 CLIDRegistry entries for module ALL
+MetaDataSvc         DEBUG MetaDataSvc will handle ClassID 167728019
 Stream1              INFO I/O reinitialization...
+MetaDataSvc         DEBUG MetaDataSvc will handle ClassID 167728019
 Stream1.Stream1...  DEBUG Property update for OutputLevel : new value = 2
 Stream1             DEBUG End initialize
 Stream1             DEBUG input handles: 0
 Stream1             DEBUG output handles: 2
 Stream1             DEBUG Registering all Tools in ToolHandleArray HelperTools
 Stream1             DEBUG Adding private ToolHandle tool Stream1.Stream1_MakeEventStreamInfo (MakeEventStreamInfo)
+Stream1             DEBUG Adding private ToolHandle tool Stream1.Stream1_MakeEventFormat (xAODMaker::EventFormatStreamHelperTool)
 Stream1             DEBUG Adding private ToolHandle tool Stream1.ThinningCacheTool_Stream1 (Athena::ThinningCacheTool)
 Stream1             DEBUG Adding private ToolHandle tool Stream1.Stream1Tool (AthenaOutputStreamTool)
 Stream1             DEBUG Data Deps for Stream1
@@ -308,11 +318,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 1
@@ -423,6 +435,10 @@ SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLCollectionTree(MagicNumber)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 AthenaPoolCnvSvc    DEBUG setAttribute BRANCH_BASKET_SIZE to 256000 for db: SimplePoolFile3.root and cont: POOLContainer(DataHeader)
 AthenaPoolCnvSvc    DEBUG setAttribute BRANCH_BASKET_SIZE to 1024000 for db: SimplePoolFile3.root and cont: POOLContainerForm(DataHeaderForm)
+MetaDataSvc         DEBUG MetaDataSvc will handle ClassID 167728019
+MetaDataSvc         DEBUG MetaDataSvc will handle ClassID 167728019
+MetaDataSvc         DEBUG MetaDataSvc will handle ClassID 243004407
+MetaDataSvc         DEBUG MetaDataSvc will handle ClassID 243004407
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #1 1 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
@@ -488,11 +504,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 2
@@ -563,11 +581,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 3
@@ -638,11 +658,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 4
@@ -713,11 +735,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 5
@@ -788,11 +812,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 6
@@ -863,11 +889,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 7
@@ -938,11 +966,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 8
@@ -1013,11 +1043,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 9
@@ -1088,11 +1120,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 10
@@ -1163,11 +1197,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 11
@@ -1238,11 +1274,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 12
@@ -1313,11 +1351,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 13
@@ -1388,11 +1428,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 14
@@ -1463,11 +1505,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 15
@@ -1538,11 +1582,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 16
@@ -1613,11 +1659,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 17
@@ -1688,11 +1736,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 18
@@ -1763,11 +1813,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 19
@@ -1838,11 +1890,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 20
@@ -1850,6 +1904,7 @@ Stream1             DEBUG  Object/count: ExampleTrackContainer_MyTracks, 20
 Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #1 20 events processed so far  <<<===
 MetaDataSvc         DEBUG handle() EndInputFile for FID:????
+MetaDataSvc         DEBUG retireMetadataSource: FID:????
 EventSelector        INFO Disconnecting input sourceID: ????
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
@@ -1859,16 +1914,24 @@ MetaDataSvc         DEBUG MetaDataSvc::stop()
 Stream1             DEBUG slot 0  handle() incident type: MetaDataStop
 MetaDataSvc         DEBUG  calling metaDataStop for ToolSvc.IOVDbMetaDataTool
 MetaDataSvc         DEBUG Locking metadata tools
-Stream1             DEBUG metadataItemList: [EventStreamInfo#Stream1, IOVMetaDataContainer#*]
+Stream1             DEBUG metadataItemList: [EventStreamInfo#Stream1, IOVMetaDataContainer#*, xAOD::EventFormat#EventFormatStream1]
 Stream1             DEBUG addItemObjects(167728019,"Stream1") called
 Stream1             DEBUG            Key:Stream1
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Transforming MetaCont<EventStreamInfo> to EventStreamInfo for output
 Stream1             DEBUG  Added object 167728019,"Stream1"
+Stream1             DEBUG addItemObjects(243004407,"EventFormatStream1") called
+Stream1             DEBUG            Key:EventFormatStream1
+Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
+Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Transforming MetaCont<xAOD::EventFormat> to xAOD::EventFormat for output
+Stream1             DEBUG  Added object 243004407,"EventFormatStream1"
 Stream1             DEBUG addItemObjects(1316383046,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #1316383046
 Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 StorageSvc           INFO Building shape according to reflection information using shape ID for:
 StorageSvc           INFO EventStreamInfo_p3 [????]
@@ -1882,20 +1945,33 @@ SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[6 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:EventStreamInfo_p3
 SimplePoolFile3...  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
+StorageSvc           INFO Building shape according to reflection information using shape ID for:
+StorageSvc           INFO xAOD::EventFormat_v1 [????]
+SimplePoolFile3...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaData(xAOD::EventFormat_v1/EventFormatStream1)
+MetaData(xAOD::...  DEBUG Opening
+MetaData(xAOD::...  DEBUG    attributes# = 1
+MetaData(xAOD::...  DEBUG Branch container 'xAOD::EventFormat_v1_EventFormatStream1'
+MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::EventFormat_v1/EventFormatStream1) of type ROOT_Tree
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (c , ffffffff)
+SimplePoolFile3...  DEBUG ---->ClassID:????
+SimplePoolFile3...  DEBUG --->Adding Shape[7 , ????]:  [1 Column(s)] 
+SimplePoolFile3...  DEBUG ---->Class:xAOD::EventFormat_v1
+SimplePoolFile3...  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
 SimplePoolFile3...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaDataHdr(DataHeader)
 MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (c , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (d , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
 MetaDataHdrForm...  DEBUG    attributes# = 1
 MetaDataHdrForm...  DEBUG Branch container 'DataHeaderForm'
 MetaDataHdrForm...  DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (d , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (e , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
+ClassIDSvc           INFO  getRegistryEntries: read 7 CLIDRegistry entries for module ALL
 Stream1              INFO Metadata records written: 21
 MetaDataSvc         DEBUG Unlocking metadata tools
 Stream1             DEBUG Leaving incident handler for MetaDataStop
@@ -1916,13 +1992,13 @@ ToolSvc              INFO Removing all tools created by ToolSvc
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-cRep_ALL             INFO Time User   : Tot=    0 [us] Ave/Min/Max=       0(+-       0)/       0/       0 [us] #= 62
-cObjR_ALL            INFO Time User   : Tot=    0 [us] Ave/Min/Max=       0(+-       0)/       0/       0 [us] #= 65
 commitOutput         INFO Time User   : Tot=    0 [us] Ave/Min/Max=       0(+-       0)/       0/       0 [us] #= 21
+cRep_ALL             INFO Time User   : Tot=    0 [us] Ave/Min/Max=       0(+-       0)/       0/       0 [us] #= 63
 cObj_ALL             INFO Time User   : Tot=   10 [ms] Ave/Min/Max=   0.159(+-    1.25)/       0/      10 [ms] #= 63
-cRepR_ALL            INFO Time User   : Tot=   10 [ms] Ave/Min/Max=  0.0694(+-    0.83)/       0/      10 [ms] #=144
-fRep_ALL             INFO Time User   : Tot=   20 [ms] Ave/Min/Max=   0.323(+-    1.77)/       0/      10 [ms] #= 62
-ChronoStatSvc        INFO Time User   : Tot=  260 [ms]  #=  1
+cObjR_ALL            INFO Time User   : Tot=   10 [ms] Ave/Min/Max=   0.154(+-    1.23)/       0/      10 [ms] #= 65
+cRepR_ALL            INFO Time User   : Tot=    0 [us] Ave/Min/Max=       0(+-       0)/       0/       0 [us] #=145
+fRep_ALL             INFO Time User   : Tot=   20 [ms] Ave/Min/Max=   0.317(+-    1.75)/       0/      10 [ms] #= 63
+ChronoStatSvc        INFO Time User   : Tot=  180 [ms]  #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteNext.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteNext.ref
index 51941979e8ec..39239bb3182a 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteNext.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteNext.ref
@@ -1,17 +1,17 @@
-Wed Sep 23 16:50:48 CEST 20?0
+Tue Oct  6 16:04:10 CEST 20?0
 Preloading tcmalloc_minimal.so
 Athena               INFO including file "AthenaCommon/Preparation.py"
 Athena               INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Athena               INFO executing ROOT6Setup
 Athena               INFO including file "AthenaCommon/Execution.py"
 Athena               INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ReWriteNextJobOptions.py"
-Py:ConfigurableDb    INFO Read module info for 5565 configurables from 45 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 4 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Athena               INFO including file "AthenaCommon/runbatch.py"
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
                                                    Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
-                                          running on lxplus750.cern.ch on Wed Sep 23 16:50:56 20?0
+                                          running on 58dd451bc47f on Tue Oct  6 16:04:15 20?0
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 AthDictLoaderSvc     INFO in initialize...
@@ -31,9 +31,10 @@ PoolSvc             DEBUG Property update for OutputLevel : new value = 2
 PoolSvc             DEBUG Service base class initialized successfully
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
-DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/20?0-09-22T2101/Athena/22.0.18/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host lxplus750.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/20?0-10-05T2101/Athena/22.0.19/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 58dd451bc47f [ATLF atlas_dd ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc             DEBUG OutputLevel is 2
 PoolSvc              INFO Setting up APR FileCatalog and Streams
@@ -70,7 +71,9 @@ SimplePoolFile3...  DEBUG --->Reading Shape[5 , ????]: [1 Column(s)]
 SimplePoolFile3...  DEBUG ---->[0]:unsigned int Typ:unsigned int [3] Size:0 Offset:0 #Elements:1
 SimplePoolFile3...  DEBUG --->Reading Shape[6 , ????]: [1 Column(s)]
 SimplePoolFile3...  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
-##Shapes            DEBUG No objects passing selection criteria... Container has 7 Entries in total.
+SimplePoolFile3...  DEBUG --->Reading Shape[7 , ????]: [1 Column(s)]
+SimplePoolFile3...  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
+##Shapes            DEBUG No objects passing selection criteria... Container has 8 Entries in total.
 SimplePoolFile3...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opening
 ##Links             DEBUG    attributes# = 1
@@ -95,11 +98,13 @@ SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLCollectionTree(MagicNumber)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (b , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (c , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (c , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (d , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (d , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-##Links             DEBUG No objects passing selection criteria... Container has 12 Entries in total.
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (e , ffffffff)
+SimplePoolFile3...  DEBUG ---->ClassID:????
+##Links             DEBUG No objects passing selection criteria... Container has 13 Entries in total.
 SimplePoolFile3...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
 ##Params            DEBUG Opening
 ##Params            DEBUG    attributes# = 1
@@ -161,16 +166,21 @@ Stream1.Stream1...  DEBUG Property update for OutputLevel : new value = 2
 Stream1.Stream1...   INFO Initializing Stream1.Stream1Tool - package version AthenaServices-00-00-00
 Stream1.Stream1...  DEBUG Property update for OutputLevel : new value = 2
 Stream1.Stream1...   INFO Initializing Stream1.Stream1_MakeEventStreamInfo - package version OutputStreamAthenaPool-00-00-00
+Stream1.Stream1...  DEBUG Property update for OutputLevel : new value = 2
 Stream1.Thinnin...  DEBUG Property update for OutputLevel : new value = 2
-Stream1              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream1_MakeEventStreamInfo','Athena::ThinningCacheTool/ThinningCacheTool_Stream1'])
+Stream1              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream1_MakeEventStreamInfo','xAODMaker::EventFormatStreamHelperTool/Stream1_MakeEventFormat','Athena::ThinningCacheTool/ThinningCacheTool_Stream1'])
 Stream1              INFO Data output: SimplePoolFile4.root
+ClassIDSvc           INFO  getRegistryEntries: read 171 CLIDRegistry entries for module ALL
+MetaDataSvc         DEBUG MetaDataSvc will handle ClassID 167728019
 Stream1              INFO I/O reinitialization...
+MetaDataSvc         DEBUG MetaDataSvc will handle ClassID 167728019
 Stream1.Stream1...  DEBUG Property update for OutputLevel : new value = 2
 Stream1             DEBUG End initialize
 Stream1             DEBUG input handles: 0
 Stream1             DEBUG output handles: 2
 Stream1             DEBUG Registering all Tools in ToolHandleArray HelperTools
 Stream1             DEBUG Adding private ToolHandle tool Stream1.Stream1_MakeEventStreamInfo (MakeEventStreamInfo)
+Stream1             DEBUG Adding private ToolHandle tool Stream1.Stream1_MakeEventFormat (xAODMaker::EventFormatStreamHelperTool)
 Stream1             DEBUG Adding private ToolHandle tool Stream1.ThinningCacheTool_Stream1 (Athena::ThinningCacheTool)
 Stream1             DEBUG Adding private ToolHandle tool Stream1.Stream1Tool (AthenaOutputStreamTool)
 Stream1             DEBUG Data Deps for Stream1
@@ -252,11 +262,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 1
@@ -366,6 +378,10 @@ SimplePoolFile4...  DEBUG --->Adding Assoc :????/POOLCollectionTree(MagicNumber)
 SimplePoolFile4...  DEBUG ---->ClassID:????
 AthenaPoolCnvSvc    DEBUG setAttribute BRANCH_BASKET_SIZE to 256000 for db: SimplePoolFile4.root and cont: POOLContainer(DataHeader)
 AthenaPoolCnvSvc    DEBUG setAttribute BRANCH_BASKET_SIZE to 1024000 for db: SimplePoolFile4.root and cont: POOLContainerForm(DataHeaderForm)
+MetaDataSvc         DEBUG MetaDataSvc will handle ClassID 167728019
+MetaDataSvc         DEBUG MetaDataSvc will handle ClassID 167728019
+MetaDataSvc         DEBUG MetaDataSvc will handle ClassID 243004407
+MetaDataSvc         DEBUG MetaDataSvc will handle ClassID 243004407
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #1 1 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -399,11 +415,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 2
@@ -442,11 +460,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 3
@@ -485,11 +505,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 4
@@ -528,11 +550,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 5
@@ -571,11 +595,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 6
@@ -614,11 +640,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 7
@@ -657,11 +685,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 8
@@ -700,11 +730,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 9
@@ -743,11 +775,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 10
@@ -786,11 +820,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 11
@@ -829,11 +865,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 12
@@ -872,11 +910,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 13
@@ -915,11 +955,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 14
@@ -958,11 +1000,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 15
@@ -1001,11 +1045,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 16
@@ -1044,11 +1090,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 17
@@ -1087,11 +1135,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 18
@@ -1130,11 +1180,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 19
@@ -1173,11 +1225,13 @@ Stream1             DEBUG addItemObjects(2101,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #2101
 Stream1             DEBUG  Added object 2101,"McEventInfo"
 Stream1             DEBUG addItemObjects(9103,"MyTracks") called
 Stream1             DEBUG            Key:MyTracks
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #9103
 Stream1             DEBUG  Added object 9103,"MyTracks"
 Stream1             DEBUG  Collected objects:
 Stream1             DEBUG  Object/count: EventInfo_McEventInfo, 20
@@ -1185,6 +1239,7 @@ Stream1             DEBUG  Object/count: ExampleTrackContainer_MyTracks, 20
 Stream1             DEBUG connectOutput done for SimplePoolFile4.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #1 20 events processed so far  <<<===
 MetaDataSvc         DEBUG handle() EndInputFile for FID:????
+MetaDataSvc         DEBUG retireMetadataSource: FID:????
 EventSelector        INFO Disconnecting input sourceID: ????
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
@@ -1194,16 +1249,24 @@ MetaDataSvc         DEBUG MetaDataSvc::stop()
 Stream1             DEBUG slot 0  handle() incident type: MetaDataStop
 MetaDataSvc         DEBUG  calling metaDataStop for ToolSvc.IOVDbMetaDataTool
 MetaDataSvc         DEBUG Locking metadata tools
-Stream1             DEBUG metadataItemList: [EventStreamInfo#Stream1, IOVMetaDataContainer#*]
+Stream1             DEBUG metadataItemList: [EventStreamInfo#Stream1, IOVMetaDataContainer#*, xAOD::EventFormat#EventFormatStream1]
 Stream1             DEBUG addItemObjects(167728019,"Stream1") called
 Stream1             DEBUG            Key:Stream1
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Transforming MetaCont<EventStreamInfo> to EventStreamInfo for output
 Stream1             DEBUG  Added object 167728019,"Stream1"
+Stream1             DEBUG addItemObjects(243004407,"EventFormatStream1") called
+Stream1             DEBUG            Key:EventFormatStream1
+Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
+Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Transforming MetaCont<xAOD::EventFormat> to xAOD::EventFormat for output
+Stream1             DEBUG  Added object 243004407,"EventFormatStream1"
 Stream1             DEBUG addItemObjects(1316383046,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #1316383046
 Stream1             DEBUG connectOutput done for SimplePoolFile4.root
 StorageSvc           INFO Building shape according to reflection information using shape ID for:
 StorageSvc           INFO EventStreamInfo_p3 [????]
@@ -1217,20 +1280,33 @@ SimplePoolFile4...  DEBUG ---->ClassID:????
 SimplePoolFile4...  DEBUG --->Adding Shape[6 , ????]:  [1 Column(s)] 
 SimplePoolFile4...  DEBUG ---->Class:EventStreamInfo_p3
 SimplePoolFile4...  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
+StorageSvc           INFO Building shape according to reflection information using shape ID for:
+StorageSvc           INFO xAOD::EventFormat_v1 [????]
+SimplePoolFile4...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaData(xAOD::EventFormat_v1/EventFormatStream1)
+MetaData(xAOD::...  DEBUG Opening
+MetaData(xAOD::...  DEBUG    attributes# = 1
+MetaData(xAOD::...  DEBUG Branch container 'xAOD::EventFormat_v1_EventFormatStream1'
+MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::EventFormat_v1/EventFormatStream1) of type ROOT_Tree
+SimplePoolFile4...  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (c , ffffffff)
+SimplePoolFile4...  DEBUG ---->ClassID:????
+SimplePoolFile4...  DEBUG --->Adding Shape[7 , ????]:  [1 Column(s)] 
+SimplePoolFile4...  DEBUG ---->Class:xAOD::EventFormat_v1
+SimplePoolFile4...  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
 SimplePoolFile4...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaDataHdr(DataHeader)
 MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
-SimplePoolFile4...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (c , ffffffff)
+SimplePoolFile4...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (d , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
 SimplePoolFile4...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
 MetaDataHdrForm...  DEBUG    attributes# = 1
 MetaDataHdrForm...  DEBUG Branch container 'DataHeaderForm'
 MetaDataHdrForm...  DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree
-SimplePoolFile4...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (d , ffffffff)
+SimplePoolFile4...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (e , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
+ClassIDSvc           INFO  getRegistryEntries: read 7 CLIDRegistry entries for module ALL
 Stream1              INFO Metadata records written: 21
 MetaDataSvc         DEBUG Unlocking metadata tools
 Stream1             DEBUG Leaving incident handler for MetaDataStop
@@ -1252,12 +1328,12 @@ ToolSvc              INFO Removing all tools created by ToolSvc
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
 commitOutput         INFO Time User   : Tot=    0 [us] Ave/Min/Max=       0(+-       0)/       0/       0 [us] #= 21
-cRep_ALL             INFO Time User   : Tot=    0 [us] Ave/Min/Max=       0(+-       0)/       0/       0 [us] #= 62
-fRep_ALL             INFO Time User   : Tot=   10 [ms] Ave/Min/Max=   0.161(+-    1.26)/       0/      10 [ms] #= 62
-cObjR_ALL            INFO Time User   : Tot=   10 [ms] Ave/Min/Max=   0.154(+-    1.23)/       0/      10 [ms] #= 65
-cRepR_ALL            INFO Time User   : Tot=   10 [ms] Ave/Min/Max=  0.0694(+-    0.83)/       0/      10 [ms] #=144
-cObj_ALL             INFO Time User   : Tot=   10 [ms] Ave/Min/Max=   0.159(+-    1.25)/       0/      10 [ms] #= 63
-ChronoStatSvc        INFO Time User   : Tot=  270 [ms]  #=  1
+cRep_ALL             INFO Time User   : Tot=    0 [us] Ave/Min/Max=       0(+-       0)/       0/       0 [us] #= 63
+fRep_ALL             INFO Time User   : Tot=   10 [ms] Ave/Min/Max=   0.159(+-    1.25)/       0/      10 [ms] #= 63
+cObjR_ALL            INFO Time User   : Tot=    0 [us] Ave/Min/Max=       0(+-       0)/       0/       0 [us] #= 65
+cRepR_ALL            INFO Time User   : Tot=   10 [ms] Ave/Min/Max=   0.069(+-   0.828)/       0/      10 [ms] #=145
+cObj_ALL             INFO Time User   : Tot=    0 [us] Ave/Min/Max=       0(+-       0)/       0/       0 [us] #= 63
+ChronoStatSvc        INFO Time User   : Tot=  170 [ms]  #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Read.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Read.ref
index d55e8196116a..4e5d1aa79c5e 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Read.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Read.ref
@@ -1,41 +1,37 @@
-Sat Nov  2 01:39:50 CET 2019
+Tue Oct  6 16:03:50 CEST 20?0
 Preloading tcmalloc_minimal.so
 Athena               INFO including file "AthenaCommon/Preparation.py"
 Athena               INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Athena               INFO executing ROOT6Setup
 Athena               INFO including file "AthenaCommon/Execution.py"
 Athena               INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ReadJobOptions.py"
-Py:ConfigurableDb    INFO Read module info for 5598 configurables from 9 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 4 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 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
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r2)
-                                          running on aibuild028.cern.ch on Sat Nov  2 01:40:00 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on 58dd451bc47f on Tue Oct  6 16:03:55 20?0
 ====================================================================================================================================
 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 3286 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3308 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 846 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 861 CLIDRegistry entries for module ALL
 ReadData            DEBUG Property update for OutputLevel : new value = 2
 ReadData             INFO in initialize()
 MetaDataSvc         DEBUG Property update for OutputLevel : new value = 2
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 MetaDataSvc         DEBUG Service base class initialized successfully
-AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 PoolSvc             DEBUG Property update for OutputLevel : new value = 2
 PoolSvc             DEBUG Service base class initialized successfully
 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-10-31T2131/Athena/22.0.7/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/20?0-10-05T2101/Athena/22.0.19/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 58dd451bc47f [ATLF atlas_dd ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc             DEBUG OutputLevel is 2
 PoolSvc              INFO Setting up APR FileCatalog and Streams
@@ -60,10 +56,12 @@ EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Shape
 EmptyPoolFile.root  DEBUG --->Reading Shape[0 , ????]: [1 Column(s)]
 EmptyPoolFile.root  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
 EmptyPoolFile.root  DEBUG --->Reading Shape[1 , ????]: [1 Column(s)]
-EmptyPoolFile.root  DEBUG ---->[0]:DataHeader_p6 Typ:DataHeader_p6 [21] Size:0 Offset:0 #Elements:1
+EmptyPoolFile.root  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
 EmptyPoolFile.root  DEBUG --->Reading Shape[2 , ????]: [1 Column(s)]
+EmptyPoolFile.root  DEBUG ---->[0]:DataHeader_p6 Typ:DataHeader_p6 [21] Size:0 Offset:0 #Elements:1
+EmptyPoolFile.root  DEBUG --->Reading Shape[3 , ????]: [1 Column(s)]
 EmptyPoolFile.root  DEBUG ---->[0]:DataHeaderForm_p6 Typ:DataHeaderForm_p6 [21] Size:0 Offset:0 #Elements:1
-##Shapes            DEBUG No objects passing selection criteria... Container has 3 Entries in total.
+##Shapes            DEBUG No objects passing selection criteria... Container has 4 Entries in total.
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opening
 ##Links             DEBUG    attributes# = 1
@@ -72,11 +70,13 @@ EmptyPoolFile.root  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
 EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream3) [20?]  (3 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (4 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [20?]  (4 , ffffffff)
+EmptyPoolFile.root  DEBUG ---->ClassID:????
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (5 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (5 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (6 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-##Links             DEBUG No objects passing selection criteria... Container has 4 Entries in total.
+##Links             DEBUG No objects passing selection criteria... Container has 5 Entries in total.
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
 ##Params            DEBUG Opening
 ##Params            DEBUG    attributes# = 1
@@ -116,7 +116,9 @@ SimplePoolFile1...  DEBUG --->Reading Shape[5 , ????]: [1 Column(s)]
 SimplePoolFile1...  DEBUG ---->[0]:unsigned int Typ:unsigned int [3] Size:0 Offset:0 #Elements:1
 SimplePoolFile1...  DEBUG --->Reading Shape[6 , ????]: [1 Column(s)]
 SimplePoolFile1...  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
-##Shapes            DEBUG No objects passing selection criteria... Container has 7 Entries in total.
+SimplePoolFile1...  DEBUG --->Reading Shape[7 , ????]: [1 Column(s)]
+SimplePoolFile1...  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
+##Shapes            DEBUG No objects passing selection criteria... Container has 8 Entries in total.
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opening
 ##Links             DEBUG    attributes# = 1
@@ -141,11 +143,13 @@ SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(MagicNumber)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (b , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (c , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (c , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (d , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (d , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-##Links             DEBUG No objects passing selection criteria... Container has 12 Entries in total.
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (e , ffffffff)
+SimplePoolFile1...  DEBUG ---->ClassID:????
+##Links             DEBUG No objects passing selection criteria... Container has 13 Entries in total.
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
 ##Params            DEBUG Opening
 ##Params            DEBUG    attributes# = 1
@@ -160,7 +164,7 @@ MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
-ClassIDSvc           INFO  getRegistryEntries: read 2053 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1666 CLIDRegistry entries for module ALL
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
@@ -169,6 +173,7 @@ MetaDataHdrForm...  DEBUG Branch container 'DataHeaderForm'
 MetaDataHdrForm...  DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree
 MetaDataSvc         DEBUG Loaded input meta data store proxies
 ClassIDSvc           INFO  getRegistryEntries: read 2 CLIDRegistry entries for module ALL
+OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 AthenaPoolAddre...  DEBUG Property update for OutputLevel : new value = 2
 AthenaPoolAddre...  DEBUG Service base class initialized successfully
 ReadData            DEBUG input handles: 2
@@ -176,7 +181,6 @@ ReadData            DEBUG output handles: 0
 ReadData            DEBUG Data Deps for ReadData
   + INPUT   ( 'ExampleHitContainer' , 'StoreGateSvc+MyHits' ) 
   + INPUT   ( 'ExampleTrackContainer' , 'StoreGateSvc+MyTracks' ) 
-HistogramPersis...WARNING Histograms saving not required.
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
 EventSelector       DEBUG Try item: "EmptyPoolFile.root" from the collection list.
@@ -190,10 +194,12 @@ EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Shape
 EmptyPoolFile.root  DEBUG --->Reading Shape[0 , ????]: [1 Column(s)]
 EmptyPoolFile.root  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
 EmptyPoolFile.root  DEBUG --->Reading Shape[1 , ????]: [1 Column(s)]
-EmptyPoolFile.root  DEBUG ---->[0]:DataHeader_p6 Typ:DataHeader_p6 [21] Size:0 Offset:0 #Elements:1
+EmptyPoolFile.root  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
 EmptyPoolFile.root  DEBUG --->Reading Shape[2 , ????]: [1 Column(s)]
+EmptyPoolFile.root  DEBUG ---->[0]:DataHeader_p6 Typ:DataHeader_p6 [21] Size:0 Offset:0 #Elements:1
+EmptyPoolFile.root  DEBUG --->Reading Shape[3 , ????]: [1 Column(s)]
 EmptyPoolFile.root  DEBUG ---->[0]:DataHeaderForm_p6 Typ:DataHeaderForm_p6 [21] Size:0 Offset:0 #Elements:1
-##Shapes            DEBUG No objects passing selection criteria... Container has 3 Entries in total.
+##Shapes            DEBUG No objects passing selection criteria... Container has 4 Entries in total.
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opening
 ##Links             DEBUG    attributes# = 1
@@ -202,11 +208,13 @@ EmptyPoolFile.root  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
 EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream3) [20?]  (3 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (4 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [20?]  (4 , ffffffff)
+EmptyPoolFile.root  DEBUG ---->ClassID:????
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (5 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (5 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (6 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-##Links             DEBUG No objects passing selection criteria... Container has 4 Entries in total.
+##Links             DEBUG No objects passing selection criteria... Container has 5 Entries in total.
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
 ##Params            DEBUG Opening
 ##Params            DEBUG    attributes# = 1
@@ -234,6 +242,7 @@ MetaDataHdrForm...  DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of ty
 MetaDataSvc         DEBUG Loaded input meta data store proxies
 MetaDataSvc         DEBUG  calling beginInputFile for ToolSvc.IOVDbMetaDataTool
 MetaDataSvc         DEBUG handle() EndInputFile for eventless EmptyPoolFile.root
+MetaDataSvc         DEBUG retireMetadataSource: eventless EmptyPoolFile.root
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
 EventSelector       DEBUG Try item: "SimplePoolFile1.root" from the collection list.
 ApplicationMgr       INFO Application Manager Started successfully
@@ -320,14 +329,14 @@ ReadData             INFO Hit x = 1020.49 y = 63.5816 z = -951.864 detector = Du
 ReadData             INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 25378
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 26833
 PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 1 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
 EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
 EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
-ClassIDSvc           INFO  getRegistryEntries: read 27 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 21 CLIDRegistry entries for module ALL
 EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
@@ -354,7 +363,7 @@ ReadData             INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du
 ReadData             INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 25378
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 26833
 PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 2 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -387,7 +396,7 @@ ReadData             INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du
 ReadData             INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 25378
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 26833
 PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 3 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -420,7 +429,7 @@ ReadData             INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du
 ReadData             INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 25378
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 26833
 PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 4 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -453,7 +462,7 @@ ReadData             INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du
 ReadData             INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 25378
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 26833
 PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 5 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -486,7 +495,7 @@ ReadData             INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du
 ReadData             INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 25378
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 26833
 PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 6 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -519,7 +528,7 @@ ReadData             INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du
 ReadData             INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 25378
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 26833
 PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 7 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -552,7 +561,7 @@ ReadData             INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du
 ReadData             INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 25378
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 26833
 PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 8 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -585,7 +594,7 @@ ReadData             INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du
 ReadData             INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 25378
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 26833
 PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 9 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -618,10 +627,11 @@ ReadData             INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du
 ReadData             INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 25378
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 26833
 PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #1 10 events processed so far  <<<===
 MetaDataSvc         DEBUG handle() EndInputFile for FID:????
+MetaDataSvc         DEBUG retireMetadataSource: FID:????
 EventSelector        INFO Disconnecting input sourceID: ????
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
@@ -638,10 +648,12 @@ EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Shape
 EmptyPoolFile.root  DEBUG --->Reading Shape[0 , ????]: [1 Column(s)]
 EmptyPoolFile.root  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
 EmptyPoolFile.root  DEBUG --->Reading Shape[1 , ????]: [1 Column(s)]
-EmptyPoolFile.root  DEBUG ---->[0]:DataHeader_p6 Typ:DataHeader_p6 [21] Size:0 Offset:0 #Elements:1
+EmptyPoolFile.root  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
 EmptyPoolFile.root  DEBUG --->Reading Shape[2 , ????]: [1 Column(s)]
+EmptyPoolFile.root  DEBUG ---->[0]:DataHeader_p6 Typ:DataHeader_p6 [21] Size:0 Offset:0 #Elements:1
+EmptyPoolFile.root  DEBUG --->Reading Shape[3 , ????]: [1 Column(s)]
 EmptyPoolFile.root  DEBUG ---->[0]:DataHeaderForm_p6 Typ:DataHeaderForm_p6 [21] Size:0 Offset:0 #Elements:1
-##Shapes            DEBUG No objects passing selection criteria... Container has 3 Entries in total.
+##Shapes            DEBUG No objects passing selection criteria... Container has 4 Entries in total.
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opening
 ##Links             DEBUG    attributes# = 1
@@ -650,11 +662,13 @@ EmptyPoolFile.root  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
 EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream3) [20?]  (3 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (4 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [20?]  (4 , ffffffff)
+EmptyPoolFile.root  DEBUG ---->ClassID:????
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (5 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (5 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (6 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-##Links             DEBUG No objects passing selection criteria... Container has 4 Entries in total.
+##Links             DEBUG No objects passing selection criteria... Container has 5 Entries in total.
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
 ##Params            DEBUG Opening
 ##Params            DEBUG    attributes# = 1
@@ -677,6 +691,7 @@ MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_
 MetaDataSvc         DEBUG Loaded input meta data store proxies
 MetaDataSvc         DEBUG  calling beginInputFile for ToolSvc.IOVDbMetaDataTool
 MetaDataSvc         DEBUG handle() EndInputFile for eventless EmptyPoolFile.root
+MetaDataSvc         DEBUG retireMetadataSource: eventless EmptyPoolFile.root
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
 EventSelector       DEBUG Try item: "SimplePoolFile2.root" from the collection list.
@@ -701,7 +716,9 @@ SimplePoolFile2...  DEBUG --->Reading Shape[4 , ????]: [1 Column(s)]
 SimplePoolFile2...  DEBUG ---->[0]:unsigned int Typ:unsigned int [3] Size:0 Offset:0 #Elements:1
 SimplePoolFile2...  DEBUG --->Reading Shape[5 , ????]: [1 Column(s)]
 SimplePoolFile2...  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
-##Shapes            DEBUG No objects passing selection criteria... Container has 6 Entries in total.
+SimplePoolFile2...  DEBUG --->Reading Shape[6 , ????]: [1 Column(s)]
+SimplePoolFile2...  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
+##Shapes            DEBUG No objects passing selection criteria... Container has 7 Entries in total.
 SimplePoolFile2...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opening
 ##Links             DEBUG    attributes# = 1
@@ -724,11 +741,13 @@ SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLCollectionTree(MagicNumber)
 SimplePoolFile2...  DEBUG ---->ClassID:????
 SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream2) [20?]  (a , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (b , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream2) [20?]  (b , ffffffff)
+SimplePoolFile2...  DEBUG ---->ClassID:????
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (c , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (c , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (d , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-##Links             DEBUG No objects passing selection criteria... Container has 11 Entries in total.
+##Links             DEBUG No objects passing selection criteria... Container has 12 Entries in total.
 SimplePoolFile2...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
 ##Params            DEBUG Opening
 ##Params            DEBUG    attributes# = 1
@@ -802,7 +821,7 @@ ReadData             INFO EventInfo event: 0 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #1 11 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -824,7 +843,7 @@ ReadData             INFO EventInfo event: 1 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 12 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -846,7 +865,7 @@ ReadData             INFO EventInfo event: 2 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 13 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -868,7 +887,7 @@ ReadData             INFO EventInfo event: 3 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 14 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -890,7 +909,7 @@ ReadData             INFO EventInfo event: 4 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #1 15 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -912,7 +931,7 @@ ReadData             INFO EventInfo event: 5 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #1 16 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -934,7 +953,7 @@ ReadData             INFO EventInfo event: 6 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #1 17 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -956,7 +975,7 @@ ReadData             INFO EventInfo event: 7 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #1 18 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -978,7 +997,7 @@ ReadData             INFO EventInfo event: 8 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #1 19 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1000,7 +1019,7 @@ ReadData             INFO EventInfo event: 9 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #1 20 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1022,7 +1041,7 @@ ReadData             INFO EventInfo event: 10 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 21 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1044,7 +1063,7 @@ ReadData             INFO EventInfo event: 11 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 22 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1066,7 +1085,7 @@ ReadData             INFO EventInfo event: 12 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 23 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1088,7 +1107,7 @@ ReadData             INFO EventInfo event: 13 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 24 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1110,7 +1129,7 @@ ReadData             INFO EventInfo event: 14 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 25 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1132,7 +1151,7 @@ ReadData             INFO EventInfo event: 15 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 26 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1154,7 +1173,7 @@ ReadData             INFO EventInfo event: 16 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 27 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1176,7 +1195,7 @@ ReadData             INFO EventInfo event: 17 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 28 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1198,7 +1217,7 @@ ReadData             INFO EventInfo event: 18 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 29 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1220,10 +1239,11 @@ ReadData             INFO EventInfo event: 19 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #1 30 events processed so far  <<<===
 MetaDataSvc         DEBUG handle() EndInputFile for FID:????
+MetaDataSvc         DEBUG retireMetadataSource: FID:????
 EventSelector        INFO Disconnecting input sourceID: ????
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
@@ -1251,7 +1271,9 @@ SimplePoolFile3...  DEBUG --->Reading Shape[5 , ????]: [1 Column(s)]
 SimplePoolFile3...  DEBUG ---->[0]:unsigned int Typ:unsigned int [3] Size:0 Offset:0 #Elements:1
 SimplePoolFile3...  DEBUG --->Reading Shape[6 , ????]: [1 Column(s)]
 SimplePoolFile3...  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
-##Shapes            DEBUG No objects passing selection criteria... Container has 7 Entries in total.
+SimplePoolFile3...  DEBUG --->Reading Shape[7 , ????]: [1 Column(s)]
+SimplePoolFile3...  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
+##Shapes            DEBUG No objects passing selection criteria... Container has 8 Entries in total.
 SimplePoolFile3...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opening
 ##Links             DEBUG    attributes# = 1
@@ -1276,11 +1298,13 @@ SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLCollectionTree(MagicNumber)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (b , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (c , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (c , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (d , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (d , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-##Links             DEBUG No objects passing selection criteria... Container has 12 Entries in total.
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (e , ffffffff)
+SimplePoolFile3...  DEBUG ---->ClassID:????
+##Links             DEBUG No objects passing selection criteria... Container has 13 Entries in total.
 SimplePoolFile3...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
 ##Params            DEBUG Opening
 ##Params            DEBUG    attributes# = 1
@@ -1363,7 +1387,7 @@ ReadData             INFO Track pt = 74.8928 eta = 3.1676 phi = 2.6161 detector
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 24304
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25757
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #1 31 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1389,7 +1413,7 @@ ReadData             INFO Track pt = 137.584 eta = -39.525 phi = 17.2679 detecto
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 24304
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25757
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 32 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1415,7 +1439,7 @@ ReadData             INFO Track pt = 228.154 eta = -6.2704 phi = 31.9197 detecto
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 24304
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25757
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 33 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1441,7 +1465,7 @@ ReadData             INFO Track pt = 324.306 eta = -15.8941 phi = 46.5715 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 24304
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25757
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 34 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1467,7 +1491,7 @@ ReadData             INFO Track pt = 422.255 eta = -13.279 phi = 61.2233 detecto
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 24304
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25757
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #1 35 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1493,7 +1517,7 @@ ReadData             INFO Track pt = 520.987 eta = -12.3511 phi = 75.8751 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 24304
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25757
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #1 36 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1519,7 +1543,7 @@ ReadData             INFO Track pt = 620.127 eta = -11.8468 phi = 90.5269 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 24304
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25757
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #1 37 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1545,7 +1569,7 @@ ReadData             INFO Track pt = 719.507 eta = -11.5247 phi = 105.179 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 24304
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25757
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #1 38 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1571,7 +1595,7 @@ ReadData             INFO Track pt = 819.038 eta = -11.2998 phi = 119.831 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 24304
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25757
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #1 39 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1597,7 +1621,7 @@ ReadData             INFO Track pt = 918.671 eta = -11.1334 phi = 134.482 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 24304
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25757
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #1 40 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1623,7 +1647,7 @@ ReadData             INFO Track pt = 1018.38 eta = -11.0052 phi = 149.134 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 24304
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25757
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 41 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1649,7 +1673,7 @@ ReadData             INFO Track pt = 1118.13 eta = -10.9031 phi = 163.786 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 24304
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25757
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 42 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1675,7 +1699,7 @@ ReadData             INFO Track pt = 1217.93 eta = -10.82 phi = 178.438 detector
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 24304
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25757
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 43 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1701,7 +1725,7 @@ ReadData             INFO Track pt = 1317.76 eta = -10.751 phi = 193.09 detector
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 24304
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25757
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 44 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1727,7 +1751,7 @@ ReadData             INFO Track pt = 1417.61 eta = -10.6927 phi = 207.741 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 24304
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25757
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 45 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1753,7 +1777,7 @@ ReadData             INFO Track pt = 1517.49 eta = -10.6429 phi = 222.393 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 24304
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25757
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 46 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1779,7 +1803,7 @@ ReadData             INFO Track pt = 1617.37 eta = -10.5997 phi = 237.045 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 24304
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25757
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 47 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1805,7 +1829,7 @@ ReadData             INFO Track pt = 1717.27 eta = -10.562 phi = 251.697 detecto
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 24304
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25757
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 48 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1831,7 +1855,7 @@ ReadData             INFO Track pt = 1817.19 eta = -10.5288 phi = 266.349 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 24304
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25757
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 49 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1857,10 +1881,11 @@ ReadData             INFO Track pt = 1917.11 eta = -10.4993 phi = 281 detector =
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 24304
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25757
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #1 50 events processed so far  <<<===
 MetaDataSvc         DEBUG handle() EndInputFile for FID:????
+MetaDataSvc         DEBUG retireMetadataSource: FID:????
 EventSelector        INFO Disconnecting input sourceID: ????
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
@@ -1875,9 +1900,9 @@ ToolSvc              INFO Removing all tools created by ToolSvc
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot=   10 [ms] Ave/Min/Max=0.068(+-0.822)/    0/   10 [ms] #=147
-cObj_ALL             INFO Time User   : Tot=   40 [ms] Ave/Min/Max=0.288(+- 1.67)/    0/   10 [ms] #=139
-ChronoStatSvc        INFO Time User   : Tot= 0.51  [s]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot=    0 [us] Ave/Min/Max=       0(+-       0)/       0/       0 [us] #=147
+cObj_ALL             INFO Time User   : Tot=   20 [ms] Ave/Min/Max=   0.144(+-    1.19)/       0/      10 [ms] #=139
+ChronoStatSvc        INFO Time User   : Tot=  180 [ms]  #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadAgain.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadAgain.ref
index 5b39c54ec233..17d9d836652c 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadAgain.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadAgain.ref
@@ -1,40 +1,38 @@
-Sat Nov  2 01:40:39 CET 2019
+Tue Oct  6 16:04:16 CEST 20?0
 Preloading tcmalloc_minimal.so
 Athena               INFO including file "AthenaCommon/Preparation.py"
 Athena               INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Athena               INFO executing ROOT6Setup
 Athena               INFO including file "AthenaCommon/Execution.py"
 Athena               INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ReadAgainJobOptions.py"
-Py:ConfigurableDb    INFO Read module info for 5598 configurables from 9 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 4 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 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
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r2)
-                                          running on aibuild028.cern.ch on Sat Nov  2 01:40:49 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on 58dd451bc47f on Tue Oct  6 16:04:22 20?0
 ====================================================================================================================================
 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 3286 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3308 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 846 CLIDRegistry entries for module ALL
-ReadData            DEBUG Property update for OutputLevel : new value = 2
+ClassIDSvc           INFO  getRegistryEntries: read 722 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 591 CLIDRegistry entries for module ALL
+EventInfoCnvAlg      INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
+EventInfoCnvAlg...   INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
 MetaDataSvc         DEBUG Property update for OutputLevel : new value = 2
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 MetaDataSvc         DEBUG Service base class initialized successfully
-AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 PoolSvc             DEBUG Property update for OutputLevel : new value = 2
 PoolSvc             DEBUG Service base class initialized successfully
 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-10-31T2131/Athena/22.0.7/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/20?0-10-05T2101/Athena/22.0.19/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 58dd451bc47f [ATLF atlas_dd ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc             DEBUG OutputLevel is 2
 PoolSvc              INFO Setting up APR FileCatalog and Streams
@@ -59,10 +57,12 @@ EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Shape
 EmptyPoolFile.root  DEBUG --->Reading Shape[0 , ????]: [1 Column(s)]
 EmptyPoolFile.root  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
 EmptyPoolFile.root  DEBUG --->Reading Shape[1 , ????]: [1 Column(s)]
-EmptyPoolFile.root  DEBUG ---->[0]:DataHeader_p6 Typ:DataHeader_p6 [21] Size:0 Offset:0 #Elements:1
+EmptyPoolFile.root  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
 EmptyPoolFile.root  DEBUG --->Reading Shape[2 , ????]: [1 Column(s)]
+EmptyPoolFile.root  DEBUG ---->[0]:DataHeader_p6 Typ:DataHeader_p6 [21] Size:0 Offset:0 #Elements:1
+EmptyPoolFile.root  DEBUG --->Reading Shape[3 , ????]: [1 Column(s)]
 EmptyPoolFile.root  DEBUG ---->[0]:DataHeaderForm_p6 Typ:DataHeaderForm_p6 [21] Size:0 Offset:0 #Elements:1
-##Shapes            DEBUG No objects passing selection criteria... Container has 3 Entries in total.
+##Shapes            DEBUG No objects passing selection criteria... Container has 4 Entries in total.
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opening
 ##Links             DEBUG    attributes# = 1
@@ -71,11 +71,13 @@ EmptyPoolFile.root  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
 EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream3) [20?]  (3 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (4 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [20?]  (4 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (5 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (5 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-##Links             DEBUG No objects passing selection criteria... Container has 4 Entries in total.
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (6 , ffffffff)
+EmptyPoolFile.root  DEBUG ---->ClassID:????
+##Links             DEBUG No objects passing selection criteria... Container has 5 Entries in total.
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
 ##Params            DEBUG Opening
 ##Params            DEBUG    attributes# = 1
@@ -121,7 +123,9 @@ SimplePoolRepli...  DEBUG --->Reading Shape[8 , ????]: [1 Column(s)]
 SimplePoolRepli...  DEBUG ---->[0]:float Typ:float [10] Size:0 Offset:0 #Elements:1
 SimplePoolRepli...  DEBUG --->Reading Shape[9 , ????]: [1 Column(s)]
 SimplePoolRepli...  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
-##Shapes            DEBUG No objects passing selection criteria... Container has 10 Entries in total.
+SimplePoolRepli...  DEBUG --->Reading Shape[10 , ????]: [1 Column(s)]
+SimplePoolRepli...  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
+##Shapes            DEBUG No objects passing selection criteria... Container has 11 Entries in total.
 SimplePoolRepli...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opening
 ##Links             DEBUG    attributes# = 1
@@ -164,11 +168,13 @@ SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventWeight)
 SimplePoolRepli...  DEBUG ---->ClassID:????
 SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (14 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (15 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (15 , ffffffff)
+SimplePoolRepli...  DEBUG ---->ClassID:????
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (16 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (16 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (17 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-##Links             DEBUG No objects passing selection criteria... Container has 21 Entries in total.
+##Links             DEBUG No objects passing selection criteria... Container has 22 Entries in total.
 SimplePoolRepli...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
 ##Params            DEBUG Opening
 ##Params            DEBUG    attributes# = 1
@@ -183,7 +189,7 @@ MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
-ClassIDSvc           INFO  getRegistryEntries: read 1642 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1666 CLIDRegistry entries for module ALL
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 SimplePoolRepli...  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
@@ -218,10 +224,12 @@ EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Shape
 EmptyPoolFile.root  DEBUG --->Reading Shape[0 , ????]: [1 Column(s)]
 EmptyPoolFile.root  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
 EmptyPoolFile.root  DEBUG --->Reading Shape[1 , ????]: [1 Column(s)]
-EmptyPoolFile.root  DEBUG ---->[0]:DataHeader_p6 Typ:DataHeader_p6 [21] Size:0 Offset:0 #Elements:1
+EmptyPoolFile.root  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
 EmptyPoolFile.root  DEBUG --->Reading Shape[2 , ????]: [1 Column(s)]
+EmptyPoolFile.root  DEBUG ---->[0]:DataHeader_p6 Typ:DataHeader_p6 [21] Size:0 Offset:0 #Elements:1
+EmptyPoolFile.root  DEBUG --->Reading Shape[3 , ????]: [1 Column(s)]
 EmptyPoolFile.root  DEBUG ---->[0]:DataHeaderForm_p6 Typ:DataHeaderForm_p6 [21] Size:0 Offset:0 #Elements:1
-##Shapes            DEBUG No objects passing selection criteria... Container has 3 Entries in total.
+##Shapes            DEBUG No objects passing selection criteria... Container has 4 Entries in total.
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opening
 ##Links             DEBUG    attributes# = 1
@@ -230,11 +238,13 @@ EmptyPoolFile.root  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
 EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream3) [20?]  (3 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (4 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [20?]  (4 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (5 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (5 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-##Links             DEBUG No objects passing selection criteria... Container has 4 Entries in total.
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (6 , ffffffff)
+EmptyPoolFile.root  DEBUG ---->ClassID:????
+##Links             DEBUG No objects passing selection criteria... Container has 5 Entries in total.
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
 ##Params            DEBUG Opening
 ##Params            DEBUG    attributes# = 1
@@ -262,6 +272,7 @@ MetaDataHdrForm...  DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of ty
 MetaDataSvc         DEBUG Loaded input meta data store proxies
 MetaDataSvc         DEBUG  calling beginInputFile for ToolSvc.IOVDbMetaDataTool
 MetaDataSvc         DEBUG handle() EndInputFile for eventless EmptyPoolFile.root
+MetaDataSvc         DEBUG retireMetadataSource: eventless EmptyPoolFile.root
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
 EventSelector       DEBUG Try item: "SimplePoolReplica1.root" from the collection list.
 ApplicationMgr       INFO Application Manager Started successfully
@@ -348,7 +359,7 @@ ReadData             INFO Hit x = 1020.49 y = 63.5816 z = -951.864 detector = Du
 ReadData             INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 26538
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27536
 PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 1 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -382,7 +393,7 @@ ReadData             INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du
 ReadData             INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 26538
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27536
 PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 2 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -415,7 +426,7 @@ ReadData             INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du
 ReadData             INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 26538
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27536
 PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 3 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -448,7 +459,7 @@ ReadData             INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du
 ReadData             INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 26538
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27536
 PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 4 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -481,7 +492,7 @@ ReadData             INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du
 ReadData             INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 26538
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27536
 PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 5 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -514,7 +525,7 @@ ReadData             INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du
 ReadData             INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 26538
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27536
 PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 6 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -547,7 +558,7 @@ ReadData             INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du
 ReadData             INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 26538
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27536
 PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 7 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -580,7 +591,7 @@ ReadData             INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du
 ReadData             INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 26538
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27536
 PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 8 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -613,7 +624,7 @@ ReadData             INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du
 ReadData             INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 26538
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27536
 PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 9 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -646,10 +657,11 @@ ReadData             INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du
 ReadData             INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 26538
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27536
 PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #1 10 events processed so far  <<<===
 MetaDataSvc         DEBUG handle() EndInputFile for FID:????
+MetaDataSvc         DEBUG retireMetadataSource: FID:????
 EventSelector        INFO Disconnecting input sourceID: ????
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
@@ -666,10 +678,12 @@ EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Shape
 EmptyPoolFile.root  DEBUG --->Reading Shape[0 , ????]: [1 Column(s)]
 EmptyPoolFile.root  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
 EmptyPoolFile.root  DEBUG --->Reading Shape[1 , ????]: [1 Column(s)]
-EmptyPoolFile.root  DEBUG ---->[0]:DataHeader_p6 Typ:DataHeader_p6 [21] Size:0 Offset:0 #Elements:1
+EmptyPoolFile.root  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
 EmptyPoolFile.root  DEBUG --->Reading Shape[2 , ????]: [1 Column(s)]
+EmptyPoolFile.root  DEBUG ---->[0]:DataHeader_p6 Typ:DataHeader_p6 [21] Size:0 Offset:0 #Elements:1
+EmptyPoolFile.root  DEBUG --->Reading Shape[3 , ????]: [1 Column(s)]
 EmptyPoolFile.root  DEBUG ---->[0]:DataHeaderForm_p6 Typ:DataHeaderForm_p6 [21] Size:0 Offset:0 #Elements:1
-##Shapes            DEBUG No objects passing selection criteria... Container has 3 Entries in total.
+##Shapes            DEBUG No objects passing selection criteria... Container has 4 Entries in total.
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opening
 ##Links             DEBUG    attributes# = 1
@@ -678,11 +692,13 @@ EmptyPoolFile.root  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
 EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream3) [20?]  (3 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (4 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [20?]  (4 , ffffffff)
+EmptyPoolFile.root  DEBUG ---->ClassID:????
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (5 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (5 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (6 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-##Links             DEBUG No objects passing selection criteria... Container has 4 Entries in total.
+##Links             DEBUG No objects passing selection criteria... Container has 5 Entries in total.
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
 ##Params            DEBUG Opening
 ##Params            DEBUG    attributes# = 1
@@ -705,6 +721,7 @@ MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_
 MetaDataSvc         DEBUG Loaded input meta data store proxies
 MetaDataSvc         DEBUG  calling beginInputFile for ToolSvc.IOVDbMetaDataTool
 MetaDataSvc         DEBUG handle() EndInputFile for eventless EmptyPoolFile.root
+MetaDataSvc         DEBUG retireMetadataSource: eventless EmptyPoolFile.root
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
 EventSelector       DEBUG Try item: "SimplePoolFile2.root" from the collection list.
@@ -729,7 +746,9 @@ SimplePoolFile2...  DEBUG --->Reading Shape[4 , ????]: [1 Column(s)]
 SimplePoolFile2...  DEBUG ---->[0]:unsigned int Typ:unsigned int [3] Size:0 Offset:0 #Elements:1
 SimplePoolFile2...  DEBUG --->Reading Shape[5 , ????]: [1 Column(s)]
 SimplePoolFile2...  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
-##Shapes            DEBUG No objects passing selection criteria... Container has 6 Entries in total.
+SimplePoolFile2...  DEBUG --->Reading Shape[6 , ????]: [1 Column(s)]
+SimplePoolFile2...  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
+##Shapes            DEBUG No objects passing selection criteria... Container has 7 Entries in total.
 SimplePoolFile2...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opening
 ##Links             DEBUG    attributes# = 1
@@ -752,11 +771,13 @@ SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLCollectionTree(MagicNumber)
 SimplePoolFile2...  DEBUG ---->ClassID:????
 SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream2) [20?]  (a , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (b , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream2) [20?]  (b , ffffffff)
+SimplePoolFile2...  DEBUG ---->ClassID:????
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (c , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (c , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (d , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-##Links             DEBUG No objects passing selection criteria... Container has 11 Entries in total.
+##Links             DEBUG No objects passing selection criteria... Container has 12 Entries in total.
 SimplePoolFile2...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
 ##Params            DEBUG Opening
 ##Params            DEBUG    attributes# = 1
@@ -830,7 +851,7 @@ ReadData             INFO EventInfo event: 0 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 22622
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #1 11 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -852,7 +873,7 @@ ReadData             INFO EventInfo event: 1 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 22622
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 12 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -874,7 +895,7 @@ ReadData             INFO EventInfo event: 2 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 22622
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 13 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -896,7 +917,7 @@ ReadData             INFO EventInfo event: 3 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 22622
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 14 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -918,7 +939,7 @@ ReadData             INFO EventInfo event: 4 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 22622
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #1 15 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -940,7 +961,7 @@ ReadData             INFO EventInfo event: 5 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 22622
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #1 16 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -962,7 +983,7 @@ ReadData             INFO EventInfo event: 6 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 22622
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #1 17 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -984,7 +1005,7 @@ ReadData             INFO EventInfo event: 7 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 22622
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #1 18 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1006,7 +1027,7 @@ ReadData             INFO EventInfo event: 8 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 22622
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #1 19 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1028,7 +1049,7 @@ ReadData             INFO EventInfo event: 9 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 22622
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #1 20 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1050,7 +1071,7 @@ ReadData             INFO EventInfo event: 10 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 22622
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 21 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1072,7 +1093,7 @@ ReadData             INFO EventInfo event: 11 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 22622
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 22 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1094,7 +1115,7 @@ ReadData             INFO EventInfo event: 12 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 22622
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 23 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1116,7 +1137,7 @@ ReadData             INFO EventInfo event: 13 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 22622
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 24 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1138,7 +1159,7 @@ ReadData             INFO EventInfo event: 14 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 22622
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 25 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1160,7 +1181,7 @@ ReadData             INFO EventInfo event: 15 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 22622
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 26 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1182,7 +1203,7 @@ ReadData             INFO EventInfo event: 16 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 22622
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 27 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1204,7 +1225,7 @@ ReadData             INFO EventInfo event: 17 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 22622
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 28 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1226,7 +1247,7 @@ ReadData             INFO EventInfo event: 18 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 22622
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 29 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1248,10 +1269,11 @@ ReadData             INFO EventInfo event: 19 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 22622
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #1 30 events processed so far  <<<===
 MetaDataSvc         DEBUG handle() EndInputFile for FID:????
+MetaDataSvc         DEBUG retireMetadataSource: FID:????
 EventSelector        INFO Disconnecting input sourceID: ????
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
@@ -1279,7 +1301,9 @@ SimplePoolFile4...  DEBUG --->Reading Shape[5 , ????]: [1 Column(s)]
 SimplePoolFile4...  DEBUG ---->[0]:unsigned int Typ:unsigned int [3] Size:0 Offset:0 #Elements:1
 SimplePoolFile4...  DEBUG --->Reading Shape[6 , ????]: [1 Column(s)]
 SimplePoolFile4...  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
-##Shapes            DEBUG No objects passing selection criteria... Container has 7 Entries in total.
+SimplePoolFile4...  DEBUG --->Reading Shape[7 , ????]: [1 Column(s)]
+SimplePoolFile4...  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
+##Shapes            DEBUG No objects passing selection criteria... Container has 8 Entries in total.
 SimplePoolFile4...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opening
 ##Links             DEBUG    attributes# = 1
@@ -1304,11 +1328,13 @@ SimplePoolFile4...  DEBUG --->Reading Assoc:????/POOLCollectionTree(MagicNumber)
 SimplePoolFile4...  DEBUG ---->ClassID:????
 SimplePoolFile4...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (b , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
-SimplePoolFile4...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (c , ffffffff)
+SimplePoolFile4...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (c , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
-SimplePoolFile4...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (d , ffffffff)
+SimplePoolFile4...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (d , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
-##Links             DEBUG No objects passing selection criteria... Container has 12 Entries in total.
+SimplePoolFile4...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (e , ffffffff)
+SimplePoolFile4...  DEBUG ---->ClassID:????
+##Links             DEBUG No objects passing selection criteria... Container has 13 Entries in total.
 SimplePoolFile4...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
 ##Params            DEBUG Opening
 ##Params            DEBUG    attributes# = 1
@@ -1391,7 +1417,7 @@ ReadData             INFO Track pt = 74.8928 eta = 3.1676 phi = 2.6161 detector
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25094
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25851
 PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #1 31 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1417,7 +1443,7 @@ ReadData             INFO Track pt = 137.584 eta = -39.525 phi = 17.2679 detecto
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25094
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25851
 PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 32 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1443,7 +1469,7 @@ ReadData             INFO Track pt = 228.154 eta = -6.2704 phi = 31.9197 detecto
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25094
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25851
 PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 33 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1469,7 +1495,7 @@ ReadData             INFO Track pt = 324.306 eta = -15.8941 phi = 46.5715 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25094
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25851
 PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 34 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1495,7 +1521,7 @@ ReadData             INFO Track pt = 422.255 eta = -13.279 phi = 61.2233 detecto
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25094
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25851
 PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #1 35 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1521,7 +1547,7 @@ ReadData             INFO Track pt = 520.987 eta = -12.3511 phi = 75.8751 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25094
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25851
 PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #1 36 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1547,7 +1573,7 @@ ReadData             INFO Track pt = 620.127 eta = -11.8468 phi = 90.5269 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25094
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25851
 PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #1 37 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1573,7 +1599,7 @@ ReadData             INFO Track pt = 719.507 eta = -11.5247 phi = 105.179 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25094
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25851
 PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #1 38 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1599,7 +1625,7 @@ ReadData             INFO Track pt = 819.038 eta = -11.2998 phi = 119.831 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25094
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25851
 PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #1 39 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1625,7 +1651,7 @@ ReadData             INFO Track pt = 918.671 eta = -11.1334 phi = 134.482 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25094
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25851
 PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #1 40 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1651,7 +1677,7 @@ ReadData             INFO Track pt = 1018.38 eta = -11.0052 phi = 149.134 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25094
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25851
 PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 41 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1677,7 +1703,7 @@ ReadData             INFO Track pt = 1118.13 eta = -10.9031 phi = 163.786 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25094
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25851
 PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 42 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1703,7 +1729,7 @@ ReadData             INFO Track pt = 1217.93 eta = -10.82 phi = 178.438 detector
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25094
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25851
 PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 43 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1729,7 +1755,7 @@ ReadData             INFO Track pt = 1317.76 eta = -10.751 phi = 193.09 detector
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25094
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25851
 PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 44 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1755,7 +1781,7 @@ ReadData             INFO Track pt = 1417.61 eta = -10.6927 phi = 207.741 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25094
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25851
 PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 45 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1781,7 +1807,7 @@ ReadData             INFO Track pt = 1517.49 eta = -10.6429 phi = 222.393 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25094
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25851
 PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 46 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1807,7 +1833,7 @@ ReadData             INFO Track pt = 1617.37 eta = -10.5997 phi = 237.045 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25094
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25851
 PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 47 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1833,7 +1859,7 @@ ReadData             INFO Track pt = 1717.27 eta = -10.562 phi = 251.697 detecto
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25094
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25851
 PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 48 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1859,7 +1885,7 @@ ReadData             INFO Track pt = 1817.19 eta = -10.5288 phi = 266.349 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25094
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25851
 PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 49 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1885,10 +1911,11 @@ ReadData             INFO Track pt = 1917.11 eta = -10.4993 phi = 281 detector =
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25094
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 25851
 PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #1 50 events processed so far  <<<===
 MetaDataSvc         DEBUG handle() EndInputFile for FID:????
+MetaDataSvc         DEBUG retireMetadataSource: FID:????
 EventSelector        INFO Disconnecting input sourceID: ????
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
@@ -1903,9 +1930,9 @@ ToolSvc              INFO Removing all tools created by ToolSvc
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot=   10 [ms] Ave/Min/Max=0.0685(+-0.825)/    0/   10 [ms] #=146
-cObj_ALL             INFO Time User   : Tot=   20 [ms] Ave/Min/Max=0.144(+- 1.19)/    0/   10 [ms] #=139
-ChronoStatSvc        INFO Time User   : Tot= 0.53  [s]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot=   10 [ms] Ave/Min/Max=  0.0685(+-   0.825)/       0/      10 [ms] #=146
+cObj_ALL             INFO Time User   : Tot=   20 [ms] Ave/Min/Max=   0.144(+-    1.19)/       0/      10 [ms] #=139
+ChronoStatSvc        INFO Time User   : Tot=  190 [ms]  #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadConcat.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadConcat.ref
index 31e2e179bfa3..aba804042504 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadConcat.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadConcat.ref
@@ -1,41 +1,37 @@
-Sat Nov  2 01:41:04 CET 2019
+Tue Oct  6 16:04:30 CEST 20?0
 Preloading tcmalloc_minimal.so
 Athena               INFO including file "AthenaCommon/Preparation.py"
 Athena               INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Athena               INFO executing ROOT6Setup
 Athena               INFO including file "AthenaCommon/Execution.py"
 Athena               INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ReadJobOptions.py"
-Py:ConfigurableDb    INFO Read module info for 5598 configurables from 9 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 4 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 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
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r2)
-                                          running on aibuild028.cern.ch on Sat Nov  2 01:41:13 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on 58dd451bc47f on Tue Oct  6 16:04:35 20?0
 ====================================================================================================================================
 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 3286 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3308 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 846 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 861 CLIDRegistry entries for module ALL
 ReadData            DEBUG Property update for OutputLevel : new value = 2
 ReadData             INFO in initialize()
 MetaDataSvc         DEBUG Property update for OutputLevel : new value = 2
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 MetaDataSvc         DEBUG Service base class initialized successfully
-AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 PoolSvc             DEBUG Property update for OutputLevel : new value = 2
 PoolSvc             DEBUG Service base class initialized successfully
 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-10-31T2131/Athena/22.0.7/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/20?0-10-05T2101/Athena/22.0.19/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 58dd451bc47f [ATLF atlas_dd ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc             DEBUG OutputLevel is 2
 PoolSvc              INFO Setting up APR FileCatalog and Streams
@@ -60,10 +56,12 @@ EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Shape
 EmptyPoolFile.root  DEBUG --->Reading Shape[0 , ????]: [1 Column(s)]
 EmptyPoolFile.root  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
 EmptyPoolFile.root  DEBUG --->Reading Shape[1 , ????]: [1 Column(s)]
-EmptyPoolFile.root  DEBUG ---->[0]:DataHeader_p6 Typ:DataHeader_p6 [21] Size:0 Offset:0 #Elements:1
+EmptyPoolFile.root  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
 EmptyPoolFile.root  DEBUG --->Reading Shape[2 , ????]: [1 Column(s)]
+EmptyPoolFile.root  DEBUG ---->[0]:DataHeader_p6 Typ:DataHeader_p6 [21] Size:0 Offset:0 #Elements:1
+EmptyPoolFile.root  DEBUG --->Reading Shape[3 , ????]: [1 Column(s)]
 EmptyPoolFile.root  DEBUG ---->[0]:DataHeaderForm_p6 Typ:DataHeaderForm_p6 [21] Size:0 Offset:0 #Elements:1
-##Shapes            DEBUG No objects passing selection criteria... Container has 3 Entries in total.
+##Shapes            DEBUG No objects passing selection criteria... Container has 4 Entries in total.
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opening
 ##Links             DEBUG    attributes# = 1
@@ -72,11 +70,13 @@ EmptyPoolFile.root  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
 EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream3) [20?]  (3 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (4 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [20?]  (4 , ffffffff)
+EmptyPoolFile.root  DEBUG ---->ClassID:????
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (5 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (5 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (6 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-##Links             DEBUG No objects passing selection criteria... Container has 4 Entries in total.
+##Links             DEBUG No objects passing selection criteria... Container has 5 Entries in total.
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
 ##Params            DEBUG Opening
 ##Params            DEBUG    attributes# = 1
@@ -122,7 +122,9 @@ SimplePoolFile1...  DEBUG --->Reading Shape[8 , ????]: [1 Column(s)]
 SimplePoolFile1...  DEBUG ---->[0]:float Typ:float [10] Size:0 Offset:0 #Elements:1
 SimplePoolFile1...  DEBUG --->Reading Shape[9 , ????]: [1 Column(s)]
 SimplePoolFile1...  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
-##Shapes            DEBUG No objects passing selection criteria... Container has 10 Entries in total.
+SimplePoolFile1...  DEBUG --->Reading Shape[10 , ????]: [1 Column(s)]
+SimplePoolFile1...  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
+##Shapes            DEBUG No objects passing selection criteria... Container has 11 Entries in total.
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opening
 ##Links             DEBUG    attributes# = 1
@@ -165,11 +167,13 @@ SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventWeight)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (14 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (15 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (15 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (16 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (16 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-##Links             DEBUG No objects passing selection criteria... Container has 21 Entries in total.
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (17 , ffffffff)
+SimplePoolFile1...  DEBUG ---->ClassID:????
+##Links             DEBUG No objects passing selection criteria... Container has 22 Entries in total.
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
 ##Params            DEBUG Opening
 ##Params            DEBUG    attributes# = 1
@@ -184,7 +188,7 @@ MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
-ClassIDSvc           INFO  getRegistryEntries: read 2053 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1666 CLIDRegistry entries for module ALL
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
@@ -193,6 +197,7 @@ MetaDataHdrForm...  DEBUG Branch container 'DataHeaderForm'
 MetaDataHdrForm...  DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree
 MetaDataSvc         DEBUG Loaded input meta data store proxies
 ClassIDSvc           INFO  getRegistryEntries: read 2 CLIDRegistry entries for module ALL
+OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 AthenaPoolAddre...  DEBUG Property update for OutputLevel : new value = 2
 AthenaPoolAddre...  DEBUG Service base class initialized successfully
 ReadData            DEBUG input handles: 2
@@ -200,7 +205,6 @@ ReadData            DEBUG output handles: 0
 ReadData            DEBUG Data Deps for ReadData
   + INPUT   ( 'ExampleHitContainer' , 'StoreGateSvc+MyHits' ) 
   + INPUT   ( 'ExampleTrackContainer' , 'StoreGateSvc+MyTracks' ) 
-HistogramPersis...WARNING Histograms saving not required.
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
 EventSelector       DEBUG Try item: "EmptyPoolFile.root" from the collection list.
@@ -214,10 +218,12 @@ EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Shape
 EmptyPoolFile.root  DEBUG --->Reading Shape[0 , ????]: [1 Column(s)]
 EmptyPoolFile.root  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
 EmptyPoolFile.root  DEBUG --->Reading Shape[1 , ????]: [1 Column(s)]
-EmptyPoolFile.root  DEBUG ---->[0]:DataHeader_p6 Typ:DataHeader_p6 [21] Size:0 Offset:0 #Elements:1
+EmptyPoolFile.root  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
 EmptyPoolFile.root  DEBUG --->Reading Shape[2 , ????]: [1 Column(s)]
+EmptyPoolFile.root  DEBUG ---->[0]:DataHeader_p6 Typ:DataHeader_p6 [21] Size:0 Offset:0 #Elements:1
+EmptyPoolFile.root  DEBUG --->Reading Shape[3 , ????]: [1 Column(s)]
 EmptyPoolFile.root  DEBUG ---->[0]:DataHeaderForm_p6 Typ:DataHeaderForm_p6 [21] Size:0 Offset:0 #Elements:1
-##Shapes            DEBUG No objects passing selection criteria... Container has 3 Entries in total.
+##Shapes            DEBUG No objects passing selection criteria... Container has 4 Entries in total.
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opening
 ##Links             DEBUG    attributes# = 1
@@ -226,11 +232,13 @@ EmptyPoolFile.root  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
 EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream3) [20?]  (3 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (4 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [20?]  (4 , ffffffff)
+EmptyPoolFile.root  DEBUG ---->ClassID:????
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (5 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (5 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (6 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-##Links             DEBUG No objects passing selection criteria... Container has 4 Entries in total.
+##Links             DEBUG No objects passing selection criteria... Container has 5 Entries in total.
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
 ##Params            DEBUG Opening
 ##Params            DEBUG    attributes# = 1
@@ -258,6 +266,7 @@ MetaDataHdrForm...  DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of ty
 MetaDataSvc         DEBUG Loaded input meta data store proxies
 MetaDataSvc         DEBUG  calling beginInputFile for ToolSvc.IOVDbMetaDataTool
 MetaDataSvc         DEBUG handle() EndInputFile for eventless EmptyPoolFile.root
+MetaDataSvc         DEBUG retireMetadataSource: eventless EmptyPoolFile.root
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
 EventSelector       DEBUG Try item: "SimplePoolFile1.root" from the collection list.
 ApplicationMgr       INFO Application Manager Started successfully
@@ -338,14 +347,14 @@ ReadData             INFO Hit x = 1020.49 y = 63.5816 z = -951.864 detector = Du
 ReadData             INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 26012
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27679
 PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 1 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
 EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
 EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
-ClassIDSvc           INFO  getRegistryEntries: read 27 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 21 CLIDRegistry entries for module ALL
 EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
@@ -372,7 +381,7 @@ ReadData             INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du
 ReadData             INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 26012
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27679
 PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 2 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -405,7 +414,7 @@ ReadData             INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du
 ReadData             INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 26012
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27679
 PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 3 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -438,7 +447,7 @@ ReadData             INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du
 ReadData             INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 26012
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27679
 PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 4 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -471,7 +480,7 @@ ReadData             INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du
 ReadData             INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 26012
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27679
 PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 5 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -504,7 +513,7 @@ ReadData             INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du
 ReadData             INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 26012
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27679
 PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 6 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -537,7 +546,7 @@ ReadData             INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du
 ReadData             INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 26012
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27679
 PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 7 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -570,7 +579,7 @@ ReadData             INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du
 ReadData             INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 26012
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27679
 PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 8 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -603,7 +612,7 @@ ReadData             INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du
 ReadData             INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 26012
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27679
 PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 9 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -636,10 +645,11 @@ ReadData             INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du
 ReadData             INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 26012
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27679
 PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #1 10 events processed so far  <<<===
 MetaDataSvc         DEBUG handle() EndInputFile for FID:????
+MetaDataSvc         DEBUG retireMetadataSource: FID:????
 EventSelector        INFO Disconnecting input sourceID: ????
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
@@ -656,10 +666,12 @@ EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Shape
 EmptyPoolFile.root  DEBUG --->Reading Shape[0 , ????]: [1 Column(s)]
 EmptyPoolFile.root  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
 EmptyPoolFile.root  DEBUG --->Reading Shape[1 , ????]: [1 Column(s)]
-EmptyPoolFile.root  DEBUG ---->[0]:DataHeader_p6 Typ:DataHeader_p6 [21] Size:0 Offset:0 #Elements:1
+EmptyPoolFile.root  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
 EmptyPoolFile.root  DEBUG --->Reading Shape[2 , ????]: [1 Column(s)]
+EmptyPoolFile.root  DEBUG ---->[0]:DataHeader_p6 Typ:DataHeader_p6 [21] Size:0 Offset:0 #Elements:1
+EmptyPoolFile.root  DEBUG --->Reading Shape[3 , ????]: [1 Column(s)]
 EmptyPoolFile.root  DEBUG ---->[0]:DataHeaderForm_p6 Typ:DataHeaderForm_p6 [21] Size:0 Offset:0 #Elements:1
-##Shapes            DEBUG No objects passing selection criteria... Container has 3 Entries in total.
+##Shapes            DEBUG No objects passing selection criteria... Container has 4 Entries in total.
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opening
 ##Links             DEBUG    attributes# = 1
@@ -668,11 +680,13 @@ EmptyPoolFile.root  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
 EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream3) [20?]  (3 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (4 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [20?]  (4 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (5 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (5 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-##Links             DEBUG No objects passing selection criteria... Container has 4 Entries in total.
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (6 , ffffffff)
+EmptyPoolFile.root  DEBUG ---->ClassID:????
+##Links             DEBUG No objects passing selection criteria... Container has 5 Entries in total.
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
 ##Params            DEBUG Opening
 ##Params            DEBUG    attributes# = 1
@@ -695,6 +709,7 @@ MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_
 MetaDataSvc         DEBUG Loaded input meta data store proxies
 MetaDataSvc         DEBUG  calling beginInputFile for ToolSvc.IOVDbMetaDataTool
 MetaDataSvc         DEBUG handle() EndInputFile for eventless EmptyPoolFile.root
+MetaDataSvc         DEBUG retireMetadataSource: eventless EmptyPoolFile.root
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
 EventSelector       DEBUG Try item: "SimplePoolFile2.root" from the collection list.
@@ -719,7 +734,9 @@ SimplePoolFile2...  DEBUG --->Reading Shape[4 , ????]: [1 Column(s)]
 SimplePoolFile2...  DEBUG ---->[0]:unsigned int Typ:unsigned int [3] Size:0 Offset:0 #Elements:1
 SimplePoolFile2...  DEBUG --->Reading Shape[5 , ????]: [1 Column(s)]
 SimplePoolFile2...  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
-##Shapes            DEBUG No objects passing selection criteria... Container has 6 Entries in total.
+SimplePoolFile2...  DEBUG --->Reading Shape[6 , ????]: [1 Column(s)]
+SimplePoolFile2...  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
+##Shapes            DEBUG No objects passing selection criteria... Container has 7 Entries in total.
 SimplePoolFile2...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opening
 ##Links             DEBUG    attributes# = 1
@@ -742,11 +759,13 @@ SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLCollectionTree(MagicNumber)
 SimplePoolFile2...  DEBUG ---->ClassID:????
 SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream2) [20?]  (a , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (b , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream2) [20?]  (b , ffffffff)
+SimplePoolFile2...  DEBUG ---->ClassID:????
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (c , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (c , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (d , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-##Links             DEBUG No objects passing selection criteria... Container has 11 Entries in total.
+##Links             DEBUG No objects passing selection criteria... Container has 12 Entries in total.
 SimplePoolFile2...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
 ##Params            DEBUG Opening
 ##Params            DEBUG    attributes# = 1
@@ -821,7 +840,7 @@ ReadData             INFO EventInfo event: 0 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #1 11 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -843,7 +862,7 @@ ReadData             INFO EventInfo event: 1 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 12 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -865,7 +884,7 @@ ReadData             INFO EventInfo event: 2 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 13 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -887,7 +906,7 @@ ReadData             INFO EventInfo event: 3 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 14 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -909,7 +928,7 @@ ReadData             INFO EventInfo event: 4 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #1 15 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -931,7 +950,7 @@ ReadData             INFO EventInfo event: 5 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #1 16 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -953,7 +972,7 @@ ReadData             INFO EventInfo event: 6 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #1 17 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -975,7 +994,7 @@ ReadData             INFO EventInfo event: 7 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #1 18 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -997,7 +1016,7 @@ ReadData             INFO EventInfo event: 8 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #1 19 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1019,7 +1038,7 @@ ReadData             INFO EventInfo event: 9 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #1 20 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1041,7 +1060,7 @@ ReadData             INFO EventInfo event: 10 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 21 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1063,7 +1082,7 @@ ReadData             INFO EventInfo event: 11 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 22 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1085,7 +1104,7 @@ ReadData             INFO EventInfo event: 12 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 23 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1107,7 +1126,7 @@ ReadData             INFO EventInfo event: 13 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 24 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1129,7 +1148,7 @@ ReadData             INFO EventInfo event: 14 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 25 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1151,7 +1170,7 @@ ReadData             INFO EventInfo event: 15 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 26 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1173,7 +1192,7 @@ ReadData             INFO EventInfo event: 16 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 27 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1195,7 +1214,7 @@ ReadData             INFO EventInfo event: 17 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 28 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1217,7 +1236,7 @@ ReadData             INFO EventInfo event: 18 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 29 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1239,10 +1258,11 @@ ReadData             INFO EventInfo event: 19 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 21905
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 23369
 PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #1 30 events processed so far  <<<===
 MetaDataSvc         DEBUG handle() EndInputFile for FID:????
+MetaDataSvc         DEBUG retireMetadataSource: FID:????
 EventSelector        INFO Disconnecting input sourceID: ????
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
@@ -1266,7 +1286,9 @@ SimplePoolFile3...  DEBUG --->Reading Shape[3 , ????]: [1 Column(s)]
 SimplePoolFile3...  DEBUG ---->[0]:DataHeaderForm_p6 Typ:DataHeaderForm_p6 [21] Size:0 Offset:0 #Elements:1
 SimplePoolFile3...  DEBUG --->Reading Shape[4 , ????]: [1 Column(s)]
 SimplePoolFile3...  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
-##Shapes            DEBUG No objects passing selection criteria... Container has 5 Entries in total.
+SimplePoolFile3...  DEBUG --->Reading Shape[5 , ????]: [1 Column(s)]
+SimplePoolFile3...  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
+##Shapes            DEBUG No objects passing selection criteria... Container has 6 Entries in total.
 SimplePoolFile3...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opening
 ##Links             DEBUG    attributes# = 1
@@ -1283,11 +1305,13 @@ SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderFor
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream2) [20?]  (7 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (8 , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream2) [20?]  (8 , ffffffff)
+SimplePoolFile3...  DEBUG ---->ClassID:????
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (9 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (9 , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (a , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-##Links             DEBUG No objects passing selection criteria... Container has 8 Entries in total.
+##Links             DEBUG No objects passing selection criteria... Container has 9 Entries in total.
 SimplePoolFile3...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
 ##Params            DEBUG Opening
 ##Params            DEBUG    attributes# = 1
@@ -1370,7 +1394,7 @@ ReadData             INFO Track pt = 74.8928 eta = 3.1676 phi = 2.6161 detector
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 23924
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25541
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #1 31 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1396,7 +1420,7 @@ ReadData             INFO Track pt = 137.584 eta = -39.525 phi = 17.2679 detecto
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 23924
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25541
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 32 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1422,7 +1446,7 @@ ReadData             INFO Track pt = 228.154 eta = -6.2704 phi = 31.9197 detecto
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 23924
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25541
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 33 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1448,7 +1472,7 @@ ReadData             INFO Track pt = 324.306 eta = -15.8941 phi = 46.5715 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 23924
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25541
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 34 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1474,7 +1498,7 @@ ReadData             INFO Track pt = 422.255 eta = -13.279 phi = 61.2233 detecto
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 23924
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25541
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #1 35 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1500,7 +1524,7 @@ ReadData             INFO Track pt = 520.987 eta = -12.3511 phi = 75.8751 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 23924
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25541
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #1 36 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1526,7 +1550,7 @@ ReadData             INFO Track pt = 620.127 eta = -11.8468 phi = 90.5269 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 23924
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25541
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #1 37 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1552,7 +1576,7 @@ ReadData             INFO Track pt = 719.507 eta = -11.5247 phi = 105.179 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 23924
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25541
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #1 38 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1578,7 +1602,7 @@ ReadData             INFO Track pt = 819.038 eta = -11.2998 phi = 119.831 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 23924
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25541
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #1 39 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1604,7 +1628,7 @@ ReadData             INFO Track pt = 918.671 eta = -11.1334 phi = 134.482 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 23924
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25541
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #1 40 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1630,7 +1654,7 @@ ReadData             INFO Track pt = 1018.38 eta = -11.0052 phi = 149.134 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 23924
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25541
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 41 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1656,7 +1680,7 @@ ReadData             INFO Track pt = 1118.13 eta = -10.9031 phi = 163.786 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 23924
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25541
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 42 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1682,7 +1706,7 @@ ReadData             INFO Track pt = 1217.93 eta = -10.82 phi = 178.438 detector
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 23924
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25541
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 43 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1708,7 +1732,7 @@ ReadData             INFO Track pt = 1317.76 eta = -10.751 phi = 193.09 detector
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 23924
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25541
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 44 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1734,7 +1758,7 @@ ReadData             INFO Track pt = 1417.61 eta = -10.6927 phi = 207.741 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 23924
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25541
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 45 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1760,7 +1784,7 @@ ReadData             INFO Track pt = 1517.49 eta = -10.6429 phi = 222.393 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 23924
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25541
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 46 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1786,7 +1810,7 @@ ReadData             INFO Track pt = 1617.37 eta = -10.5997 phi = 237.045 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 23924
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25541
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 47 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1812,7 +1836,7 @@ ReadData             INFO Track pt = 1717.27 eta = -10.562 phi = 251.697 detecto
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 23924
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25541
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 48 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1838,7 +1862,7 @@ ReadData             INFO Track pt = 1817.19 eta = -10.5288 phi = 266.349 detect
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 23924
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25541
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 49 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
@@ -1864,13 +1888,14 @@ ReadData             INFO Track pt = 1917.11 eta = -10.4993 phi = 281 detector =
 DataProxy         WARNING accessData:  IOA pointer not set
 ReadData          WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 23924
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 25541
 PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #1 50 events processed so far  <<<===
-Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
-Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
 MetaDataSvc         DEBUG handle() EndInputFile for FID:????
+MetaDataSvc         DEBUG retireMetadataSource: FID:????
 EventSelector        INFO Disconnecting input sourceID: ????
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
+Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
 AthenaEventLoopMgr   INFO No more events in event selection 
 MetaDataSvc         DEBUG MetaDataSvc::stop()
 ApplicationMgr       INFO Application Manager Stopped successfully
@@ -1882,9 +1907,9 @@ ToolSvc              INFO Removing all tools created by ToolSvc
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot=   10 [ms] Ave/Min/Max=0.073(+-0.851)/    0/   10 [ms] #=137
-cObj_ALL             INFO Time User   : Tot=   30 [ms] Ave/Min/Max=0.233(+- 1.51)/    0/   10 [ms] #=129
-ChronoStatSvc        INFO Time User   : Tot=  480 [ms]                                             #=  1
+cObj_ALL             INFO Time User   : Tot=   10 [ms] Ave/Min/Max=  0.0775(+-   0.877)/       0/      10 [ms] #=129
+cObjR_ALL            INFO Time User   : Tot=   10 [ms] Ave/Min/Max=  0.0725(+-   0.848)/       0/      10 [ms] #=138
+ChronoStatSvc        INFO Time User   : Tot=  190 [ms]  #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WCond.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WCond.ref
index 118106d403c6..7f6d1a6c6d7b 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WCond.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WCond.ref
@@ -1,39 +1,35 @@
-Sat Nov  2 01:41:16 CET 2019
+Tue Oct  6 16:04:36 CEST 20?0
 Preloading tcmalloc_minimal.so
 Athena               INFO including file "AthenaCommon/Preparation.py"
 Athena               INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Athena               INFO executing ROOT6Setup
 Athena               INFO including file "AthenaCommon/Execution.py"
 Athena               INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_WCondJobOptions.py"
-Py:ConfigurableDb    INFO Read module info for 5598 configurables from 9 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 4 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 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
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r2)
-                                          running on aibuild028.cern.ch on Sat Nov  2 01:41:26 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on 58dd451bc47f on Tue Oct  6 16:04:42 20?0
 ====================================================================================================================================
 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 3286 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3308 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 1182 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 120? CLIDRegistry entries for module ALL
 Stream1             DEBUG Property update for OutputLevel : new value = 2
 Stream1             DEBUG in initialize()
 ToolSvc.Stream1...   INFO Initializing ToolSvc.Stream1Tool - package version AthenaServices-00-00-00
-AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 PoolSvc             DEBUG Property update for OutputLevel : new value = 2
 PoolSvc             DEBUG Service base class initialized successfully
 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-10-31T2131/Athena/22.0.7/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/20?0-10-05T2101/Athena/22.0.19/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 58dd451bc47f [ATLF atlas_dd ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc             DEBUG OutputLevel is 2
 PoolSvc              INFO Setting up APR FileCatalog and Streams
@@ -83,7 +79,9 @@ SimplePoolFile1...  DEBUG --->Reading Shape[8 , ????]: [1 Column(s)]
 SimplePoolFile1...  DEBUG ---->[0]:float Typ:float [10] Size:0 Offset:0 #Elements:1
 SimplePoolFile1...  DEBUG --->Reading Shape[9 , ????]: [1 Column(s)]
 SimplePoolFile1...  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
-##Shapes            DEBUG No objects passing selection criteria... Container has 10 Entries in total.
+SimplePoolFile1...  DEBUG --->Reading Shape[10 , ????]: [1 Column(s)]
+SimplePoolFile1...  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
+##Shapes            DEBUG No objects passing selection criteria... Container has 11 Entries in total.
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opening
 ##Links             DEBUG    attributes# = 1
@@ -126,11 +124,13 @@ SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventWeight)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (14 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (15 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (15 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (16 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (16 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-##Links             DEBUG No objects passing selection criteria... Container has 21 Entries in total.
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (17 , ffffffff)
+SimplePoolFile1...  DEBUG ---->ClassID:????
+##Links             DEBUG No objects passing selection criteria... Container has 22 Entries in total.
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
 ##Params            DEBUG Opening
 ##Params            DEBUG    attributes# = 1
@@ -145,7 +145,7 @@ MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
-ClassIDSvc           INFO  getRegistryEntries: read 2047 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1660 CLIDRegistry entries for module ALL
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
@@ -154,6 +154,7 @@ MetaDataHdrForm...  DEBUG Branch container 'DataHeaderForm'
 MetaDataHdrForm...  DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree
 MetaDataSvc         DEBUG Loaded input meta data store proxies
 ClassIDSvc           INFO  getRegistryEntries: read 2 CLIDRegistry entries for module ALL
+OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 AthenaPoolAddre...  DEBUG Property update for OutputLevel : new value = 2
 AthenaPoolAddre...  DEBUG Service base class initialized successfully
 ReadData            DEBUG input handles: 2
@@ -168,7 +169,6 @@ WriteCond           DEBUG input handles: 1
 WriteCond           DEBUG output handles: 0
 WriteCond           DEBUG Data Deps for WriteCond
   + INPUT   ( 'ExampleHitContainer' , 'StoreGateSvc+MyHits' ) 
-HistogramPersis...WARNING Histograms saving not required.
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
 EventSelector       DEBUG Try item: "SimplePoolFile1.root" from the collection list.
@@ -250,7 +250,7 @@ EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
 EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001].
 EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001].
-ClassIDSvc           INFO  getRegistryEntries: read 27 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 21 CLIDRegistry entries for module ALL
 EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
@@ -1065,6 +1065,7 @@ WriteCond            INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = Du
 WriteCond            INFO registered all data
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #1 20 events processed so far  <<<===
 MetaDataSvc         DEBUG handle() EndInputFile for FID:????
+MetaDataSvc         DEBUG retireMetadataSource: FID:????
 EventSelector        INFO Disconnecting input sourceID: ????
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
@@ -1146,13 +1147,13 @@ ToolSvc              INFO Removing all tools created by ToolSvc
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-commitOutput         INFO Time User   : Tot=    0 [us]                                             #=  1
-cRep_ALL             INFO Time User   : Tot=    0 [us] Ave/Min/Max=    0(+-    0)/    0/    0 [us] #=  2
-fRep_ALL             INFO Time User   : Tot=    0 [us] Ave/Min/Max=    0(+-    0)/    0/    0 [us] #=  2
-cRepR_ALL            INFO Time User   : Tot=    0 [us] Ave/Min/Max=    0(+-    0)/    0/    0 [us] #=  3
-cObjR_ALL            INFO Time User   : Tot=   10 [ms] Ave/Min/Max=0.217(+- 1.46)/    0/   10 [ms] #= 46
-cObj_ALL             INFO Time User   : Tot=   20 [ms] Ave/Min/Max=0.465(+- 2.11)/    0/   10 [ms] #= 43
-ChronoStatSvc        INFO Time User   : Tot=  470 [ms]                                             #=  1
+commitOutput         INFO Time User   : Tot=    0 [us]  #=  1
+cRep_ALL             INFO Time User   : Tot=    0 [us] Ave/Min/Max=       0(+-       0)/       0/       0 [us] #=  2
+fRep_ALL             INFO Time User   : Tot=    0 [us] Ave/Min/Max=       0(+-       0)/       0/       0 [us] #=  2
+cRepR_ALL            INFO Time User   : Tot=    0 [us] Ave/Min/Max=       0(+-       0)/       0/       0 [us] #=  3
+cObjR_ALL            INFO Time User   : Tot=    0 [us] Ave/Min/Max=       0(+-       0)/       0/       0 [us] #= 46
+cObj_ALL             INFO Time User   : Tot=   10 [ms] Ave/Min/Max=   0.233(+-    1.51)/       0/      10 [ms] #= 43
+ChronoStatSvc        INFO Time User   : Tot=  160 [ms]  #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WMeta.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WMeta.ref
index cbc2ef3aa26a..b579bd82c35f 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WMeta.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WMeta.ref
@@ -1,17 +1,17 @@
-Fri Sep 11 23:48:28 CEST 20?0
+Tue Oct  6 16:04:50 CEST 20?0
 Preloading tcmalloc_minimal.so
 Athena               INFO including file "AthenaCommon/Preparation.py"
 Athena               INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Athena               INFO executing ROOT6Setup
 Athena               INFO including file "AthenaCommon/Execution.py"
 Athena               INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_WMetaJobOptions.py"
-Py:ConfigurableDb    INFO Read module info for 5568 configurables from 4 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 4 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Athena               INFO including file "AthenaCommon/runbatch.py"
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
                                                    Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
-                                          running on aibuild028.cern.ch on Fri Sep 11 23:48:40 20?0
+                                          running on 58dd451bc47f on Tue Oct  6 16:04:55 20?0
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 AthDictLoaderSvc     INFO in initialize...
@@ -30,9 +30,10 @@ PoolSvc             DEBUG Service base class initialized successfully
 PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:Catalog2.xml) [ok]
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
-DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/20?0-09-10T2101/Athena/22.0.18/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/20?0-10-05T2101/Athena/22.0.19/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 58dd451bc47f [ATLF atlas_dd ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc             DEBUG OutputLevel is 2
 PoolSvc              INFO Setting up APR FileCatalog and Streams
@@ -68,9 +69,11 @@ Stream1.Stream1...  DEBUG Property update for OutputLevel : new value = 2
 Stream1.Stream1...   INFO Initializing Stream1.Stream1Tool - package version AthenaServices-00-00-00
 Stream1.Stream1...  DEBUG Property update for OutputLevel : new value = 2
 Stream1.Stream1...   INFO Initializing Stream1.Stream1_MakeEventStreamInfo - package version OutputStreamAthenaPool-00-00-00
+Stream1.Stream1...  DEBUG Property update for OutputLevel : new value = 2
 Stream1.Thinnin...  DEBUG Property update for OutputLevel : new value = 2
-Stream1              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream1_MakeEventStreamInfo','Athena::ThinningCacheTool/ThinningCacheTool_Stream1'])
+Stream1              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream1_MakeEventStreamInfo','xAODMaker::EventFormatStreamHelperTool/Stream1_MakeEventFormat','Athena::ThinningCacheTool/ThinningCacheTool_Stream1'])
 Stream1              INFO Data output: ROOTTREE:SimplePoolFile5.root
+ClassIDSvc           INFO  getRegistryEntries: read 171 CLIDRegistry entries for module ALL
 Stream1              INFO I/O reinitialization...
 Stream1.Stream1...  DEBUG Property update for OutputLevel : new value = 2
 Stream1             DEBUG End initialize
@@ -78,6 +81,7 @@ Stream1             DEBUG input handles: 0
 Stream1             DEBUG output handles: 2
 Stream1             DEBUG Registering all Tools in ToolHandleArray HelperTools
 Stream1             DEBUG Adding private ToolHandle tool Stream1.Stream1_MakeEventStreamInfo (MakeEventStreamInfo)
+Stream1             DEBUG Adding private ToolHandle tool Stream1.Stream1_MakeEventFormat (xAODMaker::EventFormatStreamHelperTool)
 Stream1             DEBUG Adding private ToolHandle tool Stream1.ThinningCacheTool_Stream1 (Athena::ThinningCacheTool)
 Stream1             DEBUG Adding private ToolHandle tool Stream1.Stream1Tool (AthenaOutputStreamTool)
 Stream1             DEBUG Data Deps for Stream1
@@ -912,7 +916,7 @@ WriteCond            INFO in finalize()
 WriteCond            INFO Pedestal x = 193136 y = -5580.01 z = -175208 string = <..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o>
 Stream1             DEBUG AthenaOutputStream Stream1 ::stop()
 Stream1             DEBUG slot 0  handle() incident type: MetaDataStop
-Stream1             DEBUG metadataItemList: [EventStreamInfo#Stream1, IOVMetaDataContainer#*, ExampleHitContainer#PedestalWriteData]
+Stream1             DEBUG metadataItemList: [EventStreamInfo#Stream1, IOVMetaDataContainer#*, xAOD::EventFormat#EventFormatStream1, ExampleHitContainer#PedestalWriteData]
 Stream1             DEBUG addItemObjects(9102,"PedestalWriteData") called
 Stream1             DEBUG            Key:PedestalWriteData
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
@@ -923,6 +927,11 @@ Stream1             DEBUG            Key:Stream1
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
 Stream1             DEBUG  Added object 167728019,"Stream1"
+Stream1             DEBUG addItemObjects(243004407,"EventFormatStream1") called
+Stream1             DEBUG            Key:EventFormatStream1
+Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
+Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+Stream1             DEBUG  Added object 243004407,"EventFormatStream1"
 Stream1             DEBUG addItemObjects(1316383046,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
@@ -947,21 +956,33 @@ SimplePoolFile5...  DEBUG ---->ClassID:????
 SimplePoolFile5...  DEBUG --->Adding Shape[9 , ????]:  [1 Column(s)] 
 SimplePoolFile5...  DEBUG ---->Class:EventStreamInfo_p3
 SimplePoolFile5...  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
+StorageSvc           INFO Building shape according to reflection information using shape ID for:
+StorageSvc           INFO xAOD::EventFormat_v1 [????]
+SimplePoolFile5...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaData(xAOD::EventFormat_v1/EventFormatStream1)
+MetaData(xAOD::...  DEBUG Opening
+MetaData(xAOD::...  DEBUG    attributes# = 1
+MetaData(xAOD::...  DEBUG Branch container 'xAOD::EventFormat_v1_EventFormatStream1'
+MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::EventFormat_v1/EventFormatStream1) of type ROOT_Tree
+SimplePoolFile5...  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (16 , ffffffff)
+SimplePoolFile5...  DEBUG ---->ClassID:????
+SimplePoolFile5...  DEBUG --->Adding Shape[10 , ????]:  [1 Column(s)] 
+SimplePoolFile5...  DEBUG ---->Class:xAOD::EventFormat_v1
+SimplePoolFile5...  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
 SimplePoolFile5...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaDataHdr(DataHeader)
 MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
-SimplePoolFile5...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (16 , ffffffff)
+SimplePoolFile5...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (17 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
 SimplePoolFile5...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
 MetaDataHdrForm...  DEBUG    attributes# = 1
 MetaDataHdrForm...  DEBUG Branch container 'DataHeaderForm'
 MetaDataHdrForm...  DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree
-SimplePoolFile5...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (17 , ffffffff)
+SimplePoolFile5...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (18 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
-ClassIDSvc           INFO  getRegistryEntries: read 7 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 14 CLIDRegistry entries for module ALL
 Stream1              INFO Metadata records written: 21
 Stream1             DEBUG Leaving incident handler for MetaDataStop
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
@@ -982,11 +1003,11 @@ ToolSvc              INFO Removing all tools created by ToolSvc
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-cRepR_ALL            INFO Time User   : Tot=   10 [ms] Ave/Min/Max=  0.0307(+-   0.553)/       0/      10 [ms] #=326
-commitOutput         INFO Time User   : Tot=   20 [ms] Ave/Min/Max=   0.952(+-    2.94)/       0/      10 [ms] #= 21
-fRep_ALL             INFO Time User   : Tot=   40 [ms] Ave/Min/Max=   0.635(+-    2.44)/       0/      10 [ms] #= 63
-cRep_ALL             INFO Time User   : Tot=   40 [ms] Ave/Min/Max=   0.635(+-    3.02)/       0/      20 [ms] #= 63
-ChronoStatSvc        INFO Time User   : Tot=  350 [ms]  #=  1
+commitOutput         INFO Time User   : Tot=    0 [us] Ave/Min/Max=       0(+-       0)/       0/       0 [us] #= 21
+cRep_ALL             INFO Time User   : Tot=   20 [ms] Ave/Min/Max=   0.312(+-    1.74)/       0/      10 [ms] #= 64
+cRepR_ALL            INFO Time User   : Tot=   20 [ms] Ave/Min/Max=  0.0612(+-    0.78)/       0/      10 [ms] #=327
+fRep_ALL             INFO Time User   : Tot=   30 [ms] Ave/Min/Max=   0.469(+-    2.11)/       0/      10 [ms] #= 64
+ChronoStatSvc        INFO Time User   : Tot=  190 [ms]  #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Write.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Write.ref
index 5c1a51730493..2becbbbeeee7 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Write.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Write.ref
@@ -1,17 +1,17 @@
-Fri Sep 11 23:45:41 CEST 20?0
+Tue Oct  6 16:03:37 CEST 20?0
 Preloading tcmalloc_minimal.so
 Athena               INFO including file "AthenaCommon/Preparation.py"
 Athena               INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Athena               INFO executing ROOT6Setup
 Athena               INFO including file "AthenaCommon/Execution.py"
 Athena               INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_WriteJobOptions.py"
-Py:ConfigurableDb    INFO Read module info for 5568 configurables from 4 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 4 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Athena               INFO including file "AthenaCommon/runbatch.py"
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
                                                    Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
-                                          running on aibuild028.cern.ch on Fri Sep 11 23:45:54 20?0
+                                          running on 58dd451bc47f on Tue Oct  6 16:03:42 20?0
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 AthDictLoaderSvc     INFO in initialize...
@@ -30,9 +30,10 @@ PoolSvc             DEBUG Service base class initialized successfully
 PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:Catalog1.xml) [ok]
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
-DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/20?0-09-10T2101/Athena/22.0.18/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/20?0-10-05T2101/Athena/22.0.19/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 58dd451bc47f [ATLF atlas_dd ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc             DEBUG OutputLevel is 2
 PoolSvc              INFO Setting up APR FileCatalog and Streams
@@ -69,9 +70,11 @@ Stream1.Stream1...  DEBUG Property update for OutputLevel : new value = 2
 Stream1.Stream1...   INFO Initializing Stream1.Stream1Tool - package version AthenaServices-00-00-00
 Stream1.Stream1...  DEBUG Property update for OutputLevel : new value = 2
 Stream1.Stream1...   INFO Initializing Stream1.Stream1_MakeEventStreamInfo - package version OutputStreamAthenaPool-00-00-00
+Stream1.Stream1...  DEBUG Property update for OutputLevel : new value = 2
 Stream1.Thinnin...  DEBUG Property update for OutputLevel : new value = 2
-Stream1              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream1_MakeEventStreamInfo','Athena::ThinningCacheTool/ThinningCacheTool_Stream1'])
+Stream1              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream1_MakeEventStreamInfo','xAODMaker::EventFormatStreamHelperTool/Stream1_MakeEventFormat','Athena::ThinningCacheTool/ThinningCacheTool_Stream1'])
 Stream1              INFO Data output: SimplePoolFile1.root
+ClassIDSvc           INFO  getRegistryEntries: read 171 CLIDRegistry entries for module ALL
 Stream1              INFO I/O reinitialization...
 Stream1.Stream1...  DEBUG Property update for OutputLevel : new value = 2
 Stream1             DEBUG End initialize
@@ -79,6 +82,7 @@ Stream1             DEBUG input handles: 0
 Stream1             DEBUG output handles: 2
 Stream1             DEBUG Registering all Tools in ToolHandleArray HelperTools
 Stream1             DEBUG Adding private ToolHandle tool Stream1.Stream1_MakeEventStreamInfo (MakeEventStreamInfo)
+Stream1             DEBUG Adding private ToolHandle tool Stream1.Stream1_MakeEventFormat (xAODMaker::EventFormatStreamHelperTool)
 Stream1             DEBUG Adding private ToolHandle tool Stream1.ThinningCacheTool_Stream1 (Athena::ThinningCacheTool)
 Stream1             DEBUG Adding private ToolHandle tool Stream1.Stream1Tool (AthenaOutputStreamTool)
 Stream1             DEBUG Data Deps for Stream1
@@ -102,8 +106,9 @@ Stream2.Stream2...  DEBUG Property update for OutputLevel : new value = 2
 Stream2.Stream2...   INFO Initializing Stream2.Stream2Tool - package version AthenaServices-00-00-00
 Stream2.Stream2...  DEBUG Property update for OutputLevel : new value = 2
 Stream2.Stream2...   INFO Initializing Stream2.Stream2_MakeEventStreamInfo - package version OutputStreamAthenaPool-00-00-00
+Stream2.Stream2...  DEBUG Property update for OutputLevel : new value = 2
 Stream2.Thinnin...  DEBUG Property update for OutputLevel : new value = 2
-Stream2              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream2_MakeEventStreamInfo','Athena::ThinningCacheTool/ThinningCacheTool_Stream2'])
+Stream2              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream2_MakeEventStreamInfo','xAODMaker::EventFormatStreamHelperTool/Stream2_MakeEventFormat','Athena::ThinningCacheTool/ThinningCacheTool_Stream2'])
 Stream2              INFO Data output: SimplePoolFile2.root
 Stream2              INFO I/O reinitialization...
 Stream2.Stream2...  DEBUG Property update for OutputLevel : new value = 2
@@ -112,6 +117,7 @@ Stream2             DEBUG input handles: 0
 Stream2             DEBUG output handles: 2
 Stream2             DEBUG Registering all Tools in ToolHandleArray HelperTools
 Stream2             DEBUG Adding private ToolHandle tool Stream2.Stream2_MakeEventStreamInfo (MakeEventStreamInfo)
+Stream2             DEBUG Adding private ToolHandle tool Stream2.Stream2_MakeEventFormat (xAODMaker::EventFormatStreamHelperTool)
 Stream2             DEBUG Adding private ToolHandle tool Stream2.ThinningCacheTool_Stream2 (Athena::ThinningCacheTool)
 Stream2             DEBUG Adding private ToolHandle tool Stream2.Stream2Tool (AthenaOutputStreamTool)
 Stream2             DEBUG Data Deps for Stream2
@@ -122,7 +128,7 @@ Stream2             DEBUG Data Deps for Stream2
 DecisionSvc          INFO Inserting stream: Stream3 with no Algs
 Stream3.Stream3...   INFO Initializing Stream3.Stream3Tool - package version AthenaServices-00-00-00
 Stream3.Stream3...   INFO Initializing Stream3.Stream3_MakeEventStreamInfo - package version OutputStreamAthenaPool-00-00-00
-Stream3              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream3_MakeEventStreamInfo','Athena::ThinningCacheTool/ThinningCacheTool_Stream3'])
+Stream3              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream3_MakeEventStreamInfo','xAODMaker::EventFormatStreamHelperTool/Stream3_MakeEventFormat','Athena::ThinningCacheTool/ThinningCacheTool_Stream3'])
 Stream3              INFO Data output: EmptyPoolFile.root
 Stream3              INFO I/O reinitialization...
 EventSelector        INFO  Enter McEventSelector Initialization 
@@ -1161,12 +1167,17 @@ AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #1 20 events
 Stream1             DEBUG AthenaOutputStream Stream1 ::stop()
 Stream2             DEBUG AthenaOutputStream Stream2 ::stop()
 Stream1             DEBUG slot 0  handle() incident type: MetaDataStop
-Stream1             DEBUG metadataItemList: [EventStreamInfo#Stream1, IOVMetaDataContainer#*]
+Stream1             DEBUG metadataItemList: [EventStreamInfo#Stream1, IOVMetaDataContainer#*, xAOD::EventFormat#EventFormatStream1]
 Stream1             DEBUG addItemObjects(167728019,"Stream1") called
 Stream1             DEBUG            Key:Stream1
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
 Stream1             DEBUG  Added object 167728019,"Stream1"
+Stream1             DEBUG addItemObjects(243004407,"EventFormatStream1") called
+Stream1             DEBUG            Key:EventFormatStream1
+Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
+Stream1             DEBUG      Comp Attr 0 with 15 mantissa bits.
+Stream1             DEBUG  Added object 243004407,"EventFormatStream1"
 Stream1             DEBUG addItemObjects(1316383046,"*") called
 Stream1             DEBUG            Key:*
 Stream1             DEBUG      Comp Attr 0 with 7 mantissa bits.
@@ -1184,30 +1195,47 @@ SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Adding Shape[6 , ????]:  [1 Column(s)] 
 SimplePoolFile1...  DEBUG ---->Class:EventStreamInfo_p3
 SimplePoolFile1...  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
+StorageSvc           INFO Building shape according to reflection information using shape ID for:
+StorageSvc           INFO xAOD::EventFormat_v1 [????]
+SimplePoolFile1...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaData(xAOD::EventFormat_v1/EventFormatStream1)
+MetaData(xAOD::...  DEBUG Opening
+MetaData(xAOD::...  DEBUG    attributes# = 1
+MetaData(xAOD::...  DEBUG Branch container 'xAOD::EventFormat_v1_EventFormatStream1'
+MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::EventFormat_v1/EventFormatStream1) of type ROOT_Tree
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (c , ffffffff)
+SimplePoolFile1...  DEBUG ---->ClassID:????
+SimplePoolFile1...  DEBUG --->Adding Shape[7 , ????]:  [1 Column(s)] 
+SimplePoolFile1...  DEBUG ---->Class:xAOD::EventFormat_v1
+SimplePoolFile1...  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
 SimplePoolFile1...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaDataHdr(DataHeader)
 MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (c , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (d , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
 MetaDataHdrForm...  DEBUG    attributes# = 1
 MetaDataHdrForm...  DEBUG Branch container 'DataHeaderForm'
 MetaDataHdrForm...  DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (d , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (e , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-ClassIDSvc           INFO  getRegistryEntries: read 7 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 14 CLIDRegistry entries for module ALL
 Stream1              INFO Metadata records written: 21
 Stream1             DEBUG Leaving incident handler for MetaDataStop
 Stream2             DEBUG slot 0  handle() incident type: MetaDataStop
-Stream2             DEBUG metadataItemList: [EventStreamInfo#Stream2, IOVMetaDataContainer#*]
+Stream2             DEBUG metadataItemList: [EventStreamInfo#Stream2, IOVMetaDataContainer#*, xAOD::EventFormat#EventFormatStream2]
 Stream2             DEBUG addItemObjects(167728019,"Stream2") called
 Stream2             DEBUG            Key:Stream2
 Stream2             DEBUG      Comp Attr 0 with 7 mantissa bits.
 Stream2             DEBUG      Comp Attr 0 with 15 mantissa bits.
 Stream2             DEBUG  Added object 167728019,"Stream2"
+Stream2             DEBUG addItemObjects(243004407,"EventFormatStream2") called
+Stream2             DEBUG            Key:EventFormatStream2
+Stream2             DEBUG      Comp Attr 0 with 7 mantissa bits.
+Stream2             DEBUG      Comp Attr 0 with 15 mantissa bits.
+Stream2             DEBUG  Added object 243004407,"EventFormatStream2"
 Stream2             DEBUG addItemObjects(1316383046,"*") called
 Stream2             DEBUG            Key:*
 Stream2             DEBUG      Comp Attr 0 with 7 mantissa bits.
@@ -1223,19 +1251,29 @@ SimplePoolFile2...  DEBUG ---->ClassID:????
 SimplePoolFile2...  DEBUG --->Adding Shape[5 , ????]:  [1 Column(s)] 
 SimplePoolFile2...  DEBUG ---->Class:EventStreamInfo_p3
 SimplePoolFile2...  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
+SimplePoolFile2...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaData(xAOD::EventFormat_v1/EventFormatStream2)
+MetaData(xAOD::...  DEBUG Opening
+MetaData(xAOD::...  DEBUG    attributes# = 1
+MetaData(xAOD::...  DEBUG Branch container 'xAOD::EventFormat_v1_EventFormatStream2'
+MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::EventFormat_v1/EventFormatStream2) of type ROOT_Tree
+SimplePoolFile2...  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream2) [20?]  (b , ffffffff)
+SimplePoolFile2...  DEBUG ---->ClassID:????
+SimplePoolFile2...  DEBUG --->Adding Shape[6 , ????]:  [1 Column(s)] 
+SimplePoolFile2...  DEBUG ---->Class:xAOD::EventFormat_v1
+SimplePoolFile2...  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
 SimplePoolFile2...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaDataHdr(DataHeader)
 MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
-SimplePoolFile2...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (b , ffffffff)
+SimplePoolFile2...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (c , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
 SimplePoolFile2...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
 MetaDataHdrForm...  DEBUG    attributes# = 1
 MetaDataHdrForm...  DEBUG Branch container 'DataHeaderForm'
 MetaDataHdrForm...  DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree
-SimplePoolFile2...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (c , ffffffff)
+SimplePoolFile2...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (d , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
 Stream2              INFO Metadata records written: 21
 Stream2             DEBUG Leaving incident handler for MetaDataStop
@@ -1277,14 +1315,24 @@ EmptyPoolFile.root  DEBUG ---->ClassID:????
 EmptyPoolFile.root  DEBUG --->Adding Shape[0 , ????]:  [1 Column(s)] 
 EmptyPoolFile.root  DEBUG ---->Class:EventStreamInfo_p3
 EmptyPoolFile.root  DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1
+EmptyPoolFile.root  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaData(xAOD::EventFormat_v1/EventFormatStream3)
+MetaData(xAOD::...  DEBUG Opening
+MetaData(xAOD::...  DEBUG    attributes# = 1
+MetaData(xAOD::...  DEBUG Branch container 'xAOD::EventFormat_v1_EventFormatStream3'
+MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::EventFormat_v1/EventFormatStream3) of type ROOT_Tree
+EmptyPoolFile.root  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [20?]  (4 , ffffffff)
+EmptyPoolFile.root  DEBUG ---->ClassID:????
+EmptyPoolFile.root  DEBUG --->Adding Shape[1 , ????]:  [1 Column(s)] 
+EmptyPoolFile.root  DEBUG ---->Class:xAOD::EventFormat_v1
+EmptyPoolFile.root  DEBUG ---->[0]:xAOD::EventFormat_v1 Typ:xAOD::EventFormat_v1 [21] Size:0 Offset:0 #Elements:1
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaDataHdr(DataHeader)
 MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
-EmptyPoolFile.root  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (4 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (5 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Adding Shape[1 , ????]:  [1 Column(s)] 
+EmptyPoolFile.root  DEBUG --->Adding Shape[2 , ????]:  [1 Column(s)] 
 EmptyPoolFile.root  DEBUG ---->Class:DataHeader_p6
 EmptyPoolFile.root  DEBUG ---->[0]:DataHeader_p6 Typ:DataHeader_p6 [21] Size:0 Offset:0 #Elements:1
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
@@ -1292,9 +1340,9 @@ MetaDataHdrForm...  DEBUG Opening
 MetaDataHdrForm...  DEBUG    attributes# = 1
 MetaDataHdrForm...  DEBUG Branch container 'DataHeaderForm'
 MetaDataHdrForm...  DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree
-EmptyPoolFile.root  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (5 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (6 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Adding Shape[2 , ????]:  [1 Column(s)] 
+EmptyPoolFile.root  DEBUG --->Adding Shape[3 , ????]:  [1 Column(s)] 
 EmptyPoolFile.root  DEBUG ---->Class:DataHeaderForm_p6
 EmptyPoolFile.root  DEBUG ---->[0]:DataHeaderForm_p6 Typ:DataHeaderForm_p6 [21] Size:0 Offset:0 #Elements:1
 PoolSvc             DEBUG Failed to get ContainerHandle to set POOL property.
@@ -1329,11 +1377,11 @@ ToolSvc              INFO Removing all tools created by ToolSvc
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-commitOutput         INFO Time User   : Tot=   10 [ms] Ave/Min/Max=   0.233(+-    1.51)/       0/      10 [ms] #= 43
-cRepR_ALL            INFO Time User   : Tot=   20 [ms] Ave/Min/Max=  0.0735(+-   0.854)/       0/      10 [ms] #=272
-cRep_ALL             INFO Time User   : Tot=   50 [ms] Ave/Min/Max=   0.472(+-    2.88)/       0/      20 [ms] #=106
-fRep_ALL             INFO Time User   : Tot=   80 [ms] Ave/Min/Max=   0.755(+-    2.98)/       0/      20 [ms] #=106
-ChronoStatSvc        INFO Time User   : Tot= 0.51  [s]  #=  1
+commitOutput         INFO Time User   : Tot=    0 [us] Ave/Min/Max=       0(+-       0)/       0/       0 [us] #= 43
+cRep_ALL             INFO Time User   : Tot=   20 [ms] Ave/Min/Max=   0.183(+-    1.34)/       0/      10 [ms] #=109
+cRepR_ALL            INFO Time User   : Tot=   30 [ms] Ave/Min/Max=   0.109(+-    1.04)/       0/      10 [ms] #=275
+fRep_ALL             INFO Time User   : Tot=   40 [ms] Ave/Min/Max=   0.367(+-    1.88)/       0/      10 [ms] #=109
+ChronoStatSvc        INFO Time User   : Tot=  210 [ms]  #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
-- 
GitLab


From 3330a0ded52dd07ba10aa6cd2de635a1984b43da Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Tue, 6 Oct 2020 18:33:36 +0100
Subject: [PATCH 263/403] std log

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

diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfBetheHeitlerEffects.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfBetheHeitlerEffects.cxx
index 58430f20d571..f0b4b8517b43 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfBetheHeitlerEffects.cxx
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfBetheHeitlerEffects.cxx
@@ -373,7 +373,7 @@ Trk::GsfBetheHeitlerEffects::compute(
   if (pathlengthInX0 < m_lowerRange) {
     const double meanZ = std::exp(-1. * pathlengthInX0);
     const double sign = (direction == Trk::oppositeMomentum) ? 1. : -1.;
-    const double varZ = std::exp(-1. * pathlengthInX0 * log(3.) / log(2.)) -
+    const double varZ = std::exp(-1. * pathlengthInX0 * std::log(3.) / std::log(2.)) -
                         std::exp(-2. * pathlengthInX0);
     double deltaP(0.);
     double varQoverP(0.);
-- 
GitLab


From fabf272d4c58f0f62567b4ce1daf1a505aec8024 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nicolas=20K=C3=B6hler?= <nicolas.koehler@cern.ch>
Date: Tue, 6 Oct 2020 19:51:19 +0200
Subject: [PATCH 264/403] add latest Run3 AGDD xml description files

---
 .../MuonG4/MuonPassiveMaterials/README.md     |     4 +
 .../data/passiveMat_r.09.02.Asym.xml          | 10248 ++++++++++++++++
 .../data/passiveMat_r.09.02.xml               |  9536 ++++++++++++++
 .../MuonG4/NSW_Sim/data/stations.v2.08.xml    |  1808 +++
 .../NSW_Sim/data/stations.v2.08_Aside.xml     |  1796 +++
 5 files changed, 23392 insertions(+)
 create mode 100644 MuonSpectrometer/MuonG4/MuonPassiveMaterials/data/passiveMat_r.09.02.Asym.xml
 create mode 100644 MuonSpectrometer/MuonG4/MuonPassiveMaterials/data/passiveMat_r.09.02.xml
 create mode 100644 MuonSpectrometer/MuonG4/NSW_Sim/data/stations.v2.08.xml
 create mode 100644 MuonSpectrometer/MuonG4/NSW_Sim/data/stations.v2.08_Aside.xml

diff --git a/MuonSpectrometer/MuonG4/MuonPassiveMaterials/README.md b/MuonSpectrometer/MuonG4/MuonPassiveMaterials/README.md
index 102f72d1ece3..1ad1cc7703cc 100644
--- a/MuonSpectrometer/MuonG4/MuonPassiveMaterials/README.md
+++ b/MuonSpectrometer/MuonG4/MuonPassiveMaterials/README.md
@@ -10,3 +10,7 @@ Content
 
 `passiveMat_r.08.02.xml`: file used to create `MuonSpectrometer-R.08.02` layout: Run 2 detector geometry, based on AGDD xml block of `amdb_simrec.r.08.01`, fixes of JFSH and JTSH, fixed floor position, updated HFTruck description, updated description of flexible chain in sectors 9, 11 and 15, updated description of ATLAS feet
 
+`passiveMat_r.09.02.xml`: file used to create `MuonSpectrometer-R.09.02` layout: Run 3 detector geometry (symmetric NSW & BIS7/8), based on `passiveMat_r.08.02.xml`, added `JDSH_Shield_NSW` on both sides, removed Run 2 `JDSH_Shield`
+
+`passiveMat_r.09.02.Asym.xml`: file used to create `MuonSpectrometer-R.09.02.Asym` layout: Run 3 detector geometry (NSW & BIS7/8 on Aside only), based on `passiveMat_r.08.02.xml`, added `JDSH_Shield_NSW` on Aside replacing Run 2 `JDSH_Shield`
+
diff --git a/MuonSpectrometer/MuonG4/MuonPassiveMaterials/data/passiveMat_r.09.02.Asym.xml b/MuonSpectrometer/MuonG4/MuonPassiveMaterials/data/passiveMat_r.09.02.Asym.xml
new file mode 100644
index 000000000000..d53290fbc378
--- /dev/null
+++ b/MuonSpectrometer/MuonG4/MuonPassiveMaterials/data/passiveMat_r.09.02.Asym.xml
@@ -0,0 +1,10248 @@
+<?xml version="1.0"?>
+
+<AGDD>
+
+<section name       = "General Variables"
+         version    = "7.0"
+         date       = "17 January 2005"
+         author     = "Serguei Baranov, Daniel Pomarede"
+         top_volume = "useless">
+
+<!--     name       =  Constants of general use      section name       = "Constante" -->
+
+<var name="GENV_Pi"     value="2. * asin(1)" />
+<var name="GENV_Eps"    value="0.1" />
+<var name="GENV_PiS180" value="GENV_Pi/180." />
+
+<var name="GENV_Si5"   value="sin( 5.0*GENV_PiS180)"/>
+<var name="GENV_Co5"   value="cos( 5.0*GENV_PiS180)"/>
+
+<var name="GENV_Ta15"  value="tan(15.0*GENV_PiS180)"/>
+
+<var name="GENV_Ta20"  value="tan(20.0*GENV_PiS180)"/>
+
+<var name="GENV_Si225" value="sin(22.5*GENV_PiS180)"/>
+<var name="GENV_Co225" value="cos(22.5*GENV_PiS180)"/>
+<var name="GENV_Ta225" value="tan(22.5*GENV_PiS180)"/>
+
+<var name="GENV_Ta375" value="tan(37.5*GENV_PiS180)"/>
+
+<var name="GENV_Si45"  value="sin(45.0*GENV_PiS180)"/>
+<var name="GENV_Co45"  value="cos(45.0*GENV_PiS180)"/>
+<var name="GENV_Ta45"  value="tan(45.0*GENV_PiS180)"/>
+
+<var name="GENV_Si525" value="sin(52.5*GENV_PiS180)"/>
+<var name="GENV_Co525" value="cos(52.5*GENV_PiS180)"/>
+
+<var name="GENV_Ta55"  value="tan(55.0*GENV_PiS180)"/>
+
+<var name="GENV_Si675" value="sin(67.5*GENV_PiS180)"/>
+<var name="GENV_Co675" value="cos(67.5*GENV_PiS180)"/>
+<var name="GENV_Ta675" value="tan(67.5*GENV_PiS180)"/>
+
+<var name="GENV_Ta77"  value="tan(77.0*GENV_PiS180)"/>
+<var name="Zero"             value="  0"/>
+
+<var name="PiOver2" value="90." />
+<var name="PiOver4" value="45." />
+
+</section>
+<section name       = "Atlas ECT Toroidal Magnets"
+         version    = "8.0"
+         date       = "01-01-10, 28 November 2002 -> Summer 2011"
+         author     = "Laurent Chevalier, Marc Virchaux, Daniel Pomarede -> review Jochen Meyer"
+         top_volume = "ECT_Toroids">
+
+<!--     name       =  Atlas ECT Toroidal Magnets    section name       = "Magnets"   -->
+
+<!--  **************************************************************
+      **************************************************************
+      ***                                                       ****
+      ***             Atlas End-Cap Toroids (ECT)               ****
+      ***                                                       ****
+      **************************************************************
+      **************************************************************  -->
+
+<var name="AECT_Toroid_ZPosition" value=" 10406. "/> <!-- confirmed atczte__0002-vAB -->
+
+
+<!-- cold mass parameters -->
+
+<!-- conductor surrounding mass from atltecc_0012-v0 and atltecc_0013-v0 -->
+
+<var name="AECT_CMZwid_ColdMassZwidth"       value="  4490.7 "/>  <!-- warm:  4510.  -->
+<var name="AECT_CMRwid_ColdMassRadwidth"     value="  3942.0 "/>  <!-- warm:  3959.  -->
+<var name="AECT_CMPwid_ColdMassPhiwidth"     value="   270.8 "/>  <!-- warm:   272.  -->
+<var name="AECT_CMHrad_ColdMassHolerad"      value="   250.  "/>  <!-- warm value kept, may be increased due to shrinking of surrounding material -->
+<var name="AECT_CMEOff_ColdMassEdgeOff"      value="   612.4 "/>  <!-- warm:   615.  cold: 612.4 -->
+<var name="AECT_CMHRp1_ColdMassHoleRpo1"     value="  1702.7 "/>  <!-- warm:  1710.  -->
+<var name="AECT_CMHRp2_ColdMassHoleRpo2"     value="   995.7 "/>  <!-- warm:  1000.  -->
+
+<var name="AECT_CMIWba_ColdMassInWebbase"    value="   402.3  "/>  <!-- from atltecc_0011-v0, warm: 202. for the half of it-->
+<var name="AECT_CMIWed_ColdMassInWebedge"    value="   199.1 "/>   <!-- from atltecc_0011-v0, warm: 200. -->
+<!-- following value does not agree to atltecc_0011-v0, it's from consistency calculation, seems smaller in blueprints -->
+<!-- if one wants to decrease the outer radius of the coil this value has to be reduced in the same way! -->
+<var name="AECT_CMIWhi_ColdMassInWebhigh"    value="    90.1  "/>   
+<var name="AECT_CMgodi_ColdMassgloboutdi"    value=" 10164.1 "/>  <!-- from 10014054-07, warm:  10238.  -->
+<var name="AECT_CMgira_ColdMassglobinrad"    value="  1045.  "/>  <!-- from atltec__0001-v0, warm 1050. -->
+
+<!-- keystone box from atltecc_0008-v0 -->
+
+<var name="AECT_KSthic_KeyStonethickness"    value="    39.8 "/>  <!-- warm:    40.  -->
+<var name="AECT_KSlthi_KeyStonelowthick"     value="    59.7 "/>  <!-- warm:    60.  -->
+<var name="AECT_KSHrad_KeyStoneHolerad"      value="   570.  "/>  <!-- warm value kept, may be increased due to shrinking of surrounding material -->
+<var name="AECT_KSHRpo_KeyStoneHoleRpos"     value="  2041.2 "/>  <!-- warm:  2050.  -->
+<var name="AECT_KSZwid_KeyStoneZwidth"       value="  3265.9 "/>  <!-- warm:  3280.  -->
+<var name="AECT_KStRwi_KeyStonetotRwidth"    value="  2837.8 "/>  <!-- warm:  2850.  -->
+<var name="AECT_KSmRwi_KeyStonemidRwidth"    value="   507.8 "/>  <!-- warm:   510.  -->
+<var name="AECT_KSlRwi_KeyStonelowRwidth"    value="   199.1 "/>  <!-- warm:   200.  -->
+<var name="AECT_KStPwi_KeyStonetopPhiwid"    value="  2816.4 "/>  <!-- warm:  2828.5 -->
+<var name="AECT_KSlPwi_KeyStonelowPhiwid"    value="   428.1 "/>  <!-- warm:   430.  -->
+<var name="AECT_KSlPof_KeyStonelowPhioff"    value="   214.1 "/>  <!-- warm:   215.  -->
+<var name="AECT_KSBRwi_KeyStoneBoxRwidth"    value="   492.9 "/>  <!-- warm:   495.  -->
+<var name="AECT_KSFPRo_KeyStoneFootPROff"    value="   291.7 "/>  <!-- warm:   293.  -->
+
+<box  name="ECT_CM_ConductorFrame_basic" material="Aluminium"  X_Y_Z="AECT_CMZwid_ColdMassZwidth ; AECT_CMRwid_ColdMassRadwidth; AECT_CMPwid_ColdMassPhiwidth" />
+<box  name="ECT_CM_ConductorFrame_edge"  material="Aluminium"  X_Y_Z="AECT_CMEOff_ColdMassEdgeOff; AECT_CMEOff_ColdMassEdgeOff; 2.*AECT_CMPwid_ColdMassPhiwidth" />
+<tubs name="ECT_CM_ConductorFrame_Hole"  material="Aluminium"  Rio_Z="0.; AECT_CMHrad_ColdMassHolerad; 2.*AECT_CMPwid_ColdMassPhiwidth"  nbPhi="20" />
+
+<subtraction name="ECT_CM_ConductorFrame" >
+  <posXYZ volume="ECT_CM_ConductorFrame_basic"  X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_CM_ConductorFrame_edge"   X_Y_Z="  AECT_CMZwid_ColdMassZwidth/2.;  AECT_CMRwid_ColdMassRadwidth/2.; 0." rot=" 0.; 0.; 45. "/>  
+  <posXYZ volume="ECT_CM_ConductorFrame_edge"   X_Y_Z=" -AECT_CMZwid_ColdMassZwidth/2.;  AECT_CMRwid_ColdMassRadwidth/2.; 0." rot=" 0.; 0.; 45. "/>  
+  <posXYZ volume="ECT_CM_ConductorFrame_edge"   X_Y_Z="  AECT_CMZwid_ColdMassZwidth/2.; -AECT_CMRwid_ColdMassRadwidth/2.; 0." rot=" 0.; 0.; 45. "/>  
+  <posXYZ volume="ECT_CM_ConductorFrame_edge"   X_Y_Z=" -AECT_CMZwid_ColdMassZwidth/2.; -AECT_CMRwid_ColdMassRadwidth/2.; 0." rot=" 0.; 0.; 45. "/>  
+  <posXYZ volume="ECT_CM_ConductorFrame_Hole"   X_Y_Z=" 0.; AECT_CMRwid_ColdMassRadwidth/2. - AECT_CMHRp1_ColdMassHoleRpo1 ; 0." />
+  <posXYZ volume="ECT_CM_ConductorFrame_Hole"   X_Y_Z=" 0.; AECT_CMRwid_ColdMassRadwidth/2. - AECT_CMHRp1_ColdMassHoleRpo1 - AECT_CMHRp2_ColdMassHoleRpo2 ; 0." />
+</subtraction>
+
+<gvxysx name="ECT_CM_ConductorInnerWeb" material="Aluminium" dZ="AECT_KSZwid_KeyStoneZwidth">
+  <gvxy_point X_Y="AECT_CMIWba_ColdMassInWebbase/2. - GENV_Eps; 0."/>
+  <gvxy_point X_Y="GENV_Si225*AECT_CMIWed_ColdMassInWebedge + AECT_CMIWba_ColdMassInWebbase/2.-GENV_Eps; GENV_Co225*AECT_CMIWed_ColdMassInWebedge"/>
+  <gvxy_point X_Y="AECT_CMPwid_ColdMassPhiwidth/2. + 2.*GENV_Eps; GENV_Co225*AECT_CMIWed_ColdMassInWebedge"/>
+  <gvxy_point X_Y="AECT_CMPwid_ColdMassPhiwidth/2. + 2.*GENV_Eps ; AECT_CMIWhi_ColdMassInWebhigh  - GENV_Eps"/>
+</gvxysx>
+
+<trd  name="ECT_CM_KeyStoneTop" material="Aluminium" Xmp_Ymp_Z=" AECT_KStPwi_KeyStonetopPhiwid; AECT_KStPwi_KeyStonetopPhiwid - 2.*GENV_Ta225*AECT_KSthic_KeyStonethickness; AECT_KSZwid_KeyStoneZwidth; AECT_KSZwid_KeyStoneZwidth; AECT_KSthic_KeyStonethickness" />
+
+<box  name="ECT_CM_KeyStoneMid_basic"  material="Aluminium"  X_Y_Z="AECT_KStPwi_KeyStonetopPhiwid -  GENV_Ta225 * AECT_KSthic_KeyStonethickness * 2. ; AECT_KStRwi_KeyStonetotRwidth - AECT_KSthic_KeyStonethickness - AECT_KSmRwi_KeyStonemidRwidth  ; AECT_KSthic_KeyStonethickness" />
+<box  name="ECT_CM_KeyStoneMid_CutBox" material="Aluminium"  X_Y_Z="AECT_KStPwi_KeyStonetopPhiwid; AECT_KSZwid_KeyStoneZwidth ; 2.*AECT_KSthic_KeyStonethickness" />
+<tubs name="ECT_CM_KeyStoneMid_Hole"   material="Aluminium"  Rio_Z="0.; AECT_KSHrad_KeyStoneHolerad; 2.*AECT_KSthic_KeyStonethickness"  nbPhi="20" />
+
+<subtraction name="ECT_CM_KeyStoneMid" >
+  <posXYZ volume="ECT_CM_KeyStoneMid_basic"   X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_CM_KeyStoneMid_Hole"    X_Y_Z=" 0.; AECT_KSHRpo_KeyStoneHoleRpos - AECT_KSmRwi_KeyStonemidRwidth/2. - AECT_KStRwi_KeyStonetotRwidth/2.; 0." />
+  <posXYZ volume="ECT_CM_KeyStoneMid_CutBox"  X_Y_Z=" (AECT_KStPwi_KeyStonetopPhiwid * (1.+GENV_Co225) - AECT_KSZwid_KeyStoneZwidth*GENV_Si225 -  GENV_Ta225 * AECT_KSthic_KeyStonethickness*2.)/2. + GENV_Eps; (-AECT_KSZwid_KeyStoneZwidth*GENV_Co225 - AECT_KStPwi_KeyStonetopPhiwid * GENV_Si225)/2. + (AECT_KStRwi_KeyStonetotRwidth - AECT_KSthic_KeyStonethickness - AECT_KSmRwi_KeyStonemidRwidth)/2. + GENV_Eps * GENV_Ta225 ; 0." rot=" 0.; 0.; -22.5 "/>
+  <posXYZ volume="ECT_CM_KeyStoneMid_CutBox"  X_Y_Z="-(AECT_KStPwi_KeyStonetopPhiwid * (1.+GENV_Co225) - AECT_KSZwid_KeyStoneZwidth*GENV_Si225 -  GENV_Ta225 * AECT_KSthic_KeyStonethickness*2.)/2. - GENV_Eps; (-AECT_KSZwid_KeyStoneZwidth*GENV_Co225 - AECT_KStPwi_KeyStonetopPhiwid * GENV_Si225)/2. + (AECT_KStRwi_KeyStonetotRwidth - AECT_KSthic_KeyStonethickness - AECT_KSmRwi_KeyStonemidRwidth)/2. + GENV_Eps * GENV_Ta225 ; 0." rot=" 0.; 0.;  22.5 "/>
+</subtraction>
+
+<gvxysx name="ECT_CM_KeyStoneLow" material="Aluminium" dZ="AECT_KSthic_KeyStonethickness">
+  <gvxy_point X_Y=" AECT_KStPwi_KeyStonetopPhiwid/2. - (AECT_KStRwi_KeyStonetotRwidth - AECT_KSmRwi_KeyStonemidRwidth) * GENV_Ta225 ; AECT_KSmRwi_KeyStonemidRwidth"/>
+  <gvxy_point X_Y=" AECT_KSlPof_KeyStonelowPhioff ; AECT_KSlRwi_KeyStonelowRwidth"/>
+  <gvxy_point X_Y=" AECT_KSlPof_KeyStonelowPhioff - AECT_KSlthi_KeyStonelowthick; AECT_KSlRwi_KeyStonelowRwidth"/>
+  <gvxy_point X_Y=" AECT_KSlPof_KeyStonelowPhioff - AECT_KSlthi_KeyStonelowthick; AECT_KSlthi_KeyStonelowthick"/>
+</gvxysx>
+
+<box  name="ECT_CM_KeyStoneInnerWeb_Box1" material="Aluminium"  X_Y_Z=" AECT_KSlthi_KeyStonelowthick - GENV_Eps/2.; AECT_KSlRwi_KeyStonelowRwidth - AECT_KSlthi_KeyStonelowthick;  AECT_KSZwid_KeyStoneZwidth" />
+<box  name="ECT_CM_KeyStoneInnerWeb_Box2" material="Aluminium"  X_Y_Z=" AECT_KSlPwi_KeyStonelowPhiwid - GENV_Eps/2.; AECT_KSlthi_KeyStonelowthick - GENV_Eps; AECT_KSZwid_KeyStoneZwidth" />
+<box  name="ECT_CM_KeyStoneFootPlate"     material="Aluminium"  X_Y_Z=" AECT_KSthic_KeyStonethickness; AECT_KSBRwi_KeyStoneBoxRwidth; AECT_KSZwid_KeyStoneZwidth" />
+
+<composition name="ECT_CM_KeyStone" >
+  <posXYZ volume="ECT_CM_KeyStoneTop"  X_Y_Z=" 0.; AECT_KStRwi_KeyStonetotRwidth - AECT_KSthic_KeyStonethickness/2. + 1.5*GENV_Eps*GENV_Co225; -1.5*GENV_Eps*GENV_Si225" rot=" 90.; 0.; 0. "/>
+  <posXYZ volume="ECT_CM_KeyStoneMid"  X_Y_Z=" 0.; AECT_KStRwi_KeyStonetotRwidth - (AECT_KStRwi_KeyStonetotRwidth + AECT_KSthic_KeyStonethickness - AECT_KSmRwi_KeyStonemidRwidth)/2. + GENV_Eps*GENV_Co225;  AECT_KSZwid_KeyStoneZwidth/2. - AECT_KSthic_KeyStonethickness/2.-GENV_Eps*GENV_Si225" />  
+  <posXYZ volume="ECT_CM_KeyStoneMid"  X_Y_Z=" 0.; AECT_KStRwi_KeyStonetotRwidth - (AECT_KStRwi_KeyStonetotRwidth + AECT_KSthic_KeyStonethickness - AECT_KSmRwi_KeyStonemidRwidth)/2. + GENV_Eps*GENV_Co225; -AECT_KSZwid_KeyStoneZwidth/2. + AECT_KSthic_KeyStonethickness/2.-GENV_Eps*GENV_Si225" />  
+  <posXYZ volume="ECT_CM_KeyStoneLow"  X_Y_Z=" 0.; 0.5*GENV_Eps*GENV_Co225;  AECT_KSZwid_KeyStoneZwidth/2. - AECT_KSthic_KeyStonethickness/2.-0.5*GENV_Eps*GENV_Si225" /> 
+  <posXYZ volume="ECT_CM_KeyStoneLow"  X_Y_Z=" 0.; 0.5*GENV_Eps*GENV_Co225; -AECT_KSZwid_KeyStoneZwidth/2. + AECT_KSthic_KeyStonethickness/2.-0.5*GENV_Eps*GENV_Si225" />   
+  <posXYZ volume="ECT_CM_KeyStoneInnerWeb_Box1"  X_Y_Z=" (AECT_KSlPwi_KeyStonelowPhiwid - AECT_KSlthi_KeyStonelowthick)/2.; (AECT_KSlthi_KeyStonelowthick + AECT_KSlRwi_KeyStonelowRwidth)/2.; 0." /> 
+  <posXYZ volume="ECT_CM_KeyStoneInnerWeb_Box1"  X_Y_Z="-(AECT_KSlPwi_KeyStonelowPhiwid - AECT_KSlthi_KeyStonelowthick)/2.; (AECT_KSlthi_KeyStonelowthick + AECT_KSlRwi_KeyStonelowRwidth)/2.; 0." />   
+  <posXYZ volume="ECT_CM_KeyStoneInnerWeb_Box2"  X_Y_Z=" 0.; AECT_KSlthi_KeyStonelowthick/2.; 0" /> 
+  <posXYZ volume="ECT_CM_KeyStoneFootPlate"      X_Y_Z=" (AECT_KSthic_KeyStonethickness*(GENV_Co225 - 2.*GENV_Si225)  + AECT_KSBRwi_KeyStoneBoxRwidth*GENV_Si225 + AECT_KStPwi_KeyStonetopPhiwid)/2. - GENV_Si225*AECT_KSFPRo_KeyStoneFootPROff; (AECT_KSthic_KeyStonethickness*(-GENV_Si225 - 2) + AECT_KSBRwi_KeyStoneBoxRwidth*GENV_Co225)/2. + AECT_KStRwi_KeyStonetotRwidth - GENV_Co225*AECT_KSFPRo_KeyStoneFootPROff; 0" rot=" 0.; 0.; -22.5 "/>   
+  <posXYZ volume="ECT_CM_KeyStoneFootPlate"      X_Y_Z="-(AECT_KSthic_KeyStonethickness*(GENV_Co225 - 2.*GENV_Si225)  + AECT_KSBRwi_KeyStoneBoxRwidth*GENV_Si225 + AECT_KStPwi_KeyStonetopPhiwid)/2. + GENV_Si225*AECT_KSFPRo_KeyStoneFootPROff; (AECT_KSthic_KeyStonethickness*(-GENV_Si225 - 2) + AECT_KSBRwi_KeyStoneBoxRwidth*GENV_Co225)/2. + AECT_KStRwi_KeyStonetotRwidth - GENV_Co225*AECT_KSFPRo_KeyStoneFootPROff; 0" rot=" 0.; 0.;  22.5 "/>   
+</composition>
+
+<var name="AECT_KSRahi_KeyStoneradihight" value="2.*GENV_Si225*(AECT_KSBRwi_KeyStoneBoxRwidth-AECT_KSFPRo_KeyStoneFootPROff-AECT_KSthic_KeyStonethickness)+2.*GENV_Co225*AECT_KSthic_KeyStonethickness+AECT_KStPwi_KeyStonetopPhiwid" />
+<var name="AECT_KSRpwi_KeyStonephiwidth"  value="AECT_KStRwi_KeyStonetotRwidth + GENV_Co225*(AECT_KSBRwi_KeyStoneBoxRwidth - AECT_KSFPRo_KeyStoneFootPROff) - AECT_KSthic_KeyStonethickness "/>
+
+<composition  name="ECT_ColdMass" >
+  <posXYZ volume="ECT_CM_ConductorFrame"     X_Y_Z=" 0.; AECT_CMgodi_ColdMassgloboutdi/2. - AECT_CMRwid_ColdMassRadwidth/2.; 0." rot=" 0.; 90.; 0."/>
+  <posXYZ volume="ECT_CM_ConductorInnerWeb"  X_Y_Z=" 0.; AECT_CMgira_ColdMassglobinrad; 0." rot=" 0.; 0.; 0."/>
+  <posXYZ volume="ECT_CM_KeyStone"           X_Y_Z=" -AECT_CMgira_ColdMassglobinrad*GENV_Si225; AECT_CMgira_ColdMassglobinrad*GENV_Co225; 0." rot=" 0.; 0.; 22.5"/>
+</composition>
+
+<!-- thermal radiation shielding  - Coil Cover - atlteyr_0288-v0 and atlteyr_0289-v0 -->
+<var name="AECT_CCZwid_CoilCoverZwidth"      value="   348.  "/>
+<var name="AECT_CCPwid_CoilCoverPhiwidth"    value="   700.  "/>
+<var name="AECT_CCfRwi_CoilCoverfullRwid"    value="  3601.  "/>
+<var name="AECT_CCthic_CoilCoverthicknes"    value="    10.  "/>
+<var name="AECT_CCRaof_CoilCoverRadoff"      value="    52.  "/>
+
+<trd name="ECT_CC_CoilCoverSide" material="Aluminium" Xmp_Ymp_Z="AECT_CCfRwi_CoilCoverfullRwid-AECT_CCRaof_CoilCoverRadoff+2.*(AECT_CCthic_CoilCoverthicknes/GENV_Si45 + AECT_CCthic_CoilCoverthicknes); AECT_CCfRwi_CoilCoverfullRwid-AECT_CCRaof_CoilCoverRadoff - 2.*(AECT_CCZwid_CoilCoverZwidth-AECT_CCthic_CoilCoverthicknes/GENV_Si45); AECT_CCthic_CoilCoverthicknes; AECT_CCthic_CoilCoverthicknes; AECT_CCZwid_CoilCoverZwidth + AECT_CCthic_CoilCoverthicknes"/>
+
+<gvxysx name="ECT_CC_CoilCoverTop" material="Aluminium" dZ="AECT_CCPwid_CoilCoverPhiwidth">
+  <gvxy_point X_Y=" (AECT_CCfRwi_CoilCoverfullRwid - AECT_CCRaof_CoilCoverRadoff)/2. - AECT_CCZwid_CoilCoverZwidth + AECT_CCthic_CoilCoverthicknes/GENV_Si45 ; AECT_CCZwid_CoilCoverZwidth + AECT_CCthic_CoilCoverthicknes "/>
+  <gvxy_point X_Y=" (AECT_CCfRwi_CoilCoverfullRwid - AECT_CCRaof_CoilCoverRadoff)/2. + AECT_CCthic_CoilCoverthicknes/GENV_Si45 + AECT_CCthic_CoilCoverthicknes; 0"/>
+  <gvxy_point X_Y=" (AECT_CCfRwi_CoilCoverfullRwid - AECT_CCRaof_CoilCoverRadoff)/2. + AECT_CCthic_CoilCoverthicknes ; 0"/>
+  <gvxy_point X_Y=" (AECT_CCfRwi_CoilCoverfullRwid - AECT_CCRaof_CoilCoverRadoff)/2. - AECT_CCZwid_CoilCoverZwidth - AECT_CCthic_CoilCoverthicknes*GENV_Ta225 + AECT_CCthic_CoilCoverthicknes/GENV_Si45; AECT_CCZwid_CoilCoverZwidth - AECT_CCthic_CoilCoverthicknes + AECT_CCthic_CoilCoverthicknes"/>
+</gvxysx>
+
+<!-- thermal radiation shielding  - EndPlate - atlteyr_0068-v0, atlteyr_0077-v0, atlteyr_0078-v0 and atlteyr_0110-v0 -->
+<var name="AECT_EPthic_EndPlatethickness"    value="    20.  "/>
+<var name="AECT_EPHoPo_EndPlateHolepos"      value="  1720.  "/>
+<var name="AECT_EPHoDi_EndPlateHolediame"    value="   830.  "/>
+<var name="AECT_EPfuhi_EndPlatefullhight"    value="  3467.  "/>
+<var name="AECT_EPmihi_EndPlateminihight"    value="  2740.  "/>
+<var name="AECT_EPfuwi_EndPlatefullwidth"    value="  1959.  "/>
+<var name="AECT_EPmiwi_EndPlatemidwidth"     value="  1200.5 "/>
+<var name="AECT_EPhiwi_EndPlatehighwidth"    value="   775.  "/>
+<var name="AECT_EPlowi_EndPlatelowwidth"     value="   182.  "/>
+<var name="AECT_EPEfuw_EndPlateExtfullwi"    value="   530.  "/>
+<var name="AECT_EPEmiw_EndPlateExtminiwi"    value="   275.  "/>
+<var name="AECT_EPEhig_EndPlateExthight"     value="   240.  "/>
+<var name="AECT_EPBBhi_EndPlateBackBoxwi"    value="  1230.  "/>
+<var name="AECT_EPBBwi_EndPlateBackBoxhi"    value="   145.  "/>
+<var name="AECT_EPFBhi_EndPlateFrontBoxw"    value="   410.  "/>
+<var name="AECT_EPFBwi_EndPlateFrontBoxh"    value="   125.  "/>
+
+<!-- derived variable to get second last point via cot(22.5)*(x-a)= -tan(22.5)*(x-b) + c -->
+<var name="AECT_EPAuVX_EndPlateAuxVarX"      value="GENV_Co225*GENV_Si225*(AECT_EPfuhi_EndPlatefullhight-GENV_Si225*AECT_EPEmiw_EndPlateExtminiwi-(AECT_EPEhig_EndPlateExthight)*GENV_Co225)+GENV_Co225*GENV_Co225* AECT_EPlowi_EndPlatelowwidth+GENV_Si225*GENV_Si225*(AECT_EPfuwi_EndPlatefullwidth-(AECT_EPEhig_EndPlateExthight)*GENV_Si225) "/>
+
+<gvxysx name="ECT_EP_EndPlate_basic" material="Aluminium" dZ="AECT_EPthic_EndPlatethickness">
+  <gvxy_point X_Y=" AECT_EPhiwi_EndPlatehighwidth; AECT_EPmihi_EndPlateminihight "/>
+  <gvxy_point X_Y=" AECT_EPmiwi_EndPlatemidwidth; AECT_EPmihi_EndPlateminihight + (AECT_EPmiwi_EndPlatemidwidth - AECT_EPhiwi_EndPlatehighwidth)*GENV_Ta225 "/>
+  <gvxy_point X_Y=" AECT_EPfuwi_EndPlatefullwidth - AECT_EPEfuw_EndPlateExtfullwi/GENV_Co225; AECT_EPmihi_EndPlateminihight + (AECT_EPmiwi_EndPlatemidwidth - AECT_EPhiwi_EndPlatehighwidth)*GENV_Ta225 + (AECT_EPfuwi_EndPlatefullwidth - AECT_EPmiwi_EndPlatemidwidth - AECT_EPEfuw_EndPlateExtfullwi/GENV_Co225)/GENV_Ta225 "/>
+  <gvxy_point X_Y=" AECT_EPfuwi_EndPlatefullwidth - AECT_EPEmiw_EndPlateExtminiwi*GENV_Co225; AECT_EPfuhi_EndPlatefullhight "/>
+  <gvxy_point X_Y=" AECT_EPfuwi_EndPlatefullwidth; AECT_EPfuhi_EndPlatefullhight  - AECT_EPEmiw_EndPlateExtminiwi*GENV_Si225"/>
+  <gvxy_point X_Y=" AECT_EPfuwi_EndPlatefullwidth - (AECT_EPEhig_EndPlateExthight   )*GENV_Si225; AECT_EPfuhi_EndPlatefullhight  - AECT_EPEmiw_EndPlateExtminiwi*GENV_Si225 - (AECT_EPEhig_EndPlateExthight  )*GENV_Co225"/>
+  <gvxy_point X_Y=" AECT_EPAuVX_EndPlateAuxVarX; (AECT_EPAuVX_EndPlateAuxVarX-AECT_EPlowi_EndPlatelowwidth)/GENV_Ta225 "/>
+  <gvxy_point X_Y=" AECT_EPlowi_EndPlatelowwidth; 0. "/>
+</gvxysx>
+
+<box  name="ECT_EP_EndPlate_BackBox"   material="Aluminium"  X_Y_Z="AECT_EPBBhi_EndPlateBackBoxwi; 2.*AECT_EPBBwi_EndPlateBackBoxhi; 2.*AECT_EPthic_EndPlatethickness" />
+<box  name="ECT_EP_EndPlate_FrontBox"  material="Aluminium"  X_Y_Z="AECT_EPFBhi_EndPlateFrontBoxw; 2.*AECT_EPFBwi_EndPlateFrontBoxh; 2.*AECT_EPthic_EndPlatethickness" />
+<tubs name="ECT_EP_EndPlate_Hole"      material="Aluminium"  Rio_Z="0.; AECT_EPHoDi_EndPlateHolediame/2.; 2.*AECT_EPthic_EndPlatethickness"  nbPhi="20" />
+
+<subtraction name="ECT_EP_EndPlate_front" >
+  <posXYZ volume="ECT_EP_EndPlate_basic"    X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EP_EndPlate_Hole"     X_Y_Z=" 0.; AECT_EPHoPo_EndPlateHolepos; 0." />
+</subtraction>
+
+<subtraction name="ECT_EP_EndPlate_back" >
+  <posXYZ volume="ECT_EP_EndPlate_basic"    X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EP_EndPlate_Hole"     X_Y_Z=" 0.; AECT_EPHoPo_EndPlateHolepos; 0." />
+  <posXYZ volume="ECT_EP_EndPlate_BackBox"  X_Y_Z=" 0.; AECT_EPmihi_EndPlateminihight; 0." />
+</subtraction>
+
+<subtraction name="ECT_EP_EndPlate_special" >
+  <posXYZ volume="ECT_EP_EndPlate_basic"    X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EP_EndPlate_Hole"     X_Y_Z=" 0.; AECT_EPHoPo_EndPlateHolepos; 0." />
+  <posXYZ volume="ECT_EP_EndPlate_FrontBox" X_Y_Z=" 0.; AECT_EPmihi_EndPlateminihight; 0." />
+</subtraction>
+
+<!-- thermal radiation shielding  - Shell - atlteyr_0280-v0 and  atlteyr_0070-v0 -->
+<var name="AECT_OSCCZd_ShellCCZdimension"    value="  3940.  "/>
+<var name="AECT_OSCCRw_ShellCCRadwidth"      value="   400.  "/>
+<var name="AECT_OSCCmw_ShellCCminiwidth"     value="   372.  "/>
+<var name="AECT_OSCCmw_ShellCCedgelength"    value="   451.  "/>
+<var name="AECT_OSCCth_ShellCCthickness"     value="    10.  "/>
+
+<var name="AECT_OSCCmw_ShellCClongwidth"     value="   423.  "/>
+<var name="AECT_OSCCmw_ShellCCshortwidth"    value="   107.  "/>
+<var name="AECT_OSCCtc_ShellCCthickconn"     value="    20.  "/>
+
+<var name="AECT_OSCCOv_ShellCCoverlap"       value="    60.  "/>
+
+<var name="AECT_OSJPiw_ShellJPinnerwidth"    value="  1912.  "/>
+<var name="AECT_OSJPew_ShellJPedgewidth"     value="   238.  "/>
+<var name="AECT_OSJPtc_ShellJPZlength"       value="  2815.  "/>
+<var name="AECT_OSAFBt_ShellAFBthickness"    value="    15.  "/>
+<var name="AECT_OSAFBh_ShellAFBhight"        value="   215.  "/>
+<var name="AECT_OSFSBh_ShellFSBhight"        value="   190.  "/>
+
+<var name="AECT_STaidi_StayTubeAlignindi"    value="   910.  "/>
+<var name="AECT_STaodi_StayTubeAlignoutd"    value="   930.  "/>
+<var name="AECT_STaflt_StayTubeAlignFlth"    value="    20.  "/>
+
+<gvxysx name="ECT_TS_ShellCoilCover" material="Aluminium" dZ="AECT_OSCCZd_ShellCCZdimension">
+  <gvxy_point X_Y=" - AECT_OSCCmw_ShellCCminiwidth/2. ; AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCtc_ShellCCthickconn*GENV_Si45 + AECT_OSCCmw_ShellCClongwidth + AECT_OSCCRw_ShellCCRadwidth - AECT_OSCCOv_ShellCCoverlap - AECT_OSCCth_ShellCCthickness"/>
+  <gvxy_point X_Y=" - (AECT_OSCCmw_ShellCCedgelength*GENV_Si45 + AECT_OSCCmw_ShellCCminiwidth/2.); AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCtc_ShellCCthickconn*GENV_Si45 + AECT_OSCCmw_ShellCClongwidth + AECT_OSCCRw_ShellCCRadwidth - AECT_OSCCOv_ShellCCoverlap - AECT_OSCCmw_ShellCCedgelength*GENV_Si45"/>
+  <gvxy_point X_Y=" - (AECT_OSCCmw_ShellCCedgelength*GENV_Si45 + AECT_OSCCmw_ShellCCminiwidth/2.); AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCtc_ShellCCthickconn*GENV_Si45 + AECT_OSCCmw_ShellCClongwidth - AECT_OSCCOv_ShellCCoverlap"/>
+  <gvxy_point X_Y=" - (AECT_OSCCth_ShellCCthickness + AECT_OSCCmw_ShellCCedgelength*GENV_Si45 + AECT_OSCCmw_ShellCCminiwidth/2.); AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCtc_ShellCCthickconn*GENV_Si45 + AECT_OSCCmw_ShellCClongwidth - AECT_OSCCOv_ShellCCoverlap"/>
+  <gvxy_point X_Y=" - (AECT_OSCCth_ShellCCthickness + AECT_OSCCmw_ShellCCedgelength*GENV_Si45 + AECT_OSCCmw_ShellCCminiwidth/2.); AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCtc_ShellCCthickconn*GENV_Si45 - AECT_OSCCtc_ShellCCthickconn*GENV_Ta225 "/>
+  <gvxy_point X_Y=" AECT_OSCCtc_ShellCCthickconn*(GENV_Si45-1.) - (AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCth_ShellCCthickness + AECT_OSCCmw_ShellCCedgelength*GENV_Si45 + AECT_OSCCmw_ShellCCminiwidth/2.) ; 0 "/>
+  <gvxy_point X_Y=" - (AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCtc_ShellCCthickconn + AECT_OSCCth_ShellCCthickness + AECT_OSCCmw_ShellCCedgelength*GENV_Si45 + AECT_OSCCmw_ShellCCminiwidth/2.) ; AECT_OSCCtc_ShellCCthickconn*GENV_Si45 "/>
+  <gvxy_point X_Y=" - (AECT_OSCCtc_ShellCCthickconn + AECT_OSCCth_ShellCCthickness + AECT_OSCCmw_ShellCCedgelength*GENV_Si45 + AECT_OSCCmw_ShellCCminiwidth/2.); AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCtc_ShellCCthickconn*GENV_Si45"/>
+  <gvxy_point X_Y=" - (AECT_OSCCtc_ShellCCthickconn + AECT_OSCCth_ShellCCthickness + AECT_OSCCmw_ShellCCedgelength*GENV_Si45 + AECT_OSCCmw_ShellCCminiwidth/2.); AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCtc_ShellCCthickconn*GENV_Si45 + AECT_OSCCmw_ShellCClongwidth"/>
+  <gvxy_point X_Y=" - (AECT_OSCCth_ShellCCthickness + AECT_OSCCmw_ShellCCedgelength*GENV_Si45 + AECT_OSCCmw_ShellCCminiwidth/2.); AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCtc_ShellCCthickconn*GENV_Si45 + AECT_OSCCmw_ShellCClongwidth"/>
+  <gvxy_point X_Y=" - (AECT_OSCCth_ShellCCthickness + AECT_OSCCmw_ShellCCedgelength*GENV_Si45 + AECT_OSCCmw_ShellCCminiwidth/2.); AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCtc_ShellCCthickconn*GENV_Si45 + AECT_OSCCmw_ShellCClongwidth + AECT_OSCCRw_ShellCCRadwidth - AECT_OSCCth_ShellCCthickness*(GENV_Ta225-1)- AECT_OSCCmw_ShellCCedgelength*GENV_Si45 - AECT_OSCCOv_ShellCCoverlap"/>
+  <gvxy_point X_Y=" - AECT_OSCCth_ShellCCthickness*GENV_Ta225 - AECT_OSCCmw_ShellCCminiwidth/2.; AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCtc_ShellCCthickconn*GENV_Si45 + AECT_OSCCmw_ShellCClongwidth + AECT_OSCCRw_ShellCCRadwidth - AECT_OSCCOv_ShellCCoverlap"/>
+</gvxysx>
+
+<gvxysx name="ECT_TS_JointPlate" material="Aluminium" dZ="AECT_OSJPtc_ShellJPZlength">
+  <gvxy_point X_Y=" AECT_OSJPiw_ShellJPinnerwidth/2.+AECT_OSCCtc_ShellCCthickconn*tan(11.25*GENV_PiS180) ;  -(AECT_OSCCtc_ShellCCthickconn+AECT_OSJPew_ShellJPedgewidth*GENV_Si225)/2."/>
+  <gvxy_point X_Y=" AECT_OSJPiw_ShellJPinnerwidth/2.+AECT_OSJPew_ShellJPedgewidth*GENV_Co225+AECT_OSCCtc_ShellCCthickconn*GENV_Si225 ; AECT_OSCCtc_ShellCCthickconn*(1-GENV_Co225)+AECT_OSJPew_ShellJPedgewidth*GENV_Si225-(AECT_OSCCtc_ShellCCthickconn+AECT_OSJPew_ShellJPedgewidth*GENV_Si225)/2. "/>
+  <gvxy_point X_Y=" AECT_OSJPiw_ShellJPinnerwidth/2.+AECT_OSJPew_ShellJPedgewidth*GENV_Co225 ; AECT_OSCCtc_ShellCCthickconn+AECT_OSJPew_ShellJPedgewidth*GENV_Si225-(AECT_OSCCtc_ShellCCthickconn+AECT_OSJPew_ShellJPedgewidth*GENV_Si225)/2. "/>
+  <gvxy_point X_Y=" AECT_OSJPiw_ShellJPinnerwidth/2.; AECT_OSCCtc_ShellCCthickconn-(AECT_OSCCtc_ShellCCthickconn+AECT_OSJPew_ShellJPedgewidth*GENV_Si225)/2."/>
+</gvxysx>
+
+<gvxysx name="ECT_TS_AxialForceBox" material="Aluminium" dZ="AECT_OSCCZd_ShellCCZdimension-AECT_OSJPtc_ShellJPZlength">
+  <gvxy_point X_Y=" AECT_EPBBhi_EndPlateBackBoxwi/2.+AECT_OSAFBt_ShellAFBthickness ; -(AECT_OSAFBh_ShellAFBhight+AECT_OSJPew_ShellJPedgewidth*GENV_Si225)/2. "/>
+  <gvxy_point X_Y=" AECT_EPBBhi_EndPlateBackBoxwi/2.+AECT_OSAFBt_ShellAFBthickness ; AECT_OSAFBh_ShellAFBhight/2.-AECT_OSAFBt_ShellAFBthickness-AECT_OSJPew_ShellJPedgewidth*GENV_Si225/2."/>
+  <gvxy_point X_Y=" AECT_OSJPiw_ShellJPinnerwidth/2.+AECT_OSAFBt_ShellAFBthickness*tan(11.25*GENV_PiS180) ; AECT_OSAFBh_ShellAFBhight/2.-AECT_OSAFBt_ShellAFBthickness-AECT_OSJPew_ShellJPedgewidth*GENV_Si225/2."/>  
+  <gvxy_point X_Y=" AECT_OSJPiw_ShellJPinnerwidth/2.+AECT_OSJPew_ShellJPedgewidth*GENV_Co225+AECT_OSAFBt_ShellAFBthickness*GENV_Si225 ; AECT_OSAFBh_ShellAFBhight/2.-AECT_OSAFBt_ShellAFBthickness*GENV_Co225+AECT_OSJPew_ShellJPedgewidth*GENV_Si225/2."/>  
+  <gvxy_point X_Y=" AECT_OSJPiw_ShellJPinnerwidth/2.+AECT_OSJPew_ShellJPedgewidth*GENV_Co225 ; (AECT_OSAFBh_ShellAFBhight+AECT_OSJPew_ShellJPedgewidth*GENV_Si225)/2."/>  
+  <gvxy_point X_Y=" AECT_OSJPiw_ShellJPinnerwidth/2.; AECT_OSAFBh_ShellAFBhight/2.-AECT_OSJPew_ShellJPedgewidth*GENV_Si225/2."/>
+  <gvxy_point X_Y=" AECT_EPBBhi_EndPlateBackBoxwi/2.; AECT_OSAFBh_ShellAFBhight/2.-AECT_OSJPew_ShellJPedgewidth*GENV_Si225/2."/>  
+  <gvxy_point X_Y=" AECT_EPBBhi_EndPlateBackBoxwi/2.; AECT_OSAFBt_ShellAFBthickness-(AECT_OSAFBh_ShellAFBhight+AECT_OSJPew_ShellJPedgewidth*GENV_Si225)/2."/>
+</gvxysx>
+
+<gvxysx name="ECT_TS_FrontSpecialBox" material="Aluminium" dZ="AECT_OSJPtc_ShellJPZlength">
+  <gvxy_point X_Y=" AECT_EPFBhi_EndPlateFrontBoxw/2.+AECT_OSCCtc_ShellCCthickconn ; -(AECT_OSFSBh_ShellFSBhight+AECT_OSJPew_ShellJPedgewidth*GENV_Si225)/2. "/>
+  <gvxy_point X_Y=" AECT_EPFBhi_EndPlateFrontBoxw/2.+AECT_OSCCtc_ShellCCthickconn ; AECT_OSFSBh_ShellFSBhight/2.-AECT_OSCCtc_ShellCCthickconn-AECT_OSJPew_ShellJPedgewidth*GENV_Si225/2."/>
+  <gvxy_point X_Y=" AECT_OSJPiw_ShellJPinnerwidth/2.+AECT_OSCCtc_ShellCCthickconn*tan(11.25*GENV_PiS180) ; AECT_OSFSBh_ShellFSBhight/2.-AECT_OSCCtc_ShellCCthickconn-AECT_OSJPew_ShellJPedgewidth*GENV_Si225/2."/>  
+  <gvxy_point X_Y=" AECT_OSJPiw_ShellJPinnerwidth/2.+AECT_OSJPew_ShellJPedgewidth*GENV_Co225+AECT_OSCCtc_ShellCCthickconn*GENV_Si225 ; AECT_OSFSBh_ShellFSBhight/2.-AECT_OSCCtc_ShellCCthickconn*GENV_Co225+AECT_OSJPew_ShellJPedgewidth*GENV_Si225/2."/>  
+  <gvxy_point X_Y=" AECT_OSJPiw_ShellJPinnerwidth/2.+AECT_OSJPew_ShellJPedgewidth*GENV_Co225 ; (AECT_OSFSBh_ShellFSBhight+AECT_OSJPew_ShellJPedgewidth*GENV_Si225)/2."/>  
+  <gvxy_point X_Y=" AECT_OSJPiw_ShellJPinnerwidth/2.; AECT_OSFSBh_ShellFSBhight/2.-AECT_OSJPew_ShellJPedgewidth*GENV_Si225/2."/>
+  <gvxy_point X_Y=" AECT_EPFBhi_EndPlateFrontBoxw/2.; AECT_OSFSBh_ShellFSBhight/2.-AECT_OSJPew_ShellJPedgewidth*GENV_Si225/2."/>  
+  <gvxy_point X_Y=" AECT_EPFBhi_EndPlateFrontBoxw/2.; AECT_OSCCtc_ShellCCthickconn-(AECT_OSFSBh_ShellFSBhight+AECT_OSJPew_ShellJPedgewidth*GENV_Si225)/2."/>
+</gvxysx>
+
+<tubs name="ECT_ST_StayTube_Tube"      material="Aluminium"  Rio_Z="AECT_STaidi_StayTubeAlignindi/2.; AECT_STaodi_StayTubeAlignoutd/2.; AECT_OSCCZd_ShellCCZdimension"  nbPhi="20" />
+<tubs name="ECT_ST_StayTube_Flange"    material="Aluminium"  Rio_Z="AECT_EPHoDi_EndPlateHolediame/2.; AECT_STaodi_StayTubeAlignoutd/2.; AECT_STaflt_StayTubeAlignFlth"  nbPhi="20" />
+
+<var name="AECT_SCCXwi_ShellCCfullXwidth"    value="(AECT_OSJPiw_ShellJPinnerwidth/2. + AECT_OSJPew_ShellJPedgewidth*GENV_Co225 + AECT_OSCCtc_ShellCCthickconn*GENV_Si225)" />
+<var name="AECT_SCCYwi_ShellCCfullYwidth"    value="(AECT_OSCCtc_ShellCCthickconn + AECT_OSJPew_ShellJPedgewidth*GENV_Si225)/2." />
+<var name="AECT_SAFBXw_ShellAFBfullXwidt"    value="(AECT_OSJPiw_ShellJPinnerwidth/2. + AECT_OSJPew_ShellJPedgewidth*GENV_Co225 + AECT_OSAFBt_ShellAFBthickness*GENV_Si225)" />
+<var name="AECT_SAFBYw_ShellAFBfullYwidt"    value="(AECT_OSAFBh_ShellAFBhight + AECT_OSJPew_ShellJPedgewidth*GENV_Si225)/2." />
+<var name="AECT_SFSBYw_ShellFSBfullYwidt"    value="(AECT_OSFSBh_ShellFSBhight + AECT_OSJPew_ShellJPedgewidth*GENV_Si225)/2." />
+
+<!-- Radius for ThermalRadiationShield Endplate (TRSEPr) and Shell (TRSShr), last term is responsible for the gap in between -> needed safety factor -> see also the photos  -->
+<var name="AECT_TRSEPr_EndplateRadPos"       value="AECT_EPfuwi_EndPlatefullwidth/GENV_Si225 - (AECT_EPfuhi_EndPlatefullhight -  AECT_EPEmiw_EndPlateExtminiwi*GENV_Si225)/GENV_Co225 - AECT_EPlowi_EndPlatelowwidth*GENV_Si225 - (AECT_EPfuwi_EndPlatefullwidth - AECT_EPAuVX_EndPlateAuxVarX - (AECT_EPEhig_EndPlateExthight)*GENV_Si225)*GENV_Ta225/GENV_Co225 + AECT_EPthic_EndPlatethickness*1.5" />
+<var name="AECT_CCSPYp_CoilCoverSideYpos"    value="AECT_EPfuwi_EndPlatefullwidth/GENV_Si225+AECT_EPthic_EndPlatethickness*1.5-AECT_EPEhig_EndPlateExthight-(AECT_CCfRwi_CoilCoverfullRwid-AECT_CCRaof_CoilCoverRadoff)/2.-AECT_CCthic_CoilCoverthicknes/GENV_Si45-AECT_CCthic_CoilCoverthicknes" />
+<var name="AECT_TRSShr_ShellRadPos"          value="(-(AECT_OSCCtc_ShellCCthickconn*(GENV_Si45-1.) - (AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCth_ShellCCthickness + AECT_OSCCmw_ShellCCedgelength*GENV_Si45 + AECT_OSCCmw_ShellCCminiwidth/2.)))/GENV_Ta225 + (AECT_OSJPiw_ShellJPinnerwidth/2.) * (GENV_Si225+GENV_Co225/GENV_Ta225) + ((AECT_OSJPew_ShellJPedgewidth-AECT_OSCCOv_ShellCCoverlap)*GENV_Co45 )*(1+1/GENV_Ta225)" />
+<var name="AECT_SCCXpo_ShellCCXpos"          value=" - AECT_SCCXwi_ShellCCfullXwidth*GENV_Co225  + AECT_SCCYwi_ShellCCfullYwidth*GENV_Si225 + AECT_OSCCtc_ShellCCthickconn*GENV_Si225*GENV_Co225 + (AECT_OSCCtc_ShellCCthickconn*(GENV_Si45-1.) - (AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCth_ShellCCthickness + AECT_OSCCmw_ShellCCedgelength*GENV_Si45 + AECT_OSCCmw_ShellCCminiwidth/2.))+AECT_OSCCOv_ShellCCoverlap*GENV_Si45" />
+<var name="AECT_SFSBXp_ShellFSBXpos"         value=" - AECT_SCCXwi_ShellCCfullXwidth*GENV_Co225 + AECT_SFSBYw_ShellFSBfullYwidt*GENV_Si225 + AECT_OSCCtc_ShellCCthickconn*GENV_Si225*GENV_Co225 + (AECT_OSCCtc_ShellCCthickconn*(GENV_Si45-1.) - (AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCth_ShellCCthickness + AECT_OSCCmw_ShellCCedgelength*GENV_Si45 + AECT_OSCCmw_ShellCCminiwidth/2.))+AECT_OSCCOv_ShellCCoverlap*GENV_Si45" />
+<var name="AECT_SAFBXp_ShellAFBXpos"         value=" - AECT_SAFBXw_ShellAFBfullXwidt*GENV_Co225 + AECT_SAFBYw_ShellAFBfullYwidt*GENV_Si225 + AECT_OSAFBt_ShellAFBthickness*GENV_Si225*GENV_Co225 + (AECT_OSCCtc_ShellCCthickconn*(GENV_Si45-1.) - (AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCth_ShellCCthickness + AECT_OSCCmw_ShellCCedgelength*GENV_Si45 + AECT_OSCCmw_ShellCCminiwidth/2.))+AECT_OSCCOv_ShellCCoverlap*GENV_Si45" />
+
+<composition name="ECT_TS_ThermalShield_default_tmp" >
+  <posXYZ volume="ECT_EP_EndPlate_front"    X_Y_Z=" -AECT_TRSEPr_EndplateRadPos*GENV_Ta225 ; AECT_TRSEPr_EndplateRadPos;  AECT_OSCCZd_ShellCCZdimension/2. + 1.75*AECT_EPthic_EndPlatethickness" rot=" 0.; 0.; 22.5" />
+  <posXYZ volume="ECT_EP_EndPlate_back"     X_Y_Z=" -AECT_TRSEPr_EndplateRadPos*GENV_Ta225 ; AECT_TRSEPr_EndplateRadPos; -AECT_OSCCZd_ShellCCZdimension/2. - 1.75*AECT_EPthic_EndPlatethickness" rot=" 0.; 0.; 22.5" />
+  <posXYZ volume="ECT_CC_CoilCoverTop"      X_Y_Z=" 0. ; AECT_EPfuwi_EndPlatefullwidth/GENV_Si225 + AECT_EPthic_EndPlatethickness*1.5 - AECT_EPEhig_EndPlateExthight - (AECT_CCfRwi_CoilCoverfullRwid - AECT_CCRaof_CoilCoverRadoff)/2. - AECT_CCthic_CoilCoverthicknes/GENV_Si45 - AECT_CCthic_CoilCoverthicknes ;   AECT_OSCCZd_ShellCCZdimension/2. + 2.25*AECT_EPthic_EndPlatethickness + GENV_Eps" rot="  90.; 0.; 90." />
+  <posXYZ volume="ECT_CC_CoilCoverTop"      X_Y_Z=" 0. ; AECT_EPfuwi_EndPlatefullwidth/GENV_Si225 + AECT_EPthic_EndPlatethickness*1.5 - AECT_EPEhig_EndPlateExthight - (AECT_CCfRwi_CoilCoverfullRwid - AECT_CCRaof_CoilCoverRadoff)/2. - AECT_CCthic_CoilCoverthicknes/GENV_Si45 - AECT_CCthic_CoilCoverthicknes ;  -AECT_OSCCZd_ShellCCZdimension/2. - 2.25*AECT_EPthic_EndPlatethickness - GENV_Eps" rot=" -90.; 0.; 90." />
+  <posXYZ volume="ECT_CC_CoilCoverSide"     X_Y_Z=" (AECT_CCPwid_CoilCoverPhiwidth + AECT_CCthic_CoilCoverthicknes)/2. + GENV_Eps; AECT_CCSPYp_CoilCoverSideYpos;  AECT_OSCCZd_ShellCCZdimension/2.+2.25*AECT_EPthic_EndPlatethickness + GENV_Eps + (AECT_CCZwid_CoilCoverZwidth + AECT_CCthic_CoilCoverthicknes)/2." rot="  0.; 0.; 90." />
+  <posXYZ volume="ECT_CC_CoilCoverSide"     X_Y_Z=" (AECT_CCPwid_CoilCoverPhiwidth + AECT_CCthic_CoilCoverthicknes)/2. + GENV_Eps; AECT_CCSPYp_CoilCoverSideYpos; -AECT_OSCCZd_ShellCCZdimension/2.-2.25*AECT_EPthic_EndPlatethickness - GENV_Eps - (AECT_CCZwid_CoilCoverZwidth + AECT_CCthic_CoilCoverthicknes)/2." rot="180.; 0.; 90." />
+  <posXYZ volume="ECT_CC_CoilCoverSide"     X_Y_Z="-(AECT_CCPwid_CoilCoverPhiwidth + AECT_CCthic_CoilCoverthicknes)/2. - GENV_Eps; AECT_CCSPYp_CoilCoverSideYpos;  AECT_OSCCZd_ShellCCZdimension/2.+2.25*AECT_EPthic_EndPlatethickness + GENV_Eps + (AECT_CCZwid_CoilCoverZwidth + AECT_CCthic_CoilCoverthicknes)/2." rot="  0.; 0.; 90." />
+  <posXYZ volume="ECT_CC_CoilCoverSide"     X_Y_Z="-(AECT_CCPwid_CoilCoverPhiwidth + AECT_CCthic_CoilCoverthicknes)/2. - GENV_Eps; AECT_CCSPYp_CoilCoverSideYpos; -AECT_OSCCZd_ShellCCZdimension/2.-2.25*AECT_EPthic_EndPlatethickness - GENV_Eps - (AECT_CCZwid_CoilCoverZwidth + AECT_CCthic_CoilCoverthicknes)/2." rot="180.; 0.; 90." />
+  <posXYZ volume="ECT_TS_ShellCoilCover"    X_Y_Z=" 0.;  AECT_TRSShr_ShellRadPos + GENV_Eps; 0." rot=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_TS_JointPlate"        X_Y_Z=" AECT_SCCXpo_ShellCCXpos; -AECT_SCCXwi_ShellCCfullXwidth*GENV_Si225 - AECT_SCCYwi_ShellCCfullYwidth*GENV_Co225 + AECT_OSCCtc_ShellCCthickconn*GENV_Si225*GENV_Si225+ AECT_TRSShr_ShellRadPos+AECT_OSCCOv_ShellCCoverlap*GENV_Si45  ; (AECT_OSCCZd_ShellCCZdimension-AECT_OSJPtc_ShellJPZlength)/2." rot=" 0.; 0.; 22.5" />
+  <posXYZ volume="ECT_TS_AxialForceBox"     X_Y_Z=" AECT_SAFBXp_ShellAFBXpos + GENV_Eps;  -AECT_SAFBXw_ShellAFBfullXwidt*GENV_Si225 - AECT_SAFBYw_ShellAFBfullYwidt*GENV_Co225 + AECT_OSAFBt_ShellAFBthickness*GENV_Si225*GENV_Si225+ AECT_TRSShr_ShellRadPos+AECT_OSCCOv_ShellCCoverlap*GENV_Si45  ; -(AECT_OSCCZd_ShellCCZdimension-(AECT_OSCCZd_ShellCCZdimension-AECT_OSJPtc_ShellJPZlength))/2." rot=" 0.; 0.; 22.5" />
+  <posXYZ volume="ECT_ST_StayTube_Tube"     X_Y_Z=" -AECT_TRSEPr_EndplateRadPos*GENV_Ta225 - AECT_EPHoPo_EndPlateHolepos*GENV_Si225;  AECT_TRSEPr_EndplateRadPos + AECT_EPHoPo_EndPlateHolepos*GENV_Co225; 0." rot=" 0.; 0.; 22.5" />
+  <posXYZ volume="ECT_ST_StayTube_Flange"   X_Y_Z=" -AECT_TRSEPr_EndplateRadPos*GENV_Ta225 - AECT_EPHoPo_EndPlateHolepos*GENV_Si225;  AECT_TRSEPr_EndplateRadPos + AECT_EPHoPo_EndPlateHolepos*GENV_Co225; AECT_OSCCZd_ShellCCZdimension/2.+AECT_STaflt_StayTubeAlignFlth/2. + GENV_Eps" rot=" 0.; 0.; 22.5" />
+  <posXYZ volume="ECT_ST_StayTube_Flange"   X_Y_Z=" -AECT_TRSEPr_EndplateRadPos*GENV_Ta225 - AECT_EPHoPo_EndPlateHolepos*GENV_Si225;  AECT_TRSEPr_EndplateRadPos + AECT_EPHoPo_EndPlateHolepos*GENV_Co225;-AECT_OSCCZd_ShellCCZdimension/2.-AECT_STaflt_StayTubeAlignFlth/2. - GENV_Eps" rot=" 0.; 0.; 22.5" />
+</composition>
+
+<composition name="ECT_TS_ThermalShield_default" >
+  <posXYZ volume="ECT_TS_ThermalShield_default_tmp"  rot=" 0.; 0.; -90." />
+</composition>
+
+<composition name="ECT_TS_ThermalShield_special" >
+  <posXYZ volume="ECT_EP_EndPlate_special"    X_Y_Z=" -AECT_TRSEPr_EndplateRadPos*GENV_Ta225 ; AECT_TRSEPr_EndplateRadPos;  AECT_OSCCZd_ShellCCZdimension/2. + 1.75*AECT_EPthic_EndPlatethickness" rot=" 0.; 0.; 22.5" />
+  <posXYZ volume="ECT_EP_EndPlate_back"     X_Y_Z=" -AECT_TRSEPr_EndplateRadPos*GENV_Ta225 ; AECT_TRSEPr_EndplateRadPos; -AECT_OSCCZd_ShellCCZdimension/2. - 1.75*AECT_EPthic_EndPlatethickness" rot=" 0.; 0.; 22.5" />
+  <posXYZ volume="ECT_CC_CoilCoverTop"      X_Y_Z=" 0. ; AECT_EPfuwi_EndPlatefullwidth/GENV_Si225 + AECT_EPthic_EndPlatethickness*1.5 - AECT_EPEhig_EndPlateExthight - (AECT_CCfRwi_CoilCoverfullRwid - AECT_CCRaof_CoilCoverRadoff)/2. - AECT_CCthic_CoilCoverthicknes/GENV_Si45 - AECT_CCthic_CoilCoverthicknes ;   AECT_OSCCZd_ShellCCZdimension/2. + 2.25*AECT_EPthic_EndPlatethickness + GENV_Eps" rot="  90.; 0.; 90." />
+  <posXYZ volume="ECT_CC_CoilCoverTop"      X_Y_Z=" 0. ; AECT_EPfuwi_EndPlatefullwidth/GENV_Si225 + AECT_EPthic_EndPlatethickness*1.5 - AECT_EPEhig_EndPlateExthight - (AECT_CCfRwi_CoilCoverfullRwid - AECT_CCRaof_CoilCoverRadoff)/2. - AECT_CCthic_CoilCoverthicknes/GENV_Si45 - AECT_CCthic_CoilCoverthicknes ;  -AECT_OSCCZd_ShellCCZdimension/2. - 2.25*AECT_EPthic_EndPlatethickness - GENV_Eps" rot=" -90.; 0.; 90." />
+  <posXYZ volume="ECT_CC_CoilCoverSide"     X_Y_Z=" (AECT_CCPwid_CoilCoverPhiwidth + AECT_CCthic_CoilCoverthicknes)/2. + GENV_Eps; AECT_CCSPYp_CoilCoverSideYpos;  AECT_OSCCZd_ShellCCZdimension/2.+2.25*AECT_EPthic_EndPlatethickness + GENV_Eps + (AECT_CCZwid_CoilCoverZwidth + AECT_CCthic_CoilCoverthicknes)/2." rot="  0.; 0.; 90." />
+  <posXYZ volume="ECT_CC_CoilCoverSide"     X_Y_Z=" (AECT_CCPwid_CoilCoverPhiwidth + AECT_CCthic_CoilCoverthicknes)/2. + GENV_Eps; AECT_CCSPYp_CoilCoverSideYpos; -AECT_OSCCZd_ShellCCZdimension/2.-2.25*AECT_EPthic_EndPlatethickness - GENV_Eps - (AECT_CCZwid_CoilCoverZwidth + AECT_CCthic_CoilCoverthicknes)/2." rot="180.; 0.; 90." />
+  <posXYZ volume="ECT_CC_CoilCoverSide"     X_Y_Z="-(AECT_CCPwid_CoilCoverPhiwidth + AECT_CCthic_CoilCoverthicknes)/2. - GENV_Eps; AECT_CCSPYp_CoilCoverSideYpos;  AECT_OSCCZd_ShellCCZdimension/2.+2.25*AECT_EPthic_EndPlatethickness + GENV_Eps + (AECT_CCZwid_CoilCoverZwidth + AECT_CCthic_CoilCoverthicknes)/2." rot="  0.; 0.; 90." />
+  <posXYZ volume="ECT_CC_CoilCoverSide"     X_Y_Z="-(AECT_CCPwid_CoilCoverPhiwidth + AECT_CCthic_CoilCoverthicknes)/2. - GENV_Eps; AECT_CCSPYp_CoilCoverSideYpos; -AECT_OSCCZd_ShellCCZdimension/2.-2.25*AECT_EPthic_EndPlatethickness - GENV_Eps - (AECT_CCZwid_CoilCoverZwidth + AECT_CCthic_CoilCoverthicknes)/2." rot="180.; 0.; 90." />
+  <posXYZ volume="ECT_TS_ShellCoilCover"    X_Y_Z=" 0.;  AECT_TRSShr_ShellRadPos + GENV_Eps; 0." rot=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_TS_FrontSpecialBox"   X_Y_Z=" AECT_SFSBXp_ShellFSBXpos; -AECT_SCCXwi_ShellCCfullXwidth*GENV_Si225 - AECT_SFSBYw_ShellFSBfullYwidt*GENV_Co225 + AECT_OSCCtc_ShellCCthickconn*GENV_Si225*GENV_Si225+ AECT_TRSShr_ShellRadPos+AECT_OSCCOv_ShellCCoverlap*GENV_Si45; (AECT_OSCCZd_ShellCCZdimension-AECT_OSJPtc_ShellJPZlength)/2." rot=" 0.; 0.; 22.5" />
+  <posXYZ volume="ECT_TS_AxialForceBox"     X_Y_Z=" AECT_SAFBXp_ShellAFBXpos + GENV_Eps;  -AECT_SAFBXw_ShellAFBfullXwidt*GENV_Si225 - AECT_SAFBYw_ShellAFBfullYwidt*GENV_Co225 + AECT_OSAFBt_ShellAFBthickness*GENV_Si225*GENV_Si225+ AECT_TRSShr_ShellRadPos+AECT_OSCCOv_ShellCCoverlap*GENV_Si45  ; -(AECT_OSCCZd_ShellCCZdimension-(AECT_OSCCZd_ShellCCZdimension-AECT_OSJPtc_ShellJPZlength))/2." rot=" 0.; 0.; 22.5" />
+  <posXYZ volume="ECT_ST_StayTube_Tube"     X_Y_Z=" -AECT_TRSEPr_EndplateRadPos*GENV_Ta225 - AECT_EPHoPo_EndPlateHolepos*GENV_Si225;  AECT_TRSEPr_EndplateRadPos + AECT_EPHoPo_EndPlateHolepos*GENV_Co225; 0." rot=" 0.; 0.; 22.5" />
+  <posXYZ volume="ECT_ST_StayTube_Flange"   X_Y_Z=" -AECT_TRSEPr_EndplateRadPos*GENV_Ta225 - AECT_EPHoPo_EndPlateHolepos*GENV_Si225;  AECT_TRSEPr_EndplateRadPos + AECT_EPHoPo_EndPlateHolepos*GENV_Co225; AECT_OSCCZd_ShellCCZdimension/2.+AECT_STaflt_StayTubeAlignFlth/2. + GENV_Eps" rot=" 0.; 0.; 22.5" />
+  <posXYZ volume="ECT_ST_StayTube_Flange"   X_Y_Z=" -AECT_TRSEPr_EndplateRadPos*GENV_Ta225 - AECT_EPHoPo_EndPlateHolepos*GENV_Si225;  AECT_TRSEPr_EndplateRadPos + AECT_EPHoPo_EndPlateHolepos*GENV_Co225;-AECT_OSCCZd_ShellCCZdimension/2.-AECT_STaflt_StayTubeAlignFlth/2. - GENV_Eps" rot=" 0.; 0.; 22.5" />
+</composition>
+
+<!-- main envelope surrounding coldmass and thermal shield - atlteyv_0012, atlteyv_0014, atlteyv_0015, atlteyv_0025, atlteyv_0027 and atlteyv_0076 -->
+<var name="AECT_EVEPRI_EVEndPlateRadiInne"    value="   670.  "/> 
+<var name="AECT_EVEPRT_EVEndPlateRadiTurr"    value="   930.  "/>
+<var name="AECT_EVEPth_EVEndPlatethicknes"    value="    75.  "/> 
+<var name="AECT_EVEPid_EVEndPlateindist"      value="  4320.  "/> 
+<var name="AECT_EVEPod_EVEndPlateoutdist"     value="  5345.  "/>
+<var name="AECT_EVEPli_EVEndPlatelowinter"    value="  1212.  "/>
+<var name="AECT_EVEPui_EVEndPlateupinter"     value="  1238.  "/>
+<var name="AECT_EVEPHd_EVEndPlateHolediam"    value="   160.  "/>
+<var name="AECT_EVEPHr_EVEndPlateHolerad"     value="  3100.  "/>
+<var name="AECT_EVEPHa_EVEndPlateHoleang"     value="     3.6 "/>
+<var name="AECT_EVEPSl_EVEndPlatespeclen"     value="   303.  "/>
+<var name="AECT_EVEPSa_EVEndPlatespecang"     value="   127.5 "/>
+<var name="AECT_EVEPSr_EVEndPlatespecrad"     value="  3985.  "/>
+
+<var name="AECT_EVAFod_EVAlignFlangeoutdi"    value="   450.  "/>
+<var name="AECT_EVAFzw_EVAlignFlangezwidt"    value="    70.  "/>
+<var name="AECT_EVATid_EVAlignTubeinndiam"    value="   262.  "/>
+<var name="AECT_EVATww_EVAlignTuberwallwi"    value="    20.  "/>
+
+<var name="AECT_EVOShZ_EVOutShellholeZwid"    value="  4800.  "/>
+
+<var name="AECT_EVOSio_EVOutShellinneroff"    value="    15.  "/>
+<var name="AECT_EVOSso_EVOutShellspecioff"    value="    50.  "/>
+<var name="AECT_EVOSit_EVOutShellinnthick"    value="    40.  "/>
+<var name="AECT_EVOSCZ_EVOutShellConnZwid"    value="   120.  "/>
+
+<var name="AECT_EVOSCR_EVOutShellConnlowR"    value="   140.  "/>
+<var name="AECT_EVOSCR_EVOutShellConnbigR"    value="   220.  "/>
+<var name="AECT_EVOSCR_EVOutShellConnspeR"    value="   360.  "/>
+
+<var name="AECT_EVSSAh_EVSideSupporthight"    value="   225.  "/>
+<var name="AECT_EVSSAw_EVSideSupportwidth"    value="   250.  "/>
+<var name="AECT_EVTSAh_EVTopSupporthight"     value="   150.  "/>
+<var name="AECT_EVTSRa_EVTopSupportRadius"    value="  1230.  "/>
+<var name="AECT_EVTSAl_EVTopSupportlength"    value="  2913.  "/>
+<var name="AECT_EVTSCo_EVTopSupportCutoff"    value="    95.  "/>
+<var name="AECT_EVTSCw_EVTopSupportCutwid"    value="   103.  "/>
+
+<var name="AECT_EVSSan_EVSideSupportangle"    value="atan((AECT_EVEPod_EVEndPlateoutdist*GENV_Co225 + AECT_EVEPui_EVEndPlateupinter/2. *GENV_Si225 - AECT_EVEPid_EVEndPlateindist)/(AECT_EVEPod_EVEndPlateoutdist*GENV_Si225 - AECT_EVEPli_EVEndPlatelowinter/2. - AECT_EVEPui_EVEndPlateupinter/2. *GENV_Co225 ))"/>
+<var name="AECT_EVEPSt_EVEndPlatespectana"    value="tan((AECT_EVEPSa_EVEndPlatespecang-90)*GENV_PiS180)"/>
+
+<tubs name="ECT_EV_InnerTube"    material="Aluminium"  Rio_Z="0.; AECT_EVEPRI_EVEndPlateRadiInne; 2.*AECT_EVEPth_EVEndPlatethicknes"  nbPhi="20" />
+<tubs name="ECT_EV_TurretTube"   material="Aluminium"  Rio_Z="0.; AECT_EVEPRT_EVEndPlateRadiTurr; 2.*AECT_EVEPth_EVEndPlatethicknes"  nbPhi="20" />
+<tubs name="ECT_EV_AlignHole"    material="Aluminium"  Rio_Z="0.; AECT_EVEPHd_EVEndPlateHolediam/2.; 2.*AECT_EVEPth_EVEndPlatethicknes"  nbPhi="20" />
+
+<gvxy name="ECT_EV_EndPlate_basic" material="Aluminium" dZ="AECT_EVEPth_EVEndPlatethicknes">
+  <gvxy_point X_Y=" 0. ; 0. "/>
+  <gvxy_point X_Y=" AECT_EVEPod_EVEndPlateoutdist*GENV_Si225 ; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225 "/>
+  <gvxy_point X_Y=" AECT_EVEPod_EVEndPlateoutdist*GENV_Si225 -  AECT_EVEPui_EVEndPlateupinter/2. *GENV_Co225; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225 + AECT_EVEPui_EVEndPlateupinter/2. *GENV_Si225"/>
+  <gvxy_point X_Y=" AECT_EVEPli_EVEndPlatelowinter/2.; AECT_EVEPid_EVEndPlateindist"/>
+  <gvxy_point X_Y="-AECT_EVEPli_EVEndPlatelowinter/2.; AECT_EVEPid_EVEndPlateindist"/>
+  <gvxy_point X_Y="-AECT_EVEPod_EVEndPlateoutdist*GENV_Si225 +  AECT_EVEPui_EVEndPlateupinter/2. *GENV_Co225; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225 + AECT_EVEPui_EVEndPlateupinter/2. *GENV_Si225"/>
+  <gvxy_point X_Y="-AECT_EVEPod_EVEndPlateoutdist*GENV_Si225 ; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225 "/>
+</gvxy>
+
+<var name="AECT_EVEPpx_EVEndPlateS_Point6_X"    value="(AECT_EVEPid_EVEndPlateindist+(1./AECT_EVEPSt_EVEndPlatespectana)*(-AECT_EVEPli_EVEndPlatelowinter/2.)-(AECT_EVEPod_EVEndPlateoutdist*GENV_Co225+AECT_EVEPSl_EVEndPlatespeclen*GENV_Si225)-GENV_Ta225*(-AECT_EVEPod_EVEndPlateoutdist*GENV_Si225+AECT_EVEPSl_EVEndPlatespeclen*GENV_Co225))/(1./AECT_EVEPSt_EVEndPlatespectana-GENV_Ta225)"/>
+<var name="AECT_EVEPpy_EVEndPlateS_Point6_Y"    value="(-AECT_EVEPpx_EVEndPlateS_Point6_X+(-AECT_EVEPli_EVEndPlatelowinter/2.))/AECT_EVEPSt_EVEndPlatespectana+AECT_EVEPid_EVEndPlateindist"/>
+
+<gvxy name="ECT_EV_EndPlate_special" material="Aluminium" dZ="AECT_EVEPth_EVEndPlatethicknes">
+  <gvxy_point X_Y=" 0. ; 0. "/>
+  <gvxy_point X_Y=" AECT_EVEPod_EVEndPlateoutdist*GENV_Si225 ; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225 "/>
+  <gvxy_point X_Y=" AECT_EVEPod_EVEndPlateoutdist*GENV_Si225 -  AECT_EVEPui_EVEndPlateupinter/2. *GENV_Co225; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225 + AECT_EVEPui_EVEndPlateupinter/2. *GENV_Si225"/>
+  <gvxy_point X_Y=" AECT_EVEPli_EVEndPlatelowinter/2.; AECT_EVEPid_EVEndPlateindist"/>
+  <gvxy_point X_Y="-AECT_EVEPli_EVEndPlatelowinter/2.; AECT_EVEPid_EVEndPlateindist"/>
+  <gvxy_point X_Y=" AECT_EVEPpx_EVEndPlateS_Point6_X; AECT_EVEPpy_EVEndPlateS_Point6_Y"/>
+  <gvxy_point X_Y="-AECT_EVEPod_EVEndPlateoutdist*GENV_Si225+AECT_EVEPSl_EVEndPlatespeclen*GENV_Co225 ; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225+AECT_EVEPSl_EVEndPlatespeclen*GENV_Si225 "/>
+  <gvxy_point X_Y="-AECT_EVEPod_EVEndPlateoutdist*GENV_Si225 ; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225 "/>
+</gvxy>
+
+<subtraction name="ECT_EV_EndPlate_Inner_default" >
+  <posXYZ volume="ECT_EV_EndPlate_basic"    X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EV_InnerTube"         X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EV_AlignHole"         X_Y_Z=" AECT_EVEPHr_EVEndPlateHolerad*sin(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); AECT_EVEPHr_EVEndPlateHolerad*cos(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); 0." />
+</subtraction>
+
+<subtraction name="ECT_EV_EndPlate_Turret_default" >
+  <posXYZ volume="ECT_EV_EndPlate_basic"    X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EV_TurretTube"        X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EV_AlignHole"         X_Y_Z=" AECT_EVEPHr_EVEndPlateHolerad*sin(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); AECT_EVEPHr_EVEndPlateHolerad*cos(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); 0." />
+</subtraction>
+
+<subtraction name="ECT_EV_EndPlate_Inner_special_Sector6" >
+  <posXYZ volume="ECT_EV_EndPlate_special"  X_Y_Z=" 0.; 0.; 0." rot=" 0.; 180.; 0."/>
+  <posXYZ volume="ECT_EV_InnerTube"         X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EV_AlignHole"         X_Y_Z=" AECT_EVEPHr_EVEndPlateHolerad*sin(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); AECT_EVEPHr_EVEndPlateHolerad*cos(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); 0." />
+</subtraction>
+
+<subtraction name="ECT_EV_EndPlate_Turret_special_Sector6" >
+  <posXYZ volume="ECT_EV_EndPlate_special"  X_Y_Z=" 0.; 0.; 0." rot=" 0.; 180.; 0."/>
+  <posXYZ volume="ECT_EV_TurretTube"        X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EV_AlignHole"         X_Y_Z=" AECT_EVEPHr_EVEndPlateHolerad*sin(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); AECT_EVEPHr_EVEndPlateHolerad*cos(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); 0." />
+</subtraction>
+
+<subtraction name="ECT_EV_EndPlate_Inner_special_Sector7" >
+  <posXYZ volume="ECT_EV_EndPlate_special"  X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EV_InnerTube"         X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EV_AlignHole"         X_Y_Z=" AECT_EVEPHr_EVEndPlateHolerad*sin(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); AECT_EVEPHr_EVEndPlateHolerad*cos(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); 0." />
+</subtraction>
+
+<subtraction name="ECT_EV_EndPlate_Turret_special_Sector7" >
+  <posXYZ volume="ECT_EV_EndPlate_special"  X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EV_TurretTube"        X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EV_AlignHole"         X_Y_Z=" AECT_EVEPHr_EVEndPlateHolerad*sin(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); AECT_EVEPHr_EVEndPlateHolerad*cos(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); 0." />
+</subtraction>
+
+<var name="AECT_EVOSfo_EVOutShellfulloff" value="AECT_EVOSio_EVOutShellinneroff + AECT_EVOSit_EVOutShellinnthick"/>
+<var name="AECT_EVOSpx_OutShell_Point2_X" value="((AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSfo_EVOutShellfulloff)/GENV_Co225 + tan(AECT_EVSSan_EVSideSupportangle)*(AECT_EVEPli_EVEndPlatelowinter/2. + AECT_EVOSfo_EVOutShellfulloff*tan(AECT_EVSSan_EVSideSupportangle/2.))- (AECT_EVEPid_EVEndPlateindist - AECT_EVOSfo_EVOutShellfulloff))/(tan(AECT_EVSSan_EVSideSupportangle) + GENV_Ta225)"/>
+<var name="AECT_EVOSpx_OutShell_Point5_X" value="((AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSio_EVOutShellinneroff)/GENV_Co225 + tan(AECT_EVSSan_EVSideSupportangle)*(AECT_EVEPli_EVEndPlatelowinter/2. + AECT_EVOSio_EVOutShellinneroff*tan(AECT_EVSSan_EVSideSupportangle/2.))- (AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff))/(tan(AECT_EVSSan_EVSideSupportangle) + GENV_Ta225)"/>
+
+<gvxysx name="ECT_EV_OutShell_default" material="Aluminium" dZ="AECT_EVOShZ_EVOutShellholeZwid - 2.*AECT_EVOSCZ_EVOutShellConnZwid">
+  <gvxy_point X_Y=" AECT_EVEPli_EVEndPlatelowinter/2. + AECT_EVOSfo_EVOutShellfulloff*tan(AECT_EVSSan_EVSideSupportangle/2.); AECT_EVEPid_EVEndPlateindist - AECT_EVOSfo_EVOutShellfulloff"/>
+  <gvxy_point X_Y=" AECT_EVOSpx_OutShell_Point2_X; (AECT_EVOSpx_OutShell_Point2_X - (AECT_EVEPli_EVEndPlatelowinter/2. + AECT_EVOSfo_EVOutShellfulloff*tan(AECT_EVSSan_EVSideSupportangle/2.)))*tan(AECT_EVSSan_EVSideSupportangle) + AECT_EVEPid_EVEndPlateindist - AECT_EVOSfo_EVOutShellfulloff"/>
+  <gvxy_point X_Y=" (AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSfo_EVOutShellfulloff)*GENV_Si225; (AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSfo_EVOutShellfulloff)*GENV_Co225"/>
+  <gvxy_point X_Y=" (AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSio_EVOutShellinneroff)*GENV_Si225; (AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSio_EVOutShellinneroff)*GENV_Co225"/>
+  <gvxy_point X_Y=" AECT_EVOSpx_OutShell_Point5_X; (AECT_EVOSpx_OutShell_Point5_X - (AECT_EVEPli_EVEndPlatelowinter/2. + AECT_EVOSio_EVOutShellinneroff*tan(AECT_EVSSan_EVSideSupportangle/2.)))*tan(AECT_EVSSan_EVSideSupportangle) + AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff"/>
+  <gvxy_point X_Y=" AECT_EVEPli_EVEndPlatelowinter/2. + AECT_EVOSio_EVOutShellinneroff*tan(AECT_EVSSan_EVSideSupportangle/2.); AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff"/>
+</gvxysx>
+
+<var name="AECT_EVOSpx_OutShellS_Point7_X" value="-AECT_EVEPli_EVEndPlatelowinter/2. - AECT_EVOSio_EVOutShellinneroff*(1./cos((AECT_EVEPSa_EVEndPlatespecang-90)*GENV_PiS180) - tan((AECT_EVEPSa_EVEndPlatespecang-90)*GENV_PiS180))"/>
+<var name="AECT_EVOSpy_OutShellS_Point7_Y" value="AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff"/>
+<var name="AECT_EVOSpx_OutShellS_Point9_X" value="-AECT_EVEPod_EVEndPlateoutdist*GENV_Si225+AECT_EVEPSl_EVEndPlatespeclen*GENV_Co225 - (AECT_EVOSso_EVOutShellspecioff-AECT_EVOSio_EVOutShellinneroff)/(2.*GENV_Si225)"/>
+<var name="AECT_EVOSpy_OutShellS_Point9_Y" value="AECT_EVEPod_EVEndPlateoutdist*GENV_Co225+AECT_EVEPSl_EVEndPlatespeclen*GENV_Si225 - (AECT_EVOSso_EVOutShellspecioff+AECT_EVOSio_EVOutShellinneroff)/(2.*GENV_Co225)"/>
+
+<var name="AECT_EVOSpx_OutShellS_Point8_X" value="(AECT_EVOSpy_OutShellS_Point7_Y + (1./tan((AECT_EVEPSa_EVEndPlatespecang-90)*GENV_PiS180))*AECT_EVOSpx_OutShellS_Point7_X - GENV_Ta225*AECT_EVOSpx_OutShellS_Point9_X - AECT_EVOSpy_OutShellS_Point9_Y  )/((1./tan((AECT_EVEPSa_EVEndPlatespecang-90)*GENV_PiS180)) - GENV_Ta225)"/>
+
+<var name="AECT_EVOSpx_OutShellS_Point12_X" value="-AECT_EVEPod_EVEndPlateoutdist*GENV_Si225+AECT_EVEPSl_EVEndPlatespeclen*GENV_Co225 - (AECT_EVOSso_EVOutShellspecioff-AECT_EVOSio_EVOutShellinneroff)/(2.*GENV_Si225)"/>
+<var name="AECT_EVOSpy_OutShellS_Point12_Y" value="AECT_EVEPod_EVEndPlateoutdist*GENV_Co225+AECT_EVEPSl_EVEndPlatespeclen*GENV_Si225 - (AECT_EVOSso_EVOutShellspecioff+AECT_EVOSio_EVOutShellinneroff)/(2.*GENV_Co225) - AECT_EVOSit_EVOutShellinnthick/GENV_Co225"/>
+<var name="AECT_EVOSpx_OutShellS_Point14_X" value="-AECT_EVEPli_EVEndPlatelowinter/2. - (AECT_EVOSio_EVOutShellinneroff + AECT_EVOSit_EVOutShellinnthick)*(1./cos((AECT_EVEPSa_EVEndPlatespecang-90)*GENV_PiS180) - tan((AECT_EVEPSa_EVEndPlatespecang-90)*GENV_PiS180))"/>
+<var name="AECT_EVOSpy_OutShellS_Point14_Y" value="AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff - AECT_EVOSit_EVOutShellinnthick"/>
+
+<var name="AECT_EVOSpx_OutShellS_Point13_X" value="(AECT_EVOSpy_OutShellS_Point14_Y + (1./tan((AECT_EVEPSa_EVEndPlatespecang-90)*GENV_PiS180))*AECT_EVOSpx_OutShellS_Point14_X - GENV_Ta225*AECT_EVOSpx_OutShellS_Point12_X - AECT_EVOSpy_OutShellS_Point12_Y  )/((1./tan((AECT_EVEPSa_EVEndPlatespecang-90)*GENV_PiS180)) - GENV_Ta225)"/>
+
+<gvxy name="ECT_EV_OutShell_special" material="Aluminium" dZ="AECT_EVOShZ_EVOutShellholeZwid - 2.*AECT_EVOSCZ_EVOutShellConnZwid">
+  <gvxy_point X_Y=" AECT_EVEPli_EVEndPlatelowinter/2. + AECT_EVOSfo_EVOutShellfulloff*tan(AECT_EVSSan_EVSideSupportangle/2.); AECT_EVEPid_EVEndPlateindist - AECT_EVOSfo_EVOutShellfulloff"/>
+  <gvxy_point X_Y=" AECT_EVOSpx_OutShell_Point2_X; (AECT_EVOSpx_OutShell_Point2_X - (AECT_EVEPli_EVEndPlatelowinter/2. + AECT_EVOSfo_EVOutShellfulloff*tan(AECT_EVSSan_EVSideSupportangle/2.)))*tan(AECT_EVSSan_EVSideSupportangle) + AECT_EVEPid_EVEndPlateindist - AECT_EVOSfo_EVOutShellfulloff"/>
+  <gvxy_point X_Y=" (AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSfo_EVOutShellfulloff)*GENV_Si225; (AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSfo_EVOutShellfulloff)*GENV_Co225"/>
+  <gvxy_point X_Y=" (AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSio_EVOutShellinneroff)*GENV_Si225; (AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSio_EVOutShellinneroff)*GENV_Co225"/>
+  <gvxy_point X_Y=" AECT_EVOSpx_OutShell_Point5_X; (AECT_EVOSpx_OutShell_Point5_X - (AECT_EVEPli_EVEndPlatelowinter/2. + AECT_EVOSio_EVOutShellinneroff*tan(AECT_EVSSan_EVSideSupportangle/2.)))*tan(AECT_EVSSan_EVSideSupportangle) + AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff"/>
+  <gvxy_point X_Y=" AECT_EVEPli_EVEndPlatelowinter/2. + AECT_EVOSio_EVOutShellinneroff*tan(AECT_EVSSan_EVSideSupportangle/2.); AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff"/>
+  <gvxy_point X_Y=" AECT_EVOSpx_OutShellS_Point7_X ; AECT_EVOSpy_OutShellS_Point7_Y"/>
+  <gvxy_point X_Y=" AECT_EVOSpx_OutShellS_Point8_X ; AECT_EVOSpy_OutShellS_Point7_Y - tan((180.-AECT_EVEPSa_EVEndPlatespecang)*GENV_PiS180)*(AECT_EVOSpx_OutShellS_Point8_X - AECT_EVOSpx_OutShellS_Point7_X)"/> 
+  <gvxy_point X_Y=" AECT_EVOSpx_OutShellS_Point9_X ; AECT_EVOSpy_OutShellS_Point9_Y"/>
+  <gvxy_point X_Y=" -(AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSio_EVOutShellinneroff)*GENV_Si225; (AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSio_EVOutShellinneroff)*GENV_Co225"/>
+  <gvxy_point X_Y=" -(AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSfo_EVOutShellfulloff)*GENV_Si225; (AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSfo_EVOutShellfulloff)*GENV_Co225"/>
+  <gvxy_point X_Y=" AECT_EVOSpx_OutShellS_Point12_X ; AECT_EVOSpy_OutShellS_Point12_Y"/>
+  <gvxy_point X_Y=" AECT_EVOSpx_OutShellS_Point13_X; AECT_EVOSpy_OutShellS_Point14_Y - tan((180-AECT_EVEPSa_EVEndPlatespecang)*GENV_PiS180)*(AECT_EVOSpx_OutShellS_Point13_X - AECT_EVOSpx_OutShellS_Point14_X)"/>
+  <gvxy_point X_Y=" AECT_EVOSpx_OutShellS_Point14_X ; AECT_EVOSpy_OutShellS_Point14_Y"/>
+</gvxy>
+
+<!-- introduced becaused used for calculation-->
+<var name="AECT_EVOSpx_OutConnector_Point6_X" value="AECT_EVEPli_EVEndPlatelowinter/2. + AECT_EVOSCR_EVOutShellConnbigR*sin(AECT_EVSSan_EVSideSupportangle) - (AECT_EVOSCR_EVOutShellConnlowR - AECT_EVOSCR_EVOutShellConnbigR*cos(AECT_EVSSan_EVSideSupportangle))/tan(AECT_EVSSan_EVSideSupportangle)"/>
+<!--  derived variable for fifth point via the formula tan(suppangle)*(x-point6_x)+point6_y = -tan(22.5)*(x-point4_x)+point4_y for x coordinate, y simple trigonometry -->
+<var name="AECT_EVOSpx_OutConnector_Point5_X" value="((AECT_EVEPod_EVEndPlateoutdist*GENV_Si225 - AECT_EVOSCR_EVOutShellConnlowR*GENV_Si225)*GENV_Ta225+tan(AECT_EVSSan_EVSideSupportangle)*AECT_EVOSpx_OutConnector_Point6_X+(AECT_EVEPod_EVEndPlateoutdist*GENV_Co225 - AECT_EVOSCR_EVOutShellConnlowR*GENV_Co225) - (AECT_EVEPid_EVEndPlateindist - AECT_EVOSCR_EVOutShellConnlowR))/(GENV_Ta225+tan(AECT_EVSSan_EVSideSupportangle))"/>
+
+<gvxysx name="ECT_EV_OutShellConnector_default" material="Aluminium" dZ="AECT_EVOSCZ_EVOutShellConnZwid">
+  <gvxy_point X_Y=" AECT_EVEPli_EVEndPlatelowinter/2.; AECT_EVEPid_EVEndPlateindist"/>
+  <gvxy_point X_Y=" AECT_EVEPod_EVEndPlateoutdist*GENV_Si225 -  AECT_EVEPui_EVEndPlateupinter/2. *GENV_Co225; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225 + AECT_EVEPui_EVEndPlateupinter/2. *GENV_Si225"/>
+  <gvxy_point X_Y=" AECT_EVEPod_EVEndPlateoutdist*GENV_Si225 ; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225"/>
+  <gvxy_point X_Y=" (AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSCR_EVOutShellConnlowR)*GENV_Si225 ; (AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSCR_EVOutShellConnlowR)*GENV_Co225"/>
+  <gvxy_point X_Y=" AECT_EVOSpx_OutConnector_Point5_X ; (AECT_EVOSpx_OutConnector_Point5_X-AECT_EVOSpx_OutConnector_Point6_X)*tan(AECT_EVSSan_EVSideSupportangle)+AECT_EVEPid_EVEndPlateindist - AECT_EVOSCR_EVOutShellConnlowR"/>
+  <gvxy_point X_Y=" AECT_EVEPli_EVEndPlatelowinter/2. + AECT_EVOSCR_EVOutShellConnbigR*sin(AECT_EVSSan_EVSideSupportangle) - (AECT_EVOSCR_EVOutShellConnlowR - AECT_EVOSCR_EVOutShellConnbigR*cos(AECT_EVSSan_EVSideSupportangle))/tan(AECT_EVSSan_EVSideSupportangle); AECT_EVEPid_EVEndPlateindist - AECT_EVOSCR_EVOutShellConnlowR"/>
+</gvxysx>
+
+<var name="AECT_EVOSpx_OutConnectorS_Point14_X" value="-AECT_EVEPli_EVEndPlatelowinter/2. - AECT_EVOSCR_EVOutShellConnspeR*(1./cos((AECT_EVEPSa_EVEndPlatespecang-90)*GENV_PiS180)) + AECT_EVOSCR_EVOutShellConnlowR*AECT_EVEPSt_EVEndPlatespectana"/>
+<var name="AECT_EVOSpx_OutConnectorS_Point13_X" value="(AECT_EVEPid_EVEndPlateindist-AECT_EVOSCR_EVOutShellConnlowR+(1./AECT_EVEPSt_EVEndPlatespectana)*AECT_EVOSpx_OutConnectorS_Point14_X+GENV_Ta225*(AECT_EVEPod_EVEndPlateoutdist*GENV_Si225-AECT_EVEPSl_EVEndPlatespeclen*GENV_Co225)-AECT_EVEPod_EVEndPlateoutdist*GENV_Co225-AECT_EVEPSl_EVEndPlatespeclen*GENV_Si225+AECT_EVOSCR_EVOutShellConnlowR/GENV_Co225)/(1./AECT_EVEPSt_EVEndPlatespectana-GENV_Ta225)"/>
+
+<gvxy name="ECT_EV_OutShellConnector_special" material="Aluminium" dZ="AECT_EVOSCZ_EVOutShellConnZwid">
+  <gvxy_point X_Y=" AECT_EVEPli_EVEndPlatelowinter/2. + AECT_EVOSCR_EVOutShellConnbigR*sin(AECT_EVSSan_EVSideSupportangle) - (AECT_EVOSCR_EVOutShellConnlowR - AECT_EVOSCR_EVOutShellConnbigR*cos(AECT_EVSSan_EVSideSupportangle))/tan(AECT_EVSSan_EVSideSupportangle); AECT_EVEPid_EVEndPlateindist - AECT_EVOSCR_EVOutShellConnlowR"/>
+  <gvxy_point X_Y=" AECT_EVOSpx_OutConnector_Point5_X ; (AECT_EVOSpx_OutConnector_Point5_X-AECT_EVOSpx_OutConnector_Point6_X)*tan(AECT_EVSSan_EVSideSupportangle)+AECT_EVEPid_EVEndPlateindist - AECT_EVOSCR_EVOutShellConnlowR"/>
+  <gvxy_point X_Y=" (AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSCR_EVOutShellConnlowR)*GENV_Si225 ; (AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSCR_EVOutShellConnlowR)*GENV_Co225"/>
+  <gvxy_point X_Y=" AECT_EVEPod_EVEndPlateoutdist*GENV_Si225 ; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225"/>
+  <gvxy_point X_Y=" AECT_EVEPod_EVEndPlateoutdist*GENV_Si225 -  AECT_EVEPui_EVEndPlateupinter/2. *GENV_Co225; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225 + AECT_EVEPui_EVEndPlateupinter/2. *GENV_Si225"/>
+  <gvxy_point X_Y=" AECT_EVEPli_EVEndPlatelowinter/2.; AECT_EVEPid_EVEndPlateindist"/>
+  <gvxy_point X_Y="-AECT_EVEPli_EVEndPlatelowinter/2.; AECT_EVEPid_EVEndPlateindist"/>
+  <gvxy_point X_Y=" AECT_EVEPpx_EVEndPlateS_Point6_X; AECT_EVEPpy_EVEndPlateS_Point6_Y"/>
+  <gvxy_point X_Y="-AECT_EVEPod_EVEndPlateoutdist*GENV_Si225+AECT_EVEPSl_EVEndPlatespeclen*GENV_Co225 ; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225+AECT_EVEPSl_EVEndPlatespeclen*GENV_Si225 "/>
+  <gvxy_point X_Y="-AECT_EVEPod_EVEndPlateoutdist*GENV_Si225 ; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225 "/>
+  <gvxy_point X_Y="(-AECT_EVEPod_EVEndPlateoutdist+AECT_EVOSCR_EVOutShellConnlowR)*GENV_Si225 ; (AECT_EVEPod_EVEndPlateoutdist-AECT_EVOSCR_EVOutShellConnlowR)*GENV_Co225 "/>
+  <gvxy_point X_Y="-AECT_EVEPod_EVEndPlateoutdist*GENV_Si225+AECT_EVEPSl_EVEndPlatespeclen*GENV_Co225 ; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225+AECT_EVEPSl_EVEndPlatespeclen*GENV_Si225 - AECT_EVOSCR_EVOutShellConnlowR/GENV_Co225 "/>
+  <gvxy_point X_Y=" AECT_EVOSpx_OutConnectorS_Point13_X; AECT_EVEPid_EVEndPlateindist - AECT_EVOSCR_EVOutShellConnlowR - tan((180.-AECT_EVEPSa_EVEndPlatespecang)*GENV_PiS180)*(AECT_EVOSpx_OutConnectorS_Point13_X - AECT_EVOSpx_OutConnectorS_Point14_X)"/>
+  <gvxy_point X_Y=" AECT_EVOSpx_OutConnectorS_Point14_X; AECT_EVEPid_EVEndPlateindist - AECT_EVOSCR_EVOutShellConnlowR"/>
+</gvxy>
+
+<composition name="ECT_EV_Envelop_default" >
+  <posXYZ volume="ECT_EV_EndPlate_Inner_default"    X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225;  AECT_EVOShZ_EVOutShellholeZwid/2. + AECT_EVEPth_EVEndPlatethicknes/2. + GENV_Eps" rot=" 0.; 0.; -67.5"/>
+  <posXYZ volume="ECT_EV_EndPlate_Turret_default"   X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225; -AECT_EVOShZ_EVOutShellholeZwid/2. - AECT_EVEPth_EVEndPlatethicknes/2. - GENV_Eps" rot=" 0.; 0.; -67.5"/>
+  <posXYZ volume="ECT_EV_OutShell_default"          X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225;  0." rot=" 0.; 0.; -67.5"/>
+  <posXYZ volume="ECT_EV_OutShellConnector_default" X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225;  AECT_EVOShZ_EVOutShellholeZwid/2. - AECT_EVOSCZ_EVOutShellConnZwid/2. + GENV_Eps/2."    rot=" 0.; 0.; -67.5"/>
+  <posXYZ volume="ECT_EV_OutShellConnector_default" X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225; -AECT_EVOShZ_EVOutShellholeZwid/2. + AECT_EVOSCZ_EVOutShellConnZwid/2. - GENV_Eps/2."    rot=" 0.; 0.; -67.5"/>
+</composition>
+
+<composition name="ECT_EV_Envelop_special_Sector6" >
+  <posXYZ volume="ECT_EV_EndPlate_Inner_special_Sector6"    X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225;  AECT_EVOShZ_EVOutShellholeZwid/2. + AECT_EVEPth_EVEndPlatethicknes/2. + GENV_Eps" rot=" 0.; 0.; 22.5"/>
+  <posXYZ volume="ECT_EV_EndPlate_Turret_special_Sector6"   X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225; -AECT_EVOShZ_EVOutShellholeZwid/2. - AECT_EVEPth_EVEndPlatethicknes/2. - GENV_Eps" rot=" 0.; 0.; 22.5"/>
+  <posXYZ volume="ECT_EV_OutShell_special"          X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225;  0." rot=" 0.; 180.; 22.5"/>
+  <posXYZ volume="ECT_EV_OutShellConnector_special" X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225;  AECT_EVOShZ_EVOutShellholeZwid/2. - AECT_EVOSCZ_EVOutShellConnZwid/2. + GENV_Eps/2."    rot=" 0.; 180.; 22.5"/>
+  <posXYZ volume="ECT_EV_OutShellConnector_special" X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225; -AECT_EVOShZ_EVOutShellholeZwid/2. + AECT_EVOSCZ_EVOutShellConnZwid/2. - GENV_Eps/2."    rot=" 0.; 180.; 22.5"/>
+</composition>
+
+<composition name="ECT_EV_Envelop_special_Sector7" >
+  <posXYZ volume="ECT_EV_EndPlate_Inner_special_Sector7"    X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225;  AECT_EVOShZ_EVOutShellholeZwid/2. + AECT_EVEPth_EVEndPlatethicknes/2. + GENV_Eps" rot=" 0.; 0.; 22.5"/>
+  <posXYZ volume="ECT_EV_EndPlate_Turret_special_Sector7"   X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225; -AECT_EVOShZ_EVOutShellholeZwid/2. - AECT_EVEPth_EVEndPlatethicknes/2. - GENV_Eps" rot=" 0.; 0.; 22.5"/>
+  <posXYZ volume="ECT_EV_OutShell_special"          X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225;  0." rot=" 0.; 0.; 22.5"/>
+  <posXYZ volume="ECT_EV_OutShellConnector_special" X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225;  AECT_EVOShZ_EVOutShellholeZwid/2. - AECT_EVOSCZ_EVOutShellConnZwid/2. + GENV_Eps/2."    rot=" 0.; 0.; 22.5"/>
+  <posXYZ volume="ECT_EV_OutShellConnector_special" X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225; -AECT_EVOShZ_EVOutShellholeZwid/2. + AECT_EVOSCZ_EVOutShellConnZwid/2. - GENV_Eps/2."    rot=" 0.; 0.; 22.5"/>
+</composition>
+
+<box  name="ECT_EV_SideAttachment"           material="Aluminium"  X_Y_Z="AECT_EVSSAh_EVSideSupporthight - AECT_EVOSit_EVOutShellinnthick - AECT_EVOSio_EVOutShellinneroff; AECT_EVSSAw_EVSideSupportwidth; AECT_EVOShZ_EVOutShellholeZwid - 2.*AECT_EVOSCZ_EVOutShellConnZwid" />
+<box  name="ECT_EV_Attachment_basic"    material="Aluminium"  X_Y_Z="AECT_EVTSAl_EVTopSupportlength; 2.*AECT_EVTSAh_EVTopSupporthight; AECT_EVTSAh_EVTopSupporthight" />
+<box  name="ECT_EV_Attachment_CutBox"   material="Aluminium"  X_Y_Z="2.*AECT_EVTSCw_EVTopSupportCutwid; 4.*AECT_EVTSAh_EVTopSupporthight; AECT_EVTSAh_EVTopSupporthight" />
+<tubs name="ECT_EV_Attachment_CutTube"  material="Aluminium"  Rio_Z="0.; AECT_EVEPHd_EVEndPlateHolediam/2.; 2.*AECT_EVTSAh_EVTopSupporthight"  nbPhi="20" />
+
+<tubs name="ECT_EV_AlignFlange_default_pre"  material="Aluminium"  Rio_Z="AECT_EVEPHd_EVEndPlateHolediam/2.; AECT_EVAFod_EVAlignFlangeoutdi/2.; AECT_EVAFzw_EVAlignFlangezwidt"  nbPhi="20" />
+<tubs name="ECT_EV_AlignFlange_special_base" material="Aluminium"  Rio_Z="0.; AECT_EVAFod_EVAlignFlangeoutdi/2.; AECT_EVTSAh_EVTopSupporthight"  nbPhi="20" />
+<box  name="ECT_EV_AlignFlange_special_cut"  material="Aluminium"  X_Y_Z="2.*AECT_EVAFod_EVAlignFlangeoutdi; 2.*AECT_EVTSAh_EVTopSupporthight; 2.*AECT_EVTSAh_EVTopSupporthight" />
+<tubs name="ECT_EV_AlignTube_default_pre"    material="Aluminium"  Rio_Z="AECT_EVATid_EVAlignTubeinndiam/2.; AECT_EVATid_EVAlignTubeinndiam/2.+AECT_EVATww_EVAlignTuberwallwi; AECT_EVOShZ_EVOutShellholeZwid-2.*AECT_EVAFzw_EVAlignFlangezwidt - GENV_Eps"  nbPhi="20" />
+<tubs name="ECT_EV_AlignTube_special_pre"    material="Aluminium"  Rio_Z="AECT_EVATid_EVAlignTubeinndiam/2.; AECT_EVATid_EVAlignTubeinndiam/2.+AECT_EVATww_EVAlignTuberwallwi; AECT_EVOShZ_EVOutShellholeZwid-2.*AECT_EVTSAh_EVTopSupporthight - GENV_Eps"  nbPhi="20" />
+
+<subtraction name="ECT_EV_FrontAttachment" >
+  <posXYZ volume="ECT_EV_Attachment_basic"    X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EV_Attachment_CutBox"   X_Y_Z=" AECT_EVTSAl_EVTopSupportlength/2.; 0.;  -AECT_EVTSCo_EVTopSupportCutoff" />
+  <posXYZ volume="ECT_EV_Attachment_CutTube"  X_Y_Z=" AECT_EVEPHr_EVEndPlateHolerad*cos(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180) - AECT_EVTSRa_EVTopSupportRadius - AECT_EVTSAl_EVTopSupportlength/2.; -AECT_EVEPHr_EVEndPlateHolerad*sin(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); 0." />
+</subtraction>
+
+<subtraction name="ECT_EV_BackAttachment" >
+  <posXYZ volume="ECT_EV_Attachment_basic"    X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EV_Attachment_CutBox"   X_Y_Z=" AECT_EVTSAl_EVTopSupportlength/2.; 0.;  AECT_EVTSCo_EVTopSupportCutoff" />
+  <posXYZ volume="ECT_EV_Attachment_CutTube"  X_Y_Z=" AECT_EVEPHr_EVEndPlateHolerad*cos(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180) - AECT_EVTSRa_EVTopSupportRadius - AECT_EVTSAl_EVTopSupportlength/2.; -AECT_EVEPHr_EVEndPlateHolerad*sin(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); 0." />
+</subtraction>
+
+<composition name="ECT_EV_AlignTube_default">
+  <posRPhiZ   volume="ECT_EV_AlignTube_default_pre"  R_Phi_Z=" AECT_EVEPHr_EVEndPlateHolerad ; 22.5 - AECT_EVEPHa_EVEndPlateHoleang; 0. " />
+  <posRPhiZ   volume="ECT_EV_AlignFlange_default_pre"  R_Phi_Z=" AECT_EVEPHr_EVEndPlateHolerad ; 22.5 - AECT_EVEPHa_EVEndPlateHoleang; AECT_EVOShZ_EVOutShellholeZwid/2.-AECT_EVAFzw_EVAlignFlangezwidt/2. " />
+  <posRPhiZ   volume="ECT_EV_AlignFlange_default_pre"  R_Phi_Z=" AECT_EVEPHr_EVEndPlateHolerad ; 22.5 - AECT_EVEPHa_EVEndPlateHoleang;-AECT_EVOShZ_EVOutShellholeZwid/2.+AECT_EVAFzw_EVAlignFlangezwidt/2. " />
+</composition>
+
+<subtraction name="ECT_EV_AlignFlange_special_pre" >
+  <posXYZ volume="ECT_EV_AlignFlange_special_base"  X_Y_Z=" AECT_EVEPHr_EVEndPlateHolerad*cos(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180);-AECT_EVEPHr_EVEndPlateHolerad*sin(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); 0." />
+  <posXYZ volume="ECT_EV_AlignFlange_special_cut"   X_Y_Z=" AECT_EVEPHr_EVEndPlateHolerad*cos(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180);-GENV_Eps; 0." rot=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EV_Attachment_CutTube"        X_Y_Z=" AECT_EVEPHr_EVEndPlateHolerad*cos(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180);-AECT_EVEPHr_EVEndPlateHolerad*sin(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); 0." />
+</subtraction>
+
+<composition name="ECT_EV_AlignTube_special">
+  <posRPhiZ   volume="ECT_EV_AlignTube_special_pre"    R_Phi_Z=" AECT_EVEPHr_EVEndPlateHolerad ; -AECT_EVEPHa_EVEndPlateHoleang; 0. " />
+  <posRPhiZ   volume="ECT_EV_AlignFlange_special_pre"  R_Phi_Z=" 0. ; 0.; AECT_EVOShZ_EVOutShellholeZwid/2.-AECT_EVTSAh_EVTopSupporthight/2. " />
+  <posRPhiZ   volume="ECT_EV_AlignFlange_special_pre"  R_Phi_Z=" 0. ; 0.;-AECT_EVOShZ_EVOutShellholeZwid/2.+AECT_EVTSAh_EVTopSupporthight/2. " />
+</composition>
+
+<!-- radiation shielding mounted inside main envelope towards IP - atljt___0023, atljt___0026, atljt___0029 and atljt___0031 -->
+<var name="AECT_JTVSth_JTVShieldthicknes"    value="    80.  "/>
+<var name="AECT_JTVSlw_JTVShieldlowwidth"    value="   321.  "/>
+<var name="AECT_JTVSuw_JTVShieldupwidth"     value="  1854.  "/>
+<var name="AECT_JTVSth_JTVShieldtothight"    value="  1975.  "/>
+<var name="AECT_JTVSmh_JTVShieldmidhight"    value="  1850.  "/>
+<var name="AECT_JTVShd_JTVShieldholediam"    value="   650.  "/>
+<var name="AECT_JTVSpx_JTVShieldholeposX"    value="   195.  "/>
+<var name="AECT_JTVSpy_JTVShieldholeposY"    value="  1569.  "/>
+<var name="AECT_JTVSpr_JTVShieldposR"        value="  1470.  "/>
+<var name="AECT_JTVSpp_JTVShieldpophioff"    value="   435.  "/>
+
+<var name="AECT_JTVSth_JTVSpecial2tothig"    value="  1713.  "/>
+<var name="AECT_JTVSth_JTVSpecial1tothig"    value="  1690.  "/>
+<var name="AECT_JTVSlh_JTVSpecial1lowhig"    value="   931.  "/>
+<var name="AECT_JTVSmh_JTVSpecial1midhig"    value="   691.  "/>
+<var name="AECT_JTVSlh_JTVSpecial1phioff"    value="   170.  "/>
+
+<var name="AECT_JTVSpr_JTVSpecial2posR"      value="  1522.  "/>
+<var name="AECT_JTVSpr_JTVSpecial1posR"      value="  1717.  "/>
+
+<gvxy name="ECT_JTV_Shielding_basic" material="PolyBoronB4C" dZ="AECT_JTVSth_JTVShieldthicknes">
+  <gvxy_point X_Y=" AECT_JTVSlw_JTVShieldlowwidth/2.; 0."/>
+  <gvxy_point X_Y=" AECT_JTVSuw_JTVShieldupwidth/2.; AECT_JTVSmh_JTVShieldmidhight"/>
+  <gvxy_point X_Y=" 0.; AECT_JTVSth_JTVShieldtothight"/>
+  <gvxy_point X_Y="-AECT_JTVSuw_JTVShieldupwidth/2.; AECT_JTVSmh_JTVShieldmidhight"/>
+  <gvxy_point X_Y="-AECT_JTVSlw_JTVShieldlowwidth/2.; 0."/>
+</gvxy>
+
+<tubs name="ECT_JTV_AlignHole"    material="PolyBoronB4C"  Rio_Z="0.; AECT_JTVShd_JTVShieldholediam/2.; 2.*AECT_JTVSth_JTVShieldthicknes"  nbPhi="20" />
+
+<subtraction name="ECT_JTV_Shielding_default_tmp" >
+  <posXYZ volume="ECT_JTV_Shielding_basic"  X_Y_Z=" AECT_JTVSlw_JTVShieldlowwidth/2.*GENV_Co225+AECT_JTVSpp_JTVShieldpophioff; AECT_JTVSpr_JTVShieldposR-AECT_JTVSlw_JTVShieldlowwidth/2.*GENV_Si225;  AECT_EVOShZ_EVOutShellholeZwid/2. - AECT_JTVSth_JTVShieldthicknes/2." rot=" 0.; 0.; -22.5"/>
+  <posXYZ volume="ECT_JTV_AlignHole"        X_Y_Z=" AECT_JTVSpp_JTVShieldpophioff+(AECT_JTVSlw_JTVShieldlowwidth/2.+AECT_JTVSpx_JTVShieldholeposX)*GENV_Co225+AECT_JTVSpy_JTVShieldholeposY*GENV_Si225; AECT_JTVSpr_JTVShieldposR-(AECT_JTVSlw_JTVShieldlowwidth/2.+AECT_JTVSpx_JTVShieldholeposX)*GENV_Si225+AECT_JTVSpy_JTVShieldholeposY*GENV_Co225; AECT_EVOShZ_EVOutShellholeZwid/2. - AECT_JTVSth_JTVShieldthicknes/2."/>
+</subtraction>
+
+<composition name="ECT_JTV_Shielding_default" >
+  <posXYZ volume="ECT_JTV_Shielding_default_tmp"  rot=" 0.; 0.; -45."/>
+</composition>
+
+<gvxy name="ECT_JTV_Shielding_special1" material="PolyBoronB4C" dZ="AECT_JTVSth_JTVShieldthicknes">
+  <gvxy_point X_Y=" 0.; 0."/>
+  <gvxy_point X_Y=" 0.; AECT_JTVSlh_JTVSpecial1lowhig"/>
+  <gvxy_point X_Y=" AECT_JTVSlh_JTVSpecial1phioff; AECT_JTVSlh_JTVSpecial1lowhig"/>
+  <gvxy_point X_Y=" AECT_JTVSlh_JTVSpecial1phioff; AECT_JTVSth_JTVSpecial1tothig"/>  
+  <gvxy_point X_Y=" (AECT_JTVSlh_JTVSpecial1lowhig+AECT_JTVSmh_JTVSpecial1midhig)*GENV_Ta225; AECT_JTVSlh_JTVSpecial1lowhig+AECT_JTVSmh_JTVSpecial1midhig"/> 
+</gvxy>
+
+<gvxy name="ECT_JTV_Shielding_special2" material="PolyBoronB4C" dZ="AECT_JTVSth_JTVShieldthicknes">
+  <gvxy_point X_Y=" 0.; 0."/>
+  <gvxy_point X_Y=" 0.; AECT_JTVSth_JTVSpecial1tothig"/>
+  <gvxy_point X_Y=" -AECT_JTVSth_JTVSpecial2tothig*GENV_Si225; AECT_JTVSth_JTVSpecial2tothig*GENV_Co225"/>
+</gvxy>
+
+<composition name="ECT_JTV_Shielding_special" >
+  <posXYZ volume="ECT_JTV_Shielding_special1"  X_Y_Z=" -AECT_JTVSpp_JTVShieldpophioff; AECT_JTVSpr_JTVSpecial1posR; AECT_EVOShZ_EVOutShellholeZwid/2. - AECT_JTVSth_JTVShieldthicknes/2." rot=" 0.; 0.; 22.5"/>
+  <posXYZ volume="ECT_JTV_Shielding_special2"  X_Y_Z=" -AECT_JTVSpp_JTVShieldpophioff - (AECT_JTVSpr_JTVSpecial1posR-AECT_JTVSpr_JTVSpecial2posR)/GENV_Ta225; AECT_JTVSpr_JTVSpecial2posR;  AECT_EVOShZ_EVOutShellholeZwid/2. - AECT_JTVSth_JTVShieldthicknes/2." rot=" 0.; 0.; 22.5" />
+</composition>
+
+<!-- central tube surrounding beampipe - atlteyv_0017 -->
+<var name="AECT_CTIcle_CentTubeIncomplen"    value="  4953. - 14. "/>
+<var name="AECT_CTIpo1_CentTubeInposoff1"    value="    70.  "/>
+<var name="AECT_CTIpo2_CentTubeInposoff2"    value="   565.  "/>
+<var name="AECT_CTIpo3_CentTubeInposoff3"    value="   500.  "/>
+<var name="AECT_CTIdi1_CentTubeInDiainn1"    value="  1220.  "/>
+<var name="AECT_CTIdi3_CentTubeInDiainn3"    value="  1650.  "/>
+<var name="AECT_CTIdi4_CentTubeInDiainn4"    value="  1730.  "/>
+<var name="AECT_CTIdo1_CentTubeInDiaout1"    value="  1339.  "/>
+<var name="AECT_CTIdo2_CentTubeInDiaout2"    value="  1859.  "/>
+<var name="AECT_CTIdo3_CentTubeInDiaout3"    value="  2400.  "/>
+<var name="AECT_CTIno2_CentTubeInnegoff2"    value="   185.  "/>
+<var name="AECT_CTIdit_CentTubeInDiaintu"    value="  1740.  "/>
+<var name="AECT_CTIdot_CentTubeInDiaoutu"    value="  1780.  "/>
+<var name="AECT_CTIpfo_CentTubeInpofuoff"    value="   750.  "/>
+
+<pcon name="ECT_EV_CentralTube" material="ShieldSteel" nbPhi="20" >
+  <polyplane Rio_Z=" AECT_CTIdi1_CentTubeInDiainn1/2.; AECT_CTIdo1_CentTubeInDiaout1/2.;  AECT_CTIcle_CentTubeIncomplen/2." />
+  <polyplane Rio_Z=" AECT_CTIdi1_CentTubeInDiainn1/2.; AECT_CTIdo1_CentTubeInDiaout1/2.;  AECT_CTIcle_CentTubeIncomplen/2. - AECT_CTIpo1_CentTubeInposoff1" />
+  <polyplane Rio_Z=" AECT_CTIdi1_CentTubeInDiainn1/2.; AECT_CTIdo2_CentTubeInDiaout2/2.;  AECT_CTIcle_CentTubeIncomplen/2. - AECT_CTIpo1_CentTubeInposoff1" />
+  <polyplane Rio_Z=" AECT_CTIdi1_CentTubeInDiainn1/2.; AECT_CTIdo2_CentTubeInDiaout2/2.;  AECT_CTIcle_CentTubeIncomplen/2. - AECT_CTIpfo_CentTubeInpofuoff + AECT_CTIpo2_CentTubeInposoff2" />
+  <polyplane Rio_Z=" AECT_CTIdi3_CentTubeInDiainn3/2.; AECT_CTIdo2_CentTubeInDiaout2/2.;  AECT_CTIcle_CentTubeIncomplen/2. - AECT_CTIpfo_CentTubeInpofuoff + AECT_CTIpo2_CentTubeInposoff2" />
+  <polyplane Rio_Z=" AECT_CTIdi3_CentTubeInDiainn3/2.; AECT_CTIdo2_CentTubeInDiaout2/2.;  AECT_CTIcle_CentTubeIncomplen/2. - AECT_CTIpfo_CentTubeInpofuoff + AECT_CTIpo3_CentTubeInposoff3" />
+  <polyplane Rio_Z=" AECT_CTIdi4_CentTubeInDiainn4/2.; AECT_CTIdo2_CentTubeInDiaout2/2.;  AECT_CTIcle_CentTubeIncomplen/2. - AECT_CTIpfo_CentTubeInpofuoff + AECT_CTIpo3_CentTubeInposoff3" />
+  <polyplane Rio_Z=" AECT_CTIdi4_CentTubeInDiainn4/2.; AECT_CTIdo2_CentTubeInDiaout2/2.;  AECT_CTIcle_CentTubeIncomplen/2.-AECT_CTIpfo_CentTubeInpofuoff + AECT_CTIpo3_CentTubeInposoff3" />
+  <polyplane Rio_Z=" AECT_CTIdi4_CentTubeInDiainn4/2.; AECT_CTIdo2_CentTubeInDiaout2/2.;  AECT_CTIcle_CentTubeIncomplen/2.-AECT_CTIpfo_CentTubeInpofuoff" />
+  <polyplane Rio_Z=" AECT_CTIdit_CentTubeInDiaintu/2.; AECT_CTIdot_CentTubeInDiaoutu/2.;  AECT_CTIcle_CentTubeIncomplen/2.-AECT_CTIpfo_CentTubeInpofuoff" />
+  <polyplane Rio_Z=" AECT_CTIdit_CentTubeInDiaintu/2.; AECT_CTIdot_CentTubeInDiaoutu/2.; -AECT_CTIcle_CentTubeIncomplen/2.+AECT_CTIpfo_CentTubeInpofuoff" />
+  <polyplane Rio_Z=" AECT_CTIdi4_CentTubeInDiainn4/2.; AECT_CTIdo2_CentTubeInDiaout2/2.; -AECT_CTIcle_CentTubeIncomplen/2.+AECT_CTIpfo_CentTubeInpofuoff" />
+  <polyplane Rio_Z=" AECT_CTIdi4_CentTubeInDiainn4/2.; AECT_CTIdo2_CentTubeInDiaout2/2.; -AECT_CTIcle_CentTubeIncomplen/2.+AECT_CTIno2_CentTubeInnegoff2" />
+  <polyplane Rio_Z=" AECT_CTIdi4_CentTubeInDiainn4/2.; AECT_CTIdo3_CentTubeInDiaout3/2.; -AECT_CTIcle_CentTubeIncomplen/2.+AECT_CTIno2_CentTubeInnegoff2" />
+  <polyplane Rio_Z=" AECT_CTIdi4_CentTubeInDiainn4/2.; AECT_CTIdo3_CentTubeInDiaout3/2.; -AECT_CTIcle_CentTubeIncomplen/2.+AECT_CTIpo1_CentTubeInposoff1" />
+  <polyplane Rio_Z=" AECT_CTIdi4_CentTubeInDiainn4/2.; AECT_CTIdo2_CentTubeInDiaout2/2.; -AECT_CTIcle_CentTubeIncomplen/2.+AECT_CTIpo1_CentTubeInposoff1" />
+  <polyplane Rio_Z=" AECT_CTIdi4_CentTubeInDiainn4/2.; AECT_CTIdo2_CentTubeInDiaout2/2.; -AECT_CTIcle_CentTubeIncomplen/2." />
+</pcon>
+
+<!-- JTV surrounding central tube IP - atljt___0037-vAD -->
+<var name="AECT_JTVFRi_FrontRingInnerRad"    value="  1305. "/>
+<var name="AECT_JTVFDo_FrontRingOuterDia"    value="  2840. "/>
+<var name="AECT_JTVFMr_FrontRingMostInRa"    value="   930. "/>
+<var name="AECT_JTVFZw_FrontRingZwidth"      value="   160. "/>
+<var name="AECT_JTVFZp_FrontRingZposition"   value="   220. "/> <!-- relative pos - from drilling hole position + combination with atlteyv_0076 -->
+<!-- JTV surrounding central tube non IP - atljt___0039-vAC -->
+<var name="AECT_JTVBRi_BackRingInnerRad"     value="  1245. "/>
+<var name="AECT_JTVBDm_BackRingMediumDia"    value="  2400. "/>
+<var name="AECT_JTVBDo_BackRingOuterDia"     value="  2690. "/>
+<var name="AECT_JTVBMr_BackRingMostInRa"     value="   965. "/>
+<var name="AECT_JTVBZw_BackRingZwidth"       value="   140. "/>
+<var name="AECT_JTVBZo_BackRingZoffset"      value="    80. "/>
+
+<pcon name="ECT_JTV_FrontRing" material="PolyBoronB4C" nbPhi="20" >
+  <polyplane Rio_Z=" AECT_JTVFMr_FrontRingMostInRa; AECT_JTVFRi_FrontRingInnerRad; AECT_CTIcle_CentTubeIncomplen/2. - AECT_CTIpo1_CentTubeInposoff1 - AECT_JTVFZp_FrontRingZposition" />
+  <polyplane Rio_Z=" AECT_JTVFMr_FrontRingMostInRa; AECT_JTVFDo_FrontRingOuterDia/2.; AECT_JTVFDo_FrontRingOuterDia/2. - AECT_JTVFRi_FrontRingInnerRad + AECT_CTIcle_CentTubeIncomplen/2. - AECT_CTIpo1_CentTubeInposoff1 - AECT_JTVFZp_FrontRingZposition" />
+  <polyplane Rio_Z=" AECT_JTVFMr_FrontRingMostInRa; AECT_JTVFDo_FrontRingOuterDia/2.; AECT_JTVFZw_FrontRingZwidth + AECT_CTIcle_CentTubeIncomplen/2. - AECT_CTIpo1_CentTubeInposoff1 - AECT_JTVFZp_FrontRingZposition" />
+</pcon>
+
+<pcon name="ECT_JTV_BackRing" material="PolyBoronB4C" nbPhi="20" >
+  <polyplane Rio_Z=" AECT_JTVBDm_BackRingMediumDia/2. + GENV_Eps; AECT_JTVBDo_BackRingOuterDia/2.; -AECT_CTIcle_CentTubeIncomplen/2.+AECT_CTIno2_CentTubeInnegoff2 - AECT_JTVBZw_BackRingZwidth + AECT_JTVBZo_BackRingZoffset" />
+  <polyplane Rio_Z=" AECT_JTVBDm_BackRingMediumDia/2. + GENV_Eps; AECT_JTVBDo_BackRingOuterDia/2.; - AECT_JTVBDo_BackRingOuterDia/2. + AECT_JTVBRi_BackRingInnerRad -AECT_CTIcle_CentTubeIncomplen/2.+AECT_CTIno2_CentTubeInnegoff2 + AECT_JTVBZo_BackRingZoffset" />
+  <polyplane Rio_Z=" AECT_JTVBDm_BackRingMediumDia/2. + GENV_Eps; AECT_JTVBRi_BackRingInnerRad + AECT_JTVBZo_BackRingZoffset; -AECT_CTIcle_CentTubeIncomplen/2.+AECT_CTIno2_CentTubeInnegoff2 " />
+  <polyplane Rio_Z=" AECT_JTVBMr_BackRingMostInRa; AECT_JTVBRi_BackRingInnerRad + AECT_JTVBZo_BackRingZoffset; -AECT_CTIcle_CentTubeIncomplen/2.+AECT_CTIno2_CentTubeInnegoff2 " />
+  <polyplane Rio_Z=" AECT_JTVBMr_BackRingMostInRa; AECT_JTVBRi_BackRingInnerRad; -AECT_CTIcle_CentTubeIncomplen/2.+AECT_CTIno2_CentTubeInnegoff2 + AECT_JTVBZo_BackRingZoffset " />
+</pcon>
+
+<!-- yoke positioned at the ends of central tube - atlteyv_0076, atlteys_0007 and atlteys_0013 -->
+<var name="AECT_CTYpoZ_CentTubeYokeposZ"     value="  1932 "/>
+<var name="AECT_CTYthi_CentTubeYokethick"    value="    60.  "/>
+<var name="AECT_CTYwid_CentTubeYokewidth"    value="   125.  "/>
+<var name="AECT_CTYlen_CentTubeYokelengt"    value="  1500.  "/>
+<var name="AECT_CTYidi_CentTubeYokeindia"    value="   130.  "/>
+<var name="AECT_CTYodi_CentTubeYokeoudia"    value="   300.  "/>
+<var name="AECT_CTYpdi_CentTubeYokeposdi"    value="  1860.  "/>
+<var name="AECT_CTYst1_CentTubeYokesupt1"    value="    30.  "/>
+<var name="AECT_CTYst2_CentTubeYokesupt2"    value="    40.  "/>
+<var name="AECT_CTYSan_CentTubeYokesupa"     value="atan(AECT_CTYodi_CentTubeYokeoudia/AECT_CTYpdi_CentTubeYokeposdi)/GENV_PiS180"/>
+
+<tubs name="ECT_EV_Yoke_Connector"   material="Iron"  Rio_Z="0.; AECT_CTYodi_CentTubeYokeoudia/2.; AECT_CTYthi_CentTubeYokethick + AECT_CTYst1_CentTubeYokesupt1 + AECT_CTYst2_CentTubeYokesupt2"  nbPhi="20" />
+<tubs name="ECT_EV_Yoke_End"         material="Iron"  Rio_Z="AECT_CTYidi_CentTubeYokeindia/2.; AECT_CTYodi_CentTubeYokeoudia/2.; AECT_CTYthi_CentTubeYokethick + GENV_Eps"  nbPhi="20" />
+<box  name="ECT_EV_Yoke_Box"         material="Iron"  X_Y_Z="AECT_CTYlen_CentTubeYokelengt+AECT_CTYodi_CentTubeYokeoudia/2.; AECT_CTYthi_CentTubeYokethick; AECT_CTYwid_CentTubeYokewidth" />
+
+<union name="ECT_EV_Yoke_basic">
+  <posXYZ volume="ECT_EV_Yoke_Box"          X_Y_Z=" AECT_CTYthi_CentTubeYokethick/2.+AECT_CTYst2_CentTubeYokesupt2; -(AECT_CTYlen_CentTubeYokelengt+AECT_CTYodi_CentTubeYokeoudia)/2.; 0." rot="  0.; 0.; 90. "/>
+  <posXYZ volume="ECT_EV_Yoke_Connector"    X_Y_Z=" (AECT_CTYthi_CentTubeYokethick + AECT_CTYst1_CentTubeYokesupt1 + AECT_CTYst2_CentTubeYokesupt2)/2.; 0.; 0." rot="  0.; 90.; 0. " />
+  <posXYZ volume="ECT_EV_Yoke_End"          X_Y_Z=" AECT_CTYthi_CentTubeYokethick/2.+AECT_CTYst2_CentTubeYokesupt2; -(AECT_CTYlen_CentTubeYokelengt+AECT_CTYodi_CentTubeYokeoudia);  0." rot="  0.; 90.; 0. "/>
+</union>
+
+<tubs  name="ECT_EV_Yoke_InnerSupport" material="Iron"  Rio_Z="AECT_CTYpdi_CentTubeYokeposdi/2.; AECT_CTYpdi_CentTubeYokeposdi/2.+AECT_CTYst2_CentTubeYokesupt2; AECT_CTYodi_CentTubeYokeoudia + AECT_CTYst2_CentTubeYokesupt2"  profile="22.5+AECT_CTYSan_CentTubeYokesupa;135.-2.*AECT_CTYSan_CentTubeYokesupa"  nbPhi="20" />
+<tubs  name="ECT_EV_Yoke_OuterSupport" material="Iron"  Rio_Z="AECT_CTYpdi_CentTubeYokeposdi/2. + AECT_CTYst2_CentTubeYokesupt2 + AECT_CTYthi_CentTubeYokethick ; AECT_CTYpdi_CentTubeYokeposdi/2. + AECT_CTYst2_CentTubeYokesupt2 + AECT_CTYthi_CentTubeYokethick + AECT_CTYst1_CentTubeYokesupt1; AECT_CTYodi_CentTubeYokeoudia/2."  profile="22.5+AECT_CTYSan_CentTubeYokesupa;135.-2.*AECT_CTYSan_CentTubeYokesupa"  nbPhi="20" />
+
+<composition name="ECT_EV_Yoke">
+  <posRPhiZ  volume="ECT_EV_Yoke_InnerSupport" R_Phi_Z=" GENV_Eps/2. ;  0.; 0. "/>   
+  <posRPhiZ  volume="ECT_EV_Yoke_OuterSupport" R_Phi_Z=" GENV_Eps/2 ;  0.; 0. "/>   
+  <posRPhiZ  volume="ECT_EV_Yoke_basic"        R_Phi_Z=" AECT_CTYpdi_CentTubeYokeposdi/2.+GENV_Eps/2 ;  22.5; 0. " />
+  <posRPhiZ  volume="ECT_EV_Yoke_basic"        R_Phi_Z="-AECT_CTYpdi_CentTubeYokeposdi/2.-GENV_Eps/2 ; -22.5; 0. " rot="  0.; 180.; 0. "/>
+</composition>
+
+<!-- thermal shielding surrounding central tube - atlteyr_0349 and atlteyr_0310 -->
+<var name="AECT_CTTSid_CentTubeTSInnDia"     value="  1965.  "/>
+<var name="AECT_CTTSil_CentTubeTSinnlen"     value="  3400.  "/>
+<var name="AECT_CTTSFi_CentTubeTSFIDia1"     value="  2100.  "/>
+<var name="AECT_CTTSFi_CentTubeTSFIDia2"     value="  2610.  "/>
+<var name="AECT_CTTSFl_CentTubeTSFlength"    value="   260.  "/>
+<var name="AECT_CTTSth_CentTubeTSthickne"    value="    10.  "/>
+
+<tubs name="ECT_TS_CentralTube_inner"    material="Aluminium" Rio_Z="AECT_CTTSid_CentTubeTSInnDia/2.; AECT_CTTSid_CentTubeTSInnDia/2. + AECT_CTTSth_CentTubeTSthickne;  AECT_CTTSil_CentTubeTSinnlen " nbPhi="20" />
+<tubs name="ECT_TS_CentralTube_middle"   material="Aluminium" Rio_Z="AECT_CTTSid_CentTubeTSInnDia/2.; AECT_CTTSFi_CentTubeTSFIDia1/2. + AECT_CTTSth_CentTubeTSthickne; 3.*AECT_CTTSth_CentTubeTSthickne" nbPhi="20" />
+<pcon name="ECT_TS_CentralTube_top" material="Aluminium" nbPhi="20" profile=" -7.; 194.">
+  <polyplane Rio_Z=" AECT_CTTSFi_CentTubeTSFIDia2/2.; AECT_CTTSFi_CentTubeTSFIDia2/2. + AECT_CTTSth_CentTubeTSthickne;  AECT_CTTSil_CentTubeTSinnlen/2. + 3.*AECT_CTTSth_CentTubeTSthickne + AECT_CTTSFl_CentTubeTSFlength" />
+  <polyplane Rio_Z=" AECT_CTTSFi_CentTubeTSFIDia1/2.; AECT_CTTSFi_CentTubeTSFIDia1/2. + AECT_CTTSth_CentTubeTSthickne;  AECT_CTTSil_CentTubeTSinnlen/2. + 3.*AECT_CTTSth_CentTubeTSthickne " />
+</pcon>
+<pcon name="ECT_TS_CentralTube_low" material="Aluminium" nbPhi="20" profile=" 200.; 140.">
+  <polyplane Rio_Z=" AECT_CTTSFi_CentTubeTSFIDia2/2.; AECT_CTTSFi_CentTubeTSFIDia2/2. + AECT_CTTSth_CentTubeTSthickne;  AECT_CTTSil_CentTubeTSinnlen/2. + 3.*AECT_CTTSth_CentTubeTSthickne + AECT_CTTSFl_CentTubeTSFlength" />
+  <polyplane Rio_Z=" AECT_CTTSFi_CentTubeTSFIDia1/2.; AECT_CTTSFi_CentTubeTSFIDia1/2. + AECT_CTTSth_CentTubeTSthickne;  AECT_CTTSil_CentTubeTSinnlen/2. + 3.*AECT_CTTSth_CentTubeTSthickne " />
+</pcon>
+
+<composition name="ECT_TS_CentralTube">
+  <posXYZ    volume="ECT_TS_CentralTube_inner"/>   
+  <posXYZ    volume="ECT_TS_CentralTube_middle" X_Y_Z="0. ; 0.;  AECT_CTTSil_CentTubeTSinnlen/2. + 3.*AECT_CTTSth_CentTubeTSthickne/2. + GENV_Eps/2."/>   
+  <posXYZ    volume="ECT_TS_CentralTube_middle" X_Y_Z="0. ; 0.;-(AECT_CTTSil_CentTubeTSinnlen/2. + 3.*AECT_CTTSth_CentTubeTSthickne/2. + GENV_Eps/2.)"/>   
+  <posXYZ    volume="ECT_TS_CentralTube_top"  X_Y_Z=" 0. ; 0.; GENV_Eps"/>
+  <posXYZ    volume="ECT_TS_CentralTube_top"  X_Y_Z=" 0. ; 0.;-GENV_Eps" rot="  0.; 180.; 0. "/>
+  <posXYZ    volume="ECT_TS_CentralTube_low"  X_Y_Z=" 0. ; 0.; GENV_Eps"/>
+  <posXYZ    volume="ECT_TS_CentralTube_low"  X_Y_Z=" 0. ; 0.;-GENV_Eps" rot="  0.; 180.; 0. "/>
+</composition>
+
+<!-- tie rod and corresponding mounting points attached to main envelope - atlteyv_0026, atlteyv_0027, atlte___0009, atlteys_0001 and derived calculations-->
+<var  name="AECT_CryStOL0_CryStoutLength0"   value="   545." />
+<var  name="AECT_CryStOL1_CryStoutLength1"   value="   400." />
+<var  name="AECT_CryStOW0_CryStoutpWidth0"   value="  1080." />
+<var  name="AECT_CryStOW1_CryStoutpWidth1"   value="   770." />
+<var  name="AECT_CryStOH1_CryStoutRadius"    value="  4530." />
+<var  name="AECT_CryStOPZ_CryStoutPosiZ"     value="    50." />
+<var  name="AECT_CryStIwi_CryStinnZwidth"    value="   400." />
+<var  name="AECT_CryStIhi_CryStinnhight"     value="   250." />
+<var  name="AECT_CryStIos_CryStinnoffset"    value="    50." />
+<var  name="AECT_CryoStTh_CryoStopThickness" value="    40." />
+<var  name="AECT_TieRodZl_TieRodZlength"     value="  3660." />
+<var  name="AECT_TieRodDi_TieRodDiameter"    value="    56." />
+<var  name="AECT_TieRodPo_TieRodPhioffset"   value="    71." />
+<var  name="AECT_TieRodZo_TieRodZoffset"     value="   135." />
+<var  name="AECT_TieRodRo_TieRodRoffset"     value="    75." />
+
+<box  name="ECT_CryoStop1"  material="Aluminium"  X_Y_Z=" AECT_CryStOW0_CryStoutpWidth0; AECT_CryStOH1_CryStoutRadius-(AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff); AECT_CryStOL0_CryStoutLength0" />
+<box  name="ECT_CryoStop2"  material="Aluminium"  X_Y_Z=" AECT_CryStOW0_CryStoutpWidth0-2.*AECT_CryoStTh_CryoStopThickness ; AECT_CryStOH1_CryStoutRadius-(AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff)     ; AECT_CryStOL0_CryStoutLength0+GENV_Eps " />
+<trd  name="ECT_CryoStop3"  material="Aluminium"  
+ Xmp_Ymp_Z=" AECT_CryStOW0_CryStoutpWidth0+GENV_Eps ; AECT_CryStOW0_CryStoutpWidth0+GENV_Eps ;
+             2.*AECT_CryoStTh_CryoStopThickness ; 2.*(AECT_CryStOH1_CryStoutRadius-(AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff)); AECT_CryStOH1_CryStoutRadius-(AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff) - AECT_CryoStTh_CryoStopThickness" />
+<box  name="ECT_CryoStop4"  material="Aluminium"  X_Y_Z=" AECT_CryStOW1_CryStoutpWidth1; AECT_CryStOH1_CryStoutRadius-(AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff)+GENV_Eps ; AECT_CryStOL0_CryStoutLength0+GENV_Eps " />
+<subtraction  name="ECT_EV_CryoStop_outside_basic" >
+  <posXYZ   volume="ECT_CryoStop1" />
+  <posXYZ   volume="ECT_CryoStop2"  X_Y_Z=" 0. ; -AECT_CryoStTh_CryoStopThickness   ;         0.       " />
+  <posXYZ   volume="ECT_CryoStop3"  X_Y_Z=" 0. ; (AECT_CryStOH1_CryStoutRadius-(AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff))/2. ; -AECT_CryStOL0_CryStoutLength0/2. + AECT_CryStOL1_CryStoutLength1 +(AECT_CryStOH1_CryStoutRadius-(AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff) - AECT_CryoStTh_CryoStopThickness)/2. " />
+  <posXYZ   volume="ECT_CryoStop4" />
+</subtraction>
+
+<composition  name="ECT_EV_CryoStop_outside_tmp" >
+  <posXYZ   volume="ECT_EV_CryoStop_outside_basic" rot="  0.; 0.; -90. "/>
+</composition>
+
+<var name="AFT_ECTBrkt_Thickness"           value="  20. " />
+<var name="AFT_ECTBrkt_LowPlateThickness"   value="  30. " />
+<var name="AFT_ECTBrkt_CtrSpacerGap"        value=" 360. " />
+<var name="AFT_ECTBrkt_MidSpacerGap"        value=" 720. " />
+<var name="AFT_ECTBrkt_SmallXWidth"         value="1080. " />
+<var name="AFT_ECTBrkt_TotalXWidth"         value="1120. " />
+<var name="AFT_ECTBrkt_TotalYWidth"         value=" 230. " />
+
+<var name="AFT_ECTBrkt_TopPlate_ZWidth"     value=" 115. " />
+<var name="AFT_ECTBrkt_DownPlate_ZWidth"    value=" 200. " />
+<var name="AFT_ECTBrkt_SidePlate_ZWidth"    value=" 510. " />
+<var name="AFT_ECTBrkt_ZOffset"             value=" 165. " />
+<var name="AFT_ECTBrkt_PlateZOffset"        value="  25. " />
+<var name="AFT_ECTBrkt_PlateSmallYOffset"   value="  55. " />
+<var name="AFT_ECTBrkt_PlateBigYOffset"     value=" 119.5" />
+<var name="AFT_ECTBrkt_SpacerYOffset"       value=" 110. " />
+
+<box  name="AFT_ECTBrkt_CtrSpacer"     material="Iron"    X_Y_Z=" AFT_ECTBrkt_CtrSpacerGap; AFT_ECTBrkt_Thickness; AFT_ECTBrkt_TopPlate_ZWidth" />
+<box  name="AFT_ECTBrkt_MidSpacer"     material="Iron"    X_Y_Z=" (AFT_ECTBrkt_MidSpacerGap-AFT_ECTBrkt_CtrSpacerGap)/2.-AFT_ECTBrkt_Thickness; AFT_ECTBrkt_Thickness; AFT_ECTBrkt_TopPlate_ZWidth" />
+<box  name="AFT_ECTBrkt_LowCtrPlate"   material="Iron"    X_Y_Z=" AFT_ECTBrkt_SmallXWidth; AFT_ECTBrkt_Thickness; AFT_ECTBrkt_DownPlate_ZWidth-AFT_ECTBrkt_Thickness" />
+<box  name="AFT_ECTBrkt_LowSidePlate"  material="Iron"    X_Y_Z=" (AFT_ECTBrkt_TotalXWidth-AFT_ECTBrkt_MidSpacerGap)/2.+AFT_ECTBrkt_Thickness; AFT_ECTBrkt_LowPlateThickness; AFT_ECTBrkt_SidePlate_ZWidth" />
+<box  name="AFT_ECTBrkt_CrossPlate"    material="Iron"    X_Y_Z=" AFT_ECTBrkt_SmallXWidth; AFT_ECTBrkt_TotalYWidth-AFT_ECTBrkt_LowPlateThickness; AFT_ECTBrkt_Thickness" />
+
+<gvxy name="AFT_ECTBrkt_FrontPlate" material="Iron" dZ="AFT_ECTBrkt_Thickness" >
+  <gvxy_point X_Y="                                           0.; 0. " />
+  <gvxy_point X_Y="                                           0.; AFT_ECTBrkt_TotalYWidth-AFT_ECTBrkt_LowPlateThickness-AFT_ECTBrkt_Thickness" />
+  <gvxy_point X_Y="                     AFT_ECTBrkt_PlateZOffset; AFT_ECTBrkt_TotalYWidth-AFT_ECTBrkt_LowPlateThickness-AFT_ECTBrkt_Thickness" />
+  <gvxy_point X_Y=" AFT_ECTBrkt_ZOffset-AFT_ECTBrkt_PlateZOffset; AFT_ECTBrkt_PlateZOffset" />
+  <gvxy_point X_Y=" AFT_ECTBrkt_ZOffset-AFT_ECTBrkt_PlateZOffset; 0. " />
+</gvxy>
+
+<gvxy name="AFT_ECTBrkt_SidePlate" material="Iron" dZ="AFT_ECTBrkt_Thickness" >
+  <gvxy_point X_Y=" 0.; AFT_ECTBrkt_Thickness " />
+  <gvxy_point X_Y=" AFT_ECTBrkt_DownPlate_ZWidth-AFT_ECTBrkt_Thickness; AFT_ECTBrkt_Thickness " />
+  <gvxy_point X_Y=" AFT_ECTBrkt_DownPlate_ZWidth-AFT_ECTBrkt_Thickness; 0. " />
+  <gvxy_point X_Y=" AFT_ECTBrkt_SidePlate_ZWidth-2.*AFT_ECTBrkt_Thickness-AFT_ECTBrkt_ZOffset; 0. " />
+  <gvxy_point X_Y=" AFT_ECTBrkt_SidePlate_ZWidth-2.*AFT_ECTBrkt_Thickness-AFT_ECTBrkt_ZOffset; AFT_ECTBrkt_PlateSmallYOffset " />
+  <gvxy_point X_Y=" AFT_ECTBrkt_PlateZOffset;  AFT_ECTBrkt_TotalYWidth-AFT_ECTBrkt_LowPlateThickness-AFT_ECTBrkt_Thickness" />
+  <gvxy_point X_Y=" 0.;  AFT_ECTBrkt_TotalYWidth-AFT_ECTBrkt_LowPlateThickness-AFT_ECTBrkt_Thickness" />
+</gvxy>
+
+<gvxy name="AFT_ECTBrkt_MiddlePlate" material="Iron" dZ="AFT_ECTBrkt_Thickness" >
+  <gvxy_point X_Y=" 0.; 0. " />
+  <gvxy_point X_Y=" AFT_ECTBrkt_DownPlate_ZWidth-2.*AFT_ECTBrkt_Thickness; 0. " />
+  <gvxy_point X_Y=" AFT_ECTBrkt_DownPlate_ZWidth-2.*AFT_ECTBrkt_Thickness; AFT_ECTBrkt_PlateBigYOffset-AFT_ECTBrkt_Thickness " />
+  <gvxy_point X_Y=" AFT_ECTBrkt_PlateZOffset; AFT_ECTBrkt_TotalYWidth-AFT_ECTBrkt_LowPlateThickness-2.*AFT_ECTBrkt_Thickness " />
+  <gvxy_point X_Y=" 0.; AFT_ECTBrkt_TotalYWidth-AFT_ECTBrkt_LowPlateThickness-2.*AFT_ECTBrkt_Thickness " />
+</gvxy>
+
+<box name="AFT_ECTBrkt_GapCloser"       material="Iron"     X_Y_Z="(AFT_ECTBrkt_MidSpacerGap-AFT_ECTBrkt_CtrSpacerGap-2.*AFT_ECTBrkt_Thickness)/2.; AFT_ECTBrkt_TotalYWidth-AFT_ECTBrkt_LowPlateThickness+(AFT_ECTBrkt_MidSpacerGap-AFT_ECTBrkt_CtrSpacerGap-2.*AFT_ECTBrkt_Thickness)/2.; 122." /> <!-- z dimension adjusted from construction -->
+<box name="AFT_ECTBrkt_GapCloserRub"    material="Carbon"   X_Y_Z="(AFT_ECTBrkt_MidSpacerGap-AFT_ECTBrkt_CtrSpacerGap-2.*AFT_ECTBrkt_Thickness)/1.5; (AFT_ECTBrkt_TotalYWidth-AFT_ECTBrkt_LowPlateThickness+(AFT_ECTBrkt_MidSpacerGap-AFT_ECTBrkt_CtrSpacerGap-2.*AFT_ECTBrkt_Thickness)/2.)/2.; 70." />
+
+<composition name="AFT_ECTBrkt_tmp" >
+  <posXYZ  volume="AFT_ECTBrkt_LowSidePlate"         X_Y_Z=" ((AFT_ECTBrkt_TotalXWidth-AFT_ECTBrkt_MidSpacerGap)/2.+AFT_ECTBrkt_Thickness)/2.+AFT_ECTBrkt_MidSpacerGap/2.-AFT_ECTBrkt_Thickness; AFT_ECTBrkt_LowPlateThickness/2.; AFT_ECTBrkt_SidePlate_ZWidth/2. " />
+  <posXYZ  volume="AFT_ECTBrkt_LowSidePlate"         X_Y_Z="-((AFT_ECTBrkt_TotalXWidth-AFT_ECTBrkt_MidSpacerGap)/2.+AFT_ECTBrkt_Thickness)/2.-AFT_ECTBrkt_MidSpacerGap/2.+AFT_ECTBrkt_Thickness; AFT_ECTBrkt_LowPlateThickness/2.; AFT_ECTBrkt_SidePlate_ZWidth/2. " />
+  <posXYZ  volume="AFT_ECTBrkt_LowCtrPlate"          X_Y_Z=" 0.; AFT_ECTBrkt_LowPlateThickness+AFT_ECTBrkt_Thickness/2.; AFT_ECTBrkt_SidePlate_ZWidth-AFT_ECTBrkt_ZOffset-(AFT_ECTBrkt_DownPlate_ZWidth+AFT_ECTBrkt_Thickness)/2." />
+  <posXYZ  volume="AFT_ECTBrkt_CrossPlate"           X_Y_Z=" 0.; AFT_ECTBrkt_LowPlateThickness+(AFT_ECTBrkt_TotalYWidth-AFT_ECTBrkt_LowPlateThickness)/2.; AFT_ECTBrkt_SidePlate_ZWidth-AFT_ECTBrkt_ZOffset-AFT_ECTBrkt_Thickness/2. " />
+  <posXYZ  volume="AFT_ECTBrkt_FrontPlate"           X_Y_Z=" AFT_ECTBrkt_TotalXWidth/2.-AFT_ECTBrkt_Thickness; AFT_ECTBrkt_LowPlateThickness; AFT_ECTBrkt_SidePlate_ZWidth-AFT_ECTBrkt_ZOffset " rot="0.; -90.; 0."/>
+  <posXYZ  volume="AFT_ECTBrkt_FrontPlate"           X_Y_Z="-AFT_ECTBrkt_TotalXWidth/2.+AFT_ECTBrkt_Thickness; AFT_ECTBrkt_LowPlateThickness; AFT_ECTBrkt_SidePlate_ZWidth-AFT_ECTBrkt_ZOffset " rot="0.; -90.; 0."/>
+  <posXYZ  volume="AFT_ECTBrkt_SidePlate"            X_Y_Z=" AFT_ECTBrkt_SmallXWidth/2.-AFT_ECTBrkt_Thickness/2.; AFT_ECTBrkt_LowPlateThickness; AFT_ECTBrkt_SidePlate_ZWidth-2.*AFT_ECTBrkt_Thickness-AFT_ECTBrkt_ZOffset+AFT_ECTBrkt_Thickness " rot="0.; 90.; 0." />
+  <posXYZ  volume="AFT_ECTBrkt_SidePlate"            X_Y_Z=" AFT_ECTBrkt_Thickness/2.+AFT_ECTBrkt_MidSpacerGap/2.; AFT_ECTBrkt_LowPlateThickness; AFT_ECTBrkt_SidePlate_ZWidth-2.*AFT_ECTBrkt_Thickness-AFT_ECTBrkt_ZOffset+AFT_ECTBrkt_Thickness " rot="0.; 90.; 0."/>
+  <posXYZ  volume="AFT_ECTBrkt_SidePlate"            X_Y_Z="-AFT_ECTBrkt_SmallXWidth/2.+AFT_ECTBrkt_Thickness/2.; AFT_ECTBrkt_LowPlateThickness; AFT_ECTBrkt_SidePlate_ZWidth-2.*AFT_ECTBrkt_Thickness-AFT_ECTBrkt_ZOffset+AFT_ECTBrkt_Thickness " rot="0.; 90.; 0."/>
+  <posXYZ  volume="AFT_ECTBrkt_SidePlate"            X_Y_Z="-AFT_ECTBrkt_Thickness/2.-AFT_ECTBrkt_MidSpacerGap/2.; AFT_ECTBrkt_LowPlateThickness; AFT_ECTBrkt_SidePlate_ZWidth-2.*AFT_ECTBrkt_Thickness-AFT_ECTBrkt_ZOffset+AFT_ECTBrkt_Thickness " rot="0.; 90.; 0."/>
+  <posXYZ  volume="AFT_ECTBrkt_MiddlePlate"          X_Y_Z=" AFT_ECTBrkt_CtrSpacerGap/2.+AFT_ECTBrkt_Thickness/2.; AFT_ECTBrkt_LowPlateThickness+AFT_ECTBrkt_Thickness; AFT_ECTBrkt_SidePlate_ZWidth-AFT_ECTBrkt_ZOffset-AFT_ECTBrkt_Thickness " rot="0.; 90.; 0."/>
+  <posXYZ  volume="AFT_ECTBrkt_MiddlePlate"          X_Y_Z="-AFT_ECTBrkt_CtrSpacerGap/2.-AFT_ECTBrkt_Thickness/2.; AFT_ECTBrkt_LowPlateThickness+AFT_ECTBrkt_Thickness; AFT_ECTBrkt_SidePlate_ZWidth-AFT_ECTBrkt_ZOffset-AFT_ECTBrkt_Thickness " rot="0.; 90.; 0."/>
+  <posXYZ  volume="AFT_ECTBrkt_CtrSpacer"            X_Y_Z=" 0.; AFT_ECTBrkt_LowPlateThickness+AFT_ECTBrkt_Thickness/2.+AFT_ECTBrkt_SpacerYOffset; -AFT_ECTBrkt_TopPlate_ZWidth/2.+AFT_ECTBrkt_SidePlate_ZWidth-AFT_ECTBrkt_ZOffset-AFT_ECTBrkt_Thickness" />
+  <posXYZ  volume="AFT_ECTBrkt_MidSpacer"            X_Y_Z=" (AFT_ECTBrkt_MidSpacerGap+AFT_ECTBrkt_CtrSpacerGap)/4.+AFT_ECTBrkt_Thickness/2.; AFT_ECTBrkt_LowPlateThickness+AFT_ECTBrkt_Thickness/2.+AFT_ECTBrkt_SpacerYOffset; -AFT_ECTBrkt_TopPlate_ZWidth/2.+AFT_ECTBrkt_SidePlate_ZWidth-AFT_ECTBrkt_ZOffset-AFT_ECTBrkt_Thickness" />
+  <posXYZ  volume="AFT_ECTBrkt_MidSpacer"            X_Y_Z="-(AFT_ECTBrkt_MidSpacerGap+AFT_ECTBrkt_CtrSpacerGap)/4.-AFT_ECTBrkt_Thickness/2.; AFT_ECTBrkt_LowPlateThickness+AFT_ECTBrkt_Thickness/2.+AFT_ECTBrkt_SpacerYOffset; -AFT_ECTBrkt_TopPlate_ZWidth/2.+AFT_ECTBrkt_SidePlate_ZWidth-AFT_ECTBrkt_ZOffset-AFT_ECTBrkt_Thickness" />
+  <posXYZ  volume="AFT_ECTBrkt_GapCloser"            X_Y_Z="(AFT_ECTBrkt_MidSpacerGap-AFT_ECTBrkt_CtrSpacerGap)/4.+AFT_ECTBrkt_CtrSpacerGap/2.+AFT_ECTBrkt_Thickness/2.; (AFT_ECTBrkt_TotalYWidth-AFT_ECTBrkt_LowPlateThickness+(AFT_ECTBrkt_MidSpacerGap-AFT_ECTBrkt_CtrSpacerGap-2.*AFT_ECTBrkt_Thickness)/2.)/2. + AFT_ECTBrkt_LowPlateThickness+GENV_Eps; AFT_ECTBrkt_SidePlate_ZWidth-AFT_ECTBrkt_ZOffset+123./2."/>
+  <posXYZ  volume="AFT_ECTBrkt_GapCloser"            X_Y_Z="-((AFT_ECTBrkt_MidSpacerGap-AFT_ECTBrkt_CtrSpacerGap)/4.+AFT_ECTBrkt_CtrSpacerGap/2.+AFT_ECTBrkt_Thickness/2.); (AFT_ECTBrkt_TotalYWidth-AFT_ECTBrkt_LowPlateThickness+(AFT_ECTBrkt_MidSpacerGap-AFT_ECTBrkt_CtrSpacerGap-2.*AFT_ECTBrkt_Thickness)/2.)/2. + AFT_ECTBrkt_LowPlateThickness+GENV_Eps; AFT_ECTBrkt_SidePlate_ZWidth-AFT_ECTBrkt_ZOffset+123./2."/>
+  <posXYZ  volume="AFT_ECTBrkt_GapCloserRub"         X_Y_Z="(AFT_ECTBrkt_MidSpacerGap-AFT_ECTBrkt_CtrSpacerGap)/4.+AFT_ECTBrkt_CtrSpacerGap/2.+AFT_ECTBrkt_Thickness/2.; (AFT_ECTBrkt_TotalYWidth-AFT_ECTBrkt_LowPlateThickness+(AFT_ECTBrkt_MidSpacerGap-AFT_ECTBrkt_CtrSpacerGap-2.*AFT_ECTBrkt_Thickness)/2.)/2. + AFT_ECTBrkt_LowPlateThickness+GENV_Eps; AFT_ECTBrkt_SidePlate_ZWidth-AFT_ECTBrkt_ZOffset+124.+70./2."/>
+  <posXYZ  volume="AFT_ECTBrkt_GapCloserRub"         X_Y_Z="-((AFT_ECTBrkt_MidSpacerGap-AFT_ECTBrkt_CtrSpacerGap)/4.+AFT_ECTBrkt_CtrSpacerGap/2.+AFT_ECTBrkt_Thickness/2.); (AFT_ECTBrkt_TotalYWidth-AFT_ECTBrkt_LowPlateThickness+(AFT_ECTBrkt_MidSpacerGap-AFT_ECTBrkt_CtrSpacerGap-2.*AFT_ECTBrkt_Thickness)/2.)/2. + AFT_ECTBrkt_LowPlateThickness+GENV_Eps; AFT_ECTBrkt_SidePlate_ZWidth-AFT_ECTBrkt_ZOffset+124.+70./2."/>
+</composition>
+
+<composition  name="AFT_ECTBrkt" >
+  <posXYZ   volume="AFT_ECTBrkt_tmp" X_Y_Z=" (AECT_CryStOH1_CryStoutRadius-(AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff))/2.; 0.; -AECT_CryStOL0_CryStoutLength0/2." rot="  0.; 0.; -90. "/>
+</composition>
+
+<composition  name="ECT_EV_CryoStop_outside" >
+  <posRPhiZ   volume="ECT_EV_CryoStop_outside_tmp" R_Phi_Z="  AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff + (AECT_CryStOH1_CryStoutRadius-(AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff))/2.; 22.5; -AECT_EVOShZ_EVOutShellholeZwid/2. + AECT_EVOSCZ_EVOutShellConnZwid +AECT_CryStOL0_CryStoutLength0/2.+AECT_CryStOPZ_CryStoutPosiZ "/>
+  <posRPhiZ   volume="AFT_ECTBrkt" R_Phi_Z="   AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff + (AECT_CryStOH1_CryStoutRadius-(AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff))/2.; 22.5; -AECT_EVOShZ_EVOutShellholeZwid/2. + AECT_EVOSCZ_EVOutShellConnZwid +AECT_CryStOL0_CryStoutLength0/2.+AECT_CryStOPZ_CryStoutPosiZ " />
+</composition>
+
+<gvxy name="ECT_CryoStop_inside_basic" material="Aluminium" dZ="AECT_CryoStTh_CryoStopThickness">
+  <gvxy_point X_Y=" -AECT_CryStIos_CryStinnoffset; 0."/>
+  <gvxy_point X_Y=" -AECT_CryStIwi_CryStinnZwidth; 0."/>
+  <gvxy_point X_Y=" -AECT_CryStIwi_CryStinnZwidth; -AECT_CryStIos_CryStinnoffset"/>
+  <gvxy_point X_Y=" -(AECT_CryStIhi_CryStinnhight-AECT_CryStIos_CryStinnoffset)*GENV_Si45; -AECT_CryStIhi_CryStinnhight"/>
+  <gvxy_point X_Y=" 0.; -AECT_CryStIhi_CryStinnhight"/>
+  <gvxy_point X_Y=" 0.; -AECT_CryStIos_CryStinnoffset"/>
+</gvxy>
+
+<tubs name="ECT_TieRod"    material="Iron"  Rio_Z="0.; AECT_TieRodDi_TieRodDiameter/2.; AECT_TieRodZl_TieRodZlength"  nbPhi="20" />
+
+<composition name="ECT_EV_CryoStop_inside_basic">
+  <posXYZ   volume="ECT_CryoStop_inside_basic"  X_Y_Z=" (AECT_CryStOW0_CryStoutpWidth0 - AECT_CryoStTh_CryoStopThickness)/2. ; 0.; 0." rot=" 0.; 90.; 0."/>
+  <posXYZ   volume="ECT_CryoStop_inside_basic"  X_Y_Z="-(AECT_CryStOW0_CryStoutpWidth0 - AECT_CryoStTh_CryoStopThickness)/2. ; 0.; 0." rot=" 0.; 90.; 0."/>
+  <posXYZ   volume="ECT_TieRod"                 X_Y_Z=" (AECT_CryStOW0_CryStoutpWidth0)/2. - AECT_CryoStTh_CryoStopThickness - AECT_TieRodPo_TieRodPhioffset; -AECT_CryStIhi_CryStinnhight + AECT_TieRodRo_TieRodRoffset; AECT_TieRodZo_TieRodZoffset + AECT_TieRodZl_TieRodZlength/2." rot=" 0.; 0.; 0."/>
+  <posXYZ   volume="ECT_TieRod"                 X_Y_Z="-(AECT_CryStOW0_CryStoutpWidth0)/2. + AECT_CryoStTh_CryoStopThickness + AECT_TieRodPo_TieRodPhioffset; -AECT_CryStIhi_CryStinnhight + AECT_TieRodRo_TieRodRoffset; AECT_TieRodZo_TieRodZoffset + AECT_TieRodZl_TieRodZlength/2." rot=" 0.; 0.; 0."/>
+</composition>
+
+<composition  name="ECT_EV_CryoStop_inside_tmp" >
+  <posXYZ   volume="ECT_EV_CryoStop_inside_basic" rot="  0.; 0.; -90. "/>
+</composition>
+
+<composition  name="ECT_EV_CryoStop_inside" >
+  <posRPhiZ   volume="ECT_EV_CryoStop_inside_tmp" R_Phi_Z=" AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff - AECT_EVOSit_EVOutShellinnthick; 22.5; -AECT_EVOShZ_EVOutShellholeZwid/2. + AECT_EVOSCZ_EVOutShellConnZwid "/>
+</composition>
+
+<!-- Atlas End-Cap toroid Service Turret - whole construction approximated -->
+<var  name="AECT_SrvTu1Dz_ServTur1Dz"        value="   830." />
+<var  name="AECT_SrvTu1He_ServTur1Height"    value="  2350." />  <!-- original value 2000, modified due to overlap with new ECT-ServiceTower  -->
+<var  name="AECT_SrvTu1oW_ServTur1OutWidth"  value="  1100." />
+<var  name="AECT_SrvTu1iW_ServTur1InnWidth"  value="  1000." />
+<var  name="AECT_SrvTu1Ed_ServTur1Edge"      value="   120." />
+<var  name="AECT_SrvTu2Dz_ServTur2Dz"        value="   900." />
+<var  name="AECT_SrvTu2He_ServTur2Height"    value="  1000." />
+<var  name="AECT_SrvTu2oR_ServTur2OutRad"    value="   150." />
+<var  name="AECT_SrvTu2iR_ServTur2InnRad"    value="   140." />
+<var  name="AECT_SrvTu3Dz_ServTur3Dz"        value="   260." />
+<var  name="AECT_SrvTu3He_ServTur3Height"    value="  3650." />  <!-- original value 4000, modified due to overlap with new ECT-ServiceTower -->
+<var  name="AECT_ServTuZoff_ServTurZoffset"  value="   834." />
+
+
+<!-- Description of the Atlas End-cap Toroid Service Turret -->
+
+<gvxysxy  name="ECT_ServTur1"  material="Aluminium"  dZ="AECT_SrvTu1He_ServTur1Height" >
+  <gvxy_point  X_Y=" AECT_SrvTu1oW_ServTur1OutWidth/2. ; AECT_SrvTu1oW_ServTur1OutWidth/2.-AECT_SrvTu1Ed_ServTur1Edge " />
+  <gvxy_point  X_Y=" AECT_SrvTu1oW_ServTur1OutWidth/2.-AECT_SrvTu1Ed_ServTur1Edge ; AECT_SrvTu1oW_ServTur1OutWidth/2. " />
+</gvxysxy>
+<gvxysxy  name="ECT_ServTur0"  material="Aluminium"  dZ="AECT_SrvTu1He_ServTur1Height" >
+  <gvxy_point  X_Y=" AECT_SrvTu1iW_ServTur1InnWidth/2. ; AECT_SrvTu1iW_ServTur1InnWidth/2.-AECT_SrvTu1Ed_ServTur1Edge*AECT_SrvTu1iW_ServTur1InnWidth/AECT_SrvTu1oW_ServTur1OutWidth " />
+  <gvxy_point  X_Y=" AECT_SrvTu1iW_ServTur1InnWidth/2.-AECT_SrvTu1Ed_ServTur1Edge*AECT_SrvTu1iW_ServTur1InnWidth/AECT_SrvTu1oW_ServTur1OutWidth ; AECT_SrvTu1iW_ServTur1InnWidth/2. " />
+</gvxysxy>
+<subtraction  name="ECT_ServTurA" >
+  <posXYZ  volume="ECT_ServTur1" rot=" 90.; 0.; 0. "/>
+  <posXYZ  volume="ECT_ServTur0" X_Y_Z=" 0. ; -AECT_SrvTu1oW_ServTur1OutWidth+AECT_SrvTu1iW_ServTur1InnWidth ; 0. " rot=" 90.; 0.; 0. "/>
+</subtraction>
+<tubs name="ECT_ServTurB1_base" material="Aluminium"  Rio_Z="AECT_SrvTu2iR_ServTur2InnRad; AECT_SrvTu2oR_ServTur2OutRad; AECT_SrvTu2He_ServTur2Height + AECT_SrvTu2oR_ServTur2OutRad - GENV_Eps"  nbPhi="20" />
+<tubs name="ECT_ServTurB2_base" material="Aluminium"  Rio_Z="AECT_SrvTu2iR_ServTur2InnRad; AECT_SrvTu2oR_ServTur2OutRad; AECT_SrvTu2Dz_ServTur2Dz - AECT_SrvTu3Dz_ServTur3Dz + 2.*AECT_SrvTu2oR_ServTur2OutRad"  nbPhi="20" />
+<tubs name="ECT_ServTurB3_base" material="Aluminium"  Rio_Z="AECT_SrvTu2iR_ServTur2InnRad; AECT_SrvTu2oR_ServTur2OutRad; AECT_SrvTu3He_ServTur3Height + AECT_SrvTu2oR_ServTur2OutRad"  nbPhi="20" />
+<box name="ECT_ServTurB_CutBox"   material="Aluminium"  X_Y_Z="4.*AECT_SrvTu2oR_ServTur2OutRad/GENV_Co45; 4.*AECT_SrvTu2oR_ServTur2OutRad/GENV_Co45; 4.*AECT_SrvTu2oR_ServTur2OutRad/GENV_Co45" />
+<subtraction  name="ECT_ServTurB1" >
+  <posXYZ  volume="ECT_ServTurB1_base" X_Y_Z=" 0. ; (AECT_SrvTu2He_ServTur2Height + AECT_SrvTu2oR_ServTur2OutRad + GENV_Eps)/2. + AECT_SrvTu1He_ServTur1Height/2. ; AECT_SrvTu2Dz_ServTur2Dz-AECT_SrvTu1Dz_ServTur1Dz " rot=" 90.; 0.; 0. "/>
+  <posXYZ  volume="ECT_ServTurB_CutBox" X_Y_Z=" 0. ; AECT_SrvTu2He_ServTur2Height + 2.*AECT_SrvTu2oR_ServTur2OutRad + AECT_SrvTu1He_ServTur1Height/2.; AECT_SrvTu2Dz_ServTur2Dz-AECT_SrvTu1Dz_ServTur1Dz - 2.*AECT_SrvTu2oR_ServTur2OutRad " rot=" 45.; 0.; 0. "/>
+</subtraction>
+<subtraction  name="ECT_ServTurB2" >
+  <posXYZ  volume="ECT_ServTurB2_base" X_Y_Z=" 0. ; AECT_SrvTu2He_ServTur2Height+AECT_SrvTu1He_ServTur1Height/2. ; AECT_SrvTu2Dz_ServTur2Dz-AECT_SrvTu1Dz_ServTur1Dz- (AECT_SrvTu2Dz_ServTur2Dz - AECT_SrvTu3Dz_ServTur3Dz)/2." rot=" 0.; 0.; 0. "/>
+  <posXYZ  volume="ECT_ServTurB_CutBox" X_Y_Z=" 0. ; AECT_SrvTu2He_ServTur2Height+AECT_SrvTu1He_ServTur1Height/2. - 2.*AECT_SrvTu2oR_ServTur2OutRad ; AECT_SrvTu2Dz_ServTur2Dz-AECT_SrvTu1Dz_ServTur1Dz + 2.*AECT_SrvTu2oR_ServTur2OutRad - GENV_Eps/2." rot=" 45.; 0.; 0. "/>
+  <posXYZ  volume="ECT_ServTurB_CutBox" X_Y_Z=" 0. ; AECT_SrvTu2He_ServTur2Height+AECT_SrvTu1He_ServTur1Height/2. + 2.*AECT_SrvTu2oR_ServTur2OutRad ; AECT_SrvTu2Dz_ServTur2Dz-AECT_SrvTu1Dz_ServTur1Dz - (AECT_SrvTu2Dz_ServTur2Dz - AECT_SrvTu3Dz_ServTur3Dz + 2.*AECT_SrvTu2oR_ServTur2OutRad) + GENV_Eps/2." rot=" 45.; 0.; 0. "/>
+</subtraction>
+<subtraction  name="ECT_ServTurB3" >
+  <posXYZ  volume="ECT_ServTurB3_base" X_Y_Z=" 0. ; AECT_SrvTu2He_ServTur2Height+AECT_SrvTu1He_ServTur1Height/2. + (AECT_SrvTu3He_ServTur3Height - AECT_SrvTu2oR_ServTur2OutRad)/2. ; AECT_SrvTu3Dz_ServTur3Dz-AECT_SrvTu1Dz_ServTur1Dz " rot=" 90.; 0.; 0. "/>
+  <posXYZ  volume="ECT_ServTurB_CutBox" X_Y_Z=" 0. ; AECT_SrvTu2He_ServTur2Height+AECT_SrvTu1He_ServTur1Height/2. - 2.*AECT_SrvTu2oR_ServTur2OutRad ; AECT_SrvTu3Dz_ServTur3Dz-AECT_SrvTu1Dz_ServTur1Dz + 2.*AECT_SrvTu2oR_ServTur2OutRad " rot=" 45.; 0.; 0. "/>
+</subtraction>
+<composition  name="ECT_ServTur" >
+  <posXYZ  volume="ECT_ServTurA" />
+  <posXYZ  volume="ECT_ServTurB1" />
+  <posXYZ  volume="ECT_ServTurB2" />
+  <posXYZ  volume="ECT_ServTurB3" />
+</composition>
+
+<!-- new Description of the Atlas End-cap Toroid Service Tower -->
+<!-- Right and Left Leg variables -->
+<var  name="ECST_zwid"                value="    100.0" /> <!-- atltept_0009-v0.pdf --> <!-- atltept_0018-v0.pdf -->
+<var  name="ECST_ywid"                value="   6000.0" /> <!-- atltept_0009-v0.pdf --> <!-- atltept_0018-v0.pdf -->
+<var  name="ECST_RL_xwid"             value="    200. " /> <!-- atltept_0009-v0.pdf -->
+<var  name="ECST_LL_xwid"             value="    100. " /> <!-- atltept_0018-v0.pdf -->
+<var  name="ECST_RL_inner_distanceZ"  value="    270. " /> <!-- atltept_0009-v0.pdf -->
+<var  name="ECST_LL_inner_distanceX"  value="    240. " /> <!-- atltept_0018-v0.pdf -->
+<var  name="ECST_LL_inner_distanceZ"  value="    270. " /> <!-- atltept_0018-v0.pdf -->
+<var  name="ECST_RL_ywid"             value="ECST_ywid" />
+<var  name="ECST_RL_zwid"             value="ECST_zwid" />
+<var  name="ECST_LL_ywid"             value="ECST_ywid" />
+<var  name="ECST_LL_zwid"             value="ECST_zwid" />
+<var  name="ECST_RightLeftLeg_InnerDistanceX"  value="1665.+40." /> <!-- atltept_0014-vAA.pdf (added 40 to match) --> 
+
+<!-- Front Arm variables -->
+<var name="ECST_Front_Bracket23_topwidth" value=" 77.5" /> <!-- approximate 77.5=(440-130)/4 see altept_0014vAA.pdf -->
+<var name="ECST_Front_Hand_width"         value=" 10.0"/>
+<var name="ECST_Front_Hand_pointAX"       value="  0. "/> <!-- atltept_0033-v0.pdf lower right point-->
+<var name="ECST_Front_Hand_pointAY"       value="  0. "/> <!-- atltept_0033-v0.pdf lower right point-->
+<var name="ECST_Front_Hand_Gap"           value=" 10. "/> <!-- atltept_0033-v0.pdf lower right point-->
+<var name="ECST_Front_Bracket_Distance_From_Bottom_Leg" value="2342.5+155+20"/> <!-- atltept_0018-v0.pdf -->
+<var name="ECST_Front_Bracket_Distance_From_Leg"        value="100"/> <!-- approximate, not calculated -->
+<var name="ECST_Front_Bracket_width"                    value="10.0"/> 
+<var name="ECST_Front_Bracket_Connector_to_LLRod_ywid"  value="195"/> <!-- atlept_0018-v0.pdf-->
+<var name="ECST_Front_Hand_pointBX"                    value="ECST_Front_Hand_pointAX-120.0"/>
+<var name="ECST_Front_Hand_pointBY"                    value="ECST_Front_Hand_pointAY"/>
+<var name="ECST_Front_Hand_pointCX"                    value="ECST_Front_Hand_pointAX-195.0"/>
+<var name="ECST_Front_Hand_pointCY"                    value="ECST_Front_Hand_pointAY+287.0"/>
+<var name="ECST_Front_Hand_pointDX"                    value="ECST_Front_Hand_pointAX-76.1"/>
+<var name="ECST_Front_Hand_pointDY"                    value="ECST_Front_Hand_pointAY+394.1"/>
+<var name="ECST_Front_Hand_pointEX"                    value="ECST_Front_Hand_pointAX"/>
+<var name="ECST_Front_Hand_pointEY"                    value="ECST_Front_Hand_pointAY+220.0"/>
+
+<!-- Front bar variables -->
+<var  name="ECST_Front_Bar1_xwid"   value=" 200." />
+<var  name="ECST_Front_Bar2_xwid"   value="1840." />
+<var  name="ECST_Front_Bar3_xwid"   value=" 130." />
+<var  name="ECST_Front_Bar_ywid"    value=" 200." />
+<var  name="ECST_Front_Bar_zwid"    value=" 100." />
+<var  name="ECST_Front_Bar_starty"  value="1107.5" /><!-- atltept_0014-vAA.pdf 1107.5=6977.5-(5807.5+62.5) with respect to the bottom of the right (or) left leg bar-->
+<var  name="ECST_Front_Bar_startz"  value="1192.5" /><!-- atltept_0014-vAA.pdf 1192.5=12373.5-11181  with respect to the right (or)left leg bar (outer surface-->
+<var name="ECST_Front_Bar_xwid"     value="ECST_Front_Bar1_xwid+ECST_Front_Bar2_xwid+ECST_Front_Bar3_xwid+2*ECST_Front_Hand_width"/>
+
+<var name="ECST_vecx_CD" value="ECST_Front_Hand_pointDX-ECST_Front_Hand_pointCX"/>
+<var name="ECST_vecy_CD" value="ECST_Front_Hand_pointDY-ECST_Front_Hand_pointCY"/>
+<var name="ECST_unit_perp_CDx" value="(-ECST_vecy_CD/ECST_vecx_CD)/sqrt((-ECST_vecy_CD/ECST_vecx_CD)**2+1)"/>
+<var name="ECST_unit_perp_CDy" value="(1.)/sqrt((-ECST_vecy_CD/ECST_vecx_CD)**2+1)"/>
+
+<var name="ECST_Front_Bracket_pointCX" value="ECST_Front_Hand_pointCX+GENV_Eps*ECST_unit_perp_CDx"/>
+<var name="ECST_Front_Bracket_pointCY" value="ECST_Front_Hand_pointCY+GENV_Eps*ECST_unit_perp_CDy"/>
+<var name="ECST_Front_Bracket_pointDX" value="ECST_Front_Hand_pointDX+GENV_Eps*ECST_unit_perp_CDx"/>
+<var name="ECST_Front_Bracket_pointDY" value="ECST_Front_Hand_pointDY+GENV_Eps*ECST_unit_perp_CDy"/>
+
+<var name="ECST_Front_Bracket_pointFX" value="ECST_Front_Hand_pointAX-(ECST_Front_Bar_startz+ECST_Front_Hand_Gap)+ECST_Front_Bracket_Distance_From_Leg"/>
+<var name="ECST_Front_Bracket_pointFY" value="ECST_Front_Hand_pointAY+ECST_Front_Bracket_Distance_From_Bottom_Leg-(ECST_Front_Bar_starty-ECST_Front_Hand_Gap)"/> <!-- atltept_0018-v0.pdf -->
+<var name="ECST_Front_Bracket_pointGX" value="ECST_Front_Bracket_pointFX"/>
+<var name="ECST_Front_Bracket_pointGY" value="ECST_Front_Bracket_pointFY+ECST_Front_Bracket_Connector_to_LLRod_ywid"/> 
+
+<var name="ECST_Front_Bracket_pointD1X" value="ECST_Front_Bracket_pointDX+ECST_Front_Bracket_width*((ECST_Front_Bracket_pointCX-ECST_Front_Bracket_pointDX)/sqrt((ECST_Front_Bracket_pointDX-ECST_Front_Bracket_pointCX)**2+(ECST_Front_Bracket_pointDY-ECST_Front_Bracket_pointCY)**2))"/>
+<var name="ECST_Front_Bracket_pointD1Y" value="ECST_Front_Bracket_pointDY+ECST_Front_Bracket_width*((ECST_Front_Bracket_pointCY-ECST_Front_Bracket_pointDY)/sqrt((ECST_Front_Bracket_pointDX-ECST_Front_Bracket_pointCX)**2+(ECST_Front_Bracket_pointDY-ECST_Front_Bracket_pointCY)**2))"/>
+<var name="ECST_Front_Bracket_pointC1X" value="ECST_Front_Bracket_pointCX+ECST_Front_Bracket_width*((ECST_Front_Bracket_pointDX-ECST_Front_Bracket_pointCX)/sqrt((ECST_Front_Bracket_pointDX-ECST_Front_Bracket_pointCX)**2+(ECST_Front_Bracket_pointDY-ECST_Front_Bracket_pointCY)**2))"/>
+<var name="ECST_Front_Bracket_pointC1Y" value="ECST_Front_Bracket_pointCY+ECST_Front_Bracket_width*((ECST_Front_Bracket_pointDY-ECST_Front_Bracket_pointCY)/sqrt((ECST_Front_Bracket_pointDX-ECST_Front_Bracket_pointCX)**2+(ECST_Front_Bracket_pointDY-ECST_Front_Bracket_pointCY)**2))"/>
+
+<var name="ECST_Front_Bracket_pointF1X" value="ECST_Front_Bracket_pointFX"/>
+<var name="ECST_Front_Bracket_pointF1Y" value="ECST_Front_Bracket_pointFY+ECST_Front_Bracket_width"/>
+<var name="ECST_Front_Bracket_pointG1X" value="ECST_Front_Bracket_pointGX"/>
+<var name="ECST_Front_Bracket_pointG1Y" value="ECST_Front_Bracket_pointGY-ECST_Front_Bracket_width"/>
+<var name="ECST_vecx_GD" value="ECST_Front_Bracket_pointGX-ECST_Front_Bracket_pointDX"/>
+<var name="ECST_vecy_GD" value="ECST_Front_Bracket_pointGY-ECST_Front_Bracket_pointCY"/>
+<var name="ECST_unit_perp_GDx" value="(-ECST_vecy_GD/ECST_vecx_GD)/sqrt((-ECST_vecy_GD/ECST_vecx_GD)**2+1)"/>
+<var name="ECST_unit_perp_GDy" value="(1.)/sqrt((-ECST_vecy_GD/ECST_vecx_GD)**2+1)"/>
+
+<var name="ECST_Front_Arm1_widthx" value="ECST_Front_Hand_pointAX-ECST_Front_Bracket_pointGX"/>
+<var name="ECST_Front_Arm1_widthy" value="-ECST_Front_Hand_pointAY+ECST_Front_Bracket_pointGY"/>
+<var name="ECST_Front_Arm1_widthz" value="ECST_Front_Bracket23_topwidth"/>
+<var name="ECST_Front_Arm2_widthx" value="ECST_Front_Hand_pointAX-ECST_Front_Bracket_pointGX"/>
+<var name="ECST_Front_Arm2_widthy" value="-ECST_Front_Hand_pointAY+ECST_Front_Bracket_pointGY"/>
+<var name="ECST_Front_Arm2_widthz" value="ECST_Front_Bracket23_topwidth"/>
+
+<var name="ECST_Bar_Length" value="sqrt((ECST_Front_Bracket_pointG1X-ECST_Front_Bracket_pointD1X)**2+(ECST_Front_Bracket_pointG1Y-ECST_Front_Bracket_pointD1Y)**2)"/>
+
+<!-- Left Leg cover variables -->
+<var name="ECST_cover_thickness"           value="20."/>
+<var name="ECST_cover_dist_rod"            value="30."/>
+<var name="ECST_Left_Leg_HoleBracket_ypos" value="ECST_Front_Bracket_pointF1Y-ECST_ywid/2+ECST_Front_Bar_starty-ECST_Front_Hand_Gap+80"/>
+
+<!-- Left Leg Support Frames variables -->
+<var name="ECST_SupportFrame_dist_rod"  value="30."/>
+<var name="ECST_SupportFrame_Thickness" value="20."/>
+
+<!-- Right Leg Variables -->
+<var name="ECST_SupportFrameA_Height" value="370."/> <!-- altept_0009, altept_0012, altept_0018 -->
+<var name="ECST_SupportFrameB_Height" value="360."/>
+<var name="ECST_SupportFrameC_Height" value="360."/>
+<var name="ECST_SupportFrameD_Height" value="150."/>
+
+<var name="ECST_SupportFrameA_Ypos"     value="ECST_ywid/2-ECST_SupportFrameA_Height/2"/>
+<var name="ECST_SupportFrameA_Ypos_abs" value="ECST_ywid-ECST_SupportFrameA_Height"/> <!-- starting y -->
+<var name="ECST_SupportFrameB_Ypos_abs" value="4060."/> <!-- starting y -->
+<var name="ECST_SupportFrameB_Ypos"     value="ECST_SupportFrameB_Ypos_abs-ECST_ywid/2+ECST_SupportFrameB_Height/2"/>
+<var name="ECST_SupportFrameC_Ypos_abs" value="2343."/> <!-- starting y 2343-->
+<var name="ECST_SupportFrameC_Ypos"     value="ECST_SupportFrameC_Ypos_abs-ECST_ywid/2+ECST_SupportFrameC_Height/2"/>
+<var name="ECST_SupportFrameD_Ypos_abs" value="1108."/> <!-- starting y -->
+<var name="ECST_SupportFrameD_Ypos"     value="ECST_SupportFrameD_Ypos_abs-ECST_ywid/2+ECST_SupportFrameD_Height/2"/>
+
+<!-- Middle Pieces Variables -->
+<var name="ECST_MiddleBarA_ywid"       value=" 160."/> <!-- altept_0022, altept_0023, altept_0024 -->
+<var name="ECST_MiddleBarA_width"      value="  20."/>
+<var name="ECST_MiddleBarA1_ywid"      value="ECST_MiddleBarA_ywid-2*ECST_MiddleBarA_width"/>
+<var name="ECST_MiddleBarA1_zwid"      value="ECST_MiddleBarA_width"/>
+<var name="ECST_MiddleBarA2_xwid"      value="1400."/>
+<var name="ECST_MiddleBarA2_ywid"      value="ECST_MiddleBarA_width"/>
+<var name="ECST_MiddleBarA2_zwid"      value="  50."/>
+<var name="ECST_MiddleBarA1Back_xpos"  value="   0."/>
+<var name="ECST_MiddleBarA1Back_ypos"  value="   0."/>
+<var name="ECST_MiddleBarA1Back_zpos"  value="ECST_MiddleBarA1_zwid/2."/>
+<var name="ECST_MiddleBarA2Back_xpos"  value="   0."/>
+<var name="ECST_MiddleBarA2Back_ypos"  value="(ECST_MiddleBarA1_ywid+ECST_MiddleBarA2_ywid)/2.+GENV_Eps"/>
+<var name="ECST_MiddleBarA2Back_zpos"  value="(ECST_MiddleBarA2_zwid)/2."/>
+<var name="ECST_MiddleBarA1Front_xpos" value="   0."/>
+<var name="ECST_MiddleBarA1Front_ypos" value="   0."/>
+<var name="ECST_MiddleBarA1Front_zpos" value="ECST_RL_inner_distanceZ+2*ECST_RL_zwid+ECST_SupportFrame_dist_rod*2+ECST_SupportFrame_Thickness*2-ECST_MiddleBarA1_zwid/2."/>
+<var name="ECST_MiddleBarA2Front_xpos" value="   0."/>
+<var name="ECST_MiddleBarA2Front_ypos" value="(ECST_MiddleBarA1_ywid+ECST_MiddleBarA2_ywid)/2+GENV_Eps"/>
+<var name="ECST_MiddleBarA2Front_zpos" value="ECST_RL_inner_distanceZ+2*ECST_RL_zwid+ECST_SupportFrame_dist_rod*2+ECST_SupportFrame_Thickness*2-ECST_MiddleBarA2_zwid/2"/>
+<var name="ECST_MiddleBarAFront_ypos"  value="ECST_SupportFrameA_Ypos_abs+ECST_SupportFrameA_Height-ECST_MiddleBarA_ywid/2.-GENV_Eps"/>
+<var name="ECST_MiddleBarABack_ypos"   value="ECST_SupportFrameA_Ypos_abs+ECST_SupportFrameA_Height-ECST_MiddleBarA_ywid/2.-GENV_Eps"/>
+<var name="ECST_MiddleBarALow_ypos"    value="ECST_SupportFrameA_Ypos_abs+ECST_MiddleBarA_ywid/2.+GENV_Eps"/>
+<var name="ECST_MiddleBarB2_xwid"      value="1424."/>
+<var name="ECST_MiddleBarB_ypos"       value="ECST_SupportFrameB_Ypos_abs+ECST_SupportFrameB_Height-ECST_MiddleBarA_ywid/2.-GENV_Eps" />
+<var name="ECST_MiddleBarC2_xwid"      value="1420."/>
+<var name="ECST_MiddleBarC_ypos"       value="ECST_SupportFrameC_Ypos_abs+ECST_SupportFrameC_Height-ECST_MiddleBarA_ywid/2.-GENV_Eps" />
+<var name="ECST_MiddleBarD2_xwid"      value="1420."/>
+<var name="ECST_MiddleBarD_ypos"       value="ECST_SupportFrameD_Ypos_abs+ECST_SupportFrameD_Height-ECST_MiddleBarA_ywid/2.-GENV_Eps" />
+
+<var name="ECST_InclinedBar_width"  value="20."/>
+<var name="ECST_InclinedBar_zwid"   value="50."/>
+<var name="ECST_InclinedBar_ywid"   value="210."/>
+<var name="ECST_InclinedBar_ystart" value="ECST_SupportFrameC_Ypos_abs+ECST_SupportFrameC_Height"/>
+<var name="ECST_InclinedBar_xstart" value="-(ECST_RightLeftLeg_InnerDistanceX-ECST_SupportFrame_Thickness-ECST_SupportFrame_dist_rod-ECST_cover_dist_rod-ECST_cover_thickness)/2.+GENV_Eps"/>
+<var name="ECST_InclinedBar1_p1x"   value="ECST_InclinedBar_xstart"/>
+<var name="ECST_InclinedBar1_p1y"   value="ECST_InclinedBar_ystart+ECST_InclinedBar_width+GENV_Eps"/>
+<var name="ECST_InclinedBar1_p2x"   value="ECST_InclinedBar1_p1x"/>
+<var name="ECST_InclinedBar1_p2y"   value="ECST_InclinedBar_ystart+ECST_InclinedBar_ywid-ECST_InclinedBar_width-GENV_Eps"/>
+<var name="ECST_InclinedBar1_p3x"   value="ECST_InclinedBar_xstart+ECST_RightLeftLeg_InnerDistanceX-(ECST_SupportFrame_dist_rod+ECST_SupportFrame_Thickness)-ECST_cover_thickness-ECST_cover_dist_rod-2.*GENV_Eps"/>
+<var name="ECST_InclinedBar1_p3y"   value="ECST_SupportFrameB_Ypos_abs+ECST_InclinedBar_ywid-ECST_InclinedBar_width-GENV_Eps"/>
+<var name="ECST_InclinedBar1_p4x"   value="ECST_InclinedBar_xstart+ECST_RightLeftLeg_InnerDistanceX-(ECST_SupportFrame_dist_rod+ECST_SupportFrame_Thickness)-ECST_cover_thickness-ECST_cover_dist_rod-2.*GENV_Eps"/>
+<var name="ECST_InclinedBar1_p4y"   value="ECST_SupportFrameB_Ypos_abs+ECST_InclinedBar_width+GENV_Eps"/>
+
+<var name="ECST_InclinedBar2_p1x"   value="ECST_InclinedBar1_p1x"/>
+<var name="ECST_InclinedBar2_p1y"   value="ECST_InclinedBar_ystart+ECST_InclinedBar_ywid-ECST_InclinedBar_width"/>
+<var name="ECST_InclinedBar2_p2x"   value="ECST_InclinedBar1_p2x"/>
+<var name="ECST_InclinedBar2_p2y"   value="ECST_InclinedBar_ystart+ECST_InclinedBar_ywid"/>
+<var name="ECST_InclinedBar2_p3x"   value="ECST_InclinedBar1_p3x"/>
+<var name="ECST_InclinedBar2_p3y"   value="ECST_SupportFrameB_Ypos_abs+ECST_InclinedBar_ywid"/>
+<var name="ECST_InclinedBar2_p4x"   value="ECST_InclinedBar1_p4x"/>
+<var name="ECST_InclinedBar2_p4y"   value="ECST_SupportFrameB_Ypos_abs+ECST_InclinedBar_ywid-ECST_InclinedBar_width"/>
+
+<var name="ECST_InclinedBar3_p1x"   value="ECST_InclinedBar1_p1x"/>
+<var name="ECST_InclinedBar3_p1y"   value="ECST_InclinedBar_ystart"/>
+<var name="ECST_InclinedBar3_p2x"   value="ECST_InclinedBar1_p2x"/>
+<var name="ECST_InclinedBar3_p2y"   value="ECST_InclinedBar_ystart+ECST_InclinedBar_width"/>
+<var name="ECST_InclinedBar3_p3x"   value="ECST_InclinedBar1_p3x"/>
+<var name="ECST_InclinedBar3_p3y"   value="ECST_SupportFrameB_Ypos_abs+ECST_InclinedBar_width"/>
+<var name="ECST_InclinedBar3_p4x"   value="ECST_InclinedBar1_p4x"/>
+<var name="ECST_InclinedBar3_p4y"   value="ECST_SupportFrameB_Ypos_abs"/>
+
+<!-- Front Structure Variables --> <!-- values approximated from photos -->
+<var name="ECST_Front_Frame_ywid"   value="ECST_Bar_Length*0.92"/>
+<var name="ECST_Front_Frame_zwid"   value="ECST_Bar_Length*0.624"/>
+<var name="ECST_Front_Frame_width"  value="26."/>
+<var name="ECST_Front_Frame_xwid"   value="0.5*ECST_LL_inner_distanceX+ECST_LL_xwid+ECST_RightLeftLeg_InnerDistanceX+ECST_RL_xwid*0.5+2*ECST_Front_Frame_width"/>
+<var name="ECST_Front_Frame_xpos"   value="0.5*(-0.5*ECST_LL_inner_distanceX-ECST_LL_xwid+ECST_RL_xwid*0.5)"/>
+<var name="ECST_Front_Frame_ypos"   value="ECST_Front_Bar_starty+ECST_Front_Bar_ywid/2+0.504*ECST_Bar_Length+ECST_Front_Frame_zwid*0.5"/>
+<var name="ECST_Front_Frame_zpos"   value="ECST_LL_inner_distanceZ+2*ECST_LL_zwid+2*ECST_cover_dist_rod+2*ECST_cover_thickness+ECST_Front_Frame_zwid*0.5+GENV_Eps"/>
+<var name="ECST_Front_Glass_xwid"   value="ECST_Front_Frame_xwid-200."/>
+<var name="ECST_Front_Glass_ywid"   value="ECST_Front_Frame_ywid-200."/>
+<var name="ECST_Front_Glass_zwid"   value="20."/>
+<var name="ECST_Front_Frame_UpperPart_ywid" value="5."/>
+
+<var name="ECST_movez" value="ECST_RL_inner_distanceZ/2+ECST_zwid+ECST_cover_thickness+ECST_cover_dist_rod"/>
+<var name="ECST_movey" value="ECST_ywid/2"/>
+
+
+<!-- Right Leg Construction -->
+<box  name="ECST_Right_Leg_SupportFrameAOuter"  material="Aluminium" X_Y_Z="ECST_RL_xwid+ECST_SupportFrame_dist_rod*2+ECST_SupportFrame_Thickness*2; ECST_SupportFrameA_Height;  ECST_RL_inner_distanceZ+2*ECST_RL_zwid+ECST_SupportFrame_dist_rod*2+ECST_SupportFrame_Thickness*2" />
+<box  name="ECST_Right_Leg_SupportFrameAInner"  material="Aluminium" X_Y_Z="ECST_RL_xwid+ECST_SupportFrame_dist_rod*2; ECST_SupportFrameA_Height+20.0 ; ECST_RL_inner_distanceZ+2*ECST_RL_zwid+ECST_SupportFrame_dist_rod*2 " />
+<box  name="ECST_Right_Leg_SupportFrameBOuter"  material="Aluminium" X_Y_Z="ECST_RL_xwid+ECST_SupportFrame_dist_rod*2+ECST_SupportFrame_Thickness*2; ECST_SupportFrameB_Height ;  ECST_RL_inner_distanceZ+2*ECST_RL_zwid+ECST_SupportFrame_dist_rod*2+ECST_SupportFrame_Thickness*2" />
+<box  name="ECST_Right_Leg_SupportFrameBInner"  material="Aluminium" X_Y_Z="ECST_RL_xwid+ECST_SupportFrame_dist_rod*2; ECST_SupportFrameB_Height+20.0 ; ECST_RL_inner_distanceZ+2*ECST_RL_zwid+ECST_SupportFrame_dist_rod*2 " />
+<box  name="ECST_Right_Leg_HoleBracket"  material="Aluminium"  X_Y_Z="ECST_RL_xwid+ECST_SupportFrame_dist_rod*2; 300.;  200." />
+<box  name="ECST_Right_Leg_SupportFrameCOuter"  material="Aluminium" X_Y_Z="ECST_RL_xwid+ECST_SupportFrame_dist_rod*2+ECST_SupportFrame_Thickness*2; ECST_SupportFrameC_Height ;  ECST_RL_inner_distanceZ+2*ECST_RL_zwid+ECST_SupportFrame_dist_rod*2+ECST_SupportFrame_Thickness*2" />
+<box  name="ECST_Right_Leg_SupportFrameCInner"  material="Aluminium" X_Y_Z="ECST_RL_xwid+ECST_SupportFrame_dist_rod*2; ECST_SupportFrameC_Height+20. ; ECST_RL_inner_distanceZ+2*ECST_RL_zwid+ECST_SupportFrame_dist_rod*2 " />
+<box  name="ECST_Right_Leg_SupportFrameDOuter"  material="Aluminium" X_Y_Z="ECST_RL_xwid+ECST_SupportFrame_dist_rod*2+ECST_SupportFrame_Thickness*2; ECST_SupportFrameD_Height;  ECST_RL_inner_distanceZ+2*ECST_RL_zwid+ECST_SupportFrame_dist_rod*2+ECST_SupportFrame_Thickness*2" />
+<box  name="ECST_Right_Leg_SupportFrameDInner"  material="Aluminium" X_Y_Z="ECST_RL_xwid+ECST_SupportFrame_dist_rod*2; ECST_SupportFrameD_Height+20.0 ; ECST_RL_inner_distanceZ+2*ECST_RL_zwid+ECST_SupportFrame_dist_rod*2 " />
+
+<subtraction  name="ECST_Right_Leg_SupportFrameA" >
+  <posXYZ  volume="ECST_Right_Leg_SupportFrameAOuter" />
+  <posXYZ  volume="ECST_Right_Leg_SupportFrameAInner" />
+</subtraction>
+<subtraction  name="ECST_Right_Leg_SupportFrameB" >
+  <posXYZ  volume="ECST_Right_Leg_SupportFrameBOuter" />
+  <posXYZ  volume="ECST_Right_Leg_SupportFrameBInner" />
+</subtraction>
+<subtraction  name="ECST_Right_Leg_SupportFrameC" >
+  <posXYZ  volume="ECST_Right_Leg_SupportFrameCOuter" />
+  <posXYZ  volume="ECST_Right_Leg_SupportFrameCInner" />
+  <posXYZ  volume="ECST_Right_Leg_HoleBracket"   X_Y_Z=" 0.; 50.;(ECST_LL_inner_distanceZ/2+ECST_LL_zwid+ECST_cover_dist_rod+ECST_cover_thickness/2) " />
+</subtraction>
+<subtraction  name="ECST_Right_Leg_SupportFrameD" >
+  <posXYZ  volume="ECST_Right_Leg_SupportFrameDOuter" />
+  <posXYZ  volume="ECST_Right_Leg_SupportFrameDInner" />
+</subtraction>
+
+<box  name="ECST_Right_Leg_Rod"  material="Aluminium"  X_Y_Z="ECST_RL_xwid; ECST_RL_ywid ;  ECST_RL_zwid" />
+<composition  name="ECST_Right_Leg" >
+  <posXYZ  volume="ECST_Right_Leg_Rod"                 X_Y_Z="0. ; 0. ;  ECST_RL_zwid/2+ECST_RL_inner_distanceZ/2" />
+  <posXYZ  volume="ECST_Right_Leg_Rod"                  X_Y_Z="0. ; 0. ; -ECST_RL_zwid/2-ECST_RL_inner_distanceZ/2" />
+  <posXYZ  volume="ECST_Right_Leg_SupportFrameA"       X_Y_Z="0.;ECST_SupportFrameA_Ypos; 0."  />
+  <posXYZ  volume="ECST_Right_Leg_SupportFrameB"       X_Y_Z="0.;ECST_SupportFrameB_Ypos; 0."  />
+  <posXYZ  volume="ECST_Right_Leg_SupportFrameC"       X_Y_Z="0.;ECST_SupportFrameC_Ypos; 0."  />
+  <posXYZ  volume="ECST_Right_Leg_SupportFrameD"       X_Y_Z="0.;ECST_SupportFrameD_Ypos; 0."  />
+</composition>
+
+<!-- Left Leg Construction -->
+<box  name="ECST_Left_Leg_Rod"          material="Aluminium"  X_Y_Z="ECST_LL_xwid; ECST_LL_ywid ;  ECST_LL_zwid" />
+<box  name="ECST_Left_Leg_coverouter"   material="Aluminium"  X_Y_Z="ECST_LL_inner_distanceX+2*ECST_LL_xwid+ECST_cover_dist_rod*2+ECST_cover_thickness*2; ECST_ywid ;  ECST_LL_inner_distanceZ+2*ECST_LL_zwid+ECST_cover_dist_rod*2+ECST_cover_thickness*2" />
+<box  name="ECST_Left_Leg_coverinner"   material="Aluminium"  X_Y_Z="ECST_LL_inner_distanceX+2*ECST_LL_xwid+ECST_cover_dist_rod*2; ECST_ywid + 2.*GENV_Eps;  ECST_LL_inner_distanceZ+2*ECST_LL_zwid+ECST_cover_dist_rod*2" />
+<box  name="ECST_Left_Leg_HoleBracket"  material="Aluminium"  X_Y_Z="300.; 300.;  200." />
+
+<subtraction  name="ECST_Left_Leg_cover" >
+  <posXYZ  volume="ECST_Left_Leg_coverouter"  />
+  <posXYZ  volume="ECST_Left_Leg_coverinner"  />
+  <posXYZ  volume="ECST_Left_Leg_HoleBracket"   X_Y_Z=" 0.; ECST_Left_Leg_HoleBracket_ypos;(ECST_LL_inner_distanceZ/2+ECST_LL_zwid+ECST_cover_dist_rod+ECST_cover_thickness/2) " />
+</subtraction>
+<composition  name="ECST_Left_Leg" >
+  <posXYZ  volume="ECST_Left_Leg_cover"  />
+  <posXYZ  volume="ECST_Left_Leg_Rod"   X_Y_Z="-ECST_LL_xwid/2.-ECST_LL_inner_distanceX/2.; 0.; ECST_LL_zwid/2.+ECST_LL_inner_distanceZ/2." />
+  <posXYZ  volume="ECST_Left_Leg_Rod"   X_Y_Z="-ECST_LL_xwid/2.-ECST_LL_inner_distanceX/2.; 0.; -ECST_LL_zwid/2.-ECST_LL_inner_distanceZ/2."  />
+  <posXYZ  volume="ECST_Left_Leg_Rod"   X_Y_Z="ECST_LL_xwid/2.+ECST_LL_inner_distanceX/2.; 0.; -ECST_LL_zwid/2.-ECST_LL_inner_distanceZ/2."  />
+  <posXYZ  volume="ECST_Left_Leg_Rod"   X_Y_Z="ECST_LL_xwid/2.+ECST_LL_inner_distanceX/2.; 0.; ECST_LL_zwid/2.+ECST_LL_inner_distanceZ/2." />
+</composition>
+
+<!-- Middle Pieces Construction -->
+<box name="ECST_MiddleBarA1"  material="Aluminium"  X_Y_Z="ECST_RightLeftLeg_InnerDistanceX-(ECST_SupportFrame_dist_rod+ECST_SupportFrame_Thickness)-ECST_cover_thickness-ECST_cover_dist_rod-2*GENV_Eps;ECST_MiddleBarA1_ywid-2.*GENV_Eps ;  ECST_MiddleBarA1_zwid" />
+<box name="ECST_MiddleBarA2"  material="Aluminium"  X_Y_Z="ECST_MiddleBarA2_xwid;ECST_MiddleBarA2_ywid;ECST_MiddleBarA2_zwid" />
+<box name="ECST_MiddleBarB2"  material="Aluminium"  X_Y_Z="ECST_MiddleBarB2_xwid;ECST_MiddleBarA2_ywid;ECST_MiddleBarA2_zwid" />
+<box name="ECST_MiddleBarC2"  material="Aluminium"  X_Y_Z="ECST_MiddleBarC2_xwid;ECST_MiddleBarA2_ywid;ECST_MiddleBarA2_zwid" />
+<box name="ECST_MiddleBarD2"  material="Aluminium"  X_Y_Z="ECST_MiddleBarD2_xwid;ECST_MiddleBarA2_ywid;ECST_MiddleBarA2_zwid" />
+
+<composition  name="ECST_MiddleBars" >
+  <posXYZ  volume="ECST_MiddleBarA1"        X_Y_Z="ECST_MiddleBarA1Front_xpos;ECST_MiddleBarAFront_ypos+ECST_MiddleBarA1Front_ypos;ECST_MiddleBarA1Front_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarA2"        X_Y_Z="ECST_MiddleBarA2Front_xpos;ECST_MiddleBarAFront_ypos+ECST_MiddleBarA2Front_ypos; ECST_MiddleBarA2Front_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarA2"        X_Y_Z="ECST_MiddleBarA2Front_xpos;ECST_MiddleBarAFront_ypos-ECST_MiddleBarA2Front_ypos; ECST_MiddleBarA2Front_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarA1"        X_Y_Z="ECST_MiddleBarA1Back_xpos;ECST_MiddleBarAFront_ypos+ECST_MiddleBarA1Back_ypos;ECST_MiddleBarA1Back_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarA2"        X_Y_Z="ECST_MiddleBarA2Back_xpos;ECST_MiddleBarAFront_ypos+ECST_MiddleBarA2Back_ypos; ECST_MiddleBarA2Back_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarA2"        X_Y_Z="ECST_MiddleBarA2Back_xpos;ECST_MiddleBarAFront_ypos-1.*ECST_MiddleBarA2Back_ypos; ECST_MiddleBarA2Back_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarA1"        X_Y_Z="ECST_MiddleBarA1Front_xpos;ECST_MiddleBarB_ypos+ECST_MiddleBarA1Front_ypos;ECST_MiddleBarA1Front_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarB2"        X_Y_Z="ECST_MiddleBarA2Front_xpos;ECST_MiddleBarB_ypos+ECST_MiddleBarA2Front_ypos; ECST_MiddleBarA2Front_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarB2"        X_Y_Z="ECST_MiddleBarA2Front_xpos;ECST_MiddleBarB_ypos-ECST_MiddleBarA2Front_ypos; ECST_MiddleBarA2Front_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarA1"        X_Y_Z="ECST_MiddleBarA1Back_xpos;ECST_MiddleBarB_ypos+ECST_MiddleBarA1Back_ypos;ECST_MiddleBarA1Back_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarB2"        X_Y_Z="ECST_MiddleBarA2Back_xpos;ECST_MiddleBarB_ypos+ECST_MiddleBarA2Back_ypos; ECST_MiddleBarA2Back_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarB2"        X_Y_Z="ECST_MiddleBarA2Back_xpos;ECST_MiddleBarB_ypos-1.*ECST_MiddleBarA2Back_ypos; ECST_MiddleBarA2Back_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarA1"        X_Y_Z="ECST_MiddleBarA1Front_xpos;ECST_MiddleBarC_ypos+ECST_MiddleBarA1Front_ypos;ECST_MiddleBarA1Front_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarC2"        X_Y_Z="ECST_MiddleBarA2Front_xpos;ECST_MiddleBarC_ypos+ECST_MiddleBarA2Front_ypos; ECST_MiddleBarA2Front_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarC2"        X_Y_Z="ECST_MiddleBarA2Front_xpos;ECST_MiddleBarC_ypos-ECST_MiddleBarA2Front_ypos; ECST_MiddleBarA2Front_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarA1"        X_Y_Z="ECST_MiddleBarA1Back_xpos;ECST_MiddleBarC_ypos+ECST_MiddleBarA1Back_ypos;ECST_MiddleBarA1Back_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarC2"        X_Y_Z="ECST_MiddleBarA2Back_xpos;ECST_MiddleBarC_ypos+ECST_MiddleBarA2Back_ypos; ECST_MiddleBarA2Back_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarC2"        X_Y_Z="ECST_MiddleBarA2Back_xpos;ECST_MiddleBarC_ypos-1.*ECST_MiddleBarA2Back_ypos; ECST_MiddleBarA2Back_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarA1"        X_Y_Z="ECST_MiddleBarA1Back_xpos;ECST_MiddleBarD_ypos+ECST_MiddleBarA1Back_ypos;ECST_MiddleBarA1Back_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarD2"        X_Y_Z="ECST_MiddleBarA2Back_xpos;ECST_MiddleBarD_ypos+ECST_MiddleBarA2Back_ypos; ECST_MiddleBarA2Back_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarD2"        X_Y_Z="ECST_MiddleBarA2Back_xpos;ECST_MiddleBarD_ypos-1.*ECST_MiddleBarA2Back_ypos; ECST_MiddleBarA2Back_zpos"  />
+</composition>
+
+<gvxy  name="ECST_InclinedBar1"  material="Aluminium"  dZ="ECST_InclinedBar_width" >
+  <gvxy_point  X_Y="ECST_InclinedBar1_p1x;ECST_InclinedBar1_p1y" />
+  <gvxy_point  X_Y="ECST_InclinedBar1_p2x;ECST_InclinedBar1_p2y" />
+  <gvxy_point  X_Y="ECST_InclinedBar1_p3x;ECST_InclinedBar1_p3y" />
+  <gvxy_point  X_Y="ECST_InclinedBar1_p4x;ECST_InclinedBar1_p4y" />
+</gvxy>
+<gvxy  name="ECST_InclinedBar2"  material="Aluminium"  dZ="ECST_InclinedBar_zwid" >
+  <gvxy_point  X_Y="ECST_InclinedBar2_p1x;ECST_InclinedBar2_p1y" />
+  <gvxy_point  X_Y="ECST_InclinedBar2_p2x;ECST_InclinedBar2_p2y" />
+  <gvxy_point  X_Y="ECST_InclinedBar2_p3x;ECST_InclinedBar2_p3y" />
+  <gvxy_point  X_Y="ECST_InclinedBar2_p4x;ECST_InclinedBar2_p4y" />
+</gvxy>
+<gvxy  name="ECST_InclinedBar3"  material="Aluminium"  dZ="ECST_InclinedBar_zwid" >
+  <gvxy_point  X_Y="ECST_InclinedBar3_p1x;ECST_InclinedBar3_p1y" />
+  <gvxy_point  X_Y="ECST_InclinedBar3_p2x;ECST_InclinedBar3_p2y" />
+  <gvxy_point  X_Y="ECST_InclinedBar3_p3x;ECST_InclinedBar3_p3y" />
+  <gvxy_point  X_Y="ECST_InclinedBar3_p4x;ECST_InclinedBar3_p4y" />
+</gvxy>
+<composition  name="ECST_InclinedBar" >
+  <posXYZ  volume="ECST_InclinedBar1"        X_Y_Z="0. ; 0. ; ECST_InclinedBar_width/2."  />
+  <posXYZ  volume="ECST_InclinedBar2"        X_Y_Z="0. ; 0. ; ECST_InclinedBar_zwid/2."  />
+  <posXYZ  volume="ECST_InclinedBar3"        X_Y_Z="0. ; 0. ; ECST_InclinedBar_zwid/2."  />
+  <posXYZ  volume="ECST_InclinedBar1"        X_Y_Z="0. ; 0. ; 2*ECST_movez-ECST_InclinedBar_width/2."  />
+  <posXYZ  volume="ECST_InclinedBar2"        X_Y_Z="0. ; 0. ; 2*ECST_movez-ECST_InclinedBar_zwid/2."  />
+  <posXYZ  volume="ECST_InclinedBar3"        X_Y_Z="0. ; 0. ; 2*ECST_movez-ECST_InclinedBar_zwid/2."  />
+</composition>
+
+<!-- Front frame Construction (from photos) -->
+<box  name="ECST_Front_Frame_Outer"  material="Aluminium"  X_Y_Z="ECST_Front_Frame_xwid; ECST_Front_Frame_ywid ;  ECST_Front_Frame_zwid" />
+<box  name="ECST_Front_Frame_Inner4"  material="Aluminium"  X_Y_Z="ECST_Front_Frame_xwid-2*ECST_Front_Frame_width; ECST_Front_Frame_ywid/2. ;  ECST_Front_Frame_zwid/2." />
+<box  name="ECST_Front_Frame_Inner1"  material="Aluminium"  X_Y_Z="ECST_Front_Frame_xwid-2*ECST_Front_Frame_width; ECST_Front_Frame_ywid-2*ECST_Front_Frame_width ;  ECST_Front_Frame_zwid+200" />
+<box  name="ECST_Front_Frame_Inner2"  material="Aluminium"  X_Y_Z="ECST_Front_Frame_xwid+200; ECST_Front_Frame_ywid-2*ECST_Front_Frame_width ;  ECST_Front_Frame_zwid-2*ECST_Front_Frame_width" />
+<box  name="ECST_Front_Frame_Inner3"  material="Aluminium"  X_Y_Z="ECST_Front_Frame_xwid-2*ECST_Front_Frame_width; ECST_Front_Frame_ywid;  ECST_Front_Frame_zwid-2*ECST_Front_Frame_width" />
+<subtraction  name="ECST_Front_Structure" >
+  <posXYZ  volume="ECST_Front_Frame_Outer"   />
+  <posXYZ  volume="ECST_Front_Frame_Inner1"  />
+  <posXYZ  volume="ECST_Front_Frame_Inner2"  />
+  <posXYZ  volume="ECST_Front_Frame_Inner3"  X_Y_Z="0.;-ECST_Front_Frame_UpperPart_ywid;0."  />
+  <posXYZ  volume="ECST_Front_Frame_Inner4"  X_Y_Z="0.;- ECST_Front_Frame_ywid/2.;- ECST_Front_Frame_zwid/2."  />
+</subtraction>
+
+<box  name="ECST_Front_Glass_Outer"  material="std::Polyethylene"  X_Y_Z="ECST_Front_Glass_xwid; ECST_Front_Glass_ywid ;  ECST_Front_Glass_zwid" />
+<composition  name="ECST_Front_Glass" >
+  <posXYZ  volume="ECST_Front_Structure"   X_Y_Z="0.; 0.; -2.*GENV_Eps " />
+  <posXYZ  volume="ECST_Front_Glass_Outer" X_Y_Z="0.;0.;0.5*ECST_Front_Frame_zwid+20."  />
+</composition>
+
+
+<!-- Front Bar Construction from  atltept_0033-v0.pdf -->
+<box  name="ECST_Front_Bar1"  material="Aluminium"  X_Y_Z="ECST_Front_Bar1_xwid-GENV_Eps; ECST_Front_Bar_ywid ;  ECST_Front_Bar_zwid" />
+<box  name="ECST_Front_Bar2"  material="Aluminium"  X_Y_Z="ECST_Front_Bar2_xwid-GENV_Eps; ECST_Front_Bar_ywid ;  ECST_Front_Bar_zwid" />
+<box  name="ECST_Front_Bar3"  material="Aluminium"  X_Y_Z="ECST_Front_Bar3_xwid-GENV_Eps; ECST_Front_Bar_ywid ;  ECST_Front_Bar_zwid" />
+<composition  name="ECST_Front_Bar" >
+  <posXYZ  volume="ECST_Front_Bar1"        X_Y_Z="ECST_Front_Bar_xwid/2-ECST_Front_Bar1_xwid/2;0.;0."  />
+  <posXYZ  volume="ECST_Front_Bar2"        X_Y_Z="ECST_Front_Bar_xwid/2-ECST_Front_Bar1_xwid-ECST_Front_Hand_width-ECST_Front_Bar2_xwid/2;0.;0." />
+  <posXYZ  volume="ECST_Front_Bar3"        X_Y_Z="ECST_Front_Bar_xwid/2-ECST_Front_Bar1_xwid-2*ECST_Front_Hand_width-ECST_Front_Bar2_xwid-ECST_Front_Bar3_xwid/2;0.;0."  />
+</composition>
+<!-- Arm Construction -->
+<!--                    ECST_Front_Hand -->
+<gvxy  name="ECST_Front_Hand"  material="Aluminium"  dZ="ECST_Front_Hand_width" >
+  <gvxy_point  X_Y="ECST_Front_Hand_pointAX ; ECST_Front_Hand_pointAY " />
+  <gvxy_point  X_Y="ECST_Front_Hand_pointBX ; ECST_Front_Hand_pointBY " />
+  <gvxy_point  X_Y="ECST_Front_Hand_pointCX ; ECST_Front_Hand_pointCY " />
+  <gvxy_point  X_Y="ECST_Front_Hand_pointDX ; ECST_Front_Hand_pointDY " />
+  <gvxy_point  X_Y="ECST_Front_Hand_pointEX ; ECST_Front_Hand_pointEY " />
+</gvxy>
+<!--                    ECST_Front_Bracket -->
+<gvxy  name="ECST_Front_Bracket1"  material="Aluminium"  dZ="ECST_Front_Bracket_width" >
+  <gvxy_point  X_Y="ECST_Front_Bracket_pointD1X ; ECST_Front_Bracket_pointD1Y " /> 
+  <gvxy_point  X_Y="ECST_Front_Bracket_pointC1X ; ECST_Front_Bracket_pointC1Y " /> 
+  <gvxy_point  X_Y="ECST_Front_Bracket_pointF1X ; ECST_Front_Bracket_pointF1Y " />
+  <gvxy_point  X_Y="ECST_Front_Bracket_pointF1X-ECST_Front_Bracket_Distance_From_Leg+GENV_Eps ; ECST_Front_Bracket_pointF1Y " /> 
+  <gvxy_point  X_Y="ECST_Front_Bracket_pointG1X-ECST_Front_Bracket_Distance_From_Leg+GENV_Eps ; ECST_Front_Bracket_pointG1Y " /> 
+  <gvxy_point  X_Y="ECST_Front_Bracket_pointG1X ; ECST_Front_Bracket_pointG1Y " />
+</gvxy>
+<gvxy  name="ECST_Front_Bracket2"  material="Aluminium"  dZ="ECST_Front_Bracket23_topwidth" > 
+  <gvxy_point  X_Y="ECST_Front_Bracket_pointDX+GENV_Eps*ECST_unit_perp_GDx ; ECST_Front_Bracket_pointDY+GENV_Eps*ECST_unit_perp_GDy " />
+  <gvxy_point  X_Y="ECST_Front_Bracket_pointD1X+GENV_Eps*ECST_unit_perp_GDx ; ECST_Front_Bracket_pointD1Y+GENV_Eps*ECST_unit_perp_GDy " />
+  <gvxy_point  X_Y="ECST_Front_Bracket_pointG1X+GENV_Eps*ECST_unit_perp_GDx ; ECST_Front_Bracket_pointG1Y+GENV_Eps*ECST_unit_perp_GDy " />
+  <gvxy_point  X_Y="ECST_Front_Bracket_pointGX+GENV_Eps*ECST_unit_perp_GDx ; ECST_Front_Bracket_pointGY+GENV_Eps*ECST_unit_perp_GDy " />
+</gvxy>
+<gvxy  name="ECST_Front_Bracket3"  material="Aluminium"  dZ="ECST_Front_Bracket23_topwidth" >
+  <gvxy_point  X_Y="ECST_Front_Bracket_pointC1X-GENV_Eps*ECST_unit_perp_GDx ; ECST_Front_Bracket_pointC1Y-GENV_Eps*ECST_unit_perp_GDy " />
+  <gvxy_point  X_Y="ECST_Front_Bracket_pointCX-GENV_Eps*ECST_unit_perp_GDx ; ECST_Front_Bracket_pointCY-GENV_Eps*ECST_unit_perp_GDy " />
+  <gvxy_point  X_Y="ECST_Front_Bracket_pointFX-GENV_Eps*ECST_unit_perp_GDx ; ECST_Front_Bracket_pointFY-GENV_Eps*ECST_unit_perp_GDy " />
+  <gvxy_point  X_Y="ECST_Front_Bracket_pointF1X-GENV_Eps*ECST_unit_perp_GDx ; ECST_Front_Bracket_pointF1Y-GENV_Eps*ECST_unit_perp_GDy " />
+</gvxy>
+<!--                    ECST_Front_Arm -->
+<composition name="ECST_Front_Arm1">
+  <posXYZ volume="ECST_Front_Hand"  />
+  <posXYZ volume="ECST_Front_Bracket1"  />
+  <posXYZ volume="ECST_Front_Bracket2" X_Y_Z="0.;0.;ECST_Front_Bracket23_topwidth/2"  />
+  <posXYZ volume="ECST_Front_Bracket3" X_Y_Z="0.;0.;ECST_Front_Bracket23_topwidth/2"  />
+</composition>
+<composition name="ECST_Front_Arm2">
+  <posXYZ volume="ECST_Front_Hand"  />
+  <posXYZ volume="ECST_Front_Bracket1"  />
+  <posXYZ volume="ECST_Front_Bracket2" X_Y_Z="0.;0.;-ECST_Front_Bracket23_topwidth/2"  />
+  <posXYZ volume="ECST_Front_Bracket3" X_Y_Z="0.;0.;-ECST_Front_Bracket23_topwidth/2"  />
+</composition>
+<!--                    ECST_Front -->
+<composition name="ECST_Front">
+  <posXYZ volume="ECST_Front_Bar"  />
+  <posXYZ volume="ECST_Front_Arm1" X_Y_Z="ECST_Front_Bar_xwid/2-ECST_Front_Bar1_xwid-ECST_Front_Hand_width/2;-ECST_Front_Bar_ywid/2-ECST_Front_Hand_Gap;ECST_Front_Bar_zwid/2+ECST_Front_Hand_Gap"  rot="0.;-90.;0." /> 
+  <posXYZ volume="ECST_Front_Arm1" X_Y_Z="-ECST_Front_Bar_xwid/2-ECST_Front_Hand_width/2;-ECST_Front_Bar_ywid/2-ECST_Front_Hand_Gap;ECST_Front_Bar_zwid/2+ECST_Front_Hand_Gap"  rot="0.;-90.;0." /> 
+  <posXYZ volume="ECST_Front_Arm2" X_Y_Z="ECST_Front_Bar_xwid/2+ECST_Front_Hand_width/2;-ECST_Front_Bar_ywid/2-ECST_Front_Hand_Gap;ECST_Front_Bar_zwid/2+ECST_Front_Hand_Gap"  rot="0.;-90.;0." /> 
+  <posXYZ volume="ECST_Front_Arm2" X_Y_Z="-ECST_Front_Bar_xwid/2+ECST_Front_Bar3_xwid+ECST_Front_Hand_width/2;-ECST_Front_Bar_ywid/2-ECST_Front_Hand_Gap;ECST_Front_Bar_zwid/2+ECST_Front_Hand_Gap"  rot="0.;-90.;0." /> 
+</composition>
+
+<composition  name="ECT_ServiceTower" >
+  <posXYZ  volume="ECST_Right_Leg"        X_Y_Z="ECST_RL_xwid/2.+ECST_RightLeftLeg_InnerDistanceX/2.; ECST_movey; ECST_movez"  />
+  <posXYZ  volume="ECST_Left_Leg"         X_Y_Z="-ECST_LL_inner_distanceX/2-ECST_LL_xwid-ECST_RightLeftLeg_InnerDistanceX/2.; ECST_movey; ECST_movez"  />
+  <posXYZ  volume="ECST_MiddleBars"   />
+  <posXYZ  volume="ECST_InclinedBar"  />
+  <posXYZ  volume="ECST_Front"     X_Y_Z="ECST_RightLeftLeg_InnerDistanceX/2+ECST_RL_xwid-ECST_Front_Bar_xwid/2; ECST_Front_Bar_starty-ECST_ywid/2+ECST_Front_Bar_ywid/2+ECST_movey; ECST_Front_Bar_startz+ECST_zwid+ECST_RL_inner_distanceZ/2-ECST_Front_Bar_zwid/2+ECST_movez"  />
+  <posXYZ  volume="ECST_Front_Glass"     X_Y_Z="ECST_Front_Frame_xpos;ECST_Front_Frame_ypos;ECST_Front_Frame_zpos"  />
+</composition>
+
+<var  name="ECST_SToDzBot"  value="1650." /> <!-- atczte__0002-vAB 14-JUL-2006 -->
+<var  name="ECST_SToThic2"  value="  50."/>
+<var  name="ECST_SToYpos"   value="5800." /> <!-- atczte__0002-vAB 14-JUL-2006 -->
+
+<var  name="AECT_SupInnWheel_Thickness"     value="   20. "/>
+<var  name="AECT_SupInnWheel_Distance"      value="  390. "/>
+<var  name="AECT_SupInnWheel_SideDY"        value="  160. "/>
+<var  name="AECT_SupInnWheel_SideDZ"        value=" 3010. "/>
+<var  name="AECT_SupInnWheel_PlateDZ"       value="  160. "/>
+<var  name="AECT_SupInnWheel_Yoff"          value="   88. "/>
+
+<var  name="AECT_SupOutWheel_Thickness"     value="   71. "/>
+<var  name="AECT_SupOutWheel_DY"            value="  446. "/>
+<var  name="AECT_SupOutWheel_XPosInn"       value=" 2575. "/>
+<var  name="AECT_SupOutWheel_XPosOut"       value=" 3434. "/>
+
+<var  name="AECT_SupWheel_AirPadSup_addDY"  value="  150. "/>
+<var  name="AECT_SupWheel_AirPadSup_relZ"   value=" 1330. "/>
+
+<var  name="AECT_SupWheel_AirPad_Rad"       value="  350. "/>
+<var  name="AECT_SupWheel_AirPad_Hight"     value="  125. "/>
+
+<var  name="AECT_SupWheel_dxJackBox_DX"     value="  555. "/>
+<var  name="AECT_SupWheel_dyJackBox_DY"     value="  110. "/>
+<var  name="AECT_SupWheel_dzJackBox_DZ"     value="  275. "/>
+<var  name="AECT_SupWheel_Jack_AbsXPos"     value=" 3045. "/>
+<var  name="AECT_SupWheel_Jack_DiffXPos"    value="  230. "/>
+<var  name="AECT_SupWheel_Jack_Radius"      value="   80. "/>
+<var  name="AECT_SupWheel_Jack_Hight"       value="  280. "/>
+<var  name="AECT_SupWheel_SpecBox_DZ"       value=" 2500. "/>
+
+<var  name="AECT_SupWheel_YPos"             value="-3945. "/>
+
+<array  name="AECT_SupInnWheel_PlatePos"    values=" 350. ; 852. ; 1425. ; 1998. " />
+
+<box  name="ECT_SupInnWheel_Side"   material="Aluminium"  X_Y_Z=" AECT_SupInnWheel_Thickness ; AECT_SupInnWheel_SideDY ; AECT_SupInnWheel_SideDZ " />
+<box  name="ECT_SupInnWheel_Plate"  material="Aluminium"  X_Y_Z=" AECT_SupInnWheel_Distance - 2.*AECT_SupInnWheel_Thickness ; AECT_SupInnWheel_Thickness ; AECT_SupInnWheel_PlateDZ " />
+<box  name="ECT_SupOutWheel"        material="Aluminium"  X_Y_Z=" AECT_SupOutWheel_Thickness ; AECT_SupOutWheel_DY ; AECT_EVOShZ_EVOutShellholeZwid - 2.*AECT_EVOSCZ_EVOutShellConnZwid " />
+<box  name="ECT_SupWheel_AirPadSup" material="Iron"       X_Y_Z=" AECT_SupInnWheel_Distance - 2.*AECT_SupInnWheel_Thickness; AECT_SupInnWheel_SideDY+AECT_SupWheel_AirPadSup_addDY; 2.*(AECT_SupWheel_AirPadSup_relZ-AECT_SupInnWheel_SideDZ/2+AECT_SupInnWheel_PlatePos[0])"/>
+<tubs name="ECT_SupWheel_AirPad"    material="Iron"       Rio_Z=" 0. ; AECT_SupWheel_AirPad_Rad ; AECT_SupWheel_AirPad_Hight"/>
+<box  name="ECT_SupWheel_JackBox"   material="Iron"       X_Y_Z="AECT_SupWheel_dxJackBox_DX; AECT_SupWheel_dyJackBox_DY; AECT_SupWheel_dzJackBox_DZ"/> 
+<tubs name="ECT_SupWheel_Jack"      material="Iron"       Rio_Z=" 0. ; AECT_SupWheel_Jack_Radius ; AECT_SupWheel_Jack_Hight"/>
+<box  name="ECT_SupWheel_SpecBox"   material="Aluminium"  X_Y_Z="AECT_SupInnWheel_SideDY; AECT_SupInnWheel_SideDY; AECT_SupWheel_SpecBox_DZ"/>
+
+<composition  name="ECT_SupWheel_basic">
+  <posXYZ  volume="ECT_SupOutWheel"        X_Y_Z=" (AECT_SupOutWheel_XPosOut-AECT_SupOutWheel_XPosInn+AECT_SupOutWheel_Thickness)/2.; -AECT_SupOutWheel_DY/2. ; 0. "  />
+  <posXYZ  volume="ECT_SupOutWheel"        X_Y_Z="-(AECT_SupOutWheel_XPosOut-AECT_SupOutWheel_XPosInn+AECT_SupOutWheel_Thickness)/2.; -AECT_SupOutWheel_DY/2. ; 0. "  />
+  <posXYZ  volume="ECT_SupInnWheel_Side"   X_Y_Z=" (AECT_SupInnWheel_Distance-AECT_SupInnWheel_Thickness)/2.; -AECT_SupInnWheel_SideDY/2.-AECT_SupInnWheel_Yoff ; 0. "  />
+  <posXYZ  volume="ECT_SupInnWheel_Side"   X_Y_Z="-(AECT_SupInnWheel_Distance-AECT_SupInnWheel_Thickness)/2.; -AECT_SupInnWheel_SideDY/2.-AECT_SupInnWheel_Yoff ; 0. "  />
+  <foreach  index="Irib"  begin="1"  loops="3" >
+    <posXYZ  volume="ECT_SupInnWheel_Plate"      X_Y_Z=" 0.; -AECT_SupInnWheel_SideDY/2.-AECT_SupInnWheel_Yoff; -(AECT_SupInnWheel_SideDZ-AECT_SupInnWheel_PlateDZ)/2.+AECT_SupInnWheel_PlatePos[Irib]" />
+  </foreach>
+  <posXYZ  volume="ECT_SupInnWheel_Plate"  X_Y_Z="0.; (AECT_SupInnWheel_SideDY-AECT_SupInnWheel_Thickness)/2.-AECT_SupInnWheel_SideDY/2.-AECT_SupInnWheel_Yoff; -(AECT_SupInnWheel_SideDZ-AECT_SupInnWheel_PlateDZ)/2.+AECT_SupInnWheel_PlatePos[0] " />
+  <posXYZ  volume="ECT_SupInnWheel_Plate"  X_Y_Z="0.; (AECT_SupInnWheel_SideDY-AECT_SupInnWheel_Thickness)/2.-AECT_SupInnWheel_SideDY/2.-AECT_SupInnWheel_Yoff;  (AECT_SupInnWheel_SideDZ-AECT_SupInnWheel_PlateDZ)/2.-AECT_SupInnWheel_PlatePos[0] " />
+  <posXYZ  volume="ECT_SupWheel_AirPadSup" X_Y_Z="0.; -(AECT_SupInnWheel_SideDY+AECT_SupWheel_AirPadSup_addDY)/2.;  AECT_SupWheel_AirPadSup_relZ" />
+  <posXYZ  volume="ECT_SupWheel_AirPadSup" X_Y_Z="0.; -(AECT_SupInnWheel_SideDY+AECT_SupWheel_AirPadSup_addDY)/2.; -AECT_SupWheel_AirPadSup_relZ" />
+  <posXYZ  volume="ECT_SupWheel_AirPad"    X_Y_Z="0.; -AECT_SupInnWheel_SideDY-AECT_SupWheel_AirPadSup_addDY-AECT_SupWheel_AirPad_Hight/2.; AECT_SupWheel_AirPadSup_relZ "  rot="90.; 0.; 0."/> 
+  <posXYZ  volume="ECT_SupWheel_AirPad"    X_Y_Z="0.; -AECT_SupInnWheel_SideDY-AECT_SupWheel_AirPadSup_addDY-AECT_SupWheel_AirPad_Hight/2.; -AECT_SupWheel_AirPadSup_relZ "  rot="90.; 0.; 0."/> 
+  <posXYZ  volume="ECT_SupWheel_Jack"      X_Y_Z="(-AECT_SupOutWheel_XPosOut-AECT_SupOutWheel_XPosInn)/2.+AECT_SupWheel_Jack_AbsXPos; -AECT_EVOSso_EVOutShellspecioff-AECT_SupWheel_dyJackBox_DY-AECT_SupWheel_Jack_Hight/2.;  AECT_EVOShZ_EVOutShellholeZwid/2.-AECT_EVOSCZ_EVOutShellConnZwid"  rot="90.; 0.; 0."/>
+  <posXYZ  volume="ECT_SupWheel_Jack"      X_Y_Z="(-AECT_SupOutWheel_XPosOut-AECT_SupOutWheel_XPosInn)/2.+AECT_SupWheel_Jack_AbsXPos-AECT_SupWheel_Jack_DiffXPos; -AECT_EVOSso_EVOutShellspecioff-AECT_SupWheel_dyJackBox_DY-AECT_SupWheel_Jack_Hight/2.;  AECT_EVOShZ_EVOutShellholeZwid/2.-AECT_EVOSCZ_EVOutShellConnZwid"  rot="90.; 0.; 0."/>
+  <posXYZ  volume="ECT_SupWheel_Jack"      X_Y_Z="(-AECT_SupOutWheel_XPosOut-AECT_SupOutWheel_XPosInn)/2.+AECT_SupWheel_Jack_AbsXPos; -AECT_EVOSso_EVOutShellspecioff-AECT_SupWheel_dyJackBox_DY-AECT_SupWheel_Jack_Hight/2.;  -AECT_EVOShZ_EVOutShellholeZwid/2.+AECT_EVOSCZ_EVOutShellConnZwid"  rot="90.; 0.; 0."/>
+  <posXYZ  volume="ECT_SupWheel_Jack"      X_Y_Z="(-AECT_SupOutWheel_XPosOut-AECT_SupOutWheel_XPosInn)/2.+AECT_SupWheel_Jack_AbsXPos-AECT_SupWheel_Jack_DiffXPos; -AECT_EVOSso_EVOutShellspecioff-AECT_SupWheel_dyJackBox_DY-AECT_SupWheel_Jack_Hight/2.;  -AECT_EVOShZ_EVOutShellholeZwid/2.+AECT_EVOSCZ_EVOutShellConnZwid"  rot="90.; 0.; 0."/>
+  <posXYZ  volume="ECT_SupWheel_JackBox"   X_Y_Z="(-AECT_SupOutWheel_XPosOut-AECT_SupOutWheel_XPosInn)/2.+AECT_SupWheel_Jack_AbsXPos-AECT_SupWheel_Jack_DiffXPos/2.; -AECT_EVOSso_EVOutShellspecioff-AECT_SupWheel_dyJackBox_DY/2.;  -AECT_EVOShZ_EVOutShellholeZwid/2.+AECT_EVOSCZ_EVOutShellConnZwid" />
+  <posXYZ  volume="ECT_SupWheel_JackBox"   X_Y_Z="(-AECT_SupOutWheel_XPosOut-AECT_SupOutWheel_XPosInn)/2.+AECT_SupWheel_Jack_AbsXPos-AECT_SupWheel_Jack_DiffXPos/2.; -AECT_EVOSso_EVOutShellspecioff-AECT_SupWheel_dyJackBox_DY/2.;   AECT_EVOShZ_EVOutShellholeZwid/2.-AECT_EVOSCZ_EVOutShellConnZwid" />
+</composition>
+
+<composition  name="ECT_SupWheel_Right">
+  <posXYZ  volume="ECT_SupWheel_basic"     X_Y_Z="  (AECT_SupOutWheel_XPosOut+AECT_SupOutWheel_XPosInn)/2.; 0.; 0."  />
+  <posXYZ  volume="ECT_SupWheel_SpecBox"   X_Y_Z="  AECT_SupOutWheel_XPosOut-AECT_SupInnWheel_SideDY/2.; -AECT_SupInnWheel_SideDY/2.-AECT_SupInnWheel_Yoff; AECT_SupWheel_SpecBox_DZ/2." />
+</composition>
+
+<composition  name="ECT_SupWheel_Left">
+  <posXYZ  volume="ECT_SupWheel_basic"     X_Y_Z=" -(AECT_SupOutWheel_XPosOut+AECT_SupOutWheel_XPosInn)/2.; 0.; 0."    rot="0.; 180.; 0."/>
+  <posXYZ  volume="ECT_SupWheel_SpecBox"   X_Y_Z=" -AECT_SupOutWheel_XPosOut+AECT_SupInnWheel_SideDY/2.; -AECT_SupInnWheel_SideDY/2.-AECT_SupInnWheel_Yoff; AECT_SupWheel_SpecBox_DZ/2." />
+</composition>
+
+<composition  name="ECT_SuppoWheels" >
+  <posXYZ  volume="ECT_SupWheel_Right"     X_Y_Z="  0. ; AECT_SupWheel_YPos ; 0. " />
+  <posXYZ  volume="ECT_SupWheel_Left"      X_Y_Z="  0. ; AECT_SupWheel_YPos ; 0. " />
+</composition>
+
+<composition  name="ECT_Toroid_single" >
+  <mposPhi  volume="ECT_ColdMass"  ncopy="8" />
+  <mposWedge  volume="ECT_TS_ThermalShield_default" wedge_number="8"  sectors=" 0; 1; 1; 1; 0; 1; 1; 1"  >
+    <sector  value="1"  step="1"  />
+  </mposWedge>
+  <posRPhiZ   volume="ECT_TS_ThermalShield_special"  R_Phi_Z=" 0. ; -90. ; 0. " >
+    <sector  value="1"  />
+  </posRPhiZ>
+  <posRPhiZ   volume="ECT_TS_ThermalShield_special"  R_Phi_Z=" 0. ;-270. ; 0. " >
+    <sector  value="5"  />
+  </posRPhiZ>
+  <posXYZ  volume="ECT_TS_CentralTube"/>
+  <mposWedge  volume="ECT_JTV_Shielding_default" wedge_number="8"  sectors=" 0; 1; 1; 1; 0; 1; 1; 1"  >
+    <sector  value="1"  step="1"  />
+  </mposWedge>
+  <posRPhiZ   volume="ECT_JTV_Shielding_special"  R_Phi_Z=" 0. ; -90. ; 0. " >
+    <sector  value="1"  />
+  </posRPhiZ>
+  <posRPhiZ   volume="ECT_JTV_Shielding_special"  R_Phi_Z=" 0. ;-270. ; 0. " >
+    <sector  value="5"  />
+  </posRPhiZ>
+  <mposWedge  volume="ECT_EV_Envelop_default"  wedge_number="8"  sectors=" 1; 1; 1; 1; 1; 0; 0; 1"  >
+    <sector  value="1"  step="1"  />
+  </mposWedge>
+  <posRPhiZ   volume="ECT_EV_Envelop_special_Sector6"  R_Phi_Z=" 0. ; 135. ; 0. " >
+    <sector  value="6"  />
+  </posRPhiZ>
+  <posRPhiZ   volume="ECT_EV_Envelop_special_Sector7"  R_Phi_Z=" 0. ; 180. ; 0. " >
+    <sector  value="7"  />
+  </posRPhiZ>
+  <mposWedge  volume="ECT_EV_AlignTube_default" wedge_number="8"  sectors=" 0; 1; 1; 1; 0; 1; 1; 1"  >
+    <sector  value="1"  step="1"  />
+  </mposWedge>
+  <posRPhiZ   volume="ECT_EV_AlignTube_special"  R_Phi_Z=" 0. ; 22.5 ; 0. " >
+    <sector  value="1"  />
+  </posRPhiZ>
+  <posRPhiZ   volume="ECT_EV_AlignTube_special"  R_Phi_Z=" 0. ;202.5 ; 0. " >
+    <sector  value="5"  />
+  </posRPhiZ>
+  <posXYZ  volume="ECT_EV_CentralTube"/>
+  <posXYZ  volume="ECT_JTV_FrontRing" />
+  <posXYZ  volume="ECT_JTV_BackRing" X_Y_Z=" 0.; 0.; GENV_Eps"/>
+  <posXYZ  volume="ECT_EV_Yoke" X_Y_Z=" 0.; 0.;  AECT_CTYpoZ_CentTubeYokeposZ"/>
+  <posXYZ  volume="ECT_EV_Yoke" X_Y_Z=" 0.; 0.; -AECT_CTYpoZ_CentTubeYokeposZ"/>
+  <posRPhiZ    volume="ECT_EV_SideAttachment"  R_Phi_Z=" AECT_EVEPid_EVEndPlateindist - (AECT_EVSSAh_EVSideSupporthight + AECT_EVOSit_EVOutShellinnthick + AECT_EVOSio_EVOutShellinneroff)/2. ;  22.5 ; 0. " />
+  <posRPhiZ    volume="ECT_EV_SideAttachment"  R_Phi_Z=" AECT_EVEPid_EVEndPlateindist - (AECT_EVSSAh_EVSideSupporthight + AECT_EVOSit_EVOutShellinnthick + AECT_EVOSio_EVOutShellinneroff)/2. ; 202.5 ; 0. " />
+  <posRPhiZ    volume="ECT_EV_FrontAttachment" R_Phi_Z=" AECT_EVTSRa_EVTopSupportRadius + (AECT_EVTSAl_EVTopSupportlength)/2. ;  22.5 ;  (AECT_EVOShZ_EVOutShellholeZwid - AECT_EVTSAh_EVTopSupporthight)/2." />
+  <posRPhiZ    volume="ECT_EV_FrontAttachment" R_Phi_Z=" AECT_EVTSRa_EVTopSupportRadius + (AECT_EVTSAl_EVTopSupportlength)/2. ; 202.5 ;  (AECT_EVOShZ_EVOutShellholeZwid - AECT_EVTSAh_EVTopSupporthight)/2." />
+  <posRPhiZ    volume="ECT_EV_BackAttachment"  R_Phi_Z=" AECT_EVTSRa_EVTopSupportRadius + (AECT_EVTSAl_EVTopSupportlength)/2. ;  22.5 ; -(AECT_EVOShZ_EVOutShellholeZwid - AECT_EVTSAh_EVTopSupporthight)/2." />
+  <posRPhiZ    volume="ECT_EV_BackAttachment"  R_Phi_Z=" AECT_EVTSRa_EVTopSupportRadius + (AECT_EVTSAl_EVTopSupportlength)/2. ; 202.5 ; -(AECT_EVOShZ_EVOutShellholeZwid - AECT_EVTSAh_EVTopSupporthight)/2." />
+  <mposPhi  volume="ECT_EV_CryoStop_outside"  ncopy="8" />
+  <mposPhi  volume="ECT_EV_CryoStop_inside"   ncopy="8" />
+  <posXYZ  volume="ECT_ServTur"  X_Y_Z=" 0. ; AECT_SrvTu1He_ServTur1Height/2.  + AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSio_EVOutShellinneroff; -AECT_EVOShZ_EVOutShellholeZwid/2.+AECT_ServTuZoff_ServTurZoffset" />
+  <posXYZ  volume="ECT_ServiceTower"  X_Y_Z=" 0. ; ECST_SToYpos ; -ECST_SToThic2 - AECT_EVOShZ_EVOutShellholeZwid/2. + AECT_ServTuZoff_ServTurZoffset - ECST_SToDzBot/2. "  rot="0. ; 0. ; 0. " /> 
+ <posXYZ  volume="ECT_SuppoWheels" />
+</composition>
+
+<composition  name="ECT_ToroidN" >
+  <posXYZ  volume="ECT_Toroid_single"    X_Y_Z=" 0. ; 0. ;  -AECT_Toroid_ZPosition" >
+    <ring  value="-1" />
+  </posXYZ>
+</composition>
+
+<composition  name="ECT_ToroidP" >
+  <posXYZ  volume="ECT_Toroid_single"    X_Y_Z=" 0. ; 0. ;   AECT_Toroid_ZPosition"  rot="0. ; 180. ; 0. ">
+    <ring  value=" 1" />
+  </posXYZ>
+</composition>
+
+<composition  name="ECT_Toroids" >
+  <posXYZ  volume="ECT_ToroidN"    X_Y_Z=" 0. ; 0. ; 0." />
+  <posXYZ  volume="ECT_ToroidP"    X_Y_Z=" 0. ; 0. ; 0." />
+</composition>
+
+<!-- gvxy status 10/25 are converted to subtractions -->
+
+</section>
+
+
+<section name       = "Atlas Barrel Toroidal Magnets"
+         version    = "7.0"
+         date       = "01-01-10, 28 November 2002"
+         author     = "Jochen Meyer, Laurent Chevalier, Marc Virchaux, Daniel Pomarede"
+         top_volume = "BAR_Toroid">
+
+<!--     name       =  Atlas Barrel Toroidal Magnets section name       = "Magnets"   -->
+
+<!--  reviewed/corrected in March 2010 by Jochen Meyer 
+      comment: * blueprint references are available on the twiki Pages
+               * still some details are missing                       -->
+
+<!--  **************************************************************
+      **************************************************************
+      ***                                                       ****
+      ***             Atlas Barrel Toroid (BAR)                 ****
+      ***                                                       ****
+      **************************************************************
+      **************************************************************  -->
+
+
+<!-- Atlas Barrel toroid Cryostat -->
+
+<var    name="ABRT_CryoRmin"      value="  4720." />       <!-- atltbw__0002-vAD 4745. -->
+<var    name="ABRT_CryoRmax"      value=" 10030." />       <!-- atltbw__0002-vAD 10065. -->
+<var    name="ABRT_CryoZmax"      value=" 12630." />       <!-- atltbyv_0003-vAE -->
+<var    name="ABRT_CryoRcur"      value="   821." />       <!-- atltbyv_0003-vAE -->
+<var    name="ABRT_CryoRadi_Radius"    value="   550." />  <!-- atltbyv_0003-vAE -->
+<var    name="ABRT_CryoRadT_RadThick"  value="    15." />  <!-- not confirmed -->
+
+<!-- Cryostat Attachment -->
+
+<!-- BEGIN confirmation with atltbyv_0010-vAB (if no other comment) -->
+<var    name="ABRT_CryAttD0_CryoAttDiam0"  value="  550." />
+<var    name="ABRT_CryAttD1_CryoAttDiam1"  value="  439." />
+<var    name="ABRT_CryAttAl_CryoAttAlfa"   value="    8." />     <!-- atltbwv_0029-vAB -->
+<var    name="ABRT_CryAttXh_CryoAttXhigh"  value=" 1490." />
+<var    name="ABRT_CryAttTh_CryoAttThick"  value="   10." />
+<var    name="ABRT_CryAttRx_CryoAttRmax"   value=" ABRT_CryoRmin + ABRT_CryoRadi_Radius" />
+<var    name="ABRT_CryAttSe_CryoAttSlimend"   value="  557." />
+<!-- END confirmation with atltbyv_0010-vAB -->
+
+<!-- BEGIN confirmation with atltbyv_0007-vAC (if no other comment) -->
+<var    name="ABRT_CryAtWiY_CryoAttWingY"     value="  600." />
+<var    name="ABRT_CryAtWXp_CryoAttWingXp"    value="  590." />
+<var    name="ABRT_CryAtWXn_CryoAttWingXn"    value="  -41." />
+<var    name="ABRT_CryAtWBo_CryoAttWingBoss"  value="   40." />
+<var    name="ABRT_CryAtWTh_CryoAttWingThick" value="   20." />  <!-- atltbyv_0004-vAC -->
+<var    name="ABRT_CryAtWZe_CryoAttWingZesp"  value="  590." />  <!-- atltbyv_0003-vAE --> <!-- atltbyv_0004-vAC -->
+<var    name="ABRT_CryAtWRa_CryoAttWingRad"   value="  570." />
+<var    name="ABRT_CryAtWYc_CryoAttWingYcut"  value="  150." />
+<!-- END confirmation with atltbyv_0007-vAC -->
+
+<!-- Cryostat Ribs -->
+
+<!-- BEGIN confirmation with atltbyv_0004-vAC (if no other comment) -->
+<var    name="ABRT_CryRibYw_CryoRibYwid"      value="  500." />
+<var    name="ABRT_CryRibZl_CryoRibZlen"      value="  290." />  <!-- approx. since length is varying for each rib -->
+<var    name="ABRT_CryRibTh_CryoRibThick"     value="   10." />
+<var    name="ABRT_CryRiWYp_CryoRibWingYp"    value="  436." />
+<var    name="ABRT_CryRiWYn_CryoRibWingYn"    value=" 1100." />
+<var    name="ABRT_CryRiWXp_CryoRibWingXp"    value="  430." />
+<var    name="ABRT_CryRiWTh_CryoRibWingThick" value="   10." />
+<var    name="ABRT_CryRiWXc_CryoRibWingXncut" value="   75." />
+<var    name="ABRT_CryRiWAn_CryoRibWingAngle" value="   62." />
+<var    name="ABRT_CryRiWXn_CryoRibWingXn"    value=" -tan(ABRT_CryRiWAn_CryoRibWingAngle*GENV_PiS180)*(ABRT_CryRiWYn_CryoRibWingYn - ABRT_CryRiWYp_CryoRibWingYp)/2. + ABRT_CryRiWXp_CryoRibWingXp " />
+<!-- END confirmation with atltbyv_0004-vAC -->
+ 
+<!-- Cryostat Ring -->
+
+<var    name="ABRT_CryRngRm_CryoRingRmed"   value="  8790." />  <!-- atltbw__0002-vAD-->
+<var    name="ABRT_CryRngZm_CryoRingZmed"   value=" -1030." />  <!-- atltbyv_0003-vAE -->
+<var    name="ABRT_CryRngRa_CryoRingRadius" value="   340." />  <!-- atltbyv_0004-vAC -->
+
+
+<!-- Struts -->
+<!-- BEGIN confirmation with atltbws_0023-vAA (if no other comment) -->
+<var    name="ABRT_StrtYlen"       value="  5690." />
+<var    name="ABRT_StrtZwid_StrutZwidth"     value="   500." />
+<var    name="ABRT_StrtRthi_StrutRthick"     value="    50." />
+<var    name="ABRT_StrtPoff_StrutPlateoff"   value="    50." />
+<var    name="ABRT_StrtPthi_StrutPlatethick" value="    50." />
+<var    name="ABRT_StrtZthi_StrutZthick"     value="    40." />
+<!-- END confirmation with atltbws_0023-vAA -->
+
+<var    name="ABRT_StrWRmax_StrutWingRmax"   value="ABRT_CryoRmax" /> <!-- has to be true, otherwise everything will break down-->
+
+<!-- BEGIN confirmation with atltbyv_0006-vAB (if no other comment) -->
+<var    name="ABRT_StrWYmax_StrutWingYmax"   value="   390." />
+<var    name="ABRT_StrWYmed_StrutWingYmedi"  value="   791." />
+<var    name="ABRT_StrWYRli_StrutWingYRlink" value="   732." />
+<var    name="ABRT_StrWRwid_StrutWingRwidth" value="  1250." />
+<var    name="ABRT_StrWYmin_StrutWingYmin"   value="   245." />
+<var    name="ABRT_StrWZthi_StrutWingZthick" value="    20." />
+<var    name="ABRT_StrWYthi_StrutWingYthick" value="    50." />
+<var    name="ABRT_StrWZlen_StrutWingZlen"   value="   430." />
+<var    name="ABRT_StrWYucu_StrutWingYupcut" value="   150." />
+<var    name="ABRT_StrWSPth_StrutWingSmallPlatethick" value="   500." />
+<var    name="ABRT_StrWBPth_StrutWingBigPlatethick"   value="   520." />
+<var    name="ABRT_StrWBPhi_StrutWingBigPlateheight"  value="   700." />
+<!-- END confirmation with atltbyv_0006-vAB -->
+
+<array  name="ABRT_Zvouss"  values=" -10845. ; -8245. ; -5137.5 ; -1712.5 ; 1712.5 ; 5137.5 ; 8245. ; 10845. " />  <!-- atltbyv_0003-vAE -->
+<array  name="ABRT_Zrib"    values=" -9540. ; -6760. ; -3490. ; 0. ; 3490. ; 6760. ; 9540. " />                    <!-- atltbyv_0003-vAE -->
+
+
+
+<!--  Derived variables  -->
+
+<var  name="ABRT_CryRiXhi_CryoRibXhigh"    value="(ABRT_CryoRmax+ABRT_CryoRmin)/2. - ABRT_CryoRmin - ABRT_CryoRadi_Radius" />
+<var  name="ABRT_CryAttXs_CryoAttXsec"     value="(ABRT_CryAttD0_CryoAttDiam0 - 2.*ABRT_CryAttTh_CryoAttThick - ABRT_CryAttD1_CryoAttDiam1)/2./tan(ABRT_CryAttAl_CryoAttAlfa*GENV_PiS180)" />
+<var  name="ABRT_StrWRmed_StrutWingRmedi"  value="(ABRT_StrtYlen + 2.* ( ABRT_StrWYRli_StrutWingYRlink + ABRT_StrWYthi_StrutWingYthick)) / 2. / GENV_Si225" />
+<var  name="ABRT_StrWRmin_StrutWingRmin"   value="ABRT_StrWRmax_StrutWingRmax - ABRT_StrWRwid_StrutWingRwidth" />
+<var  name="ABRT_StrWYlow_StrutWingYlower" value="(ABRT_StrWRmin_StrutWingRmin - ABRT_StrWYmin_StrutWingYmin * GENV_Ta20 - ABRT_StrWRmed_StrutWingRmedi + ABRT_StrWYmed_StrutWingYmedi / GENV_Ta225 ) / (GENV_Ta675 - GENV_Ta20)" />
+<var  name="ABRT_StrWRlow_StrutWingRlower" value="GENV_Ta675 * ABRT_StrWYlow_StrutWingYlower + ABRT_StrWRmed_StrutWingRmedi - ABRT_StrWYmed_StrutWingYmedi / GENV_Ta225 " /> 
+<var  name="ABRT_StrWAlow_StrutWingAlower" value="atan((ABRT_StrWRlow_StrutWingRlower-ABRT_StrWRmax_StrutWingRmax + ABRT_StrWRwid_StrutWingRwidth)/(ABRT_StrWYlow_StrutWingYlower-ABRT_StrWYmin_StrutWingYmin))" />
+<var  name="ABRT_StrWAupp_StrutWingAupper" value="atan((ABRT_StrWRmax_StrutWingRmax-ABRT_StrWRmed_StrutWingRmedi)/(ABRT_StrWYmed_StrutWingYmedi-ABRT_StrWYmax_StrutWingYmax))" />
+
+<!--  Description of an Atlas Barrel Cold Mass  -->
+
+<!-- BEGIN confirmation with atltbcc_0002-v0 (if no other comment) -->
+<var  name="ABRT_CoMaRmin_ColdMassRmin"    value=" 4851.1" />  <!-- not confirmed, old GUESS 4857.5 -->
+<var  name="ABRT_CoMaRmax_ColdMassRmax"    value=" 9924.3" />  <!-- not confirmed, old GUESS 9952.5 --> 
+<var  name="ABRT_CoMaZmax_ColdMassZmax"    value="12478.8" />  <!-- warm: 12532.5  --> 
+<var  name="ABRT_CoMaRcuI_ColdMassRcurv"   value=" 1449.8" />  <!-- warm:  1456.   -->
+<var  name="ABRT_CoMaRThi_ColdMassRThick"  value="  791.6" />  <!-- warm:   795.   -->
+<var  name="ABRT_CoMaYThi_ColdMassYThick"  value="  288. " />  <!-- warm:   288.   (here warm value used because of ABRT_BielAtTh_BiellAttThick=288. too) -->
+<var  name="ABRT_CoMaRibZ_ColdMassRibZ"    value="   99.6" />  <!-- warm:   100.   -->
+<var  name="ABRT_CoMaRanL_ColdMassRanglen" value="  385.6" />  <!-- warm:   387.2  -->
+<!-- END confirmation with atltbcc_0002-v0 -->
+
+<box  name="BAR_ColdMassAlongZ"  material="Aluminium8"  X_Y_Z="ABRT_CoMaRThi_ColdMassRThick; ABRT_CoMaYThi_ColdMassYThick; 2.*(ABRT_CoMaZmax_ColdMassZmax - ABRT_CoMaRcuI_ColdMassRcurv) - GENV_Eps" />
+<box  name="BAR_ColdMassAlongR"  material="Aluminium8"  X_Y_Z="ABRT_CoMaRmax_ColdMassRmax - ABRT_CoMaRmin_ColdMassRmin - 2.*ABRT_CoMaRcuI_ColdMassRcurv - GENV_Eps; ABRT_CoMaYThi_ColdMassYThick; ABRT_CoMaRThi_ColdMassRThick " />
+
+<gvxy  name="BAR_CornerAngled_Cut"  material="Aluminium8"  dZ="ABRT_CoMaYThi_ColdMassYThick + GENV_Eps" >
+  <gvxy_point  X_Y=" ABRT_CoMaRThi_ColdMassRThick; -GENV_Eps " />
+  <gvxy_point  X_Y=" ABRT_CoMaRThi_ColdMassRThick; ABRT_CoMaRcuI_ColdMassRcurv - ABRT_CoMaRThi_ColdMassRThick - ABRT_CoMaRanL_ColdMassRanglen" />
+  <gvxy_point  X_Y=" ABRT_CoMaRThi_ColdMassRThick + ABRT_CoMaRanL_ColdMassRanglen; ABRT_CoMaRcuI_ColdMassRcurv - ABRT_CoMaRThi_ColdMassRThick" />
+  <gvxy_point  X_Y=" ABRT_CoMaRcuI_ColdMassRcurv + GENV_Eps; ABRT_CoMaRcuI_ColdMassRcurv - ABRT_CoMaRThi_ColdMassRThick" />
+  <gvxy_point  X_Y=" ABRT_CoMaRcuI_ColdMassRcurv + GENV_Eps; -GENV_Eps " />
+</gvxy>
+<tubs   name="BAR_CornerRound"  material="Aluminium8"  Rio_Z=" 0. ; ABRT_CoMaRcuI_ColdMassRcurv ; ABRT_CoMaYThi_ColdMassYThick"  profile="90.; 90." nbPhi="8" />
+<subtraction name="BAR_Corner" >
+   <posXYZ  volume="BAR_CornerRound"   X_Y_Z=" ABRT_CoMaRcuI_ColdMassRcurv; 0. ; 0.  "  rot=" 90. ; 0. ; 0. "/> 
+   <posXYZ  volume="BAR_CornerAngled_Cut"  X_Y_Z=" 0. ; 0. ; 0. "  rot=" 90. ; 0. ; 0. "/> 
+</subtraction>
+
+<box   name="BAR_ColdMassRib"     material="Aluminium8"  X_Y_Z=" ABRT_CoMaRmax_ColdMassRmax - ABRT_CoMaRmin_ColdMassRmin - 2.*ABRT_CoMaRThi_ColdMassRThick - GENV_Eps; ABRT_CoMaYThi_ColdMassYThick; ABRT_CoMaRibZ_ColdMassRibZ" />
+
+<composition        name="BAR_ColdMassCoil" >
+  <posXYZ    volume="BAR_ColdMassAlongZ"   X_Y_Z="ABRT_CoMaRmin_ColdMassRmin + ABRT_CoMaRThi_ColdMassRThick/2. ; 0; 0."  />
+  <posXYZ    volume="BAR_ColdMassAlongZ"   X_Y_Z="ABRT_CoMaRmax_ColdMassRmax - ABRT_CoMaRThi_ColdMassRThick/2. ; 0; 0."  />
+  <posXYZ    volume="BAR_ColdMassAlongR"   X_Y_Z="(ABRT_CoMaRmax_ColdMassRmax+ABRT_CoMaRmin_ColdMassRmin)/2.; 0;  ABRT_CoMaZmax_ColdMassZmax - ABRT_CoMaRThi_ColdMassRThick/2."  />
+  <posXYZ    volume="BAR_ColdMassAlongR"   X_Y_Z="(ABRT_CoMaRmax_ColdMassRmax+ABRT_CoMaRmin_ColdMassRmin)/2.; 0; -ABRT_CoMaZmax_ColdMassZmax + ABRT_CoMaRThi_ColdMassRThick/2."  />
+  <posXYZ    volume="BAR_Corner"           X_Y_Z="ABRT_CoMaRmin_ColdMassRmin ; 0.;  ABRT_CoMaZmax_ColdMassZmax - ABRT_CoMaRcuI_ColdMassRcurv"  rot=" 0. ;  0. ; 0. " />
+  <posXYZ    volume="BAR_Corner"           X_Y_Z="ABRT_CoMaRmin_ColdMassRmin + ABRT_CoMaRcuI_ColdMassRcurv ; 0.; -ABRT_CoMaZmax_ColdMassZmax"  rot=" 0. ; 270. ; 0. " />
+  <posXYZ    volume="BAR_Corner"           X_Y_Z="ABRT_CoMaRmax_ColdMassRmax ; 0.; -ABRT_CoMaZmax_ColdMassZmax + ABRT_CoMaRcuI_ColdMassRcurv"  rot=" 0. ; 180. ; 0. " />
+  <posXYZ    volume="BAR_Corner"           X_Y_Z="ABRT_CoMaRmax_ColdMassRmax - ABRT_CoMaRcuI_ColdMassRcurv; 0.;  ABRT_CoMaZmax_ColdMassZmax"  rot=" 0. ;  90. ; 0. " />
+  <foreach  index="Irib"  begin="0"  loops="7" >
+    <posXYZ  volume="BAR_ColdMassRib"      X_Y_Z=" (ABRT_CoMaRmax_ColdMassRmax+ABRT_CoMaRmin_ColdMassRmin)/2.; 0. ; ABRT_Zrib[Irib] " />
+  </foreach>
+</composition>
+
+
+<!--  Description of an Atlas Barrel toroid Biellette  -->
+
+<!-- BEGIN confirmation with atltbys_0002-v0 (if no other comment) -->
+<var  name="ABRT_BielYhei_BiellYheight"  value= "1099." />  <!-- approx., explanation see twikipage -->
+<var  name="ABRT_BielYso1_BiellYsole1"   value= "  27." />  <!-- approx., explanation see twikipage -->
+<var  name="ABRT_BielXsol_BiellXsole"    value= " 130." />
+<var  name="ABRT_BielXth1_BiellXthick1"  value= "  20." />
+<var  name="ABRT_BielXth2_BiellXthick2"  value= "  30." />
+<var  name="ABRT_BielZth1_BiellZthick1"  value= " 240." />
+<var  name="ABRT_BielRHol_BiellRadHole"  value= "  62." />
+<var  name="ABRT_BielYcHo_BiellYcenHole" value= " 120." />
+<var  name="ABRT_BielElen_BiellEdgeLen"  value= " 120." />
+<var  name="ABRT_BielYki1_BiellYKink1"   value= " 484." />
+<var  name="ABRT_BielAki1_BiellAngKink1" value= "  10." />
+<var  name="ABRT_BielAppr_BiellApprox"   value= "  21." />  <!-- approx., explanation see twikipage -->
+<!-- END confirmation with atltbys_0002-v0 -->
+
+<var  name="ABRT_BielYso2_BiellYsole2"   value= " GENV_Ta15 * (ABRT_BielXsol_BiellXsole - ABRT_BielXth1_BiellXthick1)/2. + ABRT_BielYso1_BiellYsole1" />
+<var  name="ABRT_BielYXHo_BiellXYHole"   value= " ABRT_BielElen_BiellEdgeLen * ( -1 + 2.*GENV_Si45 )" />
+
+<!--  Aluminium7 to be replaced by Titanium7 !!!!  -->
+<gvxysx   name="BAR_Biellette_1"   material="Aluminium7"  dZ="ABRT_BielZth1_BiellZthick1" >
+  <gvxy_point  X_Y=" ABRT_BielYXHo_BiellXYHole     ; 0. " />
+  <gvxy_point  X_Y=" ABRT_BielElen_BiellEdgeLen    ; ABRT_BielElen_BiellEdgeLen - ABRT_BielYXHo_BiellXYHole " />
+  <gvxy_point  X_Y=" ABRT_BielElen_BiellEdgeLen    ; ABRT_BielElen_BiellEdgeLen + 49.7 " />
+  <gvxy_point  X_Y=" ABRT_BielXth2_BiellXthick2/2. ; ABRT_BielElen_BiellEdgeLen + 49.7 + (ABRT_BielZth1_BiellZthick1 - ABRT_BielXth2_BiellXthick2)/(2. * tan(40.0*GENV_PiS180)) " />
+  <gvxy_point  X_Y=" ABRT_BielXth2_BiellXthick2/2. ; ABRT_BielYhei_BiellYheight - ABRT_BielYki1_BiellYKink1 + ABRT_BielAppr_BiellApprox - (ABRT_BielXth2_BiellXthick2 - ABRT_BielXth1_BiellXthick1)/tan(ABRT_BielAki1_BiellAngKink1*GENV_PiS180) " />
+  <gvxy_point  X_Y=" ABRT_BielXth1_BiellXthick1/2. ; ABRT_BielYhei_BiellYheight - ABRT_BielYki1_BiellYKink1 + ABRT_BielAppr_BiellApprox" />
+  <gvxy_point  X_Y=" ABRT_BielXth1_BiellXthick1/2. ; ABRT_BielYhei_BiellYheight - ABRT_BielYso2_BiellYsole2 " />
+  <gvxy_point  X_Y=" ABRT_BielXsol_BiellXsole/2.   ; ABRT_BielYhei_BiellYheight - ABRT_BielYso1_BiellYsole1 " />
+  <gvxy_point  X_Y=" ABRT_BielXsol_BiellXsole/2.   ; ABRT_BielYhei_BiellYheight " />
+</gvxysx>
+<tubs     name="BAR_Biellette_2"  material="Aluminium7"  Rio_Z="0.; ABRT_BielRHol_BiellRadHole; 300."  nbPhi="16" />
+<gvxy   name="BAR_Biellette_3"  material="Aluminium7"  dZ="500." >
+  <gvxy_point  X_Y="  70.            ;  -GENV_Eps " />
+  <gvxy_point  X_Y="  70.            ;       246. " />
+  <gvxy_point  X_Y=" ABRT_BielZth1_BiellZthick1/2. + GENV_Eps ;       358. " />
+  <gvxy_point  X_Y=" ABRT_BielZth1_BiellZthick1/2. + GENV_Eps ;  -GENV_Eps " />
+</gvxy>
+<subtraction  name="BAR_Biellette"  >
+   <posXYZ  volume="BAR_Biellette_1"  />
+   <posXYZ  volume="BAR_Biellette_2"  X_Y_Z=" 0. ; ABRT_BielYcHo_BiellYcenHole ; 0. "  />
+   <posXYZ  volume="BAR_Biellette_3"  rot=" 0. ;  90. ; 0. "  />
+   <posXYZ  volume="BAR_Biellette_3"  rot=" 0. ; -90. ; 0. "  />
+</subtraction>
+
+
+<!-- BEGIN confirmation with atltbcc_0006-v0 (if no other comment) -->
+<var  name="ABRT_BielAtL1_BiellAttLeng1"  value= " 575. " />
+<var  name="ABRT_BielAtL2_BiellAttLeng2"  value= " 280. " />
+<var  name="ABRT_BielAtTh_BiellAttThick"  value= " 288. " />
+<var  name="ABRT_BielAtHe_BiellAttHeight" value= " 147.5" />
+<!-- END confirmation with atltbcc_0006-v0 -->
+
+<trd    name="BAR_BiellAttFull"    material="Aluminium8"  Xmp_Ymp_Z=" ABRT_BielAtL1_BiellAttLeng1 ; ABRT_BielAtL2_BiellAttLeng2 ; ABRT_BielAtTh_BiellAttThick ; ABRT_BielAtTh_BiellAttThick ; ABRT_BielAtHe_BiellAttHeight " />
+<gvxysx name="BAR_BiellAttHol"  material="Aluminium8"  dZ="2.*ABRT_BielAtTh_BiellAttThick" >
+  <gvxy_point  X_Y=" ABRT_BielXsol_BiellXsole*0.6       ;       -GENV_Eps       " />
+  <gvxy_point  X_Y=" ABRT_BielXsol_BiellXsole*0.6      ; ABRT_BielYso1_BiellYsole1        " />
+  <gvxy_point  X_Y=" ABRT_BielXth1_BiellXthick1*0.7    ; ABRT_BielYso2_BiellYsole2+GENV_Eps    " />
+  <gvxy_point  X_Y=" ABRT_BielXth1_BiellXthick1*0.7    ; ABRT_BielAtHe_BiellAttHeight+GENV_Eps " />
+</gvxysx>
+<subtraction  name="BAR_BiellAtt" >
+  <posXYZ  volume="BAR_BiellAttFull"  X_Y_Z=" ABRT_BielAtHe_BiellAttHeight/2. ; 0. ; 0. "  rot=" 0. ; 90. ; 0. " />
+  <posXYZ  volume="BAR_BiellAttHol"   rot=" 90. ; 90. ; 0. " />
+</subtraction>
+
+<composition  name="BAR_ColdMass_Sector" >
+  <posXYZ  volume="BAR_ColdMassCoil" X_Y_Z=" 0. ; 0. ; 0. "  rot="   0. ; 0. ;   0. " />
+  <foreach  index="Ivouss"  begin="0"  loops="8" >
+    <posXYZ  volume="BAR_Biellette"    X_Y_Z=" ABRT_CoMaRmin_ColdMassRmin+ABRT_CoMaRThi_ColdMassRThick+ABRT_BielYhei_BiellYheight+GENV_Eps ; 0. ; ABRT_Zvouss[Ivouss] "  rot=" 0. ; 90. ;  90. " />
+    <posXYZ  volume="BAR_BiellAtt"     X_Y_Z=" ABRT_CoMaRmin_ColdMassRmin+ABRT_CoMaRThi_ColdMassRThick+GENV_Eps ; 0. ; ABRT_Zvouss[Ivouss] " />
+  </foreach>
+</composition>
+
+
+
+
+<!--  Description of the Atlas Barrel toroid Cryostat  -->
+
+<!-- basic CryoTube volumes, uncut -->
+<tubs name="BAR_CryoTubAlongZBase" material="Iron1" Rio_Z="ABRT_CryoRadi_Radius - ABRT_CryoRadT_RadThick; ABRT_CryoRadi_Radius; 2.*ABRT_CryoZmax - 2.*ABRT_CryoRadi_Radius - ABRT_CryoRcur*sqrt(2.) + 2.*GENV_Ta225*ABRT_CryoRadi_Radius"   nbPhi="25" />
+<tubs name="BAR_CryoTubAlongRBase" material="Iron1" Rio_Z="ABRT_CryoRadi_Radius - ABRT_CryoRadT_RadThick; ABRT_CryoRadi_Radius; ABRT_CryoRmax - ABRT_CryoRmin - 2.*ABRT_CryoRadi_Radius - ABRT_CryoRcur*sqrt(2.) + 2.*GENV_Ta225*ABRT_CryoRadi_Radius"   nbPhi="32" />
+<tubs name="BAR_CryoTubCornerBase" material="Iron1" Rio_Z="ABRT_CryoRadi_Radius - ABRT_CryoRadT_RadThick; ABRT_CryoRadi_Radius; ABRT_CryoRcur + 2.*GENV_Ta225*ABRT_CryoRadi_Radius"   nbPhi="32" />
+
+<!-- basic CryoRib volumes, uncut -->
+<box  name="BAR_CryoRibOut"  material="Iron1"  X_Y_Z=" ABRT_CryoRmax - ABRT_CryoRmin - 2.* ABRT_CryoRadi_Radius               ; ABRT_CryRibYw_CryoRibYwid                               ; ABRT_CryRibZl_CryoRibZlen                     " />
+<box  name="BAR_CryoRibIn"   material="Iron6"  X_Y_Z=" ABRT_CryoRmax - ABRT_CryoRmin - 2.* ABRT_CryoRadi_Radius + 2.*GENV_Eps ; ABRT_CryRibYw_CryoRibYwid-2.*ABRT_CryRibTh_CryoRibThick ; ABRT_CryRibZl_CryoRibZlen-2.*ABRT_CryRibTh_CryoRibThick " />
+
+<!-- basic CryoAtt volumes, uncut -->
+<pcon  name="BAR_CryoAttOut"  material="Iron1"  nbPhi="20" >
+  <polyplane  Rio_Z="0. ; ABRT_CryAttD0_CryoAttDiam0/2. ; 0. " />
+  <polyplane  Rio_Z="0. ; ABRT_CryAttD0_CryoAttDiam0/2. ; ABRT_CryAttXh_CryoAttXhigh - ABRT_CryAttXs_CryoAttXsec - ABRT_CryAttSe_CryoAttSlimend" />
+  <polyplane  Rio_Z="0. ; ABRT_CryAttD1_CryoAttDiam1/2.+ABRT_CryAttTh_CryoAttThick ; ABRT_CryAttXh_CryoAttXhigh - ABRT_CryAttSe_CryoAttSlimend" />
+  <polyplane  Rio_Z="0. ; ABRT_CryAttD1_CryoAttDiam1/2.+ABRT_CryAttTh_CryoAttThick ; ABRT_CryAttXh_CryoAttXhigh " />
+</pcon>
+<pcon  name="BAR_CryoAttIn"   material="Iron6"  nbPhi="20" >
+  <polyplane  Rio_Z="0. ; ABRT_CryAttD0_CryoAttDiam0/2.-ABRT_CryAttTh_CryoAttThick   ;  -GENV_Eps " />
+  <polyplane  Rio_Z="0. ; ABRT_CryAttD0_CryoAttDiam0/2.-ABRT_CryAttTh_CryoAttThick   ;  ABRT_CryAttXh_CryoAttXhigh - ABRT_CryAttXs_CryoAttXsec - ABRT_CryAttSe_CryoAttSlimend - ABRT_CryAttTh_CryoAttThick*tan(ABRT_CryAttAl_CryoAttAlfa*GENV_PiS180/2.) " />
+  <polyplane  Rio_Z="0. ; ABRT_CryAttD1_CryoAttDiam1/2.   ;  ABRT_CryAttXh_CryoAttXhigh - ABRT_CryAttSe_CryoAttSlimend-ABRT_CryAttTh_CryoAttThick*tan(ABRT_CryAttAl_CryoAttAlfa*GENV_PiS180/2.) " />
+  <polyplane  Rio_Z="0. ; ABRT_CryAttD1_CryoAttDiam1/2.   ;  ABRT_CryAttXh_CryoAttXhigh + GENV_Eps " />
+</pcon>
+
+<!-- CryoTube cut volumes -->
+<box  name="BAR_CryoTubCutBox" material="Iron1" X_Y_Z="2.*ABRT_CryoRadi_Radius/GENV_Co225; 2.*ABRT_CryoRadi_Radius/GENV_Co225; 2.*ABRT_CryoRadi_Radius/GENV_Co225 " />
+<tubs name="BAR_CryoTubCut"    material="Iron1" Rio_Z=" 0. ; ABRT_CryoRadi_Radius+10.*GENV_Eps ; 2.*ABRT_CryRngRa_CryoRingRadius+2.*ABRT_CryRibZl_CryoRibZlen+ABRT_StrWZlen_StrutWingZlen "  nbPhi="32" />
+
+<!-- Begin of CryoRibWing -->
+<gvxysx  name="BAR_CryoRibWingA"  material="Iron4"  dZ=" ABRT_CryRibZl_CryoRibZlen+2.*ABRT_CryRiWTh_CryoRibWingThick+2.*GENV_Eps" >
+  <gvxy_point  X_Y=" ABRT_CryRiWYp_CryoRibWingYp/2. ; ABRT_CryRiWXp_CryoRibWingXp " />
+  <gvxy_point  X_Y=" ABRT_CryRiWYn_CryoRibWingYn/2. ; ABRT_CryRiWXn_CryoRibWingXn " />
+  <gvxy_point  X_Y=" ABRT_CryRiWYn_CryoRibWingYn/2. ; -ABRT_CryoRadi_Radius+ABRT_CryRiWXc_CryoRibWingXncut " />
+</gvxysx>
+<box     name="BAR_CryoRibWingB"  material="Iron1"  X_Y_Z=" 4.*ABRT_CryoRadi_Radius ; 4.*ABRT_CryoRadi_Radius ; ABRT_CryRibZl_CryoRibZlen+2.*GENV_Eps " />
+<subtraction  name="BAR_CryoRibWing" >
+  <posXYZ  volume="BAR_CryoRibWingA" />
+  <posXYZ  volume="BAR_CryoRibWingB" />
+  <posXYZ  volume="BAR_CryoTubCut"  X_Y_Z=" 0. ; -ABRT_CryoRadi_Radius - 5.*GENV_Eps ; 0. " />
+</subtraction>
+<!-- End of CryoRibWing -->
+
+<!-- Begin of CryoAttWing -->
+<gvxysx  name="BAR_CryoAttWingA"  material="Iron4"  dZ=" ABRT_CryAtWZe_CryoAttWingZesp+2.*ABRT_CryAtWTh_CryoAttWingThick" >
+  <gvxy_point X_Y=" ABRT_CryAtWiY_CryoAttWingY-ABRT_CryAtWBo_CryoAttWingBoss ; ABRT_CryAtWXp_CryoAttWingXp " />
+  <gvxy_point X_Y=" ABRT_CryAtWiY_CryoAttWingY ; ABRT_CryAtWXp_CryoAttWingXp-ABRT_CryAtWBo_CryoAttWingBoss " />
+  <gvxy_point X_Y=" ABRT_CryAtWiY_CryoAttWingY ; ABRT_CryAtWXn_CryoAttWingXn " />
+  <gvxy_point X_Y=" ABRT_CryAtWiY_CryoAttWingY-(2*ABRT_CryoRadi_Radius+ABRT_CryAtWXn_CryoAttWingXn)*GENV_Ta225 ;-2.*ABRT_CryoRadi_Radius " />
+</gvxysx>
+<box     name="BAR_CryoAttWingB"  material="Iron1"  X_Y_Z=" 4.*ABRT_CryoRadi_Radius      ; 6.*ABRT_CryoRadi_Radius     ;    ABRT_CryAtWZe_CryoAttWingZesp " />
+<tubs    name="BAR_CryoAttWingC"  material="Iron4"  Rio_Z=" ABRT_CryAtWRa_CryoAttWingRad     ; 2.*ABRT_CryAtWRa_CryoAttWingRad ; 2.*ABRT_CryAtWZe_CryoAttWingZesp "  profile=" 202.5 ; 135. "  nbPhi="16" />
+<box     name="BAR_CryoAttWingD"  material="Iron1"  X_Y_Z=" 2.*ABRT_CryAtWYc_CryoAttWingYcut ; 2.*ABRT_CryoRadi_Radius     ; 3.*ABRT_CryAtWZe_CryoAttWingZesp " />
+<subtraction  name="BAR_CryoAttWing" >
+  <posXYZ volume="BAR_CryoAttWingA" />
+  <posXYZ volume="BAR_CryoAttWingB" />
+  <posXYZ volume="BAR_CryoAttWingC" />
+  <posXYZ volume="BAR_CryoTubCut"   />
+  <posXYZ volume="BAR_CryoAttWingD"  X_Y_Z=" 0. ; -ABRT_CryoRadi_Radius ; 0. " />
+</subtraction>
+<!-- End of CryoAttWing -->
+<!-- laurent -->
+<!-- Begin of CryoTube volumes including cuts -->
+<subtraction  name="BAR_CryoTubAlongZ_Down" >
+  <posXYZ  volume="BAR_CryoTubAlongZBase"  X_Y_Z=" ABRT_CryoRmin + ABRT_CryoRadi_Radius ;                                   0. ;                                        0. "/>
+  <posXYZ  volume="BAR_CryoTubCutBox"      X_Y_Z=" ABRT_CryoRmin + ABRT_CryoRadi_Radius + ABRT_CryoRadi_Radius*GENV_Ta225 ; 0. ;    ABRT_CryoZmax - ABRT_CryoRcur/sqrt(2.) - GENV_Eps " rot=" 0. ;  22.5 ; 0. "/>
+  <posXYZ  volume="BAR_CryoTubCutBox"      X_Y_Z=" ABRT_CryoRmin + ABRT_CryoRadi_Radius + ABRT_CryoRadi_Radius*GENV_Ta225 ; 0. ;  -(ABRT_CryoZmax - ABRT_CryoRcur/sqrt(2.) - GENV_Eps)" rot=" 0. ; -22.5 ; 0. "/>
+  <foreach  index="Irib"  begin="0"  loops="7" >
+    <posXYZ  volume="BAR_CryoRibIn" X_Y_Z=" (ABRT_CryoRmax+ABRT_CryoRmin)/2. ; 0. ; ABRT_Zrib[Irib] " />
+  </foreach>
+  <foreach  index="Ivouss"  begin="0"  loops="8" >
+    <posXYZ  volume="BAR_CryoAttIn" X_Y_Z=" ABRT_CryAttRx_CryoAttRmax ; 0. ; ABRT_Zvouss[Ivouss] "  rot=" 0. ; 90. ; 0. " />
+  </foreach>
+</subtraction>
+
+<subtraction  name="BAR_CryoTubAlongZ_Up" >
+  <posXYZ  volume="BAR_CryoTubAlongZBase"  X_Y_Z=" ABRT_CryoRmax - ABRT_CryoRadi_Radius; 0. ; 0. "/>
+  <posXYZ  volume="BAR_CryoTubCutBox"      X_Y_Z=" ABRT_CryoRmax - ABRT_CryoRadi_Radius - ABRT_CryoRadi_Radius*GENV_Ta225 ; 0. ;    ABRT_CryoZmax - ABRT_CryoRcur/sqrt(2.) - GENV_Eps " rot=" 0. ; -22.5 ; 0. "/>
+  <posXYZ  volume="BAR_CryoTubCutBox"      X_Y_Z=" ABRT_CryoRmax - ABRT_CryoRadi_Radius - ABRT_CryoRadi_Radius*GENV_Ta225 ; 0. ;  -(ABRT_CryoZmax - ABRT_CryoRcur/sqrt(2.) - GENV_Eps)" rot=" 0. ;  22.5 ; 0. "/>
+  <foreach  index="Irib"  begin="0"  loops="7" >
+    <posXYZ  volume="BAR_CryoRibIn" X_Y_Z=" (ABRT_CryoRmax+ABRT_CryoRmin)/2. ; 0. ; ABRT_Zrib[Irib] " />
+  </foreach>
+</subtraction>
+
+<subtraction  name="BAR_CryoTubAlongR_Plus" >
+  <posXYZ  volume="BAR_CryoTubAlongRBase"   X_Y_Z=" (ABRT_CryoRmin + ABRT_CryoRmax)/2.; 0. ; ABRT_CryoZmax - ABRT_CryoRadi_Radius" rot=" 0. ; 90. ; 0. "/>
+  <posXYZ  volume="BAR_CryoTubCutBox"       X_Y_Z=" ABRT_CryoRmin + ABRT_CryoRcur/sqrt(2.) + GENV_Eps; 0. ; ABRT_CryoZmax - ABRT_CryoRadi_Radius - ABRT_CryoRadi_Radius*GENV_Ta225 " rot=" 0. ; -22.5 ; 0. "/>
+  <posXYZ  volume="BAR_CryoTubCutBox"       X_Y_Z=" ABRT_CryoRmax - ABRT_CryoRcur/sqrt(2.) - GENV_Eps; 0. ; ABRT_CryoZmax - ABRT_CryoRadi_Radius - ABRT_CryoRadi_Radius*GENV_Ta225 " rot=" 0. ;  22.5 ; 0. "/>
+</subtraction>
+
+<subtraction  name="BAR_CryoTubCorner" >
+  <posXYZ  volume="BAR_CryoTubCornerBase"  X_Y_Z=" (ABRT_CryoRcur + 2.*GENV_Ta225*ABRT_CryoRadi_Radius)/(2.*sqrt(2.)) + ABRT_CryoRadi_Radius/sqrt(2.) + ABRT_CryoRmin; 0. ; (ABRT_CryoRcur + 2.*GENV_Ta225*ABRT_CryoRadi_Radius)/(2.*sqrt(2.)) - ABRT_CryoRadi_Radius/sqrt(2.) + ABRT_CryoZmax - ABRT_CryoRadi_Radius - ABRT_CryoRcur/sqrt(2.) + GENV_Ta225*ABRT_CryoRadi_Radius" rot=" 0. ; 45. ; 0. "/>
+  <posXYZ  volume="BAR_CryoTubCutBox"      X_Y_Z=" ABRT_CryoRmin + ABRT_CryoRadi_Radius - GENV_Ta225*ABRT_CryoRadi_Radius; 0. ; ABRT_CryoZmax - ABRT_CryoRcur/sqrt(2.) - 2.*ABRT_CryoRadi_Radius" rot=" 0. ; 22.5 ; 0. "/>
+  <posXYZ  volume="BAR_CryoTubCutBox"      X_Y_Z=" ABRT_CryoRmin + 2.*ABRT_CryoRadi_Radius + ABRT_CryoRcur/sqrt(2.) ; 0. ; ABRT_CryoZmax - ABRT_CryoRadi_Radius + ABRT_CryoRadi_Radius*GENV_Ta225" rot=" 0. ; -22.5 ; 0. "/>
+</subtraction>
+<!-- End of CryoTube with cuts -->
+
+<!-- Begin of barrel toroid thermal shielding between CryoTub and Coldmass -->
+<var  name="BAR_ThermShield_OuterAngle"     value="    35.  " />
+<var  name="BAR_ThermShield_InnerAngle"     value="    30.  " />
+
+<var  name="BAR_ThermShield_Thickness"      value="     5.  " />
+<var  name="BAR_ThermShield_YHight"         value="   656.  " />
+<var  name="BAR_ThermShield_OuterXLenght"   value="   152.  " />
+<var  name="BAR_ThermShield_InnerXLenght"   value="   121.  " />
+<var  name="BAR_ThermShield_TopXLenght"     value="   657.  " />
+<var  name="BAR_ThermShield_XOverlap"       value="    35.  " />
+
+<!-- <var  name="BAR_ThermShield_TotalZLength"   value=" 25105.  " /> replaced by Zmax of coldmass to be consistent, arbitrary value added to resolve overlap, difference after adding arbitrary value of 80 is 67.4 mm -->
+<var  name="BAR_ThermShield_TotalZLength"   value=" 2.*ABRT_CoMaZmax_ColdMassZmax + 80. " />
+<!-- <var  name="BAR_ThermShield_TotalXLength"   value="  5135.  " /> replaced by radius diff of coldmass to be consistent, difference 61.8 mm, adding arbitrary value to resolve overlap, afterwards only 11.8mm diff -->
+<var  name="BAR_ThermShield_RadiusMin"      value="ABRT_CoMaRmin_ColdMassRmin - 25. " />
+<var  name="BAR_ThermShield_RadiusMax"      value="ABRT_CoMaRmax_ColdMassRmax + 25. " />
+<var  name="BAR_ThermShield_TotalXLength"   value="BAR_ThermShield_RadiusMax - BAR_ThermShield_RadiusMin" />
+<var  name="BAR_ThermShield_OuterEdgeLen"   value="  1217.4 " />
+
+<var  name="BAR_ThermShield_XLenght"        value="BAR_ThermShield_TopXLenght+BAR_ThermShield_InnerXLenght+BAR_ThermShield_OuterXLenght-2.*BAR_ThermShield_XOverlap" />
+
+<gvxysx name="BAR_ThermShield_AlongZOuter"  material="Aluminium1"  dZ="(BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5.-GENV_Eps">
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - (BAR_ThermShield_InnerXLenght - BAR_ThermShield_XOverlap)/tan( BAR_ThermShield_InnerAngle*GENV_PiS180) ; BAR_ThermShield_XLenght/2." />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. ; BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght + BAR_ThermShield_XOverlap" />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. + BAR_ThermShield_Thickness ;  BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght + BAR_ThermShield_XOverlap " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. + BAR_ThermShield_Thickness ; -BAR_ThermShield_XLenght/2. + BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. ; -BAR_ThermShield_XLenght/2.+ BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap" />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - (BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap)/tan( BAR_ThermShield_OuterAngle*GENV_PiS180) ; -BAR_ThermShield_XLenght/2." />
+</gvxysx>
+
+<gvxysx name="BAR_ThermShield_AlongZInner"  material="Aluminium1"  dZ="(BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5.-GENV_Eps">
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - (BAR_ThermShield_InnerXLenght - BAR_ThermShield_XOverlap)/tan( BAR_ThermShield_InnerAngle*GENV_PiS180) - BAR_ThermShield_Thickness*tan( BAR_ThermShield_InnerAngle/2.*GENV_PiS180); BAR_ThermShield_XLenght/2. - BAR_ThermShield_Thickness" /> 
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - BAR_ThermShield_Thickness ; BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght + BAR_ThermShield_XOverlap - BAR_ThermShield_Thickness * tan( (90.-BAR_ThermShield_InnerAngle)/2.*GENV_PiS180) " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - BAR_ThermShield_Thickness ; BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. ; BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. ; -BAR_ThermShield_XLenght/2. + BAR_ThermShield_OuterXLenght " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - BAR_ThermShield_Thickness ; -BAR_ThermShield_XLenght/2. + BAR_ThermShield_OuterXLenght " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - BAR_ThermShield_Thickness ; -BAR_ThermShield_XLenght/2. + BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap + BAR_ThermShield_Thickness * tan( (90.-BAR_ThermShield_OuterAngle)/2.*GENV_PiS180) " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - (BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap)/tan( BAR_ThermShield_OuterAngle*GENV_PiS180) - BAR_ThermShield_Thickness*tan( BAR_ThermShield_OuterAngle/2.*GENV_PiS180); -BAR_ThermShield_XLenght/2. + BAR_ThermShield_Thickness" /> 
+</gvxysx>
+
+<gvxysx name="BAR_ThermShield_AlongROuter"  material="Aluminium1"  dZ="BAR_ThermShield_TotalXLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45 - GENV_Eps">
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - (BAR_ThermShield_InnerXLenght - BAR_ThermShield_XOverlap)/tan( BAR_ThermShield_InnerAngle*GENV_PiS180) ; BAR_ThermShield_XLenght/2." />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. ; BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght + BAR_ThermShield_XOverlap" />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. + BAR_ThermShield_Thickness ;  BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght + BAR_ThermShield_XOverlap " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. + BAR_ThermShield_Thickness ; -BAR_ThermShield_XLenght/2. + BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. ; -BAR_ThermShield_XLenght/2.+ BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap" />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - (BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap)/tan( BAR_ThermShield_OuterAngle*GENV_PiS180) ; -BAR_ThermShield_XLenght/2." />
+</gvxysx>
+
+<gvxysx name="BAR_ThermShield_AlongRInner"  material="Aluminium1"  dZ="BAR_ThermShield_TotalXLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45 - GENV_Eps">
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - (BAR_ThermShield_InnerXLenght - BAR_ThermShield_XOverlap)/tan( BAR_ThermShield_InnerAngle*GENV_PiS180) - BAR_ThermShield_Thickness*tan( BAR_ThermShield_InnerAngle/2.*GENV_PiS180); BAR_ThermShield_XLenght/2. - BAR_ThermShield_Thickness" /> 
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - BAR_ThermShield_Thickness ; BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght + BAR_ThermShield_XOverlap - BAR_ThermShield_Thickness * tan( (90.-BAR_ThermShield_InnerAngle)/2.*GENV_PiS180) " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - BAR_ThermShield_Thickness ; BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. ; BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. ; -BAR_ThermShield_XLenght/2. + BAR_ThermShield_OuterXLenght " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - BAR_ThermShield_Thickness ; -BAR_ThermShield_XLenght/2. + BAR_ThermShield_OuterXLenght " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - BAR_ThermShield_Thickness ; -BAR_ThermShield_XLenght/2. + BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap + BAR_ThermShield_Thickness * tan( (90.-BAR_ThermShield_OuterAngle)/2.*GENV_PiS180) " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - (BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap)/tan( BAR_ThermShield_OuterAngle*GENV_PiS180) - BAR_ThermShield_Thickness*tan( BAR_ThermShield_OuterAngle/2.*GENV_PiS180); -BAR_ThermShield_XLenght/2. + BAR_ThermShield_Thickness" /> 
+</gvxysx>
+
+<gvxysx name="BAR_ThermShield_CornerOuter"  material="Aluminium1"  dZ="BAR_ThermShield_OuterEdgeLen">
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - (BAR_ThermShield_InnerXLenght - BAR_ThermShield_XOverlap)/tan( BAR_ThermShield_InnerAngle*GENV_PiS180) ; BAR_ThermShield_XLenght/2." />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. ; BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght + BAR_ThermShield_XOverlap" />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. + BAR_ThermShield_Thickness ;  BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght + BAR_ThermShield_XOverlap " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. + BAR_ThermShield_Thickness ; -BAR_ThermShield_XLenght/2. + BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. ; -BAR_ThermShield_XLenght/2.+ BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap" />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - (BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap)/tan( BAR_ThermShield_OuterAngle*GENV_PiS180) ; -BAR_ThermShield_XLenght/2." />
+</gvxysx>
+
+<gvxysx name="BAR_ThermShield_CornerInner"  material="Aluminium1"  dZ="BAR_ThermShield_OuterEdgeLen">
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - (BAR_ThermShield_InnerXLenght - BAR_ThermShield_XOverlap)/tan( BAR_ThermShield_InnerAngle*GENV_PiS180) - BAR_ThermShield_Thickness*tan( BAR_ThermShield_InnerAngle/2.*GENV_PiS180); BAR_ThermShield_XLenght/2. - BAR_ThermShield_Thickness" /> 
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - BAR_ThermShield_Thickness ; BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght + BAR_ThermShield_XOverlap - BAR_ThermShield_Thickness * tan( (90.-BAR_ThermShield_InnerAngle)/2.*GENV_PiS180) " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - BAR_ThermShield_Thickness ; BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. ; BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. ; -BAR_ThermShield_XLenght/2. + BAR_ThermShield_OuterXLenght " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - BAR_ThermShield_Thickness ; -BAR_ThermShield_XLenght/2. + BAR_ThermShield_OuterXLenght " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - BAR_ThermShield_Thickness ; -BAR_ThermShield_XLenght/2. + BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap + BAR_ThermShield_Thickness * tan( (90.-BAR_ThermShield_OuterAngle)/2.*GENV_PiS180) " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - (BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap)/tan( BAR_ThermShield_OuterAngle*GENV_PiS180) - BAR_ThermShield_Thickness*tan( BAR_ThermShield_OuterAngle/2.*GENV_PiS180); -BAR_ThermShield_XLenght/2. + BAR_ThermShield_Thickness" /> 
+</gvxysx>
+
+<box name="BAR_ThermShield_CutBox" material="Aluminium1"  X_Y_Z="BAR_ThermShield_XLenght/GENV_Co225; BAR_ThermShield_XLenght/GENV_Co225; BAR_ThermShield_XLenght/GENV_Co225" />
+
+<pcon  name="BAR_ThermShield_AttIn"   material="Aluminium1"  nbPhi="20" >
+  <polyplane  Rio_Z="0. ; ABRT_CryAttD0_CryoAttDiam0/2. + 20.  ;  -GENV_Eps " />
+  <polyplane  Rio_Z="0. ; ABRT_CryAttD0_CryoAttDiam0/2. + 20.  ;  ABRT_CryAttXh_CryoAttXhigh + GENV_Eps " />
+</pcon>
+
+<subtraction  name="BAR_ThermShield_AlongZ_Down_Part1" >
+  <posXYZ  volume="BAR_ThermShield_AlongZOuter"  X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_XLenght/2. ; 0. ; 2.*(BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  -90. "/>
+  <posXYZ  volume="BAR_ThermShield_AlongZInner"  X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_XLenght/2. ; 0. ; 2.*(BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  -90. "/>
+  <posXYZ  volume="BAR_ThermShield_CutBox"  X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_XLenght/2. + BAR_ThermShield_XLenght/2.*GENV_Ta225 ; 0. ;    BAR_ThermShield_TotalZLength/2. - (BAR_ThermShield_OuterEdgeLen-BAR_ThermShield_XLenght*GENV_Ta225)/sqrt(2.) - GENV_Eps " rot=" 0. ;  22.5 ; 0. "/>
+  <foreach  index="Irib"  begin="6"  loops="1" >
+    <posXYZ  volume="BAR_CryoRibIn" X_Y_Z=" (ABRT_CryoRmax+ABRT_CryoRmin)/2. ; 0. ; ABRT_Zrib[Irib] " />
+  </foreach>
+  <foreach  index="Ivouss"  begin="6"  loops="2" >
+    <posXYZ  volume="BAR_ThermShield_AttIn" X_Y_Z=" ABRT_CryAttRx_CryoAttRmax ; 0. ; ABRT_Zvouss[Ivouss] "  rot=" 0. ; 90. ; 0. " />
+  </foreach>
+</subtraction>
+
+<subtraction  name="BAR_ThermShield_AlongZ_Down_Part2" >
+  <posXYZ  volume="BAR_ThermShield_AlongZOuter"  X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_XLenght/2. ; 0. ; (BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  -90. "/>
+  <posXYZ  volume="BAR_ThermShield_AlongZInner"  X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_XLenght/2. ; 0. ; (BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  -90. "/>
+  <foreach  index="Irib"  begin="4"  loops="2" >
+    <posXYZ  volume="BAR_CryoRibIn" X_Y_Z=" (ABRT_CryoRmax+ABRT_CryoRmin)/2. ; 0. ; ABRT_Zrib[Irib] " />
+  </foreach>
+  <foreach  index="Ivouss"  begin="5"  loops="1" >
+    <posXYZ  volume="BAR_ThermShield_AttIn" X_Y_Z=" ABRT_CryAttRx_CryoAttRmax ; 0. ; ABRT_Zvouss[Ivouss] "  rot=" 0. ; 90. ; 0. " />
+  </foreach>
+</subtraction>
+
+<subtraction  name="BAR_ThermShield_AlongZ_Down_Part3" >
+  <posXYZ  volume="BAR_ThermShield_AlongZOuter"  X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_XLenght/2. ; 0. ; 0. " rot=" 0. ; 0. ;  -90. "/>
+  <posXYZ  volume="BAR_ThermShield_AlongZInner"  X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_XLenght/2. ; 0. ; 0. " rot=" 0. ; 0. ;  -90. "/>
+  <foreach  index="Irib"  begin="3"  loops="1" >
+    <posXYZ  volume="BAR_CryoRibIn" X_Y_Z=" (ABRT_CryoRmax+ABRT_CryoRmin)/2. ; 0. ; ABRT_Zrib[Irib] " />
+  </foreach>
+  <foreach  index="Ivouss"  begin="3"  loops="2" >
+    <posXYZ  volume="BAR_ThermShield_AttIn" X_Y_Z=" ABRT_CryAttRx_CryoAttRmax ; 0. ; ABRT_Zvouss[Ivouss] "  rot=" 0. ; 90. ; 0. " />
+  </foreach>
+</subtraction>
+
+<subtraction  name="BAR_ThermShield_AlongZ_Down_Part4" >
+  <posXYZ  volume="BAR_ThermShield_AlongZOuter"  X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_XLenght/2. ; 0. ; -(BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  -90. "/>
+  <posXYZ  volume="BAR_ThermShield_AlongZInner"  X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_XLenght/2. ; 0. ; -(BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  -90. "/>
+  <foreach  index="Irib"  begin="1"  loops="2" >
+    <posXYZ  volume="BAR_CryoRibIn" X_Y_Z=" (ABRT_CryoRmax+ABRT_CryoRmin)/2. ; 0. ; ABRT_Zrib[Irib] " />
+  </foreach>
+  <foreach  index="Ivouss"  begin="2"  loops="1" >
+    <posXYZ  volume="BAR_ThermShield_AttIn" X_Y_Z=" ABRT_CryAttRx_CryoAttRmax ; 0. ; ABRT_Zvouss[Ivouss] "  rot=" 0. ; 90. ; 0. " />
+  </foreach>
+</subtraction>
+
+<subtraction  name="BAR_ThermShield_AlongZ_Down_Part5" >
+  <posXYZ  volume="BAR_ThermShield_AlongZOuter"  X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_XLenght/2. ; 0. ; -2.*(BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  -90. "/>
+  <posXYZ  volume="BAR_ThermShield_AlongZInner"  X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_XLenght/2. ; 0. ; -2.*(BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  -90. "/>
+  <posXYZ  volume="BAR_ThermShield_CutBox"  X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_XLenght/2. + BAR_ThermShield_XLenght/2.*GENV_Ta225 ; 0. ;  -(BAR_ThermShield_TotalZLength/2. - (BAR_ThermShield_OuterEdgeLen-BAR_ThermShield_XLenght*GENV_Ta225)/sqrt(2.) - GENV_Eps)" rot=" 0. ; -22.5 ; 0. "/>
+  <foreach  index="Irib"  begin="0"  loops="1" >
+    <posXYZ  volume="BAR_CryoRibIn" X_Y_Z=" (ABRT_CryoRmax+ABRT_CryoRmin)/2. ; 0. ; ABRT_Zrib[Irib] " />
+  </foreach>
+  <foreach  index="Ivouss"  begin="0"  loops="2" >
+    <posXYZ  volume="BAR_ThermShield_AttIn" X_Y_Z=" ABRT_CryAttRx_CryoAttRmax ; 0. ; ABRT_Zvouss[Ivouss] "  rot=" 0. ; 90. ; 0. " />
+  </foreach>
+</subtraction>
+
+<subtraction  name="BAR_ThermShield_AlongZ_Up_Part1" >
+  <posXYZ  volume="BAR_ThermShield_AlongZOuter"  X_Y_Z=" BAR_ThermShield_RadiusMax - BAR_ThermShield_XLenght/2. ; 0. ; 2.*(BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  90. "/>
+  <posXYZ  volume="BAR_ThermShield_AlongZInner"  X_Y_Z=" BAR_ThermShield_RadiusMax - BAR_ThermShield_XLenght/2. ; 0. ; 2.*(BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  90. "/>
+  <posXYZ  volume="BAR_ThermShield_CutBox"  X_Y_Z=" BAR_ThermShield_RadiusMax - BAR_ThermShield_XLenght/2. - BAR_ThermShield_XLenght/2.*GENV_Ta225 ; 0. ;    BAR_ThermShield_TotalZLength/2. - (BAR_ThermShield_OuterEdgeLen-BAR_ThermShield_XLenght*GENV_Ta225)/sqrt(2.) - GENV_Eps " rot=" 0. ; -22.5 ; 0. "/>
+  <foreach  index="Irib"  begin="6"  loops="1" >
+    <posXYZ  volume="BAR_CryoRibIn" X_Y_Z=" (ABRT_CryoRmax+ABRT_CryoRmin)/2. ; 0. ; ABRT_Zrib[Irib] " />
+  </foreach>
+</subtraction>
+
+<subtraction  name="BAR_ThermShield_AlongZ_Up_Part2" >
+  <posXYZ  volume="BAR_ThermShield_AlongZOuter"  X_Y_Z=" BAR_ThermShield_RadiusMax - BAR_ThermShield_XLenght/2. ; 0. ; (BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  90. "/>
+  <posXYZ  volume="BAR_ThermShield_AlongZInner"  X_Y_Z=" BAR_ThermShield_RadiusMax - BAR_ThermShield_XLenght/2. ; 0. ; (BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  90. "/>
+  <foreach  index="Irib"  begin="4"  loops="2" >
+    <posXYZ  volume="BAR_CryoRibIn" X_Y_Z=" (ABRT_CryoRmax+ABRT_CryoRmin)/2. ; 0. ; ABRT_Zrib[Irib] " />
+  </foreach>
+</subtraction>
+
+<subtraction  name="BAR_ThermShield_AlongZ_Up_Part3" >
+  <posXYZ  volume="BAR_ThermShield_AlongZOuter"  X_Y_Z=" BAR_ThermShield_RadiusMax - BAR_ThermShield_XLenght/2. ; 0. ; 0. " rot=" 0. ; 0. ;  90. "/>
+  <posXYZ  volume="BAR_ThermShield_AlongZInner"  X_Y_Z=" BAR_ThermShield_RadiusMax - BAR_ThermShield_XLenght/2. ; 0. ; 0. " rot=" 0. ; 0. ;  90. "/>
+  <foreach  index="Irib"  begin="3"  loops="1" >
+    <posXYZ  volume="BAR_CryoRibIn" X_Y_Z=" (ABRT_CryoRmax+ABRT_CryoRmin)/2. ; 0. ; ABRT_Zrib[Irib] " />
+  </foreach>
+</subtraction>
+
+<subtraction  name="BAR_ThermShield_AlongZ_Up_Part4" >
+  <posXYZ  volume="BAR_ThermShield_AlongZOuter"  X_Y_Z=" BAR_ThermShield_RadiusMax - BAR_ThermShield_XLenght/2. ; 0. ; -(BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  90. "/>
+  <posXYZ  volume="BAR_ThermShield_AlongZInner"  X_Y_Z=" BAR_ThermShield_RadiusMax - BAR_ThermShield_XLenght/2. ; 0. ; -(BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  90. "/>
+  <foreach  index="Irib"  begin="1"  loops="2" >
+    <posXYZ  volume="BAR_CryoRibIn" X_Y_Z=" (ABRT_CryoRmax+ABRT_CryoRmin)/2. ; 0. ; ABRT_Zrib[Irib] " />
+  </foreach>
+</subtraction>
+
+<subtraction  name="BAR_ThermShield_AlongZ_Up_Part5" >
+  <posXYZ  volume="BAR_ThermShield_AlongZOuter"  X_Y_Z=" BAR_ThermShield_RadiusMax - BAR_ThermShield_XLenght/2. ; 0. ; -2.*(BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  90. "/>
+  <posXYZ  volume="BAR_ThermShield_AlongZInner"  X_Y_Z=" BAR_ThermShield_RadiusMax - BAR_ThermShield_XLenght/2. ; 0. ; -2.*(BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  90. "/>
+  <posXYZ  volume="BAR_ThermShield_CutBox"  X_Y_Z=" BAR_ThermShield_RadiusMax - BAR_ThermShield_XLenght/2. - BAR_ThermShield_XLenght/2.*GENV_Ta225 ; 0. ;  -(BAR_ThermShield_TotalZLength/2. - (BAR_ThermShield_OuterEdgeLen-BAR_ThermShield_XLenght*GENV_Ta225)/sqrt(2.) - GENV_Eps)" rot=" 0. ;  22.5 ; 0. "/>
+  <foreach  index="Irib"  begin="0"  loops="1" >
+    <posXYZ  volume="BAR_CryoRibIn" X_Y_Z=" (ABRT_CryoRmax+ABRT_CryoRmin)/2. ; 0. ; ABRT_Zrib[Irib] " />
+  </foreach>
+</subtraction>
+
+<subtraction  name="BAR_ThermShield_AlongR" >
+  <posXYZ  volume="BAR_ThermShield_AlongROuter"   X_Y_Z=" (BAR_ThermShield_RadiusMin + BAR_ThermShield_RadiusMax)/2.; 0. ; (BAR_ThermShield_TotalZLength - BAR_ThermShield_XLenght)/2. " rot=" -90. ; 0. ;  -90. " />
+  <posXYZ  volume="BAR_ThermShield_AlongRInner"   X_Y_Z=" (BAR_ThermShield_RadiusMin + BAR_ThermShield_RadiusMax)/2.; 0. ; (BAR_ThermShield_TotalZLength - BAR_ThermShield_XLenght)/2. " rot=" -90. ; 0. ;  -90. " />
+  <posXYZ  volume="BAR_ThermShield_CutBox"   X_Y_Z=" BAR_ThermShield_RadiusMin + (BAR_ThermShield_OuterEdgeLen-BAR_ThermShield_XLenght*GENV_Ta225)/sqrt(2.) + GENV_Eps; 0. ; BAR_ThermShield_TotalZLength/2. - BAR_ThermShield_XLenght/2. - BAR_ThermShield_XLenght/2.*GENV_Ta225 " rot=" 0. ; -22.5 ; 0. "/>
+  <posXYZ  volume="BAR_ThermShield_CutBox"   X_Y_Z=" BAR_ThermShield_RadiusMax - (BAR_ThermShield_OuterEdgeLen-BAR_ThermShield_XLenght*GENV_Ta225)/sqrt(2.) - GENV_Eps; 0. ; BAR_ThermShield_TotalZLength/2. - BAR_ThermShield_XLenght/2. - BAR_ThermShield_XLenght/2.*GENV_Ta225 " rot=" 0. ;  22.5 ; 0. "/>
+</subtraction>
+
+<subtraction  name="BAR_ThermShield_Corner" >
+  <posXYZ  volume="BAR_ThermShield_CornerOuter"  X_Y_Z=" (BAR_ThermShield_OuterEdgeLen)/(2.*sqrt(2.)) + BAR_ThermShield_XLenght/2./sqrt(2.) + BAR_ThermShield_RadiusMin; 0. ;  - (BAR_ThermShield_OuterEdgeLen)/(2.*sqrt(2.)) + (2.+sqrt(2.))*BAR_ThermShield_XLenght*GENV_Ta225/(2.*sqrt(2.)) - (1.+sqrt(2.))*BAR_ThermShield_XLenght/(2.*sqrt(2.)) + BAR_ThermShield_TotalZLength/2." rot=" -45. ; 0. ; -90. "/>
+  <posXYZ  volume="BAR_ThermShield_CornerInner"  X_Y_Z=" (BAR_ThermShield_OuterEdgeLen)/(2.*sqrt(2.)) + BAR_ThermShield_XLenght/2./sqrt(2.) + BAR_ThermShield_RadiusMin; 0. ;  - (BAR_ThermShield_OuterEdgeLen)/(2.*sqrt(2.)) + (2.+sqrt(2.))*BAR_ThermShield_XLenght*GENV_Ta225/(2.*sqrt(2.)) - (1.+sqrt(2.))*BAR_ThermShield_XLenght/(2.*sqrt(2.)) + BAR_ThermShield_TotalZLength/2." rot=" -45. ; 0. ; -90. "/>
+  <posXYZ  volume="BAR_ThermShield_CutBox"      X_Y_Z=" BAR_ThermShield_RadiusMin + (1. - GENV_Ta225)*BAR_ThermShield_XLenght/2.; 0. ; BAR_ThermShield_TotalZLength/2. - (BAR_ThermShield_OuterEdgeLen-BAR_ThermShield_XLenght*GENV_Ta225)/sqrt(2.) - BAR_ThermShield_XLenght" rot=" 0. ; 22.5 ; 0. "/>
+  <posXYZ  volume="BAR_ThermShield_CutBox"      X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_XLenght + (BAR_ThermShield_OuterEdgeLen-BAR_ThermShield_XLenght*GENV_Ta225)/sqrt(2.) ; 0. ; BAR_ThermShield_TotalZLength/2. - BAR_ThermShield_XLenght/2.*(1. -GENV_Ta225)" rot=" 0. ; -22.5 ; 0. "/>
+</subtraction>
+
+<composition  name="BAR_ThermShield_Sector" >
+  <posXYZ  volume="BAR_ThermShield_AlongZ_Down_Part1" />
+  <posXYZ  volume="BAR_ThermShield_AlongZ_Down_Part2" />
+  <posXYZ  volume="BAR_ThermShield_AlongZ_Down_Part3" />
+  <posXYZ  volume="BAR_ThermShield_AlongZ_Down_Part4" />
+  <posXYZ  volume="BAR_ThermShield_AlongZ_Down_Part5" />
+  <posXYZ  volume="BAR_ThermShield_AlongZ_Up_Part1" />
+  <posXYZ  volume="BAR_ThermShield_AlongZ_Up_Part2" />
+  <posXYZ  volume="BAR_ThermShield_AlongZ_Up_Part3" />
+  <posXYZ  volume="BAR_ThermShield_AlongZ_Up_Part4" />
+  <posXYZ  volume="BAR_ThermShield_AlongZ_Up_Part5" />
+  <posXYZ  volume="BAR_ThermShield_AlongR" X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ  volume="BAR_ThermShield_AlongR" X_Y_Z=" 0.; 0.; 0." rot=" 0. ; 180. ; 180. "/>
+  <posXYZ  volume="BAR_ThermShield_Corner" X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ  volume="BAR_ThermShield_Corner" X_Y_Z=" 0.; 0.; 0." rot=" 0. ; 180. ; 180. "/>
+  <posXYZ  volume="BAR_ThermShield_Corner" X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_RadiusMax; 0.; 0." rot=" 0. ; 180. ;   0. "/>
+  <posXYZ  volume="BAR_ThermShield_Corner" X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_RadiusMax; 0.; 0." rot=" 0. ;   0. ; 180. "/>
+</composition>
+
+<!-- End of barrel toroid thermal shielding -->
+
+<var name="AFT_BTBrktInf_BackPlate_XLong"         value="1080. " />
+<var name="AFT_BTBrktInf_BackPlate_XOff"          value=" 140. " />
+<var name="AFT_BTBrktInf_BackPlate_XGap"          value=" 190. " />
+
+<var name="AFT_BTBrktInf_BackPlate_YLong"         value=" 305. " />
+<var name="AFT_BTBrktInf_BackPlate_YAngle"        value="  22. " />
+<var name="AFT_BTBrktInf_BackPlate_YOff"          value=" 150. " />
+<var name="AFT_BTBrktInf_BackPlate_YGap"          value="  40. " />
+
+<var name="AFT_BTBrktInf_BackPlate_Thickness"     value="  20. " />
+
+<gvxysx name="AFT_BTBrktInf_BackPlate"   material="Iron" dZ="AFT_BTBrktInf_BackPlate_Thickness" >
+  <gvxy_point X_Y="AFT_BTBrktInf_BackPlate_XLong/2.-AFT_BTBrktInf_BackPlate_XOff-AFT_BTBrktInf_BackPlate_XGap; 0."/>
+  <gvxy_point X_Y="AFT_BTBrktInf_BackPlate_XLong/2.-AFT_BTBrktInf_BackPlate_XOff-AFT_BTBrktInf_BackPlate_XGap; AFT_BTBrktInf_BackPlate_YGap"/>
+  <gvxy_point X_Y="AFT_BTBrktInf_BackPlate_XLong/2.-AFT_BTBrktInf_BackPlate_XOff; AFT_BTBrktInf_BackPlate_YGap"/>
+  <gvxy_point X_Y="AFT_BTBrktInf_BackPlate_XLong/2.-AFT_BTBrktInf_BackPlate_XOff; 0."/>
+  <gvxy_point X_Y="AFT_BTBrktInf_BackPlate_XLong/2.; 0."/>
+  <gvxy_point X_Y="AFT_BTBrktInf_BackPlate_XLong/2.; AFT_BTBrktInf_BackPlate_YOff"/>
+  <gvxy_point X_Y="(AFT_BTBrktInf_BackPlate_XLong/2.)-((AFT_BTBrktInf_BackPlate_YLong-AFT_BTBrktInf_BackPlate_YOff)*tan(AFT_BTBrktInf_BackPlate_YAngle*GENV_PiS180)); AFT_BTBrktInf_BackPlate_YLong"/>
+</gvxysx>
+
+<var name="AFT_BTBrktInf_ZLength"                 value=" 280. " />
+<var name="AFT_BTBrktInf_TopCentralXLong"         value=" 590. " />
+<var name="AFT_BTBrktInf_CentralSpacerYLong"      value="  80. " />
+<var name="AFT_BTBrktInf_YSpacerTotal"            value=" 168. " />
+
+<var name="AFT_BTBrktInf_CentralSpacerOffsetX"    value=" 407. " />
+<var name="AFT_BTBrktInf_SideSpacerOffsetX"       value="  42.5" />
+
+<box name="AFT_BTBrktInf_LowCenterLongX"  material="Iron"    X_Y_Z="AFT_BTBrktInf_BackPlate_XLong-2.*(AFT_BTBrktInf_BackPlate_XOff+AFT_BTBrktInf_BackPlate_XGap); AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrktInf_ZLength" />
+<box name="AFT_BTBrktInf_LowSideLongX"    material="Iron"    X_Y_Z="AFT_BTBrktInf_BackPlate_XOff; AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrktInf_ZLength" />
+<box name="AFT_BTBrktInf_TopCenterLongX"  material="Iron"    X_Y_Z="AFT_BTBrktInf_TopCentralXLong; 2.+AFT_BTBrktInf_BackPlate_Thickness*2.; AFT_BTBrktInf_ZLength" />
+
+<box name="AFT_BTBrktInf_CtrSpacerPlate"  material="Iron"    X_Y_Z="AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrktInf_CentralSpacerYLong; AFT_BTBrktInf_ZLength" />
+<box name="AFT_BTBrktInf_MidSpacerPlate"  material="Iron"    X_Y_Z="2.*AFT_BTBrktInf_BackPlate_Thickness+2.; AFT_BTBrktInf_YSpacerTotal-2.-2.*AFT_BTBrktInf_BackPlate_Thickness-AFT_BTBrktInf_CentralSpacerYLong; AFT_BTBrktInf_ZLength" />
+<box name="AFT_BTBrktInf_SideSpacerPlate" material="Iron"    X_Y_Z="AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrktInf_YSpacerTotal; AFT_BTBrktInf_ZLength" />
+
+<composition name="AFT_BTBrktInf">
+  <posXYZ  volume="AFT_BTBrktInf_BackPlate"         X_Y_Z=" 0.; 0.; AFT_BTBrktInf_BackPlate_Thickness/2.+AFT_BTBrktInf_ZLength" />
+  <posXYZ  volume="AFT_BTBrktInf_LowCenterLongX"    X_Y_Z=" 0.; AFT_BTBrktInf_BackPlate_Thickness/2.; AFT_BTBrktInf_ZLength/2." />
+  <posXYZ  volume="AFT_BTBrktInf_LowSideLongX"      X_Y_Z=" (AFT_BTBrktInf_BackPlate_XLong-AFT_BTBrktInf_BackPlate_XOff)/2.; AFT_BTBrktInf_BackPlate_Thickness/2.; AFT_BTBrktInf_ZLength/2." />
+  <posXYZ  volume="AFT_BTBrktInf_LowSideLongX"      X_Y_Z=" -(AFT_BTBrktInf_BackPlate_XLong-AFT_BTBrktInf_BackPlate_XOff)/2.; AFT_BTBrktInf_BackPlate_Thickness/2.; AFT_BTBrktInf_ZLength/2." />
+  <posXYZ  volume="AFT_BTBrktInf_TopCenterLongX"    X_Y_Z=" 0.; AFT_BTBrktInf_CentralSpacerYLong+2.*AFT_BTBrktInf_BackPlate_Thickness+1.; AFT_BTBrktInf_ZLength/2." />
+  <posXYZ  volume="AFT_BTBrktInf_CtrSpacerPlate"    X_Y_Z="-AFT_BTBrktInf_BackPlate_XLong/2.+AFT_BTBrktInf_CentralSpacerOffsetX+AFT_BTBrktInf_BackPlate_Thickness/2.; AFT_BTBrktInf_CentralSpacerYLong/2.+AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrktInf_ZLength/2." />
+  <posXYZ  volume="AFT_BTBrktInf_CtrSpacerPlate"    X_Y_Z=" AFT_BTBrktInf_BackPlate_XLong/2.-AFT_BTBrktInf_CentralSpacerOffsetX-AFT_BTBrktInf_BackPlate_Thickness/2.; AFT_BTBrktInf_CentralSpacerYLong/2.+AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrktInf_ZLength/2." />
+  <posXYZ  volume="AFT_BTBrktInf_MidSpacerPlate"    X_Y_Z="-AFT_BTBrktInf_TopCentralXLong/2.+AFT_BTBrktInf_BackPlate_Thickness+1.; (AFT_BTBrktInf_YSpacerTotal+AFT_BTBrktInf_CentralSpacerYLong)/2.+2.*AFT_BTBrktInf_BackPlate_Thickness+1.; AFT_BTBrktInf_ZLength/2." />
+  <posXYZ  volume="AFT_BTBrktInf_MidSpacerPlate"    X_Y_Z=" AFT_BTBrktInf_TopCentralXLong/2.-AFT_BTBrktInf_BackPlate_Thickness-1.; (AFT_BTBrktInf_YSpacerTotal+AFT_BTBrktInf_CentralSpacerYLong)/2.+2.*AFT_BTBrktInf_BackPlate_Thickness+1.; AFT_BTBrktInf_ZLength/2." />
+  <posXYZ  volume="AFT_BTBrktInf_SideSpacerPlate"   X_Y_Z="-AFT_BTBrktInf_BackPlate_XLong/2.+AFT_BTBrktInf_BackPlate_XOff-AFT_BTBrktInf_BackPlate_Thickness/2.; AFT_BTBrktInf_YSpacerTotal/2.+AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrktInf_ZLength/2." />
+  <posXYZ  volume="AFT_BTBrktInf_SideSpacerPlate"   X_Y_Z="-AFT_BTBrktInf_BackPlate_XLong/2.+AFT_BTBrktInf_SideSpacerOffsetX; AFT_BTBrktInf_YSpacerTotal/2.+AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrktInf_ZLength/2." />
+  <posXYZ  volume="AFT_BTBrktInf_SideSpacerPlate"   X_Y_Z=" AFT_BTBrktInf_BackPlate_XLong/2.-AFT_BTBrktInf_BackPlate_XOff+AFT_BTBrktInf_BackPlate_Thickness/2.; AFT_BTBrktInf_YSpacerTotal/2.+AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrktInf_ZLength/2." />
+  <posXYZ  volume="AFT_BTBrktInf_SideSpacerPlate"   X_Y_Z=" AFT_BTBrktInf_BackPlate_XLong/2.-AFT_BTBrktInf_SideSpacerOffsetX; AFT_BTBrktInf_YSpacerTotal/2.+AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrktInf_ZLength/2." />
+</composition>
+
+<var name="AFT_BTBrkt_BackPlate_XLong"            value=" 955. " />
+<var name="AFT_BTBrkt_BackPlate_XShort"           value=" 545. " />
+<var name="AFT_BTBrkt_BackPlate_YLong"            value=" 183. " />
+<var name="AFT_BTBrkt_BackPlate_YShort"           value="  86. " />
+
+<gvxysx name="AFT_BTBrkt_BackPlate"   material="Iron" dZ="AFT_BTBrktInf_BackPlate_Thickness" >
+  <gvxy_point X_Y="AFT_BTBrkt_BackPlate_XShort/2.; 0."/>
+  <gvxy_point X_Y="AFT_BTBrkt_BackPlate_XShort/2.; AFT_BTBrkt_BackPlate_YShort-AFT_BTBrktInf_BackPlate_Thickness"/>
+  <gvxy_point X_Y="AFT_BTBrkt_BackPlate_XLong/2.+(AFT_BTBrkt_BackPlate_YLong-AFT_BTBrkt_BackPlate_YShort+AFT_BTBrktInf_BackPlate_Thickness)*tan(AFT_BTBrktInf_BackPlate_YAngle*GENV_PiS180); AFT_BTBrkt_BackPlate_YShort-AFT_BTBrktInf_BackPlate_Thickness"/>
+  <gvxy_point X_Y="AFT_BTBrkt_BackPlate_XLong/2.; AFT_BTBrkt_BackPlate_YLong"/>
+</gvxysx>
+
+<var name="AFT_BTBrkt_SidePlateXLength"           value=" 235. " />
+<var name="AFT_BTBrkt_CentralPlateXLength"        value=" 546. " />
+<var name="AFT_BTBrkt_ZLength"                    value=" 260. " />
+
+<box name="AFT_BTBrkt_SideLongX"     material="Iron"    X_Y_Z="AFT_BTBrkt_SidePlateXLength+AFT_BTBrktInf_BackPlate_Thickness; 2.*AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrkt_ZLength"/>
+
+<var name="AFT_BTBrkt_CtrSpacerPlate_XShort"      value="  10. " />
+<var name="AFT_BTBrkt_CtrSpacerPlate_YLong"       value=" 308. " />
+
+<var name="AFT_BTBrkt_MidSpacerPlate_XShort"      value="   9. " />
+<var name="AFT_BTBrkt_MidSpacerPlate_YLong"       value=" 378. " />
+
+<var name="AFT_BTBrkt_SideSpacerPlate_XShort"     value="  15.5" />
+<var name="AFT_BTBrkt_SideSpacerPlate_XLong"      value=" 820. " />
+<var name="AFT_BTBrkt_SideSpacerPlate_YShort"     value=" 125. " />
+<var name="AFT_BTBrkt_SideSpacerPlate_YLong"      value=" 530. " />
+<var name="AFT_BTBrkt_SideSpacerPlate_XDist"      value=" 457. " />
+
+<gvxy name="AFT_BTBrkt_CtrSpacerPlate"   material="Iron" dZ="AFT_BTBrktInf_BackPlate_Thickness" >
+  <gvxy_point X_Y="                                0.; 0."/>
+  <gvxy_point X_Y="               AFT_BTBrkt_ZLength; 0."/>
+  <gvxy_point X_Y="               AFT_BTBrkt_ZLength; AFT_BTBrkt_CtrSpacerPlate_YLong-AFT_BTBrkt_ZLength+AFT_BTBrkt_CtrSpacerPlate_XShort"/>
+  <gvxy_point X_Y=" AFT_BTBrkt_CtrSpacerPlate_XShort; AFT_BTBrkt_CtrSpacerPlate_YLong"/>
+  <gvxy_point X_Y="                                0.; AFT_BTBrkt_CtrSpacerPlate_YLong"/>
+</gvxy>
+
+<gvxy name="AFT_BTBrkt_MidSpacerPlate"   material="Iron" dZ="AFT_BTBrktInf_BackPlate_Thickness" >
+  <gvxy_point X_Y="                                0.; AFT_BTBrktInf_YSpacerTotal-2.-AFT_BTBrktInf_CentralSpacerYLong"/>
+  <gvxy_point X_Y="               AFT_BTBrkt_ZLength; AFT_BTBrktInf_YSpacerTotal-2.-AFT_BTBrktInf_CentralSpacerYLong"/>
+  <gvxy_point X_Y="               AFT_BTBrkt_ZLength; AFT_BTBrkt_MidSpacerPlate_YLong-AFT_BTBrkt_ZLength+AFT_BTBrkt_MidSpacerPlate_XShort"/>
+  <gvxy_point X_Y=" AFT_BTBrkt_MidSpacerPlate_XShort; AFT_BTBrkt_MidSpacerPlate_YLong"/>
+  <gvxy_point X_Y="                                0.; AFT_BTBrkt_MidSpacerPlate_YLong"/>
+</gvxy>
+
+<gvxy name="AFT_BTBrkt_SideSpacerPlate"   material="Iron" dZ="AFT_BTBrktInf_BackPlate_Thickness" >
+  <gvxy_point X_Y="                                                                                                      0.; 0."/>
+  <gvxy_point X_Y="                                                                       AFT_BTBrkt_SideSpacerPlate_XLong; 0."/>
+  <gvxy_point X_Y="                                                                       AFT_BTBrkt_SideSpacerPlate_XLong; AFT_BTBrkt_SideSpacerPlate_YShort"/>
+  <gvxy_point X_Y=" AFT_BTBrkt_SideSpacerPlate_XShort+AFT_BTBrkt_SideSpacerPlate_YLong-AFT_BTBrkt_SideSpacerPlate_YShort; AFT_BTBrkt_SideSpacerPlate_YShort"/>
+  <gvxy_point X_Y="                                                                      AFT_BTBrkt_SideSpacerPlate_XShort; AFT_BTBrkt_SideSpacerPlate_YLong"/>
+  <gvxy_point X_Y="                                                                                                      0.; AFT_BTBrkt_SideSpacerPlate_YLong"/>
+</gvxy>
+
+<var name="AFT_BTBrkt_FrontTube_StartAngle"      value=" 195. " />
+<var name="AFT_BTBrkt_FrontTube_Angle"           value="  70. " />
+<var name="AFT_BTBrkt_FrontTube_Radius"          value=" 550. " />
+<var name="AFT_BTBrkt_FrontTube_ZLength"         value=" 250. " />
+<var name="AFT_BTBrkt_FrontTube_YOffset"         value=" 558. " />
+<var name="AFT_BTBrkt_BackTube_ZLength"          value=" 700. " />
+<var name="AFT_BTBrkt_BackTube_StartAngle"       value=" 190. " />
+<var name="AFT_BTBrkt_BackTube_YOffset"          value=" 226. " />
+
+<tubs name="AFT_BTBrkt_FrontTube" material="Iron"  Rio_Z="AFT_BTBrkt_FrontTube_Radius; AFT_BTBrkt_FrontTube_Radius+AFT_BTBrktInf_BackPlate_Thickness/2. ; AFT_BTBrkt_FrontTube_ZLength"  profile="AFT_BTBrkt_FrontTube_StartAngle; AFT_BTBrkt_FrontTube_Angle"  nbPhi="20"   />
+<tubs name="AFT_BTBrkt_BackTube"  material="Iron"  Rio_Z="AFT_BTBrkt_FrontTube_Radius; AFT_BTBrkt_FrontTube_Radius+AFT_BTBrktInf_BackPlate_Thickness/2. ; AFT_BTBrkt_BackTube_ZLength"   profile="AFT_BTBrkt_BackTube_StartAngle; AFT_BTBrkt_FrontTube_Angle"   nbPhi="20"   />
+
+<var name="AFT_BTBrkt_BackTube_PosOff" value=" (AFT_BTBrkt_FrontTube_Radius+AFT_BTBrktInf_BackPlate_Thickness/2.)*cos(asin((AFT_BTBrktInf_BackPlate_XLong/2.-AFT_BTBrktInf_CentralSpacerOffsetX-AFT_BTBrktInf_BackPlate_Thickness)/(AFT_BTBrkt_FrontTube_Radius+AFT_BTBrktInf_BackPlate_Thickness/2.)))*GENV_Si45"/>
+
+<var name="AFT_BTBrkt_FrontPlate_ZOffset"        value="  10. " />
+<var name="AFT_BTBrkt_FrontPlate_ZGap"           value=" 190. " />
+<var name="AFT_BTBrkt_FrontPlate_XWidth"         value=" 115. " />
+<var name="AFT_BTBrkt_FrontPlate_YHight"         value=" 120. " />
+
+<tubs name="AFT_BTBrkt_FrontPlate_SubTube"  material="Iron"  Rio_Z="0.; AFT_BTBrkt_FrontTube_Radius+AFT_BTBrktInf_BackPlate_Thickness/2.+GENV_Eps ; AFT_BTBrkt_BackTube_ZLength" profile=" 300.; 70." nbPhi="50"   />
+<box name="AFT_BTBrkt_FrontPlate_Full"      material="Iron"  X_Y_Z="AFT_BTBrkt_FrontPlate_XWidth; AFT_BTBrkt_FrontPlate_YHight; AFT_BTBrktInf_BackPlate_Thickness" />
+
+<subtraction name="AFT_BTBrkt_FrontPlate"> 
+ <posXYZ  volume="AFT_BTBrkt_FrontPlate_Full"      X_Y_Z=" AFT_BTBrkt_SideSpacerPlate_XDist-AFT_BTBrkt_FrontPlate_XWidth/2.; AFT_BTBrkt_BackPlate_YShort+AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrkt_FrontPlate_YHight/2.; 0."/>
+ <posXYZ  volume="AFT_BTBrkt_FrontPlate_SubTube"   X_Y_Z=" 0.; AFT_BTBrkt_FrontTube_YOffset; 0." />
+</subtraction>
+
+<composition name="AFT_BTBrkt">
+  <!-- the following "AFT_BTBrkt_BackPlate" volume creates clashes with other barrel toroid volumes. A quick check showed that
+       removing this volume makes the barrel toroid description clash free, so this should be investigated -->
+  <posXYZ  volume="AFT_BTBrkt_BackPlate"            X_Y_Z=" 0.; 2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal-AFT_BTBrkt_BackPlate_YShort; AFT_BTBrkt_ZLength+AFT_BTBrktInf_BackPlate_Thickness/2."/>
+  <posXYZ  volume="AFT_BTBrkt_SideLongX"            X_Y_Z="-(AFT_BTBrkt_CentralPlateXLength+AFT_BTBrkt_SidePlateXLength-AFT_BTBrktInf_BackPlate_Thickness)/2.; 1.5*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal+AFT_BTBrktInf_BackPlate_Thickness/2.; AFT_BTBrkt_ZLength/2."/>
+  <posXYZ  volume="AFT_BTBrkt_SideLongX"            X_Y_Z=" (AFT_BTBrkt_CentralPlateXLength+AFT_BTBrkt_SidePlateXLength-AFT_BTBrktInf_BackPlate_Thickness)/2.; 1.5*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal+AFT_BTBrktInf_BackPlate_Thickness/2.; AFT_BTBrkt_ZLength/2."/>
+  <posXYZ  volume="AFT_BTBrkt_CtrSpacerPlate"       X_Y_Z="-AFT_BTBrktInf_BackPlate_XLong/2.+AFT_BTBrktInf_CentralSpacerOffsetX+AFT_BTBrktInf_BackPlate_Thickness/2.; 2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal-AFT_BTBrkt_BackPlate_YShort+AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrkt_ZLength" rot=" 0.; 90.; 0."/>
+  <posXYZ  volume="AFT_BTBrkt_CtrSpacerPlate"       X_Y_Z=" AFT_BTBrktInf_BackPlate_XLong/2.-AFT_BTBrktInf_CentralSpacerOffsetX-AFT_BTBrktInf_BackPlate_Thickness/2.; 2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal-AFT_BTBrkt_BackPlate_YShort+AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrkt_ZLength" rot=" 0.; 90.; 0."/>
+  <posXYZ  volume="AFT_BTBrkt_MidSpacerPlate"       X_Y_Z="-(AFT_BTBrkt_CentralPlateXLength-AFT_BTBrktInf_BackPlate_Thickness)/2.; 2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal-AFT_BTBrkt_BackPlate_YShort+AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrkt_ZLength" rot=" 0.; 90.; 0."/>
+  <posXYZ  volume="AFT_BTBrkt_MidSpacerPlate"       X_Y_Z=" (AFT_BTBrkt_CentralPlateXLength-AFT_BTBrktInf_BackPlate_Thickness)/2.; 2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal-AFT_BTBrkt_BackPlate_YShort+AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrkt_ZLength" rot=" 0.; 90.; 0."/>
+  <posXYZ  volume="AFT_BTBrkt_SideSpacerPlate"      X_Y_Z="-AFT_BTBrkt_SideSpacerPlate_XDist-AFT_BTBrktInf_BackPlate_Thickness/2.; 2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal+AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrkt_ZLength" rot=" 0.; 90.; 0."/>
+  <posXYZ  volume="AFT_BTBrkt_SideSpacerPlate"      X_Y_Z=" AFT_BTBrkt_SideSpacerPlate_XDist+AFT_BTBrktInf_BackPlate_Thickness/2.; 2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal+AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrkt_ZLength" rot=" 0.; 90.; 0."/>
+  <posXYZ  volume="AFT_BTBrkt_FrontTube"            X_Y_Z=" 0.; 2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal-AFT_BTBrkt_BackPlate_YShort+AFT_BTBrkt_FrontTube_YOffset; AFT_BTBrkt_ZLength-AFT_BTBrkt_SideSpacerPlate_XLong+AFT_BTBrkt_FrontTube_ZLength/2." />
+  <posXYZ  volume="AFT_BTBrkt_FrontTube"            X_Y_Z=" 0.; 2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal-AFT_BTBrkt_BackPlate_YShort+AFT_BTBrkt_FrontTube_YOffset; AFT_BTBrkt_ZLength-AFT_BTBrkt_SideSpacerPlate_XLong+AFT_BTBrkt_FrontTube_ZLength/2." rot=" 0.; 0.; 80."/>
+  <posXYZ  volume="AFT_BTBrkt_BackTube"             X_Y_Z=" 0.; 3.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal-AFT_BTBrkt_BackPlate_YShort+AFT_BTBrkt_CtrSpacerPlate_YLong+AFT_BTBrkt_BackTube_PosOff+(AFT_BTBrkt_BackTube_ZLength/2.-AFT_BTBrkt_BackTube_YOffset)*GENV_Si45; AFT_BTBrkt_ZLength-AFT_BTBrkt_CtrSpacerPlate_XShort-AFT_BTBrkt_BackTube_PosOff+(AFT_BTBrkt_BackTube_ZLength/2.-AFT_BTBrkt_BackTube_YOffset)*GENV_Si45" rot=" -45.;  0.;  0."/>
+  <posXYZ  volume="AFT_BTBrkt_BackTube"             X_Y_Z=" 0.; 3.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal-AFT_BTBrkt_BackPlate_YShort+AFT_BTBrkt_CtrSpacerPlate_YLong+AFT_BTBrkt_BackTube_PosOff+(AFT_BTBrkt_BackTube_ZLength/2.-AFT_BTBrkt_BackTube_YOffset)*GENV_Si45; AFT_BTBrkt_ZLength-AFT_BTBrkt_CtrSpacerPlate_XShort-AFT_BTBrkt_BackTube_PosOff+(AFT_BTBrkt_BackTube_ZLength/2.-AFT_BTBrkt_BackTube_YOffset)*GENV_Si45" rot="   0.; 45.; 90."/>
+  <posXYZ  volume="AFT_BTBrkt_FrontPlate"           X_Y_Z=" 0.; 2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal-AFT_BTBrkt_BackPlate_YShort; AFT_BTBrkt_ZLength-AFT_BTBrkt_SideSpacerPlate_XLong+AFT_BTBrktInf_BackPlate_Thickness/2.+AFT_BTBrkt_FrontPlate_ZOffset" />
+  <posXYZ  volume="AFT_BTBrkt_FrontPlate"           X_Y_Z=" 0.; 2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal-AFT_BTBrkt_BackPlate_YShort; AFT_BTBrkt_ZLength-AFT_BTBrkt_SideSpacerPlate_XLong+AFT_BTBrktInf_BackPlate_Thickness/2.+AFT_BTBrkt_FrontPlate_ZOffset+AFT_BTBrkt_FrontPlate_ZGap+AFT_BTBrktInf_BackPlate_Thickness" />
+  <posXYZ  volume="AFT_BTBrkt_FrontPlate"           X_Y_Z=" 0.; 2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal-AFT_BTBrkt_BackPlate_YShort; AFT_BTBrkt_ZLength-AFT_BTBrkt_SideSpacerPlate_XLong+AFT_BTBrktInf_BackPlate_Thickness/2.+AFT_BTBrkt_FrontPlate_ZOffset" rot=" 0.; 180.; 0." />
+  <posXYZ  volume="AFT_BTBrkt_FrontPlate"           X_Y_Z=" 0.; 2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal-AFT_BTBrkt_BackPlate_YShort; AFT_BTBrkt_ZLength-AFT_BTBrkt_SideSpacerPlate_XLong+AFT_BTBrktInf_BackPlate_Thickness/2.+AFT_BTBrkt_FrontPlate_ZOffset+AFT_BTBrkt_FrontPlate_ZGap+AFT_BTBrktInf_BackPlate_Thickness" rot=" 0.; 180.; 0." />
+</composition>
+
+<var name="AFT_BTBrkt_Cryotubethickness"    value="AFT_BTBrkt_FrontTube_YOffset+2.-AFT_BTBrkt_FrontTube_Radius" />
+<var name="AFT_BTBrkt_CryotubeouterRadius"  value="AFT_BTBrkt_FrontTube_YOffset+2." />
+<var name="AFT_BTBrkt_CtrSpacerXOffset"     value="AFT_BTBrktInf_BackPlate_XLong/2.-AFT_BTBrktInf_CentralSpacerOffsetX-AFT_BTBrktInf_BackPlate_Thickness" />
+
+<var name="AFT_BTBrkt_PositioningParameter" value="(AFT_BTBrktInf_BackPlate_Thickness-AFT_BTBrkt_Cryotubethickness+2.-AFT_BTBrkt_ZLength+AFT_BTBrkt_CtrSpacerPlate_YLong+AFT_BTBrkt_Cryotubethickness)*GENV_Si45-(AFT_BTBrkt_CryotubeouterRadius-sqrt(AFT_BTBrkt_CryotubeouterRadius*AFT_BTBrkt_CryotubeouterRadius-AFT_BTBrkt_CtrSpacerXOffset*AFT_BTBrkt_CtrSpacerXOffset))+AFT_BTBrkt_Cryotubethickness" />
+
+<composition name="AFT_BTBrkt_final" >
+  <posXYZ  volume="AFT_BTBrkt"       X_Y_Z=" 0.; -(AFT_BTBrktInf_CentralSpacerYLong+2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrkt_Cryotubethickness); 2.*GENV_Si45*AFT_BTBrkt_PositioningParameter" />
+  <posXYZ  volume="AFT_BTBrktInf"    X_Y_Z=" 0.; -(AFT_BTBrktInf_CentralSpacerYLong+2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrkt_Cryotubethickness); 2.*GENV_Si45*AFT_BTBrkt_PositioningParameter" />
+</composition>
+
+<composition  name="BAR_CryoTubCorner_AFT" >
+  <posXYZ  volume="BAR_CryoTubCorner" X_Y_Z=" 0.; 0. ; 0." />
+  <posXYZ  volume="AFT_BTBrkt_final"    X_Y_Z=" ABRT_CryoRmin - 10.*GENV_Eps; 0.; ABRT_CryoZmax - ABRT_CryoRadi_Radius - ABRT_CryoRcur/sqrt(2.) + GENV_Ta225*ABRT_CryoRadi_Radius + 10.*GENV_Eps" rot=" 0. ; 0. ; -90. "/>
+</composition>
+
+<!-- CryoRib with cuts -->
+<subtraction  name="BAR_CryoRib" >
+  <posXYZ  volume="BAR_CryoRibOut"  X_Y_Z=" (ABRT_CryoRmax + ABRT_CryoRmin)/2. ; 0. ; 0. " />
+  <posXYZ  volume="BAR_CryoRibIn"   X_Y_Z=" (ABRT_CryoRmax + ABRT_CryoRmin)/2. ; 0. ; 0. " />
+  <posXYZ  volume="BAR_CryoTubCut"  X_Y_Z=" ABRT_CryoRmax - ABRT_CryoRadi_Radius - 10.*GENV_Eps; 0. ; 0. " />
+  <posXYZ  volume="BAR_CryoTubCut"  X_Y_Z=" ABRT_CryoRmin + ABRT_CryoRadi_Radius + 10.*GENV_Eps; 0. ; 0. " />
+</subtraction>
+
+<!-- CryoAtt with cuts -->
+<subtraction  name="BAR_CryoAtt" >
+  <posXYZ  volume="BAR_CryoAttOut"   X_Y_Z=" ABRT_CryAttRx_CryoAttRmax ; 0. ; 0. " rot=" 0. ;  90. ; 0. "/>
+  <posXYZ  volume="BAR_CryoAttIn"    X_Y_Z=" ABRT_CryAttRx_CryoAttRmax ; 0. ; 0. " rot=" 0. ;  90. ; 0. "/>
+  <posXYZ  volume="BAR_CryoTubCut"   X_Y_Z=" ABRT_CryoRmin + ABRT_CryoRadi_Radius + 10.*GENV_Eps; 0. ; 0. " />
+</subtraction>
+
+<!-- CryoRing with cuts -->
+<tubs  name="BAR_CryoRingA"   material="Iron1"  Rio_Z=" ABRT_CryRngRa_CryoRingRadius-ABRT_CryoRadT_RadThick ; ABRT_CryRngRa_CryoRingRadius ; 2.*ABRT_CryRngRm_CryoRingRmed*GENV_Ta225 "    nbPhi="20" />
+<subtraction  name="BAR_CryoRing" >
+  <posXYZ  volume="BAR_CryoRingA" />
+  <posXYZ  volume="BAR_CryoTubCut"  X_Y_Z=" (ABRT_CryoRmax-ABRT_CryoRadi_Radius)*GENV_Co225-ABRT_CryRngRm_CryoRingRmed ; 0. ;  (ABRT_CryoRmax-ABRT_CryoRadi_Radius)*GENV_Si225 "  rot=" 90. ; 0. ; 0. " />
+  <posXYZ  volume="BAR_CryoTubCut"  X_Y_Z=" (ABRT_CryoRmax-ABRT_CryoRadi_Radius)*GENV_Co225-ABRT_CryRngRm_CryoRingRmed ; 0. ; -(ABRT_CryoRmax-ABRT_CryoRadi_Radius)*GENV_Si225 "  rot=" 90. ; 0. ; 0. " />
+</subtraction>
+
+<composition  name="BAR_CryoTub_Sector" >
+  <posXYZ  volume="BAR_CryoTubAlongZ_Down" />
+  <posXYZ  volume="BAR_CryoTubAlongZ_Up" />
+  <posXYZ  volume="BAR_CryoTubAlongR_Plus" X_Y_Z=" 0.; 0.; 0."                             />
+  <posXYZ  volume="BAR_CryoTubAlongR_Plus" X_Y_Z=" ABRT_CryoRmin + ABRT_CryoRmax; 0.; 0." rot=" 0. ; 180. ; 0. "/>
+  <posXYZ  volume="BAR_CryoTubCorner_AFT"      X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ  volume="BAR_CryoTubCorner_AFT"      X_Y_Z=" 0.; 0.; 0." rot=" 0. ; 180. ; 180. "/>
+  <posXYZ  volume="BAR_CryoTubCorner"      X_Y_Z=" ABRT_CryoRmin + ABRT_CryoRmax; 0.; 0." rot=" 0. ; 180. ; 0. "/>
+  <posXYZ  volume="BAR_CryoTubCorner"      X_Y_Z="-GENV_Ta225*ABRT_CryoRadi_Radius*(1.+sqrt(2.)) + ABRT_CryoRmax - ABRT_CryoZmax + ABRT_CryoRadi_Radius; 0.;  GENV_Ta225*ABRT_CryoRadi_Radius*(1.+sqrt(2.)) + ABRT_CryoRmin + ABRT_CryoZmax - ABRT_CryoRadi_Radius" rot=" 0. ;  90. ; 0. "/>
+  <posXYZ  volume="BAR_CryoRing"           X_Y_Z=" ABRT_CryRngRm_CryoRingRmed*GENV_Co225 ; -ABRT_CryRngRm_CryoRingRmed*GENV_Si225 ; ABRT_CryRngZm_CryoRingZmed "  rot=" 90. ; 0. ; -22.5 " />
+  <foreach  index="Irib"  begin="0"  loops="7" >
+    <posXYZ  volume="BAR_CryoRibWing" X_Y_Z=" ABRT_CryoRmin+2.*ABRT_CryoRadi_Radius ; 0. ; ABRT_Zrib[Irib] "  rot=" 0. ; 0. ; -90. " />
+    <posXYZ  volume="BAR_CryoRibWing" X_Y_Z=" ABRT_CryoRmax-2.*ABRT_CryoRadi_Radius ; 0. ; ABRT_Zrib[Irib] "  rot=" 0. ; 0. ;  90. " />
+    <posXYZ  volume="BAR_CryoRib"     X_Y_Z=" 0.; 0.; ABRT_Zrib[Irib]"  rot=" 0. ; 0. ; 0. " />
+  </foreach>
+  <foreach  index="Ivouss"  begin="0"  loops="8" >
+    <posXYZ  volume="BAR_CryoAttWing" X_Y_Z=" ABRT_CryoRmin+ABRT_CryoRadi_Radius ; 0. ; ABRT_Zvouss[Ivouss] "  rot=" 0. ; 0. ; -90. " />
+    <posXYZ  volume="BAR_CryoAtt"     X_Y_Z=" 0.; 0.; ABRT_Zvouss[Ivouss]"  rot=" 0. ; 0. ; 0. " />
+  </foreach>
+</composition>
+
+
+<!--  Description of an Atlas Barrel toroid Strut  -->
+
+<gvxysx  name="BAR_StrutWingFull"  material="Iron4"  dZ="ABRT_StrWZthi_StrutWingZthick"  >
+  <gvxy_point  X_Y=" ABRT_StrWYmax_StrutWingYmax ; ABRT_StrWRmax_StrutWingRmax " />
+  <gvxy_point  X_Y=" ABRT_StrWYmed_StrutWingYmedi; ABRT_StrWRmed_StrutWingRmedi " />
+  <gvxy_point  X_Y=" ABRT_StrWYlow_StrutWingYlower; ABRT_StrWRlow_StrutWingRlower " />
+  <gvxy_point  X_Y=" ABRT_StrWYmin_StrutWingYmin ; ABRT_StrWRmin_StrutWingRmin " />
+</gvxysx>
+<box  name="BAR_StrutWingUpCut" material="Aluminium1"  X_Y_Z=" 2*ABRT_StrWYucu_StrutWingYupcut; ABRT_StrWYucu_StrutWingYupcut; ABRT_StrWYucu_StrutWingYupcut" />
+<subtraction  name="BAR_StrutWing" >
+  <posXYZ  volume="BAR_StrutWingFull" />
+  <posXYZ  volume="BAR_CryoTubCut"  X_Y_Z=" 0. ; ABRT_CryoRmax - ABRT_CryoRadi_Radius - 5.*GENV_Eps ; 0. " />
+  <posXYZ  volume="BAR_StrutWingUpCut" X_Y_Z=" 0. ; ABRT_CryoRmax ; 0. "/>
+</subtraction>
+<box  name="BAR_StrutWingBigSidePlate"   material="Iron1"       X_Y_Z=" ABRT_StrWYthi_StrutWingYthick ; ABRT_StrWBPhi_StrutWingBigPlateheight ; ABRT_StrWBPth_StrutWingBigPlatethick " />
+<box  name="BAR_StrutWingTopPlate"       material="Iron1"       X_Y_Z=" 2. * ABRT_StrWYmax_StrutWingYmax; ABRT_StrWZthi_StrutWingZthick ; ABRT_StrWSPth_StrutWingSmallPlatethick " />
+<box  name="BAR_StrutWingBottomPlate"    material="Iron1"       X_Y_Z=" 2. * ABRT_StrWYmin_StrutWingYmin; ABRT_StrWZthi_StrutWingZthick ; ABRT_StrWSPth_StrutWingSmallPlatethick " />
+<box  name="BAR_StrutWingUpperSidePlate" material="Iron1"       X_Y_Z=" (ABRT_StrWYmed_StrutWingYmedi-ABRT_StrWYmax_StrutWingYmax)/(cos(ABRT_StrWAupp_StrutWingAupper ))- ABRT_StrWZthi_StrutWingZthick; ABRT_StrWZthi_StrutWingZthick ; ABRT_StrWSPth_StrutWingSmallPlatethick " />
+<box  name="BAR_StrutWingLowerSidePlate" material="Iron1"       X_Y_Z=" (ABRT_StrWYlow_StrutWingYlower-ABRT_StrWYmin_StrutWingYmin)/(cos(ABRT_StrWAlow_StrutWingAlower )) - ABRT_StrWZthi_StrutWingZthick; ABRT_StrWZthi_StrutWingZthick ; ABRT_StrWSPth_StrutWingSmallPlatethick " />
+<union  name="BAR_StrutWingBox" >
+  <posXYZ  volume="BAR_StrutWing"       X_Y_Z=" 0. ; 0. ; -ABRT_StrWZlen_StrutWingZlen/2. " />
+  <posXYZ  volume="BAR_StrutWing"       X_Y_Z=" 0. ; 0. ; +ABRT_StrWZlen_StrutWingZlen/2. " />
+  <posXYZ  volume="BAR_StrutWingBigSidePlate"  X_Y_Z="   (ABRT_StrWYRli_StrutWingYRlink + ABRT_StrWYthi_StrutWingYthick/2. )*GENV_Co225; ABRT_StrWRmax_StrutWingRmax-ABRT_CryoRadi_Radius-(ABRT_StrWYRli_StrutWingYRlink + ABRT_StrWYthi_StrutWingYthick/2.)*GENV_Si225; 0. "  rot=" 0. ; 0. ; -22.5" />
+  <posXYZ  volume="BAR_StrutWingBigSidePlate"  X_Y_Z=" (- ABRT_StrWYRli_StrutWingYRlink - ABRT_StrWYthi_StrutWingYthick/2. )*GENV_Co225; ABRT_StrWRmax_StrutWingRmax-ABRT_CryoRadi_Radius-(ABRT_StrWYRli_StrutWingYRlink + ABRT_StrWYthi_StrutWingYthick/2.)*GENV_Si225; 0. "  rot=" 0. ; 0. ;  22.5" />
+  <posXYZ  volume="BAR_StrutWingTopPlate"        X_Y_Z=" 0. ; ABRT_StrWRmax_StrutWingRmax+ABRT_StrWZthi_StrutWingZthick/2.+GENV_Eps ; 0. " />
+  <posXYZ  volume="BAR_StrutWingBottomPlate"     X_Y_Z=" 0. ;ABRT_StrWRmin_StrutWingRmin-ABRT_StrWZthi_StrutWingZthick/2. ; 0. " />
+  <posXYZ  volume="BAR_StrutWingUpperSidePlate"  X_Y_Z=" (-ABRT_StrWYmed_StrutWingYmedi - ABRT_StrWYmax_StrutWingYmax - ABRT_StrWZthi_StrutWingZthick*(sin(ABRT_StrWAupp_StrutWingAupper) - cos(ABRT_StrWAupp_StrutWingAupper)))/2.; (ABRT_StrWRmax_StrutWingRmax + ABRT_StrWRmed_StrutWingRmedi + ABRT_StrWZthi_StrutWingZthick*(sin(ABRT_StrWAupp_StrutWingAupper) + cos(ABRT_StrWAupp_StrutWingAupper)))/2.; 0. "  rot=" 0. ; 0. ;  ABRT_StrWAupp_StrutWingAupper/GENV_PiS180" />
+  <posXYZ  volume="BAR_StrutWingUpperSidePlate"  X_Y_Z=" ( ABRT_StrWYmed_StrutWingYmedi + ABRT_StrWYmax_StrutWingYmax + ABRT_StrWZthi_StrutWingZthick*(sin(ABRT_StrWAupp_StrutWingAupper) - cos(ABRT_StrWAupp_StrutWingAupper)))/2.; (ABRT_StrWRmax_StrutWingRmax + ABRT_StrWRmed_StrutWingRmedi + ABRT_StrWZthi_StrutWingZthick*(sin(ABRT_StrWAupp_StrutWingAupper) + cos(ABRT_StrWAupp_StrutWingAupper)))/2.; 0. "  rot=" 0. ; 0. ; -ABRT_StrWAupp_StrutWingAupper/GENV_PiS180" />
+  <posXYZ  volume="BAR_StrutWingLowerSidePlate"  X_Y_Z=" ( ABRT_StrWYlow_StrutWingYlower + ABRT_StrWYmin_StrutWingYmin + ABRT_StrWZthi_StrutWingZthick*(sin(ABRT_StrWAlow_StrutWingAlower) - cos(ABRT_StrWAlow_StrutWingAlower)))/2.; (ABRT_StrWRlow_StrutWingRlower+ABRT_StrWRmin_StrutWingRmin - ABRT_StrWZthi_StrutWingZthick*(sin(ABRT_StrWAlow_StrutWingAlower) + cos(ABRT_StrWAlow_StrutWingAlower)))/2. ; 0. "  rot=" 0. ; 0. ;  ABRT_StrWAlow_StrutWingAlower/GENV_PiS180" />
+  <posXYZ  volume="BAR_StrutWingLowerSidePlate"  X_Y_Z=" (-ABRT_StrWYlow_StrutWingYlower - ABRT_StrWYmin_StrutWingYmin - ABRT_StrWZthi_StrutWingZthick*(sin(ABRT_StrWAlow_StrutWingAlower) - cos(ABRT_StrWAlow_StrutWingAlower)))/2.; (ABRT_StrWRlow_StrutWingRlower+ABRT_StrWRmin_StrutWingRmin - ABRT_StrWZthi_StrutWingZthick*(sin(ABRT_StrWAlow_StrutWingAlower) + cos(ABRT_StrWAlow_StrutWingAlower)))/2. ; 0. "  rot=" 0. ; 0. ; -ABRT_StrWAlow_StrutWingAlower/GENV_PiS180" />
+</union>
+
+<box  name="BAR_StrutFull"      material="Aluminium4"  X_Y_Z=" ABRT_StrtYlen- 2.* ABRT_StrtPthi_StrutPlatethick ; ABRT_StrWBPhi_StrutWingBigPlateheight - 2.*ABRT_StrtPoff_StrutPlateoff ; ABRT_StrtZwid_StrutZwidth - 2.*ABRT_StrtPoff_StrutPlateoff " />
+<box  name="BAR_StrutHole"      material="Aluminium1"  X_Y_Z=" ABRT_StrtYlen- 2.* ABRT_StrtPthi_StrutPlatethick + 10.*GENV_Eps; ABRT_StrWBPhi_StrutWingBigPlateheight - 2.*ABRT_StrtPoff_StrutPlateoff-2.*ABRT_StrtRthi_StrutRthick ; ABRT_StrtZwid_StrutZwidth - 2.*ABRT_StrtPoff_StrutPlateoff " />
+<box  name="BAR_StrutPlate"     material="Aluminium4"  X_Y_Z=" ABRT_StrtPthi_StrutPlatethick; ABRT_StrWBPhi_StrutWingBigPlateheight ; ABRT_StrtZwid_StrutZwidth " />
+<subtraction  name="BAR_StrutBarr" >
+  <posXYZ  volume="BAR_StrutFull" />
+  <posXYZ  volume="BAR_StrutHole"  X_Y_Z=" 0. ; 0. ; -(ABRT_StrtZwid_StrutZwidth - 2.* ABRT_StrtPoff_StrutPlateoff)/2. -ABRT_StrtZthi_StrutZthick/2. " />
+  <posXYZ  volume="BAR_StrutHole"  X_Y_Z=" 0. ; 0. ;  (ABRT_StrtZwid_StrutZwidth - 2.* ABRT_StrtPoff_StrutPlateoff)/2. +ABRT_StrtZthi_StrutZthick/2. " />
+</subtraction>
+<!-- ABRT_StrtXpos_Strut_Xposition is done by calculation => should be taken from blueprint atltbw__0002-vAD BUT ONLY in combination with update of ABRT_CryoRmin and ABRT_CryoRmax -->
+<var   name="ABRT_StrtXpos_Strut_Xposition"            value="ABRT_StrWRmax_StrutWingRmax-ABRT_CryoRadi_Radius-ABRT_StrtYlen/2.*GENV_Si225-(ABRT_StrWBPhi_StrutWingBigPlateheight/2. - ABRT_StrtPoff_StrutPlateoff)" />
+<composition  name="BAR_Strut_Sector" >
+  <posXYZ  volume="BAR_StrutWingBox" X_Y_Z="          0.         ;           0.         ; 0. "  rot=" 0. ; 0. ;  -90. " />
+  <posXYZ  volume="BAR_StrutBarr"    X_Y_Z="  ABRT_StrtXpos_Strut_Xposition; -ABRT_StrtXpos_Strut_Xposition*GENV_Ta225; 0. "  rot=" 0. ; 0. ; -112.5" />
+  <posXYZ  volume="BAR_StrutPlate"   X_Y_Z="  ABRT_StrtXpos_Strut_Xposition-ABRT_StrtYlen/2.*GENV_Si225+ABRT_StrtPthi_StrutPlatethick/2.*GENV_Si225 ; -ABRT_StrtXpos_Strut_Xposition*GENV_Ta225-ABRT_StrtYlen/2.*GENV_Co225+ABRT_StrtPthi_StrutPlatethick/2.*GENV_Co225; 0."  rot=" 0. ; 0. ; -112.5" />
+  <posXYZ  volume="BAR_StrutPlate"   X_Y_Z="  ABRT_StrtXpos_Strut_Xposition+ABRT_StrtYlen/2.*GENV_Si225-ABRT_StrtPthi_StrutPlatethick/2.*GENV_Si225 ; -ABRT_StrtXpos_Strut_Xposition*GENV_Ta225+ABRT_StrtYlen/2.*GENV_Co225-ABRT_StrtPthi_StrutPlatethick/2.*GENV_Co225; 0."  rot=" 0. ; 0. ; -112.5" />
+</composition>
+
+
+
+
+<!--  Description of an Atlas Barrel toroid voussoir and voussoir head  -->
+
+<!-- BEGIN confirmation with atltbwv_0028-vAA (if no other comment) -->
+<var  name="ABRT_VousBlXh_VoussBlockXheight"            value= "850." />
+<var  name="ABRT_VousPliX_VoussPlateInnerXwid"          value= "120." />
+<var  name="ABRT_VousPloX_VoussPlateOuterXwid"          value=  "80." />
+<var  name="ABRT_VousBlYw_VoussBlockYwid"               value="2850." />
+<var  name="ABRT_VouBlYwS_VoussBlockYwidSub"            value= "120." />
+<var  name="ABRT_VouRCYwi_VoussRectCutYwid"             value= "815." />
+<var  name="ABRT_VouRPYwi_VoussReinforcePlatYwid"       value=  "50." />
+<var  name="ABRT_VouBlZle_VoussBlockZlen"               value= "500." />
+<var  name="ABRT_VouBlZlS_VoussBlockZlenSub"            value=  "50." />
+<var  name="ABRT_VouBZWTh_VoussBlockZWallTh"            value=  "50." />
+<var  name="ABRT_VouCutZe_VoussCutZExt"                 value=" 500." />  <!-- no confirmation since arbitrary cut parameter -->
+<var  name="ABRT_VouRCutR_VoussRoundCutRad"             value= "300." />
+<var  name="ABRT_VouReCsl_VoussRectCutXYslant"          value=  "30." />  <!-- no confirmation since approx. for rounded corners -->
+<!-- END confirmation with atltbwv_0028-vAA -->
+
+<!-- BEGIN confirmation with atltbwv_0029-vAB (if no other comment) -->
+<var  name="ABRT_CnbCoYex_ConboxCoreYextension"         value= " 880." />
+<var  name="ABRT_CnbCoXex_ConboxCoreXextension"         value= "2367." />
+<var  name="ABRT_CnbCoXsu_ConboxCoreXsup"               value= " 834." />
+<var  name="ABRT_CnbCoXin_ConboxCoreXinf"               value= " 640.7"/>
+<var  name="ABRT_CnbEaHei_ConboxEarHeight"              value= " 850." />
+<var  name="ABRT_CnbEaCxi_ConboxEarCutXin"              value= " 350." />
+<var  name="ABRT_CnbEaCtl_ConboxEarCutPlateThickLowOut" value= " 120." />
+<var  name="ABRT_CnbEaCtu_ConboxEarCutPlateThickUp"     value= "  80." />
+<var  name="ABRT_CnbEaCzw_ConboxEarCutZwall"            value= "  50." />
+<var  name="ABRT_CnbEaCze_ConboxEarCutZextr"            value= " 135." />
+<var  name="ABRT_CnbEaCPl_ConboxInnerEarCutPlate"       value= "  60." />  <!-- atltbwv_0052-vAA -->
+<var  name="ABRT_CnbCaDma_ConboxCavityDmax"             value= " 528." />  <!-- atltbwv_0059-v0  -->
+<var  name="ABRT_CnbCaDme_ConboxCavityDmedium"          value= " 478." />  <!-- atltbwv_0059-v0  -->
+<var  name="ABRT_CnbCaDmi_ConboxCavityDmin"             value= " 468." />  <!-- atltbwv_0059-v0  -->
+<var  name="ABRT_CnbCaZin_ConboxCavityZinter2"          value= "  50." />  <!-- atltbwv_0059-v0  -->
+<var  name="ABRT_CnbCaZex_ConboxCavityZext"             value= " 790." />  <!-- atltbwv_0059-v0  -->
+<var  name="ABRT_CnboxZex_ConboxZextension"             value= " 550." />
+
+<var  name="ABRT_VousMBRa_VoussoirMainBlockRadius"      value= "5723." />  <!-- atltbw__0002-vAD -->
+<var  name="ABRT_CnbxMBRa_ConboxMainBlockRadius"        value= "6942." />  <!-- atltbw__0002-vAD -->
+<!-- END confirmation with atltbwv_0029-vAB -->
+
+
+<!--  Constants and derived variables  -->
+
+<var  name="ABRT_VouCRCYr_VoussCentrRectCutYreach" value=" ABRT_VousBlYw_VoussBlockYwid/2.-ABRT_VouBlYwS_VoussBlockYwidSub-ABRT_VouRCYwi_VoussRectCutYwid-ABRT_VouRPYwi_VoussReinforcePlatYwid" />
+<var  name="ABRT_VousRCXw_VoussRectCutXwid"        value=" ABRT_VousBlXh_VoussBlockXheight-ABRT_VousPliX_VoussPlateInnerXwid-ABRT_VousPloX_VoussPlateOuterXwid" />
+<var  name="ABRT_VousCXof_VoussCutXoffset"         value="(ABRT_VousPliX_VoussPlateInnerXwid-ABRT_VousPloX_VoussPlateOuterXwid)/2." />
+<var  name="ABRT_VousCYpo_VoussoirCutYpos"         value=" ABRT_VousBlYw_VoussBlockYwid/2.-ABRT_VouBlYwS_VoussBlockYwidSub-ABRT_VouRCYwi_VoussRectCutYwid/2." />
+<var  name="ABRT_VousCZpo_VoussoirCutZpos"         value=" ABRT_VouCutZe_VoussCutZExt/2.+ABRT_VouBZWTh_VoussBlockZWallTh/2." />
+<var  name="ABRT_CnbEaXtp_ConboxEarXtop"           value=" ABRT_CnbCoXex_ConboxCoreXextension/2. " />
+<var  name="ABRT_CnbEaYtp_ConboxEarYtop"           value=" ABRT_CnbCoYex_ConboxCoreYextension -  GENV_Ta225 *(ABRT_CnbCoXex_ConboxCoreXextension-ABRT_CnbCoXsu_ConboxCoreXsup)/2." />
+<var  name="ABRT_CnbEaXbt_ConboxEarXbot"           value=" ABRT_CnbEaXtp_ConboxEarXtop - ABRT_CnbEaHei_ConboxEarHeight*GENV_Si225 " />
+<var  name="ABRT_CnbEaYbt_ConboxEarYbot"           value=" ABRT_CnbEaYtp_ConboxEarYtop - ABRT_CnbEaHei_ConboxEarHeight*GENV_Co225 " />
+<var  name="ABRT_CnbECXol_ConboxEarCutXoutlow"     value=" ABRT_CnbEaXbt_ConboxEarXbot - ABRT_CnbEaCtl_ConboxEarCutPlateThickLowOut*sqrt(2.)*GENV_Si225" />
+<var  name="ABRT_CnbECYol_ConboxEarCutYoutlow"     value=" ABRT_CnbEaYbt_ConboxEarYbot + ABRT_CnbEaCtl_ConboxEarCutPlateThickLowOut*sqrt(2.)*GENV_Co225" />
+<var  name="ABRT_CnbECYil_ConboxEarCutYinlow"      value=" ABRT_CnbECYol_ConboxEarCutYoutlow + (ABRT_CnbECXol_ConboxEarCutXoutlow-ABRT_CnbEaCxi_ConboxEarCutXin)*GENV_Ta225 " />
+<var  name="ABRT_CnbECoHe_ConboxEarCutOutHeight"   value=" ABRT_CnbEaHei_ConboxEarHeight- ABRT_CnbEaCtl_ConboxEarCutPlateThickLowOut-ABRT_CnbEaCtu_ConboxEarCutPlateThickUp" />
+<var  name="ABRT_CnbECXou_ConboxEarCutXoutup"      value=" ABRT_CnbECXol_ConboxEarCutXoutlow + ABRT_CnbECoHe_ConboxEarCutOutHeight*GENV_Si225" />
+<var  name="ABRT_CnbECYou_ConboxEarCutYoutup"      value=" ABRT_CnbECYol_ConboxEarCutYoutlow + ABRT_CnbECoHe_ConboxEarCutOutHeight*GENV_Co225" />
+<var  name="ABRT_CnbECYiu_ConboxEarCutYinup"       value=" ABRT_CnbECYou_ConboxEarCutYoutup + (ABRT_CnbECXou_ConboxEarCutXoutup-ABRT_CnbEaCxi_ConboxEarCutXin)*GENV_Ta225" />
+<var  name="ABRT_CnbECZpo_ConboxEarCutZpos"        value=" ABRT_CnboxZex_ConboxZextension/2. + ABRT_CnbEaCze_ConboxEarCutZextr " />
+<var  name="ABRT_CnbIECZp_ConboxInnerEarCutZpos"   value=" ABRT_CnboxZex_ConboxZextension/2. + ABRT_CnbEaCzw_ConboxEarCutZwall/2. " />
+<var  name="ABRT_CnbCaZin_ConboxCavityZinter"      value="(ABRT_CnbCaDma_ConboxCavityDmax - ABRT_CnbCaDme_ConboxCavityDmedium)/2. / tan(ABRT_CryAttAl_CryoAttAlfa*GENV_PiS180)" />
+<var  name="ABRT_VoussRad_VoussoirRadius"          value=" ABRT_VousMBRa_VoussoirMainBlockRadius + ABRT_VousBlXh_VoussBlockXheight/2." />
+<var  name="ABRT_CnboxRad_ConboxRadius"            value=" ABRT_CnbxMBRa_ConboxMainBlockRadius - ABRT_CnbCoYex_ConboxCoreYextension" />
+
+
+
+<!--  Description of the voussoir head (connexion box)  -->
+
+<gvxysx  name="BAR_ConboxMainBlock"  material="Aluminium4"   dZ="ABRT_CnboxZex_ConboxZextension"  >
+  <gvxy_point  X_Y=" ABRT_CnbCoXin_ConboxCoreXinf/2. ; 0.                 " />
+  <gvxy_point  X_Y=" ABRT_CnbEaXbt_ConboxEarXbot     ; ABRT_CnbEaYbt_ConboxEarYbot  " />
+  <gvxy_point  X_Y=" ABRT_CnbEaXtp_ConboxEarXtop     ; ABRT_CnbEaYtp_ConboxEarYtop  " />
+  <gvxy_point  X_Y=" ABRT_CnbCoXsu_ConboxCoreXsup/2. ; ABRT_CnbCoYex_ConboxCoreYextension " />
+</gvxysx>
+<gvxy  name="BAR_ConboxEarCut"       material="Aluminium1"   dZ="ABRT_CnboxZex_ConboxZextension"  >
+  <gvxy_point  X_Y=" ABRT_CnbEaCxi_ConboxEarCutXin     ; ABRT_CnbECYil_ConboxEarCutYinlow  " />
+  <gvxy_point  X_Y=" ABRT_CnbECXol_ConboxEarCutXoutlow ; ABRT_CnbECYol_ConboxEarCutYoutlow " />
+  <gvxy_point  X_Y=" ABRT_CnbECXou_ConboxEarCutXoutup  ; ABRT_CnbECYou_ConboxEarCutYoutup  " />
+  <gvxy_point  X_Y=" ABRT_CnbEaCxi_ConboxEarCutXin     ; ABRT_CnbECYiu_ConboxEarCutYinup   " />
+</gvxy>
+<gvxy  name="BAR_ConboxInnerEarCut"  material="Aluminium1"   dZ="ABRT_CnboxZex_ConboxZextension"  >
+  <gvxy_point  X_Y=" ABRT_CnbEaCxi_ConboxEarCutXin + ABRT_CnbEaCPl_ConboxInnerEarCutPlate ; ABRT_CnbECYil_ConboxEarCutYinlow -  ABRT_CnbEaCPl_ConboxInnerEarCutPlate * GENV_Ta225 " />
+  <gvxy_point  X_Y=" ABRT_CnbECXol_ConboxEarCutXoutlow ; ABRT_CnbECYol_ConboxEarCutYoutlow " />
+  <gvxy_point  X_Y=" ABRT_CnbECXou_ConboxEarCutXoutup  ; ABRT_CnbECYou_ConboxEarCutYoutup  " />
+  <gvxy_point  X_Y=" ABRT_CnbEaCxi_ConboxEarCutXin + ABRT_CnbEaCPl_ConboxInnerEarCutPlate ; ABRT_CnbECYiu_ConboxEarCutYinup -  ABRT_CnbEaCPl_ConboxInnerEarCutPlate * GENV_Ta225 " />
+</gvxy>
+<pcon   name="BAR_ConboxCavity"      material="Aluminium1"  nbPhi="20" >
+  <polyplane  Rio_Z="0. ; ABRT_CnbCaDma_ConboxCavityDmax/2. ;           0.          " />
+  <polyplane  Rio_Z="0. ; ABRT_CnbCaDme_ConboxCavityDmedium/2. ; ABRT_CnbCaZin_ConboxCavityZinter" />
+  <polyplane  Rio_Z="0. ; ABRT_CnbCaDme_ConboxCavityDmedium/2. ; ABRT_CnbCaZex_ConboxCavityZext - ABRT_CnbCaZin_ConboxCavityZinter2  " />
+  <polyplane  Rio_Z="0. ; ABRT_CnbCaDmi_ConboxCavityDmin/2. ; ABRT_CnbCaZex_ConboxCavityZext - ABRT_CnbCaZin_ConboxCavityZinter2  " />
+  <polyplane  Rio_Z="0. ; ABRT_CnbCaDmi_ConboxCavityDmin/2. ; ABRT_CnbCaZex_ConboxCavityZext  " />
+</pcon>
+<tubs   name="BAR_ConboxShaft"  material="Aluminium4"  Rio_Z=" 0. ; ABRT_BielRHol_BiellRadHole-3.*GENV_Eps         ; 0.95*ABRT_CryAttD1_CryoAttDiam1 "  nbPhi="16" />
+<!--<tubs   name="BAR_ConboxShaftB"  material="Aluminium1"  Rio_Z=" 0. ; ABRT_CryAttD1_CryoAttDiam1/2.-3.*GENV_Eps ; 4.*ABRT_BielRHol_BiellRadHole "         nbPhi="20" />
+<intersection  name="BAR_ConboxShaft" >  
+  <posXYZ  volume="BAR_ConboxShaftA" /> 
+  <posXYZ  volume="BAR_ConboxShaftB"   rot=" 0. ; 90. ; 0. "/>
+</intersection>-->
+
+
+<!--  Description of the voussoir  -->
+
+<gvxysxy  name="BAR_VoussoirMainBlock"       material="Aluminium4"   dZ="ABRT_VousBlXh_VoussBlockXheight"  >
+  <gvxy_point  X_Y=" ABRT_VouBlZle_VoussBlockZlen/2. - ABRT_VouBlZlS_VoussBlockZlenSub ; ABRT_VousBlYw_VoussBlockYwid/2. - ABRT_VouBlYwS_VoussBlockYwidSub -ABRT_VouBlZlS_VoussBlockZlenSub/GENV_Ta15 " />
+  <gvxy_point  X_Y=" ABRT_VouBlZle_VoussBlockZlen/2.                         ; ABRT_VousBlYw_VoussBlockYwid/2. - ABRT_VouBlYwS_VoussBlockYwidSub                             " />
+  <gvxy_point  X_Y=" ABRT_VouBlZle_VoussBlockZlen/2.                         ; ABRT_VousBlYw_VoussBlockYwid/2.                                                     " />
+</gvxysxy>
+<gvxysxy  name="BAR_VoussoirRectCut"         material="Aluminium1"  dZ="ABRT_VouCutZe_VoussCutZExt"  >
+  <gvxy_point  X_Y=" ABRT_VousRCXw_VoussRectCutXwid/2. ; ABRT_VouRCYwi_VoussRectCutYwid/2.-ABRT_VouReCsl_VoussRectCutXYslant" />
+  <gvxy_point  X_Y=" ABRT_VousRCXw_VoussRectCutXwid/2.-ABRT_VouReCsl_VoussRectCutXYslant ; ABRT_VouRCYwi_VoussRectCutYwid/2." />
+</gvxysxy>
+<gvxysxy  name="BAR_VoussoirCentralRectCut"  material="Aluminium1"  dZ="ABRT_VouCutZe_VoussCutZExt"  >
+  <gvxy_point  X_Y=" ABRT_VousRCXw_VoussRectCutXwid/2. ; ABRT_VouCRCYr_VoussCentrRectCutYreach-ABRT_VouReCsl_VoussRectCutXYslant" />
+  <gvxy_point  X_Y=" ABRT_VousRCXw_VoussRectCutXwid/2.-ABRT_VouReCsl_VoussRectCutXYslant ; ABRT_VouCRCYr_VoussCentrRectCutYreach" />
+</gvxysxy>
+<tubs     name="BAR_VoussoirRoundCut"        material="Aluminium1"  Rio_Z=" 0 ; ABRT_VouRCutR_VoussRoundCutRad ; ABRT_VouCutZe_VoussCutZExt"  nbPhi="18" />
+
+<union  name="BAR_VoussoirCut" >
+  <posXYZ  volume="BAR_VoussoirRoundCut"       X_Y_Z="  0. ;  ABRT_VousCYpo_VoussoirCutYpos ;        0.           "     rot="   0. ;  0. ; 0."  />
+  <posXYZ  volume="BAR_VoussoirRoundCut"       X_Y_Z="  0. ; -ABRT_VousCYpo_VoussoirCutYpos ;        0.           "     rot="   0. ;  0. ; 0."  />
+  <posXYZ  volume="BAR_VoussoirRectCut"        X_Y_Z="  0. ;  ABRT_VousCYpo_VoussoirCutYpos ; ABRT_VousCZpo_VoussoirCutZpos "     rot="   0. ;  0. ; 0."  />
+  <posXYZ  volume="BAR_VoussoirRectCut"        X_Y_Z="  0. ; -ABRT_VousCYpo_VoussoirCutYpos ; ABRT_VousCZpo_VoussoirCutZpos "     rot="   0. ;  0. ; 0."  />
+  <posXYZ  volume="BAR_VoussoirRectCut"        X_Y_Z="  0. ;  ABRT_VousCYpo_VoussoirCutYpos ;-ABRT_VousCZpo_VoussoirCutZpos "     rot="   0. ;  0. ; 0."  />
+  <posXYZ  volume="BAR_VoussoirRectCut"        X_Y_Z="  0. ; -ABRT_VousCYpo_VoussoirCutYpos ;-ABRT_VousCZpo_VoussoirCutZpos "     rot="   0. ;  0. ; 0."  />
+  <posXYZ  volume="BAR_VoussoirCentralRectCut" X_Y_Z=" GENV_Eps ;        0.            ; ABRT_VousCZpo_VoussoirCutZpos+GENV_Eps"  rot="   0. ;  0. ; 0."  />
+  <posXYZ  volume="BAR_VoussoirCentralRectCut" X_Y_Z="-GENV_Eps ;        0.            ;-ABRT_VousCZpo_VoussoirCutZpos-GENV_Eps"  rot="   0. ;  0. ; 0."  />
+</union>
+<subtraction  name="BAR_Voussoir" >
+  <posXYZ  volume="BAR_VoussoirMainBlock"   X_Y_Z=" 0. ; 0. ; 0. "  rot="   0. ; 90. ; 0."  />
+  <posXYZ  volume="BAR_VoussoirCut" X_Y_Z=" ABRT_VousCXof_VoussCutXoffset ; 0. ; 0. "  rot="   0. ;  0. ; 0."  />
+</subtraction>
+
+<union  name="BAR_ConboxTheCut" >
+  <posXYZ  volume="BAR_ConboxEarCut"       X_Y_Z="  0. ; 0. ; ABRT_CnbECZpo_ConboxEarCutZpos      "  rot=" 0. ; 0. ; 0." />
+  <posXYZ  volume="BAR_ConboxEarCut"       X_Y_Z="  0. ; 0. ;-ABRT_CnbECZpo_ConboxEarCutZpos      "  rot=" 0. ; 0. ; 0." />
+  <posXYZ  volume="BAR_ConboxEarCut"       X_Y_Z="  0. ; 0. ; ABRT_CnbECZpo_ConboxEarCutZpos      "  rot=" 0. ; 180. ; 0." />
+  <posXYZ  volume="BAR_ConboxEarCut"       X_Y_Z="  0. ; 0. ;-ABRT_CnbECZpo_ConboxEarCutZpos      "  rot=" 0. ; 180. ; 0." />
+  <posXYZ  volume="BAR_ConboxInnerEarCut"  X_Y_Z="  0. ; 0. ; ABRT_CnbIECZp_ConboxInnerEarCutZpos "  rot=" 0. ; 0. ; 0." />
+  <posXYZ  volume="BAR_ConboxInnerEarCut"  X_Y_Z="  0. ; 0. ;-ABRT_CnbIECZp_ConboxInnerEarCutZpos "  rot=" 0. ; 0. ; 0." />
+  <posXYZ  volume="BAR_ConboxInnerEarCut"  X_Y_Z="  0. ; 0. ; ABRT_CnbIECZp_ConboxInnerEarCutZpos "  rot=" 0. ; 180. ; 0." />
+  <posXYZ  volume="BAR_ConboxInnerEarCut"  X_Y_Z="  0. ; 0. ;-ABRT_CnbIECZp_ConboxInnerEarCutZpos "  rot=" 0. ; 180. ; 0." />
+  <posXYZ  volume="BAR_ConboxCavity"       X_Y_Z="  0. ; 0. ; 0. "                         rot=" -90. ; 0. ; 0." />
+</union>
+<subtraction  name="BAR_ConnectingBox" >
+  <posXYZ  volume="BAR_ConboxMainBlock" />
+  <posXYZ  volume="BAR_ConboxTheCut" />
+</subtraction>
+
+<composition  name="BAR_Voussoir_Sector" >
+  <posXYZ  volume="BAR_ConnectingBox"  X_Y_Z=" ABRT_CnboxRad_ConboxRadius         ;            0.              ; 0. "  rot=" 0. ;  0. ; -90. " />
+  <posXYZ  volume="BAR_ConboxShaft"    X_Y_Z=" ABRT_CoMaRmin_ColdMassRmin+ABRT_CoMaRThi_ColdMassRThick+ABRT_BielYhei_BiellYheight-ABRT_BielYcHo_BiellYcenHole ; 0. ; 0. "  rot=" 90. ; 0. ; 0. " />
+  <posXYZ  volume="BAR_Voussoir"       X_Y_Z=" GENV_Co225*ABRT_VoussRad_VoussoirRadius ; -GENV_Si225*ABRT_VoussRad_VoussoirRadius  ; 0. "  rot=" 0. ;  0. ; -22.5" />
+</composition>
+
+
+
+
+
+<composition  name="BAR_Toroid_Sector" >
+  <posXYZ  volume="BAR_CryoTub_Sector" />
+  <posXYZ  volume="BAR_ThermShield_Sector" />
+  <foreach  index="Ivouss"  begin="0"  loops="4" >
+    <posXYZ  volume="BAR_Strut_Sector"     X_Y_Z=" 0. ; 0. ; ABRT_Zvouss[Ivouss] " >
+      <ring  value="-4+Ivouss" />
+    </posXYZ>
+    <posXYZ  volume="BAR_Voussoir_Sector"  X_Y_Z=" 0. ; 0. ; ABRT_Zvouss[Ivouss] " >
+      <ring  value="-4+Ivouss" />
+    </posXYZ>
+  </foreach>
+  <foreach  index="Ivouss"  begin="4"  loops="4" >
+    <posXYZ  volume="BAR_Strut_Sector"     X_Y_Z=" 0. ; 0. ; ABRT_Zvouss[Ivouss] " >
+      <ring  value="Ivouss-3" />
+    </posXYZ>
+    <posXYZ  volume="BAR_Voussoir_Sector"  X_Y_Z=" 0. ; 0. ; ABRT_Zvouss[Ivouss] " >
+      <ring  value="Ivouss-3" />
+    </posXYZ>
+  </foreach>
+  <posXYZ  volume="BAR_ColdMass_Sector" />
+</composition>
+
+<!--
+<composition  name="BAR_Toroid" >
+  <mposPhi  volume="BAR_Toroid_Sector" Phi0="22.5"  ncopy="8" >
+    <sector  value="1"  step="1"  />
+  </mposPhi>
+</composition>
+-->
+<composition  name="BAR_sector02" >
+  <posXYZ  volume="BAR_Toroid_Sector"  rot=" 0. ; 0. ; 22.5"  />
+</composition>
+<composition  name="BAR_sector04" >
+  <posXYZ  volume="BAR_Toroid_Sector"  rot=" 0. ; 0. ; 67.5"  />
+</composition>
+<composition  name="BAR_sector06" >
+  <posXYZ  volume="BAR_Toroid_Sector"  rot=" 0. ; 0. ;112.5"  />
+</composition>
+<composition  name="BAR_sector08" >
+  <posXYZ  volume="BAR_Toroid_Sector"  rot=" 0. ; 0. ;157.5"  />
+</composition>
+<composition  name="BAR_sector10" >
+  <posXYZ  volume="BAR_Toroid_Sector"  rot=" 0. ; 0. ;202.5"  />
+</composition>
+<composition  name="BAR_sector12" >
+  <posXYZ  volume="BAR_Toroid_Sector"  rot=" 0. ; 0. ;247.5"  />
+</composition>
+<composition  name="BAR_sector14" >
+  <posXYZ  volume="BAR_Toroid_Sector"  rot=" 0. ; 0. ;292.5"  />
+</composition>
+<composition  name="BAR_sector16" >
+  <posXYZ  volume="BAR_Toroid_Sector"  rot=" 0. ; 0. ;337.5"  />
+</composition>
+<composition  name="BAR_Toroid" >
+  <posXYZ  volume="BAR_sector02"/>
+  <posXYZ  volume="BAR_sector04"/>
+  <posXYZ  volume="BAR_sector06"/>
+  <posXYZ  volume="BAR_sector08"/>
+  <posXYZ  volume="BAR_sector10"/>
+  <posXYZ  volume="BAR_sector12"/>
+  <posXYZ  volume="BAR_sector14"/>
+  <posXYZ  volume="BAR_sector16"/>
+</composition>
+
+</section>
+
+<section name       = "Solenoid"
+         version    = "1.1"
+         date       = "22 11 1962"
+         author     = "laurent"
+         top_volume = "Solenoid">
+<!--     name       =  Solenoid                      section name       = "Magnets"   -->
+<!--  
+      **************************************************************
+      ***                                                       ****
+      ***                  Solenoid                             ****
+      ***                                                       ****
+      **************************************************************
+-->
+
+<tubs   name="tubs_hole"      material="Aluminium"   Rio_Z="1210;1267;5300" />
+<composition name="Solenoid">
+   <posXYZ volume="tubs_hole"      X_Y_Z=" 0 ; 0 ; 0"  />
+</composition>
+</section>
+
+
+<section name       = "ATLAS Feet"
+         version    = "0.0"
+         date       = "29-05-2019"
+         author     = "Niko Tsutskiridze"
+         top_volume = "Feet">
+
+<!--     name       =  Feet only                     section name       = "Feet"      -->
+<!--  **************************************************************
+      **************************************************************
+      ***                                                       ****
+      ***                     ATLAS Feet                        ****
+      ***                                                       ****
+      **************************************************************
+      **************************************************************  -->
+<!--  Basic parameters extracted from drawing ATLHBFB_0003  -->
+
+<gvxysx name="Standard_Bottom_Plate" material="ShieldSteel" dZ="1198.">
+    <gvxy_point X_Y="-820.5; 15.8"/>
+    <gvxy_point X_Y="-820.5;-75."/>
+    <gvxy_point X_Y="-914.;-75."/>
+    <gvxy_point X_Y="-914.;75."/>
+</gvxysx>
+
+<gvxy name="Standard_MineSide_Plate" material="ShieldSteel" dZ="81.5">
+    <gvxy_point X_Y="-1274.71; -2610."/>
+    <gvxy_point X_Y="-1274.71; -1004.21"/>
+    <gvxy_point X_Y="-1224.78; -883.67"/>
+    <gvxy_point X_Y="-956.89; -994.63"/>
+    <gvxy_point X_Y="-930.12; -930."/>
+    <gvxy_point X_Y="-634.5; -1052.5"/>
+    <gvxy_point X_Y="-406.96; -1052.5"/>
+    <gvxy_point X_Y="27.91; -2.63"/>
+    <gvxy_point X_Y="-615.13; 640.42"/>
+    <gvxy_point X_Y="-40.29; 2028.2"/>
+    <gvxy_point X_Y="-40.29; 2630."/>
+    <gvxy_point X_Y="559.49; 2630"/>
+    <gvxy_point X_Y="559.49; 2610."/>
+    <gvxy_point X_Y="1274.71; 2610."/>
+    <gvxy_point X_Y="1274.71; 1820."/>
+    <gvxy_point X_Y="906.15; 223.58"/>
+    <gvxy_point X_Y="524.76; -697.17"/>
+    <gvxy_point X_Y="524.76; -2610."/>
+</gvxy>
+
+<tubs name="Standard_MineSide_Plate_CutTube" material="ShieldSteel" Rio_Z="0.; 615.; 85." nbPhi="32"/>
+<subtraction name="Standard_MineSide_PlateSub" >
+    <posXYZ volume="Standard_MineSide_Plate" />
+    <posXYZ volume="Standard_MineSide_Plate_CutTube" X_Y_Z="-406.956; -437.5; 0." rot=" 0.; 0.;0."/>
+</subtraction>
+
+<box name="Standard_Midd_Plate" material="ShieldSteel" X_Y_Z="297.; 153.6; 1100."/>
+
+<box name="Standard_Back_Top_Plate" material="ShieldSteel" X_Y_Z="59.3; 790.; 1040."/>
+
+<box name="Standard_Back_Plate" material="ShieldSteel" X_Y_Z="76.56; 1969.5; 896.8"/>
+
+<gvxysx name="Standard_Inner_Back_Plate" material="ShieldSteel" dZ="44.">
+    <gvxy_point X_Y="-375.; -365."/>
+    <gvxy_point X_Y="-375.; 315."/>
+    <gvxy_point X_Y="-325.; 365."/>
+</gvxysx>
+
+<box name="Standard_Inner_Middle_plate" material="ShieldSteel" X_Y_Z="157.32; 680.; 630."/>
+
+<tubs name="Standard_Innert_Tub" material="ShieldSteel" Rio_Z="562.5; 605.5; 800." profile="213.; 134.8" nbPhi="32"/>
+
+<composition  name="Standard_Inner_Parts" >
+    <posXYZ  volume="Standard_Inner_Back_Plate"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 90.; 0." />
+    <posXYZ  volume="Standard_Inner_Middle_plate"    X_Y_Z=" -335.3 ; -30.35 ; 0." rot=" 0.; 0.; -50." />
+    <posXYZ  volume="Standard_Innert_Tub"    X_Y_Z=" -754.18 ; 568.54 ; 0." />
+</composition>
+
+<gvxysx name="Standard_Front_Cover" material="ShieldSteel" dZ="80.6">
+    <gvxy_point X_Y="-550.; -1505."/>
+    <gvxy_point X_Y="-550.; -465."/>
+    <gvxy_point X_Y="-535.; -450."/>
+    <gvxy_point X_Y="-535.; 1505."/>
+</gvxysx>
+
+<box name="Standard_Front_CoverCutBox" material="ShieldSteel" X_Y_Z="270.; 1450.; 20."/>
+
+<subtraction name="Standard_Front_CoverCut" >
+    <posXYZ volume="Standard_Front_Cover" />
+    <posXYZ volume="Standard_Front_CoverCutBox" X_Y_Z="535.; 790.; 40.3" rot=" 0.; 0.; 0."/>
+    <posXYZ volume="Standard_Front_CoverCutBox" X_Y_Z="-535.; 790.; 40.3" rot=" 0.; 0.; 0."/>
+</subtraction>
+
+<composition  name="Standard_Feet" >
+    <posXYZ  volume="Standard_Bottom_Plate"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_MineSide_PlateSub"    X_Y_Z=" 374.97 ; 2685.1 ; 489.25" />
+    <posXYZ  volume="Standard_MineSide_PlateSub"    X_Y_Z=" 374.97 ; 2685.1 ; -489.25" />
+    <posXYZ  volume="Standard_Midd_Plate"    X_Y_Z=" -691.06 ; 1818.81 ; 0." rot=" 0.; 0.; -22.5" />
+    <posXYZ  volume="Standard_Back_Top_Plate"    X_Y_Z=" 1679.34 ; 4900. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Back_Plate"    X_Y_Z=" 782.25 ; 2122.5 ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Inner_Parts"    X_Y_Z=" 721.955 ; 1680. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Front_CoverCut"    X_Y_Z=" -320.4 ; 3211.01 ; 0." rot=" 0.; 90.; -22.5" />
+</composition>
+    <!-- End Standard Feet -->
+
+
+    <!-- Extremity Feet -->
+<gvxysx name="Extremity_Bottom_Plate" material="ShieldSteel" dZ="1660.4">
+    <gvxy_point X_Y="-820.5; 10."/>
+    <gvxy_point X_Y="-820.5; -80."/>
+    <gvxy_point X_Y="-905.25; -80."/>
+    <gvxy_point X_Y="-905.25; 70."/>
+</gvxysx>
+
+<gvxy name="Extremity_MineSide_Plate" material="ShieldSteel" dZ="82.6">
+    <gvxy_point X_Y="-1335.33; -2760.58"/>
+    <gvxy_point X_Y="-1335.33; -1154.7"/>
+    <gvxy_point X_Y="-1285.36; -1034.06"/>
+    <gvxy_point X_Y="-1017.44; -1145.04"/>
+    <gvxy_point X_Y="-990.65; -1080.37"/>
+    <gvxy_point X_Y="-694.43; -1203.06"/>
+    <gvxy_point X_Y="-467.05; -1203.06"/>
+    <gvxy_point X_Y="147.95; -587.13"/>
+    <gvxy_point X_Y="147.7; -423.3"/>
+    <gvxy_point X_Y="91.24; 222.13"/>
+    <gvxy_point X_Y="-574.73; 733.15"/>
+    <gvxy_point X_Y="-140.51; 1781.5"/>
+    <gvxy_point X_Y="-158.99; 1789.16"/>
+    <gvxy_point X_Y="-100.4; 1930.6"/>
+    <gvxy_point X_Y="-100.4; 2599.44"/>
+    <gvxy_point X_Y="521.14; 2599.44"/>
+    <gvxy_point X_Y="521.14; 2506.22"/>
+    <gvxy_point X_Y="924.48; 2359.42"/>
+    <gvxy_point X_Y="1024.48; 2359.42"/>
+    <gvxy_point X_Y="1065.9; 2459.42"/>
+    <gvxy_point X_Y="1534.62; 2459.42"/>
+    <gvxy_point X_Y="1534.62; 1659.41"/>
+    <gvxy_point X_Y="1212.31; 1659.43"/>
+    <gvxy_point X_Y="846.05; 72.99"/>
+    <gvxy_point X_Y="464.66; -847.76"/>
+    <gvxy_point X_Y="464.66; -2760.58"/>
+</gvxy>
+
+<tubs name="Extremity_MineSide_Plate_CutTube" material="ShieldSteel" Rio_Z="0.; 615.; 85." nbPhi="32"/>
+
+<subtraction name="Extremity_MineSide_PlateSub" >
+    <posXYZ volume="Extremity_MineSide_Plate" />
+    <posXYZ volume="Extremity_MineSide_Plate_CutTube" X_Y_Z="-467.04; -588.06; 0." rot=" 0.; 0.;0."/>
+</subtraction>
+
+<box name="Extremity_Midd_Plate" material="ShieldSteel" X_Y_Z="299.; 151.2; 1480."/>
+
+<box name="Extremity_Back_Top_Plate" material="ShieldSteel" X_Y_Z="69.95; 800.; 1624."/>
+
+<box name="Extremity_AlMid_Plate" material="ShieldSteel" X_Y_Z="101.04; 400.; 1275."/>
+
+<gvxy name="Extremity_Back_Plate" material="ShieldSteel" dZ="1274.8">
+    <gvxy_point X_Y="-40.; -1003."/>
+    <gvxy_point X_Y="-40.; 585."/>
+    <gvxy_point X_Y="160.41; 1081.04"/>
+    <gvxy_point X_Y="234.5; 1051.11"/>
+    <gvxy_point X_Y="40.; 569.22"/>
+    <gvxy_point X_Y="40.; -1003."/>
+</gvxy>
+
+<gvxysx name="Extremity_Back_PlateCutArb" material="ShieldSteel" dZ="300.">
+    <gvxy_point X_Y="-225.; -175."/>
+    <gvxy_point X_Y="-225.; -18."/>
+    <gvxy_point X_Y="-415.21; 175."/>
+</gvxysx>
+
+<subtraction name="Extremity_Back_PlateCut" >
+    <posXYZ volume="Extremity_Back_Plate" />
+    <posXYZ volume="Extremity_Back_PlateCutArb" X_Y_Z="136.77; 915.87; 0." rot=" 0.; 90.; -22."/>
+</subtraction>
+
+<box name="Extremity_Front_Cover" material="ShieldSteel" X_Y_Z="80.34; 3015.; 1450."/>
+
+<tubs name="Extremity_Front_Cover_CutTube" material="ShieldSteel" Rio_Z="0.; 225.; 100." nbPhi="32"/>
+
+<box name="Extremity_Front_CoverCutBox" material="ShieldSteel" X_Y_Z="20.; 1210.; 250."/>
+
+<subtraction name="Extremity_Front_CoverCut" >
+    <posXYZ volume="Extremity_Front_Cover" />
+    <posXYZ volume="Extremity_Front_Cover_CutTube" X_Y_Z="0.; 332.5; 0." rot=" 0.; 90.; 0."/>
+    <posXYZ volume="Extremity_Front_CoverCutBox" X_Y_Z="40.17; 912.5; 725." rot=" 0.; 0.; 0."/>
+    <posXYZ volume="Extremity_Front_CoverCutBox" X_Y_Z="40.17; 912.5; -725." rot=" 0.; 0.; 0."/>
+</subtraction>
+
+<composition  name="Extremiy_Feet" >
+    <posXYZ  volume="Extremity_Bottom_Plate"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Extremity_MineSide_PlateSub"    X_Y_Z=" 435.33 ; 2830.59 ; 678.9" />
+    <posXYZ  volume="Extremity_MineSide_PlateSub"    X_Y_Z=" 435.33 ; 2830.59 ; -678.9" />
+    <posXYZ  volume="Extremity_Midd_Plate"    X_Y_Z=" -691.23 ; 1812.79 ; 0." rot=" 0.; 0.; -22.5" />
+    <posXYZ  volume="Extremity_Back_Top_Plate"    X_Y_Z=" 2004.954 ; 4890. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Extremity_AlMid_Plate"    X_Y_Z=" 1243.8 ; 3636.8 ; 0." rot=" 0.; 0.; -22.5" />
+    <posXYZ  volume="Extremity_Back_PlateCut"    X_Y_Z=" 840.5 ; 2070. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Extremity_Front_CoverCut"    X_Y_Z=" -321.16 ; 3203.82 ; 0." rot=" 0.; 0.; -22.5" />
+</composition>
+    <!-- End Extremity Feet -->
+
+
+    <!-- Standard Main Strut -->
+<gvxysx name="Sta_Main_Strut" material="Aluminium" dZ="3440.">
+    <gvxy_point X_Y="-200.; -300."/>
+    <gvxy_point X_Y="-200.; -250."/>
+    <gvxy_point X_Y="-20.; -218.3"/>
+    <gvxy_point X_Y="-20.; 218.3"/>
+    <gvxy_point X_Y="-200.; 250."/>
+    <gvxy_point X_Y="-200.; 300."/>
+</gvxysx>
+
+<tubs name="Standard_Main_StrutCutTube" material="Aluminium" Rio_Z="0.; 210.; 50." nbPhi="32"/>
+
+<subtraction  name="Standard_Main_StrutCut" >
+    <posXYZ  volume="Sta_Main_Strut"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 90.;0." />
+    <posXYZ  volume="Standard_Main_StrutCutTube"    X_Y_Z="897.5 ; 0. ; 0." />
+    <posXYZ  volume="Standard_Main_StrutCutTube"    X_Y_Z="-897.5 ; 0. ; 0." />
+</subtraction>
+
+<box name="Standard_Main_Strut_Plate1" material="Aluminium" X_Y_Z="69.99; 690.; 500."/>
+
+<box name="Standard_Main_Strut_Plate2" material="Aluminium" X_Y_Z="109.99; 790.; 975."/>
+
+<composition  name="Standard_Main_Strut" >
+    <posXYZ  volume="Standard_Main_StrutCut"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Main_Strut_Plate1"    X_Y_Z=" 1755. ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Main_Strut_Plate1"    X_Y_Z=" -1755. ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Main_Strut_Plate2"    X_Y_Z=" 1844.99 ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Main_Strut_Plate2"    X_Y_Z=" -1844.99 ; 0. ; 0." rot=" 0.; 0.;0." />
+</composition>
+    <!--  End Standard Main Strut -->
+
+
+    <!-- Extremity Main Strut -->
+<gvxysx name="Extr_Main_Strut" material="Aluminium" dZ="2780.">
+    <gvxy_point X_Y="-200.; -300."/>
+    <gvxy_point X_Y="-200.; -250."/>
+    <gvxy_point X_Y="-20.; -218.3"/>
+    <gvxy_point X_Y="-20.; 218.3"/>
+    <gvxy_point X_Y="-200.; 250."/>
+    <gvxy_point X_Y="-200.; 300."/>
+</gvxysx>
+
+<tubs name="Extremity_Main_StrutCutTube" material="Aluminium" Rio_Z="0.; 210.; 50." nbPhi="32"/>
+
+<subtraction  name="Extremity_Main_StrutCut" >
+    <posXYZ  volume="Extr_Main_Strut"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 90.;0." />
+    <posXYZ  volume="Extremity_Main_StrutCutTube"    X_Y_Z="897.5 ; 0. ; 0." />
+    <posXYZ  volume="Extremity_Main_StrutCutTube"    X_Y_Z="-897.5 ; 0. ; 0." />
+</subtraction>
+
+<box name="Extremity_Main_Strut_Plate1" material="Aluminium" X_Y_Z="69.99; 690.; 500."/>
+
+<box name="Extremity_Main_Strut_Plate2" material="Aluminium" X_Y_Z="109.99; 740.; 1344."/>
+
+<composition  name="Extremity_Main_Strut" >
+    <posXYZ  volume="Extremity_Main_StrutCut"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Extremity_Main_Strut_Plate1"    X_Y_Z=" 1425 ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Extremity_Main_Strut_Plate1"    X_Y_Z=" -1425 ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Extremity_Main_Strut_Plate2"    X_Y_Z=" 1515. ; 25. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Extremity_Main_Strut_Plate2"    X_Y_Z=" -1515. ; 25. ; 0." rot=" 0.; 0.;0." />
+</composition>
+    <!--  End Extremity Main Strut -->
+
+
+    <!--  Girder 1 -->
+<box name="Standard_Girder1_Plate1" material="ShieldSteel" X_Y_Z="640.; 40.; 1527.3"/>
+
+<gvxysx name="Standard_Girder1_Plate2" material="ShieldSteel" dZ="40.">
+    <gvxy_point X_Y="-670.; -465."/>
+    <gvxy_point X_Y="-670.; -345."/>
+    <gvxy_point X_Y="-763.65; -345."/>
+    <gvxy_point X_Y="-763.65; -20.05"/>
+</gvxysx>
+
+<gvxy name="Standard_Girder1_2_3_Plate3" material="ShieldSteel" dZ="76.35">
+    <gvxy_point X_Y="353.5; -410."/>
+    <gvxy_point X_Y="353.5; -120."/>
+    <gvxy_point X_Y="246.; -120."/>
+    <gvxy_point X_Y="246.; 120."/>
+    <gvxy_point X_Y="600.; 120."/>
+    <gvxy_point X_Y="600.; 410."/>
+    <gvxy_point X_Y="241.; 410."/>
+    <gvxy_point X_Y="241.; 305."/>
+    <gvxy_point X_Y="-389.; 305."/>
+    <gvxy_point X_Y="-389.; 410."/>
+    <gvxy_point X_Y="-600.; 410."/>
+    <gvxy_point X_Y="-600.; 120."/>
+    <gvxy_point X_Y="-389.; 120."/>
+    <gvxy_point X_Y="-389.; -120."/>
+    <gvxy_point X_Y="-496.5; -120."/>
+    <gvxy_point X_Y="-496.5; -320."/>
+    <gvxy_point X_Y="-296.5; -410."/>
+</gvxy>
+
+<box name="Standard_Girder1_2_3_Plate3CutBox" material="ShieldSteel" X_Y_Z="460.; 260.; 40."/>
+
+<subtraction  name="Standard_Girder1_2_3_Plate3Cut_Side1" >
+    <posXYZ  volume="Standard_Girder1_2_3_Plate3"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1_2_3_Plate3CutBox"    X_Y_Z="-71.5 ; 95. ; -23.175" />
+</subtraction>
+
+<subtraction  name="Standard_Girder1_2_3_Plate3Cut_Side2" >
+    <posXYZ  volume="Standard_Girder1_2_3_Plate3"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1_2_3_Plate3CutBox"    X_Y_Z="-71.5 ; 95. ; 23.175" />
+</subtraction>
+
+<box name="Standard_Girder1-2-3_Plate4" material="ShieldSteel" X_Y_Z="460.; 375.; 30."/>
+
+<gvxysx name="Standard_Girder1_Plate5" material="ShieldSteel" dZ="460.">
+    <gvxy_point X_Y="-450.; -435.05"/>
+    <gvxy_point X_Y="-713.35; -320.05"/>
+    <gvxy_point X_Y="-763.65; -320.05"/>
+    <gvxy_point X_Y="-763.65; -280.05"/>
+    <gvxy_point X_Y="-705.; -280.05"/>
+    <gvxy_point X_Y="-441.65; -395.05"/>
+</gvxysx>
+
+<composition  name="Standard_Girder1" >
+    <posXYZ  volume="Standard_Girder1_Plate1"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1_Plate2"    X_Y_Z=" 250.05 ; 0. ; 0." rot=" 0.; 90.;0." />
+    <posXYZ  volume="Standard_Girder1_Plate2"    X_Y_Z=" -250.05 ; 0. ; 0." rot=" 0.; 90.;0." />
+    <posXYZ  volume="Standard_Girder1_2_3_Plate3Cut_Side1"    X_Y_Z=" 71.5 ; -254.2 ; -801.9" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1_2_3_Plate3Cut_Side2"    X_Y_Z=" 71.5 ; -254.2 ; 801.9" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1-2-3_Plate4"    X_Y_Z=" 0. ; -207.51 ; -405." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1-2-3_Plate4"    X_Y_Z=" 0. ; -207.51 ; -70." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1_Plate5"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 90.;0." />
+</composition>
+    <!--  End Girder 1 -->
+
+
+    <!--  Girder 2 -->
+<box name="Standard_Girder2_Plate1" material="ShieldSteel" X_Y_Z="640.; 40.; 1982.3"/>
+
+<gvxysx name="Standard_Girder2_Plate2" material="ShieldSteel" dZ="40.">
+    <gvxy_point X_Y="-897.5; -465."/>
+    <gvxy_point X_Y="-897.5; -345."/>
+    <gvxy_point X_Y="-991.15; -345."/>
+    <gvxy_point X_Y="-991.15; -20.05"/>
+</gvxysx>
+
+<gvxysx name="Standard_Girder2_Plate5" material="ShieldSteel" dZ="460.">
+    <gvxy_point X_Y="-677.5; -435.05"/>
+    <gvxy_point X_Y="-940.85; -320.05"/>
+    <gvxy_point X_Y="-991.15; -320.05"/>
+    <gvxy_point X_Y="-991.15; -280.05"/>
+    <gvxy_point X_Y="-932.5; -280.05"/>
+    <gvxy_point X_Y="-669.15; -395.05"/>
+</gvxysx>
+
+<composition  name="Standard_Girder2" >
+    <posXYZ  volume="Standard_Girder2_Plate1"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder2_Plate2"    X_Y_Z=" 250.05 ; 0. ; 0." rot=" 0.; 90.;0." />
+    <posXYZ  volume="Standard_Girder2_Plate2"    X_Y_Z=" -250.05 ; 0. ; 0." rot=" 0.; 90.;0." />
+    <posXYZ  volume="Standard_Girder1_2_3_Plate3Cut_Side1"    X_Y_Z=" 71.5 ; -254.2 ; -1029.4" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1_2_3_Plate3Cut_Side2"    X_Y_Z=" 71.5 ; -254.2 ; 1029.4" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1-2-3_Plate4"    X_Y_Z=" 0. ; -207.51 ; -277.5" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1-2-3_Plate4"    X_Y_Z=" 0. ; -207.51 ; 27.5" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder2_Plate5"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 90.;0." />
+</composition>
+    <!--  End Girder 2 -->
+
+
+    <!--  Girder 3 -->
+<box name="Standard_Girder3_Plate1" material="ShieldSteel" X_Y_Z="640.; 40.; 2203.3"/>
+
+<gvxysx name="Standard_Girder3_Plate2" material="ShieldSteel" dZ="40.">
+    <gvxy_point X_Y="-1007.5; -465."/>
+    <gvxy_point X_Y="-1007.5; -345."/>
+    <gvxy_point X_Y="-1101.65; -345."/>
+    <gvxy_point X_Y="-1101.65; -20.05"/>
+</gvxysx>
+
+<gvxysx name="Standard_Girder3_Plate5" material="ShieldSteel" dZ="460.">
+    <gvxy_point X_Y="-788.; -435.05"/>
+    <gvxy_point X_Y="-1051.35; -320.05"/>
+    <gvxy_point X_Y="-1101.65; -320.05"/>
+    <gvxy_point X_Y="-1101.65; -280.05"/>
+    <gvxy_point X_Y="-1043.; -280.05"/>
+    <gvxy_point X_Y="-779.65; -395.05"/>
+</gvxysx>
+
+<composition  name="Standard_Girder3" >
+    <posXYZ  volume="Standard_Girder3_Plate1"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder3_Plate2"    X_Y_Z=" 250.05 ; 0. ; 0." rot=" 0.; 90.;0." />
+    <posXYZ  volume="Standard_Girder3_Plate2"    X_Y_Z=" -250.05 ; 0. ; 0." rot=" 0.; 90.;0." />
+    <posXYZ  volume="Standard_Girder1_2_3_Plate3Cut_Side1"    X_Y_Z=" 71.5 ; -254.2 ; -1139.9" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1_2_3_Plate3Cut_Side2"    X_Y_Z=" 71.5 ; -254.2 ; 1139.9" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1-2-3_Plate4"    X_Y_Z=" 0. ; -207.51 ; -168." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1-2-3_Plate4"    X_Y_Z=" 0. ; -207.51 ; 167." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder3_Plate5"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 90.;0." />
+</composition>
+
+<composition  name="Standard_Girder1-2-3" >
+    <posXYZ  volume="Standard_Girder1"    X_Y_Z=" 0. ; 0. ; 8005.02" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1"    X_Y_Z=" 0. ; 0. ; -8005.02" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder2"    X_Y_Z=" 0. ; 0. ; 5027.52" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder2"    X_Y_Z=" 0. ; 0. ; -5027.52" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder3"    X_Y_Z=" 0. ; 0. ; 1712.5" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder3"    X_Y_Z=" 0. ; 0. ; -1712.5" rot=" 0.; 0.;0." />
+</composition>
+
+    <!--  End Girder 3 -->
+
+
+    <!--  Extremity Girder -->
+<box name="Extremity_Girder_Plate1" material="ShieldSteel" X_Y_Z="859.; 1100.; 75."/>
+<box name="Extremity_Girder_Plate1CutBox" material="ShieldSteel" X_Y_Z="459.; 700.; 80."/>
+
+<subtraction name="Extremity_Girder_Plate1Cut" >
+    <posXYZ volume="Extremity_Girder_Plate1" />
+    <posXYZ volume="Extremity_Girder_Plate1CutBox" />
+</subtraction>
+
+<gvxysx name="Extremity_Girder_Plate2" material="ShieldSteel" dZ="75.">
+    <gvxy_point X_Y="-325.; -370."/>
+    <gvxy_point X_Y="-325.; 230."/>
+    <gvxy_point X_Y="-425.; 324."/>
+    <gvxy_point X_Y="-425.; 370."/>
+</gvxysx>
+
+<gvxy name="Extremity_Girder_Plate3" material="ShieldSteel" dZ="40.">
+    <gvxy_point X_Y="-362.; 175.5"/>
+    <gvxy_point X_Y="-362.; 428.5"/>
+    <gvxy_point X_Y="362.; 428.5"/>
+    <gvxy_point X_Y="362.; -428.5"/>
+</gvxy>
+
+<box name="Extremity_Girder_Plate4" material="ShieldSteel" X_Y_Z="389.; 383.; 40."/>
+
+<gvxysx name="Extremity_Girder_Plate5" material="ShieldSteel" dZ="40.">
+    <gvxy_point X_Y="-394.5; -400."/>
+    <gvxy_point X_Y="-253.5; 400."/>
+</gvxysx>
+
+<composition  name="Extremity_Girder" >
+    <posXYZ  volume="Extremity_Girder_Plate1Cut"    X_Y_Z=" 0. ; 0. ; -0.05" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Extremity_Girder_Plate2"    X_Y_Z=" 0. ; 442.5 ; 407.51" rot=" -90.; 0.; 0." />
+    <posXYZ  volume="Extremity_Girder_Plate3"    X_Y_Z=" 251.21 ; -23.55 ; 397.53" rot=" 0.; 80.;0." />
+    <posXYZ  volume="Extremity_Girder_Plate3"    X_Y_Z=" -251.21 ; -23.55 ; 397.53" rot=" 0.; 100.;0." />
+    <posXYZ  volume="Extremity_Girder_Plate4"    X_Y_Z=" 0. ; 213.45 ; 580." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Extremity_Girder_Plate5"    X_Y_Z=" 0. ; -209.5 ; 362.7" rot=" 49.7; 0.;0." />
+</composition>
+    <!--  End Extremity Girder -->
+
+
+    <!--  Rail_Support -->
+<gvxysx name="Standard_Rail_Support" material="ShieldSteel" dZ="525.">
+    <gvxy_point X_Y="-350.; -452.1"/>
+    <gvxy_point X_Y="-350.; -437.1"/>
+    <gvxy_point X_Y="-550.; -437.1"/>
+    <gvxy_point X_Y="-550.; -342.1"/>
+    <gvxy_point X_Y="-540.; -342.1"/>
+    <gvxy_point X_Y="-540.; 318.5"/>
+    <gvxy_point X_Y="-597.5; 318.5"/>
+    <gvxy_point X_Y="-597.5; 452.1"/>
+</gvxysx>
+
+<box name="Standard_Rail_SupportCutBox1" material="ShieldSteel" X_Y_Z="920.; 290.6; 425."/>
+<box name="Standard_Rail_SupportCutBox2" material="ShieldSteel" X_Y_Z="920.; 290.; 425."/>
+
+<subtraction name="Standard_Rail_SupportCut" >
+    <posXYZ volume="Standard_Rail_Support" />
+    <posXYZ volume="Standard_Rail_SupportCutBox1"  X_Y_Z=" 0 ; 173.2 ; 262.5" rot=" 0.; 0.;0." />
+    <posXYZ volume="Standard_Rail_SupportCutBox1"  X_Y_Z=" 0 ; 173.2 ; -262.5" rot=" 0.; 0.;0." />
+    <posXYZ volume="Standard_Rail_SupportCutBox2"  X_Y_Z=" 0 ; -197.1 ; 262.5" rot=" 0.; 0.;0." />
+    <posXYZ volume="Standard_Rail_SupportCutBox2"  X_Y_Z=" 0 ; -197.1 ; -262.5" rot=" 0.; 0.;0." />
+</subtraction>
+    <!--  End Rail_Support -->
+
+
+    <!--  Extremity Rail_Support -->
+<gvxysx name="Extremity_Rail_Support_Plate1" material="ShieldSteel" dZ="1820.">
+    <gvxy_point X_Y="-40.; -678.8"/>
+    <gvxy_point X_Y="-40.; -127.7"/>
+    <gvxy_point X_Y="-262.5; -127.7"/>
+    <gvxy_point X_Y="-262.5; 0."/>
+</gvxysx>
+
+<box name="Extremity_Rail_Support_Plate1Cut" material="ShieldSteel" X_Y_Z="100.; 1102.2; 40."/>
+
+<subtraction name="Extremity_Rail_SupportCut" >
+    <posXYZ volume="Extremity_Rail_Support_Plate1" />
+    <posXYZ volume="Extremity_Rail_Support_Plate1Cut"  X_Y_Z=" 0 ; -678.8 ; -910." rot=" 0.; 0.;0." />
+</subtraction>
+
+<gvxy name="Extremity_Rail_Support_Plate2" material="ShieldSteel" dZ="80.">
+    <gvxy_point X_Y="179.5; -113."/>
+    <gvxy_point X_Y="284.; -262.5"/>
+    <gvxy_point X_Y="490.; -262.5"/>
+    <gvxy_point X_Y="490.; 262.5"/>
+    <gvxy_point X_Y="-715.; 262.5"/>
+    <gvxy_point X_Y="-715.; -262.5"/>
+    <gvxy_point X_Y="-575.; -262.5"/>
+    <gvxy_point X_Y="-470.5; -113."/>
+</gvxy>
+
+<box name="Extremity_Rail_Support_Plate3-4" material="ShieldSteel" X_Y_Z="525.; 551.1; 80."/>
+
+<union name="Extremity_Rail_SupportUni1" >
+    <posXYZ volume="Extremity_Rail_SupportCut" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 0."/>
+    <posXYZ volume="Extremity_Rail_Support_Plate2" X_Y_Z=" 0.; -423.8; 0. " rot=" 90.; -90.; 0."/>
+    <posXYZ volume="Extremity_Rail_Support_Plate3-4" X_Y_Z=" 0.; -403.25; 530." rot=" 0.; 0.; 0."/>
+    <posXYZ volume="Extremity_Rail_Support_Plate3-4" X_Y_Z=" 0.; -403.25; -755." rot=" 0.; 0.; 0."/>
+</union>
+
+<gvxy name="Extremity_Rail_Support_Plate5" material="ShieldSteel" dZ="110.">
+    <gvxy_point X_Y="-645.; -45."/>
+    <gvxy_point X_Y="-645.; -262.5"/>
+    <gvxy_point X_Y="-890.; -262.5"/>
+    <gvxy_point X_Y="-890.; 262.5"/>
+    <gvxy_point X_Y="910.; 262.5"/>
+    <gvxy_point X_Y="910.; -262.5"/>
+    <gvxy_point X_Y="305.; -262.5"/>
+    <gvxy_point X_Y="305.; -45."/>
+</gvxy>
+
+<box name="Extremity_Rail_Support_Plate5CutBox" material="ShieldSteel" X_Y_Z="210.; 550.; 40."/>
+
+<subtraction name="Extremity_Rail_Support_Plate5Cut1" >
+    <posXYZ volume="Extremity_Rail_Support_Plate5" />
+    <posXYZ volume="Extremity_Rail_Support_Plate5CutBox"  X_Y_Z=" 485. ; 0. ; 55." rot=" 0.; 0.;0." />
+    <posXYZ volume="Extremity_Rail_Support_Plate5CutBox"  X_Y_Z=" -815. ; 0. ; 55." rot=" 0.; 0.;0." />
+</subtraction>
+
+
+<composition name="Extremity_Rail_Support1" >
+    <posXYZ volume="Extremity_Rail_SupportUni1" />
+    <posXYZ volume="Extremity_Rail_Support_Plate5Cut1"  X_Y_Z=" 0 ; -733.85 ; 0." rot=" 0.; -90.; 90." />
+</composition>
+
+<subtraction name="Extremity_Rail_Support_Plate5Cut2" >
+    <posXYZ volume="Extremity_Rail_Support_Plate5" />
+    <posXYZ volume="Extremity_Rail_Support_Plate5CutBox"  X_Y_Z=" 485. ; 0. ; -55." rot=" 0.; 0.;0." />
+    <posXYZ volume="Extremity_Rail_Support_Plate5CutBox"  X_Y_Z=" -815. ; 0. ; -55." rot=" 0.; 0.;0." />
+</subtraction>
+
+<union name="Extremity_Rail_SupportUni2" >
+    <posXYZ volume="Extremity_Rail_SupportCut" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 0."/>
+    <posXYZ volume="Extremity_Rail_Support_Plate2" X_Y_Z=" 0.; -423.8; 0." rot=" -90.; -90.; 0."/>
+    <posXYZ volume="Extremity_Rail_Support_Plate3-4" X_Y_Z=" 0.; -403.25; 530." rot=" 0.; 0.; 0."/>
+    <posXYZ volume="Extremity_Rail_Support_Plate3-4" X_Y_Z=" 0.; -403.25; -755." rot=" 0.; 0.; 0."/>
+</union>
+
+<composition name="Extremity_Rail_Support2" >
+    <posXYZ volume="Extremity_Rail_SupportUni2" />
+    <posXYZ volume="Extremity_Rail_Support_Plate5Cut2"  X_Y_Z=" 0 ; -733.85 ; 0." rot=" 0.; -90.; -90." />
+</composition>
+    <!--  End Extremity Rail_Support -->
+
+
+    <!-- assembly of Standard feet, Standard rail support and Standard strut -->
+<composition  name="Standard_Feet_Comp" >
+    <posXYZ  volume="Standard_Feet"    X_Y_Z=" -3609.69 ; -4899.96 ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Feet"    X_Y_Z=" 3609.69 ; -4899.96 ; 0." rot=" 0.; 180.;0." />
+    <posXYZ  volume="Standard_Rail_SupportCut"    X_Y_Z=" -2982.592 ; 852.63 ; 0." rot=" 0.; 90.;0." />
+    <posXYZ  volume="Standard_Rail_SupportCut"    X_Y_Z=" 2982.592 ; 852.63 ; 0." rot=" 0.; 90.;0." />
+    <posXYZ  volume="Standard_Main_Strut"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+</composition>
+
+<composition  name="Extremity_Feet_Comp" >
+    <posXYZ  volume="Extremiy_Feet"    X_Y_Z=" -3609.95 ; -4895. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Extremiy_Feet"    X_Y_Z=" 3609.95 ; -4895. ; 0." rot=" 0.; 180.;0." />
+    <posXYZ  volume="Extremity_Rail_Support1"    X_Y_Z=" -2982.641; 1304.32 ; 165.02" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Extremity_Rail_Support2"    X_Y_Z=" 2982.641; 1304.32 ; 165.02" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Extremity_Main_Strut"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Extremity_Girder"    X_Y_Z=" 2735.53 ; -969.96 ; -758.8" rot=" 0.; 180.; 0." />
+    <posXYZ  volume="Extremity_Girder"    X_Y_Z=" -2735.53 ; -969.96 ; -757.8" rot=" 0.; 180.; 0." />
+</composition>
+    <!-- End assembly of Standard feet, Standard rail support and Standard strut -->
+
+
+<composition  name="Feet" >
+    <posXYZ  volume="Standard_Feet_Comp"    X_Y_Z=" 0. ; -6135.059 ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Feet_Comp"    X_Y_Z=" 0. ; -6135.059 ; 3425.034" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Feet_Comp"    X_Y_Z=" 0. ; -6135.059 ; 6630.036" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Feet_Comp"    X_Y_Z=" 0. ; -6135.059 ; 9380.034" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Feet_Comp"    X_Y_Z=" 0. ; -6135.059 ; -3425.034" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Feet_Comp"    X_Y_Z=" 0. ; -6135.059 ; -6630.036" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Feet_Comp"    X_Y_Z=" 0. ; -6135.059 ; -9380.034" rot=" 0.; 0.;0." />
+
+    <posXYZ  volume="Extremity_Feet_Comp"    X_Y_Z=" 0. ; -6135.059 ; 12080.034" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Extremity_Feet_Comp"    X_Y_Z=" 0. ; -6135.059 ; -12080.034" rot=" 0.; 180.;0." />
+
+    <posXYZ  volume="Standard_Girder1-2-3"    X_Y_Z=" -2735.5 ; -6613.91 ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1-2-3"    X_Y_Z=" 2735.5 ; -6613.91 ; 0." rot=" 0.; 180.;0." />
+</composition>
+
+</section>
+
+
+<section name       = "ATLAS Rail"
+         version    = "7.0"
+         date       = "10 December 2003"
+         author     = "Jochen Meyer, Laurent Chevalier, Daniel Pomarede"
+         top_volume = "RailAssembly">
+
+
+
+<!--  Basic parameters  -->
+
+<!--  Rails Main section  -->
+<!-- BEGIN confirmation with atlhbrb_0001-vAH (if no other comment) -->
+<var  name="RAIL_CeRzleng_CentralRail_Zlength"     value="6850." />
+<var  name="RAIL_ExRzleng_ExtremityRail_Zlength"   value="9784." />
+<var  name="RAIL_CeRwidt1_CentralRail_Width1"      value=" 450." />
+<var  name="RAIL_CeRwidt2_CentralRail_Width2"      value=" 120." />
+<var  name="RAIL_CeRwid3o_CentralRail_Width3outer" value=" 380." />
+<var  name="RAIL_CeRwid3i_CentralRail_Width3inner" value=" 350." />
+
+<var  name="RAIL_CeRthic1_CentralRail_Thick1"      value=" 100." />
+<var  name="RAIL_CeRthic2_CentralRail_Thick2"      value=" 200." />
+
+<!--  Reinforcement Plates  -->
+
+<var  name="RAIL_CeRRPSzl_CentralRailReinforcementPlate_std_Zlength"       value=" 50." />
+<var  name="RAIL_CeRRPEzl_CentralRailReinforcementPlate_extremity_Zlength" value=" 40." />
+<var  name="RAIL_CeRRPIx1_CentralRailReinforcementPlateInner_Xdist1"       value="260." />
+<var  name="RAIL_CeRRPOx1_CentralRailReinforcementPlateOuter_Xdist1"       value="290." />
+
+<!-- CentralRailReinforcementPlate_std_Zpos -->
+<array  name="RAIL_CeRRPSzp" values="490.;1090.;1687.5;2285.;2885.;3400.;3915.;4515.;5112.5;5710.;6310. " />
+<!-- ExtremityRailReinforcementPlate_std_Zpos -->
+<array  name="RAIL_ExRRPSzp" values="540;1085;1627.5;2170;2715;3230;3745;4315;4895;5465;5980;6495;7017.5;7540;8062.5;8720;9375" />
+
+<!--  Global position  -->
+<var  name="RAIL_Xpos"       value=" 2985." />  <!-- confirmed atcnh___0005-vAG -->
+<var  name="RAIL_Ypos_above" value="-4390." />  <!-- confirmed atcnh___0005-vAG -->
+
+<!--  Derived variables  -->
+
+<var  name="RAIL_totHeight"  value="RAIL_CeRthic2_CentralRail_Thick2+2.*RAIL_CeRthic1_CentralRail_Thick1" />
+
+
+
+<!--  Feet Modelization  -->
+
+<!--  Rail Main section  -->
+
+<var  name="RAIL_CeRy"        value="0." />
+
+<var  name="RAIL_CeRxb"       value="RAIL_CeRwidt1_CentralRail_Width1/2." />
+<var  name="RAIL_CeRyb"       value="0." />
+
+<var  name="RAIL_CeRxc"       value="RAIL_CeRxb" />
+<var  name="RAIL_CeRyc"       value="RAIL_CeRthic1_CentralRail_Thick1" />
+
+<var  name="RAIL_CeRxd"       value="RAIL_CeRwidt2_CentralRail_Width2/2." />
+<var  name="RAIL_CeRyd"       value="RAIL_CeRyc" />
+
+<var  name="RAIL_CeRxe"       value="RAIL_CeRxd" />
+<var  name="RAIL_CeRye"       value="RAIL_CeRyd+RAIL_CeRthic2_CentralRail_Thick2" />
+
+<var  name="RAIL_CeRxf"       value="RAIL_CeRwid3i_CentralRail_Width3inner" />
+<var  name="RAIL_CeRyf"       value="RAIL_CeRye" />
+
+<var  name="RAIL_CeRxg"       value="RAIL_CeRxf" />
+<var  name="RAIL_CeRyg"       value="RAIL_CeRyf+RAIL_CeRthic1_CentralRail_Thick1" />
+
+<var  name="RAIL_CeRxh"       value="-RAIL_CeRwid3o_CentralRail_Width3outer" />
+<var  name="RAIL_CeRyh"       value="RAIL_CeRyg" />
+
+<var  name="RAIL_CeRxi"       value="RAIL_CeRxh" />
+<var  name="RAIL_CeRyi"       value="RAIL_CeRye" />
+
+<var  name="RAIL_CeRxj"       value="-RAIL_CeRwidt2_CentralRail_Width2/2." />
+<var  name="RAIL_CeRyj"       value="RAIL_CeRyi" />
+
+<var  name="RAIL_CeRxk"       value="RAIL_CeRxj" />
+<var  name="RAIL_CeRyk"       value="RAIL_CeRyc" />
+
+<var  name="RAIL_CeRxl"       value="-RAIL_CeRwidt1_CentralRail_Width1/2." />
+<var  name="RAIL_CeRyl"       value="RAIL_CeRyk" />
+
+<var  name="RAIL_CeRxm"       value="RAIL_CeRxl" />
+<var  name="RAIL_CeRym"       value="RAIL_CeRy " />
+
+<!-- gvxy     name="CentralRail"            material="Iron"   dZ="RAIL_CeRzleng_CentralRail_Zlength"  >
+  <gvxy_point X_Y="-RAIL_CeRxb;RAIL_CeRyb"/>
+  <gvxy_point X_Y="-RAIL_CeRxc;RAIL_CeRyc"/>
+  <gvxy_point X_Y="-RAIL_CeRxd;RAIL_CeRyd"/>
+  <gvxy_point X_Y="-RAIL_CeRxe;RAIL_CeRye"/>
+  <gvxy_point X_Y="-RAIL_CeRxf;RAIL_CeRyf"/>
+  <gvxy_point X_Y="-RAIL_CeRxg;RAIL_CeRyg"/>
+  <gvxy_point X_Y="-RAIL_CeRxh;RAIL_CeRyh"/>
+  <gvxy_point X_Y="-RAIL_CeRxi;RAIL_CeRyi"/>
+  <gvxy_point X_Y="-RAIL_CeRxj;RAIL_CeRyj"/>
+  <gvxy_point X_Y="-RAIL_CeRxk;RAIL_CeRyk"/>
+  <gvxy_point X_Y="-RAIL_CeRxl;RAIL_CeRyl"/>
+  <gvxy_point X_Y="-RAIL_CeRxm;RAIL_CeRym"/>
+</gvxy -->
+
+<var name="Rail_temp1" value="RAIL_CeRyg/2.-(RAIL_CeRyg-RAIL_CeRyf)/2." />
+<var name="Rail_temp2" value="-RAIL_CeRyg/2.+(RAIL_CeRyc-RAIL_CeRyb)/2." />
+<var name="Rail_temp3" value="(RAIL_CeRxg+RAIL_CeRxh)/2." />
+
+<box name="ExtremityRail_a" material="Iron" X_Y_Z="RAIL_CeRxd*2.;RAIL_CeRyg;RAIL_ExRzleng_ExtremityRail_Zlength - GENV_Eps" />
+<box name="ExtremityRail_b" material="Iron" X_Y_Z="(RAIL_CeRxg-RAIL_CeRxh);(RAIL_CeRyg-RAIL_CeRyf);RAIL_ExRzleng_ExtremityRail_Zlength" />
+<box name="ExtremityRail_c" material="Iron" X_Y_Z="-2.*RAIL_CeRxl;(RAIL_CeRyc-RAIL_CeRyb);RAIL_ExRzleng_ExtremityRail_Zlength" />
+<union name="ExtremityRail_d" >
+  <posXYZ  volume="ExtremityRail_a" />
+  <posXYZ  volume="ExtremityRail_b" X_Y_Z="-Rail_temp3;Rail_temp1;0"/>
+  <posXYZ  volume="ExtremityRail_c" X_Y_Z="0.;Rail_temp2;0"/>
+</union>
+
+<composition name="ExtremityRail_plus_new" >
+  <posXYZ  volume="ExtremityRail_d" X_Y_Z="0.;RAIL_CeRyg/2.;0." />
+</composition>
+
+<box name="CentralRail_a" material="Iron" X_Y_Z="RAIL_CeRxd*2.;RAIL_CeRyg;RAIL_CeRzleng_CentralRail_Zlength - GENV_Eps" />
+<box name="CentralRail_b" material="Iron" X_Y_Z="(RAIL_CeRxg-RAIL_CeRxh);(RAIL_CeRyg-RAIL_CeRyf);RAIL_CeRzleng_CentralRail_Zlength" />
+<box name="CentralRail_c" material="Iron" X_Y_Z="-2.*RAIL_CeRxl;(RAIL_CeRyc-RAIL_CeRyb);RAIL_CeRzleng_CentralRail_Zlength" />
+<union name="CentralRail_d" >
+  <posXYZ  volume="CentralRail_a" />
+  <posXYZ  volume="CentralRail_b" X_Y_Z="-Rail_temp3;Rail_temp1;0"/>
+  <posXYZ  volume="CentralRail_c" X_Y_Z="0.;Rail_temp2;0"/>
+</union>
+
+<composition name="CentralRail_new" >
+  <posXYZ  volume="CentralRail_d" X_Y_Z="0.;RAIL_CeRyg/2.;0." />
+</composition>
+
+<!--gvxy     name="ExtremityRail_plus"            material="Iron"   dZ="RAIL_ExRzleng_ExtremityRail_Zlength"  >
+  <gvxy_point  X_Y=" -RAIL_CeRxb  ;  RAIL_CeRyb "   />
+  <gvxy_point  X_Y=" -RAIL_CeRxc  ;  RAIL_CeRyc "   />
+  <gvxy_point  X_Y=" -RAIL_CeRxd  ;  RAIL_CeRyd "   />
+  <gvxy_point  X_Y=" -RAIL_CeRxe  ;  RAIL_CeRye "   />
+  <gvxy_point  X_Y=" -RAIL_CeRxf  ;  RAIL_CeRyf "   />
+  <gvxy_point  X_Y=" -RAIL_CeRxg  ;  RAIL_CeRyg "   />
+  <gvxy_point  X_Y=" -RAIL_CeRxh  ;  RAIL_CeRyh "   />
+  <gvxy_point  X_Y=" -RAIL_CeRxi  ;  RAIL_CeRyi "   />
+  <gvxy_point  X_Y=" -RAIL_CeRxj  ;  RAIL_CeRyj "   />
+  <gvxy_point  X_Y=" -RAIL_CeRxk  ;  RAIL_CeRyk "   />
+  <gvxy_point  X_Y=" -RAIL_CeRxl  ;  RAIL_CeRyl "   />
+  <gvxy_point  X_Y=" -RAIL_CeRxm  ;  RAIL_CeRym "   />
+</gvxy -->
+
+<composition  name="ExtremityRail_minus" >
+  <posXYZ  volume="ExtremityRail_plus_new"  rot=" 0.; 180.; 0. " />
+</composition>
+
+
+
+<!--  Reinforcement Plates  -->
+
+<var  name="RAIL_CeRRPIy2_CentralRailReinforcementPlateInner_Ydist2"   value="(RAIL_CeRRPIx1_CentralRailReinforcementPlateInner_Xdist1 + RAIL_CeRwidt2_CentralRail_Width2/2. - RAIL_CeRxc) * GENV_Ta55" />
+
+<var  name="RAIL_CeRRPIxa"       value="RAIL_CeRxd" />
+<var  name="RAIL_CeRRPIya"       value="RAIL_CeRyd" />
+<var  name="RAIL_CeRRPIxb"       value="RAIL_CeRxc" />
+<var  name="RAIL_CeRRPIyb"       value="RAIL_CeRyc" />
+<var  name="RAIL_CeRRPIxc"       value="RAIL_CeRxd + RAIL_CeRRPIx1_CentralRailReinforcementPlateInner_Xdist1" />
+<var  name="RAIL_CeRRPIyc"       value="RAIL_CeRyc + RAIL_CeRRPIy2_CentralRailReinforcementPlateInner_Ydist2" />
+<var  name="RAIL_CeRRPIxd"       value="RAIL_CeRRPIxc" />
+<var  name="RAIL_CeRRPIyd"       value="RAIL_CeRye" />
+<var  name="RAIL_CeRRPIxe"       value="RAIL_CeRRPIxa" />
+<var  name="RAIL_CeRRPIye"       value="RAIL_CeRRPIyd" />
+
+<gvxy     name="CentralRailReinforcementPlateInner_extremity"  material="Iron"   dZ="RAIL_CeRRPEzl_CentralRailReinforcementPlate_extremity_Zlength"  >
+  <gvxy_point  X_Y=" -RAIL_CeRRPIxa  ;  RAIL_CeRRPIya "   />
+  <gvxy_point  X_Y=" -RAIL_CeRRPIxb  ;  RAIL_CeRRPIyb "   />
+  <gvxy_point  X_Y=" -RAIL_CeRRPIxc  ;  RAIL_CeRRPIyc "   />
+  <gvxy_point  X_Y=" -RAIL_CeRRPIxd  ;  RAIL_CeRRPIyd "   />
+  <gvxy_point  X_Y=" -RAIL_CeRRPIxe  ;  RAIL_CeRRPIye "   />
+</gvxy>
+
+
+<var  name="RAIL_CeRRPOxa"       value="-RAIL_CeRxd" />
+<var  name="RAIL_CeRRPOya"       value=" RAIL_CeRyd" />
+<var  name="RAIL_CeRRPOxb"       value="-RAIL_CeRxc" />
+<var  name="RAIL_CeRRPOyb"       value=" RAIL_CeRyc" />
+<var  name="RAIL_CeRRPOxc"       value="-RAIL_CeRxd - RAIL_CeRRPOx1_CentralRailReinforcementPlateOuter_Xdist1" />
+<var  name="RAIL_CeRRPOyc"       value=" RAIL_CeRyc + RAIL_CeRRPIy2_CentralRailReinforcementPlateInner_Ydist2" />
+<var  name="RAIL_CeRRPOxd"       value=" RAIL_CeRRPOxc" />
+<var  name="RAIL_CeRRPOyd"       value=" RAIL_CeRye" />
+<var  name="RAIL_CeRRPOxe"       value=" RAIL_CeRRPOxa" />
+<var  name="RAIL_CeRRPOye"       value=" RAIL_CeRRPOyd" />
+
+<gvxy     name="CentralRailReinforcementPlateOuter_extremity"         material="Iron"   dZ="RAIL_CeRRPEzl_CentralRailReinforcementPlate_extremity_Zlength"  >
+  <gvxy_point  X_Y="  RAIL_CeRRPOxa  ;  RAIL_CeRRPOya "   />
+  <gvxy_point  X_Y="  RAIL_CeRRPOxb  ;  RAIL_CeRRPOyb "   />
+  <gvxy_point  X_Y="  RAIL_CeRRPOxc  ;  RAIL_CeRRPOyc "   />
+  <gvxy_point  X_Y="  RAIL_CeRRPOxd  ;  RAIL_CeRRPOyd "   />
+  <gvxy_point  X_Y="  RAIL_CeRRPOxe  ;  RAIL_CeRRPOye "   />
+</gvxy>
+
+<var  name="RAIL_CeRRPe1z_CentralRailReinforcementPlate_extremity1_Zpos"      value="-RAIL_CeRzleng_CentralRail_Zlength/2. + RAIL_CeRRPEzl_CentralRailReinforcementPlate_extremity_Zlength/2. " />
+<var  name="RAIL_CeRRPe2z_CentralRailReinforcementPlate_extremity2_Zpos"      value="-RAIL_CeRRPe1z_CentralRailReinforcementPlate_extremity1_Zpos" />
+<var  name="RAIL_ExRRPe1z_ExtremityRailReinforcementPlate_extremity1_Zpos"    value="-RAIL_ExRzleng_ExtremityRail_Zlength/2. + RAIL_CeRRPEzl_CentralRailReinforcementPlate_extremity_Zlength/2. " />
+<var  name="RAIL_ExRRPe2z_ExtremityRailReinforcementPlate_extremity2_Zpos"    value="-RAIL_ExRRPe1z_ExtremityRailReinforcementPlate_extremity1_Zpos" />
+
+<gvxy     name="CentralRailReinforcementPlateInner_std"         material="Iron"   dZ="RAIL_CeRRPSzl_CentralRailReinforcementPlate_std_Zlength"  >
+  <gvxy_point  X_Y=" -RAIL_CeRRPIxa  ;  RAIL_CeRRPIya "   />
+  <gvxy_point  X_Y=" -RAIL_CeRRPIxb  ;  RAIL_CeRRPIyb "   />
+  <gvxy_point  X_Y=" -RAIL_CeRRPIxc  ;  RAIL_CeRRPIyc "   />
+  <gvxy_point  X_Y=" -RAIL_CeRRPIxd  ;  RAIL_CeRRPIyd "   />
+  <gvxy_point  X_Y=" -RAIL_CeRRPIxe  ;  RAIL_CeRRPIye "   />
+</gvxy>
+<gvxy     name="CentralRailReinforcementPlateOuter_std"         material="Iron"   dZ="RAIL_CeRRPSzl_CentralRailReinforcementPlate_std_Zlength"  >
+  <gvxy_point  X_Y="  RAIL_CeRRPOxa  ;  RAIL_CeRRPOya "   />
+  <gvxy_point  X_Y="  RAIL_CeRRPOxb  ;  RAIL_CeRRPOyb "   />
+  <gvxy_point  X_Y="  RAIL_CeRRPOxc  ;  RAIL_CeRRPOyc "   />
+  <gvxy_point  X_Y="  RAIL_CeRRPOxd  ;  RAIL_CeRRPOyd "   />
+  <gvxy_point  X_Y="  RAIL_CeRRPOxe  ;  RAIL_CeRRPOye "   />
+</gvxy>
+
+
+
+<composition  name="CentralRailReinforcementPlate_extremity_minus" >
+  <posXYZ  volume="CentralRailReinforcementPlateInner_extremity"   rot="0.;180.;0." />
+  <posXYZ  volume="CentralRailReinforcementPlateOuter_extremity"   />
+</composition>
+<composition  name="CentralRailReinforcementPlate_extremity_plus" >
+  <posXYZ  volume="CentralRailReinforcementPlateInner_extremity"   />
+  <posXYZ  volume="CentralRailReinforcementPlateOuter_extremity"   rot="0.;180.;0." />
+</composition>
+
+<composition  name="CentralRailReinforcementPlate_std_minus" >
+  <posXYZ  volume="CentralRailReinforcementPlateInner_std"         rot="0.;180.;0." />
+  <posXYZ  volume="CentralRailReinforcementPlateOuter_std"         />
+</composition>
+<composition  name="CentralRailReinforcementPlate_std_plus" >
+  <posXYZ  volume="CentralRailReinforcementPlateInner_std"         />
+  <posXYZ  volume="CentralRailReinforcementPlateOuter_std"         rot="0.;180.;0." />
+</composition>
+
+
+
+<!--  Feet Assembly  -->
+
+<composition  name="CentralRailAssembly" >
+  <!-- posXYZ  volume="CentralRail" rot="0.;180.;0." /-->
+  <posXYZ  volume="CentralRail_new" rot="0.;180.;0." />
+  <posXYZ  volume="CentralRailReinforcementPlate_extremity_minus"    X_Y_Z=" 0.;0.; RAIL_CeRRPe1z_CentralRailReinforcementPlate_extremity1_Zpos"  />
+  <posXYZ  volume="CentralRailReinforcementPlate_extremity_minus"    X_Y_Z=" 0.;0.; RAIL_CeRRPe2z_CentralRailReinforcementPlate_extremity2_Zpos"  />
+  <foreach  index="I"  begin="0"  loops="11" >
+    <posXYZ  volume="CentralRailReinforcementPlate_std_minus"        X_Y_Z=" 0.;0.;-RAIL_CeRzleng_CentralRail_Zlength/2. + RAIL_CeRRPSzl_CentralRailReinforcementPlate_std_Zlength/2. + RAIL_CeRRPSzp[I]"  />
+  </foreach>
+</composition>
+
+
+<var  name="RAIL_Ypos"        value="RAIL_Ypos_above - RAIL_totHeight" /> <!-- ATTENTION THIS VARIABLE IS ALSO USED IN SHIELDING AND HFTRUCK SECTIONS -->
+<var  name="RAIL_ExtrZpos"    value="RAIL_CeRzleng_CentralRail_Zlength/2.+RAIL_ExRzleng_ExtremityRail_Zlength/2." />
+
+
+<composition  name="ExtremityRailAssembly" >
+  <posXYZ  volume="ExtremityRail_minus"                            X_Y_Z=" -RAIL_Xpos;0.; 0."  />
+  <posXYZ  volume="CentralRailReinforcementPlate_extremity_minus"  X_Y_Z="-RAIL_Xpos;0.; RAIL_ExRRPe1z_ExtremityRailReinforcementPlate_extremity1_Zpos"  />
+  <posXYZ  volume="CentralRailReinforcementPlate_extremity_minus"  X_Y_Z="-RAIL_Xpos;0.; RAIL_ExRRPe2z_ExtremityRailReinforcementPlate_extremity2_Zpos"  />
+  
+  <foreach  index="I"  begin="0"  loops="17" >
+    <posXYZ  volume="CentralRailReinforcementPlate_std_minus"      X_Y_Z=" -RAIL_Xpos;0.;-RAIL_ExRzleng_ExtremityRail_Zlength/2. - RAIL_CeRRPSzl_CentralRailReinforcementPlate_std_Zlength/2. + RAIL_ExRRPSzp[I]"  />
+  </foreach>
+
+  <!--posXYZ  volume="ExtremityRail_plus"                             X_Y_Z=" RAIL_Xpos;0.; 0."  /-->
+  <posXYZ  volume="ExtremityRail_plus_new"                             X_Y_Z=" RAIL_Xpos;0.; 0."  />
+  <posXYZ  volume="CentralRailReinforcementPlate_extremity_plus"   X_Y_Z=" RAIL_Xpos;0.; RAIL_ExRRPe1z_ExtremityRailReinforcementPlate_extremity1_Zpos"  />
+  <posXYZ  volume="CentralRailReinforcementPlate_extremity_plus"   X_Y_Z=" RAIL_Xpos;0.; RAIL_ExRRPe2z_ExtremityRailReinforcementPlate_extremity2_Zpos"  />
+  
+  <foreach  index="I"  begin="0"  loops="17" >
+    <posXYZ  volume="CentralRailReinforcementPlate_std_plus"       X_Y_Z=" RAIL_Xpos;0.;-RAIL_ExRzleng_ExtremityRail_Zlength/2. - RAIL_CeRRPSzl_CentralRailReinforcementPlate_std_Zlength/2. + RAIL_ExRRPSzp[I]"  />
+  </foreach>
+</composition>
+
+<composition  name="RailAssembly" >
+  <posXYZ  volume="CentralRailAssembly"    X_Y_Z="-RAIL_Xpos;RAIL_Ypos; 0."      rot="0.;  0.;0." />
+  <posXYZ  volume="CentralRailAssembly"    X_Y_Z=" RAIL_Xpos;RAIL_Ypos; 0."      rot="0.;180.;0." />
+  <posXYZ  volume="ExtremityRailAssembly"  X_Y_Z=" 0.;RAIL_Ypos; RAIL_ExtrZpos"  rot="0.;  0.;0." />
+  <posXYZ  volume="ExtremityRailAssembly"  X_Y_Z=" 0.;RAIL_Ypos;-RAIL_ExtrZpos"  rot="0.;180.;0." /> 
+</composition>
+
+</section>
+
+
+
+  
+
+<section name       = "ATLAS Shielding"
+         version    = "8.0"
+         date       = "10 January 2011"
+         author     = "Daniel Pomarede, reviewed by Jochen"
+         top_volume = "useless">
+
+
+<!--     name       =  A Frame Welded Assembly       section name       = "Shielding" -->
+
+<!--  **************************************************************
+      **************************************************************
+      ***                                                       ****
+      ***                     ATLAS Shields                     ****
+      ***                                                       ****
+      **************************************************************  
+      **************************************************************  -->
+
+
+
+<!--  JF Shielding  -->
+
+<!--  "A" Frame Welded Assembly  -->
+
+
+
+<!--  Useful variables  -->
+
+<var  name="JFSH_XYZref"                                      value="   0." />  <!-- NO CONFIRMATION NEEDED -->
+<var  name="JFSH_rot180"                                      value=" 180." />  <!-- NO CONFIRMATION NEEDED -->
+
+<!--  Primary variables  -->
+
+<!-- BEGIN confirmation with atljf___0087-vAC (if no other comment) -->
+<var  name="JFSH_AFBBleng_AFrame_BottomBar_length"            value="5498." />
+<var  name="JFSH_AFBheigh_AFrame_Bar_height"                  value=" 250." />
+<var  name="JFSH_AFrwidth_AFrame_width"                       value=" 250." />
+<var  name="JFSH_AFBthic1_AFrame_Bar_thickness1"              value="   9." />
+<var  name="JFSH_AFBthic2_AFrame_Bar_thickness2"              value="  14." />
+<var  name="JFSH_AFLangle_AFrame_Leg_angle"                   value="  42." />
+
+<var  name="JFSH_AFSlengt_AFrame_Spacer_length"               value=" 140." />
+<var  name="JFSH_AFSheigh_AFrame_Spacer_height"               value=" 290." />
+
+<var  name="JFSH_AFWEBBx1_AFrame_Web_element_BottomBar_X1"    value="   0." />  <!-- NO CONFIRMATION NEEDED -->
+<var  name="JFSH_AFWEBBx2_AFrame_Web_element_BottomBar_X2"    value="1306." />  <!-- confirmed atljf___0028-vAD -->
+<var  name="JFSH_AFWEleng_AFrame_Web_element_length"          value="  30." />
+<var  name="JFSH_AFWEBLx1_AFrame_Web_element_Leg_DX1"         value="1090.+8." />    <!-- temporarily sum to avoid overlap, second Flange needs to be introduced, confirmed atljf___0028-vAD-->
+<var  name="JFSH_AFWEBLx2_AFrame_Web_element_Leg_DX2"         value=" 965." />  <!-- confirmed atljf___0028-vAD -->
+
+<var  name="JFSH_AFFthick_AFrame_Flange_thickness"            value="  15." />
+<var  name="JFSH_AFFlengt_AFrame_Flange_length"               value=" 935." />
+
+<var  name="JFSH_AFTPleng_AFrame_TopPlate_length"             value=" 300." />
+<var  name="JFSH_AFTPheig_AFrame_TopPlate_height"             value="  50." />
+
+<var  name="JFSH_AFWheigh_AFrame_Wedge_height"                value=" 149.2"/>
+<var  name="JFSH_AFWexten_AFrame_Wedge_extension"             value=" 200." />
+<var  name="JFSH_AFWthick_AFrame_Wedge_thickness"             value="  50." />
+<var  name="JFSH_AFWzoffs_AFrame_Wedge_zoffset"               value="  20." />  <!-- confirmed atljf___0028-vAD -->
+
+<var  name="JFSH_AFFEElen_AFrame_Feet_length"                 value="  830."/>
+<var  name="JFSH_AFFEEthi_AFrame_Feet_thickness"              value="   50."/>
+<var  name="JFSH_AFFEEsle_AFrame_Feet_shortlength"            value="  100. - 20."/> <!-- reduced value to avoid clash with rail -->
+<var  name="JFSH_AFFEEhei_AFrame_Feet_height"                 value="  225."/>
+<var  name="JFSH_AFFEEext_AFrame_Feet_X_extension"            value=" 6830."/>  <!-- confirmed atljf___0028-vAD -->
+
+<var  name="JFSH_AFtothei_AFrame_Total_height"                value=" 2740."/>  <!-- confirmed atljf___0028-vAD -->
+<var  name="JFSH_AFECTcle_Clearance_ECT_AFrame"               value="   25."/>  <!-- confirmed atljf___0010-vAC -->
+
+<var  name="JFSH_ECTnomiz_ECT_Nominal_zpos"                   value="12914."/>  <!-- confirmed atljf___0010-vAC -->
+<!-- END confirmation with atljf___0087-vAC -->
+
+<!--  Derived variables  TEMPORAY already declare in RAIL Section laurent 05-05-10 ********* -->
+<var  name="RAIL_CeRthic1_CentralRail_Thick1JFSH" value="  100." />  <!-- confirmed atlhbrb_0001-vAH -->
+<var  name="RAIL_CeRthic2_CentralRail_Thick2JFSH" value="  200." />  <!-- confirmed atlhbrb_0001-vAH -->
+<var  name="RAIL_Ypos_aboveJFSH"                  value="-4390." />  <!-- confirmed atcnh___0005-vAG -->
+<var  name="RAIL_totHeightJFSH"                   value="RAIL_CeRthic2_CentralRail_Thick2JFSH+2.*RAIL_CeRthic1_CentralRail_Thick1JFSH" />
+<var  name="RAIL_YposJFSH"                        value="RAIL_Ypos_aboveJFSH - RAIL_totHeightJFSH" />
+<var  name="JFSH_AFyposit_AFrame_Ypos"            value="RAIL_YposJFSH+RAIL_totHeightJFSH+JFSH_AFFEEthi_AFrame_Feet_thickness" />
+<var  name="JFSH_AFzposit_AFrame_Zpos"            value="JFSH_XYZref + JFSH_AFECTcle_Clearance_ECT_AFrame +JFSH_AFrwidth_AFrame_width/2." />
+<var  name="JFSH_AFASposy_AFrame_Assembly_Y"          value=" JFSH_AFyposit_AFrame_Ypos" />
+<var  name="JFSH_AFASposz_AFrame_Assembly_Z"          value=" JFSH_AFzposit_AFrame_Zpos" />
+<!--  Derived variables  TEMPORAY already declare in RAIL Section ********* -->
+
+
+<!--  "A" Frame Welded Assembly Bottom Bar Lower Horizontal Plate -->
+<var  name="JFSH_AFBLHPxa"      value="JFSH_AFBBleng_AFrame_BottomBar_length/2." />
+<var  name="JFSH_AFBLHPya"      value="JFSH_XYZref" />
+<var  name="JFSH_AFBLHPyb"      value="JFSH_AFBLHPya+JFSH_AFBthic2_AFrame_Bar_thickness2" />
+
+<var  name="JFSH_AFBLHPxb"      value="JFSH_AFBLHPxa - (JFSH_AFBLHPyb-JFSH_AFBLHPya)/tan(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+
+<trd name="JFSH_AFrame_BottomBar_LowerHorizontalPlate"  material="ShieldSteel"  Xmp_Ymp_Z="2.*JFSH_AFBLHPxb; 2.*JFSH_AFBLHPxa; JFSH_AFrwidth_AFrame_width; JFSH_AFrwidth_AFrame_width; JFSH_AFBLHPyb-JFSH_AFBLHPya" />
+
+
+<!--  "A" Frame Welded Assembly Bottom Bar Vertical Plate -->
+
+<var  name="JFSH_AFBBVPxa"      value="JFSH_AFBLHPxb" />
+<var  name="JFSH_AFBBVPya"      value="JFSH_AFBthic2_AFrame_Bar_thickness2" />
+<var  name="JFSH_AFBBVPyb"      value="JFSH_AFBheigh_AFrame_Bar_height - JFSH_AFBthic2_AFrame_Bar_thickness2" />
+
+<var  name="JFSH_AFBBVPxb"      value="JFSH_AFBBVPxa - (JFSH_AFBBVPyb-JFSH_AFBBVPya)/tan(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+
+<trd name="JFSH_AFrame_BottomBar_VerticalPlate"  material="ShieldSteel"  Xmp_Ymp_Z="2.*JFSH_AFBBVPxb; 2.*JFSH_AFBBVPxa; JFSH_AFBthic1_AFrame_Bar_thickness1; JFSH_AFBthic1_AFrame_Bar_thickness1; JFSH_AFBBVPyb-JFSH_AFBBVPya" />
+
+<!--  "A" Frame Welded Assembly Bottom Bar Upper Horizontal Plate -->
+
+<var  name="JFSH_AFBUHPxa"      value="JFSH_AFBBVPxb" />
+<var  name="JFSH_AFBUHPya"      value="JFSH_AFBBVPyb" />
+<var  name="JFSH_AFBUHPyb"      value="JFSH_AFBUHPya + JFSH_AFBthic2_AFrame_Bar_thickness2" />
+
+<var  name="JFSH_AFBUHPxb"      value="JFSH_AFBUHPxa - (JFSH_AFBUHPyb-JFSH_AFBUHPya)/tan(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+
+<trd name="JFSH_AFrame_BottomBar_UpperHorizontalPlate"  material="ShieldSteel"  Xmp_Ymp_Z="2.*JFSH_AFBUHPxb; 2.*JFSH_AFBUHPxa; JFSH_AFrwidth_AFrame_width; JFSH_AFrwidth_AFrame_width; JFSH_AFBUHPyb-JFSH_AFBUHPya" />
+
+
+<!--  "A" Frame Welded Assembly Leg Lower Horizontal Plate -->
+
+<var  name="JFSH_AFLLHPxa"      value="JFSH_AFBLHPxa" />
+<var  name="JFSH_AFLLHPya"      value="JFSH_AFBLHPya" />
+
+<var  name="JFSH_AFLLHPxb"      value="JFSH_AFSlengt_AFrame_Spacer_length/2." />
+<var  name="JFSH_AFLLHPyb"      value="(JFSH_AFLLHPxa-JFSH_AFLLHPxb)*tan(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)    " />
+
+<var  name="JFSH_AFLLHPxc"      value="JFSH_AFLLHPxb" />
+<var  name="JFSH_AFLLHPyc"      value="JFSH_AFLLHPyb + JFSH_AFBthic2_AFrame_Bar_thickness2/cos(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+
+<var  name="JFSH_AFLLHPxd"      value="JFSH_AFLLHPxa + JFSH_AFBthic2_AFrame_Bar_thickness2/sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFLLHPyd"      value="JFSH_AFBLHPya" />
+
+<box  name="JFSH_AFrame_Leg_LowerHorizontalPlate_basic" material="ShieldSteel"   X_Y_Z="JFSH_AFBthic2_AFrame_Bar_thickness2; JFSH_AFLLHPyc/sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180);    JFSH_AFrwidth_AFrame_width"  />
+<box  name="JFSH_AFrame_Leg_LowerHorizontalPlate_cut1"  material="ShieldSteel"   X_Y_Z="2.*JFSH_AFLLHPxb; JFSH_AFrwidth_AFrame_width; 2.*JFSH_AFrwidth_AFrame_width"  />
+<box  name="JFSH_AFrame_Leg_LowerHorizontalPlate_cut2"  material="ShieldSteel"   X_Y_Z="JFSH_AFrwidth_AFrame_width; JFSH_AFrwidth_AFrame_width; 2.*JFSH_AFrwidth_AFrame_width"  />
+
+<subtraction name="JFSH_AFrame_Leg_LowerHorizontalPlate">
+  <posXYZ  volume="JFSH_AFrame_Leg_LowerHorizontalPlate_basic"  X_Y_Z="(JFSH_AFLLHPxd+JFSH_AFLLHPxb)/2.-JFSH_AFBthic2_AFrame_Bar_thickness2*sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)/2.; JFSH_AFLLHPyc/2.-JFSH_AFBthic2_AFrame_Bar_thickness2*cos(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)/2.; 0. " rot=" 0.; 0.; 90-JFSH_AFLangle_AFrame_Leg_angle"/>
+  <posXYZ  volume="JFSH_AFrame_Leg_LowerHorizontalPlate_cut1"   X_Y_Z="0.; JFSH_AFLLHPyc; 0."/>
+  <posXYZ  volume="JFSH_AFrame_Leg_LowerHorizontalPlate_cut2"   X_Y_Z="JFSH_AFLLHPxd; -JFSH_AFrwidth_AFrame_width/2.; 0."/>
+</subtraction>
+
+<!--  "A" Frame Welded Assembly Leg Vertical Plate -->
+
+<var  name="JFSH_AFLVPxa"      value="JFSH_AFLLHPxd" />
+<var  name="JFSH_AFLVPya"      value="JFSH_AFLLHPyd" />
+
+<var  name="JFSH_AFLVPxb"      value="JFSH_AFLLHPxc" />
+<var  name="JFSH_AFLVPyb"      value="JFSH_AFLLHPyc" />
+
+<var  name="JFSH_AFLVPxc"      value="JFSH_AFLVPxb" />
+<var  name="JFSH_AFLVPyc"      value="JFSH_AFtothei_AFrame_Total_height - JFSH_AFTPheig_AFrame_TopPlate_height" />
+
+<var  name="JFSH_AFLVPxe"      value="JFSH_AFLVPxa + (JFSH_AFBheigh_AFrame_Bar_height-2*JFSH_AFBthic2_AFrame_Bar_thickness2)/sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFLVPye"      value="JFSH_AFBLHPya" />
+
+<var  name="JFSH_AFLVPyd"      value="JFSH_AFLVPyc" />
+<var  name="JFSH_AFLVPxd"      value="JFSH_AFLVPxe - (JFSH_AFLVPyd)/tan(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+
+<box  name="JFSH_AFrame_Leg_VerticalPlate_basic" material="ShieldSteel"   X_Y_Z="-(JFSH_AFLVPxa-JFSH_AFLVPxe)*sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180); (JFSH_AFLVPxe-JFSH_AFLVPxb)/cos(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180); JFSH_AFBthic1_AFrame_Bar_thickness1" />
+<box  name="JFSH_AFrame_Leg_VerticalPlate_cut1"  material="ShieldSteel"   X_Y_Z="JFSH_AFLVPxa; JFSH_AFLVPxa; JFSH_AFLVPxa"/>
+<box  name="JFSH_AFrame_Leg_VerticalPlate_cut2"  material="ShieldSteel"   X_Y_Z="JFSH_AFLVPxa; JFSH_AFLVPxa; JFSH_AFLVPxa"/>
+<box  name="JFSH_AFrame_Leg_VerticalPlate_cut3"  material="ShieldSteel"   X_Y_Z="JFSH_AFLVPxa; JFSH_AFLVPxa; JFSH_AFLVPxa"/>
+
+<subtraction     name="JFSH_AFrame_Leg_VerticalPlate">
+  <posXYZ  volume="JFSH_AFrame_Leg_VerticalPlate_basic"  X_Y_Z="(JFSH_AFLVPxe+JFSH_AFLVPxc)/2.+(JFSH_AFLVPxa-JFSH_AFLVPxe)*(1-cos(2.*JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180))/4.; (JFSH_AFLVPxe-JFSH_AFLVPxb)*tan(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)/2.+(JFSH_AFLVPxa-JFSH_AFLVPxe)*sin(2.*JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)/4.; 0" rot=" 0.; 0.; 90-JFSH_AFLangle_AFrame_Leg_angle"/>
+  <posXYZ  volume="JFSH_AFrame_Leg_VerticalPlate_cut1"   X_Y_Z="JFSH_AFLVPxa; -JFSH_AFLVPxa/2.; 0"/>
+  <posXYZ  volume="JFSH_AFrame_Leg_VerticalPlate_cut2"   X_Y_Z="-JFSH_AFLVPxa/2.+JFSH_AFLVPxb; JFSH_AFLVPyb; 0"/>
+  <posXYZ  volume="JFSH_AFrame_Leg_VerticalPlate_cut3"   X_Y_Z="0.; JFSH_AFLVPyc+JFSH_AFLVPxa/2.; 0"/>
+</subtraction>
+
+<!--  "A" Frame Welded Assembly Leg Upper Horizontal Plate -->
+
+<var  name="JFSH_AFLUHPxa"      value="JFSH_AFLVPxe" />
+<var  name="JFSH_AFLUHPya"      value="JFSH_AFLVPye" />
+
+<var  name="JFSH_AFLUHPxb"      value="JFSH_AFLVPxd" />
+<var  name="JFSH_AFLUHPyb"      value="JFSH_AFLVPyd" />
+
+<var  name="JFSH_AFLUHPxc"      value="JFSH_AFLUHPxb + JFSH_AFBthic2_AFrame_Bar_thickness2/sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFLUHPyc"      value="JFSH_AFLVPyc" />
+
+<var  name="JFSH_AFLUHPxd"      value="JFSH_AFLUHPxa + JFSH_AFBthic2_AFrame_Bar_thickness2/sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFLUHPyd"      value="JFSH_AFLUHPya" />
+
+<var  name="JFSH_AFrame_Leg_Angle" value="atan(JFSH_AFLUHPyb / (JFSH_AFLUHPxb - JFSH_AFLUHPxa))"/>
+<box  name="JFSH_AFrame_Leg_UpperHorizontalPlate_basic" material="ShieldSteel" X_Y_Z="(JFSH_AFLUHPxa - JFSH_AFLUHPxb)/cos(JFSH_AFrame_Leg_Angle) + cos(JFSH_AFrame_Leg_Angle)*(JFSH_AFLUHPxd - JFSH_AFLUHPxa); -sin(JFSH_AFrame_Leg_Angle)*(JFSH_AFLUHPxd - JFSH_AFLUHPxa);JFSH_AFrwidth_AFrame_width"/> 
+<box  name="JFSH_AFrame_Leg_UpperHorizontalPlate_cut" material="ShieldSteel" X_Y_Z="(JFSH_AFLUHPxd-JFSH_AFLUHPxa)*4.;(JFSH_AFLUHPxd-JFSH_AFLUHPxa)*4.;JFSH_AFrwidth_AFrame_width*2."/>
+
+<subtraction name="JFSH_AFrame_Leg_UpperHorizontalPlate">
+  <posXYZ  volume="JFSH_AFrame_Leg_UpperHorizontalPlate_basic"    X_Y_Z="JFSH_AFLUHPxb + (JFSH_AFLUHPxd - JFSH_AFLUHPxb)/2.; JFSH_AFLUHPyb/2.; 0."           rot="0.;0.;JFSH_AFrame_Leg_Angle/GENV_Pi*180." />
+  <posXYZ  volume="JFSH_AFrame_Leg_UpperHorizontalPlate_cut"      X_Y_Z="JFSH_AFLUHPxd; -2.*(JFSH_AFLUHPxd - JFSH_AFLUHPxa); 0."/>
+  <posXYZ  volume="JFSH_AFrame_Leg_UpperHorizontalPlate_cut"      X_Y_Z="JFSH_AFLUHPxc; JFSH_AFLUHPyc + 2.*(JFSH_AFLUHPxd - JFSH_AFLUHPxa); 0."/>
+</subtraction>
+
+<!--  "A" Frame Welded Assembly Top Plate -->
+
+<var  name="JFSH_AFTPLAxa"      value="JFSH_AFTPleng_AFrame_TopPlate_length/2." />
+<var  name="JFSH_AFTPLAya"      value="JFSH_AFtothei_AFrame_Total_height-JFSH_AFTPheig_AFrame_TopPlate_height" />
+
+<var  name="JFSH_AFTPLAxb"      value="JFSH_AFTPLAxa " />
+<var  name="JFSH_AFTPLAyb"      value="JFSH_AFtothei_AFrame_Total_height" />
+
+<trd name="JFSH_AFrame_TopPlate"  material="ShieldSteel"  Xmp_Ymp_Z="2.*JFSH_AFTPLAxb; 2.*JFSH_AFTPLAxa; JFSH_AFrwidth_AFrame_width; JFSH_AFrwidth_AFrame_width; JFSH_AFTPLAyb-JFSH_AFTPLAya" />
+
+<!--  "A" Frame Welded Assembly Spacer -->
+
+<var  name="JFSH_AFSPACxa"      value="JFSH_AFSlengt_AFrame_Spacer_length/2." />
+<var  name="JFSH_AFSPACya"      value="JFSH_AFTPLAya-JFSH_AFSheigh_AFrame_Spacer_height" />
+
+<var  name="JFSH_AFSPACxb"      value="JFSH_AFSPACxa " />
+<var  name="JFSH_AFSPACyb"      value="JFSH_AFTPLAya" />
+
+<trd name="JFSH_AFrame_Spacer"  material="ShieldSteel"  Xmp_Ymp_Z="2.*JFSH_AFSPACxb; 2.*JFSH_AFSPACxa; JFSH_AFrwidth_AFrame_width; JFSH_AFrwidth_AFrame_width; JFSH_AFSPACyb-JFSH_AFSPACya" />
+
+
+<!--  "A" Frame Welded Assembly Web -->
+
+<var  name="JFSH_AFWEBwid_AFrame_Web_element_width"      value="(JFSH_AFrwidth_AFrame_width-JFSH_AFBthic1_AFrame_Bar_thickness1)/2." />
+<var  name="JFSH_AFWEBhei_AFrame_Web_element_height"     value="JFSH_AFBheigh_AFrame_Bar_height-2.*JFSH_AFBthic2_AFrame_Bar_thickness2" />
+
+<var  name="JFSH_AFWEBBBy_AFrame_Web_element_BottomBar_Y"     value="JFSH_AFBthic2_AFrame_Bar_thickness2+JFSH_AFWEBhei_AFrame_Web_element_height/2" />
+<var  name="JFSH_AFWEBzpo_AFrame_Web_element_Z"     value="JFSH_AFBthic1_AFrame_Bar_thickness1/2. + JFSH_AFWEBwid_AFrame_Web_element_width/2." />
+
+<box  name="JFSH_AFrame_Web_element"     material="ShieldSteel"  X_Y_Z="JFSH_AFWEleng_AFrame_Web_element_length;JFSH_AFWEBhei_AFrame_Web_element_height;JFSH_AFWEBwid_AFrame_Web_element_width"    />
+
+<composition  name="JFSH_AFrame_Web_composite_element" >
+  <posXYZ  volume="JFSH_AFrame_Web_element"    X_Y_Z="0.;0.; JFSH_AFWEBzpo_AFrame_Web_element_Z"           rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_Web_element"    X_Y_Z="0.;0.;-JFSH_AFWEBzpo_AFrame_Web_element_Z"           rot="0.;0.;0." />
+</composition>
+
+<!--  "A" Frame Welded Assembly Web element leg -->
+
+<var  name="JFSH_AFWELxi1"    value="JFSH_AFLUHPxd - JFSH_AFWEBLx1_AFrame_Web_element_Leg_DX1*cos(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFWELyi1"    value="JFSH_AFWEBLx1_AFrame_Web_element_Leg_DX1*sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFWELxp1"    value="JFSH_AFWELxi1-(JFSH_AFWEBhei_AFrame_Web_element_height/2 + JFSH_AFBthic2_AFrame_Bar_thickness2)*sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFWELyp1"    value="JFSH_AFWELyi1-(JFSH_AFWEBhei_AFrame_Web_element_height/2 + JFSH_AFBthic2_AFrame_Bar_thickness2)*cos(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+
+<var  name="JFSH_AFWELxi2"    value="JFSH_AFWELxi1 - JFSH_AFWEBLx2_AFrame_Web_element_Leg_DX2*cos(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFWELyi2"    value="JFSH_AFWELyi1 + JFSH_AFWEBLx2_AFrame_Web_element_Leg_DX2*sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFWELxp2"    value="JFSH_AFWELxi2-(JFSH_AFWEBhei_AFrame_Web_element_height/2 + JFSH_AFBthic2_AFrame_Bar_thickness2)*sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFWELyp2"    value="JFSH_AFWELyi2-(JFSH_AFWEBhei_AFrame_Web_element_height/2 + JFSH_AFBthic2_AFrame_Bar_thickness2)*cos(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+
+<var  name="JFSH_AFWELxi3"    value="JFSH_AFWELxi2 - JFSH_AFWEBLx2_AFrame_Web_element_Leg_DX2*cos(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFWELyi3"    value="JFSH_AFWELyi2 + JFSH_AFWEBLx2_AFrame_Web_element_Leg_DX2*sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFWELxp3"    value="JFSH_AFWELxi3-(JFSH_AFWEBhei_AFrame_Web_element_height/2 + JFSH_AFBthic2_AFrame_Bar_thickness2)*sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFWELyp3"    value="JFSH_AFWELyi3-(JFSH_AFWEBhei_AFrame_Web_element_height/2 + JFSH_AFBthic2_AFrame_Bar_thickness2)*cos(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+
+<!--  "A" Frame Welded Assembly Flanges -->
+
+<var  name="JFSH_AFFwidth_AFrame_Flange_width"      value="JFSH_AFWEBwid_AFrame_Web_element_width" />
+<var  name="JFSH_AFFzposi_AFrame_Flange_Z"          value="JFSH_AFWEBzpo_AFrame_Web_element_Z" />
+
+<box  name="JFSH_AFrame_Flange"     material="ShieldSteel"  X_Y_Z="JFSH_AFFlengt_AFrame_Flange_length;JFSH_AFFthick_AFrame_Flange_thickness;JFSH_AFFwidth_AFrame_Flange_width"    />
+<composition  name="JFSH_AFrame_Flange_composite" >
+  <posXYZ  volume="JFSH_AFrame_Flange"    X_Y_Z="0.;0.; JFSH_AFFzposi_AFrame_Flange_Z"           rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_Flange"    X_Y_Z="0.;0.;-JFSH_AFFzposi_AFrame_Flange_Z"           rot="0.;0.;0." />
+</composition>
+
+<var  name="JFSH_AFFposx1_AFrame_Flange_X1"    value="JFSH_AFWELxp1+(JFSH_AFFlengt_AFrame_Flange_length+JFSH_AFWEleng_AFrame_Web_element_length)*cos(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)/2" />
+<var  name="JFSH_AFFposy1_AFrame_Flange_Y1"    value="JFSH_AFWELyp1-(JFSH_AFFlengt_AFrame_Flange_length+JFSH_AFWEleng_AFrame_Web_element_length)*sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)/2" />
+
+<var  name="JFSH_AFFposx2_AFrame_Flange_X2"    value="JFSH_AFWELxp2+(JFSH_AFFlengt_AFrame_Flange_length+JFSH_AFWEleng_AFrame_Web_element_length)*cos(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)/2" />
+<var  name="JFSH_AFFposy2_AFrame_Flange_Y2"    value="JFSH_AFWELyp2-(JFSH_AFFlengt_AFrame_Flange_length+JFSH_AFWEleng_AFrame_Web_element_length)*sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)/2" />
+
+<!--  "A" Frame Welded Assembly Wedges -->
+
+<var  name="JFSH_AFWposxa_AFrame_Wedge_XA"    value="JFSH_XYZref" />
+<var  name="JFSH_AFWposya_AFrame_Wedge_YA"    value="JFSH_XYZref" />
+<var  name="JFSH_AFWposxb_AFrame_Wedge_XB"    value="JFSH_AFWheigh_AFrame_Wedge_height*tan(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFWposyb_AFrame_Wedge_YB"    value="JFSH_AFWheigh_AFrame_Wedge_height" />
+<var  name="JFSH_AFWposxc_AFrame_Wedge_XC"    value="JFSH_AFWposxb_AFrame_Wedge_XB+JFSH_AFWexten_AFrame_Wedge_extension*cos(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFWposyc_AFrame_Wedge_YC"    value="JFSH_AFWposyb_AFrame_Wedge_YB-JFSH_AFWexten_AFrame_Wedge_extension*sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFWposxd_AFrame_Wedge_XD"    value="JFSH_AFWposxc_AFrame_Wedge_XC- JFSH_AFWposyc_AFrame_Wedge_YC * tan(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFWposyd_AFrame_Wedge_YD"    value="JFSH_AFWposya_AFrame_Wedge_YA" />
+
+<var  name="JFSH_AFWposx0_AFrame_Wedge_X0"    value="JFSH_AFWposxb_AFrame_Wedge_XB + JFSH_AFWposyb_AFrame_Wedge_YB / tan(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFWposy0_AFrame_Wedge_Y0"    value="JFSH_AFWposxa_AFrame_Wedge_XA" />
+
+<box  name="JFSH_AFrame_Wedge_basic"  material="ShieldSteel"   X_Y_Z="JFSH_AFWposxc_AFrame_Wedge_XC; JFSH_AFWposyb_AFrame_Wedge_YB; JFSH_AFWthick_AFrame_Wedge_thickness"/>
+<box  name="JFSH_AFrame_Wedge_cut1"   material="ShieldSteel"   X_Y_Z="2.*(JFSH_AFWposxc_AFrame_Wedge_XC-JFSH_AFWposxb_AFrame_Wedge_XB)*sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180); JFSH_AFWposxc_AFrame_Wedge_XC; 2.*JFSH_AFWthick_AFrame_Wedge_thickness"/>
+<box  name="JFSH_AFrame_Wedge_cut2"   material="ShieldSteel"   X_Y_Z="JFSH_AFWposxc_AFrame_Wedge_XC; 2.*JFSH_AFWposxb_AFrame_Wedge_XB*cos(atan(JFSH_AFWposxb_AFrame_Wedge_XB/JFSH_AFWposyb_AFrame_Wedge_YB)); 2.*JFSH_AFWthick_AFrame_Wedge_thickness"/>
+<box  name="JFSH_AFrame_Wedge_cut3"   material="ShieldSteel"   X_Y_Z="JFSH_AFWposxc_AFrame_Wedge_XC; 2.*(JFSH_AFWposxc_AFrame_Wedge_XC-JFSH_AFWposxd_AFrame_Wedge_XD)*cos(atan((JFSH_AFWposxc_AFrame_Wedge_XC-JFSH_AFWposxd_AFrame_Wedge_XD)/JFSH_AFWposyc_AFrame_Wedge_YC)); 2.*JFSH_AFWthick_AFrame_Wedge_thickness"/>
+
+<subtraction  name="JFSH_AFrame_Wedge">
+  <posXYZ  volume="JFSH_AFrame_Wedge_basic" X_Y_Z="JFSH_AFWposxc_AFrame_Wedge_XC/2.; JFSH_AFWposyb_AFrame_Wedge_YB/2.; 0." />
+  <posXYZ  volume="JFSH_AFrame_Wedge_cut1"  X_Y_Z="JFSH_AFWposxc_AFrame_Wedge_XC; JFSH_AFWposyb_AFrame_Wedge_YB; 0." rot=" 0.; 0.; 90-JFSH_AFLangle_AFrame_Leg_angle" />
+  <posXYZ  volume="JFSH_AFrame_Wedge_cut2"  X_Y_Z="0.; JFSH_AFWposyb_AFrame_Wedge_YB; 0." rot=" 0.; 0.; 90-atan(JFSH_AFWposxb_AFrame_Wedge_XB/JFSH_AFWposyb_AFrame_Wedge_YB)/GENV_PiS180" />
+  <posXYZ  volume="JFSH_AFrame_Wedge_cut3"  X_Y_Z="JFSH_AFWposxc_AFrame_Wedge_XC; 0.; 0." rot=" 0.; 0.; 90-atan((JFSH_AFWposxc_AFrame_Wedge_XC-JFSH_AFWposxd_AFrame_Wedge_XD)/JFSH_AFWposyc_AFrame_Wedge_YC)/GENV_PiS180" />
+</subtraction>
+
+<var  name="JFSH_AFWposix_AFrame_Wedge_X"    value=" JFSH_AFBUHPxb - JFSH_AFWposx0_AFrame_Wedge_X0" />
+<var  name="JFSH_AFWposiy_AFrame_Wedge_Y"    value=" JFSH_AFBUHPyb - JFSH_AFWposy0_AFrame_Wedge_Y0" />
+<var  name="JFSH_AFWposiz_AFrame_Wedge_Z"    value=" JFSH_AFrwidth_AFrame_width/2. - JFSH_AFWzoffs_AFrame_Wedge_zoffset - JFSH_AFWthick_AFrame_Wedge_thickness/2." />
+
+<!--  "A" Frame Welded Assembly Feet -->
+
+<var  name="JFSH_AFFeetxa_AFrame_Feet_XA"    value="JFSH_AFFEElen_AFrame_Feet_length/2." />
+<var  name="JFSH_AFFeetya_AFrame_Feet_YA"    value="JFSH_XYZref" />
+<var  name="JFSH_AFFeetxb_AFrame_Feet_XB"    value="JFSH_AFFeetxa_AFrame_Feet_XA" />
+<var  name="JFSH_AFFeetyb_AFrame_Feet_YB"    value="JFSH_AFFeetya_AFrame_Feet_YA - JFSH_AFFEEhei_AFrame_Feet_height" />
+<var  name="JFSH_AFFeetxc_AFrame_Feet_XC"    value="JFSH_AFFeetxb_AFrame_Feet_XB - JFSH_AFFEEsle_AFrame_Feet_shortlength" />
+<var  name="JFSH_AFFeetyc_AFrame_Feet_YC"    value="JFSH_AFFeetyb_AFrame_Feet_YB" />
+<var  name="JFSH_AFFeetxd_AFrame_Feet_XD"    value="JFSH_AFFeetxc_AFrame_Feet_XC" />
+<var  name="JFSH_AFFeetyd_AFrame_Feet_YD"    value="JFSH_AFFeetyb_AFrame_Feet_YB+JFSH_AFFEEthi_AFrame_Feet_thickness" />
+<var  name="JFSH_AFFeetxe_AFrame_Feet_XE"    value="JFSH_AFFeetxc_AFrame_Feet_XC+JFSH_AFFEEsle_AFrame_Feet_shortlength-JFSH_AFFEEthi_AFrame_Feet_thickness" />
+<var  name="JFSH_AFFeetye_AFrame_Feet_YE"    value="JFSH_AFFeetyd_AFrame_Feet_YD" />
+<var  name="JFSH_AFFeetxf_AFrame_Feet_XF"    value="JFSH_AFFeetxe_AFrame_Feet_XE" />
+<var  name="JFSH_AFFeetyf_AFrame_Feet_YF"    value="JFSH_AFFeetya_AFrame_Feet_YA-JFSH_AFFEEthi_AFrame_Feet_thickness" />
+
+<var  name="JFSH_AFFeetpx_AFrame_Feet_X"     value=" JFSH_AFFEEext_AFrame_Feet_X_extension/2. - JFSH_AFFEElen_AFrame_Feet_length/2." />
+
+<box name="JFSH_AFrame_Feet_basic"  material="ShieldSteel" X_Y_Z="2.*JFSH_AFFeetxa_AFrame_Feet_XA; -JFSH_AFFeetyb_AFrame_Feet_YB; JFSH_AFrwidth_AFrame_width" />
+<box name="JFSH_AFrame_Feet_cut1"   material="ShieldSteel" X_Y_Z="2.*JFSH_AFFeetxe_AFrame_Feet_XE; JFSH_AFFeetyf_AFrame_Feet_YF-JFSH_AFFeetye_AFrame_Feet_YE; 2.*JFSH_AFrwidth_AFrame_width" />
+<box name="JFSH_AFrame_Feet_cut2"   material="ShieldSteel" X_Y_Z="2.*JFSH_AFFeetxc_AFrame_Feet_XC; JFSH_AFFeetyf_AFrame_Feet_YF-JFSH_AFFeetye_AFrame_Feet_YE; 2.*JFSH_AFrwidth_AFrame_width" />
+
+<subtraction  name="JFSH_AFrame_Feet">
+  <posXYZ  volume="JFSH_AFrame_Feet_basic"  X_Y_Z="0.; JFSH_AFFeetyb_AFrame_Feet_YB/2.; 0."/>
+  <posXYZ  volume="JFSH_AFrame_Feet_cut1"   X_Y_Z="0.; (JFSH_AFFeetye_AFrame_Feet_YE-JFSH_AFFeetyf_AFrame_Feet_YF)/2.+JFSH_AFFeetyf_AFrame_Feet_YF; 0."/>
+  <posXYZ  volume="JFSH_AFrame_Feet_cut2"   X_Y_Z="0.; JFSH_AFFeetyc_AFrame_Feet_YC; 0."/>
+</subtraction>
+
+<!-- +++++++++++++++++++++++++++++++++++++++++++++++++ -->
+<!--  "A" Frame Welded Assembly Composition of volumes -->
+<!-- +++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+<composition  name="JFSH_AFrame_BottomBar" >
+  <posXYZ  volume="JFSH_AFrame_BottomBar_LowerHorizontalPlate"    X_Y_Z="0.;(JFSH_AFBLHPyb-JFSH_AFBLHPya)/2.; 0."                                                          rot="90.;0.;0."/>
+  <posXYZ  volume="JFSH_AFrame_BottomBar_VerticalPlate"           X_Y_Z="0.;(JFSH_AFBBVPyb-JFSH_AFBBVPya)/2.+JFSH_AFBLHPyb-JFSH_AFBLHPya; 0."                              rot="90.;0.;0."/>
+  <posXYZ  volume="JFSH_AFrame_BottomBar_UpperHorizontalPlate"    X_Y_Z="0.;(JFSH_AFBUHPyb-JFSH_AFBUHPya)/2.+JFSH_AFBBVPyb-JFSH_AFBBVPya+JFSH_AFBLHPyb-JFSH_AFBLHPya; 0."  rot="90.;0.;0."/>
+  <posXYZ  volume="JFSH_AFrame_Web_composite_element"    X_Y_Z=" JFSH_AFWEBBx1_AFrame_Web_element_BottomBar_X1;JFSH_AFWEBBBy_AFrame_Web_element_BottomBar_Y;0. "           rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_Web_composite_element"    X_Y_Z=" JFSH_AFWEBBx2_AFrame_Web_element_BottomBar_X2;JFSH_AFWEBBBy_AFrame_Web_element_BottomBar_Y;0. "           rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_Web_composite_element"    X_Y_Z="-JFSH_AFWEBBx2_AFrame_Web_element_BottomBar_X2;JFSH_AFWEBBBy_AFrame_Web_element_BottomBar_Y;0. "           rot="0.;0.;0." />
+</composition>
+
+<composition  name="JFSH_AFrame_Leg" >
+  <posXYZ  volume="JFSH_AFrame_Leg_LowerHorizontalPlate"    X_Y_Z="0.;0.; 0."           rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_Leg_VerticalPlate"           X_Y_Z="0.;0.; 0."           rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_Leg_UpperHorizontalPlate"    X_Y_Z="0.;0.; 0."           rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_Web_composite_element"    X_Y_Z=" JFSH_AFWELxp1;JFSH_AFWELyp1;0. "           rot="0.;0.;-JFSH_AFLangle_AFrame_Leg_angle" />
+  <posXYZ  volume="JFSH_AFrame_Web_composite_element"    X_Y_Z=" JFSH_AFWELxp2;JFSH_AFWELyp2;0. "           rot="0.;0.;-JFSH_AFLangle_AFrame_Leg_angle" />
+  <posXYZ  volume="JFSH_AFrame_Web_composite_element"    X_Y_Z=" JFSH_AFWELxp3;JFSH_AFWELyp3;0. "           rot="0.;0.;-JFSH_AFLangle_AFrame_Leg_angle" />
+  <posXYZ  volume="JFSH_AFrame_Flange_composite"         X_Y_Z=" JFSH_AFFposx1_AFrame_Flange_X1;JFSH_AFFposy1_AFrame_Flange_Y1;0. "           rot="0.;0.;-JFSH_AFLangle_AFrame_Leg_angle" />
+  <posXYZ  volume="JFSH_AFrame_Flange_composite"         X_Y_Z=" JFSH_AFFposx2_AFrame_Flange_X2;JFSH_AFFposy2_AFrame_Flange_Y2;0. "           rot="0.;0.;-JFSH_AFLangle_AFrame_Leg_angle" />
+</composition>
+
+<composition  name="JFSH_AFrame_Assembly" >
+  <posXYZ  volume="JFSH_AFrame_TopPlate"    X_Y_Z="0.;JFSH_AFTPLAyb-(JFSH_AFTPLAyb-JFSH_AFTPLAya)/2.; 0."           rot="90.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_Spacer"      X_Y_Z="0.;JFSH_AFSPACyb-(JFSH_AFSPACyb-JFSH_AFSPACya)/2.; 0."           rot="90.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_BottomBar"   X_Y_Z="0.;0.; 0."           rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_Leg"         X_Y_Z="0.;0.; 0."           rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_Leg"         X_Y_Z="0.;0.; 0."           rot="0.;JFSH_rot180;0." />
+  <posXYZ  volume="JFSH_AFrame_Wedge"       X_Y_Z=" JFSH_AFWposix_AFrame_Wedge_X;JFSH_AFWposiy_AFrame_Wedge_Y; JFSH_AFWposiz_AFrame_Wedge_Z"           rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_Wedge"       X_Y_Z=" JFSH_AFWposix_AFrame_Wedge_X;JFSH_AFWposiy_AFrame_Wedge_Y;-JFSH_AFWposiz_AFrame_Wedge_Z"           rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_Wedge"       X_Y_Z="-JFSH_AFWposix_AFrame_Wedge_X;JFSH_AFWposiy_AFrame_Wedge_Y; JFSH_AFWposiz_AFrame_Wedge_Z"           rot="0.;JFSH_rot180;0." />
+  <posXYZ  volume="JFSH_AFrame_Wedge"       X_Y_Z="-JFSH_AFWposix_AFrame_Wedge_X;JFSH_AFWposiy_AFrame_Wedge_Y;-JFSH_AFWposiz_AFrame_Wedge_Z"           rot="0.;JFSH_rot180;0." />
+  <posXYZ  volume="JFSH_AFrame_Feet"        X_Y_Z=" JFSH_AFFeetpx_AFrame_Feet_X;0.;0."           rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_Feet"        X_Y_Z="-JFSH_AFFeetpx_AFrame_Feet_X;0.;0."           rot="0.;0.;0." />
+</composition>
+
+<!--     name       =  JF Shielding                  section name       = "Shielding" -->
+<!--  Simple modelization -->
+
+
+<!--  Primary variables  -->
+
+<!-- BEGIN confirmation with atljf___0010-vAC (if no other comment) -->
+<!--  Main Cylinder  -->
+<var  name="JFSH_JFCMClen_JFCMainCylinder_length"                  value=" 5041." />
+<var  name="JFSH_JFCMCir1_JFCMainCylinder_innerRadius1"            value="  282." />  <!-- NO CONFIRMATION POSSIBLE; changed by Sven.Menke@CERN.CH Jul 2020 from 304 to 282 according to http://atlas.web.cern.ch/Atlas/GROUPS/Shielding/shielding.htm -->
+<var  name="JFSH_JFCMCouR_JFCMainCylinder_outerRadius"             value=" 1550." />
+<var  name="JFSH_JFCMChSl_JFCMainCylinder_HoleSLope"               value="    1.1"/>  <!-- NO CONFIRMATION POSSIBLE -->
+<var  name="JFSH_JFCMChSl_JFCMainCylinder_HoleSLope_zoffset"       value=" 1630." />  <!-- this length plus plug is straight; introduced by Sven.Menke@CERN.CH Jul 2020 according to https://edms.cern.ch/ui/file/322317/AC/atljf___0003-vAC.pdf -->
+<var  name="JFSH_JFCMChSl_JFCMainCylinder_OctoZoverlap"            value="  520." />  <!-- this is the z-portion of JFC3 that is modeled here as Oct; introduced by Sven.Menke@CERN.CH Jul 2020 -->
+<var  name="JFSH_JFCMCzof_JFCMainCylinder_zoffset"                 value="   45." />
+<var  name="JFSH_JFCMCrso_JFCMainCylinder_rolledsteeloff"          value="   30." />  <!-- confirmed atljf___0031-vAE -->
+<var  name="JFSH_JFCMCpoo_JFCMainCylinder_polybaronoff"            value="   50." />  <!-- confirmed atljf___0030-vAD -->
+
+<!--  PLUG  -->
+<var  name="JFSH_PLUGleng_Plug_length"                             value="  250." />
+<var  name="JFSH_PLUGinRa_Plug_innerRadius"                        value="  280." />  <!-- confirmed atljf___0006-vAE -->
+<var  name="JFSH_PLUGouRa_Plug_outerRadius"                        value="  520." />  <!-- confirmed atljf___0006-vAE -->
+        
+<!--  JFS Octogon  -->
+<var  name="JFSH_JFSOCmRa_JFSOctogon_mainRadius"                   value=" 2100." />
+<var  name="JFSH_JFSOClen_JFSOctogon_length"                       value=" 3000." />
+<var  name="JFSH_JFSOCzof_JFSOctogon_zoffset"                      value=" 5086." />
+<var  name="JFSH_JFSOCrso_JFSOctogon_rolledsteeloff"               value="   30." />  <!-- confirmed atljf___0029-vAG -->
+<var  name="JFSH_JFSOCpoo_JFSOctogon_polybaronoff"                 value="   80." />  <!-- confirmed atljf___0024-vAD -->
+
+<!-- END confirmation with atljf___0010-vAC -->
+
+<!--  A-Frame to JFS Octogon connection -->
+<var  name="JFSH_AFOconle_AFrame_to_JFSOctogon_connection_length"  value="  230." />  <!-- NO CONFIRMATION POSSIBLE -->
+<var  name="JFSH_AFOconwi_AFrame_to_JFSOctogon_connection_width"   value="  200." />  <!-- NO CONFIRMATION POSSIBLE -->
+<var  name="JFSH_AFOconhe_AFrame_to_JFSOctogon_connection_height"  value="   67." />  <!-- NO CONFIRMATION POSSIBLE -->
+
+<!--  Derived variables  -->
+
+<var  name="JFSH_JFCMCir2_JFCMainCylinder_innerRadius2"   value="JFSH_JFCMCir1_JFCMainCylinder_innerRadius1+(JFSH_JFCMClen_JFCMainCylinder_length-JFSH_JFCMChSl_JFCMainCylinder_HoleSLope_zoffset)*tan(JFSH_JFCMChSl_JFCMainCylinder_HoleSLope*GENV_PiS180)"/> <!-- changed by SvenMenke@CERN.CH Jul 2020 -->
+<var  name="JFSH_JFCMCir3_JFCMainCylinder_innerRadius3"   value="JFSH_JFCMCir2_JFCMainCylinder_innerRadius2+JFSH_JFCMChSl_JFCMainCylinder_OctoZoverlap*tan(JFSH_JFCMChSl_JFCMainCylinder_HoleSLope*GENV_PiS180)"/> <!-- added by SvenMenke@CERN.CH Jul 2020 -->
+<var  name="JFSH_JFCMCzpo_JFCMainCylinder_Z"              value="JFSH_XYZref+JFSH_JFCMCzof_JFCMainCylinder_zoffset" />
+<var  name="JFSH_JFSOCzpo_JFSOctogon_Z"                   value="JFSH_XYZref+JFSH_JFSOCzof_JFSOctogon_zoffset+JFSH_JFSOClen_JFSOctogon_length/2." />
+<var  name="JFSH_PLUGzpos_Plug_posz"                      value="JFSH_XYZref-JFSH_PLUGleng_Plug_length"/>
+
+<!--  JFC Cylinder -->
+<pcon   name="JFSH_JFCMainCylinder_core"      material="ShieldIron"  >
+     <polyplane   Rio_Z="JFSH_PLUGinRa_Plug_innerRadius;JFSH_PLUGouRa_Plug_outerRadius;JFSH_PLUGzpos_Plug_posz"  />
+     <polyplane   Rio_Z="JFSH_PLUGinRa_Plug_innerRadius;JFSH_PLUGouRa_Plug_outerRadius;0."  />
+     <polyplane   Rio_Z="JFSH_JFCMCir1_JFCMainCylinder_innerRadius1;JFSH_JFCMCouR_JFCMainCylinder_outerRadius-JFSH_JFCMCrso_JFCMainCylinder_rolledsteeloff-JFSH_JFCMCpoo_JFCMainCylinder_polybaronoff-GENV_Eps;0."  />
+     <polyplane   Rio_Z="JFSH_JFCMCir1_JFCMainCylinder_innerRadius1;JFSH_JFCMCouR_JFCMainCylinder_outerRadius-JFSH_JFCMCrso_JFCMainCylinder_rolledsteeloff-JFSH_JFCMCpoo_JFCMainCylinder_polybaronoff-GENV_Eps;JFSH_JFCMChSl_JFCMainCylinder_HoleSLope_zoffset"  /> <!-- added plane by Sven.Menke@CERN.CH Jul 2020 since JFC2 is first straight and then with 1.1 degrees like JFC3 -->
+     <polyplane   Rio_Z="JFSH_JFCMCir2_JFCMainCylinder_innerRadius2;JFSH_JFCMCouR_JFCMainCylinder_outerRadius-JFSH_JFCMCrso_JFCMainCylinder_rolledsteeloff-JFSH_JFCMCpoo_JFCMainCylinder_polybaronoff-GENV_Eps;JFSH_JFCMClen_JFCMainCylinder_length"  />
+</pcon>
+
+<tubs name="JFSH_JFCMainCylinder_steelroll" material="ShieldSteel" Rio_Z=" JFSH_JFCMCouR_JFCMainCylinder_outerRadius-JFSH_JFCMCrso_JFCMainCylinder_rolledsteeloff+GENV_Eps; JFSH_JFCMCouR_JFCMainCylinder_outerRadius; JFSH_JFCMClen_JFCMainCylinder_length"/>
+<tubs name="JFSH_JFCMainCylinder_polyroll" material="PolyBoronH3B03" Rio_Z=" JFSH_JFCMCouR_JFCMainCylinder_outerRadius-JFSH_JFCMCrso_JFCMainCylinder_rolledsteeloff-JFSH_JFCMCpoo_JFCMainCylinder_polybaronoff; JFSH_JFCMCouR_JFCMainCylinder_outerRadius-JFSH_JFCMCrso_JFCMainCylinder_rolledsteeloff; JFSH_JFCMClen_JFCMainCylinder_length"/>
+
+<!--  A Frame to JFC Cylinder connection -->
+
+<box  name="JFSH_AFrame_to_JFCMainCylinder_connection"     material="ShieldSteel"  X_Y_Z="JFSH_AFOconwi_AFrame_to_JFSOctogon_connection_width;JFSH_AFOconhe_AFrame_to_JFSOctogon_connection_height;JFSH_AFOconle_AFrame_to_JFSOctogon_connection_length"    />
+
+<var  name="JFSH_AFMCcony_AFrame_to_JFCMainCylinder_connection_Y"   value="JFSH_AFASposy_AFrame_Assembly_Y  + JFSH_AFtothei_AFrame_Total_height + JFSH_AFOconhe_AFrame_to_JFSOctogon_connection_height/2." />
+<var  name="JFSH_AFMCconz_AFrame_to_JFCMainCylinder_connection_Z"   value="JFSH_AFOconle_AFrame_to_JFSOctogon_connection_length/2.+GENV_Eps" />
+<var  name="JFSH_AFconnexion2" value="15." />  <!-- former value 290. -->
+<union  name="JFSH_JFCMainCylinder_compsteel" >
+  <posXYZ  volume="JFSH_JFCMainCylinder_steelroll"              X_Y_Z=" 0. ; 0. ; JFSH_JFCMClen_JFCMainCylinder_length/2. "  rot="   0. ; 0. ; 0."  />
+  <posXYZ  volume="JFSH_AFrame_to_JFCMainCylinder_connection"   X_Y_Z=" 0. ; JFSH_AFMCcony_AFrame_to_JFCMainCylinder_connection_Y ; JFSH_AFMCconz_AFrame_to_JFCMainCylinder_connection_Z+JFSH_AFconnexion2"  rot="   0. ; 0. ; 0."  />
+</union>
+
+<composition  name="JFSH_JFCCylinder" >
+  <posXYZ  volume="JFSH_JFCMainCylinder_core"       X_Y_Z=" 0. ; 0. ; 0. "  rot="   0. ; 0. ; 0."  />
+  <posXYZ  volume="JFSH_JFCMainCylinder_compsteel"  X_Y_Z=" 0. ; 0. ; 0. "  rot="   0. ; 0. ; 0."  />
+  <posXYZ  volume="JFSH_JFCMainCylinder_polyroll"   X_Y_Z=" 0. ; 0. ; JFSH_JFCMClen_JFCMainCylinder_length/2. "  rot="   0. ; 0. ; 0."  />
+</composition>
+
+<!--  JFS Octogon -->
+
+<var  name="JFSH_JFSOctxa_JFSOctogon_XA"    value="JFSH_JFSOCmRa_JFSOctogon_mainRadius-JFSH_JFSOCrso_JFSOctogon_rolledsteeloff-JFSH_JFSOCpoo_JFSOctogon_polybaronoff-GENV_Eps" />
+<var  name="JFSH_JFSOctya_JFSOctogon_YA"    value="JFSH_JFSOctxa_JFSOctogon_XA*GENV_Ta225" />
+<var  name="JFSH_JFSOctxb_JFSOctogon_XB"    value="JFSH_JFSOctya_JFSOctogon_YA" />
+<var  name="JFSH_JFSOctyb_JFSOctogon_YB"    value="JFSH_JFSOctxa_JFSOctogon_XA" />
+
+<gvxysxy     name="JFSH_JFSOctogon_Coreedge"  material="ShieldIron"  dZ="JFSH_JFSOClen_JFSOctogon_length-JFSH_JFSOCrso_JFSOctogon_rolledsteeloff-JFSH_JFSOCpoo_JFSOctogon_polybaronoff-GENV_Eps"  >
+  <gvxy_point  X_Y="  JFSH_JFSOctxa_JFSOctogon_XA  ; JFSH_JFSOctya_JFSOctogon_YA  "   />
+  <gvxy_point  X_Y="  JFSH_JFSOctxb_JFSOctogon_XB  ; JFSH_JFSOctyb_JFSOctogon_YB  "   />
+</gvxysxy>
+
+<tubs name="JFSH_JFSOctogon_Coreround" material="ShieldIron" Rio_Z=" 0. ;JFSH_JFCMCouR_JFCMainCylinder_outerRadius-JFSH_JFCMCrso_JFCMainCylinder_rolledsteeloff-JFSH_JFCMCpoo_JFCMainCylinder_polybaronoff-GENV_Eps; JFSH_JFSOCrso_JFSOctogon_rolledsteeloff+JFSH_JFSOCpoo_JFSOctogon_polybaronoff+2.*GENV_Eps"/>
+
+<union name="JFSH_JFSOctogon_Core" > 
+  <posXYZ  volume="JFSH_JFSOctogon_Coreedge"  X_Y_Z=" 0.; 0.; (JFSH_JFSOCrso_JFSOctogon_rolledsteeloff+JFSH_JFSOCpoo_JFSOctogon_polybaronoff+GENV_Eps)/2. "/>
+  <posXYZ  volume="JFSH_JFSOctogon_Coreround" X_Y_Z=" 0.; 0.;-(JFSH_JFSOClen_JFSOctogon_length-JFSH_JFSOCrso_JFSOctogon_rolledsteeloff-JFSH_JFSOCpoo_JFSOctogon_polybaronoff)/2.+GENV_Eps" />
+</union>
+
+<pcon name="JFSH_JFSOctogon_Hole" material="ShieldIron" > <!-- changed from tubs to pcon by Sven.Menke@CERN.CH Jul 2020 since inner bore of JFC3 has 1.1 degree angle -->
+     <polyplane   Rio_Z="0.;JFSH_JFCMCir2_JFCMainCylinder_innerRadius2;-0.6*JFSH_JFSOClen_JFSOctogon_length"/>
+     <polyplane   Rio_Z="0.;JFSH_JFCMCir2_JFCMainCylinder_innerRadius2;-0.5*JFSH_JFSOClen_JFSOctogon_length"/>
+     <polyplane   Rio_Z="0.;JFSH_JFCMCir2_JFCMainCylinder_innerRadius2;-0.5*JFSH_JFSOClen_JFSOctogon_length"/>
+     <polyplane   Rio_Z="0.;JFSH_JFCMCir3_JFCMainCylinder_innerRadius3;-0.5*JFSH_JFSOClen_JFSOctogon_length+JFSH_JFCMChSl_JFCMainCylinder_OctoZoverlap"/>
+     <polyplane   Rio_Z="0.;JFSH_JFCMCir3_JFCMainCylinder_innerRadius3; 0.6*JFSH_JFSOClen_JFSOctogon_length"/>
+</pcon>
+<var  name="JFSH_JFSOctHBPzo_JFSOctogon_HoleBPzoffset"    value=" 600." />       <!-- confirmed atljf___0010-vAC -->
+<var  name="JFSH_JFSOctHBPoR_JFSOctogon_HoleBPoutRad"     value=" 436. + 1." />  <!-- value of MuonSys mother volume -->
+<tubs name="JFSH_JFSOctogon_HoleBP" material="ShieldIron" Rio_Z=" 0. ;JFSH_JFSOctHBPoR_JFSOctogon_HoleBPoutRad; JFSH_JFSOClen_JFSOctogon_length"/>
+<subtraction  name="JFSH_JFSOctogon_main" >
+  <posXYZ  volume="JFSH_JFSOctogon_Core"   X_Y_Z=" 0. ; 0. ; 0. "  rot="   0. ; 0. ; 0."  />
+  <posXYZ  volume="JFSH_JFSOctogon_Hole"   X_Y_Z=" 0. ; 0. ; 0. "  rot="   0. ; 0. ; 0."  />
+  <posXYZ  volume="JFSH_JFSOctogon_HoleBP"   X_Y_Z=" 0. ; 0. ; JFSH_JFSOctHBPzo_JFSOctogon_HoleBPzoffset "  rot="   0. ; 0. ; 0."  />
+</subtraction>
+
+<gvxysxy     name="JFSH_JFSOctogon_Polyedge_baseside"  material="PolyBoronH3B03"  dZ="JFSH_JFSOClen_JFSOctogon_length-JFSH_JFSOCrso_JFSOctogon_rolledsteeloff - JFSH_JFSOCpoo_JFSOctogon_polybaronoff - GENV_Eps"  >
+  <gvxy_point  X_Y="  JFSH_JFSOctxa_JFSOctogon_XA+JFSH_JFSOCpoo_JFSOctogon_polybaronoff+GENV_Eps  ; JFSH_JFSOctya_JFSOctogon_YA+(JFSH_JFSOCpoo_JFSOctogon_polybaronoff+GENV_Eps)*GENV_Ta225  "   />
+  <gvxy_point  X_Y="  JFSH_JFSOctxb_JFSOctogon_XB+(JFSH_JFSOCpoo_JFSOctogon_polybaronoff+GENV_Eps)*GENV_Ta225  ; JFSH_JFSOctyb_JFSOctogon_YB+JFSH_JFSOCpoo_JFSOctogon_polybaronoff+GENV_Eps  "   />
+</gvxysxy>
+
+<gvxysxy     name="JFSH_JFSOctogon_Polyedge_subblock"  material="PolyBoronH3B03"  dZ="JFSH_JFSOClen_JFSOctogon_length-JFSH_JFSOCpoo_JFSOctogon_polybaronoff-JFSH_JFSOCrso_JFSOctogon_rolledsteeloff+GENV_Eps"  >
+  <gvxy_point  X_Y="  JFSH_JFSOctxa_JFSOctogon_XA+GENV_Eps  ; JFSH_JFSOctya_JFSOctogon_YA+GENV_Eps*GENV_Ta225  "   />
+  <gvxy_point  X_Y="  JFSH_JFSOctxb_JFSOctogon_XB+GENV_Eps*GENV_Ta225  ; JFSH_JFSOctyb_JFSOctogon_YB+GENV_Eps  "   />
+</gvxysxy>
+
+<subtraction   name="JFSH_JFSOctogon_Polyedge_side">
+  <posXYZ  volume="JFSH_JFSOctogon_Polyedge_baseside"      X_Y_Z=" 0. ; 0. ; JFSH_JFSOCrso_JFSOctogon_rolledsteeloff/2. + JFSH_JFSOCpoo_JFSOctogon_polybaronoff/2."  />
+  <posXYZ  volume="JFSH_JFSOctogon_Polyedge_subblock"  X_Y_Z=" 0. ; 0. ; (JFSH_JFSOCpoo_JFSOctogon_polybaronoff+JFSH_JFSOCrso_JFSOctogon_rolledsteeloff-GENV_Eps)/2.+GENV_Eps"  />
+</subtraction>
+
+<gvxysxy     name="JFSH_JFSOctogon_Polyedge_basefront"  material="PolyBoronB2O3"  dZ="JFSH_JFSOCpoo_JFSOctogon_polybaronoff"  >
+  <gvxy_point  X_Y="  JFSH_JFSOctxa_JFSOctogon_XA+JFSH_JFSOCpoo_JFSOctogon_polybaronoff+GENV_Eps  ; JFSH_JFSOctya_JFSOctogon_YA+(JFSH_JFSOCpoo_JFSOctogon_polybaronoff+GENV_Eps)*GENV_Ta225  "   />
+  <gvxy_point  X_Y="  JFSH_JFSOctxb_JFSOctogon_XB+(JFSH_JFSOCpoo_JFSOctogon_polybaronoff+GENV_Eps)*GENV_Ta225  ; JFSH_JFSOctyb_JFSOctogon_YB+JFSH_JFSOCpoo_JFSOctogon_polybaronoff+GENV_Eps  "   />
+</gvxysxy>
+
+<tubs name="JFSH_JFSOctogon_Polyedge_subtube" material="PolyBoronB2O3" Rio_Z=" 0. ;JFSH_JFCMCouR_JFCMainCylinder_outerRadius-JFSH_JFCMCrso_JFCMainCylinder_rolledsteeloff-JFSH_JFCMCpoo_JFCMainCylinder_polybaronoff+GENV_Eps; JFSH_JFSOCpoo_JFSOctogon_polybaronoff+2.*GENV_Eps"/>
+
+<subtraction   name="JFSH_JFSOctogon_Polyedge_front">
+  <posXYZ  volume="JFSH_JFSOctogon_Polyedge_basefront"      X_Y_Z=" 0. ; 0. ; -(JFSH_JFSOClen_JFSOctogon_length-JFSH_JFSOCpoo_JFSOctogon_polybaronoff)/2.+JFSH_JFSOCrso_JFSOctogon_rolledsteeloff"  />
+  <posXYZ  volume="JFSH_JFSOctogon_Polyedge_subtube"   X_Y_Z=" 0. ; 0. ; -(JFSH_JFSOClen_JFSOctogon_length-JFSH_JFSOCpoo_JFSOctogon_polybaronoff)/2.+JFSH_JFSOCrso_JFSOctogon_rolledsteeloff"  />
+</subtraction>
+
+<gvxysxy     name="JFSH_JFSOctogon_Steeledge_base"  material="ShieldSteel"  dZ="JFSH_JFSOClen_JFSOctogon_length"  >
+  <gvxy_point  X_Y="  JFSH_JFSOctxa_JFSOctogon_XA+(JFSH_JFSOCpoo_JFSOctogon_polybaronoff+JFSH_JFSOCrso_JFSOctogon_rolledsteeloff+GENV_Eps)  ; JFSH_JFSOctya_JFSOctogon_YA+(JFSH_JFSOCpoo_JFSOctogon_polybaronoff+JFSH_JFSOCrso_JFSOctogon_rolledsteeloff+GENV_Eps)*GENV_Ta225  "   />
+  <gvxy_point  X_Y="  JFSH_JFSOctxb_JFSOctogon_XB+(JFSH_JFSOCpoo_JFSOctogon_polybaronoff+JFSH_JFSOCrso_JFSOctogon_rolledsteeloff+GENV_Eps)*GENV_Ta225  ; JFSH_JFSOctyb_JFSOctogon_YB+(JFSH_JFSOCpoo_JFSOctogon_polybaronoff+JFSH_JFSOCrso_JFSOctogon_rolledsteeloff+GENV_Eps)  "   />
+</gvxysxy>
+
+<gvxysxy     name="JFSH_JFSOctogon_Steeledge_subblock"  material="ShieldSteel"  dZ="JFSH_JFSOClen_JFSOctogon_length-JFSH_JFSOCrso_JFSOctogon_rolledsteeloff+2.*GENV_Eps"  >
+  <gvxy_point  X_Y="  JFSH_JFSOctxa_JFSOctogon_XA+(JFSH_JFSOCpoo_JFSOctogon_polybaronoff+2.*GENV_Eps)  ; JFSH_JFSOctya_JFSOctogon_YA+(JFSH_JFSOCpoo_JFSOctogon_polybaronoff+2.*GENV_Eps)*GENV_Ta225  "   />
+  <gvxy_point  X_Y="  JFSH_JFSOctxb_JFSOctogon_XB+(JFSH_JFSOCpoo_JFSOctogon_polybaronoff+2.*GENV_Eps)*GENV_Ta225  ; JFSH_JFSOctyb_JFSOctogon_YB+(JFSH_JFSOCpoo_JFSOctogon_polybaronoff+2.*GENV_Eps)  "   />
+</gvxysxy>
+<tubs name="JFSH_JFSOctogon_Steeledge_subtube" material="ShieldSteel" Rio_Z=" 0. ;JFSH_JFCMCouR_JFCMainCylinder_outerRadius-JFSH_JFCMCrso_JFCMainCylinder_rolledsteeloff-JFSH_JFCMCpoo_JFCMainCylinder_polybaronoff+GENV_Eps; JFSH_JFSOCrso_JFSOctogon_rolledsteeloff+2.*GENV_Eps"/>
+
+<subtraction   name="JFSH_JFSOctogon_Steeledge_main">
+  <posXYZ  volume="JFSH_JFSOctogon_Steeledge_base"      X_Y_Z=" 0. ; 0. ; 0."  />
+  <posXYZ  volume="JFSH_JFSOctogon_Steeledge_subblock"  X_Y_Z=" 0. ; 0. ; JFSH_JFSOCrso_JFSOctogon_rolledsteeloff/2."  />
+  <posXYZ  volume="JFSH_JFSOctogon_Steeledge_subtube"   X_Y_Z=" 0. ; 0. ; -(JFSH_JFSOClen_JFSOctogon_length-JFSH_JFSOCrso_JFSOctogon_rolledsteeloff)/2."  />
+</subtraction>
+
+<composition name="JFSH_JFSOctogon">
+  <posXYZ  volume="JFSH_JFSOctogon_main"            X_Y_Z=" 0. ; 0. ; 0. "  rot="   0. ; 0. ; 0."  />
+  <posXYZ  volume="JFSH_JFSOctogon_Polyedge_side"   X_Y_Z=" 0. ; 0. ; 0. "  rot="   0. ; 0. ; 0."  />
+  <posXYZ  volume="JFSH_JFSOctogon_Polyedge_front"  X_Y_Z=" 0. ; 0. ; 0. "  rot="   0. ; 0. ; 0."  />
+  <posXYZ  volume="JFSH_JFSOctogon_Steeledge_main"  X_Y_Z=" 0. ; 0. ; 0. "  rot="   0. ; 0. ; 0."  />
+</composition>
+
+<!--  JN Nose Shielding  -->
+
+<!--  TX1STM Elements -->
+<var  name="JNSH_TX1e1oRa"    value=" 1480." />   <!-- JFSH_tx1stm_element1_outerRadius -->
+<var  name="JNSH_TX1e1iRa"    value=" 1285." />   <!-- JFSH_tx1stm_element1_innerRadius -->
+<var  name="JNSH_TX1e1iLe"    value=" 1045." />   <!-- JFSH_tx1stm_element1_length -->
+<var  name="JNSH_TX1e2iRa"    value=" 1085." />   <!-- JFSH_tx1stm_element2_innerRadius -->
+<var  name="JNSH_TX1e2iLe"    value=" 1100." />   <!-- JFSH_tx1stm_element2_length -->
+<var  name="JNSH_TX1e3iLe"    value=" 2900." />   <!-- JFSH_tx1stm_element3_length -->
+
+<var  name="JNSH_TX1SO1iRa"   value=" 1550." />
+<var  name="JNSH_TX1SO1oRa"   value=" 2620." />
+<var  name="JNSH_TX1SO1iLe"   value=" 1800." />   <!-- to adjust for cavern asymmetry and wall-position -->
+<var  name="JNSH_TX1SO6oRa"   value=" 2075." />
+<var  name="JNSH_TX1SO6iLe"   value="  200." />
+
+<var  name="JNSH_TX1STzof"    value=" JFSH_JFSOClen_JFSOctogon_length + JFSH_JFSOCzof_JFSOctogon_zoffset" />
+
+<var  name="JNSH_TX1e1zpo_tx1stm_element1_Z"              value="JFSH_XYZref+JNSH_TX1STzof+JNSH_TX1e1iLe/2." />
+<var  name="JNSH_TX1e2zpo_tx1stm_element2_Z"              value="JNSH_TX1e1zpo_tx1stm_element1_Z+JNSH_TX1e1iLe/2.+JNSH_TX1e2iLe/2."/>
+<var  name="JNSH_TX1e3zpo_tx1stm_element3_Z"              value="JNSH_TX1e2zpo_tx1stm_element2_Z+JNSH_TX1e2iLe/2.+JNSH_TX1e3iLe/2."/>
+
+<var  name="JNSH_TX1SO6zpo_tx1som_element6_Z"              value="JFSH_XYZref+JNSH_TX1STzof+JNSH_TX1SO6iLe/2."/>
+<var  name="JNSH_TX1SO1zpo_tx1som_element1_Z"              value="JNSH_TX1SO6zpo_tx1som_element6_Z+JNSH_TX1SO6iLe/2.+JNSH_TX1SO1iLe/2."/>
+
+<!--  JFS TX1STM -->
+<tubs   name="JNSH_tx1stm_element1"    material="ShieldIron"    Rio_Z="JNSH_TX1e1iRa ; JNSH_TX1e1oRa ; JNSH_TX1e1iLe"/>
+<tubs   name="JNSH_tx1stm_element2"    material="ShieldIron"    Rio_Z="JNSH_TX1e2iRa ; JNSH_TX1e1oRa ; JNSH_TX1e2iLe"/>
+<tubs   name="JNSH_tx1stm_element3"    material="ShieldIron"    Rio_Z="JNSH_TX1e1iRa ; JNSH_TX1e1oRa ; JNSH_TX1e3iLe"/>
+
+<var  name="JNSH_tx1som_e1_XA"    value="JNSH_TX1SO1oRa * tan(11.25 * GENV_PiS180)" />
+<var  name="JNSH_tx1som_e1_YA"    value="JNSH_TX1SO1oRa" />
+<var  name="JNSH_tx1som_e1_XB"    value="JNSH_tx1som_e1_XA * (1. + 2.*GENV_Co225)" />
+<var  name="JNSH_tx1som_e1_YB"    value="JNSH_tx1som_e1_YA - 2.*JNSH_tx1som_e1_XA*GENV_Si225" />
+<var  name="JNSH_tx1som_e1_XC"    value="JNSH_tx1som_e1_YB" />
+<var  name="JNSH_tx1som_e1_YC"    value="JNSH_tx1som_e1_XB" />
+<var  name="JNSH_tx1som_e1_XD"    value="JNSH_tx1som_e1_YA" />
+<var  name="JNSH_tx1som_e1_YD"    value="JNSH_tx1som_e1_XA" />
+
+<gvxysxy     name="JNSH_tx1som_element1_basic"         material="ShieldIron"   dZ="JNSH_TX1SO1iLe"  >
+  <gvxy_point  X_Y="  JNSH_tx1som_e1_XD  ; JNSH_tx1som_e1_YD  "   />
+  <gvxy_point  X_Y="  JNSH_tx1som_e1_XC  ; JNSH_tx1som_e1_YC  "   />
+  <gvxy_point  X_Y="  JNSH_tx1som_e1_XB  ; JNSH_tx1som_e1_YB  "   />
+  <gvxy_point  X_Y="  JNSH_tx1som_e1_XA  ; JNSH_tx1som_e1_YA  "   />
+</gvxysxy>
+<tubs   name="JNSH_tx1som_element6_cutout"    material="ShieldIron"    Rio_Z="0. ; JNSH_TX1SO1iRa ; 2.*JNSH_TX1SO1iLe"/>
+<subtraction  name="JNSH_tx1som_element1" >
+  <posXYZ  volume="JNSH_tx1som_element1_basic"    X_Y_Z=" 0. ; 0. ; 0. "  rot="   0. ; 0. ; 0."  />
+  <posXYZ  volume="JNSH_tx1som_element6_cutout"   X_Y_Z=" 0. ; 0. ; 0. "  rot="   0. ; 0. ; 0."  />
+</subtraction>
+
+<tubs   name="JNSH_tx1som_element6"    material="ShieldIron"    Rio_Z="JNSH_TX1SO1iRa ; JNSH_TX1SO6oRa ; JNSH_TX1SO6iLe"/>
+
+
+<!-- +++++++++++++++++++++++++++++++++++++++++++++++++ -->
+<!--  JF and JN Shield Composition of volumes          -->
+<!-- +++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+<composition  name="JFSH_ShieldElements" >
+  <posXYZ  volume="JFSH_JFCCylinder"        X_Y_Z="0.;0.;JFSH_JFCMCzpo_JFCMainCylinder_Z"                         rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_Assembly"    X_Y_Z="0.;-4340; JFSH_JFCMCzpo_JFCMainCylinder_Z+JFSH_AFconnexion2+110."                rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_JFSOctogon"         X_Y_Z="0.;0.;JFSH_JFSOCzpo_JFSOctogon_Z"                              rot="0.;0.;0." />
+  <posXYZ  volume="JNSH_tx1stm_element1"    X_Y_Z="0.;0.;JNSH_TX1e1zpo_tx1stm_element1_Z"                         rot="0.;0.;0." />
+  <posXYZ  volume="JNSH_tx1stm_element2"    X_Y_Z="0.;0.;JNSH_TX1e2zpo_tx1stm_element2_Z"                         rot="0.;0.;0." />
+  <posXYZ  volume="JNSH_tx1stm_element3"    X_Y_Z="0.;0.;JNSH_TX1e3zpo_tx1stm_element3_Z"                         rot="0.;0.;0." />
+  <posXYZ  volume="JNSH_tx1som_element6"    X_Y_Z="0.;0.;JNSH_TX1SO6zpo_tx1som_element6_Z"                        rot="0.;0.;0." />
+  <posXYZ  volume="JNSH_tx1som_element1"    X_Y_Z="0.;0.;JNSH_TX1SO1zpo_tx1som_element1_Z"                        rot="0.;0.;0." />
+</composition>
+
+
+<composition  name="JFSH_Shield" >
+  <posXYZ  volume="JFSH_ShieldElements"    X_Y_Z="0.;0.; JFSH_ECTnomiz_ECT_Nominal_zpos"     rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_ShieldElements"    X_Y_Z="0.;0.;-JFSH_ECTnomiz_ECT_Nominal_zpos"     rot="0.;JFSH_rot180;0." />
+</composition>
+
+<!--  JD Disk Shielding  -->
+
+<!--  Useful variables  -->
+
+<var  name="JDSH_XYZrefpt_XYZReferencePoint"            value="    0." />  <!-- NO CONFIRMATION NEEDED -->
+<var  name="JDSH_rota180d_180degRotation"               value="  180." />  <!-- NO CONFIRMATION NEEDED -->
+
+<!--  Primary variables  -->
+
+<!--  data from ATCZ____0005  -->
+<var  name="JDSH_NomiZpos_Nominal_zpos"                 value=" 6784." />  <!-- ATL-MH-ER-0024 -->
+<!-- <var  name="JDSH_NomiZpos_Nominal_zpos"                 value=" 6650." /> -->
+
+<!--  Front Disk and Back Disk  -->
+
+<!-- BEGIN confirmation with atljd___0046-vAE (if no other comment) -->
+<var  name="JDSH_FDinnRad_FrontDisk_innerRadius"        value="  750." />
+<var  name="JDSH_FDoutRad_FrontDisk_outerRadius"        value=" 2700." />
+<var  name="JDSH_FDthickn_FrontDisk_thickness"          value="   50." />
+<!-- END confirmation with atljd___0046-vAE -->
+<var  name="JDSH_BDinnRad_BackDisk_innerRadius"         value="  540." />  <!-- NO CONFIRMATION POSSIBLE -->
+
+<!-- BEGIN confirmation with atljd___0100-vAD (if no other comment) -->
+<var  name="JDSH_BDhatohi_BackDisk_halftotalhight"      value=" 4360.  " />
+<var  name="JDSH_BDlophhi_BackDisk_lowparthalfhight"    value=" 1325.5 " />
+<var  name="JDSH_BDcutdia_BackDisk_cutoutdiameter"      value="  400.  " />  <!-- confirmed atljd___0103-vAD -->
+<var  name="JDSH_BDtbyoff_BackDisk_totbottomyoffset"    value="  432.  " />
+<var  name="JDSH_BDpbyoff_BackDisk_partbottomyoffset"   value="  223.  " />
+<var  name="JDSH_BDhedlen_BackDisk_halfedgelength"      value="  867.  " />
+<var  name="JDSH_BDloedle_BackDisk_loweredgelength"     value=" 1830.  " />
+<var  name="JDSH_BDfeyend_BackDisk_feetyend"            value=" 3370.  " />
+<var  name="JDSH_BDcuxoff_BackDisk_cutxoffset"          value=" 1400.  " />  <!-- confirmed atljd___0103-vAD -->
+<var  name="JDSH_BDcuyoff_BackDisk_cutyoffsetfromtop"   value="  930.  " />  <!-- confirmed atljd___0103-vAD -->
+<var  name="JDSH_BDfecaxo_BackDisk_feetcavityxoffset"   value="  108.  " />
+<var  name="JDSH_BDfeplhi_BackDisk_feetplatehight"      value="   50.  " />
+<var  name="JDSH_BackDisk_angle"                        value="   32.  " />
+<!-- END confirmation with atljd___0100-vAD -->
+
+<!-- BEGIN confirmation with atljd___0028-vAC (if no other comment) -->
+<var  name="JDSH_BDRRouRa_RetrunRing_outerRadius"       value=" 4220." />
+<var  name="JDSH_BDthickn_BackDisk_thickness"           value="   80." />
+
+
+<!--  Cone Assembly  -->
+
+<var  name="JDSH_CABCinRa_BrassCone_innerRadius"        value="  530." />
+<var  name="JDSH_CABCouRa_BrassCone_outerRadius"        value=" 1600." />
+<!-- END confirmation with atljd___0028-vAC -->
+
+<!-- BEGIN confirmation with atljd___0063-vAE (if no other comment) -->
+<var  name="JDSH_CABCthi1_BrassCone_thickness_inter1"   value="    5." />
+<var  name="JDSH_CABCthic_BrassCone_thickness"          value="  260." />
+<var  name="JDSH_CABCslAn_BrassCone_slopeAngle"         value="   10." />
+<var  name="JDSH_CABCslLe_BrassCone_slopeLength"        value="  900." />
+<!-- END confirmation with atljd___0063-vAE -->
+
+<!-- BEGIN confirmation with atljd___0069-vAC (if no other comment) -->
+<var  name="JDSH_CALCthic_LeadCone_thickness"           value="   30." />
+<var  name="JDSH_CALCleng_LeadCone_length"              value="  888." />
+<var  name="JDSH_CALCwidt_LeadCone_width"               value="  629." />
+<!-- END confirmation with atljd___0069-vAC -->
+
+<!-- BEGIN confirmation with atljd___0066-vAA (if no other comment) -->
+<var  name="JDSH_CAPCthic_PolyCone_thickness"           value="   70." />
+<var  name="JDSH_CAPCleng_PolyCone_length"              value="  900." />
+<var  name="JDSH_CAPCwidt_PolyCone_width"               value="  634." />
+<var  name="JDSH_CACOprAn_Cone_projectiveAngle"         value=" 11.25" />
+<array  name="JDSH_CACOangz"                            values="-90.;-67.5;-45.;-22.5;0.;22.5;45.;67.5;90.;112.5;135.;157.5;180.;-157.5;-135.;-112.5"/>  <!-- NO CONFIRMATION POSSIBLE -->
+<var  name="JDSH_CACOangx_ConeAssembly_angx"            value="-10." />
+<!-- END confirmation with atljd___0066-vAA -->
+
+<!-- BEGIN confirmation with atljd___0081-vAI (if no other comment) -->
+<var  name="JDSH_TUBEinRa_Tube_innerRadius"             value="  430." />  <!-- NO CONFIRMATION POSSIBLE -->
+<var  name="JDSH_TUBEOuR1_Tube_OuterRadius1"            value="  730." />
+<var  name="JDSH_TUBEOuR2_Tube_OuterRadius2"            value="  530." />
+<var  name="JDSH_TUBEslen_Tube_shortlength"             value="   49." />
+<var  name="JDSH_TUBEleng_Tube_length"                  value=" 2105." />
+<!-- END confirmation with atljd___0081-vAI -->
+
+<!--  data from ATLJT___0036  -->
+<var  name="JDSH_PLUGinR1_Plug_innerRadius1"            value="  129. " />  <!-- NO CONFIRMATION POSSIBLE -->
+<var  name="JDSH_PLUGouRa_Plug_OuterRadius"             value="  428. " />  <!-- NO CONFIRMATION POSSIBLE -->
+<var  name="JDSH_PLUGleng_Plug_length"                  value=" 2105. " />  <!-- confirmed atljd___0081-vAI -->
+<var  name="JDSH_PLUGtiAn_Plug_tiltAngle"               value="    1.1" />  <!-- NO CONFIRMATION POSSIBLE -->
+
+<!-- BEGIN confirmation with atljd___0035-vAK (if no other comment) -->
+<var  name="JDSH_SWHinnRa_SmallWheelHub_innerRadius"    value="  540. " />
+<var  name="JDSH_SWHoutR1_SmallWheelHub_outerRadius1"   value="  764. " />
+<var  name="JDSH_SWHoutR2_SmallWheelHub_outerRadius2"   value="  850. " />
+<var  name="JDSH_SWHlengt_SmallWheelHub_length"         value="  700. " />
+<!-- END confirmation with atljd___0035-vAK -->
+
+<var  name="JDSH_SWHPthic_SmallWheelHub_Polythickness"  value="   50. " /> <!-- confirmed atljd___0112 -->
+<var  name="JDSH_SWHLthic_SmallWheelHub_Leadthickness"  value="   30. " /> <!-- confirmed atljd___0113 -->
+
+<!-- BEGIN confirmation with atljd___0031-vAD (if no other comment) -->
+<var  name="JDSH_MaRiFefxl_MainRibFeet_feetxlength"    value="  358. " />
+<var  name="JDSH_MaRiFefyo_MainRibFeet_feetyoffset"    value="  100. " />
+<var  name="JDSH_MaRiFelol_MainRibFeet_lowerlength"    value=" 2737. " />
+<var  name="JDSH_MaRiFeupl_MainRibFeet_upperlength"    value=" 2923. " />
+<var  name="JDSH_MaRiFuxle_MainRibFull_xlength"        value=" 3185. " />
+<var  name="JDSH_MaRiFuyle_MainRibFull_ylength"        value=" 3950. " />
+<var  name="JDSH_MaRiFeaxy_MainRibFeet_anglexyplane"   value="   58. " />
+<var  name="JDSH_MaRiFeayz_MainRibFeet_angleyzplane"   value="   -6. " />
+<var  name="JDSH_MaRiFeata_MainRibFeet_attribangle"    value="   30. " />
+<var  name="JDSH_MaRiFemad_MainRibFeet_mainwidth"      value="  250. " />
+<var  name="JDSH_MaRiFewzw_MainRibFeet_wholezwidth"    value="  517. " />
+<var  name="JDSH_MaRiFeozw_MainRibFeet_offsetzwidth"   value="  180. " />
+<var  name="JDSH_MaRiFeazo_MainRibFeet_attribzoffset"  value="   40. " />
+<var  name="JDSH_MaRiFeazw_MainRibFeet_attribzwidth"   value="  150. " />
+<var  name="JDSH_MaRiFerao_MainRibFeet_radialoffset"   value=" 1000. + 10. " />  <!-- sum to avoid overlap, reasonalbe due to many approx. in this region -->
+<var  name="JDSH_MaRiFeatw_MainRibFeet_attribwidth"    value="  830. " />
+<var  name="JDSH_MaRiFearw_MainRibFeet_attredwidth"    value="  605. " />  <!-- confirmed atljd___0065-vAA -->
+<var  name="JDSH_MainRibFeet_PosX"                     value=" 3185. " />
+<var  name="JDSH_MainRibFeet_PosY"                     value="-3950. " />
+<!-- END confirmation with atljd___0031-vAD -->
+
+<!--  Derived variables  -->
+
+<var  name="JDSH_FDzposit_FrontDisk_Z"      value="JDSH_XYZrefpt_XYZReferencePoint + JDSH_FDthickn_FrontDisk_thickness/2. " />
+<var  name="JDSH_BDzposit_BackDisk_Z"       value="JDSH_FDzposit_FrontDisk_Z  + JDSH_FDthickn_FrontDisk_thickness/2.   + JDSH_BDthickn_BackDisk_thickness/2. " />
+<var  name="JDSH_CAzposit_ConeAssembly_Z"   value="JDSH_BDzposit_BackDisk_Z   + JDSH_BDthickn_BackDisk_thickness/2. " />
+<var  name="JDSH_TUBEzpos_Tube_Z"           value="JDSH_XYZrefpt_XYZReferencePoint" />
+<var  name="JDSH_PLUGzpos_Plug_Z"           value="JDSH_XYZrefpt_XYZReferencePoint" />
+<var  name="JDSH_SWHzposi_SmallWheelHub_Z"  value="JDSH_CAzposit_ConeAssembly_Z + JDSH_CABCthic_BrassCone_thickness" />
+
+<var  name="JDSH_CABCouR1_BrassCone_outerRadius1"      value="JDSH_CABCouRa_BrassCone_outerRadius - JDSH_CABCslLe_BrassCone_slopeLength * cos(JDSH_CABCslAn_BrassCone_slopeAngle*GENV_PiS180)" />
+<var  name="JDSH_CABCthi2_BrassCone_thickness2"        value="JDSH_CABCthi1_BrassCone_thickness_inter1 + JDSH_CABCslLe_BrassCone_slopeLength * sin(JDSH_CABCslAn_BrassCone_slopeAngle*GENV_PiS180)" />
+<var  name="JDSH_CABCouR2_BrassCone_outerRadius2"      value="JDSH_CABCouR1_BrassCone_outerRadius1 + (JDSH_CABCthic_BrassCone_thickness-JDSH_CABCthi2_BrassCone_thickness2) * tan(JDSH_CABCslAn_BrassCone_slopeAngle*GENV_PiS180)" />
+
+<var  name="JDSH_LCAxbpos_LeadConeAssembly_XB"        value=" JDSH_CALCwidt_LeadCone_width/2." />
+<var  name="JDSH_LCAybpos_LeadConeAssembly_YB"        value=" JDSH_CALCleng_LeadCone_length" />
+<var  name="JDSH_LCAxapos_LeadConeAssembly_XA"        value=" JDSH_LCAxbpos_LeadConeAssembly_XB - JDSH_CALCleng_LeadCone_length*tan(JDSH_CACOprAn_Cone_projectiveAngle*GENV_PiS180) " />
+<var  name="JDSH_LCAyapos_LeadConeAssembly_YA"        value=" 0." />
+
+<var  name="JDSH_PCAxbpos_PolyConeAssembly_XB"        value=" JDSH_CAPCwidt_PolyCone_width/2." />
+<var  name="JDSH_PCAybpos_PolyConeAssembly_YB"        value=" JDSH_CAPCleng_PolyCone_length" />
+<var  name="JDSH_PCAxapos_PolyConeAssembly_XA"        value=" JDSH_PCAxbpos_PolyConeAssembly_XB - JDSH_CAPCleng_PolyCone_length*tan(JDSH_CACOprAn_Cone_projectiveAngle*GENV_PiS180) " />
+<var  name="JDSH_PCAyapos_PolyConeAssembly_YA"        value=" 0." />
+
+<var  name="JDSH_CALCradi_LeadCone_Radius"      value="JDSH_CABCouR2_BrassCone_outerRadius2 - (JDSH_CALCthic_LeadCone_thickness/2.)*sin(JDSH_CABCslAn_BrassCone_slopeAngle*GENV_PiS180) " />
+<var  name="JDSH_CALCposz_LeadCone_posz"        value="JDSH_CABCthic_BrassCone_thickness - (JDSH_CALCthic_LeadCone_thickness/2.)*cos(JDSH_CABCslAn_BrassCone_slopeAngle*GENV_PiS180) - cos((JDSH_CACOangx_ConeAssembly_angx+90.)*GENV_PiS180) * (JDSH_LCAybpos_LeadConeAssembly_YB-JDSH_LCAyapos_LeadConeAssembly_YA)/2." />
+
+<var  name="JDSH_CAPCradi_PolyCone_Radius"      value="JDSH_CABCouR2_BrassCone_outerRadius2 - (JDSH_CALCthic_LeadCone_thickness+JDSH_CAPCthic_PolyCone_thickness/2.)*sin(JDSH_CABCslAn_BrassCone_slopeAngle*GENV_PiS180) " />
+<var  name="JDSH_CAPCposz_PolyCone_posz"        value="JDSH_CABCthic_BrassCone_thickness - (JDSH_CALCthic_LeadCone_thickness+JDSH_CAPCthic_PolyCone_thickness/2.)*cos(JDSH_CABCslAn_BrassCone_slopeAngle*GENV_PiS180) - cos((JDSH_CACOangx_ConeAssembly_angx+90.)*GENV_PiS180) * (JDSH_PCAybpos_PolyConeAssembly_YB-JDSH_PCAyapos_PolyConeAssembly_YA)/2. " />
+
+<var  name="JDSH_i1"      value="JDSH_CALCradi_LeadCone_Radius+(JDSH_LCAybpos_LeadConeAssembly_YB-JDSH_LCAyapos_LeadConeAssembly_YA)/2.*cos(JDSH_CABCslAn_BrassCone_slopeAngle*GENV_PiS180)" />
+<array name="JDSH_LCApx" values="JDSH_i1;JDSH_i1*GENV_Co225;JDSH_i1*GENV_Co45;JDSH_i1*GENV_Si225;0.;-JDSH_i1*GENV_Si225;-JDSH_i1*GENV_Co45;-JDSH_i1*GENV_Co225;-JDSH_i1;-JDSH_i1*GENV_Co225;-JDSH_i1*GENV_Co45;-JDSH_i1*GENV_Si225;0.;JDSH_i1*GENV_Si225;JDSH_i1*GENV_Co45;JDSH_i1*GENV_Co225"/>
+<array name="JDSH_LCApy" values="0.;JDSH_i1*GENV_Si225;JDSH_i1*GENV_Si45;JDSH_i1*GENV_Co225;JDSH_i1;JDSH_i1*GENV_Co225;JDSH_i1*GENV_Si45;JDSH_i1*GENV_Si225;0;-JDSH_i1*GENV_Si225;-JDSH_i1*GENV_Si45;-JDSH_i1*GENV_Co225;-JDSH_i1;-JDSH_i1*GENV_Co225;-JDSH_i1*GENV_Si45;-JDSH_i1*GENV_Si225"/>
+
+<var  name="JDSH_i2"      value="JDSH_CAPCradi_PolyCone_Radius+(JDSH_PCAybpos_PolyConeAssembly_YB-JDSH_PCAyapos_PolyConeAssembly_YA)/2.*cos(JDSH_CABCslAn_BrassCone_slopeAngle*GENV_PiS180)" />
+<array name="JDSH_PCApx" values="JDSH_i2;JDSH_i2*GENV_Co225;JDSH_i2*GENV_Co45;JDSH_i2*GENV_Si225;0.;-JDSH_i2*GENV_Si225;-JDSH_i2*GENV_Co45;-JDSH_i2*GENV_Co225;-JDSH_i2;-JDSH_i2*GENV_Co225;-JDSH_i2*GENV_Co45;-JDSH_i2*GENV_Si225;0.;JDSH_i2*GENV_Si225;JDSH_i2*GENV_Co45;JDSH_i2*GENV_Co225"/>
+<array name="JDSH_PCApy" values="0.;JDSH_i2*GENV_Si225;JDSH_i2*GENV_Si45;JDSH_i2*GENV_Co225;JDSH_i2;JDSH_i2*GENV_Co225;JDSH_i2*GENV_Si45;JDSH_i2*GENV_Si225;0.;-JDSH_i2*GENV_Si225;-JDSH_i2*GENV_Si45;-JDSH_i2*GENV_Co225;-JDSH_i2;-JDSH_i2*GENV_Co225;-JDSH_i2*GENV_Si45;-JDSH_i2*GENV_Si225"/>
+
+<var  name="JDSH_PLUGinR2_Plug_innerRadius2"       value=" JDSH_PLUGinR1_Plug_innerRadius1 + JDSH_PLUGleng_Plug_length *tan(JDSH_PLUGtiAn_Plug_tiltAngle*GENV_PiS180)" />
+
+<!-- Modelization of Volumes  -->
+
+<!-- Modelization of Front and Back disks  -->
+<tubs   name="JDSH_FrontDisk"   material="ShieldSteel"  Rio_Z="JDSH_FDinnRad_FrontDisk_innerRadius; JDSH_FDoutRad_FrontDisk_outerRadius; JDSH_FDthickn_FrontDisk_thickness" />
+
+<box    name="JDSH_BackDisk_CutBox1"   material="ShieldSteel"  X_Y_Z=" 2.*JDSH_BDlophhi_BackDisk_lowparthalfhight            ; JDSH_BDcutdia_BackDisk_cutoutdiameter                 ; 2.*JDSH_BDthickn_BackDisk_thickness"  />
+<tubs   name="JDSH_BackDisk_InnerTube" material="ShieldSteel"  Rio_Z=" 0. ; JDSH_BDinnRad_BackDisk_innerRadius ; 2*JDSH_BDthickn_BackDisk_thickness"  />
+<tubs   name="JDSH_BackDisk_CutTube"   material="ShieldSteel"  Rio_Z=" 0. ; JDSH_BDcutdia_BackDisk_cutoutdiameter/2. ; 2.*JDSH_BDthickn_BackDisk_thickness"  />
+
+<var name="JDSH_BD_GVXYPOS_posX3" value="GENV_Co225 * JDSH_BDloedle_BackDisk_loweredgelength + JDSH_BDhedlen_BackDisk_halfedgelength + GENV_Ta225 * ( GENV_Si225*JDSH_BDloedle_BackDisk_loweredgelength - (JDSH_BDhatohi_BackDisk_halftotalhight - (JDSH_BDhedlen_BackDisk_halfedgelength + 2.*JDSH_BDlophhi_BackDisk_lowparthalfhight + JDSH_BDtbyoff_BackDisk_totbottomyoffset) ) )"/>
+
+<gvxysx name="JDSH_BackDisk_tmp" material="ShieldSteel"   dZ="JDSH_BDthickn_BackDisk_thickness">
+  <gvxy_point  X_Y="JDSH_BDhedlen_BackDisk_halfedgelength; -JDSH_BDhatohi_BackDisk_halftotalhight "   />
+  <gvxy_point  X_Y="GENV_Co225 * JDSH_BDloedle_BackDisk_loweredgelength + JDSH_BDhedlen_BackDisk_halfedgelength; GENV_Si225*JDSH_BDloedle_BackDisk_loweredgelength-JDSH_BDhatohi_BackDisk_halftotalhight "   />
+  <gvxy_point  X_Y="JDSH_BD_GVXYPOS_posX3; - JDSH_BDhedlen_BackDisk_halfedgelength - 2.*JDSH_BDlophhi_BackDisk_lowparthalfhight - JDSH_BDtbyoff_BackDisk_totbottomyoffset "   />
+  <gvxy_point  X_Y="JDSH_BDfeyend_BackDisk_feetyend; - JDSH_BDhedlen_BackDisk_halfedgelength - 2.*JDSH_BDlophhi_BackDisk_lowparthalfhight - JDSH_BDtbyoff_BackDisk_totbottomyoffset "   />
+  <gvxy_point  X_Y="JDSH_BDfeyend_BackDisk_feetyend; -JDSH_BDhedlen_BackDisk_halfedgelength - 2.*JDSH_BDlophhi_BackDisk_lowparthalfhight - JDSH_BDtbyoff_BackDisk_totbottomyoffset + JDSH_BDfeplhi_BackDisk_feetplatehight "   />
+  <gvxy_point  X_Y="JDSH_BDfeyend_BackDisk_feetyend-JDSH_BDfecaxo_BackDisk_feetcavityxoffset; -JDSH_BDhedlen_BackDisk_halfedgelength - 2.*JDSH_BDlophhi_BackDisk_lowparthalfhight - JDSH_BDtbyoff_BackDisk_totbottomyoffset + JDSH_BDpbyoff_BackDisk_partbottomyoffset "   />
+  <gvxy_point  X_Y="JDSH_BDfeyend_BackDisk_feetyend-JDSH_BDfecaxo_BackDisk_feetcavityxoffset; -JDSH_BDhedlen_BackDisk_halfedgelength - 2.*JDSH_BDlophhi_BackDisk_lowparthalfhight "   />
+  <gvxy_point  X_Y="JDSH_BDhatohi_BackDisk_halftotalhight; -JDSH_BDhedlen_BackDisk_halfedgelength "   />
+  <gvxy_point  X_Y="JDSH_BDhatohi_BackDisk_halftotalhight; JDSH_BDhedlen_BackDisk_halfedgelength "   />
+  <gvxy_point  X_Y="JDSH_BDhatohi_BackDisk_halftotalhight-GENV_Si225*(2.*JDSH_BDhedlen_BackDisk_halfedgelength); JDSH_BDhedlen_BackDisk_halfedgelength + GENV_Co225*(2.*JDSH_BDhedlen_BackDisk_halfedgelength) "   />
+  <gvxy_point  X_Y="JDSH_BDhedlen_BackDisk_halfedgelength + GENV_Co225*(2.*JDSH_BDhedlen_BackDisk_halfedgelength); JDSH_BDhatohi_BackDisk_halftotalhight - GENV_Si225*(2.*JDSH_BDhedlen_BackDisk_halfedgelength) "   />
+  <gvxy_point  X_Y="JDSH_BDhedlen_BackDisk_halfedgelength; JDSH_BDhatohi_BackDisk_halftotalhight "   />
+</gvxysx>
+
+<subtraction name="JDSH_BackDisk">
+  <posXYZ   volume="JDSH_BackDisk_tmp"       X_Y_Z="0. ; 0. ; 0."  />
+  <posXYZ   volume="JDSH_BackDisk_InnerTube" X_Y_Z="0. ; 0. ; 0."  />
+  <posXYZ   volume="JDSH_BackDisk_CutBox1"   X_Y_Z=" JDSH_BDcuxoff_BackDisk_cutxoffset + JDSH_BDlophhi_BackDisk_lowparthalfhight ; JDSH_BDhatohi_BackDisk_halftotalhight-JDSH_BDcuyoff_BackDisk_cutyoffsetfromtop ; 0. "  />
+  <posXYZ   volume="JDSH_BackDisk_CutTube"   X_Y_Z=" JDSH_BDcuxoff_BackDisk_cutxoffset ; JDSH_BDhatohi_BackDisk_halftotalhight-JDSH_BDcuyoff_BackDisk_cutyoffsetfromtop ; 0. "  />
+</subtraction>
+
+<!-- Modelization of Brass Cone Assembly  -->
+<pcon   name="JDSH_BrassConeAssembly"          material="ShieldBrass"  >
+  <polyplane  Rio_Z="JDSH_CABCinRa_BrassCone_innerRadius; JDSH_CABCouRa_BrassCone_outerRadius  ;   0."                                       />
+  <polyplane  Rio_Z="JDSH_CABCinRa_BrassCone_innerRadius; JDSH_CABCouRa_BrassCone_outerRadius  ;   JDSH_CABCthi1_BrassCone_thickness_inter1" />
+  <polyplane  Rio_Z="JDSH_CABCinRa_BrassCone_innerRadius; JDSH_CABCouR1_BrassCone_outerRadius1 ;   JDSH_CABCthi2_BrassCone_thickness2 "      />
+  <polyplane  Rio_Z="JDSH_CABCinRa_BrassCone_innerRadius; JDSH_CABCouR2_BrassCone_outerRadius2 ;   JDSH_CABCthic_BrassCone_thickness "       />
+</pcon>
+
+<pcon   name="JDSH_BrassConeAssembly_NSW"          material="ShieldBrass"  >
+  <polyplane  Rio_Z="JDSH_CABCinRa_BrassCone_innerRadius; JDSH_CABCouRa_BrassCone_outerRadius - 30. ;   0."                                       />
+  <polyplane  Rio_Z="JDSH_CABCinRa_BrassCone_innerRadius; JDSH_CABCouRa_BrassCone_outerRadius - 30. ;   JDSH_CABCthi1_BrassCone_thickness_inter1 + 10." />
+  <polyplane  Rio_Z="JDSH_CABCinRa_BrassCone_innerRadius; JDSH_CABCouR2_BrassCone_outerRadius2 ;   JDSH_CABCthi1_BrassCone_thickness_inter1 + 10." />
+  <polyplane  Rio_Z="JDSH_CABCinRa_BrassCone_innerRadius; JDSH_CABCouR2_BrassCone_outerRadius2 ;   JDSH_CABCthic_BrassCone_thickness "       />
+</pcon>
+
+<!-- Modelization of Lead Cone Element  -->
+<trd name="JDSH_LeadConeAssembly"  material="Lead"  Xmp_Ymp_Z="2.*JDSH_LCAxbpos_LeadConeAssembly_XB; 2.*JDSH_LCAxapos_LeadConeAssembly_XA; JDSH_CALCthic_LeadCone_thickness; JDSH_CALCthic_LeadCone_thickness; JDSH_LCAybpos_LeadConeAssembly_YB-JDSH_LCAyapos_LeadConeAssembly_YA" />
+
+<pcon   name="JDSH_LeadConeAssembly_NSW"          material="Lead"  >
+  <polyplane  Rio_Z="JDSH_CABCouRa_BrassCone_outerRadius - 30. + GENV_Eps ; JDSH_CABCouRa_BrassCone_outerRadius + 5. ; 0." />
+  <polyplane  Rio_Z="JDSH_CABCouRa_BrassCone_outerRadius - 30. + GENV_Eps ; JDSH_CABCouRa_BrassCone_outerRadius + 5. ; JDSH_CAPCthic_PolyCone_thickness-40. + GENV_Eps + JDSH_CABCthi1_BrassCone_thickness_inter1 + 10. + GENV_Eps" />
+  <polyplane  Rio_Z="JDSH_CABCouR2_BrassCone_outerRadius2 + 2.*GENV_Eps + 23.; JDSH_CABCouRa_BrassCone_outerRadius + 5. ; JDSH_CAPCthic_PolyCone_thickness-40. + GENV_Eps + JDSH_CABCthi1_BrassCone_thickness_inter1 + 10. + GENV_Eps" />
+  <polyplane  Rio_Z="JDSH_CABCouR2_BrassCone_outerRadius2 + 2.*GENV_Eps + 23.; JDSH_CABCouRa_BrassCone_outerRadius + 5. ; JDSH_CAPCthic_PolyCone_thickness-40. + GENV_Eps + JDSH_CALCthic_LeadCone_thickness + JDSH_CABCthi1_BrassCone_thickness_inter1 + 10. + GENV_Eps - 17." />
+  <polyplane  Rio_Z="JDSH_CABCouR2_BrassCone_outerRadius2 + 2.*GENV_Eps + 23.; JDSH_SWHoutR1_SmallWheelHub_outerRadius1;   JDSH_CAPCthic_PolyCone_thickness-40. + GENV_Eps + JDSH_CALCthic_LeadCone_thickness + JDSH_CABCthi1_BrassCone_thickness_inter1 + 10. + GENV_Eps - 17." />
+  <polyplane  Rio_Z="JDSH_CABCouR2_BrassCone_outerRadius2 + 2.*GENV_Eps + 23.; JDSH_SWHoutR1_SmallWheelHub_outerRadius1;   JDSH_CABCthic_BrassCone_thickness " />
+</pcon>
+
+<!-- Modelization of Poly Cone Element  -->
+<trd name="JDSH_PolyConeAssembly"  material="PolyBoronB2O3"  Xmp_Ymp_Z="2.*JDSH_PCAxbpos_PolyConeAssembly_XB; 2.*JDSH_PCAxapos_PolyConeAssembly_XA; JDSH_CAPCthic_PolyCone_thickness; JDSH_CAPCthic_PolyCone_thickness; JDSH_PCAybpos_PolyConeAssembly_YB-JDSH_PCAyapos_PolyConeAssembly_YA" />
+
+<pcon   name="JDSH_PolyConeAssembly_NSW"          material="PolyBoronB2O3"  >
+  <polyplane  Rio_Z=" JDSH_CABCouR2_BrassCone_outerRadius2+GENV_Eps; JDSH_CABCouRa_BrassCone_outerRadius - 30.; JDSH_CABCthi1_BrassCone_thickness_inter1 + 10. + GENV_Eps" />
+  <polyplane  Rio_Z=" JDSH_CABCouR2_BrassCone_outerRadius2+GENV_Eps; JDSH_CABCouRa_BrassCone_outerRadius - 30.; JDSH_CABCthi1_BrassCone_thickness_inter1 + 10. + GENV_Eps + JDSH_CAPCthic_PolyCone_thickness-40." />
+  <polyplane  Rio_Z=" JDSH_CABCouR2_BrassCone_outerRadius2+GENV_Eps; JDSH_CABCouR2_BrassCone_outerRadius2 + GENV_Eps + 23.; JDSH_CABCthi1_BrassCone_thickness_inter1 + 10. + GENV_Eps + JDSH_CAPCthic_PolyCone_thickness-40." />
+  <polyplane  Rio_Z=" JDSH_CABCouR2_BrassCone_outerRadius2+GENV_Eps; JDSH_CABCouR2_BrassCone_outerRadius2 + GENV_Eps + 23.; JDSH_CABCthic_BrassCone_thickness" />
+</pcon>
+
+<!-- Composition of JD Cone Assembly  -->
+<composition  name="JDSH_ConeAssembly" >
+  <posXYZ  volume="JDSH_BrassConeAssembly"   X_Y_Z="0.;0.;0."      rot="0.;0.;0." />
+  <foreach  index="I"  begin="0"  loops="16" >
+    <posXYZ  volume="JDSH_LeadConeAssembly"       X_Y_Z="  JDSH_LCApx[I];JDSH_LCApy[I];JDSH_CALCposz_LeadCone_posz"   rot="JDSH_CACOangx_ConeAssembly_angx+90.;0.;JDSH_CACOangz[I]" />
+    <posXYZ  volume="JDSH_PolyConeAssembly"       X_Y_Z="  JDSH_PCApx[I];JDSH_PCApy[I];JDSH_CAPCposz_PolyCone_posz"   rot="JDSH_CACOangx_ConeAssembly_angx+90.;0.;JDSH_CACOangz[I]" />
+  </foreach>
+</composition>
+
+<composition  name="JDSH_ConeAssembly_NSW" >
+  <posXYZ  volume="JDSH_BrassConeAssembly_NSW"   X_Y_Z="  0.; 0.; 0."   rot="0.;0.;0." />
+  <posXYZ  volume="JDSH_LeadConeAssembly_NSW"    X_Y_Z="  0.; 0.; 0."   rot="0.;0.;0." />
+  <posXYZ  volume="JDSH_PolyConeAssembly_NSW"    X_Y_Z="  0.; 0.; 0."   rot="0.;0.;0." />
+</composition>
+
+<!-- Modelization of JD Tube -->
+<pcon   name="JDSH_Tube"          material="ShieldSteel"  >
+  <polyplane  Rio_Z="JDSH_TUBEinRa_Tube_innerRadius;JDSH_TUBEOuR1_Tube_OuterRadius1;0." />
+  <polyplane  Rio_Z="JDSH_TUBEinRa_Tube_innerRadius;JDSH_TUBEOuR1_Tube_OuterRadius1;JDSH_TUBEslen_Tube_shortlength" />
+  <polyplane  Rio_Z="JDSH_TUBEinRa_Tube_innerRadius;JDSH_TUBEOuR2_Tube_OuterRadius2;JDSH_TUBEslen_Tube_shortlength+1." />
+  <polyplane  Rio_Z="JDSH_TUBEinRa_Tube_innerRadius;JDSH_TUBEOuR2_Tube_OuterRadius2;JDSH_TUBEleng_Tube_length" />
+</pcon>
+<pcon name="JDSH_Plug" material="ShieldBrass" >
+  <polyplane Rio_Z="JDSH_PLUGinR2_Plug_innerRadius2;JDSH_PLUGouRa_Plug_OuterRadius;0." />
+  <polyplane Rio_Z="JDSH_PLUGinR1_Plug_innerRadius1;JDSH_PLUGouRa_Plug_OuterRadius;JDSH_PLUGleng_Plug_length" />
+</pcon>
+<pcon name="JDSH_SmallWheelHub" material="ShieldBrass" >
+  <polyplane Rio_Z="JDSH_SWHinnRa_SmallWheelHub_innerRadius;JDSH_SWHoutR1_SmallWheelHub_outerRadius1;0." />
+  <polyplane Rio_Z="JDSH_SWHinnRa_SmallWheelHub_innerRadius;JDSH_SWHoutR2_SmallWheelHub_outerRadius2;JDSH_SWHlengt_SmallWheelHub_length" />
+</pcon>
+
+<tubs   name="JDSH_SmallWheelHub_NSW"    material="ShieldBrass"    Rio_Z="JDSH_SWHinnRa_SmallWheelHub_innerRadius ; JDSH_SWHoutR1_SmallWheelHub_outerRadius1 - JDSH_SWHPthic_SmallWheelHub_Polythickness - JDSH_SWHLthic_SmallWheelHub_Leadthickness ; JDSH_SWHlengt_SmallWheelHub_length"/>
+
+<pcon name="JDSH_SmallWheelHubPoly" material="PolyBoronB2O3" >
+  <polyplane Rio_Z="JDSH_SWHoutR1_SmallWheelHub_outerRadius1 + GENV_Eps; JDSH_SWHoutR1_SmallWheelHub_outerRadius1 + JDSH_SWHPthic_SmallWheelHub_Polythickness; 0." />
+  <polyplane Rio_Z="JDSH_SWHoutR2_SmallWheelHub_outerRadius2 + GENV_Eps; JDSH_SWHoutR2_SmallWheelHub_outerRadius2 + JDSH_SWHPthic_SmallWheelHub_Polythickness; JDSH_SWHlengt_SmallWheelHub_length" />
+</pcon>
+
+<tubs   name="JDSH_SmallWheelHubPoly_NSW" material="PolyBoronB2O3"    Rio_Z="JDSH_SWHoutR1_SmallWheelHub_outerRadius1 - JDSH_SWHPthic_SmallWheelHub_Polythickness - JDSH_SWHLthic_SmallWheelHub_Leadthickness + GENV_Eps ; JDSH_SWHoutR1_SmallWheelHub_outerRadius1 - JDSH_SWHLthic_SmallWheelHub_Leadthickness ; JDSH_SWHlengt_SmallWheelHub_length"/>
+
+<pcon name="JDSH_SmallWheelHubLead" material="Lead" >
+  <polyplane Rio_Z="JDSH_SWHoutR1_SmallWheelHub_outerRadius1 + JDSH_SWHPthic_SmallWheelHub_Polythickness + GENV_Eps; JDSH_SWHoutR1_SmallWheelHub_outerRadius1 + JDSH_SWHPthic_SmallWheelHub_Polythickness + JDSH_SWHLthic_SmallWheelHub_Leadthickness; 0." />
+  <polyplane Rio_Z="JDSH_SWHoutR2_SmallWheelHub_outerRadius2 + JDSH_SWHPthic_SmallWheelHub_Polythickness + GENV_Eps; JDSH_SWHoutR2_SmallWheelHub_outerRadius2 + JDSH_SWHPthic_SmallWheelHub_Polythickness + JDSH_SWHLthic_SmallWheelHub_Leadthickness; JDSH_SWHlengt_SmallWheelHub_length" />
+</pcon>
+
+<tubs   name="JDSH_SmallWheelHubLead_NSW" material="Lead"    Rio_Z="JDSH_SWHoutR1_SmallWheelHub_outerRadius1 - JDSH_SWHLthic_SmallWheelHub_Leadthickness + GENV_Eps ; JDSH_SWHoutR1_SmallWheelHub_outerRadius1 ; JDSH_SWHlengt_SmallWheelHub_length"/>
+
+<!-- +++++++++++++++++++++++++++++++++++++++++++++++++ -->
+<!--  JD Shield Feet                                   -->
+<!-- +++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+<var name="JDSH_MaRiFefxo_MainRibFeet_feetxoffset"  value="JDSH_MaRiFefxl_MainRibFeet_feetxlength - JDSH_MaRiFemad_MainRibFeet_mainwidth/sin(JDSH_MaRiFeaxy_MainRibFeet_anglexyplane*GENV_PiS180)" />
+<var name="JDSH_MaRiFeulp_MainRibFeet_upplenpro"    value="JDSH_MaRiFeupl_MainRibFeet_upperlength*sin(JDSH_MaRiFeaxy_MainRibFeet_anglexyplane*GENV_PiS180)" />
+<var name="JDSH_MaRiFellp_MainRibFeet_lowlenpro"    value="JDSH_MaRiFelol_MainRibFeet_lowerlength*cos(JDSH_MaRiFeaxy_MainRibFeet_anglexyplane*GENV_PiS180)" />
+<var name="JDSH_MaRiFeulp_MainRibFeet_upplenpro2"   value="JDSH_MaRiFeupl_MainRibFeet_upperlength*cos(JDSH_MaRiFeaxy_MainRibFeet_anglexyplane*GENV_PiS180)" />
+<var name="JDSH_MaRiFellp_MainRibFeet_lowlenpro2"   value="JDSH_MaRiFelol_MainRibFeet_lowerlength*sin(JDSH_MaRiFeaxy_MainRibFeet_anglexyplane*GENV_PiS180)" />
+<var name="JDSH_MaRiFetca_MainRibFeet_topcutangel"  value="(asin((cos(JDSH_MaRiFeaxy_MainRibFeet_anglexyplane*GENV_PiS180) * JDSH_MaRiFeupl_MainRibFeet_upperlength -JDSH_MaRiFellp_MainRibFeet_lowlenpro - JDSH_MaRiFemad_MainRibFeet_mainwidth / sin(JDSH_MaRiFeaxy_MainRibFeet_anglexyplane*GENV_PiS180)) / JDSH_MaRiFemad_MainRibFeet_mainwidth))" />
+
+<!-- arbitrary parameters for cutting boxes -->
+<var name="JDSH_MaRiCB1xw_MainCutBox1_xwidth"  value="  200. " />
+<var name="JDSH_MaRiCB1yw_MainCutBox1_ywidth"  value="  120. " />
+<var name="JDSH_MaRiCuBzw_MainCutBox_zwidth"   value="  600. " />
+<var name="JDSH_MaRiCB2xw_MainCutBox2_xwidth"  value=" 2000. " />
+<var name="JDSH_MaRiCB2yw_MainCutBox2_ywidth"  value=" JDSH_MaRiFuyle_MainRibFull_ylength " />
+<var name="JDSH_MaRiCB3yw_MainCutBox3_ywidth"  value=" JDSH_MaRiFelol_MainRibFeet_lowerlength" />
+<var name="JDSH_MaRiCB3xw_MainCutBox3_xwidth"  value=" 3000. " />
+<var name="JDSH_MaRiCB4yw_MainCutBox4_ywidth"  value=" 4000. " />
+
+<box name="JDSH_MainRib_basis"    material="ShieldIron"  X_Y_Z="JDSH_MaRiFuxle_MainRibFull_xlength; JDSH_MaRiFuyle_MainRibFull_ylength; JDSH_MaRiFewzw_MainRibFeet_wholezwidth" />
+
+<box name="JDSH_MainRib_cutbox1"  material="ShieldIron"  X_Y_Z="JDSH_MaRiCB1xw_MainCutBox1_xwidth; JDSH_MaRiCB1yw_MainCutBox1_ywidth; JDSH_MaRiCuBzw_MainCutBox_zwidth" />
+<box name="JDSH_MainRib_cutbox2"  material="ShieldIron"  X_Y_Z="JDSH_MaRiCB2xw_MainCutBox2_xwidth; JDSH_MaRiCB2yw_MainCutBox2_ywidth; JDSH_MaRiFewzw_MainRibFeet_wholezwidth" />
+<box name="JDSH_MainRib_cutbox3"  material="ShieldIron"  X_Y_Z="JDSH_MaRiCB3xw_MainCutBox3_xwidth; JDSH_MaRiCB3yw_MainCutBox3_ywidth; JDSH_MaRiCuBzw_MainCutBox_zwidth" />
+<box name="JDSH_MainRib_cutbox4"  material="ShieldIron"  X_Y_Z="JDSH_MaRiCB3xw_MainCutBox3_xwidth; JDSH_MaRiCB4yw_MainCutBox4_ywidth; JDSH_MaRiCuBzw_MainCutBox_zwidth" />
+<box name="JDSH_MainRib_cutbox5"  material="ShieldIron"  X_Y_Z="JDSH_MaRiCB2xw_MainCutBox2_xwidth; JDSH_MaRiCB2yw_MainCutBox2_ywidth; JDSH_MaRiCuBzw_MainCutBox_zwidth" />
+
+<var name="JDSH_MainRib_basis_PosX"  value="(JDSH_MaRiFuxle_MainRibFull_xlength)/2." />
+<var name="JDSH_MainRib_basis_PosY"  value="(JDSH_MaRiFuyle_MainRibFull_ylength)/2." />
+<var name="JDSH_MainRib_basis_PosZ"  value="JDSH_MaRiFewzw_MainRibFeet_wholezwidth/2." />
+
+<var name="JDSH_MainRib_cb1_PosX1"  value="JDSH_MaRiFefxo_MainRibFeet_feetxoffset - JDSH_MaRiCB1xw_MainCutBox1_xwidth/2. " />
+<var name="JDSH_MainRib_cb1_PosY1"  value="JDSH_MaRiFefyo_MainRibFeet_feetyoffset + JDSH_MaRiCB1yw_MainCutBox1_ywidth/2." />
+
+<var name="JDSH_MainRib_cb1_PosX2"  value="JDSH_MaRiFefxl_MainRibFeet_feetxlength + JDSH_MaRiCB1xw_MainCutBox1_xwidth/2." />
+<var name="JDSH_MainRib_cb1_PosY2"  value="JDSH_MaRiFefyo_MainRibFeet_feetyoffset - JDSH_MaRiCB1yw_MainCutBox1_ywidth/2." />
+
+<var name="JDSH_MainRib_cb2_PosX1"  value="JDSH_MaRiCB2xw_MainCutBox2_xwidth/2. " />
+<var name="JDSH_MainRib_cb2_PosY1"  value="(JDSH_MaRiCB2yw_MainCutBox2_ywidth*cos(-JDSH_MaRiFeayz_MainRibFeet_angleyzplane*GENV_PiS180)+JDSH_MaRiFewzw_MainRibFeet_wholezwidth*sin(-JDSH_MaRiFeayz_MainRibFeet_angleyzplane*GENV_PiS180))/2." />
+<var name="JDSH_MainRib_cb2_PosZ1"  value="JDSH_MaRiFewzw_MainRibFeet_wholezwidth+(-JDSH_MaRiCB2yw_MainCutBox2_ywidth*sin(-JDSH_MaRiFeayz_MainRibFeet_angleyzplane*GENV_PiS180)+JDSH_MaRiFewzw_MainRibFeet_wholezwidth*cos(-JDSH_MaRiFeayz_MainRibFeet_angleyzplane*GENV_PiS180))/2." />
+
+<var name="JDSH_MainRib_cb2_PosX2"  value="JDSH_MaRiFuxle_MainRibFull_xlength+(JDSH_MaRiCB2xw_MainCutBox2_xwidth*GENV_Co45)/2.-(JDSH_MaRiFerao_MainRibFeet_radialoffset+JDSH_MaRiFearw_MainRibFeet_attredwidth)*GENV_Si45 " />
+<var name="JDSH_MainRib_cb2_PosY2"  value="JDSH_MaRiFuyle_MainRibFull_ylength+(JDSH_MaRiCB2xw_MainCutBox2_xwidth*GENV_Si45)/2.-(JDSH_MaRiFerao_MainRibFeet_radialoffset+JDSH_MaRiFearw_MainRibFeet_attredwidth)*GENV_Co45 " />
+
+<var name="JDSH_MainRib_cb2_PosX3"  value="JDSH_MaRiFuxle_MainRibFull_xlength+(JDSH_MaRiCB2xw_MainCutBox2_xwidth*GENV_Co45)/2.-(JDSH_MaRiFerao_MainRibFeet_radialoffset+JDSH_MaRiFeatw_MainRibFeet_attribwidth)*GENV_Si45 " />
+<var name="JDSH_MainRib_cb2_PosY3"  value="JDSH_MaRiFuyle_MainRibFull_ylength+(JDSH_MaRiCB2xw_MainCutBox2_xwidth*GENV_Si45)/2.-(JDSH_MaRiFerao_MainRibFeet_radialoffset+JDSH_MaRiFeatw_MainRibFeet_attribwidth)*GENV_Co45 " />
+<var name="JDSH_MainRib_cb2_PosZ3"  value="JDSH_MaRiFewzw_MainRibFeet_wholezwidth/2.+JDSH_MaRiFeazw_MainRibFeet_attribzwidth " />
+
+<var name="JDSH_MainRib_cb2_PosX4"  value="JDSH_MaRiFuxle_MainRibFull_xlength-(JDSH_MaRiCB2xw_MainCutBox2_xwidth*cos(JDSH_MaRiFeata_MainRibFeet_attribangle*GENV_PiS180)*GENV_Co45)/2.-(JDSH_MaRiFerao_MainRibFeet_radialoffset+JDSH_MaRiFeatw_MainRibFeet_attribwidth)*GENV_Si45+JDSH_MaRiFewzw_MainRibFeet_wholezwidth*sin(JDSH_MaRiFeata_MainRibFeet_attribangle*GENV_PiS180)*GENV_Si45/2. " />
+<var name="JDSH_MainRib_cb2_PosY4"  value="JDSH_MaRiFuyle_MainRibFull_ylength-(JDSH_MaRiCB2xw_MainCutBox2_xwidth*cos(JDSH_MaRiFeata_MainRibFeet_attribangle*GENV_PiS180)*GENV_Si45)/2.-(JDSH_MaRiFerao_MainRibFeet_radialoffset+JDSH_MaRiFeatw_MainRibFeet_attribwidth)*GENV_Co45+JDSH_MaRiFewzw_MainRibFeet_wholezwidth*sin(JDSH_MaRiFeata_MainRibFeet_attribangle*GENV_PiS180)*GENV_Co45/2. " />
+<var name="JDSH_MainRib_cb2_PosZ4"  value="(JDSH_MaRiCB2xw_MainCutBox2_xwidth*sin(JDSH_MaRiFeata_MainRibFeet_attribangle*GENV_PiS180)+JDSH_MaRiFewzw_MainRibFeet_wholezwidth*cos(JDSH_MaRiFeata_MainRibFeet_attribangle*GENV_PiS180))/2.+JDSH_MaRiFeazw_MainRibFeet_attribzwidth+JDSH_MaRiFeazo_MainRibFeet_attribzoffset " />
+
+<var name="JDSH_MainRib_cb3_PosX"  value="(JDSH_MaRiCB3xw_MainCutBox3_xwidth*sin(JDSH_MaRiFeaxy_MainRibFeet_anglexyplane*GENV_PiS180)+JDSH_MaRiCB3yw_MainCutBox3_ywidth*cos(JDSH_MaRiFeaxy_MainRibFeet_anglexyplane*GENV_PiS180))/2. + JDSH_MaRiFefxl_MainRibFeet_feetxlength" />
+<var name="JDSH_MainRib_cb3_PosY"  value="JDSH_MaRiFefyo_MainRibFeet_feetyoffset+(-JDSH_MaRiCB3xw_MainCutBox3_xwidth*cos(JDSH_MaRiFeaxy_MainRibFeet_anglexyplane*GENV_PiS180)+JDSH_MaRiCB3yw_MainCutBox3_ywidth*sin(JDSH_MaRiFeaxy_MainRibFeet_anglexyplane*GENV_PiS180))/2." />
+
+<var name="JDSH_MainRib_cb4_PosX1"  value="(-JDSH_MaRiCB3xw_MainCutBox3_xwidth*sin(JDSH_MaRiFeaxy_MainRibFeet_anglexyplane*GENV_PiS180)+JDSH_MaRiCB4yw_MainCutBox4_ywidth*cos(JDSH_MaRiFeaxy_MainRibFeet_anglexyplane*GENV_PiS180))/2. + JDSH_MaRiFefxo_MainRibFeet_feetxoffset " />
+<var name="JDSH_MainRib_cb4_PosY1"  value="JDSH_MaRiFefyo_MainRibFeet_feetyoffset + (JDSH_MaRiCB3xw_MainCutBox3_xwidth*cos(JDSH_MaRiFeaxy_MainRibFeet_anglexyplane*GENV_PiS180)+JDSH_MaRiCB4yw_MainCutBox4_ywidth*sin(JDSH_MaRiFeaxy_MainRibFeet_anglexyplane*GENV_PiS180))/2." />
+
+<var name="JDSH_MainRib_cb4_PosX2"  value="(-JDSH_MaRiCB3xw_MainCutBox3_xwidth*GENV_Si45+JDSH_MaRiCB4yw_MainCutBox4_ywidth*GENV_Co45)/2.+JDSH_MaRiFefxl_MainRibFeet_feetxlength+JDSH_MaRiFellp_MainRibFeet_lowlenpro-JDSH_MaRiCB4yw_MainCutBox4_ywidth/2." />
+<var name="JDSH_MainRib_cb4_PosY2"  value="-(JDSH_MaRiCB3xw_MainCutBox3_xwidth*GENV_Co45+JDSH_MaRiCB4yw_MainCutBox4_ywidth*GENV_Si45)/2.+JDSH_MaRiFefyo_MainRibFeet_feetyoffset+JDSH_MaRiFellp_MainRibFeet_lowlenpro2+JDSH_MaRiCB4yw_MainCutBox4_ywidth/2." />
+<var name="JDSH_MainRib_cb4_PosZ2"  value="-JDSH_MaRiCuBzw_MainCutBox_zwidth/2.+JDSH_MaRiFeozw_MainRibFeet_offsetzwidth" />
+
+<var name="JDSH_MainRib_cb5_PosX1"  value="(JDSH_MaRiCB2xw_MainCutBox2_xwidth*GENV_Co45-JDSH_MaRiCB2yw_MainCutBox2_ywidth*GENV_Si45)/2.+JDSH_MaRiFefxo_MainRibFeet_feetxoffset+JDSH_MaRiFeulp_MainRibFeet_upplenpro2 " />
+<var name="JDSH_MainRib_cb5_PosY1"  value="(JDSH_MaRiCB2xw_MainCutBox2_xwidth*GENV_Si45+JDSH_MaRiCB2yw_MainCutBox2_ywidth*GENV_Co45)/2.+JDSH_MaRiFefyo_MainRibFeet_feetyoffset+JDSH_MaRiFellp_MainRibFeet_lowlenpro2+JDSH_MaRiFemad_MainRibFeet_mainwidth*cos(JDSH_MaRiFetca_MainRibFeet_topcutangel)" />
+
+<var name="JDSH_MainRib_cb5_PosX2"  value="(JDSH_MaRiCB2xw_MainCutBox2_xwidth*GENV_Co45+JDSH_MaRiCB2yw_MainCutBox2_ywidth*GENV_Si45)/2.+JDSH_MaRiFefxl_MainRibFeet_feetxlength+JDSH_MaRiFellp_MainRibFeet_lowlenpro " />
+<var name="JDSH_MainRib_cb5_PosY2"  value="(JDSH_MaRiCB2xw_MainCutBox2_xwidth*GENV_Si45-JDSH_MaRiCB2yw_MainCutBox2_ywidth*GENV_Co45)/2.+JDSH_MaRiFellp_MainRibFeet_lowlenpro2+JDSH_MaRiFefyo_MainRibFeet_feetyoffset" />
+
+<subtraction name="JDSH_MainRib_Left">
+  <posXYZ  volume="JDSH_MainRib_basis"   X_Y_Z="JDSH_MainRib_basis_PosX; JDSH_MainRib_basis_PosY; JDSH_MainRib_basis_PosZ"   />
+  <posXYZ  volume="JDSH_MainRib_cutbox1" X_Y_Z="JDSH_MainRib_cb1_PosX1 ; JDSH_MainRib_cb1_PosY1 ; JDSH_MainRib_basis_PosZ "  />
+  <posXYZ  volume="JDSH_MainRib_cutbox1" X_Y_Z="JDSH_MainRib_cb1_PosX2 ; JDSH_MainRib_cb1_PosY2 ; JDSH_MainRib_basis_PosZ "  />
+  <posXYZ  volume="JDSH_MainRib_cutbox2" X_Y_Z="JDSH_MainRib_cb2_PosX1 ; JDSH_MainRib_cb2_PosY1 ; JDSH_MainRib_cb2_PosZ1  "  rot=" JDSH_MaRiFeayz_MainRibFeet_angleyzplane ;  0. ; 0. "     />
+  <posXYZ  volume="JDSH_MainRib_cutbox2" X_Y_Z="JDSH_MainRib_cb2_PosX2 ; JDSH_MainRib_cb2_PosY2 ; JDSH_MainRib_basis_PosZ "  rot=" 0. ;  0. ; 45. "  />
+  <posXYZ  volume="JDSH_MainRib_cutbox2" X_Y_Z="JDSH_MainRib_cb2_PosX3 ; JDSH_MainRib_cb2_PosY3 ; JDSH_MainRib_cb2_PosZ3 "   rot=" 0. ;  0. ; 45. "  />
+  <posXYZ  volume="JDSH_MainRib_cutbox2" X_Y_Z="JDSH_MainRib_cb2_PosX4 ; JDSH_MainRib_cb2_PosY4 ; JDSH_MainRib_cb2_PosZ4  "  rot=" 0. ;  JDSH_MaRiFeata_MainRibFeet_attribangle ; 45. "     />
+  <posXYZ  volume="JDSH_MainRib_cutbox3" X_Y_Z="JDSH_MainRib_cb3_PosX  ; JDSH_MainRib_cb3_PosY  ; JDSH_MainRib_basis_PosZ "  rot=" 0. ;  0. ; JDSH_MaRiFeaxy_MainRibFeet_anglexyplane-90. " />
+  <posXYZ  volume="JDSH_MainRib_cutbox4" X_Y_Z="JDSH_MainRib_cb4_PosX1 ; JDSH_MainRib_cb4_PosY1 ; JDSH_MainRib_basis_PosZ "  rot=" 0. ;  0. ; JDSH_MaRiFeaxy_MainRibFeet_anglexyplane-90. " />
+  <posXYZ  volume="JDSH_MainRib_cutbox4" X_Y_Z="JDSH_MainRib_cb4_PosX2 ; JDSH_MainRib_cb4_PosY2 ; JDSH_MainRib_cb4_PosZ2  "  rot=" 0. ;  0. ; 45. "  />
+  <posXYZ  volume="JDSH_MainRib_cutbox5" X_Y_Z="JDSH_MainRib_cb5_PosX1 ; JDSH_MainRib_cb5_PosY1 ; JDSH_MainRib_basis_PosZ "  rot=" 0. ;  0. ; 45. "  />
+  <posXYZ  volume="JDSH_MainRib_cutbox5" X_Y_Z="JDSH_MainRib_cb5_PosX2 ; JDSH_MainRib_cb5_PosY2 ; JDSH_MainRib_basis_PosZ "  rot=" 0. ;  0. ; 45. "  />
+</subtraction>
+
+<subtraction name="JDSH_MainRib_Right">
+  <posXYZ  volume="JDSH_MainRib_basis"   X_Y_Z="-JDSH_MainRib_basis_PosX; JDSH_MainRib_basis_PosY; JDSH_MainRib_basis_PosZ"   />
+  <posXYZ  volume="JDSH_MainRib_cutbox1" X_Y_Z="-JDSH_MainRib_cb1_PosX1 ; JDSH_MainRib_cb1_PosY1 ; JDSH_MainRib_basis_PosZ "  />
+  <posXYZ  volume="JDSH_MainRib_cutbox1" X_Y_Z="-JDSH_MainRib_cb1_PosX2 ; JDSH_MainRib_cb1_PosY2 ; JDSH_MainRib_basis_PosZ "  />
+  <posXYZ  volume="JDSH_MainRib_cutbox2" X_Y_Z="-JDSH_MainRib_cb2_PosX1 ; JDSH_MainRib_cb2_PosY1 ; JDSH_MainRib_cb2_PosZ1  "  rot=" JDSH_MaRiFeayz_MainRibFeet_angleyzplane ;  0. ; 0. "      />
+  <posXYZ  volume="JDSH_MainRib_cutbox2" X_Y_Z="-JDSH_MainRib_cb2_PosX2 ; JDSH_MainRib_cb2_PosY2 ; JDSH_MainRib_basis_PosZ "  rot=" 0. ;  0. ; -45. "  />
+  <posXYZ  volume="JDSH_MainRib_cutbox2" X_Y_Z="-JDSH_MainRib_cb2_PosX3 ; JDSH_MainRib_cb2_PosY3 ; JDSH_MainRib_cb2_PosZ3 "   rot=" 0. ;  0. ; -45. "  />
+  <posXYZ  volume="JDSH_MainRib_cutbox2" X_Y_Z="-JDSH_MainRib_cb2_PosX4 ; JDSH_MainRib_cb2_PosY4 ; JDSH_MainRib_cb2_PosZ4  "  rot=" 0. ;  -JDSH_MaRiFeata_MainRibFeet_attribangle ; -45. "    />
+  <posXYZ  volume="JDSH_MainRib_cutbox3" X_Y_Z="-JDSH_MainRib_cb3_PosX  ; JDSH_MainRib_cb3_PosY  ; JDSH_MainRib_basis_PosZ "  rot=" 0. ;  0. ; -JDSH_MaRiFeaxy_MainRibFeet_anglexyplane-90. " />
+  <posXYZ  volume="JDSH_MainRib_cutbox4" X_Y_Z="-JDSH_MainRib_cb4_PosX1 ; JDSH_MainRib_cb4_PosY1 ; JDSH_MainRib_basis_PosZ "  rot=" 0. ;  0. ; -JDSH_MaRiFeaxy_MainRibFeet_anglexyplane-90. " />
+  <posXYZ  volume="JDSH_MainRib_cutbox4" X_Y_Z="-JDSH_MainRib_cb4_PosX2 ; JDSH_MainRib_cb4_PosY2 ; JDSH_MainRib_cb4_PosZ2  "  rot=" 0. ;  0. ; -45. "  />
+  <posXYZ  volume="JDSH_MainRib_cutbox5" X_Y_Z="-JDSH_MainRib_cb5_PosX1 ; JDSH_MainRib_cb5_PosY1 ; JDSH_MainRib_basis_PosZ "  rot=" 0. ;  0. ; -45. "  />
+  <posXYZ  volume="JDSH_MainRib_cutbox5" X_Y_Z="-JDSH_MainRib_cb5_PosX2 ; JDSH_MainRib_cb5_PosY2 ; JDSH_MainRib_basis_PosZ "  rot=" 0. ;  0. ; -45. "  />
+</subtraction>
+
+<!-- BEGIN confirmation with atljd___0042-vAC (if no other comment) -->
+<var  name="JDSH_MaRiTPthi_MainRibTP_thickness"      value="   50.  " />
+<var  name="JDSH_MaRiTPful_MainRibTP_fulllength"     value=" 1295.  " />
+<var  name="JDSH_MaRiTPblo_MainRibTP_biglenoff"      value="  985.  " />
+<var  name="JDSH_MaRiTPslo_MainRibTP_smalllenoff"    value="  229.  " />
+<var  name="JDSH_MaRiTPfuw_MainRibTP_fullwidth"      value="  855.  " />
+<var  name="JDSH_MaRiTPwof_MainRibTP_widthoffset"    value="   46.  " />
+<var  name="JDSH_MaRiTPrew_MainRibTP_reducedwidth"   value="  730.  " />
+<var  name="JDSH_MaRiBSPof_MainRibBS_loweroffset"    value="  588.  " />
+<var  name="JDSH_MainRib_Support_PosX"               value=" 2640.  " />  <!-- confirmed atljd___0028-vAC -->
+<var  name="JDSH_MainRib_Support_PosZoffset"         value="  905.  " />
+<!-- END confirmation with atljd___0042-vAC -->
+
+<!-- BEGIN confirmation with atljd___0126-v0 (if no other comment) -->
+<var  name="JDSH_MaRiSPthi_MainRibSP_thickness"      value="   35.  " />
+<var  name="JDSH_MaRiSPfii_MainRibSP_firstincline"   value="  175.  " />
+<var  name="JDSH_MaRiSPsei_MainRibSP_secondincline"  value=" 1346.  " />
+<var  name="JDSH_MaRiBPfhi_MainRibBP_fullheight"     value="  253.  " />
+<var  name="JDSH_MaRiBPmhi_MainRibBP_middleheight"   value="  180.  " />
+<var  name="JDSH_MaRiBPrhi_MainRibBP_reducedheight"  value="  100.  " />
+<var  name="JDSH_MaRiBPhbo_MainRibBP_heightbigoff"   value="   85.  " />
+<var  name="JDSH_MaRiBPhso_MainRibBP_heightsmalloff" value="   40.  " />
+<var  name="JDSH_MaRiBPihs_MainRibBP_interheight1"   value="  160.  " />
+<var  name="JDSH_MaRiBPihb_MainRibBP_interheight2"   value="  166.  " />
+<var  name="JDSH_MaRiBPfii_MainRibBP_firstincline"   value="  149.  " />
+<var  name="JDSH_MaRiBPbso_MainRibBP_beginstepone"   value="  379.  " />
+<var  name="JDSH_MaRiBPeso_MainRibBP_endstepone"     value="  524.  " />
+<var  name="JDSH_MaRiBPbst_MainRibBP_beginsteptwo"   value=" 1011.5 " />
+<var  name="JDSH_MaRiBPest_MainRibBP_endsteptwo"     value=" 1156.5 " />
+<var  name="JDSH_MaRiBPsei_MainRibBP_secondincline"  value=" 1386.5 " />
+<var  name="JDSH_MaRiBPful_MainRibBP_fulllength"     value=" 1536.  " />
+<var  name="JDSH_MaRiBSPid_MainRibBS_interdistance"  value="  356.  " />
+<var  name="JDSH_MaRiIPOle_MainRibIP_length"         value="  325.  " />
+<!-- END confirmation with atljd___0126-v0 -->
+
+<var  name="JDSH_RiAPRadi_RibAirPad_Radius"          value="  350. "/>  <!-- equivalent to AECT_SupWheel_AirPad_Rad -->
+<var  name="JDSH_RiAPHigh_RibAirPad_Hight"           value="  125. "/>  <!-- equivalent to AECT_SupWheel_AirPad_Hight -->
+<var  name="JDSH_RiAPFuDi_RibAirPad_FullDist"        value=" 1880. "/>
+<var  name="JDSH_RiAPSupZ_RibAirPad_SuppDZ"          value="  290." />
+
+<var  name="JDSH_RiAPSupY_RibAirPad_SuppDY"          value="-RAIL_Ypos_aboveJFSH + JDSH_MainRibFeet_PosY - 2.*JDSH_MaRiTPthi_MainRibTP_thickness - JDSH_RiAPHigh_RibAirPad_Hight "/>
+
+<box name="JDSH_MainRib_InterPlateOne"    material="ShieldIron"  X_Y_Z="JDSH_MaRiBSPid_MainRibBS_interdistance; JDSH_MaRiTPthi_MainRibTP_thickness; JDSH_MaRiIPOle_MainRibIP_length"/>
+<box name="JDSH_MainRib_InterPlateTwo"    material="ShieldIron"  X_Y_Z="JDSH_MaRiBSPid_MainRibBS_interdistance; JDSH_MaRiTPthi_MainRibTP_thickness; JDSH_MaRiIPOle_MainRibIP_length-JDSH_MaRiBPful_MainRibBP_fulllength+JDSH_MaRiTPful_MainRibTP_fulllength"/>
+<box name="JDSH_MainRib_InterPlateThree"  material="ShieldIron"  X_Y_Z="JDSH_MaRiBSPid_MainRibBS_interdistance; JDSH_MaRiTPthi_MainRibTP_thickness-JDSH_MaRiBPhso_MainRibBP_heightsmalloff; JDSH_MaRiBPful_MainRibBP_fulllength-JDSH_MaRiTPful_MainRibTP_fulllength"/>
+
+<box  name="JDSH_MainRibSP_APSupp"    material="ShieldIron"     X_Y_Z=" JDSH_MaRiBSPid_MainRibBS_interdistance ; JDSH_RiAPSupY_RibAirPad_SuppDY ; JDSH_RiAPSupZ_RibAirPad_SuppDZ" />
+<tubs name="JDSH_MainRibAP_AirPad"    material="ShieldIron"     Rio_Z=" 0. ; JDSH_RiAPRadi_RibAirPad_Radius ; JDSH_RiAPHigh_RibAirPad_Hight"  />
+
+<gvxy     name="JDSH_MainRib_TopPlate"         material="ShieldIron"   dZ="JDSH_MaRiTPthi_MainRibTP_thickness"  >
+  <gvxy_point  X_Y="                                    0. ;   0.                                  "   />
+  <gvxy_point  X_Y="                                    0. ;   JDSH_MaRiTPblo_MainRibTP_biglenoff  "   />
+  <gvxy_point  X_Y="  JDSH_MaRiTPwof_MainRibTP_widthoffset ;   JDSH_MaRiTPblo_MainRibTP_biglenoff  "   />
+  <gvxy_point  X_Y="  JDSH_MaRiTPwof_MainRibTP_widthoffset ;  JDSH_MaRiTPful_MainRibTP_fulllength  "   />
+  <gvxy_point  X_Y=" JDSH_MaRiTPrew_MainRibTP_reducedwidth ;  JDSH_MaRiTPful_MainRibTP_fulllength  "   />
+  <gvxy_point  X_Y=" JDSH_MaRiTPrew_MainRibTP_reducedwidth ; JDSH_MaRiTPslo_MainRibTP_smalllenoff  "   />
+  <gvxy_point  X_Y="    JDSH_MaRiTPfuw_MainRibTP_fullwidth ; JDSH_MaRiTPslo_MainRibTP_smalllenoff  "   />
+  <gvxy_point  X_Y="    JDSH_MaRiTPfuw_MainRibTP_fullwidth ;   0.                                  "   />
+</gvxy>
+
+<gvxy     name="JDSH_MainRib_LargeSidePlate"         material="ShieldIron"   dZ="JDSH_MaRiTPthi_MainRibTP_thickness"  >
+  <gvxy_point  X_Y="                                     0. ;     0.                                   "   />
+  <gvxy_point  X_Y="                                     0. ;   JDSH_MaRiBPhbo_MainRibBP_heightbigoff  "   />
+  <gvxy_point  X_Y="  JDSH_MaRiBPfii_MainRibBP_firstincline ;   JDSH_MaRiBPihb_MainRibBP_interheight2  "   />
+  <gvxy_point  X_Y="  JDSH_MaRiBPfii_MainRibBP_firstincline ;     JDSH_MaRiBPfhi_MainRibBP_fullheight  "   />
+  <gvxy_point  X_Y="  JDSH_MaRiBPbso_MainRibBP_beginstepone ;     JDSH_MaRiBPfhi_MainRibBP_fullheight  "   />
+  <gvxy_point  X_Y="  JDSH_MaRiBPbso_MainRibBP_beginstepone ;  JDSH_MaRiBPrhi_MainRibBP_reducedheight  "   />
+  <gvxy_point  X_Y="    JDSH_MaRiBPeso_MainRibBP_endstepone ;  JDSH_MaRiBPrhi_MainRibBP_reducedheight  "   />
+  <gvxy_point  X_Y="    JDSH_MaRiBPeso_MainRibBP_endstepone ;   JDSH_MaRiBPmhi_MainRibBP_middleheight  "   />
+  <gvxy_point  X_Y="  JDSH_MaRiBPbst_MainRibBP_beginsteptwo ;   JDSH_MaRiBPmhi_MainRibBP_middleheight  "   />
+  <gvxy_point  X_Y="  JDSH_MaRiBPbst_MainRibBP_beginsteptwo ;  JDSH_MaRiBPrhi_MainRibBP_reducedheight  "   />
+  <gvxy_point  X_Y="    JDSH_MaRiBPest_MainRibBP_endsteptwo ;  JDSH_MaRiBPrhi_MainRibBP_reducedheight  "   />
+  <gvxy_point  X_Y="    JDSH_MaRiBPest_MainRibBP_endsteptwo ;     JDSH_MaRiBPfhi_MainRibBP_fullheight  "   />
+  <gvxy_point  X_Y=" JDSH_MaRiBPsei_MainRibBP_secondincline ;     JDSH_MaRiBPfhi_MainRibBP_fullheight  "   />
+  <gvxy_point  X_Y=" JDSH_MaRiBPsei_MainRibBP_secondincline ;   JDSH_MaRiBPihs_MainRibBP_interheight1  "   />
+  <gvxy_point  X_Y="    JDSH_MaRiBPful_MainRibBP_fulllength ;   JDSH_MaRiBPhbo_MainRibBP_heightbigoff  "   />
+  <gvxy_point  X_Y="    JDSH_MaRiBPful_MainRibBP_fulllength ; JDSH_MaRiBPhso_MainRibBP_heightsmalloff  "   />
+  <gvxy_point  X_Y="    JDSH_MaRiTPful_MainRibTP_fulllength ; JDSH_MaRiBPhso_MainRibBP_heightsmalloff  "   />
+  <gvxy_point  X_Y="    JDSH_MaRiTPful_MainRibTP_fulllength ;     0.                                   "   />
+</gvxy>
+
+<gvxy     name="JDSH_MainRib_SmallSidePlate"         material="ShieldIron"   dZ="JDSH_MaRiSPthi_MainRibSP_thickness"  >
+  <gvxy_point  X_Y="                                     0. ;   0.                                     "   />
+  <gvxy_point  X_Y="                                     0. ;   JDSH_MaRiBPhbo_MainRibBP_heightbigoff  "   />
+  <gvxy_point  X_Y="  JDSH_MaRiSPfii_MainRibSP_firstincline ;   JDSH_MaRiBPmhi_MainRibBP_middleheight  "   />
+  <gvxy_point  X_Y="  JDSH_MaRiBPbso_MainRibBP_beginstepone ;   JDSH_MaRiBPmhi_MainRibBP_middleheight  "   />
+  <gvxy_point  X_Y="  JDSH_MaRiBPbso_MainRibBP_beginstepone ;  JDSH_MaRiBPrhi_MainRibBP_reducedheight  "   />
+  <gvxy_point  X_Y="    JDSH_MaRiBPeso_MainRibBP_endstepone ;  JDSH_MaRiBPrhi_MainRibBP_reducedheight  "   />
+  <gvxy_point  X_Y="    JDSH_MaRiBPeso_MainRibBP_endstepone ;   JDSH_MaRiBPmhi_MainRibBP_middleheight  "   />
+  <gvxy_point  X_Y="  JDSH_MaRiBPbst_MainRibBP_beginsteptwo ;   JDSH_MaRiBPmhi_MainRibBP_middleheight  "   />
+  <gvxy_point  X_Y="  JDSH_MaRiBPbst_MainRibBP_beginsteptwo ;  JDSH_MaRiBPrhi_MainRibBP_reducedheight  "   />
+  <gvxy_point  X_Y="    JDSH_MaRiBPest_MainRibBP_endsteptwo ;  JDSH_MaRiBPrhi_MainRibBP_reducedheight  "   />
+  <gvxy_point  X_Y="    JDSH_MaRiBPest_MainRibBP_endsteptwo ;   JDSH_MaRiBPmhi_MainRibBP_middleheight  "   />
+  <gvxy_point  X_Y=" JDSH_MaRiSPsei_MainRibSP_secondincline ;   JDSH_MaRiBPmhi_MainRibBP_middleheight  "   />
+  <gvxy_point  X_Y="    JDSH_MaRiBPful_MainRibBP_fulllength ;   JDSH_MaRiBPhbo_MainRibBP_heightbigoff  "   />
+  <gvxy_point  X_Y="    JDSH_MaRiBPful_MainRibBP_fulllength ; JDSH_MaRiBPhso_MainRibBP_heightsmalloff  "   />
+  <gvxy_point  X_Y="    JDSH_MaRiTPful_MainRibTP_fulllength ; JDSH_MaRiBPhso_MainRibBP_heightsmalloff  "   />
+  <gvxy_point  X_Y="    JDSH_MaRiTPful_MainRibTP_fulllength ;   0.                                     "   />
+</gvxy>
+
+<composition name="JDSH_MainRib_Support_Right">
+  <posXYZ  volume="JDSH_MainRib_TopPlate"       X_Y_Z="0 ; JDSH_MaRiTPthi_MainRibTP_thickness/2. ; 0"   rot=" -90. ;  0. ; 0. "  />
+  <posXYZ  volume="JDSH_MainRib_InterPlateOne"  X_Y_Z="JDSH_MaRiBSPof_MainRibBS_loweroffset-JDSH_MaRiTPthi_MainRibTP_thickness-JDSH_MaRiBSPid_MainRibBS_interdistance/2.; -JDSH_MaRiTPthi_MainRibTP_thickness/2.; -JDSH_MaRiIPOle_MainRibIP_length/2."/>
+  <posXYZ  volume="JDSH_MainRib_InterPlateTwo"  X_Y_Z="JDSH_MaRiBSPof_MainRibBS_loweroffset-JDSH_MaRiTPthi_MainRibTP_thickness-JDSH_MaRiBSPid_MainRibBS_interdistance/2.; -JDSH_MaRiTPthi_MainRibTP_thickness/2.; (JDSH_MaRiIPOle_MainRibIP_length-JDSH_MaRiBPful_MainRibBP_fulllength-JDSH_MaRiTPful_MainRibTP_fulllength)/2."/>
+  <posXYZ  volume="JDSH_MainRib_InterPlateThree"  X_Y_Z="JDSH_MaRiBSPof_MainRibBS_loweroffset-JDSH_MaRiTPthi_MainRibTP_thickness-JDSH_MaRiBSPid_MainRibBS_interdistance/2.; (-JDSH_MaRiBPhso_MainRibBP_heightsmalloff-JDSH_MaRiTPthi_MainRibTP_thickness)/2.; -(JDSH_MaRiBPful_MainRibBP_fulllength+JDSH_MaRiTPful_MainRibTP_fulllength)/2."/>
+  <posXYZ  volume="JDSH_MainRib_LargeSidePlate" X_Y_Z="JDSH_MaRiBSPof_MainRibBS_loweroffset-JDSH_MaRiTPthi_MainRibTP_thickness/2. ; 0 ; 0"   rot=" 180. ;  90. ; 0. "  />
+  <posXYZ  volume="JDSH_MainRib_SmallSidePlate" X_Y_Z="JDSH_MaRiBSPof_MainRibBS_loweroffset-JDSH_MaRiBSPid_MainRibBS_interdistance-JDSH_MaRiTPthi_MainRibTP_thickness-JDSH_MaRiSPthi_MainRibSP_thickness/2. ; 0 ; 0"   rot=" 180. ;  90. ; 0. "  />
+  <posXYZ  volume="JDSH_MainRibSP_APSupp"  X_Y_Z=" JDSH_MaRiBSPof_MainRibBS_loweroffset-JDSH_MaRiTPthi_MainRibTP_thickness-JDSH_MaRiBSPid_MainRibBS_interdistance/2.; -JDSH_MaRiTPthi_MainRibTP_thickness-JDSH_RiAPSupY_RibAirPad_SuppDY/2.; -JDSH_MaRiBPful_MainRibBP_fulllength/2. + JDSH_RiAPFuDi_RibAirPad_FullDist/2.-JDSH_RiAPRadi_RibAirPad_Radius "/>
+  <posXYZ  volume="JDSH_MainRibSP_APSupp"  X_Y_Z=" JDSH_MaRiBSPof_MainRibBS_loweroffset-JDSH_MaRiTPthi_MainRibTP_thickness-JDSH_MaRiBSPid_MainRibBS_interdistance/2.; -JDSH_MaRiTPthi_MainRibTP_thickness-JDSH_RiAPSupY_RibAirPad_SuppDY/2.; -JDSH_MaRiBPful_MainRibBP_fulllength/2. - JDSH_RiAPFuDi_RibAirPad_FullDist/2.+JDSH_RiAPRadi_RibAirPad_Radius "/>
+  <posXYZ  volume="JDSH_MainRibAP_AirPad"  X_Y_Z=" JDSH_MaRiBSPof_MainRibBS_loweroffset-JDSH_MaRiTPthi_MainRibTP_thickness-JDSH_MaRiBSPid_MainRibBS_interdistance/2.; -JDSH_MaRiTPthi_MainRibTP_thickness-JDSH_RiAPSupY_RibAirPad_SuppDY-JDSH_RiAPHigh_RibAirPad_Hight/2.; -JDSH_MaRiBPful_MainRibBP_fulllength/2. + JDSH_RiAPFuDi_RibAirPad_FullDist/2.-JDSH_RiAPRadi_RibAirPad_Radius"  rot=" 90. ;  0. ; 0. "/>
+  <posXYZ  volume="JDSH_MainRibAP_AirPad"  X_Y_Z=" JDSH_MaRiBSPof_MainRibBS_loweroffset-JDSH_MaRiTPthi_MainRibTP_thickness-JDSH_MaRiBSPid_MainRibBS_interdistance/2.; -JDSH_MaRiTPthi_MainRibTP_thickness-JDSH_RiAPSupY_RibAirPad_SuppDY-JDSH_RiAPHigh_RibAirPad_Hight/2.; -JDSH_MaRiBPful_MainRibBP_fulllength/2. - JDSH_RiAPFuDi_RibAirPad_FullDist/2.+JDSH_RiAPRadi_RibAirPad_Radius"  rot=" 90. ;  0. ; 0. "/>
+</composition>
+
+<composition name="JDSH_MainRib_Support_Left">
+  <posXYZ  volume="JDSH_MainRib_TopPlate"       X_Y_Z="0 ; JDSH_MaRiTPthi_MainRibTP_thickness/2. ; 0"   rot=" -90. ;  0. ; 180. "  />
+  <posXYZ  volume="JDSH_MainRib_InterPlateOne"  X_Y_Z="-JDSH_MaRiBSPof_MainRibBS_loweroffset+JDSH_MaRiTPthi_MainRibTP_thickness+JDSH_MaRiBSPid_MainRibBS_interdistance/2.; -JDSH_MaRiTPthi_MainRibTP_thickness/2.; -JDSH_MaRiIPOle_MainRibIP_length/2."/>
+  <posXYZ  volume="JDSH_MainRib_InterPlateTwo"  X_Y_Z="-JDSH_MaRiBSPof_MainRibBS_loweroffset+JDSH_MaRiTPthi_MainRibTP_thickness+JDSH_MaRiBSPid_MainRibBS_interdistance/2.; -JDSH_MaRiTPthi_MainRibTP_thickness/2.; (JDSH_MaRiIPOle_MainRibIP_length-JDSH_MaRiBPful_MainRibBP_fulllength-JDSH_MaRiTPful_MainRibTP_fulllength)/2."/>
+  <posXYZ  volume="JDSH_MainRib_InterPlateThree"  X_Y_Z="-JDSH_MaRiBSPof_MainRibBS_loweroffset+JDSH_MaRiTPthi_MainRibTP_thickness+JDSH_MaRiBSPid_MainRibBS_interdistance/2.; (-JDSH_MaRiBPhso_MainRibBP_heightsmalloff-JDSH_MaRiTPthi_MainRibTP_thickness)/2.; -(JDSH_MaRiBPful_MainRibBP_fulllength+JDSH_MaRiTPful_MainRibTP_fulllength)/2."/>
+  <posXYZ  volume="JDSH_MainRib_LargeSidePlate" X_Y_Z="-JDSH_MaRiBSPof_MainRibBS_loweroffset+JDSH_MaRiTPthi_MainRibTP_thickness/2. ; 0 ; 0"   rot=" 180. ;  90. ; 0. "  />
+  <posXYZ  volume="JDSH_MainRib_SmallSidePlate" X_Y_Z="-JDSH_MaRiBSPof_MainRibBS_loweroffset+JDSH_MaRiBSPid_MainRibBS_interdistance+JDSH_MaRiTPthi_MainRibTP_thickness+JDSH_MaRiSPthi_MainRibSP_thickness/2. ; 0 ; 0"   rot=" 180. ;  90. ; 0. "  />
+  <posXYZ  volume="JDSH_MainRibSP_APSupp"  X_Y_Z="-JDSH_MaRiBSPof_MainRibBS_loweroffset+JDSH_MaRiTPthi_MainRibTP_thickness+JDSH_MaRiBSPid_MainRibBS_interdistance/2.; -JDSH_MaRiTPthi_MainRibTP_thickness-JDSH_RiAPSupY_RibAirPad_SuppDY/2.; -JDSH_MaRiBPful_MainRibBP_fulllength/2. + JDSH_RiAPFuDi_RibAirPad_FullDist/2.-JDSH_RiAPRadi_RibAirPad_Radius "/>
+  <posXYZ  volume="JDSH_MainRibSP_APSupp"  X_Y_Z="-JDSH_MaRiBSPof_MainRibBS_loweroffset+JDSH_MaRiTPthi_MainRibTP_thickness+JDSH_MaRiBSPid_MainRibBS_interdistance/2.; -JDSH_MaRiTPthi_MainRibTP_thickness-JDSH_RiAPSupY_RibAirPad_SuppDY/2.; -JDSH_MaRiBPful_MainRibBP_fulllength/2. - JDSH_RiAPFuDi_RibAirPad_FullDist/2.+JDSH_RiAPRadi_RibAirPad_Radius "/>
+  <posXYZ  volume="JDSH_MainRibAP_AirPad"  X_Y_Z="-JDSH_MaRiBSPof_MainRibBS_loweroffset+JDSH_MaRiTPthi_MainRibTP_thickness+JDSH_MaRiBSPid_MainRibBS_interdistance/2.; -JDSH_MaRiTPthi_MainRibTP_thickness-JDSH_RiAPSupY_RibAirPad_SuppDY-JDSH_RiAPHigh_RibAirPad_Hight/2.; -JDSH_MaRiBPful_MainRibBP_fulllength/2. + JDSH_RiAPFuDi_RibAirPad_FullDist/2.-JDSH_RiAPRadi_RibAirPad_Radius"  rot=" 90. ;  0. ; 0. "/>
+  <posXYZ  volume="JDSH_MainRibAP_AirPad"  X_Y_Z="-JDSH_MaRiBSPof_MainRibBS_loweroffset+JDSH_MaRiTPthi_MainRibTP_thickness+JDSH_MaRiBSPid_MainRibBS_interdistance/2.; -JDSH_MaRiTPthi_MainRibTP_thickness-JDSH_RiAPSupY_RibAirPad_SuppDY-JDSH_RiAPHigh_RibAirPad_Hight/2.; -JDSH_MaRiBPful_MainRibBP_fulllength/2. - JDSH_RiAPFuDi_RibAirPad_FullDist/2.+JDSH_RiAPRadi_RibAirPad_Radius"  rot=" 90. ;  0. ; 0. "/>
+</composition>
+
+<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+<!--  Additional Shielding installed winter shutdown 2011/2012  -->
+<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+<!-- BEGIN confirmation with ATL-MH-ER-0024 (if no other comment) -->
+<var  name="JDSH_AddShield_OutRing_Lead_innerRad"      value="  730. " />
+<var  name="JDSH_AddShield_OutRing_Lead_outerRad"      value="  749.5" />
+<var  name="JDSH_AddShield_OutRing_Poly_innerRad"      value="  630. " />
+<var  name="JDSH_AddShield_OutRing_Iron_innerRad"      value="  445. " />
+<var  name="JDSH_AddShield_Zwidth"                     value="   46. " />
+<!-- END confirmation with ATL-MH-ER-0024 -->
+
+<tubs name="JDSH_AddShield_Lead"    material="Lead"                  Rio_Z=" JDSH_AddShield_OutRing_Lead_innerRad ; JDSH_AddShield_OutRing_Lead_outerRad ; JDSH_AddShield_Zwidth"  />
+<tubs name="JDSH_AddShield_Poly"    material="PolyBoronB4C"          Rio_Z=" JDSH_AddShield_OutRing_Poly_innerRad ; JDSH_AddShield_OutRing_Lead_innerRad - GENV_Eps ; JDSH_AddShield_Zwidth"  />
+<tubs name="JDSH_AddShield_Iron"    material="ShieldIron"            Rio_Z=" JDSH_AddShield_OutRing_Iron_innerRad ; JDSH_AddShield_OutRing_Poly_innerRad - GENV_Eps ; JDSH_AddShield_Zwidth"  />
+
+<!-- ++++++++++++++++++++++++++++++++++++++++++ -->
+<!--  Additional Shielding installed for run 2  -->
+<!-- ++++++++++++++++++++++++++++++++++++++++++ -->
+
+<!-- for documentation also see https://indico.cern.ch/event/299435/session/0/contribution/11/material/slides/1.pdf -->
+<var  name="JDSH_Run2_FrtInnRing_Poly_innerRad"      value="  850. " /> <!-- atujd___0003-v0 -->
+<var  name="JDSH_Run2_FrtInnRing_Poly_outerRad"      value="  950. " /> <!-- atujd___0003-v0 -->
+<var  name="JDSH_Run2_FrtInnRing_Poly_Zwidth"        value="   35. " /> <!-- sum of atujd___0003-v0 and atujd___0012-v0 (merge of 2 rings) -->
+<var  name="JDSH_Run2_FrtOutRing_Lead_Radthick"      value="   10. " /> <!-- atujd___0004-v0 -->
+<var  name="JDSH_Run2_FrtOutRing_Lead_Zwidth"        value="   34. " /> <!-- atujd___0004-v0 -->
+<var  name="JDSH_Run2_FrtCoverRg_Iron_Radthick"      value="    1. " /> <!-- atujd___0010-v0 -->
+<var  name="JDSH_Run2_FrtCoverRg_Iron_TotRadtk"      value="   25. " /> <!-- atujd___0010-v0 -->
+<var  name="JDSH_Run2_FrtZposition"                  value="   47.9" /> <!-- presentation above says 53. however adjusted to calo in sim -->
+
+<tubs name="JDSH_Run2_FrtLeadRing"       material="Lead"          Rio_Z=" JDSH_Run2_FrtInnRing_Poly_outerRad+GENV_Eps ; JDSH_Run2_FrtInnRing_Poly_outerRad+JDSH_Run2_FrtOutRing_Lead_Radthick ; JDSH_Run2_FrtOutRing_Lead_Zwidth"  />
+<tubs name="JDSH_Run2_FrtPolyRing"       material="PolyBoron207HD5"  Rio_Z=" JDSH_Run2_FrtInnRing_Poly_innerRad ; JDSH_Run2_FrtInnRing_Poly_outerRad ; JDSH_Run2_FrtInnRing_Poly_Zwidth"  />
+<pcon name="JDSH_Run2_FrtIronRingCover"  material="ShieldIron"  >
+  <polyplane  Rio_Z="JDSH_Run2_FrtInnRing_Poly_outerRad+JDSH_Run2_FrtOutRing_Lead_Radthick+JDSH_Run2_FrtCoverRg_Iron_Radthick+GENV_Eps-JDSH_Run2_FrtCoverRg_Iron_TotRadtk; JDSH_Run2_FrtInnRing_Poly_outerRad+JDSH_Run2_FrtOutRing_Lead_Radthick+JDSH_Run2_FrtCoverRg_Iron_Radthick+GENV_Eps; 0." />
+  <polyplane  Rio_Z="JDSH_Run2_FrtInnRing_Poly_outerRad+JDSH_Run2_FrtOutRing_Lead_Radthick+JDSH_Run2_FrtCoverRg_Iron_Radthick+GENV_Eps-JDSH_Run2_FrtCoverRg_Iron_TotRadtk; JDSH_Run2_FrtInnRing_Poly_outerRad+JDSH_Run2_FrtOutRing_Lead_Radthick+JDSH_Run2_FrtCoverRg_Iron_Radthick+GENV_Eps; -JDSH_Run2_FrtCoverRg_Iron_Radthick + GENV_Eps" />
+  <polyplane  Rio_Z="JDSH_Run2_FrtInnRing_Poly_outerRad+JDSH_Run2_FrtOutRing_Lead_Radthick+GENV_Eps; JDSH_Run2_FrtInnRing_Poly_outerRad+JDSH_Run2_FrtOutRing_Lead_Radthick+JDSH_Run2_FrtCoverRg_Iron_Radthick+GENV_Eps; - JDSH_Run2_FrtCoverRg_Iron_Radthick + GENV_Eps" />
+  <polyplane  Rio_Z="JDSH_Run2_FrtInnRing_Poly_outerRad+JDSH_Run2_FrtOutRing_Lead_Radthick+GENV_Eps; JDSH_Run2_FrtInnRing_Poly_outerRad+JDSH_Run2_FrtOutRing_Lead_Radthick+JDSH_Run2_FrtCoverRg_Iron_Radthick+GENV_Eps; -JDSH_Run2_FrtOutRing_Lead_Zwidth - JDSH_Run2_FrtCoverRg_Iron_Radthick" />
+</pcon>
+
+<var  name="JDSH_Run2_BckBckRing_Poly_innerRad"      value="  532.5" /> <!-- atujd___0023-v0 -->
+<var  name="JDSH_Run2_BckBckRing_Poly_outerRad"      value="  582.5" /> <!-- atujd___0023-v0 -->
+<var  name="JDSH_Run2_BckBckRing_Poly_Zwidth"        value="  200. " /> <!-- atujd___0023-v0 , 8*25 see presentation -->
+
+<var  name="JDSH_Run2_BckFrtRing_Poly_innerRad"      value="  532.5" /> <!-- atujd___0022-v0 -->
+<var  name="JDSH_Run2_BckFrtRing_Poly_outerRad"      value="  800. " /> <!-- atujd___0022-v0 -->
+<var  name="JDSH_Run2_BckFrtRing_Poly_Zwidth"        value="   40. " /> <!-- sum atujd___0022-v0 and atujd___0021-v0 -->
+
+<tubs name="JDSH_Run2_BckBckRing"       material="PolyBoron207HD5"  Rio_Z=" JDSH_Run2_BckBckRing_Poly_innerRad ; JDSH_Run2_BckBckRing_Poly_outerRad ; JDSH_Run2_BckBckRing_Poly_Zwidth"  />
+<tubs name="JDSH_Run2_BckFrtRing"       material="PolyBoron207HD5"  Rio_Z=" JDSH_Run2_BckFrtRing_Poly_innerRad ; JDSH_Run2_BckFrtRing_Poly_outerRad ; JDSH_Run2_BckFrtRing_Poly_Zwidth"  />
+
+<!--     name       =  JD Return Ring                section name       = "Shielding" -->
+
+<!-- +++++++++++++++++++++++++++++++++++++++++++++++++ -->
+<!--  JD Return Ring                                   -->
+<!-- +++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+<!-- BEGIN confirmation with atljd___0146-vAA (if no other comment) -->
+<var name="JDReturnH"                              value="220. " />
+<var name="JDReturnL"                              value="385. " />
+<var name="JDReturnW"                              value=" 25. " />
+<var name="JDReturnT"                              value="680. " />
+<var name="JDReturnS"                              value="604.5" />
+<var name="JDReturnD"                              value="310. " />
+<!-- END confirmation with atljd___0146-vAA -->
+<var name="JDReturnO"                              value="114. " />  <!-- confirmed atljd___0147-vAA -->
+
+
+<box name="JDReturnTra"  material="ShieldIron"     X_Y_Z="JDReturnL;2.*JDReturnW;JDReturnH" />
+<trd name="JDReturntop"  material="ShieldIron"     Xmp_Ymp_Z="JDReturnT  ; JDReturnS ; JDReturnW ;  JDReturnW ; JDReturnL "  />
+<box name="JDReturnSubBox" material="ShieldIron"   X_Y_Z="JDReturnT;JDReturnT; JDReturnT" />
+
+<composition name="JDReturnR1">
+   <posXYZ volume="JDReturnTra"          X_Y_Z=" JDReturnD/2.;Zero;Zero " rot="  0.;  90; 90"/>
+   <posXYZ volume="JDReturnTra"          X_Y_Z="-JDReturnD/2.;Zero;Zero " rot="  0.;  90; 90"/>
+</composition>
+<composition name="JDReturnRing1">
+   <posXYZ volume="JDReturntop"    X_Y_Z="Zero; JDReturnH/2.+JDReturnW/2.;Zero" rot=" 0.;270.; 0." />
+   <posXYZ volume="JDReturntop"    X_Y_Z="Zero;-JDReturnH/2.-JDReturnW/2.;Zero" rot=" 0.;270.; 0." />
+   <posXYZ volume="JDReturnR1"     X_Y_Z="Zero;Zero;Zero" rot=" 0.; 270.;0."/>
+</composition>
+<composition name="JDReturnRing0">
+  <posXYZ volume="JDReturnRing1"     X_Y_Z="JDSH_BDRRouRa_RetrunRing_outerRadius-JDReturnL/2. ; 0 ; -(JDReturnH+2.*JDReturnW)/2. " rot=" 90.; 0.; 0."/>
+</composition>
+
+<subtraction name="JDReturntopS"  >
+  <posXYZ  volume="JDReturntop"       X_Y_Z="0 ; 0. ; 0"   rot=" 0. ;  0. ; 0. "  />
+  <posXYZ  volume="JDReturnSubBox"    X_Y_Z="JDReturnT*(GENV_Si225+GENV_Co225)/2.-JDReturnT/2.+JDReturnO ; 0. ; JDReturnT*(-GENV_Si225+GENV_Co225)/2.+JDReturnL/2. " rot=" 0. ;  22.5 ; 0. " />
+</subtraction>
+<subtraction name="JDReturnR1S1">
+  <posXYZ  volume="JDReturnTra"       X_Y_Z="JDReturnD/2.;Zero; Zero" rot="  0.;  90; 90."/>
+  <posXYZ  volume="JDReturnSubBox"    X_Y_Z="JDReturnT*(GENV_Si225+GENV_Co225)/2.-JDReturnT/2.+JDReturnO ; 0. ; JDReturnT*(-GENV_Si225+GENV_Co225)/2.+JDReturnL/2. " rot=" 0. ;  22.5 ; 0. " />
+</subtraction>
+<subtraction name="JDReturnR1S2">
+  <posXYZ  volume="JDReturnTra"       X_Y_Z="-JDReturnD/2.;Zero; Zero" rot="  0.;  90; 90."/>
+  <posXYZ  volume="JDReturnSubBox"    X_Y_Z="JDReturnT*(GENV_Si225+GENV_Co225)/2.-JDReturnT/2.+JDReturnO ; 0. ; JDReturnT*(-GENV_Si225+GENV_Co225)/2.+JDReturnL/2. " rot=" 0. ;  22.5 ; 0. " />
+</subtraction>
+<composition name="JDReturnRing1S">
+   <posXYZ volume="JDReturntopS"    X_Y_Z="Zero; JDReturnH/2.+JDReturnW/2.;Zero" rot=" 0.;270.; 0."/>
+   <posXYZ volume="JDReturntopS"    X_Y_Z="Zero;-JDReturnH/2.-JDReturnW/2.;Zero" rot=" 0.;270.; 0."/>
+   <posXYZ volume="JDReturnR1S1"     X_Y_Z="Zero;Zero;Zero" rot=" 0.;270.; 0."/>
+   <posXYZ volume="JDReturnR1S2"     X_Y_Z="Zero;Zero;Zero" rot=" 0.;270.; 0."/>
+</composition>
+<composition name="JDReturnRing0S">
+  <posXYZ volume="JDReturnRing1S"     X_Y_Z="JDSH_BDRRouRa_RetrunRing_outerRadius-JDReturnL/2. ; 0 ; -(JDReturnH+2.*JDReturnW)/2. " rot=" 90.; 0.; 0."/>
+</composition>
+
+<composition name="JDReturnRing">
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.;   0.  "/>
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.;  11.25"/>
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.;  22.5 "/>
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.;  33.75"/>
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.;  45.  "/>
+  <posXYZ volume="JDReturnRing0S" X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.;  67.5 "/>
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.;  78.75"/>
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.;  90.  "/>
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.; 101.25"/>
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.; 112.5 "/>
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.; 123.75"/>
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.; 135.  "/>
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.; 146.25"/>
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.; 157.5 "/>
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.; 168.75"/>
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.; 180.  "/>
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.; 191.25"/>
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.; 202.5 "/>
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.; 213.75"/>
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.; 225.  "/>
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.; 236.25"/>
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.; 247.5 "/>
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.; 258.75"/>
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.; 270.  "/>
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.; 281.25"/>
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.; 292.5 "/>
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.; 303.75"/>
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.; 315.  "/>
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.; 326.25"/>
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.; 337.5 "/>
+  <posXYZ volume="JDReturnRing0"  X_Y_Z=" 0.; 0.;0" rot=" 0.; 0.; 348.75"/>
+</composition>
+
+<!-- +++++++++++++++++++++++++++++++++++++++++++++++++ -->
+<!--  JD Shield Composition of volumes                 -->
+<!-- +++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+<composition  name="JDSH_ShieldAssembly_ASide_Base" >
+  <posXYZ  volume="JDSH_FrontDisk"                       X_Y_Z="0.;0.;JDSH_FDzposit_FrontDisk_Z"     rot="0.;0.;0." />
+  <posXYZ  volume="JDSH_BackDisk"                        X_Y_Z="0.;0.;JDSH_BDzposit_BackDisk_Z"      rot="0.;180.;0." />
+  <posXYZ  volume="JDSH_Tube"                            X_Y_Z="0.;0.;JDSH_TUBEzpos_Tube_Z"          rot="0.;0.;0." />
+  <posXYZ  volume="JDSH_Plug"                            X_Y_Z="0.;0.;JDSH_PLUGzpos_Plug_Z"          rot="0.;0.;0." />
+  <posXYZ  volume="JDReturnRing"                         X_Y_Z="0.;0.;JDSH_BDzposit_BackDisk_Z-JDSH_BDthickn_BackDisk_thickness/2.-2.*JDReturnW-JDReturnH"   rot="0.;180.;0." />
+  <posXYZ  volume="JDSH_MainRib_Support_Left"            X_Y_Z=" -JDSH_MainRib_Support_PosX ; JDSH_MainRibFeet_PosY-JDSH_MaRiTPthi_MainRibTP_thickness ; JDSH_CAzposit_ConeAssembly_Z+JDSH_MainRib_Support_PosZoffset "   />
+  <posXYZ  volume="JDSH_MainRib_Support_Right"           X_Y_Z="  JDSH_MainRib_Support_PosX ; JDSH_MainRibFeet_PosY-JDSH_MaRiTPthi_MainRibTP_thickness ; JDSH_CAzposit_ConeAssembly_Z+JDSH_MainRib_Support_PosZoffset "   />  
+</composition>
+
+<composition  name="JDSH_ShieldAssembly_ASide_2011" >
+  <posXYZ  volume="JDSH_MainRib_Left"                    X_Y_Z=" -JDSH_MainRibFeet_PosX ; JDSH_MainRibFeet_PosY ; JDSH_CAzposit_ConeAssembly_Z "   />
+  <posXYZ  volume="JDSH_MainRib_Right"                   X_Y_Z="  JDSH_MainRibFeet_PosX ; JDSH_MainRibFeet_PosY ; JDSH_CAzposit_ConeAssembly_Z "   />
+  <posXYZ  volume="JDSH_ConeAssembly"                    X_Y_Z="0.;0.;JDSH_CAzposit_ConeAssembly_Z" />
+  <posXYZ  volume="JDSH_SmallWheelHub"                   X_Y_Z="0.;0.;JDSH_SWHzposi_SmallWheelHub_Z" rot="0.;0.;0." />
+  <posXYZ  volume="JDSH_SmallWheelHubPoly"               X_Y_Z="0.;0.;JDSH_SWHzposi_SmallWheelHub_Z" rot="0.;0.;0." />
+  <posXYZ  volume="JDSH_SmallWheelHubLead"               X_Y_Z="0.;0.;JDSH_SWHzposi_SmallWheelHub_Z" rot="0.;0.;0." />
+  <posXYZ  volume="JDSH_ShieldAssembly_ASide_Base"       X_Y_Z="0.;0.; 0."  />
+</composition>
+
+<composition  name="JDSH_ShieldAssembly_ASide_2012" >
+  <posXYZ  volume="JDSH_AddShield_Lead"                  X_Y_Z="0.;0.; - JDSH_AddShield_Zwidth/2. - GENV_Eps"  />
+  <posXYZ  volume="JDSH_AddShield_Poly"                  X_Y_Z="0.;0.; - JDSH_AddShield_Zwidth/2. - GENV_Eps"  />
+  <posXYZ  volume="JDSH_AddShield_Iron"                  X_Y_Z="0.;0.; - JDSH_AddShield_Zwidth/2. - GENV_Eps"  />
+  <posXYZ  volume="JDSH_ShieldAssembly_ASide_2011"       X_Y_Z="0.;0.; 0."  />
+</composition>
+
+<composition  name="JDSH_ShieldAssembly_ASide" >
+  <posXYZ  volume="JDSH_Run2_BckFrtRing"                 X_Y_Z="0.; 0.; JDSH_SWHzposi_SmallWheelHub_Z + JDSH_SWHlengt_SmallWheelHub_length + JDSH_Run2_BckFrtRing_Poly_Zwidth/2. + GENV_Eps"  />
+  <posXYZ  volume="JDSH_Run2_BckBckRing"                 X_Y_Z="0.; 0.; JDSH_SWHzposi_SmallWheelHub_Z + JDSH_SWHlengt_SmallWheelHub_length + JDSH_Run2_BckFrtRing_Poly_Zwidth + JDSH_Run2_BckBckRing_Poly_Zwidth/2. + 2.*GENV_Eps"  />
+  <posXYZ  volume="JDSH_Run2_FrtIronRingCover"           X_Y_Z="0.;0.; -JDSH_Run2_FrtZposition+JDSH_Run2_FrtOutRing_Lead_Zwidth + 2.*JDSH_Run2_FrtCoverRg_Iron_Radthick"  />
+  <posXYZ  volume="JDSH_Run2_FrtPolyRing"                X_Y_Z="0.;0.; -JDSH_Run2_FrtZposition+JDSH_Run2_FrtInnRing_Poly_Zwidth/2."  />
+  <posXYZ  volume="JDSH_Run2_FrtLeadRing"                X_Y_Z="0.;0.; -JDSH_Run2_FrtZposition-JDSH_Run2_FrtOutRing_Lead_Zwidth/2.+JDSH_Run2_FrtInnRing_Poly_Zwidth"  />
+  <posXYZ  volume="JDSH_ShieldAssembly_ASide_2012"       X_Y_Z="0.;0.; 0."  />
+</composition>
+
+<composition  name="JDSH_ShieldAssembly_CSide_Base" >
+  <posXYZ  volume="JDSH_FrontDisk"                       X_Y_Z="0.;0.;JDSH_FDzposit_FrontDisk_Z"     rot="0.;0.;0." />
+  <posXYZ  volume="JDSH_BackDisk"                        X_Y_Z="0.;0.;JDSH_BDzposit_BackDisk_Z"      rot="0.;0.;0." />
+  <posXYZ  volume="JDSH_Tube"                            X_Y_Z="0.;0.;JDSH_TUBEzpos_Tube_Z"          rot="0.;0.;0." />
+  <posXYZ  volume="JDSH_Plug"                            X_Y_Z="0.;0.;JDSH_PLUGzpos_Plug_Z"          rot="0.;0.;0." />
+  <posXYZ  volume="JDReturnRing"                         X_Y_Z="0.;0.;JDSH_BDzposit_BackDisk_Z-JDSH_BDthickn_BackDisk_thickness/2."   rot="0.;0.;0." />
+  <posXYZ  volume="JDSH_MainRib_Support_Left"            X_Y_Z=" -JDSH_MainRib_Support_PosX ; JDSH_MainRibFeet_PosY-JDSH_MaRiTPthi_MainRibTP_thickness ; JDSH_CAzposit_ConeAssembly_Z+JDSH_MainRib_Support_PosZoffset "   />
+  <posXYZ  volume="JDSH_MainRib_Support_Right"           X_Y_Z="  JDSH_MainRib_Support_PosX ; JDSH_MainRibFeet_PosY-JDSH_MaRiTPthi_MainRibTP_thickness ; JDSH_CAzposit_ConeAssembly_Z+JDSH_MainRib_Support_PosZoffset "   />  
+</composition>
+
+<composition  name="JDSH_ShieldAssembly_CSide_2011" >
+  <posXYZ  volume="JDSH_MainRib_Left"                    X_Y_Z=" -JDSH_MainRibFeet_PosX ; JDSH_MainRibFeet_PosY ; JDSH_CAzposit_ConeAssembly_Z "   />
+  <posXYZ  volume="JDSH_MainRib_Right"                   X_Y_Z="  JDSH_MainRibFeet_PosX ; JDSH_MainRibFeet_PosY ; JDSH_CAzposit_ConeAssembly_Z "   />
+  <posXYZ  volume="JDSH_ConeAssembly"                    X_Y_Z="0.;0.;JDSH_CAzposit_ConeAssembly_Z"  rot="0.;0.;0." />
+  <posXYZ  volume="JDSH_SmallWheelHub"                   X_Y_Z="0.;0.;JDSH_SWHzposi_SmallWheelHub_Z" rot="0.;0.;0." />
+  <posXYZ  volume="JDSH_SmallWheelHubPoly"               X_Y_Z="0.;0.;JDSH_SWHzposi_SmallWheelHub_Z" rot="0.;0.;0." />
+  <posXYZ  volume="JDSH_SmallWheelHubLead"               X_Y_Z="0.;0.;JDSH_SWHzposi_SmallWheelHub_Z" rot="0.;0.;0." />
+  <posXYZ  volume="JDSH_ShieldAssembly_CSide_Base"       X_Y_Z="0.;0.; 0."  />
+</composition>
+
+<composition  name="JDSH_ShieldAssembly_CSide_2012" >
+  <posXYZ  volume="JDSH_AddShield_Lead"                  X_Y_Z="0.;0.; - JDSH_AddShield_Zwidth/2. - GENV_Eps"  />
+  <posXYZ  volume="JDSH_AddShield_Poly"                  X_Y_Z="0.;0.; - JDSH_AddShield_Zwidth/2. - GENV_Eps"  />
+  <posXYZ  volume="JDSH_AddShield_Iron"                  X_Y_Z="0.;0.; - JDSH_AddShield_Zwidth/2. - GENV_Eps"  />
+  <posXYZ  volume="JDSH_ShieldAssembly_CSide_2011"       X_Y_Z="0.;0.; 0."  />
+</composition>
+
+<composition  name="JDSH_ShieldAssembly_CSide" >
+  <posXYZ  volume="JDSH_Run2_BckFrtRing"                 X_Y_Z="0.; 0.; JDSH_SWHzposi_SmallWheelHub_Z + JDSH_SWHlengt_SmallWheelHub_length + JDSH_Run2_BckFrtRing_Poly_Zwidth/2. + GENV_Eps"  />
+  <posXYZ  volume="JDSH_Run2_BckBckRing"                 X_Y_Z="0.; 0.; JDSH_SWHzposi_SmallWheelHub_Z + JDSH_SWHlengt_SmallWheelHub_length + JDSH_Run2_BckFrtRing_Poly_Zwidth + JDSH_Run2_BckBckRing_Poly_Zwidth/2. + 2.*GENV_Eps"  />
+  <posXYZ  volume="JDSH_Run2_FrtIronRingCover"           X_Y_Z="0.;0.; -JDSH_Run2_FrtZposition+JDSH_Run2_FrtOutRing_Lead_Zwidth + 2.*JDSH_Run2_FrtCoverRg_Iron_Radthick"  />
+  <posXYZ  volume="JDSH_Run2_FrtPolyRing"                X_Y_Z="0.;0.; -JDSH_Run2_FrtZposition+JDSH_Run2_FrtInnRing_Poly_Zwidth/2."  />
+  <posXYZ  volume="JDSH_Run2_FrtLeadRing"                X_Y_Z="0.;0.; -JDSH_Run2_FrtZposition-JDSH_Run2_FrtOutRing_Lead_Zwidth/2.+JDSH_Run2_FrtInnRing_Poly_Zwidth"  />
+  <posXYZ  volume="JDSH_ShieldAssembly_CSide_2012"       X_Y_Z="0.;0.; 0."  />
+</composition>
+
+<composition  name="JDSH_Shield" >
+  <posXYZ  volume="JDSH_ShieldAssembly_CSide"            X_Y_Z="0.;0.;-JDSH_NomiZpos_Nominal_zpos"     rot="0.;JDSH_rota180d_180degRotation;0." />
+</composition>
+
+<!--     name       =  JT Toroid Shielding           section name       = "Shielding" -->
+<!--  Primary variables  -->
+<var  name="JTSH_OPlength_OuterPlugs_length"                        value=" 4736. " />  <!-- confirmed atljt___0055-vAC -->
+<!-- BEGIN confirmation with atljt___0059-vAB (if no other comment) -->
+<var  name="JTSH_OPinnRad_OuterPlugs_innerRadius"                   value="  600. " />
+<var  name="JTSH_OPinnRad_OuterPlugs_innerRadiusSmall"              value="  562.5" /> <!-- confirmed atljt___0056-vAC -->
+<var  name="JTSH_OPoutRad_OuterPlugs_outerRadius"                   value="  802. " />
+<var  name="JTSH_IPlength_InnerPlugs_length"                        value=" 3686. " />  <!-- confirmed atljt___0055-vAC -->
+<var  name="JTSH_IPinnRa1_InnerPlugs_innerRadius1"                  value="  170.8" />
+<var  name="JTSH_IPtiltAn_InnerPlugs_tiltAngle"                     value="    1.1" />
+<var  name="JTSH_IPzoffse_InnerPlugs_zoffset"                       value=" 1000. " />
+<var  name="JTSH_PRlenoff_PolyRings_lengthoffset"                   value="   67. " />  <!-- confirmed atljt___0055-vAC -->
+<!-- END confirmation with atljt___0059-vAB -->
+<!-- BEGIN confirmation with atljt___0052-vAA (if no other comment) -->
+<var  name="JTSH_PRinnRad_PolyRings_innerRadius"                    value="  802. " />
+<var  name="JTSH_PRinRaof_PolyRings_innerRadoff"                    value="   15. " />
+<var  name="JTSH_PRoutRad_PolyRings_outerRadius"                    value="  857. " />
+<var  name="JTSH_PRexttAn_PolyRings_extension_tiltAngle"            value="   18. " />
+<!-- END confirmation with atljt___0052-vAA -->
+<var  name="JTSH_PRipexle_PolyRings_IPextension_length"             value="  205. " />  <!-- confirmed atljt___0059-vAB -->
+<var  name="JTSH_zpositio_Shield_Z"                                 value=" 7917. " />  <!-- atljt___0055-vAC says 7941. , TC says wrong by 3cm -->
+<var  name="JTSH_yrotatio_Shield_rotY"                              value="  180. " />  <!-- NO CONFIRMATION NEEDED -->
+
+<var  name="JTSH_IPinnRa2_InnerPlugs_innerRadius2" value="JTSH_IPinnRa1_InnerPlugs_innerRadius1 + JTSH_IPlength_InnerPlugs_length *tan(JTSH_IPtiltAn_InnerPlugs_tiltAngle*GENV_PiS180)"/> <!-- changed by Sven.Menke@CERN.CH Jul 2020 from JTSH_OPlength_OuterPlugs_length to JTSH_IPlength_InnerPlugs_length -->
+<var  name="JTSH_PRextzpo_PolyRings_extension_z"   value="(JTSH_PRoutRad_PolyRings_outerRadius-JTSH_PRinnRad_PolyRings_innerRadius-JTSH_PRinRaof_PolyRings_innerRadoff)/tan(JTSH_PRexttAn_PolyRings_extension_tiltAngle*GENV_PiS180)"/>
+
+<var  name="JTSH_OPzposi1_OuterPlugs_z1"    value="JTSH_PRipexle_PolyRings_IPextension_length" />
+<var  name="JTSH_OPzposi2_OuterPlugs_z2"    value="JTSH_OPzposi1_OuterPlugs_z1+JTSH_OPlength_OuterPlugs_length" />
+
+<var  name="JTSH_IPzposi1_InnerPlugs_z1"    value="JTSH_IPzoffse_InnerPlugs_zoffset" />
+<var  name="JTSH_IPzposi2_InnerPlugs_z2"    value="JTSH_IPzposi1_InnerPlugs_z1+JTSH_IPlength_InnerPlugs_length" />
+
+<var  name="JTSH_PRzposi1_PolyRings_z1"     value="JTSH_OPzposi2_OuterPlugs_z2-JTSH_OPlength_OuterPlugs_length+JTSH_PRlenoff_PolyRings_lengthoffset" />
+<var  name="JTSH_PRzposi2_PolyRings_z2"     value="JTSH_OPzposi2_OuterPlugs_z2-JTSH_OPlength_OuterPlugs_length+JTSH_PRlenoff_PolyRings_lengthoffset+JTSH_PRextzpo_PolyRings_extension_z" />
+<var  name="JTSH_PRzposi3_PolyRings_z3"     value="JTSH_OPzposi2_OuterPlugs_z2" />
+
+<!-- Modelization of JT Plugs (outer and inner combined) -->
+<pcon   name="JTSH_Plugs"          material="ShieldIron"  >
+  <polyplane  Rio_Z="JTSH_OPinnRad_OuterPlugs_innerRadius;JTSH_OPoutRad_OuterPlugs_outerRadius;JTSH_OPzposi1_OuterPlugs_z1" />
+  <polyplane  Rio_Z="JTSH_OPinnRad_OuterPlugs_innerRadius;JTSH_OPoutRad_OuterPlugs_outerRadius;JTSH_IPzposi1_InnerPlugs_z1" />
+  <polyplane Rio_Z="JTSH_IPinnRa1_InnerPlugs_innerRadius1;JTSH_OPoutRad_OuterPlugs_outerRadius;JTSH_IPzposi1_InnerPlugs_z1" />
+  <polyplane Rio_Z="JTSH_IPinnRa2_InnerPlugs_innerRadius2;JTSH_OPoutRad_OuterPlugs_outerRadius;JTSH_IPzposi2_InnerPlugs_z2" />
+  <polyplane  Rio_Z="JTSH_OPinnRad_OuterPlugs_innerRadiusSmall;JTSH_OPoutRad_OuterPlugs_outerRadius;JTSH_IPzposi2_InnerPlugs_z2" />
+  <polyplane  Rio_Z="JTSH_OPinnRad_OuterPlugs_innerRadiusSmall;JTSH_OPoutRad_OuterPlugs_outerRadius;JTSH_OPzposi2_OuterPlugs_z2" />
+</pcon>
+
+<pcon name="JTSH_PolyRings" material="PolyBoronB2O3" >
+  <polyplane Rio_Z="JTSH_PRinnRad_PolyRings_innerRadius;JTSH_PRinnRad_PolyRings_innerRadius+JTSH_PRinRaof_PolyRings_innerRadoff;JTSH_PRzposi1_PolyRings_z1" />
+  <polyplane Rio_Z="JTSH_PRinnRad_PolyRings_innerRadius;JTSH_PRoutRad_PolyRings_outerRadius;JTSH_PRzposi2_PolyRings_z2" />
+  <polyplane Rio_Z="JTSH_PRinnRad_PolyRings_innerRadius;JTSH_PRoutRad_PolyRings_outerRadius;JTSH_PRzposi3_PolyRings_z3" />
+</pcon>
+
+<!--  **************************************************************
+      ***                   Installed for Run2                  ****
+      **************************************************************  -->
+
+<var name="JTC_JTCC_JTCCommonAngle"           value="     66. " /> <!-- atujt___0020-v0 -->
+<var name="JTC_JTCB_JTCBottomRadYOffset"      value="    177. " /> <!-- atujt___0020-v0 -->
+<var name="JTC_JTCB_JTCBottomCenterCutX"      value="    300. " /> <!-- atujt___0020-v0 -->
+<var name="JTC_JTCB_JTCBottomCenterCutY"      value="JTC_JTCB_JTCBottomCenterCutX" /> <!-- atujt___0020-v0 -->
+<var name="JTC_JTCB_JTCBottomSideCutY"        value="    400. " /> <!-- atujt___0020-v0 -->
+<var name="JTC_JTCB_JTCBottomBigRad"          value="   1500. " /> <!-- atujt___0020-v0 -->
+<var name="JTC_JTCB_JTCBottomBigX"            value="   1220. " /> <!-- atujt___0020-v0 -->
+<var name="JTC_JTCB_JTCBottomBigZ"            value="     25. + 13. " /> <!-- atujt___0020-v0 , adjustments discussed with TC-->
+<var name="JTC_JTCB_JTCBottomSmallRad"        value="    864.9" /> <!-- atujt___0022-v0 says 865. but overlaps with ECT_EV_CentralTube -->
+<var name="JTC_JTCB_JTCBottomSmallX"          value="    610. " /> <!-- atujt___0022-v0 -->
+<var name="JTC_JTCB_JTCBottomSmallZ"          value="     36. - 13. " /> <!-- atujt___0022-v0 , TC says distance to JF is 4cm, it's mounted on ECT -->
+
+<var name="JTC_JTCT_JTCTopInnerRad"           value="    522.5" /> <!-- atujt___0018-v0 -->
+<var name="JTC_JTCT_JTCTopMediumRad"          value="   1050. " /> <!-- atujt___0029-v0 -->
+<var name="JTC_JTCT_JTCTopOuterRad"           value="   1500. " /> <!-- atujt___0018-v0 -->
+<var name="JTC_JTCT_JTCTopFullZ"              value="     65. + 10. " /> <!-- atujt___0018-v0 , adding 1cm to close gap to ECT, agreed with TC -->
+<var name="JTC_JTCT_JTCTopThickZ"             value="     45. +  5. " /> <!-- atujt___0018-v0 , adding 5mm just to be a bit closer, agreed with TC-->
+<var name="JTC_JTCT_JTCTopCenterXCut"         value="    374. " /> <!-- atujt___0026-v0 -->
+<var name="JTC_JTCT_JTCTopSideCutY"           value="    395. " /> <!-- atujt___0026-v0 -->
+<var name="JTC_JTCT_JTCTopRadYOff"            value="    161. " /> <!-- atujt___0026-v0 -->
+
+<var name="JTC_JTCB_BottomTiltedXOffset" value="tan(JTC_JTCC_JTCCommonAngle*GENV_PiS180)*(JTC_JTCB_JTCBottomSideCutY-JTC_JTCB_JTCBottomRadYOffset)"/>
+<var name="JTC_JTCT_TopTiltedXOffset"    value="tan(JTC_JTCC_JTCCommonAngle*GENV_PiS180)*(JTC_JTCT_JTCTopSideCutY-JTC_JTCT_JTCTopRadYOff)"/>
+
+<tubs name="JTC_JTCB_BottomBigTubeBase" material="PolyBoron207HD5"  Rio_Z=" 0.; JTC_JTCB_JTCBottomBigRad; JTC_JTCB_JTCBottomBigZ" nbPhi="20" profile="180.; 180."/>
+<tubs name="JTC_JTCB_BottomSmallTubeBase" material="PolyBoron207HD5"  Rio_Z=" 0.; JTC_JTCB_JTCBottomSmallRad; JTC_JTCB_JTCBottomSmallZ" nbPhi="20" profile="180.; 180."/>
+<tubs name="JTC_JTCB_BottomAuxCutTube" material="PolyBoron207HD5"  Rio_Z=" 0.; JFSH_PLUGouRa_Plug_outerRadius+GENV_Eps; JTC_JTCT_JTCTopFullZ" />
+
+<!-- not required since approximations in JFSH
+box name="JTC_JTCB_BottomCentralCut" material="PolyBoron207HD5" X_Y_Z=" 2.*(JTC_JTCB_JTCBottomCenterCutX+GENV_Eps); JTC_JTCB_JTCBottomCenterCutY+2.*GENV_Eps; JTC_JTCB_JTCBottomBigZ+2.*GENV_Eps"/>
+-->
+<box name="JTC_JTCB_SideCut" material="PolyBoron207HD5" X_Y_Z=" 2.*JTC_JTCB_JTCBottomCenterCutX; JTC_JTCB_JTCBottomSideCutY+2.*GENV_Eps; JTC_JTCB_JTCBottomBigZ+4.*GENV_Eps"/>
+<box name="JTC_JTCB_EndCut" material="PolyBoron207HD5" X_Y_Z=" JTC_JTCB_JTCBottomBigX; JTC_JTCB_JTCBottomBigRad+2.*GENV_Eps; JTC_JTCB_JTCBottomBigZ+6.*GENV_Eps"/>
+<box name="JTC_JTCB_TiltCut" material="PolyBoron207HD5" X_Y_Z=" JTC_JTCB_JTCBottomBigRad; JTC_JTCB_JTCBottomBigRad; JTC_JTCT_JTCTopFullZ+8.*GENV_Eps"/>
+
+<subtraction name="JTC_JTCB_BottomBigTube">
+  <posXYZ volume="JTC_JTCB_BottomBigTubeBase"  X_Y_Z=" 0.; 0.; 0. " />
+  <posXYZ volume="JTC_JTCB_BottomAuxCutTube"   X_Y_Z=" 0.; 0.; 0. " />
+<!--  <posXYZ volume="JTC_JTCB_BottomCentralCut"   X_Y_Z=" 0.; -JTC_JTCB_JTCBottomCenterCutY/2.+GENV_Eps; 0." /> -->
+  <posXYZ volume="JTC_JTCB_SideCut"       X_Y_Z="  2.*JTC_JTCB_JTCBottomCenterCutX; -JTC_JTCB_JTCBottomSideCutY/2.+GENV_Eps; 0." />
+  <posXYZ volume="JTC_JTCB_SideCut"       X_Y_Z=" -2.*JTC_JTCB_JTCBottomCenterCutX; -JTC_JTCB_JTCBottomSideCutY/2.+GENV_Eps; 0." />
+  <posXYZ volume="JTC_JTCB_EndCut"   X_Y_Z="  1.5*JTC_JTCB_JTCBottomBigX; -JTC_JTCB_JTCBottomBigRad/2.; 0." />
+  <posXYZ volume="JTC_JTCB_EndCut"   X_Y_Z=" -1.5*JTC_JTCB_JTCBottomBigX; -JTC_JTCB_JTCBottomBigRad/2.; 0." />
+  <posXYZ volume="JTC_JTCB_TiltCut"   X_Y_Z=" -JTC_JTCB_BottomTiltedXOffset-cos((45.-(90-JTC_JTCC_JTCCommonAngle))*GENV_PiS180)*JTC_JTCB_JTCBottomBigRad/sqrt(2.); -JTC_JTCB_JTCBottomSideCutY+sin((45.-(90-JTC_JTCC_JTCCommonAngle))*GENV_PiS180)*JTC_JTCB_JTCBottomBigRad/sqrt(2.); 0." rot="0.; 0.; 90.-JTC_JTCC_JTCCommonAngle"/>
+  <posXYZ volume="JTC_JTCB_TiltCut"   X_Y_Z=" JTC_JTCB_BottomTiltedXOffset+cos((45.-(90-JTC_JTCC_JTCCommonAngle))*GENV_PiS180)*JTC_JTCB_JTCBottomBigRad/sqrt(2.); -JTC_JTCB_JTCBottomSideCutY+sin((45.-(90-JTC_JTCC_JTCCommonAngle))*GENV_PiS180)*JTC_JTCB_JTCBottomBigRad/sqrt(2.); 0." rot="0.; 0.; -90.+JTC_JTCC_JTCCommonAngle"/>
+</subtraction>
+
+<subtraction name="JTC_JTCB_BottomSmallTube">
+  <posXYZ volume="JTC_JTCB_BottomSmallTubeBase"  X_Y_Z=" 0.; 0.; 0. " />
+  <posXYZ volume="JTC_JTCB_BottomAuxCutTube"   X_Y_Z=" 0.; 0.; 0. " />
+<!--  <posXYZ volume="JTC_JTCB_BottomCentralCut"   X_Y_Z=" 0.; -JTC_JTCB_JTCBottomCenterCutY/2.+GENV_Eps; 0." /> -->
+  <posXYZ volume="JTC_JTCB_SideCut"       X_Y_Z="  2.*JTC_JTCB_JTCBottomCenterCutX; -JTC_JTCB_JTCBottomSideCutY/2.+GENV_Eps; 0." />
+  <posXYZ volume="JTC_JTCB_SideCut"       X_Y_Z=" -2.*JTC_JTCB_JTCBottomCenterCutX; -JTC_JTCB_JTCBottomSideCutY/2.+GENV_Eps; 0." />
+  <posXYZ volume="JTC_JTCB_EndCut"   X_Y_Z="  0.5*JTC_JTCB_JTCBottomBigX+JTC_JTCB_JTCBottomSmallX; -JTC_JTCB_JTCBottomBigRad/2.; 0." />
+  <posXYZ volume="JTC_JTCB_EndCut"   X_Y_Z=" -0.5*JTC_JTCB_JTCBottomBigX-JTC_JTCB_JTCBottomSmallX; -JTC_JTCB_JTCBottomBigRad/2.; 0." />
+  <posXYZ volume="JTC_JTCB_TiltCut"   X_Y_Z=" -JTC_JTCB_BottomTiltedXOffset-cos((45.-(90-JTC_JTCC_JTCCommonAngle))*GENV_PiS180)*JTC_JTCB_JTCBottomBigRad/sqrt(2.); -JTC_JTCB_JTCBottomSideCutY+sin((45.-(90-JTC_JTCC_JTCCommonAngle))*GENV_PiS180)*JTC_JTCB_JTCBottomBigRad/sqrt(2.); 0." rot="0.; 0.; 90.-JTC_JTCC_JTCCommonAngle"/>
+  <posXYZ volume="JTC_JTCB_TiltCut"   X_Y_Z=" JTC_JTCB_BottomTiltedXOffset+cos((45.-(90-JTC_JTCC_JTCCommonAngle))*GENV_PiS180)*JTC_JTCB_JTCBottomBigRad/sqrt(2.); -JTC_JTCB_JTCBottomSideCutY+sin((45.-(90-JTC_JTCC_JTCCommonAngle))*GENV_PiS180)*JTC_JTCB_JTCBottomBigRad/sqrt(2.); 0." rot="0.; 0.; -90.+JTC_JTCC_JTCCommonAngle"/>
+</subtraction>
+
+<tubs name="JTC_JTCT_TopTubeBase" material="PolyBoron207HD5"  Rio_Z=" JTC_JTCT_JTCTopInnerRad; JTC_JTCT_JTCTopOuterRad; JTC_JTCT_JTCTopFullZ" nbPhi="25" />
+<tubs name="JTC_JTCT_TopCutTube" material="PolyBoron207HD5"  Rio_Z=" 0.; JTC_JTCT_JTCTopMediumRad; JTC_JTCT_JTCTopFullZ-JTC_JTCT_JTCTopThickZ+GENV_Eps" nbPhi="25"/>
+
+<box name="JTC_JTCT_TopCentralCut" material="PolyBoron207HD5" X_Y_Z=" 2.*JTC_JTCT_JTCTopCenterXCut; JTC_JTCT_JTCTopOuterRad+2.*GENV_Eps; JTC_JTCT_JTCTopFullZ+4.*GENV_Eps"/>
+<box name="JTC_JTCT_SideCut" material="PolyBoron207HD5" X_Y_Z=" 2.*JTC_JTCT_TopTiltedXOffset; JTC_JTCT_JTCTopOuterRad; JTC_JTCT_JTCTopFullZ+6.*GENV_Eps"/>
+
+<subtraction name="JTC_JTCT_TopTube">
+  <posXYZ volume="JTC_JTCT_TopTubeBase"     X_Y_Z=" 0.; 0.; 0. " />
+  <posXYZ volume="JTC_JTCT_TopCutTube"      X_Y_Z=" 0.; 0.; JTC_JTCT_JTCTopThickZ/2.+GENV_Eps" />
+  <posXYZ volume="JTC_JTCT_TopCentralCut"   X_Y_Z=" 0.; -JTC_JTCT_JTCTopOuterRad/2.-GENV_Eps; 0." />
+  <posXYZ volume="JTC_JTCT_SideCut"         X_Y_Z=" 0.; -JTC_JTCT_JTCTopOuterRad/2.-JTC_JTCT_JTCTopSideCutY; 0." />
+  <posXYZ volume="JTC_JTCB_TiltCut"   X_Y_Z=" JTC_JTCT_TopTiltedXOffset+sin((45.-(90-JTC_JTCC_JTCCommonAngle))*GENV_PiS180)*JTC_JTCB_JTCBottomBigRad/sqrt(2.); -JTC_JTCT_JTCTopSideCutY-cos((45.-(90-JTC_JTCC_JTCCommonAngle))*GENV_PiS180)*JTC_JTCB_JTCBottomBigRad/sqrt(2.); 0." rot="0.; 0.; JTC_JTCC_JTCCommonAngle"/>
+  <posXYZ volume="JTC_JTCB_TiltCut"   X_Y_Z=" -JTC_JTCT_TopTiltedXOffset-sin((45.-(90-JTC_JTCC_JTCCommonAngle))*GENV_PiS180)*JTC_JTCB_JTCBottomBigRad/sqrt(2.); -JTC_JTCT_JTCTopSideCutY-cos((45.-(90-JTC_JTCC_JTCCommonAngle))*GENV_PiS180)*JTC_JTCB_JTCBottomBigRad/sqrt(2.); 0." rot="0.; 0.; -JTC_JTCC_JTCCommonAngle"/>
+</subtraction>
+
+<!-- Composition of JT Shields  -->
+<composition  name="JTSH_ShieldElements" >
+  <posXYZ  volume="JTSH_Plugs"        X_Y_Z="0.;0.;0."      rot="0.;0.;0." />
+  <posXYZ  volume="JTSH_PolyRings"    X_Y_Z="0.;0.;0."      rot="0.;0.;0." />
+</composition>
+
+<composition  name="JTSH_Shield" >
+ <posXYZ  volume="JTSH_ShieldElements"   X_Y_Z="0.;0.; JTSH_zpositio_Shield_Z"      rot="0.;0.;0." /> 
+ <posXYZ  volume="JTSH_ShieldElements"   X_Y_Z="0.;0.;-JTSH_zpositio_Shield_Z"      rot="0.;JTSH_yrotatio_Shield_rotY;0." /> 
+ <posXYZ  volume="JTC_JTCT_TopTube"      X_Y_Z="0.;0.; JFSH_ECTnomiz_ECT_Nominal_zpos+JFSH_JFCMCzof_JFCMainCylinder_zoffset-JTC_JTCT_JTCTopFullZ/2.-GENV_Eps"      rot="0.;JTSH_yrotatio_Shield_rotY;0." />
+ <posXYZ  volume="JTC_JTCT_TopTube"      X_Y_Z="0.;0.;-JFSH_ECTnomiz_ECT_Nominal_zpos-JFSH_JFCMCzof_JFCMainCylinder_zoffset+JTC_JTCT_JTCTopFullZ/2.+GENV_Eps"      rot="0.;0.;0." />
+ <posXYZ  volume="JTC_JTCB_BottomSmallTube" X_Y_Z="0.;0.;JTSH_OPzposi2_OuterPlugs_z2+JTSH_zpositio_Shield_Z+JTC_JTCB_JTCBottomSmallZ/2.+GENV_Eps" /> 
+ <posXYZ  volume="JTC_JTCB_BottomBigTube" X_Y_Z="0.;0.;JTSH_OPzposi2_OuterPlugs_z2+JTSH_zpositio_Shield_Z+JTC_JTCB_JTCBottomSmallZ+JTC_JTCB_JTCBottomBigZ/2.+2.*GENV_Eps"/>
+ <posXYZ  volume="JTC_JTCB_BottomSmallTube" X_Y_Z="0.;0.;-(JTSH_OPzposi2_OuterPlugs_z2+JTSH_zpositio_Shield_Z+JTC_JTCB_JTCBottomSmallZ/2.+GENV_Eps)" /> 
+ <posXYZ  volume="JTC_JTCB_BottomBigTube" X_Y_Z="0.;0.;-(JTSH_OPzposi2_OuterPlugs_z2+JTSH_zpositio_Shield_Z+JTC_JTCB_JTCBottomSmallZ+JTC_JTCB_JTCBottomBigZ/2.+2.*GENV_Eps)"/> 
+</composition>
+
+</section>
+
+
+<section name       = "pp2"
+         version    = "7.0"
+         date       = "01-04-2010"
+         author     = "new simplified pp2 by Jochen - old versions by Laurent, Andrea Dell'Acqua and Daniel Pomarede removed"
+         top_volume = "pp2">
+
+
+<!--     name       =  pp2                           section name       = "Services"  -->
+<!--  **************************************************************
+      **************************************************************
+      ***                                                       ****
+      ***        ATLAS Services : ID Patch Panels PP2           ****
+      ***                                                       ****
+      **************************************************************
+      **************************************************************  -->
+
+<!-- New Simplified PP2 - subboxes merged by Jochen Meyer-->
+
+<!-- variables for semi simplified boxes -->
+<!-- sector 13 - one -->
+<var  name="IPP2_Sec13_Box1_z"      value=" 520. " />
+<var  name="IPP2_Sec13_Box1_x"      value="1300. " />
+<var  name="IPP2_Sec13_Box1_y"      value=" 420. " />
+
+<var  name="IPP2_Sec13_Box2_z"      value="IPP2_Sec13_Box1_z"    />
+<var  name="IPP2_Sec13_Box2_x"      value="IPP2_Sec13_Box1_x/2." />
+<var  name="IPP2_Sec13_Box2_y"      value=" 450. " />
+
+<!-- sector 13 - two -->
+<var  name="IPP2_Sec13_Box3_z"      value=" 380. " />
+<var  name="IPP2_Sec13_Box3_x"      value=" 420. " />
+<var  name="IPP2_Sec13_Box3_y"      value=" 440. " />
+
+<var  name="IPP2_Sec13_Box4_z"      value=" 700. " />
+<var  name="IPP2_Sec13_Box4_x"      value=" 400. " />
+<var  name="IPP2_Sec13_Box4_y"      value="IPP2_Sec13_Box3_y" />
+
+<var  name="IPP2_Sec13_Box5_z"      value=" 590. " />
+<var  name="IPP2_Sec13_Box5_x"      value=" 540. " />
+<var  name="IPP2_Sec13_Box5_y"      value=" 170. " />
+
+<var  name="IPP2_Sec13_Box6_z"      value=" 500. " />
+<var  name="IPP2_Sec13_Box6_x"      value=" 150. " />
+<var  name="IPP2_Sec13_Box6_y"      value=" 100. " />
+
+<var  name="IPP2_Sec13_xspace"      value="   37.5" />
+
+<!-- sector 3 & 7 -->
+<var  name="IPP2_Sec37_Box1_z"      value=" 610. " />
+<var  name="IPP2_Sec37_Box1_x"      value=" 520. " />
+<var  name="IPP2_Sec37_Box1_y"      value=" 850. " />
+
+<var  name="IPP2_Sec37_Box2_z"      value=" 300. " />
+<var  name="IPP2_Sec37_Box2_x"      value="IPP2_Sec37_Box1_x" />
+<var  name="IPP2_Sec37_Box2_y"      value=" 420. " />
+
+<var  name="IPP2_Sec37_Box3_z"      value=" 300. " />
+<var  name="IPP2_Sec37_Box3_x"      value=" 260. " />
+<var  name="IPP2_Sec37_Box3_y"      value=" 360. " />
+
+<var  name="IPP2_Sec37_Box4_z"      value=" 360. " />
+<var  name="IPP2_Sec37_Box4_x"      value=" 560. " />
+<var  name="IPP2_Sec37_Box4_y"      value="IPP2_Sec37_Box3_y" />
+
+<var  name="IPP2_Sec37_Box5_z"      value=" 120. " />
+<var  name="IPP2_Sec37_Box5_x"      value=" 320. " />
+<var  name="IPP2_Sec37_Box5_y"      value=" 120. " />
+
+<var  name="IPP2_Sec37_Box6_z"      value=" 200. " />
+<var  name="IPP2_Sec37_Box6_x"      value=" 120. " />
+<var  name="IPP2_Sec37_Box6_y"      value=" 120. " />
+
+<var  name="IPP2_Sec37_xoffset"     value="  40. " />
+
+<!-- sector 1 & 9 -->
+<var  name="IPP2_Sec19_Box1_z"      value=" 610. " />
+<var  name="IPP2_Sec19_Box1_x"      value=" 520. " />
+<var  name="IPP2_Sec19_Box1_y"      value="1260. " />
+
+<var  name="IPP2_Sec19_Box2_z"      value=" 300." />
+<var  name="IPP2_Sec19_Box2_x"      value=" 520." />
+<var  name="IPP2_Sec19_Box2_y"      value=" 850." />
+
+<var  name="IPP2_Sec19_Box3_z"      value=" 420." />
+<var  name="IPP2_Sec19_Box3_x"      value=" 380." />
+<var  name="IPP2_Sec19_Box3_y"      value=" 710." />
+
+<var  name="IPP2_Sec19_Box4_z"      value=" 400." />
+<var  name="IPP2_Sec19_Box4_x"      value=" 700." />
+<var  name="IPP2_Sec19_Box4_y"      value="IPP2_Sec19_Box3_y" />
+
+<var  name="IPP2_Sec19_Box5_z"      value=" 110." />
+<var  name="IPP2_Sec19_Box5_x"      value=" 400." />
+<var  name="IPP2_Sec19_Box5_y"      value=" 100." />
+
+<var  name="IPP2_Sec19_Box2_yoffset" value=" 300." />
+<var  name="IPP2_Sec19_xoffset"      value="IPP2_Sec37_xoffset" />
+
+<!-- universal floor -->
+<var  name="IPP2_UniFloor_x"        value=" 900. "/>
+<var  name="IPP2_UniFloor_y"        value="  15. "/>
+<var  name="IPP2_UniFloor_z"        value="1770. "/>
+
+<var  name="IPP2_UniFl_Sec13Zshift" value="  40. "/>
+
+<!-- coordinates -->
+<var  name="IPP2_xpos19"       value="+5880. "/>
+<var  name="IPP2_ypos19"       value="-1100. "/>
+<var  name="IPP2_zpos19"       value="+2560. "/>
+<var  name="IPP2_xpos37"       value="+4710. "/>
+<var  name="IPP2_ypos37"       value="+3340. "/>
+<var  name="IPP2_zpos37"       value="+2710. "/>
+<var  name="IPP2_xpos13_one"   value="  650. "/>
+<var  name="IPP2_ypos13_one"   value="-6380. "/>
+<var  name="IPP2_zpos13_one"   value="+3820. "/>
+<var  name="IPP2_xpos13_two"   value=" +890. "/>
+<var  name="IPP2_ypos13_two"   value="-6380. "/>
+<var  name="IPP2_zpos13_two"   value="+2460. "/>
+
+<box  name="IPP2_UniFloor"   material="Aluminium4"  X_Y_Z="IPP2_UniFloor_x; IPP2_UniFloor_y; IPP2_UniFloor_z" />
+
+<box  name="IPP2_Sec13_Box1" material="Aluminium1"  X_Y_Z="IPP2_Sec13_Box1_x; IPP2_Sec13_Box1_y; IPP2_Sec13_Box1_z" />
+<box  name="IPP2_Sec13_Box2" material="Aluminium1"  X_Y_Z="IPP2_Sec13_Box2_x; IPP2_Sec13_Box2_y; IPP2_Sec13_Box2_z" />
+<box  name="IPP2_Sec13_Box3" material="Aluminium1"  X_Y_Z="IPP2_Sec13_Box3_x; IPP2_Sec13_Box3_y; IPP2_Sec13_Box3_z" />
+<box  name="IPP2_Sec13_Box4" material="Aluminium1"  X_Y_Z="IPP2_Sec13_Box4_x; IPP2_Sec13_Box4_y; IPP2_Sec13_Box4_z" />
+<box  name="IPP2_Sec13_Box5" material="Aluminium1"  X_Y_Z="IPP2_Sec13_Box5_x; IPP2_Sec13_Box5_y; IPP2_Sec13_Box5_z" />
+<box  name="IPP2_Sec13_Box6" material="Aluminium1"  X_Y_Z="IPP2_Sec13_Box6_x; IPP2_Sec13_Box6_y; IPP2_Sec13_Box6_z" />
+
+<box  name="IPP2_Sec37_Box1" material="Aluminium1"  X_Y_Z="IPP2_Sec37_Box1_x; IPP2_Sec37_Box1_y; IPP2_Sec37_Box1_z" />
+<box  name="IPP2_Sec37_Box2" material="Aluminium1"  X_Y_Z="IPP2_Sec37_Box2_x; IPP2_Sec37_Box2_y; IPP2_Sec37_Box2_z" />
+<box  name="IPP2_Sec37_Box3" material="Aluminium1"  X_Y_Z="IPP2_Sec37_Box3_x; IPP2_Sec37_Box3_y; IPP2_Sec37_Box3_z" />
+<box  name="IPP2_Sec37_Box4" material="Aluminium1"  X_Y_Z="IPP2_Sec37_Box4_x; IPP2_Sec37_Box4_y; IPP2_Sec37_Box4_z" />
+<box  name="IPP2_Sec37_Box5" material="Aluminium1"  X_Y_Z="IPP2_Sec37_Box5_x; IPP2_Sec37_Box5_y; IPP2_Sec37_Box5_z" />
+<box  name="IPP2_Sec37_Box6" material="Aluminium1"  X_Y_Z="IPP2_Sec37_Box6_x; IPP2_Sec37_Box6_y; IPP2_Sec37_Box6_z" />
+
+<box  name="IPP2_Sec19_Box1" material="Aluminium1"  X_Y_Z="IPP2_Sec19_Box1_x; IPP2_Sec19_Box1_y; IPP2_Sec19_Box1_z" />
+<box  name="IPP2_Sec19_Box2" material="Aluminium1"  X_Y_Z="IPP2_Sec19_Box2_x; IPP2_Sec19_Box2_y; IPP2_Sec19_Box2_z" />
+<box  name="IPP2_Sec19_Box3" material="Aluminium1"  X_Y_Z="IPP2_Sec19_Box3_x; IPP2_Sec19_Box3_y; IPP2_Sec19_Box3_z" />
+<box  name="IPP2_Sec19_Box4" material="Aluminium1"  X_Y_Z="IPP2_Sec19_Box4_x; IPP2_Sec19_Box4_y; IPP2_Sec19_Box4_z" />
+<box  name="IPP2_Sec19_Box5" material="Aluminium1"  X_Y_Z="IPP2_Sec19_Box5_x; IPP2_Sec19_Box5_y; IPP2_Sec19_Box5_z" />
+
+<composition name="IPP2_Sec13_single_one">
+  <posXYZ  volume="IPP2_UniFloor"     X_Y_Z="0.; -IPP2_UniFloor_y/2.; IPP2_UniFl_Sec13Zshift"  rot="0.; 90.; 0." />
+  <posXYZ  volume="IPP2_Sec13_Box1"   X_Y_Z="0.;  IPP2_Sec13_Box1_y/2. + GENV_Eps; 0." />
+  <posXYZ  volume="IPP2_Sec13_Box2"   X_Y_Z="0.;  IPP2_Sec13_Box2_y/2. + IPP2_Sec13_Box1_y + 2.*GENV_Eps; 0." />
+</composition>
+
+<var name="IPP2_Sec13_length"  value="(IPP2_Sec13_Box3_x + IPP2_Sec13_Box4_x + IPP2_Sec13_xspace)*2."/>
+
+<composition name="IPP2_Sec13_single_two_Cside">
+  <posXYZ  volume="IPP2_UniFloor"        X_Y_Z="0.; -IPP2_UniFloor_y/2.; -IPP2_UniFl_Sec13Zshift"  rot="0.; 90.; 0." />
+  <posXYZ  volume="IPP2_Sec13_Box3"      X_Y_Z=" IPP2_Sec13_Box4_x + IPP2_Sec13_Box3_x/2. + IPP2_Sec13_xspace + GENV_Eps; IPP2_Sec13_Box3_y/2. + GENV_Eps; (IPP2_Sec13_Box3_z - IPP2_Sec13_Box4_z)/2." />
+  <posXYZ  volume="IPP2_Sec13_Box4"      X_Y_Z=" IPP2_Sec13_Box4_x/2. + IPP2_Sec13_xspace; IPP2_Sec13_Box4_y/2. + GENV_Eps; 0." />
+  <posXYZ  volume="IPP2_Sec13_Box3"      X_Y_Z="-IPP2_Sec13_Box3_x/2. - IPP2_Sec13_xspace; IPP2_Sec13_Box3_y/2. + GENV_Eps; (IPP2_Sec13_Box3_z - IPP2_Sec13_Box4_z)/2." />
+  <posXYZ  volume="IPP2_Sec13_Box4"      X_Y_Z="-IPP2_Sec13_Box3_x - IPP2_Sec13_Box4_x/2. - IPP2_Sec13_xspace - GENV_Eps; IPP2_Sec13_Box4_y/2. + GENV_Eps; 0." />
+  <posXYZ  volume="IPP2_Sec13_Box5"      X_Y_Z=" IPP2_Sec13_Box5_x/2. + IPP2_Sec13_xspace; IPP2_Sec13_Box3_y + IPP2_Sec13_Box5_y/2. + 2.*GENV_Eps; (IPP2_Sec13_Box5_z - IPP2_Sec13_Box4_z)/2." />
+  <posXYZ  volume="IPP2_Sec13_Box6"      X_Y_Z="-IPP2_Sec13_Box6_x/2. - IPP2_Sec13_xspace; IPP2_Sec13_Box3_y + IPP2_Sec13_Box6_y/2. + 2.*GENV_Eps; (IPP2_Sec13_Box6_z - IPP2_Sec13_Box4_z)/2." />
+</composition>
+
+<composition name="IPP2_Sec13_single_two_Aside">
+  <posXYZ  volume="IPP2_UniFloor"        X_Y_Z="0.; -IPP2_UniFloor_y/2.; -IPP2_UniFl_Sec13Zshift"  rot="0.; 90.; 0." />
+  <posXYZ  volume="IPP2_Sec13_Box3"      X_Y_Z=" IPP2_Sec13_Box4_x + IPP2_Sec13_Box3_x/2. + IPP2_Sec13_xspace + GENV_Eps; IPP2_Sec13_Box3_y/2. + GENV_Eps; (IPP2_Sec13_Box3_z - IPP2_Sec13_Box4_z)/2." />
+  <posXYZ  volume="IPP2_Sec13_Box4"      X_Y_Z=" IPP2_Sec13_Box4_x/2. + IPP2_Sec13_xspace; IPP2_Sec13_Box4_y/2. + GENV_Eps; 0." />
+  <posXYZ  volume="IPP2_Sec13_Box3"      X_Y_Z="-IPP2_Sec13_Box3_x/2. - IPP2_Sec13_xspace; IPP2_Sec13_Box3_y/2. + GENV_Eps; (IPP2_Sec13_Box3_z - IPP2_Sec13_Box4_z)/2." />
+  <posXYZ  volume="IPP2_Sec13_Box4"      X_Y_Z="-IPP2_Sec13_Box3_x - IPP2_Sec13_Box4_x/2. - IPP2_Sec13_xspace - GENV_Eps; IPP2_Sec13_Box4_y/2. + GENV_Eps; 0." />
+  <posXYZ  volume="IPP2_Sec13_Box5"      X_Y_Z="-IPP2_Sec13_Box5_x/2. - IPP2_Sec13_xspace; IPP2_Sec13_Box3_y + IPP2_Sec13_Box5_y/2. + 2.*GENV_Eps; (IPP2_Sec13_Box5_z - IPP2_Sec13_Box4_z)/2." />
+  <posXYZ  volume="IPP2_Sec13_Box6"      X_Y_Z=" IPP2_Sec13_Box6_x/2. + IPP2_Sec13_xspace; IPP2_Sec13_Box3_y + IPP2_Sec13_Box6_y/2. + 2.*GENV_Eps; (IPP2_Sec13_Box6_z - IPP2_Sec13_Box4_z)/2." />
+</composition>
+
+<var name="IPP_Sec37_length"  value="IPP2_Sec37_Box1_z + IPP2_Sec37_Box2_z + IPP2_Sec13_Box3_x + IPP2_Sec13_Box4_x"/>
+
+<composition name="IPP2_Sec37_single">
+  <posXYZ  volume="IPP2_UniFloor"   X_Y_Z="0.; -IPP2_UniFloor_y/2.; 0."  rot="0.; 0.; 0." />
+  <posXYZ  volume="IPP2_Sec37_Box1" X_Y_Z="0.; IPP2_Sec37_Box1_y/2. + GENV_Eps; - IPP_Sec37_length/2. - 2.*GENV_Eps + IPP2_Sec37_Box1_z/2." />
+  <posXYZ  volume="IPP2_Sec37_Box2" X_Y_Z="0.; IPP2_Sec37_Box2_y/2. + GENV_Eps; - IPP_Sec37_length/2. - GENV_Eps + IPP2_Sec37_Box1_z + IPP2_Sec37_Box2_z/2." />
+  <posXYZ  volume="IPP2_Sec13_Box3" X_Y_Z="IPP2_Sec37_xoffset + (IPP2_Sec13_Box3_z-IPP2_Sec13_Box4_z)/2.; IPP2_Sec13_Box3_y/2. + GENV_Eps; IPP_Sec37_length/2. + 2.*GENV_Eps - IPP2_Sec13_Box3_x/2." rot="0.; 90.; 0."/>
+  <posXYZ  volume="IPP2_Sec13_Box4" X_Y_Z="IPP2_Sec37_xoffset ; IPP2_Sec13_Box4_y/2. + GENV_Eps; IPP_Sec37_length/2. + GENV_Eps - IPP2_Sec13_Box3_x - IPP2_Sec13_Box4_x/2." rot="0.; 90.; 0."/>
+  <posXYZ  volume="IPP2_Sec37_Box3" X_Y_Z="IPP2_Sec37_xoffset + (-IPP2_Sec13_Box4_z + IPP2_Sec37_Box3_x)/2.; IPP2_Sec13_Box3_y + IPP2_Sec37_Box3_y/2. + 2.*GENV_Eps; IPP_Sec37_length/2. - IPP2_Sec13_Box3_x - IPP2_Sec13_Box4_x + IPP2_Sec37_Box4_z + IPP2_Sec37_Box3_z/2. + 2.*GENV_Eps" />
+  <posXYZ  volume="IPP2_Sec37_Box4" X_Y_Z="IPP2_Sec37_xoffset + (-IPP2_Sec13_Box4_z + IPP2_Sec37_Box4_x)/2.; IPP2_Sec13_Box4_y + IPP2_Sec37_Box4_y/2. + 2.*GENV_Eps; IPP_Sec37_length/2. - IPP2_Sec13_Box3_x - IPP2_Sec13_Box4_x + IPP2_Sec37_Box4_z/2. + GENV_Eps" />
+  <posXYZ  volume="IPP2_Sec37_Box5" X_Y_Z="IPP2_Sec37_xoffset - IPP2_Sec13_Box4_z/2. + IPP2_Sec37_Box3_x - IPP2_Sec37_Box6_x + IPP2_Sec37_Box5_x/2.; IPP2_Sec37_Box4_y + IPP2_Sec13_Box4_y + IPP2_Sec37_Box5_y/2. + 3.*GENV_Eps; IPP_Sec37_length/2. - IPP2_Sec13_Box3_x - IPP2_Sec13_Box4_x + IPP2_Sec37_Box4_z - IPP2_Sec37_Box5_z/2. + GENV_Eps" />
+  <posXYZ  volume="IPP2_Sec37_Box6" X_Y_Z="IPP2_Sec37_xoffset - IPP2_Sec13_Box4_z/2. + IPP2_Sec37_Box3_x - IPP2_Sec37_Box6_x/2.; IPP2_Sec37_Box4_y + IPP2_Sec13_Box4_y + IPP2_Sec37_Box5_y/2. + 3.*GENV_Eps; IPP_Sec37_length/2. - IPP2_Sec13_Box3_x - IPP2_Sec13_Box4_x + IPP2_Sec37_Box4_z + IPP2_Sec37_Box6_z/2. + 2.*GENV_Eps" />
+</composition>
+
+<var name="IPP_Sec19_length"  value="IPP2_Sec19_Box1_z + IPP2_Sec19_Box2_z + IPP2_Sec19_Box3_z + IPP2_Sec19_Box4_z"/>
+
+<composition name="IPP2_Sec19_single">
+  <posXYZ  volume="IPP2_UniFloor"   X_Y_Z="0.; -IPP2_UniFloor_y/2.; 0."  rot="0.; 0.; 0." />
+  <posXYZ  volume="IPP2_Sec19_Box1" X_Y_Z="0.; IPP2_Sec19_Box1_y/2. + GENV_Eps; - IPP_Sec19_length/2. - 2.*GENV_Eps + IPP2_Sec19_Box1_z/2." />
+  <posXYZ  volume="IPP2_Sec19_Box2" X_Y_Z="0.; IPP2_Sec19_Box2_y/2. + IPP2_Sec19_Box2_yoffset; - IPP_Sec19_length/2. - GENV_Eps + IPP2_Sec19_Box1_z + IPP2_Sec19_Box2_z/2." />
+  <posXYZ  volume="IPP2_Sec19_Box3" X_Y_Z="IPP2_Sec19_xoffset + (IPP2_Sec19_Box3_x - IPP2_Sec19_Box4_x)/2.; IPP2_Sec37_Box4_y + IPP2_Sec19_Box3_y/2. + 2.*GENV_Eps; IPP_Sec19_length/2. + 2.*GENV_Eps - IPP2_Sec19_Box3_z/2." />
+  <posXYZ  volume="IPP2_Sec19_Box4" X_Y_Z="IPP2_Sec19_xoffset; IPP2_Sec37_Box3_y + IPP2_Sec19_Box4_y/2. + 2.*GENV_Eps; IPP_Sec19_length/2. + GENV_Eps  - IPP2_Sec19_Box3_z - IPP2_Sec19_Box4_z/2." />
+  <posXYZ  volume="IPP2_Sec37_Box3" X_Y_Z="IPP2_Sec19_xoffset + (-IPP2_Sec19_Box4_x + IPP2_Sec37_Box3_x)/2.; IPP2_Sec37_Box3_y/2. + GENV_Eps; IPP_Sec19_length/2. - IPP2_Sec19_Box3_z - IPP2_Sec19_Box4_z + IPP2_Sec37_Box4_z + IPP2_Sec37_Box3_z/2. + 2.*GENV_Eps" />
+  <posXYZ  volume="IPP2_Sec37_Box4" X_Y_Z="IPP2_Sec19_xoffset + (-IPP2_Sec19_Box4_x + IPP2_Sec37_Box4_x)/2.; IPP2_Sec37_Box4_y/2. + GENV_Eps; IPP_Sec19_length/2. - IPP2_Sec19_Box3_z - IPP2_Sec19_Box4_z + IPP2_Sec37_Box4_z/2. + GENV_Eps" />
+  <posXYZ  volume="IPP2_Sec37_Box5" X_Y_Z="IPP2_Sec19_xoffset - IPP2_Sec19_Box4_x/2. + IPP2_Sec37_Box3_x - IPP2_Sec37_Box6_x + IPP2_Sec37_Box5_x/2.; IPP2_Sec37_Box4_y + IPP2_Sec19_Box4_y + IPP2_Sec37_Box5_y/2. + 3.*GENV_Eps; IPP_Sec19_length/2. - IPP2_Sec19_Box3_z - IPP2_Sec19_Box4_z + IPP2_Sec37_Box4_z - IPP2_Sec37_Box5_z/2. + GENV_Eps" />
+  <posXYZ  volume="IPP2_Sec37_Box6" X_Y_Z="IPP2_Sec19_xoffset - IPP2_Sec19_Box4_x/2. + IPP2_Sec37_Box3_x - IPP2_Sec37_Box6_x/2.; IPP2_Sec37_Box4_y + IPP2_Sec19_Box4_y + IPP2_Sec37_Box5_y/2. + 3.*GENV_Eps; IPP_Sec19_length/2. - IPP2_Sec19_Box3_z - IPP2_Sec19_Box4_z + IPP2_Sec37_Box4_z + IPP2_Sec37_Box6_z/2. + 2.*GENV_Eps" />
+  <posXYZ  volume="IPP2_Sec19_Box5" X_Y_Z="0.; IPP2_Sec37_Box4_y + IPP2_Sec19_Box4_y + IPP2_Sec19_Box5_y/2. + 3.*GENV_Eps; 3.*IPP2_Sec19_Box5_z/2." />
+</composition>
+
+<composition name="pp2">
+  <posXYZ  volume="IPP2_Sec13_single_one"       X_Y_Z="IPP2_xpos13_one - IPP2_Sec13_Box1_x/2.; IPP2_ypos13_one; IPP2_zpos13_one + IPP2_Sec13_Box1_z/2."/>
+  <posXYZ  volume="IPP2_Sec13_single_one"       X_Y_Z="IPP2_xpos13_one - IPP2_Sec13_Box1_x/2.; IPP2_ypos13_one; -IPP2_zpos13_one - IPP2_Sec13_Box1_z/2." rot="0.; 180.; 0."/>
+  <posXYZ  volume="IPP2_Sec13_single_two_Aside" X_Y_Z="IPP2_xpos13_two - IPP2_Sec13_length/2.; IPP2_ypos13_two; IPP2_zpos13_two + IPP2_Sec13_Box4_z/2."/>
+  <posXYZ  volume="IPP2_Sec13_single_two_Cside" X_Y_Z="IPP2_xpos13_two - IPP2_Sec13_length/2.; IPP2_ypos13_two; -IPP2_zpos13_two - IPP2_Sec13_Box4_z/2." rot="0.; 180.; 0."/>
+  <posXYZ  volume="IPP2_Sec37_single"           X_Y_Z=" IPP2_xpos37 + IPP2_Sec13_Box4_z/2. - IPP2_Sec37_xoffset; IPP2_ypos37;  IPP2_zpos37 - IPP_Sec37_length/2. + IPP2_Sec37_Box1_z + IPP2_Sec37_Box2_z + IPP2_Sec13_Box3_x + IPP2_Sec13_Box4_x"/>
+  <posXYZ  volume="IPP2_Sec37_single"           X_Y_Z=" IPP2_xpos37 + IPP2_Sec13_Box4_z/2. - IPP2_Sec37_xoffset; IPP2_ypos37; -IPP2_zpos37 + IPP_Sec37_length/2. - IPP2_Sec37_Box1_z - IPP2_Sec37_Box2_z - IPP2_Sec13_Box3_x - IPP2_Sec13_Box4_x"/>
+  <posXYZ  volume="IPP2_Sec37_single"           X_Y_Z="-IPP2_xpos37 - IPP2_Sec13_Box4_z/2. + IPP2_Sec37_xoffset; IPP2_ypos37;  IPP2_zpos37 - IPP_Sec37_length/2. + IPP2_Sec37_Box1_z + IPP2_Sec37_Box2_z + IPP2_Sec13_Box3_x + IPP2_Sec13_Box4_x" rot="0.; 180.; 0."/>
+  <posXYZ  volume="IPP2_Sec37_single"           X_Y_Z="-IPP2_xpos37 - IPP2_Sec13_Box4_z/2. + IPP2_Sec37_xoffset; IPP2_ypos37; -IPP2_zpos37 + IPP_Sec37_length/2. - IPP2_Sec37_Box1_z - IPP2_Sec37_Box2_z - IPP2_Sec13_Box3_x - IPP2_Sec13_Box4_x" rot="0.; 180.; 0."/>
+  <posXYZ  volume="IPP2_Sec19_single"           X_Y_Z=" IPP2_xpos19 + IPP2_Sec19_Box4_x/2. - IPP2_Sec37_xoffset; IPP2_ypos19;  IPP2_zpos19 - IPP_Sec19_length/2. + IPP2_Sec19_Box1_z + IPP2_Sec19_Box2_z + IPP2_Sec19_Box3_z + IPP2_Sec19_Box4_z"/>
+  <posXYZ  volume="IPP2_Sec19_single"           X_Y_Z=" IPP2_xpos19 + IPP2_Sec19_Box4_x/2. - IPP2_Sec37_xoffset; IPP2_ypos19; -IPP2_zpos19 + IPP_Sec19_length/2. - IPP2_Sec19_Box1_z - IPP2_Sec19_Box2_z - IPP2_Sec37_Box4_z - IPP2_Sec37_Box3_z"/>
+  <posXYZ  volume="IPP2_Sec19_single"           X_Y_Z="-IPP2_xpos19 - IPP2_Sec19_Box4_x/2. + IPP2_Sec37_xoffset; IPP2_ypos19;  IPP2_zpos19 - IPP_Sec19_length/2. + IPP2_Sec19_Box1_z + IPP2_Sec19_Box2_z + IPP2_Sec37_Box4_z + IPP2_Sec37_Box3_z" rot="0.; 180.; 0."/>
+  <posXYZ  volume="IPP2_Sec19_single"           X_Y_Z="-IPP2_xpos19 - IPP2_Sec19_Box4_x/2. + IPP2_Sec37_xoffset; IPP2_ypos19; -IPP2_zpos19 + IPP_Sec19_length/2. - IPP2_Sec19_Box1_z - IPP2_Sec19_Box2_z - IPP2_Sec19_Box3_z - IPP2_Sec19_Box4_z" rot="0.; 180.; 0."/>
+</composition>
+
+</section>
+
+<section name       = "Eta0Services"
+         version    = "7.0"
+         date       = "29 Mar 2010"
+         author     = "Laurent Chevalier"
+         top_volume = "servicesAtZ0">
+
+<!--     name       =  Eta0Services                  section name       = "Services"  -->
+<!--  
+      **************************************************************
+      ***                                                       ****
+      ***                  Services                             ****
+      ***                                                       ****
+      **************************************************************
+-->
+<tubs  name="EMCaloPipeI"   material="Iron1"       Rio_Z=" 310 ; 320; 5500"    nbPhi="20" />
+<tubs  name="EMCaloPipeO"   material="Iron1"       Rio_Z=" 190 ; 200; 1400"    nbPhi="20" />
+<tubs  name="CuivreCable"   material="Aluminium2"  Rio_Z="   0.; 170; 5500"    nbPhi="20" />
+<tubs  name="CuivreCabl0"   material="Aluminium2"  Rio_Z="   0.; 170; 5000"    nbPhi="20" />
+<var  name="SerStart" value="7500"/>
+<var  name="SerZ"     value="-100"/>
+
+<composition  name="services0" > <!-- modified positions to avoid overlap -->	
+    <posXYZ  volume="CuivreCable"    X_Y_Z="    0; 541 ;SerZ"  rot="  0.;90.;0." />
+    <posXYZ  volume="CuivreCable"    X_Y_Z="    0; 181 ;SerZ"  rot="  0.;90.;0." />
+    <posXYZ  volume="CuivreCable"    X_Y_Z="    0;-181 ;SerZ"  rot="  0.;90.;0." />
+    <posXYZ  volume="CuivreCable"    X_Y_Z="    0;-541 ;SerZ"  rot="  0.;90.;0." />
+</composition>
+
+<composition  name="services1" >	
+    <posRPhiZ  volume="services0"    R_Phi_Z=" SerStart; Zero ; Zero"   />
+</composition>
+
+<composition  name="services2" > <!-- modified positions to avoid overlap -->	
+    <posXYZ  volume="CuivreCabl0"    X_Y_Z="  300; 541 ;SerZ"  rot="  0.;90.;0." />
+    <posXYZ  volume="CuivreCabl0"    X_Y_Z="  300; 181 ;SerZ"  rot="  0.;90.;0." />
+    <posXYZ  volume="CuivreCable"    X_Y_Z="    0;-181 ;SerZ"  rot="  0.;90.;0." />
+    <posXYZ  volume="CuivreCable"    X_Y_Z="    0;-541 ;SerZ"  rot="  0.;90.;0." />
+</composition>
+
+<!-- flexible chain sector 9
+
+name       = "Flexible Chain Sector 9-35Volumes"
+version    = "0.0"
+date       = "01.03.2019"
+author     = "Niko Tsutskiridze - Georgian Team" -->
+
+
+<!-- Towing ARM -->
+<box  name="TowingArm_main"     material="ShieldSteel" X_Y_Z=" 263.; 795.; 2480." />
+<box  name="TowingArm_main_Subtr"     material="ShieldSteel" X_Y_Z="250.; 782.; 2500." />
+
+<subtraction  name="TowingArm_Sub" >
+  <posXYZ   volume="TowingArm_main" />
+  <posXYZ   volume="TowingArm_main_Subtr" />
+</subtraction>
+
+<box  name="TowingARM_Plate_main"     material="ShieldSteel" X_Y_Z="102.; 550.; 550." />
+<box  name="TowingARM_Plate_Subtr"     material="ShieldSteel" X_Y_Z="102.; 510.; 510. " />
+
+<subtraction  name="TowingArm_Plate" >
+  <posXYZ   volume="TowingARM_Plate_main" />
+  <posXYZ   volume="TowingARM_Plate_Subtr" X_Y_Z=" 10. ; 0. ; 0. " />
+</subtraction>
+
+<composition  name="TowingArm" >
+  <posXYZ  volume="TowingArm_Sub"   rot="0. ; 0. ; 0." />
+  <posXYZ  volume="TowingArm_Plate"  X_Y_Z="182.6; 0. ; 930. " rot="   0. ; 0. ; 0." />
+</composition>
+<!-- End Towing ARM -->
+
+<!-- Drag Chain -->
+<box  name="DragChain_Main"  material="ShieldSteel" X_Y_Z=" 5555.; 804.; 17.5" />
+<tubs name="DragChain_Tube" material="ShieldSteel" Rio_Z="912.5; 930.; 804." profile="0.; 90." nbPhi="36."/>
+<box  name="DragChain_SmMain" material="ShieldSteel" X_Y_Z=" 17.5; 804.; 275." />
+
+<union name="DragChain" >
+  <posXYZ  volume="DragChain_Main"/>
+  <posXYZ  volume="DragChain_Tube" X_Y_Z="2777.5; 0. ; 921.25 " rot="  270. ; 0. ; 0." />
+  <posXYZ  volume="DragChain_SmMain" X_Y_Z="3698.75; 0. ; 1056.75 "/>
+</union>
+<!-- End Towing ARM -->
+
+<!-- Pipes -->
+<box  name="Pipe_Main"  material="ShieldSteel" X_Y_Z=" 5425.; 439.; 2.05" />
+<tubs name="Pipe_Tube" material="ShieldSteel" Rio_Z="900.; 902.05; 439." profile="0.; 90." nbPhi="36."/>
+<box  name="Pipe_SmMain" material="ShieldSteel" X_Y_Z=" 2.05; 439.; 5114." />
+
+<union name="FCH_Pipes" >
+  <posXYZ  volume="Pipe_Main" X_Y_Z="0.; 0. ; 0. " rot="0. ; 0. ; 0." />
+  <posXYZ  volume="Pipe_Tube" X_Y_Z="2712.5; 0. ; 901.025 " rot="  270. ; 0. ; 0." />
+  <posXYZ  volume="Pipe_SmMain" X_Y_Z="3613.525; 0. ; 3454.025 "/>
+</union>
+<!-- End Pipes -->
+
+<!-- Cables -->
+<box  name="Cable_Main"  material="Copper" X_Y_Z=" 5425.; 720.; 6.7" />
+<tubs name="Cable_Tube" material="Copper" Rio_Z="1013.3; 1020.; 720." profile="0.; 90." nbPhi="36."/>
+<box  name="Cable_SmMain" material="Copper" X_Y_Z=" 6.7; 720.; 2504." />
+
+<union name="FCH_Cable" >
+  <posXYZ  volume="Cable_Main" X_Y_Z="0.; 0. ; 0. " rot="0. ; 0. ; 0." />
+  <posXYZ  volume="Cable_Tube" X_Y_Z="2712.5; 0. ; 1016.65 " rot="  270. ; 0. ; 0." />
+  <posXYZ  volume="Cable_SmMain" X_Y_Z="3729.15; 0. ; 2266.65 "/>
+</union>
+<!-- End Cables -->
+
+<!-- Support -->
+<box  name="Support_MaBox"  material="ShieldSteel" X_Y_Z=" 5230.; 1005.; 750." />
+<box  name="Support_MaCutBox1"  material="ShieldSteel" X_Y_Z=" 5240.; 1005.; 336.9" />
+<box  name="Support_MaCutBox2"  material="ShieldSteel" X_Y_Z=" 5130.; 895.; 760." />
+
+<subtraction  name="Support_Ma" >
+  <posXYZ   volume="Support_MaBox"  />
+  <posXYZ   volume="Support_MaCutBox1" X_Y_Z="0.; 12.6 ; -181.15 " rot=" 0. ; 0. ; 0."/>
+  <posXYZ   volume="Support_MaCutBox1" X_Y_Z="0.; 12.6 ; 181.15 " rot=" 0. ; 0. ; 0."/>
+  <posXYZ   volume="Support_MaCutBox2" X_Y_Z="0.; 0. ; 0. " rot=" 0. ; 0. ; 0."/>
+</subtraction>
+
+<gvxy name="Support_Leg1" material="ShieldSteel" dZ="700.">
+  <gvxy_point X_Y="-50.; -50."/>
+  <gvxy_point X_Y="-50.; -40."/>
+  <gvxy_point X_Y="-6.5; -40."/>
+  <gvxy_point X_Y="-6.5; 40."/>
+  <gvxy_point X_Y="-50.; 40."/>
+  <gvxy_point X_Y="-50.; 50."/>
+  <gvxy_point X_Y="50.; 50."/>
+  <gvxy_point X_Y="50.; 40."/>
+  <gvxy_point X_Y="6.5; 40."/>
+  <gvxy_point X_Y="6.5; -40."/>
+  <gvxy_point X_Y="50.; -40."/>
+  <gvxy_point X_Y="50.; -50."/>
+</gvxy>
+
+<gvxy name="Support_Leg2" material="ShieldSteel" dZ="522.7">
+  <gvxy_point X_Y="-50.; -50."/>
+  <gvxy_point X_Y="-50.; -31.4"/>
+  <gvxy_point X_Y="-9.3; -31.4"/>
+  <gvxy_point X_Y="-9.3; 40."/>
+  <gvxy_point X_Y="-50.; 31.4"/>
+  <gvxy_point X_Y="-50.; 50."/>
+  <gvxy_point X_Y="50.; 50."/>
+  <gvxy_point X_Y="50.; 31.4"/>
+  <gvxy_point X_Y="9.3; 31.4"/>
+  <gvxy_point X_Y="9.3; -31.4"/>
+  <gvxy_point X_Y="50.; -31.4"/>
+  <gvxy_point X_Y="50.; -50."/>
+</gvxy>
+
+<composition  name="FCH_SupportLeg" >
+  <posXYZ  volume="Support_Leg1"  X_Y_Z="0.; 0. ; 0. " rot="0. ; 90. ; 0." />
+  <posXYZ  volume="Support_Leg2"  X_Y_Z="-257.5; 311.36 ; 0. " rot="0. ; 90. ; 90." />
+</composition>
+
+<gvxy name="Support_SidePl1" material="ShieldSteel" dZ="3150.5">
+  <gvxy_point X_Y="150.; 62.5"/>
+  <gvxy_point X_Y="156.; 62.5"/>
+  <gvxy_point X_Y="156.; -62.5"/>
+  <gvxy_point X_Y="-156.; -62.5"/>
+  <gvxy_point X_Y="-156.; 62.5"/>
+  <gvxy_point X_Y="-150.; 62.5"/>
+  <gvxy_point X_Y="-150.; -56.7"/>
+  <gvxy_point X_Y="150.; -57.7"/>
+</gvxy>
+
+<gvxy name="Support_SidePl2" material="ShieldSteel" dZ="2300.">
+  <gvxy_point X_Y="-150.; 812.5"/>
+  <gvxy_point X_Y="-156.; 812.5"/>
+  <gvxy_point X_Y="-156.; 937.5"/>
+  <gvxy_point X_Y="156.; 937.5"/>
+  <gvxy_point X_Y="156.; 812.5"/>
+  <gvxy_point X_Y="150.; 812.5"/>
+  <gvxy_point X_Y="150.; 931.7"/>
+  <gvxy_point X_Y="-150.; 931.7"/>
+</gvxy>
+
+<composition  name="Support_SidePl" >
+  <posXYZ  volume="Support_SidePl1"  X_Y_Z="0.; 0. ; 0. " rot="0. ; 0. ; 0." />
+  <posXYZ  volume="Support_SidePl2"  X_Y_Z="0.; 0. ; 425.25 " rot="0. ; 0. ; 0." />
+</composition>
+
+<gvxy name="Support_SideFrPl1" material="ShieldSteel" dZ="14.">
+  <gvxy_point X_Y="-379.; -329.5"/>
+  <gvxy_point X_Y="-379.; -444.5"/>
+  <gvxy_point X_Y="-928.5; -594.5"/>
+  <gvxy_point X_Y="-1118.5; -594.5"/>
+  <gvxy_point X_Y="-1118.5; -220.5"/>
+  <gvxy_point X_Y="-300.; 594.5"/>
+  <gvxy_point X_Y="300.; 594.5"/>
+  <gvxy_point X_Y="1118.5; -220.5"/>
+  <gvxy_point X_Y="1118.5; -594.5"/>
+  <gvxy_point X_Y="928.5; -594.5"/>
+  <gvxy_point X_Y="379.; -444.5"/>
+  <gvxy_point X_Y="379.; -329.5"/>
+</gvxy>
+
+<box  name="Support_SideFrPl2_Box"  material="ShieldSteel" X_Y_Z=" 431.5; 1054.; 76." />
+<box  name="Support_SideFrPl2_Cut"  material="ShieldSteel" X_Y_Z=" 431.5; 1000.; 80." />
+
+<subtraction  name="Support_SideFrPl2" >
+  <posXYZ   volume="Support_SideFrPl2_Box"  />
+  <posXYZ   volume="Support_SideFrPl2_Cut" X_Y_Z="27.; 0. ; 0. " rot=" 0. ; 0. ; 0."/>
+</subtraction>
+
+<box  name="Support_SideFrPl3_Box"  material="ShieldSteel" X_Y_Z=" 1252.; 100.; 708." />
+<box  name="Support_SideFrPl3_Cut"  material="ShieldSteel" X_Y_Z=" 1252.; 110.; 650." />
+
+<subtraction  name="Support_SideFrPl3" >
+  <posXYZ   volume="Support_SideFrPl3_Box"  />
+  <posXYZ   volume="Support_SideFrPl3_Cut" X_Y_Z="29.; 0. ; 0. " rot=" 0. ; 0. ; 0."/>
+</subtraction>
+
+<composition  name="FCH_Support" >
+  <posXYZ  volume="Support_Ma"  X_Y_Z="0.; 0. ; 0. " rot="0. ; 0. ; 0." />
+  <posXYZ  volume="FCH_SupportLeg"  X_Y_Z="-2283.; -1075.31 ; 333.5 " rot="0. ; 0. ; 0." />
+  <posXYZ  volume="FCH_SupportLeg"  X_Y_Z="-2283.; -1075.31 ; -333.5 " rot="0. ; 0. ; 0." />
+  <posXYZ  volume="Support_SidePl"  X_Y_Z="3636.8; -439.8 ; 2825.25 " rot="0. ; 180. ; 0." />
+  <posXYZ  volume="Support_SidePl"  X_Y_Z="3636.8; -439.8 ; -2825.25 " rot="0. ; 0. ; 0." />
+  <posXYZ  volume="Support_SideFrPl1"  X_Y_Z="3241.3; -500. ; 0. " rot="0. ; 90. ; 90." />
+  <posXYZ  volume="Support_SideFrPl2"  X_Y_Z="3668.55; -2.6 ; 1156.51 " rot="0. ; 0. ; 0." />
+  <posXYZ  volume="Support_SideFrPl2"  X_Y_Z="3668.55; -2.6 ; -1156.51 " rot="0. ; 0. ; 0." />
+  <posXYZ  volume="Support_SideFrPl3"  X_Y_Z="3263.3; 576.92 ; 0. " rot="0. ; 0. ; 0." />
+</composition>
+<!-- End Support -->
+
+<composition  name="FlexibleChainSector9" >
+  <posXYZ  volume="TowingArm"   X_Y_Z="-4469.28; 0. ; 2659.1 " rot="   0. ; 0. ; 0." />
+  <posXYZ  volume="TowingArm"  X_Y_Z="-4469.28; 0. ; -2659.1 " rot="   180. ; 0. ; 0." />
+  <posXYZ  volume="DragChain"  X_Y_Z="-8197.5; 0. ; 222.75 " rot="0. ; 0. ; 0." />
+  <posXYZ  volume="DragChain"  X_Y_Z="-8197.5; 0. ; -222.75 " rot="180. ; 0. ; 0." />
+  <posXYZ  volume="FCH_Pipes"  X_Y_Z="-8090.84; -158.75 ; 194.625 " rot="0. ; 0. ; 0." />
+  <posXYZ  volume="FCH_Pipes"  X_Y_Z="-8090.84; -158.75 ; -194.625 " rot="180. ; 0. ; 0." />
+  <posXYZ  volume="FCH_Cable"  X_Y_Z="-8091.32; -21. ; 79. " rot="0. ; 0. ; 0." />
+  <posXYZ  volume="FCH_Cable"  X_Y_Z="-8091.32; -21. ; -79. " rot="180. ; 0. ; 0." />
+  <posXYZ  volume="FCH_Support"  X_Y_Z="-8103.; 2.5 ; 0. " rot="0. ; 0. ; 0." />
+</composition>
+
+<!-- end of flexible chain sector 9 -->
+
+<!-- flexible chain sector 11 and 15
+
+name       = "41_Vol_-_FlexibleChainSector11-15"
+version    = "0.0"
+date       = "07-06-2019"
+author     = "Niko Tsutskiridze, Davit Shekiladze" -->
+
+<!-- Support -->
+<box   name="Support_BottomPlate"     material="ShieldSteel"  X_Y_Z=" 4300.; 9.5; 506." />
+<box   name="Support_SidesPlates"     material="ShieldSteel"  X_Y_Z=" 4312.; 828.5; 25." />
+<box   name="Support_SidesPlatesCutBox"     material="ShieldSteel"  X_Y_Z=" 1956.; 710.; 30." />
+
+<subtraction name="Support_SidesPlatesSubtr" >
+   <posXYZ  volume="Support_SidesPlates"   X_Y_Z=" 0. ; 0. ; 0.  "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_SidesPlatesCutBox"  X_Y_Z=" -1078. ; -40.75 ; 0. "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_SidesPlatesCutBox"  X_Y_Z=" 1078. ; -40.75 ; 0. "  rot=" 0. ; 0. ; 0. "/>
+</subtraction>
+
+<box   name="Support_MidlPlates"     material="ShieldSteel"  X_Y_Z=" 4312.; 814.9; 20." />
+<box   name="Support_MidlPlatesCutBox"     material="ShieldSteel"  X_Y_Z=" 1954.; 615.; 25." />
+
+<subtraction name="Support_MidlPlatesSubtr" >
+   <posXYZ  volume="Support_MidlPlates"   X_Y_Z=" 0. ; 0. ; 0.  "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_MidlPlatesCutBox"  X_Y_Z=" -1079. ; -0.05 ; 0. "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_MidlPlatesCutBox"  X_Y_Z=" 1079. ; -0.05 ; 0. "  rot=" 0. ; 0. ; 0. "/>
+</subtraction>
+
+<composition name="Support_SidesPlatesM" >
+   <posXYZ  volume="Support_SidesPlatesSubtr"   X_Y_Z=" 0. ; 405.547 ; 265.6  "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_SidesPlatesSubtr"   X_Y_Z=" 0. ; 405.547 ; -265.6  "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_MidlPlatesSubtr"   X_Y_Z=" 0. ; 412.35 ; 0.  "  rot=" 0. ; 0. ; 0. "/>
+</composition>
+
+<gvxy  name="Support_WingPlate"  material="ShieldSteel"  dZ="2287." >
+  <gvxy_point  X_Y=" -114.148; 64.757 " />
+  <gvxy_point  X_Y=" -114.148; -69.961 " />
+  <gvxy_point  X_Y=" -119.041; -69.961 " />
+  <gvxy_point  X_Y=" -119.041; 69.961 " />
+  <gvxy_point  X_Y=" 119.041; 69.961 " />
+  <gvxy_point  X_Y=" 119.041; -69.961 " />
+  <gvxy_point  X_Y=" 114.148; -69.961 " />
+  <gvxy_point  X_Y=" 114.148; 64.757 " />
+</gvxy>
+
+<box   name="Support_WingBox1"     material="ShieldSteel"  X_Y_Z=" 297.155; 896.845; 100." />
+<box   name="Support_WingCutBox1"     material="ShieldSteel"  X_Y_Z=" 238.155; 846.845; 110." />
+
+<subtraction name="Support_WingBox1Subtr" >
+   <posXYZ  volume="Support_WingBox1"   X_Y_Z=" 0. ; 0. ; 0.  "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingCutBox1"  X_Y_Z=" 0. ; 0. ; 0. "  rot=" 0. ; 0. ; 0. "/>
+</subtraction>
+
+
+<box   name="Support_WingBox"     material="ShieldSteel"  X_Y_Z=" 302.155; 901.845; 100." />
+<box   name="Support_WingCutBox"     material="ShieldSteel"  X_Y_Z=" 238.155; 846.845; 110." />
+
+<subtraction name="Support_WingBoxSubtr" >
+   <posXYZ  volume="Support_WingBox"   X_Y_Z=" 0. ; 0. ; 0.  "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingCutBox"  X_Y_Z=" 0. ; 0. ; 0. "  rot=" 0. ; 0. ; 0. "/>
+</subtraction>
+
+<box   name="Support_WingBox2"     material="ShieldSteel"  X_Y_Z=" 291.; 866.094; 100." />
+<box   name="Support_WingCutBox2"     material="ShieldSteel"  X_Y_Z=" 246.155; 821.094; 110." />
+
+<subtraction name="Support_WingBox2Subtr" >
+   <posXYZ  volume="Support_WingBox2"   X_Y_Z=" 0. ; 0. ; 0.  "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingCutBox2"  X_Y_Z=" 0. ; 0. ; 0. "  rot=" 0. ; 0. ; 0. "/>
+</subtraction>
+
+<box   name="Support_WingBox3"     material="ShieldSteel"  X_Y_Z=" 242.; 629.5; 1041." />
+<box   name="Support_WingCutBox3"     material="ShieldSteel"  X_Y_Z=" 217.; 600.; 1050." />
+
+<subtraction name="Support_WingBox3Subtr" >
+   <posXYZ  volume="Support_WingBox3"   X_Y_Z=" 0. ; 0. ; 0.  "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingCutBox3"  X_Y_Z=" 0. ; 0. ; 0. "  rot=" 0. ; 0. ; 0. "/>
+</subtraction>
+
+<composition  name="Support_WingSidepartsLeft" >
+   <posXYZ  volume="Support_WingPlate"    X_Y_Z=" 0. ; 344.027 ; 0." rot=" 0.; 0.;0." />
+   <posXYZ  volume="Support_WingPlate"    X_Y_Z=" 0. ; -344.027 ; 0." rot=" 180.; 0.;0." />
+   <posXYZ  volume="Support_WingBox1Subtr"   X_Y_Z=" 0. ; 0.; 583.5 "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingBoxSubtr"   X_Y_Z=" 0. ; 0.; 1087.5 "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingBoxSubtr"   X_Y_Z=" 0. ; 0.; -133.5 "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingBoxSubtr"   X_Y_Z=" 0. ; 0.; -794.5 "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingBox2Subtr"   X_Y_Z=" 18.6 ; 15.3; 1237.2 "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingBox3Subtr"   X_Y_Z=" -11. ; 3.6; -1744. "  rot=" 0. ; 0. ; 0. "/>
+</composition>
+
+<composition  name="Support_WingSidepartsRight" >
+   <posXYZ  volume="Support_WingPlate"    X_Y_Z=" 0. ; 344.027 ; 0." rot=" 0.; 0.;0." />
+   <posXYZ  volume="Support_WingPlate"    X_Y_Z=" 0. ; -344.027 ; 0." rot=" 180.; 0.;0." />
+   <posXYZ  volume="Support_WingBox1Subtr"   X_Y_Z=" 0. ; 0.; -583.5 "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingBoxSubtr"   X_Y_Z=" 0. ; 0.; -1087.5 "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingBoxSubtr"   X_Y_Z=" 0. ; 0.; 133.5 "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingBoxSubtr"   X_Y_Z=" 0. ; 0.; 794.5 "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingBox2Subtr"   X_Y_Z=" 18.6 ; 15.3; -1237.2 "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingBox3Subtr"   X_Y_Z=" -11. ; 3.6; 1744. "  rot=" 0. ; 0. ; 0. "/>
+</composition>
+
+<box   name="Support_WingCentBottom"     material="ShieldSteel"  X_Y_Z=" 1396.; 795.; 18." />
+
+<tubs   name="Support_WingCentBottomCutTube"  material="ShieldSteel"  Rio_Z=" 0. ; 385. ; 20. "  nbPhi="32" />
+<subtraction name="Support_WingCentBottomCut" >
+   <posXYZ  volume="Support_WingCentBottom"   X_Y_Z=" 0. ; 10. ; 0.  "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingCentBottomCutTube"  X_Y_Z=" 690. ; 292.5 ; 0. "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingCentBottomCutTube"  X_Y_Z=" -690. ; 292.5 ; 0. "  rot=" 0. ; 0. ; 0. "/>
+</subtraction>
+
+<gvxy  name="Support_WingMiddleTopPlate"  material="ShieldSteel"  dZ="14." >
+  <gvxy_point  X_Y=" -463.; 290.825 " />
+  <gvxy_point  X_Y=" -463.; -290.825 " />
+  <gvxy_point  X_Y=" -563.; -290.825 " />
+  <gvxy_point  X_Y=" -563.; 390.825 " />
+  <gvxy_point  X_Y=" 563.; 390.825 " />
+  <gvxy_point  X_Y=" 563.; -290.825 " />
+  <gvxy_point  X_Y=" 463.; -290.825 " />
+  <gvxy_point  X_Y=" 463.; 290.825 " />
+</gvxy>
+
+<gvxy  name="Support_WingMiddleBackPlate"  material="ShieldSteel"  dZ="100." >
+  <gvxy_point  X_Y=" -263.; 410.525 " />
+  <gvxy_point  X_Y=" -263.; -410.525 " />
+  <gvxy_point  X_Y=" -288.; -410.525 " />
+  <gvxy_point  X_Y=" -288.; 430.525 " />
+  <gvxy_point  X_Y=" 288.; 430.525 " />
+  <gvxy_point  X_Y=" 288.; -410.525 " />
+  <gvxy_point  X_Y=" 263.; -410.525 " />
+  <gvxy_point  X_Y=" 263.; 410.525 " />
+</gvxy>
+
+<composition  name="Support_WingMiddle" >
+    <posXYZ  volume="Support_WingCentBottomCut"  X_Y_Z=" 2690. ; -4.774 ; 0." rot=" 90.; -90.;0."    />
+    <posXYZ  volume="Support_WingMiddleTopPlate"  X_Y_Z=" 3065.32 ; 835.9 ; 0." rot=" 90.; -90.;0."    />
+    <posXYZ  volume="Support_WingMiddleBackPlate"  X_Y_Z=" 2324.5 ; 418.6 ; 0." rot=" 0.; 90.;0."    />
+</composition>
+
+<!-- End Support -->
+
+<!-- Drag Chain-->
+<box name="plate_of_drag_chain1" material="ShieldSteel" X_Y_Z="4639.; 640.; 16."/>
+<tubs name="plate_of_drag_chain2" material="ShieldSteel" Rio_Z="409.; 425.; 640." profile="90.; 90." nbPhi="32"/>
+<box name="plate_of_drag_chain3" material="ShieldSteel" X_Y_Z="16; 640.; 324.5"/>
+
+<composition  name="Drag_Chain_assembly" >
+  <posXYZ  volume="plate_of_drag_chain1"    X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 0."/>
+  <posXYZ  volume="plate_of_drag_chain2"    X_Y_Z="  2319.55; 0.; -417." rot=" 90.; 90.; 0."/>
+  <posXYZ  volume="plate_of_drag_chain3"    X_Y_Z="  2736.5; 0.; -579.3" rot=" 0.; 0.; 0."/>
+</composition>
+
+<composition  name="Drag_Chain" >
+  <posXYZ  volume="Drag_Chain_assembly"    X_Y_Z=" 178.09; 387.39; -134." rot=" 0.; 0.; 0."/>
+  <posXYZ  volume="Drag_Chain_assembly"    X_Y_Z=" 178.09; 387.39; 134." rot=" 180.; 0.; 0."/>
+</composition>
+<!--End Drag Chain-->
+
+<!--  Cable-->
+<box name="plate_of_Cable1" material="Copper" X_Y_Z="4609.; 192.; 16."/>
+<tubs name="plate_of_Cable2" material="Copper" Rio_Z="409.; 425.; 192." profile="90.; 90." nbPhi="32"/>
+<box name="plate_of_Cable3" material="Copper" X_Y_Z="16.; 192.; 3282."/>
+
+<composition  name="Cable_assembly" >
+  <posXYZ  volume="plate_of_Cable1"    X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 0."/>
+  <posXYZ  volume="plate_of_Cable2"    X_Y_Z="  2304.55; 0; -417." rot=" 90.; 90.; 0."/>
+  <posXYZ  volume="plate_of_Cable3"    X_Y_Z="  2721.5; 0.; -2058.05" rot=" 0.; 0.; 0."/>
+</composition>
+
+<composition  name="Cable" >
+  <posXYZ  volume="Cable_assembly"    X_Y_Z=" 163.09; 554.39;  -180." rot=" 0.; 0.; 0."/>
+  <posXYZ  volume="Cable_assembly"    X_Y_Z=" 163.09; 554.39;  180." rot=" 180.; 0.; 0."/>
+</composition>
+<!--End  Cable-->
+
+<!--  Pipes-->
+<box name="plate_of_Pipes1" material="ShieldSteel" X_Y_Z="4609.; 240.; 16."/>
+<tubs name="plate_of_Pipes2" material="ShieldSteel" Rio_Z="409.; 425.; 240." profile="90.; 90." nbPhi="32"/>
+<box name="plate_of_Pipes3" material="ShieldSteel" X_Y_Z="16.; 240.; 3282."/>
+
+<composition  name="Pipes_assembly" >
+  <posXYZ  volume="plate_of_Pipes1"    X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 0."/>
+  <posXYZ  volume="plate_of_Pipes2"    X_Y_Z="  2304.55; 0.; -417." rot=" 90.; 90.; 0."/>
+  <posXYZ  volume="plate_of_Pipes3"    X_Y_Z="  2721.5; 0.; -2058.05" rot=" 0.; 0.; 0."/>
+</composition>
+
+<composition  name="Pipes" >
+  <posXYZ  volume="Pipes_assembly"    X_Y_Z=" 163.09; 287.39;  180." rot=" 180.; 0.; 0."/>
+  <posXYZ  volume="Pipes_assembly"    X_Y_Z=" 163.09; 287.39;  -180." rot=" 0.; 0.; 0."/>
+</composition>
+<!--End Pipes-->
+
+<composition  name="Flexible_Chain_Sector11-15" >
+     <posXYZ  volume="Support_BottomPlate"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+     <posXYZ  volume="Support_SidesPlatesM"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+     <posXYZ  volume="Support_WingSidepartsLeft"  X_Y_Z=" 2913.853 ; 402.7 ; -1985.5" rot=" 0.; 0.; 0."  />
+     <posXYZ  volume="Support_WingSidepartsRight"  X_Y_Z=" 2913.853 ; 402.7 ; 1985.5" rot=" 0.; 0.; 0."  />
+     <posXYZ  volume="Support_WingMiddle"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+     <posXYZ  volume="Drag_Chain"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+     <posXYZ  volume="Cable"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+     <posXYZ  volume="Pipes"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+</composition>
+
+<composition  name="FlexibleChainSector11-15" >
+     <posXYZ  volume="Flexible_Chain_Sector11-15"    X_Y_Z=" -5446.554 ; -5631.994 ; 0." rot=" 0.; 0.;45." />
+     <posXYZ  volume="Flexible_Chain_Sector11-15"    X_Y_Z=" 5446.554 ; -5631.994 ; 0." rot=" 0.; 180.; -45." />
+</composition>
+
+<!-- end of flexible chain sector 11 and 15 -->
+
+<composition  name="servicesAtZ0" >
+   <posXYZ    volume="EMCaloPipeI"    X_Y_Z="  Zero;  7000 ; Zero"  rot=" 90.; 0.;0." />
+   <posXYZ    volume="EMCaloPipeO"    X_Y_Z="  Zero; -5000 ;  100"  rot=" 90.; 0.;0." />
+   <posXYZ    volume="services1"      X_Y_Z="  Zero;  Zero ; Zero"  rot="  0.; 0.;0." />
+   <posRPhiZ  volume="services1"      R_Phi_Z="Zero;    45 ; Zero"  rot="  0.; 0.;0." />
+   <posRPhiZ  volume="services1"      R_Phi_Z="Zero;   135 ; Zero"  rot="  0.; 0.;0." />
+   <posXYZ volume="FlexibleChainSector9"  X_Y_Z="0;0;0"   rot="0;0;0"/>
+   <posXYZ volume="FlexibleChainSector11-15"  X_Y_Z="0;0;0"   rot="0;0;0"/>
+</composition>
+</section>
+
+<section name       = "AccessPlatforms"
+         version    = "7.0"
+         date       = "21 Mar 2005"
+         author     = "Laurent Chevalier, Daniel Pomarede"
+         top_volume = "MBAP_AccessPlatform">
+
+
+<!--     name       =  AccessPlatforms               section name       = "Services"  -->
+<!--  **************************************************************
+      **************************************************************
+      ***                                                       ****
+      ***     ATLAS Access : Muon Barrel Access Platforms       ****
+      ***                                                       ****
+      **************************************************************
+      **************************************************************  -->
+<!--  Design from ATLHXT__0001 -->
+
+<!--  Platform 1-2 positioned between Strut 1 and Strut 2  -->
+<!--  Platform 2-3 positioned between Strut 2 and Strut 3  -->
+<!--  Platform 3-4 positioned between Strut 3 and Strut 4  -->
+
+<!--  Platform dimensions  -->
+<var  name="MBAP_P12s1dz1"  value="3000." />
+<var  name="MBAP_P12s1dz2"  value="2500." />
+<var  name="MBAP_P23s1dz1"  value="2700." />
+<var  name="MBAP_P23s1dz2"  value="2200." />
+<var  name="MBAP_P34s1dz1"  value="2200." />
+<var  name="MBAP_P34s1dz2"  value="1700." />
+
+<var  name="MBAP_P14s3dz"   value="8600." />
+<var  name="MBAP_P14s3dx"   value=" 540." />
+
+<var  name="MBAP_PLAs1dx1"  value="1225." />
+<var  name="MBAP_PLAs1dx2"  value=" 600." />
+<var  name="MBAP_PFLhe"     value="  1.5" />
+
+<!--  Platform positions  -->
+<!--  sector 1 & 9  -->
+<var  name="MBAP_Ps01posx"  value=" 7800." />
+<var  name="MBAP_Ps01posy"  value="-1200." />
+<!--  sector 11 & 15  -->
+<var  name="MBAP_Ps11posx"  value=" 5000." />
+<var  name="MBAP_Ps11posy"  value="-6500." />
+<!--  sector 3 & 7  -->
+<var  name="MBAP_Ps14posx"  value=" 6730." />
+<var  name="MBAP_Ps14posy"  value=" 5300." />
+<var  name="MBAP_Ps14angz"  value="   45." />
+
+<var  name="MBAP_P12posz"   value=" 3425."   />  <!-- ??? could use (ABRT_Zvouss(5)+ABRT_Zvouss(6))/2. ??? -->
+<var  name="MBAP_P23posz"   value=" 6691.25" />  <!-- ??? could use (ABRT_Zvouss(6)+ABRT_Zvouss(7))/2. ??? -->
+<var  name="MBAP_P34posz"   value=" 9545."   />  <!-- ??? could use (ABRT_Zvouss(7)+ABRT_Zvouss(8))/2. ??? -->
+
+<!--  Useful variables  -->
+<var  name="MBAP_xyzref"    value="    0.  " />
+
+<!--  Modelization of floor of Platform -->
+
+<var  name="MBAP_PFL12xa" value="MBAP_P12s1dz1/2." />
+<var  name="MBAP_PFL23xa" value="MBAP_P23s1dz1/2." />
+<var  name="MBAP_PFL34xa" value="MBAP_P34s1dz1/2." />
+<var  name="MBAP_PFLya"   value="MBAP_xyzref" />
+
+<var  name="MBAP_PFL12xb" value="MBAP_PFL12xa" />
+<var  name="MBAP_PFL23xb" value="MBAP_PFL23xa" />
+<var  name="MBAP_PFL34xb" value="MBAP_PFL34xa" />
+<var  name="MBAP_PFLyb"   value="MBAP_PLAs1dx2" />
+
+<var  name="MBAP_PFL12xc" value="MBAP_P12s1dz2/2." />
+<var  name="MBAP_PFL23xc" value="MBAP_P23s1dz2/2." />
+<var  name="MBAP_PFL34xc" value="MBAP_P34s1dz2/2." />
+<var  name="MBAP_PFLyc"   value="MBAP_PFLyb" />
+
+<var  name="MBAP_PFL12xd" value="MBAP_PFL12xc" />
+<var  name="MBAP_PFL23xd" value="MBAP_PFL23xc" />
+<var  name="MBAP_PFL34xd" value="MBAP_PFL34xc" />
+<var  name="MBAP_PFLyd"   value="MBAP_PLAs1dx1-GENV_Eps" />
+
+<!--  sector 1 & 9  -->
+
+<gvxysx name="MBAP_PlatformFloor12s1s9"    material="Aluminium4"   dZ="MBAP_PFLhe"  >
+  <gvxy_point X_Y="MBAP_PFL12xa;MBAP_PFLya"/>
+  <gvxy_point X_Y="MBAP_PFL12xb;MBAP_PFLyb"/>
+  <gvxy_point X_Y="MBAP_PFL12xc;MBAP_PFLyc"/>
+  <gvxy_point X_Y="MBAP_PFL12xd;MBAP_PFLyd"/>
+</gvxysx>
+
+<gvxysx name="MBAP_PlatformFloor23s1s9"    material="Aluminium4"   dZ="MBAP_PFLhe"  >
+  <gvxy_point X_Y="MBAP_PFL23xa;MBAP_PFLya"/>
+  <gvxy_point X_Y="MBAP_PFL23xb;MBAP_PFLyb"/>
+  <gvxy_point X_Y="MBAP_PFL23xc;MBAP_PFLyc"/>
+  <gvxy_point X_Y="MBAP_PFL23xd;MBAP_PFLyd"/>
+</gvxysx>
+
+<gvxysx name="MBAP_PlatformFloor34s1s9"    material="Aluminium4"   dZ="MBAP_PFLhe"  >
+  <gvxy_point X_Y="MBAP_PFL34xa;MBAP_PFLya"/>
+  <gvxy_point X_Y="MBAP_PFL34xb;MBAP_PFLyb"/>
+  <gvxy_point X_Y="MBAP_PFL34xc;MBAP_PFLyc"/>
+  <gvxy_point X_Y="MBAP_PFL34xd;MBAP_PFLyd"/>
+</gvxysx>
+
+<!--  sector 11 & 15  -->
+
+<gvxysx name="MBAP_PlatformFloor12s11s15"  material="Aluminium4"   dZ="MBAP_PFLhe"  >
+  <gvxy_point X_Y="MBAP_PFL12xa;MBAP_PFLya"/>
+  <gvxy_point X_Y="MBAP_PFL12xa;MBAP_PFLyd"/>
+</gvxysx>
+
+<gvxysx name="MBAP_PlatformFloor23s11s15"  material="Aluminium4"   dZ="MBAP_PFLhe"  >
+  <gvxy_point X_Y="MBAP_PFL23xa;MBAP_PFLya"/>
+  <gvxy_point X_Y="MBAP_PFL23xa;MBAP_PFLyd"/>
+</gvxysx>
+
+<gvxysx name="MBAP_PlatformFloor34s11s15"  material="Aluminium4"   dZ="MBAP_PFLhe"  >
+  <gvxy_point X_Y="MBAP_PFL34xa;MBAP_PFLya"/>
+  <gvxy_point X_Y="MBAP_PFL34xa;MBAP_PFLyd"/>
+</gvxysx>
+
+<!--  sector 3 & 7  -->
+
+<box name="MBAP_PlatformFloor14s3s7"  material="Aluminium4"   X_Y_Z="MBAP_P14s3dx;MBAP_PFLhe;MBAP_P14s3dz"  />
+     
+<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+<!--  Modelization of rambarde of Platforms 1-2, 2-3, 3-4 -->
+
+<!--  Primary variables -->
+
+<!-- Tubes radii -->
+<var  name="MBAP_PlatRaRo"   value="  17." />
+
+<!--  Slanted Support for Platform 1-4 sector 3 & 7   -->
+<!--  dimensions  -->
+<var  name="MBAP_PSSs3dy1"   value=" 242.5"/>
+<var  name="MBAP_PSSs3dy2"   value=" 393." />
+<var  name="MBAP_PSSs3dx1"   value=" 393." />
+
+<!--  absolute positions  -->
+<var  name="MBAP_PSSs3zp1"   value=" 1975. " /> <!-- could use ABRT_Zvouss(5) + 200 + 62.5 , see ATLHXT__0001 -->
+<var  name="MBAP_PSSs3zp6"   value="10582.5" /> <!-- could use ABRT_Zvouss(8) - 200 - 62.5 , see ATLHXT__0001 -->
+
+<!--  Relative positions of Slanted Supports  -->
+<var  name="MBAP_PSSzrp6"    value="MBAP_PSSs3zp6-MBAP_PSSs3zp1" />
+
+<!-- Bottom Frame Tube angle -->
+<var  name="MBAP_P14s3BFa"   value="-atan(MBAP_PSSs3dy2/MBAP_PSSs3dx1)/GENV_PiS180" />
+
+<!-- Floor Position, angle w.r.t Frame -->
+<var  name="MBAP_P14s3Fla"   value="MBAP_P14s3BFa" />
+<var  name="MBAP_P14s3Flx"   value="-(MBAP_PSSs3dy1+MBAP_PSSs3dy2/2.)+(MBAP_PlatRaRo+MBAP_PFLhe/2.)*cos(MBAP_P14s3Fla*GENV_PiS180)" />
+<var  name="MBAP_P14s3Fly"   value="MBAP_PSSs3dx1/2.+(MBAP_PlatRaRo+MBAP_PFLhe/2.)*cos(MBAP_P14s3Fla*GENV_PiS180)" />
+<var  name="MBAP_P14s3Flz"   value="MBAP_PSSzrp6/2." />
+
+<!--  Primary variables -->
+
+<!--  Supporting Frame  -->
+<!--  longitudinal and transverse beams  -->
+
+<var  name="AP13_SFBeamTh"   value="  8."/>  <!--  Thickness  -->
+<var  name="AP13_SFBeamHe"   value=" 50."/>  <!--  Height  -->
+<var  name="AP13_SFBeamDx"   value="100."/>  <!--  Transverse Size (X-wise) -->
+ 
+<!--  Frame 12 (connect BT strut 1 - strut 2) -->
+
+<!-- Longitudinal and Transverse beam length / cf ATLHXT__0032  -->
+<var  name="AP13_Fr34Llen"   value="2400."/>
+
+<!--  Longitudinal and Transverse Positions -->
+<var  name="AP13_Fr23xsp1"   value="2160."/> <!--  separation of longitudinal beams along x -->
+<var  name="AP13_Fr34Tzof"   value=" 615."/> <!--  offset transverse beams along z -->
+<var  name="AP13_Fr34Tzsp"   value=" 840."/> <!--  separation of transverse beams along z -->
+
+<!--  Y-position -->
+<var  name="AP13_Fr12y"      value="-9190."/>
+
+<!--  Modelization of beam -->
+<var  name="AP13_SFBeamXa"   value="AP13_SFBeamDx/2."/>
+<var  name="AP13_SFBeamYa"   value="0."/>
+<var  name="AP13_SFBeamXb"   value="AP13_SFBeamXa"/>
+<var  name="AP13_SFBeamYb"   value="AP13_SFBeamHe"/>
+<var  name="AP13_SFBeamXc"   value="AP13_SFBeamXa-AP13_SFBeamTh"/>
+<var  name="AP13_SFBeamYc"   value="AP13_SFBeamYb"/>
+<var  name="AP13_SFBeamXd"   value="AP13_SFBeamXc"/>
+<var  name="AP13_SFBeamYd"   value="AP13_SFBeamYa+AP13_SFBeamTh"/>
+
+<!--  Positions of beams -->
+<var  name="AP13_Fr23x1"   value="AP13_Fr23xsp1/2.+AP13_SFBeamDx/2."/>
+<var  name="AP13_Fr12Typ"  value="-AP13_SFBeamHe"/> <!--  Transversal beam y position --> 
+<var  name="AP13_Fr34Tz1"  value="-AP13_Fr34Llen/2.+ AP13_Fr34Tzof +AP13_SFBeamDx/2."/> <!--  Transversal beam z position --> 
+<var  name="AP13_Fr34Tz2"  value="AP13_Fr34Tz1  + AP13_Fr34Tzsp -AP13_SFBeamDx"/> <!--  Transversal beam z position --> 
+
+<var  name="PL05"   value="2200."/>
+<var  name="DZS5"   value="3000."/>
+
+<gvxysx name="MBAP_Sector05_Beam12Transversal" material="Aluminium" dZ="DZS5">
+  <gvxy_point X_Y="AP13_SFBeamXa;AP13_SFBeamYa"/>
+  <gvxy_point X_Y="AP13_SFBeamXb;AP13_SFBeamYb"/>
+  <gvxy_point X_Y="AP13_SFBeamXc;AP13_SFBeamYc"/>
+  <gvxy_point X_Y="AP13_SFBeamXd;AP13_SFBeamYd"/>
+</gvxysx>
+
+<gvxysx name="MBAP_Sector05_Beam34Longitudinal" material="Aluminium" dZ="PL05">
+  <gvxy_point X_Y="AP13_SFBeamXa;AP13_SFBeamYa"/>
+  <gvxy_point X_Y="AP13_SFBeamXb;AP13_SFBeamYb"/>
+  <gvxy_point X_Y="AP13_SFBeamXc;AP13_SFBeamYc"/>
+  <gvxy_point X_Y="AP13_SFBeamXd;AP13_SFBeamYd"/>
+</gvxysx>
+
+<!-- NEw simplify Platforms lc 24-03-10 -->
+
+<!--  sector 3 & 7  -->
+<composition name="MBAP_AccessPlatform14s3s7AssemblyS">
+  <posXYZ volume="MBAP_PlatformFloor14s3s7" X_Y_Z="MBAP_P14s3Flx;MBAP_P14s3Fly;MBAP_P14s3Flz" rot="0.;0.;MBAP_P14s3Fla"/>
+</composition>
+<composition name="MBAP_AccessPlatform14s3s7AssemblySymS">
+  <posXYZ volume="MBAP_PlatformFloor14s3s7" X_Y_Z="MBAP_P14s3Flx;MBAP_P14s3Fly;-MBAP_P14s3Flz" rot="0.;0.;MBAP_P14s3Fla"/>
+</composition>
+<composition name="MBAP_AccessPlatform14s3s7_zplusS">
+  <posXYZ volume="MBAP_AccessPlatform14s3s7AssemblyS"   X_Y_Z=" MBAP_Ps14posx;MBAP_Ps14posy; MBAP_PSSs3zp1" rot="0.;  0.; MBAP_Ps14angz"/>
+</composition>
+<composition name="MBAP_AccessPlatform14s3s7Sym_zplusS">
+  <posXYZ volume="MBAP_AccessPlatform14s3s7AssemblySymS"   X_Y_Z=" MBAP_Ps14posx;MBAP_Ps14posy; -MBAP_PSSs3zp1" rot="0.;  0.; MBAP_Ps14angz"/>
+</composition>
+<composition name="MBAP_AccessPlatform14s3s7_zminusS">
+  <posXYZ volume="MBAP_AccessPlatform14s3s7AssemblyS"   X_Y_Z="-MBAP_Ps14posx;MBAP_Ps14posy;-MBAP_PSSs3zp1" rot="0.;180.;-MBAP_Ps14angz"/>
+</composition>
+<composition name="MBAP_AccessPlatform14s3s7Sym_zminusS">
+  <posXYZ volume="MBAP_AccessPlatform14s3s7AssemblySymS"   X_Y_Z="-MBAP_Ps14posx;MBAP_Ps14posy;MBAP_PSSs3zp1" rot="0.;180.;-MBAP_Ps14angz"/>
+</composition>
+
+
+<box name="MBAP_PlatformFloorS"  material="Aluminium4"   X_Y_Z="DZS5;MBAP_PFLhe;2*AP13_Fr23x1-65"  />
+<composition name="MBAP_Sector05_Platform2">
+  <posXYZ volume="MBAP_Sector05_Beam34Longitudinal" X_Y_Z=" AP13_Fr23x1;2.*MBAP_PFLhe;0." />
+  <posXYZ volume="MBAP_Sector05_Beam34Longitudinal" X_Y_Z="-AP13_Fr23x1;2.*MBAP_PFLhe;0." />
+  <posXYZ volume="MBAP_Sector05_Beam12Transversal" X_Y_Z="0.;AP13_Fr12Typ; AP13_Fr34Tz1" rot="0.;90.;0." />
+  <posXYZ volume="MBAP_Sector05_Beam12Transversal" X_Y_Z="0.;AP13_Fr12Typ; AP13_Fr34Tz2" rot="0.;90.;0." />
+   <posXYZ volume="MBAP_PlatformFloorS"  X_Y_Z="0.;MBAP_PFLhe+0.1;0."  />
+</composition>
+
+<var  name="AP05"   value="5370."/>
+
+<composition name="MBAP_Sector05S">
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP05; +5900"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP05; +1500."/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP05; +3700"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP05; -5900"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP05; -1500"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP05; -3700"/>
+</composition>
+
+<var  name="AP05_MS"   value="7650.1"/>
+<composition name="MBAP_Sector05_MediumS">
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP05_MS; +8100"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP05_MS; +5900"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP05_MS; +1500."/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP05_MS; +3700"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP05_MS; -5900"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP05_MS; -8100"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP05_MS; -1500"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP05_MS; -3700"/>
+</composition>
+
+<var  name="AP13_MS"   value="-6700."/>
+<composition name="MBAP_Sector13_MediumS">
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP13_MS; +8100"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP13_MS; +5900"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP13_MS; +1500."/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP13_MS; +3700"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP13_MS; -5900"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP13_MS; -8100"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP13_MS; -1500"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP13_MS; -3700"/>
+</composition>
+
+<gvxysx name="MBAP_Sector13_Beam12Transversal2" material="Aluminium" dZ="5000.">
+  <gvxy_point X_Y="AP13_SFBeamXa;AP13_SFBeamYa"/>
+  <gvxy_point X_Y="AP13_SFBeamXb;AP13_SFBeamYb"/>
+  <gvxy_point X_Y="AP13_SFBeamXc;AP13_SFBeamYc"/>
+  <gvxy_point X_Y="AP13_SFBeamXd;AP13_SFBeamYd"/>
+</gvxysx>
+<gvxysx name="MBAP_Sector13_Beam34Longitudinal2" material="Aluminium" dZ="5000">
+  <gvxy_point X_Y="AP13_SFBeamXa;AP13_SFBeamYa"/>
+  <gvxy_point X_Y="AP13_SFBeamXb;AP13_SFBeamYb"/>
+  <gvxy_point X_Y="AP13_SFBeamXc;AP13_SFBeamYc"/>
+  <gvxy_point X_Y="AP13_SFBeamXd;AP13_SFBeamYd"/>
+</gvxysx>
+<gvxysx name="MBAP_Sector13_Beam34Longitudinal3" material="Aluminium" dZ="6000">
+  <gvxy_point X_Y="AP13_SFBeamXa;AP13_SFBeamYa"/>
+  <gvxy_point X_Y="AP13_SFBeamXb;AP13_SFBeamYb"/>
+  <gvxy_point X_Y="AP13_SFBeamXc;AP13_SFBeamYc"/>
+  <gvxy_point X_Y="AP13_SFBeamXd;AP13_SFBeamYd"/>
+</gvxysx>
+<box name="MBAP_PlatformFloorS2"  material="Aluminium4"   X_Y_Z="DZS5+1700;MBAP_PFLhe; 6000."  />
+<composition name="MBAP_Sector13_Platform3">
+  <posXYZ volume="MBAP_Sector13_Beam34Longitudinal3" X_Y_Z=" AP13_Fr23x1;2.*MBAP_PFLhe;0." />
+  <posXYZ volume="MBAP_Sector13_Beam34Longitudinal3" X_Y_Z="-AP13_Fr23x1;2.*MBAP_PFLhe;0." />
+  <posXYZ volume="MBAP_Sector13_Beam12Transversal2" X_Y_Z="0.;AP13_Fr12Typ; AP13_Fr34Tz1" rot="0.;90.;0." />
+  <posXYZ volume="MBAP_Sector13_Beam12Transversal2" X_Y_Z="0.;AP13_Fr12Typ; AP13_Fr34Tz2" rot="0.;90.;0." />
+   <posXYZ volume="MBAP_PlatformFloorS2"  X_Y_Z="0.;MBAP_PFLhe;0."  />
+</composition>
+<box name="MBAP_PlatformFloorS3"  material="Aluminium4"   X_Y_Z="DZS5+1700;MBAP_PFLhe; 4900."  />
+<composition name="MBAP_Sector13_Platform2">
+  <posXYZ volume="MBAP_Sector13_Beam34Longitudinal2" X_Y_Z=" AP13_Fr23x1;2.*MBAP_PFLhe;0." />
+  <posXYZ volume="MBAP_Sector13_Beam34Longitudinal2" X_Y_Z="-AP13_Fr23x1;2.*MBAP_PFLhe;0." />
+  <posXYZ volume="MBAP_Sector13_Beam12Transversal2" X_Y_Z="0.;AP13_Fr12Typ; AP13_Fr34Tz1" rot="0.;90.;0." />
+  <posXYZ volume="MBAP_Sector13_Beam12Transversal2" X_Y_Z="0.;AP13_Fr12Typ; AP13_Fr34Tz2" rot="0.;90.;0." />
+   <posXYZ volume="MBAP_PlatformFloorS3"  X_Y_Z="0.;MBAP_PFLhe;0."  />
+</composition>
+
+<composition name="MBAP_Sector13S">
+  <posXYZ volume="MBAP_Sector13_Platform3" X_Y_Z="0.;AP13_Fr12y; +9300"/>
+  <posXYZ volume="MBAP_Sector13_Platform2" X_Y_Z="0.;AP13_Fr12y; +3000"/>
+  <posXYZ volume="MBAP_Sector13_Platform2" X_Y_Z="0.;AP13_Fr12y; -2650"/>
+  <posXYZ volume="MBAP_Sector13_Platform3" X_Y_Z="0.;AP13_Fr12y; -9300"/>
+</composition>
+
+
+<composition name="MBAP_AccessPlatform">
+
+<!--  sector 1 & 9  -->
+
+  <posXYZ volume="MBAP_PlatformFloor12s1s9" X_Y_Z=" MBAP_Ps01posx;MBAP_Ps01posy; MBAP_P12posz" rot="90.; 90.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor23s1s9" X_Y_Z=" MBAP_Ps01posx;MBAP_Ps01posy; MBAP_P23posz" rot="90.; 90.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor34s1s9" X_Y_Z=" MBAP_Ps01posx;MBAP_Ps01posy; MBAP_P34posz" rot="90.; 90.;0."/>
+
+  <posXYZ volume="MBAP_PlatformFloor12s1s9" X_Y_Z=" MBAP_Ps01posx;MBAP_Ps01posy;-MBAP_P12posz" rot="90.; 90.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor23s1s9" X_Y_Z=" MBAP_Ps01posx;MBAP_Ps01posy;-MBAP_P23posz" rot="90.; 90.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor34s1s9" X_Y_Z=" MBAP_Ps01posx;MBAP_Ps01posy;-MBAP_P34posz" rot="90.; 90.;0."/>
+
+  <posXYZ volume="MBAP_PlatformFloor12s1s9" X_Y_Z="-MBAP_Ps01posx;MBAP_Ps01posy; MBAP_P12posz" rot="90.;270.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor23s1s9" X_Y_Z="-MBAP_Ps01posx;MBAP_Ps01posy; MBAP_P23posz" rot="90.;270.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor34s1s9" X_Y_Z="-MBAP_Ps01posx;MBAP_Ps01posy; MBAP_P34posz" rot="90.;270.;0."/>
+
+  <posXYZ volume="MBAP_PlatformFloor12s1s9" X_Y_Z="-MBAP_Ps01posx;MBAP_Ps01posy;-MBAP_P12posz" rot="90.;270.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor23s1s9" X_Y_Z="-MBAP_Ps01posx;MBAP_Ps01posy;-MBAP_P23posz" rot="90.;270.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor34s1s9" X_Y_Z="-MBAP_Ps01posx;MBAP_Ps01posy;-MBAP_P34posz" rot="90.;270.;0."/>
+
+<!--  sector 11 & 15  -->
+
+  <posXYZ volume="MBAP_PlatformFloor12s11s15" X_Y_Z=" MBAP_Ps11posx;MBAP_Ps11posy; MBAP_P12posz" rot="90.; 90.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor23s11s15" X_Y_Z=" MBAP_Ps11posx;MBAP_Ps11posy; MBAP_P23posz" rot="90.; 90.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor34s11s15" X_Y_Z=" MBAP_Ps11posx;MBAP_Ps11posy; MBAP_P34posz" rot="90.; 90.;0."/>
+
+  <posXYZ volume="MBAP_PlatformFloor12s11s15" X_Y_Z=" MBAP_Ps11posx;MBAP_Ps11posy;-MBAP_P12posz" rot="90.; 90.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor23s11s15" X_Y_Z=" MBAP_Ps11posx;MBAP_Ps11posy;-MBAP_P23posz" rot="90.; 90.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor34s11s15" X_Y_Z=" MBAP_Ps11posx;MBAP_Ps11posy;-MBAP_P34posz" rot="90.; 90.;0."/>
+
+  <posXYZ volume="MBAP_PlatformFloor12s11s15" X_Y_Z="-MBAP_Ps11posx;MBAP_Ps11posy; MBAP_P12posz" rot="90.;270.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor23s11s15" X_Y_Z="-MBAP_Ps11posx;MBAP_Ps11posy; MBAP_P23posz" rot="90.;270.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor34s11s15" X_Y_Z="-MBAP_Ps11posx;MBAP_Ps11posy; MBAP_P34posz" rot="90.;270.;0."/>
+
+  <posXYZ volume="MBAP_PlatformFloor12s11s15" X_Y_Z="-MBAP_Ps11posx;MBAP_Ps11posy;-MBAP_P12posz" rot="90.;270.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor23s11s15" X_Y_Z="-MBAP_Ps11posx;MBAP_Ps11posy;-MBAP_P23posz" rot="90.;270.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor34s11s15" X_Y_Z="-MBAP_Ps11posx;MBAP_Ps11posy;-MBAP_P34posz" rot="90.;270.;0."/>
+
+<!--  sector 3 & 7  -->
+  <posXYZ volume="MBAP_AccessPlatform14s3s7_zplusS"           />
+  <posXYZ volume="MBAP_AccessPlatform14s3s7Sym_zplusS"        />
+  <posXYZ volume="MBAP_AccessPlatform14s3s7_zminusS"          />
+  <posXYZ volume="MBAP_AccessPlatform14s3s7Sym_zminusS"       />
+
+
+<!--  Access Platform Sector 13 Bottom Level -->
+  <posXYZ volume="MBAP_Sector13S"           />
+  <posXYZ volume="MBAP_Sector13_MediumS"    />
+<!--  Access Platform Sector 05 Top    Level -->
+  <posXYZ volume="MBAP_Sector05S"           />
+  <posXYZ volume="MBAP_Sector05_MediumS"    />
+  
+</composition>
+
+</section>
+<section name       = "MDT Big Wheel"
+         version    = "7.0"
+         date       = "11 Oct 2005"
+         author     = "Daniel Pomarede"
+         top_volume = "MBWH_BigWheels">
+
+
+<!--     name       =  MDT Big Wheel                 section name       = "Supports"  -->
+<!--  **************************************************************
+      **************************************************************
+      ***                                                       ****
+      ***                      MDT Big Wheel                    ****
+      ***                                                       ****
+      **************************************************************
+      **************************************************************  -->
+
+
+
+
+<var  name="MBWH_zposL" value="13950" />
+
+
+
+
+<!--  
+      **************************************************************
+      ***                                                       ****
+      ***                    common items                       ****
+      ***                                                       ****
+      **************************************************************
+-->
+
+
+<!--  Cut profiles cross bracing large and small sector -->
+<!--  ATLMHHBM0091 & ATLMHHBM0100-->
+<var  name="MBWH_CBext" value="200"/>
+<var  name="MBWH_CBhei" value="60"/>
+
+<!--  Spokes U profile -->
+
+<!--  ATLMHHBM0130 & ATLMHHBM0085 & ATLMHHBM0086 & ATLMHHBM0087 -->
+
+<var  name="MBWH_SUPthi"  value="   5." />
+<var  name="MBWH_SUPext"  value=" 230." />
+<var  name="MBWH_SUPhei"  value="  55." />
+
+<!--  Spokes Reinforcing bar -->
+
+<!--  ATLMHHBM0082A & ATLMHHBM0051A & ATLMHHBM0154A  -->
+
+<!--  Slate -->
+<var  name="MBWH_RBSlen" value="1080"/>
+<var  name="MBWH_RBSwid" value="100"/>
+<var  name="MBWH_RBSthi" value="25"/>
+<!--  Bracket -->
+<var  name="MBWH_RBBlen" value="200"/>
+<var  name="MBWH_RBBsiz" value="60"/>
+<var  name="MBWH_RBBthi" value="10"/>
+
+<!--  holes spacing for clamping Reinforcing bar on spokes -->
+<!--  ATLMHHBM0130 & ATLMHHBM0085 -->
+<var name="MBWH_SRBhos" value="160" />
+
+<!--  Plates of Cross Bracings --> 
+<var  name="MBWH_CBPth" value="8"/>    <!-- thickness -->
+
+<!--  Derived variables -->
+<var  name="MBWH_RBBxa" value="0"/>
+<var  name="MBWH_RBBya" value="0"/>
+<var  name="MBWH_RBBxb" value="MBWH_RBBsiz"/>
+<var  name="MBWH_RBByb" value="MBWH_RBBya"/>
+<var  name="MBWH_RBBxc" value="MBWH_RBBxb"/>
+<var  name="MBWH_RBByc" value="MBWH_RBBsiz"/>
+<var  name="MBWH_RBBxd" value="MBWH_RBBxc-MBWH_RBBthi"/>
+<var  name="MBWH_RBByd" value="MBWH_RBByc"/>
+<var  name="MBWH_RBBxe" value="MBWH_RBBxd"/>
+<var  name="MBWH_RBBye" value="MBWH_RBBthi"/>
+<var  name="MBWH_RBBxf" value="MBWH_RBBxa"/>
+<var  name="MBWH_RBByf" value="MBWH_RBBye"/>
+
+<var  name="MBWH_RBBxp"  value="-MBWH_RBSlen/2.+MBWH_RBBsiz"/>
+<var  name="MBWH_RBByp1" value="-MBWH_RBSthi/2.-MBWH_RBBsiz"/>
+<var  name="MBWH_RBByp2" value="MBWH_RBSthi/2."/>
+
+<box name="MBWH_ReinforcingBarSlate" material="Aluminium1" X_Y_Z="MBWH_RBSlen;MBWH_RBSthi;MBWH_RBSwid"/>
+
+<gvxy name="MBWH_ReinforcingBarBracket" material="Aluminium2" dZ="MBWH_RBBlen">
+  <gvxy_point X_Y="MBWH_RBBxa;MBWH_RBBya"/>
+  <gvxy_point X_Y="MBWH_RBBxb;MBWH_RBByb"/>
+  <gvxy_point X_Y="MBWH_RBBxc;MBWH_RBByc"/>
+  <gvxy_point X_Y="MBWH_RBBxd;MBWH_RBByd"/>
+  <gvxy_point X_Y="MBWH_RBBxe;MBWH_RBBye"/>
+  <gvxy_point X_Y="MBWH_RBBxf;MBWH_RBByf"/>
+</gvxy>
+
+<composition name="MBWH_ReinforcingBar">
+  <posXYZ volume="MBWH_ReinforcingBarSlate"/>
+  <posXYZ volume="MBWH_ReinforcingBarBracket" X_Y_Z=" MBWH_RBBxp;MBWH_RBByp1;0" rot="0;0;90"/>
+  <posXYZ volume="MBWH_ReinforcingBarBracket" X_Y_Z="-MBWH_RBBxp;MBWH_RBByp2;0"/>
+</composition>
+
+<!--  positions of reinforcing bars -->
+<var name="MBWH_SRBpx" value="MBWH_SUPext/2.+MBWH_RBSthi/2.+MBWH_RBBthi"/>
+<var name="MBWH_SRBpy" value="-MBWH_RBSlen/2.+MBWH_SUPhei+MBWH_RBBthi"/>
+
+<!--  Spokes -->
+<!--  Derived variables -->
+<var  name="MBWH_SUPxa"  value="MBWH_SUPext/2." />
+<var  name="MBWH_SUPya"  value="0." />
+<var  name="MBWH_SUPxb"  value="MBWH_SUPxa" />
+<var  name="MBWH_SUPyb"  value="MBWH_SUPhei" />
+<var  name="MBWH_SUPxc"  value="MBWH_SUPxb-MBWH_SUPthi" />
+<var  name="MBWH_SUPyc"  value="MBWH_SUPyb" />
+<var  name="MBWH_SUPxd"  value="MBWH_SUPxc" />
+<var  name="MBWH_SUPyd"  value="MBWH_SUPthi" />
+
+<!--  Plates of Cross Bracings --> 
+<var  name="MBWH_CBPx"  value="(MBWH_CBext+MBWH_CBPth)/2." />   <!-- x pos -->
+
+
+
+
+<!--  
+      **************************************************************
+      ***                                                       ****
+      ***                      Large Sector                     ****
+      ***                                                       ****
+      **************************************************************
+-->
+
+<!--  ATLMHHBM0091 -->
+<!--  Cut profiles cross bracing large sector -->
+<var  name="MBWH_CBLthi" value="5"/>
+
+<!--  Contreventements lengths -->
+<!--  item numbering in ATLMHHBM0002 -->
+<var  name="MBWH_CBLl11"  value="3690." />  <!--  item 11 -->
+<var  name="MBWH_CBLl17"  value="2700." />  <!--  item 17 -->
+<var  name="MBWH_CBLl22"  value="1740." />  <!--  item 22 -->
+<var  name="MBWH_CBLl26"  value=" 750." />  <!--  item 26 -->
+
+<!--  Contreventements positions (...to be confirmed...) -->
+<var  name="MBWH_CBLy11"  value="9700." />  <!--  item 11 -->
+<var  name="MBWH_CBLy17"  value="7750." />  <!--  item 17 -->
+<var  name="MBWH_CBLy22"  value="5800." />  <!--  item 22 -->
+<var  name="MBWH_CBLy26"  value="3850." />  <!--  item 26 -->
+
+
+<!--  item numbering in ATLMHHBM0002 -->
+<!--  Cross bracing, bay 1 large sector -->
+<var  name="MBWH_CBLl10"  value="4260." />  <!--  item 10 --> <!--  drawing ATLMHHBM0066 -->
+<!--  Cross bracing, bay 2 large sector -->
+<var  name="MBWH_CBLl15"  value="3590." />  <!--  item 15 --> <!--  drawing ATLMHHBM0068 -->
+<!--  Cross bracing, bay 3 large sector -->
+<var  name="MBWH_CBLl21"  value="2830." />  <!--  item 21 --> <!--  drawing ATLMHHBM0070 -->
+<!--  Cross bracing, bay 4 large sector -->
+<var  name="MBWH_CBLl25"  value="2130." />  <!--  item 25 --> <!--  drawing ATLMHHBM0073 -->
+
+<!--  item numbering in ATLMHHBM0002 -->
+<!--  Contreventements, bay 1 large sector -->
+<var  name="MBWH_CBLl8"  value="1780."/>  <!--  item 8 --> <!--  drawing ATLMHHBM0091 -->
+<var  name="MBWH_CBLl9"  value="2310."/>  <!--  item 9 --> <!--  drawing ATLMHHBM0091 -->
+
+<!--  Contreventements, bay 2 large sector -->
+<var  name="MBWH_CBLl14" value="1450."/>  <!--  item 14 --> <!--  drawing ATLMHHBM0091 -->
+<var  name="MBWH_CBLl13" value="2005."/>  <!--  item 13 --> <!--  drawing ATLMHHBM0091 -->
+
+<!--  Contreventements, bay 3 large sector -->
+<var  name="MBWH_CBLl20" value="1055."/>  <!--  item 20 --> <!--  drawing ATLMHHBM0091 -->
+<var  name="MBWH_CBLl18" value="1685."/>  <!--  item 18 --> <!--  drawing ATLMHHBM0091 -->
+
+<!--  Contreventements, bay 4 large sector -->
+<var  name="MBWH_CBLl24" value="590."/>   <!--  item 24 --> <!--  drawing ATLMHHBM0091 -->
+<var  name="MBWH_CBLl23" value="1430."/>  <!--  item 23 --> <!--  drawing ATLMHHBM0091 -->
+
+
+<!--  Plates --> 
+ <!--  item 10 for Bay 1 --> <!--  drawing ATLMHHBM0066 -->
+<var  name="MBWH_CBPL10le" value="419"/>  <!-- length -->
+<var  name="MBWH_CBPL10wi" value="216"/>  <!-- width -->
+<var  name="MBWH_CBPL10cu" value="40"/>   <!-- cut -->
+<var  name="MBWH_CBPL10ti" value="22"/>   <!-- tilt -->
+<var  name="MBWH_CBPL10za" value="2174"/> <!-- Plate offset -->
+<var  name="MBWH_CBPL10ya" value="14"/>   <!-- Plate offset -->
+ <!--  item 15 for Bay 2 --> <!--  drawing ATLMHHBM0068 -->
+<var  name="MBWH_CBPL15le" value="345"/>  <!-- length -->
+<var  name="MBWH_CBPL15wi" value="224"/>  <!-- width -->
+<var  name="MBWH_CBPL15cu" value="30"/>   <!-- cut -->
+<var  name="MBWH_CBPL15ti" value="30"/>   <!-- tilt -->
+<var  name="MBWH_CBPL15za" value="1322"/> <!-- Plate offset -->
+<var  name="MBWH_CBPL15ya" value="9"/>    <!-- Plate offset -->
+ <!--  item 21 for Bay 3 --> <!--  drawing ATLMHHBM0070 -->
+<var  name="MBWH_CBPL21le" value="269"/>  <!-- length -->
+<var  name="MBWH_CBPL21wi" value="230"/>  <!-- width -->
+<var  name="MBWH_CBPL21cu" value="20"/>   <!-- cut -->
+<var  name="MBWH_CBPL21ti" value="40"/>   <!-- tilt -->
+<var  name="MBWH_CBPL21za" value="938"/>  <!-- Plate offset -->
+<var  name="MBWH_CBPL21ya" value="13"/>   <!-- Plate offset -->
+ <!--  item 25 for Bay 4 --> <!--  drawing ATLMHHBM0073 -->
+<var  name="MBWH_CBPL25le" value="300"/>  <!-- length -->
+<var  name="MBWH_CBPL25wi" value="222"/>  <!-- width -->
+<var  name="MBWH_CBPL25cu" value="20"/>   <!-- cut -->
+<var  name="MBWH_CBPL25ti" value="33"/>   <!-- tilt -->   <!-- ==> to be confirmed <== -->
+<var  name="MBWH_CBPL25za" value="470"/>  <!-- Plate offset -->
+<var  name="MBWH_CBPL25ya" value="21"/>   <!-- Plate offset -->
+
+
+<!--  positions (...to be confirmed...) -->
+<var  name="MBWH_Croily10" value="10500"/> <!--  item 10 --> 
+<var  name="MBWH_Croily15" value="8600"/>  <!--  item 15 --> 
+<var  name="MBWH_Croily21" value="6600"/>  <!--  item 21 --> 
+<var  name="MBWH_Croily25" value="4450"/>  <!--  item 25 --> 
+
+
+<!--  ATLMHHBM0002 -->
+<!--  Spokes Opening angle large sector -->
+<var  name="MBWH_SLangle"  value="14." />
+
+<!--  Spoke large sector -->
+<!--  Inner spoke large sector  ATLMHHBM0130 -->
+<!--  External spoke large sector  ATLMHHBM0128 -->
+
+<!--  ATLMHHBM0130 -->
+<!--  U profile length -->
+<var  name="MBWH_SlsUPlen"  value="8465" />   <!-- ??? to be confirmed for both -->
+
+<!--  relative positions of reinforcing bars -->
+<var name="MBWH_SlsRBdz1" value="1317" />
+<var name="MBWH_SlsRBdz2" value="1787" />
+<var name="MBWH_SlsRBdz3" value="2030" />
+<var name="MBWH_SlsRBdz4" value="1740" />
+
+  
+<!--  External Spokes supports -->
+
+<!--  ATLMHHBM0128 -->
+<!--  position along the spoke of 1st support -->
+<var  name="MBWH_SlsSup1" value=" 414" />
+<!--  size of support -->
+<var  name="MBWH_SlsSSize" value=" 220" />   <!-- as measured on drawing, to be confirmed in atlmhhbm0123 ? -->
+
+<!--  Transversal beam, central support -->
+
+<!--  ATLMHHBM0080 -->
+<var  name="MBWH_TBCSlen1" value="2396." />
+<var  name="MBWH_TBCSlen2" value="2526.6"/>
+<var  name="MBWH_TBCSext"  value="  87." />
+<var  name="MBWH_TBCShei"  value=" 180." />
+<var  name="MBWH_TBCSthi1" value="  15." />
+<var  name="MBWH_TBCSthi2" value="  10." />
+<var  name="MBWH_TBCSoffs" value=" 135." />
+<var  name="MBWH_TBCSang1" value="  14." />
+<var  name="MBWH_TBCSang2" value="22.5"/>
+
+
+<!--  Connection beam / extremity plate -->
+
+<!--  ATLMHHBM0076 -->
+<!--  thickness, assumed constant -->
+<var  name="MBWH_CBEPthic" value="15."/>
+<!--  dimensions and angles -->
+<var  name="MBWH_CBEPl1" value="195.8"/>
+<var  name="MBWH_CBEPl2" value="230."/>
+<var  name="MBWH_CBEPl3" value="263."/>
+
+<var  name="MBWH_CBEPh1" value="89.5"/>
+<var  name="MBWH_CBEPh2" value="169.2"/>
+<var  name="MBWH_CBEPh3" value="72.8"/>
+<var  name="MBWH_CBEPh4" value="81.2"/>
+<var  name="MBWH_CBEPh5" value="125"/>
+
+<var  name="MBWH_CBEPa1" value="22.5"/>
+<var  name="MBWH_CBEPa2" value="67.5"/>
+<var  name="MBWH_CBEPa3" value="82."/>
+<var  name="MBWH_CBEPa4" value="15."/>
+
+
+<!--  Extremity plate -->
+
+<!--  ATLMHHBM0075 -->
+<!--  thickness, assumed constant -->
+<var  name="MBWH_EPthic" value="15."/>
+<!--  dimensions and angles -->
+<var  name="MBWH_EPl1" value="227.8"/>
+<var  name="MBWH_EPl2" value="423"/>
+<var  name="MBWH_EPl3" value="193.7"/>
+
+<var  name="MBWH_EPh1" value="250.7"/>
+<var  name="MBWH_EPh2" value="170.3"/>
+<var  name="MBWH_EPh3" value="383"/>
+<var  name="MBWH_EPh4" value="76.1"/>
+
+
+<!--  Central Reinforcing bar -->
+
+<!--  ATLMHHBM0113 -->
+
+<var  name="MBWH_CRBLPwid" value="180"/>
+<var  name="MBWH_CRBPL1pi" value="643"/>
+<var  name="MBWH_CRBPL1po" value="647"/>
+<var  name="MBWH_CRBSHIof" value="4"/>
+
+<!--  L Profile -->
+<var  name="MBWH_CRBLPthi" value="12"/>
+<var  name="MBWH_CRBLPle1" value="910"/>
+<var  name="MBWH_CRBLPhe1" value="60"/>
+<var  name="MBWH_CRBLPle2" value="145"/>
+<var  name="MBWH_CRBLPhe2" value="39"/>
+
+<!--  Plate 1 -->
+<var  name="MBWH_CRBPL1th" value="12"/>
+<var  name="MBWH_CRBPL1le" value="340"/>
+<var  name="MBWH_CRBPL1wi" value="156"/>
+
+<!--  Plate 2 -->
+<var  name="MBWH_CRBPL2th" value="12"/>
+<var  name="MBWH_CRBPL2le" value="210"/>
+<var  name="MBWH_CRBPL2wi" value="156"/>
+
+<!--  Shim -->
+<var  name="MBWH_CRBSHIth" value="12"/>
+<var  name="MBWH_CRBSHIle" value="165"/>
+<var  name="MBWH_CRBSHIwi" value="156"/>
+
+<!--  position of Reinforcing Bar relative to extremity plate ... pifometric, to be confirmed -->
+<var  name="MBWH_CRBxoff" value="-200"/>
+<var  name="MBWH_CRByoff" value="-400"/>
+<var  name="MBWH_CRBzoff" value="-300"/>
+
+
+<!--  ATLMHHBM0002 -->
+<!--  position of 1st support in atlas ref system -->
+<var  name="MBWH_SlsSuy1"   value=" 3612.7" />
+<var  name="MBWH_SlsSux1"   value=" 1305." />
+<!--  ATLMHHBM0128 -->
+<!--  x extension -->
+<var  name="MBWH_SlsSxext"  value=" 139.3" />
+
+<!--  Derived variables -->
+<!--  Positions -->
+<var  name="MBWH_Slsypos" value="MBWH_SlsSuy1+(.5*MBWH_SlsUPlen-MBWH_SlsSup1)*cos(MBWH_SLangle*GENV_PiS180)"/>
+<var  name="MBWH_Slsxp1"  value="MBWH_SlsSux1+(MBWH_SlsSxext-.5*MBWH_SUPhei)/cos(MBWH_SLangle*GENV_PiS180)-.5*MBWH_SlsSSize*sin(MBWH_SLangle*GENV_PiS180) " />
+<!--  external spokes -->
+<var  name="MBWH_SlsExref" value="MBWH_Slsxp1 +(.5*MBWH_SlsUPlen-MBWH_SlsSup1)*sin(MBWH_SLangle*GENV_PiS180) "/>
+<!--  inner spokes -->
+<var  name="MBWH_SlsIxref" value="MBWH_SlsExref - (MBWH_RBSlen-MBWH_RBBsiz)/cos(MBWH_SLangle*GENV_PiS180) "/>
+
+<!--  Connection beam / extremity plate -->
+<!--  Derived variables -->
+<var  name="MBWH_CBEPxa" value="0"/>
+<var  name="MBWH_CBEPya" value="0"/>
+<var  name="MBWH_CBEPxb" value="MBWH_CBEPxa"/>
+<var  name="MBWH_CBEPyb" value="MBWH_CBEPh1"/>
+<var  name="MBWH_CBEPxc" value="MBWH_CBEPl2-MBWH_CBEPl3"/>
+<var  name="MBWH_CBEPyc" value="MBWH_CBEPh2"/>
+<var  name="MBWH_CBEPxd" value="MBWH_CBEPxc+MBWH_CBEPl1"/>
+<var  name="MBWH_CBEPyd" value="MBWH_CBEPyc"/>
+<var  name="MBWH_CBEPxe" value="MBWH_CBEPxd+(MBWH_CBEPh2-MBWH_CBEPh5)/tan(MBWH_CBEPa2*GENV_PiS180)"/>
+<var  name="MBWH_CBEPye" value="MBWH_CBEPh5"/>
+<var  name="MBWH_CBEPxf" value="MBWH_CBEPxe+(MBWH_CBEPh5-MBWH_CBEPh4)/tan(MBWH_CBEPa3*GENV_PiS180)"/>
+<var  name="MBWH_CBEPyf" value="MBWH_CBEPh4"/>
+<var  name="MBWH_CBEPxg" value="MBWH_CBEPxf+(MBWH_CBEPh4-MBWH_CBEPh3)/tan(MBWH_CBEPa4*GENV_PiS180)"/>
+<var  name="MBWH_CBEPyg" value="MBWH_CBEPh3"/>
+<var  name="MBWH_CBEPxh" value="MBWH_CBEPl2"/>
+<var  name="MBWH_CBEPyh" value="MBWH_CBEPya"/>
+
+<!--  Modelization -->
+<gvxy name="MBWH_ConnectionBeamExtremityPlate" material="Aluminium2" dZ="MBWH_CBEPthic">
+  <gvxy_point X_Y="MBWH_CBEPxa;MBWH_CBEPya"/>
+  <gvxy_point X_Y="MBWH_CBEPxb;MBWH_CBEPyb"/>
+  <gvxy_point X_Y="MBWH_CBEPxc;MBWH_CBEPyc"/>
+  <gvxy_point X_Y="MBWH_CBEPxd;MBWH_CBEPyd"/>
+  <gvxy_point X_Y="MBWH_CBEPxe;MBWH_CBEPye"/>
+  <gvxy_point X_Y="MBWH_CBEPxf;MBWH_CBEPyf"/>
+  <gvxy_point X_Y="MBWH_CBEPxg;MBWH_CBEPyg"/>
+  <gvxy_point X_Y="MBWH_CBEPxh;MBWH_CBEPyh"/>
+</gvxy>
+
+<!--  Extremity plate -->
+<!--  Derived variables -->
+<var  name="MBWH_EPxa" value="0"/>
+<var  name="MBWH_EPya" value="0"/>
+<var  name="MBWH_EPxb" value="MBWH_EPxa"/>
+<var  name="MBWH_EPyb" value="MBWH_EPh1"/>
+<var  name="MBWH_EPxc" value="MBWH_EPl2-MBWH_EPl3"/>
+<var  name="MBWH_EPyc" value="MBWH_EPh3"/>
+<var  name="MBWH_EPxd" value="MBWH_EPl2"/>
+<var  name="MBWH_EPyd" value="MBWH_EPyc"/>
+<var  name="MBWH_EPxe" value="MBWH_EPxd"/>
+<var  name="MBWH_EPye" value="MBWH_EPyd-MBWH_EPh2"/>
+<var  name="MBWH_EPxf" value="MBWH_EPl1"/>
+<var  name="MBWH_EPyf" value="MBWH_EPh4"/>
+<var  name="MBWH_EPxg" value="MBWH_EPxf"/>
+<var  name="MBWH_EPyg" value="MBWH_EPya"/>
+
+<!--  Modelization -->
+<gvxy name="MBWH_ExtremityPlate" material="Aluminium1" dZ="MBWH_EPthic">
+  <gvxy_point X_Y="MBWH_EPxa;MBWH_EPya"/>
+  <gvxy_point X_Y="MBWH_EPxb;MBWH_EPyb"/>
+  <gvxy_point X_Y="MBWH_EPxc;MBWH_EPyc"/>
+  <gvxy_point X_Y="MBWH_EPxd;MBWH_EPyd"/>
+  <gvxy_point X_Y="MBWH_EPxe;MBWH_EPye"/>
+  <gvxy_point X_Y="MBWH_EPxf;MBWH_EPyf"/>
+  <gvxy_point X_Y="MBWH_EPxg;MBWH_EPyg"/>
+</gvxy>
+
+
+<!-- Central Reinforcing bar  -->
+<!--  L Profile -->
+<!--  Derived variables -->
+<!--  piece 1 -->
+<var  name="MBWH_CRBLP1xa" value="0"/>
+<var  name="MBWH_CRBLP1ya" value="0"/>
+<var  name="MBWH_CRBLP1xb" value="MBWH_CRBLPle1"/>
+<var  name="MBWH_CRBLP1yb" value="MBWH_CRBLP1ya"/>
+<var  name="MBWH_CRBLP1xc" value="MBWH_CRBLP1xb"/>
+<var  name="MBWH_CRBLP1yc" value="MBWH_CRBLPhe2"/>
+<var  name="MBWH_CRBLP1xd" value="MBWH_CRBLPle1-MBWH_CRBLPle2"/>
+<var  name="MBWH_CRBLP1yd" value="MBWH_CRBLPhe1"/>
+<var  name="MBWH_CRBLP1xe" value="MBWH_CRBLP1xa"/>
+<var  name="MBWH_CRBLP1ye" value="MBWH_CRBLP1yd"/>
+
+<!--  piece 2 -->
+<var  name="MBWH_CRBLP2dy" value="MBWH_CRBLPhe1-MBWH_CRBLPthi"/>
+
+
+<!--  Modelization -->
+<gvxy name="MBWH_CRB-LProfile1" material="Aluminium1" dZ="MBWH_CRBLPthi">
+  <gvxy_point X_Y="MBWH_CRBLP1xa;MBWH_CRBLP1ya"/>
+  <gvxy_point X_Y="MBWH_CRBLP1xb;MBWH_CRBLP1yb"/>
+  <gvxy_point X_Y="MBWH_CRBLP1xc;MBWH_CRBLP1yc"/>
+  <gvxy_point X_Y="MBWH_CRBLP1xd;MBWH_CRBLP1yd"/>
+  <gvxy_point X_Y="MBWH_CRBLP1xe;MBWH_CRBLP1ye"/>
+</gvxy>
+
+<var  name="MBWH_CRBLP1z" value="-MBWH_CRBLPwid/2.+MBWH_CRBLPthi/2"/>
+
+<box name="MBWH_CRB-LProfile2" material="Aluminium1" X_Y_Z="MBWH_CRBLPle1;MBWH_CRBLP2dy;MBWH_CRBLPthi"/>
+<var name="MBWH_CRBLP2x" value="MBWH_CRBLPle1/2"/>
+<var name="MBWH_CRBLP2y" value="MBWH_CRBLPthi/2"/>
+<var name="MBWH_CRBLP2z" value="MBWH_CRBLP1z+(MBWH_CRBLPthi+MBWH_CRBLP2dy)/2"/>
+
+<box name="MBWH_CRB-Plate2" material="Aluminium1" X_Y_Z="MBWH_CRBPL2le;MBWH_CRBPL2th;MBWH_CRBPL2wi"/>
+<var name="MBWH_CRBPL2xp" value="MBWH_CRBLPle1/2"/>
+<var name="MBWH_CRBPL2yp" value="MBWH_CRBLPthi+MBWH_CRBPL2th/2"/>
+
+<box name="MBWH_CRB-Plate1" material="Aluminium1" X_Y_Z="MBWH_CRBPL1le;MBWH_CRBPL1th;MBWH_CRBPL1wi"/>
+<var name="MBWH_CRBPL1x1" value="MBWH_CRBLPle1/2+MBWH_CRBPL1pi-MBWH_CRBPL1le/2"/>
+<var name="MBWH_CRBPL1x2" value="MBWH_CRBLPle1/2-MBWH_CRBPL1po+MBWH_CRBPL1le/2"/>
+<var name="MBWH_CRBPL1yp" value="-MBWH_CRBPL1th/2."/>
+
+<box name="MBWH_CRB-Shim" material="Aluminium1" X_Y_Z="MBWH_CRBSHIle;MBWH_CRBSHIth;MBWH_CRBSHIwi"/>
+<var name="MBWH_CRBSHIx1" value="MBWH_CRBPL1x1+MBWH_CRBPL1le/2.-MBWH_CRBSHIle/2.-MBWH_CRBSHIof"/>
+<var name="MBWH_CRBSHIx2" value="MBWH_CRBPL1x2-MBWH_CRBPL1le/2.+MBWH_CRBSHIle/2.+MBWH_CRBSHIof"/>
+<var name="MBWH_CRBSHIyp" value="MBWH_CRBPL1yp-MBWH_CRBPL1th/2.-MBWH_CRBSHIth/2."/>
+
+
+<composition name="MBWH_CRB-LProfile_1">
+  <posXYZ volume="MBWH_CRB-LProfile1" X_Y_Z="0;0;MBWH_CRBLP1z"/>
+  <posXYZ volume="MBWH_CRB-LProfile2" X_Y_Z="MBWH_CRBLP2x;MBWH_CRBLP2y;MBWH_CRBLP2z" rot="90;0;0"/>
+</composition>
+
+<composition name="MBWH_CRB-LProfile_2">
+  <posXYZ volume="MBWH_CRB-LProfile1" X_Y_Z="0;0;-MBWH_CRBLP1z"/>
+  <posXYZ volume="MBWH_CRB-LProfile2" X_Y_Z="MBWH_CRBLP2x;MBWH_CRBLP2y;-MBWH_CRBLP2z" rot="90;0;0"/>
+</composition>
+
+
+<composition name="MBWH_CentralReinforcingbar">
+  <posXYZ volume="MBWH_CRB-LProfile_1"/>
+  <posXYZ volume="MBWH_CRB-LProfile_2"/>
+  <posXYZ volume="MBWH_CRB-Plate2"   X_Y_Z="MBWH_CRBPL2xp;MBWH_CRBPL2yp;0"/>
+  <posXYZ volume="MBWH_CRB-Plate1"   X_Y_Z="MBWH_CRBPL1x1;MBWH_CRBPL1yp;0"/>
+  <posXYZ volume="MBWH_CRB-Plate1"   X_Y_Z="MBWH_CRBPL1x2;MBWH_CRBPL1yp;0"/>
+  <posXYZ volume="MBWH_CRB-Shim"     X_Y_Z="MBWH_CRBSHIx1;MBWH_CRBSHIyp;0"/>
+  <posXYZ volume="MBWH_CRB-Shim"     X_Y_Z="MBWH_CRBSHIx2;MBWH_CRBSHIyp;0"/>
+</composition>
+
+<!--  Cut profiles cross bracing large sector -->
+<!--  Derived variables -->
+<var  name="MBWH_CBLxa"  value="MBWH_CBext/2." />
+<var  name="MBWH_CBLya"  value="0." />
+<var  name="MBWH_CBLxb"  value="MBWH_CBLxa" />
+<var  name="MBWH_CBLyb"  value="MBWH_CBhei" />
+<var  name="MBWH_CBLxc"  value="MBWH_CBLxb-MBWH_CBLthi" />
+<var  name="MBWH_CBLyc"  value="MBWH_CBLyb" />
+<var  name="MBWH_CBLxd"  value="MBWH_CBLxc" />
+<var  name="MBWH_CBLyd"  value="MBWH_CBLthi" />
+
+<!--  Modelization -->
+
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem11" material="Aluminium1" dZ="MBWH_CBLl11">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem17" material="Aluminium1" dZ="MBWH_CBLl17">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem22" material="Aluminium1" dZ="MBWH_CBLl22">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem26" material="Aluminium1" dZ="MBWH_CBLl26">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem10" material="Aluminium1" dZ="MBWH_CBLl10">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem15" material="Aluminium1" dZ="MBWH_CBLl15">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem21" material="Aluminium1" dZ="MBWH_CBLl21">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem25" material="Aluminium1" dZ="MBWH_CBLl25">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+
+
+<!--  Contreventements, bay 1 large sector -->
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem8" material="Aluminium1" dZ="MBWH_CBLl8">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem9" material="Aluminium1" dZ="MBWH_CBLl9">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+
+<!--  Contreventements, bay 2 large sector -->
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem14" material="Aluminium1" dZ="MBWH_CBLl14">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem13" material="Aluminium1" dZ="MBWH_CBLl13">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+
+<!--  Contreventements, bay 3 large sector -->
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem20" material="Aluminium1" dZ="MBWH_CBLl20">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem18" material="Aluminium1" dZ="MBWH_CBLl18">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+
+<!--  Contreventements, bay 4 large sector -->
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem24" material="Aluminium1" dZ="MBWH_CBLl24">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem23" material="Aluminium1" dZ="MBWH_CBLl23">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+
+
+<!--  cross bracing Plates large sector -->
+
+<!--  Bay 1 -->
+<var  name="MBWH_CBPL10x1"  value="MBWH_CBPL10le/2." />
+<var  name="MBWH_CBPL10y1"  value="MBWH_CBPL10wi/2.-MBWH_CBPL10cu" />
+<var  name="MBWH_CBPL10x2"  value="MBWH_CBPL10x1-MBWH_CBPL10cu" />
+<var  name="MBWH_CBPL10y2"  value="MBWH_CBPL10wi/2." />
+<gvxysxy name="MBWH_CrossBracingPlateLargeSectorItem10" material="Aluminium1" dZ="MBWH_CBPth">
+  <gvxy_point X_Y="MBWH_CBPL10x1;MBWH_CBPL10y1"/>
+  <gvxy_point X_Y="MBWH_CBPL10x2;MBWH_CBPL10y2"/>
+</gvxysxy>
+
+<!--  Bay 2 -->
+<var  name="MBWH_CBPL15x1"  value="MBWH_CBPL15le/2." />
+<var  name="MBWH_CBPL15y1"  value="MBWH_CBPL15wi/2.-MBWH_CBPL15cu" />
+<var  name="MBWH_CBPL15x2"  value="MBWH_CBPL15x1-MBWH_CBPL15cu" />
+<var  name="MBWH_CBPL15y2"  value="MBWH_CBPL15wi/2." />
+<gvxysxy name="MBWH_CrossBracingPlateLargeSectorItem15" material="Aluminium1" dZ="MBWH_CBPth">
+  <gvxy_point X_Y="MBWH_CBPL15x1;MBWH_CBPL15y1"/>
+  <gvxy_point X_Y="MBWH_CBPL15x2;MBWH_CBPL15y2"/>
+</gvxysxy>
+
+<!--  Bay 3 -->
+<var  name="MBWH_CBPL21x1"  value="MBWH_CBPL21le/2." />
+<var  name="MBWH_CBPL21y1"  value="MBWH_CBPL21wi/2.-MBWH_CBPL21cu" />
+<var  name="MBWH_CBPL21x2"  value="MBWH_CBPL21x1-MBWH_CBPL21cu" />
+<var  name="MBWH_CBPL21y2"  value="MBWH_CBPL21wi/2." />
+<gvxysxy name="MBWH_CrossBracingPlateLargeSectorItem21" material="Aluminium1" dZ="MBWH_CBPth">
+  <gvxy_point X_Y="MBWH_CBPL21x1;MBWH_CBPL21y1"/>
+  <gvxy_point X_Y="MBWH_CBPL21x2;MBWH_CBPL21y2"/>
+</gvxysxy>
+
+<!--  Bay 4 -->
+<var  name="MBWH_CBPL25x1"  value="MBWH_CBPL25le/2." />
+<var  name="MBWH_CBPL25y1"  value="MBWH_CBPL25wi/2.-MBWH_CBPL25cu" />
+<var  name="MBWH_CBPL25x2"  value="MBWH_CBPL25x1-MBWH_CBPL25cu" />
+<var  name="MBWH_CBPL25y2"  value="MBWH_CBPL25wi/2." />
+<gvxysxy name="MBWH_CrossBracingPlateLargeSectorItem25" material="Aluminium1" dZ="MBWH_CBPth">
+  <gvxy_point X_Y="MBWH_CBPL25x1;MBWH_CBPL25y1"/>
+  <gvxy_point X_Y="MBWH_CBPL25x2;MBWH_CBPL25y2"/>
+</gvxysxy>
+
+
+<!-- Bay 1 -->
+<var  name="MBWH_CBL10z" value="MBWH_CBLl10/2." />
+<var  name="MBWH_CBPL10d"  value="MBWH_CBPL10wi-2.*MBWH_CBPL10cu" />
+<var  name="MBWH_CBPL10zb" value="MBWH_CBPL10za+sin(MBWH_CBPL10ti*GENV_PiS180)*MBWH_CBPL10d/2." />
+<var  name="MBWH_CBPL10yb" value="MBWH_CBPL10ya-cos(MBWH_CBPL10ti*GENV_PiS180)*MBWH_CBPL10d/2." />
+<var  name="MBWH_CBPL10zc" value="MBWH_CBPL10zb+cos(MBWH_CBPL10ti*GENV_PiS180)*MBWH_CBPL10le/2" />
+<var  name="MBWH_CBPL10yc" value="MBWH_CBPL10yb+sin(MBWH_CBPL10ti*GENV_PiS180)*MBWH_CBPL10le/2" />
+  <!-- get positions of contreventements 8,9 using locations of item 10 extremities -->
+<var  name="MBWH_cvl10xo" value="-MBWH_CBPL10zc*cos(MBWH_CBPL10ti*GENV_PiS180)-0.5*(MBWH_CBhei)*sin(MBWH_CBPL10ti*GENV_PiS180)" />
+<var  name="MBWH_cvl10yo" value=" MBWH_CBPL10zc*sin(MBWH_CBPL10ti*GENV_PiS180)-0.5*(MBWH_CBhei)*cos(MBWH_CBPL10ti*GENV_PiS180)" />
+<var  name="MBWH_cvl10xu" value="MBWH_cvl10xo+MBWH_CBLl10*cos(MBWH_CBPL10ti*GENV_PiS180)" />
+<var  name="MBWH_cvl10yu" value="MBWH_cvl10yo-MBWH_CBLl10*sin(MBWH_CBPL10ti*GENV_PiS180)" />
+<var  name="MBWH_cvlx8"   value="-MBWH_cvl10xu+cos(MBWH_CBPL10ti*GENV_PiS180)*MBWH_CBLl8/2." />
+<var  name="MBWH_cvly8"   value=" MBWH_cvl10yu+sin(MBWH_CBPL10ti*GENV_PiS180)*MBWH_CBLl8/2." />
+<var  name="MBWH_cvlx9"   value="-MBWH_cvl10xo-cos(MBWH_CBPL10ti*GENV_PiS180)*MBWH_CBLl9/2." />
+<var  name="MBWH_cvly9"   value=" MBWH_cvl10yo-sin(MBWH_CBPL10ti*GENV_PiS180)*MBWH_CBLl9/2." />
+
+<composition name="MBWH_CrossBracingPlateLargeSectorItem10Rot">
+  <posXYZ volume="MBWH_CrossBracingPlateLargeSectorItem10" rot="0.;90.;0" />
+</composition>
+<composition name="MBWH_CrossBracingBay1LargeSector">
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem10" X_Y_Z="0;0;MBWH_CBL10z" />
+  <posXYZ volume="MBWH_CrossBracingPlateLargeSectorItem10Rot" X_Y_Z="-MBWH_CBPx;MBWH_CBPL10yc;MBWH_CBPL10zc" rot="-MBWH_CBPL10ti;0;0" />
+  <posXYZ volume="MBWH_CrossBracingPlateLargeSectorItem10Rot" X_Y_Z=" MBWH_CBPx;MBWH_CBPL10yc;MBWH_CBPL10zc" rot="-MBWH_CBPL10ti;0;0"/>
+</composition>
+<composition name="MBWH_CroisillonBay1LargeSector">
+  <posXYZ volume="MBWH_CrossBracingBay1LargeSector" X_Y_Z="0;-MBWH_CBPL10yc;-MBWH_CBPL10zc"  />
+</composition>
+<composition name="MBWH_CroisillonBay1LargeSectorRot">
+  <posXYZ volume="MBWH_CroisillonBay1LargeSector" rot="MBWH_CBPL10ti;90;0" />
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem8" X_Y_Z="MBWH_cvlx8;MBWH_cvly8;0" rot="-MBWH_CBPL10ti;90;0" />
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem9" X_Y_Z="MBWH_cvlx9;MBWH_cvly9;0" rot="-MBWH_CBPL10ti;90;0" />
+</composition>
+
+<!-- Bay 2 -->
+<var  name="MBWH_CBL15z" value="MBWH_CBLl15/2." />
+<var  name="MBWH_CBPL15d"  value="MBWH_CBPL15wi-2.*MBWH_CBPL15cu" />
+<var  name="MBWH_CBPL15zb" value="MBWH_CBPL15za+sin(MBWH_CBPL15ti*GENV_PiS180)*MBWH_CBPL15d/2." />
+<var  name="MBWH_CBPL15yb" value="MBWH_CBPL15ya-cos(MBWH_CBPL15ti*GENV_PiS180)*MBWH_CBPL15d/2." />
+<var  name="MBWH_CBPL15zi" value="MBWH_CBPL15zb+cos(MBWH_CBPL15ti*GENV_PiS180)*MBWH_CBPL15le/2" />
+<var  name="MBWH_CBPL15yi" value="MBWH_CBPL15yb+sin(MBWH_CBPL15ti*GENV_PiS180)*MBWH_CBPL15le/2" />
+<var  name="MBWH_CBPL15zc" value="MBWH_CBLl15-MBWH_CBPL15zi" />
+<var  name="MBWH_CBPL15yc" value="MBWH_CBhei-MBWH_CBPL15yi" />
+  <!-- get positions of contreventements 14, 13 using locations of item 15 extremities -->
+<var  name="MBWH_cvl15xo" value="-MBWH_CBPL15zc*cos(MBWH_CBPL15ti*GENV_PiS180)-0.5*(MBWH_CBhei+MBWH_CBPL15ya)*sin(MBWH_CBPL15ti*GENV_PiS180)"/>
+<var  name="MBWH_cvl15yo" value=" MBWH_CBPL15zc*sin(MBWH_CBPL15ti*GENV_PiS180)-0.5*(MBWH_CBhei+MBWH_CBPL15ya)*cos(MBWH_CBPL15ti*GENV_PiS180)"/>
+<var  name="MBWH_cvl15xu" value="MBWH_cvl15xo+MBWH_CBLl15*cos(MBWH_CBPL15ti*GENV_PiS180)" />
+<var  name="MBWH_cvl15yu" value="MBWH_cvl15yo-MBWH_CBLl15*sin(MBWH_CBPL15ti*GENV_PiS180)" />
+<var  name="MBWH_cvlx14"  value="-MBWH_cvl15xu+cos(MBWH_CBPL15ti*GENV_PiS180)*MBWH_CBLl14/2." />
+<var  name="MBWH_cvly14"  value=" MBWH_cvl15yu+sin(MBWH_CBPL15ti*GENV_PiS180)*MBWH_CBLl14/2." />
+<var  name="MBWH_cvlx13"  value="-MBWH_cvl15xo-cos(MBWH_CBPL15ti*GENV_PiS180)*MBWH_CBLl13/2." />
+<var  name="MBWH_cvly13"  value=" MBWH_cvl15yo-sin(MBWH_CBPL15ti*GENV_PiS180)*MBWH_CBLl13/2." />
+
+
+<composition name="MBWH_CrossBracingPlateLargeSectorItem15Rot">
+  <posXYZ volume="MBWH_CrossBracingPlateLargeSectorItem15" rot="0.;90.;0" />
+</composition>
+<composition name="MBWH_CrossBracingBay2LargeSector">
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem15" X_Y_Z="0;0;MBWH_CBL15z" />
+  <posXYZ volume="MBWH_CrossBracingPlateLargeSectorItem15Rot" X_Y_Z="-MBWH_CBPx;MBWH_CBPL15yc;MBWH_CBPL15zc" rot="-MBWH_CBPL15ti;0;0" />
+  <posXYZ volume="MBWH_CrossBracingPlateLargeSectorItem15Rot" X_Y_Z=" MBWH_CBPx;MBWH_CBPL15yc;MBWH_CBPL15zc" rot="-MBWH_CBPL15ti;0;0"/>
+</composition>
+<composition name="MBWH_CroisillonBay2LargeSector">
+  <posXYZ volume="MBWH_CrossBracingBay2LargeSector" X_Y_Z="0;-MBWH_CBPL15yc;-MBWH_CBPL15zc"  />
+</composition>
+<composition name="MBWH_CroisillonBay2LargeSectorRot">
+  <posXYZ volume="MBWH_CroisillonBay2LargeSector" rot="MBWH_CBPL15ti;90;0" />
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem14" X_Y_Z="MBWH_cvlx14;MBWH_cvly14;0" rot="-MBWH_CBPL15ti;90;0" />
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem13" X_Y_Z="MBWH_cvlx13;MBWH_cvly13;0" rot="-MBWH_CBPL15ti;90;0" />
+</composition>
+
+
+<!-- Bay 3 -->
+<var  name="MBWH_CBL21z" value="MBWH_CBLl21/2." />
+<var  name="MBWH_CBPL21d"  value="MBWH_CBPL21wi-2.*MBWH_CBPL21cu" />
+<var  name="MBWH_CBPL21zb" value="MBWH_CBPL21za+sin(MBWH_CBPL21ti*GENV_PiS180)*MBWH_CBPL21d/2." />
+<var  name="MBWH_CBPL21yb" value="MBWH_CBPL21ya-cos(MBWH_CBPL21ti*GENV_PiS180)*MBWH_CBPL21d/2." />
+<var  name="MBWH_CBPL21z" value="MBWH_CBPL21zb+cos(MBWH_CBPL21ti*GENV_PiS180)*MBWH_CBPL21le/2" />
+<var  name="MBWH_CBPL21yi" value="MBWH_CBPL21yb+sin(MBWH_CBPL21ti*GENV_PiS180)*MBWH_CBPL21le/2" />
+<var  name="MBWH_CBPL21zc" value="MBWH_CBLl21-MBWH_CBPL21z" />
+<var  name="MBWH_CBPL21yc" value="MBWH_CBhei-MBWH_CBPL21yi" />
+  <!-- get positions of contreventements 14, 13 using locations of item 21 extremities -->
+<var  name="MBWH_cvl21xo" value="-MBWH_CBPL21zc*cos(MBWH_CBPL21ti*GENV_PiS180)-0.5*(MBWH_CBhei+MBWH_CBPL21ya)*sin(MBWH_CBPL21ti*GENV_PiS180)"/>
+<var  name="MBWH_cvl21yo" value=" MBWH_CBPL21zc*sin(MBWH_CBPL21ti*GENV_PiS180)-0.5*(MBWH_CBhei+MBWH_CBPL21ya)*cos(MBWH_CBPL21ti*GENV_PiS180)"/>
+<var  name="MBWH_cvl21xu" value="MBWH_cvl21xo+MBWH_CBLl21*cos(MBWH_CBPL21ti*GENV_PiS180)" />
+<var  name="MBWH_cvl21yu" value="MBWH_cvl21yo-MBWH_CBLl21*sin(MBWH_CBPL21ti*GENV_PiS180)" />
+<var  name="MBWH_cvlx20"  value="-MBWH_cvl21xu+cos(MBWH_CBPL21ti*GENV_PiS180)*MBWH_CBLl20/2." />
+<var  name="MBWH_cvly20"  value=" MBWH_cvl21yu+sin(MBWH_CBPL21ti*GENV_PiS180)*MBWH_CBLl20/2." />
+<var  name="MBWH_cvlx18"  value="-MBWH_cvl21xo-cos(MBWH_CBPL21ti*GENV_PiS180)*MBWH_CBLl18/2." />
+<var  name="MBWH_cvly18"  value=" MBWH_cvl21yo-sin(MBWH_CBPL21ti*GENV_PiS180)*MBWH_CBLl18/2." />
+
+<composition name="MBWH_CrossBracingPlateLargeSectorItem21Rot">
+  <posXYZ volume="MBWH_CrossBracingPlateLargeSectorItem21" rot="0.;90.;0" />
+</composition>
+<composition name="MBWH_CrossBracingBay3LargeSector">
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem21" X_Y_Z="0;0;MBWH_CBL21z" />
+  <posXYZ volume="MBWH_CrossBracingPlateLargeSectorItem21Rot" X_Y_Z="-MBWH_CBPx;MBWH_CBPL21yc;MBWH_CBPL21zc" rot="-MBWH_CBPL21ti;0;0" />
+  <posXYZ volume="MBWH_CrossBracingPlateLargeSectorItem21Rot" X_Y_Z=" MBWH_CBPx;MBWH_CBPL21yc;MBWH_CBPL21zc" rot="-MBWH_CBPL21ti;0;0"/>
+</composition>
+<composition name="MBWH_CroisillonBay3LargeSector">
+  <posXYZ volume="MBWH_CrossBracingBay3LargeSector" X_Y_Z="0;-MBWH_CBPL21yc;-MBWH_CBPL21zc"  />
+</composition>
+<composition name="MBWH_CroisillonBay3LargeSectorRot">
+  <posXYZ volume="MBWH_CroisillonBay3LargeSector" rot="MBWH_CBPL21ti;90;0" />
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem20" X_Y_Z="MBWH_cvlx20;MBWH_cvly20;0" rot="-MBWH_CBPL21ti;90;0" />
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem18" X_Y_Z="MBWH_cvlx18;MBWH_cvly18;0" rot="-MBWH_CBPL21ti;90;0" />
+</composition>
+
+
+
+<!-- Bay 4 -->
+<var  name="MBWH_CBPL25tii" value="90-MBWH_CBPL25ti" />
+<var  name="MBWH_CBL25z" value="-MBWH_CBLl25/2." />
+<var  name="MBWH_CBPL25d"  value="MBWH_CBPL25wi-2.*MBWH_CBPL25cu" />
+<var  name="MBWH_CBPL25zb" value="-MBWH_CBPL25za-sin(MBWH_CBPL25ti*GENV_PiS180)*MBWH_CBPL25d/2." />
+<var  name="MBWH_CBPL25yb" value="MBWH_CBPL25ya-cos(MBWH_CBPL25ti*GENV_PiS180)*MBWH_CBPL25d/2." />
+<var  name="MBWH_CBPL25zc" value="MBWH_CBPL25zb-cos(MBWH_CBPL25ti*GENV_PiS180)*MBWH_CBPL25le/2" />
+<var  name="MBWH_CBPL25yc" value="MBWH_CBPL25yb+sin(MBWH_CBPL25ti*GENV_PiS180)*MBWH_CBPL25le/2" />
+  <!-- get positions of contreventements 14, 13 using locations of item 25 extremities -->
+<var  name="MBWH_cvl25xo" value="-MBWH_CBPL25zc*cos(MBWH_CBPL25tii*GENV_PiS180)-0.5*(MBWH_CBhei+MBWH_CBPL25ya)*sin(MBWH_CBPL25ti*GENV_PiS180)"/>
+<var  name="MBWH_cvl25yo" value=" MBWH_CBPL25zc*sin(MBWH_CBPL25tii*GENV_PiS180)-0.5*(MBWH_CBhei+MBWH_CBPL25ya)*cos(MBWH_CBPL25ti*GENV_PiS180)"/>
+<var  name="MBWH_cvl25xo" value="-MBWH_CBPL25zc*cos(MBWH_CBPL25tii*GENV_PiS180)-0.5*(MBWH_CBhei)*cos(MBWH_CBPL25ti*GENV_PiS180)"/>
+<var  name="MBWH_cvl25yo" value=" MBWH_CBPL25zc*sin(MBWH_CBPL25tii*GENV_PiS180)-0.5*(MBWH_CBhei)*sin(MBWH_CBPL25ti*GENV_PiS180)"/>
+<var  name="MBWH_cvl25xu" value="MBWH_cvl25xo-MBWH_CBLl25*cos(MBWH_CBPL25tii*GENV_PiS180)" />
+<var  name="MBWH_cvl25yu" value="MBWH_cvl25yo+MBWH_CBLl25*sin(MBWH_CBPL25tii*GENV_PiS180)" />
+<var  name="MBWH_cvlx24"  value="-MBWH_cvl25xo+cos(MBWH_CBPL25tii*GENV_PiS180)*MBWH_CBLl24/2." />
+<var  name="MBWH_cvly24"  value=" MBWH_cvl25yo+sin(MBWH_CBPL25tii*GENV_PiS180)*MBWH_CBLl24/2." />
+<var  name="MBWH_cvlx23"  value="-MBWH_cvl25xu-cos(MBWH_CBPL25tii*GENV_PiS180)*MBWH_CBLl23/2." />
+<var  name="MBWH_cvly23"  value=" MBWH_cvl25yu-sin(MBWH_CBPL25tii*GENV_PiS180)*MBWH_CBLl23/2." />
+
+<composition name="MBWH_CrossBracingPlateLargeSectorItem25Rot">
+  <posXYZ volume="MBWH_CrossBracingPlateLargeSectorItem25" rot="0.;90.;0" />
+</composition>
+<composition name="MBWH_CrossBracingBay4LargeSector">
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem25" X_Y_Z="0;0;MBWH_CBL25z" />
+  <posXYZ volume="MBWH_CrossBracingPlateLargeSectorItem25Rot" X_Y_Z="-MBWH_CBPx;MBWH_CBPL25yc;MBWH_CBPL25zc" rot="MBWH_CBPL25ti;0;0" />
+  <posXYZ volume="MBWH_CrossBracingPlateLargeSectorItem25Rot" X_Y_Z=" MBWH_CBPx;MBWH_CBPL25yc;MBWH_CBPL25zc" rot="MBWH_CBPL25ti;0;0"/>
+</composition>
+<composition name="MBWH_CroisillonBay4LargeSector">
+  <posXYZ volume="MBWH_CrossBracingBay4LargeSector" X_Y_Z="0;-MBWH_CBPL25yc;-MBWH_CBPL25zc"  />
+</composition>
+<composition name="MBWH_CroisillonBay4LargeSectorRot">
+  <posXYZ volume="MBWH_CroisillonBay4LargeSector" rot="90-MBWH_CBPL25ti;90;0" />
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem24" X_Y_Z="MBWH_cvlx24;MBWH_cvly24;0" rot="MBWH_CBPL25ti-90;90;0" />
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem23" X_Y_Z="MBWH_cvlx23;MBWH_cvly23;0" rot="MBWH_CBPL25ti-90;90;0" />
+</composition>
+
+
+
+<!--  Inner and Outer spoke large sector -->
+
+<gvxysx name="MBWH_SpokeLargeSectorUprofile" material="Aluminium1" dZ="MBWH_SlsUPlen">
+  <gvxy_point X_Y="MBWH_SUPxa;MBWH_SUPya"/>
+  <gvxy_point X_Y="MBWH_SUPxb;MBWH_SUPyb"/>
+  <gvxy_point X_Y="MBWH_SUPxc;MBWH_SUPyc"/>
+  <gvxy_point X_Y="MBWH_SUPxd;MBWH_SUPyd"/>
+</gvxysx>
+
+<!--  Derived variables -->
+<!--  positions of reinforcing bars -->
+<var name="MBWH_SlsRBpz1" value="MBWH_SlsUPlen/2.-MBWH_SlsRBdz1-MBWH_SRBhos/2."/>
+<var name="MBWH_SlsRBpz2" value="MBWH_SlsRBpz1-MBWH_SlsRBdz2"/>
+<var name="MBWH_SlsRBpz3" value="MBWH_SlsRBpz2-MBWH_SlsRBdz3"/>
+<var name="MBWH_SlsRBpz4" value="MBWH_SlsRBpz3-MBWH_SlsRBdz4"/>
+
+<!--  Relative positions of spokes -->
+<var  name="MBWH_SlsIxpos"  value="MBWH_SRBpx+MBWH_SUPext/2.+MBWH_RBBthi+MBWH_RBSthi/2." />
+<var  name="MBWH_SlsIypos"  value="-MBWH_RBSlen+MBWH_RBBsiz" />
+<var  name="MBWH_SlsIzpos"  value="-MBWH_SlsIypos*tan(MBWH_SLangle*GENV_PiS180)" />
+
+
+<!--  Transversal beam, central support -->
+<!--  Derived variables -->
+<var  name="MBWH_TBCSxa" value="MBWH_TBCSlen1/2." />
+<var  name="MBWH_TBCSya" value="0." />
+<var  name="MBWH_TBCSxc" value="MBWH_TBCSlen2/2.-MBWH_TBCSext" />
+<var  name="MBWH_TBCSyc" value="MBWH_TBCShei" />
+<var  name="MBWH_TBCSxb" value="MBWH_TBCSlen2/2." />
+<var  name="MBWH_TBCSyb" value="MBWH_TBCSyc-MBWH_TBCSext*tan(MBWH_TBCSang1*GENV_PiS180)" />
+
+<var  name="MBWH_TBCSxa1" value="MBWH_TBCSxa-MBWH_TBCSoffs/cos(MBWH_TBCSang1*GENV_PiS180)" />
+<var  name="MBWH_TBCSya1" value="0." />
+<var  name="MBWH_TBCSxb1" value="MBWH_TBCSxa1+MBWH_TBCShei*tan(MBWH_TBCSang2*GENV_PiS180)" />
+<var  name="MBWH_TBCSyb1" value="MBWH_TBCShei" />
+
+<var  name="MBWH_TBCSxoff" value="(MBWH_TBCSthi1+MBWH_TBCSthi2)/2." />
+
+<!--  Transversal beam, central support Position -->
+<var  name="MBWH_TBCSypos" value="MBWH_Slsypos-(.5*MBWH_SlsUPlen)*cos(MBWH_SLangle*GENV_PiS180)-MBWH_TBCShei"/>
+<var  name="MBWH_TBCSzpos" value="-MBWH_SlsIzpos/2.-MBWH_TBCSxoff"/>
+<!--  Connection beam / extremity plate position relative to Transversal beam, central support -->
+<var  name="MBWH_CBEPxpos" value="MBWH_TBCSxa1+MBWH_CBEPyb*cos(MBWH_CBEPa1*GENV_PiS180)+(MBWH_CBEPyc-MBWH_CBEPyb)/cos(MBWH_CBEPa1*GENV_PiS180)"/>
+<var  name="MBWH_CBEPypos" value="-MBWH_CBEPyb*sin(MBWH_CBEPa1*GENV_PiS180)-GENV_Eps"/>
+<var  name="MBWH_CBEPzpos" value="MBWH_TBCSthi1/2+MBWH_CBEPthic/2+GENV_Eps"/>
+<!--  extremity plate position relative to Transversal beam, central support -->
+<var  name="MBWH_EPxpos" value="MBWH_CBEPxpos+MBWH_EPl1*sin(MBWH_CBEPa1*GENV_PiS180)-0.5*MBWH_EPthic*cos(MBWH_CBEPa1*GENV_PiS180)"/>
+<var  name="MBWH_EPypos" value="MBWH_CBEPypos+MBWH_EPl1*cos(MBWH_CBEPa1*GENV_PiS180)+0.5*MBWH_EPthic*sin(MBWH_CBEPa1*GENV_PiS180)"/>
+<var  name="MBWH_EPzpos" value="MBWH_CBEPzpos-MBWH_CBEPthic/2"/>
+<!--  Reinforcing Bar relative to extremity plate position -->
+<var  name="MBWH_RBxpos" value="MBWH_EPxpos+MBWH_CRBxoff"/>
+<var  name="MBWH_RBypos" value="MBWH_EPypos+MBWH_CRByoff"/>
+<var  name="MBWH_RBzpos" value="MBWH_EPzpos+MBWH_CRBzoff"/>
+
+
+<gvxysx name="MBWH_TransvBeamCSupLargeSect1" material="Aluminium1" dZ="MBWH_TBCSthi1">
+  <gvxy_point X_Y="MBWH_TBCSxa;MBWH_TBCSya"/>
+  <gvxy_point X_Y="MBWH_TBCSxb;MBWH_TBCSyb"/>
+  <gvxy_point X_Y="MBWH_TBCSxc;MBWH_TBCSyc"/>
+</gvxysx>
+<gvxysx name="MBWH_TransvBeamCSupLargeSect2" material="Aluminium1" dZ="MBWH_TBCSthi2">
+  <gvxy_point X_Y="MBWH_TBCSxa1;MBWH_TBCSya1"/>
+  <gvxy_point X_Y="MBWH_TBCSxb1;MBWH_TBCSyb1"/>
+</gvxysx>
+
+<composition name="MBWH_TransvBeamCSupLargeSect">
+  <posXYZ volume="MBWH_TransvBeamCSupLargeSect1" />
+  <posXYZ volume="MBWH_TransvBeamCSupLargeSect2" X_Y_Z="0;0;MBWH_TBCSxoff"/>
+</composition>
+
+
+<composition name="MBWH_SpokesLargeSectorAssembly1">
+  <posXYZ volume="MBWH_SpokeLargeSectorUprofile"/>
+  <posXYZ volume="MBWH_ReinforcingBar" X_Y_Z=" MBWH_SRBpx;MBWH_SRBpy;MBWH_SlsRBpz1" rot="0.;0.;90."/>
+  <posXYZ volume="MBWH_ReinforcingBar" X_Y_Z=" MBWH_SRBpx;MBWH_SRBpy;MBWH_SlsRBpz2" rot="0.;0.;90."/>
+  <posXYZ volume="MBWH_ReinforcingBar" X_Y_Z=" MBWH_SRBpx;MBWH_SRBpy;MBWH_SlsRBpz3" rot="0.;0.;90."/>
+  <posXYZ volume="MBWH_ReinforcingBar" X_Y_Z=" MBWH_SRBpx;MBWH_SRBpy;MBWH_SlsRBpz4" rot="0.;0.;90."/>
+  <posXYZ volume="MBWH_SpokeLargeSectorUprofile"  X_Y_Z=" MBWH_SlsIxpos;MBWH_SlsIypos;MBWH_SlsIzpos"/>
+</composition>
+
+<composition name="MBWH_SpokesLargeSectorAssembly2">
+  <posXYZ volume="MBWH_SpokeLargeSectorUprofile"/>
+  <posXYZ volume="MBWH_ReinforcingBar" X_Y_Z=" MBWH_SRBpx;MBWH_SRBpy;-MBWH_SlsRBpz1" rot="0.;0.;90."/>
+  <posXYZ volume="MBWH_ReinforcingBar" X_Y_Z=" MBWH_SRBpx;MBWH_SRBpy;-MBWH_SlsRBpz2" rot="0.;0.;90."/>
+  <posXYZ volume="MBWH_ReinforcingBar" X_Y_Z=" MBWH_SRBpx;MBWH_SRBpy;-MBWH_SlsRBpz3" rot="0.;0.;90."/>
+  <posXYZ volume="MBWH_ReinforcingBar" X_Y_Z=" MBWH_SRBpx;MBWH_SRBpy;-MBWH_SlsRBpz4" rot="0.;0.;90."/>
+  <posXYZ volume="MBWH_SpokeLargeSectorUprofile"  X_Y_Z=" MBWH_SlsIxpos;MBWH_SlsIypos;-MBWH_SlsIzpos"/>
+</composition>
+
+
+<composition name="MBWH_SpokesLargeSectorAssemblyTemp1">
+  <posXYZ volume="MBWH_SpokesLargeSectorAssembly1" X_Y_Z="MBWH_SlsIxref;MBWH_Slsypos;0" rot="0.; 90.;90-MBWH_SLangle" />
+</composition>
+
+<composition name="MBWH_SpokesLargeSectorAssemblyTemp2">
+  <posXYZ volume="MBWH_SpokesLargeSectorAssembly2" X_Y_Z="-MBWH_SlsIxref;MBWH_Slsypos;0" rot="180.; 90.;90+MBWH_SLangle" />
+</composition>
+
+<composition name="MBWH_InnerAssemblyTemp1">
+  <posXYZ volume="MBWH_ConnectionBeamExtremityPlate" X_Y_Z="MBWH_CBEPxpos;MBWH_CBEPypos;MBWH_CBEPzpos" rot="0;0;90-MBWH_CBEPa1"  />
+  <posXYZ volume="MBWH_ExtremityPlate" X_Y_Z="MBWH_EPxpos;MBWH_EPypos;MBWH_EPzpos" rot="-90.; 0.;-90-MBWH_CBEPa1"  />
+  <posXYZ volume="MBWH_CentralReinforcingbar" X_Y_Z="MBWH_RBxpos;MBWH_RBypos;MBWH_RBzpos" rot="180.; 0.;-90-MBWH_CBEPa1"  />
+</composition>
+
+<composition name="MBWH_InnerAssemblyTemp2">
+  <posXYZ volume="MBWH_ConnectionBeamExtremityPlate" X_Y_Z="-MBWH_CBEPxpos;MBWH_CBEPypos;MBWH_CBEPzpos" rot="180;0;90+MBWH_CBEPa1"  />
+  <posXYZ volume="MBWH_ExtremityPlate" X_Y_Z="-MBWH_EPxpos;MBWH_EPypos;MBWH_EPzpos" rot="-90.; 0.;-90+MBWH_CBEPa1"  />
+  <posXYZ volume="MBWH_CentralReinforcingbar" X_Y_Z="-MBWH_RBxpos;MBWH_RBypos;MBWH_RBzpos" rot="0.; 0.;-90+MBWH_CBEPa1"  />
+</composition>
+
+<composition name="MBWH_InnerAssembly">
+  <posXYZ volume="MBWH_TransvBeamCSupLargeSect" X_Y_Z="0;0;0"  />
+  <posXYZ volume="MBWH_InnerAssemblyTemp1"  />
+  <posXYZ volume="MBWH_InnerAssemblyTemp2"  />
+</composition>
+
+
+
+<composition name="MBWH_LargeSector">
+  <posXYZ volume="MBWH_SpokesLargeSectorAssemblyTemp1" />
+  <posXYZ volume="MBWH_SpokesLargeSectorAssemblyTemp2" /> 
+  <posXYZ volume="MBWH_InnerAssembly" X_Y_Z="0;MBWH_TBCSypos;MBWH_TBCSzpos"/> 
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem11" X_Y_Z=" 0.;MBWH_CBLy11;0" rot="0.;90.;0."/>
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem17" X_Y_Z=" 0.;MBWH_CBLy17;0" rot="0.;90.;0."/>
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem22" X_Y_Z=" 0.;MBWH_CBLy22;0" rot="0.;90.;0."/>
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem26" X_Y_Z=" 0.;MBWH_CBLy26;0" rot="0.;90.;0."/>
+  
+  <posXYZ volume="MBWH_CroisillonBay1LargeSectorRot" X_Y_Z=" 0.;MBWH_Croily10;0" rot="0.;0.;0."/>
+  <posXYZ volume="MBWH_CroisillonBay2LargeSectorRot" X_Y_Z=" 0.;MBWH_Croily15;0" rot="0.;0.;0."/>
+  <posXYZ volume="MBWH_CroisillonBay3LargeSectorRot" X_Y_Z=" 0.;MBWH_Croily21;0" rot="0.;0.;0."/>
+  <posXYZ volume="MBWH_CroisillonBay4LargeSectorRot" X_Y_Z=" 0.;MBWH_Croily25+20;0" rot="0.;0.;0."/>
+</composition>
+
+
+
+<!--  
+      **************************************************************
+      ***                                                       ****
+      ***                      Small Sector                     ****
+      ***                                                       ****
+      **************************************************************
+-->
+
+<!--  ATLMHHBM0100 -->
+<!--  Cut profiles Cross Bracing small sector -->
+<var  name="MBWH_CBSthi" value="6"/>
+
+<!--  Contreventements lengths -->
+<!--  item numbering in ATLMHHBM0003 -->
+<var  name="MBWH_CBSl10"  value="1650" />  <!-- item 10 -->
+<var  name="MBWH_CBSl14"  value="1050" />  <!-- item 14 -->
+<var  name="MBWH_CBSl18a" value="533" />   <!-- item 18 -->
+<var  name="MBWH_CBSl18b" value="510" />   <!-- item 18 -->
+
+<!--  Contreventements positions (...to be confirmed...) -->
+<var  name="MBWH_CBSy10"  value="9730" />  <!-- item 10 -->
+<var  name="MBWH_CBSy14"  value="7760" />  <!-- item 14 -->
+<var  name="MBWH_CBSy18"  value="5820" />  <!-- item 18 -->
+
+<!--  item numbering in ATLMHHBM0003 -->
+<!--  Cross bracing, bay 1 small sector -->
+<var  name="MBWH_CBSl9"   value="2625"/>  <!-- item  9 --> <!-- drawing ATLMHHBM0047 -->
+<!--  Cross bracing, bay 2 small sector -->
+<var  name="MBWH_CBSl11"  value="2360"/>  <!-- item 11 --> <!-- drawing ATLMHHBM0049 -->
+<!--  Cross bracing, bay 3 small sector -->
+<var  name="MBWH_CBSl15"  value="2025"/>  <!-- item 15 --> <!-- drawing ATLMHHBM0052 -->
+
+<!--  item numbering in ATLMHHBM0003 -->
+<!--  Contreventements, bay 1 small sector -->
+<var  name="MBWH_CBSl7"   value="1430"/>  <!--  item  7 --> <!-- drawing ATLMHHBM0100 -->
+<var  name="MBWH_CBSl8"   value="1120"/>  <!--  item  8 --> <!-- drawing ATLMHHBM0100 -->
+<var  name="MBWH_CBSb1xof" value="6"/>  <!--  x offset item  7 & 8 , to be confirmed - see drawing ATLMHHBM0003 -->
+<var  name="MBWH_CBSb1yof" value="2"/>  <!--  y offset item  7 & 8 , to be confirmed - see drawing ATLMHHBM0003 -->
+
+<!--  Contreventements, bay 2 small sector -->
+<var  name="MBWH_CBSl12"  value="1360"/>  <!--  item 12 --> <!-- drawing ATLMHHBM0100 -->
+<var  name="MBWH_CBSl13"  value="890"/>   <!--  item 13 --> <!-- drawing ATLMHHBM0100 -->
+
+<!--  Contreventements, bay 3 small sector -->
+<var  name="MBWH_CBSl16"  value="1260"/>  <!--  item 16 --> <!-- drawing ATLMHHBM0100 -->
+<var  name="MBWH_CBSl17"  value="600"/>   <!--  item 17 --> <!-- drawing ATLMHHBM0100 -->
+<var  name="MBWH_CBSb3xof" value="8"/>  <!--  x offset item 16 & 17, to be confirmed - see drawing ATLMHHBM0003 -->
+<var  name="MBWH_CBSb3yof" value="2"/>  <!--  y offset item 16 & 17, to be confirmed - see drawing ATLMHHBM0003 -->
+
+<!--  Plates --> 
+ <!--  item 9 for Bay 1 --> <!--  drawing ATLMHHBM0057 -->
+<var  name="MBWH_CBPS9le" value="300"/>    <!-- length -->
+<var  name="MBWH_CBPS9wi" value="270"/>    <!-- width -->
+<var  name="MBWH_CBPS9cu" value="60"/>     <!-- cut -->
+<var  name="MBWH_CBPS9ti" value="41.2"/>   <!-- tilt -->       <!-- ????????????? -->
+<var  name="MBWH_CBPS9za" value="1311"/>   <!-- Plate offset -->
+<var  name="MBWH_CBPS9ya" value="-13.3"/>   <!-- Plate offset -->
+ <!--  item 11 for Bay 2 --> <!--  drawing ATLMHHBM0049 -->
+<var  name="MBWH_CBPS11le" value="260"/>   <!-- length -->
+<var  name="MBWH_CBPS11wi" value="300"/>   <!-- width -->
+<var  name="MBWH_CBPS11cu" value="20"/>    <!-- cut -->
+<var  name="MBWH_CBPS11ti" value="52.9"/>  <!-- tilt -->       <!-- ????????????? -->
+<var  name="MBWH_CBPS11za" value="764.9"/> <!-- Plate offset -->
+<var  name="MBWH_CBPS11ya" value="32.1"/>  <!-- Plate offset w.r.t base -->
+ <!--  item 15 for Bay 3 --> <!--  drawing ATLMHHBM0052 -->
+<var  name="MBWH_CBPS15le" value="200"/>   <!-- length -->
+<var  name="MBWH_CBPS15wi" value="380"/>   <!-- width -->
+<var  name="MBWH_CBPS15cu" value="20"/>    <!-- cut -->
+<var  name="MBWH_CBPS15ti" value="65.5"/>  <!-- tilt -->       <!-- ????????????? -->
+<var  name="MBWH_CBPS15za" value="473.8"/> <!-- Plate offset -->
+<var  name="MBWH_CBPS15ya" value="26"/>    <!-- Plate offset -->
+
+<!--  positions (... measured on ATLMHHBM003 ... to be confirmed ...) -->
+<var  name="MBWH_Croisy9" value="10550"/> <!--  item 9 --> 
+<var  name="MBWH_Croisy11" value="8580"/>  <!--  item 11 --> 
+<var  name="MBWH_Croisy15" value="6520"/>  <!--  item 15 --> 
+
+<!--  Special Cut profiles cross bracing small sector item 18-->
+<!--  ATLMHHBM0067-->
+<var  name="MBWH_CBext18" value="138"/>
+<var  name="MBWH_CBhei18" value="35"/>
+<var  name="MBWH_CBSthi18" value="5"/>
+
+
+<!--  ATLMHHBM0003B -->
+<!--  Spokes Opening angle small sector -->
+<var  name="MBWH_SSangle" value="8.5"/>
+<!--  Y-ref -->
+<var  name="MBWH_yref"   value="1682.7"/>
+<!--  Inner spoke y position wrt ref -->
+<var  name="MBWH_SIypos" value="2252.8"/>
+<!--  External spoke y position wrt ref -->
+<var  name="MBWH_SEypos" value="280.7"/>
+
+<!--  Spoke small sector -->
+<!--  Inner spoke small sector  ATLMHHBM0085 -->
+<!--  External spoke small sector  ATLMHHBM0086 & ATLMHHBM0087 -->
+
+<!--  ATLMHHBM0085 ... --> 
+<!--  U profile length Inner spoke -->
+<var  name="MBWH_SsiUPlen"  value="7680"/>   
+<!--  U profile length External spoke -->
+<var  name="MBWH_SseUPlen"  value="9530"/>   
+<!--  U profile Inner spoke extremity cut height -->
+<var  name="MBWH_SsiUPhcu"  value="12"/>   
+
+
+<!--  ATLMHHBM0085 -->
+<!--  relative positions of reinforcing bars -->
+<var name="MBWH_SssRBdz1" value="2575"/>
+<var name="MBWH_SssRBdz2" value="2055"/>
+<var name="MBWH_SssRBdz3" value="2250"/>
+
+<!--  Spoke Reinforcing Bar 1 and 2 -->
+<var name="MBWH_SRBthi" value="25"/>
+
+<!--  ATLMHHBM0054 -->
+<!--  Spoke Reinforcing Bar 1 -->
+<var name="MBWH_SRB1dx1" value="962"/>
+<var name="MBWH_SRB1dx2" value="1765"/>
+<var name="MBWH_SRB1dx3" value="81"/>
+<var name="MBWH_SRB1dx4" value="1712"/>
+<var name="MBWH_SRB1dy1" value="150"/>
+<var name="MBWH_SRB1dy2" value="440"/>
+<var name="MBWH_SRB1dy3" value="180"/>
+<var name="MBWH_SRB1alph" value="39"/>
+<var name="MBWH_SRB1ypos" value="2910"/>
+
+<!--  ATLMHHBM0058 -->
+<!--  Spoke Reinforcing Bar 2 -->
+<var name="MBWH_SRB2dx1" value="2474"/>
+<var name="MBWH_SRB2dx2" value="2429"/>
+<var name="MBWH_SRB2dy"  value="152"/>
+<var name="MBWH_SRB2ypos" value="5020"/>
+
+
+<!--  Cut profiles cross bracing small sector -->
+<!--  Derived variables -->
+<var  name="MBWH_CBSxa"  value="MBWH_CBext/2." />
+<var  name="MBWH_CBSya"  value="0." />
+<var  name="MBWH_CBSxb"  value="MBWH_CBSxa" />
+<var  name="MBWH_CBSyb"  value="MBWH_CBhei" />
+<var  name="MBWH_CBSxc"  value="MBWH_CBSxb-MBWH_CBSthi" />
+<var  name="MBWH_CBSyc"  value="MBWH_CBSyb" />
+<var  name="MBWH_CBSxd"  value="MBWH_CBSxc" />
+<var  name="MBWH_CBSyd"  value="MBWH_CBSthi" />
+<!--  Derived variables for special item 18 -->
+<var  name="MBWH_CBS18xa"  value="MBWH_CBext18/2." />
+<var  name="MBWH_CBS18ya"  value="0." />
+<var  name="MBWH_CBS18xb"  value="MBWH_CBS18xa" />
+<var  name="MBWH_CBS18yb"  value="MBWH_CBhei18" />
+<var  name="MBWH_CBS18xc"  value="MBWH_CBS18xb-MBWH_CBSthi18" />
+<var  name="MBWH_CBS18yc"  value="MBWH_CBS18yb" />
+<var  name="MBWH_CBS18xd"  value="MBWH_CBS18xc" />
+<var  name="MBWH_CBS18yd"  value="MBWH_CBSthi18" />
+
+<var  name="MBWH_CBSy18b"  value="MBWH_CBSy18-MBWH_CBhei18" />
+
+<!--  Modelization -->
+
+<gvxysx name="MBWH_CutProfilesCrossBracingSmallSectorItem10" material="Aluminium1" dZ="MBWH_CBSl10">
+  <gvxy_point X_Y="MBWH_CBSxa;MBWH_CBSya"/>
+  <gvxy_point X_Y="MBWH_CBSxb;MBWH_CBSyb"/>
+  <gvxy_point X_Y="MBWH_CBSxc;MBWH_CBSyc"/>
+  <gvxy_point X_Y="MBWH_CBSxd;MBWH_CBSyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingSmallSectorItem14" material="Aluminium1" dZ="MBWH_CBSl14">
+  <gvxy_point X_Y="MBWH_CBSxa;MBWH_CBSya"/>
+  <gvxy_point X_Y="MBWH_CBSxb;MBWH_CBSyb"/>
+  <gvxy_point X_Y="MBWH_CBSxc;MBWH_CBSyc"/>
+  <gvxy_point X_Y="MBWH_CBSxd;MBWH_CBSyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingSmallSectorItem18a" material="Aluminium1" dZ="MBWH_CBSl18a">
+  <gvxy_point X_Y="MBWH_CBSxa;MBWH_CBSya"/>
+  <gvxy_point X_Y="MBWH_CBSxb;MBWH_CBSyb"/>
+  <gvxy_point X_Y="MBWH_CBSxc;MBWH_CBSyc"/>
+  <gvxy_point X_Y="MBWH_CBSxd;MBWH_CBSyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingSmallSectorItem18b" material="Aluminium1" dZ="MBWH_CBSl18b">
+  <gvxy_point X_Y="MBWH_CBS18xa;MBWH_CBS18ya"/>
+  <gvxy_point X_Y="MBWH_CBS18xb;MBWH_CBS18yb"/>
+  <gvxy_point X_Y="MBWH_CBS18xc;MBWH_CBS18yc"/>
+  <gvxy_point X_Y="MBWH_CBS18xd;MBWH_CBS18yd"/>
+</gvxysx>
+
+<gvxysx name="MBWH_CutProfilesCrossBracingSmallSectorItem9" material="Aluminium1" dZ="MBWH_CBSl9">
+  <gvxy_point X_Y="MBWH_CBSxa;MBWH_CBSya"/>
+  <gvxy_point X_Y="MBWH_CBSxb;MBWH_CBSyb"/>
+  <gvxy_point X_Y="MBWH_CBSxc;MBWH_CBSyc"/>
+  <gvxy_point X_Y="MBWH_CBSxd;MBWH_CBSyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingSmallSectorItem11" material="Aluminium1" dZ="MBWH_CBSl11">
+  <gvxy_point X_Y="MBWH_CBSxa;MBWH_CBSya"/>
+  <gvxy_point X_Y="MBWH_CBSxb;MBWH_CBSyb"/>
+  <gvxy_point X_Y="MBWH_CBSxc;MBWH_CBSyc"/>
+  <gvxy_point X_Y="MBWH_CBSxd;MBWH_CBSyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingSmallSectorItem15" material="Aluminium1" dZ="MBWH_CBSl15">
+  <gvxy_point X_Y="MBWH_CBSxa;MBWH_CBSya"/>
+  <gvxy_point X_Y="MBWH_CBSxb;MBWH_CBSyb"/>
+  <gvxy_point X_Y="MBWH_CBSxc;MBWH_CBSyc"/>
+  <gvxy_point X_Y="MBWH_CBSxd;MBWH_CBSyd"/>
+</gvxysx>
+
+
+<!--  Contreventements, bay 1 small sector -->
+<gvxysx name="MBWH_CutProfilesCrossBracingSmallSectorItem7" material="Aluminium1" dZ="MBWH_CBSl7">
+  <gvxy_point X_Y="MBWH_CBSxa;MBWH_CBSya"/>
+  <gvxy_point X_Y="MBWH_CBSxb;MBWH_CBSyb"/>
+  <gvxy_point X_Y="MBWH_CBSxc;MBWH_CBSyc"/>
+  <gvxy_point X_Y="MBWH_CBSxd;MBWH_CBSyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingSmallSectorItem8" material="Aluminium1" dZ="MBWH_CBSl8">
+  <gvxy_point X_Y="MBWH_CBSxa;MBWH_CBSya"/>
+  <gvxy_point X_Y="MBWH_CBSxb;MBWH_CBSyb"/>
+  <gvxy_point X_Y="MBWH_CBSxc;MBWH_CBSyc"/>
+  <gvxy_point X_Y="MBWH_CBSxd;MBWH_CBSyd"/>
+</gvxysx>
+
+<!--  Contreventements, bay 2 small sector -->
+<gvxysx name="MBWH_CutProfilesCrossBracingSmallSectorItem12" material="Aluminium1" dZ="MBWH_CBSl12">
+  <gvxy_point X_Y="MBWH_CBSxa;MBWH_CBSya"/>
+  <gvxy_point X_Y="MBWH_CBSxb;MBWH_CBSyb"/>
+  <gvxy_point X_Y="MBWH_CBSxc;MBWH_CBSyc"/>
+  <gvxy_point X_Y="MBWH_CBSxd;MBWH_CBSyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingSmallSectorItem13" material="Aluminium1" dZ="MBWH_CBSl13">
+  <gvxy_point X_Y="MBWH_CBSxa;MBWH_CBSya"/>
+  <gvxy_point X_Y="MBWH_CBSxb;MBWH_CBSyb"/>
+  <gvxy_point X_Y="MBWH_CBSxc;MBWH_CBSyc"/>
+  <gvxy_point X_Y="MBWH_CBSxd;MBWH_CBSyd"/>
+</gvxysx>
+
+<!--  Contreventements, bay 3 small sector -->
+<gvxysx name="MBWH_CutProfilesCrossBracingSmallSectorItem16" material="Aluminium1" dZ="MBWH_CBSl16">
+  <gvxy_point X_Y="MBWH_CBSxa;MBWH_CBSya"/>
+  <gvxy_point X_Y="MBWH_CBSxb;MBWH_CBSyb"/>
+  <gvxy_point X_Y="MBWH_CBSxc;MBWH_CBSyc"/>
+  <gvxy_point X_Y="MBWH_CBSxd;MBWH_CBSyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingSmallSectorItem17" material="Aluminium1" dZ="MBWH_CBSl17">
+  <gvxy_point X_Y="MBWH_CBSxa;MBWH_CBSya"/>
+  <gvxy_point X_Y="MBWH_CBSxb;MBWH_CBSyb"/>
+  <gvxy_point X_Y="MBWH_CBSxc;MBWH_CBSyc"/>
+  <gvxy_point X_Y="MBWH_CBSxd;MBWH_CBSyd"/>
+</gvxysx>
+
+
+
+<!--  cross bracing Plates small sector -->
+
+<!--  Bay 1 -->
+<var  name="MBWH_CBPS9x1"  value="MBWH_CBPS9le/2." />
+<var  name="MBWH_CBPS9y1"  value="MBWH_CBPS9wi/2.-MBWH_CBPS9cu" />
+<var  name="MBWH_CBPS9x2"  value="MBWH_CBPS9x1-MBWH_CBPS9cu" />
+<var  name="MBWH_CBPS9y2"  value="MBWH_CBPS9wi/2." />
+<gvxysxy name="MBWH_CrossBracingPlateSmallSectorItem9" material="Aluminium1" dZ="MBWH_CBPth">
+  <gvxy_point X_Y="MBWH_CBPS9x1;MBWH_CBPS9y1"/>
+  <gvxy_point X_Y="MBWH_CBPS9x2;MBWH_CBPS9y2"/>
+</gvxysxy>
+
+<!--  Bay 2 -->
+<var  name="MBWH_CBPS11x1"  value="MBWH_CBPS11le/2." />
+<var  name="MBWH_CBPS11y1"  value="MBWH_CBPS11wi/2.-MBWH_CBPS11cu" />
+<var  name="MBWH_CBPS11x2"  value="MBWH_CBPS11x1-MBWH_CBPS11cu" />
+<var  name="MBWH_CBPS11y2"  value="MBWH_CBPS11wi/2." />
+<gvxysxy name="MBWH_CrossBracingPlateSmallSectorItem11" material="Aluminium1" dZ="MBWH_CBPth">
+  <gvxy_point X_Y="MBWH_CBPS11x1;MBWH_CBPS11y1"/>
+  <gvxy_point X_Y="MBWH_CBPS11x2;MBWH_CBPS11y2"/>
+</gvxysxy>
+
+<!--  Bay 3 -->
+<var  name="MBWH_CBPS15x1"  value="MBWH_CBPS15le/2." />
+<var  name="MBWH_CBPS15y1"  value="MBWH_CBPS15wi/2.-MBWH_CBPS15cu" />
+<var  name="MBWH_CBPS15x2"  value="MBWH_CBPS15x1-MBWH_CBPS15cu" />
+<var  name="MBWH_CBPS15y2"  value="MBWH_CBPS15wi/2." />
+<gvxysxy name="MBWH_CrossBracingPlateSmallSectorItem15" material="Aluminium1" dZ="MBWH_CBPth">
+  <gvxy_point X_Y="MBWH_CBPS15x1;MBWH_CBPS15y1"/>
+  <gvxy_point X_Y="MBWH_CBPS15x2;MBWH_CBPS15y2"/>
+</gvxysxy>
+
+
+<!-- Bay 1 -->
+<var  name="MBWH_CBS9z" value="MBWH_CBSl9/2." />
+<var  name="MBWH_CBPS9d"  value="MBWH_CBPS9wi-2.*MBWH_CBPS9cu" />
+<var  name="MBWH_CBPS9zb" value="MBWH_CBPS9za+sin(MBWH_CBPS9ti*GENV_PiS180)*MBWH_CBPS9d/2." />
+<var  name="MBWH_CBPS9ya" value="MBWH_CBPS9cu*sqrt(2.)*cos((45-MBWH_CBPS9ti)*GENV_PiS180)  -MBWH_CBhei+MBWH_CBPS9ya" />
+<var  name="MBWH_CBPS9yb" value="-MBWH_CBPS9ya-cos(MBWH_CBPS9ti*GENV_PiS180)*MBWH_CBPS9d/2." />
+<var  name="MBWH_CBPS9zc" value="MBWH_CBPS9zb+cos(MBWH_CBPS9ti*GENV_PiS180)*MBWH_CBPS9le/2" />
+<var  name="MBWH_CBPS9yc" value="MBWH_CBPS9yb+sin(MBWH_CBPS9ti*GENV_PiS180)*MBWH_CBPS9le/2" />
+  <!-- get positions of contreventements 7,8 using locations of item 9 extremities -->
+<var  name="MBWH_cvs9xo" value="-MBWH_CBPS9zc*cos(MBWH_CBPS9ti*GENV_PiS180)-0.5*(MBWH_CBhei)*sin(MBWH_CBPS9ti*GENV_PiS180)" />
+<var  name="MBWH_cvs9yo" value=" MBWH_CBPS9zc*sin(MBWH_CBPS9ti*GENV_PiS180)-0.5*(MBWH_CBhei)*cos(MBWH_CBPS9ti*GENV_PiS180)" />
+<var  name="MBWH_cvs9xu" value="MBWH_cvs9xo+MBWH_CBSl9*cos(MBWH_CBPS9ti*GENV_PiS180)" />
+<var  name="MBWH_cvs9yu" value="MBWH_cvs9yo-MBWH_CBSl9*sin(MBWH_CBPS9ti*GENV_PiS180)" />
+<var  name="MBWH_cvsx8"   value="-MBWH_cvs9xu+cos(MBWH_CBPS9ti*GENV_PiS180)*MBWH_CBSl8/2.-MBWH_CBSb1xof" />
+<var  name="MBWH_cvsy8"   value=" MBWH_cvs9yu+sin(MBWH_CBPS9ti*GENV_PiS180)*MBWH_CBSl8/2.-MBWH_CBSb1yof" />
+<var  name="MBWH_cvsx7"   value="-MBWH_cvs9xo-cos(MBWH_CBPS9ti*GENV_PiS180)*MBWH_CBSl7/2.-MBWH_CBSb1xof" />
+<var  name="MBWH_cvsy7"   value=" MBWH_cvs9yo-sin(MBWH_CBPS9ti*GENV_PiS180)*MBWH_CBSl7/2.-MBWH_CBSb1yof" />
+
+<composition name="MBWH_CrossBracingPlateSmallSectorItem9Rot">
+  <posXYZ volume="MBWH_CrossBracingPlateSmallSectorItem9" rot="0.;90.;0" />
+</composition>
+<composition name="MBWH_CrossBracingBay1SmallSector">
+  <posXYZ volume="MBWH_CutProfilesCrossBracingSmallSectorItem9" X_Y_Z="0;0;MBWH_CBS9z" />
+  <posXYZ volume="MBWH_CrossBracingPlateSmallSectorItem9Rot" X_Y_Z="-MBWH_CBPx;MBWH_CBPS9yc;MBWH_CBPS9zc" rot="-MBWH_CBPS9ti;0;0" />
+  <posXYZ volume="MBWH_CrossBracingPlateSmallSectorItem9Rot" X_Y_Z=" MBWH_CBPx;MBWH_CBPS9yc;MBWH_CBPS9zc" rot="-MBWH_CBPS9ti;0;0"/>
+</composition>
+<composition name="MBWH_CroisillonBay1SmallSector">
+ <posXYZ volume="MBWH_CrossBracingBay1SmallSector" X_Y_Z="0;-MBWH_CBPS9yc;-MBWH_CBPS9zc"  /> 
+</composition>
+<composition name="MBWH_CroisillonBay1SmallSectorRot">
+  <posXYZ volume="MBWH_CroisillonBay1SmallSector" rot="MBWH_CBPS9ti;90;0" />
+  <posXYZ volume="MBWH_CutProfilesCrossBracingSmallSectorItem7" X_Y_Z="MBWH_cvsx7;MBWH_cvsy7;0" rot="-MBWH_CBPS9ti;90;0" />
+  <posXYZ volume="MBWH_CutProfilesCrossBracingSmallSectorItem8" X_Y_Z="MBWH_cvsx8;MBWH_cvsy8;0" rot="-MBWH_CBPS9ti;90;0" />
+</composition>
+
+<!-- Bay 2 -->
+<var  name="MBWH_CBS11z" value="MBWH_CBSl11/2." />
+<var  name="MBWH_CBPS11d"  value="MBWH_CBPS11le-2.*MBWH_CBPS11cu" />
+<var  name="MBWH_CBPS11zb" value="MBWH_CBPS11za+cos(MBWH_CBPS11ti*GENV_PiS180)*MBWH_CBPS11d/2." />
+<var  name="MBWH_CBPS11yb" value="MBWH_CBPS11ya+sin(MBWH_CBPS11ti*GENV_PiS180)*MBWH_CBPS11d/2." />
+<var  name="MBWH_CBPS11zc" value="MBWH_CBPS11zb+sin(MBWH_CBPS11ti*GENV_PiS180)*MBWH_CBPS11wi/2" />
+<var  name="MBWH_CBPS11yc" value="MBWH_CBPS11yb-cos(MBWH_CBPS11ti*GENV_PiS180)*MBWH_CBPS11wi/2" />
+  <!-- get positions of contreventements 13, 12 using locations of item 11 extremities -->
+<var  name="MBWH_cvs11xo" value="-(MBWH_CBSl11-MBWH_CBPS11zc)*cos(MBWH_CBPS11ti*GENV_PiS180)-(MBWH_CBhei-MBWH_CBPS11yc)*sin(MBWH_CBPS11ti*GENV_PiS180)"/>
+<var  name="MBWH_cvs11yo" value=" (MBWH_CBSl11-MBWH_CBPS11zc)*sin(MBWH_CBPS11ti*GENV_PiS180)-(MBWH_CBhei-MBWH_CBPS11yc)*cos(MBWH_CBPS11ti*GENV_PiS180)"/>
+<var  name="MBWH_cvs11xu" value="MBWH_cvs11xo+MBWH_CBSl11*cos(MBWH_CBPS11ti*GENV_PiS180)" />
+<var  name="MBWH_cvs11yu" value="MBWH_cvs11yo-MBWH_CBSl11*sin(MBWH_CBPS11ti*GENV_PiS180)" />
+<var  name="MBWH_cvsx13"  value="-MBWH_cvs11xu+cos(MBWH_CBPS11ti*GENV_PiS180)*MBWH_CBSl13/2." />
+<var  name="MBWH_cvsy13"  value=" MBWH_cvs11yu+sin(MBWH_CBPS11ti*GENV_PiS180)*MBWH_CBSl13/2." />
+<var  name="MBWH_cvsx12"  value="-MBWH_cvs11xo-cos(MBWH_CBPS11ti*GENV_PiS180)*MBWH_CBSl12/2." />
+<var  name="MBWH_cvsy12"  value=" MBWH_cvs11yo-sin(MBWH_CBPS11ti*GENV_PiS180)*MBWH_CBSl12/2." />
+
+<composition name="MBWH_CrossBracingPlateSmallSectorItem11Rot">
+  <posXYZ volume="MBWH_CrossBracingPlateSmallSectorItem11" rot="0.;90.;0" />
+</composition>
+<composition name="MBWH_CrossBracingBay2SmallSector">
+  <posXYZ volume="MBWH_CutProfilesCrossBracingSmallSectorItem11" X_Y_Z="0;MBWH_CBhei;MBWH_CBS11z"  rot="0.;0.;180" />
+  <posXYZ volume="MBWH_CrossBracingPlateSmallSectorItem11Rot" X_Y_Z="-MBWH_CBPx;MBWH_CBPS11yc;MBWH_CBPS11zc" rot="-MBWH_CBPS11ti;0;0" />
+  <posXYZ volume="MBWH_CrossBracingPlateSmallSectorItem11Rot" X_Y_Z=" MBWH_CBPx;MBWH_CBPS11yc;MBWH_CBPS11zc" rot="-MBWH_CBPS11ti;0;0"/>
+</composition>
+
+<composition name="MBWH_CroisillonBay2SmallSector">
+  <posXYZ volume="MBWH_CrossBracingBay2SmallSector" X_Y_Z="0;-MBWH_CBPS11yc;-MBWH_CBPS11zc"  />
+</composition>
+<composition name="MBWH_CroisillonBay2SmallSectorRot">
+  <posXYZ volume="MBWH_CroisillonBay2SmallSector" rot="MBWH_CBPS11ti;90;180" />
+  <posXYZ volume="MBWH_CutProfilesCrossBracingSmallSectorItem13" X_Y_Z="MBWH_cvsx13;MBWH_cvsy13;0" rot="-MBWH_CBPS11ti;90;0" />
+  <posXYZ volume="MBWH_CutProfilesCrossBracingSmallSectorItem12" X_Y_Z="MBWH_cvsx12;MBWH_cvsy12;0" rot="-MBWH_CBPS11ti;90;0" />
+</composition>
+
+
+
+<!-- Bay 3 -->
+<var  name="MBWH_CBS15z" value="MBWH_CBSl15/2." />
+<var  name="MBWH_CBPS15d"  value="MBWH_CBPS15le-2.*MBWH_CBPS15cu" />
+<var  name="MBWH_CBPS15zb" value="MBWH_CBPS15za+cos(MBWH_CBPS15ti*GENV_PiS180)*MBWH_CBPS15d/2." />
+<var  name="MBWH_CBPS15yb" value="MBWH_CBPS15ya+sin(MBWH_CBPS15ti*GENV_PiS180)*MBWH_CBPS15d/2." />
+<var  name="MBWH_CBPS15zc" value="MBWH_CBPS15zb+sin(MBWH_CBPS15ti*GENV_PiS180)*MBWH_CBPS15wi/2" />
+<var  name="MBWH_CBPS15yc" value="MBWH_CBPS15yb-cos(MBWH_CBPS15ti*GENV_PiS180)*MBWH_CBPS15wi/2" />
+  <!-- get positions of contreventements 16, 17 using locations of item 15 extremities -->
+<var  name="MBWH_cvs15xo" value="-(MBWH_CBSl15-MBWH_CBPS15zc)*cos(MBWH_CBPS15ti*GENV_PiS180)-(MBWH_CBhei-MBWH_CBPS15yc)*sin(MBWH_CBPS15ti*GENV_PiS180)"/>
+<var  name="MBWH_cvs15yo" value=" (MBWH_CBSl15-MBWH_CBPS15zc)*sin(MBWH_CBPS15ti*GENV_PiS180)-(MBWH_CBhei-MBWH_CBPS15yc)*cos(MBWH_CBPS15ti*GENV_PiS180)"/>
+<var  name="MBWH_cvs15xu" value="MBWH_cvs15xo+MBWH_CBSl15*cos(MBWH_CBPS15ti*GENV_PiS180)" />
+<var  name="MBWH_cvs15yu" value="MBWH_cvs15yo-MBWH_CBSl15*sin(MBWH_CBPS15ti*GENV_PiS180)" />
+<var  name="MBWH_cvsx17"  value="-MBWH_cvs15xu+cos(MBWH_CBPS15ti*GENV_PiS180)*MBWH_CBSl17/2.-MBWH_CBSb3xof" />
+<var  name="MBWH_cvsy17"  value=" MBWH_cvs15yu+sin(MBWH_CBPS15ti*GENV_PiS180)*MBWH_CBSl17/2.-MBWH_CBSb3yof" />
+<var  name="MBWH_cvsx16"  value="-MBWH_cvs15xo-cos(MBWH_CBPS15ti*GENV_PiS180)*MBWH_CBSl16/2.-MBWH_CBSb3xof" />
+<var  name="MBWH_cvsy16"  value=" MBWH_cvs15yo-sin(MBWH_CBPS15ti*GENV_PiS180)*MBWH_CBSl16/2.-MBWH_CBSb3yof" />
+
+<composition name="MBWH_CrossBracingPlateSmallSectorItem15Rot">
+  <posXYZ volume="MBWH_CrossBracingPlateSmallSectorItem15" rot="0.;90.;0" />
+</composition>
+<composition name="MBWH_CrossBracingBay3SmallSector">
+  <posXYZ volume="MBWH_CutProfilesCrossBracingSmallSectorItem15" X_Y_Z="0;MBWH_CBhei;MBWH_CBS15z"  rot="0.;0.;180" />
+  <posXYZ volume="MBWH_CrossBracingPlateSmallSectorItem15Rot" X_Y_Z="-MBWH_CBPx;MBWH_CBPS15yc;MBWH_CBPS15zc" rot="-MBWH_CBPS15ti;0;0" />
+  <posXYZ volume="MBWH_CrossBracingPlateSmallSectorItem15Rot" X_Y_Z=" MBWH_CBPx;MBWH_CBPS15yc;MBWH_CBPS15zc" rot="-MBWH_CBPS15ti;0;0"/>
+</composition>
+
+<composition name="MBWH_CroisillonBay3SmallSector">
+  <posXYZ volume="MBWH_CrossBracingBay3SmallSector" X_Y_Z="0;-MBWH_CBPS15yc;-MBWH_CBPS15zc"  />
+</composition>
+<composition name="MBWH_CroisillonBay3SmallSectorRot">
+  <posXYZ volume="MBWH_CroisillonBay3SmallSector" rot="MBWH_CBPS15ti;90;180" />
+  <posXYZ volume="MBWH_CutProfilesCrossBracingSmallSectorItem16" X_Y_Z="MBWH_cvsx16;MBWH_cvsy16;0" rot="-MBWH_CBPS15ti;90;0" />
+  <posXYZ volume="MBWH_CutProfilesCrossBracingSmallSectorItem17" X_Y_Z="MBWH_cvsx17;MBWH_cvsy17;0" rot="-MBWH_CBPS15ti;90;0" />
+</composition>
+
+
+
+
+
+
+<!--  Derived variables -->
+<!--  positions of reinforcing bars -->
+<var name="MBWH_SssRBpz1" value="MBWH_SsiUPlen/2.-MBWH_SssRBdz1-MBWH_SRBhos/2."/>
+<var name="MBWH_SssRBpz2" value="MBWH_SssRBpz1-MBWH_SssRBdz2"/>
+<var name="MBWH_SssRBpz3" value="MBWH_SssRBpz2-MBWH_SssRBdz3"/>
+
+<!--  Relative positions of spokes -->
+<var  name="MBWH_SssIxpos" value="MBWH_SRBpx+MBWH_SUPext/2.+MBWH_RBBthi+MBWH_RBSthi/2." />
+<var  name="MBWH_SssIypos" value="-MBWH_RBSlen+MBWH_RBBsiz" />
+<var  name="MBWH_SssIzof1" value="-(MBWH_SseUPlen-MBWH_SsiUPlen)/2." />
+<var  name="MBWH_SssIzof2" value=" MBWH_SssIypos*tan(MBWH_SSangle*GENV_PiS180)+(MBWH_SIypos-MBWH_SEypos)/cos(MBWH_SSangle*GENV_PiS180)" />
+<var  name="MBWH_SssIzpos" value="MBWH_SssIzof1+MBWH_SssIzof2" />
+
+<!--  inner spokes position -->
+<var  name="MBWH_SssIxref" value="0.5*MBWH_SsiUPlen*sin(MBWH_SSangle*GENV_PiS180)+(MBWH_SUPhei-MBWH_SsiUPhcu)*cos(MBWH_SSangle*GENV_PiS180)"/>
+<var  name="MBWH_Sssypos" value="MBWH_yref+MBWH_SIypos+0.5*MBWH_SsiUPlen*cos(MBWH_SSangle*GENV_PiS180) "/>
+
+<!--  Inner spoke small sector -->
+
+<gvxysx name="MBWH_InnerSpokeSmallSectorUprofile" material="Aluminium4" dZ="MBWH_SsiUPlen-180">
+  <gvxy_point X_Y="MBWH_SUPxa;MBWH_SUPya"/>
+  <gvxy_point X_Y="MBWH_SUPxb;MBWH_SUPyb"/>
+  <gvxy_point X_Y="MBWH_SUPxc;MBWH_SUPyc"/>
+  <gvxy_point X_Y="MBWH_SUPxd;MBWH_SUPyd"/>
+</gvxysx>
+
+<!--  External spoke small sector -->
+
+<gvxysx name="MBWH_ExternalSpokeSmallSectorUprofile" material="Aluminium4" dZ="MBWH_SseUPlen">
+  <gvxy_point X_Y="MBWH_SUPxa;MBWH_SUPya"/>
+  <gvxy_point X_Y="MBWH_SUPxb;MBWH_SUPyb"/>
+  <gvxy_point X_Y="MBWH_SUPxc;MBWH_SUPyc"/>
+  <gvxy_point X_Y="MBWH_SUPxd;MBWH_SUPyd"/>
+</gvxysx>
+
+<!--  Spoke Reinforcing Bar 1 -->
+<var  name="MBWH_SRB1x1" value="MBWH_SRB1dx1/2"/>
+<var  name="MBWH_SRB1y1" value="0"/>
+<var  name="MBWH_SRB1x3" value="MBWH_SRB1dx2/2"/>
+<var  name="MBWH_SRB1y3" value="MBWH_SRB1dy3-MBWH_SRB1dy2"/>
+<var  name="MBWH_SRB1x2" value="MBWH_SRB1x3-MBWH_SRB1dx3"/>
+<var  name="MBWH_SRB1y2" value="MBWH_SRB1y3"/>
+<var  name="MBWH_SRB1x4" value="MBWH_SRB1dx4/2"/>
+<var  name="MBWH_SRB1y4" value="-MBWH_SRB1dy2"/>
+<var  name="MBWH_SRB1x6" value="MBWH_SRB1x1-MBWH_SRB1dy1*tan(0.5*MBWH_SRB1alph*GENV_PiS180)"/>
+<var  name="MBWH_SRB1y6" value="-MBWH_SRB1dy1"/>
+<var  name="MBWH_SRB1x5" value="MBWH_SRB1x6+(MBWH_SRB1dy2-MBWH_SRB1dy1)/tan(MBWH_SRB1alph*GENV_PiS180)"/>
+<var  name="MBWH_SRB1y5" value="MBWH_SRB1y4"/>
+
+<var  name="MBWH_SRB1zpos" value="MBWH_SssIxpos-MBWH_CBext/2.-MBWH_SRBthi"/>
+
+<gvxysx name="MBWH_SpokeReinforcingBar1SmallSector" material="Aluminium1" dZ="MBWH_SRBthi">
+  <gvxy_point X_Y="MBWH_SRB1x1;MBWH_SRB1y1"/>
+  <gvxy_point X_Y="MBWH_SRB1x2;MBWH_SRB1y2"/>
+  <gvxy_point X_Y="MBWH_SRB1x3;MBWH_SRB1y3"/>
+  <gvxy_point X_Y="MBWH_SRB1x4;MBWH_SRB1y4"/>
+  <gvxy_point X_Y="MBWH_SRB1x5;MBWH_SRB1y5"/>
+  <gvxy_point X_Y="MBWH_SRB1x6;MBWH_SRB1y6"/>
+</gvxysx>
+
+<!--  Spoke Reinforcing Bar 1 -->
+<var  name="MBWH_SRB2x1" value="MBWH_SRB2dx1/2"/>
+<var  name="MBWH_SRB2y1" value="0"/>
+<var  name="MBWH_SRB2x2" value="MBWH_SRB2dx2/2"/>
+<var  name="MBWH_SRB2y2" value="-MBWH_SRB2dy"/>
+
+<var  name="MBWH_SRB2zpos" value="MBWH_SssIxpos-MBWH_CBext/2.-MBWH_SRBthi"/>
+
+<gvxysx name="MBWH_SpokeReinforcingBar2SmallSector" material="Aluminium1" dZ="MBWH_SRBthi">
+  <gvxy_point X_Y="MBWH_SRB2x1;MBWH_SRB2y1"/>
+  <gvxy_point X_Y="MBWH_SRB2x2;MBWH_SRB2y2"/>
+</gvxysx>
+
+
+<composition name="MBWH_SpokesSmallSectorAssembly1">
+  <posXYZ volume="MBWH_InnerSpokeSmallSectorUprofile"/>
+  <posXYZ volume="MBWH_ReinforcingBar" X_Y_Z=" MBWH_SRBpx;MBWH_SRBpy;MBWH_SssRBpz1" rot="0;0;90"/>
+  <posXYZ volume="MBWH_ReinforcingBar" X_Y_Z=" MBWH_SRBpx;MBWH_SRBpy;MBWH_SssRBpz2" rot="0;0;90"/>
+  <posXYZ volume="MBWH_ReinforcingBar" X_Y_Z=" MBWH_SRBpx;MBWH_SRBpy;MBWH_SssRBpz3" rot="0;0;90"/>
+  <posXYZ volume="MBWH_ExternalSpokeSmallSectorUprofile"  X_Y_Z=" MBWH_SssIxpos;MBWH_SssIypos;MBWH_SssIzpos"/>
+</composition>
+
+<composition name="MBWH_SpokesSmallSectorAssembly2">
+  <posXYZ volume="MBWH_InnerSpokeSmallSectorUprofile"/>
+  <posXYZ volume="MBWH_ReinforcingBar" X_Y_Z=" MBWH_SRBpx;MBWH_SRBpy;-MBWH_SssRBpz1" rot="0;0;90"/>
+  <posXYZ volume="MBWH_ReinforcingBar" X_Y_Z=" MBWH_SRBpx;MBWH_SRBpy;-MBWH_SssRBpz2" rot="0;0;90"/>
+  <posXYZ volume="MBWH_ReinforcingBar" X_Y_Z=" MBWH_SRBpx;MBWH_SRBpy;-MBWH_SssRBpz3" rot="0;0;90"/>
+  <posXYZ volume="MBWH_ExternalSpokeSmallSectorUprofile"  X_Y_Z=" MBWH_SssIxpos;MBWH_SssIypos;-MBWH_SssIzpos"/>
+</composition>
+
+<composition name="MBWH_SpokesSmallSectorAssemblyTemp1">
+  <posXYZ volume="MBWH_SpokesSmallSectorAssembly1" X_Y_Z="MBWH_SssIxref;MBWH_Sssypos;0" rot="0.; -90.;90-MBWH_SSangle" />
+</composition>
+
+<composition name="MBWH_SpokesSmallSectorAssemblyTemp2">
+  <posXYZ volume="MBWH_SpokesSmallSectorAssembly2" X_Y_Z="-MBWH_SssIxref;MBWH_Sssypos;0" rot="180.; -90.;90+MBWH_SSangle" />
+</composition>
+
+<composition name="MBWH_SmallSector">
+  <posXYZ volume="MBWH_SpokesSmallSectorAssemblyTemp1" />
+  <posXYZ volume="MBWH_SpokesSmallSectorAssemblyTemp2" /> 
+  <posXYZ volume="MBWH_CutProfilesCrossBracingSmallSectorItem10"  X_Y_Z="0;MBWH_CBSy10-5.;0" rot="0;90;0"/>
+  <posXYZ volume="MBWH_CutProfilesCrossBracingSmallSectorItem14"  X_Y_Z="0;MBWH_CBSy14;0" rot="0;90;0"/>
+  <posXYZ volume="MBWH_CutProfilesCrossBracingSmallSectorItem18a" X_Y_Z="0;MBWH_CBSy18;0" rot="0;90;0"/>
+  <posXYZ volume="MBWH_CutProfilesCrossBracingSmallSectorItem18b" X_Y_Z="0;MBWH_CBSy18b;0" rot="0;90;0"/>
+  <posXYZ volume="MBWH_CroisillonBay1SmallSectorRot" X_Y_Z="0;MBWH_Croisy9;0"/>
+  <posXYZ volume="MBWH_CroisillonBay2SmallSectorRot" X_Y_Z="0;MBWH_Croisy11;0" rot="0;180;0"/>
+  <posXYZ volume="MBWH_CroisillonBay3SmallSectorRot" X_Y_Z="0;MBWH_Croisy15;0"/>
+  <posXYZ volume="MBWH_SpokeReinforcingBar1SmallSector" X_Y_Z="0;MBWH_SRB1ypos;MBWH_SRB1zpos-2.6"/>
+  <posXYZ volume="MBWH_SpokeReinforcingBar2SmallSector" X_Y_Z="0;MBWH_SRB2ypos;MBWH_SRB2zpos-2.6"/> 
+</composition>
+
+
+<!--  
+      **************************************************************
+      ***                                                       ****
+      ***                  Big Wheel Assembly                   ****
+      ***                                                       ****
+      **************************************************************
+-->
+
+<var  name="MBWH_zposS" value="MBWH_zposL+MBWH_SlsIxpos" />
+
+<composition name="MBWH_BigWheelOctant">
+  <posXYZ volume="MBWH_SmallSector" X_Y_Z=" 0.;0.;MBWH_zposS" rot="0.;180.;22.5"/>
+  <posXYZ volume="MBWH_LargeSector" X_Y_Z=" 0.;0.;MBWH_zposL" rot="0.;180.;0."/>
+</composition>
+
+<array name="MBWH_BWOA" values="-90;-45;0;45;90;135;180;225" /> <!--  octant angles -->
+
+<composition name="MBWH_BigWheel">
+  <foreach  index="I"  begin="0"  loops="8" >
+   <posXYZ volume="MBWH_BigWheelOctant" rot="0.;0.;MBWH_BWOA[I]"/>
+  </foreach>
+</composition>
+
+<composition name="MBWH_BigWheels">
+  <posXYZ volume="MBWH_BigWheel"/>
+  <posXYZ volume="MBWH_BigWheel" rot="0.;180.;0."/>
+</composition>
+
+</section>
+
+<section name       = "Calorimeter Saddle"
+         version    = "7.0"
+         date       = "9 May 2006"
+         author     = "Daniel Pomarede"
+         top_volume = "SADL_CalorimeterSaddle">
+
+<!--     name       =  Calorimeter Saddle            section name       = "Supports"  -->
+<!--  **************************************************************
+      **************************************************************
+      ***                                                       ****
+      ***                  Calorimeter Saddle                   ****
+      ***                                                       ****
+      **************************************************************
+      **************************************************************  -->
+
+
+
+<!--  Andrei Table need for the structure missing in Oracle table -->
+<var  name="SADL_numboxes"      value="12"/>
+<var  name="SADL_numbreps"      value="1"/>
+<var  name="SADL_numtubes"      value="4"/>
+<var  name="SADL_NumEmTubesBrep"      value="1"/>
+<var  name="SADL_Gusset_tubecut"      value="0"/>
+<var  name="SADL_num_Gusset_vol"      value="12"/>
+<var  name="SADL_numbreppoint"      value="10"/>
+<var  name="SADL_SymX"   value="1"/>
+<var  name="SADL_SymY"   value="0"/>
+<var  name="SADL_SymZ"   value="1"/>
+<var name="PiDegOver4"       value=" 45"/>
+<var name="PiDegOver2"       value=" 90"/>
+<var name="Pideg"            value="180"/>
+<var name="2Pideg"            value="360"/>
+<var name="SADL_Stzrot"    value="45"/>
+<var name="SADL_Stzrotmoins"    value="-45"/>
+<!--SaddleBOVN -->
+<var name="SADL_BoxBeam_numHPlateVol"	value="1"/>
+<var name="SADL_BoxBeam_numVPlateVol"   value="2"/>
+<var name="SADL_numConnGussetBBeamVol"  value="4"/>
+<var name="SADL_numStiffenerVol"	value="4"/>
+<var name="SADL_numBarrelBlocking_JackVol"   value="4"/>
+<array name="SADL_SymBoxBeam"           values="1;0;0"/>
+<array name="SADL_SymExtendedBoxBeam"   values="1;0;1"/>
+<array name="SADL_SymConnGussetBBeam"   values="1;0;1"/>
+<array name="SADL_SymStiffener"         values="1;0;1"/>
+<array name="SADL_SymBarrel_Blocking_Jack"   values="1;0;1"/>
+<array name="SADL_Material"	        values="1;2"/> <!-- 1=Iron, 2=Aluminium-->
+<array name="SADL_EmptyVolBoxBeam"           values="0;0;0"/> <!--values="NUMEMBO(number empty boxes);NUMEMTU(tubes);NUMEMBR(breps)"-->
+<array name="SADL_EmptyVolExtendedBoxBeam"           values="0;0;0"/>
+<array name="SADL_EmptyVolConnGussetBBeam"           values="0;0;0"/>
+<array name="SADL_EmptyVolStiffener"         	     values="0;0;0"/>
+<array name="SADL_EmptyVolBarrel_Blocking_Jack"      values="0;0;0"/>
+<!--SaddleTUVN -->
+<var name="SADL_RoundedSupport"	value="2"/>
+<var name="SAD_Barrel_Blocking_Jack_Cylinder"  		 value="4"/>
+<array name="SADL_SymRoundedSupport"          		 values="1;0;1"/>
+<array name="SADL_SymBarrel_Blocking_Jack_Cylinder"      values="1;0;1"/>
+<array name="SADL_EmptyVolRoundedSupport"         	 values="0;0;0"/>
+<array name="SADL_EmptyVolBarrel_Blocking_Jack_Cylinder" values="0;0;0"/>
+
+
+
+<!-- for box -->
+<var  name="SADL_BoxBeam_HPlate_vol"      value="1"/>
+<var  name="SADL_BoxBeam_VPlate_vol"      value="2"/>
+<var  name="SADL_ConnGussetBBeam_vol"      value="4"/>
+<var  name="SADL_ConnGussetBBeam_VPlate_vol"      value="2"/>
+
+<!--  END -->
+
+<!--  ATLLBUS_0019 -->
+<var  name="SADL_BxBLen"   value="6200"/>
+<var  name="SADL_BxBWid"   value="520"/>
+<var  name="SADL_BxBHei"   value="360"/>
+<var  name="SADL_BxBHThi1" value="90"/>
+<var  name="SADL_BxBHThi2" value="40"/>
+<var  name="SADL_BxBVThi"  value="60"/>
+<!--  ATLLBUS_0003 -->
+<var  name="SADL_BxBxref"  value="2740"/>
+<var  name="SADL_BxByref"  value="4000"/>
+
+<!--  Extended Barrel Box Beam -->
+
+<!--  ATLLEUS_0002 -->
+<var  name="SADL_BxBELen"  value="3355"/>
+<var  name="SADL_EBxBzpos" value="4832.5"/>
+
+<!--  Rounded Support -->
+
+<!--  ATLLBUS_0006 & ATLLBUS_0009 & ATLLBUS_0012 & ATLLBUS_0015 -->
+<var  name="SADL_RSprof1"  value="301.8"/>
+<var  name="SADL_RSprof2"  value="32"/>
+<var  name="SADL_RSLenAC"  value="731"/>
+<var  name="SADL_RSLenBD"  value="746"/>
+<var  name="SADL_RSrin"    value="4240"/>
+<var  name="SADL_RSrout"   value="4310"/>
+
+<!--  Gusset -->
+
+<!--  ATLLBUS_0005 -->
+<var  name="SADL_GudZ"     value="70"/>
+<var  name="SADL_GualphA"  value="31"/>
+<var  name="SADL_GualphE"  value="22.5"/>
+<var  name="SADL_GuthicAB" value="61"/>
+<var  name="SADL_GuthicBC" value="63.6"/>
+<var  name="SADL_GudyAF"   value="252"/>
+<var  name="SADL_GudxAF"   value="443.8"/>
+<var  name="SADL_GudxEF"   value="55"/>
+<var  name="SADL_GudxFJ"   value="1087.7"/>
+<var  name="SADL_GudyAJ"   value="1634.3"/>
+<var  name="SADL_GudyFG"   value="430"/>
+<var  name="SADL_GudxGH"   value="510"/>
+<var  name="SADL_GudxFI"   value="1125.5"/>
+<var  name="SADL_GudyHI"   value="1440.6"/>
+
+<!--  ATLLBUS_0006 -->
+<var  name="SADL_Guposxg"  value="2715"/>
+<var  name="SADL_Guposyg"  value="-3485"/>
+
+<!--  ATLLBUS_0006  -->
+<var  name="SADL_Gussdz1"  value="265"/>
+<var  name="SADL_Gussdz2"  value="280"/>
+
+<!--  Connection Gusset / Box Beam -->
+<!--  ATLLBUS_0006 & ATLLBUS_0007 -->
+<var name="SADL_CGBBthi"   value="25"/>
+<var name="SADL_CGBBlen"   value="870"/>
+<var name="SADL_CGBBHwid"  value="545"/>
+<var name="SADL_CGBBVwid"  value="400"/>
+
+<!--  Stiffener -->
+<!--  ATLLBUS_0018 & ATLLEUS_0021 -->
+
+<var name="SADL_StifLen"   value="1149"/>
+<!--  extremity plate -->
+<var name="SADL_StEPwid"   value="152"/>
+<var name="SADL_StEPthi"   value="15"/>
+<!--  tube-square -->
+<var name="SADL_StTUthi"   value="10"/>
+<var name="SADL_StTUext"   value="100"/>
+
+<!--  Doublet -->
+<!--  ATLLBUS_0003 -->
+<var name="SADL_SaddZmax"  value="2820"/> <!--  Gusset surface is in this plane -->
+<!--  ATLLEUS_0002 -->
+<var name="SADL_ESadZmax"  value="6150"/> <!--  Gusset surface is in this plane -->
+
+<!--  stiffener position -->
+<!--  ATLLBUS_0008 -->
+<var name="SADL_Stxpos"    value=" 3362"/>
+<var name="SADL_Stypos"    value="-2910"/>
+
+<!--  Barrel Blocking Jacks -->
+<!--  Barrel Blocking Jacks positions -->
+<array name="SADL_BlJazpos" values="529;2369;3989;5789" /> 
+<var  name="SADL_BlJaypos" value="-4390+50"/> <!-- added 50 for the modification of SADL_BBJSCthi (few lines below)-->
+<var  name="SADL_BlJaxpos" value="3000"/>
+
+<var  name="SADL_BBJPlen"  value="520"/>
+<var  name="SADL_BBJPwid"  value="360"/>
+<var  name="SADL_BBJPthi"  value="45"/>
+
+<var  name="SADL_BBJBCthi" value="290"/>
+<var  name="SADL_BBJBCrad" value="152"/>
+<var  name="SADL_BBJSCthi" value="5"/> <!-- modified from 55 to 5 to avoid overlap -->
+<var  name="SADL_BBJSCrad" value="98"/>
+
+
+
+<!--  Derived variables -->
+
+<!--  Box Beam -->
+
+<var  name="SADL_BxBHyp1" value="-SADL_BxBHei/2.-SADL_BxBHThi1/2."/>
+<var  name="SADL_BxBHyp2" value="SADL_BxBHei/2.+SADL_BxBHThi2/2."/>
+<var  name="SADL_BxBVxpos" value="SADL_BxBWid/2.-SADL_BxBVThi/2."/>
+
+<!--  Gusset -->
+
+<var  name="SADL_Guxa" value="0"/>
+<var  name="SADL_Guya" value="0"/>
+<var  name="SADL_Guxb" value="SADL_Guxa+SADL_GuthicAB*sin(SADL_GualphA*GENV_PiS180)"/>
+<var  name="SADL_Guyb" value="SADL_Guya-SADL_GuthicAB*cos(SADL_GualphA*GENV_PiS180)"/>
+<var  name="SADL_Guxc" value="SADL_Guxb+SADL_GuthicBC/tan(SADL_GualphA*GENV_PiS180)"/>
+<var  name="SADL_Guyc" value="SADL_Guyb+SADL_GuthicBC"/>
+
+<var  name="SADL_Guxf" value="SADL_Guxa+SADL_GudxAF"/>
+<var  name="SADL_Guyf" value="SADL_Guya-SADL_GudyAF"/>
+<var  name="SADL_Guxe" value="SADL_Guxf-SADL_GudxEF"/>
+<var  name="SADL_Guye" value="SADL_Guyf"/>
+<var  name="SADL_Guyd" value="SADL_Guyc"/>
+<var  name="SADL_Guxd" value="SADL_Guxe-(SADL_Guyd-SADL_Guye)*tan(SADL_GualphE*GENV_PiS180)"/>
+<var  name="SADL_Guxg" value="SADL_Guxf"/>
+<var  name="SADL_Guyg" value="SADL_Guyf+SADL_GudyFG"/>
+<var  name="SADL_Guxh" value="SADL_Guxg+SADL_GudxGH"/>
+<var  name="SADL_Guyh" value="SADL_Guyg"/>
+
+<var  name="SADL_Guxi" value="SADL_Guxf+SADL_GudxFI"/>
+<var  name="SADL_Guyi" value="SADL_Guyh+SADL_GudyHI"/>
+<var  name="SADL_Guxj" value="SADL_Guxf+SADL_GudxFJ"/>
+<var  name="SADL_Guyj" value="SADL_Guya+SADL_GudyAJ"/>
+
+<var  name="SADL_Guposxa" value="SADL_Guposxg-SADL_Guxg"/>
+<var  name="SADL_Guposya" value="SADL_Guposyg-SADL_Guyg"/>
+
+<var  name="SADL_Gusspz2" value="SADL_Gussdz2+SADL_GudZ"/>
+<var  name="SADL_Gusspz1" value="SADL_Gussdz1+SADL_GudZ"/>
+
+<!--  Box beam positions -->
+
+<var  name="SADL_BxBxpos" value="SADL_BxBxref+SADL_BxBWid/2"/>
+<var  name="SADL_BxBypos" value="-SADL_BxByref+SADL_BxBHei/2+SADL_BxBHThi1"/>
+
+<!--  Connection Gusset / Box Beam -->
+
+<var  name="SADL_CGBBHPx"   value="SADL_Guposxg+SADL_CGBBHwid/2"/>
+<var  name="SADL_CGBBHPy"   value="SADL_Guposyg-SADL_CGBBthi/2"/>
+<var  name="SADL_CGBBVPx"   value="SADL_Guposxg+SADL_CGBBthi/2"/>
+<var  name="SADL_CGBBVPy"   value="SADL_Guposyg-SADL_CGBBVwid/2-SADL_CGBBthi"/>
+
+<!--  Stiffener -->
+
+<!--  height of flange -->
+<var name="SADL_StTFlhei" value="SADL_StTUext-2*SADL_StTUthi"/>
+<!--  x/y pos of flange/plate -->
+<var name="SADL_StTFlpos" value="SADL_StTUext/2-SADL_StTUthi/2"/>
+<!--  length -->
+<var name="SADL_StifLen0" value="SADL_StifLen-2*SADL_StEPthi"/>
+<!--  z pos of extremity plate -->
+<var name="SADL_StEPzpos" value="SADL_StifLen/2-SADL_StEPthi/2"/>
+
+<!--  Barrel Doublet -->
+<!--  ATLLBUS_0003 -->
+<var  name="SADL_SaddZ2"  value="SADL_SaddZmax-SADL_Gussdz1-1.5*SADL_GudZ"/>
+<!--  position of first unit is inferred from stiffener length -->
+<var  name="SADL_SaddZ1"  value="SADL_SaddZ2-3.*SADL_GudZ-2.*SADL_Gussdz2-SADL_StifLen"/>
+
+<!--  stiffener position -->
+<var name="SADL_Stzpos" value="(SADL_SaddZ1+SADL_SaddZ2)/2"/>
+
+<!--  Extended Barrel Doublet -->
+<!--  ATLLEUS_0002 -->
+<var name="SADL_ESaddZ2"  value="SADL_ESadZmax-SADL_Gussdz1-1.5*SADL_GudZ"/>
+<!--  position of first unit is inferred from stiffener length -->
+<var name="SADL_ESaddZ1"  value="SADL_ESaddZ2-3.*SADL_GudZ-2.*SADL_Gussdz2-SADL_StifLen"/>
+
+<!--  stiffener position -->
+<var name="SADL_EStzpos" value="(SADL_ESaddZ1+SADL_ESaddZ2)/2"/>
+
+<!--  Barrel Blocking Jacks -->
+
+<var  name="SADL_BBJSCyp" value="SADL_BBJSCthi/2"/>
+<var  name="SADL_BBJBCyp" value="SADL_BBJSCthi+SADL_BBJBCthi/2"/>
+<var  name="SADL_BBJPyp"  value="SADL_BBJSCthi+SADL_BBJBCthi+SADL_BBJPthi/2"/>
+
+<!--  Andrei Table need for the structure missing in Oracle table -->
+<var  name="SADL_Gusset_Plate_Zmoins"  value="-SADL_Gusspz2"/>
+<var  name="SADL_BxBVxposmoins"	value="-SADL_BxBVxpos"/>
+<var  name="SADL_StEPzposmoins" value="-SADL_StEPzpos"/>
+<var  name="SADL_StTFlposRot"   value="SADL_StTFlpos*sin(SADL_Stzrot*GENV_PiS180)"/>
+<var  name="SADL_StTFlposRotmoins" value="-SADL_StTFlposRot"/>
+<!--  Andrei Table need for the structure missing in Oracle table -->
+
+<!--  Modelization -->
+
+<!--  Box Beam -->
+<box name="SADL_BoxBeam_HPlate_Lower" material="Iron1" X_Y_Z="SADL_BxBWid ;SADL_BxBHThi1;SADL_BxBLen"/>
+<box name="SADL_BoxBeam_HPlate_Upper" material="Iron1" X_Y_Z="SADL_BxBWid ;SADL_BxBHThi2;SADL_BxBLen"/>
+<box name="SADL_BoxBeam_VPlate"       material="Iron1" X_Y_Z="SADL_BxBVThi;SADL_BxBHei  ;SADL_BxBLen"/>
+
+<!--  Extended Barrel Box Beam -->
+<box name="SADL_Extended_BoxBeam_HPlate_Lower" material="Iron1" X_Y_Z="SADL_BxBWid ;SADL_BxBHThi1;SADL_BxBELen"/>
+<box name="SADL_Extended_BoxBeam_HPlate_Upper" material="Iron1" X_Y_Z="SADL_BxBWid ;SADL_BxBHThi2;SADL_BxBELen"/>
+<box name="SADL_Extended_BoxBeam_VPlate"       material="Iron1" X_Y_Z="SADL_BxBVThi;SADL_BxBHei  ;SADL_BxBELen"/>
+
+<composition name="SADL_BoxBeam">
+  <posXYZ volume="SADL_BoxBeam_HPlate_Lower" X_Y_Z="0;SADL_BxBHyp1;0" />
+  <posXYZ volume="SADL_BoxBeam_HPlate_Upper" X_Y_Z="0;SADL_BxBHyp2;0" />
+  <posXYZ volume="SADL_BoxBeam_VPlate" X_Y_Z=" SADL_BxBVxpos;0;0" />
+  <posXYZ volume="SADL_BoxBeam_VPlate" X_Y_Z="-SADL_BxBVxpos;0;0" />
+</composition>
+
+<composition name="SADL_Extended_BoxBeam">
+  <posXYZ volume="SADL_Extended_BoxBeam_HPlate_Lower" X_Y_Z="0;SADL_BxBHyp1;0" />
+  <posXYZ volume="SADL_Extended_BoxBeam_HPlate_Upper" X_Y_Z="0;SADL_BxBHyp2;0" />
+  <posXYZ volume="SADL_Extended_BoxBeam_VPlate" X_Y_Z=" SADL_BxBVxpos;0;0" />
+  <posXYZ volume="SADL_Extended_BoxBeam_VPlate" X_Y_Z="-SADL_BxBVxpos;0;0" />
+</composition>
+
+<!--  Rounded Support -->
+<tubs name="SADL_RoundedSupportAC" material="Iron2" Rio_Z="SADL_RSrin;SADL_RSrout;SADL_RSLenAC" profile="SADL_RSprof1;SADL_RSprof2"/>
+<tubs name="SADL_RoundedSupportBD" material="Iron2" Rio_Z="SADL_RSrin;SADL_RSrout;SADL_RSLenBD" profile="SADL_RSprof1;SADL_RSprof2"/>
+
+<!--  Gusset -->
+<gvxy name="SADL_Gusset_Core" material="Iron" dZ="SADL_GudZ">
+  <gvxy_point X_Y="SADL_Guxa;SADL_Guya"/>
+  <gvxy_point X_Y="SADL_Guxb;SADL_Guyb"/>
+  <gvxy_point X_Y="SADL_Guxc;SADL_Guyc"/>
+  <gvxy_point X_Y="SADL_Guxd;SADL_Guyd"/>
+  <gvxy_point X_Y="SADL_Guxe;SADL_Guye"/>
+  <gvxy_point X_Y="SADL_Guxf;SADL_Guyf"/>
+  <gvxy_point X_Y="SADL_Guxg;SADL_Guyg"/>
+  <gvxy_point X_Y="SADL_Guxh;SADL_Guyh"/>
+  <gvxy_point X_Y="SADL_Guxi;SADL_Guyi"/>
+  <gvxy_point X_Y="SADL_Guxj;SADL_Guyj"/>
+</gvxy>
+
+<tubs name="SADL_Gusset_Cut" material="Aluminium4" Rio_Z="0;SADL_RSrout;SADL_RSLenBD"  profile="SADL_RSprof1;SADL_RSprof2"    />
+
+<subtraction  name="SADL_Gusset_Plate"  >
+  <posXYZ volume="SADL_Gusset_Core" X_Y_Z="SADL_Guposxa;SADL_Guposya;0"/>
+  <posXYZ volume="SADL_Gusset_Cut"/>
+</subtraction>
+
+<!--  Connection Gusset / Box Beam -->
+
+<box name="SADL_ConnGussetBBeam_HPlate" material="Iron4" X_Y_Z="SADL_CGBBHwid;SADL_CGBBthi;SADL_CGBBlen"/>
+<box name="SADL_ConnGussetBBeam_VPlate" material="Iron4" X_Y_Z="SADL_CGBBthi;SADL_CGBBVwid;SADL_CGBBlen"/>
+
+<composition name="SADL_Saddle_UnitA">
+  <posXYZ volume="SADL_RoundedSupportAC"  />
+  <posXYZ volume="SADL_Gusset_Plate" />
+  <posXYZ volume="SADL_Gusset_Plate" X_Y_Z="Zero;Zero;SADL_Gusspz1" />
+  <posXYZ volume="SADL_Gusset_Plate" X_Y_Z="Zero;Zero;SADL_Gusset_Plate_Zmoins" />
+  <posXYZ volume="SADL_ConnGussetBBeam_HPlate" X_Y_Z="SADL_CGBBHPx;SADL_CGBBHPy;0" />
+  <posXYZ volume="SADL_ConnGussetBBeam_VPlate" X_Y_Z="SADL_CGBBVPx;SADL_CGBBVPy;0" />
+</composition>
+
+<composition name="SADL_Saddle_UnitB">
+  <posXYZ volume="SADL_RoundedSupportBD"  />
+  <posXYZ volume="SADL_Gusset_Plate" />
+  <posXYZ volume="SADL_Gusset_Plate" X_Y_Z="0;0;SADL_Gusspz2" />
+  <posXYZ volume="SADL_Gusset_Plate" X_Y_Z="0;0;-SADL_Gusspz2" />
+  <posXYZ volume="SADL_ConnGussetBBeam_HPlate" X_Y_Z="SADL_CGBBHPx;SADL_CGBBHPy;0" />
+  <posXYZ volume="SADL_ConnGussetBBeam_VPlate" X_Y_Z="SADL_CGBBVPx;SADL_CGBBVPy;0" />
+</composition>
+
+<!--  Stiffener -->
+
+<box name="SADL_Stiffener_Plate" material="Iron1" X_Y_Z="SADL_StEPwid;SADL_StEPwid;SADL_StEPthi"/>
+<box name="SADL_Stiffener_Tube_Plate"  material="Iron1" X_Y_Z="SADL_StTUext;SADL_StTUthi; SADL_StifLen0"/>
+<box name="SADL_Stiffener_Tube_Flange" material="Iron1" X_Y_Z="SADL_StTUthi;SADL_StTFlhei;SADL_StifLen0"/>
+
+<composition name="SADL_Stiffener">
+  <posXYZ volume="SADL_Stiffener_Tube_Flange" X_Y_Z=" SADL_StTFlpos;0;0" />
+  <posXYZ volume="SADL_Stiffener_Tube_Flange" X_Y_Z="-SADL_StTFlpos;0;0" />
+  <posXYZ volume="SADL_Stiffener_Tube_Plate"  X_Y_Z="0; SADL_StTFlpos;0;0" />
+  <posXYZ volume="SADL_Stiffener_Tube_Plate"  X_Y_Z="0;-SADL_StTFlpos;0;0" />
+  <posXYZ volume="SADL_Stiffener_Plate" X_Y_Z="0;0; SADL_StEPzpos" />
+  <posXYZ volume="SADL_Stiffener_Plate" X_Y_Z="0;0;-SADL_StEPzpos" />
+</composition>
+
+<composition name="SADL_Saddle_Doublet">
+  <posXYZ volume="SADL_Saddle_UnitB" X_Y_Z="0;0;SADL_SaddZ1"  />
+  <posXYZ volume="SADL_Saddle_UnitA" X_Y_Z="0;0;SADL_SaddZ2"  />
+  <posXYZ volume="SADL_Stiffener" X_Y_Z="SADL_Stxpos;SADL_Stypos;SADL_Stzpos" rot="Zero;Zero;SADL_Stzrot" />
+</composition>
+
+<composition name="SADL_Extended_Saddle_Doublet">
+  <posXYZ volume="SADL_Extended_BoxBeam" X_Y_Z="SADL_BxBxpos;SADL_BxBypos;SADL_EBxBzpos"  />
+  <posXYZ volume="SADL_Saddle_UnitB" X_Y_Z="0;0;SADL_ESaddZ1"  />
+  <posXYZ volume="SADL_Saddle_UnitA" X_Y_Z="0;0;SADL_ESaddZ2"  />
+  <posXYZ volume="SADL_Stiffener" X_Y_Z="SADL_Stxpos;SADL_Stypos;SADL_EStzpos" rot="Zero;Zero;SADL_Stzrot" />
+</composition>
+
+<composition name="SADL_Saddle_Quadruplet">
+  <posXYZ volume="SADL_Saddle_Doublet" />
+  <posXYZ volume="SADL_Saddle_Doublet" rot="0;180;0" X_Y_Z="0.;0.;2*SADL_Stzpos"/>
+</composition>
+
+<composition name="SADL_Extended_Saddle_Quadruplet">
+  <posXYZ volume="SADL_Extended_Saddle_Doublet" />
+  <posXYZ volume="SADL_Extended_Saddle_Doublet" rot="0;180;0" X_Y_Z="0.;0.;2*SADL_EStzpos" />
+</composition>
+
+<!--  Barrel Blocking Jacks -->
+
+<box name="SADL_Barrel_Blocking_Jack_Plate" material="Iron1" X_Y_Z="SADL_BBJPlen;SADL_BBJPwid;SADL_BBJPthi"/>
+
+<tubs name="SADL_Barrel_Blocking_Jack_BigCylinder" material="Iron2" Rio_Z="0;SADL_BBJBCrad;SADL_BBJBCthi" />
+<tubs name="SADL_Barrel_Blocking_Jack_SmallCylinder" material="Iron2" Rio_Z="0;SADL_BBJSCrad;SADL_BBJSCthi" />
+
+<composition name="SADL_Barrel_Blocking_Jack_Unit">
+  <posXYZ volume="SADL_Barrel_Blocking_Jack_SmallCylinder" X_Y_Z="0;SADL_BBJSCyp;0" rot="PiDegOver2;Zero;Zero"/>
+  <posXYZ volume="SADL_Barrel_Blocking_Jack_BigCylinder" X_Y_Z="0;SADL_BBJBCyp;0"   rot="PiDegOver2;Zero;Zero"/>
+  <posXYZ volume="SADL_Barrel_Blocking_Jack_Plate" X_Y_Z="0;SADL_BBJPyp;0"          rot="PiDegOver2;Zero;Zero"/>
+</composition>
+
+<composition name="SADL_Barrel_Blocking_Jacks">
+  <foreach  index="I"  begin="0"  loops="4" >
+   <posXYZ volume="SADL_Barrel_Blocking_Jack_Unit" X_Y_Z=" SADL_BlJaxpos;SADL_BlJaypos; SADL_BlJazpos[I]"/>
+   <posXYZ volume="SADL_Barrel_Blocking_Jack_Unit" X_Y_Z="-SADL_BlJaxpos;SADL_BlJaypos; SADL_BlJazpos[I]"/>
+   <posXYZ volume="SADL_Barrel_Blocking_Jack_Unit" X_Y_Z=" SADL_BlJaxpos;SADL_BlJaypos;-SADL_BlJazpos[I]"/>
+   <posXYZ volume="SADL_Barrel_Blocking_Jack_Unit" X_Y_Z="-SADL_BlJaxpos;SADL_BlJaypos;-SADL_BlJazpos[I]"/>
+  </foreach>
+</composition>
+
+<composition name="SADL_CalorimeterSaddle1">
+  <posXYZ volume="SADL_BoxBeam" X_Y_Z=" SADL_BxBxpos;SADL_BxBypos;0" />
+  <posXYZ volume="SADL_BoxBeam" X_Y_Z="-SADL_BxBxpos;SADL_BxBypos;0" />
+  <posXYZ volume="SADL_Saddle_Quadruplet" />
+  <posXYZ volume="SADL_Saddle_Quadruplet" rot="0;180.;0" />
+  <posXYZ volume="SADL_Extended_Saddle_Quadruplet" />
+  <posXYZ volume="SADL_Extended_Saddle_Quadruplet" rot="0;180.;0" />
+  <posXYZ volume="SADL_Barrel_Blocking_Jacks" />
+</composition>
+
+<composition name="SADL_CalorimeterSaddle">
+  <posXYZ volume="SADL_CalorimeterSaddle1" X_Y_Z=" 0.;-50.;0" />
+</composition>
+
+</section>
+
+
+<section name       = "TGC Big Wheel"
+         version    = "7.0"
+         date       = "14 04 2008, redone 20 08 2013"
+         author     = "laurent+andrea, jochen - initial implementation removed "
+         top_volume = "useless">
+
+<!-- general parameters for surrounding boxes -->
+
+<var name="TGC_BigWheel_SurBoxWallThick"    value="    12.  " />
+<var name="TGC_BigWheel_SurBoxSideLength"   value="   250.  " />
+<var name="TGC_BigWheel_SurBoxDistance"     value="    50.  " />
+<var name="TGC_BigWheel_SurBoxSpcLength"    value="   200.  " />
+<var name="TGC_BigWheel_SurBoxSpcHeight"    value="    80.  " />
+<var name="TGC_BigWheel_SurBoxSpcWall"      value="     5.  " />
+
+<!--     name       =  TGC2 Big Wheel                section name       = "Supports"  -->
+<!--  **************************************************************
+      **************************************************************
+      ***                                                       ****
+      ***                      TGC Big Wheel                    ****
+      ***                                                       ****
+      **************************************************************
+      **************************************************************  -->
+<var name="TBWH_BigWheel_ZPosL"             value=" 14730.  "/>
+
+<var name="TBWH_BigWheel_RadDist00"         value="  2445.  "/>
+<var name="TBWH_BigWheel_RadDist01"         value="  3700.  - TBWH_BigWheel_RadDist00"/>
+<var name="TBWH_BigWheel_RadDist02"         value="  4562.  - TBWH_BigWheel_RadDist00"/>
+<var name="TBWH_BigWheel_RadDist03"         value="  5946.  - TBWH_BigWheel_RadDist00"/>
+<var name="TBWH_BigWheel_RadDist04"         value="  6974.  - TBWH_BigWheel_RadDist00"/>
+<var name="TBWH_BigWheel_RadDist05"         value="  8134.  - TBWH_BigWheel_RadDist00"/>
+<var name="TBWH_BigWheel_RadDist06"         value="  9161.  - TBWH_BigWheel_RadDist00"/>
+<var name="TBWH_BigWheel_RadDist07"         value=" 10527.  - TBWH_BigWheel_RadDist00"/>
+<var name="TBWH_BigWheel_RadDist08"         value=" 11348.  - TBWH_BigWheel_RadDist00"/>
+<var name="TBWH_BigWheel_RadDist09"         value=" 12230.  "/>
+<var name="TBWH_BigWheel_RadDistOutPlate"   value="  4195.  "/>
+<var name="TBWH_BigWheel_RadDistPlate02"    value="  4140.  - TBWH_BigWheel_RadDist00  +  170. + 30. "/> <!-- two different values on same blueprint -->
+<var name="TBWH_BigWheel_PhiDistRPlate1"    value="   388.  "/>
+
+<var name="TBWH_BigWheel_ZThickPhiPlate"    value="    30.  "/>
+<var name="TBWH_BigWheel_WallThickPhiPlate" value="    16.  "/>
+<var name="TBWH_BigWheel_RThickPhiPlate1"   value="   200.  "/>
+<var name="TBWH_BigWheel_RThickPhiPlate2"   value="   150.  "/>
+<var name="TBWH_BigWheel_RThickPhiPlate3"   value="   100.  "/>
+<var name="TBWH_BigWheel_ZThickRPlate"      value="   150.  "/>
+<var name="TBWH_BigWheel_PhiThickRPlate"    value="    50.  "/>
+<var name="TBWH_BigWheel_WallThickRPlate"   value="     5.  "/>
+
+<var name="TBWH_BigWheel_PhiPlaDelEvenOdd"  value="TBWH_BigWheel_RThickPhiPlate2 + TBWH_BigWheel_PhiThickRPlate/2."/>
+
+<var name="TBWH_BigWheel_PhiStepAngle1"     value="     7.5 * GENV_PiS180 "/>
+<var name="TBWH_BigWheel_PhiStepAngle2"     value="    15.  * GENV_PiS180  "/>
+
+<var name="TBWH_BigWheel_PhiStep1toP1"      value="   -88.  "/> <!-- estimate -->
+<var name="TBWH_BigWheel_PhiStepP1toP2"     value="   372.  "/> <!-- estimate -->
+
+<var name="TBWH_BigWheel_PhiStep2toP1"      value="   459.  "/>
+<var name="TBWH_BigWheel_PhiStepP2toP2"     value="   780. + TBWH_BigWheel_PhiThickRPlate"/> <!-- estimate -->
+
+<var name="TBWH_BigWheel_TubeInnerR"        value="  2335.  "/>
+<var name="TBWH_BigWheel_TubeOuterR"        value="  TBWH_BigWheel_TubeInnerR + 405. "/>
+
+<!-- lowest phi plate - plate 1 -->
+<gvxysx name="TBWH_PhiPlate1" material="Aluminium" dZ="TBWH_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y=" (TBWH_BigWheel_RadDist00+TBWH_BigWheel_RadDist01+TBWH_BigWheel_RThickPhiPlate1)*sin(TBWH_BigWheel_PhiStepAngle2); TBWH_BigWheel_RadDist01+TBWH_BigWheel_RThickPhiPlate1"/>
+  <gvxy_point X_Y=" (TBWH_BigWheel_RadDist00+TBWH_BigWheel_RadDist01)*sin(TBWH_BigWheel_PhiStepAngle2); TBWH_BigWheel_RadDist01"/>
+</gvxysx>
+
+<!-- first phi plate with kink - plate 2 -->
+<var name="TBWH_PhiPlate2_XPos1"  value="tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RadDist02-TBWH_BigWheel_PhiStep1toP1/cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/cos(TBWH_BigWheel_PhiStepAngle2)/2." />
+<var name="TBWH_PhiPlate2_XPos3"  value="tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RadDist02-TBWH_BigWheel_PhiStep1toP1/cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/cos(TBWH_BigWheel_PhiStepAngle2)/2.+tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RThickPhiPlate2" />
+<var name="TBWH_PhiPlate2_XPos2"  value="TBWH_PhiPlate2_XPos1+(TBWH_BigWheel_RadDist02*tan(TBWH_BigWheel_PhiStepAngle2)-TBWH_PhiPlate2_XPos1)*cos(TBWH_BigWheel_PhiStepAngle2)*cos(TBWH_BigWheel_PhiStepAngle2)" />
+<var name="TBWH_PhiPlate2_YPos2"  value="TBWH_BigWheel_RadDist02-(TBWH_BigWheel_RadDist02*tan(TBWH_BigWheel_PhiStepAngle2)-TBWH_PhiPlate2_XPos1)*cos(TBWH_BigWheel_PhiStepAngle2)*sin(TBWH_BigWheel_PhiStepAngle2)" />
+
+<gvxysx name="TBWH_PhiPlate2_Even" material="Aluminium" dZ="TBWH_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TBWH_PhiPlate2_XPos3; TBWH_BigWheel_RadDist02+TBWH_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate2_XPos2+TBWH_BigWheel_RThickPhiPlate2*sin(TBWH_BigWheel_PhiStepAngle2)+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2); TBWH_PhiPlate2_YPos2+TBWH_BigWheel_RThickPhiPlate2*cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate2_XPos2+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2); TBWH_PhiPlate2_YPos2-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate2_XPos1; TBWH_BigWheel_RadDist02"/>
+</gvxysx>
+
+<gvxysx name="TBWH_PhiPlate2_Odd" material="Aluminium" dZ="TBWH_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TBWH_PhiPlate2_XPos3-tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_BigWheel_RadDist02+TBWH_BigWheel_RThickPhiPlate2-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate2_XPos2+TBWH_BigWheel_RThickPhiPlate2*sin(TBWH_BigWheel_PhiStepAngle2)+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2)-tan(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_PhiPlate2_YPos2+TBWH_BigWheel_RThickPhiPlate2*cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate2_XPos2+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2)-tan(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_PhiPlate2_YPos2-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate2_XPos1-tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_BigWheel_RadDist02-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+</gvxysx>
+
+<!-- second phi plate with kink - plate 3 -->
+<var name="TBWH_PhiPlate3_XPos1"  value="tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RadDist03-TBWH_BigWheel_PhiStep1toP1/cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/cos(TBWH_BigWheel_PhiStepAngle2)/2." />
+<var name="TBWH_PhiPlate3_XPos3"  value="tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RadDist03-TBWH_BigWheel_PhiStep1toP1/cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/cos(TBWH_BigWheel_PhiStepAngle2)/2.+tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RThickPhiPlate3" />
+<var name="TBWH_PhiPlate3_XPos2"  value="TBWH_PhiPlate3_XPos1+(TBWH_BigWheel_RadDist03*tan(TBWH_BigWheel_PhiStepAngle2)-TBWH_PhiPlate3_XPos1)*cos(TBWH_BigWheel_PhiStepAngle2)*cos(TBWH_BigWheel_PhiStepAngle2)-cos(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiThickRPlate" />
+<var name="TBWH_PhiPlate3_YPos2"  value="TBWH_BigWheel_RadDist03-(TBWH_BigWheel_RadDist03*tan(TBWH_BigWheel_PhiStepAngle2)-TBWH_PhiPlate3_XPos1)*cos(TBWH_BigWheel_PhiStepAngle2)*sin(TBWH_BigWheel_PhiStepAngle2)+sin(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiThickRPlate" />
+
+<gvxysx name="TBWH_PhiPlate3" material="Aluminium" dZ="TBWH_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TBWH_PhiPlate3_XPos3; TBWH_BigWheel_RadDist03+TBWH_BigWheel_RThickPhiPlate3"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate3_XPos2+TBWH_BigWheel_RThickPhiPlate3*sin(TBWH_BigWheel_PhiStepAngle2)+(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1)*cos(TBWH_BigWheel_PhiStepAngle2); TBWH_PhiPlate3_YPos2+TBWH_BigWheel_RThickPhiPlate3*cos(TBWH_BigWheel_PhiStepAngle2)-(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1)*sin(TBWH_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate3_XPos2+(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1)*cos(TBWH_BigWheel_PhiStepAngle2); TBWH_PhiPlate3_YPos2-(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1)*sin(TBWH_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate3_XPos1; TBWH_BigWheel_RadDist03"/>
+</gvxysx>
+
+<!-- third phi plate with kink - plate 4 -->
+<var name="TBWH_PhiPlate4_XPos1"  value="tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RadDist04-TBWH_BigWheel_PhiStep1toP1/cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/cos(TBWH_BigWheel_PhiStepAngle2)/2." />
+<var name="TBWH_PhiPlate4_XPos3"  value="tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RadDist04-TBWH_BigWheel_PhiStep1toP1/cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/cos(TBWH_BigWheel_PhiStepAngle2)/2.+tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RThickPhiPlate2" />
+<var name="TBWH_PhiPlate4_XPos2"  value="TBWH_PhiPlate4_XPos1+(TBWH_BigWheel_RadDist04*tan(TBWH_BigWheel_PhiStepAngle2)-TBWH_PhiPlate4_XPos1)*cos(TBWH_BigWheel_PhiStepAngle2)*cos(TBWH_BigWheel_PhiStepAngle2)" />
+<var name="TBWH_PhiPlate4_YPos2"  value="TBWH_BigWheel_RadDist04-(TBWH_BigWheel_RadDist04*tan(TBWH_BigWheel_PhiStepAngle2)-TBWH_PhiPlate4_XPos1)*cos(TBWH_BigWheel_PhiStepAngle2)*sin(TBWH_BigWheel_PhiStepAngle2)" />
+
+<gvxysx name="TBWH_PhiPlate4_Even" material="Aluminium" dZ="TBWH_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TBWH_PhiPlate4_XPos3; TBWH_BigWheel_RadDist04+TBWH_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate4_XPos2+TBWH_BigWheel_RThickPhiPlate2*sin(TBWH_BigWheel_PhiStepAngle2)+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2); TBWH_PhiPlate4_YPos2+TBWH_BigWheel_RThickPhiPlate2*cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate4_XPos2+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2); TBWH_PhiPlate4_YPos2-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate4_XPos1; TBWH_BigWheel_RadDist04"/>
+</gvxysx>
+
+<gvxysx name="TBWH_PhiPlate4_Odd" material="Aluminium" dZ="TBWH_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TBWH_PhiPlate4_XPos3-tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_BigWheel_RadDist04+TBWH_BigWheel_RThickPhiPlate2-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate4_XPos2+TBWH_BigWheel_RThickPhiPlate2*sin(TBWH_BigWheel_PhiStepAngle2)+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2)-tan(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_PhiPlate4_YPos2+TBWH_BigWheel_RThickPhiPlate2*cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate4_XPos2+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2)-tan(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_PhiPlate4_YPos2-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate4_XPos1-tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_BigWheel_RadDist04-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+</gvxysx>
+
+<!-- forth phi plate with kink - plate 5 -->
+<var name="TBWH_PhiPlate5_XPos1"  value="tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RadDist05-TBWH_BigWheel_PhiStep1toP1/cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/cos(TBWH_BigWheel_PhiStepAngle2)/2." />
+<var name="TBWH_PhiPlate5_XPos3"  value="tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RadDist05-TBWH_BigWheel_PhiStep1toP1/cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/cos(TBWH_BigWheel_PhiStepAngle2)/2.+tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RThickPhiPlate3" />
+<var name="TBWH_PhiPlate5_XPos2"  value="TBWH_PhiPlate5_XPos1+(TBWH_BigWheel_RadDist05*tan(TBWH_BigWheel_PhiStepAngle2)-TBWH_PhiPlate5_XPos1)*cos(TBWH_BigWheel_PhiStepAngle2)*cos(TBWH_BigWheel_PhiStepAngle2)-cos(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiThickRPlate" />
+<var name="TBWH_PhiPlate5_YPos2"  value="TBWH_BigWheel_RadDist05-(TBWH_BigWheel_RadDist05*tan(TBWH_BigWheel_PhiStepAngle2)-TBWH_PhiPlate5_XPos1)*cos(TBWH_BigWheel_PhiStepAngle2)*sin(TBWH_BigWheel_PhiStepAngle2)+sin(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiThickRPlate" />
+
+<gvxysx name="TBWH_PhiPlate5" material="Aluminium" dZ="TBWH_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TBWH_PhiPlate5_XPos3; TBWH_BigWheel_RadDist05+TBWH_BigWheel_RThickPhiPlate3"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate5_XPos2+TBWH_BigWheel_RThickPhiPlate3*sin(TBWH_BigWheel_PhiStepAngle2)+(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1)*cos(TBWH_BigWheel_PhiStepAngle2); TBWH_PhiPlate5_YPos2+TBWH_BigWheel_RThickPhiPlate3*cos(TBWH_BigWheel_PhiStepAngle2)-(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1)*sin(TBWH_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate5_XPos2+(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1)*cos(TBWH_BigWheel_PhiStepAngle2); TBWH_PhiPlate5_YPos2-(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1)*sin(TBWH_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate5_XPos1; TBWH_BigWheel_RadDist05"/>
+</gvxysx>
+
+<!-- fifth phi plate with kink - plate 6 -->
+<var name="TBWH_PhiPlate6_XPos1"  value="tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RadDist06-TBWH_BigWheel_PhiStep1toP1/cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/cos(TBWH_BigWheel_PhiStepAngle2)/2." />
+<var name="TBWH_PhiPlate6_XPos3"  value="tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RadDist06-TBWH_BigWheel_PhiStep1toP1/cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/cos(TBWH_BigWheel_PhiStepAngle2)/2.+tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RThickPhiPlate2" />
+<var name="TBWH_PhiPlate6_XPos2"  value="TBWH_PhiPlate6_XPos1+(TBWH_BigWheel_RadDist06*tan(TBWH_BigWheel_PhiStepAngle2)-TBWH_PhiPlate6_XPos1)*cos(TBWH_BigWheel_PhiStepAngle2)*cos(TBWH_BigWheel_PhiStepAngle2)" />
+<var name="TBWH_PhiPlate6_YPos2"  value="TBWH_BigWheel_RadDist06-(TBWH_BigWheel_RadDist06*tan(TBWH_BigWheel_PhiStepAngle2)-TBWH_PhiPlate6_XPos1)*cos(TBWH_BigWheel_PhiStepAngle2)*sin(TBWH_BigWheel_PhiStepAngle2)" />
+
+<gvxysx name="TBWH_PhiPlate6_Even" material="Aluminium" dZ="TBWH_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TBWH_PhiPlate6_XPos3; TBWH_BigWheel_RadDist06+TBWH_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate6_XPos2+TBWH_BigWheel_RThickPhiPlate2*sin(TBWH_BigWheel_PhiStepAngle2)+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2); TBWH_PhiPlate6_YPos2+TBWH_BigWheel_RThickPhiPlate2*cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate6_XPos2+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2); TBWH_PhiPlate6_YPos2-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate6_XPos1; TBWH_BigWheel_RadDist06"/>
+</gvxysx>
+
+<gvxysx name="TBWH_PhiPlate6_Odd" material="Aluminium" dZ="TBWH_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TBWH_PhiPlate6_XPos3-tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_BigWheel_RadDist06+TBWH_BigWheel_RThickPhiPlate2-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate6_XPos2+TBWH_BigWheel_RThickPhiPlate2*sin(TBWH_BigWheel_PhiStepAngle2)+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2)-tan(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_PhiPlate6_YPos2+TBWH_BigWheel_RThickPhiPlate2*cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate6_XPos2+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2)-tan(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_PhiPlate6_YPos2-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate6_XPos1-tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_BigWheel_RadDist06-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+</gvxysx>
+
+<!-- sixth phi plate with kink - plate 7 -->
+<var name="TBWH_PhiPlate7_XPos1"  value="tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RadDist07-TBWH_BigWheel_PhiStep1toP1/cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/cos(TBWH_BigWheel_PhiStepAngle2)/2." />
+<var name="TBWH_PhiPlate7_XPos3"  value="tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RadDist07-TBWH_BigWheel_PhiStep1toP1/cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/cos(TBWH_BigWheel_PhiStepAngle2)/2.+tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RThickPhiPlate3" />
+<var name="TBWH_PhiPlate7_XPos2"  value="TBWH_PhiPlate7_XPos1+(TBWH_BigWheel_RadDist07*tan(TBWH_BigWheel_PhiStepAngle2)-TBWH_PhiPlate7_XPos1)*cos(TBWH_BigWheel_PhiStepAngle2)*cos(TBWH_BigWheel_PhiStepAngle2)-cos(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiThickRPlate" />
+<var name="TBWH_PhiPlate7_YPos2"  value="TBWH_BigWheel_RadDist07-(TBWH_BigWheel_RadDist07*tan(TBWH_BigWheel_PhiStepAngle2)-TBWH_PhiPlate7_XPos1)*cos(TBWH_BigWheel_PhiStepAngle2)*sin(TBWH_BigWheel_PhiStepAngle2)+sin(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiThickRPlate" />
+
+<gvxysx name="TBWH_PhiPlate7" material="Aluminium" dZ="TBWH_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TBWH_PhiPlate7_XPos3; TBWH_BigWheel_RadDist07+TBWH_BigWheel_RThickPhiPlate3"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate7_XPos2+TBWH_BigWheel_RThickPhiPlate3*sin(TBWH_BigWheel_PhiStepAngle2)+(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1)*cos(TBWH_BigWheel_PhiStepAngle2); TBWH_PhiPlate7_YPos2+TBWH_BigWheel_RThickPhiPlate3*cos(TBWH_BigWheel_PhiStepAngle2)-(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1)*sin(TBWH_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate7_XPos2+(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1)*cos(TBWH_BigWheel_PhiStepAngle2); TBWH_PhiPlate7_YPos2-(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1)*sin(TBWH_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate7_XPos1; TBWH_BigWheel_RadDist07"/>
+</gvxysx>
+
+<!-- seventh phi plate with kink - plate 8 -->
+<var name="TBWH_PhiPlate8_XPos1"  value="tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RadDist08-TBWH_BigWheel_PhiStep1toP1/cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/cos(TBWH_BigWheel_PhiStepAngle2)/2." />
+<var name="TBWH_PhiPlate8_XPos3"  value="tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RadDist08-TBWH_BigWheel_PhiStep1toP1/cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/cos(TBWH_BigWheel_PhiStepAngle2)/2.+tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RThickPhiPlate2" />
+<var name="TBWH_PhiPlate8_XPos2"  value="TBWH_PhiPlate8_XPos1+(TBWH_BigWheel_RadDist08*tan(TBWH_BigWheel_PhiStepAngle2)-TBWH_PhiPlate8_XPos1)*cos(TBWH_BigWheel_PhiStepAngle2)*cos(TBWH_BigWheel_PhiStepAngle2)" />
+<var name="TBWH_PhiPlate8_YPos2"  value="TBWH_BigWheel_RadDist08-(TBWH_BigWheel_RadDist08*tan(TBWH_BigWheel_PhiStepAngle2)-TBWH_PhiPlate8_XPos1)*cos(TBWH_BigWheel_PhiStepAngle2)*sin(TBWH_BigWheel_PhiStepAngle2)" />
+
+<gvxysx name="TBWH_PhiPlate8_Even" material="Aluminium" dZ="TBWH_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TBWH_PhiPlate8_XPos3; TBWH_BigWheel_RadDist08+TBWH_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate8_XPos2+TBWH_BigWheel_RThickPhiPlate2*sin(TBWH_BigWheel_PhiStepAngle2)+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2); TBWH_PhiPlate8_YPos2+TBWH_BigWheel_RThickPhiPlate2*cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate8_XPos2+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2); TBWH_PhiPlate8_YPos2-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate8_XPos1; TBWH_BigWheel_RadDist08"/>
+</gvxysx>
+
+<gvxysx name="TBWH_PhiPlate8_Odd" material="Aluminium" dZ="TBWH_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TBWH_PhiPlate8_XPos3-tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_BigWheel_RadDist08+TBWH_BigWheel_RThickPhiPlate2-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate8_XPos2+TBWH_BigWheel_RThickPhiPlate2*sin(TBWH_BigWheel_PhiStepAngle2)+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2)-tan(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_PhiPlate8_YPos2+TBWH_BigWheel_RThickPhiPlate2*cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate8_XPos2+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2)-tan(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_PhiPlate8_YPos2-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate8_XPos1-tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_BigWheel_RadDist08-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+</gvxysx>
+
+<!-- first R plate - center -->
+<box name="TBWH_RPlate1_base" material="Aluminium"   X_Y_Z=" TBWH_BigWheel_PhiThickRPlate; TBWH_BigWheel_RadDist09-TBWH_BigWheel_RadDistPlate02-TBWH_BigWheel_RadDist00; TBWH_BigWheel_ZThickRPlate" />
+<box name="TBWH_RPlate1_sub"  material="Aluminium"   X_Y_Z=" TBWH_BigWheel_PhiThickRPlate; TBWH_BigWheel_RadDist09-TBWH_BigWheel_RadDistPlate02-TBWH_BigWheel_RadDist00+TBWH_BigWheel_WallThickRPlate; TBWH_BigWheel_ZThickRPlate-2.*TBWH_BigWheel_WallThickRPlate" />
+
+<subtraction name="TBWH_RPlate1">
+  <posXYZ volume="TBWH_RPlate1_base" X_Y_Z=" TBWH_BigWheel_PhiDistRPlate1/2.+TBWH_BigWheel_PhiThickRPlate/2.; (TBWH_BigWheel_RadDist09+TBWH_BigWheel_RadDistPlate02-TBWH_BigWheel_RadDist00)/2.; 0." />
+  <posXYZ volume="TBWH_RPlate1_sub"  X_Y_Z=" TBWH_BigWheel_PhiDistRPlate1/2.+TBWH_BigWheel_PhiThickRPlate/2.+TBWH_BigWheel_WallThickRPlate; (TBWH_BigWheel_RadDist09+TBWH_BigWheel_RadDistPlate02-TBWH_BigWheel_RadDist00)/2.; 0." />
+</subtraction>
+
+<!-- second R plate - 7.5 degrees -->
+<box name="TBWH_RPlate2_base" material="Aluminium"   X_Y_Z=" TBWH_BigWheel_PhiThickRPlate; (TBWH_BigWheel_RadDist09-TBWH_BigWheel_RadDistPlate02-TBWH_BigWheel_RadDist00)/cos(TBWH_BigWheel_PhiStepAngle1); TBWH_BigWheel_ZThickRPlate" />
+<box name="TBWH_RPlate2_sub"  material="Aluminium"   X_Y_Z=" TBWH_BigWheel_PhiThickRPlate; (TBWH_BigWheel_RadDist09-TBWH_BigWheel_RadDistPlate02-TBWH_BigWheel_RadDist00+TBWH_BigWheel_WallThickRPlate)/cos(TBWH_BigWheel_PhiStepAngle1); TBWH_BigWheel_ZThickRPlate-2.*TBWH_BigWheel_WallThickRPlate" />
+
+<subtraction name="TBWH_RPlate2">
+  <posXYZ volume="TBWH_RPlate2_base" X_Y_Z=" TBWH_PhiPlate2_XPos1+(TBWH_BigWheel_RadDist09+TBWH_BigWheel_RadDistPlate02-TBWH_BigWheel_RadDist00-2.*TBWH_BigWheel_RadDist02)*tan(TBWH_BigWheel_PhiStepAngle1)/2.; (TBWH_BigWheel_RadDist09+TBWH_BigWheel_RadDistPlate02-TBWH_BigWheel_RadDist00)/2.; 0." rot=" 0.;   0.; -TBWH_BigWheel_PhiStepAngle1/GENV_PiS180" />
+  <posXYZ volume="TBWH_RPlate2_sub"  X_Y_Z=" TBWH_PhiPlate2_XPos1+(TBWH_BigWheel_RadDist09+TBWH_BigWheel_RadDistPlate02-TBWH_BigWheel_RadDist00-2.*TBWH_BigWheel_RadDist02)*tan(TBWH_BigWheel_PhiStepAngle1)/2.-TBWH_BigWheel_WallThickRPlate; (TBWH_BigWheel_RadDist09+TBWH_BigWheel_RadDistPlate02-TBWH_BigWheel_RadDist00)/2.; 0." rot=" 0.;   0.; -TBWH_BigWheel_PhiStepAngle1/GENV_PiS180" />
+</subtraction>
+
+<!-- third R plate - 7.5 degrees TBWH_BigWheel_PhiThickRPlate-->
+<var name="TBWH_RPlate3_length"  value="(TBWH_BigWheel_RadDist09 - TBWH_BigWheel_RadDist00 - (TBWH_PhiPlate2_YPos2-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)) - (TBWH_BigWheel_PhiStep2toP1 + TBWH_BigWheel_PhiThickRPlate) * sin(TBWH_BigWheel_PhiStepAngle2) ) / cos(TBWH_BigWheel_PhiStepAngle1)" />
+
+<box name="TBWH_RPlate3_base" material="Aluminium"   X_Y_Z=" TBWH_BigWheel_PhiThickRPlate; TBWH_RPlate3_length; TBWH_BigWheel_ZThickRPlate" />
+<box name="TBWH_RPlate3_sub1"  material="Aluminium"   X_Y_Z=" TBWH_BigWheel_PhiThickRPlate; TBWH_RPlate3_length + TBWH_BigWheel_WallThickRPlate/cos(TBWH_BigWheel_PhiStepAngle1); TBWH_BigWheel_ZThickRPlate-2.*TBWH_BigWheel_WallThickRPlate" />
+<box name="TBWH_RPlate3_sub2"  material="Aluminium"   X_Y_Z=" TBWH_BigWheel_PhiThickRPlate; TBWH_RPlate3_length; TBWH_BigWheel_ZThickRPlate+2.*TBWH_BigWheel_WallThickRPlate" />
+
+<subtraction name="TBWH_RPlate3_tmp">
+  <posXYZ volume="TBWH_RPlate3_base" X_Y_Z=" TBWH_RPlate3_length/2.*sin(TBWH_BigWheel_PhiStepAngle1); TBWH_RPlate3_length/2.*cos(TBWH_BigWheel_PhiStepAngle1); 0." rot=" 0.;   0.; -TBWH_BigWheel_PhiStepAngle1/GENV_PiS180" />
+  <posXYZ volume="TBWH_RPlate3_sub1"  X_Y_Z=" TBWH_RPlate3_length/2.*sin(TBWH_BigWheel_PhiStepAngle1)-TBWH_BigWheel_WallThickRPlate; TBWH_RPlate3_length/2.*cos(TBWH_BigWheel_PhiStepAngle1); 0." rot=" 0.; 0.; -TBWH_BigWheel_PhiStepAngle1/GENV_PiS180" />
+  <posXYZ volume="TBWH_RPlate3_sub2" X_Y_Z="TBWH_RPlate3_length/2.*sin(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/2*(cos(TBWH_BigWheel_PhiStepAngle1)-cos(TBWH_BigWheel_PhiStepAngle2));TBWH_RPlate3_length/2.*cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/2*(sin(TBWH_BigWheel_PhiStepAngle2)-sin(TBWH_BigWheel_PhiStepAngle1)); 0." rot=" 0.; 0.; -TBWH_BigWheel_PhiStepAngle2/GENV_PiS180" />
+</subtraction>
+
+<var name="TBWH_RPlate3_PosX" value="TBWH_PhiPlate2_XPos2+(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1)*cos(TBWH_BigWheel_PhiStepAngle2)+TBWH_BigWheel_PhiThickRPlate*(0.5*cos(TBWH_BigWheel_PhiStepAngle1)-cos(TBWH_BigWheel_PhiStepAngle2))-cos(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiThickRPlate" />
+
+<var name="TBWH_RPlate3_PosY" value="TBWH_PhiPlate2_YPos2+(TBWH_BigWheel_PhiStep2toP1-TBWH_BigWheel_PhiStepP2toP2)*sin(TBWH_BigWheel_PhiStepAngle2)+TBWH_BigWheel_PhiThickRPlate*(sin(TBWH_BigWheel_PhiStepAngle2)-0.5*sin(TBWH_BigWheel_PhiStepAngle1))+sin(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiThickRPlate" />
+
+<composition name="TBWH_RPlate3" >
+  <posXYZ  volume="TBWH_RPlate3_tmp" X_Y_Z=" TBWH_RPlate3_PosX-GENV_Eps; TBWH_RPlate3_PosY ; 0." />
+</composition>
+
+<!-- first R plate - 15 degrees -->
+<box name="TBWH_RPlate4_base" material="Aluminium"   X_Y_Z=" TBWH_BigWheel_PhiThickRPlate; (TBWH_BigWheel_RadDist09-TBWH_BigWheel_RadDist00)/cos(TBWH_BigWheel_PhiStepAngle2); TBWH_BigWheel_ZThickRPlate" />
+<box name="TBWH_RPlate4_sub"  material="Aluminium"   X_Y_Z=" TBWH_BigWheel_PhiThickRPlate; (TBWH_BigWheel_RadDist09-TBWH_BigWheel_RadDist00+TBWH_BigWheel_WallThickRPlate)/cos(TBWH_BigWheel_PhiStepAngle2); TBWH_BigWheel_ZThickRPlate-2.*TBWH_BigWheel_WallThickRPlate" />
+
+<subtraction name="TBWH_RPlate4">
+  <posXYZ volume="TBWH_RPlate4_base" X_Y_Z=" (TBWH_BigWheel_RadDist09-TBWH_BigWheel_RadDist00)*tan(TBWH_BigWheel_PhiStepAngle2)/2.+(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1-1.5*TBWH_BigWheel_PhiThickRPlate)/cos(TBWH_BigWheel_PhiStepAngle2); (TBWH_BigWheel_RadDist09-TBWH_BigWheel_RadDist00)/2.; 0." rot=" 0.;   0.; -TBWH_BigWheel_PhiStepAngle2/GENV_PiS180" />
+  <posXYZ volume="TBWH_RPlate4_sub"  X_Y_Z=" (TBWH_BigWheel_RadDist09-TBWH_BigWheel_RadDist00)*tan(TBWH_BigWheel_PhiStepAngle2)/2.-TBWH_BigWheel_WallThickRPlate+(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1-1.5*TBWH_BigWheel_PhiThickRPlate)/cos(TBWH_BigWheel_PhiStepAngle2); (TBWH_BigWheel_RadDist09-TBWH_BigWheel_RadDist00)/2.; 0." rot=" 0.;   0.; -TBWH_BigWheel_PhiStepAngle2/GENV_PiS180" />
+</subtraction>
+
+<!-- second R plate - 15 degrees -->
+<box name="TBWH_RPlate5_base" material="Aluminium"   X_Y_Z=" TBWH_BigWheel_PhiThickRPlate; (TBWH_BigWheel_RadDist09-cos(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_RadDistOutPlate)/cos(TBWH_BigWheel_PhiStepAngle2); TBWH_BigWheel_ZThickRPlate" />
+<box name="TBWH_RPlate5_sub"  material="Aluminium"   X_Y_Z=" TBWH_BigWheel_PhiThickRPlate; (TBWH_BigWheel_RadDist09-cos(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_RadDistOutPlate)/cos(TBWH_BigWheel_PhiStepAngle2)+TBWH_BigWheel_WallThickRPlate; TBWH_BigWheel_ZThickRPlate-2.*TBWH_BigWheel_WallThickRPlate" />
+
+<var name="TBWH_RPlate5_PosX" value="sin(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_RadDistOutPlate/2. +TBWH_PhiPlate2_XPos2 +TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2) +tan(TBWH_BigWheel_PhiStepAngle2)*(TBWH_BigWheel_RadDist09/2.-TBWH_PhiPlate2_YPos2+TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_RadDist00)"/>
+
+<subtraction name="TBWH_RPlate5">
+  <posXYZ volume="TBWH_RPlate5_base" X_Y_Z=" TBWH_RPlate5_PosX - cos(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiThickRPlate/2.; (TBWH_BigWheel_RadDist09+cos(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_RadDistOutPlate)/2. - TBWH_BigWheel_RadDist00 + sin(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiThickRPlate/2.; 0." rot=" 0.;   0.; -TBWH_BigWheel_PhiStepAngle2/GENV_PiS180" />
+  <posXYZ volume="TBWH_RPlate5_sub"  X_Y_Z=" TBWH_RPlate5_PosX - cos(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiThickRPlate/2.+TBWH_BigWheel_WallThickRPlate; (TBWH_BigWheel_RadDist09+cos(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_RadDistOutPlate)/2.- TBWH_BigWheel_RadDist00 + sin(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiThickRPlate/2.; 0." rot=" 0.;   0.; -TBWH_BigWheel_PhiStepAngle2/GENV_PiS180" />
+</subtraction>
+
+<composition name="TBWH_Support_EvenSector_ASide">
+  <posXYZ volume="TBWH_PhiPlate1"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate2_Even"  X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate3"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate4_Even"  X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate5"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate6_Even"  X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate7"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate8_Even"  X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_RPlate1"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate1"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate2"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate2"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate3"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate3"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate4"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate4"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate5"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate5"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+</composition>
+
+<composition name="TBWH_Support_OddSector_ASide">
+  <posXYZ volume="TBWH_PhiPlate1"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate2_Odd"   X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate3"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate4_Odd"   X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate5"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate6_Odd"   X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate7"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate8_Odd"   X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_RPlate1"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate1"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate2"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate2"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate3"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate3"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate4"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate4"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate5"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate5"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+</composition>
+
+<composition name="TBWH_Support_EvenSector_CSide">
+  <posXYZ volume="TBWH_PhiPlate1"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate2_Even"  X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate3"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate4_Even"  X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate5"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate6_Even"  X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate7"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate8_Even"  X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_RPlate1"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate1"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate2"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate2"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate3"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate3"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate4"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate4"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate5"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate5"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+</composition>
+
+<composition name="TBWH_Support_OddSector_CSide">
+  <posXYZ volume="TBWH_PhiPlate1"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate2_Odd"   X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate3"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate4_Odd"   X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate5"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate6_Odd"   X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate7"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate8_Odd"   X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_RPlate1"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate1"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate2"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate2"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate3"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate3"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate4"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate4"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate5"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate5"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+</composition>
+
+<!-- tube and boxes are rather rouhg approximated here - should be okay though - Cavern Background only -->
+
+<tubs name="TBWH_CentralTube" material="Aluminium" Rio_Z="TBWH_BigWheel_TubeInnerR; TBWH_BigWheel_TubeOuterR; TBWH_BigWheel_WallThickPhiPlate" nbPhi="20" />
+
+<box name="TBWH_SurBox_base" material="Aluminium" X_Y_Z=" 2.*TBWH_BigWheel_RadDist09*tan(TBWH_BigWheel_PhiStepAngle2); TGC_BigWheel_SurBoxSideLength; TGC_BigWheel_SurBoxSideLength" />
+<box name="TBWH_SurBox_inner" material="Aluminium" X_Y_Z=" 2.*TBWH_BigWheel_RadDist09*tan(TBWH_BigWheel_PhiStepAngle2)+2.*GENV_Eps; TGC_BigWheel_SurBoxSideLength-2.*TGC_BigWheel_SurBoxSpcWall; TGC_BigWheel_SurBoxSideLength-2.*TGC_BigWheel_SurBoxSpcWall" />
+
+<subtraction name="TBWH_SurBox_default" >
+  <posXYZ volume="TBWH_SurBox_base"  X_Y_Z=" 0.; TBWH_BigWheel_RadDist09+TGC_BigWheel_SurBoxSideLength; 0." />
+  <posXYZ volume="TBWH_SurBox_inner"  X_Y_Z=" 0.; TBWH_BigWheel_RadDist09+TGC_BigWheel_SurBoxSideLength; 0." />
+</subtraction>
+
+<box name="TBWH_SurBoxSpc_base" material="Aluminium" X_Y_Z=" 2.*TBWH_BigWheel_RadDist09*tan(TBWH_BigWheel_PhiStepAngle2); TGC_BigWheel_SurBoxSpcLength; TGC_BigWheel_SurBoxSpcHeight" />
+<box name="TBWH_SurBoxSpc_inner" material="Aluminium" X_Y_Z="  2.*TBWH_BigWheel_RadDist09*tan(TBWH_BigWheel_PhiStepAngle2)+2.*GENV_Eps; TGC_BigWheel_SurBoxSpcLength-2.*TGC_BigWheel_SurBoxSpcWall; TGC_BigWheel_SurBoxSpcHeight" />
+
+<subtraction name="TBWH_SurBoxSpc" >
+  <posXYZ volume="TBWH_SurBoxSpc_base"   X_Y_Z=" 0.; TBWH_BigWheel_RadDist09+1.5*TGC_BigWheel_SurBoxSideLength+TGC_BigWheel_SurBoxDistance/2.; TGC_BigWheel_SurBoxSideLength/2.+TGC_BigWheel_SurBoxSpcHeight/2." />
+  <posXYZ volume="TBWH_SurBoxSpc_inner"  X_Y_Z=" 0.; TBWH_BigWheel_RadDist09+1.5*TGC_BigWheel_SurBoxSideLength+TGC_BigWheel_SurBoxDistance/2.; TGC_BigWheel_SurBoxSideLength/2.+TGC_BigWheel_SurBoxSpcHeight/2.-TGC_BigWheel_SurBoxSpcWall" />
+</subtraction>
+
+<composition name="TBWH_SurBox_extended" >
+  <posXYZ volume="TBWH_SurBox_default"  X_Y_Z=" 0.; TGC_BigWheel_SurBoxSideLength + TGC_BigWheel_SurBoxDistance; 0." />
+  <posXYZ volume="TBWH_SurBoxSpc"       X_Y_Z=" 0.; 0.;  GENV_Eps" />
+  <posXYZ volume="TBWH_SurBoxSpc"       X_Y_Z=" 0.; 0.; -GENV_Eps" rot=" 0.; 180.; 0."/>
+</composition>
+
+<composition name="TBWH_BigWheel_ASide">
+  <foreach  index="counter"  begin="0"  loops="6" >
+    <posXYZ volume="TBWH_Support_EvenSector_ASide"  X_Y_Z=" 0.; 0.; TBWH_BigWheel_ZPosL" rot="0.; 0.; counter*60." />
+    <posXYZ volume="TBWH_Support_OddSector_ASide"   X_Y_Z=" 0.; 0.; TBWH_BigWheel_ZPosL" rot="0.; 0.; 30.+(counter)*60." />
+  </foreach>
+  <foreach  index="counter"  begin="0"  loops="12" >
+    <posXYZ volume="TBWH_SurBox_default"   X_Y_Z=" 0.; 0.; TBWH_BigWheel_ZPosL" rot="0.; 0.; counter*30." />
+  </foreach>
+  <foreach  index="counter"  begin="0"  loops="7" >
+    <posXYZ volume="TBWH_SurBox_extended"  X_Y_Z=" 0.; 0.; TBWH_BigWheel_ZPosL" rot="0.; 0.; -90.+counter*30." />
+  </foreach>
+  <posXYZ volume="TBWH_CentralTube"   X_Y_Z=" 0.; 0.; TBWH_BigWheel_ZPosL" />
+</composition>
+
+<composition name="TBWH_BigWheel_CSide">
+  <foreach  index="counter"  begin="0"  loops="6" >
+    <posXYZ volume="TBWH_Support_EvenSector_CSide"  X_Y_Z=" 0.; 0.; -TBWH_BigWheel_ZPosL" rot="0.; 0.; counter*60." />
+    <posXYZ volume="TBWH_Support_OddSector_CSide"   X_Y_Z=" 0.; 0.; -TBWH_BigWheel_ZPosL" rot="0.; 0.; 30.+(counter)*60." />
+  </foreach>
+  <foreach  index="counter"  begin="0"  loops="12" >
+    <posXYZ volume="TBWH_SurBox_default"   X_Y_Z=" 0.; 0.; -TBWH_BigWheel_ZPosL" rot="0.; 0.; counter*30." />
+  </foreach>
+  <foreach  index="counter"  begin="0"  loops="7" >
+    <posXYZ volume="TBWH_SurBox_extended"  X_Y_Z=" 0.; 0.; -TBWH_BigWheel_ZPosL" rot="0.; 0.; -90.+counter*30." />
+  </foreach>
+  <posXYZ volume="TBWH_CentralTube"   X_Y_Z=" 0.; 0.; -TBWH_BigWheel_ZPosL" />
+</composition>
+
+<composition name="TBWH_BigWheels">
+  <posXYZ volume="TBWH_BigWheel_ASide" X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="TBWH_BigWheel_CSide" X_Y_Z=" 0.; 0.; 0." />
+</composition>
+
+<!--     name       =  TGC3 Big Wheel                section name       = "Supports"  -->
+<var name="TGC3_BigWheel_ZPosL"             value=" 15150.  "/>
+
+<var name="TGC3_BigWheel_RadDist00"         value="  2445.  "/>
+<var name="TGC3_BigWheel_RadDist01"         value="   970.  "/>
+<var name="TGC3_BigWheel_RadDist02"         value="  2528.  "/>
+<var name="TGC3_BigWheel_RadDist03"         value="  3560.  "/>
+<var name="TGC3_BigWheel_RadDist04"         value="  4767.  "/>
+<var name="TGC3_BigWheel_RadDist05"         value="  5800.  "/>
+<var name="TGC3_BigWheel_RadDist06"         value="  7005.  "/>
+<var name="TGC3_BigWheel_RadDist07"         value="  8037.  "/>
+<var name="TGC3_BigWheel_RadDist08"         value="  9243.  "/>
+<var name="TGC3_BigWheel_RadDist09"         value=" 12230.  "/>
+<var name="TGC3_BigWheel_RadDistOutPlate"   value="  4150.  "/>
+<var name="TGC3_BigWheel_RadDistPlate02"    value="  2353.  "/>
+<var name="TGC3_BigWheel_PhiDistRPlate1"    value="   390.  "/>
+
+<var name="TGC3_BigWheel_ZThickPhiPlate"    value="    30.  "/>
+<var name="TGC3_BigWheel_WallThickPhiPlate" value="    16.  "/>
+<var name="TGC3_BigWheel_RThickPhiPlate1"   value="   200.  "/>
+<var name="TGC3_BigWheel_RThickPhiPlate2"   value="   130.  "/> <!-- estimated -->
+<var name="TGC3_BigWheel_ZThickRPlate"      value="   150.  "/>
+<var name="TGC3_BigWheel_PhiThickRPlate"    value="    50.  "/>
+<var name="TGC3_BigWheel_WallThickRPlate"   value="     5.  "/>
+
+<var name="TGC3_BigWheel_PhiPlaDelEvenOdd"  value="TGC3_BigWheel_RThickPhiPlate2 + TGC3_BigWheel_PhiThickRPlate"/>
+
+<var name="TGC3_BigWheel_PhiStepAngle1"     value="     7.5 * GENV_PiS180 "/>
+<var name="TGC3_BigWheel_PhiStepAngle2"     value="    15.  * GENV_PiS180  "/>
+
+<var name="TGC3_BigWheel_PhiStep1toP1"      value="   -28.  "/> <!-- estimate -->
+<var name="TGC3_BigWheel_PhiStepP1toP2"     value="   456.  "/>
+
+<var name="TGC3_BigWheel_PhiStep2toP1"      value="   468.  "/>
+<var name="TGC3_BigWheel_PhiStepP2toP2"     value="   765. + TGC3_BigWheel_PhiThickRPlate"/> <!-- estimate -->
+
+<var name="TGC3_BigWheel_TubeInnerR"        value="  2335.  "/>
+<var name="TGC3_BigWheel_TubeOuterR"        value="  TGC3_BigWheel_TubeInnerR + 405. "/>
+
+<!-- lowest phi plate - plate 1 -->
+<gvxysx name="TGC3_PhiPlate1" material="Aluminium" dZ="TGC3_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y=" (TGC3_BigWheel_RadDist00+TGC3_BigWheel_RadDist01+TGC3_BigWheel_RThickPhiPlate1)*sin(TGC3_BigWheel_PhiStepAngle2); TGC3_BigWheel_RadDist01+TGC3_BigWheel_RThickPhiPlate1"/>
+  <gvxy_point X_Y=" (TGC3_BigWheel_RadDist00+TGC3_BigWheel_RadDist01)*sin(TGC3_BigWheel_PhiStepAngle2); TGC3_BigWheel_RadDist01"/>
+</gvxysx>
+
+<!-- first phi plate with kink - plate 2 -->
+<var name="TGC3_PhiPlate2_XPos1"  value="tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RadDist02-TGC3_BigWheel_PhiStep1toP1/cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/cos(TGC3_BigWheel_PhiStepAngle2)/2." />
+<var name="TGC3_PhiPlate2_XPos3"  value="tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RadDist02-TGC3_BigWheel_PhiStep1toP1/cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/cos(TGC3_BigWheel_PhiStepAngle2)/2.+tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RThickPhiPlate2" />
+<var name="TGC3_PhiPlate2_XPos2"  value="TGC3_PhiPlate2_XPos1+(TGC3_BigWheel_RadDist02*tan(TGC3_BigWheel_PhiStepAngle2)-TGC3_PhiPlate2_XPos1)*cos(TGC3_BigWheel_PhiStepAngle2)*cos(TGC3_BigWheel_PhiStepAngle2)" />
+<var name="TGC3_PhiPlate2_YPos2"  value="TGC3_BigWheel_RadDist02-(TGC3_BigWheel_RadDist02*tan(TGC3_BigWheel_PhiStepAngle2)-TGC3_PhiPlate2_XPos1)*cos(TGC3_BigWheel_PhiStepAngle2)*sin(TGC3_BigWheel_PhiStepAngle2)" />
+
+<gvxysx name="TGC3_PhiPlate2_Even" material="Aluminium" dZ="TGC3_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC3_PhiPlate2_XPos3; TGC3_BigWheel_RadDist02+TGC3_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate2_XPos2+TGC3_BigWheel_RThickPhiPlate2*sin(TGC3_BigWheel_PhiStepAngle2)+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2); TGC3_PhiPlate2_YPos2+TGC3_BigWheel_RThickPhiPlate2*cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate2_XPos2+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2); TGC3_PhiPlate2_YPos2-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate2_XPos1; TGC3_BigWheel_RadDist02"/>
+</gvxysx>
+
+<gvxysx name="TGC3_PhiPlate2_Odd" material="Aluminium" dZ="TGC3_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC3_PhiPlate2_XPos3-tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_BigWheel_RadDist02+TGC3_BigWheel_RThickPhiPlate2-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate2_XPos2+TGC3_BigWheel_RThickPhiPlate2*sin(TGC3_BigWheel_PhiStepAngle2)+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2)-tan(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_PhiPlate2_YPos2+TGC3_BigWheel_RThickPhiPlate2*cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate2_XPos2+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2)-tan(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_PhiPlate2_YPos2-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate2_XPos1-tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_BigWheel_RadDist02-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+</gvxysx>
+
+<!-- second phi plate with kink - plate 3 -->
+<var name="TGC3_PhiPlate3_XPos1"  value="tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RadDist03-TGC3_BigWheel_PhiStep1toP1/cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/cos(TGC3_BigWheel_PhiStepAngle2)/2." />
+<var name="TGC3_PhiPlate3_XPos3"  value="tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RadDist03-TGC3_BigWheel_PhiStep1toP1/cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/cos(TGC3_BigWheel_PhiStepAngle2)/2.+tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RThickPhiPlate2" />
+<var name="TGC3_PhiPlate3_XPos2"  value="TGC3_PhiPlate3_XPos1+(TGC3_BigWheel_RadDist03*tan(TGC3_BigWheel_PhiStepAngle2)-TGC3_PhiPlate3_XPos1)*cos(TGC3_BigWheel_PhiStepAngle2)*cos(TGC3_BigWheel_PhiStepAngle2)-cos(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiThickRPlate" />
+<var name="TGC3_PhiPlate3_YPos2"  value="TGC3_BigWheel_RadDist03-(TGC3_BigWheel_RadDist03*tan(TGC3_BigWheel_PhiStepAngle2)-TGC3_PhiPlate3_XPos1)*cos(TGC3_BigWheel_PhiStepAngle2)*sin(TGC3_BigWheel_PhiStepAngle2)+sin(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiThickRPlate" />
+
+<gvxysx name="TGC3_PhiPlate3" material="Aluminium" dZ="TGC3_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC3_PhiPlate3_XPos3; TGC3_BigWheel_RadDist03+TGC3_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate3_XPos2+TGC3_BigWheel_RThickPhiPlate2*sin(TGC3_BigWheel_PhiStepAngle2)+(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*cos(TGC3_BigWheel_PhiStepAngle2); TGC3_PhiPlate3_YPos2+TGC3_BigWheel_RThickPhiPlate2*cos(TGC3_BigWheel_PhiStepAngle2)-(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*sin(TGC3_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate3_XPos2+(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*cos(TGC3_BigWheel_PhiStepAngle2); TGC3_PhiPlate3_YPos2-(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*sin(TGC3_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate3_XPos1; TGC3_BigWheel_RadDist03"/>
+</gvxysx>
+
+<!-- third phi plate with kink - plate 4 -->
+<var name="TGC3_PhiPlate4_XPos1"  value="tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RadDist04-TGC3_BigWheel_PhiStep1toP1/cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/cos(TGC3_BigWheel_PhiStepAngle2)/2." />
+<var name="TGC3_PhiPlate4_XPos3"  value="tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RadDist04-TGC3_BigWheel_PhiStep1toP1/cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/cos(TGC3_BigWheel_PhiStepAngle2)/2.+tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RThickPhiPlate2" />
+<var name="TGC3_PhiPlate4_XPos2"  value="TGC3_PhiPlate4_XPos1+(TGC3_BigWheel_RadDist04*tan(TGC3_BigWheel_PhiStepAngle2)-TGC3_PhiPlate4_XPos1)*cos(TGC3_BigWheel_PhiStepAngle2)*cos(TGC3_BigWheel_PhiStepAngle2)" />
+<var name="TGC3_PhiPlate4_YPos2"  value="TGC3_BigWheel_RadDist04-(TGC3_BigWheel_RadDist04*tan(TGC3_BigWheel_PhiStepAngle2)-TGC3_PhiPlate4_XPos1)*cos(TGC3_BigWheel_PhiStepAngle2)*sin(TGC3_BigWheel_PhiStepAngle2)" />
+
+<gvxysx name="TGC3_PhiPlate4_Even" material="Aluminium" dZ="TGC3_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC3_PhiPlate4_XPos3; TGC3_BigWheel_RadDist04+TGC3_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate4_XPos2+TGC3_BigWheel_RThickPhiPlate2*sin(TGC3_BigWheel_PhiStepAngle2)+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2); TGC3_PhiPlate4_YPos2+TGC3_BigWheel_RThickPhiPlate2*cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate4_XPos2+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2); TGC3_PhiPlate4_YPos2-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate4_XPos1; TGC3_BigWheel_RadDist04"/>
+</gvxysx>
+
+<gvxysx name="TGC3_PhiPlate4_Odd" material="Aluminium" dZ="TGC3_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC3_PhiPlate4_XPos3-tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_BigWheel_RadDist04+TGC3_BigWheel_RThickPhiPlate2-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate4_XPos2+TGC3_BigWheel_RThickPhiPlate2*sin(TGC3_BigWheel_PhiStepAngle2)+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2)-tan(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_PhiPlate4_YPos2+TGC3_BigWheel_RThickPhiPlate2*cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate4_XPos2+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2)-tan(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_PhiPlate4_YPos2-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate4_XPos1-tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_BigWheel_RadDist04-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+</gvxysx>
+
+<!-- forth phi plate with kink - plate 5 -->
+<var name="TGC3_PhiPlate5_XPos1"  value="tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RadDist05-TGC3_BigWheel_PhiStep1toP1/cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/cos(TGC3_BigWheel_PhiStepAngle2)/2." />
+<var name="TGC3_PhiPlate5_XPos3"  value="tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RadDist05-TGC3_BigWheel_PhiStep1toP1/cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/cos(TGC3_BigWheel_PhiStepAngle2)/2.+tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RThickPhiPlate2" />
+<var name="TGC3_PhiPlate5_XPos2"  value="TGC3_PhiPlate5_XPos1+(TGC3_BigWheel_RadDist05*tan(TGC3_BigWheel_PhiStepAngle2)-TGC3_PhiPlate5_XPos1)*cos(TGC3_BigWheel_PhiStepAngle2)*cos(TGC3_BigWheel_PhiStepAngle2)-cos(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiThickRPlate" />
+<var name="TGC3_PhiPlate5_YPos2"  value="TGC3_BigWheel_RadDist05-(TGC3_BigWheel_RadDist05*tan(TGC3_BigWheel_PhiStepAngle2)-TGC3_PhiPlate5_XPos1)*cos(TGC3_BigWheel_PhiStepAngle2)*sin(TGC3_BigWheel_PhiStepAngle2)+sin(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiThickRPlate" />
+
+<gvxysx name="TGC3_PhiPlate5" material="Aluminium" dZ="TGC3_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC3_PhiPlate5_XPos3; TGC3_BigWheel_RadDist05+TGC3_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate5_XPos2+TGC3_BigWheel_RThickPhiPlate2*sin(TGC3_BigWheel_PhiStepAngle2)+(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*cos(TGC3_BigWheel_PhiStepAngle2); TGC3_PhiPlate5_YPos2+TGC3_BigWheel_RThickPhiPlate2*cos(TGC3_BigWheel_PhiStepAngle2)-(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*sin(TGC3_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate5_XPos2+(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*cos(TGC3_BigWheel_PhiStepAngle2); TGC3_PhiPlate5_YPos2-(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*sin(TGC3_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate5_XPos1; TGC3_BigWheel_RadDist05"/>
+</gvxysx>
+
+<!-- fifth phi plate with kink - plate 6 -->
+<var name="TGC3_PhiPlate6_XPos1"  value="tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RadDist06-TGC3_BigWheel_PhiStep1toP1/cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/cos(TGC3_BigWheel_PhiStepAngle2)/2." />
+<var name="TGC3_PhiPlate6_XPos3"  value="tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RadDist06-TGC3_BigWheel_PhiStep1toP1/cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/cos(TGC3_BigWheel_PhiStepAngle2)/2.+tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RThickPhiPlate2" />
+<var name="TGC3_PhiPlate6_XPos2"  value="TGC3_PhiPlate6_XPos1+(TGC3_BigWheel_RadDist06*tan(TGC3_BigWheel_PhiStepAngle2)-TGC3_PhiPlate6_XPos1)*cos(TGC3_BigWheel_PhiStepAngle2)*cos(TGC3_BigWheel_PhiStepAngle2)" />
+<var name="TGC3_PhiPlate6_YPos2"  value="TGC3_BigWheel_RadDist06-(TGC3_BigWheel_RadDist06*tan(TGC3_BigWheel_PhiStepAngle2)-TGC3_PhiPlate6_XPos1)*cos(TGC3_BigWheel_PhiStepAngle2)*sin(TGC3_BigWheel_PhiStepAngle2)" />
+
+<gvxysx name="TGC3_PhiPlate6_Even" material="Aluminium" dZ="TGC3_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC3_PhiPlate6_XPos3; TGC3_BigWheel_RadDist06+TGC3_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate6_XPos2+TGC3_BigWheel_RThickPhiPlate2*sin(TGC3_BigWheel_PhiStepAngle2)+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2); TGC3_PhiPlate6_YPos2+TGC3_BigWheel_RThickPhiPlate2*cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate6_XPos2+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2); TGC3_PhiPlate6_YPos2-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate6_XPos1; TGC3_BigWheel_RadDist06"/>
+</gvxysx>
+
+<gvxysx name="TGC3_PhiPlate6_Odd" material="Aluminium" dZ="TGC3_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC3_PhiPlate6_XPos3-tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_BigWheel_RadDist06+TGC3_BigWheel_RThickPhiPlate2-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate6_XPos2+TGC3_BigWheel_RThickPhiPlate2*sin(TGC3_BigWheel_PhiStepAngle2)+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2)-tan(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_PhiPlate6_YPos2+TGC3_BigWheel_RThickPhiPlate2*cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate6_XPos2+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2)-tan(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_PhiPlate6_YPos2-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate6_XPos1-tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_BigWheel_RadDist06-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+</gvxysx>
+
+<!-- sixth phi plate with kink - plate 7 -->
+<var name="TGC3_PhiPlate7_XPos1"  value="tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RadDist07-TGC3_BigWheel_PhiStep1toP1/cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/cos(TGC3_BigWheel_PhiStepAngle2)/2." />
+<var name="TGC3_PhiPlate7_XPos3"  value="tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RadDist07-TGC3_BigWheel_PhiStep1toP1/cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/cos(TGC3_BigWheel_PhiStepAngle2)/2.+tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RThickPhiPlate2" />
+<var name="TGC3_PhiPlate7_XPos2"  value="TGC3_PhiPlate7_XPos1+(TGC3_BigWheel_RadDist07*tan(TGC3_BigWheel_PhiStepAngle2)-TGC3_PhiPlate7_XPos1)*cos(TGC3_BigWheel_PhiStepAngle2)*cos(TGC3_BigWheel_PhiStepAngle2)-cos(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiThickRPlate" />
+<var name="TGC3_PhiPlate7_YPos2"  value="TGC3_BigWheel_RadDist07-(TGC3_BigWheel_RadDist07*tan(TGC3_BigWheel_PhiStepAngle2)-TGC3_PhiPlate7_XPos1)*cos(TGC3_BigWheel_PhiStepAngle2)*sin(TGC3_BigWheel_PhiStepAngle2)+sin(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiThickRPlate" />
+
+<gvxysx name="TGC3_PhiPlate7" material="Aluminium" dZ="TGC3_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC3_PhiPlate7_XPos3; TGC3_BigWheel_RadDist07+TGC3_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate7_XPos2+TGC3_BigWheel_RThickPhiPlate2*sin(TGC3_BigWheel_PhiStepAngle2)+(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*cos(TGC3_BigWheel_PhiStepAngle2); TGC3_PhiPlate7_YPos2+TGC3_BigWheel_RThickPhiPlate2*cos(TGC3_BigWheel_PhiStepAngle2)-(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*sin(TGC3_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate7_XPos2+(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*cos(TGC3_BigWheel_PhiStepAngle2); TGC3_PhiPlate7_YPos2-(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*sin(TGC3_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate7_XPos1; TGC3_BigWheel_RadDist07"/>
+</gvxysx>
+
+<!-- seventh phi plate with kink - plate 8 -->
+<var name="TGC3_PhiPlate8_XPos1"  value="tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RadDist08-TGC3_BigWheel_PhiStep1toP1/cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/cos(TGC3_BigWheel_PhiStepAngle2)/2." />
+<var name="TGC3_PhiPlate8_XPos3"  value="tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RadDist08-TGC3_BigWheel_PhiStep1toP1/cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/cos(TGC3_BigWheel_PhiStepAngle2)/2.+tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RThickPhiPlate2" />
+<var name="TGC3_PhiPlate8_XPos2"  value="TGC3_PhiPlate8_XPos1+(TGC3_BigWheel_RadDist08*tan(TGC3_BigWheel_PhiStepAngle2)-TGC3_PhiPlate8_XPos1)*cos(TGC3_BigWheel_PhiStepAngle2)*cos(TGC3_BigWheel_PhiStepAngle2)" />
+<var name="TGC3_PhiPlate8_YPos2"  value="TGC3_BigWheel_RadDist08-(TGC3_BigWheel_RadDist08*tan(TGC3_BigWheel_PhiStepAngle2)-TGC3_PhiPlate8_XPos1)*cos(TGC3_BigWheel_PhiStepAngle2)*sin(TGC3_BigWheel_PhiStepAngle2)" />
+
+<gvxysx name="TGC3_PhiPlate8_Even" material="Aluminium" dZ="TGC3_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC3_PhiPlate8_XPos3; TGC3_BigWheel_RadDist08+TGC3_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate8_XPos2+TGC3_BigWheel_RThickPhiPlate2*sin(TGC3_BigWheel_PhiStepAngle2)+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2); TGC3_PhiPlate8_YPos2+TGC3_BigWheel_RThickPhiPlate2*cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate8_XPos2+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2); TGC3_PhiPlate8_YPos2-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate8_XPos1; TGC3_BigWheel_RadDist08"/>
+</gvxysx>
+
+<gvxysx name="TGC3_PhiPlate8_Odd" material="Aluminium" dZ="TGC3_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC3_PhiPlate8_XPos3-tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_BigWheel_RadDist08+TGC3_BigWheel_RThickPhiPlate2-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate8_XPos2+TGC3_BigWheel_RThickPhiPlate2*sin(TGC3_BigWheel_PhiStepAngle2)+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2)-tan(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_PhiPlate8_YPos2+TGC3_BigWheel_RThickPhiPlate2*cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate8_XPos2+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2)-tan(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_PhiPlate8_YPos2-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate8_XPos1-tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_BigWheel_RadDist08-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+</gvxysx>
+
+<!-- first R plate - center -->
+<box name="TGC3_RPlate1_base" material="Aluminium"   X_Y_Z=" TGC3_BigWheel_PhiThickRPlate; TGC3_BigWheel_RadDist09-TGC3_BigWheel_RadDistPlate02-TGC3_BigWheel_RadDist00; TGC3_BigWheel_ZThickRPlate" />
+<box name="TGC3_RPlate1_sub"  material="Aluminium"   X_Y_Z=" TGC3_BigWheel_PhiThickRPlate; TGC3_BigWheel_RadDist09-TGC3_BigWheel_RadDistPlate02-TGC3_BigWheel_RadDist00+TGC3_BigWheel_WallThickRPlate; TGC3_BigWheel_ZThickRPlate-2.*TGC3_BigWheel_WallThickRPlate" />
+
+<subtraction name="TGC3_RPlate1">
+  <posXYZ volume="TGC3_RPlate1_base" X_Y_Z=" TGC3_BigWheel_PhiDistRPlate1/2.+TGC3_BigWheel_PhiThickRPlate/2.; (TGC3_BigWheel_RadDist09+TGC3_BigWheel_RadDistPlate02-TGC3_BigWheel_RadDist00)/2.; 0." />
+  <posXYZ volume="TGC3_RPlate1_sub"  X_Y_Z=" TGC3_BigWheel_PhiDistRPlate1/2.+TGC3_BigWheel_PhiThickRPlate/2.+TGC3_BigWheel_WallThickRPlate; (TGC3_BigWheel_RadDist09+TGC3_BigWheel_RadDistPlate02-TGC3_BigWheel_RadDist00)/2.; 0." />
+</subtraction>
+
+<!-- second R plate - 7.5 degrees -->
+<box name="TGC3_RPlate2_base" material="Aluminium"   X_Y_Z=" TGC3_BigWheel_PhiThickRPlate; (TGC3_BigWheel_RadDist09-TGC3_BigWheel_RadDistPlate02-TGC3_BigWheel_RadDist00)/cos(TGC3_BigWheel_PhiStepAngle1); TGC3_BigWheel_ZThickRPlate" />
+<box name="TGC3_RPlate2_sub"  material="Aluminium"   X_Y_Z=" TGC3_BigWheel_PhiThickRPlate; (TGC3_BigWheel_RadDist09-TGC3_BigWheel_RadDistPlate02-TGC3_BigWheel_RadDist00+TGC3_BigWheel_WallThickRPlate)/cos(TGC3_BigWheel_PhiStepAngle1); TGC3_BigWheel_ZThickRPlate-2.*TGC3_BigWheel_WallThickRPlate" />
+
+<subtraction name="TGC3_RPlate2">
+  <posXYZ volume="TGC3_RPlate2_base" X_Y_Z=" TGC3_PhiPlate2_XPos1+(TGC3_BigWheel_RadDist09+TGC3_BigWheel_RadDistPlate02-TGC3_BigWheel_RadDist00-2.*TGC3_BigWheel_RadDist02)*tan(TGC3_BigWheel_PhiStepAngle1)/2.; (TGC3_BigWheel_RadDist09+TGC3_BigWheel_RadDistPlate02-TGC3_BigWheel_RadDist00)/2.; 0." rot=" 0.;   0.; -TGC3_BigWheel_PhiStepAngle1/GENV_PiS180" />
+  <posXYZ volume="TGC3_RPlate2_sub"  X_Y_Z=" TGC3_PhiPlate2_XPos1+(TGC3_BigWheel_RadDist09+TGC3_BigWheel_RadDistPlate02-TGC3_BigWheel_RadDist00-2.*TGC3_BigWheel_RadDist02)*tan(TGC3_BigWheel_PhiStepAngle1)/2.-TGC3_BigWheel_WallThickRPlate; (TGC3_BigWheel_RadDist09+TGC3_BigWheel_RadDistPlate02-TGC3_BigWheel_RadDist00)/2.; 0." rot=" 0.;   0.; -TGC3_BigWheel_PhiStepAngle1/GENV_PiS180" />
+</subtraction>
+
+<!-- third R plate - 7.5 degrees TGC3_BigWheel_PhiThickRPlate-->
+<var name="TGC3_RPlate3_length"  value="(TGC3_BigWheel_RadDist09 - TGC3_BigWheel_RadDist00 - (TGC3_PhiPlate2_YPos2-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)) - (TGC3_BigWheel_PhiStep2toP1 + TGC3_BigWheel_PhiThickRPlate) * sin(TGC3_BigWheel_PhiStepAngle2) ) / cos(TGC3_BigWheel_PhiStepAngle1)" />
+
+<box name="TGC3_RPlate3_base" material="Aluminium"   X_Y_Z=" TGC3_BigWheel_PhiThickRPlate; TGC3_RPlate3_length; TGC3_BigWheel_ZThickRPlate" />
+<box name="TGC3_RPlate3_sub1"  material="Aluminium"   X_Y_Z=" TGC3_BigWheel_PhiThickRPlate; TGC3_RPlate3_length + TGC3_BigWheel_WallThickRPlate/cos(TGC3_BigWheel_PhiStepAngle1); TGC3_BigWheel_ZThickRPlate-2.*TGC3_BigWheel_WallThickRPlate" />
+<box name="TGC3_RPlate3_sub2"  material="Aluminium"   X_Y_Z=" TGC3_BigWheel_PhiThickRPlate; TGC3_RPlate3_length; TGC3_BigWheel_ZThickRPlate+2.*TGC3_BigWheel_WallThickRPlate" />
+
+<subtraction name="TGC3_RPlate3_tmp">
+  <posXYZ volume="TGC3_RPlate3_base" X_Y_Z=" TGC3_RPlate3_length/2.*sin(TGC3_BigWheel_PhiStepAngle1); TGC3_RPlate3_length/2.*cos(TGC3_BigWheel_PhiStepAngle1); 0." rot=" 0.;   0.; -TGC3_BigWheel_PhiStepAngle1/GENV_PiS180" />
+  <posXYZ volume="TGC3_RPlate3_sub1"  X_Y_Z=" TGC3_RPlate3_length/2.*sin(TGC3_BigWheel_PhiStepAngle1)-TGC3_BigWheel_WallThickRPlate; TGC3_RPlate3_length/2.*cos(TGC3_BigWheel_PhiStepAngle1); 0." rot=" 0.; 0.; -TGC3_BigWheel_PhiStepAngle1/GENV_PiS180" />
+  <posXYZ volume="TGC3_RPlate3_sub2" X_Y_Z="TGC3_RPlate3_length/2.*sin(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/2*(cos(TGC3_BigWheel_PhiStepAngle1)-cos(TGC3_BigWheel_PhiStepAngle2));TGC3_RPlate3_length/2.*cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/2*(sin(TGC3_BigWheel_PhiStepAngle2)-sin(TGC3_BigWheel_PhiStepAngle1)); 0." rot=" 0.; 0.; -TGC3_BigWheel_PhiStepAngle2/GENV_PiS180" />
+</subtraction>
+
+<var name="TGC3_RPlate3_PosX" value="TGC3_PhiPlate2_XPos2+(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*cos(TGC3_BigWheel_PhiStepAngle2)+TGC3_BigWheel_PhiThickRPlate*(0.5*cos(TGC3_BigWheel_PhiStepAngle1)-cos(TGC3_BigWheel_PhiStepAngle2))-cos(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiThickRPlate" />
+
+<var name="TGC3_RPlate3_PosY" value="TGC3_PhiPlate2_YPos2+(TGC3_BigWheel_PhiStep2toP1-TGC3_BigWheel_PhiStepP2toP2)*sin(TGC3_BigWheel_PhiStepAngle2)+TGC3_BigWheel_PhiThickRPlate*(sin(TGC3_BigWheel_PhiStepAngle2)-0.5*sin(TGC3_BigWheel_PhiStepAngle1))+sin(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiThickRPlate" />
+
+<composition name="TGC3_RPlate3" >
+  <posXYZ  volume="TGC3_RPlate3_tmp" X_Y_Z=" TGC3_RPlate3_PosX-GENV_Eps; TGC3_RPlate3_PosY ; 0." />
+</composition>
+
+<!-- first R plate - 15 degrees -->
+<box name="TGC3_RPlate4_base" material="Aluminium"   X_Y_Z=" TGC3_BigWheel_PhiThickRPlate; (TGC3_BigWheel_RadDist09-TGC3_BigWheel_RadDist00)/cos(TGC3_BigWheel_PhiStepAngle2); TGC3_BigWheel_ZThickRPlate" />
+<box name="TGC3_RPlate4_sub"  material="Aluminium"   X_Y_Z=" TGC3_BigWheel_PhiThickRPlate; (TGC3_BigWheel_RadDist09-TGC3_BigWheel_RadDist00+TGC3_BigWheel_WallThickRPlate)/cos(TGC3_BigWheel_PhiStepAngle2); TGC3_BigWheel_ZThickRPlate-2.*TGC3_BigWheel_WallThickRPlate" />
+
+<subtraction name="TGC3_RPlate4">
+  <posXYZ volume="TGC3_RPlate4_base" X_Y_Z=" (TGC3_BigWheel_RadDist09-TGC3_BigWheel_RadDist00)*tan(TGC3_BigWheel_PhiStepAngle2)/2.+(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1-1.5*TGC3_BigWheel_PhiThickRPlate)/cos(TGC3_BigWheel_PhiStepAngle2); (TGC3_BigWheel_RadDist09-TGC3_BigWheel_RadDist00)/2.; 0." rot=" 0.;   0.; -TGC3_BigWheel_PhiStepAngle2/GENV_PiS180" />
+  <posXYZ volume="TGC3_RPlate4_sub"  X_Y_Z=" (TGC3_BigWheel_RadDist09-TGC3_BigWheel_RadDist00)*tan(TGC3_BigWheel_PhiStepAngle2)/2.-TGC3_BigWheel_WallThickRPlate+(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1-1.5*TGC3_BigWheel_PhiThickRPlate)/cos(TGC3_BigWheel_PhiStepAngle2); (TGC3_BigWheel_RadDist09-TGC3_BigWheel_RadDist00)/2.; 0." rot=" 0.;   0.; -TGC3_BigWheel_PhiStepAngle2/GENV_PiS180" />
+</subtraction>
+
+<!-- second R plate - 15 degrees -->
+<box name="TGC3_RPlate5_base" material="Aluminium"   X_Y_Z=" TGC3_BigWheel_PhiThickRPlate; (TGC3_BigWheel_RadDist09-cos(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_RadDistOutPlate)/cos(TGC3_BigWheel_PhiStepAngle2); TGC3_BigWheel_ZThickRPlate" />
+<box name="TGC3_RPlate5_sub"  material="Aluminium"   X_Y_Z=" TGC3_BigWheel_PhiThickRPlate; (TGC3_BigWheel_RadDist09-cos(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_RadDistOutPlate)/cos(TGC3_BigWheel_PhiStepAngle2)+TGC3_BigWheel_WallThickRPlate; TGC3_BigWheel_ZThickRPlate-2.*TGC3_BigWheel_WallThickRPlate" />
+
+<var name="TGC3_RPlate5_PosX" value="sin(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_RadDistOutPlate/2. +TGC3_PhiPlate2_XPos2 +TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2) +tan(TGC3_BigWheel_PhiStepAngle2)*(TGC3_BigWheel_RadDist09/2.-TGC3_PhiPlate2_YPos2+TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_RadDist00)"/>
+
+<subtraction name="TGC3_RPlate5">
+  <posXYZ volume="TGC3_RPlate5_base" X_Y_Z=" TGC3_RPlate5_PosX - cos(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiThickRPlate/2.; (TGC3_BigWheel_RadDist09+cos(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_RadDistOutPlate)/2. - TGC3_BigWheel_RadDist00 + sin(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiThickRPlate/2.; 0." rot=" 0.;   0.; -TGC3_BigWheel_PhiStepAngle2/GENV_PiS180" />
+  <posXYZ volume="TGC3_RPlate5_sub"  X_Y_Z=" TGC3_RPlate5_PosX - cos(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiThickRPlate/2.+TGC3_BigWheel_WallThickRPlate; (TGC3_BigWheel_RadDist09+cos(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_RadDistOutPlate)/2.- TGC3_BigWheel_RadDist00 + sin(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiThickRPlate/2.; 0." rot=" 0.;   0.; -TGC3_BigWheel_PhiStepAngle2/GENV_PiS180" />
+</subtraction>
+
+<!-- very rough approximation of trigger boxes and cables - everything estimated - even/odd sectors for TGC3 -->
+<!-- change of variables does not change placement correctly - fine tuning required -->
+
+<var name="TGC3_TrigBoxThicknessZ"   value="    2.  " />
+<var name="TGC3_TrigBoxWidthPhi"     value="  260.  " />
+<var name="TGC3_TrigBoxLengthR"      value=" 5160.  " />
+<var name="TGC3_TrigBoxAngle1"       value="    3.25" />
+<var name="TGC3_TrigBoxAngle2"       value="   12. " />
+
+<box name="TGC3_TrigBox" material="Aluminium" X_Y_Z="TGC3_TrigBoxWidthPhi; TGC3_TrigBoxLengthR; TGC3_TrigBoxThicknessZ" />
+
+<var name="TGC3_TrigCableThicknessZ1"   value="    5.  " />
+<var name="TGC3_TrigCableThicknessZ2"   value="    3.  " />
+<var name="TGC3_TrigCableThicknessZ3"   value="    6.5  " />
+<var name="TGC3_TrigCableWidthPhi1"     value="  130.  " />
+<var name="TGC3_TrigCableWidthPhi2"     value="  100.  " />
+<var name="TGC3_TrigCableWidthPhi3"     value="   75.  " />
+<var name="TGC3_TrigCableWidthPhi4"     value="   60.  " />
+<var name="TGC3_TrigCableWidthPhi5"     value="  250.  " />
+<var name="TGC3_TrigCableLengthR1"      value=" 4500.  " />
+<var name="TGC3_TrigCableLengthR3"      value=" 1600.  " />
+<var name="TGC3_TrigCableLengthR4"      value=" 1400.  " />
+<var name="TGC3_TrigCableLengthR5"      value=" 1550.  " />
+
+<box name="TGC3_TrigCable1" material="Copper" X_Y_Z=" TGC3_TrigCableWidthPhi1; TGC3_TrigCableLengthR1; TGC3_TrigCableThicknessZ1" />
+<box name="TGC3_TrigCable2" material="Copper" X_Y_Z=" TGC3_TrigCableWidthPhi2; TGC3_TrigCableLengthR1; TGC3_TrigCableThicknessZ2" />
+<box name="TGC3_TrigCable3" material="Copper" X_Y_Z=" TGC3_TrigCableWidthPhi3; TGC3_TrigCableLengthR3; TGC3_TrigCableThicknessZ3" />
+<box name="TGC3_TrigCable4" material="Copper" X_Y_Z=" TGC3_TrigCableWidthPhi4; TGC3_TrigCableLengthR4; TGC3_TrigCableThicknessZ3" />
+<box name="TGC3_TrigCable5" material="Copper" X_Y_Z=" TGC3_TrigCableWidthPhi5; TGC3_TrigCableLengthR5; TGC3_TrigCableThicknessZ1" />
+
+<composition name="TGC3_Support_EvenSector_ASide">
+  <posXYZ volume="TGC3_PhiPlate1"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate2_Even"  X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate3"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate4_Even"  X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate5"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate6_Even"  X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate7"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate8_Even"  X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_RPlate1"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate1"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate2"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate2"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate3"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate3"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate4"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate4"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate5"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate5"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+
+  <posXYZ volume="TGC3_TrigBox"         X_Y_Z=" TGC3_PhiPlate4_XPos3-TGC3_TrigBoxLengthR/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_TrigBoxWidthPhi/4.*cos(TGC3_TrigBoxAngle1*GENV_PiS180); -TGC3_TrigBoxLengthR/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_ZThickPhiPlate" rot="0.; 0.; -TGC3_TrigBoxAngle1" />
+  <posXYZ volume="TGC3_TrigBox"         X_Y_Z=" -TGC3_TrigBoxLengthR/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-7.*TGC3_TrigBoxWidthPhi/10.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-(TGC3_PhiPlate3_XPos2+(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*cos(TGC3_BigWheel_PhiStepAngle2)); -TGC3_TrigBoxLengthR/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_ZThickPhiPlate" rot="0.; 0.; TGC3_TrigBoxAngle2" />
+
+  <posXYZ volume="TGC3_TrigCable1"      X_Y_Z="-TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_TrigCableWidthPhi1/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180) + 850.; -TGC3_TrigCableWidthPhi1/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ1/2." rot="0.; 0.; -TGC3_TrigBoxAngle1"/>
+  <posXYZ volume="TGC3_TrigCable2"      X_Y_Z="-TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-TGC3_TrigCableWidthPhi2/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180) + 580.; -TGC3_TrigCableWidthPhi2/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ2/2." rot="0.; 0.; -TGC3_TrigBoxAngle1"/>
+  <posXYZ volume="TGC3_TrigCable3"      X_Y_Z="-TGC3_TrigCableLengthR3/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_TrigCableWidthPhi3/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180) + 380.; -TGC3_TrigCableWidthPhi3/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-(TGC3_TrigCableLengthR3/2.+TGC3_TrigBoxLengthR)*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ3/2." rot="0.; 0.; -TGC3_TrigBoxAngle1"/>
+
+  <posXYZ volume="TGC3_TrigCable1"      X_Y_Z="TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_TrigCableWidthPhi1/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-2315; TGC3_TrigCableWidthPhi1*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ1/2." rot="0.; 0.; TGC3_TrigBoxAngle2"/>
+  <posXYZ volume="TGC3_TrigCable2"      X_Y_Z="TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-TGC3_TrigCableWidthPhi2/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-2620.; TGC3_TrigCableWidthPhi2/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ2/2." rot="0.; 0.; TGC3_TrigBoxAngle2"/>
+  <posXYZ volume="TGC3_TrigCable4"      X_Y_Z="TGC3_TrigCableLengthR4/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_TrigCableWidthPhi4/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-1430.; -TGC3_TrigCableWidthPhi4/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-(TGC3_TrigCableLengthR4/2.+TGC3_TrigBoxLengthR)*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ3/2." rot="0.; 0.; TGC3_TrigBoxAngle2"/>
+
+  <posXYZ volume="TGC3_TrigCable5"      X_Y_Z="TGC3_TrigCableLengthR5/2.*sin(TGC3_BigWheel_PhiStepAngle2)+TGC3_TrigCableWidthPhi5/2.*cos(TGC3_BigWheel_PhiStepAngle2)-700.; TGC3_BigWheel_RadDist00+TGC3_BigWheel_RadDist01+TGC3_BigWheel_RThickPhiPlate1-75; TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ1/2." rot="0.; 0.; TGC3_BigWheel_PhiStepAngle2/GENV_PiS180"/>
+
+</composition>
+
+<composition name="TGC3_Support_OddSector_ASide">
+  <posXYZ volume="TGC3_PhiPlate1"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate2_Odd"   X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate3"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate4_Odd"   X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate5"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate6_Odd"   X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate7"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate8_Odd"   X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_RPlate1"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate1"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate2"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate2"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate3"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate3"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate4"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate4"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate5"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate5"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+
+  <posXYZ volume="TGC3_TrigBox"         X_Y_Z=" TGC3_PhiPlate4_XPos3-TGC3_TrigBoxLengthR/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_TrigBoxWidthPhi/4.*cos(TGC3_TrigBoxAngle1*GENV_PiS180); -TGC3_TrigBoxLengthR/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_ZThickPhiPlate" rot="0.; 0.; -TGC3_TrigBoxAngle1" />
+  <posXYZ volume="TGC3_TrigBox"         X_Y_Z=" -TGC3_TrigBoxLengthR/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-7.*TGC3_TrigBoxWidthPhi/10.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-(TGC3_PhiPlate3_XPos2+(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*cos(TGC3_BigWheel_PhiStepAngle2)); -TGC3_TrigBoxLengthR/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_ZThickPhiPlate" rot="0.; 0.; TGC3_TrigBoxAngle2" />
+
+  <posXYZ volume="TGC3_TrigCable1"      X_Y_Z="-TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_TrigCableWidthPhi1/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180) + 850.; -TGC3_TrigCableWidthPhi1/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ1/2." rot="0.; 0.; -TGC3_TrigBoxAngle1"/>
+  <posXYZ volume="TGC3_TrigCable2"      X_Y_Z="-TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-TGC3_TrigCableWidthPhi2/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180) + 580.; -TGC3_TrigCableWidthPhi2/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ2/2." rot="0.; 0.; -TGC3_TrigBoxAngle1"/>
+  <posXYZ volume="TGC3_TrigCable3"      X_Y_Z="-TGC3_TrigCableLengthR3/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_TrigCableWidthPhi3/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180) + 380.; -TGC3_TrigCableWidthPhi3/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-(TGC3_TrigCableLengthR3/2.+TGC3_TrigBoxLengthR)*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ3/2." rot="0.; 0.; -TGC3_TrigBoxAngle1"/>
+
+  <posXYZ volume="TGC3_TrigCable1"      X_Y_Z="TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_TrigCableWidthPhi1/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-2315; TGC3_TrigCableWidthPhi1*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ1/2." rot="0.; 0.; TGC3_TrigBoxAngle2"/>
+  <posXYZ volume="TGC3_TrigCable2"      X_Y_Z="TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-TGC3_TrigCableWidthPhi2/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-2620.; TGC3_TrigCableWidthPhi2/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ2/2." rot="0.; 0.; TGC3_TrigBoxAngle2"/>
+  <posXYZ volume="TGC3_TrigCable4"      X_Y_Z="TGC3_TrigCableLengthR4/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_TrigCableWidthPhi4/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-1430.; -TGC3_TrigCableWidthPhi4/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-(TGC3_TrigCableLengthR4/2.+TGC3_TrigBoxLengthR)*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ3/2." rot="0.; 0.; TGC3_TrigBoxAngle2"/>
+
+  <posXYZ volume="TGC3_TrigCable5"      X_Y_Z="TGC3_TrigCableLengthR5/2.*sin(TGC3_BigWheel_PhiStepAngle2)+TGC3_TrigCableWidthPhi5/2.*cos(TGC3_BigWheel_PhiStepAngle2)-700.; TGC3_BigWheel_RadDist00+TGC3_BigWheel_RadDist01+TGC3_BigWheel_RThickPhiPlate1-75; TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ1/2." rot="0.; 0.; TGC3_BigWheel_PhiStepAngle2/GENV_PiS180"/>
+
+</composition>
+
+<composition name="TGC3_Support_EvenSector_CSide">
+  <posXYZ volume="TGC3_PhiPlate1"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate2_Even"  X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate3"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate4_Even"  X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate5"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate6_Even"  X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate7"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate8_Even"  X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_RPlate1"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate1"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate2"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate2"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate3"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate3"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate4"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate4"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate5"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate5"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+
+  <posXYZ volume="TGC3_TrigBox"         X_Y_Z=" TGC3_PhiPlate4_XPos3-TGC3_TrigBoxLengthR/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_TrigBoxWidthPhi/4.*cos(TGC3_TrigBoxAngle1*GENV_PiS180); -TGC3_TrigBoxLengthR/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; -TGC3_BigWheel_ZThickPhiPlate" rot="0.; 0.; -TGC3_TrigBoxAngle1" />
+  <posXYZ volume="TGC3_TrigBox"         X_Y_Z=" -TGC3_TrigBoxLengthR/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-7.*TGC3_TrigBoxWidthPhi/10.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-(TGC3_PhiPlate3_XPos2+(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*cos(TGC3_BigWheel_PhiStepAngle2)); -TGC3_TrigBoxLengthR/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; -TGC3_BigWheel_ZThickPhiPlate" rot="0.; 0.; TGC3_TrigBoxAngle2" />
+
+  <posXYZ volume="TGC3_TrigCable1"      X_Y_Z="-TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_TrigCableWidthPhi1/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180) + 850.; -TGC3_TrigCableWidthPhi1/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; -(TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ1/2.)" rot="0.; 0.; -TGC3_TrigBoxAngle1"/>
+  <posXYZ volume="TGC3_TrigCable2"      X_Y_Z="-TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-TGC3_TrigCableWidthPhi2/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180) + 580.; -TGC3_TrigCableWidthPhi2/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; -(TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ2/2.)" rot="0.; 0.; -TGC3_TrigBoxAngle1"/>
+  <posXYZ volume="TGC3_TrigCable3"      X_Y_Z="-TGC3_TrigCableLengthR3/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_TrigCableWidthPhi3/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180) + 380.; -TGC3_TrigCableWidthPhi3/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-(TGC3_TrigCableLengthR3/2.+TGC3_TrigBoxLengthR)*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; -(TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ3/2.)" rot="0.; 0.; -TGC3_TrigBoxAngle1"/>
+
+  <posXYZ volume="TGC3_TrigCable1"      X_Y_Z="TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_TrigCableWidthPhi1/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-2315; TGC3_TrigCableWidthPhi1*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; -(TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ1/2.)" rot="0.; 0.; TGC3_TrigBoxAngle2"/>
+  <posXYZ volume="TGC3_TrigCable2"      X_Y_Z="TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-TGC3_TrigCableWidthPhi2/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-2620.; TGC3_TrigCableWidthPhi2/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; -(TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ2/2.)" rot="0.; 0.; TGC3_TrigBoxAngle2"/>
+  <posXYZ volume="TGC3_TrigCable4"      X_Y_Z="TGC3_TrigCableLengthR4/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_TrigCableWidthPhi4/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-1430.; -TGC3_TrigCableWidthPhi4/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-(TGC3_TrigCableLengthR4/2.+TGC3_TrigBoxLengthR)*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; -(TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ3/2.)" rot="0.; 0.; TGC3_TrigBoxAngle2"/>
+
+  <posXYZ volume="TGC3_TrigCable5"      X_Y_Z="TGC3_TrigCableLengthR5/2.*sin(TGC3_BigWheel_PhiStepAngle2)+TGC3_TrigCableWidthPhi5/2.*cos(TGC3_BigWheel_PhiStepAngle2)-700.; TGC3_BigWheel_RadDist00+TGC3_BigWheel_RadDist01+TGC3_BigWheel_RThickPhiPlate1-75; -(TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ1/2.)" rot="0.; 0.; TGC3_BigWheel_PhiStepAngle2/GENV_PiS180"/>
+
+</composition>
+
+<composition name="TGC3_Support_OddSector_CSide">
+  <posXYZ volume="TGC3_PhiPlate1"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate2_Odd"   X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate3"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate4_Odd"   X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate5"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate6_Odd"   X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate7"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate8_Odd"   X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_RPlate1"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate1"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate2"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate2"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate3"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate3"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate4"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate4"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate5"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate5"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+
+  <posXYZ volume="TGC3_TrigBox"         X_Y_Z=" TGC3_PhiPlate4_XPos3-TGC3_TrigBoxLengthR/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_TrigBoxWidthPhi/4.*cos(TGC3_TrigBoxAngle1*GENV_PiS180); -TGC3_TrigBoxLengthR/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; -TGC3_BigWheel_ZThickPhiPlate" rot="0.; 0.; -TGC3_TrigBoxAngle1" />
+  <posXYZ volume="TGC3_TrigBox"         X_Y_Z=" -TGC3_TrigBoxLengthR/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-7.*TGC3_TrigBoxWidthPhi/10.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-(TGC3_PhiPlate3_XPos2+(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*cos(TGC3_BigWheel_PhiStepAngle2)); -TGC3_TrigBoxLengthR/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; -TGC3_BigWheel_ZThickPhiPlate" rot="0.; 0.; TGC3_TrigBoxAngle2" />
+
+  <posXYZ volume="TGC3_TrigCable1"      X_Y_Z="-TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_TrigCableWidthPhi1/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180) + 850.; -TGC3_TrigCableWidthPhi1/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; -(TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ1/2.)" rot="0.; 0.; -TGC3_TrigBoxAngle1"/>
+  <posXYZ volume="TGC3_TrigCable2"      X_Y_Z="-TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-TGC3_TrigCableWidthPhi2/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180) + 580.; -TGC3_TrigCableWidthPhi2/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; -(TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ2/2.)" rot="0.; 0.; -TGC3_TrigBoxAngle1"/>
+  <posXYZ volume="TGC3_TrigCable3"      X_Y_Z="-TGC3_TrigCableLengthR3/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_TrigCableWidthPhi3/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180) + 380.; -TGC3_TrigCableWidthPhi3/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-(TGC3_TrigCableLengthR3/2.+TGC3_TrigBoxLengthR)*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; -(TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ3/2.)" rot="0.; 0.; -TGC3_TrigBoxAngle1"/>
+
+  <posXYZ volume="TGC3_TrigCable1"      X_Y_Z="TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_TrigCableWidthPhi1/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-2315; TGC3_TrigCableWidthPhi1*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; -(TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ1/2.)" rot="0.; 0.; TGC3_TrigBoxAngle2"/>
+  <posXYZ volume="TGC3_TrigCable2"      X_Y_Z="TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-TGC3_TrigCableWidthPhi2/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-2620.; TGC3_TrigCableWidthPhi2/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; -(TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ2/2.)" rot="0.; 0.; TGC3_TrigBoxAngle2"/>
+  <posXYZ volume="TGC3_TrigCable4"      X_Y_Z="TGC3_TrigCableLengthR4/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_TrigCableWidthPhi4/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-1430.; -TGC3_TrigCableWidthPhi4/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-(TGC3_TrigCableLengthR4/2.+TGC3_TrigBoxLengthR)*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; -(TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ3/2.)" rot="0.; 0.; TGC3_TrigBoxAngle2"/>
+
+  <posXYZ volume="TGC3_TrigCable5"      X_Y_Z="TGC3_TrigCableLengthR5/2.*sin(TGC3_BigWheel_PhiStepAngle2)+TGC3_TrigCableWidthPhi5/2.*cos(TGC3_BigWheel_PhiStepAngle2)-700.; TGC3_BigWheel_RadDist00+TGC3_BigWheel_RadDist01+TGC3_BigWheel_RThickPhiPlate1-75; -(TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ1/2.)" rot="0.; 0.; TGC3_BigWheel_PhiStepAngle2/GENV_PiS180"/>
+
+</composition>
+
+<!-- tube and boxes are rather rouhg approximated here - should be okay though - Cavern Background only -->
+
+<tubs name="TGC3_CentralTube" material="Aluminium" Rio_Z="TGC3_BigWheel_TubeInnerR; TGC3_BigWheel_TubeOuterR; TGC3_BigWheel_WallThickPhiPlate" nbPhi="20" />
+
+<box name="TGC3_SurBox_base" material="Aluminium" X_Y_Z=" 2.*TGC3_BigWheel_RadDist09*tan(TGC3_BigWheel_PhiStepAngle2); TGC_BigWheel_SurBoxSideLength; TGC_BigWheel_SurBoxSideLength" />
+<box name="TGC3_SurBox_inner" material="Aluminium" X_Y_Z=" 2.*TGC3_BigWheel_RadDist09*tan(TGC3_BigWheel_PhiStepAngle2)+2.*GENV_Eps; TGC_BigWheel_SurBoxSideLength-2.*TGC_BigWheel_SurBoxSpcWall; TGC_BigWheel_SurBoxSideLength-2.*TGC_BigWheel_SurBoxSpcWall" />
+
+<subtraction name="TGC3_SurBox_default" >
+  <posXYZ volume="TGC3_SurBox_base"  X_Y_Z=" 0.; TGC3_BigWheel_RadDist09+TGC_BigWheel_SurBoxSideLength; 0." />
+  <posXYZ volume="TGC3_SurBox_inner"  X_Y_Z=" 0.; TGC3_BigWheel_RadDist09+TGC_BigWheel_SurBoxSideLength; 0." />
+</subtraction>
+
+<box name="TGC3_SurBoxSpc_base" material="Aluminium" X_Y_Z=" 2.*TGC3_BigWheel_RadDist09*tan(TGC3_BigWheel_PhiStepAngle2); TGC_BigWheel_SurBoxSpcLength; TGC_BigWheel_SurBoxSpcHeight" />
+<box name="TGC3_SurBoxSpc_inner" material="Aluminium" X_Y_Z="  2.*TGC3_BigWheel_RadDist09*tan(TGC3_BigWheel_PhiStepAngle2)+2.*GENV_Eps; TGC_BigWheel_SurBoxSpcLength-2.*TGC_BigWheel_SurBoxSpcWall; TGC_BigWheel_SurBoxSpcHeight" />
+
+<subtraction name="TGC3_SurBoxSpc" >
+  <posXYZ volume="TGC3_SurBoxSpc_base"   X_Y_Z=" 0.; TGC3_BigWheel_RadDist09+1.5*TGC_BigWheel_SurBoxSideLength+TGC_BigWheel_SurBoxDistance/2.; TGC_BigWheel_SurBoxSideLength/2.+TGC_BigWheel_SurBoxSpcHeight/2." />
+  <posXYZ volume="TGC3_SurBoxSpc_inner"  X_Y_Z=" 0.; TGC3_BigWheel_RadDist09+1.5*TGC_BigWheel_SurBoxSideLength+TGC_BigWheel_SurBoxDistance/2.; TGC_BigWheel_SurBoxSideLength/2.+TGC_BigWheel_SurBoxSpcHeight/2.-TGC_BigWheel_SurBoxSpcWall" />
+</subtraction>
+
+<composition name="TGC3_SurBox_extended" >
+  <posXYZ volume="TGC3_SurBox_default"  X_Y_Z=" 0.; TGC_BigWheel_SurBoxSideLength + TGC_BigWheel_SurBoxDistance; 0." />
+  <posXYZ volume="TGC3_SurBoxSpc"       X_Y_Z=" 0.; 0.;  GENV_Eps" />
+  <posXYZ volume="TGC3_SurBoxSpc"       X_Y_Z=" 0.; 0.; -GENV_Eps" rot=" 0.; 180.; 0."/>
+</composition>
+
+<composition name="TGC3_BigWheel_ASide">
+  <foreach  index="counter"  begin="0"  loops="6" >
+    <posXYZ volume="TGC3_Support_EvenSector_ASide"  X_Y_Z=" 0.; 0.; TGC3_BigWheel_ZPosL" rot="0.; 0.; counter*60." />
+    <posXYZ volume="TGC3_Support_OddSector_ASide"   X_Y_Z=" 0.; 0.; TGC3_BigWheel_ZPosL" rot="0.; 0.; 30.+(counter)*60." />
+  </foreach>
+  <foreach  index="counter"  begin="0"  loops="12" >
+    <posXYZ volume="TGC3_SurBox_default"   X_Y_Z=" 0.; 0.; TGC3_BigWheel_ZPosL" rot="0.; 0.; counter*30." />
+  </foreach>
+  <foreach  index="counter"  begin="0"  loops="7" >
+    <posXYZ volume="TGC3_SurBox_extended"  X_Y_Z=" 0.; 0.; TGC3_BigWheel_ZPosL" rot="0.; 0.; -90.+counter*30." />
+  </foreach>
+  <posXYZ volume="TGC3_CentralTube"  X_Y_Z=" 0.; 0.; TGC3_BigWheel_ZPosL" />
+</composition>
+
+<composition name="TGC3_BigWheel_CSide">
+  <foreach  index="counter"  begin="0"  loops="6" >
+    <posXYZ volume="TGC3_Support_EvenSector_CSide"  X_Y_Z=" 0.; 0.; -TGC3_BigWheel_ZPosL" rot="0.; 0.; counter*60." />
+    <posXYZ volume="TGC3_Support_OddSector_CSide"   X_Y_Z=" 0.; 0.; -TGC3_BigWheel_ZPosL" rot="0.; 0.; 30.+(counter)*60." />
+  </foreach>
+  <foreach  index="counter"  begin="0"  loops="12" >
+    <posXYZ volume="TGC3_SurBox_default"   X_Y_Z=" 0.; 0.; -TGC3_BigWheel_ZPosL" rot="0.; 0.; counter*30." />
+  </foreach>
+  <foreach  index="counter"  begin="0"  loops="7" >
+    <posXYZ volume="TGC3_SurBox_extended"  X_Y_Z=" 0.; 0.; -TGC3_BigWheel_ZPosL" rot="0.; 0.; -90.+counter*30." />
+  </foreach>
+  <posXYZ volume="TGC3_CentralTube"  X_Y_Z=" 0.; 0.; -TGC3_BigWheel_ZPosL" />
+</composition>
+
+<composition name="TGC3_BigWheels">
+  <posXYZ volume="TGC3_BigWheel_ASide" X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="TGC3_BigWheel_CSide" X_Y_Z=" 0.; 0.; 0." />
+</composition>
+
+<!--     name       =  TGC1 Big Wheel                section name       = "Supports"  -->
+<!--  Spokes U zposition -->
+<var name="TGC1_BigWheel_ZPosL"             value=" 13435.  " />
+
+<var name="TGC1_BigWheel_RadDist00"         value="  1777.5 "/>
+<var name="TGC1_BigWheel_RadDist01"         value="   922.  "/>
+<var name="TGC1_BigWheel_RadDist02"         value="  2582.5 "/>
+<var name="TGC1_BigWheel_RadDist03"         value="  3572.5 "/>
+<var name="TGC1_BigWheel_RadDist04"         value="  4667.5 "/>
+<var name="TGC1_BigWheel_RadDist05"         value="  5672.5 "/>
+<var name="TGC1_BigWheel_RadDist06"         value="  6754.5 "/>
+<var name="TGC1_BigWheel_RadDist07"         value="  7772.5 "/>
+<var name="TGC1_BigWheel_RadDist08"         value="  8682.5 "/>
+<var name="TGC1_BigWheel_RadDist09"         value=" 10990.  "/>
+<var name="TGC1_BigWheel_RadDistOutPlate"   value="  3670.  "/>
+<var name="TGC1_BigWheel_RadDistPlate02"    value="  2547.  "/>
+<var name="TGC1_BigWheel_PhiDistRPlate1"    value="   350.  "/>
+
+<var name="TGC1_BigWheel_ZThickPhiPlate"    value="    30.  "/>
+<var name="TGC1_BigWheel_WallThickPhiPlate" value="    16.  "/>
+<var name="TGC1_BigWheel_RThickPhiPlate1"   value="   200.  "/>
+<var name="TGC1_BigWheel_RThickPhiPlate2"   value="   120.  "/>
+<var name="TGC1_BigWheel_ZThickRPlate"      value="   150.  "/>
+<var name="TGC1_BigWheel_PhiThickRPlate"    value="    50.  "/>
+<var name="TGC1_BigWheel_WallThickRPlate"   value="     5.  "/>
+
+<var name="TGC1_BigWheel_PhiPlaDelEvenOdd"  value="TGC1_BigWheel_RThickPhiPlate2 + TGC1_BigWheel_PhiThickRPlate/2."/>
+
+<var name="TGC1_BigWheel_PhiStepAngle1"     value="     7.5 * GENV_PiS180 "/>
+<var name="TGC1_BigWheel_PhiStepAngle2"     value="    15.  * GENV_PiS180  "/>
+
+<var name="TGC1_BigWheel_PhiStep1toP1"      value="    18.  "/>
+<var name="TGC1_BigWheel_PhiStepP1toP2"     value="   497.  "/>
+
+<var name="TGC1_BigWheel_PhiStep2toP1"      value="   442.  "/>
+<var name="TGC1_BigWheel_PhiStepP2toP2"     value="   642. + TGC1_BigWheel_PhiThickRPlate"/>
+
+<var name="TGC1_BigWheel_TubeInnerR"        value="  1715.  "/>
+<var name="TGC1_BigWheel_TubeOuterR"        value="  TGC1_BigWheel_TubeInnerR + 405. "/>
+
+<!-- lowest phi plate - plate 1 -->
+<gvxysx name="TGC1_PhiPlate1" material="Aluminium" dZ="TGC1_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y=" (TGC1_BigWheel_RadDist00+TGC1_BigWheel_RadDist01+TGC1_BigWheel_RThickPhiPlate1)*sin(TGC1_BigWheel_PhiStepAngle2); TGC1_BigWheel_RadDist01+TGC1_BigWheel_RThickPhiPlate1"/>
+  <gvxy_point X_Y=" (TGC1_BigWheel_RadDist00+TGC1_BigWheel_RadDist01)*sin(TGC1_BigWheel_PhiStepAngle2); TGC1_BigWheel_RadDist01"/>
+</gvxysx>
+
+<!-- first phi plate with kink - plate 2 -->
+<var name="TGC1_PhiPlate2_XPos1"  value="tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RadDist02-TGC1_BigWheel_PhiStep1toP1/cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/cos(TGC1_BigWheel_PhiStepAngle2)/2." />
+<var name="TGC1_PhiPlate2_XPos3"  value="tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RadDist02-TGC1_BigWheel_PhiStep1toP1/cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/cos(TGC1_BigWheel_PhiStepAngle2)/2.+tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RThickPhiPlate2" />
+<var name="TGC1_PhiPlate2_XPos2"  value="TGC1_PhiPlate2_XPos1+(TGC1_BigWheel_RadDist02*tan(TGC1_BigWheel_PhiStepAngle2)-TGC1_PhiPlate2_XPos1)*cos(TGC1_BigWheel_PhiStepAngle2)*cos(TGC1_BigWheel_PhiStepAngle2)" />
+<var name="TGC1_PhiPlate2_YPos2"  value="TGC1_BigWheel_RadDist02-(TGC1_BigWheel_RadDist02*tan(TGC1_BigWheel_PhiStepAngle2)-TGC1_PhiPlate2_XPos1)*cos(TGC1_BigWheel_PhiStepAngle2)*sin(TGC1_BigWheel_PhiStepAngle2)" />
+
+<gvxysx name="TGC1_PhiPlate2_Even" material="Aluminium" dZ="TGC1_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC1_PhiPlate2_XPos3; TGC1_BigWheel_RadDist02+TGC1_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate2_XPos2+TGC1_BigWheel_RThickPhiPlate2*sin(TGC1_BigWheel_PhiStepAngle2)+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2); TGC1_PhiPlate2_YPos2+TGC1_BigWheel_RThickPhiPlate2*cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate2_XPos2+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2); TGC1_PhiPlate2_YPos2-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate2_XPos1; TGC1_BigWheel_RadDist02"/>
+</gvxysx>
+
+<gvxysx name="TGC1_PhiPlate2_Odd" material="Aluminium" dZ="TGC1_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC1_PhiPlate2_XPos3-tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_BigWheel_RadDist02+TGC1_BigWheel_RThickPhiPlate2-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate2_XPos2+TGC1_BigWheel_RThickPhiPlate2*sin(TGC1_BigWheel_PhiStepAngle2)+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2)-tan(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_PhiPlate2_YPos2+TGC1_BigWheel_RThickPhiPlate2*cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate2_XPos2+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2)-tan(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_PhiPlate2_YPos2-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate2_XPos1-tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_BigWheel_RadDist02-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+</gvxysx>
+
+<!-- second phi plate with kink - plate 3 -->
+<var name="TGC1_PhiPlate3_XPos1"  value="tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RadDist03-TGC1_BigWheel_PhiStep1toP1/cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/cos(TGC1_BigWheel_PhiStepAngle2)/2." />
+<var name="TGC1_PhiPlate3_XPos3"  value="tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RadDist03-TGC1_BigWheel_PhiStep1toP1/cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/cos(TGC1_BigWheel_PhiStepAngle2)/2.+tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RThickPhiPlate2" />
+<var name="TGC1_PhiPlate3_XPos2"  value="TGC1_PhiPlate3_XPos1+(TGC1_BigWheel_RadDist03*tan(TGC1_BigWheel_PhiStepAngle2)-TGC1_PhiPlate3_XPos1)*cos(TGC1_BigWheel_PhiStepAngle2)*cos(TGC1_BigWheel_PhiStepAngle2)-cos(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiThickRPlate" />
+<var name="TGC1_PhiPlate3_YPos2"  value="TGC1_BigWheel_RadDist03-(TGC1_BigWheel_RadDist03*tan(TGC1_BigWheel_PhiStepAngle2)-TGC1_PhiPlate3_XPos1)*cos(TGC1_BigWheel_PhiStepAngle2)*sin(TGC1_BigWheel_PhiStepAngle2)+sin(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiThickRPlate" />
+
+<gvxysx name="TGC1_PhiPlate3" material="Aluminium" dZ="TGC1_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC1_PhiPlate3_XPos3; TGC1_BigWheel_RadDist03+TGC1_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate3_XPos2+TGC1_BigWheel_RThickPhiPlate2*sin(TGC1_BigWheel_PhiStepAngle2)+(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1)*cos(TGC1_BigWheel_PhiStepAngle2); TGC1_PhiPlate3_YPos2+TGC1_BigWheel_RThickPhiPlate2*cos(TGC1_BigWheel_PhiStepAngle2)-(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1)*sin(TGC1_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate3_XPos2+(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1)*cos(TGC1_BigWheel_PhiStepAngle2); TGC1_PhiPlate3_YPos2-(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1)*sin(TGC1_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate3_XPos1; TGC1_BigWheel_RadDist03"/>
+</gvxysx>
+
+<!-- third phi plate with kink - plate 4 -->
+<var name="TGC1_PhiPlate4_XPos1"  value="tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RadDist04-TGC1_BigWheel_PhiStep1toP1/cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/cos(TGC1_BigWheel_PhiStepAngle2)/2." />
+<var name="TGC1_PhiPlate4_XPos3"  value="tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RadDist04-TGC1_BigWheel_PhiStep1toP1/cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/cos(TGC1_BigWheel_PhiStepAngle2)/2.+tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RThickPhiPlate2" />
+<var name="TGC1_PhiPlate4_XPos2"  value="TGC1_PhiPlate4_XPos1+(TGC1_BigWheel_RadDist04*tan(TGC1_BigWheel_PhiStepAngle2)-TGC1_PhiPlate4_XPos1)*cos(TGC1_BigWheel_PhiStepAngle2)*cos(TGC1_BigWheel_PhiStepAngle2)" />
+<var name="TGC1_PhiPlate4_YPos2"  value="TGC1_BigWheel_RadDist04-(TGC1_BigWheel_RadDist04*tan(TGC1_BigWheel_PhiStepAngle2)-TGC1_PhiPlate4_XPos1)*cos(TGC1_BigWheel_PhiStepAngle2)*sin(TGC1_BigWheel_PhiStepAngle2)" />
+
+<gvxysx name="TGC1_PhiPlate4_Even" material="Aluminium" dZ="TGC1_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC1_PhiPlate4_XPos3; TGC1_BigWheel_RadDist04+TGC1_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate4_XPos2+TGC1_BigWheel_RThickPhiPlate2*sin(TGC1_BigWheel_PhiStepAngle2)+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2); TGC1_PhiPlate4_YPos2+TGC1_BigWheel_RThickPhiPlate2*cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate4_XPos2+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2); TGC1_PhiPlate4_YPos2-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate4_XPos1; TGC1_BigWheel_RadDist04"/>
+</gvxysx>
+
+<gvxysx name="TGC1_PhiPlate4_Odd" material="Aluminium" dZ="TGC1_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC1_PhiPlate4_XPos3-tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_BigWheel_RadDist04+TGC1_BigWheel_RThickPhiPlate2-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate4_XPos2+TGC1_BigWheel_RThickPhiPlate2*sin(TGC1_BigWheel_PhiStepAngle2)+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2)-tan(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_PhiPlate4_YPos2+TGC1_BigWheel_RThickPhiPlate2*cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate4_XPos2+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2)-tan(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_PhiPlate4_YPos2-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate4_XPos1-tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_BigWheel_RadDist04-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+</gvxysx>
+
+<!-- forth phi plate with kink - plate 5 -->
+<var name="TGC1_PhiPlate5_XPos1"  value="tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RadDist05-TGC1_BigWheel_PhiStep1toP1/cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/cos(TGC1_BigWheel_PhiStepAngle2)/2." />
+<var name="TGC1_PhiPlate5_XPos3"  value="tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RadDist05-TGC1_BigWheel_PhiStep1toP1/cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/cos(TGC1_BigWheel_PhiStepAngle2)/2.+tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RThickPhiPlate2" />
+<var name="TGC1_PhiPlate5_XPos2"  value="TGC1_PhiPlate5_XPos1+(TGC1_BigWheel_RadDist05*tan(TGC1_BigWheel_PhiStepAngle2)-TGC1_PhiPlate5_XPos1)*cos(TGC1_BigWheel_PhiStepAngle2)*cos(TGC1_BigWheel_PhiStepAngle2)-cos(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiThickRPlate" />
+<var name="TGC1_PhiPlate5_YPos2"  value="TGC1_BigWheel_RadDist05-(TGC1_BigWheel_RadDist05*tan(TGC1_BigWheel_PhiStepAngle2)-TGC1_PhiPlate5_XPos1)*cos(TGC1_BigWheel_PhiStepAngle2)*sin(TGC1_BigWheel_PhiStepAngle2)+sin(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiThickRPlate" />
+
+<gvxysx name="TGC1_PhiPlate5" material="Aluminium" dZ="TGC1_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC1_PhiPlate5_XPos3; TGC1_BigWheel_RadDist05+TGC1_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate5_XPos2+TGC1_BigWheel_RThickPhiPlate2*sin(TGC1_BigWheel_PhiStepAngle2)+(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1)*cos(TGC1_BigWheel_PhiStepAngle2); TGC1_PhiPlate5_YPos2+TGC1_BigWheel_RThickPhiPlate2*cos(TGC1_BigWheel_PhiStepAngle2)-(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1)*sin(TGC1_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate5_XPos2+(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1)*cos(TGC1_BigWheel_PhiStepAngle2); TGC1_PhiPlate5_YPos2-(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1)*sin(TGC1_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate5_XPos1; TGC1_BigWheel_RadDist05"/>
+</gvxysx>
+
+<!-- fifth phi plate with kink - plate 6 -->
+<var name="TGC1_PhiPlate6_XPos1"  value="tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RadDist06-TGC1_BigWheel_PhiStep1toP1/cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/cos(TGC1_BigWheel_PhiStepAngle2)/2." />
+<var name="TGC1_PhiPlate6_XPos3"  value="tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RadDist06-TGC1_BigWheel_PhiStep1toP1/cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/cos(TGC1_BigWheel_PhiStepAngle2)/2.+tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RThickPhiPlate2" />
+<var name="TGC1_PhiPlate6_XPos2"  value="TGC1_PhiPlate6_XPos1+(TGC1_BigWheel_RadDist06*tan(TGC1_BigWheel_PhiStepAngle2)-TGC1_PhiPlate6_XPos1)*cos(TGC1_BigWheel_PhiStepAngle2)*cos(TGC1_BigWheel_PhiStepAngle2)" />
+<var name="TGC1_PhiPlate6_YPos2"  value="TGC1_BigWheel_RadDist06-(TGC1_BigWheel_RadDist06*tan(TGC1_BigWheel_PhiStepAngle2)-TGC1_PhiPlate6_XPos1)*cos(TGC1_BigWheel_PhiStepAngle2)*sin(TGC1_BigWheel_PhiStepAngle2)" />
+
+<gvxysx name="TGC1_PhiPlate6_Even" material="Aluminium" dZ="TGC1_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC1_PhiPlate6_XPos3; TGC1_BigWheel_RadDist06+TGC1_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate6_XPos2+TGC1_BigWheel_RThickPhiPlate2*sin(TGC1_BigWheel_PhiStepAngle2)+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2); TGC1_PhiPlate6_YPos2+TGC1_BigWheel_RThickPhiPlate2*cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate6_XPos2+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2); TGC1_PhiPlate6_YPos2-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate6_XPos1; TGC1_BigWheel_RadDist06"/>
+</gvxysx>
+
+<gvxysx name="TGC1_PhiPlate6_Odd" material="Aluminium" dZ="TGC1_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC1_PhiPlate6_XPos3-tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_BigWheel_RadDist06+TGC1_BigWheel_RThickPhiPlate2-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate6_XPos2+TGC1_BigWheel_RThickPhiPlate2*sin(TGC1_BigWheel_PhiStepAngle2)+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2)-tan(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_PhiPlate6_YPos2+TGC1_BigWheel_RThickPhiPlate2*cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate6_XPos2+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2)-tan(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_PhiPlate6_YPos2-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate6_XPos1-tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_BigWheel_RadDist06-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+</gvxysx>
+
+<!-- sixth phi plate with kink - plate 7 -->
+<var name="TGC1_PhiPlate7_XPos1"  value="tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RadDist07-TGC1_BigWheel_PhiStep1toP1/cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/cos(TGC1_BigWheel_PhiStepAngle2)/2." />
+<var name="TGC1_PhiPlate7_XPos3"  value="tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RadDist07-TGC1_BigWheel_PhiStep1toP1/cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/cos(TGC1_BigWheel_PhiStepAngle2)/2.+tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RThickPhiPlate2" />
+<var name="TGC1_PhiPlate7_XPos2"  value="TGC1_PhiPlate7_XPos1+(TGC1_BigWheel_RadDist07*tan(TGC1_BigWheel_PhiStepAngle2)-TGC1_PhiPlate7_XPos1)*cos(TGC1_BigWheel_PhiStepAngle2)*cos(TGC1_BigWheel_PhiStepAngle2)-cos(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiThickRPlate" />
+<var name="TGC1_PhiPlate7_YPos2"  value="TGC1_BigWheel_RadDist07-(TGC1_BigWheel_RadDist07*tan(TGC1_BigWheel_PhiStepAngle2)-TGC1_PhiPlate7_XPos1)*cos(TGC1_BigWheel_PhiStepAngle2)*sin(TGC1_BigWheel_PhiStepAngle2)+sin(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiThickRPlate" />
+
+<gvxysx name="TGC1_PhiPlate7" material="Aluminium" dZ="TGC1_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC1_PhiPlate7_XPos3; TGC1_BigWheel_RadDist07+TGC1_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate7_XPos2+TGC1_BigWheel_RThickPhiPlate2*sin(TGC1_BigWheel_PhiStepAngle2)+(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1)*cos(TGC1_BigWheel_PhiStepAngle2); TGC1_PhiPlate7_YPos2+TGC1_BigWheel_RThickPhiPlate2*cos(TGC1_BigWheel_PhiStepAngle2)-(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1)*sin(TGC1_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate7_XPos2+(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1)*cos(TGC1_BigWheel_PhiStepAngle2); TGC1_PhiPlate7_YPos2-(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1)*sin(TGC1_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate7_XPos1; TGC1_BigWheel_RadDist07"/>
+</gvxysx>
+
+<!-- seventh phi plate with kink - plate 8 -->
+<var name="TGC1_PhiPlate8_XPos1"  value="tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RadDist08-TGC1_BigWheel_PhiStep1toP1/cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/cos(TGC1_BigWheel_PhiStepAngle2)/2." />
+<var name="TGC1_PhiPlate8_XPos3"  value="tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RadDist08-TGC1_BigWheel_PhiStep1toP1/cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/cos(TGC1_BigWheel_PhiStepAngle2)/2.+tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RThickPhiPlate2" />
+<var name="TGC1_PhiPlate8_XPos2"  value="TGC1_PhiPlate8_XPos1+(TGC1_BigWheel_RadDist08*tan(TGC1_BigWheel_PhiStepAngle2)-TGC1_PhiPlate8_XPos1)*cos(TGC1_BigWheel_PhiStepAngle2)*cos(TGC1_BigWheel_PhiStepAngle2)" />
+<var name="TGC1_PhiPlate8_YPos2"  value="TGC1_BigWheel_RadDist08-(TGC1_BigWheel_RadDist08*tan(TGC1_BigWheel_PhiStepAngle2)-TGC1_PhiPlate8_XPos1)*cos(TGC1_BigWheel_PhiStepAngle2)*sin(TGC1_BigWheel_PhiStepAngle2)" />
+
+<gvxysx name="TGC1_PhiPlate8_Even" material="Aluminium" dZ="TGC1_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC1_PhiPlate8_XPos3; TGC1_BigWheel_RadDist08+TGC1_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate8_XPos2+TGC1_BigWheel_RThickPhiPlate2*sin(TGC1_BigWheel_PhiStepAngle2)+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2); TGC1_PhiPlate8_YPos2+TGC1_BigWheel_RThickPhiPlate2*cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate8_XPos2+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2); TGC1_PhiPlate8_YPos2-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate8_XPos1; TGC1_BigWheel_RadDist08"/>
+</gvxysx>
+
+<gvxysx name="TGC1_PhiPlate8_Odd" material="Aluminium" dZ="TGC1_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC1_PhiPlate8_XPos3-tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_BigWheel_RadDist08+TGC1_BigWheel_RThickPhiPlate2-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate8_XPos2+TGC1_BigWheel_RThickPhiPlate2*sin(TGC1_BigWheel_PhiStepAngle2)+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2)-tan(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_PhiPlate8_YPos2+TGC1_BigWheel_RThickPhiPlate2*cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate8_XPos2+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2)-tan(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_PhiPlate8_YPos2-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate8_XPos1-tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_BigWheel_RadDist08-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+</gvxysx>
+
+<!-- first R plate - center -->
+<box name="TGC1_RPlate1_base" material="Aluminium"   X_Y_Z=" TGC1_BigWheel_PhiThickRPlate; TGC1_BigWheel_RadDist09-TGC1_BigWheel_RadDistPlate02-TGC1_BigWheel_RadDist00; TGC1_BigWheel_ZThickRPlate" />
+<box name="TGC1_RPlate1_sub"  material="Aluminium"   X_Y_Z=" TGC1_BigWheel_PhiThickRPlate; TGC1_BigWheel_RadDist09-TGC1_BigWheel_RadDistPlate02-TGC1_BigWheel_RadDist00+TGC1_BigWheel_WallThickRPlate; TGC1_BigWheel_ZThickRPlate-2.*TGC1_BigWheel_WallThickRPlate" />
+
+<subtraction name="TGC1_RPlate1">
+  <posXYZ volume="TGC1_RPlate1_base" X_Y_Z=" TGC1_BigWheel_PhiDistRPlate1/2.+TGC1_BigWheel_PhiThickRPlate/2.; (TGC1_BigWheel_RadDist09+TGC1_BigWheel_RadDistPlate02-TGC1_BigWheel_RadDist00)/2.; 0." />
+  <posXYZ volume="TGC1_RPlate1_sub"  X_Y_Z=" TGC1_BigWheel_PhiDistRPlate1/2.+TGC1_BigWheel_PhiThickRPlate/2.+TGC1_BigWheel_WallThickRPlate; (TGC1_BigWheel_RadDist09+TGC1_BigWheel_RadDistPlate02-TGC1_BigWheel_RadDist00)/2.; 0." />
+</subtraction>
+
+<!-- second R plate - 7.5 degrees -->
+<box name="TGC1_RPlate2_base" material="Aluminium"   X_Y_Z=" TGC1_BigWheel_PhiThickRPlate; (TGC1_BigWheel_RadDist09-TGC1_BigWheel_RadDistPlate02-TGC1_BigWheel_RadDist00)/cos(TGC1_BigWheel_PhiStepAngle1); TGC1_BigWheel_ZThickRPlate" />
+<box name="TGC1_RPlate2_sub"  material="Aluminium"   X_Y_Z=" TGC1_BigWheel_PhiThickRPlate; (TGC1_BigWheel_RadDist09-TGC1_BigWheel_RadDistPlate02-TGC1_BigWheel_RadDist00+TGC1_BigWheel_WallThickRPlate)/cos(TGC1_BigWheel_PhiStepAngle1); TGC1_BigWheel_ZThickRPlate-2.*TGC1_BigWheel_WallThickRPlate" />
+
+<subtraction name="TGC1_RPlate2">
+  <posXYZ volume="TGC1_RPlate2_base" X_Y_Z=" TGC1_PhiPlate2_XPos1+(TGC1_BigWheel_RadDist09+TGC1_BigWheel_RadDistPlate02-TGC1_BigWheel_RadDist00-2.*TGC1_BigWheel_RadDist02)*tan(TGC1_BigWheel_PhiStepAngle1)/2.; (TGC1_BigWheel_RadDist09+TGC1_BigWheel_RadDistPlate02-TGC1_BigWheel_RadDist00)/2.; 0." rot=" 0.;   0.; -TGC1_BigWheel_PhiStepAngle1/GENV_PiS180" />
+  <posXYZ volume="TGC1_RPlate2_sub"  X_Y_Z=" TGC1_PhiPlate2_XPos1+(TGC1_BigWheel_RadDist09+TGC1_BigWheel_RadDistPlate02-TGC1_BigWheel_RadDist00-2.*TGC1_BigWheel_RadDist02)*tan(TGC1_BigWheel_PhiStepAngle1)/2.-TGC1_BigWheel_WallThickRPlate; (TGC1_BigWheel_RadDist09+TGC1_BigWheel_RadDistPlate02-TGC1_BigWheel_RadDist00)/2.; 0." rot=" 0.;   0.; -TGC1_BigWheel_PhiStepAngle1/GENV_PiS180" />
+</subtraction>
+
+<!-- third R plate - 7.5 degrees TGC1_BigWheel_PhiThickRPlate-->
+<var name="TGC1_RPlate3_length"  value="(TGC1_BigWheel_RadDist09 - TGC1_BigWheel_RadDist00 - (TGC1_PhiPlate2_YPos2-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)) - (TGC1_BigWheel_PhiStep2toP1 + TGC1_BigWheel_PhiThickRPlate) * sin(TGC1_BigWheel_PhiStepAngle2) ) / cos(TGC1_BigWheel_PhiStepAngle1)" />
+
+<box name="TGC1_RPlate3_base" material="Aluminium"   X_Y_Z=" TGC1_BigWheel_PhiThickRPlate; TGC1_RPlate3_length; TGC1_BigWheel_ZThickRPlate" />
+<box name="TGC1_RPlate3_sub1"  material="Aluminium"   X_Y_Z=" TGC1_BigWheel_PhiThickRPlate; TGC1_RPlate3_length + TGC1_BigWheel_WallThickRPlate/cos(TGC1_BigWheel_PhiStepAngle1); TGC1_BigWheel_ZThickRPlate-2.*TGC1_BigWheel_WallThickRPlate" />
+<box name="TGC1_RPlate3_sub2"  material="Aluminium"   X_Y_Z=" TGC1_BigWheel_PhiThickRPlate; TGC1_RPlate3_length; TGC1_BigWheel_ZThickRPlate+2.*TGC1_BigWheel_WallThickRPlate" />
+
+<subtraction name="TGC1_RPlate3_tmp">
+  <posXYZ volume="TGC1_RPlate3_base" X_Y_Z=" TGC1_RPlate3_length/2.*sin(TGC1_BigWheel_PhiStepAngle1); TGC1_RPlate3_length/2.*cos(TGC1_BigWheel_PhiStepAngle1); 0." rot=" 0.;   0.; -TGC1_BigWheel_PhiStepAngle1/GENV_PiS180" />
+  <posXYZ volume="TGC1_RPlate3_sub1"  X_Y_Z=" TGC1_RPlate3_length/2.*sin(TGC1_BigWheel_PhiStepAngle1)-TGC1_BigWheel_WallThickRPlate; TGC1_RPlate3_length/2.*cos(TGC1_BigWheel_PhiStepAngle1); 0." rot=" 0.; 0.; -TGC1_BigWheel_PhiStepAngle1/GENV_PiS180" />
+  <posXYZ volume="TGC1_RPlate3_sub2" X_Y_Z="TGC1_RPlate3_length/2.*sin(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/2*(cos(TGC1_BigWheel_PhiStepAngle1)-cos(TGC1_BigWheel_PhiStepAngle2));TGC1_RPlate3_length/2.*cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/2*(sin(TGC1_BigWheel_PhiStepAngle2)-sin(TGC1_BigWheel_PhiStepAngle1)); 0." rot=" 0.; 0.; -TGC1_BigWheel_PhiStepAngle2/GENV_PiS180" />
+</subtraction>
+
+<var name="TGC1_RPlate3_PosX" value="TGC1_PhiPlate2_XPos2+(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1)*cos(TGC1_BigWheel_PhiStepAngle2)+TGC1_BigWheel_PhiThickRPlate*(0.5*cos(TGC1_BigWheel_PhiStepAngle1)-cos(TGC1_BigWheel_PhiStepAngle2))-cos(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiThickRPlate" />
+
+<var name="TGC1_RPlate3_PosY" value="TGC1_PhiPlate2_YPos2+(TGC1_BigWheel_PhiStep2toP1-TGC1_BigWheel_PhiStepP2toP2)*sin(TGC1_BigWheel_PhiStepAngle2)+TGC1_BigWheel_PhiThickRPlate*(sin(TGC1_BigWheel_PhiStepAngle2)-0.5*sin(TGC1_BigWheel_PhiStepAngle1))+sin(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiThickRPlate" />
+
+<composition name="TGC1_RPlate3" >
+  <posXYZ  volume="TGC1_RPlate3_tmp" X_Y_Z=" TGC1_RPlate3_PosX-GENV_Eps; TGC1_RPlate3_PosY ; 0." />
+</composition>
+
+<!-- first R plate - 15 degrees -->
+<box name="TGC1_RPlate4_base" material="Aluminium"   X_Y_Z=" TGC1_BigWheel_PhiThickRPlate; (TGC1_BigWheel_RadDist09-TGC1_BigWheel_RadDist00)/cos(TGC1_BigWheel_PhiStepAngle2); TGC1_BigWheel_ZThickRPlate" />
+<box name="TGC1_RPlate4_sub"  material="Aluminium"   X_Y_Z=" TGC1_BigWheel_PhiThickRPlate; (TGC1_BigWheel_RadDist09-TGC1_BigWheel_RadDist00+TGC1_BigWheel_WallThickRPlate)/cos(TGC1_BigWheel_PhiStepAngle2); TGC1_BigWheel_ZThickRPlate-2.*TGC1_BigWheel_WallThickRPlate" />
+
+<subtraction name="TGC1_RPlate4">
+  <posXYZ volume="TGC1_RPlate4_base" X_Y_Z=" (TGC1_BigWheel_RadDist09-TGC1_BigWheel_RadDist00)*tan(TGC1_BigWheel_PhiStepAngle2)/2.+(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1-1.5*TGC1_BigWheel_PhiThickRPlate)/cos(TGC1_BigWheel_PhiStepAngle2); (TGC1_BigWheel_RadDist09-TGC1_BigWheel_RadDist00)/2.; 0." rot=" 0.;   0.; -TGC1_BigWheel_PhiStepAngle2/GENV_PiS180" />
+  <posXYZ volume="TGC1_RPlate4_sub"  X_Y_Z=" (TGC1_BigWheel_RadDist09-TGC1_BigWheel_RadDist00)*tan(TGC1_BigWheel_PhiStepAngle2)/2.-TGC1_BigWheel_WallThickRPlate+(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1-1.5*TGC1_BigWheel_PhiThickRPlate)/cos(TGC1_BigWheel_PhiStepAngle2); (TGC1_BigWheel_RadDist09-TGC1_BigWheel_RadDist00)/2.; 0." rot=" 0.;   0.; -TGC1_BigWheel_PhiStepAngle2/GENV_PiS180" />
+</subtraction>
+
+<!-- second R plate - 15 degrees -->
+<box name="TGC1_RPlate5_base" material="Aluminium"   X_Y_Z=" TGC1_BigWheel_PhiThickRPlate; (TGC1_BigWheel_RadDist09-cos(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_RadDistOutPlate)/cos(TGC1_BigWheel_PhiStepAngle2); TGC1_BigWheel_ZThickRPlate" />
+<box name="TGC1_RPlate5_sub"  material="Aluminium"   X_Y_Z=" TGC1_BigWheel_PhiThickRPlate; (TGC1_BigWheel_RadDist09-cos(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_RadDistOutPlate)/cos(TGC1_BigWheel_PhiStepAngle2)+TGC1_BigWheel_WallThickRPlate; TGC1_BigWheel_ZThickRPlate-2.*TGC1_BigWheel_WallThickRPlate" />
+
+<var name="TGC1_RPlate5_PosX" value="sin(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_RadDistOutPlate/2. +TGC1_PhiPlate2_XPos2 +TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2) +tan(TGC1_BigWheel_PhiStepAngle2)*(TGC1_BigWheel_RadDist09/2.-TGC1_PhiPlate2_YPos2+TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_RadDist00)"/>
+
+<subtraction name="TGC1_RPlate5">
+  <posXYZ volume="TGC1_RPlate5_base" X_Y_Z=" TGC1_RPlate5_PosX - cos(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiThickRPlate/2.; (TGC1_BigWheel_RadDist09+cos(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_RadDistOutPlate)/2. - TGC1_BigWheel_RadDist00 + sin(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiThickRPlate/2.; 0." rot=" 0.;   0.; -TGC1_BigWheel_PhiStepAngle2/GENV_PiS180" />
+  <posXYZ volume="TGC1_RPlate5_sub"  X_Y_Z=" TGC1_RPlate5_PosX - cos(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiThickRPlate/2.+TGC1_BigWheel_WallThickRPlate; (TGC1_BigWheel_RadDist09+cos(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_RadDistOutPlate)/2.- TGC1_BigWheel_RadDist00 + sin(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiThickRPlate/2.; 0." rot=" 0.;   0.; -TGC1_BigWheel_PhiStepAngle2/GENV_PiS180" />
+</subtraction>
+
+<!-- very rough approximation of trigger boxes and cables - everything estimated - everywhere for TGC1 -->
+<!-- change of variables does not change placement correctly - fine tuning required -->
+
+<var name="TGC1_TrigBoxThicknessZ"   value="    2.  " />
+<var name="TGC1_TrigBoxWidthPhi"     value="  260.  " />
+<var name="TGC1_TrigBoxLengthR"      value=" 3160.  " />
+
+<box name="TGC1_TrigBox" material="Aluminium" X_Y_Z="TGC1_TrigBoxWidthPhi; TGC1_TrigBoxLengthR; TGC1_TrigBoxThicknessZ" />
+
+<var name="TGC1_TrigCableThicknessZ1"   value="    4.  " />
+<var name="TGC1_TrigCableWidthPhi1"     value="  100.  " />
+<var name="TGC1_TrigCableLengthR1"      value=" 5650.  " />
+
+<box name="TGC1_TrigCable1" material="Copper" X_Y_Z=" TGC1_TrigCableWidthPhi1; TGC1_TrigCableLengthR1; TGC1_TrigCableThicknessZ1" />
+
+<composition name="TGC1_Support_EvenSector_ASide">
+  <posXYZ volume="TGC1_PhiPlate1"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate2_Even"  X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate3"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate4_Even"  X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate5"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate6_Even"  X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate7"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate8_Even"  X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_RPlate1"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate1"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate2"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate2"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate3"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate3"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate4"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate4"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate5"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate5"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+
+  <posXYZ volume="TGC1_TrigBox"         X_Y_Z=" -(TGC1_PhiPlate6_XPos1-TGC1_TrigBoxLengthR/2.*sin(TGC1_BigWheel_PhiStepAngle1)+TGC1_TrigBoxWidthPhi/8.*cos(TGC1_BigWheel_PhiStepAngle1)); -TGC1_TrigBoxLengthR/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; -TGC1_BigWheel_ZThickPhiPlate" rot="0.; 0.; TGC1_BigWheel_PhiStepAngle1/GENV_PiS180" />
+  <posXYZ volume="TGC1_TrigBox"         X_Y_Z=" -(-TGC1_TrigBoxLengthR/2.*sin(TGC1_BigWheel_PhiStepAngle1)-3.*TGC1_TrigBoxWidthPhi/4.*cos(TGC1_BigWheel_PhiStepAngle1)-TGC1_PhiPlate5_XPos2); -TGC1_TrigBoxLengthR/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; -TGC1_BigWheel_ZThickPhiPlate" rot="0.; 0.; -TGC1_BigWheel_PhiStepAngle1/GENV_PiS180" />
+
+  <posXYZ volume="TGC1_TrigCable1"      X_Y_Z="-(-TGC1_TrigCableLengthR1/2.*sin(TGC1_BigWheel_PhiStepAngle1)+TGC1_TrigCableWidthPhi1/2.*cos(TGC1_BigWheel_PhiStepAngle1) + TGC1_PhiPlate6_XPos1 + 175.); -TGC1_TrigCableWidthPhi1/2.*sin(TGC1_BigWheel_PhiStepAngle1)-TGC1_TrigCableLengthR1/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; -(TGC1_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC1_TrigCableThicknessZ1/2.)" rot="0.; 0.; TGC1_BigWheel_PhiStepAngle1/GENV_PiS180"/>
+  <posXYZ volume="TGC1_TrigCable1"      X_Y_Z="-(TGC1_TrigCableLengthR1/2.*sin(TGC1_BigWheel_PhiStepAngle1)+3.*TGC1_TrigCableWidthPhi1/2.*cos(TGC1_BigWheel_PhiStepAngle1)-TGC1_PhiPlate7_XPos2); TGC1_TrigCableWidthPhi1*sin(TGC1_BigWheel_PhiStepAngle1)-TGC1_TrigCableLengthR1/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; -(TGC1_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC1_TrigCableThicknessZ1/2.)" rot="0.; 0.; -TGC1_BigWheel_PhiStepAngle1/GENV_PiS180"/>
+
+</composition>
+
+<composition name="TGC1_Support_OddSector_ASide">
+  <posXYZ volume="TGC1_PhiPlate1"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate2_Odd"   X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate3"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate4_Odd"   X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate5"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate6_Odd"   X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate7"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate8_Odd"   X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_RPlate1"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate1"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate2"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate2"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate3"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate3"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate4"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate4"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate5"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate5"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+
+  <posXYZ volume="TGC1_TrigBox"         X_Y_Z=" -(TGC1_PhiPlate6_XPos1-TGC1_TrigBoxLengthR/2.*sin(TGC1_BigWheel_PhiStepAngle1)+TGC1_TrigBoxWidthPhi/8.*cos(TGC1_BigWheel_PhiStepAngle1)); -TGC1_TrigBoxLengthR/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; -TGC1_BigWheel_ZThickPhiPlate" rot="0.; 0.; TGC1_BigWheel_PhiStepAngle1/GENV_PiS180" />
+  <posXYZ volume="TGC1_TrigBox"         X_Y_Z=" -(-TGC1_TrigBoxLengthR/2.*sin(TGC1_BigWheel_PhiStepAngle1)-3.*TGC1_TrigBoxWidthPhi/4.*cos(TGC1_BigWheel_PhiStepAngle1)-TGC1_PhiPlate5_XPos2); -TGC1_TrigBoxLengthR/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; -TGC1_BigWheel_ZThickPhiPlate" rot="0.; 0.; -TGC1_BigWheel_PhiStepAngle1/GENV_PiS180" />
+
+  <posXYZ volume="TGC1_TrigCable1"      X_Y_Z="-(-TGC1_TrigCableLengthR1/2.*sin(TGC1_BigWheel_PhiStepAngle1)+TGC1_TrigCableWidthPhi1/2.*cos(TGC1_BigWheel_PhiStepAngle1) + TGC1_PhiPlate6_XPos1 + 175.); -TGC1_TrigCableWidthPhi1/2.*sin(TGC1_BigWheel_PhiStepAngle1)-TGC1_TrigCableLengthR1/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; -(TGC1_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC1_TrigCableThicknessZ1/2.)" rot="0.; 0.; TGC1_BigWheel_PhiStepAngle1/GENV_PiS180"/>
+  <posXYZ volume="TGC1_TrigCable1"      X_Y_Z="-(TGC1_TrigCableLengthR1/2.*sin(TGC1_BigWheel_PhiStepAngle1)+3.*TGC1_TrigCableWidthPhi1/2.*cos(TGC1_BigWheel_PhiStepAngle1)-TGC1_PhiPlate7_XPos2); TGC1_TrigCableWidthPhi1*sin(TGC1_BigWheel_PhiStepAngle1)-TGC1_TrigCableLengthR1/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; -(TGC1_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC1_TrigCableThicknessZ1/2.)" rot="0.; 0.; -TGC1_BigWheel_PhiStepAngle1/GENV_PiS180"/>
+
+</composition>
+
+<composition name="TGC1_Support_EvenSector_CSide">
+  <posXYZ volume="TGC1_PhiPlate1"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate2_Even"  X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate3"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate4_Even"  X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate5"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate6_Even"  X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate7"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate8_Even"  X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_RPlate1"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate1"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate2"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate2"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate3"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate3"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate4"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate4"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate5"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate5"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+
+  <posXYZ volume="TGC1_TrigBox"         X_Y_Z=" -(TGC1_PhiPlate6_XPos1-TGC1_TrigBoxLengthR/2.*sin(TGC1_BigWheel_PhiStepAngle1)+TGC1_TrigBoxWidthPhi/8.*cos(TGC1_BigWheel_PhiStepAngle1)); -TGC1_TrigBoxLengthR/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; TGC1_BigWheel_ZThickPhiPlate" rot="0.; 0.; TGC1_BigWheel_PhiStepAngle1/GENV_PiS180" />
+  <posXYZ volume="TGC1_TrigBox"         X_Y_Z=" -(-TGC1_TrigBoxLengthR/2.*sin(TGC1_BigWheel_PhiStepAngle1)-3.*TGC1_TrigBoxWidthPhi/4.*cos(TGC1_BigWheel_PhiStepAngle1)-TGC1_PhiPlate5_XPos2); -TGC1_TrigBoxLengthR/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; TGC1_BigWheel_ZThickPhiPlate" rot="0.; 0.; -TGC1_BigWheel_PhiStepAngle1/GENV_PiS180" />
+
+  <posXYZ volume="TGC1_TrigCable1"      X_Y_Z="-(-TGC1_TrigCableLengthR1/2.*sin(TGC1_BigWheel_PhiStepAngle1)+TGC1_TrigCableWidthPhi1/2.*cos(TGC1_BigWheel_PhiStepAngle1) + TGC1_PhiPlate6_XPos1 + 175.); -TGC1_TrigCableWidthPhi1/2.*sin(TGC1_BigWheel_PhiStepAngle1)-TGC1_TrigCableLengthR1/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; TGC1_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC1_TrigCableThicknessZ1/2." rot="0.; 0.; TGC1_BigWheel_PhiStepAngle1/GENV_PiS180"/>
+  <posXYZ volume="TGC1_TrigCable1"      X_Y_Z="-(TGC1_TrigCableLengthR1/2.*sin(TGC1_BigWheel_PhiStepAngle1)+3.*TGC1_TrigCableWidthPhi1/2.*cos(TGC1_BigWheel_PhiStepAngle1)-TGC1_PhiPlate7_XPos2); TGC1_TrigCableWidthPhi1*sin(TGC1_BigWheel_PhiStepAngle1)-TGC1_TrigCableLengthR1/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; TGC1_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC1_TrigCableThicknessZ1/2." rot="0.; 0.; -TGC1_BigWheel_PhiStepAngle1/GENV_PiS180"/>
+
+</composition>
+
+<composition name="TGC1_Support_OddSector_CSide">
+  <posXYZ volume="TGC1_PhiPlate1"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate2_Odd"   X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate3"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate4_Odd"   X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate5"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate6_Odd"   X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate7"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate8_Odd"   X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_RPlate1"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate1"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate2"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate2"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate3"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate3"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate4"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate4"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate5"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate5"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+
+  <posXYZ volume="TGC1_TrigBox"         X_Y_Z=" -(TGC1_PhiPlate6_XPos1-TGC1_TrigBoxLengthR/2.*sin(TGC1_BigWheel_PhiStepAngle1)+TGC1_TrigBoxWidthPhi/8.*cos(TGC1_BigWheel_PhiStepAngle1)); -TGC1_TrigBoxLengthR/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; TGC1_BigWheel_ZThickPhiPlate" rot="0.; 0.; TGC1_BigWheel_PhiStepAngle1/GENV_PiS180" />
+  <posXYZ volume="TGC1_TrigBox"         X_Y_Z=" -(-TGC1_TrigBoxLengthR/2.*sin(TGC1_BigWheel_PhiStepAngle1)-3.*TGC1_TrigBoxWidthPhi/4.*cos(TGC1_BigWheel_PhiStepAngle1)-TGC1_PhiPlate5_XPos2); -TGC1_TrigBoxLengthR/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; TGC1_BigWheel_ZThickPhiPlate" rot="0.; 0.; -TGC1_BigWheel_PhiStepAngle1/GENV_PiS180" />
+
+  <posXYZ volume="TGC1_TrigCable1"      X_Y_Z="-(-TGC1_TrigCableLengthR1/2.*sin(TGC1_BigWheel_PhiStepAngle1)+TGC1_TrigCableWidthPhi1/2.*cos(TGC1_BigWheel_PhiStepAngle1) + TGC1_PhiPlate6_XPos1 + 175.); -TGC1_TrigCableWidthPhi1/2.*sin(TGC1_BigWheel_PhiStepAngle1)-TGC1_TrigCableLengthR1/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; TGC1_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC1_TrigCableThicknessZ1/2." rot="0.; 0.; TGC1_BigWheel_PhiStepAngle1/GENV_PiS180"/>
+  <posXYZ volume="TGC1_TrigCable1"      X_Y_Z="-(TGC1_TrigCableLengthR1/2.*sin(TGC1_BigWheel_PhiStepAngle1)+3.*TGC1_TrigCableWidthPhi1/2.*cos(TGC1_BigWheel_PhiStepAngle1)-TGC1_PhiPlate7_XPos2); TGC1_TrigCableWidthPhi1*sin(TGC1_BigWheel_PhiStepAngle1)-TGC1_TrigCableLengthR1/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; TGC1_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC1_TrigCableThicknessZ1/2." rot="0.; 0.; -TGC1_BigWheel_PhiStepAngle1/GENV_PiS180"/>
+
+</composition>
+
+<!-- tube and boxes are rather rouhg approximated here - should be okay though - Cavern Background only -->
+
+<tubs name="TGC1_CentralTube" material="Aluminium" Rio_Z="TGC1_BigWheel_TubeInnerR; TGC1_BigWheel_TubeOuterR; TGC1_BigWheel_WallThickPhiPlate" nbPhi="20" />
+
+<box name="TGC1_SurBox_base" material="Aluminium" X_Y_Z=" 2.*TGC1_BigWheel_RadDist09*tan(TGC1_BigWheel_PhiStepAngle2); TGC_BigWheel_SurBoxSideLength; TGC_BigWheel_SurBoxSideLength" />
+<box name="TGC1_SurBox_inner" material="Aluminium" X_Y_Z=" 2.*TGC1_BigWheel_RadDist09*tan(TGC1_BigWheel_PhiStepAngle2)+2.*GENV_Eps; TGC_BigWheel_SurBoxSideLength-2.*TGC_BigWheel_SurBoxSpcWall; TGC_BigWheel_SurBoxSideLength-2.*TGC_BigWheel_SurBoxSpcWall" />
+
+<subtraction name="TGC1_SurBox_default" >
+  <posXYZ volume="TGC1_SurBox_base"  X_Y_Z=" 0.; TGC1_BigWheel_RadDist09+TGC_BigWheel_SurBoxSideLength; 0." />
+  <posXYZ volume="TGC1_SurBox_inner"  X_Y_Z=" 0.; TGC1_BigWheel_RadDist09+TGC_BigWheel_SurBoxSideLength; 0." />
+</subtraction>
+
+<box name="TGC1_SurBoxSpc_base" material="Aluminium" X_Y_Z=" 2.*TGC1_BigWheel_RadDist09*tan(TGC1_BigWheel_PhiStepAngle2); TGC_BigWheel_SurBoxSpcLength; TGC_BigWheel_SurBoxSpcHeight" />
+<box name="TGC1_SurBoxSpc_inner" material="Aluminium" X_Y_Z="  2.*TGC1_BigWheel_RadDist09*tan(TGC1_BigWheel_PhiStepAngle2)+2.*GENV_Eps; TGC_BigWheel_SurBoxSpcLength-2.*TGC_BigWheel_SurBoxSpcWall; TGC_BigWheel_SurBoxSpcHeight" />
+
+<subtraction name="TGC1_SurBoxSpc" >
+  <posXYZ volume="TGC1_SurBoxSpc_base"   X_Y_Z=" 0.; TGC1_BigWheel_RadDist09+1.5*TGC_BigWheel_SurBoxSideLength+TGC_BigWheel_SurBoxDistance/2.; TGC_BigWheel_SurBoxSideLength/2.+TGC_BigWheel_SurBoxSpcHeight/2." />
+  <posXYZ volume="TGC1_SurBoxSpc_inner"  X_Y_Z=" 0.; TGC1_BigWheel_RadDist09+1.5*TGC_BigWheel_SurBoxSideLength+TGC_BigWheel_SurBoxDistance/2.; TGC_BigWheel_SurBoxSideLength/2.+TGC_BigWheel_SurBoxSpcHeight/2.-TGC_BigWheel_SurBoxSpcWall" />
+</subtraction>
+
+<composition name="TGC1_SurBox_extended" >
+  <posXYZ volume="TGC1_SurBox_default"  X_Y_Z=" 0.; TGC_BigWheel_SurBoxSideLength + TGC_BigWheel_SurBoxDistance; 0." />
+  <posXYZ volume="TGC1_SurBoxSpc"       X_Y_Z=" 0.; 0.;  GENV_Eps" />
+  <posXYZ volume="TGC1_SurBoxSpc"       X_Y_Z=" 0.; 0.; -GENV_Eps" rot=" 0.; 180.; 0."/>
+</composition>
+
+<composition name="TGC1_BigWheel_ASide">
+  <foreach  index="counter"  begin="0"  loops="6" >
+    <posXYZ volume="TGC1_Support_EvenSector_ASide"  X_Y_Z=" 0.; 0.; TGC1_BigWheel_ZPosL" rot="0.; 0.; counter*60." />
+    <posXYZ volume="TGC1_Support_OddSector_ASide"   X_Y_Z=" 0.; 0.; TGC1_BigWheel_ZPosL" rot="0.; 0.; 30.+(counter)*60." />
+  </foreach>
+  <foreach  index="counter"  begin="0"  loops="12" >
+    <posXYZ volume="TGC1_SurBox_default"   X_Y_Z=" 0.; 0.; TGC1_BigWheel_ZPosL" rot="0.; 0.; counter*30." />
+    <posXYZ volume="TGC1_SurBox_extended"  X_Y_Z=" 0.; 0.; TGC1_BigWheel_ZPosL" rot="0.; 0.; counter*30." />
+  </foreach>
+  <posXYZ volume="TGC1_CentralTube"   X_Y_Z=" 0.; 0.; TGC1_BigWheel_ZPosL" />
+</composition>
+
+<composition name="TGC1_BigWheel_CSide">
+  <foreach  index="counter"  begin="0"  loops="6" >
+    <posXYZ volume="TGC1_Support_EvenSector_CSide"  X_Y_Z=" 0.; 0.; -TGC1_BigWheel_ZPosL" rot="0.; 0.; counter*60." />
+    <posXYZ volume="TGC1_Support_OddSector_CSide"   X_Y_Z=" 0.; 0.; -TGC1_BigWheel_ZPosL" rot="0.; 0.; 30.+(counter)*60." />
+  </foreach>
+  <foreach  index="counter"  begin="0"  loops="12" >
+    <posXYZ volume="TGC1_SurBox_default"   X_Y_Z=" 0.; 0.; -TGC1_BigWheel_ZPosL" rot="0.; 0.; counter*30." />
+    <posXYZ volume="TGC1_SurBox_extended"  X_Y_Z=" 0.; 0.; -TGC1_BigWheel_ZPosL" rot="0.; 0.; counter*30." />
+  </foreach>
+  <posXYZ volume="TGC1_CentralTube"   X_Y_Z=" 0.; 0.; -TGC1_BigWheel_ZPosL" />
+</composition>
+
+<composition name="TGC1_BigWheels">
+  <posXYZ volume="TGC1_BigWheel_ASide" X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="TGC1_BigWheel_CSide" X_Y_Z=" 0.; 0.; 0." />
+</composition>
+
+</section>
+
+<section name       = "MdtRailSupport"
+         version    = "1.0"
+         date       = "21 10 2010"
+         author     = "Claude, Jochen, laurent"
+         top_volume = "MDTRail">
+<defaults   unit_length="mm"   />
+
+<var name="Zero"             value="  0"/>
+
+<var  name="R_BOL_rail"    value="9650."/>
+<var  name="S_BOL_rail"    value="2710."/>
+<var  name="Z_BOL_rail"    value="6350."/>
+<box   name="rail_BOL"        material="Aluminium"  X_Y_Z="120.;120.;11300."   />
+
+<composition name="BOL_MDTRail">
+   <mposPhi volume="rail_BOL"  ncopy="7"  Phi0="-45." dPhi=" 45." S=" S_BOL_rail" R_Z="R_BOL_rail; Z_BOL_rail" impliedRot="true" />
+   <mposPhi volume="rail_BOL"  ncopy="7"  Phi0="-45." dPhi=" 45." S="-S_BOL_rail" R_Z="R_BOL_rail; Z_BOL_rail" impliedRot="true" />
+   <mposPhi volume="rail_BOL"  ncopy="7"  Phi0="-45." dPhi=" 45." S=" S_BOL_rail" R_Z="R_BOL_rail;-Z_BOL_rail" impliedRot="true" />
+   <mposPhi volume="rail_BOL"  ncopy="7"  Phi0="-45." dPhi=" 45." S="-S_BOL_rail" R_Z="R_BOL_rail;-Z_BOL_rail" impliedRot="true" />
+</composition>
+
+<var  name="R_BOL_service"    value="9520."/>
+<var  name="S_BOL_service"    value="2570."/>
+<var  name="Z_BOL_service"    value="6350."/>
+<box   name="service_BOL"        material="Carbon"  X_Y_Z="200.;150.; 11300."   />
+
+<composition name="BOL_MDTService">
+   <mposPhi volume="service_BOL"  ncopy="8"  Phi0="0." S=" S_BOL_service" R_Z="R_BOL_service; Z_BOL_service" impliedRot="true" />
+   <mposPhi volume="service_BOL"  ncopy="8"  Phi0="0." S="-S_BOL_service" R_Z="R_BOL_service; Z_BOL_service" impliedRot="true" />
+   <mposPhi volume="service_BOL"  ncopy="8"  Phi0="0." S=" S_BOL_service" R_Z="R_BOL_service;-Z_BOL_service" impliedRot="true" />
+   <mposPhi volume="service_BOL"  ncopy="8"  Phi0="0." S="-S_BOL_service" R_Z="R_BOL_service;-Z_BOL_service" impliedRot="true" />
+</composition>
+
+
+<var  name="R_BML_rail"    value="7139."/>
+<var  name="S_BML_rail"    value="1998."/>
+<var  name="Z_BML_rail"    value="4850."/>
+<box   name="rail_BML"        material="Aluminium"  X_Y_Z="120.;120.; 8300."   />
+
+<composition name="BML_MDTRail">
+   <mposPhi volume="rail_BML"  ncopy="8"  Phi0="0." S=" S_BML_rail" R_Z="R_BML_rail; Z_BML_rail" impliedRot="true" />
+   <mposPhi volume="rail_BML"  ncopy="8"  Phi0="0." S="-S_BML_rail" R_Z="R_BML_rail; Z_BML_rail" impliedRot="true" />
+   <mposPhi volume="rail_BML"  ncopy="8"  Phi0="0." S=" S_BML_rail" R_Z="R_BML_rail;-Z_BML_rail" impliedRot="true" />
+   <mposPhi volume="rail_BML"  ncopy="8"  Phi0="0." S="-S_BML_rail" R_Z="R_BML_rail;-Z_BML_rail" impliedRot="true" />
+</composition>
+
+<var  name="R_BML_support1"    value="6900."/>
+<var  name="S_BML_support1"    value="2120."/>
+<var  name="Z1_BML_support1"    value="1712.5"/>
+<var  name="Z2_BML_support1"    value="5137.5"/>
+<var  name="Z3_BML_support1"    value="8245.0"/>
+<box   name="support1_BML"        material="Aluminium"  X_Y_Z="590.;120.; 120."   />
+
+<composition name="BML_RailSupport1">
+   <mposPhi volume="support1_BML"  ncopy="8"  Phi0="0." S=" S_BML_support1" R_Z="R_BML_support1; Z1_BML_support1" impliedRot="true" />
+   <mposPhi volume="support1_BML"  ncopy="8"  Phi0="0." S="-S_BML_support1" R_Z="R_BML_support1; Z1_BML_support1" impliedRot="true" />
+   <mposPhi volume="support1_BML"  ncopy="8"  Phi0="0." S=" S_BML_support1" R_Z="R_BML_support1;-Z1_BML_support1" impliedRot="true" />
+   <mposPhi volume="support1_BML"  ncopy="8"  Phi0="0." S="-S_BML_support1" R_Z="R_BML_support1;-Z1_BML_support1" impliedRot="true" />
+   <mposPhi volume="support1_BML"  ncopy="8"  Phi0="0." S=" S_BML_support1" R_Z="R_BML_support1; Z2_BML_support1" impliedRot="true" />
+   <mposPhi volume="support1_BML"  ncopy="8"  Phi0="0." S="-S_BML_support1" R_Z="R_BML_support1; Z2_BML_support1" impliedRot="true" />
+   <mposPhi volume="support1_BML"  ncopy="8"  Phi0="0." S=" S_BML_support1" R_Z="R_BML_support1;-Z2_BML_support1" impliedRot="true" />
+   <mposPhi volume="support1_BML"  ncopy="8"  Phi0="0." S="-S_BML_support1" R_Z="R_BML_support1;-Z2_BML_support1" impliedRot="true" />
+   <mposPhi volume="support1_BML"  ncopy="8"  Phi0="0." S=" S_BML_support1" R_Z="R_BML_support1; Z3_BML_support1" impliedRot="true" />
+   <mposPhi volume="support1_BML"  ncopy="8"  Phi0="0." S="-S_BML_support1" R_Z="R_BML_support1; Z3_BML_support1" impliedRot="true" />
+   <mposPhi volume="support1_BML"  ncopy="8"  Phi0="0." S=" S_BML_support1" R_Z="R_BML_support1;-Z3_BML_support1" impliedRot="true" />
+   <mposPhi volume="support1_BML"  ncopy="8"  Phi0="0." S="-S_BML_support1" R_Z="R_BML_support1;-Z3_BML_support1" impliedRot="true" />
+</composition>
+
+<var  name="R_BML_support2"    value="7139."/>
+<var  name="S_BML_support2"    value="2362."/>
+<var  name="Z1_BML_support2"    value="3490.0"/>
+<var  name="Z2_BML_support2"    value="6760.0"/>
+<box   name="support2_BML"        material="Aluminium"  X_Y_Z=" 120.; 590.; 120."   />
+
+<composition name="BML_RailSupport2">
+   <!-- the standard BML rail support brackets are in 2 orthogonal directions, but not in sectors 11/13/15,
+        to account for it, just add 7 brackets each (i.e. leave out the bottom sectors),
+        4 by using symmetry and the 3 remaining ones positioned manually -->
+   <mposPhi volume="support2_BML"  ncopy="4"  Phi0="0." S=" S_BML_support2" R_Z="R_BML_support2; Z1_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="45." S=" S_BML_support2" R_Z="R_BML_support2; Z1_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="135." S=" S_BML_support2" R_Z="R_BML_support2; Z1_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="-45." S=" S_BML_support2" R_Z="R_BML_support2; Z1_BML_support2" impliedRot="true" />
+
+   <mposPhi volume="support2_BML"  ncopy="4"  Phi0="0." S="-S_BML_support2" R_Z="R_BML_support2; Z1_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="45." S="-S_BML_support2" R_Z="R_BML_support2; Z1_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="135." S="-S_BML_support2" R_Z="R_BML_support2; Z1_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="225." S="-S_BML_support2" R_Z="R_BML_support2; Z1_BML_support2" impliedRot="true" />
+
+   <mposPhi volume="support2_BML"  ncopy="4"  Phi0="0." S=" S_BML_support2" R_Z="R_BML_support2;-Z1_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="45." S=" S_BML_support2" R_Z="R_BML_support2;-Z1_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="135." S=" S_BML_support2" R_Z="R_BML_support2;-Z1_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="-45." S=" S_BML_support2" R_Z="R_BML_support2;-Z1_BML_support2" impliedRot="true" />
+
+   <mposPhi volume="support2_BML"  ncopy="4"  Phi0="0." S="-S_BML_support2" R_Z="R_BML_support2;-Z1_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="45." S="-S_BML_support2" R_Z="R_BML_support2;-Z1_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="135." S="-S_BML_support2" R_Z="R_BML_support2;-Z1_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="225." S="-S_BML_support2" R_Z="R_BML_support2;-Z1_BML_support2" impliedRot="true" />
+
+   <mposPhi volume="support2_BML"  ncopy="4"  Phi0="0." S=" S_BML_support2" R_Z="R_BML_support2; Z2_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="45." S=" S_BML_support2" R_Z="R_BML_support2; Z2_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="135." S=" S_BML_support2" R_Z="R_BML_support2; Z2_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="-45." S=" S_BML_support2" R_Z="R_BML_support2; Z2_BML_support2" impliedRot="true" />
+
+   <mposPhi volume="support2_BML"  ncopy="4"  Phi0="0." S="-S_BML_support2" R_Z="R_BML_support2; Z2_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="45." S="-S_BML_support2" R_Z="R_BML_support2; Z2_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="135." S="-S_BML_support2" R_Z="R_BML_support2; Z2_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="225." S="-S_BML_support2" R_Z="R_BML_support2; Z2_BML_support2" impliedRot="true" />
+
+   <mposPhi volume="support2_BML"  ncopy="4"  Phi0="0." S=" S_BML_support2" R_Z="R_BML_support2;-Z2_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="45." S=" S_BML_support2" R_Z="R_BML_support2;-Z2_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="135." S=" S_BML_support2" R_Z="R_BML_support2;-Z2_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="-45." S=" S_BML_support2" R_Z="R_BML_support2;-Z2_BML_support2" impliedRot="true" />
+
+   <mposPhi volume="support2_BML"  ncopy="4"  Phi0="0." S="-S_BML_support2" R_Z="R_BML_support2;-Z2_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="45." S="-S_BML_support2" R_Z="R_BML_support2;-Z2_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="135." S="-S_BML_support2" R_Z="R_BML_support2;-Z2_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="225." S="-S_BML_support2" R_Z="R_BML_support2;-Z2_BML_support2" impliedRot="true" />
+</composition>
+
+
+<var  name="R_BML_service"    value="7139."/>
+<var  name="S_BML_service"    value="1860."/>
+<var  name="Z_BML_service"    value="4850."/>
+<box   name="service_BML"        material="Carbon"  X_Y_Z="250.;120.; 8300."   />
+
+<composition name="BML_MDTService">
+   <mposPhi volume="service_BML"  ncopy="8"  Phi0="0." S=" S_BML_service" R_Z="R_BML_service; Z_BML_service" impliedRot="true" />
+   <mposPhi volume="service_BML"  ncopy="8"  Phi0="0." S="-S_BML_service" R_Z="R_BML_service; Z_BML_service" impliedRot="true" />
+   <mposPhi volume="service_BML"  ncopy="8"  Phi0="0." S=" S_BML_service" R_Z="R_BML_service;-Z_BML_service" impliedRot="true" />
+   <mposPhi volume="service_BML"  ncopy="8"  Phi0="0." S="-S_BML_service" R_Z="R_BML_service;-Z_BML_service" impliedRot="true" />
+</composition>
+
+<var  name="R_BML_trigbox"    value="7575."/>
+<var  name="S_BML_trigbox"    value=" 900."/>
+<var  name="Z_BML_trigbox"    value="4850."/>
+<box   name="trigbox_BML"        material="Carbon"  X_Y_Z="50.;1000.; 8300."   />
+<composition name="BML_trigbox">
+   <mposPhi volume="trigbox_BML"  ncopy="8"  Phi0="0." S=" S_BML_trigbox" R_Z="R_BML_trigbox; Z_BML_trigbox" impliedRot="true" />
+   <mposPhi volume="trigbox_BML"  ncopy="8"  Phi0="0." S="-S_BML_trigbox" R_Z="R_BML_trigbox; Z_BML_trigbox" impliedRot="true" />
+   <mposPhi volume="trigbox_BML"  ncopy="8"  Phi0="0." S=" S_BML_trigbox" R_Z="R_BML_trigbox;-Z_BML_trigbox" impliedRot="true" />
+   <mposPhi volume="trigbox_BML"  ncopy="8"  Phi0="0." S="-S_BML_trigbox" R_Z="R_BML_trigbox;-Z_BML_trigbox" impliedRot="true" />
+</composition>
+
+<var  name="R_BMS_service"    value="8095."/>
+<var  name="S_BMS_service"    value="1610."/>
+<var  name="Z_BMS_service"    value="4850."/>
+<box   name="service_BMS"        material="Carbon"  X_Y_Z="100.;120.; 8300."   />
+
+<composition name="BMS_MDTService">
+   <mposPhi volume="service_BMS"  ncopy="8"  Phi0="22.5" S=" S_BMS_service" R_Z="R_BMS_service; Z_BMS_service" impliedRot="true" />
+   <mposPhi volume="service_BMS"  ncopy="8"  Phi0="22.5" S="-S_BMS_service" R_Z="R_BMS_service; Z_BMS_service" impliedRot="true" />
+   <mposPhi volume="service_BMS"  ncopy="8"  Phi0="22.5" S=" S_BMS_service" R_Z="R_BMS_service;-Z_BMS_service" impliedRot="true" />
+   <mposPhi volume="service_BMS"  ncopy="8"  Phi0="22.5" S="-S_BMS_service" R_Z="R_BMS_service;-Z_BMS_service" impliedRot="true" />
+</composition>
+
+<var  name="R_BMS_trigbox"    value="7740."/>
+<var  name="S_BMS_trigbox"    value=" 550."/>
+<var  name="Z_BMS_trigbox1"   value="1950."/>
+<var  name="Z_BMS_trigbox2"   value="5150."/>
+<var  name="Z_BMS_trigbox3"   value="8150."/>
+<box   name="trigbox_BMS"     material="Carbon"  X_Y_Z="50.;900.; 2000."   />
+
+<composition name="BMS_trigbox">
+   <mposPhi volume="trigbox_BMS"  ncopy="6"  Phi0="-22.5" dPhi="45." S=" S_BMS_trigbox" R_Z="R_BMS_trigbox; Z_BMS_trigbox1" impliedRot="true" />
+   <mposPhi volume="trigbox_BMS"  ncopy="6"  Phi0="-22.5" dPhi="45." S="-S_BMS_trigbox" R_Z="R_BMS_trigbox; Z_BMS_trigbox1" impliedRot="true" />
+   <mposPhi volume="trigbox_BMS"  ncopy="6"  Phi0="-22.5" dPhi="45." S=" S_BMS_trigbox" R_Z="R_BMS_trigbox;-Z_BMS_trigbox1" impliedRot="true" />
+   <mposPhi volume="trigbox_BMS"  ncopy="6"  Phi0="-22.5" dPhi="45." S="-S_BMS_trigbox" R_Z="R_BMS_trigbox;-Z_BMS_trigbox1" impliedRot="true" />
+   <mposPhi volume="trigbox_BMS"  ncopy="6"  Phi0="-22.5" dPhi="45." S=" S_BMS_trigbox" R_Z="R_BMS_trigbox; Z_BMS_trigbox2" impliedRot="true" />
+   <mposPhi volume="trigbox_BMS"  ncopy="6"  Phi0="-22.5" dPhi="45." S="-S_BMS_trigbox" R_Z="R_BMS_trigbox; Z_BMS_trigbox2" impliedRot="true" />
+   <mposPhi volume="trigbox_BMS"  ncopy="6"  Phi0="-22.5" dPhi="45." S=" S_BMS_trigbox" R_Z="R_BMS_trigbox;-Z_BMS_trigbox2" impliedRot="true" />
+   <mposPhi volume="trigbox_BMS"  ncopy="6"  Phi0="-22.5" dPhi="45." S="-S_BMS_trigbox" R_Z="R_BMS_trigbox;-Z_BMS_trigbox2" impliedRot="true" />
+   <mposPhi volume="trigbox_BMS"  ncopy="6"  Phi0="-22.5" dPhi="45." S=" S_BMS_trigbox" R_Z="R_BMS_trigbox; Z_BMS_trigbox3" impliedRot="true" />
+   <mposPhi volume="trigbox_BMS"  ncopy="6"  Phi0="-22.5" dPhi="45." S="-S_BMS_trigbox" R_Z="R_BMS_trigbox; Z_BMS_trigbox3" impliedRot="true" />
+   <mposPhi volume="trigbox_BMS"  ncopy="6"  Phi0="-22.5" dPhi="45." S=" S_BMS_trigbox" R_Z="R_BMS_trigbox;-Z_BMS_trigbox3" impliedRot="true" />
+   <mposPhi volume="trigbox_BMS"  ncopy="6"  Phi0="-22.5" dPhi="45." S="-S_BMS_trigbox" R_Z="R_BMS_trigbox;-Z_BMS_trigbox3" impliedRot="true" />
+</composition>
+
+
+<composition name="MDTRail">
+   <posXYZ volume="BOL_MDTRail"	     X_Y_Z="Zero;Zero;Zero"/>
+   <posXYZ volume="BOL_MDTService"   X_Y_Z="Zero;Zero;Zero"/>
+   <posXYZ volume="BML_MDTRail"	     X_Y_Z="Zero;Zero;Zero"/>
+   <posXYZ volume="BML_RailSupport1" X_Y_Z="Zero;Zero;Zero"/>
+   <posXYZ volume="BML_RailSupport2" X_Y_Z="Zero;Zero;Zero"/>
+   <posXYZ volume="BML_MDTService"   X_Y_Z="Zero;Zero;Zero"/>
+   <posXYZ volume="BML_trigbox"	     X_Y_Z="Zero;Zero;Zero"/>
+   <posXYZ volume="BMS_MDTService"   X_Y_Z="Zero;Zero;Zero"/>
+   <posXYZ volume="BMS_trigbox"      X_Y_Z="Zero;Zero;Zero"/>
+</composition>
+
+</section>
+
+<section name       = "HFtruck"
+         version    = "0.0"
+         date       = "13-09-2017"
+         author     = "Besik Kekelia"
+         top_volume = "HFTruckRail">
+
+<!--     name       =  HFTruck                       section name       = "Supports"  -->
+<!--  
+      **************************************************************
+      ***                                                       ****
+      ***                  HF Truck                             ****
+      ***                                                       ****
+      **************************************************************
+-->
+
+<defaults   unit_length="mm"   />
+
+<!--  Description of HF Truck  -->
+
+<!--  Description of Column C1-L, C2-R  -->
+<gvxy name="Column" material="Iron" dZ="6662.">
+<gvxy_point X_Y="1485.; 1645."/>
+<gvxy_point X_Y="1525.; 1645."/>
+<gvxy_point X_Y="1525.; 1409.5"/>
+<gvxy_point X_Y="2225.; 1409.5"/>
+<gvxy_point X_Y="2225.; 1645."/>
+<gvxy_point X_Y="2265.; 1645."/>
+<gvxy_point X_Y="2265.; 1105."/>
+<gvxy_point X_Y="2225.; 1105."/>
+<gvxy_point X_Y="2225.; 1340.5"/>
+<gvxy_point X_Y="1525.; 1340.5"/>
+<gvxy_point X_Y="1525.; 1105."/>
+<gvxy_point X_Y="1485.; 1105."/>
+</gvxy>
+
+<tubs name="Column_Tube" material="Iron" Rio_Z="147.95; 254.; 2680.9" nbPhi="32"/>
+
+<composition  name="Column_C1-L_C2-R" >
+  <posXYZ  volume="Column" X_Y_Z=" 0.; 0.; 0. " rot=" 90.; 0.; 0." />
+  <posXYZ  volume="Column" X_Y_Z=" 0.; 0.; 0. " rot=" 90.; 0.; 180." />
+  <posXYZ  volume="Column" X_Y_Z=" 0.; 0.; -2750. " rot=" 90.; 0.; 0." />
+  <posXYZ  volume="Column" X_Y_Z=" 0.; 0.; -2750. " rot=" 90.; 0.; 180." />
+  <posXYZ  volume="Column_Tube" X_Y_Z=" 1875.; 2068.; 0. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Column_Tube" X_Y_Z=" -1875.; 2068.; 0. " rot=" 0.; 0.; 0." />
+</composition>
+<!-- end of  Description of Column C1-L, C2-R  -->
+
+
+<!--  Description of Beam  -->
+<gvxy name="Beam_1" material="Iron" dZ="5319.9">
+<gvxy_point X_Y="-1645.; 4211.05"/>
+<gvxy_point X_Y="-1645.; 4171.05"/>
+<gvxy_point X_Y="-1420.05; 4171.05"/>
+<gvxy_point X_Y="-1420.05; 3371.05"/>
+<gvxy_point X_Y="-1645.; 3371.05"/>
+<gvxy_point X_Y="-1645.; 3331.05"/>
+<gvxy_point X_Y="-1109.95; 3331.05"/>
+<gvxy_point X_Y="-1109.95; 3371.05"/>
+<gvxy_point X_Y="-1329.95; 3371.05"/>
+<gvxy_point X_Y="-1329.95; 4171.05"/>
+<gvxy_point X_Y="-1109.95; 4171.05"/>
+<gvxy_point X_Y="-1109.95; 4211.05"/>
+</gvxy>
+
+<box name="Beam_Box" material="Iron" X_Y_Z="880.; 40.; 540."/>
+
+<composition  name="Beam" >
+  <posXYZ  volume="Beam_1" X_Y_Z=" 0.; 0.; 0. " rot=" 0.; 90.; 0." />
+  <posXYZ  volume="Beam_1" X_Y_Z=" 0.; 0.; -2750. " rot=" 0.; 90.; 0." />
+  <posXYZ  volume="Beam_Box" X_Y_Z=" -2680.; 3771.05; 1375. " rot=" 0.; 0.; 90." />
+  <posXYZ  volume="Beam_Box" X_Y_Z=" 2680.; 3771.05; 1375. " rot=" 0.; 0.; 90." />
+  <posXYZ  volume="Beam_Box" X_Y_Z=" -2680.; 3771.05; -1375. " rot=" 0.; 0.; 90." />
+  <posXYZ  volume="Beam_Box" X_Y_Z=" 2680.; 3771.05; -1375. " rot=" 0.; 0.; 90." />
+</composition>
+<!-- end of  Description of Beam  -->
+
+<!--  Description of Rail  -->
+
+<gvxy name="Rail_1" material="Iron" dZ="5400.">
+<gvxy_point X_Y="-1740.; 4659.14"/>
+<gvxy_point X_Y="-1010.; 4659.14"/>
+<gvxy_point X_Y="-1010.; 4559.14"/>
+<gvxy_point X_Y="-1345.; 4559.14"/>
+<gvxy_point X_Y="-1345.; 4319.14"/>
+<gvxy_point X_Y="-1150.; 4319.14"/>
+<gvxy_point X_Y="-1150.; 4259.14"/>
+<gvxy_point X_Y="-1600.; 4259.14"/>
+<gvxy_point X_Y="-1600.; 4319.14"/>
+<gvxy_point X_Y="-1405.; 4319.14"/>
+<gvxy_point X_Y="-1405.; 4559.14"/>
+<gvxy_point X_Y="-1740.; 4559.14"/>
+</gvxy>
+
+<composition  name="Rail" >
+  <posXYZ  volume="Rail_1" X_Y_Z=" 0.; 0.; 0. " rot=" 0.; 90.; -0.708" />
+  <posXYZ  volume="Rail_1" X_Y_Z=" 0.; 0.; -2750. " rot=" 0.; 90.; -0.708" />
+</composition>
+<!-- end of  Description of Rail  -->
+
+
+<!--  Description of Shims  -->
+<gvxy name="Shims_1" material="Iron" dZ="238.">
+<gvxy_point X_Y="-2700.; 4291.76"/>
+<gvxy_point X_Y="2700.; 4225.029"/>
+<gvxy_point X_Y="2700.; 4211."/>
+<gvxy_point X_Y="-2700.; 4211."/>
+</gvxy>
+
+<composition  name="Shims" >
+  <posXYZ  volume="Shims_1" X_Y_Z=" 0.; 1.; 1375. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Shims_1" X_Y_Z=" 0.; 1.; -1375. " rot=" 0.; 0.; 0." />
+</composition>
+<!-- end of  Description of Shims  -->
+
+<!--  Description of Bracing  -->
+<gvxy name="Bracing_1" material="Aluminium" dZ="4038.">
+<gvxy_point X_Y="1745.; 99.5"/>
+<gvxy_point X_Y="1745.; 120."/>
+<gvxy_point X_Y="2005.; 120."/>
+<gvxy_point X_Y="2005.; 99.5"/>
+<gvxy_point X_Y="1883.; 99.5"/>
+<gvxy_point X_Y="1883.; -99.5"/>
+<gvxy_point X_Y="2005.; -99.5"/>
+<gvxy_point X_Y="2005.; -120."/>
+<gvxy_point X_Y="1745.; -120."/>
+<gvxy_point X_Y="1745.; -99.5"/>
+<gvxy_point X_Y="1847.; -99.5"/>
+<gvxy_point X_Y="1847.; 99.5"/>
+</gvxy>
+
+<gvxy name="subt_box" material="Aluminium" dZ="4038.">
+<gvxy_point X_Y="1735.46; 120.05"/>
+<gvxy_point X_Y="2016.3; 120.05"/>
+<gvxy_point X_Y="2016.3; -120.05"/>
+<gvxy_point X_Y="1735.46; -120.05"/>
+</gvxy>
+
+ <subtraction name="Sub_Bracing_1" >
+  <posXYZ volume="Bracing_1" X_Y_Z=" 0.; 0.; 0." rot=" -60.3; 0.; 0."/>
+  <posXYZ volume="subt_box" X_Y_Z=" 0.; 0; 0." rot=" 60.3; 0.; 0."/>
+ </subtraction>
+
+<gvxy name="Bracing_2" material="Aluminium" dZ="3588.">
+<gvxy_point X_Y="-120.; 120."/>
+<gvxy_point X_Y="-102.; 120."/>
+<gvxy_point X_Y="-102.; 6.25"/>
+<gvxy_point X_Y="102.; 6.25"/>
+<gvxy_point X_Y="102.; 120."/>
+<gvxy_point X_Y="120.; 120."/>
+<gvxy_point X_Y="120.; -120."/>
+<gvxy_point X_Y="102.; -120."/>
+<gvxy_point X_Y="102.; -6.25"/>
+<gvxy_point X_Y="-102.; -6.25"/>
+<gvxy_point X_Y="-102.; -120."/>
+<gvxy_point X_Y="-120.; -120."/>
+</gvxy>
+
+<box name="sub_Bracing_2" material="Aluminium" X_Y_Z="241.1; 240.1; 3600."/>
+
+ <subtraction name="Sub_Bracing_2" >
+  <posXYZ volume="Bracing_2" X_Y_Z=" 0.; 0.; 0." rot=" 0; 90.; 38.2"/>
+  <posXYZ volume="sub_Bracing_2" X_Y_Z=" 0.; 0; 0." rot=" 0.; 90.; -38.2"/>
+ </subtraction>
+
+<composition  name="Bracing" >
+  <posXYZ  volume="Bracing_1" X_Y_Z=" 0.; 0.; 0. " rot="60.3; 0.; 0." />
+  <posXYZ  volume="Sub_Bracing_1" X_Y_Z=" 0.; 0.; 0. " rot="0.; 0.; 0." />
+  <posXYZ  volume="Bracing_1" X_Y_Z=" -3750.; 0.; 0. " rot="60.3; 0.; 0." />
+  <posXYZ  volume="Sub_Bracing_1" X_Y_Z=" -3750.; 0.; 0. " rot="0.; 0.; 0." />
+  <posXYZ  volume="Bracing_2" X_Y_Z=" 0.; -712.3; 1375. " rot="0.; 90.; -38.2" />
+  <posXYZ  volume="Sub_Bracing_2" X_Y_Z=" 0.; -712.3; 1375. " rot="0.; 0.; 0." />
+  <posXYZ  volume="Bracing_2" X_Y_Z=" 0.; 1990.7; 1375. " rot="0.; 90.; -38.2" />
+  <posXYZ  volume="Sub_Bracing_2" X_Y_Z=" 0.; 1990.7; 1375. " rot="0.; 0.; 0." />
+  <posXYZ  volume="Bracing_2" X_Y_Z=" 0.; -712.3; -1375. " rot="0.; 90.; -38.2" />
+  <posXYZ  volume="Sub_Bracing_2" X_Y_Z=" 0.; -712.3; -1375. " rot="0.; 0.; 0." />
+  <posXYZ  volume="Bracing_2" X_Y_Z=" 0.; 1990.7; -1375. " rot="0.; 90.; -38.2" />
+  <posXYZ  volume="Sub_Bracing_2" X_Y_Z=" 0.; 1990.7; -1375. " rot="0.; 0.; 0." />
+</composition>
+
+<!-- end of  Description of Bracing  -->
+
+
+<!--  Description of Brackets  -->
+<gvxy name="Brackets_1" material="Iron" dZ="880.">
+<gvxy_point X_Y="-2145.; -2028.9"/>
+<gvxy_point X_Y="-1605.; -2028.9"/>
+<gvxy_point X_Y="-1605.; -2094.9"/>
+<gvxy_point X_Y="-1845.; -2094.9"/>
+<gvxy_point X_Y="-1845.; -3175."/>
+<gvxy_point X_Y="-1605.; -3175."/>
+<gvxy_point X_Y="-1605.; -3241."/>
+<gvxy_point X_Y="-2145.; -3241."/>
+<gvxy_point X_Y="-2145.; -3175."/>
+<gvxy_point X_Y="-1905.; -3175."/>
+<gvxy_point X_Y="-1905.; -2094.9"/>
+<gvxy_point X_Y="-2145.; -2094.9"/>
+</gvxy>
+
+<composition  name="Brackets" >
+  <posXYZ  volume="Brackets_1" X_Y_Z=" 0.; 0.; 665. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Brackets_1" X_Y_Z=" 0.; 0.; -665. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Brackets_1" X_Y_Z=" 3750.; 0.; 665. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Brackets_1" X_Y_Z=" 3750.; 0.; -665. " rot=" 0.; 0.; 0." />
+</composition>
+<!-- end of  Description of Brackets  -->
+
+<!--  Description of Inox  -->
+<box name="Inox_1" material="Iron" X_Y_Z="267.; 5478.; 36.8"/>
+
+<composition  name="Inox" >
+  <posXYZ  volume="Inox_1" X_Y_Z=" -2398.5; 500.; 1086.55 " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Inox_1" X_Y_Z=" -2398.5; 500.; -1086.55 " rot=" 0.; 0.; 0." />
+</composition>
+<!-- end of  Description of Inox  -->
+
+<!--  Description of Infrastructure  -->
+<gvxy name="Infrastructure_Feet_1" material="Iron" dZ="974.">
+<gvxy_point X_Y="1935.; -467."/>
+<gvxy_point X_Y="1935.; -478."/>
+<gvxy_point X_Y="1878.25; -478."/>
+<gvxy_point X_Y="1878.25; -576."/>
+<gvxy_point X_Y="1935.; -576."/>
+<gvxy_point X_Y="1935.; -587."/>
+<gvxy_point X_Y="1815.; -587."/>
+<gvxy_point X_Y="1815.; -576."/>
+<gvxy_point X_Y="1871.75; -576."/>
+<gvxy_point X_Y="1871.75; -478."/>
+<gvxy_point X_Y="1815.; -478."/>
+<gvxy_point X_Y="1815.; -467."/>
+</gvxy>
+
+<box name="Infrastructure_box_1" material="Iron" X_Y_Z="4449.1; 11.3; 1949.1"/>
+
+<gvxy name="Infrastructure_Feet_2" material="Iron" dZ="974.">
+<gvxy_point X_Y="-1476.; 1355.95"/>
+<gvxy_point X_Y="-1476.; 1349.05"/>
+<gvxy_point X_Y="-1510.15; 1349.05"/>
+<gvxy_point X_Y="-1510.15; 1222.85"/>
+<gvxy_point X_Y="-1476.; 1222.85"/>
+<gvxy_point X_Y="-1476.; 1215.95"/>
+<gvxy_point X_Y="-1549.; 1215.95"/>
+<gvxy_point X_Y="-1549.; 1222.85"/>
+<gvxy_point X_Y="-1515.95; 1222.85"/>
+<gvxy_point X_Y="-1514.85; 1349.05"/>
+<gvxy_point X_Y="-1549.; 1349.05"/>
+<gvxy_point X_Y="-1549.; 1355.95"/>
+</gvxy>
+
+<box name="Infrastructure_box_2" material="Iron" X_Y_Z="5360.; 20.4; 510."/>
+
+<composition  name="Infrastructure" >
+  <posXYZ  volume="Infrastructure_Feet_1" X_Y_Z=" 0.; 2809.05; 0. " rot=" 90.; 0.; 0." />
+  <posXYZ  volume="Infrastructure_Feet_1" X_Y_Z=" 0.; 2809.05; -1054. " rot=" 90.; 0.; 0." />
+  <posXYZ  volume="Infrastructure_Feet_1" X_Y_Z=" -3750.; 2809.05; 0. " rot=" 90.; 0.; 0." />
+  <posXYZ  volume="Infrastructure_Feet_1" X_Y_Z=" -3750.; 2809.05; -1054. " rot=" 90.; 0.; 0." />
+  <posXYZ  volume="Infrastructure_box_1" X_Y_Z=" 0.; 3301.75; 0. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Infrastructure_Feet_2" X_Y_Z=" 0.; 0.; 610.5 " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Infrastructure_Feet_2" X_Y_Z=" 0.; 0.; -610.5 " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Infrastructure_Feet_2" X_Y_Z=" 3025.; 0.; 610.5 " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Infrastructure_Feet_2" X_Y_Z=" 3025.; 0.; -610.5 " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Infrastructure_box_2" X_Y_Z=" 0.; 1366.2; 379. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Infrastructure_box_2" X_Y_Z=" 0.; 1366.2; -379. " rot=" 0.; 0.; 0." />
+</composition>
+<!-- end of  Description of Infrastructure  -->
+
+<!--  Description of JF Table  -->
+
+<!--  Description of JF Table Beam  -->
+
+<box name="Table_Beam_2" material="Iron" X_Y_Z="3500.; 50.; 500."/>
+<tubs name="sub_tube" material="Iron" Rio_Z="0.; 155.; 2700." nbPhi="32"/>
+
+ <subtraction name="Sub_Beam_2" >
+  <posXYZ volume="Table_Beam_2" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 0."/>
+  <posXYZ volume="sub_tube" X_Y_Z=" -825.; 0.; 0." rot=" 90.; 0.; 0."/>
+  <posXYZ volume="sub_tube" X_Y_Z=" 825.; 0.; 0." rot=" 90.; 0.; 0."/>
+ </subtraction>
+
+<gvxy name="Table_Beam_3" material="Iron" dZ="500.">
+<gvxy_point X_Y="-1750.; -225."/>
+<gvxy_point X_Y="-979.29; -225."/>
+<gvxy_point X_Y="-679.29; -525."/>
+<gvxy_point X_Y="679.29; -525."/>
+<gvxy_point X_Y="979.29; -225."/>
+<gvxy_point X_Y="1750.; -225."/>
+<gvxy_point X_Y="1750.; -317."/>
+<gvxy_point X_Y="958.; -317."/>
+<gvxy_point X_Y="700.; -575."/>
+<gvxy_point X_Y="-700.; -575."/>
+<gvxy_point X_Y="-958.; -317."/>
+<gvxy_point X_Y="-1750.; -317."/>
+</gvxy>
+
+ <subtraction name="Sub_Table_Beam_3" >
+  <posXYZ volume="Table_Beam_3" X_Y_Z=" 0.; 0.; 0." rot=" 0; 0.; 0."/>
+  <posXYZ volume="sub_tube" X_Y_Z=" -825.; 0.; 0." rot=" 90.; 0.; 0."/>
+  <posXYZ volume="sub_tube" X_Y_Z=" 825.; 0.; 0." rot=" 90.; 0.; 0."/>
+ </subtraction>
+
+<box name="Table_Beam_4" material="Iron" X_Y_Z="80.; 199.9; 500."/>
+<box name="Table_Beam_5" material="Iron" X_Y_Z="400.; 199.9; 50."/>
+<box name="Table_Beam_6" material="Iron" X_Y_Z="50.; 400.; 500."/>
+
+<gvxy name="Table_Beam_7" material="Iron" dZ="499.9">
+<gvxy_point X_Y="-640.05; 250."/>
+<gvxy_point X_Y="-540.05; 250."/>
+<gvxy_point X_Y="-540.05; 34."/>
+<gvxy_point X_Y="540.05; 34."/>
+<gvxy_point X_Y="540.05; 250."/>
+<gvxy_point X_Y="640.05; 250."/>
+<gvxy_point X_Y="640.05; -250."/>
+<gvxy_point X_Y="540.05; -250."/>
+<gvxy_point X_Y="540.05; -34."/>
+<gvxy_point X_Y="-540.05; -34."/>
+<gvxy_point X_Y="-540.05; -250."/>
+<gvxy_point X_Y="-640.05; -250."/>
+</gvxy>
+
+<composition  name="JF_Table_Beam_1" >
+  <posXYZ  volume="Sub_Beam_2" X_Y_Z=" 0.; 0.; 0. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Sub_Table_Beam_3" X_Y_Z=" 0.; 0.; 0. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Table_Beam_4" X_Y_Z=" 1080.; -125.; 0. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Table_Beam_4" X_Y_Z=" -1080.; -125.; 0. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Table_Beam_5" X_Y_Z=" -1550.; -125.; 0. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Table_Beam_5" X_Y_Z=" -1550.; -125.; 225. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Table_Beam_5" X_Y_Z=" -1550.; -125.; -225. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Table_Beam_5" X_Y_Z=" 1549.95; -125.; 0. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Table_Beam_5" X_Y_Z=" 1549.95; -125.; 225. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Table_Beam_5" X_Y_Z=" 1549.95; -125.; -225. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Table_Beam_6" X_Y_Z=" 1775.1; -75.; 0. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Table_Beam_7" X_Y_Z=" 0.; -275.; 0. " rot=" 90.; 0.; 0." />
+</composition>
+
+<!-- end of  Description of JF Table Beam  -->
+
+<!--  Description of JF Table Cross Bar  -->
+
+<box name="HF_Cross_Bar_1" material="Iron" X_Y_Z="200.; 200.; 1049.9"/>
+<box name="HF_Cross_Bar_sub_box" material="Iron" X_Y_Z="170.; 170.; 1100."/>
+
+<subtraction name="Sub_HF_Cross_Bar" >
+  <posXYZ volume="HF_Cross_Bar_1" X_Y_Z=" 0.; 0.; 0." rot=" 0; 0.; 0."/>
+  <posXYZ volume="HF_Cross_Bar_sub_box" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 0."/>
+ </subtraction>
+<!-- end of  Description of JF Table Cross Bar  -->
+
+<!--  Description of Jacks  -->
+<tubs name="Jacks_1" material="ShieldBrass" Rio_Z="122.5; 149.; 1540." nbPhi="32"/>
+<tubs name="Jacks_2" material="ShieldBrass" Rio_Z="120.; 245.; 90." nbPhi="32"/>
+<tubs name="Jacks_3" material="ShieldBrass" Rio_Z="0.; 103.5; 1570." nbPhi="32"/>
+<tubs name="Jacks_4" material="ShieldBrass" Rio_Z="105.; 155.; 100." nbPhi="32"/>
+<tubs name="Jacks_5" material="ShieldBrass" Rio_Z="0.; 80.; 160." nbPhi="32"/>
+
+<composition  name="Jacks" >
+  <posXYZ  volume="Jacks_1" X_Y_Z=" 0.; -745.; 0. " rot=" 90.; 0.; 0." />
+  <posXYZ  volume="Jacks_2" X_Y_Z=" 0.; 70.05; 0. " rot=" 90.; 0.; 0." />
+  <posXYZ  volume="Jacks_3" X_Y_Z=" 0.; 900.05; 0. " rot=" 90.; 0.; 0." />
+  <posXYZ  volume="Jacks_4" X_Y_Z=" 0.; 1735.1; 0. " rot=" 90.; 0.; 0." />
+  <posXYZ  volume="Jacks_5" X_Y_Z=" 0.; 1787.; 0. " rot=" 90.; 0.; 0." />
+</composition>
+<!--  end of Description of Jacks  -->
+
+<!--  Description of Motorised NuT  -->
+
+<box name="Motorised_NuT" material="Aluminium" X_Y_Z="290.; 280.; 300."/>
+
+<!--  end of Description of Motorised NuT  -->
+
+<composition  name="JF_Table" >
+  <posXYZ  volume="JF_Table_Beam_1" X_Y_Z=" 0.; 0.; 775. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="JF_Table_Beam_1" X_Y_Z=" 0.; 0.; -775. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Sub_HF_Cross_Bar" X_Y_Z=" 1552.5; -120.; 0. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Sub_HF_Cross_Bar" X_Y_Z=" -1552.5; -120.; 0. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Jacks" X_Y_Z=" 825.; 0.; 775. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Jacks" X_Y_Z=" -825.; 0.; 775. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Jacks" X_Y_Z=" 825.; 0.; -775. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Jacks" X_Y_Z=" -825.; 0.; -775. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Motorised_NuT" X_Y_Z=" 410.; 195.05; 775. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Motorised_NuT" X_Y_Z=" 410.; 195.05; -775. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Motorised_NuT" X_Y_Z=" -410.; 195.05; 775. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Motorised_NuT" X_Y_Z=" -410.; 195.05; -775. " rot=" 0.; 0.; 0." />
+</composition>
+
+<!--  end of Description of JF Table Beam  -->
+<composition  name="Truck_A_C" >
+<posXYZ volume="Column_C1-L_C2-R" X_Y_Z=" 0. ; 0. ; 0." />
+  <posXYZ volume="Beam" X_Y_Z=" 0. ; 0. ; 0." />
+  <posXYZ volume="Rail" X_Y_Z=" 0. ; 0. ; 0." />
+  <posXYZ volume="Shims" X_Y_Z=" 0. ; 0. ; 0." />
+  <posXYZ volume="Bracing" X_Y_Z=" 0. ; 0. ; 0." />
+  <posXYZ volume="Brackets" X_Y_Z=" 0. ; 0. ; 0." />
+  <posXYZ volume="Inox" X_Y_Z=" 0. ; 0. ; 0." />
+  <posXYZ volume="Infrastructure" X_Y_Z=" 0. ; 0. ; 0." />
+  <posXYZ  volume="JF_Table" X_Y_Z=" 0.; 5000.; 0. " rot=" 0.; 90.; 0." />
+</composition>
+
+<composition  name="HFTruckRail" >
+  <posXYZ volume="Truck_A_C"      X_Y_Z=" 0. ; -9000.; 19132." />
+  <posXYZ volume="Truck_A_C"      X_Y_Z=" 0. ; -9000.; -19132." />
+</composition>
+
+
+</section>
+
+
+<section name       = "RUN2_Services"
+         version    = "1.0"
+         date       = "September 2014"
+         author     = "Antonios Leisos, Jochen Meyer"
+         top_volume = "RUN2_Services">
+
+<!--     name       =  Run2 supports                  section name       = "Services"     -->
+
+<var name="BME_ElectronicsBox_Frame_xwid"        value="2350."/> <!-- ATLMHS_0114 -->
+<var name="BME_ElectronicsBox_Frame_ywid"        value=" 100."/> <!-- ATLMHS_0114 -->
+<var name="BME_ElectronicsBox_Frame_zwid"        value=" 600."/> <!-- ATLMHS_0114 -->
+<var name="BME_ElectronicsBox_Frame_width"       value="  50."/> <!-- ATLMHS_0114 -->
+<var name="BME_ElectronicsBox_Frame_plate_width" value="   7."/> <!-- Approximate value -->
+<var name="BME_ElectronicsBox_Frame_box_width"   value="   5."/> <!-- Approximate value tuned to the weight -->
+<var name="BME_ElectronicsBox_Frame_distance_from_chamber" value="120."/> <!-- Markus Lippert:121mm and a little bit smaller since thery are not parallel -->
+
+<box  name="BME_ElectronicsBox_Outer"  material="Aluminium"  X_Y_Z="BME_ElectronicsBox_Frame_xwid; BME_ElectronicsBox_Frame_ywid ;  BME_ElectronicsBox_Frame_zwid" />
+<box  name="BME_ElectronicsBox_Inner"  material="Aluminium"  X_Y_Z="BME_ElectronicsBox_Frame_xwid-2.*BME_ElectronicsBox_Frame_width; BME_ElectronicsBox_Frame_ywid+10. ;  BME_ElectronicsBox_Frame_zwid-2.*BME_ElectronicsBox_Frame_width" />
+
+<subtraction  name="BME_Electronics_Box" >
+  <posXYZ  volume="BME_ElectronicsBox_Outer"  />
+  <posXYZ  volume="BME_ElectronicsBox_Inner"  />
+</subtraction>
+
+<box  name="BME_ElectronicsBox_Plate"  material="Aluminium"  X_Y_Z="BME_ElectronicsBox_Frame_xwid-2.*BME_ElectronicsBox_Frame_width-2.*GENV_Eps; BME_ElectronicsBox_Frame_plate_width;  BME_ElectronicsBox_Frame_zwid-2.*BME_ElectronicsBox_Frame_width-2.*GENV_Eps" />
+
+<box  name="BME_ElectronicsBox_Box"    material="Carbon"  X_Y_Z="BME_ElectronicsBox_Frame_xwid-2.*BME_ElectronicsBox_Frame_width-2.*GENV_Eps; BME_ElectronicsBox_Frame_box_width;  BME_ElectronicsBox_Frame_zwid-2.*BME_ElectronicsBox_Frame_width-2.*GENV_Eps" />
+
+<composition name="BME_Electronics">
+  <posXYZ volume="BME_Electronics_Box" />
+  <posXYZ volume="BME_ElectronicsBox_Plate" X_Y_Z=" 0.;BME_ElectronicsBox_Frame_ywid*0.5-BME_ElectronicsBox_Frame_plate_width*0.5;0." />
+  <posXYZ volume="BME_ElectronicsBox_Box" X_Y_Z=" 0.;BME_ElectronicsBox_Frame_ywid*0.5-BME_ElectronicsBox_Frame_plate_width-BME_ElectronicsBox_Frame_box_width/2.-GENV_Eps;0." />
+</composition>
+
+<var name="BOEwall_thickness"   value="200."/>
+<var name="BOEwall_ywid"        value="2000."/>
+<var name="BOEwall_xwid"        value="3400."/>
+<var name="BOEwall_zwid"        value="2200."/>
+
+<var name="BOEbox4_xwid"        value="BOEwall_xwid-2*BOEwall_thickness"/> 
+<var name="BOEbox4_ywid"        value="BOEwall_ywid"/> 
+<var name="BOEbox4_zwid"        value="BOEwall_thickness"/> 
+<var name="BOEbox4_xpos"        value="0."/>
+<var name="BOEbox4_ypos"        value="0."/>
+<var name="BOEbox4_zpos"        value="0."/>
+
+<var name="BOEbox5_xwid"        value="BOEwall_thickness"/> 
+<var name="BOEbox5_ywid"        value="BOEwall_ywid"/> 
+<var name="BOEbox5_zwid"        value="BOEwall_zwid"/> 
+<var name="BOEbox5_xpos"        value="BOEbox4_xwid/2+BOEbox5_xwid/2+GENV_Eps"/>
+<var name="BOEbox5_ypos"        value="BOEbox4_ypos"/>
+<var name="BOEbox5_zpos"        value="BOEwall_zwid/2-BOEwall_thickness/2"/>
+
+<box name="BOEbox4" material="Aluminium" X_Y_Z=" BOEbox4_xwid;BOEbox4_ywid;BOEbox4_zwid" /> 
+<box name="BOEbox5" material="Aluminium" X_Y_Z=" BOEbox5_xwid;BOEbox5_ywid;BOEbox5_zwid" /> 
+
+<var name="ElavatorSupport_xwid"         value=" 200. "/> <!-- approximate value -->
+<var name="ElavatorSupport_zwid"         value=" 200. "/> <!-- approximate value -->
+<var name="ElavatorSupport_ywid"         value="BOEwall_ywid"/>
+<var name="ElavatorSupport_xpos"         value="1000. "/>  <!-- approximate value -->
+<var name="ElavatorSupport_ypos"         value="BOEbox5_ypos"/> 
+<var name="ElavatorSupport_zpos"         value="BOEbox5_zpos"/>
+
+<var name="ElavatorCross_zwid"           value="  10. "/> <!-- approximate value -->
+<var name="ElavatorCross_xwid"           value="2.*ElavatorSupport_xpos-ElavatorSupport_xwid-2.*GENV_Eps"/> 
+<var name="ElavatorCross_ywid"           value="1000. "/> <!-- approximate value -->
+<var name="ElavatorCross_xpos"           value="BOEbox4_xpos"/> 
+<var name="ElavatorCross_ypos"           value="BOEwall_ywid/2.-ElavatorCross_ywid/2."/>
+<var name="ElavatorCross_zpos"           value="ElavatorSupport_zpos"/> 
+
+<var name="ElavatorTopFrame_xwid"        value="BOEbox4_xwid+2.*BOEbox5_xwid"/>
+<var name="ElavatorTopFrame_zwid"        value="BOEbox5_zwid"/> 
+<var name="ElavatorTopFrame_ywid"        value=" 200. "/>  <!-- approximate value --> 
+<var name="ElavatorTopFrame_xpos"        value="BOEbox4_xpos"/> 
+<var name="ElavatorTopFrame_ypos"        value="BOEbox4_ywid/2+ElavatorTopFrame_ywid/2+GENV_Eps"/> 
+<var name="ElavatorTopFrame_zpos"        value="BOEbox5_zpos"/> 
+<var name="ElavatorTopFrame_thickness"   value="  30. "/> <!-- approximate value -->  
+<var name="ElavatorTopPlate_xwid"        value="ElavatorTopFrame_xwid"/>  
+<var name="ElavatorTopPlate_zwid"        value="ElavatorTopFrame_zwid"/> 
+<var name="ElavatorTopPlate_ywid"        value="   5. "/>  <!-- approximate value --> 
+<var name="ElavatorTopPlate_xpos"        value="BOEbox4_xpos"/> 
+<var name="ElavatorTopPlate_ypos"        value="ElavatorTopFrame_ypos+ElavatorTopFrame_ywid/2+ElavatorTopPlate_ywid/2+GENV_Eps"/>  
+<var name="ElavatorTopPlate_zpos"        value="BOEbox5_zpos"/> 
+
+<box name="ElevatorSupport"        material="Aluminium" X_Y_Z=" ElavatorSupport_xwid;  ElavatorSupport_ywid;  ElavatorSupport_zwid" /> 
+<box name="ElevatorCross"          material="Aluminium" X_Y_Z="   ElavatorCross_xwid;    ElavatorCross_ywid;    ElavatorCross_zwid" /> 
+<box name="ElevatorTopFrame_Outer" material="Aluminium" X_Y_Z="ElavatorTopFrame_xwid; ElavatorTopFrame_ywid; ElavatorTopFrame_zwid" /> 
+<box name="ElevatorTopFrame_Inner" material="Aluminium" X_Y_Z="ElavatorTopFrame_xwid-ElavatorTopFrame_thickness; ElavatorTopFrame_ywid; ElavatorTopFrame_zwid-ElavatorTopFrame_thickness" /> 
+
+<subtraction  name="ElevatorTopFrame" >
+  <posXYZ  volume="ElevatorTopFrame_Outer"  />
+  <posXYZ  volume="ElevatorTopFrame_Inner"  />
+</subtraction>
+
+<box name="ElevatorTopPlate" material="Aluminium" X_Y_Z=" ElavatorTopPlate_xwid; ElavatorTopPlate_ywid; ElavatorTopPlate_zwid" /> 
+
+<composition  name="BOEwallside" >
+   <posXYZ  volume="BOEbox4"          X_Y_Z="          BOEbox4_xpos;          BOEbox4_ypos;          BOEbox4_zpos" /> 
+   <posXYZ  volume="ElevatorSupport"  X_Y_Z="  ElavatorSupport_xpos;  ElavatorSupport_ypos;  ElavatorSupport_zpos" /> 
+   <posXYZ  volume="ElevatorCross"    X_Y_Z="    ElavatorCross_xpos;    ElavatorCross_ypos;    ElavatorCross_zpos" /> 
+   <posXYZ  volume="ElevatorSupport"  X_Y_Z=" -ElavatorSupport_xpos;  ElavatorSupport_ypos;  ElavatorSupport_zpos" /> 
+   <posXYZ  volume="ElevatorTopFrame" X_Y_Z=" ElavatorTopFrame_xpos; ElavatorTopFrame_ypos; ElavatorTopFrame_zpos" /> 
+   <posXYZ  volume="ElevatorTopPlate" X_Y_Z=" ElavatorTopPlate_xpos; ElavatorTopPlate_ypos; ElavatorTopPlate_zpos" /> 
+   <posXYZ  volume="BOEbox5"          X_Y_Z="          BOEbox5_xpos;          BOEbox5_ypos;          BOEbox5_zpos" /> 
+   <posXYZ  volume="BOEbox5"          X_Y_Z="         -BOEbox5_xpos;          BOEbox5_ypos;          BOEbox5_zpos" /> 
+</composition>
+
+<composition name="BOEwall">
+   <posXYZ volume="BOEwallside"    X_Y_Z="  0.;  -12970 ;   6900." rot="0.;180.; 0" />
+   <posXYZ volume="BOEwallside"    X_Y_Z="  0.;  -12970 ;  -7060." rot="0.;  0.; 0" />
+</composition>
+
+<composition name="RUN2_Services">
+  <posXYZ volume="BME_Electronics" X_Y_Z="0.;-7786.6-0.5*229.5;GENV_Eps+7057.8+0.5*BME_ElectronicsBox_Frame_zwid+BME_ElectronicsBox_Frame_distance_from_chamber" />
+  <posXYZ volume="BME_Electronics" X_Y_Z="0.;-7786.6-0.5*229.5;-GENV_Eps-7057.8-0.5*BME_ElectronicsBox_Frame_zwid-BME_ElectronicsBox_Frame_distance_from_chamber" />
+  <posXYZ volume="BOEwall"         X_Y_Z="0.; 0.; 0."  rot="-0.708; 0.; 0"/>
+</composition>
+
+</section>
+
+<section name       = "ATLAS Plancher (in french in the text)"
+         version    = "7.0"
+         date       = "22 November 2008"
+         author     = "Laurent"
+         top_volume = "Plancher">
+
+<!--     name       =  Plancher                      section name       = "Supports"  -->
+<!--     plan:ATF1 UX 150001   -->
+<defaults unit_length="mm"/>
+
+<box name="box1" material="Iron" X_Y_Z="30000; 5002;27000" />
+<box name="box2" material="Iron" X_Y_Z="30000; 1336; 9000" />
+<box name="box3" material="Iron" X_Y_Z=" 5200;10000;27010" /> <!-- use larger length in z than box1 to not run into issues with volume subtraction -->
+
+<subtraction  name="central" >
+  <posXYZ  volume="box1" X_Y_Z="0;   0;0" />
+  <posXYZ  volume="box3" X_Y_Z="0;4541;0" />
+</subtraction>
+
+<composition name="PlancherTilte">
+   <posXYZ volume="central" X_Y_Z="0;  -13871;      0"  /> <!-- the distance between cavern floor and centre of beam axis at IP is 11370mm, cf. atcz____0005-vAC -->
+   <posXYZ volume="box2"    X_Y_Z="0;  -15704;  18005"  />
+   <posXYZ volume="box2"    X_Y_Z="0;  -15704; -18005"  />
+</composition>
+
+<composition name="Plancher">
+   <posXYZ volume="PlancherTilte" X_Y_Z="0;0;0"  rot="-0.708;0;0"/>
+</composition>
+
+</section>
+
+<section name       = "ID-EMC-Tile"
+         version    = "7.0"
+         date       = "21 Juin 2010"
+         author     = "Laurent Chevalier"
+         top_volume = "IDEMTile">
+
+<!--     name       =  Tile Fingers                  section name       = "ID-EM-Tile"-->
+
+<trd name="TileFinger1"   material="Iron1"     Xmp_Ymp_Z="420 ;  420 ; 176  ; 130 ;  300 "  />
+
+<var name="FingerPos"      value="6540" />
+<var name="FingerShift"    value="210" />
+
+<composition name="TileFinger2">
+       <posXYZ volume="TileFinger1" X_Y_Z="JDSH_BDRRouRa_RetrunRing_outerRadius-JDReturnL/2. ; 0 ; 0." rot=" 90.;  90.; 270."  />
+</composition>
+
+<composition name="TileFinger3">
+  <foreach  index="IFing"  begin="1"  loops="8" >
+    <posXYZ volume="TileFinger2" X_Y_Z="0 ; 0 ; 0" rot="0.;0.; IFing*45/8 +2.81"  />
+  </foreach>
+</composition>
+
+<composition name="TileFingersA">
+ <posXYZ volume="TileFinger3" X_Y_Z="0 ; 0 ; 0" rot="0.;0.; 270"  />
+ <posXYZ volume="TileFinger3" X_Y_Z="0 ; 0 ; 0" rot="0.;0.; 315"  />
+ <posXYZ volume="TileFinger3" X_Y_Z="0 ; 0 ; 0" rot="0.;0.;   0"  />
+ <posXYZ volume="TileFinger3" X_Y_Z="0 ; 0 ; 0" rot="0.;0.;  45"  />
+</composition>
+<composition name="TileFingersB">
+ <posXYZ volume="TileFinger3" X_Y_Z="0 ; 0 ; 0" rot="0.;0.;  90"  />
+ <posXYZ volume="TileFinger3" X_Y_Z="0 ; 0 ; 0" rot="0.;0.; 135"  />
+ <posXYZ volume="TileFinger3" X_Y_Z="0 ; 0 ; 0" rot="0.;0.; 180"  />
+ <posXYZ volume="TileFinger3" X_Y_Z="0 ; 0 ; 0" rot="0.;0.; 225"  />
+</composition>
+
+<composition name="TileFingers">
+ <posXYZ volume="TileFingersA" X_Y_Z="0 ; 0 ; FingerPos - FingerShift"   />
+ <posXYZ volume="TileFingersB" X_Y_Z="0 ; 0 ; FingerPos - FingerShift"   />
+ <posXYZ volume="TileFingersA" X_Y_Z="0 ; 0 ;-FingerPos + FingerShift"   />
+ <posXYZ volume="TileFingersB" X_Y_Z="0 ; 0 ;-FingerPos + FingerShift"   />
+</composition>
+
+</section>
+
+<!-- ===========================================NJD=========================================== -->
+
+<section name       = "NJD Disk"
+         version    = "0.0"
+         date       = "16-11-2016"
+         author     = "Georgian Engineering Team - Niko Tsutskiridze"
+         top_volume = "JDSH_Shield_NSW">
+
+<!-- NJD Disk -->
+
+<!-- main disk-->
+<tubs name="MD01"   material="ShieldSteel"  Rio_Z="430.; 4360.; 40."  nbPhi="32." />
+<tubs name="MD02"   material="ShieldSteel"  Rio_Z="430.; 2700.;  48.7"  nbPhi="32." />
+<tubs name="MDB01_Cut"   material="ShieldSteel"  Rio_Z="0.; 840.; 3."  nbPhi="32." />
+
+<gvxy   name="MD03"   material="ShieldSteel"  dZ="40." >
+  <gvxy_point X_Y="-3370.; -3950."/>
+  <gvxy_point X_Y="-3370.; -3880."/>
+  <gvxy_point X_Y="-3679.5; -2484."/>
+  <gvxy_point X_Y="-3990.; -1734.39"/>
+  <gvxy_point X_Y="-2599.16; -3470."/>
+  <gvxy_point X_Y="-2670.; -3570."/>
+  <gvxy_point X_Y="-2670.; -3950."/>
+</gvxy>
+
+<subtraction name="MDB01_Un" >
+ <posXYZ volume="MD01" />
+ <posXYZ volume="MDB01_Cut" X_Y_Z=" 0.; 0.; 19.4 " />
+</subtraction>
+
+<union name="MDB01" >
+ <posXYZ volume="MDB01_Un" />
+ <posXYZ volume="MD03"  />
+ <posXYZ volume="MD03" rot=" 0.; 180.; 0."/>
+</union>
+<!-- End main disk-->
+
+
+<!-- Ret.Flux -->
+<tubs name="FLUX_Box"   material="ShieldSteel"  Rio_Z="3800.; 4360.; 39.9"  nbPhi="32." />
+<box  name="FLUX_Cut_Box" material="ShieldSteel"  X_Y_Z="2200.; 400.;  50." />
+
+<subtraction name="FLUX" >
+ <posXYZ volume="FLUX_Box" />
+ <posXYZ volume="FLUX_Cut_Box" X_Y_Z=" -1930.; 3430.; 0." />
+</subtraction>
+<!-- End Ret.Flux -->
+
+<!-- FIXING PLATE -->
+<box  name="FIXING_PLATE" material="ShieldSteel"  X_Y_Z="350.; 975.;  40.9" />
+<box  name="FIXING_PLATE_Special" material="ShieldSteel"  X_Y_Z="350.; 787.5;  40.9" />
+
+<composition name="FIXING_PLATE_Pos" >
+ <posXYZ volume="FIXING_PLATE" X_Y_Z=" 0.; 3252.5; 0." />
+</composition>
+
+<composition name="FIXING_PLATE_Ass" >
+ <posXYZ volume="FIXING_PLATE_Special" X_Y_Z=" -1208.8; 2918.31; 0." rot=" 0.; 0.; 22.5" />
+ <posXYZ volume="FIXING_PLATE_Pos" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 67.5" />
+ <posXYZ volume="FIXING_PLATE_Pos" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 112.5" />
+ <posXYZ volume="FIXING_PLATE_Pos" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 157.5" />
+ <posXYZ volume="FIXING_PLATE_Pos" X_Y_Z=" 0.; 0.; 0."  rot=" 0.; 0.; 202.5" />
+ <posXYZ volume="FIXING_PLATE_Pos" X_Y_Z=" 0.; 0.; 0."  rot=" 0.; 0.; 247.5" />
+ <posXYZ volume="FIXING_PLATE_Pos" X_Y_Z=" 0.; 0.; 0."  rot=" 0.; 0.; 292.5" />
+ <posXYZ volume="FIXING_PLATE_Pos" X_Y_Z=" 0.; 0.; 0."  rot=" 0.; 0.; 337.5" />
+</composition>
+<!-- End FIXING PLATE -->
+
+<!-- NJD feet-->
+<gvxy   name="JF01"   material="ShieldSteel"  dZ="37.3" >
+  <gvxy_point X_Y="-3300.; -3950."/>
+  <gvxy_point X_Y="-3300.; -3480."/>
+  <gvxy_point X_Y="-3270.; -3450."/>
+  <gvxy_point X_Y="-2730.; -3450."/>
+  <gvxy_point X_Y="-2700.; -3480."/>
+  <gvxy_point X_Y="-2700.; -3950."/>
+</gvxy>
+
+<gvxy   name="JF02"   material="ShieldSteel"  dZ="35." >
+  <gvxy_point X_Y="-342.4; -3950."/>
+  <gvxy_point X_Y="-342.4; -3930."/>
+  <gvxy_point X_Y="-77.4; -3470."/>
+  <gvxy_point X_Y="-57.4; -3470."/>
+  <gvxy_point X_Y="-57.4; -3920."/>
+  <gvxy_point X_Y="-87.4; -3950."/>
+</gvxy>
+
+<gvxy   name="JF03"   material="ShieldSteel"  dZ="48." >
+  <gvxy_point X_Y="-3370.; -362."/>
+  <gvxy_point X_Y="-3370.; 704."/>
+  <gvxy_point X_Y="-3495.; 704."/>
+  <gvxy_point X_Y="-3495.; 933."/>
+  <gvxy_point X_Y="-2660.; 933."/>
+  <gvxy_point X_Y="-2660.; 653."/>
+  <gvxy_point X_Y="-2700.; 653."/>
+  <gvxy_point X_Y="-2700.; 523."/>
+  <gvxy_point X_Y="-2590.; 523."/>
+  <gvxy_point X_Y="-2590.; -52."/>
+  <gvxy_point X_Y="-2685.; -52."/>
+  <gvxy_point X_Y="-2685.; -362."/>
+</gvxy>
+
+<gvxy   name="JF04"   material="ShieldSteel"  dZ="41.6" >
+  <gvxy_point X_Y="-453.5; -4251.1"/>
+  <gvxy_point X_Y="-453.5; -4158.1"/>
+  <gvxy_point X_Y="-603.; -4083.1"/>
+  <gvxy_point X_Y="-603.; -4038.1"/>
+  <gvxy_point X_Y="-362.; -4038.1"/>
+  <gvxy_point X_Y="-362.; -3998.1"/>
+  <gvxy_point X_Y="883.; -3998.1"/>
+  <gvxy_point X_Y="883.; -4251.1"/>
+</gvxy>
+
+<gvxy   name="JF05"   material="ShieldSteel"  dZ="356.1" >
+  <gvxy_point X_Y="-603.; -4048.1"/>
+  <gvxy_point X_Y="-603.; -4038.1"/>
+  <gvxy_point X_Y="-362.; -4038.1"/>
+  <gvxy_point X_Y="-362.; -3998.1"/>
+  <gvxy_point X_Y="-253.; -3998.1"/>
+  <gvxy_point X_Y="-253.; -4048.1"/>
+</gvxy>
+
+<box  name="JF06" material="ShieldSteel"  X_Y_Z="536.; 253.; 71.4" />
+
+<!-- Right-->
+<composition name="Right_Feet" >
+ <posXYZ volume="JF01" X_Y_Z=" 0.; 0.; 38.7" rot=" 0.; 0.; 0." />
+ <posXYZ volume="JF02" X_Y_Z=" -2802.5; 0.; 0." rot=" 0.; 90.; 0." />
+ <posXYZ volume="JF02" X_Y_Z=" -3197.5; 0.; 0." rot=" 0.; 90.; 0." />
+ <posXYZ volume="JF03" X_Y_Z=" 0.; -3974.05; 0." rot=" -90.; 0.; 0." />
+ <posXYZ volume="JF04" X_Y_Z=" -2805.2; 0.; 0." rot=" 0.; 90.; 0." />
+ <posXYZ volume="JF04" X_Y_Z=" -3203.; 0.; 0." rot=" 0.; 90.; 0." />
+ <posXYZ volume="JF05" X_Y_Z=" -3004.1; 0.; 0." rot=" 0.; 90.; 0." />
+ <posXYZ volume="JF06" X_Y_Z=" -3000.; -4124.6; -918.75" rot=" 0.; 0.; 0." />
+</composition>
+<!-- End Right-->
+
+<!-- Left-->
+<composition name="Left_Feet" >
+ <posXYZ volume="JF01" X_Y_Z=" 0.; 0.; 38.7" rot=" 0.; 180.; 0." />
+ <posXYZ volume="JF02" X_Y_Z=" 2802.5; 0.; 0." rot=" 0.; 90.; 0." />
+ <posXYZ volume="JF02" X_Y_Z=" 3197.5; 0.; 0." rot=" 0.; 90.; 0." />
+ <posXYZ volume="JF03" X_Y_Z=" 0.; -3974.05; 0." rot=" -90.; 0.; 180." />
+ <posXYZ volume="JF04" X_Y_Z=" 2805.2; 0.; 0." rot=" 0.; 90.; 0." />
+ <posXYZ volume="JF04" X_Y_Z=" 3203.; 0.; 0." rot=" 0.; 90.; 0." />
+ <posXYZ volume="JF05" X_Y_Z=" 3004.1; 0.; 0." rot=" 0.; 90.; 0." />
+ <posXYZ volume="JF06" X_Y_Z=" 3000.; -4124.6; -918.75" rot=" 0.; 0.; 0." />
+</composition>
+<!-- End Right-->
+<!-- End NJD feet-->
+
+<composition name="JDDisk_ASide" >
+ <posXYZ volume="MDB01"  X_Y_Z=" 0.; 0.; 6880." rot=" 0.; 0.; 0." />
+ <posXYZ volume="MD02" X_Y_Z=" 0.; 0.; 6835.6" rot=" 0.; 0.;0."/>
+ <posXYZ volume="FLUX" X_Y_Z=" 0.; 0.; 6840." rot=" 0.; 0.; 0." />
+ <posXYZ volume="FIXING_PLATE_Ass" X_Y_Z=" 0.; 0.; 6839.5" rot=" 0.; 0.; 0." />
+ <posXYZ volume="Right_Feet"  X_Y_Z=" 0.; 0.; 6880." rot=" 0.; 180.; 0." />
+ <posXYZ volume="Left_Feet"  X_Y_Z=" 0.; 0.; 6880." rot=" 0.; 180.; 0." />
+</composition>
+
+<composition name="JDDisk_CSide" >
+ <posXYZ volume="MDB01"  X_Y_Z=" 0.; 0.; -6880." rot=" 0.; 180.; 0." />
+ <posXYZ volume="MD02" X_Y_Z=" 0.; 0.; -6835.6" rot=" 0.; 0.;0."/>
+ <posXYZ volume="FLUX" X_Y_Z=" 0.; 0.; -6840." rot=" 0.; 0.; 0." />
+ <posXYZ volume="FIXING_PLATE_Ass" X_Y_Z=" 0.; 0.; -6839.5" rot=" 0.; 0.; 0." />
+ <posXYZ volume="Right_Feet"  X_Y_Z=" 0.; 0.; -6880." rot=" 0.; 0.; 0." />
+ <posXYZ volume="Left_Feet"  X_Y_Z=" 0.; 0.; -6880." rot=" 0.; 0.; 0." />
+</composition>
+<!-- End NJD Disk -->
+
+<!-- Vertical Shielding HO -->
+<tubs name="Vertical_Shielding_HO_Poly" material="PolyBoronB2O3"  Rio_Z=" 840. ; 1655. ; 40."  nbPhi="32." /> <!-- HD PE Borotron 5% HD050 - Density: 1010kg/m3 -->
+<tubs name="Lateral_plate_TubeCut_Lead" material="Lead"  Rio_Z=" 870. ; 1655. ; 10."  nbPhi="32." />
+
+<composition  name="Vertical_Shielding_HO_Assembly" > 
+   <posXYZ volume="Vertical_Shielding_HO_Poly" X_Y_Z=" 0. ; 0.; 6920." rot="0. ; 0. ; 0."  />
+   <posXYZ volume="Lateral_plate_TubeCut_Lead" X_Y_Z=" 0. ; 0.; 6945.01" rot="0. ; 0. ; 0."  />
+</composition>
+<!-- End Vertical Shielding HO -->
+
+<!-- NJD Vert Shield -->
+    <!-- Inner -->
+<tubs name="Inner_SST" material="ShieldSteel"  Rio_Z="1025. ; 1105. ; 70."  nbPhi="32." />
+    <!-- End Inner -->
+
+    <!-- Middle -->
+<tubs name="Middle_Iron" material="Iron"  Rio_Z="1135. ; 1359.9 ; 70."  nbPhi="32." />
+<tubs name="Middle_Borotron" material="PolyBoronB2O3"  Rio_Z=" 1360. ; 1589.9 ; 70."  nbPhi="32." /> <!-- HD PE Borotron 5% HD050 - Density: 1010kg/m3 -->
+<tubs name="Middle_Lead" material="Lead"  Rio_Z="1590. ; 1610. ; 70."  nbPhi="32." />
+
+<composition  name="Middle_VS" > 
+   <posXYZ volume="Middle_Iron" X_Y_Z=" 0. ; 0.; 6775." rot="0. ; 0. ; 0."  />
+   <posXYZ volume="Middle_Borotron" X_Y_Z=" 0. ; 0.; 6775." rot="0. ; 0. ; 0."  />
+   <posXYZ volume="Middle_Lead" X_Y_Z=" 0. ; 0.; 6775." rot="0. ; 0. ; 0."  />
+</composition>
+    <!-- End Middle -->
+
+    <!-- Outer -->
+<tubs name="Outer_Borotron" material="PolyBoronB2O3"  Rio_Z="1643. ; 1762.9 ; 50."  nbPhi="32." /> <!-- HD PE Borotron 5% HD050 - Density: 1010kg/m3 -->
+<tubs name="Outer_Lead" material="Lead"  Rio_Z="1763. ; 1772.9 ; 50."  nbPhi="32." /> 
+<tubs name="Outer_SSteel" material="ShieldSteel"  Rio_Z="1773. ; 1777. ; 50."  nbPhi="32." /> 
+
+<composition  name="Outer_VS" > 
+   <posXYZ volume="Outer_Borotron" X_Y_Z=" 0. ; 0.; 6760." rot="0. ; 0. ; 0."  />   
+   <posXYZ volume="Outer_Lead" X_Y_Z=" 0. ; 0.; 6760." rot="0. ; 0. ; 0."  />  
+   <posXYZ volume="Outer_SSteel" X_Y_Z=" 0. ; 0.; 6760." rot="0. ; 0. ; 0."  />     
+</composition>
+    <!-- End Outer -->
+
+<composition  name="NJD_Vert_Shield_assembly" > 
+   <posXYZ volume="Inner_SST" X_Y_Z=" 0. ; 0.; 6770." rot="0. ; 0. ; 0."  />
+   <posXYZ volume="Middle_VS" />
+   <posXYZ volume="Outer_VS" />   
+</composition>
+    <!-- NJD Vert Shield -->
+
+<!-- ================================================ NSW movement ========================================= -->  
+<!-- NSW movement -->
+<tubs name="JD_PAD"  material="Iron"  Rio_Z="0.; 352.75; 105."  nbPhi="36" />
+<tubs name="JD_TOP_Pad"  material="Iron"  Rio_Z="0.; 155.8; 226.4"  nbPhi="36" />
+<tubs name="BJ_asse"  material="Iron"  Rio_Z="0.; 73.; 380."  nbPhi="36" />
+<box  name="XbracketN"  material="Iron"  X_Y_Z="95.88; 230.; 218." />
+<tubs name="VerinN"  material="Iron"  Rio_Z="22.5; 55.65; 1477."  nbPhi="36" />
+
+<box  name="JD_TOP_Pad2"  material="Iron"  X_Y_Z="180.; 425.; 226." />
+
+
+
+<box  name="Bracket_FC"  material="Iron"  X_Y_Z="613.; 56.; 56." />
+
+<box  name="NSW_Extension_Main"  material="Iron"  X_Y_Z="478.8; 252.2; 340." />
+
+<box  name="NSW_Extension_CutBox"  material="Iron"  X_Y_Z="218.; 270.2; 480." />
+
+<subtraction name="NSW_Extension">
+    <posXYZ volume="NSW_Extension_Main" rot="0. ; 90. ; 0." />
+    <posXYZ volume="NSW_Extension_CutBox" X_Y_Z="0.; -58.2; 0." />
+</subtraction>
+
+<composition  name="NSW_MovementL" > 
+   <posXYZ volume="JD_PAD" X_Y_Z=" 0.; 496.94; 0. " rot="0. ; 0. ; 0." />
+   <posXYZ volume="JD_TOP_Pad2" X_Y_Z=" 0.; 635.14; 166.42 " rot="0. ; 0. ; 0." />
+   <posXYZ volume="JD_PAD" X_Y_Z=" 0.; 1701.; 0. " rot="0. ; 0. ; 0." />
+   <posXYZ volume="JD_TOP_Pad" X_Y_Z=" 0.; 1701.; 166.01 " rot="0. ; 0. ; 0." />
+   <posXYZ volume="BJ_asse" X_Y_Z=" 0.; 950.58; 130. " rot="0. ; 0. ; 0." />
+   <posXYZ volume="BJ_asse" X_Y_Z=" 0.; 1273.; 130. " rot="0. ; 0. ; 0." />
+   <posXYZ volume="XbracketN" X_Y_Z=" -272.7; 604.; 170. " rot="0. ; 0. ; 0." />
+   <posXYZ volume="XbracketN" X_Y_Z=" -272.7; 1611.5; 170. " rot="0. ; 0. ; 0." />
+   <posXYZ volume="VerinN" X_Y_Z=" -388.; 1002.5; 212. " rot="90. ; 0. ; 0." />
+   <posXYZ volume="Bracket_FC" X_Y_Z=" 524.51; 254.66; 339.5 " rot="0. ; 0. ; 0." />
+   <posXYZ volume="NSW_Extension" X_Y_Z=" 0.; 635.14; 202.62 " rot="90. ; 0. ; 180." />
+</composition>
+
+<composition  name="NSW_MovementR" > 
+   <posXYZ volume="JD_PAD" X_Y_Z=" 0.; 496.94; 0. " rot="0. ; 0. ; 0." />
+   <posXYZ volume="JD_TOP_Pad2" X_Y_Z=" 0.; 635.14; 166.42 " rot="0. ; 0. ; 0." />
+   <posXYZ volume="JD_PAD" X_Y_Z=" 0.; 1701.; 0. " rot="0. ; 0. ; 0." />
+   <posXYZ volume="JD_TOP_Pad" X_Y_Z=" 0.; 1701.; 166.01 " rot="0. ; 0. ; 0." />
+   <posXYZ volume="BJ_asse" X_Y_Z=" 0.; 950.58; 130. " rot="0. ; 0. ; 0." />
+   <posXYZ volume="BJ_asse" X_Y_Z=" 0.; 1273.; 130. " rot="0. ; 0. ; 0." />
+   <posXYZ volume="XbracketN" X_Y_Z=" 272.7; 604.; 170. " rot="0. ; 0. ; 0." />
+   <posXYZ volume="XbracketN" X_Y_Z=" 272.7; 1611.5; 170. " rot="0. ; 0. ; 0." />
+   <posXYZ volume="VerinN" X_Y_Z=" 388.; 1002.5; 212. " rot="90. ; 0. ; 0." />
+   <posXYZ volume="Bracket_FC" X_Y_Z=" -524.51; 254.66; 339.5 " rot="0. ; 0. ; 0." />
+   <posXYZ volume="NSW_Extension" X_Y_Z=" 0.; 635.14; 202.62 " rot="90. ; 0. ; 180." />
+</composition>
+
+<composition  name="NSW_Movement" > 
+   <posXYZ volume="NSW_MovementL" X_Y_Z=" -3000.; -4329.5; 8153. " rot="-90. ; 0. ; 0." />
+   <posXYZ volume="NSW_MovementR" X_Y_Z=" 3000.; -4329.5; 8153. " rot="-90. ; 0. ; 0." />
+</composition>
+<!-- end NSW movement -->
+
+<composition  name="JDSH_Shield_NSW" >
+ <posXYZ volume="JDDisk_ASide"  X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 0." />
+ <!-- Aside -->
+ <posXYZ volume="Vertical_Shielding_HO_Assembly" />
+ <posXYZ volume="NJD_Vert_Shield_assembly" />
+ <posXYZ volume="NSW_Movement" X_Y_Z=" 0.; 0.; 0. " rot="0. ; 0. ; 0."/>
+</composition>
+
+</section>
+
+<!-- ===========================================Full ATLAS=========================================== -->
+
+<section name       = "ATLAS"
+         version    = "7.0"
+         date       = "22 November 2008"
+         author     = "Laurent"
+         top_volume = "All">
+
+<composition name="Magnets">
+   <posXYZ volume="ECT_Toroids"        X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="BAR_Toroid"         X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="Solenoid"           X_Y_Z="0.;0.;0."/>
+</composition>
+
+<composition name="Service">
+   <posXYZ volume="servicesAtZ0"           X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="pp2"                    X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="MBAP_AccessPlatform"    X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="RUN2_Services"          X_Y_Z="0.;0.;0."/>
+</composition>
+
+<composition name="Shield">
+   <posXYZ volume="JTSH_Shield"         X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="JDSH_Shield"         X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="JDSH_Shield_NSW"     X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="JFSH_Shield"         X_Y_Z="0.;0.;0."/>
+</composition>
+
+<composition name="Supports">
+   <posXYZ volume="Feet"                      X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="RailAssembly"              X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="HFTruckRail"               X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="SADL_CalorimeterSaddle"    X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="MBWH_BigWheels"            X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="TBWH_BigWheels"            X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="TGC1_BigWheels"            X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="TGC3_BigWheels"            X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="MDTRail"                   X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="Plancher"                  X_Y_Z="0.;0.;0."/>
+</composition>
+
+<composition name="IdEmTile">
+   <posXYZ  volume="TileFingers"  X_Y_Z="0.;0.;0." />
+</composition>
+
+</section>
+
+</AGDD>
diff --git a/MuonSpectrometer/MuonG4/MuonPassiveMaterials/data/passiveMat_r.09.02.xml b/MuonSpectrometer/MuonG4/MuonPassiveMaterials/data/passiveMat_r.09.02.xml
new file mode 100644
index 000000000000..0c812065e9a3
--- /dev/null
+++ b/MuonSpectrometer/MuonG4/MuonPassiveMaterials/data/passiveMat_r.09.02.xml
@@ -0,0 +1,9536 @@
+<?xml version="1.0"?>
+
+<AGDD>
+
+<section name       = "General Variables"
+         version    = "7.0"
+         date       = "17 January 2005"
+         author     = "Serguei Baranov, Daniel Pomarede"
+         top_volume = "useless">
+
+<!--     name       =  Constants of general use      section name       = "Constante" -->
+
+<var name="GENV_Pi"     value="2. * asin(1)" />
+<var name="GENV_Eps"    value="0.1" />
+<var name="GENV_PiS180" value="GENV_Pi/180." />
+
+<var name="GENV_Si5"   value="sin( 5.0*GENV_PiS180)"/>
+<var name="GENV_Co5"   value="cos( 5.0*GENV_PiS180)"/>
+
+<var name="GENV_Ta15"  value="tan(15.0*GENV_PiS180)"/>
+
+<var name="GENV_Ta20"  value="tan(20.0*GENV_PiS180)"/>
+
+<var name="GENV_Si225" value="sin(22.5*GENV_PiS180)"/>
+<var name="GENV_Co225" value="cos(22.5*GENV_PiS180)"/>
+<var name="GENV_Ta225" value="tan(22.5*GENV_PiS180)"/>
+
+<var name="GENV_Ta375" value="tan(37.5*GENV_PiS180)"/>
+
+<var name="GENV_Si45"  value="sin(45.0*GENV_PiS180)"/>
+<var name="GENV_Co45"  value="cos(45.0*GENV_PiS180)"/>
+<var name="GENV_Ta45"  value="tan(45.0*GENV_PiS180)"/>
+
+<var name="GENV_Si525" value="sin(52.5*GENV_PiS180)"/>
+<var name="GENV_Co525" value="cos(52.5*GENV_PiS180)"/>
+
+<var name="GENV_Ta55"  value="tan(55.0*GENV_PiS180)"/>
+
+<var name="GENV_Si675" value="sin(67.5*GENV_PiS180)"/>
+<var name="GENV_Co675" value="cos(67.5*GENV_PiS180)"/>
+<var name="GENV_Ta675" value="tan(67.5*GENV_PiS180)"/>
+
+<var name="GENV_Ta77"  value="tan(77.0*GENV_PiS180)"/>
+<var name="Zero"             value="  0"/>
+
+<var name="PiOver2" value="90." />
+<var name="PiOver4" value="45." />
+
+</section>
+<section name       = "Atlas ECT Toroidal Magnets"
+         version    = "8.0"
+         date       = "01-01-10, 28 November 2002 -> Summer 2011"
+         author     = "Laurent Chevalier, Marc Virchaux, Daniel Pomarede -> review Jochen Meyer"
+         top_volume = "ECT_Toroids">
+
+<!--     name       =  Atlas ECT Toroidal Magnets    section name       = "Magnets"   -->
+
+<!--  **************************************************************
+      **************************************************************
+      ***                                                       ****
+      ***             Atlas End-Cap Toroids (ECT)               ****
+      ***                                                       ****
+      **************************************************************
+      **************************************************************  -->
+
+<var name="AECT_Toroid_ZPosition" value=" 10406. "/> <!-- confirmed atczte__0002-vAB -->
+
+
+<!-- cold mass parameters -->
+
+<!-- conductor surrounding mass from atltecc_0012-v0 and atltecc_0013-v0 -->
+
+<var name="AECT_CMZwid_ColdMassZwidth"       value="  4490.7 "/>  <!-- warm:  4510.  -->
+<var name="AECT_CMRwid_ColdMassRadwidth"     value="  3942.0 "/>  <!-- warm:  3959.  -->
+<var name="AECT_CMPwid_ColdMassPhiwidth"     value="   270.8 "/>  <!-- warm:   272.  -->
+<var name="AECT_CMHrad_ColdMassHolerad"      value="   250.  "/>  <!-- warm value kept, may be increased due to shrinking of surrounding material -->
+<var name="AECT_CMEOff_ColdMassEdgeOff"      value="   612.4 "/>  <!-- warm:   615.  cold: 612.4 -->
+<var name="AECT_CMHRp1_ColdMassHoleRpo1"     value="  1702.7 "/>  <!-- warm:  1710.  -->
+<var name="AECT_CMHRp2_ColdMassHoleRpo2"     value="   995.7 "/>  <!-- warm:  1000.  -->
+
+<var name="AECT_CMIWba_ColdMassInWebbase"    value="   402.3  "/>  <!-- from atltecc_0011-v0, warm: 202. for the half of it-->
+<var name="AECT_CMIWed_ColdMassInWebedge"    value="   199.1 "/>   <!-- from atltecc_0011-v0, warm: 200. -->
+<!-- following value does not agree to atltecc_0011-v0, it's from consistency calculation, seems smaller in blueprints -->
+<!-- if one wants to decrease the outer radius of the coil this value has to be reduced in the same way! -->
+<var name="AECT_CMIWhi_ColdMassInWebhigh"    value="    90.1  "/>   
+<var name="AECT_CMgodi_ColdMassgloboutdi"    value=" 10164.1 "/>  <!-- from 10014054-07, warm:  10238.  -->
+<var name="AECT_CMgira_ColdMassglobinrad"    value="  1045.  "/>  <!-- from atltec__0001-v0, warm 1050. -->
+
+<!-- keystone box from atltecc_0008-v0 -->
+
+<var name="AECT_KSthic_KeyStonethickness"    value="    39.8 "/>  <!-- warm:    40.  -->
+<var name="AECT_KSlthi_KeyStonelowthick"     value="    59.7 "/>  <!-- warm:    60.  -->
+<var name="AECT_KSHrad_KeyStoneHolerad"      value="   570.  "/>  <!-- warm value kept, may be increased due to shrinking of surrounding material -->
+<var name="AECT_KSHRpo_KeyStoneHoleRpos"     value="  2041.2 "/>  <!-- warm:  2050.  -->
+<var name="AECT_KSZwid_KeyStoneZwidth"       value="  3265.9 "/>  <!-- warm:  3280.  -->
+<var name="AECT_KStRwi_KeyStonetotRwidth"    value="  2837.8 "/>  <!-- warm:  2850.  -->
+<var name="AECT_KSmRwi_KeyStonemidRwidth"    value="   507.8 "/>  <!-- warm:   510.  -->
+<var name="AECT_KSlRwi_KeyStonelowRwidth"    value="   199.1 "/>  <!-- warm:   200.  -->
+<var name="AECT_KStPwi_KeyStonetopPhiwid"    value="  2816.4 "/>  <!-- warm:  2828.5 -->
+<var name="AECT_KSlPwi_KeyStonelowPhiwid"    value="   428.1 "/>  <!-- warm:   430.  -->
+<var name="AECT_KSlPof_KeyStonelowPhioff"    value="   214.1 "/>  <!-- warm:   215.  -->
+<var name="AECT_KSBRwi_KeyStoneBoxRwidth"    value="   492.9 "/>  <!-- warm:   495.  -->
+<var name="AECT_KSFPRo_KeyStoneFootPROff"    value="   291.7 "/>  <!-- warm:   293.  -->
+
+<box  name="ECT_CM_ConductorFrame_basic" material="Aluminium"  X_Y_Z="AECT_CMZwid_ColdMassZwidth ; AECT_CMRwid_ColdMassRadwidth; AECT_CMPwid_ColdMassPhiwidth" />
+<box  name="ECT_CM_ConductorFrame_edge"  material="Aluminium"  X_Y_Z="AECT_CMEOff_ColdMassEdgeOff; AECT_CMEOff_ColdMassEdgeOff; 2.*AECT_CMPwid_ColdMassPhiwidth" />
+<tubs name="ECT_CM_ConductorFrame_Hole"  material="Aluminium"  Rio_Z="0.; AECT_CMHrad_ColdMassHolerad; 2.*AECT_CMPwid_ColdMassPhiwidth"  nbPhi="20" />
+
+<subtraction name="ECT_CM_ConductorFrame" >
+  <posXYZ volume="ECT_CM_ConductorFrame_basic"  X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_CM_ConductorFrame_edge"   X_Y_Z="  AECT_CMZwid_ColdMassZwidth/2.;  AECT_CMRwid_ColdMassRadwidth/2.; 0." rot=" 0.; 0.; 45. "/>  
+  <posXYZ volume="ECT_CM_ConductorFrame_edge"   X_Y_Z=" -AECT_CMZwid_ColdMassZwidth/2.;  AECT_CMRwid_ColdMassRadwidth/2.; 0." rot=" 0.; 0.; 45. "/>  
+  <posXYZ volume="ECT_CM_ConductorFrame_edge"   X_Y_Z="  AECT_CMZwid_ColdMassZwidth/2.; -AECT_CMRwid_ColdMassRadwidth/2.; 0." rot=" 0.; 0.; 45. "/>  
+  <posXYZ volume="ECT_CM_ConductorFrame_edge"   X_Y_Z=" -AECT_CMZwid_ColdMassZwidth/2.; -AECT_CMRwid_ColdMassRadwidth/2.; 0." rot=" 0.; 0.; 45. "/>  
+  <posXYZ volume="ECT_CM_ConductorFrame_Hole"   X_Y_Z=" 0.; AECT_CMRwid_ColdMassRadwidth/2. - AECT_CMHRp1_ColdMassHoleRpo1 ; 0." />
+  <posXYZ volume="ECT_CM_ConductorFrame_Hole"   X_Y_Z=" 0.; AECT_CMRwid_ColdMassRadwidth/2. - AECT_CMHRp1_ColdMassHoleRpo1 - AECT_CMHRp2_ColdMassHoleRpo2 ; 0." />
+</subtraction>
+
+<gvxysx name="ECT_CM_ConductorInnerWeb" material="Aluminium" dZ="AECT_KSZwid_KeyStoneZwidth">
+  <gvxy_point X_Y="AECT_CMIWba_ColdMassInWebbase/2. - GENV_Eps; 0."/>
+  <gvxy_point X_Y="GENV_Si225*AECT_CMIWed_ColdMassInWebedge + AECT_CMIWba_ColdMassInWebbase/2.-GENV_Eps; GENV_Co225*AECT_CMIWed_ColdMassInWebedge"/>
+  <gvxy_point X_Y="AECT_CMPwid_ColdMassPhiwidth/2. + 2.*GENV_Eps; GENV_Co225*AECT_CMIWed_ColdMassInWebedge"/>
+  <gvxy_point X_Y="AECT_CMPwid_ColdMassPhiwidth/2. + 2.*GENV_Eps ; AECT_CMIWhi_ColdMassInWebhigh  - GENV_Eps"/>
+</gvxysx>
+
+<trd  name="ECT_CM_KeyStoneTop" material="Aluminium" Xmp_Ymp_Z=" AECT_KStPwi_KeyStonetopPhiwid; AECT_KStPwi_KeyStonetopPhiwid - 2.*GENV_Ta225*AECT_KSthic_KeyStonethickness; AECT_KSZwid_KeyStoneZwidth; AECT_KSZwid_KeyStoneZwidth; AECT_KSthic_KeyStonethickness" />
+
+<box  name="ECT_CM_KeyStoneMid_basic"  material="Aluminium"  X_Y_Z="AECT_KStPwi_KeyStonetopPhiwid -  GENV_Ta225 * AECT_KSthic_KeyStonethickness * 2. ; AECT_KStRwi_KeyStonetotRwidth - AECT_KSthic_KeyStonethickness - AECT_KSmRwi_KeyStonemidRwidth  ; AECT_KSthic_KeyStonethickness" />
+<box  name="ECT_CM_KeyStoneMid_CutBox" material="Aluminium"  X_Y_Z="AECT_KStPwi_KeyStonetopPhiwid; AECT_KSZwid_KeyStoneZwidth ; 2.*AECT_KSthic_KeyStonethickness" />
+<tubs name="ECT_CM_KeyStoneMid_Hole"   material="Aluminium"  Rio_Z="0.; AECT_KSHrad_KeyStoneHolerad; 2.*AECT_KSthic_KeyStonethickness"  nbPhi="20" />
+
+<subtraction name="ECT_CM_KeyStoneMid" >
+  <posXYZ volume="ECT_CM_KeyStoneMid_basic"   X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_CM_KeyStoneMid_Hole"    X_Y_Z=" 0.; AECT_KSHRpo_KeyStoneHoleRpos - AECT_KSmRwi_KeyStonemidRwidth/2. - AECT_KStRwi_KeyStonetotRwidth/2.; 0." />
+  <posXYZ volume="ECT_CM_KeyStoneMid_CutBox"  X_Y_Z=" (AECT_KStPwi_KeyStonetopPhiwid * (1.+GENV_Co225) - AECT_KSZwid_KeyStoneZwidth*GENV_Si225 -  GENV_Ta225 * AECT_KSthic_KeyStonethickness*2.)/2. + GENV_Eps; (-AECT_KSZwid_KeyStoneZwidth*GENV_Co225 - AECT_KStPwi_KeyStonetopPhiwid * GENV_Si225)/2. + (AECT_KStRwi_KeyStonetotRwidth - AECT_KSthic_KeyStonethickness - AECT_KSmRwi_KeyStonemidRwidth)/2. + GENV_Eps * GENV_Ta225 ; 0." rot=" 0.; 0.; -22.5 "/>
+  <posXYZ volume="ECT_CM_KeyStoneMid_CutBox"  X_Y_Z="-(AECT_KStPwi_KeyStonetopPhiwid * (1.+GENV_Co225) - AECT_KSZwid_KeyStoneZwidth*GENV_Si225 -  GENV_Ta225 * AECT_KSthic_KeyStonethickness*2.)/2. - GENV_Eps; (-AECT_KSZwid_KeyStoneZwidth*GENV_Co225 - AECT_KStPwi_KeyStonetopPhiwid * GENV_Si225)/2. + (AECT_KStRwi_KeyStonetotRwidth - AECT_KSthic_KeyStonethickness - AECT_KSmRwi_KeyStonemidRwidth)/2. + GENV_Eps * GENV_Ta225 ; 0." rot=" 0.; 0.;  22.5 "/>
+</subtraction>
+
+<gvxysx name="ECT_CM_KeyStoneLow" material="Aluminium" dZ="AECT_KSthic_KeyStonethickness">
+  <gvxy_point X_Y=" AECT_KStPwi_KeyStonetopPhiwid/2. - (AECT_KStRwi_KeyStonetotRwidth - AECT_KSmRwi_KeyStonemidRwidth) * GENV_Ta225 ; AECT_KSmRwi_KeyStonemidRwidth"/>
+  <gvxy_point X_Y=" AECT_KSlPof_KeyStonelowPhioff ; AECT_KSlRwi_KeyStonelowRwidth"/>
+  <gvxy_point X_Y=" AECT_KSlPof_KeyStonelowPhioff - AECT_KSlthi_KeyStonelowthick; AECT_KSlRwi_KeyStonelowRwidth"/>
+  <gvxy_point X_Y=" AECT_KSlPof_KeyStonelowPhioff - AECT_KSlthi_KeyStonelowthick; AECT_KSlthi_KeyStonelowthick"/>
+</gvxysx>
+
+<box  name="ECT_CM_KeyStoneInnerWeb_Box1" material="Aluminium"  X_Y_Z=" AECT_KSlthi_KeyStonelowthick - GENV_Eps/2.; AECT_KSlRwi_KeyStonelowRwidth - AECT_KSlthi_KeyStonelowthick;  AECT_KSZwid_KeyStoneZwidth" />
+<box  name="ECT_CM_KeyStoneInnerWeb_Box2" material="Aluminium"  X_Y_Z=" AECT_KSlPwi_KeyStonelowPhiwid - GENV_Eps/2.; AECT_KSlthi_KeyStonelowthick - GENV_Eps; AECT_KSZwid_KeyStoneZwidth" />
+<box  name="ECT_CM_KeyStoneFootPlate"     material="Aluminium"  X_Y_Z=" AECT_KSthic_KeyStonethickness; AECT_KSBRwi_KeyStoneBoxRwidth; AECT_KSZwid_KeyStoneZwidth" />
+
+<composition name="ECT_CM_KeyStone" >
+  <posXYZ volume="ECT_CM_KeyStoneTop"  X_Y_Z=" 0.; AECT_KStRwi_KeyStonetotRwidth - AECT_KSthic_KeyStonethickness/2. + 1.5*GENV_Eps*GENV_Co225; -1.5*GENV_Eps*GENV_Si225" rot=" 90.; 0.; 0. "/>
+  <posXYZ volume="ECT_CM_KeyStoneMid"  X_Y_Z=" 0.; AECT_KStRwi_KeyStonetotRwidth - (AECT_KStRwi_KeyStonetotRwidth + AECT_KSthic_KeyStonethickness - AECT_KSmRwi_KeyStonemidRwidth)/2. + GENV_Eps*GENV_Co225;  AECT_KSZwid_KeyStoneZwidth/2. - AECT_KSthic_KeyStonethickness/2.-GENV_Eps*GENV_Si225" />  
+  <posXYZ volume="ECT_CM_KeyStoneMid"  X_Y_Z=" 0.; AECT_KStRwi_KeyStonetotRwidth - (AECT_KStRwi_KeyStonetotRwidth + AECT_KSthic_KeyStonethickness - AECT_KSmRwi_KeyStonemidRwidth)/2. + GENV_Eps*GENV_Co225; -AECT_KSZwid_KeyStoneZwidth/2. + AECT_KSthic_KeyStonethickness/2.-GENV_Eps*GENV_Si225" />  
+  <posXYZ volume="ECT_CM_KeyStoneLow"  X_Y_Z=" 0.; 0.5*GENV_Eps*GENV_Co225;  AECT_KSZwid_KeyStoneZwidth/2. - AECT_KSthic_KeyStonethickness/2.-0.5*GENV_Eps*GENV_Si225" /> 
+  <posXYZ volume="ECT_CM_KeyStoneLow"  X_Y_Z=" 0.; 0.5*GENV_Eps*GENV_Co225; -AECT_KSZwid_KeyStoneZwidth/2. + AECT_KSthic_KeyStonethickness/2.-0.5*GENV_Eps*GENV_Si225" />   
+  <posXYZ volume="ECT_CM_KeyStoneInnerWeb_Box1"  X_Y_Z=" (AECT_KSlPwi_KeyStonelowPhiwid - AECT_KSlthi_KeyStonelowthick)/2.; (AECT_KSlthi_KeyStonelowthick + AECT_KSlRwi_KeyStonelowRwidth)/2.; 0." /> 
+  <posXYZ volume="ECT_CM_KeyStoneInnerWeb_Box1"  X_Y_Z="-(AECT_KSlPwi_KeyStonelowPhiwid - AECT_KSlthi_KeyStonelowthick)/2.; (AECT_KSlthi_KeyStonelowthick + AECT_KSlRwi_KeyStonelowRwidth)/2.; 0." />   
+  <posXYZ volume="ECT_CM_KeyStoneInnerWeb_Box2"  X_Y_Z=" 0.; AECT_KSlthi_KeyStonelowthick/2.; 0" /> 
+  <posXYZ volume="ECT_CM_KeyStoneFootPlate"      X_Y_Z=" (AECT_KSthic_KeyStonethickness*(GENV_Co225 - 2.*GENV_Si225)  + AECT_KSBRwi_KeyStoneBoxRwidth*GENV_Si225 + AECT_KStPwi_KeyStonetopPhiwid)/2. - GENV_Si225*AECT_KSFPRo_KeyStoneFootPROff; (AECT_KSthic_KeyStonethickness*(-GENV_Si225 - 2) + AECT_KSBRwi_KeyStoneBoxRwidth*GENV_Co225)/2. + AECT_KStRwi_KeyStonetotRwidth - GENV_Co225*AECT_KSFPRo_KeyStoneFootPROff; 0" rot=" 0.; 0.; -22.5 "/>   
+  <posXYZ volume="ECT_CM_KeyStoneFootPlate"      X_Y_Z="-(AECT_KSthic_KeyStonethickness*(GENV_Co225 - 2.*GENV_Si225)  + AECT_KSBRwi_KeyStoneBoxRwidth*GENV_Si225 + AECT_KStPwi_KeyStonetopPhiwid)/2. + GENV_Si225*AECT_KSFPRo_KeyStoneFootPROff; (AECT_KSthic_KeyStonethickness*(-GENV_Si225 - 2) + AECT_KSBRwi_KeyStoneBoxRwidth*GENV_Co225)/2. + AECT_KStRwi_KeyStonetotRwidth - GENV_Co225*AECT_KSFPRo_KeyStoneFootPROff; 0" rot=" 0.; 0.;  22.5 "/>   
+</composition>
+
+<var name="AECT_KSRahi_KeyStoneradihight" value="2.*GENV_Si225*(AECT_KSBRwi_KeyStoneBoxRwidth-AECT_KSFPRo_KeyStoneFootPROff-AECT_KSthic_KeyStonethickness)+2.*GENV_Co225*AECT_KSthic_KeyStonethickness+AECT_KStPwi_KeyStonetopPhiwid" />
+<var name="AECT_KSRpwi_KeyStonephiwidth"  value="AECT_KStRwi_KeyStonetotRwidth + GENV_Co225*(AECT_KSBRwi_KeyStoneBoxRwidth - AECT_KSFPRo_KeyStoneFootPROff) - AECT_KSthic_KeyStonethickness "/>
+
+<composition  name="ECT_ColdMass" >
+  <posXYZ volume="ECT_CM_ConductorFrame"     X_Y_Z=" 0.; AECT_CMgodi_ColdMassgloboutdi/2. - AECT_CMRwid_ColdMassRadwidth/2.; 0." rot=" 0.; 90.; 0."/>
+  <posXYZ volume="ECT_CM_ConductorInnerWeb"  X_Y_Z=" 0.; AECT_CMgira_ColdMassglobinrad; 0." rot=" 0.; 0.; 0."/>
+  <posXYZ volume="ECT_CM_KeyStone"           X_Y_Z=" -AECT_CMgira_ColdMassglobinrad*GENV_Si225; AECT_CMgira_ColdMassglobinrad*GENV_Co225; 0." rot=" 0.; 0.; 22.5"/>
+</composition>
+
+<!-- thermal radiation shielding  - Coil Cover - atlteyr_0288-v0 and atlteyr_0289-v0 -->
+<var name="AECT_CCZwid_CoilCoverZwidth"      value="   348.  "/>
+<var name="AECT_CCPwid_CoilCoverPhiwidth"    value="   700.  "/>
+<var name="AECT_CCfRwi_CoilCoverfullRwid"    value="  3601.  "/>
+<var name="AECT_CCthic_CoilCoverthicknes"    value="    10.  "/>
+<var name="AECT_CCRaof_CoilCoverRadoff"      value="    52.  "/>
+
+<trd name="ECT_CC_CoilCoverSide" material="Aluminium" Xmp_Ymp_Z="AECT_CCfRwi_CoilCoverfullRwid-AECT_CCRaof_CoilCoverRadoff+2.*(AECT_CCthic_CoilCoverthicknes/GENV_Si45 + AECT_CCthic_CoilCoverthicknes); AECT_CCfRwi_CoilCoverfullRwid-AECT_CCRaof_CoilCoverRadoff - 2.*(AECT_CCZwid_CoilCoverZwidth-AECT_CCthic_CoilCoverthicknes/GENV_Si45); AECT_CCthic_CoilCoverthicknes; AECT_CCthic_CoilCoverthicknes; AECT_CCZwid_CoilCoverZwidth + AECT_CCthic_CoilCoverthicknes"/>
+
+<gvxysx name="ECT_CC_CoilCoverTop" material="Aluminium" dZ="AECT_CCPwid_CoilCoverPhiwidth">
+  <gvxy_point X_Y=" (AECT_CCfRwi_CoilCoverfullRwid - AECT_CCRaof_CoilCoverRadoff)/2. - AECT_CCZwid_CoilCoverZwidth + AECT_CCthic_CoilCoverthicknes/GENV_Si45 ; AECT_CCZwid_CoilCoverZwidth + AECT_CCthic_CoilCoverthicknes "/>
+  <gvxy_point X_Y=" (AECT_CCfRwi_CoilCoverfullRwid - AECT_CCRaof_CoilCoverRadoff)/2. + AECT_CCthic_CoilCoverthicknes/GENV_Si45 + AECT_CCthic_CoilCoverthicknes; 0"/>
+  <gvxy_point X_Y=" (AECT_CCfRwi_CoilCoverfullRwid - AECT_CCRaof_CoilCoverRadoff)/2. + AECT_CCthic_CoilCoverthicknes ; 0"/>
+  <gvxy_point X_Y=" (AECT_CCfRwi_CoilCoverfullRwid - AECT_CCRaof_CoilCoverRadoff)/2. - AECT_CCZwid_CoilCoverZwidth - AECT_CCthic_CoilCoverthicknes*GENV_Ta225 + AECT_CCthic_CoilCoverthicknes/GENV_Si45; AECT_CCZwid_CoilCoverZwidth - AECT_CCthic_CoilCoverthicknes + AECT_CCthic_CoilCoverthicknes"/>
+</gvxysx>
+
+<!-- thermal radiation shielding  - EndPlate - atlteyr_0068-v0, atlteyr_0077-v0, atlteyr_0078-v0 and atlteyr_0110-v0 -->
+<var name="AECT_EPthic_EndPlatethickness"    value="    20.  "/>
+<var name="AECT_EPHoPo_EndPlateHolepos"      value="  1720.  "/>
+<var name="AECT_EPHoDi_EndPlateHolediame"    value="   830.  "/>
+<var name="AECT_EPfuhi_EndPlatefullhight"    value="  3467.  "/>
+<var name="AECT_EPmihi_EndPlateminihight"    value="  2740.  "/>
+<var name="AECT_EPfuwi_EndPlatefullwidth"    value="  1959.  "/>
+<var name="AECT_EPmiwi_EndPlatemidwidth"     value="  1200.5 "/>
+<var name="AECT_EPhiwi_EndPlatehighwidth"    value="   775.  "/>
+<var name="AECT_EPlowi_EndPlatelowwidth"     value="   182.  "/>
+<var name="AECT_EPEfuw_EndPlateExtfullwi"    value="   530.  "/>
+<var name="AECT_EPEmiw_EndPlateExtminiwi"    value="   275.  "/>
+<var name="AECT_EPEhig_EndPlateExthight"     value="   240.  "/>
+<var name="AECT_EPBBhi_EndPlateBackBoxwi"    value="  1230.  "/>
+<var name="AECT_EPBBwi_EndPlateBackBoxhi"    value="   145.  "/>
+<var name="AECT_EPFBhi_EndPlateFrontBoxw"    value="   410.  "/>
+<var name="AECT_EPFBwi_EndPlateFrontBoxh"    value="   125.  "/>
+
+<!-- derived variable to get second last point via cot(22.5)*(x-a)= -tan(22.5)*(x-b) + c -->
+<var name="AECT_EPAuVX_EndPlateAuxVarX"      value="GENV_Co225*GENV_Si225*(AECT_EPfuhi_EndPlatefullhight-GENV_Si225*AECT_EPEmiw_EndPlateExtminiwi-(AECT_EPEhig_EndPlateExthight)*GENV_Co225)+GENV_Co225*GENV_Co225* AECT_EPlowi_EndPlatelowwidth+GENV_Si225*GENV_Si225*(AECT_EPfuwi_EndPlatefullwidth-(AECT_EPEhig_EndPlateExthight)*GENV_Si225) "/>
+
+<gvxysx name="ECT_EP_EndPlate_basic" material="Aluminium" dZ="AECT_EPthic_EndPlatethickness">
+  <gvxy_point X_Y=" AECT_EPhiwi_EndPlatehighwidth; AECT_EPmihi_EndPlateminihight "/>
+  <gvxy_point X_Y=" AECT_EPmiwi_EndPlatemidwidth; AECT_EPmihi_EndPlateminihight + (AECT_EPmiwi_EndPlatemidwidth - AECT_EPhiwi_EndPlatehighwidth)*GENV_Ta225 "/>
+  <gvxy_point X_Y=" AECT_EPfuwi_EndPlatefullwidth - AECT_EPEfuw_EndPlateExtfullwi/GENV_Co225; AECT_EPmihi_EndPlateminihight + (AECT_EPmiwi_EndPlatemidwidth - AECT_EPhiwi_EndPlatehighwidth)*GENV_Ta225 + (AECT_EPfuwi_EndPlatefullwidth - AECT_EPmiwi_EndPlatemidwidth - AECT_EPEfuw_EndPlateExtfullwi/GENV_Co225)/GENV_Ta225 "/>
+  <gvxy_point X_Y=" AECT_EPfuwi_EndPlatefullwidth - AECT_EPEmiw_EndPlateExtminiwi*GENV_Co225; AECT_EPfuhi_EndPlatefullhight "/>
+  <gvxy_point X_Y=" AECT_EPfuwi_EndPlatefullwidth; AECT_EPfuhi_EndPlatefullhight  - AECT_EPEmiw_EndPlateExtminiwi*GENV_Si225"/>
+  <gvxy_point X_Y=" AECT_EPfuwi_EndPlatefullwidth - (AECT_EPEhig_EndPlateExthight   )*GENV_Si225; AECT_EPfuhi_EndPlatefullhight  - AECT_EPEmiw_EndPlateExtminiwi*GENV_Si225 - (AECT_EPEhig_EndPlateExthight  )*GENV_Co225"/>
+  <gvxy_point X_Y=" AECT_EPAuVX_EndPlateAuxVarX; (AECT_EPAuVX_EndPlateAuxVarX-AECT_EPlowi_EndPlatelowwidth)/GENV_Ta225 "/>
+  <gvxy_point X_Y=" AECT_EPlowi_EndPlatelowwidth; 0. "/>
+</gvxysx>
+
+<box  name="ECT_EP_EndPlate_BackBox"   material="Aluminium"  X_Y_Z="AECT_EPBBhi_EndPlateBackBoxwi; 2.*AECT_EPBBwi_EndPlateBackBoxhi; 2.*AECT_EPthic_EndPlatethickness" />
+<box  name="ECT_EP_EndPlate_FrontBox"  material="Aluminium"  X_Y_Z="AECT_EPFBhi_EndPlateFrontBoxw; 2.*AECT_EPFBwi_EndPlateFrontBoxh; 2.*AECT_EPthic_EndPlatethickness" />
+<tubs name="ECT_EP_EndPlate_Hole"      material="Aluminium"  Rio_Z="0.; AECT_EPHoDi_EndPlateHolediame/2.; 2.*AECT_EPthic_EndPlatethickness"  nbPhi="20" />
+
+<subtraction name="ECT_EP_EndPlate_front" >
+  <posXYZ volume="ECT_EP_EndPlate_basic"    X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EP_EndPlate_Hole"     X_Y_Z=" 0.; AECT_EPHoPo_EndPlateHolepos; 0." />
+</subtraction>
+
+<subtraction name="ECT_EP_EndPlate_back" >
+  <posXYZ volume="ECT_EP_EndPlate_basic"    X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EP_EndPlate_Hole"     X_Y_Z=" 0.; AECT_EPHoPo_EndPlateHolepos; 0." />
+  <posXYZ volume="ECT_EP_EndPlate_BackBox"  X_Y_Z=" 0.; AECT_EPmihi_EndPlateminihight; 0." />
+</subtraction>
+
+<subtraction name="ECT_EP_EndPlate_special" >
+  <posXYZ volume="ECT_EP_EndPlate_basic"    X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EP_EndPlate_Hole"     X_Y_Z=" 0.; AECT_EPHoPo_EndPlateHolepos; 0." />
+  <posXYZ volume="ECT_EP_EndPlate_FrontBox" X_Y_Z=" 0.; AECT_EPmihi_EndPlateminihight; 0." />
+</subtraction>
+
+<!-- thermal radiation shielding  - Shell - atlteyr_0280-v0 and  atlteyr_0070-v0 -->
+<var name="AECT_OSCCZd_ShellCCZdimension"    value="  3940.  "/>
+<var name="AECT_OSCCRw_ShellCCRadwidth"      value="   400.  "/>
+<var name="AECT_OSCCmw_ShellCCminiwidth"     value="   372.  "/>
+<var name="AECT_OSCCmw_ShellCCedgelength"    value="   451.  "/>
+<var name="AECT_OSCCth_ShellCCthickness"     value="    10.  "/>
+
+<var name="AECT_OSCCmw_ShellCClongwidth"     value="   423.  "/>
+<var name="AECT_OSCCmw_ShellCCshortwidth"    value="   107.  "/>
+<var name="AECT_OSCCtc_ShellCCthickconn"     value="    20.  "/>
+
+<var name="AECT_OSCCOv_ShellCCoverlap"       value="    60.  "/>
+
+<var name="AECT_OSJPiw_ShellJPinnerwidth"    value="  1912.  "/>
+<var name="AECT_OSJPew_ShellJPedgewidth"     value="   238.  "/>
+<var name="AECT_OSJPtc_ShellJPZlength"       value="  2815.  "/>
+<var name="AECT_OSAFBt_ShellAFBthickness"    value="    15.  "/>
+<var name="AECT_OSAFBh_ShellAFBhight"        value="   215.  "/>
+<var name="AECT_OSFSBh_ShellFSBhight"        value="   190.  "/>
+
+<var name="AECT_STaidi_StayTubeAlignindi"    value="   910.  "/>
+<var name="AECT_STaodi_StayTubeAlignoutd"    value="   930.  "/>
+<var name="AECT_STaflt_StayTubeAlignFlth"    value="    20.  "/>
+
+<gvxysx name="ECT_TS_ShellCoilCover" material="Aluminium" dZ="AECT_OSCCZd_ShellCCZdimension">
+  <gvxy_point X_Y=" - AECT_OSCCmw_ShellCCminiwidth/2. ; AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCtc_ShellCCthickconn*GENV_Si45 + AECT_OSCCmw_ShellCClongwidth + AECT_OSCCRw_ShellCCRadwidth - AECT_OSCCOv_ShellCCoverlap - AECT_OSCCth_ShellCCthickness"/>
+  <gvxy_point X_Y=" - (AECT_OSCCmw_ShellCCedgelength*GENV_Si45 + AECT_OSCCmw_ShellCCminiwidth/2.); AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCtc_ShellCCthickconn*GENV_Si45 + AECT_OSCCmw_ShellCClongwidth + AECT_OSCCRw_ShellCCRadwidth - AECT_OSCCOv_ShellCCoverlap - AECT_OSCCmw_ShellCCedgelength*GENV_Si45"/>
+  <gvxy_point X_Y=" - (AECT_OSCCmw_ShellCCedgelength*GENV_Si45 + AECT_OSCCmw_ShellCCminiwidth/2.); AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCtc_ShellCCthickconn*GENV_Si45 + AECT_OSCCmw_ShellCClongwidth - AECT_OSCCOv_ShellCCoverlap"/>
+  <gvxy_point X_Y=" - (AECT_OSCCth_ShellCCthickness + AECT_OSCCmw_ShellCCedgelength*GENV_Si45 + AECT_OSCCmw_ShellCCminiwidth/2.); AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCtc_ShellCCthickconn*GENV_Si45 + AECT_OSCCmw_ShellCClongwidth - AECT_OSCCOv_ShellCCoverlap"/>
+  <gvxy_point X_Y=" - (AECT_OSCCth_ShellCCthickness + AECT_OSCCmw_ShellCCedgelength*GENV_Si45 + AECT_OSCCmw_ShellCCminiwidth/2.); AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCtc_ShellCCthickconn*GENV_Si45 - AECT_OSCCtc_ShellCCthickconn*GENV_Ta225 "/>
+  <gvxy_point X_Y=" AECT_OSCCtc_ShellCCthickconn*(GENV_Si45-1.) - (AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCth_ShellCCthickness + AECT_OSCCmw_ShellCCedgelength*GENV_Si45 + AECT_OSCCmw_ShellCCminiwidth/2.) ; 0 "/>
+  <gvxy_point X_Y=" - (AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCtc_ShellCCthickconn + AECT_OSCCth_ShellCCthickness + AECT_OSCCmw_ShellCCedgelength*GENV_Si45 + AECT_OSCCmw_ShellCCminiwidth/2.) ; AECT_OSCCtc_ShellCCthickconn*GENV_Si45 "/>
+  <gvxy_point X_Y=" - (AECT_OSCCtc_ShellCCthickconn + AECT_OSCCth_ShellCCthickness + AECT_OSCCmw_ShellCCedgelength*GENV_Si45 + AECT_OSCCmw_ShellCCminiwidth/2.); AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCtc_ShellCCthickconn*GENV_Si45"/>
+  <gvxy_point X_Y=" - (AECT_OSCCtc_ShellCCthickconn + AECT_OSCCth_ShellCCthickness + AECT_OSCCmw_ShellCCedgelength*GENV_Si45 + AECT_OSCCmw_ShellCCminiwidth/2.); AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCtc_ShellCCthickconn*GENV_Si45 + AECT_OSCCmw_ShellCClongwidth"/>
+  <gvxy_point X_Y=" - (AECT_OSCCth_ShellCCthickness + AECT_OSCCmw_ShellCCedgelength*GENV_Si45 + AECT_OSCCmw_ShellCCminiwidth/2.); AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCtc_ShellCCthickconn*GENV_Si45 + AECT_OSCCmw_ShellCClongwidth"/>
+  <gvxy_point X_Y=" - (AECT_OSCCth_ShellCCthickness + AECT_OSCCmw_ShellCCedgelength*GENV_Si45 + AECT_OSCCmw_ShellCCminiwidth/2.); AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCtc_ShellCCthickconn*GENV_Si45 + AECT_OSCCmw_ShellCClongwidth + AECT_OSCCRw_ShellCCRadwidth - AECT_OSCCth_ShellCCthickness*(GENV_Ta225-1)- AECT_OSCCmw_ShellCCedgelength*GENV_Si45 - AECT_OSCCOv_ShellCCoverlap"/>
+  <gvxy_point X_Y=" - AECT_OSCCth_ShellCCthickness*GENV_Ta225 - AECT_OSCCmw_ShellCCminiwidth/2.; AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCtc_ShellCCthickconn*GENV_Si45 + AECT_OSCCmw_ShellCClongwidth + AECT_OSCCRw_ShellCCRadwidth - AECT_OSCCOv_ShellCCoverlap"/>
+</gvxysx>
+
+<gvxysx name="ECT_TS_JointPlate" material="Aluminium" dZ="AECT_OSJPtc_ShellJPZlength">
+  <gvxy_point X_Y=" AECT_OSJPiw_ShellJPinnerwidth/2.+AECT_OSCCtc_ShellCCthickconn*tan(11.25*GENV_PiS180) ;  -(AECT_OSCCtc_ShellCCthickconn+AECT_OSJPew_ShellJPedgewidth*GENV_Si225)/2."/>
+  <gvxy_point X_Y=" AECT_OSJPiw_ShellJPinnerwidth/2.+AECT_OSJPew_ShellJPedgewidth*GENV_Co225+AECT_OSCCtc_ShellCCthickconn*GENV_Si225 ; AECT_OSCCtc_ShellCCthickconn*(1-GENV_Co225)+AECT_OSJPew_ShellJPedgewidth*GENV_Si225-(AECT_OSCCtc_ShellCCthickconn+AECT_OSJPew_ShellJPedgewidth*GENV_Si225)/2. "/>
+  <gvxy_point X_Y=" AECT_OSJPiw_ShellJPinnerwidth/2.+AECT_OSJPew_ShellJPedgewidth*GENV_Co225 ; AECT_OSCCtc_ShellCCthickconn+AECT_OSJPew_ShellJPedgewidth*GENV_Si225-(AECT_OSCCtc_ShellCCthickconn+AECT_OSJPew_ShellJPedgewidth*GENV_Si225)/2. "/>
+  <gvxy_point X_Y=" AECT_OSJPiw_ShellJPinnerwidth/2.; AECT_OSCCtc_ShellCCthickconn-(AECT_OSCCtc_ShellCCthickconn+AECT_OSJPew_ShellJPedgewidth*GENV_Si225)/2."/>
+</gvxysx>
+
+<gvxysx name="ECT_TS_AxialForceBox" material="Aluminium" dZ="AECT_OSCCZd_ShellCCZdimension-AECT_OSJPtc_ShellJPZlength">
+  <gvxy_point X_Y=" AECT_EPBBhi_EndPlateBackBoxwi/2.+AECT_OSAFBt_ShellAFBthickness ; -(AECT_OSAFBh_ShellAFBhight+AECT_OSJPew_ShellJPedgewidth*GENV_Si225)/2. "/>
+  <gvxy_point X_Y=" AECT_EPBBhi_EndPlateBackBoxwi/2.+AECT_OSAFBt_ShellAFBthickness ; AECT_OSAFBh_ShellAFBhight/2.-AECT_OSAFBt_ShellAFBthickness-AECT_OSJPew_ShellJPedgewidth*GENV_Si225/2."/>
+  <gvxy_point X_Y=" AECT_OSJPiw_ShellJPinnerwidth/2.+AECT_OSAFBt_ShellAFBthickness*tan(11.25*GENV_PiS180) ; AECT_OSAFBh_ShellAFBhight/2.-AECT_OSAFBt_ShellAFBthickness-AECT_OSJPew_ShellJPedgewidth*GENV_Si225/2."/>  
+  <gvxy_point X_Y=" AECT_OSJPiw_ShellJPinnerwidth/2.+AECT_OSJPew_ShellJPedgewidth*GENV_Co225+AECT_OSAFBt_ShellAFBthickness*GENV_Si225 ; AECT_OSAFBh_ShellAFBhight/2.-AECT_OSAFBt_ShellAFBthickness*GENV_Co225+AECT_OSJPew_ShellJPedgewidth*GENV_Si225/2."/>  
+  <gvxy_point X_Y=" AECT_OSJPiw_ShellJPinnerwidth/2.+AECT_OSJPew_ShellJPedgewidth*GENV_Co225 ; (AECT_OSAFBh_ShellAFBhight+AECT_OSJPew_ShellJPedgewidth*GENV_Si225)/2."/>  
+  <gvxy_point X_Y=" AECT_OSJPiw_ShellJPinnerwidth/2.; AECT_OSAFBh_ShellAFBhight/2.-AECT_OSJPew_ShellJPedgewidth*GENV_Si225/2."/>
+  <gvxy_point X_Y=" AECT_EPBBhi_EndPlateBackBoxwi/2.; AECT_OSAFBh_ShellAFBhight/2.-AECT_OSJPew_ShellJPedgewidth*GENV_Si225/2."/>  
+  <gvxy_point X_Y=" AECT_EPBBhi_EndPlateBackBoxwi/2.; AECT_OSAFBt_ShellAFBthickness-(AECT_OSAFBh_ShellAFBhight+AECT_OSJPew_ShellJPedgewidth*GENV_Si225)/2."/>
+</gvxysx>
+
+<gvxysx name="ECT_TS_FrontSpecialBox" material="Aluminium" dZ="AECT_OSJPtc_ShellJPZlength">
+  <gvxy_point X_Y=" AECT_EPFBhi_EndPlateFrontBoxw/2.+AECT_OSCCtc_ShellCCthickconn ; -(AECT_OSFSBh_ShellFSBhight+AECT_OSJPew_ShellJPedgewidth*GENV_Si225)/2. "/>
+  <gvxy_point X_Y=" AECT_EPFBhi_EndPlateFrontBoxw/2.+AECT_OSCCtc_ShellCCthickconn ; AECT_OSFSBh_ShellFSBhight/2.-AECT_OSCCtc_ShellCCthickconn-AECT_OSJPew_ShellJPedgewidth*GENV_Si225/2."/>
+  <gvxy_point X_Y=" AECT_OSJPiw_ShellJPinnerwidth/2.+AECT_OSCCtc_ShellCCthickconn*tan(11.25*GENV_PiS180) ; AECT_OSFSBh_ShellFSBhight/2.-AECT_OSCCtc_ShellCCthickconn-AECT_OSJPew_ShellJPedgewidth*GENV_Si225/2."/>  
+  <gvxy_point X_Y=" AECT_OSJPiw_ShellJPinnerwidth/2.+AECT_OSJPew_ShellJPedgewidth*GENV_Co225+AECT_OSCCtc_ShellCCthickconn*GENV_Si225 ; AECT_OSFSBh_ShellFSBhight/2.-AECT_OSCCtc_ShellCCthickconn*GENV_Co225+AECT_OSJPew_ShellJPedgewidth*GENV_Si225/2."/>  
+  <gvxy_point X_Y=" AECT_OSJPiw_ShellJPinnerwidth/2.+AECT_OSJPew_ShellJPedgewidth*GENV_Co225 ; (AECT_OSFSBh_ShellFSBhight+AECT_OSJPew_ShellJPedgewidth*GENV_Si225)/2."/>  
+  <gvxy_point X_Y=" AECT_OSJPiw_ShellJPinnerwidth/2.; AECT_OSFSBh_ShellFSBhight/2.-AECT_OSJPew_ShellJPedgewidth*GENV_Si225/2."/>
+  <gvxy_point X_Y=" AECT_EPFBhi_EndPlateFrontBoxw/2.; AECT_OSFSBh_ShellFSBhight/2.-AECT_OSJPew_ShellJPedgewidth*GENV_Si225/2."/>  
+  <gvxy_point X_Y=" AECT_EPFBhi_EndPlateFrontBoxw/2.; AECT_OSCCtc_ShellCCthickconn-(AECT_OSFSBh_ShellFSBhight+AECT_OSJPew_ShellJPedgewidth*GENV_Si225)/2."/>
+</gvxysx>
+
+<tubs name="ECT_ST_StayTube_Tube"      material="Aluminium"  Rio_Z="AECT_STaidi_StayTubeAlignindi/2.; AECT_STaodi_StayTubeAlignoutd/2.; AECT_OSCCZd_ShellCCZdimension"  nbPhi="20" />
+<tubs name="ECT_ST_StayTube_Flange"    material="Aluminium"  Rio_Z="AECT_EPHoDi_EndPlateHolediame/2.; AECT_STaodi_StayTubeAlignoutd/2.; AECT_STaflt_StayTubeAlignFlth"  nbPhi="20" />
+
+<var name="AECT_SCCXwi_ShellCCfullXwidth"    value="(AECT_OSJPiw_ShellJPinnerwidth/2. + AECT_OSJPew_ShellJPedgewidth*GENV_Co225 + AECT_OSCCtc_ShellCCthickconn*GENV_Si225)" />
+<var name="AECT_SCCYwi_ShellCCfullYwidth"    value="(AECT_OSCCtc_ShellCCthickconn + AECT_OSJPew_ShellJPedgewidth*GENV_Si225)/2." />
+<var name="AECT_SAFBXw_ShellAFBfullXwidt"    value="(AECT_OSJPiw_ShellJPinnerwidth/2. + AECT_OSJPew_ShellJPedgewidth*GENV_Co225 + AECT_OSAFBt_ShellAFBthickness*GENV_Si225)" />
+<var name="AECT_SAFBYw_ShellAFBfullYwidt"    value="(AECT_OSAFBh_ShellAFBhight + AECT_OSJPew_ShellJPedgewidth*GENV_Si225)/2." />
+<var name="AECT_SFSBYw_ShellFSBfullYwidt"    value="(AECT_OSFSBh_ShellFSBhight + AECT_OSJPew_ShellJPedgewidth*GENV_Si225)/2." />
+
+<!-- Radius for ThermalRadiationShield Endplate (TRSEPr) and Shell (TRSShr), last term is responsible for the gap in between -> needed safety factor -> see also the photos  -->
+<var name="AECT_TRSEPr_EndplateRadPos"       value="AECT_EPfuwi_EndPlatefullwidth/GENV_Si225 - (AECT_EPfuhi_EndPlatefullhight -  AECT_EPEmiw_EndPlateExtminiwi*GENV_Si225)/GENV_Co225 - AECT_EPlowi_EndPlatelowwidth*GENV_Si225 - (AECT_EPfuwi_EndPlatefullwidth - AECT_EPAuVX_EndPlateAuxVarX - (AECT_EPEhig_EndPlateExthight)*GENV_Si225)*GENV_Ta225/GENV_Co225 + AECT_EPthic_EndPlatethickness*1.5" />
+<var name="AECT_CCSPYp_CoilCoverSideYpos"    value="AECT_EPfuwi_EndPlatefullwidth/GENV_Si225+AECT_EPthic_EndPlatethickness*1.5-AECT_EPEhig_EndPlateExthight-(AECT_CCfRwi_CoilCoverfullRwid-AECT_CCRaof_CoilCoverRadoff)/2.-AECT_CCthic_CoilCoverthicknes/GENV_Si45-AECT_CCthic_CoilCoverthicknes" />
+<var name="AECT_TRSShr_ShellRadPos"          value="(-(AECT_OSCCtc_ShellCCthickconn*(GENV_Si45-1.) - (AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCth_ShellCCthickness + AECT_OSCCmw_ShellCCedgelength*GENV_Si45 + AECT_OSCCmw_ShellCCminiwidth/2.)))/GENV_Ta225 + (AECT_OSJPiw_ShellJPinnerwidth/2.) * (GENV_Si225+GENV_Co225/GENV_Ta225) + ((AECT_OSJPew_ShellJPedgewidth-AECT_OSCCOv_ShellCCoverlap)*GENV_Co45 )*(1+1/GENV_Ta225)" />
+<var name="AECT_SCCXpo_ShellCCXpos"          value=" - AECT_SCCXwi_ShellCCfullXwidth*GENV_Co225  + AECT_SCCYwi_ShellCCfullYwidth*GENV_Si225 + AECT_OSCCtc_ShellCCthickconn*GENV_Si225*GENV_Co225 + (AECT_OSCCtc_ShellCCthickconn*(GENV_Si45-1.) - (AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCth_ShellCCthickness + AECT_OSCCmw_ShellCCedgelength*GENV_Si45 + AECT_OSCCmw_ShellCCminiwidth/2.))+AECT_OSCCOv_ShellCCoverlap*GENV_Si45" />
+<var name="AECT_SFSBXp_ShellFSBXpos"         value=" - AECT_SCCXwi_ShellCCfullXwidth*GENV_Co225 + AECT_SFSBYw_ShellFSBfullYwidt*GENV_Si225 + AECT_OSCCtc_ShellCCthickconn*GENV_Si225*GENV_Co225 + (AECT_OSCCtc_ShellCCthickconn*(GENV_Si45-1.) - (AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCth_ShellCCthickness + AECT_OSCCmw_ShellCCedgelength*GENV_Si45 + AECT_OSCCmw_ShellCCminiwidth/2.))+AECT_OSCCOv_ShellCCoverlap*GENV_Si45" />
+<var name="AECT_SAFBXp_ShellAFBXpos"         value=" - AECT_SAFBXw_ShellAFBfullXwidt*GENV_Co225 + AECT_SAFBYw_ShellAFBfullYwidt*GENV_Si225 + AECT_OSAFBt_ShellAFBthickness*GENV_Si225*GENV_Co225 + (AECT_OSCCtc_ShellCCthickconn*(GENV_Si45-1.) - (AECT_OSCCmw_ShellCCshortwidth*GENV_Si45 + AECT_OSCCth_ShellCCthickness + AECT_OSCCmw_ShellCCedgelength*GENV_Si45 + AECT_OSCCmw_ShellCCminiwidth/2.))+AECT_OSCCOv_ShellCCoverlap*GENV_Si45" />
+
+<composition name="ECT_TS_ThermalShield_default_tmp" >
+  <posXYZ volume="ECT_EP_EndPlate_front"    X_Y_Z=" -AECT_TRSEPr_EndplateRadPos*GENV_Ta225 ; AECT_TRSEPr_EndplateRadPos;  AECT_OSCCZd_ShellCCZdimension/2. + 1.75*AECT_EPthic_EndPlatethickness" rot=" 0.; 0.; 22.5" />
+  <posXYZ volume="ECT_EP_EndPlate_back"     X_Y_Z=" -AECT_TRSEPr_EndplateRadPos*GENV_Ta225 ; AECT_TRSEPr_EndplateRadPos; -AECT_OSCCZd_ShellCCZdimension/2. - 1.75*AECT_EPthic_EndPlatethickness" rot=" 0.; 0.; 22.5" />
+  <posXYZ volume="ECT_CC_CoilCoverTop"      X_Y_Z=" 0. ; AECT_EPfuwi_EndPlatefullwidth/GENV_Si225 + AECT_EPthic_EndPlatethickness*1.5 - AECT_EPEhig_EndPlateExthight - (AECT_CCfRwi_CoilCoverfullRwid - AECT_CCRaof_CoilCoverRadoff)/2. - AECT_CCthic_CoilCoverthicknes/GENV_Si45 - AECT_CCthic_CoilCoverthicknes ;   AECT_OSCCZd_ShellCCZdimension/2. + 2.25*AECT_EPthic_EndPlatethickness + GENV_Eps" rot="  90.; 0.; 90." />
+  <posXYZ volume="ECT_CC_CoilCoverTop"      X_Y_Z=" 0. ; AECT_EPfuwi_EndPlatefullwidth/GENV_Si225 + AECT_EPthic_EndPlatethickness*1.5 - AECT_EPEhig_EndPlateExthight - (AECT_CCfRwi_CoilCoverfullRwid - AECT_CCRaof_CoilCoverRadoff)/2. - AECT_CCthic_CoilCoverthicknes/GENV_Si45 - AECT_CCthic_CoilCoverthicknes ;  -AECT_OSCCZd_ShellCCZdimension/2. - 2.25*AECT_EPthic_EndPlatethickness - GENV_Eps" rot=" -90.; 0.; 90." />
+  <posXYZ volume="ECT_CC_CoilCoverSide"     X_Y_Z=" (AECT_CCPwid_CoilCoverPhiwidth + AECT_CCthic_CoilCoverthicknes)/2. + GENV_Eps; AECT_CCSPYp_CoilCoverSideYpos;  AECT_OSCCZd_ShellCCZdimension/2.+2.25*AECT_EPthic_EndPlatethickness + GENV_Eps + (AECT_CCZwid_CoilCoverZwidth + AECT_CCthic_CoilCoverthicknes)/2." rot="  0.; 0.; 90." />
+  <posXYZ volume="ECT_CC_CoilCoverSide"     X_Y_Z=" (AECT_CCPwid_CoilCoverPhiwidth + AECT_CCthic_CoilCoverthicknes)/2. + GENV_Eps; AECT_CCSPYp_CoilCoverSideYpos; -AECT_OSCCZd_ShellCCZdimension/2.-2.25*AECT_EPthic_EndPlatethickness - GENV_Eps - (AECT_CCZwid_CoilCoverZwidth + AECT_CCthic_CoilCoverthicknes)/2." rot="180.; 0.; 90." />
+  <posXYZ volume="ECT_CC_CoilCoverSide"     X_Y_Z="-(AECT_CCPwid_CoilCoverPhiwidth + AECT_CCthic_CoilCoverthicknes)/2. - GENV_Eps; AECT_CCSPYp_CoilCoverSideYpos;  AECT_OSCCZd_ShellCCZdimension/2.+2.25*AECT_EPthic_EndPlatethickness + GENV_Eps + (AECT_CCZwid_CoilCoverZwidth + AECT_CCthic_CoilCoverthicknes)/2." rot="  0.; 0.; 90." />
+  <posXYZ volume="ECT_CC_CoilCoverSide"     X_Y_Z="-(AECT_CCPwid_CoilCoverPhiwidth + AECT_CCthic_CoilCoverthicknes)/2. - GENV_Eps; AECT_CCSPYp_CoilCoverSideYpos; -AECT_OSCCZd_ShellCCZdimension/2.-2.25*AECT_EPthic_EndPlatethickness - GENV_Eps - (AECT_CCZwid_CoilCoverZwidth + AECT_CCthic_CoilCoverthicknes)/2." rot="180.; 0.; 90." />
+  <posXYZ volume="ECT_TS_ShellCoilCover"    X_Y_Z=" 0.;  AECT_TRSShr_ShellRadPos + GENV_Eps; 0." rot=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_TS_JointPlate"        X_Y_Z=" AECT_SCCXpo_ShellCCXpos; -AECT_SCCXwi_ShellCCfullXwidth*GENV_Si225 - AECT_SCCYwi_ShellCCfullYwidth*GENV_Co225 + AECT_OSCCtc_ShellCCthickconn*GENV_Si225*GENV_Si225+ AECT_TRSShr_ShellRadPos+AECT_OSCCOv_ShellCCoverlap*GENV_Si45  ; (AECT_OSCCZd_ShellCCZdimension-AECT_OSJPtc_ShellJPZlength)/2." rot=" 0.; 0.; 22.5" />
+  <posXYZ volume="ECT_TS_AxialForceBox"     X_Y_Z=" AECT_SAFBXp_ShellAFBXpos + GENV_Eps;  -AECT_SAFBXw_ShellAFBfullXwidt*GENV_Si225 - AECT_SAFBYw_ShellAFBfullYwidt*GENV_Co225 + AECT_OSAFBt_ShellAFBthickness*GENV_Si225*GENV_Si225+ AECT_TRSShr_ShellRadPos+AECT_OSCCOv_ShellCCoverlap*GENV_Si45  ; -(AECT_OSCCZd_ShellCCZdimension-(AECT_OSCCZd_ShellCCZdimension-AECT_OSJPtc_ShellJPZlength))/2." rot=" 0.; 0.; 22.5" />
+  <posXYZ volume="ECT_ST_StayTube_Tube"     X_Y_Z=" -AECT_TRSEPr_EndplateRadPos*GENV_Ta225 - AECT_EPHoPo_EndPlateHolepos*GENV_Si225;  AECT_TRSEPr_EndplateRadPos + AECT_EPHoPo_EndPlateHolepos*GENV_Co225; 0." rot=" 0.; 0.; 22.5" />
+  <posXYZ volume="ECT_ST_StayTube_Flange"   X_Y_Z=" -AECT_TRSEPr_EndplateRadPos*GENV_Ta225 - AECT_EPHoPo_EndPlateHolepos*GENV_Si225;  AECT_TRSEPr_EndplateRadPos + AECT_EPHoPo_EndPlateHolepos*GENV_Co225; AECT_OSCCZd_ShellCCZdimension/2.+AECT_STaflt_StayTubeAlignFlth/2. + GENV_Eps" rot=" 0.; 0.; 22.5" />
+  <posXYZ volume="ECT_ST_StayTube_Flange"   X_Y_Z=" -AECT_TRSEPr_EndplateRadPos*GENV_Ta225 - AECT_EPHoPo_EndPlateHolepos*GENV_Si225;  AECT_TRSEPr_EndplateRadPos + AECT_EPHoPo_EndPlateHolepos*GENV_Co225;-AECT_OSCCZd_ShellCCZdimension/2.-AECT_STaflt_StayTubeAlignFlth/2. - GENV_Eps" rot=" 0.; 0.; 22.5" />
+</composition>
+
+<composition name="ECT_TS_ThermalShield_default" >
+  <posXYZ volume="ECT_TS_ThermalShield_default_tmp"  rot=" 0.; 0.; -90." />
+</composition>
+
+<composition name="ECT_TS_ThermalShield_special" >
+  <posXYZ volume="ECT_EP_EndPlate_special"    X_Y_Z=" -AECT_TRSEPr_EndplateRadPos*GENV_Ta225 ; AECT_TRSEPr_EndplateRadPos;  AECT_OSCCZd_ShellCCZdimension/2. + 1.75*AECT_EPthic_EndPlatethickness" rot=" 0.; 0.; 22.5" />
+  <posXYZ volume="ECT_EP_EndPlate_back"     X_Y_Z=" -AECT_TRSEPr_EndplateRadPos*GENV_Ta225 ; AECT_TRSEPr_EndplateRadPos; -AECT_OSCCZd_ShellCCZdimension/2. - 1.75*AECT_EPthic_EndPlatethickness" rot=" 0.; 0.; 22.5" />
+  <posXYZ volume="ECT_CC_CoilCoverTop"      X_Y_Z=" 0. ; AECT_EPfuwi_EndPlatefullwidth/GENV_Si225 + AECT_EPthic_EndPlatethickness*1.5 - AECT_EPEhig_EndPlateExthight - (AECT_CCfRwi_CoilCoverfullRwid - AECT_CCRaof_CoilCoverRadoff)/2. - AECT_CCthic_CoilCoverthicknes/GENV_Si45 - AECT_CCthic_CoilCoverthicknes ;   AECT_OSCCZd_ShellCCZdimension/2. + 2.25*AECT_EPthic_EndPlatethickness + GENV_Eps" rot="  90.; 0.; 90." />
+  <posXYZ volume="ECT_CC_CoilCoverTop"      X_Y_Z=" 0. ; AECT_EPfuwi_EndPlatefullwidth/GENV_Si225 + AECT_EPthic_EndPlatethickness*1.5 - AECT_EPEhig_EndPlateExthight - (AECT_CCfRwi_CoilCoverfullRwid - AECT_CCRaof_CoilCoverRadoff)/2. - AECT_CCthic_CoilCoverthicknes/GENV_Si45 - AECT_CCthic_CoilCoverthicknes ;  -AECT_OSCCZd_ShellCCZdimension/2. - 2.25*AECT_EPthic_EndPlatethickness - GENV_Eps" rot=" -90.; 0.; 90." />
+  <posXYZ volume="ECT_CC_CoilCoverSide"     X_Y_Z=" (AECT_CCPwid_CoilCoverPhiwidth + AECT_CCthic_CoilCoverthicknes)/2. + GENV_Eps; AECT_CCSPYp_CoilCoverSideYpos;  AECT_OSCCZd_ShellCCZdimension/2.+2.25*AECT_EPthic_EndPlatethickness + GENV_Eps + (AECT_CCZwid_CoilCoverZwidth + AECT_CCthic_CoilCoverthicknes)/2." rot="  0.; 0.; 90." />
+  <posXYZ volume="ECT_CC_CoilCoverSide"     X_Y_Z=" (AECT_CCPwid_CoilCoverPhiwidth + AECT_CCthic_CoilCoverthicknes)/2. + GENV_Eps; AECT_CCSPYp_CoilCoverSideYpos; -AECT_OSCCZd_ShellCCZdimension/2.-2.25*AECT_EPthic_EndPlatethickness - GENV_Eps - (AECT_CCZwid_CoilCoverZwidth + AECT_CCthic_CoilCoverthicknes)/2." rot="180.; 0.; 90." />
+  <posXYZ volume="ECT_CC_CoilCoverSide"     X_Y_Z="-(AECT_CCPwid_CoilCoverPhiwidth + AECT_CCthic_CoilCoverthicknes)/2. - GENV_Eps; AECT_CCSPYp_CoilCoverSideYpos;  AECT_OSCCZd_ShellCCZdimension/2.+2.25*AECT_EPthic_EndPlatethickness + GENV_Eps + (AECT_CCZwid_CoilCoverZwidth + AECT_CCthic_CoilCoverthicknes)/2." rot="  0.; 0.; 90." />
+  <posXYZ volume="ECT_CC_CoilCoverSide"     X_Y_Z="-(AECT_CCPwid_CoilCoverPhiwidth + AECT_CCthic_CoilCoverthicknes)/2. - GENV_Eps; AECT_CCSPYp_CoilCoverSideYpos; -AECT_OSCCZd_ShellCCZdimension/2.-2.25*AECT_EPthic_EndPlatethickness - GENV_Eps - (AECT_CCZwid_CoilCoverZwidth + AECT_CCthic_CoilCoverthicknes)/2." rot="180.; 0.; 90." />
+  <posXYZ volume="ECT_TS_ShellCoilCover"    X_Y_Z=" 0.;  AECT_TRSShr_ShellRadPos + GENV_Eps; 0." rot=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_TS_FrontSpecialBox"   X_Y_Z=" AECT_SFSBXp_ShellFSBXpos; -AECT_SCCXwi_ShellCCfullXwidth*GENV_Si225 - AECT_SFSBYw_ShellFSBfullYwidt*GENV_Co225 + AECT_OSCCtc_ShellCCthickconn*GENV_Si225*GENV_Si225+ AECT_TRSShr_ShellRadPos+AECT_OSCCOv_ShellCCoverlap*GENV_Si45; (AECT_OSCCZd_ShellCCZdimension-AECT_OSJPtc_ShellJPZlength)/2." rot=" 0.; 0.; 22.5" />
+  <posXYZ volume="ECT_TS_AxialForceBox"     X_Y_Z=" AECT_SAFBXp_ShellAFBXpos + GENV_Eps;  -AECT_SAFBXw_ShellAFBfullXwidt*GENV_Si225 - AECT_SAFBYw_ShellAFBfullYwidt*GENV_Co225 + AECT_OSAFBt_ShellAFBthickness*GENV_Si225*GENV_Si225+ AECT_TRSShr_ShellRadPos+AECT_OSCCOv_ShellCCoverlap*GENV_Si45  ; -(AECT_OSCCZd_ShellCCZdimension-(AECT_OSCCZd_ShellCCZdimension-AECT_OSJPtc_ShellJPZlength))/2." rot=" 0.; 0.; 22.5" />
+  <posXYZ volume="ECT_ST_StayTube_Tube"     X_Y_Z=" -AECT_TRSEPr_EndplateRadPos*GENV_Ta225 - AECT_EPHoPo_EndPlateHolepos*GENV_Si225;  AECT_TRSEPr_EndplateRadPos + AECT_EPHoPo_EndPlateHolepos*GENV_Co225; 0." rot=" 0.; 0.; 22.5" />
+  <posXYZ volume="ECT_ST_StayTube_Flange"   X_Y_Z=" -AECT_TRSEPr_EndplateRadPos*GENV_Ta225 - AECT_EPHoPo_EndPlateHolepos*GENV_Si225;  AECT_TRSEPr_EndplateRadPos + AECT_EPHoPo_EndPlateHolepos*GENV_Co225; AECT_OSCCZd_ShellCCZdimension/2.+AECT_STaflt_StayTubeAlignFlth/2. + GENV_Eps" rot=" 0.; 0.; 22.5" />
+  <posXYZ volume="ECT_ST_StayTube_Flange"   X_Y_Z=" -AECT_TRSEPr_EndplateRadPos*GENV_Ta225 - AECT_EPHoPo_EndPlateHolepos*GENV_Si225;  AECT_TRSEPr_EndplateRadPos + AECT_EPHoPo_EndPlateHolepos*GENV_Co225;-AECT_OSCCZd_ShellCCZdimension/2.-AECT_STaflt_StayTubeAlignFlth/2. - GENV_Eps" rot=" 0.; 0.; 22.5" />
+</composition>
+
+<!-- main envelope surrounding coldmass and thermal shield - atlteyv_0012, atlteyv_0014, atlteyv_0015, atlteyv_0025, atlteyv_0027 and atlteyv_0076 -->
+<var name="AECT_EVEPRI_EVEndPlateRadiInne"    value="   670.  "/> 
+<var name="AECT_EVEPRT_EVEndPlateRadiTurr"    value="   930.  "/>
+<var name="AECT_EVEPth_EVEndPlatethicknes"    value="    75.  "/> 
+<var name="AECT_EVEPid_EVEndPlateindist"      value="  4320.  "/> 
+<var name="AECT_EVEPod_EVEndPlateoutdist"     value="  5345.  "/>
+<var name="AECT_EVEPli_EVEndPlatelowinter"    value="  1212.  "/>
+<var name="AECT_EVEPui_EVEndPlateupinter"     value="  1238.  "/>
+<var name="AECT_EVEPHd_EVEndPlateHolediam"    value="   160.  "/>
+<var name="AECT_EVEPHr_EVEndPlateHolerad"     value="  3100.  "/>
+<var name="AECT_EVEPHa_EVEndPlateHoleang"     value="     3.6 "/>
+<var name="AECT_EVEPSl_EVEndPlatespeclen"     value="   303.  "/>
+<var name="AECT_EVEPSa_EVEndPlatespecang"     value="   127.5 "/>
+<var name="AECT_EVEPSr_EVEndPlatespecrad"     value="  3985.  "/>
+
+<var name="AECT_EVAFod_EVAlignFlangeoutdi"    value="   450.  "/>
+<var name="AECT_EVAFzw_EVAlignFlangezwidt"    value="    70.  "/>
+<var name="AECT_EVATid_EVAlignTubeinndiam"    value="   262.  "/>
+<var name="AECT_EVATww_EVAlignTuberwallwi"    value="    20.  "/>
+
+<var name="AECT_EVOShZ_EVOutShellholeZwid"    value="  4800.  "/>
+
+<var name="AECT_EVOSio_EVOutShellinneroff"    value="    15.  "/>
+<var name="AECT_EVOSso_EVOutShellspecioff"    value="    50.  "/>
+<var name="AECT_EVOSit_EVOutShellinnthick"    value="    40.  "/>
+<var name="AECT_EVOSCZ_EVOutShellConnZwid"    value="   120.  "/>
+
+<var name="AECT_EVOSCR_EVOutShellConnlowR"    value="   140.  "/>
+<var name="AECT_EVOSCR_EVOutShellConnbigR"    value="   220.  "/>
+<var name="AECT_EVOSCR_EVOutShellConnspeR"    value="   360.  "/>
+
+<var name="AECT_EVSSAh_EVSideSupporthight"    value="   225.  "/>
+<var name="AECT_EVSSAw_EVSideSupportwidth"    value="   250.  "/>
+<var name="AECT_EVTSAh_EVTopSupporthight"     value="   150.  "/>
+<var name="AECT_EVTSRa_EVTopSupportRadius"    value="  1230.  "/>
+<var name="AECT_EVTSAl_EVTopSupportlength"    value="  2913.  "/>
+<var name="AECT_EVTSCo_EVTopSupportCutoff"    value="    95.  "/>
+<var name="AECT_EVTSCw_EVTopSupportCutwid"    value="   103.  "/>
+
+<var name="AECT_EVSSan_EVSideSupportangle"    value="atan((AECT_EVEPod_EVEndPlateoutdist*GENV_Co225 + AECT_EVEPui_EVEndPlateupinter/2. *GENV_Si225 - AECT_EVEPid_EVEndPlateindist)/(AECT_EVEPod_EVEndPlateoutdist*GENV_Si225 - AECT_EVEPli_EVEndPlatelowinter/2. - AECT_EVEPui_EVEndPlateupinter/2. *GENV_Co225 ))"/>
+<var name="AECT_EVEPSt_EVEndPlatespectana"    value="tan((AECT_EVEPSa_EVEndPlatespecang-90)*GENV_PiS180)"/>
+
+<tubs name="ECT_EV_InnerTube"    material="Aluminium"  Rio_Z="0.; AECT_EVEPRI_EVEndPlateRadiInne; 2.*AECT_EVEPth_EVEndPlatethicknes"  nbPhi="20" />
+<tubs name="ECT_EV_TurretTube"   material="Aluminium"  Rio_Z="0.; AECT_EVEPRT_EVEndPlateRadiTurr; 2.*AECT_EVEPth_EVEndPlatethicknes"  nbPhi="20" />
+<tubs name="ECT_EV_AlignHole"    material="Aluminium"  Rio_Z="0.; AECT_EVEPHd_EVEndPlateHolediam/2.; 2.*AECT_EVEPth_EVEndPlatethicknes"  nbPhi="20" />
+
+<gvxy name="ECT_EV_EndPlate_basic" material="Aluminium" dZ="AECT_EVEPth_EVEndPlatethicknes">
+  <gvxy_point X_Y=" 0. ; 0. "/>
+  <gvxy_point X_Y=" AECT_EVEPod_EVEndPlateoutdist*GENV_Si225 ; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225 "/>
+  <gvxy_point X_Y=" AECT_EVEPod_EVEndPlateoutdist*GENV_Si225 -  AECT_EVEPui_EVEndPlateupinter/2. *GENV_Co225; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225 + AECT_EVEPui_EVEndPlateupinter/2. *GENV_Si225"/>
+  <gvxy_point X_Y=" AECT_EVEPli_EVEndPlatelowinter/2.; AECT_EVEPid_EVEndPlateindist"/>
+  <gvxy_point X_Y="-AECT_EVEPli_EVEndPlatelowinter/2.; AECT_EVEPid_EVEndPlateindist"/>
+  <gvxy_point X_Y="-AECT_EVEPod_EVEndPlateoutdist*GENV_Si225 +  AECT_EVEPui_EVEndPlateupinter/2. *GENV_Co225; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225 + AECT_EVEPui_EVEndPlateupinter/2. *GENV_Si225"/>
+  <gvxy_point X_Y="-AECT_EVEPod_EVEndPlateoutdist*GENV_Si225 ; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225 "/>
+</gvxy>
+
+<var name="AECT_EVEPpx_EVEndPlateS_Point6_X"    value="(AECT_EVEPid_EVEndPlateindist+(1./AECT_EVEPSt_EVEndPlatespectana)*(-AECT_EVEPli_EVEndPlatelowinter/2.)-(AECT_EVEPod_EVEndPlateoutdist*GENV_Co225+AECT_EVEPSl_EVEndPlatespeclen*GENV_Si225)-GENV_Ta225*(-AECT_EVEPod_EVEndPlateoutdist*GENV_Si225+AECT_EVEPSl_EVEndPlatespeclen*GENV_Co225))/(1./AECT_EVEPSt_EVEndPlatespectana-GENV_Ta225)"/>
+<var name="AECT_EVEPpy_EVEndPlateS_Point6_Y"    value="(-AECT_EVEPpx_EVEndPlateS_Point6_X+(-AECT_EVEPli_EVEndPlatelowinter/2.))/AECT_EVEPSt_EVEndPlatespectana+AECT_EVEPid_EVEndPlateindist"/>
+
+<gvxy name="ECT_EV_EndPlate_special" material="Aluminium" dZ="AECT_EVEPth_EVEndPlatethicknes">
+  <gvxy_point X_Y=" 0. ; 0. "/>
+  <gvxy_point X_Y=" AECT_EVEPod_EVEndPlateoutdist*GENV_Si225 ; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225 "/>
+  <gvxy_point X_Y=" AECT_EVEPod_EVEndPlateoutdist*GENV_Si225 -  AECT_EVEPui_EVEndPlateupinter/2. *GENV_Co225; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225 + AECT_EVEPui_EVEndPlateupinter/2. *GENV_Si225"/>
+  <gvxy_point X_Y=" AECT_EVEPli_EVEndPlatelowinter/2.; AECT_EVEPid_EVEndPlateindist"/>
+  <gvxy_point X_Y="-AECT_EVEPli_EVEndPlatelowinter/2.; AECT_EVEPid_EVEndPlateindist"/>
+  <gvxy_point X_Y=" AECT_EVEPpx_EVEndPlateS_Point6_X; AECT_EVEPpy_EVEndPlateS_Point6_Y"/>
+  <gvxy_point X_Y="-AECT_EVEPod_EVEndPlateoutdist*GENV_Si225+AECT_EVEPSl_EVEndPlatespeclen*GENV_Co225 ; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225+AECT_EVEPSl_EVEndPlatespeclen*GENV_Si225 "/>
+  <gvxy_point X_Y="-AECT_EVEPod_EVEndPlateoutdist*GENV_Si225 ; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225 "/>
+</gvxy>
+
+<subtraction name="ECT_EV_EndPlate_Inner_default" >
+  <posXYZ volume="ECT_EV_EndPlate_basic"    X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EV_InnerTube"         X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EV_AlignHole"         X_Y_Z=" AECT_EVEPHr_EVEndPlateHolerad*sin(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); AECT_EVEPHr_EVEndPlateHolerad*cos(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); 0." />
+</subtraction>
+
+<subtraction name="ECT_EV_EndPlate_Turret_default" >
+  <posXYZ volume="ECT_EV_EndPlate_basic"    X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EV_TurretTube"        X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EV_AlignHole"         X_Y_Z=" AECT_EVEPHr_EVEndPlateHolerad*sin(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); AECT_EVEPHr_EVEndPlateHolerad*cos(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); 0." />
+</subtraction>
+
+<subtraction name="ECT_EV_EndPlate_Inner_special_Sector6" >
+  <posXYZ volume="ECT_EV_EndPlate_special"  X_Y_Z=" 0.; 0.; 0." rot=" 0.; 180.; 0."/>
+  <posXYZ volume="ECT_EV_InnerTube"         X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EV_AlignHole"         X_Y_Z=" AECT_EVEPHr_EVEndPlateHolerad*sin(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); AECT_EVEPHr_EVEndPlateHolerad*cos(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); 0." />
+</subtraction>
+
+<subtraction name="ECT_EV_EndPlate_Turret_special_Sector6" >
+  <posXYZ volume="ECT_EV_EndPlate_special"  X_Y_Z=" 0.; 0.; 0." rot=" 0.; 180.; 0."/>
+  <posXYZ volume="ECT_EV_TurretTube"        X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EV_AlignHole"         X_Y_Z=" AECT_EVEPHr_EVEndPlateHolerad*sin(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); AECT_EVEPHr_EVEndPlateHolerad*cos(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); 0." />
+</subtraction>
+
+<subtraction name="ECT_EV_EndPlate_Inner_special_Sector7" >
+  <posXYZ volume="ECT_EV_EndPlate_special"  X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EV_InnerTube"         X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EV_AlignHole"         X_Y_Z=" AECT_EVEPHr_EVEndPlateHolerad*sin(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); AECT_EVEPHr_EVEndPlateHolerad*cos(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); 0." />
+</subtraction>
+
+<subtraction name="ECT_EV_EndPlate_Turret_special_Sector7" >
+  <posXYZ volume="ECT_EV_EndPlate_special"  X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EV_TurretTube"        X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EV_AlignHole"         X_Y_Z=" AECT_EVEPHr_EVEndPlateHolerad*sin(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); AECT_EVEPHr_EVEndPlateHolerad*cos(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); 0." />
+</subtraction>
+
+<var name="AECT_EVOSfo_EVOutShellfulloff" value="AECT_EVOSio_EVOutShellinneroff + AECT_EVOSit_EVOutShellinnthick"/>
+<var name="AECT_EVOSpx_OutShell_Point2_X" value="((AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSfo_EVOutShellfulloff)/GENV_Co225 + tan(AECT_EVSSan_EVSideSupportangle)*(AECT_EVEPli_EVEndPlatelowinter/2. + AECT_EVOSfo_EVOutShellfulloff*tan(AECT_EVSSan_EVSideSupportangle/2.))- (AECT_EVEPid_EVEndPlateindist - AECT_EVOSfo_EVOutShellfulloff))/(tan(AECT_EVSSan_EVSideSupportangle) + GENV_Ta225)"/>
+<var name="AECT_EVOSpx_OutShell_Point5_X" value="((AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSio_EVOutShellinneroff)/GENV_Co225 + tan(AECT_EVSSan_EVSideSupportangle)*(AECT_EVEPli_EVEndPlatelowinter/2. + AECT_EVOSio_EVOutShellinneroff*tan(AECT_EVSSan_EVSideSupportangle/2.))- (AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff))/(tan(AECT_EVSSan_EVSideSupportangle) + GENV_Ta225)"/>
+
+<gvxysx name="ECT_EV_OutShell_default" material="Aluminium" dZ="AECT_EVOShZ_EVOutShellholeZwid - 2.*AECT_EVOSCZ_EVOutShellConnZwid">
+  <gvxy_point X_Y=" AECT_EVEPli_EVEndPlatelowinter/2. + AECT_EVOSfo_EVOutShellfulloff*tan(AECT_EVSSan_EVSideSupportangle/2.); AECT_EVEPid_EVEndPlateindist - AECT_EVOSfo_EVOutShellfulloff"/>
+  <gvxy_point X_Y=" AECT_EVOSpx_OutShell_Point2_X; (AECT_EVOSpx_OutShell_Point2_X - (AECT_EVEPli_EVEndPlatelowinter/2. + AECT_EVOSfo_EVOutShellfulloff*tan(AECT_EVSSan_EVSideSupportangle/2.)))*tan(AECT_EVSSan_EVSideSupportangle) + AECT_EVEPid_EVEndPlateindist - AECT_EVOSfo_EVOutShellfulloff"/>
+  <gvxy_point X_Y=" (AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSfo_EVOutShellfulloff)*GENV_Si225; (AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSfo_EVOutShellfulloff)*GENV_Co225"/>
+  <gvxy_point X_Y=" (AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSio_EVOutShellinneroff)*GENV_Si225; (AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSio_EVOutShellinneroff)*GENV_Co225"/>
+  <gvxy_point X_Y=" AECT_EVOSpx_OutShell_Point5_X; (AECT_EVOSpx_OutShell_Point5_X - (AECT_EVEPli_EVEndPlatelowinter/2. + AECT_EVOSio_EVOutShellinneroff*tan(AECT_EVSSan_EVSideSupportangle/2.)))*tan(AECT_EVSSan_EVSideSupportangle) + AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff"/>
+  <gvxy_point X_Y=" AECT_EVEPli_EVEndPlatelowinter/2. + AECT_EVOSio_EVOutShellinneroff*tan(AECT_EVSSan_EVSideSupportangle/2.); AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff"/>
+</gvxysx>
+
+<var name="AECT_EVOSpx_OutShellS_Point7_X" value="-AECT_EVEPli_EVEndPlatelowinter/2. - AECT_EVOSio_EVOutShellinneroff*(1./cos((AECT_EVEPSa_EVEndPlatespecang-90)*GENV_PiS180) - tan((AECT_EVEPSa_EVEndPlatespecang-90)*GENV_PiS180))"/>
+<var name="AECT_EVOSpy_OutShellS_Point7_Y" value="AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff"/>
+<var name="AECT_EVOSpx_OutShellS_Point9_X" value="-AECT_EVEPod_EVEndPlateoutdist*GENV_Si225+AECT_EVEPSl_EVEndPlatespeclen*GENV_Co225 - (AECT_EVOSso_EVOutShellspecioff-AECT_EVOSio_EVOutShellinneroff)/(2.*GENV_Si225)"/>
+<var name="AECT_EVOSpy_OutShellS_Point9_Y" value="AECT_EVEPod_EVEndPlateoutdist*GENV_Co225+AECT_EVEPSl_EVEndPlatespeclen*GENV_Si225 - (AECT_EVOSso_EVOutShellspecioff+AECT_EVOSio_EVOutShellinneroff)/(2.*GENV_Co225)"/>
+
+<var name="AECT_EVOSpx_OutShellS_Point8_X" value="(AECT_EVOSpy_OutShellS_Point7_Y + (1./tan((AECT_EVEPSa_EVEndPlatespecang-90)*GENV_PiS180))*AECT_EVOSpx_OutShellS_Point7_X - GENV_Ta225*AECT_EVOSpx_OutShellS_Point9_X - AECT_EVOSpy_OutShellS_Point9_Y  )/((1./tan((AECT_EVEPSa_EVEndPlatespecang-90)*GENV_PiS180)) - GENV_Ta225)"/>
+
+<var name="AECT_EVOSpx_OutShellS_Point12_X" value="-AECT_EVEPod_EVEndPlateoutdist*GENV_Si225+AECT_EVEPSl_EVEndPlatespeclen*GENV_Co225 - (AECT_EVOSso_EVOutShellspecioff-AECT_EVOSio_EVOutShellinneroff)/(2.*GENV_Si225)"/>
+<var name="AECT_EVOSpy_OutShellS_Point12_Y" value="AECT_EVEPod_EVEndPlateoutdist*GENV_Co225+AECT_EVEPSl_EVEndPlatespeclen*GENV_Si225 - (AECT_EVOSso_EVOutShellspecioff+AECT_EVOSio_EVOutShellinneroff)/(2.*GENV_Co225) - AECT_EVOSit_EVOutShellinnthick/GENV_Co225"/>
+<var name="AECT_EVOSpx_OutShellS_Point14_X" value="-AECT_EVEPli_EVEndPlatelowinter/2. - (AECT_EVOSio_EVOutShellinneroff + AECT_EVOSit_EVOutShellinnthick)*(1./cos((AECT_EVEPSa_EVEndPlatespecang-90)*GENV_PiS180) - tan((AECT_EVEPSa_EVEndPlatespecang-90)*GENV_PiS180))"/>
+<var name="AECT_EVOSpy_OutShellS_Point14_Y" value="AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff - AECT_EVOSit_EVOutShellinnthick"/>
+
+<var name="AECT_EVOSpx_OutShellS_Point13_X" value="(AECT_EVOSpy_OutShellS_Point14_Y + (1./tan((AECT_EVEPSa_EVEndPlatespecang-90)*GENV_PiS180))*AECT_EVOSpx_OutShellS_Point14_X - GENV_Ta225*AECT_EVOSpx_OutShellS_Point12_X - AECT_EVOSpy_OutShellS_Point12_Y  )/((1./tan((AECT_EVEPSa_EVEndPlatespecang-90)*GENV_PiS180)) - GENV_Ta225)"/>
+
+<gvxy name="ECT_EV_OutShell_special" material="Aluminium" dZ="AECT_EVOShZ_EVOutShellholeZwid - 2.*AECT_EVOSCZ_EVOutShellConnZwid">
+  <gvxy_point X_Y=" AECT_EVEPli_EVEndPlatelowinter/2. + AECT_EVOSfo_EVOutShellfulloff*tan(AECT_EVSSan_EVSideSupportangle/2.); AECT_EVEPid_EVEndPlateindist - AECT_EVOSfo_EVOutShellfulloff"/>
+  <gvxy_point X_Y=" AECT_EVOSpx_OutShell_Point2_X; (AECT_EVOSpx_OutShell_Point2_X - (AECT_EVEPli_EVEndPlatelowinter/2. + AECT_EVOSfo_EVOutShellfulloff*tan(AECT_EVSSan_EVSideSupportangle/2.)))*tan(AECT_EVSSan_EVSideSupportangle) + AECT_EVEPid_EVEndPlateindist - AECT_EVOSfo_EVOutShellfulloff"/>
+  <gvxy_point X_Y=" (AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSfo_EVOutShellfulloff)*GENV_Si225; (AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSfo_EVOutShellfulloff)*GENV_Co225"/>
+  <gvxy_point X_Y=" (AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSio_EVOutShellinneroff)*GENV_Si225; (AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSio_EVOutShellinneroff)*GENV_Co225"/>
+  <gvxy_point X_Y=" AECT_EVOSpx_OutShell_Point5_X; (AECT_EVOSpx_OutShell_Point5_X - (AECT_EVEPli_EVEndPlatelowinter/2. + AECT_EVOSio_EVOutShellinneroff*tan(AECT_EVSSan_EVSideSupportangle/2.)))*tan(AECT_EVSSan_EVSideSupportangle) + AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff"/>
+  <gvxy_point X_Y=" AECT_EVEPli_EVEndPlatelowinter/2. + AECT_EVOSio_EVOutShellinneroff*tan(AECT_EVSSan_EVSideSupportangle/2.); AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff"/>
+  <gvxy_point X_Y=" AECT_EVOSpx_OutShellS_Point7_X ; AECT_EVOSpy_OutShellS_Point7_Y"/>
+  <gvxy_point X_Y=" AECT_EVOSpx_OutShellS_Point8_X ; AECT_EVOSpy_OutShellS_Point7_Y - tan((180.-AECT_EVEPSa_EVEndPlatespecang)*GENV_PiS180)*(AECT_EVOSpx_OutShellS_Point8_X - AECT_EVOSpx_OutShellS_Point7_X)"/> 
+  <gvxy_point X_Y=" AECT_EVOSpx_OutShellS_Point9_X ; AECT_EVOSpy_OutShellS_Point9_Y"/>
+  <gvxy_point X_Y=" -(AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSio_EVOutShellinneroff)*GENV_Si225; (AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSio_EVOutShellinneroff)*GENV_Co225"/>
+  <gvxy_point X_Y=" -(AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSfo_EVOutShellfulloff)*GENV_Si225; (AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSfo_EVOutShellfulloff)*GENV_Co225"/>
+  <gvxy_point X_Y=" AECT_EVOSpx_OutShellS_Point12_X ; AECT_EVOSpy_OutShellS_Point12_Y"/>
+  <gvxy_point X_Y=" AECT_EVOSpx_OutShellS_Point13_X; AECT_EVOSpy_OutShellS_Point14_Y - tan((180-AECT_EVEPSa_EVEndPlatespecang)*GENV_PiS180)*(AECT_EVOSpx_OutShellS_Point13_X - AECT_EVOSpx_OutShellS_Point14_X)"/>
+  <gvxy_point X_Y=" AECT_EVOSpx_OutShellS_Point14_X ; AECT_EVOSpy_OutShellS_Point14_Y"/>
+</gvxy>
+
+<!-- introduced becaused used for calculation-->
+<var name="AECT_EVOSpx_OutConnector_Point6_X" value="AECT_EVEPli_EVEndPlatelowinter/2. + AECT_EVOSCR_EVOutShellConnbigR*sin(AECT_EVSSan_EVSideSupportangle) - (AECT_EVOSCR_EVOutShellConnlowR - AECT_EVOSCR_EVOutShellConnbigR*cos(AECT_EVSSan_EVSideSupportangle))/tan(AECT_EVSSan_EVSideSupportangle)"/>
+<!--  derived variable for fifth point via the formula tan(suppangle)*(x-point6_x)+point6_y = -tan(22.5)*(x-point4_x)+point4_y for x coordinate, y simple trigonometry -->
+<var name="AECT_EVOSpx_OutConnector_Point5_X" value="((AECT_EVEPod_EVEndPlateoutdist*GENV_Si225 - AECT_EVOSCR_EVOutShellConnlowR*GENV_Si225)*GENV_Ta225+tan(AECT_EVSSan_EVSideSupportangle)*AECT_EVOSpx_OutConnector_Point6_X+(AECT_EVEPod_EVEndPlateoutdist*GENV_Co225 - AECT_EVOSCR_EVOutShellConnlowR*GENV_Co225) - (AECT_EVEPid_EVEndPlateindist - AECT_EVOSCR_EVOutShellConnlowR))/(GENV_Ta225+tan(AECT_EVSSan_EVSideSupportangle))"/>
+
+<gvxysx name="ECT_EV_OutShellConnector_default" material="Aluminium" dZ="AECT_EVOSCZ_EVOutShellConnZwid">
+  <gvxy_point X_Y=" AECT_EVEPli_EVEndPlatelowinter/2.; AECT_EVEPid_EVEndPlateindist"/>
+  <gvxy_point X_Y=" AECT_EVEPod_EVEndPlateoutdist*GENV_Si225 -  AECT_EVEPui_EVEndPlateupinter/2. *GENV_Co225; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225 + AECT_EVEPui_EVEndPlateupinter/2. *GENV_Si225"/>
+  <gvxy_point X_Y=" AECT_EVEPod_EVEndPlateoutdist*GENV_Si225 ; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225"/>
+  <gvxy_point X_Y=" (AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSCR_EVOutShellConnlowR)*GENV_Si225 ; (AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSCR_EVOutShellConnlowR)*GENV_Co225"/>
+  <gvxy_point X_Y=" AECT_EVOSpx_OutConnector_Point5_X ; (AECT_EVOSpx_OutConnector_Point5_X-AECT_EVOSpx_OutConnector_Point6_X)*tan(AECT_EVSSan_EVSideSupportangle)+AECT_EVEPid_EVEndPlateindist - AECT_EVOSCR_EVOutShellConnlowR"/>
+  <gvxy_point X_Y=" AECT_EVEPli_EVEndPlatelowinter/2. + AECT_EVOSCR_EVOutShellConnbigR*sin(AECT_EVSSan_EVSideSupportangle) - (AECT_EVOSCR_EVOutShellConnlowR - AECT_EVOSCR_EVOutShellConnbigR*cos(AECT_EVSSan_EVSideSupportangle))/tan(AECT_EVSSan_EVSideSupportangle); AECT_EVEPid_EVEndPlateindist - AECT_EVOSCR_EVOutShellConnlowR"/>
+</gvxysx>
+
+<var name="AECT_EVOSpx_OutConnectorS_Point14_X" value="-AECT_EVEPli_EVEndPlatelowinter/2. - AECT_EVOSCR_EVOutShellConnspeR*(1./cos((AECT_EVEPSa_EVEndPlatespecang-90)*GENV_PiS180)) + AECT_EVOSCR_EVOutShellConnlowR*AECT_EVEPSt_EVEndPlatespectana"/>
+<var name="AECT_EVOSpx_OutConnectorS_Point13_X" value="(AECT_EVEPid_EVEndPlateindist-AECT_EVOSCR_EVOutShellConnlowR+(1./AECT_EVEPSt_EVEndPlatespectana)*AECT_EVOSpx_OutConnectorS_Point14_X+GENV_Ta225*(AECT_EVEPod_EVEndPlateoutdist*GENV_Si225-AECT_EVEPSl_EVEndPlatespeclen*GENV_Co225)-AECT_EVEPod_EVEndPlateoutdist*GENV_Co225-AECT_EVEPSl_EVEndPlatespeclen*GENV_Si225+AECT_EVOSCR_EVOutShellConnlowR/GENV_Co225)/(1./AECT_EVEPSt_EVEndPlatespectana-GENV_Ta225)"/>
+
+<gvxy name="ECT_EV_OutShellConnector_special" material="Aluminium" dZ="AECT_EVOSCZ_EVOutShellConnZwid">
+  <gvxy_point X_Y=" AECT_EVEPli_EVEndPlatelowinter/2. + AECT_EVOSCR_EVOutShellConnbigR*sin(AECT_EVSSan_EVSideSupportangle) - (AECT_EVOSCR_EVOutShellConnlowR - AECT_EVOSCR_EVOutShellConnbigR*cos(AECT_EVSSan_EVSideSupportangle))/tan(AECT_EVSSan_EVSideSupportangle); AECT_EVEPid_EVEndPlateindist - AECT_EVOSCR_EVOutShellConnlowR"/>
+  <gvxy_point X_Y=" AECT_EVOSpx_OutConnector_Point5_X ; (AECT_EVOSpx_OutConnector_Point5_X-AECT_EVOSpx_OutConnector_Point6_X)*tan(AECT_EVSSan_EVSideSupportangle)+AECT_EVEPid_EVEndPlateindist - AECT_EVOSCR_EVOutShellConnlowR"/>
+  <gvxy_point X_Y=" (AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSCR_EVOutShellConnlowR)*GENV_Si225 ; (AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSCR_EVOutShellConnlowR)*GENV_Co225"/>
+  <gvxy_point X_Y=" AECT_EVEPod_EVEndPlateoutdist*GENV_Si225 ; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225"/>
+  <gvxy_point X_Y=" AECT_EVEPod_EVEndPlateoutdist*GENV_Si225 -  AECT_EVEPui_EVEndPlateupinter/2. *GENV_Co225; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225 + AECT_EVEPui_EVEndPlateupinter/2. *GENV_Si225"/>
+  <gvxy_point X_Y=" AECT_EVEPli_EVEndPlatelowinter/2.; AECT_EVEPid_EVEndPlateindist"/>
+  <gvxy_point X_Y="-AECT_EVEPli_EVEndPlatelowinter/2.; AECT_EVEPid_EVEndPlateindist"/>
+  <gvxy_point X_Y=" AECT_EVEPpx_EVEndPlateS_Point6_X; AECT_EVEPpy_EVEndPlateS_Point6_Y"/>
+  <gvxy_point X_Y="-AECT_EVEPod_EVEndPlateoutdist*GENV_Si225+AECT_EVEPSl_EVEndPlatespeclen*GENV_Co225 ; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225+AECT_EVEPSl_EVEndPlatespeclen*GENV_Si225 "/>
+  <gvxy_point X_Y="-AECT_EVEPod_EVEndPlateoutdist*GENV_Si225 ; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225 "/>
+  <gvxy_point X_Y="(-AECT_EVEPod_EVEndPlateoutdist+AECT_EVOSCR_EVOutShellConnlowR)*GENV_Si225 ; (AECT_EVEPod_EVEndPlateoutdist-AECT_EVOSCR_EVOutShellConnlowR)*GENV_Co225 "/>
+  <gvxy_point X_Y="-AECT_EVEPod_EVEndPlateoutdist*GENV_Si225+AECT_EVEPSl_EVEndPlatespeclen*GENV_Co225 ; AECT_EVEPod_EVEndPlateoutdist*GENV_Co225+AECT_EVEPSl_EVEndPlatespeclen*GENV_Si225 - AECT_EVOSCR_EVOutShellConnlowR/GENV_Co225 "/>
+  <gvxy_point X_Y=" AECT_EVOSpx_OutConnectorS_Point13_X; AECT_EVEPid_EVEndPlateindist - AECT_EVOSCR_EVOutShellConnlowR - tan((180.-AECT_EVEPSa_EVEndPlatespecang)*GENV_PiS180)*(AECT_EVOSpx_OutConnectorS_Point13_X - AECT_EVOSpx_OutConnectorS_Point14_X)"/>
+  <gvxy_point X_Y=" AECT_EVOSpx_OutConnectorS_Point14_X; AECT_EVEPid_EVEndPlateindist - AECT_EVOSCR_EVOutShellConnlowR"/>
+</gvxy>
+
+<composition name="ECT_EV_Envelop_default" >
+  <posXYZ volume="ECT_EV_EndPlate_Inner_default"    X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225;  AECT_EVOShZ_EVOutShellholeZwid/2. + AECT_EVEPth_EVEndPlatethicknes/2. + GENV_Eps" rot=" 0.; 0.; -67.5"/>
+  <posXYZ volume="ECT_EV_EndPlate_Turret_default"   X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225; -AECT_EVOShZ_EVOutShellholeZwid/2. - AECT_EVEPth_EVEndPlatethicknes/2. - GENV_Eps" rot=" 0.; 0.; -67.5"/>
+  <posXYZ volume="ECT_EV_OutShell_default"          X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225;  0." rot=" 0.; 0.; -67.5"/>
+  <posXYZ volume="ECT_EV_OutShellConnector_default" X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225;  AECT_EVOShZ_EVOutShellholeZwid/2. - AECT_EVOSCZ_EVOutShellConnZwid/2. + GENV_Eps/2."    rot=" 0.; 0.; -67.5"/>
+  <posXYZ volume="ECT_EV_OutShellConnector_default" X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225; -AECT_EVOShZ_EVOutShellholeZwid/2. + AECT_EVOSCZ_EVOutShellConnZwid/2. - GENV_Eps/2."    rot=" 0.; 0.; -67.5"/>
+</composition>
+
+<composition name="ECT_EV_Envelop_special_Sector6" >
+  <posXYZ volume="ECT_EV_EndPlate_Inner_special_Sector6"    X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225;  AECT_EVOShZ_EVOutShellholeZwid/2. + AECT_EVEPth_EVEndPlatethicknes/2. + GENV_Eps" rot=" 0.; 0.; 22.5"/>
+  <posXYZ volume="ECT_EV_EndPlate_Turret_special_Sector6"   X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225; -AECT_EVOShZ_EVOutShellholeZwid/2. - AECT_EVEPth_EVEndPlatethicknes/2. - GENV_Eps" rot=" 0.; 0.; 22.5"/>
+  <posXYZ volume="ECT_EV_OutShell_special"          X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225;  0." rot=" 0.; 180.; 22.5"/>
+  <posXYZ volume="ECT_EV_OutShellConnector_special" X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225;  AECT_EVOShZ_EVOutShellholeZwid/2. - AECT_EVOSCZ_EVOutShellConnZwid/2. + GENV_Eps/2."    rot=" 0.; 180.; 22.5"/>
+  <posXYZ volume="ECT_EV_OutShellConnector_special" X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225; -AECT_EVOShZ_EVOutShellholeZwid/2. + AECT_EVOSCZ_EVOutShellConnZwid/2. - GENV_Eps/2."    rot=" 0.; 180.; 22.5"/>
+</composition>
+
+<composition name="ECT_EV_Envelop_special_Sector7" >
+  <posXYZ volume="ECT_EV_EndPlate_Inner_special_Sector7"    X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225;  AECT_EVOShZ_EVOutShellholeZwid/2. + AECT_EVEPth_EVEndPlatethicknes/2. + GENV_Eps" rot=" 0.; 0.; 22.5"/>
+  <posXYZ volume="ECT_EV_EndPlate_Turret_special_Sector7"   X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225; -AECT_EVOShZ_EVOutShellholeZwid/2. - AECT_EVEPth_EVEndPlatethicknes/2. - GENV_Eps" rot=" 0.; 0.; 22.5"/>
+  <posXYZ volume="ECT_EV_OutShell_special"          X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225;  0." rot=" 0.; 0.; 22.5"/>
+  <posXYZ volume="ECT_EV_OutShellConnector_special" X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225;  AECT_EVOShZ_EVOutShellholeZwid/2. - AECT_EVOSCZ_EVOutShellConnZwid/2. + GENV_Eps/2."    rot=" 0.; 0.; 22.5"/>
+  <posXYZ volume="ECT_EV_OutShellConnector_special" X_Y_Z=" GENV_Eps*GENV_Si225; GENV_Eps*GENV_Co225; -AECT_EVOShZ_EVOutShellholeZwid/2. + AECT_EVOSCZ_EVOutShellConnZwid/2. - GENV_Eps/2."    rot=" 0.; 0.; 22.5"/>
+</composition>
+
+<box  name="ECT_EV_SideAttachment"           material="Aluminium"  X_Y_Z="AECT_EVSSAh_EVSideSupporthight - AECT_EVOSit_EVOutShellinnthick - AECT_EVOSio_EVOutShellinneroff; AECT_EVSSAw_EVSideSupportwidth; AECT_EVOShZ_EVOutShellholeZwid - 2.*AECT_EVOSCZ_EVOutShellConnZwid" />
+<box  name="ECT_EV_Attachment_basic"    material="Aluminium"  X_Y_Z="AECT_EVTSAl_EVTopSupportlength; 2.*AECT_EVTSAh_EVTopSupporthight; AECT_EVTSAh_EVTopSupporthight" />
+<box  name="ECT_EV_Attachment_CutBox"   material="Aluminium"  X_Y_Z="2.*AECT_EVTSCw_EVTopSupportCutwid; 4.*AECT_EVTSAh_EVTopSupporthight; AECT_EVTSAh_EVTopSupporthight" />
+<tubs name="ECT_EV_Attachment_CutTube"  material="Aluminium"  Rio_Z="0.; AECT_EVEPHd_EVEndPlateHolediam/2.; 2.*AECT_EVTSAh_EVTopSupporthight"  nbPhi="20" />
+
+<tubs name="ECT_EV_AlignFlange_default_pre"  material="Aluminium"  Rio_Z="AECT_EVEPHd_EVEndPlateHolediam/2.; AECT_EVAFod_EVAlignFlangeoutdi/2.; AECT_EVAFzw_EVAlignFlangezwidt"  nbPhi="20" />
+<tubs name="ECT_EV_AlignFlange_special_base" material="Aluminium"  Rio_Z="0.; AECT_EVAFod_EVAlignFlangeoutdi/2.; AECT_EVTSAh_EVTopSupporthight"  nbPhi="20" />
+<box  name="ECT_EV_AlignFlange_special_cut"  material="Aluminium"  X_Y_Z="2.*AECT_EVAFod_EVAlignFlangeoutdi; 2.*AECT_EVTSAh_EVTopSupporthight; 2.*AECT_EVTSAh_EVTopSupporthight" />
+<tubs name="ECT_EV_AlignTube_default_pre"    material="Aluminium"  Rio_Z="AECT_EVATid_EVAlignTubeinndiam/2.; AECT_EVATid_EVAlignTubeinndiam/2.+AECT_EVATww_EVAlignTuberwallwi; AECT_EVOShZ_EVOutShellholeZwid-2.*AECT_EVAFzw_EVAlignFlangezwidt - GENV_Eps"  nbPhi="20" />
+<tubs name="ECT_EV_AlignTube_special_pre"    material="Aluminium"  Rio_Z="AECT_EVATid_EVAlignTubeinndiam/2.; AECT_EVATid_EVAlignTubeinndiam/2.+AECT_EVATww_EVAlignTuberwallwi; AECT_EVOShZ_EVOutShellholeZwid-2.*AECT_EVTSAh_EVTopSupporthight - GENV_Eps"  nbPhi="20" />
+
+<subtraction name="ECT_EV_FrontAttachment" >
+  <posXYZ volume="ECT_EV_Attachment_basic"    X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EV_Attachment_CutBox"   X_Y_Z=" AECT_EVTSAl_EVTopSupportlength/2.; 0.;  -AECT_EVTSCo_EVTopSupportCutoff" />
+  <posXYZ volume="ECT_EV_Attachment_CutTube"  X_Y_Z=" AECT_EVEPHr_EVEndPlateHolerad*cos(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180) - AECT_EVTSRa_EVTopSupportRadius - AECT_EVTSAl_EVTopSupportlength/2.; -AECT_EVEPHr_EVEndPlateHolerad*sin(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); 0." />
+</subtraction>
+
+<subtraction name="ECT_EV_BackAttachment" >
+  <posXYZ volume="ECT_EV_Attachment_basic"    X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EV_Attachment_CutBox"   X_Y_Z=" AECT_EVTSAl_EVTopSupportlength/2.; 0.;  AECT_EVTSCo_EVTopSupportCutoff" />
+  <posXYZ volume="ECT_EV_Attachment_CutTube"  X_Y_Z=" AECT_EVEPHr_EVEndPlateHolerad*cos(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180) - AECT_EVTSRa_EVTopSupportRadius - AECT_EVTSAl_EVTopSupportlength/2.; -AECT_EVEPHr_EVEndPlateHolerad*sin(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); 0." />
+</subtraction>
+
+<composition name="ECT_EV_AlignTube_default">
+  <posRPhiZ   volume="ECT_EV_AlignTube_default_pre"  R_Phi_Z=" AECT_EVEPHr_EVEndPlateHolerad ; 22.5 - AECT_EVEPHa_EVEndPlateHoleang; 0. " />
+  <posRPhiZ   volume="ECT_EV_AlignFlange_default_pre"  R_Phi_Z=" AECT_EVEPHr_EVEndPlateHolerad ; 22.5 - AECT_EVEPHa_EVEndPlateHoleang; AECT_EVOShZ_EVOutShellholeZwid/2.-AECT_EVAFzw_EVAlignFlangezwidt/2. " />
+  <posRPhiZ   volume="ECT_EV_AlignFlange_default_pre"  R_Phi_Z=" AECT_EVEPHr_EVEndPlateHolerad ; 22.5 - AECT_EVEPHa_EVEndPlateHoleang;-AECT_EVOShZ_EVOutShellholeZwid/2.+AECT_EVAFzw_EVAlignFlangezwidt/2. " />
+</composition>
+
+<subtraction name="ECT_EV_AlignFlange_special_pre" >
+  <posXYZ volume="ECT_EV_AlignFlange_special_base"  X_Y_Z=" AECT_EVEPHr_EVEndPlateHolerad*cos(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180);-AECT_EVEPHr_EVEndPlateHolerad*sin(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); 0." />
+  <posXYZ volume="ECT_EV_AlignFlange_special_cut"   X_Y_Z=" AECT_EVEPHr_EVEndPlateHolerad*cos(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180);-GENV_Eps; 0." rot=" 0.; 0.; 0." />
+  <posXYZ volume="ECT_EV_Attachment_CutTube"        X_Y_Z=" AECT_EVEPHr_EVEndPlateHolerad*cos(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180);-AECT_EVEPHr_EVEndPlateHolerad*sin(AECT_EVEPHa_EVEndPlateHoleang*GENV_PiS180); 0." />
+</subtraction>
+
+<composition name="ECT_EV_AlignTube_special">
+  <posRPhiZ   volume="ECT_EV_AlignTube_special_pre"    R_Phi_Z=" AECT_EVEPHr_EVEndPlateHolerad ; -AECT_EVEPHa_EVEndPlateHoleang; 0. " />
+  <posRPhiZ   volume="ECT_EV_AlignFlange_special_pre"  R_Phi_Z=" 0. ; 0.; AECT_EVOShZ_EVOutShellholeZwid/2.-AECT_EVTSAh_EVTopSupporthight/2. " />
+  <posRPhiZ   volume="ECT_EV_AlignFlange_special_pre"  R_Phi_Z=" 0. ; 0.;-AECT_EVOShZ_EVOutShellholeZwid/2.+AECT_EVTSAh_EVTopSupporthight/2. " />
+</composition>
+
+<!-- radiation shielding mounted inside main envelope towards IP - atljt___0023, atljt___0026, atljt___0029 and atljt___0031 -->
+<var name="AECT_JTVSth_JTVShieldthicknes"    value="    80.  "/>
+<var name="AECT_JTVSlw_JTVShieldlowwidth"    value="   321.  "/>
+<var name="AECT_JTVSuw_JTVShieldupwidth"     value="  1854.  "/>
+<var name="AECT_JTVSth_JTVShieldtothight"    value="  1975.  "/>
+<var name="AECT_JTVSmh_JTVShieldmidhight"    value="  1850.  "/>
+<var name="AECT_JTVShd_JTVShieldholediam"    value="   650.  "/>
+<var name="AECT_JTVSpx_JTVShieldholeposX"    value="   195.  "/>
+<var name="AECT_JTVSpy_JTVShieldholeposY"    value="  1569.  "/>
+<var name="AECT_JTVSpr_JTVShieldposR"        value="  1470.  "/>
+<var name="AECT_JTVSpp_JTVShieldpophioff"    value="   435.  "/>
+
+<var name="AECT_JTVSth_JTVSpecial2tothig"    value="  1713.  "/>
+<var name="AECT_JTVSth_JTVSpecial1tothig"    value="  1690.  "/>
+<var name="AECT_JTVSlh_JTVSpecial1lowhig"    value="   931.  "/>
+<var name="AECT_JTVSmh_JTVSpecial1midhig"    value="   691.  "/>
+<var name="AECT_JTVSlh_JTVSpecial1phioff"    value="   170.  "/>
+
+<var name="AECT_JTVSpr_JTVSpecial2posR"      value="  1522.  "/>
+<var name="AECT_JTVSpr_JTVSpecial1posR"      value="  1717.  "/>
+
+<gvxy name="ECT_JTV_Shielding_basic" material="PolyBoronB4C" dZ="AECT_JTVSth_JTVShieldthicknes">
+  <gvxy_point X_Y=" AECT_JTVSlw_JTVShieldlowwidth/2.; 0."/>
+  <gvxy_point X_Y=" AECT_JTVSuw_JTVShieldupwidth/2.; AECT_JTVSmh_JTVShieldmidhight"/>
+  <gvxy_point X_Y=" 0.; AECT_JTVSth_JTVShieldtothight"/>
+  <gvxy_point X_Y="-AECT_JTVSuw_JTVShieldupwidth/2.; AECT_JTVSmh_JTVShieldmidhight"/>
+  <gvxy_point X_Y="-AECT_JTVSlw_JTVShieldlowwidth/2.; 0."/>
+</gvxy>
+
+<tubs name="ECT_JTV_AlignHole"    material="PolyBoronB4C"  Rio_Z="0.; AECT_JTVShd_JTVShieldholediam/2.; 2.*AECT_JTVSth_JTVShieldthicknes"  nbPhi="20" />
+
+<subtraction name="ECT_JTV_Shielding_default_tmp" >
+  <posXYZ volume="ECT_JTV_Shielding_basic"  X_Y_Z=" AECT_JTVSlw_JTVShieldlowwidth/2.*GENV_Co225+AECT_JTVSpp_JTVShieldpophioff; AECT_JTVSpr_JTVShieldposR-AECT_JTVSlw_JTVShieldlowwidth/2.*GENV_Si225;  AECT_EVOShZ_EVOutShellholeZwid/2. - AECT_JTVSth_JTVShieldthicknes/2." rot=" 0.; 0.; -22.5"/>
+  <posXYZ volume="ECT_JTV_AlignHole"        X_Y_Z=" AECT_JTVSpp_JTVShieldpophioff+(AECT_JTVSlw_JTVShieldlowwidth/2.+AECT_JTVSpx_JTVShieldholeposX)*GENV_Co225+AECT_JTVSpy_JTVShieldholeposY*GENV_Si225; AECT_JTVSpr_JTVShieldposR-(AECT_JTVSlw_JTVShieldlowwidth/2.+AECT_JTVSpx_JTVShieldholeposX)*GENV_Si225+AECT_JTVSpy_JTVShieldholeposY*GENV_Co225; AECT_EVOShZ_EVOutShellholeZwid/2. - AECT_JTVSth_JTVShieldthicknes/2."/>
+</subtraction>
+
+<composition name="ECT_JTV_Shielding_default" >
+  <posXYZ volume="ECT_JTV_Shielding_default_tmp"  rot=" 0.; 0.; -45."/>
+</composition>
+
+<gvxy name="ECT_JTV_Shielding_special1" material="PolyBoronB4C" dZ="AECT_JTVSth_JTVShieldthicknes">
+  <gvxy_point X_Y=" 0.; 0."/>
+  <gvxy_point X_Y=" 0.; AECT_JTVSlh_JTVSpecial1lowhig"/>
+  <gvxy_point X_Y=" AECT_JTVSlh_JTVSpecial1phioff; AECT_JTVSlh_JTVSpecial1lowhig"/>
+  <gvxy_point X_Y=" AECT_JTVSlh_JTVSpecial1phioff; AECT_JTVSth_JTVSpecial1tothig"/>  
+  <gvxy_point X_Y=" (AECT_JTVSlh_JTVSpecial1lowhig+AECT_JTVSmh_JTVSpecial1midhig)*GENV_Ta225; AECT_JTVSlh_JTVSpecial1lowhig+AECT_JTVSmh_JTVSpecial1midhig"/> 
+</gvxy>
+
+<gvxy name="ECT_JTV_Shielding_special2" material="PolyBoronB4C" dZ="AECT_JTVSth_JTVShieldthicknes">
+  <gvxy_point X_Y=" 0.; 0."/>
+  <gvxy_point X_Y=" 0.; AECT_JTVSth_JTVSpecial1tothig"/>
+  <gvxy_point X_Y=" -AECT_JTVSth_JTVSpecial2tothig*GENV_Si225; AECT_JTVSth_JTVSpecial2tothig*GENV_Co225"/>
+</gvxy>
+
+<composition name="ECT_JTV_Shielding_special" >
+  <posXYZ volume="ECT_JTV_Shielding_special1"  X_Y_Z=" -AECT_JTVSpp_JTVShieldpophioff; AECT_JTVSpr_JTVSpecial1posR; AECT_EVOShZ_EVOutShellholeZwid/2. - AECT_JTVSth_JTVShieldthicknes/2." rot=" 0.; 0.; 22.5"/>
+  <posXYZ volume="ECT_JTV_Shielding_special2"  X_Y_Z=" -AECT_JTVSpp_JTVShieldpophioff - (AECT_JTVSpr_JTVSpecial1posR-AECT_JTVSpr_JTVSpecial2posR)/GENV_Ta225; AECT_JTVSpr_JTVSpecial2posR;  AECT_EVOShZ_EVOutShellholeZwid/2. - AECT_JTVSth_JTVShieldthicknes/2." rot=" 0.; 0.; 22.5" />
+</composition>
+
+<!-- central tube surrounding beampipe - atlteyv_0017 -->
+<var name="AECT_CTIcle_CentTubeIncomplen"    value="  4953. - 14. "/>
+<var name="AECT_CTIpo1_CentTubeInposoff1"    value="    70.  "/>
+<var name="AECT_CTIpo2_CentTubeInposoff2"    value="   565.  "/>
+<var name="AECT_CTIpo3_CentTubeInposoff3"    value="   500.  "/>
+<var name="AECT_CTIdi1_CentTubeInDiainn1"    value="  1220.  "/>
+<var name="AECT_CTIdi3_CentTubeInDiainn3"    value="  1650.  "/>
+<var name="AECT_CTIdi4_CentTubeInDiainn4"    value="  1730.  "/>
+<var name="AECT_CTIdo1_CentTubeInDiaout1"    value="  1339.  "/>
+<var name="AECT_CTIdo2_CentTubeInDiaout2"    value="  1859.  "/>
+<var name="AECT_CTIdo3_CentTubeInDiaout3"    value="  2400.  "/>
+<var name="AECT_CTIno2_CentTubeInnegoff2"    value="   185.  "/>
+<var name="AECT_CTIdit_CentTubeInDiaintu"    value="  1740.  "/>
+<var name="AECT_CTIdot_CentTubeInDiaoutu"    value="  1780.  "/>
+<var name="AECT_CTIpfo_CentTubeInpofuoff"    value="   750.  "/>
+
+<pcon name="ECT_EV_CentralTube" material="ShieldSteel" nbPhi="20" >
+  <polyplane Rio_Z=" AECT_CTIdi1_CentTubeInDiainn1/2.; AECT_CTIdo1_CentTubeInDiaout1/2.;  AECT_CTIcle_CentTubeIncomplen/2." />
+  <polyplane Rio_Z=" AECT_CTIdi1_CentTubeInDiainn1/2.; AECT_CTIdo1_CentTubeInDiaout1/2.;  AECT_CTIcle_CentTubeIncomplen/2. - AECT_CTIpo1_CentTubeInposoff1" />
+  <polyplane Rio_Z=" AECT_CTIdi1_CentTubeInDiainn1/2.; AECT_CTIdo2_CentTubeInDiaout2/2.;  AECT_CTIcle_CentTubeIncomplen/2. - AECT_CTIpo1_CentTubeInposoff1" />
+  <polyplane Rio_Z=" AECT_CTIdi1_CentTubeInDiainn1/2.; AECT_CTIdo2_CentTubeInDiaout2/2.;  AECT_CTIcle_CentTubeIncomplen/2. - AECT_CTIpfo_CentTubeInpofuoff + AECT_CTIpo2_CentTubeInposoff2" />
+  <polyplane Rio_Z=" AECT_CTIdi3_CentTubeInDiainn3/2.; AECT_CTIdo2_CentTubeInDiaout2/2.;  AECT_CTIcle_CentTubeIncomplen/2. - AECT_CTIpfo_CentTubeInpofuoff + AECT_CTIpo2_CentTubeInposoff2" />
+  <polyplane Rio_Z=" AECT_CTIdi3_CentTubeInDiainn3/2.; AECT_CTIdo2_CentTubeInDiaout2/2.;  AECT_CTIcle_CentTubeIncomplen/2. - AECT_CTIpfo_CentTubeInpofuoff + AECT_CTIpo3_CentTubeInposoff3" />
+  <polyplane Rio_Z=" AECT_CTIdi4_CentTubeInDiainn4/2.; AECT_CTIdo2_CentTubeInDiaout2/2.;  AECT_CTIcle_CentTubeIncomplen/2. - AECT_CTIpfo_CentTubeInpofuoff + AECT_CTIpo3_CentTubeInposoff3" />
+  <polyplane Rio_Z=" AECT_CTIdi4_CentTubeInDiainn4/2.; AECT_CTIdo2_CentTubeInDiaout2/2.;  AECT_CTIcle_CentTubeIncomplen/2.-AECT_CTIpfo_CentTubeInpofuoff + AECT_CTIpo3_CentTubeInposoff3" />
+  <polyplane Rio_Z=" AECT_CTIdi4_CentTubeInDiainn4/2.; AECT_CTIdo2_CentTubeInDiaout2/2.;  AECT_CTIcle_CentTubeIncomplen/2.-AECT_CTIpfo_CentTubeInpofuoff" />
+  <polyplane Rio_Z=" AECT_CTIdit_CentTubeInDiaintu/2.; AECT_CTIdot_CentTubeInDiaoutu/2.;  AECT_CTIcle_CentTubeIncomplen/2.-AECT_CTIpfo_CentTubeInpofuoff" />
+  <polyplane Rio_Z=" AECT_CTIdit_CentTubeInDiaintu/2.; AECT_CTIdot_CentTubeInDiaoutu/2.; -AECT_CTIcle_CentTubeIncomplen/2.+AECT_CTIpfo_CentTubeInpofuoff" />
+  <polyplane Rio_Z=" AECT_CTIdi4_CentTubeInDiainn4/2.; AECT_CTIdo2_CentTubeInDiaout2/2.; -AECT_CTIcle_CentTubeIncomplen/2.+AECT_CTIpfo_CentTubeInpofuoff" />
+  <polyplane Rio_Z=" AECT_CTIdi4_CentTubeInDiainn4/2.; AECT_CTIdo2_CentTubeInDiaout2/2.; -AECT_CTIcle_CentTubeIncomplen/2.+AECT_CTIno2_CentTubeInnegoff2" />
+  <polyplane Rio_Z=" AECT_CTIdi4_CentTubeInDiainn4/2.; AECT_CTIdo3_CentTubeInDiaout3/2.; -AECT_CTIcle_CentTubeIncomplen/2.+AECT_CTIno2_CentTubeInnegoff2" />
+  <polyplane Rio_Z=" AECT_CTIdi4_CentTubeInDiainn4/2.; AECT_CTIdo3_CentTubeInDiaout3/2.; -AECT_CTIcle_CentTubeIncomplen/2.+AECT_CTIpo1_CentTubeInposoff1" />
+  <polyplane Rio_Z=" AECT_CTIdi4_CentTubeInDiainn4/2.; AECT_CTIdo2_CentTubeInDiaout2/2.; -AECT_CTIcle_CentTubeIncomplen/2.+AECT_CTIpo1_CentTubeInposoff1" />
+  <polyplane Rio_Z=" AECT_CTIdi4_CentTubeInDiainn4/2.; AECT_CTIdo2_CentTubeInDiaout2/2.; -AECT_CTIcle_CentTubeIncomplen/2." />
+</pcon>
+
+<!-- JTV surrounding central tube IP - atljt___0037-vAD -->
+<var name="AECT_JTVFRi_FrontRingInnerRad"    value="  1305. "/>
+<var name="AECT_JTVFDo_FrontRingOuterDia"    value="  2840. "/>
+<var name="AECT_JTVFMr_FrontRingMostInRa"    value="   930. "/>
+<var name="AECT_JTVFZw_FrontRingZwidth"      value="   160. "/>
+<var name="AECT_JTVFZp_FrontRingZposition"   value="   220. "/> <!-- relative pos - from drilling hole position + combination with atlteyv_0076 -->
+<!-- JTV surrounding central tube non IP - atljt___0039-vAC -->
+<var name="AECT_JTVBRi_BackRingInnerRad"     value="  1245. "/>
+<var name="AECT_JTVBDm_BackRingMediumDia"    value="  2400. "/>
+<var name="AECT_JTVBDo_BackRingOuterDia"     value="  2690. "/>
+<var name="AECT_JTVBMr_BackRingMostInRa"     value="   965. "/>
+<var name="AECT_JTVBZw_BackRingZwidth"       value="   140. "/>
+<var name="AECT_JTVBZo_BackRingZoffset"      value="    80. "/>
+
+<pcon name="ECT_JTV_FrontRing" material="PolyBoronB4C" nbPhi="20" >
+  <polyplane Rio_Z=" AECT_JTVFMr_FrontRingMostInRa; AECT_JTVFRi_FrontRingInnerRad; AECT_CTIcle_CentTubeIncomplen/2. - AECT_CTIpo1_CentTubeInposoff1 - AECT_JTVFZp_FrontRingZposition" />
+  <polyplane Rio_Z=" AECT_JTVFMr_FrontRingMostInRa; AECT_JTVFDo_FrontRingOuterDia/2.; AECT_JTVFDo_FrontRingOuterDia/2. - AECT_JTVFRi_FrontRingInnerRad + AECT_CTIcle_CentTubeIncomplen/2. - AECT_CTIpo1_CentTubeInposoff1 - AECT_JTVFZp_FrontRingZposition" />
+  <polyplane Rio_Z=" AECT_JTVFMr_FrontRingMostInRa; AECT_JTVFDo_FrontRingOuterDia/2.; AECT_JTVFZw_FrontRingZwidth + AECT_CTIcle_CentTubeIncomplen/2. - AECT_CTIpo1_CentTubeInposoff1 - AECT_JTVFZp_FrontRingZposition" />
+</pcon>
+
+<pcon name="ECT_JTV_BackRing" material="PolyBoronB4C" nbPhi="20" >
+  <polyplane Rio_Z=" AECT_JTVBDm_BackRingMediumDia/2. + GENV_Eps; AECT_JTVBDo_BackRingOuterDia/2.; -AECT_CTIcle_CentTubeIncomplen/2.+AECT_CTIno2_CentTubeInnegoff2 - AECT_JTVBZw_BackRingZwidth + AECT_JTVBZo_BackRingZoffset" />
+  <polyplane Rio_Z=" AECT_JTVBDm_BackRingMediumDia/2. + GENV_Eps; AECT_JTVBDo_BackRingOuterDia/2.; - AECT_JTVBDo_BackRingOuterDia/2. + AECT_JTVBRi_BackRingInnerRad -AECT_CTIcle_CentTubeIncomplen/2.+AECT_CTIno2_CentTubeInnegoff2 + AECT_JTVBZo_BackRingZoffset" />
+  <polyplane Rio_Z=" AECT_JTVBDm_BackRingMediumDia/2. + GENV_Eps; AECT_JTVBRi_BackRingInnerRad + AECT_JTVBZo_BackRingZoffset; -AECT_CTIcle_CentTubeIncomplen/2.+AECT_CTIno2_CentTubeInnegoff2 " />
+  <polyplane Rio_Z=" AECT_JTVBMr_BackRingMostInRa; AECT_JTVBRi_BackRingInnerRad + AECT_JTVBZo_BackRingZoffset; -AECT_CTIcle_CentTubeIncomplen/2.+AECT_CTIno2_CentTubeInnegoff2 " />
+  <polyplane Rio_Z=" AECT_JTVBMr_BackRingMostInRa; AECT_JTVBRi_BackRingInnerRad; -AECT_CTIcle_CentTubeIncomplen/2.+AECT_CTIno2_CentTubeInnegoff2 + AECT_JTVBZo_BackRingZoffset " />
+</pcon>
+
+<!-- yoke positioned at the ends of central tube - atlteyv_0076, atlteys_0007 and atlteys_0013 -->
+<var name="AECT_CTYpoZ_CentTubeYokeposZ"     value="  1932 "/>
+<var name="AECT_CTYthi_CentTubeYokethick"    value="    60.  "/>
+<var name="AECT_CTYwid_CentTubeYokewidth"    value="   125.  "/>
+<var name="AECT_CTYlen_CentTubeYokelengt"    value="  1500.  "/>
+<var name="AECT_CTYidi_CentTubeYokeindia"    value="   130.  "/>
+<var name="AECT_CTYodi_CentTubeYokeoudia"    value="   300.  "/>
+<var name="AECT_CTYpdi_CentTubeYokeposdi"    value="  1860.  "/>
+<var name="AECT_CTYst1_CentTubeYokesupt1"    value="    30.  "/>
+<var name="AECT_CTYst2_CentTubeYokesupt2"    value="    40.  "/>
+<var name="AECT_CTYSan_CentTubeYokesupa"     value="atan(AECT_CTYodi_CentTubeYokeoudia/AECT_CTYpdi_CentTubeYokeposdi)/GENV_PiS180"/>
+
+<tubs name="ECT_EV_Yoke_Connector"   material="Iron"  Rio_Z="0.; AECT_CTYodi_CentTubeYokeoudia/2.; AECT_CTYthi_CentTubeYokethick + AECT_CTYst1_CentTubeYokesupt1 + AECT_CTYst2_CentTubeYokesupt2"  nbPhi="20" />
+<tubs name="ECT_EV_Yoke_End"         material="Iron"  Rio_Z="AECT_CTYidi_CentTubeYokeindia/2.; AECT_CTYodi_CentTubeYokeoudia/2.; AECT_CTYthi_CentTubeYokethick + GENV_Eps"  nbPhi="20" />
+<box  name="ECT_EV_Yoke_Box"         material="Iron"  X_Y_Z="AECT_CTYlen_CentTubeYokelengt+AECT_CTYodi_CentTubeYokeoudia/2.; AECT_CTYthi_CentTubeYokethick; AECT_CTYwid_CentTubeYokewidth" />
+
+<union name="ECT_EV_Yoke_basic">
+  <posXYZ volume="ECT_EV_Yoke_Box"          X_Y_Z=" AECT_CTYthi_CentTubeYokethick/2.+AECT_CTYst2_CentTubeYokesupt2; -(AECT_CTYlen_CentTubeYokelengt+AECT_CTYodi_CentTubeYokeoudia)/2.; 0." rot="  0.; 0.; 90. "/>
+  <posXYZ volume="ECT_EV_Yoke_Connector"    X_Y_Z=" (AECT_CTYthi_CentTubeYokethick + AECT_CTYst1_CentTubeYokesupt1 + AECT_CTYst2_CentTubeYokesupt2)/2.; 0.; 0." rot="  0.; 90.; 0. " />
+  <posXYZ volume="ECT_EV_Yoke_End"          X_Y_Z=" AECT_CTYthi_CentTubeYokethick/2.+AECT_CTYst2_CentTubeYokesupt2; -(AECT_CTYlen_CentTubeYokelengt+AECT_CTYodi_CentTubeYokeoudia);  0." rot="  0.; 90.; 0. "/>
+</union>
+
+<tubs  name="ECT_EV_Yoke_InnerSupport" material="Iron"  Rio_Z="AECT_CTYpdi_CentTubeYokeposdi/2.; AECT_CTYpdi_CentTubeYokeposdi/2.+AECT_CTYst2_CentTubeYokesupt2; AECT_CTYodi_CentTubeYokeoudia + AECT_CTYst2_CentTubeYokesupt2"  profile="22.5+AECT_CTYSan_CentTubeYokesupa;135.-2.*AECT_CTYSan_CentTubeYokesupa"  nbPhi="20" />
+<tubs  name="ECT_EV_Yoke_OuterSupport" material="Iron"  Rio_Z="AECT_CTYpdi_CentTubeYokeposdi/2. + AECT_CTYst2_CentTubeYokesupt2 + AECT_CTYthi_CentTubeYokethick ; AECT_CTYpdi_CentTubeYokeposdi/2. + AECT_CTYst2_CentTubeYokesupt2 + AECT_CTYthi_CentTubeYokethick + AECT_CTYst1_CentTubeYokesupt1; AECT_CTYodi_CentTubeYokeoudia/2."  profile="22.5+AECT_CTYSan_CentTubeYokesupa;135.-2.*AECT_CTYSan_CentTubeYokesupa"  nbPhi="20" />
+
+<composition name="ECT_EV_Yoke">
+  <posRPhiZ  volume="ECT_EV_Yoke_InnerSupport" R_Phi_Z=" GENV_Eps/2. ;  0.; 0. "/>   
+  <posRPhiZ  volume="ECT_EV_Yoke_OuterSupport" R_Phi_Z=" GENV_Eps/2 ;  0.; 0. "/>   
+  <posRPhiZ  volume="ECT_EV_Yoke_basic"        R_Phi_Z=" AECT_CTYpdi_CentTubeYokeposdi/2.+GENV_Eps/2 ;  22.5; 0. " />
+  <posRPhiZ  volume="ECT_EV_Yoke_basic"        R_Phi_Z="-AECT_CTYpdi_CentTubeYokeposdi/2.-GENV_Eps/2 ; -22.5; 0. " rot="  0.; 180.; 0. "/>
+</composition>
+
+<!-- thermal shielding surrounding central tube - atlteyr_0349 and atlteyr_0310 -->
+<var name="AECT_CTTSid_CentTubeTSInnDia"     value="  1965.  "/>
+<var name="AECT_CTTSil_CentTubeTSinnlen"     value="  3400.  "/>
+<var name="AECT_CTTSFi_CentTubeTSFIDia1"     value="  2100.  "/>
+<var name="AECT_CTTSFi_CentTubeTSFIDia2"     value="  2610.  "/>
+<var name="AECT_CTTSFl_CentTubeTSFlength"    value="   260.  "/>
+<var name="AECT_CTTSth_CentTubeTSthickne"    value="    10.  "/>
+
+<tubs name="ECT_TS_CentralTube_inner"    material="Aluminium" Rio_Z="AECT_CTTSid_CentTubeTSInnDia/2.; AECT_CTTSid_CentTubeTSInnDia/2. + AECT_CTTSth_CentTubeTSthickne;  AECT_CTTSil_CentTubeTSinnlen " nbPhi="20" />
+<tubs name="ECT_TS_CentralTube_middle"   material="Aluminium" Rio_Z="AECT_CTTSid_CentTubeTSInnDia/2.; AECT_CTTSFi_CentTubeTSFIDia1/2. + AECT_CTTSth_CentTubeTSthickne; 3.*AECT_CTTSth_CentTubeTSthickne" nbPhi="20" />
+<pcon name="ECT_TS_CentralTube_top" material="Aluminium" nbPhi="20" profile=" -7.; 194.">
+  <polyplane Rio_Z=" AECT_CTTSFi_CentTubeTSFIDia2/2.; AECT_CTTSFi_CentTubeTSFIDia2/2. + AECT_CTTSth_CentTubeTSthickne;  AECT_CTTSil_CentTubeTSinnlen/2. + 3.*AECT_CTTSth_CentTubeTSthickne + AECT_CTTSFl_CentTubeTSFlength" />
+  <polyplane Rio_Z=" AECT_CTTSFi_CentTubeTSFIDia1/2.; AECT_CTTSFi_CentTubeTSFIDia1/2. + AECT_CTTSth_CentTubeTSthickne;  AECT_CTTSil_CentTubeTSinnlen/2. + 3.*AECT_CTTSth_CentTubeTSthickne " />
+</pcon>
+<pcon name="ECT_TS_CentralTube_low" material="Aluminium" nbPhi="20" profile=" 200.; 140.">
+  <polyplane Rio_Z=" AECT_CTTSFi_CentTubeTSFIDia2/2.; AECT_CTTSFi_CentTubeTSFIDia2/2. + AECT_CTTSth_CentTubeTSthickne;  AECT_CTTSil_CentTubeTSinnlen/2. + 3.*AECT_CTTSth_CentTubeTSthickne + AECT_CTTSFl_CentTubeTSFlength" />
+  <polyplane Rio_Z=" AECT_CTTSFi_CentTubeTSFIDia1/2.; AECT_CTTSFi_CentTubeTSFIDia1/2. + AECT_CTTSth_CentTubeTSthickne;  AECT_CTTSil_CentTubeTSinnlen/2. + 3.*AECT_CTTSth_CentTubeTSthickne " />
+</pcon>
+
+<composition name="ECT_TS_CentralTube">
+  <posXYZ    volume="ECT_TS_CentralTube_inner"/>   
+  <posXYZ    volume="ECT_TS_CentralTube_middle" X_Y_Z="0. ; 0.;  AECT_CTTSil_CentTubeTSinnlen/2. + 3.*AECT_CTTSth_CentTubeTSthickne/2. + GENV_Eps/2."/>   
+  <posXYZ    volume="ECT_TS_CentralTube_middle" X_Y_Z="0. ; 0.;-(AECT_CTTSil_CentTubeTSinnlen/2. + 3.*AECT_CTTSth_CentTubeTSthickne/2. + GENV_Eps/2.)"/>   
+  <posXYZ    volume="ECT_TS_CentralTube_top"  X_Y_Z=" 0. ; 0.; GENV_Eps"/>
+  <posXYZ    volume="ECT_TS_CentralTube_top"  X_Y_Z=" 0. ; 0.;-GENV_Eps" rot="  0.; 180.; 0. "/>
+  <posXYZ    volume="ECT_TS_CentralTube_low"  X_Y_Z=" 0. ; 0.; GENV_Eps"/>
+  <posXYZ    volume="ECT_TS_CentralTube_low"  X_Y_Z=" 0. ; 0.;-GENV_Eps" rot="  0.; 180.; 0. "/>
+</composition>
+
+<!-- tie rod and corresponding mounting points attached to main envelope - atlteyv_0026, atlteyv_0027, atlte___0009, atlteys_0001 and derived calculations-->
+<var  name="AECT_CryStOL0_CryStoutLength0"   value="   545." />
+<var  name="AECT_CryStOL1_CryStoutLength1"   value="   400." />
+<var  name="AECT_CryStOW0_CryStoutpWidth0"   value="  1080." />
+<var  name="AECT_CryStOW1_CryStoutpWidth1"   value="   770." />
+<var  name="AECT_CryStOH1_CryStoutRadius"    value="  4530." />
+<var  name="AECT_CryStOPZ_CryStoutPosiZ"     value="    50." />
+<var  name="AECT_CryStIwi_CryStinnZwidth"    value="   400." />
+<var  name="AECT_CryStIhi_CryStinnhight"     value="   250." />
+<var  name="AECT_CryStIos_CryStinnoffset"    value="    50." />
+<var  name="AECT_CryoStTh_CryoStopThickness" value="    40." />
+<var  name="AECT_TieRodZl_TieRodZlength"     value="  3660." />
+<var  name="AECT_TieRodDi_TieRodDiameter"    value="    56." />
+<var  name="AECT_TieRodPo_TieRodPhioffset"   value="    71." />
+<var  name="AECT_TieRodZo_TieRodZoffset"     value="   135." />
+<var  name="AECT_TieRodRo_TieRodRoffset"     value="    75." />
+
+<box  name="ECT_CryoStop1"  material="Aluminium"  X_Y_Z=" AECT_CryStOW0_CryStoutpWidth0; AECT_CryStOH1_CryStoutRadius-(AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff); AECT_CryStOL0_CryStoutLength0" />
+<box  name="ECT_CryoStop2"  material="Aluminium"  X_Y_Z=" AECT_CryStOW0_CryStoutpWidth0-2.*AECT_CryoStTh_CryoStopThickness ; AECT_CryStOH1_CryStoutRadius-(AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff)     ; AECT_CryStOL0_CryStoutLength0+GENV_Eps " />
+<trd  name="ECT_CryoStop3"  material="Aluminium"  
+ Xmp_Ymp_Z=" AECT_CryStOW0_CryStoutpWidth0+GENV_Eps ; AECT_CryStOW0_CryStoutpWidth0+GENV_Eps ;
+             2.*AECT_CryoStTh_CryoStopThickness ; 2.*(AECT_CryStOH1_CryStoutRadius-(AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff)); AECT_CryStOH1_CryStoutRadius-(AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff) - AECT_CryoStTh_CryoStopThickness" />
+<box  name="ECT_CryoStop4"  material="Aluminium"  X_Y_Z=" AECT_CryStOW1_CryStoutpWidth1; AECT_CryStOH1_CryStoutRadius-(AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff)+GENV_Eps ; AECT_CryStOL0_CryStoutLength0+GENV_Eps " />
+<subtraction  name="ECT_EV_CryoStop_outside_basic" >
+  <posXYZ   volume="ECT_CryoStop1" />
+  <posXYZ   volume="ECT_CryoStop2"  X_Y_Z=" 0. ; -AECT_CryoStTh_CryoStopThickness   ;         0.       " />
+  <posXYZ   volume="ECT_CryoStop3"  X_Y_Z=" 0. ; (AECT_CryStOH1_CryStoutRadius-(AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff))/2. ; -AECT_CryStOL0_CryStoutLength0/2. + AECT_CryStOL1_CryStoutLength1 +(AECT_CryStOH1_CryStoutRadius-(AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff) - AECT_CryoStTh_CryoStopThickness)/2. " />
+  <posXYZ   volume="ECT_CryoStop4" />
+</subtraction>
+
+<composition  name="ECT_EV_CryoStop_outside_tmp" >
+  <posXYZ   volume="ECT_EV_CryoStop_outside_basic" rot="  0.; 0.; -90. "/>
+</composition>
+
+<var name="AFT_ECTBrkt_Thickness"           value="  20. " />
+<var name="AFT_ECTBrkt_LowPlateThickness"   value="  30. " />
+<var name="AFT_ECTBrkt_CtrSpacerGap"        value=" 360. " />
+<var name="AFT_ECTBrkt_MidSpacerGap"        value=" 720. " />
+<var name="AFT_ECTBrkt_SmallXWidth"         value="1080. " />
+<var name="AFT_ECTBrkt_TotalXWidth"         value="1120. " />
+<var name="AFT_ECTBrkt_TotalYWidth"         value=" 230. " />
+
+<var name="AFT_ECTBrkt_TopPlate_ZWidth"     value=" 115. " />
+<var name="AFT_ECTBrkt_DownPlate_ZWidth"    value=" 200. " />
+<var name="AFT_ECTBrkt_SidePlate_ZWidth"    value=" 510. " />
+<var name="AFT_ECTBrkt_ZOffset"             value=" 165. " />
+<var name="AFT_ECTBrkt_PlateZOffset"        value="  25. " />
+<var name="AFT_ECTBrkt_PlateSmallYOffset"   value="  55. " />
+<var name="AFT_ECTBrkt_PlateBigYOffset"     value=" 119.5" />
+<var name="AFT_ECTBrkt_SpacerYOffset"       value=" 110. " />
+
+<box  name="AFT_ECTBrkt_CtrSpacer"     material="Iron"    X_Y_Z=" AFT_ECTBrkt_CtrSpacerGap; AFT_ECTBrkt_Thickness; AFT_ECTBrkt_TopPlate_ZWidth" />
+<box  name="AFT_ECTBrkt_MidSpacer"     material="Iron"    X_Y_Z=" (AFT_ECTBrkt_MidSpacerGap-AFT_ECTBrkt_CtrSpacerGap)/2.-AFT_ECTBrkt_Thickness; AFT_ECTBrkt_Thickness; AFT_ECTBrkt_TopPlate_ZWidth" />
+<box  name="AFT_ECTBrkt_LowCtrPlate"   material="Iron"    X_Y_Z=" AFT_ECTBrkt_SmallXWidth; AFT_ECTBrkt_Thickness; AFT_ECTBrkt_DownPlate_ZWidth-AFT_ECTBrkt_Thickness" />
+<box  name="AFT_ECTBrkt_LowSidePlate"  material="Iron"    X_Y_Z=" (AFT_ECTBrkt_TotalXWidth-AFT_ECTBrkt_MidSpacerGap)/2.+AFT_ECTBrkt_Thickness; AFT_ECTBrkt_LowPlateThickness; AFT_ECTBrkt_SidePlate_ZWidth" />
+<box  name="AFT_ECTBrkt_CrossPlate"    material="Iron"    X_Y_Z=" AFT_ECTBrkt_SmallXWidth; AFT_ECTBrkt_TotalYWidth-AFT_ECTBrkt_LowPlateThickness; AFT_ECTBrkt_Thickness" />
+
+<gvxy name="AFT_ECTBrkt_FrontPlate" material="Iron" dZ="AFT_ECTBrkt_Thickness" >
+  <gvxy_point X_Y="                                           0.; 0. " />
+  <gvxy_point X_Y="                                           0.; AFT_ECTBrkt_TotalYWidth-AFT_ECTBrkt_LowPlateThickness-AFT_ECTBrkt_Thickness" />
+  <gvxy_point X_Y="                     AFT_ECTBrkt_PlateZOffset; AFT_ECTBrkt_TotalYWidth-AFT_ECTBrkt_LowPlateThickness-AFT_ECTBrkt_Thickness" />
+  <gvxy_point X_Y=" AFT_ECTBrkt_ZOffset-AFT_ECTBrkt_PlateZOffset; AFT_ECTBrkt_PlateZOffset" />
+  <gvxy_point X_Y=" AFT_ECTBrkt_ZOffset-AFT_ECTBrkt_PlateZOffset; 0. " />
+</gvxy>
+
+<gvxy name="AFT_ECTBrkt_SidePlate" material="Iron" dZ="AFT_ECTBrkt_Thickness" >
+  <gvxy_point X_Y=" 0.; AFT_ECTBrkt_Thickness " />
+  <gvxy_point X_Y=" AFT_ECTBrkt_DownPlate_ZWidth-AFT_ECTBrkt_Thickness; AFT_ECTBrkt_Thickness " />
+  <gvxy_point X_Y=" AFT_ECTBrkt_DownPlate_ZWidth-AFT_ECTBrkt_Thickness; 0. " />
+  <gvxy_point X_Y=" AFT_ECTBrkt_SidePlate_ZWidth-2.*AFT_ECTBrkt_Thickness-AFT_ECTBrkt_ZOffset; 0. " />
+  <gvxy_point X_Y=" AFT_ECTBrkt_SidePlate_ZWidth-2.*AFT_ECTBrkt_Thickness-AFT_ECTBrkt_ZOffset; AFT_ECTBrkt_PlateSmallYOffset " />
+  <gvxy_point X_Y=" AFT_ECTBrkt_PlateZOffset;  AFT_ECTBrkt_TotalYWidth-AFT_ECTBrkt_LowPlateThickness-AFT_ECTBrkt_Thickness" />
+  <gvxy_point X_Y=" 0.;  AFT_ECTBrkt_TotalYWidth-AFT_ECTBrkt_LowPlateThickness-AFT_ECTBrkt_Thickness" />
+</gvxy>
+
+<gvxy name="AFT_ECTBrkt_MiddlePlate" material="Iron" dZ="AFT_ECTBrkt_Thickness" >
+  <gvxy_point X_Y=" 0.; 0. " />
+  <gvxy_point X_Y=" AFT_ECTBrkt_DownPlate_ZWidth-2.*AFT_ECTBrkt_Thickness; 0. " />
+  <gvxy_point X_Y=" AFT_ECTBrkt_DownPlate_ZWidth-2.*AFT_ECTBrkt_Thickness; AFT_ECTBrkt_PlateBigYOffset-AFT_ECTBrkt_Thickness " />
+  <gvxy_point X_Y=" AFT_ECTBrkt_PlateZOffset; AFT_ECTBrkt_TotalYWidth-AFT_ECTBrkt_LowPlateThickness-2.*AFT_ECTBrkt_Thickness " />
+  <gvxy_point X_Y=" 0.; AFT_ECTBrkt_TotalYWidth-AFT_ECTBrkt_LowPlateThickness-2.*AFT_ECTBrkt_Thickness " />
+</gvxy>
+
+<box name="AFT_ECTBrkt_GapCloser"       material="Iron"     X_Y_Z="(AFT_ECTBrkt_MidSpacerGap-AFT_ECTBrkt_CtrSpacerGap-2.*AFT_ECTBrkt_Thickness)/2.; AFT_ECTBrkt_TotalYWidth-AFT_ECTBrkt_LowPlateThickness+(AFT_ECTBrkt_MidSpacerGap-AFT_ECTBrkt_CtrSpacerGap-2.*AFT_ECTBrkt_Thickness)/2.; 122." /> <!-- z dimension adjusted from construction -->
+<box name="AFT_ECTBrkt_GapCloserRub"    material="Carbon"   X_Y_Z="(AFT_ECTBrkt_MidSpacerGap-AFT_ECTBrkt_CtrSpacerGap-2.*AFT_ECTBrkt_Thickness)/1.5; (AFT_ECTBrkt_TotalYWidth-AFT_ECTBrkt_LowPlateThickness+(AFT_ECTBrkt_MidSpacerGap-AFT_ECTBrkt_CtrSpacerGap-2.*AFT_ECTBrkt_Thickness)/2.)/2.; 70." />
+
+<composition name="AFT_ECTBrkt_tmp" >
+  <posXYZ  volume="AFT_ECTBrkt_LowSidePlate"         X_Y_Z=" ((AFT_ECTBrkt_TotalXWidth-AFT_ECTBrkt_MidSpacerGap)/2.+AFT_ECTBrkt_Thickness)/2.+AFT_ECTBrkt_MidSpacerGap/2.-AFT_ECTBrkt_Thickness; AFT_ECTBrkt_LowPlateThickness/2.; AFT_ECTBrkt_SidePlate_ZWidth/2. " />
+  <posXYZ  volume="AFT_ECTBrkt_LowSidePlate"         X_Y_Z="-((AFT_ECTBrkt_TotalXWidth-AFT_ECTBrkt_MidSpacerGap)/2.+AFT_ECTBrkt_Thickness)/2.-AFT_ECTBrkt_MidSpacerGap/2.+AFT_ECTBrkt_Thickness; AFT_ECTBrkt_LowPlateThickness/2.; AFT_ECTBrkt_SidePlate_ZWidth/2. " />
+  <posXYZ  volume="AFT_ECTBrkt_LowCtrPlate"          X_Y_Z=" 0.; AFT_ECTBrkt_LowPlateThickness+AFT_ECTBrkt_Thickness/2.; AFT_ECTBrkt_SidePlate_ZWidth-AFT_ECTBrkt_ZOffset-(AFT_ECTBrkt_DownPlate_ZWidth+AFT_ECTBrkt_Thickness)/2." />
+  <posXYZ  volume="AFT_ECTBrkt_CrossPlate"           X_Y_Z=" 0.; AFT_ECTBrkt_LowPlateThickness+(AFT_ECTBrkt_TotalYWidth-AFT_ECTBrkt_LowPlateThickness)/2.; AFT_ECTBrkt_SidePlate_ZWidth-AFT_ECTBrkt_ZOffset-AFT_ECTBrkt_Thickness/2. " />
+  <posXYZ  volume="AFT_ECTBrkt_FrontPlate"           X_Y_Z=" AFT_ECTBrkt_TotalXWidth/2.-AFT_ECTBrkt_Thickness; AFT_ECTBrkt_LowPlateThickness; AFT_ECTBrkt_SidePlate_ZWidth-AFT_ECTBrkt_ZOffset " rot="0.; -90.; 0."/>
+  <posXYZ  volume="AFT_ECTBrkt_FrontPlate"           X_Y_Z="-AFT_ECTBrkt_TotalXWidth/2.+AFT_ECTBrkt_Thickness; AFT_ECTBrkt_LowPlateThickness; AFT_ECTBrkt_SidePlate_ZWidth-AFT_ECTBrkt_ZOffset " rot="0.; -90.; 0."/>
+  <posXYZ  volume="AFT_ECTBrkt_SidePlate"            X_Y_Z=" AFT_ECTBrkt_SmallXWidth/2.-AFT_ECTBrkt_Thickness/2.; AFT_ECTBrkt_LowPlateThickness; AFT_ECTBrkt_SidePlate_ZWidth-2.*AFT_ECTBrkt_Thickness-AFT_ECTBrkt_ZOffset+AFT_ECTBrkt_Thickness " rot="0.; 90.; 0." />
+  <posXYZ  volume="AFT_ECTBrkt_SidePlate"            X_Y_Z=" AFT_ECTBrkt_Thickness/2.+AFT_ECTBrkt_MidSpacerGap/2.; AFT_ECTBrkt_LowPlateThickness; AFT_ECTBrkt_SidePlate_ZWidth-2.*AFT_ECTBrkt_Thickness-AFT_ECTBrkt_ZOffset+AFT_ECTBrkt_Thickness " rot="0.; 90.; 0."/>
+  <posXYZ  volume="AFT_ECTBrkt_SidePlate"            X_Y_Z="-AFT_ECTBrkt_SmallXWidth/2.+AFT_ECTBrkt_Thickness/2.; AFT_ECTBrkt_LowPlateThickness; AFT_ECTBrkt_SidePlate_ZWidth-2.*AFT_ECTBrkt_Thickness-AFT_ECTBrkt_ZOffset+AFT_ECTBrkt_Thickness " rot="0.; 90.; 0."/>
+  <posXYZ  volume="AFT_ECTBrkt_SidePlate"            X_Y_Z="-AFT_ECTBrkt_Thickness/2.-AFT_ECTBrkt_MidSpacerGap/2.; AFT_ECTBrkt_LowPlateThickness; AFT_ECTBrkt_SidePlate_ZWidth-2.*AFT_ECTBrkt_Thickness-AFT_ECTBrkt_ZOffset+AFT_ECTBrkt_Thickness " rot="0.; 90.; 0."/>
+  <posXYZ  volume="AFT_ECTBrkt_MiddlePlate"          X_Y_Z=" AFT_ECTBrkt_CtrSpacerGap/2.+AFT_ECTBrkt_Thickness/2.; AFT_ECTBrkt_LowPlateThickness+AFT_ECTBrkt_Thickness; AFT_ECTBrkt_SidePlate_ZWidth-AFT_ECTBrkt_ZOffset-AFT_ECTBrkt_Thickness " rot="0.; 90.; 0."/>
+  <posXYZ  volume="AFT_ECTBrkt_MiddlePlate"          X_Y_Z="-AFT_ECTBrkt_CtrSpacerGap/2.-AFT_ECTBrkt_Thickness/2.; AFT_ECTBrkt_LowPlateThickness+AFT_ECTBrkt_Thickness; AFT_ECTBrkt_SidePlate_ZWidth-AFT_ECTBrkt_ZOffset-AFT_ECTBrkt_Thickness " rot="0.; 90.; 0."/>
+  <posXYZ  volume="AFT_ECTBrkt_CtrSpacer"            X_Y_Z=" 0.; AFT_ECTBrkt_LowPlateThickness+AFT_ECTBrkt_Thickness/2.+AFT_ECTBrkt_SpacerYOffset; -AFT_ECTBrkt_TopPlate_ZWidth/2.+AFT_ECTBrkt_SidePlate_ZWidth-AFT_ECTBrkt_ZOffset-AFT_ECTBrkt_Thickness" />
+  <posXYZ  volume="AFT_ECTBrkt_MidSpacer"            X_Y_Z=" (AFT_ECTBrkt_MidSpacerGap+AFT_ECTBrkt_CtrSpacerGap)/4.+AFT_ECTBrkt_Thickness/2.; AFT_ECTBrkt_LowPlateThickness+AFT_ECTBrkt_Thickness/2.+AFT_ECTBrkt_SpacerYOffset; -AFT_ECTBrkt_TopPlate_ZWidth/2.+AFT_ECTBrkt_SidePlate_ZWidth-AFT_ECTBrkt_ZOffset-AFT_ECTBrkt_Thickness" />
+  <posXYZ  volume="AFT_ECTBrkt_MidSpacer"            X_Y_Z="-(AFT_ECTBrkt_MidSpacerGap+AFT_ECTBrkt_CtrSpacerGap)/4.-AFT_ECTBrkt_Thickness/2.; AFT_ECTBrkt_LowPlateThickness+AFT_ECTBrkt_Thickness/2.+AFT_ECTBrkt_SpacerYOffset; -AFT_ECTBrkt_TopPlate_ZWidth/2.+AFT_ECTBrkt_SidePlate_ZWidth-AFT_ECTBrkt_ZOffset-AFT_ECTBrkt_Thickness" />
+  <posXYZ  volume="AFT_ECTBrkt_GapCloser"            X_Y_Z="(AFT_ECTBrkt_MidSpacerGap-AFT_ECTBrkt_CtrSpacerGap)/4.+AFT_ECTBrkt_CtrSpacerGap/2.+AFT_ECTBrkt_Thickness/2.; (AFT_ECTBrkt_TotalYWidth-AFT_ECTBrkt_LowPlateThickness+(AFT_ECTBrkt_MidSpacerGap-AFT_ECTBrkt_CtrSpacerGap-2.*AFT_ECTBrkt_Thickness)/2.)/2. + AFT_ECTBrkt_LowPlateThickness+GENV_Eps; AFT_ECTBrkt_SidePlate_ZWidth-AFT_ECTBrkt_ZOffset+123./2."/>
+  <posXYZ  volume="AFT_ECTBrkt_GapCloser"            X_Y_Z="-((AFT_ECTBrkt_MidSpacerGap-AFT_ECTBrkt_CtrSpacerGap)/4.+AFT_ECTBrkt_CtrSpacerGap/2.+AFT_ECTBrkt_Thickness/2.); (AFT_ECTBrkt_TotalYWidth-AFT_ECTBrkt_LowPlateThickness+(AFT_ECTBrkt_MidSpacerGap-AFT_ECTBrkt_CtrSpacerGap-2.*AFT_ECTBrkt_Thickness)/2.)/2. + AFT_ECTBrkt_LowPlateThickness+GENV_Eps; AFT_ECTBrkt_SidePlate_ZWidth-AFT_ECTBrkt_ZOffset+123./2."/>
+  <posXYZ  volume="AFT_ECTBrkt_GapCloserRub"         X_Y_Z="(AFT_ECTBrkt_MidSpacerGap-AFT_ECTBrkt_CtrSpacerGap)/4.+AFT_ECTBrkt_CtrSpacerGap/2.+AFT_ECTBrkt_Thickness/2.; (AFT_ECTBrkt_TotalYWidth-AFT_ECTBrkt_LowPlateThickness+(AFT_ECTBrkt_MidSpacerGap-AFT_ECTBrkt_CtrSpacerGap-2.*AFT_ECTBrkt_Thickness)/2.)/2. + AFT_ECTBrkt_LowPlateThickness+GENV_Eps; AFT_ECTBrkt_SidePlate_ZWidth-AFT_ECTBrkt_ZOffset+124.+70./2."/>
+  <posXYZ  volume="AFT_ECTBrkt_GapCloserRub"         X_Y_Z="-((AFT_ECTBrkt_MidSpacerGap-AFT_ECTBrkt_CtrSpacerGap)/4.+AFT_ECTBrkt_CtrSpacerGap/2.+AFT_ECTBrkt_Thickness/2.); (AFT_ECTBrkt_TotalYWidth-AFT_ECTBrkt_LowPlateThickness+(AFT_ECTBrkt_MidSpacerGap-AFT_ECTBrkt_CtrSpacerGap-2.*AFT_ECTBrkt_Thickness)/2.)/2. + AFT_ECTBrkt_LowPlateThickness+GENV_Eps; AFT_ECTBrkt_SidePlate_ZWidth-AFT_ECTBrkt_ZOffset+124.+70./2."/>
+</composition>
+
+<composition  name="AFT_ECTBrkt" >
+  <posXYZ   volume="AFT_ECTBrkt_tmp" X_Y_Z=" (AECT_CryStOH1_CryStoutRadius-(AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff))/2.; 0.; -AECT_CryStOL0_CryStoutLength0/2." rot="  0.; 0.; -90. "/>
+</composition>
+
+<composition  name="ECT_EV_CryoStop_outside" >
+  <posRPhiZ   volume="ECT_EV_CryoStop_outside_tmp" R_Phi_Z="  AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff + (AECT_CryStOH1_CryStoutRadius-(AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff))/2.; 22.5; -AECT_EVOShZ_EVOutShellholeZwid/2. + AECT_EVOSCZ_EVOutShellConnZwid +AECT_CryStOL0_CryStoutLength0/2.+AECT_CryStOPZ_CryStoutPosiZ "/>
+  <posRPhiZ   volume="AFT_ECTBrkt" R_Phi_Z="   AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff + (AECT_CryStOH1_CryStoutRadius-(AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff))/2.; 22.5; -AECT_EVOShZ_EVOutShellholeZwid/2. + AECT_EVOSCZ_EVOutShellConnZwid +AECT_CryStOL0_CryStoutLength0/2.+AECT_CryStOPZ_CryStoutPosiZ " />
+</composition>
+
+<gvxy name="ECT_CryoStop_inside_basic" material="Aluminium" dZ="AECT_CryoStTh_CryoStopThickness">
+  <gvxy_point X_Y=" -AECT_CryStIos_CryStinnoffset; 0."/>
+  <gvxy_point X_Y=" -AECT_CryStIwi_CryStinnZwidth; 0."/>
+  <gvxy_point X_Y=" -AECT_CryStIwi_CryStinnZwidth; -AECT_CryStIos_CryStinnoffset"/>
+  <gvxy_point X_Y=" -(AECT_CryStIhi_CryStinnhight-AECT_CryStIos_CryStinnoffset)*GENV_Si45; -AECT_CryStIhi_CryStinnhight"/>
+  <gvxy_point X_Y=" 0.; -AECT_CryStIhi_CryStinnhight"/>
+  <gvxy_point X_Y=" 0.; -AECT_CryStIos_CryStinnoffset"/>
+</gvxy>
+
+<tubs name="ECT_TieRod"    material="Iron"  Rio_Z="0.; AECT_TieRodDi_TieRodDiameter/2.; AECT_TieRodZl_TieRodZlength"  nbPhi="20" />
+
+<composition name="ECT_EV_CryoStop_inside_basic">
+  <posXYZ   volume="ECT_CryoStop_inside_basic"  X_Y_Z=" (AECT_CryStOW0_CryStoutpWidth0 - AECT_CryoStTh_CryoStopThickness)/2. ; 0.; 0." rot=" 0.; 90.; 0."/>
+  <posXYZ   volume="ECT_CryoStop_inside_basic"  X_Y_Z="-(AECT_CryStOW0_CryStoutpWidth0 - AECT_CryoStTh_CryoStopThickness)/2. ; 0.; 0." rot=" 0.; 90.; 0."/>
+  <posXYZ   volume="ECT_TieRod"                 X_Y_Z=" (AECT_CryStOW0_CryStoutpWidth0)/2. - AECT_CryoStTh_CryoStopThickness - AECT_TieRodPo_TieRodPhioffset; -AECT_CryStIhi_CryStinnhight + AECT_TieRodRo_TieRodRoffset; AECT_TieRodZo_TieRodZoffset + AECT_TieRodZl_TieRodZlength/2." rot=" 0.; 0.; 0."/>
+  <posXYZ   volume="ECT_TieRod"                 X_Y_Z="-(AECT_CryStOW0_CryStoutpWidth0)/2. + AECT_CryoStTh_CryoStopThickness + AECT_TieRodPo_TieRodPhioffset; -AECT_CryStIhi_CryStinnhight + AECT_TieRodRo_TieRodRoffset; AECT_TieRodZo_TieRodZoffset + AECT_TieRodZl_TieRodZlength/2." rot=" 0.; 0.; 0."/>
+</composition>
+
+<composition  name="ECT_EV_CryoStop_inside_tmp" >
+  <posXYZ   volume="ECT_EV_CryoStop_inside_basic" rot="  0.; 0.; -90. "/>
+</composition>
+
+<composition  name="ECT_EV_CryoStop_inside" >
+  <posRPhiZ   volume="ECT_EV_CryoStop_inside_tmp" R_Phi_Z=" AECT_EVEPid_EVEndPlateindist - AECT_EVOSio_EVOutShellinneroff - AECT_EVOSit_EVOutShellinnthick; 22.5; -AECT_EVOShZ_EVOutShellholeZwid/2. + AECT_EVOSCZ_EVOutShellConnZwid "/>
+</composition>
+
+<!-- Atlas End-Cap toroid Service Turret - whole construction approximated -->
+<var  name="AECT_SrvTu1Dz_ServTur1Dz"        value="   830." />
+<var  name="AECT_SrvTu1He_ServTur1Height"    value="  2350." />  <!-- original value 2000, modified due to overlap with new ECT-ServiceTower  -->
+<var  name="AECT_SrvTu1oW_ServTur1OutWidth"  value="  1100." />
+<var  name="AECT_SrvTu1iW_ServTur1InnWidth"  value="  1000." />
+<var  name="AECT_SrvTu1Ed_ServTur1Edge"      value="   120." />
+<var  name="AECT_SrvTu2Dz_ServTur2Dz"        value="   900." />
+<var  name="AECT_SrvTu2He_ServTur2Height"    value="  1000." />
+<var  name="AECT_SrvTu2oR_ServTur2OutRad"    value="   150." />
+<var  name="AECT_SrvTu2iR_ServTur2InnRad"    value="   140." />
+<var  name="AECT_SrvTu3Dz_ServTur3Dz"        value="   260." />
+<var  name="AECT_SrvTu3He_ServTur3Height"    value="  3650." />  <!-- original value 4000, modified due to overlap with new ECT-ServiceTower -->
+<var  name="AECT_ServTuZoff_ServTurZoffset"  value="   834." />
+
+
+<!-- Description of the Atlas End-cap Toroid Service Turret -->
+
+<gvxysxy  name="ECT_ServTur1"  material="Aluminium"  dZ="AECT_SrvTu1He_ServTur1Height" >
+  <gvxy_point  X_Y=" AECT_SrvTu1oW_ServTur1OutWidth/2. ; AECT_SrvTu1oW_ServTur1OutWidth/2.-AECT_SrvTu1Ed_ServTur1Edge " />
+  <gvxy_point  X_Y=" AECT_SrvTu1oW_ServTur1OutWidth/2.-AECT_SrvTu1Ed_ServTur1Edge ; AECT_SrvTu1oW_ServTur1OutWidth/2. " />
+</gvxysxy>
+<gvxysxy  name="ECT_ServTur0"  material="Aluminium"  dZ="AECT_SrvTu1He_ServTur1Height" >
+  <gvxy_point  X_Y=" AECT_SrvTu1iW_ServTur1InnWidth/2. ; AECT_SrvTu1iW_ServTur1InnWidth/2.-AECT_SrvTu1Ed_ServTur1Edge*AECT_SrvTu1iW_ServTur1InnWidth/AECT_SrvTu1oW_ServTur1OutWidth " />
+  <gvxy_point  X_Y=" AECT_SrvTu1iW_ServTur1InnWidth/2.-AECT_SrvTu1Ed_ServTur1Edge*AECT_SrvTu1iW_ServTur1InnWidth/AECT_SrvTu1oW_ServTur1OutWidth ; AECT_SrvTu1iW_ServTur1InnWidth/2. " />
+</gvxysxy>
+<subtraction  name="ECT_ServTurA" >
+  <posXYZ  volume="ECT_ServTur1" rot=" 90.; 0.; 0. "/>
+  <posXYZ  volume="ECT_ServTur0" X_Y_Z=" 0. ; -AECT_SrvTu1oW_ServTur1OutWidth+AECT_SrvTu1iW_ServTur1InnWidth ; 0. " rot=" 90.; 0.; 0. "/>
+</subtraction>
+<tubs name="ECT_ServTurB1_base" material="Aluminium"  Rio_Z="AECT_SrvTu2iR_ServTur2InnRad; AECT_SrvTu2oR_ServTur2OutRad; AECT_SrvTu2He_ServTur2Height + AECT_SrvTu2oR_ServTur2OutRad - GENV_Eps"  nbPhi="20" />
+<tubs name="ECT_ServTurB2_base" material="Aluminium"  Rio_Z="AECT_SrvTu2iR_ServTur2InnRad; AECT_SrvTu2oR_ServTur2OutRad; AECT_SrvTu2Dz_ServTur2Dz - AECT_SrvTu3Dz_ServTur3Dz + 2.*AECT_SrvTu2oR_ServTur2OutRad"  nbPhi="20" />
+<tubs name="ECT_ServTurB3_base" material="Aluminium"  Rio_Z="AECT_SrvTu2iR_ServTur2InnRad; AECT_SrvTu2oR_ServTur2OutRad; AECT_SrvTu3He_ServTur3Height + AECT_SrvTu2oR_ServTur2OutRad"  nbPhi="20" />
+<box name="ECT_ServTurB_CutBox"   material="Aluminium"  X_Y_Z="4.*AECT_SrvTu2oR_ServTur2OutRad/GENV_Co45; 4.*AECT_SrvTu2oR_ServTur2OutRad/GENV_Co45; 4.*AECT_SrvTu2oR_ServTur2OutRad/GENV_Co45" />
+<subtraction  name="ECT_ServTurB1" >
+  <posXYZ  volume="ECT_ServTurB1_base" X_Y_Z=" 0. ; (AECT_SrvTu2He_ServTur2Height + AECT_SrvTu2oR_ServTur2OutRad + GENV_Eps)/2. + AECT_SrvTu1He_ServTur1Height/2. ; AECT_SrvTu2Dz_ServTur2Dz-AECT_SrvTu1Dz_ServTur1Dz " rot=" 90.; 0.; 0. "/>
+  <posXYZ  volume="ECT_ServTurB_CutBox" X_Y_Z=" 0. ; AECT_SrvTu2He_ServTur2Height + 2.*AECT_SrvTu2oR_ServTur2OutRad + AECT_SrvTu1He_ServTur1Height/2.; AECT_SrvTu2Dz_ServTur2Dz-AECT_SrvTu1Dz_ServTur1Dz - 2.*AECT_SrvTu2oR_ServTur2OutRad " rot=" 45.; 0.; 0. "/>
+</subtraction>
+<subtraction  name="ECT_ServTurB2" >
+  <posXYZ  volume="ECT_ServTurB2_base" X_Y_Z=" 0. ; AECT_SrvTu2He_ServTur2Height+AECT_SrvTu1He_ServTur1Height/2. ; AECT_SrvTu2Dz_ServTur2Dz-AECT_SrvTu1Dz_ServTur1Dz- (AECT_SrvTu2Dz_ServTur2Dz - AECT_SrvTu3Dz_ServTur3Dz)/2." rot=" 0.; 0.; 0. "/>
+  <posXYZ  volume="ECT_ServTurB_CutBox" X_Y_Z=" 0. ; AECT_SrvTu2He_ServTur2Height+AECT_SrvTu1He_ServTur1Height/2. - 2.*AECT_SrvTu2oR_ServTur2OutRad ; AECT_SrvTu2Dz_ServTur2Dz-AECT_SrvTu1Dz_ServTur1Dz + 2.*AECT_SrvTu2oR_ServTur2OutRad - GENV_Eps/2." rot=" 45.; 0.; 0. "/>
+  <posXYZ  volume="ECT_ServTurB_CutBox" X_Y_Z=" 0. ; AECT_SrvTu2He_ServTur2Height+AECT_SrvTu1He_ServTur1Height/2. + 2.*AECT_SrvTu2oR_ServTur2OutRad ; AECT_SrvTu2Dz_ServTur2Dz-AECT_SrvTu1Dz_ServTur1Dz - (AECT_SrvTu2Dz_ServTur2Dz - AECT_SrvTu3Dz_ServTur3Dz + 2.*AECT_SrvTu2oR_ServTur2OutRad) + GENV_Eps/2." rot=" 45.; 0.; 0. "/>
+</subtraction>
+<subtraction  name="ECT_ServTurB3" >
+  <posXYZ  volume="ECT_ServTurB3_base" X_Y_Z=" 0. ; AECT_SrvTu2He_ServTur2Height+AECT_SrvTu1He_ServTur1Height/2. + (AECT_SrvTu3He_ServTur3Height - AECT_SrvTu2oR_ServTur2OutRad)/2. ; AECT_SrvTu3Dz_ServTur3Dz-AECT_SrvTu1Dz_ServTur1Dz " rot=" 90.; 0.; 0. "/>
+  <posXYZ  volume="ECT_ServTurB_CutBox" X_Y_Z=" 0. ; AECT_SrvTu2He_ServTur2Height+AECT_SrvTu1He_ServTur1Height/2. - 2.*AECT_SrvTu2oR_ServTur2OutRad ; AECT_SrvTu3Dz_ServTur3Dz-AECT_SrvTu1Dz_ServTur1Dz + 2.*AECT_SrvTu2oR_ServTur2OutRad " rot=" 45.; 0.; 0. "/>
+</subtraction>
+<composition  name="ECT_ServTur" >
+  <posXYZ  volume="ECT_ServTurA" />
+  <posXYZ  volume="ECT_ServTurB1" />
+  <posXYZ  volume="ECT_ServTurB2" />
+  <posXYZ  volume="ECT_ServTurB3" />
+</composition>
+
+<!-- new Description of the Atlas End-cap Toroid Service Tower -->
+<!-- Right and Left Leg variables -->
+<var  name="ECST_zwid"                value="    100.0" /> <!-- atltept_0009-v0.pdf --> <!-- atltept_0018-v0.pdf -->
+<var  name="ECST_ywid"                value="   6000.0" /> <!-- atltept_0009-v0.pdf --> <!-- atltept_0018-v0.pdf -->
+<var  name="ECST_RL_xwid"             value="    200. " /> <!-- atltept_0009-v0.pdf -->
+<var  name="ECST_LL_xwid"             value="    100. " /> <!-- atltept_0018-v0.pdf -->
+<var  name="ECST_RL_inner_distanceZ"  value="    270. " /> <!-- atltept_0009-v0.pdf -->
+<var  name="ECST_LL_inner_distanceX"  value="    240. " /> <!-- atltept_0018-v0.pdf -->
+<var  name="ECST_LL_inner_distanceZ"  value="    270. " /> <!-- atltept_0018-v0.pdf -->
+<var  name="ECST_RL_ywid"             value="ECST_ywid" />
+<var  name="ECST_RL_zwid"             value="ECST_zwid" />
+<var  name="ECST_LL_ywid"             value="ECST_ywid" />
+<var  name="ECST_LL_zwid"             value="ECST_zwid" />
+<var  name="ECST_RightLeftLeg_InnerDistanceX"  value="1665.+40." /> <!-- atltept_0014-vAA.pdf (added 40 to match) --> 
+
+<!-- Front Arm variables -->
+<var name="ECST_Front_Bracket23_topwidth" value=" 77.5" /> <!-- approximate 77.5=(440-130)/4 see altept_0014vAA.pdf -->
+<var name="ECST_Front_Hand_width"         value=" 10.0"/>
+<var name="ECST_Front_Hand_pointAX"       value="  0. "/> <!-- atltept_0033-v0.pdf lower right point-->
+<var name="ECST_Front_Hand_pointAY"       value="  0. "/> <!-- atltept_0033-v0.pdf lower right point-->
+<var name="ECST_Front_Hand_Gap"           value=" 10. "/> <!-- atltept_0033-v0.pdf lower right point-->
+<var name="ECST_Front_Bracket_Distance_From_Bottom_Leg" value="2342.5+155+20"/> <!-- atltept_0018-v0.pdf -->
+<var name="ECST_Front_Bracket_Distance_From_Leg"        value="100"/> <!-- approximate, not calculated -->
+<var name="ECST_Front_Bracket_width"                    value="10.0"/> 
+<var name="ECST_Front_Bracket_Connector_to_LLRod_ywid"  value="195"/> <!-- atlept_0018-v0.pdf-->
+<var name="ECST_Front_Hand_pointBX"                    value="ECST_Front_Hand_pointAX-120.0"/>
+<var name="ECST_Front_Hand_pointBY"                    value="ECST_Front_Hand_pointAY"/>
+<var name="ECST_Front_Hand_pointCX"                    value="ECST_Front_Hand_pointAX-195.0"/>
+<var name="ECST_Front_Hand_pointCY"                    value="ECST_Front_Hand_pointAY+287.0"/>
+<var name="ECST_Front_Hand_pointDX"                    value="ECST_Front_Hand_pointAX-76.1"/>
+<var name="ECST_Front_Hand_pointDY"                    value="ECST_Front_Hand_pointAY+394.1"/>
+<var name="ECST_Front_Hand_pointEX"                    value="ECST_Front_Hand_pointAX"/>
+<var name="ECST_Front_Hand_pointEY"                    value="ECST_Front_Hand_pointAY+220.0"/>
+
+<!-- Front bar variables -->
+<var  name="ECST_Front_Bar1_xwid"   value=" 200." />
+<var  name="ECST_Front_Bar2_xwid"   value="1840." />
+<var  name="ECST_Front_Bar3_xwid"   value=" 130." />
+<var  name="ECST_Front_Bar_ywid"    value=" 200." />
+<var  name="ECST_Front_Bar_zwid"    value=" 100." />
+<var  name="ECST_Front_Bar_starty"  value="1107.5" /><!-- atltept_0014-vAA.pdf 1107.5=6977.5-(5807.5+62.5) with respect to the bottom of the right (or) left leg bar-->
+<var  name="ECST_Front_Bar_startz"  value="1192.5" /><!-- atltept_0014-vAA.pdf 1192.5=12373.5-11181  with respect to the right (or)left leg bar (outer surface-->
+<var name="ECST_Front_Bar_xwid"     value="ECST_Front_Bar1_xwid+ECST_Front_Bar2_xwid+ECST_Front_Bar3_xwid+2*ECST_Front_Hand_width"/>
+
+<var name="ECST_vecx_CD" value="ECST_Front_Hand_pointDX-ECST_Front_Hand_pointCX"/>
+<var name="ECST_vecy_CD" value="ECST_Front_Hand_pointDY-ECST_Front_Hand_pointCY"/>
+<var name="ECST_unit_perp_CDx" value="(-ECST_vecy_CD/ECST_vecx_CD)/sqrt((-ECST_vecy_CD/ECST_vecx_CD)**2+1)"/>
+<var name="ECST_unit_perp_CDy" value="(1.)/sqrt((-ECST_vecy_CD/ECST_vecx_CD)**2+1)"/>
+
+<var name="ECST_Front_Bracket_pointCX" value="ECST_Front_Hand_pointCX+GENV_Eps*ECST_unit_perp_CDx"/>
+<var name="ECST_Front_Bracket_pointCY" value="ECST_Front_Hand_pointCY+GENV_Eps*ECST_unit_perp_CDy"/>
+<var name="ECST_Front_Bracket_pointDX" value="ECST_Front_Hand_pointDX+GENV_Eps*ECST_unit_perp_CDx"/>
+<var name="ECST_Front_Bracket_pointDY" value="ECST_Front_Hand_pointDY+GENV_Eps*ECST_unit_perp_CDy"/>
+
+<var name="ECST_Front_Bracket_pointFX" value="ECST_Front_Hand_pointAX-(ECST_Front_Bar_startz+ECST_Front_Hand_Gap)+ECST_Front_Bracket_Distance_From_Leg"/>
+<var name="ECST_Front_Bracket_pointFY" value="ECST_Front_Hand_pointAY+ECST_Front_Bracket_Distance_From_Bottom_Leg-(ECST_Front_Bar_starty-ECST_Front_Hand_Gap)"/> <!-- atltept_0018-v0.pdf -->
+<var name="ECST_Front_Bracket_pointGX" value="ECST_Front_Bracket_pointFX"/>
+<var name="ECST_Front_Bracket_pointGY" value="ECST_Front_Bracket_pointFY+ECST_Front_Bracket_Connector_to_LLRod_ywid"/> 
+
+<var name="ECST_Front_Bracket_pointD1X" value="ECST_Front_Bracket_pointDX+ECST_Front_Bracket_width*((ECST_Front_Bracket_pointCX-ECST_Front_Bracket_pointDX)/sqrt((ECST_Front_Bracket_pointDX-ECST_Front_Bracket_pointCX)**2+(ECST_Front_Bracket_pointDY-ECST_Front_Bracket_pointCY)**2))"/>
+<var name="ECST_Front_Bracket_pointD1Y" value="ECST_Front_Bracket_pointDY+ECST_Front_Bracket_width*((ECST_Front_Bracket_pointCY-ECST_Front_Bracket_pointDY)/sqrt((ECST_Front_Bracket_pointDX-ECST_Front_Bracket_pointCX)**2+(ECST_Front_Bracket_pointDY-ECST_Front_Bracket_pointCY)**2))"/>
+<var name="ECST_Front_Bracket_pointC1X" value="ECST_Front_Bracket_pointCX+ECST_Front_Bracket_width*((ECST_Front_Bracket_pointDX-ECST_Front_Bracket_pointCX)/sqrt((ECST_Front_Bracket_pointDX-ECST_Front_Bracket_pointCX)**2+(ECST_Front_Bracket_pointDY-ECST_Front_Bracket_pointCY)**2))"/>
+<var name="ECST_Front_Bracket_pointC1Y" value="ECST_Front_Bracket_pointCY+ECST_Front_Bracket_width*((ECST_Front_Bracket_pointDY-ECST_Front_Bracket_pointCY)/sqrt((ECST_Front_Bracket_pointDX-ECST_Front_Bracket_pointCX)**2+(ECST_Front_Bracket_pointDY-ECST_Front_Bracket_pointCY)**2))"/>
+
+<var name="ECST_Front_Bracket_pointF1X" value="ECST_Front_Bracket_pointFX"/>
+<var name="ECST_Front_Bracket_pointF1Y" value="ECST_Front_Bracket_pointFY+ECST_Front_Bracket_width"/>
+<var name="ECST_Front_Bracket_pointG1X" value="ECST_Front_Bracket_pointGX"/>
+<var name="ECST_Front_Bracket_pointG1Y" value="ECST_Front_Bracket_pointGY-ECST_Front_Bracket_width"/>
+<var name="ECST_vecx_GD" value="ECST_Front_Bracket_pointGX-ECST_Front_Bracket_pointDX"/>
+<var name="ECST_vecy_GD" value="ECST_Front_Bracket_pointGY-ECST_Front_Bracket_pointCY"/>
+<var name="ECST_unit_perp_GDx" value="(-ECST_vecy_GD/ECST_vecx_GD)/sqrt((-ECST_vecy_GD/ECST_vecx_GD)**2+1)"/>
+<var name="ECST_unit_perp_GDy" value="(1.)/sqrt((-ECST_vecy_GD/ECST_vecx_GD)**2+1)"/>
+
+<var name="ECST_Front_Arm1_widthx" value="ECST_Front_Hand_pointAX-ECST_Front_Bracket_pointGX"/>
+<var name="ECST_Front_Arm1_widthy" value="-ECST_Front_Hand_pointAY+ECST_Front_Bracket_pointGY"/>
+<var name="ECST_Front_Arm1_widthz" value="ECST_Front_Bracket23_topwidth"/>
+<var name="ECST_Front_Arm2_widthx" value="ECST_Front_Hand_pointAX-ECST_Front_Bracket_pointGX"/>
+<var name="ECST_Front_Arm2_widthy" value="-ECST_Front_Hand_pointAY+ECST_Front_Bracket_pointGY"/>
+<var name="ECST_Front_Arm2_widthz" value="ECST_Front_Bracket23_topwidth"/>
+
+<var name="ECST_Bar_Length" value="sqrt((ECST_Front_Bracket_pointG1X-ECST_Front_Bracket_pointD1X)**2+(ECST_Front_Bracket_pointG1Y-ECST_Front_Bracket_pointD1Y)**2)"/>
+
+<!-- Left Leg cover variables -->
+<var name="ECST_cover_thickness"           value="20."/>
+<var name="ECST_cover_dist_rod"            value="30."/>
+<var name="ECST_Left_Leg_HoleBracket_ypos" value="ECST_Front_Bracket_pointF1Y-ECST_ywid/2+ECST_Front_Bar_starty-ECST_Front_Hand_Gap+80"/>
+
+<!-- Left Leg Support Frames variables -->
+<var name="ECST_SupportFrame_dist_rod"  value="30."/>
+<var name="ECST_SupportFrame_Thickness" value="20."/>
+
+<!-- Right Leg Variables -->
+<var name="ECST_SupportFrameA_Height" value="370."/> <!-- altept_0009, altept_0012, altept_0018 -->
+<var name="ECST_SupportFrameB_Height" value="360."/>
+<var name="ECST_SupportFrameC_Height" value="360."/>
+<var name="ECST_SupportFrameD_Height" value="150."/>
+
+<var name="ECST_SupportFrameA_Ypos"     value="ECST_ywid/2-ECST_SupportFrameA_Height/2"/>
+<var name="ECST_SupportFrameA_Ypos_abs" value="ECST_ywid-ECST_SupportFrameA_Height"/> <!-- starting y -->
+<var name="ECST_SupportFrameB_Ypos_abs" value="4060."/> <!-- starting y -->
+<var name="ECST_SupportFrameB_Ypos"     value="ECST_SupportFrameB_Ypos_abs-ECST_ywid/2+ECST_SupportFrameB_Height/2"/>
+<var name="ECST_SupportFrameC_Ypos_abs" value="2343."/> <!-- starting y 2343-->
+<var name="ECST_SupportFrameC_Ypos"     value="ECST_SupportFrameC_Ypos_abs-ECST_ywid/2+ECST_SupportFrameC_Height/2"/>
+<var name="ECST_SupportFrameD_Ypos_abs" value="1108."/> <!-- starting y -->
+<var name="ECST_SupportFrameD_Ypos"     value="ECST_SupportFrameD_Ypos_abs-ECST_ywid/2+ECST_SupportFrameD_Height/2"/>
+
+<!-- Middle Pieces Variables -->
+<var name="ECST_MiddleBarA_ywid"       value=" 160."/> <!-- altept_0022, altept_0023, altept_0024 -->
+<var name="ECST_MiddleBarA_width"      value="  20."/>
+<var name="ECST_MiddleBarA1_ywid"      value="ECST_MiddleBarA_ywid-2*ECST_MiddleBarA_width"/>
+<var name="ECST_MiddleBarA1_zwid"      value="ECST_MiddleBarA_width"/>
+<var name="ECST_MiddleBarA2_xwid"      value="1400."/>
+<var name="ECST_MiddleBarA2_ywid"      value="ECST_MiddleBarA_width"/>
+<var name="ECST_MiddleBarA2_zwid"      value="  50."/>
+<var name="ECST_MiddleBarA1Back_xpos"  value="   0."/>
+<var name="ECST_MiddleBarA1Back_ypos"  value="   0."/>
+<var name="ECST_MiddleBarA1Back_zpos"  value="ECST_MiddleBarA1_zwid/2."/>
+<var name="ECST_MiddleBarA2Back_xpos"  value="   0."/>
+<var name="ECST_MiddleBarA2Back_ypos"  value="(ECST_MiddleBarA1_ywid+ECST_MiddleBarA2_ywid)/2.+GENV_Eps"/>
+<var name="ECST_MiddleBarA2Back_zpos"  value="(ECST_MiddleBarA2_zwid)/2."/>
+<var name="ECST_MiddleBarA1Front_xpos" value="   0."/>
+<var name="ECST_MiddleBarA1Front_ypos" value="   0."/>
+<var name="ECST_MiddleBarA1Front_zpos" value="ECST_RL_inner_distanceZ+2*ECST_RL_zwid+ECST_SupportFrame_dist_rod*2+ECST_SupportFrame_Thickness*2-ECST_MiddleBarA1_zwid/2."/>
+<var name="ECST_MiddleBarA2Front_xpos" value="   0."/>
+<var name="ECST_MiddleBarA2Front_ypos" value="(ECST_MiddleBarA1_ywid+ECST_MiddleBarA2_ywid)/2+GENV_Eps"/>
+<var name="ECST_MiddleBarA2Front_zpos" value="ECST_RL_inner_distanceZ+2*ECST_RL_zwid+ECST_SupportFrame_dist_rod*2+ECST_SupportFrame_Thickness*2-ECST_MiddleBarA2_zwid/2"/>
+<var name="ECST_MiddleBarAFront_ypos"  value="ECST_SupportFrameA_Ypos_abs+ECST_SupportFrameA_Height-ECST_MiddleBarA_ywid/2.-GENV_Eps"/>
+<var name="ECST_MiddleBarABack_ypos"   value="ECST_SupportFrameA_Ypos_abs+ECST_SupportFrameA_Height-ECST_MiddleBarA_ywid/2.-GENV_Eps"/>
+<var name="ECST_MiddleBarALow_ypos"    value="ECST_SupportFrameA_Ypos_abs+ECST_MiddleBarA_ywid/2.+GENV_Eps"/>
+<var name="ECST_MiddleBarB2_xwid"      value="1424."/>
+<var name="ECST_MiddleBarB_ypos"       value="ECST_SupportFrameB_Ypos_abs+ECST_SupportFrameB_Height-ECST_MiddleBarA_ywid/2.-GENV_Eps" />
+<var name="ECST_MiddleBarC2_xwid"      value="1420."/>
+<var name="ECST_MiddleBarC_ypos"       value="ECST_SupportFrameC_Ypos_abs+ECST_SupportFrameC_Height-ECST_MiddleBarA_ywid/2.-GENV_Eps" />
+<var name="ECST_MiddleBarD2_xwid"      value="1420."/>
+<var name="ECST_MiddleBarD_ypos"       value="ECST_SupportFrameD_Ypos_abs+ECST_SupportFrameD_Height-ECST_MiddleBarA_ywid/2.-GENV_Eps" />
+
+<var name="ECST_InclinedBar_width"  value="20."/>
+<var name="ECST_InclinedBar_zwid"   value="50."/>
+<var name="ECST_InclinedBar_ywid"   value="210."/>
+<var name="ECST_InclinedBar_ystart" value="ECST_SupportFrameC_Ypos_abs+ECST_SupportFrameC_Height"/>
+<var name="ECST_InclinedBar_xstart" value="-(ECST_RightLeftLeg_InnerDistanceX-ECST_SupportFrame_Thickness-ECST_SupportFrame_dist_rod-ECST_cover_dist_rod-ECST_cover_thickness)/2.+GENV_Eps"/>
+<var name="ECST_InclinedBar1_p1x"   value="ECST_InclinedBar_xstart"/>
+<var name="ECST_InclinedBar1_p1y"   value="ECST_InclinedBar_ystart+ECST_InclinedBar_width+GENV_Eps"/>
+<var name="ECST_InclinedBar1_p2x"   value="ECST_InclinedBar1_p1x"/>
+<var name="ECST_InclinedBar1_p2y"   value="ECST_InclinedBar_ystart+ECST_InclinedBar_ywid-ECST_InclinedBar_width-GENV_Eps"/>
+<var name="ECST_InclinedBar1_p3x"   value="ECST_InclinedBar_xstart+ECST_RightLeftLeg_InnerDistanceX-(ECST_SupportFrame_dist_rod+ECST_SupportFrame_Thickness)-ECST_cover_thickness-ECST_cover_dist_rod-2.*GENV_Eps"/>
+<var name="ECST_InclinedBar1_p3y"   value="ECST_SupportFrameB_Ypos_abs+ECST_InclinedBar_ywid-ECST_InclinedBar_width-GENV_Eps"/>
+<var name="ECST_InclinedBar1_p4x"   value="ECST_InclinedBar_xstart+ECST_RightLeftLeg_InnerDistanceX-(ECST_SupportFrame_dist_rod+ECST_SupportFrame_Thickness)-ECST_cover_thickness-ECST_cover_dist_rod-2.*GENV_Eps"/>
+<var name="ECST_InclinedBar1_p4y"   value="ECST_SupportFrameB_Ypos_abs+ECST_InclinedBar_width+GENV_Eps"/>
+
+<var name="ECST_InclinedBar2_p1x"   value="ECST_InclinedBar1_p1x"/>
+<var name="ECST_InclinedBar2_p1y"   value="ECST_InclinedBar_ystart+ECST_InclinedBar_ywid-ECST_InclinedBar_width"/>
+<var name="ECST_InclinedBar2_p2x"   value="ECST_InclinedBar1_p2x"/>
+<var name="ECST_InclinedBar2_p2y"   value="ECST_InclinedBar_ystart+ECST_InclinedBar_ywid"/>
+<var name="ECST_InclinedBar2_p3x"   value="ECST_InclinedBar1_p3x"/>
+<var name="ECST_InclinedBar2_p3y"   value="ECST_SupportFrameB_Ypos_abs+ECST_InclinedBar_ywid"/>
+<var name="ECST_InclinedBar2_p4x"   value="ECST_InclinedBar1_p4x"/>
+<var name="ECST_InclinedBar2_p4y"   value="ECST_SupportFrameB_Ypos_abs+ECST_InclinedBar_ywid-ECST_InclinedBar_width"/>
+
+<var name="ECST_InclinedBar3_p1x"   value="ECST_InclinedBar1_p1x"/>
+<var name="ECST_InclinedBar3_p1y"   value="ECST_InclinedBar_ystart"/>
+<var name="ECST_InclinedBar3_p2x"   value="ECST_InclinedBar1_p2x"/>
+<var name="ECST_InclinedBar3_p2y"   value="ECST_InclinedBar_ystart+ECST_InclinedBar_width"/>
+<var name="ECST_InclinedBar3_p3x"   value="ECST_InclinedBar1_p3x"/>
+<var name="ECST_InclinedBar3_p3y"   value="ECST_SupportFrameB_Ypos_abs+ECST_InclinedBar_width"/>
+<var name="ECST_InclinedBar3_p4x"   value="ECST_InclinedBar1_p4x"/>
+<var name="ECST_InclinedBar3_p4y"   value="ECST_SupportFrameB_Ypos_abs"/>
+
+<!-- Front Structure Variables --> <!-- values approximated from photos -->
+<var name="ECST_Front_Frame_ywid"   value="ECST_Bar_Length*0.92"/>
+<var name="ECST_Front_Frame_zwid"   value="ECST_Bar_Length*0.624"/>
+<var name="ECST_Front_Frame_width"  value="26."/>
+<var name="ECST_Front_Frame_xwid"   value="0.5*ECST_LL_inner_distanceX+ECST_LL_xwid+ECST_RightLeftLeg_InnerDistanceX+ECST_RL_xwid*0.5+2*ECST_Front_Frame_width"/>
+<var name="ECST_Front_Frame_xpos"   value="0.5*(-0.5*ECST_LL_inner_distanceX-ECST_LL_xwid+ECST_RL_xwid*0.5)"/>
+<var name="ECST_Front_Frame_ypos"   value="ECST_Front_Bar_starty+ECST_Front_Bar_ywid/2+0.504*ECST_Bar_Length+ECST_Front_Frame_zwid*0.5"/>
+<var name="ECST_Front_Frame_zpos"   value="ECST_LL_inner_distanceZ+2*ECST_LL_zwid+2*ECST_cover_dist_rod+2*ECST_cover_thickness+ECST_Front_Frame_zwid*0.5+GENV_Eps"/>
+<var name="ECST_Front_Glass_xwid"   value="ECST_Front_Frame_xwid-200."/>
+<var name="ECST_Front_Glass_ywid"   value="ECST_Front_Frame_ywid-200."/>
+<var name="ECST_Front_Glass_zwid"   value="20."/>
+<var name="ECST_Front_Frame_UpperPart_ywid" value="5."/>
+
+<var name="ECST_movez" value="ECST_RL_inner_distanceZ/2+ECST_zwid+ECST_cover_thickness+ECST_cover_dist_rod"/>
+<var name="ECST_movey" value="ECST_ywid/2"/>
+
+
+<!-- Right Leg Construction -->
+<box  name="ECST_Right_Leg_SupportFrameAOuter"  material="Aluminium" X_Y_Z="ECST_RL_xwid+ECST_SupportFrame_dist_rod*2+ECST_SupportFrame_Thickness*2; ECST_SupportFrameA_Height;  ECST_RL_inner_distanceZ+2*ECST_RL_zwid+ECST_SupportFrame_dist_rod*2+ECST_SupportFrame_Thickness*2" />
+<box  name="ECST_Right_Leg_SupportFrameAInner"  material="Aluminium" X_Y_Z="ECST_RL_xwid+ECST_SupportFrame_dist_rod*2; ECST_SupportFrameA_Height+20.0 ; ECST_RL_inner_distanceZ+2*ECST_RL_zwid+ECST_SupportFrame_dist_rod*2 " />
+<box  name="ECST_Right_Leg_SupportFrameBOuter"  material="Aluminium" X_Y_Z="ECST_RL_xwid+ECST_SupportFrame_dist_rod*2+ECST_SupportFrame_Thickness*2; ECST_SupportFrameB_Height ;  ECST_RL_inner_distanceZ+2*ECST_RL_zwid+ECST_SupportFrame_dist_rod*2+ECST_SupportFrame_Thickness*2" />
+<box  name="ECST_Right_Leg_SupportFrameBInner"  material="Aluminium" X_Y_Z="ECST_RL_xwid+ECST_SupportFrame_dist_rod*2; ECST_SupportFrameB_Height+20.0 ; ECST_RL_inner_distanceZ+2*ECST_RL_zwid+ECST_SupportFrame_dist_rod*2 " />
+<box  name="ECST_Right_Leg_HoleBracket"  material="Aluminium"  X_Y_Z="ECST_RL_xwid+ECST_SupportFrame_dist_rod*2; 300.;  200." />
+<box  name="ECST_Right_Leg_SupportFrameCOuter"  material="Aluminium" X_Y_Z="ECST_RL_xwid+ECST_SupportFrame_dist_rod*2+ECST_SupportFrame_Thickness*2; ECST_SupportFrameC_Height ;  ECST_RL_inner_distanceZ+2*ECST_RL_zwid+ECST_SupportFrame_dist_rod*2+ECST_SupportFrame_Thickness*2" />
+<box  name="ECST_Right_Leg_SupportFrameCInner"  material="Aluminium" X_Y_Z="ECST_RL_xwid+ECST_SupportFrame_dist_rod*2; ECST_SupportFrameC_Height+20. ; ECST_RL_inner_distanceZ+2*ECST_RL_zwid+ECST_SupportFrame_dist_rod*2 " />
+<box  name="ECST_Right_Leg_SupportFrameDOuter"  material="Aluminium" X_Y_Z="ECST_RL_xwid+ECST_SupportFrame_dist_rod*2+ECST_SupportFrame_Thickness*2; ECST_SupportFrameD_Height;  ECST_RL_inner_distanceZ+2*ECST_RL_zwid+ECST_SupportFrame_dist_rod*2+ECST_SupportFrame_Thickness*2" />
+<box  name="ECST_Right_Leg_SupportFrameDInner"  material="Aluminium" X_Y_Z="ECST_RL_xwid+ECST_SupportFrame_dist_rod*2; ECST_SupportFrameD_Height+20.0 ; ECST_RL_inner_distanceZ+2*ECST_RL_zwid+ECST_SupportFrame_dist_rod*2 " />
+
+<subtraction  name="ECST_Right_Leg_SupportFrameA" >
+  <posXYZ  volume="ECST_Right_Leg_SupportFrameAOuter" />
+  <posXYZ  volume="ECST_Right_Leg_SupportFrameAInner" />
+</subtraction>
+<subtraction  name="ECST_Right_Leg_SupportFrameB" >
+  <posXYZ  volume="ECST_Right_Leg_SupportFrameBOuter" />
+  <posXYZ  volume="ECST_Right_Leg_SupportFrameBInner" />
+</subtraction>
+<subtraction  name="ECST_Right_Leg_SupportFrameC" >
+  <posXYZ  volume="ECST_Right_Leg_SupportFrameCOuter" />
+  <posXYZ  volume="ECST_Right_Leg_SupportFrameCInner" />
+  <posXYZ  volume="ECST_Right_Leg_HoleBracket"   X_Y_Z=" 0.; 50.;(ECST_LL_inner_distanceZ/2+ECST_LL_zwid+ECST_cover_dist_rod+ECST_cover_thickness/2) " />
+</subtraction>
+<subtraction  name="ECST_Right_Leg_SupportFrameD" >
+  <posXYZ  volume="ECST_Right_Leg_SupportFrameDOuter" />
+  <posXYZ  volume="ECST_Right_Leg_SupportFrameDInner" />
+</subtraction>
+
+<box  name="ECST_Right_Leg_Rod"  material="Aluminium"  X_Y_Z="ECST_RL_xwid; ECST_RL_ywid ;  ECST_RL_zwid" />
+<composition  name="ECST_Right_Leg" >
+  <posXYZ  volume="ECST_Right_Leg_Rod"                 X_Y_Z="0. ; 0. ;  ECST_RL_zwid/2+ECST_RL_inner_distanceZ/2" />
+  <posXYZ  volume="ECST_Right_Leg_Rod"                  X_Y_Z="0. ; 0. ; -ECST_RL_zwid/2-ECST_RL_inner_distanceZ/2" />
+  <posXYZ  volume="ECST_Right_Leg_SupportFrameA"       X_Y_Z="0.;ECST_SupportFrameA_Ypos; 0."  />
+  <posXYZ  volume="ECST_Right_Leg_SupportFrameB"       X_Y_Z="0.;ECST_SupportFrameB_Ypos; 0."  />
+  <posXYZ  volume="ECST_Right_Leg_SupportFrameC"       X_Y_Z="0.;ECST_SupportFrameC_Ypos; 0."  />
+  <posXYZ  volume="ECST_Right_Leg_SupportFrameD"       X_Y_Z="0.;ECST_SupportFrameD_Ypos; 0."  />
+</composition>
+
+<!-- Left Leg Construction -->
+<box  name="ECST_Left_Leg_Rod"          material="Aluminium"  X_Y_Z="ECST_LL_xwid; ECST_LL_ywid ;  ECST_LL_zwid" />
+<box  name="ECST_Left_Leg_coverouter"   material="Aluminium"  X_Y_Z="ECST_LL_inner_distanceX+2*ECST_LL_xwid+ECST_cover_dist_rod*2+ECST_cover_thickness*2; ECST_ywid ;  ECST_LL_inner_distanceZ+2*ECST_LL_zwid+ECST_cover_dist_rod*2+ECST_cover_thickness*2" />
+<box  name="ECST_Left_Leg_coverinner"   material="Aluminium"  X_Y_Z="ECST_LL_inner_distanceX+2*ECST_LL_xwid+ECST_cover_dist_rod*2; ECST_ywid + 2.*GENV_Eps;  ECST_LL_inner_distanceZ+2*ECST_LL_zwid+ECST_cover_dist_rod*2" />
+<box  name="ECST_Left_Leg_HoleBracket"  material="Aluminium"  X_Y_Z="300.; 300.;  200." />
+
+<subtraction  name="ECST_Left_Leg_cover" >
+  <posXYZ  volume="ECST_Left_Leg_coverouter"  />
+  <posXYZ  volume="ECST_Left_Leg_coverinner"  />
+  <posXYZ  volume="ECST_Left_Leg_HoleBracket"   X_Y_Z=" 0.; ECST_Left_Leg_HoleBracket_ypos;(ECST_LL_inner_distanceZ/2+ECST_LL_zwid+ECST_cover_dist_rod+ECST_cover_thickness/2) " />
+</subtraction>
+<composition  name="ECST_Left_Leg" >
+  <posXYZ  volume="ECST_Left_Leg_cover"  />
+  <posXYZ  volume="ECST_Left_Leg_Rod"   X_Y_Z="-ECST_LL_xwid/2.-ECST_LL_inner_distanceX/2.; 0.; ECST_LL_zwid/2.+ECST_LL_inner_distanceZ/2." />
+  <posXYZ  volume="ECST_Left_Leg_Rod"   X_Y_Z="-ECST_LL_xwid/2.-ECST_LL_inner_distanceX/2.; 0.; -ECST_LL_zwid/2.-ECST_LL_inner_distanceZ/2."  />
+  <posXYZ  volume="ECST_Left_Leg_Rod"   X_Y_Z="ECST_LL_xwid/2.+ECST_LL_inner_distanceX/2.; 0.; -ECST_LL_zwid/2.-ECST_LL_inner_distanceZ/2."  />
+  <posXYZ  volume="ECST_Left_Leg_Rod"   X_Y_Z="ECST_LL_xwid/2.+ECST_LL_inner_distanceX/2.; 0.; ECST_LL_zwid/2.+ECST_LL_inner_distanceZ/2." />
+</composition>
+
+<!-- Middle Pieces Construction -->
+<box name="ECST_MiddleBarA1"  material="Aluminium"  X_Y_Z="ECST_RightLeftLeg_InnerDistanceX-(ECST_SupportFrame_dist_rod+ECST_SupportFrame_Thickness)-ECST_cover_thickness-ECST_cover_dist_rod-2*GENV_Eps;ECST_MiddleBarA1_ywid-2.*GENV_Eps ;  ECST_MiddleBarA1_zwid" />
+<box name="ECST_MiddleBarA2"  material="Aluminium"  X_Y_Z="ECST_MiddleBarA2_xwid;ECST_MiddleBarA2_ywid;ECST_MiddleBarA2_zwid" />
+<box name="ECST_MiddleBarB2"  material="Aluminium"  X_Y_Z="ECST_MiddleBarB2_xwid;ECST_MiddleBarA2_ywid;ECST_MiddleBarA2_zwid" />
+<box name="ECST_MiddleBarC2"  material="Aluminium"  X_Y_Z="ECST_MiddleBarC2_xwid;ECST_MiddleBarA2_ywid;ECST_MiddleBarA2_zwid" />
+<box name="ECST_MiddleBarD2"  material="Aluminium"  X_Y_Z="ECST_MiddleBarD2_xwid;ECST_MiddleBarA2_ywid;ECST_MiddleBarA2_zwid" />
+
+<composition  name="ECST_MiddleBars" >
+  <posXYZ  volume="ECST_MiddleBarA1"        X_Y_Z="ECST_MiddleBarA1Front_xpos;ECST_MiddleBarAFront_ypos+ECST_MiddleBarA1Front_ypos;ECST_MiddleBarA1Front_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarA2"        X_Y_Z="ECST_MiddleBarA2Front_xpos;ECST_MiddleBarAFront_ypos+ECST_MiddleBarA2Front_ypos; ECST_MiddleBarA2Front_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarA2"        X_Y_Z="ECST_MiddleBarA2Front_xpos;ECST_MiddleBarAFront_ypos-ECST_MiddleBarA2Front_ypos; ECST_MiddleBarA2Front_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarA1"        X_Y_Z="ECST_MiddleBarA1Back_xpos;ECST_MiddleBarAFront_ypos+ECST_MiddleBarA1Back_ypos;ECST_MiddleBarA1Back_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarA2"        X_Y_Z="ECST_MiddleBarA2Back_xpos;ECST_MiddleBarAFront_ypos+ECST_MiddleBarA2Back_ypos; ECST_MiddleBarA2Back_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarA2"        X_Y_Z="ECST_MiddleBarA2Back_xpos;ECST_MiddleBarAFront_ypos-1.*ECST_MiddleBarA2Back_ypos; ECST_MiddleBarA2Back_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarA1"        X_Y_Z="ECST_MiddleBarA1Front_xpos;ECST_MiddleBarB_ypos+ECST_MiddleBarA1Front_ypos;ECST_MiddleBarA1Front_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarB2"        X_Y_Z="ECST_MiddleBarA2Front_xpos;ECST_MiddleBarB_ypos+ECST_MiddleBarA2Front_ypos; ECST_MiddleBarA2Front_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarB2"        X_Y_Z="ECST_MiddleBarA2Front_xpos;ECST_MiddleBarB_ypos-ECST_MiddleBarA2Front_ypos; ECST_MiddleBarA2Front_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarA1"        X_Y_Z="ECST_MiddleBarA1Back_xpos;ECST_MiddleBarB_ypos+ECST_MiddleBarA1Back_ypos;ECST_MiddleBarA1Back_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarB2"        X_Y_Z="ECST_MiddleBarA2Back_xpos;ECST_MiddleBarB_ypos+ECST_MiddleBarA2Back_ypos; ECST_MiddleBarA2Back_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarB2"        X_Y_Z="ECST_MiddleBarA2Back_xpos;ECST_MiddleBarB_ypos-1.*ECST_MiddleBarA2Back_ypos; ECST_MiddleBarA2Back_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarA1"        X_Y_Z="ECST_MiddleBarA1Front_xpos;ECST_MiddleBarC_ypos+ECST_MiddleBarA1Front_ypos;ECST_MiddleBarA1Front_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarC2"        X_Y_Z="ECST_MiddleBarA2Front_xpos;ECST_MiddleBarC_ypos+ECST_MiddleBarA2Front_ypos; ECST_MiddleBarA2Front_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarC2"        X_Y_Z="ECST_MiddleBarA2Front_xpos;ECST_MiddleBarC_ypos-ECST_MiddleBarA2Front_ypos; ECST_MiddleBarA2Front_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarA1"        X_Y_Z="ECST_MiddleBarA1Back_xpos;ECST_MiddleBarC_ypos+ECST_MiddleBarA1Back_ypos;ECST_MiddleBarA1Back_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarC2"        X_Y_Z="ECST_MiddleBarA2Back_xpos;ECST_MiddleBarC_ypos+ECST_MiddleBarA2Back_ypos; ECST_MiddleBarA2Back_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarC2"        X_Y_Z="ECST_MiddleBarA2Back_xpos;ECST_MiddleBarC_ypos-1.*ECST_MiddleBarA2Back_ypos; ECST_MiddleBarA2Back_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarA1"        X_Y_Z="ECST_MiddleBarA1Back_xpos;ECST_MiddleBarD_ypos+ECST_MiddleBarA1Back_ypos;ECST_MiddleBarA1Back_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarD2"        X_Y_Z="ECST_MiddleBarA2Back_xpos;ECST_MiddleBarD_ypos+ECST_MiddleBarA2Back_ypos; ECST_MiddleBarA2Back_zpos"  />
+  <posXYZ  volume="ECST_MiddleBarD2"        X_Y_Z="ECST_MiddleBarA2Back_xpos;ECST_MiddleBarD_ypos-1.*ECST_MiddleBarA2Back_ypos; ECST_MiddleBarA2Back_zpos"  />
+</composition>
+
+<gvxy  name="ECST_InclinedBar1"  material="Aluminium"  dZ="ECST_InclinedBar_width" >
+  <gvxy_point  X_Y="ECST_InclinedBar1_p1x;ECST_InclinedBar1_p1y" />
+  <gvxy_point  X_Y="ECST_InclinedBar1_p2x;ECST_InclinedBar1_p2y" />
+  <gvxy_point  X_Y="ECST_InclinedBar1_p3x;ECST_InclinedBar1_p3y" />
+  <gvxy_point  X_Y="ECST_InclinedBar1_p4x;ECST_InclinedBar1_p4y" />
+</gvxy>
+<gvxy  name="ECST_InclinedBar2"  material="Aluminium"  dZ="ECST_InclinedBar_zwid" >
+  <gvxy_point  X_Y="ECST_InclinedBar2_p1x;ECST_InclinedBar2_p1y" />
+  <gvxy_point  X_Y="ECST_InclinedBar2_p2x;ECST_InclinedBar2_p2y" />
+  <gvxy_point  X_Y="ECST_InclinedBar2_p3x;ECST_InclinedBar2_p3y" />
+  <gvxy_point  X_Y="ECST_InclinedBar2_p4x;ECST_InclinedBar2_p4y" />
+</gvxy>
+<gvxy  name="ECST_InclinedBar3"  material="Aluminium"  dZ="ECST_InclinedBar_zwid" >
+  <gvxy_point  X_Y="ECST_InclinedBar3_p1x;ECST_InclinedBar3_p1y" />
+  <gvxy_point  X_Y="ECST_InclinedBar3_p2x;ECST_InclinedBar3_p2y" />
+  <gvxy_point  X_Y="ECST_InclinedBar3_p3x;ECST_InclinedBar3_p3y" />
+  <gvxy_point  X_Y="ECST_InclinedBar3_p4x;ECST_InclinedBar3_p4y" />
+</gvxy>
+<composition  name="ECST_InclinedBar" >
+  <posXYZ  volume="ECST_InclinedBar1"        X_Y_Z="0. ; 0. ; ECST_InclinedBar_width/2."  />
+  <posXYZ  volume="ECST_InclinedBar2"        X_Y_Z="0. ; 0. ; ECST_InclinedBar_zwid/2."  />
+  <posXYZ  volume="ECST_InclinedBar3"        X_Y_Z="0. ; 0. ; ECST_InclinedBar_zwid/2."  />
+  <posXYZ  volume="ECST_InclinedBar1"        X_Y_Z="0. ; 0. ; 2*ECST_movez-ECST_InclinedBar_width/2."  />
+  <posXYZ  volume="ECST_InclinedBar2"        X_Y_Z="0. ; 0. ; 2*ECST_movez-ECST_InclinedBar_zwid/2."  />
+  <posXYZ  volume="ECST_InclinedBar3"        X_Y_Z="0. ; 0. ; 2*ECST_movez-ECST_InclinedBar_zwid/2."  />
+</composition>
+
+<!-- Front frame Construction (from photos) -->
+<box  name="ECST_Front_Frame_Outer"  material="Aluminium"  X_Y_Z="ECST_Front_Frame_xwid; ECST_Front_Frame_ywid ;  ECST_Front_Frame_zwid" />
+<box  name="ECST_Front_Frame_Inner4"  material="Aluminium"  X_Y_Z="ECST_Front_Frame_xwid-2*ECST_Front_Frame_width; ECST_Front_Frame_ywid/2. ;  ECST_Front_Frame_zwid/2." />
+<box  name="ECST_Front_Frame_Inner1"  material="Aluminium"  X_Y_Z="ECST_Front_Frame_xwid-2*ECST_Front_Frame_width; ECST_Front_Frame_ywid-2*ECST_Front_Frame_width ;  ECST_Front_Frame_zwid+200" />
+<box  name="ECST_Front_Frame_Inner2"  material="Aluminium"  X_Y_Z="ECST_Front_Frame_xwid+200; ECST_Front_Frame_ywid-2*ECST_Front_Frame_width ;  ECST_Front_Frame_zwid-2*ECST_Front_Frame_width" />
+<box  name="ECST_Front_Frame_Inner3"  material="Aluminium"  X_Y_Z="ECST_Front_Frame_xwid-2*ECST_Front_Frame_width; ECST_Front_Frame_ywid;  ECST_Front_Frame_zwid-2*ECST_Front_Frame_width" />
+<subtraction  name="ECST_Front_Structure" >
+  <posXYZ  volume="ECST_Front_Frame_Outer"   />
+  <posXYZ  volume="ECST_Front_Frame_Inner1"  />
+  <posXYZ  volume="ECST_Front_Frame_Inner2"  />
+  <posXYZ  volume="ECST_Front_Frame_Inner3"  X_Y_Z="0.;-ECST_Front_Frame_UpperPart_ywid;0."  />
+  <posXYZ  volume="ECST_Front_Frame_Inner4"  X_Y_Z="0.;- ECST_Front_Frame_ywid/2.;- ECST_Front_Frame_zwid/2."  />
+</subtraction>
+
+<box  name="ECST_Front_Glass_Outer"  material="std::Polyethylene"  X_Y_Z="ECST_Front_Glass_xwid; ECST_Front_Glass_ywid ;  ECST_Front_Glass_zwid" />
+<composition  name="ECST_Front_Glass" >
+  <posXYZ  volume="ECST_Front_Structure"   X_Y_Z="0.; 0.; -2.*GENV_Eps " />
+  <posXYZ  volume="ECST_Front_Glass_Outer" X_Y_Z="0.;0.;0.5*ECST_Front_Frame_zwid+20."  />
+</composition>
+
+
+<!-- Front Bar Construction from  atltept_0033-v0.pdf -->
+<box  name="ECST_Front_Bar1"  material="Aluminium"  X_Y_Z="ECST_Front_Bar1_xwid-GENV_Eps; ECST_Front_Bar_ywid ;  ECST_Front_Bar_zwid" />
+<box  name="ECST_Front_Bar2"  material="Aluminium"  X_Y_Z="ECST_Front_Bar2_xwid-GENV_Eps; ECST_Front_Bar_ywid ;  ECST_Front_Bar_zwid" />
+<box  name="ECST_Front_Bar3"  material="Aluminium"  X_Y_Z="ECST_Front_Bar3_xwid-GENV_Eps; ECST_Front_Bar_ywid ;  ECST_Front_Bar_zwid" />
+<composition  name="ECST_Front_Bar" >
+  <posXYZ  volume="ECST_Front_Bar1"        X_Y_Z="ECST_Front_Bar_xwid/2-ECST_Front_Bar1_xwid/2;0.;0."  />
+  <posXYZ  volume="ECST_Front_Bar2"        X_Y_Z="ECST_Front_Bar_xwid/2-ECST_Front_Bar1_xwid-ECST_Front_Hand_width-ECST_Front_Bar2_xwid/2;0.;0." />
+  <posXYZ  volume="ECST_Front_Bar3"        X_Y_Z="ECST_Front_Bar_xwid/2-ECST_Front_Bar1_xwid-2*ECST_Front_Hand_width-ECST_Front_Bar2_xwid-ECST_Front_Bar3_xwid/2;0.;0."  />
+</composition>
+<!-- Arm Construction -->
+<!--                    ECST_Front_Hand -->
+<gvxy  name="ECST_Front_Hand"  material="Aluminium"  dZ="ECST_Front_Hand_width" >
+  <gvxy_point  X_Y="ECST_Front_Hand_pointAX ; ECST_Front_Hand_pointAY " />
+  <gvxy_point  X_Y="ECST_Front_Hand_pointBX ; ECST_Front_Hand_pointBY " />
+  <gvxy_point  X_Y="ECST_Front_Hand_pointCX ; ECST_Front_Hand_pointCY " />
+  <gvxy_point  X_Y="ECST_Front_Hand_pointDX ; ECST_Front_Hand_pointDY " />
+  <gvxy_point  X_Y="ECST_Front_Hand_pointEX ; ECST_Front_Hand_pointEY " />
+</gvxy>
+<!--                    ECST_Front_Bracket -->
+<gvxy  name="ECST_Front_Bracket1"  material="Aluminium"  dZ="ECST_Front_Bracket_width" >
+  <gvxy_point  X_Y="ECST_Front_Bracket_pointD1X ; ECST_Front_Bracket_pointD1Y " /> 
+  <gvxy_point  X_Y="ECST_Front_Bracket_pointC1X ; ECST_Front_Bracket_pointC1Y " /> 
+  <gvxy_point  X_Y="ECST_Front_Bracket_pointF1X ; ECST_Front_Bracket_pointF1Y " />
+  <gvxy_point  X_Y="ECST_Front_Bracket_pointF1X-ECST_Front_Bracket_Distance_From_Leg+GENV_Eps ; ECST_Front_Bracket_pointF1Y " /> 
+  <gvxy_point  X_Y="ECST_Front_Bracket_pointG1X-ECST_Front_Bracket_Distance_From_Leg+GENV_Eps ; ECST_Front_Bracket_pointG1Y " /> 
+  <gvxy_point  X_Y="ECST_Front_Bracket_pointG1X ; ECST_Front_Bracket_pointG1Y " />
+</gvxy>
+<gvxy  name="ECST_Front_Bracket2"  material="Aluminium"  dZ="ECST_Front_Bracket23_topwidth" > 
+  <gvxy_point  X_Y="ECST_Front_Bracket_pointDX+GENV_Eps*ECST_unit_perp_GDx ; ECST_Front_Bracket_pointDY+GENV_Eps*ECST_unit_perp_GDy " />
+  <gvxy_point  X_Y="ECST_Front_Bracket_pointD1X+GENV_Eps*ECST_unit_perp_GDx ; ECST_Front_Bracket_pointD1Y+GENV_Eps*ECST_unit_perp_GDy " />
+  <gvxy_point  X_Y="ECST_Front_Bracket_pointG1X+GENV_Eps*ECST_unit_perp_GDx ; ECST_Front_Bracket_pointG1Y+GENV_Eps*ECST_unit_perp_GDy " />
+  <gvxy_point  X_Y="ECST_Front_Bracket_pointGX+GENV_Eps*ECST_unit_perp_GDx ; ECST_Front_Bracket_pointGY+GENV_Eps*ECST_unit_perp_GDy " />
+</gvxy>
+<gvxy  name="ECST_Front_Bracket3"  material="Aluminium"  dZ="ECST_Front_Bracket23_topwidth" >
+  <gvxy_point  X_Y="ECST_Front_Bracket_pointC1X-GENV_Eps*ECST_unit_perp_GDx ; ECST_Front_Bracket_pointC1Y-GENV_Eps*ECST_unit_perp_GDy " />
+  <gvxy_point  X_Y="ECST_Front_Bracket_pointCX-GENV_Eps*ECST_unit_perp_GDx ; ECST_Front_Bracket_pointCY-GENV_Eps*ECST_unit_perp_GDy " />
+  <gvxy_point  X_Y="ECST_Front_Bracket_pointFX-GENV_Eps*ECST_unit_perp_GDx ; ECST_Front_Bracket_pointFY-GENV_Eps*ECST_unit_perp_GDy " />
+  <gvxy_point  X_Y="ECST_Front_Bracket_pointF1X-GENV_Eps*ECST_unit_perp_GDx ; ECST_Front_Bracket_pointF1Y-GENV_Eps*ECST_unit_perp_GDy " />
+</gvxy>
+<!--                    ECST_Front_Arm -->
+<composition name="ECST_Front_Arm1">
+  <posXYZ volume="ECST_Front_Hand"  />
+  <posXYZ volume="ECST_Front_Bracket1"  />
+  <posXYZ volume="ECST_Front_Bracket2" X_Y_Z="0.;0.;ECST_Front_Bracket23_topwidth/2"  />
+  <posXYZ volume="ECST_Front_Bracket3" X_Y_Z="0.;0.;ECST_Front_Bracket23_topwidth/2"  />
+</composition>
+<composition name="ECST_Front_Arm2">
+  <posXYZ volume="ECST_Front_Hand"  />
+  <posXYZ volume="ECST_Front_Bracket1"  />
+  <posXYZ volume="ECST_Front_Bracket2" X_Y_Z="0.;0.;-ECST_Front_Bracket23_topwidth/2"  />
+  <posXYZ volume="ECST_Front_Bracket3" X_Y_Z="0.;0.;-ECST_Front_Bracket23_topwidth/2"  />
+</composition>
+<!--                    ECST_Front -->
+<composition name="ECST_Front">
+  <posXYZ volume="ECST_Front_Bar"  />
+  <posXYZ volume="ECST_Front_Arm1" X_Y_Z="ECST_Front_Bar_xwid/2-ECST_Front_Bar1_xwid-ECST_Front_Hand_width/2;-ECST_Front_Bar_ywid/2-ECST_Front_Hand_Gap;ECST_Front_Bar_zwid/2+ECST_Front_Hand_Gap"  rot="0.;-90.;0." /> 
+  <posXYZ volume="ECST_Front_Arm1" X_Y_Z="-ECST_Front_Bar_xwid/2-ECST_Front_Hand_width/2;-ECST_Front_Bar_ywid/2-ECST_Front_Hand_Gap;ECST_Front_Bar_zwid/2+ECST_Front_Hand_Gap"  rot="0.;-90.;0." /> 
+  <posXYZ volume="ECST_Front_Arm2" X_Y_Z="ECST_Front_Bar_xwid/2+ECST_Front_Hand_width/2;-ECST_Front_Bar_ywid/2-ECST_Front_Hand_Gap;ECST_Front_Bar_zwid/2+ECST_Front_Hand_Gap"  rot="0.;-90.;0." /> 
+  <posXYZ volume="ECST_Front_Arm2" X_Y_Z="-ECST_Front_Bar_xwid/2+ECST_Front_Bar3_xwid+ECST_Front_Hand_width/2;-ECST_Front_Bar_ywid/2-ECST_Front_Hand_Gap;ECST_Front_Bar_zwid/2+ECST_Front_Hand_Gap"  rot="0.;-90.;0." /> 
+</composition>
+
+<composition  name="ECT_ServiceTower" >
+  <posXYZ  volume="ECST_Right_Leg"        X_Y_Z="ECST_RL_xwid/2.+ECST_RightLeftLeg_InnerDistanceX/2.; ECST_movey; ECST_movez"  />
+  <posXYZ  volume="ECST_Left_Leg"         X_Y_Z="-ECST_LL_inner_distanceX/2-ECST_LL_xwid-ECST_RightLeftLeg_InnerDistanceX/2.; ECST_movey; ECST_movez"  />
+  <posXYZ  volume="ECST_MiddleBars"   />
+  <posXYZ  volume="ECST_InclinedBar"  />
+  <posXYZ  volume="ECST_Front"     X_Y_Z="ECST_RightLeftLeg_InnerDistanceX/2+ECST_RL_xwid-ECST_Front_Bar_xwid/2; ECST_Front_Bar_starty-ECST_ywid/2+ECST_Front_Bar_ywid/2+ECST_movey; ECST_Front_Bar_startz+ECST_zwid+ECST_RL_inner_distanceZ/2-ECST_Front_Bar_zwid/2+ECST_movez"  />
+  <posXYZ  volume="ECST_Front_Glass"     X_Y_Z="ECST_Front_Frame_xpos;ECST_Front_Frame_ypos;ECST_Front_Frame_zpos"  />
+</composition>
+
+<var  name="ECST_SToDzBot"  value="1650." /> <!-- atczte__0002-vAB 14-JUL-2006 -->
+<var  name="ECST_SToThic2"  value="  50."/>
+<var  name="ECST_SToYpos"   value="5800." /> <!-- atczte__0002-vAB 14-JUL-2006 -->
+
+<var  name="AECT_SupInnWheel_Thickness"     value="   20. "/>
+<var  name="AECT_SupInnWheel_Distance"      value="  390. "/>
+<var  name="AECT_SupInnWheel_SideDY"        value="  160. "/>
+<var  name="AECT_SupInnWheel_SideDZ"        value=" 3010. "/>
+<var  name="AECT_SupInnWheel_PlateDZ"       value="  160. "/>
+<var  name="AECT_SupInnWheel_Yoff"          value="   88. "/>
+
+<var  name="AECT_SupOutWheel_Thickness"     value="   71. "/>
+<var  name="AECT_SupOutWheel_DY"            value="  446. "/>
+<var  name="AECT_SupOutWheel_XPosInn"       value=" 2575. "/>
+<var  name="AECT_SupOutWheel_XPosOut"       value=" 3434. "/>
+
+<var  name="AECT_SupWheel_AirPadSup_addDY"  value="  150. "/>
+<var  name="AECT_SupWheel_AirPadSup_relZ"   value=" 1330. "/>
+
+<var  name="AECT_SupWheel_AirPad_Rad"       value="  350. "/>
+<var  name="AECT_SupWheel_AirPad_Hight"     value="  125. "/>
+
+<var  name="AECT_SupWheel_dxJackBox_DX"     value="  555. "/>
+<var  name="AECT_SupWheel_dyJackBox_DY"     value="  110. "/>
+<var  name="AECT_SupWheel_dzJackBox_DZ"     value="  275. "/>
+<var  name="AECT_SupWheel_Jack_AbsXPos"     value=" 3045. "/>
+<var  name="AECT_SupWheel_Jack_DiffXPos"    value="  230. "/>
+<var  name="AECT_SupWheel_Jack_Radius"      value="   80. "/>
+<var  name="AECT_SupWheel_Jack_Hight"       value="  280. "/>
+<var  name="AECT_SupWheel_SpecBox_DZ"       value=" 2500. "/>
+
+<var  name="AECT_SupWheel_YPos"             value="-3945. "/>
+
+<array  name="AECT_SupInnWheel_PlatePos"    values=" 350. ; 852. ; 1425. ; 1998. " />
+
+<box  name="ECT_SupInnWheel_Side"   material="Aluminium"  X_Y_Z=" AECT_SupInnWheel_Thickness ; AECT_SupInnWheel_SideDY ; AECT_SupInnWheel_SideDZ " />
+<box  name="ECT_SupInnWheel_Plate"  material="Aluminium"  X_Y_Z=" AECT_SupInnWheel_Distance - 2.*AECT_SupInnWheel_Thickness ; AECT_SupInnWheel_Thickness ; AECT_SupInnWheel_PlateDZ " />
+<box  name="ECT_SupOutWheel"        material="Aluminium"  X_Y_Z=" AECT_SupOutWheel_Thickness ; AECT_SupOutWheel_DY ; AECT_EVOShZ_EVOutShellholeZwid - 2.*AECT_EVOSCZ_EVOutShellConnZwid " />
+<box  name="ECT_SupWheel_AirPadSup" material="Iron"       X_Y_Z=" AECT_SupInnWheel_Distance - 2.*AECT_SupInnWheel_Thickness; AECT_SupInnWheel_SideDY+AECT_SupWheel_AirPadSup_addDY; 2.*(AECT_SupWheel_AirPadSup_relZ-AECT_SupInnWheel_SideDZ/2+AECT_SupInnWheel_PlatePos[0])"/>
+<tubs name="ECT_SupWheel_AirPad"    material="Iron"       Rio_Z=" 0. ; AECT_SupWheel_AirPad_Rad ; AECT_SupWheel_AirPad_Hight"/>
+<box  name="ECT_SupWheel_JackBox"   material="Iron"       X_Y_Z="AECT_SupWheel_dxJackBox_DX; AECT_SupWheel_dyJackBox_DY; AECT_SupWheel_dzJackBox_DZ"/> 
+<tubs name="ECT_SupWheel_Jack"      material="Iron"       Rio_Z=" 0. ; AECT_SupWheel_Jack_Radius ; AECT_SupWheel_Jack_Hight"/>
+<box  name="ECT_SupWheel_SpecBox"   material="Aluminium"  X_Y_Z="AECT_SupInnWheel_SideDY; AECT_SupInnWheel_SideDY; AECT_SupWheel_SpecBox_DZ"/>
+
+<composition  name="ECT_SupWheel_basic">
+  <posXYZ  volume="ECT_SupOutWheel"        X_Y_Z=" (AECT_SupOutWheel_XPosOut-AECT_SupOutWheel_XPosInn+AECT_SupOutWheel_Thickness)/2.; -AECT_SupOutWheel_DY/2. ; 0. "  />
+  <posXYZ  volume="ECT_SupOutWheel"        X_Y_Z="-(AECT_SupOutWheel_XPosOut-AECT_SupOutWheel_XPosInn+AECT_SupOutWheel_Thickness)/2.; -AECT_SupOutWheel_DY/2. ; 0. "  />
+  <posXYZ  volume="ECT_SupInnWheel_Side"   X_Y_Z=" (AECT_SupInnWheel_Distance-AECT_SupInnWheel_Thickness)/2.; -AECT_SupInnWheel_SideDY/2.-AECT_SupInnWheel_Yoff ; 0. "  />
+  <posXYZ  volume="ECT_SupInnWheel_Side"   X_Y_Z="-(AECT_SupInnWheel_Distance-AECT_SupInnWheel_Thickness)/2.; -AECT_SupInnWheel_SideDY/2.-AECT_SupInnWheel_Yoff ; 0. "  />
+  <foreach  index="Irib"  begin="1"  loops="3" >
+    <posXYZ  volume="ECT_SupInnWheel_Plate"      X_Y_Z=" 0.; -AECT_SupInnWheel_SideDY/2.-AECT_SupInnWheel_Yoff; -(AECT_SupInnWheel_SideDZ-AECT_SupInnWheel_PlateDZ)/2.+AECT_SupInnWheel_PlatePos[Irib]" />
+  </foreach>
+  <posXYZ  volume="ECT_SupInnWheel_Plate"  X_Y_Z="0.; (AECT_SupInnWheel_SideDY-AECT_SupInnWheel_Thickness)/2.-AECT_SupInnWheel_SideDY/2.-AECT_SupInnWheel_Yoff; -(AECT_SupInnWheel_SideDZ-AECT_SupInnWheel_PlateDZ)/2.+AECT_SupInnWheel_PlatePos[0] " />
+  <posXYZ  volume="ECT_SupInnWheel_Plate"  X_Y_Z="0.; (AECT_SupInnWheel_SideDY-AECT_SupInnWheel_Thickness)/2.-AECT_SupInnWheel_SideDY/2.-AECT_SupInnWheel_Yoff;  (AECT_SupInnWheel_SideDZ-AECT_SupInnWheel_PlateDZ)/2.-AECT_SupInnWheel_PlatePos[0] " />
+  <posXYZ  volume="ECT_SupWheel_AirPadSup" X_Y_Z="0.; -(AECT_SupInnWheel_SideDY+AECT_SupWheel_AirPadSup_addDY)/2.;  AECT_SupWheel_AirPadSup_relZ" />
+  <posXYZ  volume="ECT_SupWheel_AirPadSup" X_Y_Z="0.; -(AECT_SupInnWheel_SideDY+AECT_SupWheel_AirPadSup_addDY)/2.; -AECT_SupWheel_AirPadSup_relZ" />
+  <posXYZ  volume="ECT_SupWheel_AirPad"    X_Y_Z="0.; -AECT_SupInnWheel_SideDY-AECT_SupWheel_AirPadSup_addDY-AECT_SupWheel_AirPad_Hight/2.; AECT_SupWheel_AirPadSup_relZ "  rot="90.; 0.; 0."/> 
+  <posXYZ  volume="ECT_SupWheel_AirPad"    X_Y_Z="0.; -AECT_SupInnWheel_SideDY-AECT_SupWheel_AirPadSup_addDY-AECT_SupWheel_AirPad_Hight/2.; -AECT_SupWheel_AirPadSup_relZ "  rot="90.; 0.; 0."/> 
+  <posXYZ  volume="ECT_SupWheel_Jack"      X_Y_Z="(-AECT_SupOutWheel_XPosOut-AECT_SupOutWheel_XPosInn)/2.+AECT_SupWheel_Jack_AbsXPos; -AECT_EVOSso_EVOutShellspecioff-AECT_SupWheel_dyJackBox_DY-AECT_SupWheel_Jack_Hight/2.;  AECT_EVOShZ_EVOutShellholeZwid/2.-AECT_EVOSCZ_EVOutShellConnZwid"  rot="90.; 0.; 0."/>
+  <posXYZ  volume="ECT_SupWheel_Jack"      X_Y_Z="(-AECT_SupOutWheel_XPosOut-AECT_SupOutWheel_XPosInn)/2.+AECT_SupWheel_Jack_AbsXPos-AECT_SupWheel_Jack_DiffXPos; -AECT_EVOSso_EVOutShellspecioff-AECT_SupWheel_dyJackBox_DY-AECT_SupWheel_Jack_Hight/2.;  AECT_EVOShZ_EVOutShellholeZwid/2.-AECT_EVOSCZ_EVOutShellConnZwid"  rot="90.; 0.; 0."/>
+  <posXYZ  volume="ECT_SupWheel_Jack"      X_Y_Z="(-AECT_SupOutWheel_XPosOut-AECT_SupOutWheel_XPosInn)/2.+AECT_SupWheel_Jack_AbsXPos; -AECT_EVOSso_EVOutShellspecioff-AECT_SupWheel_dyJackBox_DY-AECT_SupWheel_Jack_Hight/2.;  -AECT_EVOShZ_EVOutShellholeZwid/2.+AECT_EVOSCZ_EVOutShellConnZwid"  rot="90.; 0.; 0."/>
+  <posXYZ  volume="ECT_SupWheel_Jack"      X_Y_Z="(-AECT_SupOutWheel_XPosOut-AECT_SupOutWheel_XPosInn)/2.+AECT_SupWheel_Jack_AbsXPos-AECT_SupWheel_Jack_DiffXPos; -AECT_EVOSso_EVOutShellspecioff-AECT_SupWheel_dyJackBox_DY-AECT_SupWheel_Jack_Hight/2.;  -AECT_EVOShZ_EVOutShellholeZwid/2.+AECT_EVOSCZ_EVOutShellConnZwid"  rot="90.; 0.; 0."/>
+  <posXYZ  volume="ECT_SupWheel_JackBox"   X_Y_Z="(-AECT_SupOutWheel_XPosOut-AECT_SupOutWheel_XPosInn)/2.+AECT_SupWheel_Jack_AbsXPos-AECT_SupWheel_Jack_DiffXPos/2.; -AECT_EVOSso_EVOutShellspecioff-AECT_SupWheel_dyJackBox_DY/2.;  -AECT_EVOShZ_EVOutShellholeZwid/2.+AECT_EVOSCZ_EVOutShellConnZwid" />
+  <posXYZ  volume="ECT_SupWheel_JackBox"   X_Y_Z="(-AECT_SupOutWheel_XPosOut-AECT_SupOutWheel_XPosInn)/2.+AECT_SupWheel_Jack_AbsXPos-AECT_SupWheel_Jack_DiffXPos/2.; -AECT_EVOSso_EVOutShellspecioff-AECT_SupWheel_dyJackBox_DY/2.;   AECT_EVOShZ_EVOutShellholeZwid/2.-AECT_EVOSCZ_EVOutShellConnZwid" />
+</composition>
+
+<composition  name="ECT_SupWheel_Right">
+  <posXYZ  volume="ECT_SupWheel_basic"     X_Y_Z="  (AECT_SupOutWheel_XPosOut+AECT_SupOutWheel_XPosInn)/2.; 0.; 0."  />
+  <posXYZ  volume="ECT_SupWheel_SpecBox"   X_Y_Z="  AECT_SupOutWheel_XPosOut-AECT_SupInnWheel_SideDY/2.; -AECT_SupInnWheel_SideDY/2.-AECT_SupInnWheel_Yoff; AECT_SupWheel_SpecBox_DZ/2." />
+</composition>
+
+<composition  name="ECT_SupWheel_Left">
+  <posXYZ  volume="ECT_SupWheel_basic"     X_Y_Z=" -(AECT_SupOutWheel_XPosOut+AECT_SupOutWheel_XPosInn)/2.; 0.; 0."    rot="0.; 180.; 0."/>
+  <posXYZ  volume="ECT_SupWheel_SpecBox"   X_Y_Z=" -AECT_SupOutWheel_XPosOut+AECT_SupInnWheel_SideDY/2.; -AECT_SupInnWheel_SideDY/2.-AECT_SupInnWheel_Yoff; AECT_SupWheel_SpecBox_DZ/2." />
+</composition>
+
+<composition  name="ECT_SuppoWheels" >
+  <posXYZ  volume="ECT_SupWheel_Right"     X_Y_Z="  0. ; AECT_SupWheel_YPos ; 0. " />
+  <posXYZ  volume="ECT_SupWheel_Left"      X_Y_Z="  0. ; AECT_SupWheel_YPos ; 0. " />
+</composition>
+
+<composition  name="ECT_Toroid_single" >
+  <mposPhi  volume="ECT_ColdMass"  ncopy="8" />
+  <mposWedge  volume="ECT_TS_ThermalShield_default" wedge_number="8"  sectors=" 0; 1; 1; 1; 0; 1; 1; 1"  >
+    <sector  value="1"  step="1"  />
+  </mposWedge>
+  <posRPhiZ   volume="ECT_TS_ThermalShield_special"  R_Phi_Z=" 0. ; -90. ; 0. " >
+    <sector  value="1"  />
+  </posRPhiZ>
+  <posRPhiZ   volume="ECT_TS_ThermalShield_special"  R_Phi_Z=" 0. ;-270. ; 0. " >
+    <sector  value="5"  />
+  </posRPhiZ>
+  <posXYZ  volume="ECT_TS_CentralTube"/>
+  <mposWedge  volume="ECT_JTV_Shielding_default" wedge_number="8"  sectors=" 0; 1; 1; 1; 0; 1; 1; 1"  >
+    <sector  value="1"  step="1"  />
+  </mposWedge>
+  <posRPhiZ   volume="ECT_JTV_Shielding_special"  R_Phi_Z=" 0. ; -90. ; 0. " >
+    <sector  value="1"  />
+  </posRPhiZ>
+  <posRPhiZ   volume="ECT_JTV_Shielding_special"  R_Phi_Z=" 0. ;-270. ; 0. " >
+    <sector  value="5"  />
+  </posRPhiZ>
+  <mposWedge  volume="ECT_EV_Envelop_default"  wedge_number="8"  sectors=" 1; 1; 1; 1; 1; 0; 0; 1"  >
+    <sector  value="1"  step="1"  />
+  </mposWedge>
+  <posRPhiZ   volume="ECT_EV_Envelop_special_Sector6"  R_Phi_Z=" 0. ; 135. ; 0. " >
+    <sector  value="6"  />
+  </posRPhiZ>
+  <posRPhiZ   volume="ECT_EV_Envelop_special_Sector7"  R_Phi_Z=" 0. ; 180. ; 0. " >
+    <sector  value="7"  />
+  </posRPhiZ>
+  <mposWedge  volume="ECT_EV_AlignTube_default" wedge_number="8"  sectors=" 0; 1; 1; 1; 0; 1; 1; 1"  >
+    <sector  value="1"  step="1"  />
+  </mposWedge>
+  <posRPhiZ   volume="ECT_EV_AlignTube_special"  R_Phi_Z=" 0. ; 22.5 ; 0. " >
+    <sector  value="1"  />
+  </posRPhiZ>
+  <posRPhiZ   volume="ECT_EV_AlignTube_special"  R_Phi_Z=" 0. ;202.5 ; 0. " >
+    <sector  value="5"  />
+  </posRPhiZ>
+  <posXYZ  volume="ECT_EV_CentralTube"/>
+  <posXYZ  volume="ECT_JTV_FrontRing" />
+  <posXYZ  volume="ECT_JTV_BackRing" X_Y_Z=" 0.; 0.; GENV_Eps"/>
+  <posXYZ  volume="ECT_EV_Yoke" X_Y_Z=" 0.; 0.;  AECT_CTYpoZ_CentTubeYokeposZ"/>
+  <posXYZ  volume="ECT_EV_Yoke" X_Y_Z=" 0.; 0.; -AECT_CTYpoZ_CentTubeYokeposZ"/>
+  <posRPhiZ    volume="ECT_EV_SideAttachment"  R_Phi_Z=" AECT_EVEPid_EVEndPlateindist - (AECT_EVSSAh_EVSideSupporthight + AECT_EVOSit_EVOutShellinnthick + AECT_EVOSio_EVOutShellinneroff)/2. ;  22.5 ; 0. " />
+  <posRPhiZ    volume="ECT_EV_SideAttachment"  R_Phi_Z=" AECT_EVEPid_EVEndPlateindist - (AECT_EVSSAh_EVSideSupporthight + AECT_EVOSit_EVOutShellinnthick + AECT_EVOSio_EVOutShellinneroff)/2. ; 202.5 ; 0. " />
+  <posRPhiZ    volume="ECT_EV_FrontAttachment" R_Phi_Z=" AECT_EVTSRa_EVTopSupportRadius + (AECT_EVTSAl_EVTopSupportlength)/2. ;  22.5 ;  (AECT_EVOShZ_EVOutShellholeZwid - AECT_EVTSAh_EVTopSupporthight)/2." />
+  <posRPhiZ    volume="ECT_EV_FrontAttachment" R_Phi_Z=" AECT_EVTSRa_EVTopSupportRadius + (AECT_EVTSAl_EVTopSupportlength)/2. ; 202.5 ;  (AECT_EVOShZ_EVOutShellholeZwid - AECT_EVTSAh_EVTopSupporthight)/2." />
+  <posRPhiZ    volume="ECT_EV_BackAttachment"  R_Phi_Z=" AECT_EVTSRa_EVTopSupportRadius + (AECT_EVTSAl_EVTopSupportlength)/2. ;  22.5 ; -(AECT_EVOShZ_EVOutShellholeZwid - AECT_EVTSAh_EVTopSupporthight)/2." />
+  <posRPhiZ    volume="ECT_EV_BackAttachment"  R_Phi_Z=" AECT_EVTSRa_EVTopSupportRadius + (AECT_EVTSAl_EVTopSupportlength)/2. ; 202.5 ; -(AECT_EVOShZ_EVOutShellholeZwid - AECT_EVTSAh_EVTopSupporthight)/2." />
+  <mposPhi  volume="ECT_EV_CryoStop_outside"  ncopy="8" />
+  <mposPhi  volume="ECT_EV_CryoStop_inside"   ncopy="8" />
+  <posXYZ  volume="ECT_ServTur"  X_Y_Z=" 0. ; AECT_SrvTu1He_ServTur1Height/2.  + AECT_EVEPod_EVEndPlateoutdist - AECT_EVOSio_EVOutShellinneroff; -AECT_EVOShZ_EVOutShellholeZwid/2.+AECT_ServTuZoff_ServTurZoffset" />
+  <posXYZ  volume="ECT_ServiceTower"  X_Y_Z=" 0. ; ECST_SToYpos ; -ECST_SToThic2 - AECT_EVOShZ_EVOutShellholeZwid/2. + AECT_ServTuZoff_ServTurZoffset - ECST_SToDzBot/2. "  rot="0. ; 0. ; 0. " /> 
+ <posXYZ  volume="ECT_SuppoWheels" />
+</composition>
+
+<composition  name="ECT_ToroidN" >
+  <posXYZ  volume="ECT_Toroid_single"    X_Y_Z=" 0. ; 0. ;  -AECT_Toroid_ZPosition" >
+    <ring  value="-1" />
+  </posXYZ>
+</composition>
+
+<composition  name="ECT_ToroidP" >
+  <posXYZ  volume="ECT_Toroid_single"    X_Y_Z=" 0. ; 0. ;   AECT_Toroid_ZPosition"  rot="0. ; 180. ; 0. ">
+    <ring  value=" 1" />
+  </posXYZ>
+</composition>
+
+<composition  name="ECT_Toroids" >
+  <posXYZ  volume="ECT_ToroidN"    X_Y_Z=" 0. ; 0. ; 0." />
+  <posXYZ  volume="ECT_ToroidP"    X_Y_Z=" 0. ; 0. ; 0." />
+</composition>
+
+<!-- gvxy status 10/25 are converted to subtractions -->
+
+</section>
+
+
+<section name       = "Atlas Barrel Toroidal Magnets"
+         version    = "7.0"
+         date       = "01-01-10, 28 November 2002"
+         author     = "Jochen Meyer, Laurent Chevalier, Marc Virchaux, Daniel Pomarede"
+         top_volume = "BAR_Toroid">
+
+<!--     name       =  Atlas Barrel Toroidal Magnets section name       = "Magnets"   -->
+
+<!--  reviewed/corrected in March 2010 by Jochen Meyer 
+      comment: * blueprint references are available on the twiki Pages
+               * still some details are missing                       -->
+
+<!--  **************************************************************
+      **************************************************************
+      ***                                                       ****
+      ***             Atlas Barrel Toroid (BAR)                 ****
+      ***                                                       ****
+      **************************************************************
+      **************************************************************  -->
+
+
+<!-- Atlas Barrel toroid Cryostat -->
+
+<var    name="ABRT_CryoRmin"      value="  4720." />       <!-- atltbw__0002-vAD 4745. -->
+<var    name="ABRT_CryoRmax"      value=" 10030." />       <!-- atltbw__0002-vAD 10065. -->
+<var    name="ABRT_CryoZmax"      value=" 12630." />       <!-- atltbyv_0003-vAE -->
+<var    name="ABRT_CryoRcur"      value="   821." />       <!-- atltbyv_0003-vAE -->
+<var    name="ABRT_CryoRadi_Radius"    value="   550." />  <!-- atltbyv_0003-vAE -->
+<var    name="ABRT_CryoRadT_RadThick"  value="    15." />  <!-- not confirmed -->
+
+<!-- Cryostat Attachment -->
+
+<!-- BEGIN confirmation with atltbyv_0010-vAB (if no other comment) -->
+<var    name="ABRT_CryAttD0_CryoAttDiam0"  value="  550." />
+<var    name="ABRT_CryAttD1_CryoAttDiam1"  value="  439." />
+<var    name="ABRT_CryAttAl_CryoAttAlfa"   value="    8." />     <!-- atltbwv_0029-vAB -->
+<var    name="ABRT_CryAttXh_CryoAttXhigh"  value=" 1490." />
+<var    name="ABRT_CryAttTh_CryoAttThick"  value="   10." />
+<var    name="ABRT_CryAttRx_CryoAttRmax"   value=" ABRT_CryoRmin + ABRT_CryoRadi_Radius" />
+<var    name="ABRT_CryAttSe_CryoAttSlimend"   value="  557." />
+<!-- END confirmation with atltbyv_0010-vAB -->
+
+<!-- BEGIN confirmation with atltbyv_0007-vAC (if no other comment) -->
+<var    name="ABRT_CryAtWiY_CryoAttWingY"     value="  600." />
+<var    name="ABRT_CryAtWXp_CryoAttWingXp"    value="  590." />
+<var    name="ABRT_CryAtWXn_CryoAttWingXn"    value="  -41." />
+<var    name="ABRT_CryAtWBo_CryoAttWingBoss"  value="   40." />
+<var    name="ABRT_CryAtWTh_CryoAttWingThick" value="   20." />  <!-- atltbyv_0004-vAC -->
+<var    name="ABRT_CryAtWZe_CryoAttWingZesp"  value="  590." />  <!-- atltbyv_0003-vAE --> <!-- atltbyv_0004-vAC -->
+<var    name="ABRT_CryAtWRa_CryoAttWingRad"   value="  570." />
+<var    name="ABRT_CryAtWYc_CryoAttWingYcut"  value="  150." />
+<!-- END confirmation with atltbyv_0007-vAC -->
+
+<!-- Cryostat Ribs -->
+
+<!-- BEGIN confirmation with atltbyv_0004-vAC (if no other comment) -->
+<var    name="ABRT_CryRibYw_CryoRibYwid"      value="  500." />
+<var    name="ABRT_CryRibZl_CryoRibZlen"      value="  290." />  <!-- approx. since length is varying for each rib -->
+<var    name="ABRT_CryRibTh_CryoRibThick"     value="   10." />
+<var    name="ABRT_CryRiWYp_CryoRibWingYp"    value="  436." />
+<var    name="ABRT_CryRiWYn_CryoRibWingYn"    value=" 1100." />
+<var    name="ABRT_CryRiWXp_CryoRibWingXp"    value="  430." />
+<var    name="ABRT_CryRiWTh_CryoRibWingThick" value="   10." />
+<var    name="ABRT_CryRiWXc_CryoRibWingXncut" value="   75." />
+<var    name="ABRT_CryRiWAn_CryoRibWingAngle" value="   62." />
+<var    name="ABRT_CryRiWXn_CryoRibWingXn"    value=" -tan(ABRT_CryRiWAn_CryoRibWingAngle*GENV_PiS180)*(ABRT_CryRiWYn_CryoRibWingYn - ABRT_CryRiWYp_CryoRibWingYp)/2. + ABRT_CryRiWXp_CryoRibWingXp " />
+<!-- END confirmation with atltbyv_0004-vAC -->
+ 
+<!-- Cryostat Ring -->
+
+<var    name="ABRT_CryRngRm_CryoRingRmed"   value="  8790." />  <!-- atltbw__0002-vAD-->
+<var    name="ABRT_CryRngZm_CryoRingZmed"   value=" -1030." />  <!-- atltbyv_0003-vAE -->
+<var    name="ABRT_CryRngRa_CryoRingRadius" value="   340." />  <!-- atltbyv_0004-vAC -->
+
+
+<!-- Struts -->
+<!-- BEGIN confirmation with atltbws_0023-vAA (if no other comment) -->
+<var    name="ABRT_StrtYlen"       value="  5690." />
+<var    name="ABRT_StrtZwid_StrutZwidth"     value="   500." />
+<var    name="ABRT_StrtRthi_StrutRthick"     value="    50." />
+<var    name="ABRT_StrtPoff_StrutPlateoff"   value="    50." />
+<var    name="ABRT_StrtPthi_StrutPlatethick" value="    50." />
+<var    name="ABRT_StrtZthi_StrutZthick"     value="    40." />
+<!-- END confirmation with atltbws_0023-vAA -->
+
+<var    name="ABRT_StrWRmax_StrutWingRmax"   value="ABRT_CryoRmax" /> <!-- has to be true, otherwise everything will break down-->
+
+<!-- BEGIN confirmation with atltbyv_0006-vAB (if no other comment) -->
+<var    name="ABRT_StrWYmax_StrutWingYmax"   value="   390." />
+<var    name="ABRT_StrWYmed_StrutWingYmedi"  value="   791." />
+<var    name="ABRT_StrWYRli_StrutWingYRlink" value="   732." />
+<var    name="ABRT_StrWRwid_StrutWingRwidth" value="  1250." />
+<var    name="ABRT_StrWYmin_StrutWingYmin"   value="   245." />
+<var    name="ABRT_StrWZthi_StrutWingZthick" value="    20." />
+<var    name="ABRT_StrWYthi_StrutWingYthick" value="    50." />
+<var    name="ABRT_StrWZlen_StrutWingZlen"   value="   430." />
+<var    name="ABRT_StrWYucu_StrutWingYupcut" value="   150." />
+<var    name="ABRT_StrWSPth_StrutWingSmallPlatethick" value="   500." />
+<var    name="ABRT_StrWBPth_StrutWingBigPlatethick"   value="   520." />
+<var    name="ABRT_StrWBPhi_StrutWingBigPlateheight"  value="   700." />
+<!-- END confirmation with atltbyv_0006-vAB -->
+
+<array  name="ABRT_Zvouss"  values=" -10845. ; -8245. ; -5137.5 ; -1712.5 ; 1712.5 ; 5137.5 ; 8245. ; 10845. " />  <!-- atltbyv_0003-vAE -->
+<array  name="ABRT_Zrib"    values=" -9540. ; -6760. ; -3490. ; 0. ; 3490. ; 6760. ; 9540. " />                    <!-- atltbyv_0003-vAE -->
+
+
+
+<!--  Derived variables  -->
+
+<var  name="ABRT_CryRiXhi_CryoRibXhigh"    value="(ABRT_CryoRmax+ABRT_CryoRmin)/2. - ABRT_CryoRmin - ABRT_CryoRadi_Radius" />
+<var  name="ABRT_CryAttXs_CryoAttXsec"     value="(ABRT_CryAttD0_CryoAttDiam0 - 2.*ABRT_CryAttTh_CryoAttThick - ABRT_CryAttD1_CryoAttDiam1)/2./tan(ABRT_CryAttAl_CryoAttAlfa*GENV_PiS180)" />
+<var  name="ABRT_StrWRmed_StrutWingRmedi"  value="(ABRT_StrtYlen + 2.* ( ABRT_StrWYRli_StrutWingYRlink + ABRT_StrWYthi_StrutWingYthick)) / 2. / GENV_Si225" />
+<var  name="ABRT_StrWRmin_StrutWingRmin"   value="ABRT_StrWRmax_StrutWingRmax - ABRT_StrWRwid_StrutWingRwidth" />
+<var  name="ABRT_StrWYlow_StrutWingYlower" value="(ABRT_StrWRmin_StrutWingRmin - ABRT_StrWYmin_StrutWingYmin * GENV_Ta20 - ABRT_StrWRmed_StrutWingRmedi + ABRT_StrWYmed_StrutWingYmedi / GENV_Ta225 ) / (GENV_Ta675 - GENV_Ta20)" />
+<var  name="ABRT_StrWRlow_StrutWingRlower" value="GENV_Ta675 * ABRT_StrWYlow_StrutWingYlower + ABRT_StrWRmed_StrutWingRmedi - ABRT_StrWYmed_StrutWingYmedi / GENV_Ta225 " /> 
+<var  name="ABRT_StrWAlow_StrutWingAlower" value="atan((ABRT_StrWRlow_StrutWingRlower-ABRT_StrWRmax_StrutWingRmax + ABRT_StrWRwid_StrutWingRwidth)/(ABRT_StrWYlow_StrutWingYlower-ABRT_StrWYmin_StrutWingYmin))" />
+<var  name="ABRT_StrWAupp_StrutWingAupper" value="atan((ABRT_StrWRmax_StrutWingRmax-ABRT_StrWRmed_StrutWingRmedi)/(ABRT_StrWYmed_StrutWingYmedi-ABRT_StrWYmax_StrutWingYmax))" />
+
+<!--  Description of an Atlas Barrel Cold Mass  -->
+
+<!-- BEGIN confirmation with atltbcc_0002-v0 (if no other comment) -->
+<var  name="ABRT_CoMaRmin_ColdMassRmin"    value=" 4851.1" />  <!-- not confirmed, old GUESS 4857.5 -->
+<var  name="ABRT_CoMaRmax_ColdMassRmax"    value=" 9924.3" />  <!-- not confirmed, old GUESS 9952.5 --> 
+<var  name="ABRT_CoMaZmax_ColdMassZmax"    value="12478.8" />  <!-- warm: 12532.5  --> 
+<var  name="ABRT_CoMaRcuI_ColdMassRcurv"   value=" 1449.8" />  <!-- warm:  1456.   -->
+<var  name="ABRT_CoMaRThi_ColdMassRThick"  value="  791.6" />  <!-- warm:   795.   -->
+<var  name="ABRT_CoMaYThi_ColdMassYThick"  value="  288. " />  <!-- warm:   288.   (here warm value used because of ABRT_BielAtTh_BiellAttThick=288. too) -->
+<var  name="ABRT_CoMaRibZ_ColdMassRibZ"    value="   99.6" />  <!-- warm:   100.   -->
+<var  name="ABRT_CoMaRanL_ColdMassRanglen" value="  385.6" />  <!-- warm:   387.2  -->
+<!-- END confirmation with atltbcc_0002-v0 -->
+
+<box  name="BAR_ColdMassAlongZ"  material="Aluminium8"  X_Y_Z="ABRT_CoMaRThi_ColdMassRThick; ABRT_CoMaYThi_ColdMassYThick; 2.*(ABRT_CoMaZmax_ColdMassZmax - ABRT_CoMaRcuI_ColdMassRcurv) - GENV_Eps" />
+<box  name="BAR_ColdMassAlongR"  material="Aluminium8"  X_Y_Z="ABRT_CoMaRmax_ColdMassRmax - ABRT_CoMaRmin_ColdMassRmin - 2.*ABRT_CoMaRcuI_ColdMassRcurv - GENV_Eps; ABRT_CoMaYThi_ColdMassYThick; ABRT_CoMaRThi_ColdMassRThick " />
+
+<gvxy  name="BAR_CornerAngled_Cut"  material="Aluminium8"  dZ="ABRT_CoMaYThi_ColdMassYThick + GENV_Eps" >
+  <gvxy_point  X_Y=" ABRT_CoMaRThi_ColdMassRThick; -GENV_Eps " />
+  <gvxy_point  X_Y=" ABRT_CoMaRThi_ColdMassRThick; ABRT_CoMaRcuI_ColdMassRcurv - ABRT_CoMaRThi_ColdMassRThick - ABRT_CoMaRanL_ColdMassRanglen" />
+  <gvxy_point  X_Y=" ABRT_CoMaRThi_ColdMassRThick + ABRT_CoMaRanL_ColdMassRanglen; ABRT_CoMaRcuI_ColdMassRcurv - ABRT_CoMaRThi_ColdMassRThick" />
+  <gvxy_point  X_Y=" ABRT_CoMaRcuI_ColdMassRcurv + GENV_Eps; ABRT_CoMaRcuI_ColdMassRcurv - ABRT_CoMaRThi_ColdMassRThick" />
+  <gvxy_point  X_Y=" ABRT_CoMaRcuI_ColdMassRcurv + GENV_Eps; -GENV_Eps " />
+</gvxy>
+<tubs   name="BAR_CornerRound"  material="Aluminium8"  Rio_Z=" 0. ; ABRT_CoMaRcuI_ColdMassRcurv ; ABRT_CoMaYThi_ColdMassYThick"  profile="90.; 90." nbPhi="8" />
+<subtraction name="BAR_Corner" >
+   <posXYZ  volume="BAR_CornerRound"   X_Y_Z=" ABRT_CoMaRcuI_ColdMassRcurv; 0. ; 0.  "  rot=" 90. ; 0. ; 0. "/> 
+   <posXYZ  volume="BAR_CornerAngled_Cut"  X_Y_Z=" 0. ; 0. ; 0. "  rot=" 90. ; 0. ; 0. "/> 
+</subtraction>
+
+<box   name="BAR_ColdMassRib"     material="Aluminium8"  X_Y_Z=" ABRT_CoMaRmax_ColdMassRmax - ABRT_CoMaRmin_ColdMassRmin - 2.*ABRT_CoMaRThi_ColdMassRThick - GENV_Eps; ABRT_CoMaYThi_ColdMassYThick; ABRT_CoMaRibZ_ColdMassRibZ" />
+
+<composition        name="BAR_ColdMassCoil" >
+  <posXYZ    volume="BAR_ColdMassAlongZ"   X_Y_Z="ABRT_CoMaRmin_ColdMassRmin + ABRT_CoMaRThi_ColdMassRThick/2. ; 0; 0."  />
+  <posXYZ    volume="BAR_ColdMassAlongZ"   X_Y_Z="ABRT_CoMaRmax_ColdMassRmax - ABRT_CoMaRThi_ColdMassRThick/2. ; 0; 0."  />
+  <posXYZ    volume="BAR_ColdMassAlongR"   X_Y_Z="(ABRT_CoMaRmax_ColdMassRmax+ABRT_CoMaRmin_ColdMassRmin)/2.; 0;  ABRT_CoMaZmax_ColdMassZmax - ABRT_CoMaRThi_ColdMassRThick/2."  />
+  <posXYZ    volume="BAR_ColdMassAlongR"   X_Y_Z="(ABRT_CoMaRmax_ColdMassRmax+ABRT_CoMaRmin_ColdMassRmin)/2.; 0; -ABRT_CoMaZmax_ColdMassZmax + ABRT_CoMaRThi_ColdMassRThick/2."  />
+  <posXYZ    volume="BAR_Corner"           X_Y_Z="ABRT_CoMaRmin_ColdMassRmin ; 0.;  ABRT_CoMaZmax_ColdMassZmax - ABRT_CoMaRcuI_ColdMassRcurv"  rot=" 0. ;  0. ; 0. " />
+  <posXYZ    volume="BAR_Corner"           X_Y_Z="ABRT_CoMaRmin_ColdMassRmin + ABRT_CoMaRcuI_ColdMassRcurv ; 0.; -ABRT_CoMaZmax_ColdMassZmax"  rot=" 0. ; 270. ; 0. " />
+  <posXYZ    volume="BAR_Corner"           X_Y_Z="ABRT_CoMaRmax_ColdMassRmax ; 0.; -ABRT_CoMaZmax_ColdMassZmax + ABRT_CoMaRcuI_ColdMassRcurv"  rot=" 0. ; 180. ; 0. " />
+  <posXYZ    volume="BAR_Corner"           X_Y_Z="ABRT_CoMaRmax_ColdMassRmax - ABRT_CoMaRcuI_ColdMassRcurv; 0.;  ABRT_CoMaZmax_ColdMassZmax"  rot=" 0. ;  90. ; 0. " />
+  <foreach  index="Irib"  begin="0"  loops="7" >
+    <posXYZ  volume="BAR_ColdMassRib"      X_Y_Z=" (ABRT_CoMaRmax_ColdMassRmax+ABRT_CoMaRmin_ColdMassRmin)/2.; 0. ; ABRT_Zrib[Irib] " />
+  </foreach>
+</composition>
+
+
+<!--  Description of an Atlas Barrel toroid Biellette  -->
+
+<!-- BEGIN confirmation with atltbys_0002-v0 (if no other comment) -->
+<var  name="ABRT_BielYhei_BiellYheight"  value= "1099." />  <!-- approx., explanation see twikipage -->
+<var  name="ABRT_BielYso1_BiellYsole1"   value= "  27." />  <!-- approx., explanation see twikipage -->
+<var  name="ABRT_BielXsol_BiellXsole"    value= " 130." />
+<var  name="ABRT_BielXth1_BiellXthick1"  value= "  20." />
+<var  name="ABRT_BielXth2_BiellXthick2"  value= "  30." />
+<var  name="ABRT_BielZth1_BiellZthick1"  value= " 240." />
+<var  name="ABRT_BielRHol_BiellRadHole"  value= "  62." />
+<var  name="ABRT_BielYcHo_BiellYcenHole" value= " 120." />
+<var  name="ABRT_BielElen_BiellEdgeLen"  value= " 120." />
+<var  name="ABRT_BielYki1_BiellYKink1"   value= " 484." />
+<var  name="ABRT_BielAki1_BiellAngKink1" value= "  10." />
+<var  name="ABRT_BielAppr_BiellApprox"   value= "  21." />  <!-- approx., explanation see twikipage -->
+<!-- END confirmation with atltbys_0002-v0 -->
+
+<var  name="ABRT_BielYso2_BiellYsole2"   value= " GENV_Ta15 * (ABRT_BielXsol_BiellXsole - ABRT_BielXth1_BiellXthick1)/2. + ABRT_BielYso1_BiellYsole1" />
+<var  name="ABRT_BielYXHo_BiellXYHole"   value= " ABRT_BielElen_BiellEdgeLen * ( -1 + 2.*GENV_Si45 )" />
+
+<!--  Aluminium7 to be replaced by Titanium7 !!!!  -->
+<gvxysx   name="BAR_Biellette_1"   material="Aluminium7"  dZ="ABRT_BielZth1_BiellZthick1" >
+  <gvxy_point  X_Y=" ABRT_BielYXHo_BiellXYHole     ; 0. " />
+  <gvxy_point  X_Y=" ABRT_BielElen_BiellEdgeLen    ; ABRT_BielElen_BiellEdgeLen - ABRT_BielYXHo_BiellXYHole " />
+  <gvxy_point  X_Y=" ABRT_BielElen_BiellEdgeLen    ; ABRT_BielElen_BiellEdgeLen + 49.7 " />
+  <gvxy_point  X_Y=" ABRT_BielXth2_BiellXthick2/2. ; ABRT_BielElen_BiellEdgeLen + 49.7 + (ABRT_BielZth1_BiellZthick1 - ABRT_BielXth2_BiellXthick2)/(2. * tan(40.0*GENV_PiS180)) " />
+  <gvxy_point  X_Y=" ABRT_BielXth2_BiellXthick2/2. ; ABRT_BielYhei_BiellYheight - ABRT_BielYki1_BiellYKink1 + ABRT_BielAppr_BiellApprox - (ABRT_BielXth2_BiellXthick2 - ABRT_BielXth1_BiellXthick1)/tan(ABRT_BielAki1_BiellAngKink1*GENV_PiS180) " />
+  <gvxy_point  X_Y=" ABRT_BielXth1_BiellXthick1/2. ; ABRT_BielYhei_BiellYheight - ABRT_BielYki1_BiellYKink1 + ABRT_BielAppr_BiellApprox" />
+  <gvxy_point  X_Y=" ABRT_BielXth1_BiellXthick1/2. ; ABRT_BielYhei_BiellYheight - ABRT_BielYso2_BiellYsole2 " />
+  <gvxy_point  X_Y=" ABRT_BielXsol_BiellXsole/2.   ; ABRT_BielYhei_BiellYheight - ABRT_BielYso1_BiellYsole1 " />
+  <gvxy_point  X_Y=" ABRT_BielXsol_BiellXsole/2.   ; ABRT_BielYhei_BiellYheight " />
+</gvxysx>
+<tubs     name="BAR_Biellette_2"  material="Aluminium7"  Rio_Z="0.; ABRT_BielRHol_BiellRadHole; 300."  nbPhi="16" />
+<gvxy   name="BAR_Biellette_3"  material="Aluminium7"  dZ="500." >
+  <gvxy_point  X_Y="  70.            ;  -GENV_Eps " />
+  <gvxy_point  X_Y="  70.            ;       246. " />
+  <gvxy_point  X_Y=" ABRT_BielZth1_BiellZthick1/2. + GENV_Eps ;       358. " />
+  <gvxy_point  X_Y=" ABRT_BielZth1_BiellZthick1/2. + GENV_Eps ;  -GENV_Eps " />
+</gvxy>
+<subtraction  name="BAR_Biellette"  >
+   <posXYZ  volume="BAR_Biellette_1"  />
+   <posXYZ  volume="BAR_Biellette_2"  X_Y_Z=" 0. ; ABRT_BielYcHo_BiellYcenHole ; 0. "  />
+   <posXYZ  volume="BAR_Biellette_3"  rot=" 0. ;  90. ; 0. "  />
+   <posXYZ  volume="BAR_Biellette_3"  rot=" 0. ; -90. ; 0. "  />
+</subtraction>
+
+
+<!-- BEGIN confirmation with atltbcc_0006-v0 (if no other comment) -->
+<var  name="ABRT_BielAtL1_BiellAttLeng1"  value= " 575. " />
+<var  name="ABRT_BielAtL2_BiellAttLeng2"  value= " 280. " />
+<var  name="ABRT_BielAtTh_BiellAttThick"  value= " 288. " />
+<var  name="ABRT_BielAtHe_BiellAttHeight" value= " 147.5" />
+<!-- END confirmation with atltbcc_0006-v0 -->
+
+<trd    name="BAR_BiellAttFull"    material="Aluminium8"  Xmp_Ymp_Z=" ABRT_BielAtL1_BiellAttLeng1 ; ABRT_BielAtL2_BiellAttLeng2 ; ABRT_BielAtTh_BiellAttThick ; ABRT_BielAtTh_BiellAttThick ; ABRT_BielAtHe_BiellAttHeight " />
+<gvxysx name="BAR_BiellAttHol"  material="Aluminium8"  dZ="2.*ABRT_BielAtTh_BiellAttThick" >
+  <gvxy_point  X_Y=" ABRT_BielXsol_BiellXsole*0.6       ;       -GENV_Eps       " />
+  <gvxy_point  X_Y=" ABRT_BielXsol_BiellXsole*0.6      ; ABRT_BielYso1_BiellYsole1        " />
+  <gvxy_point  X_Y=" ABRT_BielXth1_BiellXthick1*0.7    ; ABRT_BielYso2_BiellYsole2+GENV_Eps    " />
+  <gvxy_point  X_Y=" ABRT_BielXth1_BiellXthick1*0.7    ; ABRT_BielAtHe_BiellAttHeight+GENV_Eps " />
+</gvxysx>
+<subtraction  name="BAR_BiellAtt" >
+  <posXYZ  volume="BAR_BiellAttFull"  X_Y_Z=" ABRT_BielAtHe_BiellAttHeight/2. ; 0. ; 0. "  rot=" 0. ; 90. ; 0. " />
+  <posXYZ  volume="BAR_BiellAttHol"   rot=" 90. ; 90. ; 0. " />
+</subtraction>
+
+<composition  name="BAR_ColdMass_Sector" >
+  <posXYZ  volume="BAR_ColdMassCoil" X_Y_Z=" 0. ; 0. ; 0. "  rot="   0. ; 0. ;   0. " />
+  <foreach  index="Ivouss"  begin="0"  loops="8" >
+    <posXYZ  volume="BAR_Biellette"    X_Y_Z=" ABRT_CoMaRmin_ColdMassRmin+ABRT_CoMaRThi_ColdMassRThick+ABRT_BielYhei_BiellYheight+GENV_Eps ; 0. ; ABRT_Zvouss[Ivouss] "  rot=" 0. ; 90. ;  90. " />
+    <posXYZ  volume="BAR_BiellAtt"     X_Y_Z=" ABRT_CoMaRmin_ColdMassRmin+ABRT_CoMaRThi_ColdMassRThick+GENV_Eps ; 0. ; ABRT_Zvouss[Ivouss] " />
+  </foreach>
+</composition>
+
+
+
+
+<!--  Description of the Atlas Barrel toroid Cryostat  -->
+
+<!-- basic CryoTube volumes, uncut -->
+<tubs name="BAR_CryoTubAlongZBase" material="Iron1" Rio_Z="ABRT_CryoRadi_Radius - ABRT_CryoRadT_RadThick; ABRT_CryoRadi_Radius; 2.*ABRT_CryoZmax - 2.*ABRT_CryoRadi_Radius - ABRT_CryoRcur*sqrt(2.) + 2.*GENV_Ta225*ABRT_CryoRadi_Radius"   nbPhi="25" />
+<tubs name="BAR_CryoTubAlongRBase" material="Iron1" Rio_Z="ABRT_CryoRadi_Radius - ABRT_CryoRadT_RadThick; ABRT_CryoRadi_Radius; ABRT_CryoRmax - ABRT_CryoRmin - 2.*ABRT_CryoRadi_Radius - ABRT_CryoRcur*sqrt(2.) + 2.*GENV_Ta225*ABRT_CryoRadi_Radius"   nbPhi="32" />
+<tubs name="BAR_CryoTubCornerBase" material="Iron1" Rio_Z="ABRT_CryoRadi_Radius - ABRT_CryoRadT_RadThick; ABRT_CryoRadi_Radius; ABRT_CryoRcur + 2.*GENV_Ta225*ABRT_CryoRadi_Radius"   nbPhi="32" />
+
+<!-- basic CryoRib volumes, uncut -->
+<box  name="BAR_CryoRibOut"  material="Iron1"  X_Y_Z=" ABRT_CryoRmax - ABRT_CryoRmin - 2.* ABRT_CryoRadi_Radius               ; ABRT_CryRibYw_CryoRibYwid                               ; ABRT_CryRibZl_CryoRibZlen                     " />
+<box  name="BAR_CryoRibIn"   material="Iron6"  X_Y_Z=" ABRT_CryoRmax - ABRT_CryoRmin - 2.* ABRT_CryoRadi_Radius + 2.*GENV_Eps ; ABRT_CryRibYw_CryoRibYwid-2.*ABRT_CryRibTh_CryoRibThick ; ABRT_CryRibZl_CryoRibZlen-2.*ABRT_CryRibTh_CryoRibThick " />
+
+<!-- basic CryoAtt volumes, uncut -->
+<pcon  name="BAR_CryoAttOut"  material="Iron1"  nbPhi="20" >
+  <polyplane  Rio_Z="0. ; ABRT_CryAttD0_CryoAttDiam0/2. ; 0. " />
+  <polyplane  Rio_Z="0. ; ABRT_CryAttD0_CryoAttDiam0/2. ; ABRT_CryAttXh_CryoAttXhigh - ABRT_CryAttXs_CryoAttXsec - ABRT_CryAttSe_CryoAttSlimend" />
+  <polyplane  Rio_Z="0. ; ABRT_CryAttD1_CryoAttDiam1/2.+ABRT_CryAttTh_CryoAttThick ; ABRT_CryAttXh_CryoAttXhigh - ABRT_CryAttSe_CryoAttSlimend" />
+  <polyplane  Rio_Z="0. ; ABRT_CryAttD1_CryoAttDiam1/2.+ABRT_CryAttTh_CryoAttThick ; ABRT_CryAttXh_CryoAttXhigh " />
+</pcon>
+<pcon  name="BAR_CryoAttIn"   material="Iron6"  nbPhi="20" >
+  <polyplane  Rio_Z="0. ; ABRT_CryAttD0_CryoAttDiam0/2.-ABRT_CryAttTh_CryoAttThick   ;  -GENV_Eps " />
+  <polyplane  Rio_Z="0. ; ABRT_CryAttD0_CryoAttDiam0/2.-ABRT_CryAttTh_CryoAttThick   ;  ABRT_CryAttXh_CryoAttXhigh - ABRT_CryAttXs_CryoAttXsec - ABRT_CryAttSe_CryoAttSlimend - ABRT_CryAttTh_CryoAttThick*tan(ABRT_CryAttAl_CryoAttAlfa*GENV_PiS180/2.) " />
+  <polyplane  Rio_Z="0. ; ABRT_CryAttD1_CryoAttDiam1/2.   ;  ABRT_CryAttXh_CryoAttXhigh - ABRT_CryAttSe_CryoAttSlimend-ABRT_CryAttTh_CryoAttThick*tan(ABRT_CryAttAl_CryoAttAlfa*GENV_PiS180/2.) " />
+  <polyplane  Rio_Z="0. ; ABRT_CryAttD1_CryoAttDiam1/2.   ;  ABRT_CryAttXh_CryoAttXhigh + GENV_Eps " />
+</pcon>
+
+<!-- CryoTube cut volumes -->
+<box  name="BAR_CryoTubCutBox" material="Iron1" X_Y_Z="2.*ABRT_CryoRadi_Radius/GENV_Co225; 2.*ABRT_CryoRadi_Radius/GENV_Co225; 2.*ABRT_CryoRadi_Radius/GENV_Co225 " />
+<tubs name="BAR_CryoTubCut"    material="Iron1" Rio_Z=" 0. ; ABRT_CryoRadi_Radius+10.*GENV_Eps ; 2.*ABRT_CryRngRa_CryoRingRadius+2.*ABRT_CryRibZl_CryoRibZlen+ABRT_StrWZlen_StrutWingZlen "  nbPhi="32" />
+
+<!-- Begin of CryoRibWing -->
+<gvxysx  name="BAR_CryoRibWingA"  material="Iron4"  dZ=" ABRT_CryRibZl_CryoRibZlen+2.*ABRT_CryRiWTh_CryoRibWingThick+2.*GENV_Eps" >
+  <gvxy_point  X_Y=" ABRT_CryRiWYp_CryoRibWingYp/2. ; ABRT_CryRiWXp_CryoRibWingXp " />
+  <gvxy_point  X_Y=" ABRT_CryRiWYn_CryoRibWingYn/2. ; ABRT_CryRiWXn_CryoRibWingXn " />
+  <gvxy_point  X_Y=" ABRT_CryRiWYn_CryoRibWingYn/2. ; -ABRT_CryoRadi_Radius+ABRT_CryRiWXc_CryoRibWingXncut " />
+</gvxysx>
+<box     name="BAR_CryoRibWingB"  material="Iron1"  X_Y_Z=" 4.*ABRT_CryoRadi_Radius ; 4.*ABRT_CryoRadi_Radius ; ABRT_CryRibZl_CryoRibZlen+2.*GENV_Eps " />
+<subtraction  name="BAR_CryoRibWing" >
+  <posXYZ  volume="BAR_CryoRibWingA" />
+  <posXYZ  volume="BAR_CryoRibWingB" />
+  <posXYZ  volume="BAR_CryoTubCut"  X_Y_Z=" 0. ; -ABRT_CryoRadi_Radius - 5.*GENV_Eps ; 0. " />
+</subtraction>
+<!-- End of CryoRibWing -->
+
+<!-- Begin of CryoAttWing -->
+<gvxysx  name="BAR_CryoAttWingA"  material="Iron4"  dZ=" ABRT_CryAtWZe_CryoAttWingZesp+2.*ABRT_CryAtWTh_CryoAttWingThick" >
+  <gvxy_point X_Y=" ABRT_CryAtWiY_CryoAttWingY-ABRT_CryAtWBo_CryoAttWingBoss ; ABRT_CryAtWXp_CryoAttWingXp " />
+  <gvxy_point X_Y=" ABRT_CryAtWiY_CryoAttWingY ; ABRT_CryAtWXp_CryoAttWingXp-ABRT_CryAtWBo_CryoAttWingBoss " />
+  <gvxy_point X_Y=" ABRT_CryAtWiY_CryoAttWingY ; ABRT_CryAtWXn_CryoAttWingXn " />
+  <gvxy_point X_Y=" ABRT_CryAtWiY_CryoAttWingY-(2*ABRT_CryoRadi_Radius+ABRT_CryAtWXn_CryoAttWingXn)*GENV_Ta225 ;-2.*ABRT_CryoRadi_Radius " />
+</gvxysx>
+<box     name="BAR_CryoAttWingB"  material="Iron1"  X_Y_Z=" 4.*ABRT_CryoRadi_Radius      ; 6.*ABRT_CryoRadi_Radius     ;    ABRT_CryAtWZe_CryoAttWingZesp " />
+<tubs    name="BAR_CryoAttWingC"  material="Iron4"  Rio_Z=" ABRT_CryAtWRa_CryoAttWingRad     ; 2.*ABRT_CryAtWRa_CryoAttWingRad ; 2.*ABRT_CryAtWZe_CryoAttWingZesp "  profile=" 202.5 ; 135. "  nbPhi="16" />
+<box     name="BAR_CryoAttWingD"  material="Iron1"  X_Y_Z=" 2.*ABRT_CryAtWYc_CryoAttWingYcut ; 2.*ABRT_CryoRadi_Radius     ; 3.*ABRT_CryAtWZe_CryoAttWingZesp " />
+<subtraction  name="BAR_CryoAttWing" >
+  <posXYZ volume="BAR_CryoAttWingA" />
+  <posXYZ volume="BAR_CryoAttWingB" />
+  <posXYZ volume="BAR_CryoAttWingC" />
+  <posXYZ volume="BAR_CryoTubCut"   />
+  <posXYZ volume="BAR_CryoAttWingD"  X_Y_Z=" 0. ; -ABRT_CryoRadi_Radius ; 0. " />
+</subtraction>
+<!-- End of CryoAttWing -->
+<!-- laurent -->
+<!-- Begin of CryoTube volumes including cuts -->
+<subtraction  name="BAR_CryoTubAlongZ_Down" >
+  <posXYZ  volume="BAR_CryoTubAlongZBase"  X_Y_Z=" ABRT_CryoRmin + ABRT_CryoRadi_Radius ;                                   0. ;                                        0. "/>
+  <posXYZ  volume="BAR_CryoTubCutBox"      X_Y_Z=" ABRT_CryoRmin + ABRT_CryoRadi_Radius + ABRT_CryoRadi_Radius*GENV_Ta225 ; 0. ;    ABRT_CryoZmax - ABRT_CryoRcur/sqrt(2.) - GENV_Eps " rot=" 0. ;  22.5 ; 0. "/>
+  <posXYZ  volume="BAR_CryoTubCutBox"      X_Y_Z=" ABRT_CryoRmin + ABRT_CryoRadi_Radius + ABRT_CryoRadi_Radius*GENV_Ta225 ; 0. ;  -(ABRT_CryoZmax - ABRT_CryoRcur/sqrt(2.) - GENV_Eps)" rot=" 0. ; -22.5 ; 0. "/>
+  <foreach  index="Irib"  begin="0"  loops="7" >
+    <posXYZ  volume="BAR_CryoRibIn" X_Y_Z=" (ABRT_CryoRmax+ABRT_CryoRmin)/2. ; 0. ; ABRT_Zrib[Irib] " />
+  </foreach>
+  <foreach  index="Ivouss"  begin="0"  loops="8" >
+    <posXYZ  volume="BAR_CryoAttIn" X_Y_Z=" ABRT_CryAttRx_CryoAttRmax ; 0. ; ABRT_Zvouss[Ivouss] "  rot=" 0. ; 90. ; 0. " />
+  </foreach>
+</subtraction>
+
+<subtraction  name="BAR_CryoTubAlongZ_Up" >
+  <posXYZ  volume="BAR_CryoTubAlongZBase"  X_Y_Z=" ABRT_CryoRmax - ABRT_CryoRadi_Radius; 0. ; 0. "/>
+  <posXYZ  volume="BAR_CryoTubCutBox"      X_Y_Z=" ABRT_CryoRmax - ABRT_CryoRadi_Radius - ABRT_CryoRadi_Radius*GENV_Ta225 ; 0. ;    ABRT_CryoZmax - ABRT_CryoRcur/sqrt(2.) - GENV_Eps " rot=" 0. ; -22.5 ; 0. "/>
+  <posXYZ  volume="BAR_CryoTubCutBox"      X_Y_Z=" ABRT_CryoRmax - ABRT_CryoRadi_Radius - ABRT_CryoRadi_Radius*GENV_Ta225 ; 0. ;  -(ABRT_CryoZmax - ABRT_CryoRcur/sqrt(2.) - GENV_Eps)" rot=" 0. ;  22.5 ; 0. "/>
+  <foreach  index="Irib"  begin="0"  loops="7" >
+    <posXYZ  volume="BAR_CryoRibIn" X_Y_Z=" (ABRT_CryoRmax+ABRT_CryoRmin)/2. ; 0. ; ABRT_Zrib[Irib] " />
+  </foreach>
+</subtraction>
+
+<subtraction  name="BAR_CryoTubAlongR_Plus" >
+  <posXYZ  volume="BAR_CryoTubAlongRBase"   X_Y_Z=" (ABRT_CryoRmin + ABRT_CryoRmax)/2.; 0. ; ABRT_CryoZmax - ABRT_CryoRadi_Radius" rot=" 0. ; 90. ; 0. "/>
+  <posXYZ  volume="BAR_CryoTubCutBox"       X_Y_Z=" ABRT_CryoRmin + ABRT_CryoRcur/sqrt(2.) + GENV_Eps; 0. ; ABRT_CryoZmax - ABRT_CryoRadi_Radius - ABRT_CryoRadi_Radius*GENV_Ta225 " rot=" 0. ; -22.5 ; 0. "/>
+  <posXYZ  volume="BAR_CryoTubCutBox"       X_Y_Z=" ABRT_CryoRmax - ABRT_CryoRcur/sqrt(2.) - GENV_Eps; 0. ; ABRT_CryoZmax - ABRT_CryoRadi_Radius - ABRT_CryoRadi_Radius*GENV_Ta225 " rot=" 0. ;  22.5 ; 0. "/>
+</subtraction>
+
+<subtraction  name="BAR_CryoTubCorner" >
+  <posXYZ  volume="BAR_CryoTubCornerBase"  X_Y_Z=" (ABRT_CryoRcur + 2.*GENV_Ta225*ABRT_CryoRadi_Radius)/(2.*sqrt(2.)) + ABRT_CryoRadi_Radius/sqrt(2.) + ABRT_CryoRmin; 0. ; (ABRT_CryoRcur + 2.*GENV_Ta225*ABRT_CryoRadi_Radius)/(2.*sqrt(2.)) - ABRT_CryoRadi_Radius/sqrt(2.) + ABRT_CryoZmax - ABRT_CryoRadi_Radius - ABRT_CryoRcur/sqrt(2.) + GENV_Ta225*ABRT_CryoRadi_Radius" rot=" 0. ; 45. ; 0. "/>
+  <posXYZ  volume="BAR_CryoTubCutBox"      X_Y_Z=" ABRT_CryoRmin + ABRT_CryoRadi_Radius - GENV_Ta225*ABRT_CryoRadi_Radius; 0. ; ABRT_CryoZmax - ABRT_CryoRcur/sqrt(2.) - 2.*ABRT_CryoRadi_Radius" rot=" 0. ; 22.5 ; 0. "/>
+  <posXYZ  volume="BAR_CryoTubCutBox"      X_Y_Z=" ABRT_CryoRmin + 2.*ABRT_CryoRadi_Radius + ABRT_CryoRcur/sqrt(2.) ; 0. ; ABRT_CryoZmax - ABRT_CryoRadi_Radius + ABRT_CryoRadi_Radius*GENV_Ta225" rot=" 0. ; -22.5 ; 0. "/>
+</subtraction>
+<!-- End of CryoTube with cuts -->
+
+<!-- Begin of barrel toroid thermal shielding between CryoTub and Coldmass -->
+<var  name="BAR_ThermShield_OuterAngle"     value="    35.  " />
+<var  name="BAR_ThermShield_InnerAngle"     value="    30.  " />
+
+<var  name="BAR_ThermShield_Thickness"      value="     5.  " />
+<var  name="BAR_ThermShield_YHight"         value="   656.  " />
+<var  name="BAR_ThermShield_OuterXLenght"   value="   152.  " />
+<var  name="BAR_ThermShield_InnerXLenght"   value="   121.  " />
+<var  name="BAR_ThermShield_TopXLenght"     value="   657.  " />
+<var  name="BAR_ThermShield_XOverlap"       value="    35.  " />
+
+<!-- <var  name="BAR_ThermShield_TotalZLength"   value=" 25105.  " /> replaced by Zmax of coldmass to be consistent, arbitrary value added to resolve overlap, difference after adding arbitrary value of 80 is 67.4 mm -->
+<var  name="BAR_ThermShield_TotalZLength"   value=" 2.*ABRT_CoMaZmax_ColdMassZmax + 80. " />
+<!-- <var  name="BAR_ThermShield_TotalXLength"   value="  5135.  " /> replaced by radius diff of coldmass to be consistent, difference 61.8 mm, adding arbitrary value to resolve overlap, afterwards only 11.8mm diff -->
+<var  name="BAR_ThermShield_RadiusMin"      value="ABRT_CoMaRmin_ColdMassRmin - 25. " />
+<var  name="BAR_ThermShield_RadiusMax"      value="ABRT_CoMaRmax_ColdMassRmax + 25. " />
+<var  name="BAR_ThermShield_TotalXLength"   value="BAR_ThermShield_RadiusMax - BAR_ThermShield_RadiusMin" />
+<var  name="BAR_ThermShield_OuterEdgeLen"   value="  1217.4 " />
+
+<var  name="BAR_ThermShield_XLenght"        value="BAR_ThermShield_TopXLenght+BAR_ThermShield_InnerXLenght+BAR_ThermShield_OuterXLenght-2.*BAR_ThermShield_XOverlap" />
+
+<gvxysx name="BAR_ThermShield_AlongZOuter"  material="Aluminium1"  dZ="(BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5.-GENV_Eps">
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - (BAR_ThermShield_InnerXLenght - BAR_ThermShield_XOverlap)/tan( BAR_ThermShield_InnerAngle*GENV_PiS180) ; BAR_ThermShield_XLenght/2." />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. ; BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght + BAR_ThermShield_XOverlap" />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. + BAR_ThermShield_Thickness ;  BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght + BAR_ThermShield_XOverlap " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. + BAR_ThermShield_Thickness ; -BAR_ThermShield_XLenght/2. + BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. ; -BAR_ThermShield_XLenght/2.+ BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap" />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - (BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap)/tan( BAR_ThermShield_OuterAngle*GENV_PiS180) ; -BAR_ThermShield_XLenght/2." />
+</gvxysx>
+
+<gvxysx name="BAR_ThermShield_AlongZInner"  material="Aluminium1"  dZ="(BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5.-GENV_Eps">
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - (BAR_ThermShield_InnerXLenght - BAR_ThermShield_XOverlap)/tan( BAR_ThermShield_InnerAngle*GENV_PiS180) - BAR_ThermShield_Thickness*tan( BAR_ThermShield_InnerAngle/2.*GENV_PiS180); BAR_ThermShield_XLenght/2. - BAR_ThermShield_Thickness" /> 
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - BAR_ThermShield_Thickness ; BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght + BAR_ThermShield_XOverlap - BAR_ThermShield_Thickness * tan( (90.-BAR_ThermShield_InnerAngle)/2.*GENV_PiS180) " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - BAR_ThermShield_Thickness ; BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. ; BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. ; -BAR_ThermShield_XLenght/2. + BAR_ThermShield_OuterXLenght " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - BAR_ThermShield_Thickness ; -BAR_ThermShield_XLenght/2. + BAR_ThermShield_OuterXLenght " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - BAR_ThermShield_Thickness ; -BAR_ThermShield_XLenght/2. + BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap + BAR_ThermShield_Thickness * tan( (90.-BAR_ThermShield_OuterAngle)/2.*GENV_PiS180) " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - (BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap)/tan( BAR_ThermShield_OuterAngle*GENV_PiS180) - BAR_ThermShield_Thickness*tan( BAR_ThermShield_OuterAngle/2.*GENV_PiS180); -BAR_ThermShield_XLenght/2. + BAR_ThermShield_Thickness" /> 
+</gvxysx>
+
+<gvxysx name="BAR_ThermShield_AlongROuter"  material="Aluminium1"  dZ="BAR_ThermShield_TotalXLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45 - GENV_Eps">
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - (BAR_ThermShield_InnerXLenght - BAR_ThermShield_XOverlap)/tan( BAR_ThermShield_InnerAngle*GENV_PiS180) ; BAR_ThermShield_XLenght/2." />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. ; BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght + BAR_ThermShield_XOverlap" />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. + BAR_ThermShield_Thickness ;  BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght + BAR_ThermShield_XOverlap " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. + BAR_ThermShield_Thickness ; -BAR_ThermShield_XLenght/2. + BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. ; -BAR_ThermShield_XLenght/2.+ BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap" />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - (BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap)/tan( BAR_ThermShield_OuterAngle*GENV_PiS180) ; -BAR_ThermShield_XLenght/2." />
+</gvxysx>
+
+<gvxysx name="BAR_ThermShield_AlongRInner"  material="Aluminium1"  dZ="BAR_ThermShield_TotalXLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45 - GENV_Eps">
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - (BAR_ThermShield_InnerXLenght - BAR_ThermShield_XOverlap)/tan( BAR_ThermShield_InnerAngle*GENV_PiS180) - BAR_ThermShield_Thickness*tan( BAR_ThermShield_InnerAngle/2.*GENV_PiS180); BAR_ThermShield_XLenght/2. - BAR_ThermShield_Thickness" /> 
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - BAR_ThermShield_Thickness ; BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght + BAR_ThermShield_XOverlap - BAR_ThermShield_Thickness * tan( (90.-BAR_ThermShield_InnerAngle)/2.*GENV_PiS180) " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - BAR_ThermShield_Thickness ; BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. ; BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. ; -BAR_ThermShield_XLenght/2. + BAR_ThermShield_OuterXLenght " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - BAR_ThermShield_Thickness ; -BAR_ThermShield_XLenght/2. + BAR_ThermShield_OuterXLenght " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - BAR_ThermShield_Thickness ; -BAR_ThermShield_XLenght/2. + BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap + BAR_ThermShield_Thickness * tan( (90.-BAR_ThermShield_OuterAngle)/2.*GENV_PiS180) " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - (BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap)/tan( BAR_ThermShield_OuterAngle*GENV_PiS180) - BAR_ThermShield_Thickness*tan( BAR_ThermShield_OuterAngle/2.*GENV_PiS180); -BAR_ThermShield_XLenght/2. + BAR_ThermShield_Thickness" /> 
+</gvxysx>
+
+<gvxysx name="BAR_ThermShield_CornerOuter"  material="Aluminium1"  dZ="BAR_ThermShield_OuterEdgeLen">
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - (BAR_ThermShield_InnerXLenght - BAR_ThermShield_XOverlap)/tan( BAR_ThermShield_InnerAngle*GENV_PiS180) ; BAR_ThermShield_XLenght/2." />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. ; BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght + BAR_ThermShield_XOverlap" />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. + BAR_ThermShield_Thickness ;  BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght + BAR_ThermShield_XOverlap " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. + BAR_ThermShield_Thickness ; -BAR_ThermShield_XLenght/2. + BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. ; -BAR_ThermShield_XLenght/2.+ BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap" />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - (BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap)/tan( BAR_ThermShield_OuterAngle*GENV_PiS180) ; -BAR_ThermShield_XLenght/2." />
+</gvxysx>
+
+<gvxysx name="BAR_ThermShield_CornerInner"  material="Aluminium1"  dZ="BAR_ThermShield_OuterEdgeLen">
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - (BAR_ThermShield_InnerXLenght - BAR_ThermShield_XOverlap)/tan( BAR_ThermShield_InnerAngle*GENV_PiS180) - BAR_ThermShield_Thickness*tan( BAR_ThermShield_InnerAngle/2.*GENV_PiS180); BAR_ThermShield_XLenght/2. - BAR_ThermShield_Thickness" /> 
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - BAR_ThermShield_Thickness ; BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght + BAR_ThermShield_XOverlap - BAR_ThermShield_Thickness * tan( (90.-BAR_ThermShield_InnerAngle)/2.*GENV_PiS180) " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - BAR_ThermShield_Thickness ; BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. ; BAR_ThermShield_XLenght/2. - BAR_ThermShield_InnerXLenght " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. ; -BAR_ThermShield_XLenght/2. + BAR_ThermShield_OuterXLenght " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - BAR_ThermShield_Thickness ; -BAR_ThermShield_XLenght/2. + BAR_ThermShield_OuterXLenght " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - BAR_ThermShield_Thickness ; -BAR_ThermShield_XLenght/2. + BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap + BAR_ThermShield_Thickness * tan( (90.-BAR_ThermShield_OuterAngle)/2.*GENV_PiS180) " />
+  <gvxy_point  X_Y=" BAR_ThermShield_YHight/2. - (BAR_ThermShield_OuterXLenght - BAR_ThermShield_XOverlap)/tan( BAR_ThermShield_OuterAngle*GENV_PiS180) - BAR_ThermShield_Thickness*tan( BAR_ThermShield_OuterAngle/2.*GENV_PiS180); -BAR_ThermShield_XLenght/2. + BAR_ThermShield_Thickness" /> 
+</gvxysx>
+
+<box name="BAR_ThermShield_CutBox" material="Aluminium1"  X_Y_Z="BAR_ThermShield_XLenght/GENV_Co225; BAR_ThermShield_XLenght/GENV_Co225; BAR_ThermShield_XLenght/GENV_Co225" />
+
+<pcon  name="BAR_ThermShield_AttIn"   material="Aluminium1"  nbPhi="20" >
+  <polyplane  Rio_Z="0. ; ABRT_CryAttD0_CryoAttDiam0/2. + 20.  ;  -GENV_Eps " />
+  <polyplane  Rio_Z="0. ; ABRT_CryAttD0_CryoAttDiam0/2. + 20.  ;  ABRT_CryAttXh_CryoAttXhigh + GENV_Eps " />
+</pcon>
+
+<subtraction  name="BAR_ThermShield_AlongZ_Down_Part1" >
+  <posXYZ  volume="BAR_ThermShield_AlongZOuter"  X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_XLenght/2. ; 0. ; 2.*(BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  -90. "/>
+  <posXYZ  volume="BAR_ThermShield_AlongZInner"  X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_XLenght/2. ; 0. ; 2.*(BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  -90. "/>
+  <posXYZ  volume="BAR_ThermShield_CutBox"  X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_XLenght/2. + BAR_ThermShield_XLenght/2.*GENV_Ta225 ; 0. ;    BAR_ThermShield_TotalZLength/2. - (BAR_ThermShield_OuterEdgeLen-BAR_ThermShield_XLenght*GENV_Ta225)/sqrt(2.) - GENV_Eps " rot=" 0. ;  22.5 ; 0. "/>
+  <foreach  index="Irib"  begin="6"  loops="1" >
+    <posXYZ  volume="BAR_CryoRibIn" X_Y_Z=" (ABRT_CryoRmax+ABRT_CryoRmin)/2. ; 0. ; ABRT_Zrib[Irib] " />
+  </foreach>
+  <foreach  index="Ivouss"  begin="6"  loops="2" >
+    <posXYZ  volume="BAR_ThermShield_AttIn" X_Y_Z=" ABRT_CryAttRx_CryoAttRmax ; 0. ; ABRT_Zvouss[Ivouss] "  rot=" 0. ; 90. ; 0. " />
+  </foreach>
+</subtraction>
+
+<subtraction  name="BAR_ThermShield_AlongZ_Down_Part2" >
+  <posXYZ  volume="BAR_ThermShield_AlongZOuter"  X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_XLenght/2. ; 0. ; (BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  -90. "/>
+  <posXYZ  volume="BAR_ThermShield_AlongZInner"  X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_XLenght/2. ; 0. ; (BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  -90. "/>
+  <foreach  index="Irib"  begin="4"  loops="2" >
+    <posXYZ  volume="BAR_CryoRibIn" X_Y_Z=" (ABRT_CryoRmax+ABRT_CryoRmin)/2. ; 0. ; ABRT_Zrib[Irib] " />
+  </foreach>
+  <foreach  index="Ivouss"  begin="5"  loops="1" >
+    <posXYZ  volume="BAR_ThermShield_AttIn" X_Y_Z=" ABRT_CryAttRx_CryoAttRmax ; 0. ; ABRT_Zvouss[Ivouss] "  rot=" 0. ; 90. ; 0. " />
+  </foreach>
+</subtraction>
+
+<subtraction  name="BAR_ThermShield_AlongZ_Down_Part3" >
+  <posXYZ  volume="BAR_ThermShield_AlongZOuter"  X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_XLenght/2. ; 0. ; 0. " rot=" 0. ; 0. ;  -90. "/>
+  <posXYZ  volume="BAR_ThermShield_AlongZInner"  X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_XLenght/2. ; 0. ; 0. " rot=" 0. ; 0. ;  -90. "/>
+  <foreach  index="Irib"  begin="3"  loops="1" >
+    <posXYZ  volume="BAR_CryoRibIn" X_Y_Z=" (ABRT_CryoRmax+ABRT_CryoRmin)/2. ; 0. ; ABRT_Zrib[Irib] " />
+  </foreach>
+  <foreach  index="Ivouss"  begin="3"  loops="2" >
+    <posXYZ  volume="BAR_ThermShield_AttIn" X_Y_Z=" ABRT_CryAttRx_CryoAttRmax ; 0. ; ABRT_Zvouss[Ivouss] "  rot=" 0. ; 90. ; 0. " />
+  </foreach>
+</subtraction>
+
+<subtraction  name="BAR_ThermShield_AlongZ_Down_Part4" >
+  <posXYZ  volume="BAR_ThermShield_AlongZOuter"  X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_XLenght/2. ; 0. ; -(BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  -90. "/>
+  <posXYZ  volume="BAR_ThermShield_AlongZInner"  X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_XLenght/2. ; 0. ; -(BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  -90. "/>
+  <foreach  index="Irib"  begin="1"  loops="2" >
+    <posXYZ  volume="BAR_CryoRibIn" X_Y_Z=" (ABRT_CryoRmax+ABRT_CryoRmin)/2. ; 0. ; ABRT_Zrib[Irib] " />
+  </foreach>
+  <foreach  index="Ivouss"  begin="2"  loops="1" >
+    <posXYZ  volume="BAR_ThermShield_AttIn" X_Y_Z=" ABRT_CryAttRx_CryoAttRmax ; 0. ; ABRT_Zvouss[Ivouss] "  rot=" 0. ; 90. ; 0. " />
+  </foreach>
+</subtraction>
+
+<subtraction  name="BAR_ThermShield_AlongZ_Down_Part5" >
+  <posXYZ  volume="BAR_ThermShield_AlongZOuter"  X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_XLenght/2. ; 0. ; -2.*(BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  -90. "/>
+  <posXYZ  volume="BAR_ThermShield_AlongZInner"  X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_XLenght/2. ; 0. ; -2.*(BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  -90. "/>
+  <posXYZ  volume="BAR_ThermShield_CutBox"  X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_XLenght/2. + BAR_ThermShield_XLenght/2.*GENV_Ta225 ; 0. ;  -(BAR_ThermShield_TotalZLength/2. - (BAR_ThermShield_OuterEdgeLen-BAR_ThermShield_XLenght*GENV_Ta225)/sqrt(2.) - GENV_Eps)" rot=" 0. ; -22.5 ; 0. "/>
+  <foreach  index="Irib"  begin="0"  loops="1" >
+    <posXYZ  volume="BAR_CryoRibIn" X_Y_Z=" (ABRT_CryoRmax+ABRT_CryoRmin)/2. ; 0. ; ABRT_Zrib[Irib] " />
+  </foreach>
+  <foreach  index="Ivouss"  begin="0"  loops="2" >
+    <posXYZ  volume="BAR_ThermShield_AttIn" X_Y_Z=" ABRT_CryAttRx_CryoAttRmax ; 0. ; ABRT_Zvouss[Ivouss] "  rot=" 0. ; 90. ; 0. " />
+  </foreach>
+</subtraction>
+
+<subtraction  name="BAR_ThermShield_AlongZ_Up_Part1" >
+  <posXYZ  volume="BAR_ThermShield_AlongZOuter"  X_Y_Z=" BAR_ThermShield_RadiusMax - BAR_ThermShield_XLenght/2. ; 0. ; 2.*(BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  90. "/>
+  <posXYZ  volume="BAR_ThermShield_AlongZInner"  X_Y_Z=" BAR_ThermShield_RadiusMax - BAR_ThermShield_XLenght/2. ; 0. ; 2.*(BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  90. "/>
+  <posXYZ  volume="BAR_ThermShield_CutBox"  X_Y_Z=" BAR_ThermShield_RadiusMax - BAR_ThermShield_XLenght/2. - BAR_ThermShield_XLenght/2.*GENV_Ta225 ; 0. ;    BAR_ThermShield_TotalZLength/2. - (BAR_ThermShield_OuterEdgeLen-BAR_ThermShield_XLenght*GENV_Ta225)/sqrt(2.) - GENV_Eps " rot=" 0. ; -22.5 ; 0. "/>
+  <foreach  index="Irib"  begin="6"  loops="1" >
+    <posXYZ  volume="BAR_CryoRibIn" X_Y_Z=" (ABRT_CryoRmax+ABRT_CryoRmin)/2. ; 0. ; ABRT_Zrib[Irib] " />
+  </foreach>
+</subtraction>
+
+<subtraction  name="BAR_ThermShield_AlongZ_Up_Part2" >
+  <posXYZ  volume="BAR_ThermShield_AlongZOuter"  X_Y_Z=" BAR_ThermShield_RadiusMax - BAR_ThermShield_XLenght/2. ; 0. ; (BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  90. "/>
+  <posXYZ  volume="BAR_ThermShield_AlongZInner"  X_Y_Z=" BAR_ThermShield_RadiusMax - BAR_ThermShield_XLenght/2. ; 0. ; (BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  90. "/>
+  <foreach  index="Irib"  begin="4"  loops="2" >
+    <posXYZ  volume="BAR_CryoRibIn" X_Y_Z=" (ABRT_CryoRmax+ABRT_CryoRmin)/2. ; 0. ; ABRT_Zrib[Irib] " />
+  </foreach>
+</subtraction>
+
+<subtraction  name="BAR_ThermShield_AlongZ_Up_Part3" >
+  <posXYZ  volume="BAR_ThermShield_AlongZOuter"  X_Y_Z=" BAR_ThermShield_RadiusMax - BAR_ThermShield_XLenght/2. ; 0. ; 0. " rot=" 0. ; 0. ;  90. "/>
+  <posXYZ  volume="BAR_ThermShield_AlongZInner"  X_Y_Z=" BAR_ThermShield_RadiusMax - BAR_ThermShield_XLenght/2. ; 0. ; 0. " rot=" 0. ; 0. ;  90. "/>
+  <foreach  index="Irib"  begin="3"  loops="1" >
+    <posXYZ  volume="BAR_CryoRibIn" X_Y_Z=" (ABRT_CryoRmax+ABRT_CryoRmin)/2. ; 0. ; ABRT_Zrib[Irib] " />
+  </foreach>
+</subtraction>
+
+<subtraction  name="BAR_ThermShield_AlongZ_Up_Part4" >
+  <posXYZ  volume="BAR_ThermShield_AlongZOuter"  X_Y_Z=" BAR_ThermShield_RadiusMax - BAR_ThermShield_XLenght/2. ; 0. ; -(BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  90. "/>
+  <posXYZ  volume="BAR_ThermShield_AlongZInner"  X_Y_Z=" BAR_ThermShield_RadiusMax - BAR_ThermShield_XLenght/2. ; 0. ; -(BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  90. "/>
+  <foreach  index="Irib"  begin="1"  loops="2" >
+    <posXYZ  volume="BAR_CryoRibIn" X_Y_Z=" (ABRT_CryoRmax+ABRT_CryoRmin)/2. ; 0. ; ABRT_Zrib[Irib] " />
+  </foreach>
+</subtraction>
+
+<subtraction  name="BAR_ThermShield_AlongZ_Up_Part5" >
+  <posXYZ  volume="BAR_ThermShield_AlongZOuter"  X_Y_Z=" BAR_ThermShield_RadiusMax - BAR_ThermShield_XLenght/2. ; 0. ; -2.*(BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  90. "/>
+  <posXYZ  volume="BAR_ThermShield_AlongZInner"  X_Y_Z=" BAR_ThermShield_RadiusMax - BAR_ThermShield_XLenght/2. ; 0. ; -2.*(BAR_ThermShield_TotalZLength - 2.*BAR_ThermShield_OuterEdgeLen*GENV_Si45)/5. " rot=" 0. ; 0. ;  90. "/>
+  <posXYZ  volume="BAR_ThermShield_CutBox"  X_Y_Z=" BAR_ThermShield_RadiusMax - BAR_ThermShield_XLenght/2. - BAR_ThermShield_XLenght/2.*GENV_Ta225 ; 0. ;  -(BAR_ThermShield_TotalZLength/2. - (BAR_ThermShield_OuterEdgeLen-BAR_ThermShield_XLenght*GENV_Ta225)/sqrt(2.) - GENV_Eps)" rot=" 0. ;  22.5 ; 0. "/>
+  <foreach  index="Irib"  begin="0"  loops="1" >
+    <posXYZ  volume="BAR_CryoRibIn" X_Y_Z=" (ABRT_CryoRmax+ABRT_CryoRmin)/2. ; 0. ; ABRT_Zrib[Irib] " />
+  </foreach>
+</subtraction>
+
+<subtraction  name="BAR_ThermShield_AlongR" >
+  <posXYZ  volume="BAR_ThermShield_AlongROuter"   X_Y_Z=" (BAR_ThermShield_RadiusMin + BAR_ThermShield_RadiusMax)/2.; 0. ; (BAR_ThermShield_TotalZLength - BAR_ThermShield_XLenght)/2. " rot=" -90. ; 0. ;  -90. " />
+  <posXYZ  volume="BAR_ThermShield_AlongRInner"   X_Y_Z=" (BAR_ThermShield_RadiusMin + BAR_ThermShield_RadiusMax)/2.; 0. ; (BAR_ThermShield_TotalZLength - BAR_ThermShield_XLenght)/2. " rot=" -90. ; 0. ;  -90. " />
+  <posXYZ  volume="BAR_ThermShield_CutBox"   X_Y_Z=" BAR_ThermShield_RadiusMin + (BAR_ThermShield_OuterEdgeLen-BAR_ThermShield_XLenght*GENV_Ta225)/sqrt(2.) + GENV_Eps; 0. ; BAR_ThermShield_TotalZLength/2. - BAR_ThermShield_XLenght/2. - BAR_ThermShield_XLenght/2.*GENV_Ta225 " rot=" 0. ; -22.5 ; 0. "/>
+  <posXYZ  volume="BAR_ThermShield_CutBox"   X_Y_Z=" BAR_ThermShield_RadiusMax - (BAR_ThermShield_OuterEdgeLen-BAR_ThermShield_XLenght*GENV_Ta225)/sqrt(2.) - GENV_Eps; 0. ; BAR_ThermShield_TotalZLength/2. - BAR_ThermShield_XLenght/2. - BAR_ThermShield_XLenght/2.*GENV_Ta225 " rot=" 0. ;  22.5 ; 0. "/>
+</subtraction>
+
+<subtraction  name="BAR_ThermShield_Corner" >
+  <posXYZ  volume="BAR_ThermShield_CornerOuter"  X_Y_Z=" (BAR_ThermShield_OuterEdgeLen)/(2.*sqrt(2.)) + BAR_ThermShield_XLenght/2./sqrt(2.) + BAR_ThermShield_RadiusMin; 0. ;  - (BAR_ThermShield_OuterEdgeLen)/(2.*sqrt(2.)) + (2.+sqrt(2.))*BAR_ThermShield_XLenght*GENV_Ta225/(2.*sqrt(2.)) - (1.+sqrt(2.))*BAR_ThermShield_XLenght/(2.*sqrt(2.)) + BAR_ThermShield_TotalZLength/2." rot=" -45. ; 0. ; -90. "/>
+  <posXYZ  volume="BAR_ThermShield_CornerInner"  X_Y_Z=" (BAR_ThermShield_OuterEdgeLen)/(2.*sqrt(2.)) + BAR_ThermShield_XLenght/2./sqrt(2.) + BAR_ThermShield_RadiusMin; 0. ;  - (BAR_ThermShield_OuterEdgeLen)/(2.*sqrt(2.)) + (2.+sqrt(2.))*BAR_ThermShield_XLenght*GENV_Ta225/(2.*sqrt(2.)) - (1.+sqrt(2.))*BAR_ThermShield_XLenght/(2.*sqrt(2.)) + BAR_ThermShield_TotalZLength/2." rot=" -45. ; 0. ; -90. "/>
+  <posXYZ  volume="BAR_ThermShield_CutBox"      X_Y_Z=" BAR_ThermShield_RadiusMin + (1. - GENV_Ta225)*BAR_ThermShield_XLenght/2.; 0. ; BAR_ThermShield_TotalZLength/2. - (BAR_ThermShield_OuterEdgeLen-BAR_ThermShield_XLenght*GENV_Ta225)/sqrt(2.) - BAR_ThermShield_XLenght" rot=" 0. ; 22.5 ; 0. "/>
+  <posXYZ  volume="BAR_ThermShield_CutBox"      X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_XLenght + (BAR_ThermShield_OuterEdgeLen-BAR_ThermShield_XLenght*GENV_Ta225)/sqrt(2.) ; 0. ; BAR_ThermShield_TotalZLength/2. - BAR_ThermShield_XLenght/2.*(1. -GENV_Ta225)" rot=" 0. ; -22.5 ; 0. "/>
+</subtraction>
+
+<composition  name="BAR_ThermShield_Sector" >
+  <posXYZ  volume="BAR_ThermShield_AlongZ_Down_Part1" />
+  <posXYZ  volume="BAR_ThermShield_AlongZ_Down_Part2" />
+  <posXYZ  volume="BAR_ThermShield_AlongZ_Down_Part3" />
+  <posXYZ  volume="BAR_ThermShield_AlongZ_Down_Part4" />
+  <posXYZ  volume="BAR_ThermShield_AlongZ_Down_Part5" />
+  <posXYZ  volume="BAR_ThermShield_AlongZ_Up_Part1" />
+  <posXYZ  volume="BAR_ThermShield_AlongZ_Up_Part2" />
+  <posXYZ  volume="BAR_ThermShield_AlongZ_Up_Part3" />
+  <posXYZ  volume="BAR_ThermShield_AlongZ_Up_Part4" />
+  <posXYZ  volume="BAR_ThermShield_AlongZ_Up_Part5" />
+  <posXYZ  volume="BAR_ThermShield_AlongR" X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ  volume="BAR_ThermShield_AlongR" X_Y_Z=" 0.; 0.; 0." rot=" 0. ; 180. ; 180. "/>
+  <posXYZ  volume="BAR_ThermShield_Corner" X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ  volume="BAR_ThermShield_Corner" X_Y_Z=" 0.; 0.; 0." rot=" 0. ; 180. ; 180. "/>
+  <posXYZ  volume="BAR_ThermShield_Corner" X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_RadiusMax; 0.; 0." rot=" 0. ; 180. ;   0. "/>
+  <posXYZ  volume="BAR_ThermShield_Corner" X_Y_Z=" BAR_ThermShield_RadiusMin + BAR_ThermShield_RadiusMax; 0.; 0." rot=" 0. ;   0. ; 180. "/>
+</composition>
+
+<!-- End of barrel toroid thermal shielding -->
+
+<var name="AFT_BTBrktInf_BackPlate_XLong"         value="1080. " />
+<var name="AFT_BTBrktInf_BackPlate_XOff"          value=" 140. " />
+<var name="AFT_BTBrktInf_BackPlate_XGap"          value=" 190. " />
+
+<var name="AFT_BTBrktInf_BackPlate_YLong"         value=" 305. " />
+<var name="AFT_BTBrktInf_BackPlate_YAngle"        value="  22. " />
+<var name="AFT_BTBrktInf_BackPlate_YOff"          value=" 150. " />
+<var name="AFT_BTBrktInf_BackPlate_YGap"          value="  40. " />
+
+<var name="AFT_BTBrktInf_BackPlate_Thickness"     value="  20. " />
+
+<gvxysx name="AFT_BTBrktInf_BackPlate"   material="Iron" dZ="AFT_BTBrktInf_BackPlate_Thickness" >
+  <gvxy_point X_Y="AFT_BTBrktInf_BackPlate_XLong/2.-AFT_BTBrktInf_BackPlate_XOff-AFT_BTBrktInf_BackPlate_XGap; 0."/>
+  <gvxy_point X_Y="AFT_BTBrktInf_BackPlate_XLong/2.-AFT_BTBrktInf_BackPlate_XOff-AFT_BTBrktInf_BackPlate_XGap; AFT_BTBrktInf_BackPlate_YGap"/>
+  <gvxy_point X_Y="AFT_BTBrktInf_BackPlate_XLong/2.-AFT_BTBrktInf_BackPlate_XOff; AFT_BTBrktInf_BackPlate_YGap"/>
+  <gvxy_point X_Y="AFT_BTBrktInf_BackPlate_XLong/2.-AFT_BTBrktInf_BackPlate_XOff; 0."/>
+  <gvxy_point X_Y="AFT_BTBrktInf_BackPlate_XLong/2.; 0."/>
+  <gvxy_point X_Y="AFT_BTBrktInf_BackPlate_XLong/2.; AFT_BTBrktInf_BackPlate_YOff"/>
+  <gvxy_point X_Y="(AFT_BTBrktInf_BackPlate_XLong/2.)-((AFT_BTBrktInf_BackPlate_YLong-AFT_BTBrktInf_BackPlate_YOff)*tan(AFT_BTBrktInf_BackPlate_YAngle*GENV_PiS180)); AFT_BTBrktInf_BackPlate_YLong"/>
+</gvxysx>
+
+<var name="AFT_BTBrktInf_ZLength"                 value=" 280. " />
+<var name="AFT_BTBrktInf_TopCentralXLong"         value=" 590. " />
+<var name="AFT_BTBrktInf_CentralSpacerYLong"      value="  80. " />
+<var name="AFT_BTBrktInf_YSpacerTotal"            value=" 168. " />
+
+<var name="AFT_BTBrktInf_CentralSpacerOffsetX"    value=" 407. " />
+<var name="AFT_BTBrktInf_SideSpacerOffsetX"       value="  42.5" />
+
+<box name="AFT_BTBrktInf_LowCenterLongX"  material="Iron"    X_Y_Z="AFT_BTBrktInf_BackPlate_XLong-2.*(AFT_BTBrktInf_BackPlate_XOff+AFT_BTBrktInf_BackPlate_XGap); AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrktInf_ZLength" />
+<box name="AFT_BTBrktInf_LowSideLongX"    material="Iron"    X_Y_Z="AFT_BTBrktInf_BackPlate_XOff; AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrktInf_ZLength" />
+<box name="AFT_BTBrktInf_TopCenterLongX"  material="Iron"    X_Y_Z="AFT_BTBrktInf_TopCentralXLong; 2.+AFT_BTBrktInf_BackPlate_Thickness*2.; AFT_BTBrktInf_ZLength" />
+
+<box name="AFT_BTBrktInf_CtrSpacerPlate"  material="Iron"    X_Y_Z="AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrktInf_CentralSpacerYLong; AFT_BTBrktInf_ZLength" />
+<box name="AFT_BTBrktInf_MidSpacerPlate"  material="Iron"    X_Y_Z="2.*AFT_BTBrktInf_BackPlate_Thickness+2.; AFT_BTBrktInf_YSpacerTotal-2.-2.*AFT_BTBrktInf_BackPlate_Thickness-AFT_BTBrktInf_CentralSpacerYLong; AFT_BTBrktInf_ZLength" />
+<box name="AFT_BTBrktInf_SideSpacerPlate" material="Iron"    X_Y_Z="AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrktInf_YSpacerTotal; AFT_BTBrktInf_ZLength" />
+
+<composition name="AFT_BTBrktInf">
+  <posXYZ  volume="AFT_BTBrktInf_BackPlate"         X_Y_Z=" 0.; 0.; AFT_BTBrktInf_BackPlate_Thickness/2.+AFT_BTBrktInf_ZLength" />
+  <posXYZ  volume="AFT_BTBrktInf_LowCenterLongX"    X_Y_Z=" 0.; AFT_BTBrktInf_BackPlate_Thickness/2.; AFT_BTBrktInf_ZLength/2." />
+  <posXYZ  volume="AFT_BTBrktInf_LowSideLongX"      X_Y_Z=" (AFT_BTBrktInf_BackPlate_XLong-AFT_BTBrktInf_BackPlate_XOff)/2.; AFT_BTBrktInf_BackPlate_Thickness/2.; AFT_BTBrktInf_ZLength/2." />
+  <posXYZ  volume="AFT_BTBrktInf_LowSideLongX"      X_Y_Z=" -(AFT_BTBrktInf_BackPlate_XLong-AFT_BTBrktInf_BackPlate_XOff)/2.; AFT_BTBrktInf_BackPlate_Thickness/2.; AFT_BTBrktInf_ZLength/2." />
+  <posXYZ  volume="AFT_BTBrktInf_TopCenterLongX"    X_Y_Z=" 0.; AFT_BTBrktInf_CentralSpacerYLong+2.*AFT_BTBrktInf_BackPlate_Thickness+1.; AFT_BTBrktInf_ZLength/2." />
+  <posXYZ  volume="AFT_BTBrktInf_CtrSpacerPlate"    X_Y_Z="-AFT_BTBrktInf_BackPlate_XLong/2.+AFT_BTBrktInf_CentralSpacerOffsetX+AFT_BTBrktInf_BackPlate_Thickness/2.; AFT_BTBrktInf_CentralSpacerYLong/2.+AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrktInf_ZLength/2." />
+  <posXYZ  volume="AFT_BTBrktInf_CtrSpacerPlate"    X_Y_Z=" AFT_BTBrktInf_BackPlate_XLong/2.-AFT_BTBrktInf_CentralSpacerOffsetX-AFT_BTBrktInf_BackPlate_Thickness/2.; AFT_BTBrktInf_CentralSpacerYLong/2.+AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrktInf_ZLength/2." />
+  <posXYZ  volume="AFT_BTBrktInf_MidSpacerPlate"    X_Y_Z="-AFT_BTBrktInf_TopCentralXLong/2.+AFT_BTBrktInf_BackPlate_Thickness+1.; (AFT_BTBrktInf_YSpacerTotal+AFT_BTBrktInf_CentralSpacerYLong)/2.+2.*AFT_BTBrktInf_BackPlate_Thickness+1.; AFT_BTBrktInf_ZLength/2." />
+  <posXYZ  volume="AFT_BTBrktInf_MidSpacerPlate"    X_Y_Z=" AFT_BTBrktInf_TopCentralXLong/2.-AFT_BTBrktInf_BackPlate_Thickness-1.; (AFT_BTBrktInf_YSpacerTotal+AFT_BTBrktInf_CentralSpacerYLong)/2.+2.*AFT_BTBrktInf_BackPlate_Thickness+1.; AFT_BTBrktInf_ZLength/2." />
+  <posXYZ  volume="AFT_BTBrktInf_SideSpacerPlate"   X_Y_Z="-AFT_BTBrktInf_BackPlate_XLong/2.+AFT_BTBrktInf_BackPlate_XOff-AFT_BTBrktInf_BackPlate_Thickness/2.; AFT_BTBrktInf_YSpacerTotal/2.+AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrktInf_ZLength/2." />
+  <posXYZ  volume="AFT_BTBrktInf_SideSpacerPlate"   X_Y_Z="-AFT_BTBrktInf_BackPlate_XLong/2.+AFT_BTBrktInf_SideSpacerOffsetX; AFT_BTBrktInf_YSpacerTotal/2.+AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrktInf_ZLength/2." />
+  <posXYZ  volume="AFT_BTBrktInf_SideSpacerPlate"   X_Y_Z=" AFT_BTBrktInf_BackPlate_XLong/2.-AFT_BTBrktInf_BackPlate_XOff+AFT_BTBrktInf_BackPlate_Thickness/2.; AFT_BTBrktInf_YSpacerTotal/2.+AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrktInf_ZLength/2." />
+  <posXYZ  volume="AFT_BTBrktInf_SideSpacerPlate"   X_Y_Z=" AFT_BTBrktInf_BackPlate_XLong/2.-AFT_BTBrktInf_SideSpacerOffsetX; AFT_BTBrktInf_YSpacerTotal/2.+AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrktInf_ZLength/2." />
+</composition>
+
+<var name="AFT_BTBrkt_BackPlate_XLong"            value=" 955. " />
+<var name="AFT_BTBrkt_BackPlate_XShort"           value=" 545. " />
+<var name="AFT_BTBrkt_BackPlate_YLong"            value=" 183. " />
+<var name="AFT_BTBrkt_BackPlate_YShort"           value="  86. " />
+
+<gvxysx name="AFT_BTBrkt_BackPlate"   material="Iron" dZ="AFT_BTBrktInf_BackPlate_Thickness" >
+  <gvxy_point X_Y="AFT_BTBrkt_BackPlate_XShort/2.; 0."/>
+  <gvxy_point X_Y="AFT_BTBrkt_BackPlate_XShort/2.; AFT_BTBrkt_BackPlate_YShort-AFT_BTBrktInf_BackPlate_Thickness"/>
+  <gvxy_point X_Y="AFT_BTBrkt_BackPlate_XLong/2.+(AFT_BTBrkt_BackPlate_YLong-AFT_BTBrkt_BackPlate_YShort+AFT_BTBrktInf_BackPlate_Thickness)*tan(AFT_BTBrktInf_BackPlate_YAngle*GENV_PiS180); AFT_BTBrkt_BackPlate_YShort-AFT_BTBrktInf_BackPlate_Thickness"/>
+  <gvxy_point X_Y="AFT_BTBrkt_BackPlate_XLong/2.; AFT_BTBrkt_BackPlate_YLong"/>
+</gvxysx>
+
+<var name="AFT_BTBrkt_SidePlateXLength"           value=" 235. " />
+<var name="AFT_BTBrkt_CentralPlateXLength"        value=" 546. " />
+<var name="AFT_BTBrkt_ZLength"                    value=" 260. " />
+
+<box name="AFT_BTBrkt_SideLongX"     material="Iron"    X_Y_Z="AFT_BTBrkt_SidePlateXLength+AFT_BTBrktInf_BackPlate_Thickness; 2.*AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrkt_ZLength"/>
+
+<var name="AFT_BTBrkt_CtrSpacerPlate_XShort"      value="  10. " />
+<var name="AFT_BTBrkt_CtrSpacerPlate_YLong"       value=" 308. " />
+
+<var name="AFT_BTBrkt_MidSpacerPlate_XShort"      value="   9. " />
+<var name="AFT_BTBrkt_MidSpacerPlate_YLong"       value=" 378. " />
+
+<var name="AFT_BTBrkt_SideSpacerPlate_XShort"     value="  15.5" />
+<var name="AFT_BTBrkt_SideSpacerPlate_XLong"      value=" 820. " />
+<var name="AFT_BTBrkt_SideSpacerPlate_YShort"     value=" 125. " />
+<var name="AFT_BTBrkt_SideSpacerPlate_YLong"      value=" 530. " />
+<var name="AFT_BTBrkt_SideSpacerPlate_XDist"      value=" 457. " />
+
+<gvxy name="AFT_BTBrkt_CtrSpacerPlate"   material="Iron" dZ="AFT_BTBrktInf_BackPlate_Thickness" >
+  <gvxy_point X_Y="                                0.; 0."/>
+  <gvxy_point X_Y="               AFT_BTBrkt_ZLength; 0."/>
+  <gvxy_point X_Y="               AFT_BTBrkt_ZLength; AFT_BTBrkt_CtrSpacerPlate_YLong-AFT_BTBrkt_ZLength+AFT_BTBrkt_CtrSpacerPlate_XShort"/>
+  <gvxy_point X_Y=" AFT_BTBrkt_CtrSpacerPlate_XShort; AFT_BTBrkt_CtrSpacerPlate_YLong"/>
+  <gvxy_point X_Y="                                0.; AFT_BTBrkt_CtrSpacerPlate_YLong"/>
+</gvxy>
+
+<gvxy name="AFT_BTBrkt_MidSpacerPlate"   material="Iron" dZ="AFT_BTBrktInf_BackPlate_Thickness" >
+  <gvxy_point X_Y="                                0.; AFT_BTBrktInf_YSpacerTotal-2.-AFT_BTBrktInf_CentralSpacerYLong"/>
+  <gvxy_point X_Y="               AFT_BTBrkt_ZLength; AFT_BTBrktInf_YSpacerTotal-2.-AFT_BTBrktInf_CentralSpacerYLong"/>
+  <gvxy_point X_Y="               AFT_BTBrkt_ZLength; AFT_BTBrkt_MidSpacerPlate_YLong-AFT_BTBrkt_ZLength+AFT_BTBrkt_MidSpacerPlate_XShort"/>
+  <gvxy_point X_Y=" AFT_BTBrkt_MidSpacerPlate_XShort; AFT_BTBrkt_MidSpacerPlate_YLong"/>
+  <gvxy_point X_Y="                                0.; AFT_BTBrkt_MidSpacerPlate_YLong"/>
+</gvxy>
+
+<gvxy name="AFT_BTBrkt_SideSpacerPlate"   material="Iron" dZ="AFT_BTBrktInf_BackPlate_Thickness" >
+  <gvxy_point X_Y="                                                                                                      0.; 0."/>
+  <gvxy_point X_Y="                                                                       AFT_BTBrkt_SideSpacerPlate_XLong; 0."/>
+  <gvxy_point X_Y="                                                                       AFT_BTBrkt_SideSpacerPlate_XLong; AFT_BTBrkt_SideSpacerPlate_YShort"/>
+  <gvxy_point X_Y=" AFT_BTBrkt_SideSpacerPlate_XShort+AFT_BTBrkt_SideSpacerPlate_YLong-AFT_BTBrkt_SideSpacerPlate_YShort; AFT_BTBrkt_SideSpacerPlate_YShort"/>
+  <gvxy_point X_Y="                                                                      AFT_BTBrkt_SideSpacerPlate_XShort; AFT_BTBrkt_SideSpacerPlate_YLong"/>
+  <gvxy_point X_Y="                                                                                                      0.; AFT_BTBrkt_SideSpacerPlate_YLong"/>
+</gvxy>
+
+<var name="AFT_BTBrkt_FrontTube_StartAngle"      value=" 195. " />
+<var name="AFT_BTBrkt_FrontTube_Angle"           value="  70. " />
+<var name="AFT_BTBrkt_FrontTube_Radius"          value=" 550. " />
+<var name="AFT_BTBrkt_FrontTube_ZLength"         value=" 250. " />
+<var name="AFT_BTBrkt_FrontTube_YOffset"         value=" 558. " />
+<var name="AFT_BTBrkt_BackTube_ZLength"          value=" 700. " />
+<var name="AFT_BTBrkt_BackTube_StartAngle"       value=" 190. " />
+<var name="AFT_BTBrkt_BackTube_YOffset"          value=" 226. " />
+
+<tubs name="AFT_BTBrkt_FrontTube" material="Iron"  Rio_Z="AFT_BTBrkt_FrontTube_Radius; AFT_BTBrkt_FrontTube_Radius+AFT_BTBrktInf_BackPlate_Thickness/2. ; AFT_BTBrkt_FrontTube_ZLength"  profile="AFT_BTBrkt_FrontTube_StartAngle; AFT_BTBrkt_FrontTube_Angle"  nbPhi="20"   />
+<tubs name="AFT_BTBrkt_BackTube"  material="Iron"  Rio_Z="AFT_BTBrkt_FrontTube_Radius; AFT_BTBrkt_FrontTube_Radius+AFT_BTBrktInf_BackPlate_Thickness/2. ; AFT_BTBrkt_BackTube_ZLength"   profile="AFT_BTBrkt_BackTube_StartAngle; AFT_BTBrkt_FrontTube_Angle"   nbPhi="20"   />
+
+<var name="AFT_BTBrkt_BackTube_PosOff" value=" (AFT_BTBrkt_FrontTube_Radius+AFT_BTBrktInf_BackPlate_Thickness/2.)*cos(asin((AFT_BTBrktInf_BackPlate_XLong/2.-AFT_BTBrktInf_CentralSpacerOffsetX-AFT_BTBrktInf_BackPlate_Thickness)/(AFT_BTBrkt_FrontTube_Radius+AFT_BTBrktInf_BackPlate_Thickness/2.)))*GENV_Si45"/>
+
+<var name="AFT_BTBrkt_FrontPlate_ZOffset"        value="  10. " />
+<var name="AFT_BTBrkt_FrontPlate_ZGap"           value=" 190. " />
+<var name="AFT_BTBrkt_FrontPlate_XWidth"         value=" 115. " />
+<var name="AFT_BTBrkt_FrontPlate_YHight"         value=" 120. " />
+
+<tubs name="AFT_BTBrkt_FrontPlate_SubTube"  material="Iron"  Rio_Z="0.; AFT_BTBrkt_FrontTube_Radius+AFT_BTBrktInf_BackPlate_Thickness/2.+GENV_Eps ; AFT_BTBrkt_BackTube_ZLength" profile=" 300.; 70." nbPhi="50"   />
+<box name="AFT_BTBrkt_FrontPlate_Full"      material="Iron"  X_Y_Z="AFT_BTBrkt_FrontPlate_XWidth; AFT_BTBrkt_FrontPlate_YHight; AFT_BTBrktInf_BackPlate_Thickness" />
+
+<subtraction name="AFT_BTBrkt_FrontPlate"> 
+ <posXYZ  volume="AFT_BTBrkt_FrontPlate_Full"      X_Y_Z=" AFT_BTBrkt_SideSpacerPlate_XDist-AFT_BTBrkt_FrontPlate_XWidth/2.; AFT_BTBrkt_BackPlate_YShort+AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrkt_FrontPlate_YHight/2.; 0."/>
+ <posXYZ  volume="AFT_BTBrkt_FrontPlate_SubTube"   X_Y_Z=" 0.; AFT_BTBrkt_FrontTube_YOffset; 0." />
+</subtraction>
+
+<composition name="AFT_BTBrkt">
+  <!-- the following "AFT_BTBrkt_BackPlate" volume creates clashes with other barrel toroid volumes. A quick check showed that
+       removing this volume makes the barrel toroid description clash free, so this should be investigated -->
+  <posXYZ  volume="AFT_BTBrkt_BackPlate"            X_Y_Z=" 0.; 2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal-AFT_BTBrkt_BackPlate_YShort; AFT_BTBrkt_ZLength+AFT_BTBrktInf_BackPlate_Thickness/2."/>
+  <posXYZ  volume="AFT_BTBrkt_SideLongX"            X_Y_Z="-(AFT_BTBrkt_CentralPlateXLength+AFT_BTBrkt_SidePlateXLength-AFT_BTBrktInf_BackPlate_Thickness)/2.; 1.5*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal+AFT_BTBrktInf_BackPlate_Thickness/2.; AFT_BTBrkt_ZLength/2."/>
+  <posXYZ  volume="AFT_BTBrkt_SideLongX"            X_Y_Z=" (AFT_BTBrkt_CentralPlateXLength+AFT_BTBrkt_SidePlateXLength-AFT_BTBrktInf_BackPlate_Thickness)/2.; 1.5*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal+AFT_BTBrktInf_BackPlate_Thickness/2.; AFT_BTBrkt_ZLength/2."/>
+  <posXYZ  volume="AFT_BTBrkt_CtrSpacerPlate"       X_Y_Z="-AFT_BTBrktInf_BackPlate_XLong/2.+AFT_BTBrktInf_CentralSpacerOffsetX+AFT_BTBrktInf_BackPlate_Thickness/2.; 2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal-AFT_BTBrkt_BackPlate_YShort+AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrkt_ZLength" rot=" 0.; 90.; 0."/>
+  <posXYZ  volume="AFT_BTBrkt_CtrSpacerPlate"       X_Y_Z=" AFT_BTBrktInf_BackPlate_XLong/2.-AFT_BTBrktInf_CentralSpacerOffsetX-AFT_BTBrktInf_BackPlate_Thickness/2.; 2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal-AFT_BTBrkt_BackPlate_YShort+AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrkt_ZLength" rot=" 0.; 90.; 0."/>
+  <posXYZ  volume="AFT_BTBrkt_MidSpacerPlate"       X_Y_Z="-(AFT_BTBrkt_CentralPlateXLength-AFT_BTBrktInf_BackPlate_Thickness)/2.; 2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal-AFT_BTBrkt_BackPlate_YShort+AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrkt_ZLength" rot=" 0.; 90.; 0."/>
+  <posXYZ  volume="AFT_BTBrkt_MidSpacerPlate"       X_Y_Z=" (AFT_BTBrkt_CentralPlateXLength-AFT_BTBrktInf_BackPlate_Thickness)/2.; 2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal-AFT_BTBrkt_BackPlate_YShort+AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrkt_ZLength" rot=" 0.; 90.; 0."/>
+  <posXYZ  volume="AFT_BTBrkt_SideSpacerPlate"      X_Y_Z="-AFT_BTBrkt_SideSpacerPlate_XDist-AFT_BTBrktInf_BackPlate_Thickness/2.; 2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal+AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrkt_ZLength" rot=" 0.; 90.; 0."/>
+  <posXYZ  volume="AFT_BTBrkt_SideSpacerPlate"      X_Y_Z=" AFT_BTBrkt_SideSpacerPlate_XDist+AFT_BTBrktInf_BackPlate_Thickness/2.; 2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal+AFT_BTBrktInf_BackPlate_Thickness; AFT_BTBrkt_ZLength" rot=" 0.; 90.; 0."/>
+  <posXYZ  volume="AFT_BTBrkt_FrontTube"            X_Y_Z=" 0.; 2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal-AFT_BTBrkt_BackPlate_YShort+AFT_BTBrkt_FrontTube_YOffset; AFT_BTBrkt_ZLength-AFT_BTBrkt_SideSpacerPlate_XLong+AFT_BTBrkt_FrontTube_ZLength/2." />
+  <posXYZ  volume="AFT_BTBrkt_FrontTube"            X_Y_Z=" 0.; 2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal-AFT_BTBrkt_BackPlate_YShort+AFT_BTBrkt_FrontTube_YOffset; AFT_BTBrkt_ZLength-AFT_BTBrkt_SideSpacerPlate_XLong+AFT_BTBrkt_FrontTube_ZLength/2." rot=" 0.; 0.; 80."/>
+  <posXYZ  volume="AFT_BTBrkt_BackTube"             X_Y_Z=" 0.; 3.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal-AFT_BTBrkt_BackPlate_YShort+AFT_BTBrkt_CtrSpacerPlate_YLong+AFT_BTBrkt_BackTube_PosOff+(AFT_BTBrkt_BackTube_ZLength/2.-AFT_BTBrkt_BackTube_YOffset)*GENV_Si45; AFT_BTBrkt_ZLength-AFT_BTBrkt_CtrSpacerPlate_XShort-AFT_BTBrkt_BackTube_PosOff+(AFT_BTBrkt_BackTube_ZLength/2.-AFT_BTBrkt_BackTube_YOffset)*GENV_Si45" rot=" -45.;  0.;  0."/>
+  <posXYZ  volume="AFT_BTBrkt_BackTube"             X_Y_Z=" 0.; 3.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal-AFT_BTBrkt_BackPlate_YShort+AFT_BTBrkt_CtrSpacerPlate_YLong+AFT_BTBrkt_BackTube_PosOff+(AFT_BTBrkt_BackTube_ZLength/2.-AFT_BTBrkt_BackTube_YOffset)*GENV_Si45; AFT_BTBrkt_ZLength-AFT_BTBrkt_CtrSpacerPlate_XShort-AFT_BTBrkt_BackTube_PosOff+(AFT_BTBrkt_BackTube_ZLength/2.-AFT_BTBrkt_BackTube_YOffset)*GENV_Si45" rot="   0.; 45.; 90."/>
+  <posXYZ  volume="AFT_BTBrkt_FrontPlate"           X_Y_Z=" 0.; 2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal-AFT_BTBrkt_BackPlate_YShort; AFT_BTBrkt_ZLength-AFT_BTBrkt_SideSpacerPlate_XLong+AFT_BTBrktInf_BackPlate_Thickness/2.+AFT_BTBrkt_FrontPlate_ZOffset" />
+  <posXYZ  volume="AFT_BTBrkt_FrontPlate"           X_Y_Z=" 0.; 2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal-AFT_BTBrkt_BackPlate_YShort; AFT_BTBrkt_ZLength-AFT_BTBrkt_SideSpacerPlate_XLong+AFT_BTBrktInf_BackPlate_Thickness/2.+AFT_BTBrkt_FrontPlate_ZOffset+AFT_BTBrkt_FrontPlate_ZGap+AFT_BTBrktInf_BackPlate_Thickness" />
+  <posXYZ  volume="AFT_BTBrkt_FrontPlate"           X_Y_Z=" 0.; 2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal-AFT_BTBrkt_BackPlate_YShort; AFT_BTBrkt_ZLength-AFT_BTBrkt_SideSpacerPlate_XLong+AFT_BTBrktInf_BackPlate_Thickness/2.+AFT_BTBrkt_FrontPlate_ZOffset" rot=" 0.; 180.; 0." />
+  <posXYZ  volume="AFT_BTBrkt_FrontPlate"           X_Y_Z=" 0.; 2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrktInf_YSpacerTotal-AFT_BTBrkt_BackPlate_YShort; AFT_BTBrkt_ZLength-AFT_BTBrkt_SideSpacerPlate_XLong+AFT_BTBrktInf_BackPlate_Thickness/2.+AFT_BTBrkt_FrontPlate_ZOffset+AFT_BTBrkt_FrontPlate_ZGap+AFT_BTBrktInf_BackPlate_Thickness" rot=" 0.; 180.; 0." />
+</composition>
+
+<var name="AFT_BTBrkt_Cryotubethickness"    value="AFT_BTBrkt_FrontTube_YOffset+2.-AFT_BTBrkt_FrontTube_Radius" />
+<var name="AFT_BTBrkt_CryotubeouterRadius"  value="AFT_BTBrkt_FrontTube_YOffset+2." />
+<var name="AFT_BTBrkt_CtrSpacerXOffset"     value="AFT_BTBrktInf_BackPlate_XLong/2.-AFT_BTBrktInf_CentralSpacerOffsetX-AFT_BTBrktInf_BackPlate_Thickness" />
+
+<var name="AFT_BTBrkt_PositioningParameter" value="(AFT_BTBrktInf_BackPlate_Thickness-AFT_BTBrkt_Cryotubethickness+2.-AFT_BTBrkt_ZLength+AFT_BTBrkt_CtrSpacerPlate_YLong+AFT_BTBrkt_Cryotubethickness)*GENV_Si45-(AFT_BTBrkt_CryotubeouterRadius-sqrt(AFT_BTBrkt_CryotubeouterRadius*AFT_BTBrkt_CryotubeouterRadius-AFT_BTBrkt_CtrSpacerXOffset*AFT_BTBrkt_CtrSpacerXOffset))+AFT_BTBrkt_Cryotubethickness" />
+
+<composition name="AFT_BTBrkt_final" >
+  <posXYZ  volume="AFT_BTBrkt"       X_Y_Z=" 0.; -(AFT_BTBrktInf_CentralSpacerYLong+2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrkt_Cryotubethickness); 2.*GENV_Si45*AFT_BTBrkt_PositioningParameter" />
+  <posXYZ  volume="AFT_BTBrktInf"    X_Y_Z=" 0.; -(AFT_BTBrktInf_CentralSpacerYLong+2.*AFT_BTBrktInf_BackPlate_Thickness+AFT_BTBrkt_Cryotubethickness); 2.*GENV_Si45*AFT_BTBrkt_PositioningParameter" />
+</composition>
+
+<composition  name="BAR_CryoTubCorner_AFT" >
+  <posXYZ  volume="BAR_CryoTubCorner" X_Y_Z=" 0.; 0. ; 0." />
+  <posXYZ  volume="AFT_BTBrkt_final"    X_Y_Z=" ABRT_CryoRmin - 10.*GENV_Eps; 0.; ABRT_CryoZmax - ABRT_CryoRadi_Radius - ABRT_CryoRcur/sqrt(2.) + GENV_Ta225*ABRT_CryoRadi_Radius + 10.*GENV_Eps" rot=" 0. ; 0. ; -90. "/>
+</composition>
+
+<!-- CryoRib with cuts -->
+<subtraction  name="BAR_CryoRib" >
+  <posXYZ  volume="BAR_CryoRibOut"  X_Y_Z=" (ABRT_CryoRmax + ABRT_CryoRmin)/2. ; 0. ; 0. " />
+  <posXYZ  volume="BAR_CryoRibIn"   X_Y_Z=" (ABRT_CryoRmax + ABRT_CryoRmin)/2. ; 0. ; 0. " />
+  <posXYZ  volume="BAR_CryoTubCut"  X_Y_Z=" ABRT_CryoRmax - ABRT_CryoRadi_Radius - 10.*GENV_Eps; 0. ; 0. " />
+  <posXYZ  volume="BAR_CryoTubCut"  X_Y_Z=" ABRT_CryoRmin + ABRT_CryoRadi_Radius + 10.*GENV_Eps; 0. ; 0. " />
+</subtraction>
+
+<!-- CryoAtt with cuts -->
+<subtraction  name="BAR_CryoAtt" >
+  <posXYZ  volume="BAR_CryoAttOut"   X_Y_Z=" ABRT_CryAttRx_CryoAttRmax ; 0. ; 0. " rot=" 0. ;  90. ; 0. "/>
+  <posXYZ  volume="BAR_CryoAttIn"    X_Y_Z=" ABRT_CryAttRx_CryoAttRmax ; 0. ; 0. " rot=" 0. ;  90. ; 0. "/>
+  <posXYZ  volume="BAR_CryoTubCut"   X_Y_Z=" ABRT_CryoRmin + ABRT_CryoRadi_Radius + 10.*GENV_Eps; 0. ; 0. " />
+</subtraction>
+
+<!-- CryoRing with cuts -->
+<tubs  name="BAR_CryoRingA"   material="Iron1"  Rio_Z=" ABRT_CryRngRa_CryoRingRadius-ABRT_CryoRadT_RadThick ; ABRT_CryRngRa_CryoRingRadius ; 2.*ABRT_CryRngRm_CryoRingRmed*GENV_Ta225 "    nbPhi="20" />
+<subtraction  name="BAR_CryoRing" >
+  <posXYZ  volume="BAR_CryoRingA" />
+  <posXYZ  volume="BAR_CryoTubCut"  X_Y_Z=" (ABRT_CryoRmax-ABRT_CryoRadi_Radius)*GENV_Co225-ABRT_CryRngRm_CryoRingRmed ; 0. ;  (ABRT_CryoRmax-ABRT_CryoRadi_Radius)*GENV_Si225 "  rot=" 90. ; 0. ; 0. " />
+  <posXYZ  volume="BAR_CryoTubCut"  X_Y_Z=" (ABRT_CryoRmax-ABRT_CryoRadi_Radius)*GENV_Co225-ABRT_CryRngRm_CryoRingRmed ; 0. ; -(ABRT_CryoRmax-ABRT_CryoRadi_Radius)*GENV_Si225 "  rot=" 90. ; 0. ; 0. " />
+</subtraction>
+
+<composition  name="BAR_CryoTub_Sector" >
+  <posXYZ  volume="BAR_CryoTubAlongZ_Down" />
+  <posXYZ  volume="BAR_CryoTubAlongZ_Up" />
+  <posXYZ  volume="BAR_CryoTubAlongR_Plus" X_Y_Z=" 0.; 0.; 0."                             />
+  <posXYZ  volume="BAR_CryoTubAlongR_Plus" X_Y_Z=" ABRT_CryoRmin + ABRT_CryoRmax; 0.; 0." rot=" 0. ; 180. ; 0. "/>
+  <posXYZ  volume="BAR_CryoTubCorner_AFT"      X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ  volume="BAR_CryoTubCorner_AFT"      X_Y_Z=" 0.; 0.; 0." rot=" 0. ; 180. ; 180. "/>
+  <posXYZ  volume="BAR_CryoTubCorner"      X_Y_Z=" ABRT_CryoRmin + ABRT_CryoRmax; 0.; 0." rot=" 0. ; 180. ; 0. "/>
+  <posXYZ  volume="BAR_CryoTubCorner"      X_Y_Z="-GENV_Ta225*ABRT_CryoRadi_Radius*(1.+sqrt(2.)) + ABRT_CryoRmax - ABRT_CryoZmax + ABRT_CryoRadi_Radius; 0.;  GENV_Ta225*ABRT_CryoRadi_Radius*(1.+sqrt(2.)) + ABRT_CryoRmin + ABRT_CryoZmax - ABRT_CryoRadi_Radius" rot=" 0. ;  90. ; 0. "/>
+  <posXYZ  volume="BAR_CryoRing"           X_Y_Z=" ABRT_CryRngRm_CryoRingRmed*GENV_Co225 ; -ABRT_CryRngRm_CryoRingRmed*GENV_Si225 ; ABRT_CryRngZm_CryoRingZmed "  rot=" 90. ; 0. ; -22.5 " />
+  <foreach  index="Irib"  begin="0"  loops="7" >
+    <posXYZ  volume="BAR_CryoRibWing" X_Y_Z=" ABRT_CryoRmin+2.*ABRT_CryoRadi_Radius ; 0. ; ABRT_Zrib[Irib] "  rot=" 0. ; 0. ; -90. " />
+    <posXYZ  volume="BAR_CryoRibWing" X_Y_Z=" ABRT_CryoRmax-2.*ABRT_CryoRadi_Radius ; 0. ; ABRT_Zrib[Irib] "  rot=" 0. ; 0. ;  90. " />
+    <posXYZ  volume="BAR_CryoRib"     X_Y_Z=" 0.; 0.; ABRT_Zrib[Irib]"  rot=" 0. ; 0. ; 0. " />
+  </foreach>
+  <foreach  index="Ivouss"  begin="0"  loops="8" >
+    <posXYZ  volume="BAR_CryoAttWing" X_Y_Z=" ABRT_CryoRmin+ABRT_CryoRadi_Radius ; 0. ; ABRT_Zvouss[Ivouss] "  rot=" 0. ; 0. ; -90. " />
+    <posXYZ  volume="BAR_CryoAtt"     X_Y_Z=" 0.; 0.; ABRT_Zvouss[Ivouss]"  rot=" 0. ; 0. ; 0. " />
+  </foreach>
+</composition>
+
+
+<!--  Description of an Atlas Barrel toroid Strut  -->
+
+<gvxysx  name="BAR_StrutWingFull"  material="Iron4"  dZ="ABRT_StrWZthi_StrutWingZthick"  >
+  <gvxy_point  X_Y=" ABRT_StrWYmax_StrutWingYmax ; ABRT_StrWRmax_StrutWingRmax " />
+  <gvxy_point  X_Y=" ABRT_StrWYmed_StrutWingYmedi; ABRT_StrWRmed_StrutWingRmedi " />
+  <gvxy_point  X_Y=" ABRT_StrWYlow_StrutWingYlower; ABRT_StrWRlow_StrutWingRlower " />
+  <gvxy_point  X_Y=" ABRT_StrWYmin_StrutWingYmin ; ABRT_StrWRmin_StrutWingRmin " />
+</gvxysx>
+<box  name="BAR_StrutWingUpCut" material="Aluminium1"  X_Y_Z=" 2*ABRT_StrWYucu_StrutWingYupcut; ABRT_StrWYucu_StrutWingYupcut; ABRT_StrWYucu_StrutWingYupcut" />
+<subtraction  name="BAR_StrutWing" >
+  <posXYZ  volume="BAR_StrutWingFull" />
+  <posXYZ  volume="BAR_CryoTubCut"  X_Y_Z=" 0. ; ABRT_CryoRmax - ABRT_CryoRadi_Radius - 5.*GENV_Eps ; 0. " />
+  <posXYZ  volume="BAR_StrutWingUpCut" X_Y_Z=" 0. ; ABRT_CryoRmax ; 0. "/>
+</subtraction>
+<box  name="BAR_StrutWingBigSidePlate"   material="Iron1"       X_Y_Z=" ABRT_StrWYthi_StrutWingYthick ; ABRT_StrWBPhi_StrutWingBigPlateheight ; ABRT_StrWBPth_StrutWingBigPlatethick " />
+<box  name="BAR_StrutWingTopPlate"       material="Iron1"       X_Y_Z=" 2. * ABRT_StrWYmax_StrutWingYmax; ABRT_StrWZthi_StrutWingZthick ; ABRT_StrWSPth_StrutWingSmallPlatethick " />
+<box  name="BAR_StrutWingBottomPlate"    material="Iron1"       X_Y_Z=" 2. * ABRT_StrWYmin_StrutWingYmin; ABRT_StrWZthi_StrutWingZthick ; ABRT_StrWSPth_StrutWingSmallPlatethick " />
+<box  name="BAR_StrutWingUpperSidePlate" material="Iron1"       X_Y_Z=" (ABRT_StrWYmed_StrutWingYmedi-ABRT_StrWYmax_StrutWingYmax)/(cos(ABRT_StrWAupp_StrutWingAupper ))- ABRT_StrWZthi_StrutWingZthick; ABRT_StrWZthi_StrutWingZthick ; ABRT_StrWSPth_StrutWingSmallPlatethick " />
+<box  name="BAR_StrutWingLowerSidePlate" material="Iron1"       X_Y_Z=" (ABRT_StrWYlow_StrutWingYlower-ABRT_StrWYmin_StrutWingYmin)/(cos(ABRT_StrWAlow_StrutWingAlower )) - ABRT_StrWZthi_StrutWingZthick; ABRT_StrWZthi_StrutWingZthick ; ABRT_StrWSPth_StrutWingSmallPlatethick " />
+<union  name="BAR_StrutWingBox" >
+  <posXYZ  volume="BAR_StrutWing"       X_Y_Z=" 0. ; 0. ; -ABRT_StrWZlen_StrutWingZlen/2. " />
+  <posXYZ  volume="BAR_StrutWing"       X_Y_Z=" 0. ; 0. ; +ABRT_StrWZlen_StrutWingZlen/2. " />
+  <posXYZ  volume="BAR_StrutWingBigSidePlate"  X_Y_Z="   (ABRT_StrWYRli_StrutWingYRlink + ABRT_StrWYthi_StrutWingYthick/2. )*GENV_Co225; ABRT_StrWRmax_StrutWingRmax-ABRT_CryoRadi_Radius-(ABRT_StrWYRli_StrutWingYRlink + ABRT_StrWYthi_StrutWingYthick/2.)*GENV_Si225; 0. "  rot=" 0. ; 0. ; -22.5" />
+  <posXYZ  volume="BAR_StrutWingBigSidePlate"  X_Y_Z=" (- ABRT_StrWYRli_StrutWingYRlink - ABRT_StrWYthi_StrutWingYthick/2. )*GENV_Co225; ABRT_StrWRmax_StrutWingRmax-ABRT_CryoRadi_Radius-(ABRT_StrWYRli_StrutWingYRlink + ABRT_StrWYthi_StrutWingYthick/2.)*GENV_Si225; 0. "  rot=" 0. ; 0. ;  22.5" />
+  <posXYZ  volume="BAR_StrutWingTopPlate"        X_Y_Z=" 0. ; ABRT_StrWRmax_StrutWingRmax+ABRT_StrWZthi_StrutWingZthick/2.+GENV_Eps ; 0. " />
+  <posXYZ  volume="BAR_StrutWingBottomPlate"     X_Y_Z=" 0. ;ABRT_StrWRmin_StrutWingRmin-ABRT_StrWZthi_StrutWingZthick/2. ; 0. " />
+  <posXYZ  volume="BAR_StrutWingUpperSidePlate"  X_Y_Z=" (-ABRT_StrWYmed_StrutWingYmedi - ABRT_StrWYmax_StrutWingYmax - ABRT_StrWZthi_StrutWingZthick*(sin(ABRT_StrWAupp_StrutWingAupper) - cos(ABRT_StrWAupp_StrutWingAupper)))/2.; (ABRT_StrWRmax_StrutWingRmax + ABRT_StrWRmed_StrutWingRmedi + ABRT_StrWZthi_StrutWingZthick*(sin(ABRT_StrWAupp_StrutWingAupper) + cos(ABRT_StrWAupp_StrutWingAupper)))/2.; 0. "  rot=" 0. ; 0. ;  ABRT_StrWAupp_StrutWingAupper/GENV_PiS180" />
+  <posXYZ  volume="BAR_StrutWingUpperSidePlate"  X_Y_Z=" ( ABRT_StrWYmed_StrutWingYmedi + ABRT_StrWYmax_StrutWingYmax + ABRT_StrWZthi_StrutWingZthick*(sin(ABRT_StrWAupp_StrutWingAupper) - cos(ABRT_StrWAupp_StrutWingAupper)))/2.; (ABRT_StrWRmax_StrutWingRmax + ABRT_StrWRmed_StrutWingRmedi + ABRT_StrWZthi_StrutWingZthick*(sin(ABRT_StrWAupp_StrutWingAupper) + cos(ABRT_StrWAupp_StrutWingAupper)))/2.; 0. "  rot=" 0. ; 0. ; -ABRT_StrWAupp_StrutWingAupper/GENV_PiS180" />
+  <posXYZ  volume="BAR_StrutWingLowerSidePlate"  X_Y_Z=" ( ABRT_StrWYlow_StrutWingYlower + ABRT_StrWYmin_StrutWingYmin + ABRT_StrWZthi_StrutWingZthick*(sin(ABRT_StrWAlow_StrutWingAlower) - cos(ABRT_StrWAlow_StrutWingAlower)))/2.; (ABRT_StrWRlow_StrutWingRlower+ABRT_StrWRmin_StrutWingRmin - ABRT_StrWZthi_StrutWingZthick*(sin(ABRT_StrWAlow_StrutWingAlower) + cos(ABRT_StrWAlow_StrutWingAlower)))/2. ; 0. "  rot=" 0. ; 0. ;  ABRT_StrWAlow_StrutWingAlower/GENV_PiS180" />
+  <posXYZ  volume="BAR_StrutWingLowerSidePlate"  X_Y_Z=" (-ABRT_StrWYlow_StrutWingYlower - ABRT_StrWYmin_StrutWingYmin - ABRT_StrWZthi_StrutWingZthick*(sin(ABRT_StrWAlow_StrutWingAlower) - cos(ABRT_StrWAlow_StrutWingAlower)))/2.; (ABRT_StrWRlow_StrutWingRlower+ABRT_StrWRmin_StrutWingRmin - ABRT_StrWZthi_StrutWingZthick*(sin(ABRT_StrWAlow_StrutWingAlower) + cos(ABRT_StrWAlow_StrutWingAlower)))/2. ; 0. "  rot=" 0. ; 0. ; -ABRT_StrWAlow_StrutWingAlower/GENV_PiS180" />
+</union>
+
+<box  name="BAR_StrutFull"      material="Aluminium4"  X_Y_Z=" ABRT_StrtYlen- 2.* ABRT_StrtPthi_StrutPlatethick ; ABRT_StrWBPhi_StrutWingBigPlateheight - 2.*ABRT_StrtPoff_StrutPlateoff ; ABRT_StrtZwid_StrutZwidth - 2.*ABRT_StrtPoff_StrutPlateoff " />
+<box  name="BAR_StrutHole"      material="Aluminium1"  X_Y_Z=" ABRT_StrtYlen- 2.* ABRT_StrtPthi_StrutPlatethick + 10.*GENV_Eps; ABRT_StrWBPhi_StrutWingBigPlateheight - 2.*ABRT_StrtPoff_StrutPlateoff-2.*ABRT_StrtRthi_StrutRthick ; ABRT_StrtZwid_StrutZwidth - 2.*ABRT_StrtPoff_StrutPlateoff " />
+<box  name="BAR_StrutPlate"     material="Aluminium4"  X_Y_Z=" ABRT_StrtPthi_StrutPlatethick; ABRT_StrWBPhi_StrutWingBigPlateheight ; ABRT_StrtZwid_StrutZwidth " />
+<subtraction  name="BAR_StrutBarr" >
+  <posXYZ  volume="BAR_StrutFull" />
+  <posXYZ  volume="BAR_StrutHole"  X_Y_Z=" 0. ; 0. ; -(ABRT_StrtZwid_StrutZwidth - 2.* ABRT_StrtPoff_StrutPlateoff)/2. -ABRT_StrtZthi_StrutZthick/2. " />
+  <posXYZ  volume="BAR_StrutHole"  X_Y_Z=" 0. ; 0. ;  (ABRT_StrtZwid_StrutZwidth - 2.* ABRT_StrtPoff_StrutPlateoff)/2. +ABRT_StrtZthi_StrutZthick/2. " />
+</subtraction>
+<!-- ABRT_StrtXpos_Strut_Xposition is done by calculation => should be taken from blueprint atltbw__0002-vAD BUT ONLY in combination with update of ABRT_CryoRmin and ABRT_CryoRmax -->
+<var   name="ABRT_StrtXpos_Strut_Xposition"            value="ABRT_StrWRmax_StrutWingRmax-ABRT_CryoRadi_Radius-ABRT_StrtYlen/2.*GENV_Si225-(ABRT_StrWBPhi_StrutWingBigPlateheight/2. - ABRT_StrtPoff_StrutPlateoff)" />
+<composition  name="BAR_Strut_Sector" >
+  <posXYZ  volume="BAR_StrutWingBox" X_Y_Z="          0.         ;           0.         ; 0. "  rot=" 0. ; 0. ;  -90. " />
+  <posXYZ  volume="BAR_StrutBarr"    X_Y_Z="  ABRT_StrtXpos_Strut_Xposition; -ABRT_StrtXpos_Strut_Xposition*GENV_Ta225; 0. "  rot=" 0. ; 0. ; -112.5" />
+  <posXYZ  volume="BAR_StrutPlate"   X_Y_Z="  ABRT_StrtXpos_Strut_Xposition-ABRT_StrtYlen/2.*GENV_Si225+ABRT_StrtPthi_StrutPlatethick/2.*GENV_Si225 ; -ABRT_StrtXpos_Strut_Xposition*GENV_Ta225-ABRT_StrtYlen/2.*GENV_Co225+ABRT_StrtPthi_StrutPlatethick/2.*GENV_Co225; 0."  rot=" 0. ; 0. ; -112.5" />
+  <posXYZ  volume="BAR_StrutPlate"   X_Y_Z="  ABRT_StrtXpos_Strut_Xposition+ABRT_StrtYlen/2.*GENV_Si225-ABRT_StrtPthi_StrutPlatethick/2.*GENV_Si225 ; -ABRT_StrtXpos_Strut_Xposition*GENV_Ta225+ABRT_StrtYlen/2.*GENV_Co225-ABRT_StrtPthi_StrutPlatethick/2.*GENV_Co225; 0."  rot=" 0. ; 0. ; -112.5" />
+</composition>
+
+
+
+
+<!--  Description of an Atlas Barrel toroid voussoir and voussoir head  -->
+
+<!-- BEGIN confirmation with atltbwv_0028-vAA (if no other comment) -->
+<var  name="ABRT_VousBlXh_VoussBlockXheight"            value= "850." />
+<var  name="ABRT_VousPliX_VoussPlateInnerXwid"          value= "120." />
+<var  name="ABRT_VousPloX_VoussPlateOuterXwid"          value=  "80." />
+<var  name="ABRT_VousBlYw_VoussBlockYwid"               value="2850." />
+<var  name="ABRT_VouBlYwS_VoussBlockYwidSub"            value= "120." />
+<var  name="ABRT_VouRCYwi_VoussRectCutYwid"             value= "815." />
+<var  name="ABRT_VouRPYwi_VoussReinforcePlatYwid"       value=  "50." />
+<var  name="ABRT_VouBlZle_VoussBlockZlen"               value= "500." />
+<var  name="ABRT_VouBlZlS_VoussBlockZlenSub"            value=  "50." />
+<var  name="ABRT_VouBZWTh_VoussBlockZWallTh"            value=  "50." />
+<var  name="ABRT_VouCutZe_VoussCutZExt"                 value=" 500." />  <!-- no confirmation since arbitrary cut parameter -->
+<var  name="ABRT_VouRCutR_VoussRoundCutRad"             value= "300." />
+<var  name="ABRT_VouReCsl_VoussRectCutXYslant"          value=  "30." />  <!-- no confirmation since approx. for rounded corners -->
+<!-- END confirmation with atltbwv_0028-vAA -->
+
+<!-- BEGIN confirmation with atltbwv_0029-vAB (if no other comment) -->
+<var  name="ABRT_CnbCoYex_ConboxCoreYextension"         value= " 880." />
+<var  name="ABRT_CnbCoXex_ConboxCoreXextension"         value= "2367." />
+<var  name="ABRT_CnbCoXsu_ConboxCoreXsup"               value= " 834." />
+<var  name="ABRT_CnbCoXin_ConboxCoreXinf"               value= " 640.7"/>
+<var  name="ABRT_CnbEaHei_ConboxEarHeight"              value= " 850." />
+<var  name="ABRT_CnbEaCxi_ConboxEarCutXin"              value= " 350." />
+<var  name="ABRT_CnbEaCtl_ConboxEarCutPlateThickLowOut" value= " 120." />
+<var  name="ABRT_CnbEaCtu_ConboxEarCutPlateThickUp"     value= "  80." />
+<var  name="ABRT_CnbEaCzw_ConboxEarCutZwall"            value= "  50." />
+<var  name="ABRT_CnbEaCze_ConboxEarCutZextr"            value= " 135." />
+<var  name="ABRT_CnbEaCPl_ConboxInnerEarCutPlate"       value= "  60." />  <!-- atltbwv_0052-vAA -->
+<var  name="ABRT_CnbCaDma_ConboxCavityDmax"             value= " 528." />  <!-- atltbwv_0059-v0  -->
+<var  name="ABRT_CnbCaDme_ConboxCavityDmedium"          value= " 478." />  <!-- atltbwv_0059-v0  -->
+<var  name="ABRT_CnbCaDmi_ConboxCavityDmin"             value= " 468." />  <!-- atltbwv_0059-v0  -->
+<var  name="ABRT_CnbCaZin_ConboxCavityZinter2"          value= "  50." />  <!-- atltbwv_0059-v0  -->
+<var  name="ABRT_CnbCaZex_ConboxCavityZext"             value= " 790." />  <!-- atltbwv_0059-v0  -->
+<var  name="ABRT_CnboxZex_ConboxZextension"             value= " 550." />
+
+<var  name="ABRT_VousMBRa_VoussoirMainBlockRadius"      value= "5723." />  <!-- atltbw__0002-vAD -->
+<var  name="ABRT_CnbxMBRa_ConboxMainBlockRadius"        value= "6942." />  <!-- atltbw__0002-vAD -->
+<!-- END confirmation with atltbwv_0029-vAB -->
+
+
+<!--  Constants and derived variables  -->
+
+<var  name="ABRT_VouCRCYr_VoussCentrRectCutYreach" value=" ABRT_VousBlYw_VoussBlockYwid/2.-ABRT_VouBlYwS_VoussBlockYwidSub-ABRT_VouRCYwi_VoussRectCutYwid-ABRT_VouRPYwi_VoussReinforcePlatYwid" />
+<var  name="ABRT_VousRCXw_VoussRectCutXwid"        value=" ABRT_VousBlXh_VoussBlockXheight-ABRT_VousPliX_VoussPlateInnerXwid-ABRT_VousPloX_VoussPlateOuterXwid" />
+<var  name="ABRT_VousCXof_VoussCutXoffset"         value="(ABRT_VousPliX_VoussPlateInnerXwid-ABRT_VousPloX_VoussPlateOuterXwid)/2." />
+<var  name="ABRT_VousCYpo_VoussoirCutYpos"         value=" ABRT_VousBlYw_VoussBlockYwid/2.-ABRT_VouBlYwS_VoussBlockYwidSub-ABRT_VouRCYwi_VoussRectCutYwid/2." />
+<var  name="ABRT_VousCZpo_VoussoirCutZpos"         value=" ABRT_VouCutZe_VoussCutZExt/2.+ABRT_VouBZWTh_VoussBlockZWallTh/2." />
+<var  name="ABRT_CnbEaXtp_ConboxEarXtop"           value=" ABRT_CnbCoXex_ConboxCoreXextension/2. " />
+<var  name="ABRT_CnbEaYtp_ConboxEarYtop"           value=" ABRT_CnbCoYex_ConboxCoreYextension -  GENV_Ta225 *(ABRT_CnbCoXex_ConboxCoreXextension-ABRT_CnbCoXsu_ConboxCoreXsup)/2." />
+<var  name="ABRT_CnbEaXbt_ConboxEarXbot"           value=" ABRT_CnbEaXtp_ConboxEarXtop - ABRT_CnbEaHei_ConboxEarHeight*GENV_Si225 " />
+<var  name="ABRT_CnbEaYbt_ConboxEarYbot"           value=" ABRT_CnbEaYtp_ConboxEarYtop - ABRT_CnbEaHei_ConboxEarHeight*GENV_Co225 " />
+<var  name="ABRT_CnbECXol_ConboxEarCutXoutlow"     value=" ABRT_CnbEaXbt_ConboxEarXbot - ABRT_CnbEaCtl_ConboxEarCutPlateThickLowOut*sqrt(2.)*GENV_Si225" />
+<var  name="ABRT_CnbECYol_ConboxEarCutYoutlow"     value=" ABRT_CnbEaYbt_ConboxEarYbot + ABRT_CnbEaCtl_ConboxEarCutPlateThickLowOut*sqrt(2.)*GENV_Co225" />
+<var  name="ABRT_CnbECYil_ConboxEarCutYinlow"      value=" ABRT_CnbECYol_ConboxEarCutYoutlow + (ABRT_CnbECXol_ConboxEarCutXoutlow-ABRT_CnbEaCxi_ConboxEarCutXin)*GENV_Ta225 " />
+<var  name="ABRT_CnbECoHe_ConboxEarCutOutHeight"   value=" ABRT_CnbEaHei_ConboxEarHeight- ABRT_CnbEaCtl_ConboxEarCutPlateThickLowOut-ABRT_CnbEaCtu_ConboxEarCutPlateThickUp" />
+<var  name="ABRT_CnbECXou_ConboxEarCutXoutup"      value=" ABRT_CnbECXol_ConboxEarCutXoutlow + ABRT_CnbECoHe_ConboxEarCutOutHeight*GENV_Si225" />
+<var  name="ABRT_CnbECYou_ConboxEarCutYoutup"      value=" ABRT_CnbECYol_ConboxEarCutYoutlow + ABRT_CnbECoHe_ConboxEarCutOutHeight*GENV_Co225" />
+<var  name="ABRT_CnbECYiu_ConboxEarCutYinup"       value=" ABRT_CnbECYou_ConboxEarCutYoutup + (ABRT_CnbECXou_ConboxEarCutXoutup-ABRT_CnbEaCxi_ConboxEarCutXin)*GENV_Ta225" />
+<var  name="ABRT_CnbECZpo_ConboxEarCutZpos"        value=" ABRT_CnboxZex_ConboxZextension/2. + ABRT_CnbEaCze_ConboxEarCutZextr " />
+<var  name="ABRT_CnbIECZp_ConboxInnerEarCutZpos"   value=" ABRT_CnboxZex_ConboxZextension/2. + ABRT_CnbEaCzw_ConboxEarCutZwall/2. " />
+<var  name="ABRT_CnbCaZin_ConboxCavityZinter"      value="(ABRT_CnbCaDma_ConboxCavityDmax - ABRT_CnbCaDme_ConboxCavityDmedium)/2. / tan(ABRT_CryAttAl_CryoAttAlfa*GENV_PiS180)" />
+<var  name="ABRT_VoussRad_VoussoirRadius"          value=" ABRT_VousMBRa_VoussoirMainBlockRadius + ABRT_VousBlXh_VoussBlockXheight/2." />
+<var  name="ABRT_CnboxRad_ConboxRadius"            value=" ABRT_CnbxMBRa_ConboxMainBlockRadius - ABRT_CnbCoYex_ConboxCoreYextension" />
+
+
+
+<!--  Description of the voussoir head (connexion box)  -->
+
+<gvxysx  name="BAR_ConboxMainBlock"  material="Aluminium4"   dZ="ABRT_CnboxZex_ConboxZextension"  >
+  <gvxy_point  X_Y=" ABRT_CnbCoXin_ConboxCoreXinf/2. ; 0.                 " />
+  <gvxy_point  X_Y=" ABRT_CnbEaXbt_ConboxEarXbot     ; ABRT_CnbEaYbt_ConboxEarYbot  " />
+  <gvxy_point  X_Y=" ABRT_CnbEaXtp_ConboxEarXtop     ; ABRT_CnbEaYtp_ConboxEarYtop  " />
+  <gvxy_point  X_Y=" ABRT_CnbCoXsu_ConboxCoreXsup/2. ; ABRT_CnbCoYex_ConboxCoreYextension " />
+</gvxysx>
+<gvxy  name="BAR_ConboxEarCut"       material="Aluminium1"   dZ="ABRT_CnboxZex_ConboxZextension"  >
+  <gvxy_point  X_Y=" ABRT_CnbEaCxi_ConboxEarCutXin     ; ABRT_CnbECYil_ConboxEarCutYinlow  " />
+  <gvxy_point  X_Y=" ABRT_CnbECXol_ConboxEarCutXoutlow ; ABRT_CnbECYol_ConboxEarCutYoutlow " />
+  <gvxy_point  X_Y=" ABRT_CnbECXou_ConboxEarCutXoutup  ; ABRT_CnbECYou_ConboxEarCutYoutup  " />
+  <gvxy_point  X_Y=" ABRT_CnbEaCxi_ConboxEarCutXin     ; ABRT_CnbECYiu_ConboxEarCutYinup   " />
+</gvxy>
+<gvxy  name="BAR_ConboxInnerEarCut"  material="Aluminium1"   dZ="ABRT_CnboxZex_ConboxZextension"  >
+  <gvxy_point  X_Y=" ABRT_CnbEaCxi_ConboxEarCutXin + ABRT_CnbEaCPl_ConboxInnerEarCutPlate ; ABRT_CnbECYil_ConboxEarCutYinlow -  ABRT_CnbEaCPl_ConboxInnerEarCutPlate * GENV_Ta225 " />
+  <gvxy_point  X_Y=" ABRT_CnbECXol_ConboxEarCutXoutlow ; ABRT_CnbECYol_ConboxEarCutYoutlow " />
+  <gvxy_point  X_Y=" ABRT_CnbECXou_ConboxEarCutXoutup  ; ABRT_CnbECYou_ConboxEarCutYoutup  " />
+  <gvxy_point  X_Y=" ABRT_CnbEaCxi_ConboxEarCutXin + ABRT_CnbEaCPl_ConboxInnerEarCutPlate ; ABRT_CnbECYiu_ConboxEarCutYinup -  ABRT_CnbEaCPl_ConboxInnerEarCutPlate * GENV_Ta225 " />
+</gvxy>
+<pcon   name="BAR_ConboxCavity"      material="Aluminium1"  nbPhi="20" >
+  <polyplane  Rio_Z="0. ; ABRT_CnbCaDma_ConboxCavityDmax/2. ;           0.          " />
+  <polyplane  Rio_Z="0. ; ABRT_CnbCaDme_ConboxCavityDmedium/2. ; ABRT_CnbCaZin_ConboxCavityZinter" />
+  <polyplane  Rio_Z="0. ; ABRT_CnbCaDme_ConboxCavityDmedium/2. ; ABRT_CnbCaZex_ConboxCavityZext - ABRT_CnbCaZin_ConboxCavityZinter2  " />
+  <polyplane  Rio_Z="0. ; ABRT_CnbCaDmi_ConboxCavityDmin/2. ; ABRT_CnbCaZex_ConboxCavityZext - ABRT_CnbCaZin_ConboxCavityZinter2  " />
+  <polyplane  Rio_Z="0. ; ABRT_CnbCaDmi_ConboxCavityDmin/2. ; ABRT_CnbCaZex_ConboxCavityZext  " />
+</pcon>
+<tubs   name="BAR_ConboxShaft"  material="Aluminium4"  Rio_Z=" 0. ; ABRT_BielRHol_BiellRadHole-3.*GENV_Eps         ; 0.95*ABRT_CryAttD1_CryoAttDiam1 "  nbPhi="16" />
+<!--<tubs   name="BAR_ConboxShaftB"  material="Aluminium1"  Rio_Z=" 0. ; ABRT_CryAttD1_CryoAttDiam1/2.-3.*GENV_Eps ; 4.*ABRT_BielRHol_BiellRadHole "         nbPhi="20" />
+<intersection  name="BAR_ConboxShaft" >  
+  <posXYZ  volume="BAR_ConboxShaftA" /> 
+  <posXYZ  volume="BAR_ConboxShaftB"   rot=" 0. ; 90. ; 0. "/>
+</intersection>-->
+
+
+<!--  Description of the voussoir  -->
+
+<gvxysxy  name="BAR_VoussoirMainBlock"       material="Aluminium4"   dZ="ABRT_VousBlXh_VoussBlockXheight"  >
+  <gvxy_point  X_Y=" ABRT_VouBlZle_VoussBlockZlen/2. - ABRT_VouBlZlS_VoussBlockZlenSub ; ABRT_VousBlYw_VoussBlockYwid/2. - ABRT_VouBlYwS_VoussBlockYwidSub -ABRT_VouBlZlS_VoussBlockZlenSub/GENV_Ta15 " />
+  <gvxy_point  X_Y=" ABRT_VouBlZle_VoussBlockZlen/2.                         ; ABRT_VousBlYw_VoussBlockYwid/2. - ABRT_VouBlYwS_VoussBlockYwidSub                             " />
+  <gvxy_point  X_Y=" ABRT_VouBlZle_VoussBlockZlen/2.                         ; ABRT_VousBlYw_VoussBlockYwid/2.                                                     " />
+</gvxysxy>
+<gvxysxy  name="BAR_VoussoirRectCut"         material="Aluminium1"  dZ="ABRT_VouCutZe_VoussCutZExt"  >
+  <gvxy_point  X_Y=" ABRT_VousRCXw_VoussRectCutXwid/2. ; ABRT_VouRCYwi_VoussRectCutYwid/2.-ABRT_VouReCsl_VoussRectCutXYslant" />
+  <gvxy_point  X_Y=" ABRT_VousRCXw_VoussRectCutXwid/2.-ABRT_VouReCsl_VoussRectCutXYslant ; ABRT_VouRCYwi_VoussRectCutYwid/2." />
+</gvxysxy>
+<gvxysxy  name="BAR_VoussoirCentralRectCut"  material="Aluminium1"  dZ="ABRT_VouCutZe_VoussCutZExt"  >
+  <gvxy_point  X_Y=" ABRT_VousRCXw_VoussRectCutXwid/2. ; ABRT_VouCRCYr_VoussCentrRectCutYreach-ABRT_VouReCsl_VoussRectCutXYslant" />
+  <gvxy_point  X_Y=" ABRT_VousRCXw_VoussRectCutXwid/2.-ABRT_VouReCsl_VoussRectCutXYslant ; ABRT_VouCRCYr_VoussCentrRectCutYreach" />
+</gvxysxy>
+<tubs     name="BAR_VoussoirRoundCut"        material="Aluminium1"  Rio_Z=" 0 ; ABRT_VouRCutR_VoussRoundCutRad ; ABRT_VouCutZe_VoussCutZExt"  nbPhi="18" />
+
+<union  name="BAR_VoussoirCut" >
+  <posXYZ  volume="BAR_VoussoirRoundCut"       X_Y_Z="  0. ;  ABRT_VousCYpo_VoussoirCutYpos ;        0.           "     rot="   0. ;  0. ; 0."  />
+  <posXYZ  volume="BAR_VoussoirRoundCut"       X_Y_Z="  0. ; -ABRT_VousCYpo_VoussoirCutYpos ;        0.           "     rot="   0. ;  0. ; 0."  />
+  <posXYZ  volume="BAR_VoussoirRectCut"        X_Y_Z="  0. ;  ABRT_VousCYpo_VoussoirCutYpos ; ABRT_VousCZpo_VoussoirCutZpos "     rot="   0. ;  0. ; 0."  />
+  <posXYZ  volume="BAR_VoussoirRectCut"        X_Y_Z="  0. ; -ABRT_VousCYpo_VoussoirCutYpos ; ABRT_VousCZpo_VoussoirCutZpos "     rot="   0. ;  0. ; 0."  />
+  <posXYZ  volume="BAR_VoussoirRectCut"        X_Y_Z="  0. ;  ABRT_VousCYpo_VoussoirCutYpos ;-ABRT_VousCZpo_VoussoirCutZpos "     rot="   0. ;  0. ; 0."  />
+  <posXYZ  volume="BAR_VoussoirRectCut"        X_Y_Z="  0. ; -ABRT_VousCYpo_VoussoirCutYpos ;-ABRT_VousCZpo_VoussoirCutZpos "     rot="   0. ;  0. ; 0."  />
+  <posXYZ  volume="BAR_VoussoirCentralRectCut" X_Y_Z=" GENV_Eps ;        0.            ; ABRT_VousCZpo_VoussoirCutZpos+GENV_Eps"  rot="   0. ;  0. ; 0."  />
+  <posXYZ  volume="BAR_VoussoirCentralRectCut" X_Y_Z="-GENV_Eps ;        0.            ;-ABRT_VousCZpo_VoussoirCutZpos-GENV_Eps"  rot="   0. ;  0. ; 0."  />
+</union>
+<subtraction  name="BAR_Voussoir" >
+  <posXYZ  volume="BAR_VoussoirMainBlock"   X_Y_Z=" 0. ; 0. ; 0. "  rot="   0. ; 90. ; 0."  />
+  <posXYZ  volume="BAR_VoussoirCut" X_Y_Z=" ABRT_VousCXof_VoussCutXoffset ; 0. ; 0. "  rot="   0. ;  0. ; 0."  />
+</subtraction>
+
+<union  name="BAR_ConboxTheCut" >
+  <posXYZ  volume="BAR_ConboxEarCut"       X_Y_Z="  0. ; 0. ; ABRT_CnbECZpo_ConboxEarCutZpos      "  rot=" 0. ; 0. ; 0." />
+  <posXYZ  volume="BAR_ConboxEarCut"       X_Y_Z="  0. ; 0. ;-ABRT_CnbECZpo_ConboxEarCutZpos      "  rot=" 0. ; 0. ; 0." />
+  <posXYZ  volume="BAR_ConboxEarCut"       X_Y_Z="  0. ; 0. ; ABRT_CnbECZpo_ConboxEarCutZpos      "  rot=" 0. ; 180. ; 0." />
+  <posXYZ  volume="BAR_ConboxEarCut"       X_Y_Z="  0. ; 0. ;-ABRT_CnbECZpo_ConboxEarCutZpos      "  rot=" 0. ; 180. ; 0." />
+  <posXYZ  volume="BAR_ConboxInnerEarCut"  X_Y_Z="  0. ; 0. ; ABRT_CnbIECZp_ConboxInnerEarCutZpos "  rot=" 0. ; 0. ; 0." />
+  <posXYZ  volume="BAR_ConboxInnerEarCut"  X_Y_Z="  0. ; 0. ;-ABRT_CnbIECZp_ConboxInnerEarCutZpos "  rot=" 0. ; 0. ; 0." />
+  <posXYZ  volume="BAR_ConboxInnerEarCut"  X_Y_Z="  0. ; 0. ; ABRT_CnbIECZp_ConboxInnerEarCutZpos "  rot=" 0. ; 180. ; 0." />
+  <posXYZ  volume="BAR_ConboxInnerEarCut"  X_Y_Z="  0. ; 0. ;-ABRT_CnbIECZp_ConboxInnerEarCutZpos "  rot=" 0. ; 180. ; 0." />
+  <posXYZ  volume="BAR_ConboxCavity"       X_Y_Z="  0. ; 0. ; 0. "                         rot=" -90. ; 0. ; 0." />
+</union>
+<subtraction  name="BAR_ConnectingBox" >
+  <posXYZ  volume="BAR_ConboxMainBlock" />
+  <posXYZ  volume="BAR_ConboxTheCut" />
+</subtraction>
+
+<composition  name="BAR_Voussoir_Sector" >
+  <posXYZ  volume="BAR_ConnectingBox"  X_Y_Z=" ABRT_CnboxRad_ConboxRadius         ;            0.              ; 0. "  rot=" 0. ;  0. ; -90. " />
+  <posXYZ  volume="BAR_ConboxShaft"    X_Y_Z=" ABRT_CoMaRmin_ColdMassRmin+ABRT_CoMaRThi_ColdMassRThick+ABRT_BielYhei_BiellYheight-ABRT_BielYcHo_BiellYcenHole ; 0. ; 0. "  rot=" 90. ; 0. ; 0. " />
+  <posXYZ  volume="BAR_Voussoir"       X_Y_Z=" GENV_Co225*ABRT_VoussRad_VoussoirRadius ; -GENV_Si225*ABRT_VoussRad_VoussoirRadius  ; 0. "  rot=" 0. ;  0. ; -22.5" />
+</composition>
+
+
+
+
+
+<composition  name="BAR_Toroid_Sector" >
+  <posXYZ  volume="BAR_CryoTub_Sector" />
+  <posXYZ  volume="BAR_ThermShield_Sector" />
+  <foreach  index="Ivouss"  begin="0"  loops="4" >
+    <posXYZ  volume="BAR_Strut_Sector"     X_Y_Z=" 0. ; 0. ; ABRT_Zvouss[Ivouss] " >
+      <ring  value="-4+Ivouss" />
+    </posXYZ>
+    <posXYZ  volume="BAR_Voussoir_Sector"  X_Y_Z=" 0. ; 0. ; ABRT_Zvouss[Ivouss] " >
+      <ring  value="-4+Ivouss" />
+    </posXYZ>
+  </foreach>
+  <foreach  index="Ivouss"  begin="4"  loops="4" >
+    <posXYZ  volume="BAR_Strut_Sector"     X_Y_Z=" 0. ; 0. ; ABRT_Zvouss[Ivouss] " >
+      <ring  value="Ivouss-3" />
+    </posXYZ>
+    <posXYZ  volume="BAR_Voussoir_Sector"  X_Y_Z=" 0. ; 0. ; ABRT_Zvouss[Ivouss] " >
+      <ring  value="Ivouss-3" />
+    </posXYZ>
+  </foreach>
+  <posXYZ  volume="BAR_ColdMass_Sector" />
+</composition>
+
+<!--
+<composition  name="BAR_Toroid" >
+  <mposPhi  volume="BAR_Toroid_Sector" Phi0="22.5"  ncopy="8" >
+    <sector  value="1"  step="1"  />
+  </mposPhi>
+</composition>
+-->
+<composition  name="BAR_sector02" >
+  <posXYZ  volume="BAR_Toroid_Sector"  rot=" 0. ; 0. ; 22.5"  />
+</composition>
+<composition  name="BAR_sector04" >
+  <posXYZ  volume="BAR_Toroid_Sector"  rot=" 0. ; 0. ; 67.5"  />
+</composition>
+<composition  name="BAR_sector06" >
+  <posXYZ  volume="BAR_Toroid_Sector"  rot=" 0. ; 0. ;112.5"  />
+</composition>
+<composition  name="BAR_sector08" >
+  <posXYZ  volume="BAR_Toroid_Sector"  rot=" 0. ; 0. ;157.5"  />
+</composition>
+<composition  name="BAR_sector10" >
+  <posXYZ  volume="BAR_Toroid_Sector"  rot=" 0. ; 0. ;202.5"  />
+</composition>
+<composition  name="BAR_sector12" >
+  <posXYZ  volume="BAR_Toroid_Sector"  rot=" 0. ; 0. ;247.5"  />
+</composition>
+<composition  name="BAR_sector14" >
+  <posXYZ  volume="BAR_Toroid_Sector"  rot=" 0. ; 0. ;292.5"  />
+</composition>
+<composition  name="BAR_sector16" >
+  <posXYZ  volume="BAR_Toroid_Sector"  rot=" 0. ; 0. ;337.5"  />
+</composition>
+<composition  name="BAR_Toroid" >
+  <posXYZ  volume="BAR_sector02"/>
+  <posXYZ  volume="BAR_sector04"/>
+  <posXYZ  volume="BAR_sector06"/>
+  <posXYZ  volume="BAR_sector08"/>
+  <posXYZ  volume="BAR_sector10"/>
+  <posXYZ  volume="BAR_sector12"/>
+  <posXYZ  volume="BAR_sector14"/>
+  <posXYZ  volume="BAR_sector16"/>
+</composition>
+
+</section>
+
+<section name       = "Solenoid"
+         version    = "1.1"
+         date       = "22 11 1962"
+         author     = "laurent"
+         top_volume = "Solenoid">
+<!--     name       =  Solenoid                      section name       = "Magnets"   -->
+<!--  
+      **************************************************************
+      ***                                                       ****
+      ***                  Solenoid                             ****
+      ***                                                       ****
+      **************************************************************
+-->
+
+<tubs   name="tubs_hole"      material="Aluminium"   Rio_Z="1210;1267;5300" />
+<composition name="Solenoid">
+   <posXYZ volume="tubs_hole"      X_Y_Z=" 0 ; 0 ; 0"  />
+</composition>
+</section>
+
+
+<section name       = "ATLAS Feet"
+         version    = "0.0"
+         date       = "29-05-2019"
+         author     = "Niko Tsutskiridze"
+         top_volume = "Feet">
+
+<!--     name       =  Feet only                     section name       = "Feet"      -->
+<!--  **************************************************************
+      **************************************************************
+      ***                                                       ****
+      ***                     ATLAS Feet                        ****
+      ***                                                       ****
+      **************************************************************
+      **************************************************************  -->
+<!--  Basic parameters extracted from drawing ATLHBFB_0003  -->
+
+<gvxysx name="Standard_Bottom_Plate" material="ShieldSteel" dZ="1198.">
+    <gvxy_point X_Y="-820.5; 15.8"/>
+    <gvxy_point X_Y="-820.5;-75."/>
+    <gvxy_point X_Y="-914.;-75."/>
+    <gvxy_point X_Y="-914.;75."/>
+</gvxysx>
+
+<gvxy name="Standard_MineSide_Plate" material="ShieldSteel" dZ="81.5">
+    <gvxy_point X_Y="-1274.71; -2610."/>
+    <gvxy_point X_Y="-1274.71; -1004.21"/>
+    <gvxy_point X_Y="-1224.78; -883.67"/>
+    <gvxy_point X_Y="-956.89; -994.63"/>
+    <gvxy_point X_Y="-930.12; -930."/>
+    <gvxy_point X_Y="-634.5; -1052.5"/>
+    <gvxy_point X_Y="-406.96; -1052.5"/>
+    <gvxy_point X_Y="27.91; -2.63"/>
+    <gvxy_point X_Y="-615.13; 640.42"/>
+    <gvxy_point X_Y="-40.29; 2028.2"/>
+    <gvxy_point X_Y="-40.29; 2630."/>
+    <gvxy_point X_Y="559.49; 2630"/>
+    <gvxy_point X_Y="559.49; 2610."/>
+    <gvxy_point X_Y="1274.71; 2610."/>
+    <gvxy_point X_Y="1274.71; 1820."/>
+    <gvxy_point X_Y="906.15; 223.58"/>
+    <gvxy_point X_Y="524.76; -697.17"/>
+    <gvxy_point X_Y="524.76; -2610."/>
+</gvxy>
+
+<tubs name="Standard_MineSide_Plate_CutTube" material="ShieldSteel" Rio_Z="0.; 615.; 85." nbPhi="32"/>
+<subtraction name="Standard_MineSide_PlateSub" >
+    <posXYZ volume="Standard_MineSide_Plate" />
+    <posXYZ volume="Standard_MineSide_Plate_CutTube" X_Y_Z="-406.956; -437.5; 0." rot=" 0.; 0.;0."/>
+</subtraction>
+
+<box name="Standard_Midd_Plate" material="ShieldSteel" X_Y_Z="297.; 153.6; 1100."/>
+
+<box name="Standard_Back_Top_Plate" material="ShieldSteel" X_Y_Z="59.3; 790.; 1040."/>
+
+<box name="Standard_Back_Plate" material="ShieldSteel" X_Y_Z="76.56; 1969.5; 896.8"/>
+
+<gvxysx name="Standard_Inner_Back_Plate" material="ShieldSteel" dZ="44.">
+    <gvxy_point X_Y="-375.; -365."/>
+    <gvxy_point X_Y="-375.; 315."/>
+    <gvxy_point X_Y="-325.; 365."/>
+</gvxysx>
+
+<box name="Standard_Inner_Middle_plate" material="ShieldSteel" X_Y_Z="157.32; 680.; 630."/>
+
+<tubs name="Standard_Innert_Tub" material="ShieldSteel" Rio_Z="562.5; 605.5; 800." profile="213.; 134.8" nbPhi="32"/>
+
+<composition  name="Standard_Inner_Parts" >
+    <posXYZ  volume="Standard_Inner_Back_Plate"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 90.; 0." />
+    <posXYZ  volume="Standard_Inner_Middle_plate"    X_Y_Z=" -335.3 ; -30.35 ; 0." rot=" 0.; 0.; -50." />
+    <posXYZ  volume="Standard_Innert_Tub"    X_Y_Z=" -754.18 ; 568.54 ; 0." />
+</composition>
+
+<gvxysx name="Standard_Front_Cover" material="ShieldSteel" dZ="80.6">
+    <gvxy_point X_Y="-550.; -1505."/>
+    <gvxy_point X_Y="-550.; -465."/>
+    <gvxy_point X_Y="-535.; -450."/>
+    <gvxy_point X_Y="-535.; 1505."/>
+</gvxysx>
+
+<box name="Standard_Front_CoverCutBox" material="ShieldSteel" X_Y_Z="270.; 1450.; 20."/>
+
+<subtraction name="Standard_Front_CoverCut" >
+    <posXYZ volume="Standard_Front_Cover" />
+    <posXYZ volume="Standard_Front_CoverCutBox" X_Y_Z="535.; 790.; 40.3" rot=" 0.; 0.; 0."/>
+    <posXYZ volume="Standard_Front_CoverCutBox" X_Y_Z="-535.; 790.; 40.3" rot=" 0.; 0.; 0."/>
+</subtraction>
+
+<composition  name="Standard_Feet" >
+    <posXYZ  volume="Standard_Bottom_Plate"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_MineSide_PlateSub"    X_Y_Z=" 374.97 ; 2685.1 ; 489.25" />
+    <posXYZ  volume="Standard_MineSide_PlateSub"    X_Y_Z=" 374.97 ; 2685.1 ; -489.25" />
+    <posXYZ  volume="Standard_Midd_Plate"    X_Y_Z=" -691.06 ; 1818.81 ; 0." rot=" 0.; 0.; -22.5" />
+    <posXYZ  volume="Standard_Back_Top_Plate"    X_Y_Z=" 1679.34 ; 4900. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Back_Plate"    X_Y_Z=" 782.25 ; 2122.5 ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Inner_Parts"    X_Y_Z=" 721.955 ; 1680. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Front_CoverCut"    X_Y_Z=" -320.4 ; 3211.01 ; 0." rot=" 0.; 90.; -22.5" />
+</composition>
+    <!-- End Standard Feet -->
+
+
+    <!-- Extremity Feet -->
+<gvxysx name="Extremity_Bottom_Plate" material="ShieldSteel" dZ="1660.4">
+    <gvxy_point X_Y="-820.5; 10."/>
+    <gvxy_point X_Y="-820.5; -80."/>
+    <gvxy_point X_Y="-905.25; -80."/>
+    <gvxy_point X_Y="-905.25; 70."/>
+</gvxysx>
+
+<gvxy name="Extremity_MineSide_Plate" material="ShieldSteel" dZ="82.6">
+    <gvxy_point X_Y="-1335.33; -2760.58"/>
+    <gvxy_point X_Y="-1335.33; -1154.7"/>
+    <gvxy_point X_Y="-1285.36; -1034.06"/>
+    <gvxy_point X_Y="-1017.44; -1145.04"/>
+    <gvxy_point X_Y="-990.65; -1080.37"/>
+    <gvxy_point X_Y="-694.43; -1203.06"/>
+    <gvxy_point X_Y="-467.05; -1203.06"/>
+    <gvxy_point X_Y="147.95; -587.13"/>
+    <gvxy_point X_Y="147.7; -423.3"/>
+    <gvxy_point X_Y="91.24; 222.13"/>
+    <gvxy_point X_Y="-574.73; 733.15"/>
+    <gvxy_point X_Y="-140.51; 1781.5"/>
+    <gvxy_point X_Y="-158.99; 1789.16"/>
+    <gvxy_point X_Y="-100.4; 1930.6"/>
+    <gvxy_point X_Y="-100.4; 2599.44"/>
+    <gvxy_point X_Y="521.14; 2599.44"/>
+    <gvxy_point X_Y="521.14; 2506.22"/>
+    <gvxy_point X_Y="924.48; 2359.42"/>
+    <gvxy_point X_Y="1024.48; 2359.42"/>
+    <gvxy_point X_Y="1065.9; 2459.42"/>
+    <gvxy_point X_Y="1534.62; 2459.42"/>
+    <gvxy_point X_Y="1534.62; 1659.41"/>
+    <gvxy_point X_Y="1212.31; 1659.43"/>
+    <gvxy_point X_Y="846.05; 72.99"/>
+    <gvxy_point X_Y="464.66; -847.76"/>
+    <gvxy_point X_Y="464.66; -2760.58"/>
+</gvxy>
+
+<tubs name="Extremity_MineSide_Plate_CutTube" material="ShieldSteel" Rio_Z="0.; 615.; 85." nbPhi="32"/>
+
+<subtraction name="Extremity_MineSide_PlateSub" >
+    <posXYZ volume="Extremity_MineSide_Plate" />
+    <posXYZ volume="Extremity_MineSide_Plate_CutTube" X_Y_Z="-467.04; -588.06; 0." rot=" 0.; 0.;0."/>
+</subtraction>
+
+<box name="Extremity_Midd_Plate" material="ShieldSteel" X_Y_Z="299.; 151.2; 1480."/>
+
+<box name="Extremity_Back_Top_Plate" material="ShieldSteel" X_Y_Z="69.95; 800.; 1624."/>
+
+<box name="Extremity_AlMid_Plate" material="ShieldSteel" X_Y_Z="101.04; 400.; 1275."/>
+
+<gvxy name="Extremity_Back_Plate" material="ShieldSteel" dZ="1274.8">
+    <gvxy_point X_Y="-40.; -1003."/>
+    <gvxy_point X_Y="-40.; 585."/>
+    <gvxy_point X_Y="160.41; 1081.04"/>
+    <gvxy_point X_Y="234.5; 1051.11"/>
+    <gvxy_point X_Y="40.; 569.22"/>
+    <gvxy_point X_Y="40.; -1003."/>
+</gvxy>
+
+<gvxysx name="Extremity_Back_PlateCutArb" material="ShieldSteel" dZ="300.">
+    <gvxy_point X_Y="-225.; -175."/>
+    <gvxy_point X_Y="-225.; -18."/>
+    <gvxy_point X_Y="-415.21; 175."/>
+</gvxysx>
+
+<subtraction name="Extremity_Back_PlateCut" >
+    <posXYZ volume="Extremity_Back_Plate" />
+    <posXYZ volume="Extremity_Back_PlateCutArb" X_Y_Z="136.77; 915.87; 0." rot=" 0.; 90.; -22."/>
+</subtraction>
+
+<box name="Extremity_Front_Cover" material="ShieldSteel" X_Y_Z="80.34; 3015.; 1450."/>
+
+<tubs name="Extremity_Front_Cover_CutTube" material="ShieldSteel" Rio_Z="0.; 225.; 100." nbPhi="32"/>
+
+<box name="Extremity_Front_CoverCutBox" material="ShieldSteel" X_Y_Z="20.; 1210.; 250."/>
+
+<subtraction name="Extremity_Front_CoverCut" >
+    <posXYZ volume="Extremity_Front_Cover" />
+    <posXYZ volume="Extremity_Front_Cover_CutTube" X_Y_Z="0.; 332.5; 0." rot=" 0.; 90.; 0."/>
+    <posXYZ volume="Extremity_Front_CoverCutBox" X_Y_Z="40.17; 912.5; 725." rot=" 0.; 0.; 0."/>
+    <posXYZ volume="Extremity_Front_CoverCutBox" X_Y_Z="40.17; 912.5; -725." rot=" 0.; 0.; 0."/>
+</subtraction>
+
+<composition  name="Extremiy_Feet" >
+    <posXYZ  volume="Extremity_Bottom_Plate"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Extremity_MineSide_PlateSub"    X_Y_Z=" 435.33 ; 2830.59 ; 678.9" />
+    <posXYZ  volume="Extremity_MineSide_PlateSub"    X_Y_Z=" 435.33 ; 2830.59 ; -678.9" />
+    <posXYZ  volume="Extremity_Midd_Plate"    X_Y_Z=" -691.23 ; 1812.79 ; 0." rot=" 0.; 0.; -22.5" />
+    <posXYZ  volume="Extremity_Back_Top_Plate"    X_Y_Z=" 2004.954 ; 4890. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Extremity_AlMid_Plate"    X_Y_Z=" 1243.8 ; 3636.8 ; 0." rot=" 0.; 0.; -22.5" />
+    <posXYZ  volume="Extremity_Back_PlateCut"    X_Y_Z=" 840.5 ; 2070. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Extremity_Front_CoverCut"    X_Y_Z=" -321.16 ; 3203.82 ; 0." rot=" 0.; 0.; -22.5" />
+</composition>
+    <!-- End Extremity Feet -->
+
+
+    <!-- Standard Main Strut -->
+<gvxysx name="Sta_Main_Strut" material="Aluminium" dZ="3440.">
+    <gvxy_point X_Y="-200.; -300."/>
+    <gvxy_point X_Y="-200.; -250."/>
+    <gvxy_point X_Y="-20.; -218.3"/>
+    <gvxy_point X_Y="-20.; 218.3"/>
+    <gvxy_point X_Y="-200.; 250."/>
+    <gvxy_point X_Y="-200.; 300."/>
+</gvxysx>
+
+<tubs name="Standard_Main_StrutCutTube" material="Aluminium" Rio_Z="0.; 210.; 50." nbPhi="32"/>
+
+<subtraction  name="Standard_Main_StrutCut" >
+    <posXYZ  volume="Sta_Main_Strut"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 90.;0." />
+    <posXYZ  volume="Standard_Main_StrutCutTube"    X_Y_Z="897.5 ; 0. ; 0." />
+    <posXYZ  volume="Standard_Main_StrutCutTube"    X_Y_Z="-897.5 ; 0. ; 0." />
+</subtraction>
+
+<box name="Standard_Main_Strut_Plate1" material="Aluminium" X_Y_Z="69.99; 690.; 500."/>
+
+<box name="Standard_Main_Strut_Plate2" material="Aluminium" X_Y_Z="109.99; 790.; 975."/>
+
+<composition  name="Standard_Main_Strut" >
+    <posXYZ  volume="Standard_Main_StrutCut"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Main_Strut_Plate1"    X_Y_Z=" 1755. ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Main_Strut_Plate1"    X_Y_Z=" -1755. ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Main_Strut_Plate2"    X_Y_Z=" 1844.99 ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Main_Strut_Plate2"    X_Y_Z=" -1844.99 ; 0. ; 0." rot=" 0.; 0.;0." />
+</composition>
+    <!--  End Standard Main Strut -->
+
+
+    <!-- Extremity Main Strut -->
+<gvxysx name="Extr_Main_Strut" material="Aluminium" dZ="2780.">
+    <gvxy_point X_Y="-200.; -300."/>
+    <gvxy_point X_Y="-200.; -250."/>
+    <gvxy_point X_Y="-20.; -218.3"/>
+    <gvxy_point X_Y="-20.; 218.3"/>
+    <gvxy_point X_Y="-200.; 250."/>
+    <gvxy_point X_Y="-200.; 300."/>
+</gvxysx>
+
+<tubs name="Extremity_Main_StrutCutTube" material="Aluminium" Rio_Z="0.; 210.; 50." nbPhi="32"/>
+
+<subtraction  name="Extremity_Main_StrutCut" >
+    <posXYZ  volume="Extr_Main_Strut"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 90.;0." />
+    <posXYZ  volume="Extremity_Main_StrutCutTube"    X_Y_Z="897.5 ; 0. ; 0." />
+    <posXYZ  volume="Extremity_Main_StrutCutTube"    X_Y_Z="-897.5 ; 0. ; 0." />
+</subtraction>
+
+<box name="Extremity_Main_Strut_Plate1" material="Aluminium" X_Y_Z="69.99; 690.; 500."/>
+
+<box name="Extremity_Main_Strut_Plate2" material="Aluminium" X_Y_Z="109.99; 740.; 1344."/>
+
+<composition  name="Extremity_Main_Strut" >
+    <posXYZ  volume="Extremity_Main_StrutCut"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Extremity_Main_Strut_Plate1"    X_Y_Z=" 1425 ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Extremity_Main_Strut_Plate1"    X_Y_Z=" -1425 ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Extremity_Main_Strut_Plate2"    X_Y_Z=" 1515. ; 25. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Extremity_Main_Strut_Plate2"    X_Y_Z=" -1515. ; 25. ; 0." rot=" 0.; 0.;0." />
+</composition>
+    <!--  End Extremity Main Strut -->
+
+
+    <!--  Girder 1 -->
+<box name="Standard_Girder1_Plate1" material="ShieldSteel" X_Y_Z="640.; 40.; 1527.3"/>
+
+<gvxysx name="Standard_Girder1_Plate2" material="ShieldSteel" dZ="40.">
+    <gvxy_point X_Y="-670.; -465."/>
+    <gvxy_point X_Y="-670.; -345."/>
+    <gvxy_point X_Y="-763.65; -345."/>
+    <gvxy_point X_Y="-763.65; -20.05"/>
+</gvxysx>
+
+<gvxy name="Standard_Girder1_2_3_Plate3" material="ShieldSteel" dZ="76.35">
+    <gvxy_point X_Y="353.5; -410."/>
+    <gvxy_point X_Y="353.5; -120."/>
+    <gvxy_point X_Y="246.; -120."/>
+    <gvxy_point X_Y="246.; 120."/>
+    <gvxy_point X_Y="600.; 120."/>
+    <gvxy_point X_Y="600.; 410."/>
+    <gvxy_point X_Y="241.; 410."/>
+    <gvxy_point X_Y="241.; 305."/>
+    <gvxy_point X_Y="-389.; 305."/>
+    <gvxy_point X_Y="-389.; 410."/>
+    <gvxy_point X_Y="-600.; 410."/>
+    <gvxy_point X_Y="-600.; 120."/>
+    <gvxy_point X_Y="-389.; 120."/>
+    <gvxy_point X_Y="-389.; -120."/>
+    <gvxy_point X_Y="-496.5; -120."/>
+    <gvxy_point X_Y="-496.5; -320."/>
+    <gvxy_point X_Y="-296.5; -410."/>
+</gvxy>
+
+<box name="Standard_Girder1_2_3_Plate3CutBox" material="ShieldSteel" X_Y_Z="460.; 260.; 40."/>
+
+<subtraction  name="Standard_Girder1_2_3_Plate3Cut_Side1" >
+    <posXYZ  volume="Standard_Girder1_2_3_Plate3"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1_2_3_Plate3CutBox"    X_Y_Z="-71.5 ; 95. ; -23.175" />
+</subtraction>
+
+<subtraction  name="Standard_Girder1_2_3_Plate3Cut_Side2" >
+    <posXYZ  volume="Standard_Girder1_2_3_Plate3"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1_2_3_Plate3CutBox"    X_Y_Z="-71.5 ; 95. ; 23.175" />
+</subtraction>
+
+<box name="Standard_Girder1-2-3_Plate4" material="ShieldSteel" X_Y_Z="460.; 375.; 30."/>
+
+<gvxysx name="Standard_Girder1_Plate5" material="ShieldSteel" dZ="460.">
+    <gvxy_point X_Y="-450.; -435.05"/>
+    <gvxy_point X_Y="-713.35; -320.05"/>
+    <gvxy_point X_Y="-763.65; -320.05"/>
+    <gvxy_point X_Y="-763.65; -280.05"/>
+    <gvxy_point X_Y="-705.; -280.05"/>
+    <gvxy_point X_Y="-441.65; -395.05"/>
+</gvxysx>
+
+<composition  name="Standard_Girder1" >
+    <posXYZ  volume="Standard_Girder1_Plate1"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1_Plate2"    X_Y_Z=" 250.05 ; 0. ; 0." rot=" 0.; 90.;0." />
+    <posXYZ  volume="Standard_Girder1_Plate2"    X_Y_Z=" -250.05 ; 0. ; 0." rot=" 0.; 90.;0." />
+    <posXYZ  volume="Standard_Girder1_2_3_Plate3Cut_Side1"    X_Y_Z=" 71.5 ; -254.2 ; -801.9" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1_2_3_Plate3Cut_Side2"    X_Y_Z=" 71.5 ; -254.2 ; 801.9" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1-2-3_Plate4"    X_Y_Z=" 0. ; -207.51 ; -405." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1-2-3_Plate4"    X_Y_Z=" 0. ; -207.51 ; -70." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1_Plate5"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 90.;0." />
+</composition>
+    <!--  End Girder 1 -->
+
+
+    <!--  Girder 2 -->
+<box name="Standard_Girder2_Plate1" material="ShieldSteel" X_Y_Z="640.; 40.; 1982.3"/>
+
+<gvxysx name="Standard_Girder2_Plate2" material="ShieldSteel" dZ="40.">
+    <gvxy_point X_Y="-897.5; -465."/>
+    <gvxy_point X_Y="-897.5; -345."/>
+    <gvxy_point X_Y="-991.15; -345."/>
+    <gvxy_point X_Y="-991.15; -20.05"/>
+</gvxysx>
+
+<gvxysx name="Standard_Girder2_Plate5" material="ShieldSteel" dZ="460.">
+    <gvxy_point X_Y="-677.5; -435.05"/>
+    <gvxy_point X_Y="-940.85; -320.05"/>
+    <gvxy_point X_Y="-991.15; -320.05"/>
+    <gvxy_point X_Y="-991.15; -280.05"/>
+    <gvxy_point X_Y="-932.5; -280.05"/>
+    <gvxy_point X_Y="-669.15; -395.05"/>
+</gvxysx>
+
+<composition  name="Standard_Girder2" >
+    <posXYZ  volume="Standard_Girder2_Plate1"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder2_Plate2"    X_Y_Z=" 250.05 ; 0. ; 0." rot=" 0.; 90.;0." />
+    <posXYZ  volume="Standard_Girder2_Plate2"    X_Y_Z=" -250.05 ; 0. ; 0." rot=" 0.; 90.;0." />
+    <posXYZ  volume="Standard_Girder1_2_3_Plate3Cut_Side1"    X_Y_Z=" 71.5 ; -254.2 ; -1029.4" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1_2_3_Plate3Cut_Side2"    X_Y_Z=" 71.5 ; -254.2 ; 1029.4" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1-2-3_Plate4"    X_Y_Z=" 0. ; -207.51 ; -277.5" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1-2-3_Plate4"    X_Y_Z=" 0. ; -207.51 ; 27.5" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder2_Plate5"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 90.;0." />
+</composition>
+    <!--  End Girder 2 -->
+
+
+    <!--  Girder 3 -->
+<box name="Standard_Girder3_Plate1" material="ShieldSteel" X_Y_Z="640.; 40.; 2203.3"/>
+
+<gvxysx name="Standard_Girder3_Plate2" material="ShieldSteel" dZ="40.">
+    <gvxy_point X_Y="-1007.5; -465."/>
+    <gvxy_point X_Y="-1007.5; -345."/>
+    <gvxy_point X_Y="-1101.65; -345."/>
+    <gvxy_point X_Y="-1101.65; -20.05"/>
+</gvxysx>
+
+<gvxysx name="Standard_Girder3_Plate5" material="ShieldSteel" dZ="460.">
+    <gvxy_point X_Y="-788.; -435.05"/>
+    <gvxy_point X_Y="-1051.35; -320.05"/>
+    <gvxy_point X_Y="-1101.65; -320.05"/>
+    <gvxy_point X_Y="-1101.65; -280.05"/>
+    <gvxy_point X_Y="-1043.; -280.05"/>
+    <gvxy_point X_Y="-779.65; -395.05"/>
+</gvxysx>
+
+<composition  name="Standard_Girder3" >
+    <posXYZ  volume="Standard_Girder3_Plate1"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder3_Plate2"    X_Y_Z=" 250.05 ; 0. ; 0." rot=" 0.; 90.;0." />
+    <posXYZ  volume="Standard_Girder3_Plate2"    X_Y_Z=" -250.05 ; 0. ; 0." rot=" 0.; 90.;0." />
+    <posXYZ  volume="Standard_Girder1_2_3_Plate3Cut_Side1"    X_Y_Z=" 71.5 ; -254.2 ; -1139.9" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1_2_3_Plate3Cut_Side2"    X_Y_Z=" 71.5 ; -254.2 ; 1139.9" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1-2-3_Plate4"    X_Y_Z=" 0. ; -207.51 ; -168." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1-2-3_Plate4"    X_Y_Z=" 0. ; -207.51 ; 167." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder3_Plate5"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 90.;0." />
+</composition>
+
+<composition  name="Standard_Girder1-2-3" >
+    <posXYZ  volume="Standard_Girder1"    X_Y_Z=" 0. ; 0. ; 8005.02" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1"    X_Y_Z=" 0. ; 0. ; -8005.02" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder2"    X_Y_Z=" 0. ; 0. ; 5027.52" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder2"    X_Y_Z=" 0. ; 0. ; -5027.52" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder3"    X_Y_Z=" 0. ; 0. ; 1712.5" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder3"    X_Y_Z=" 0. ; 0. ; -1712.5" rot=" 0.; 0.;0." />
+</composition>
+
+    <!--  End Girder 3 -->
+
+
+    <!--  Extremity Girder -->
+<box name="Extremity_Girder_Plate1" material="ShieldSteel" X_Y_Z="859.; 1100.; 75."/>
+<box name="Extremity_Girder_Plate1CutBox" material="ShieldSteel" X_Y_Z="459.; 700.; 80."/>
+
+<subtraction name="Extremity_Girder_Plate1Cut" >
+    <posXYZ volume="Extremity_Girder_Plate1" />
+    <posXYZ volume="Extremity_Girder_Plate1CutBox" />
+</subtraction>
+
+<gvxysx name="Extremity_Girder_Plate2" material="ShieldSteel" dZ="75.">
+    <gvxy_point X_Y="-325.; -370."/>
+    <gvxy_point X_Y="-325.; 230."/>
+    <gvxy_point X_Y="-425.; 324."/>
+    <gvxy_point X_Y="-425.; 370."/>
+</gvxysx>
+
+<gvxy name="Extremity_Girder_Plate3" material="ShieldSteel" dZ="40.">
+    <gvxy_point X_Y="-362.; 175.5"/>
+    <gvxy_point X_Y="-362.; 428.5"/>
+    <gvxy_point X_Y="362.; 428.5"/>
+    <gvxy_point X_Y="362.; -428.5"/>
+</gvxy>
+
+<box name="Extremity_Girder_Plate4" material="ShieldSteel" X_Y_Z="389.; 383.; 40."/>
+
+<gvxysx name="Extremity_Girder_Plate5" material="ShieldSteel" dZ="40.">
+    <gvxy_point X_Y="-394.5; -400."/>
+    <gvxy_point X_Y="-253.5; 400."/>
+</gvxysx>
+
+<composition  name="Extremity_Girder" >
+    <posXYZ  volume="Extremity_Girder_Plate1Cut"    X_Y_Z=" 0. ; 0. ; -0.05" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Extremity_Girder_Plate2"    X_Y_Z=" 0. ; 442.5 ; 407.51" rot=" -90.; 0.; 0." />
+    <posXYZ  volume="Extremity_Girder_Plate3"    X_Y_Z=" 251.21 ; -23.55 ; 397.53" rot=" 0.; 80.;0." />
+    <posXYZ  volume="Extremity_Girder_Plate3"    X_Y_Z=" -251.21 ; -23.55 ; 397.53" rot=" 0.; 100.;0." />
+    <posXYZ  volume="Extremity_Girder_Plate4"    X_Y_Z=" 0. ; 213.45 ; 580." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Extremity_Girder_Plate5"    X_Y_Z=" 0. ; -209.5 ; 362.7" rot=" 49.7; 0.;0." />
+</composition>
+    <!--  End Extremity Girder -->
+
+
+    <!--  Rail_Support -->
+<gvxysx name="Standard_Rail_Support" material="ShieldSteel" dZ="525.">
+    <gvxy_point X_Y="-350.; -452.1"/>
+    <gvxy_point X_Y="-350.; -437.1"/>
+    <gvxy_point X_Y="-550.; -437.1"/>
+    <gvxy_point X_Y="-550.; -342.1"/>
+    <gvxy_point X_Y="-540.; -342.1"/>
+    <gvxy_point X_Y="-540.; 318.5"/>
+    <gvxy_point X_Y="-597.5; 318.5"/>
+    <gvxy_point X_Y="-597.5; 452.1"/>
+</gvxysx>
+
+<box name="Standard_Rail_SupportCutBox1" material="ShieldSteel" X_Y_Z="920.; 290.6; 425."/>
+<box name="Standard_Rail_SupportCutBox2" material="ShieldSteel" X_Y_Z="920.; 290.; 425."/>
+
+<subtraction name="Standard_Rail_SupportCut" >
+    <posXYZ volume="Standard_Rail_Support" />
+    <posXYZ volume="Standard_Rail_SupportCutBox1"  X_Y_Z=" 0 ; 173.2 ; 262.5" rot=" 0.; 0.;0." />
+    <posXYZ volume="Standard_Rail_SupportCutBox1"  X_Y_Z=" 0 ; 173.2 ; -262.5" rot=" 0.; 0.;0." />
+    <posXYZ volume="Standard_Rail_SupportCutBox2"  X_Y_Z=" 0 ; -197.1 ; 262.5" rot=" 0.; 0.;0." />
+    <posXYZ volume="Standard_Rail_SupportCutBox2"  X_Y_Z=" 0 ; -197.1 ; -262.5" rot=" 0.; 0.;0." />
+</subtraction>
+    <!--  End Rail_Support -->
+
+
+    <!--  Extremity Rail_Support -->
+<gvxysx name="Extremity_Rail_Support_Plate1" material="ShieldSteel" dZ="1820.">
+    <gvxy_point X_Y="-40.; -678.8"/>
+    <gvxy_point X_Y="-40.; -127.7"/>
+    <gvxy_point X_Y="-262.5; -127.7"/>
+    <gvxy_point X_Y="-262.5; 0."/>
+</gvxysx>
+
+<box name="Extremity_Rail_Support_Plate1Cut" material="ShieldSteel" X_Y_Z="100.; 1102.2; 40."/>
+
+<subtraction name="Extremity_Rail_SupportCut" >
+    <posXYZ volume="Extremity_Rail_Support_Plate1" />
+    <posXYZ volume="Extremity_Rail_Support_Plate1Cut"  X_Y_Z=" 0 ; -678.8 ; -910." rot=" 0.; 0.;0." />
+</subtraction>
+
+<gvxy name="Extremity_Rail_Support_Plate2" material="ShieldSteel" dZ="80.">
+    <gvxy_point X_Y="179.5; -113."/>
+    <gvxy_point X_Y="284.; -262.5"/>
+    <gvxy_point X_Y="490.; -262.5"/>
+    <gvxy_point X_Y="490.; 262.5"/>
+    <gvxy_point X_Y="-715.; 262.5"/>
+    <gvxy_point X_Y="-715.; -262.5"/>
+    <gvxy_point X_Y="-575.; -262.5"/>
+    <gvxy_point X_Y="-470.5; -113."/>
+</gvxy>
+
+<box name="Extremity_Rail_Support_Plate3-4" material="ShieldSteel" X_Y_Z="525.; 551.1; 80."/>
+
+<union name="Extremity_Rail_SupportUni1" >
+    <posXYZ volume="Extremity_Rail_SupportCut" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 0."/>
+    <posXYZ volume="Extremity_Rail_Support_Plate2" X_Y_Z=" 0.; -423.8; 0. " rot=" 90.; -90.; 0."/>
+    <posXYZ volume="Extremity_Rail_Support_Plate3-4" X_Y_Z=" 0.; -403.25; 530." rot=" 0.; 0.; 0."/>
+    <posXYZ volume="Extremity_Rail_Support_Plate3-4" X_Y_Z=" 0.; -403.25; -755." rot=" 0.; 0.; 0."/>
+</union>
+
+<gvxy name="Extremity_Rail_Support_Plate5" material="ShieldSteel" dZ="110.">
+    <gvxy_point X_Y="-645.; -45."/>
+    <gvxy_point X_Y="-645.; -262.5"/>
+    <gvxy_point X_Y="-890.; -262.5"/>
+    <gvxy_point X_Y="-890.; 262.5"/>
+    <gvxy_point X_Y="910.; 262.5"/>
+    <gvxy_point X_Y="910.; -262.5"/>
+    <gvxy_point X_Y="305.; -262.5"/>
+    <gvxy_point X_Y="305.; -45."/>
+</gvxy>
+
+<box name="Extremity_Rail_Support_Plate5CutBox" material="ShieldSteel" X_Y_Z="210.; 550.; 40."/>
+
+<subtraction name="Extremity_Rail_Support_Plate5Cut1" >
+    <posXYZ volume="Extremity_Rail_Support_Plate5" />
+    <posXYZ volume="Extremity_Rail_Support_Plate5CutBox"  X_Y_Z=" 485. ; 0. ; 55." rot=" 0.; 0.;0." />
+    <posXYZ volume="Extremity_Rail_Support_Plate5CutBox"  X_Y_Z=" -815. ; 0. ; 55." rot=" 0.; 0.;0." />
+</subtraction>
+
+
+<composition name="Extremity_Rail_Support1" >
+    <posXYZ volume="Extremity_Rail_SupportUni1" />
+    <posXYZ volume="Extremity_Rail_Support_Plate5Cut1"  X_Y_Z=" 0 ; -733.85 ; 0." rot=" 0.; -90.; 90." />
+</composition>
+
+<subtraction name="Extremity_Rail_Support_Plate5Cut2" >
+    <posXYZ volume="Extremity_Rail_Support_Plate5" />
+    <posXYZ volume="Extremity_Rail_Support_Plate5CutBox"  X_Y_Z=" 485. ; 0. ; -55." rot=" 0.; 0.;0." />
+    <posXYZ volume="Extremity_Rail_Support_Plate5CutBox"  X_Y_Z=" -815. ; 0. ; -55." rot=" 0.; 0.;0." />
+</subtraction>
+
+<union name="Extremity_Rail_SupportUni2" >
+    <posXYZ volume="Extremity_Rail_SupportCut" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 0."/>
+    <posXYZ volume="Extremity_Rail_Support_Plate2" X_Y_Z=" 0.; -423.8; 0." rot=" -90.; -90.; 0."/>
+    <posXYZ volume="Extremity_Rail_Support_Plate3-4" X_Y_Z=" 0.; -403.25; 530." rot=" 0.; 0.; 0."/>
+    <posXYZ volume="Extremity_Rail_Support_Plate3-4" X_Y_Z=" 0.; -403.25; -755." rot=" 0.; 0.; 0."/>
+</union>
+
+<composition name="Extremity_Rail_Support2" >
+    <posXYZ volume="Extremity_Rail_SupportUni2" />
+    <posXYZ volume="Extremity_Rail_Support_Plate5Cut2"  X_Y_Z=" 0 ; -733.85 ; 0." rot=" 0.; -90.; -90." />
+</composition>
+    <!--  End Extremity Rail_Support -->
+
+
+    <!-- assembly of Standard feet, Standard rail support and Standard strut -->
+<composition  name="Standard_Feet_Comp" >
+    <posXYZ  volume="Standard_Feet"    X_Y_Z=" -3609.69 ; -4899.96 ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Feet"    X_Y_Z=" 3609.69 ; -4899.96 ; 0." rot=" 0.; 180.;0." />
+    <posXYZ  volume="Standard_Rail_SupportCut"    X_Y_Z=" -2982.592 ; 852.63 ; 0." rot=" 0.; 90.;0." />
+    <posXYZ  volume="Standard_Rail_SupportCut"    X_Y_Z=" 2982.592 ; 852.63 ; 0." rot=" 0.; 90.;0." />
+    <posXYZ  volume="Standard_Main_Strut"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+</composition>
+
+<composition  name="Extremity_Feet_Comp" >
+    <posXYZ  volume="Extremiy_Feet"    X_Y_Z=" -3609.95 ; -4895. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Extremiy_Feet"    X_Y_Z=" 3609.95 ; -4895. ; 0." rot=" 0.; 180.;0." />
+    <posXYZ  volume="Extremity_Rail_Support1"    X_Y_Z=" -2982.641; 1304.32 ; 165.02" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Extremity_Rail_Support2"    X_Y_Z=" 2982.641; 1304.32 ; 165.02" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Extremity_Main_Strut"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Extremity_Girder"    X_Y_Z=" 2735.53 ; -969.96 ; -758.8" rot=" 0.; 180.; 0." />
+    <posXYZ  volume="Extremity_Girder"    X_Y_Z=" -2735.53 ; -969.96 ; -757.8" rot=" 0.; 180.; 0." />
+</composition>
+    <!-- End assembly of Standard feet, Standard rail support and Standard strut -->
+
+
+<composition  name="Feet" >
+    <posXYZ  volume="Standard_Feet_Comp"    X_Y_Z=" 0. ; -6135.059 ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Feet_Comp"    X_Y_Z=" 0. ; -6135.059 ; 3425.034" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Feet_Comp"    X_Y_Z=" 0. ; -6135.059 ; 6630.036" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Feet_Comp"    X_Y_Z=" 0. ; -6135.059 ; 9380.034" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Feet_Comp"    X_Y_Z=" 0. ; -6135.059 ; -3425.034" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Feet_Comp"    X_Y_Z=" 0. ; -6135.059 ; -6630.036" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Feet_Comp"    X_Y_Z=" 0. ; -6135.059 ; -9380.034" rot=" 0.; 0.;0." />
+
+    <posXYZ  volume="Extremity_Feet_Comp"    X_Y_Z=" 0. ; -6135.059 ; 12080.034" rot=" 0.; 0.;0." />
+    <posXYZ  volume="Extremity_Feet_Comp"    X_Y_Z=" 0. ; -6135.059 ; -12080.034" rot=" 0.; 180.;0." />
+
+    <posXYZ  volume="Standard_Girder1-2-3"    X_Y_Z=" -2735.5 ; -6613.91 ; 0." rot=" 0.; 0.;0." />
+    <posXYZ  volume="Standard_Girder1-2-3"    X_Y_Z=" 2735.5 ; -6613.91 ; 0." rot=" 0.; 180.;0." />
+</composition>
+
+</section>
+
+
+<section name       = "ATLAS Rail"
+         version    = "7.0"
+         date       = "10 December 2003"
+         author     = "Jochen Meyer, Laurent Chevalier, Daniel Pomarede"
+         top_volume = "RailAssembly">
+
+
+
+<!--  Basic parameters  -->
+
+<!--  Rails Main section  -->
+<!-- BEGIN confirmation with atlhbrb_0001-vAH (if no other comment) -->
+<var  name="RAIL_CeRzleng_CentralRail_Zlength"     value="6850." />
+<var  name="RAIL_ExRzleng_ExtremityRail_Zlength"   value="9784." />
+<var  name="RAIL_CeRwidt1_CentralRail_Width1"      value=" 450." />
+<var  name="RAIL_CeRwidt2_CentralRail_Width2"      value=" 120." />
+<var  name="RAIL_CeRwid3o_CentralRail_Width3outer" value=" 380." />
+<var  name="RAIL_CeRwid3i_CentralRail_Width3inner" value=" 350." />
+
+<var  name="RAIL_CeRthic1_CentralRail_Thick1"      value=" 100." />
+<var  name="RAIL_CeRthic2_CentralRail_Thick2"      value=" 200." />
+
+<!--  Reinforcement Plates  -->
+
+<var  name="RAIL_CeRRPSzl_CentralRailReinforcementPlate_std_Zlength"       value=" 50." />
+<var  name="RAIL_CeRRPEzl_CentralRailReinforcementPlate_extremity_Zlength" value=" 40." />
+<var  name="RAIL_CeRRPIx1_CentralRailReinforcementPlateInner_Xdist1"       value="260." />
+<var  name="RAIL_CeRRPOx1_CentralRailReinforcementPlateOuter_Xdist1"       value="290." />
+
+<!-- CentralRailReinforcementPlate_std_Zpos -->
+<array  name="RAIL_CeRRPSzp" values="490.;1090.;1687.5;2285.;2885.;3400.;3915.;4515.;5112.5;5710.;6310. " />
+<!-- ExtremityRailReinforcementPlate_std_Zpos -->
+<array  name="RAIL_ExRRPSzp" values="540;1085;1627.5;2170;2715;3230;3745;4315;4895;5465;5980;6495;7017.5;7540;8062.5;8720;9375" />
+
+<!--  Global position  -->
+<var  name="RAIL_Xpos"       value=" 2985." />  <!-- confirmed atcnh___0005-vAG -->
+<var  name="RAIL_Ypos_above" value="-4390." />  <!-- confirmed atcnh___0005-vAG -->
+
+<!--  Derived variables  -->
+
+<var  name="RAIL_totHeight"  value="RAIL_CeRthic2_CentralRail_Thick2+2.*RAIL_CeRthic1_CentralRail_Thick1" />
+
+
+
+<!--  Feet Modelization  -->
+
+<!--  Rail Main section  -->
+
+<var  name="RAIL_CeRy"        value="0." />
+
+<var  name="RAIL_CeRxb"       value="RAIL_CeRwidt1_CentralRail_Width1/2." />
+<var  name="RAIL_CeRyb"       value="0." />
+
+<var  name="RAIL_CeRxc"       value="RAIL_CeRxb" />
+<var  name="RAIL_CeRyc"       value="RAIL_CeRthic1_CentralRail_Thick1" />
+
+<var  name="RAIL_CeRxd"       value="RAIL_CeRwidt2_CentralRail_Width2/2." />
+<var  name="RAIL_CeRyd"       value="RAIL_CeRyc" />
+
+<var  name="RAIL_CeRxe"       value="RAIL_CeRxd" />
+<var  name="RAIL_CeRye"       value="RAIL_CeRyd+RAIL_CeRthic2_CentralRail_Thick2" />
+
+<var  name="RAIL_CeRxf"       value="RAIL_CeRwid3i_CentralRail_Width3inner" />
+<var  name="RAIL_CeRyf"       value="RAIL_CeRye" />
+
+<var  name="RAIL_CeRxg"       value="RAIL_CeRxf" />
+<var  name="RAIL_CeRyg"       value="RAIL_CeRyf+RAIL_CeRthic1_CentralRail_Thick1" />
+
+<var  name="RAIL_CeRxh"       value="-RAIL_CeRwid3o_CentralRail_Width3outer" />
+<var  name="RAIL_CeRyh"       value="RAIL_CeRyg" />
+
+<var  name="RAIL_CeRxi"       value="RAIL_CeRxh" />
+<var  name="RAIL_CeRyi"       value="RAIL_CeRye" />
+
+<var  name="RAIL_CeRxj"       value="-RAIL_CeRwidt2_CentralRail_Width2/2." />
+<var  name="RAIL_CeRyj"       value="RAIL_CeRyi" />
+
+<var  name="RAIL_CeRxk"       value="RAIL_CeRxj" />
+<var  name="RAIL_CeRyk"       value="RAIL_CeRyc" />
+
+<var  name="RAIL_CeRxl"       value="-RAIL_CeRwidt1_CentralRail_Width1/2." />
+<var  name="RAIL_CeRyl"       value="RAIL_CeRyk" />
+
+<var  name="RAIL_CeRxm"       value="RAIL_CeRxl" />
+<var  name="RAIL_CeRym"       value="RAIL_CeRy " />
+
+<!-- gvxy     name="CentralRail"            material="Iron"   dZ="RAIL_CeRzleng_CentralRail_Zlength"  >
+  <gvxy_point X_Y="-RAIL_CeRxb;RAIL_CeRyb"/>
+  <gvxy_point X_Y="-RAIL_CeRxc;RAIL_CeRyc"/>
+  <gvxy_point X_Y="-RAIL_CeRxd;RAIL_CeRyd"/>
+  <gvxy_point X_Y="-RAIL_CeRxe;RAIL_CeRye"/>
+  <gvxy_point X_Y="-RAIL_CeRxf;RAIL_CeRyf"/>
+  <gvxy_point X_Y="-RAIL_CeRxg;RAIL_CeRyg"/>
+  <gvxy_point X_Y="-RAIL_CeRxh;RAIL_CeRyh"/>
+  <gvxy_point X_Y="-RAIL_CeRxi;RAIL_CeRyi"/>
+  <gvxy_point X_Y="-RAIL_CeRxj;RAIL_CeRyj"/>
+  <gvxy_point X_Y="-RAIL_CeRxk;RAIL_CeRyk"/>
+  <gvxy_point X_Y="-RAIL_CeRxl;RAIL_CeRyl"/>
+  <gvxy_point X_Y="-RAIL_CeRxm;RAIL_CeRym"/>
+</gvxy -->
+
+<var name="Rail_temp1" value="RAIL_CeRyg/2.-(RAIL_CeRyg-RAIL_CeRyf)/2." />
+<var name="Rail_temp2" value="-RAIL_CeRyg/2.+(RAIL_CeRyc-RAIL_CeRyb)/2." />
+<var name="Rail_temp3" value="(RAIL_CeRxg+RAIL_CeRxh)/2." />
+
+<box name="ExtremityRail_a" material="Iron" X_Y_Z="RAIL_CeRxd*2.;RAIL_CeRyg;RAIL_ExRzleng_ExtremityRail_Zlength - GENV_Eps" />
+<box name="ExtremityRail_b" material="Iron" X_Y_Z="(RAIL_CeRxg-RAIL_CeRxh);(RAIL_CeRyg-RAIL_CeRyf);RAIL_ExRzleng_ExtremityRail_Zlength" />
+<box name="ExtremityRail_c" material="Iron" X_Y_Z="-2.*RAIL_CeRxl;(RAIL_CeRyc-RAIL_CeRyb);RAIL_ExRzleng_ExtremityRail_Zlength" />
+<union name="ExtremityRail_d" >
+  <posXYZ  volume="ExtremityRail_a" />
+  <posXYZ  volume="ExtremityRail_b" X_Y_Z="-Rail_temp3;Rail_temp1;0"/>
+  <posXYZ  volume="ExtremityRail_c" X_Y_Z="0.;Rail_temp2;0"/>
+</union>
+
+<composition name="ExtremityRail_plus_new" >
+  <posXYZ  volume="ExtremityRail_d" X_Y_Z="0.;RAIL_CeRyg/2.;0." />
+</composition>
+
+<box name="CentralRail_a" material="Iron" X_Y_Z="RAIL_CeRxd*2.;RAIL_CeRyg;RAIL_CeRzleng_CentralRail_Zlength - GENV_Eps" />
+<box name="CentralRail_b" material="Iron" X_Y_Z="(RAIL_CeRxg-RAIL_CeRxh);(RAIL_CeRyg-RAIL_CeRyf);RAIL_CeRzleng_CentralRail_Zlength" />
+<box name="CentralRail_c" material="Iron" X_Y_Z="-2.*RAIL_CeRxl;(RAIL_CeRyc-RAIL_CeRyb);RAIL_CeRzleng_CentralRail_Zlength" />
+<union name="CentralRail_d" >
+  <posXYZ  volume="CentralRail_a" />
+  <posXYZ  volume="CentralRail_b" X_Y_Z="-Rail_temp3;Rail_temp1;0"/>
+  <posXYZ  volume="CentralRail_c" X_Y_Z="0.;Rail_temp2;0"/>
+</union>
+
+<composition name="CentralRail_new" >
+  <posXYZ  volume="CentralRail_d" X_Y_Z="0.;RAIL_CeRyg/2.;0." />
+</composition>
+
+<!--gvxy     name="ExtremityRail_plus"            material="Iron"   dZ="RAIL_ExRzleng_ExtremityRail_Zlength"  >
+  <gvxy_point  X_Y=" -RAIL_CeRxb  ;  RAIL_CeRyb "   />
+  <gvxy_point  X_Y=" -RAIL_CeRxc  ;  RAIL_CeRyc "   />
+  <gvxy_point  X_Y=" -RAIL_CeRxd  ;  RAIL_CeRyd "   />
+  <gvxy_point  X_Y=" -RAIL_CeRxe  ;  RAIL_CeRye "   />
+  <gvxy_point  X_Y=" -RAIL_CeRxf  ;  RAIL_CeRyf "   />
+  <gvxy_point  X_Y=" -RAIL_CeRxg  ;  RAIL_CeRyg "   />
+  <gvxy_point  X_Y=" -RAIL_CeRxh  ;  RAIL_CeRyh "   />
+  <gvxy_point  X_Y=" -RAIL_CeRxi  ;  RAIL_CeRyi "   />
+  <gvxy_point  X_Y=" -RAIL_CeRxj  ;  RAIL_CeRyj "   />
+  <gvxy_point  X_Y=" -RAIL_CeRxk  ;  RAIL_CeRyk "   />
+  <gvxy_point  X_Y=" -RAIL_CeRxl  ;  RAIL_CeRyl "   />
+  <gvxy_point  X_Y=" -RAIL_CeRxm  ;  RAIL_CeRym "   />
+</gvxy -->
+
+<composition  name="ExtremityRail_minus" >
+  <posXYZ  volume="ExtremityRail_plus_new"  rot=" 0.; 180.; 0. " />
+</composition>
+
+
+
+<!--  Reinforcement Plates  -->
+
+<var  name="RAIL_CeRRPIy2_CentralRailReinforcementPlateInner_Ydist2"   value="(RAIL_CeRRPIx1_CentralRailReinforcementPlateInner_Xdist1 + RAIL_CeRwidt2_CentralRail_Width2/2. - RAIL_CeRxc) * GENV_Ta55" />
+
+<var  name="RAIL_CeRRPIxa"       value="RAIL_CeRxd" />
+<var  name="RAIL_CeRRPIya"       value="RAIL_CeRyd" />
+<var  name="RAIL_CeRRPIxb"       value="RAIL_CeRxc" />
+<var  name="RAIL_CeRRPIyb"       value="RAIL_CeRyc" />
+<var  name="RAIL_CeRRPIxc"       value="RAIL_CeRxd + RAIL_CeRRPIx1_CentralRailReinforcementPlateInner_Xdist1" />
+<var  name="RAIL_CeRRPIyc"       value="RAIL_CeRyc + RAIL_CeRRPIy2_CentralRailReinforcementPlateInner_Ydist2" />
+<var  name="RAIL_CeRRPIxd"       value="RAIL_CeRRPIxc" />
+<var  name="RAIL_CeRRPIyd"       value="RAIL_CeRye" />
+<var  name="RAIL_CeRRPIxe"       value="RAIL_CeRRPIxa" />
+<var  name="RAIL_CeRRPIye"       value="RAIL_CeRRPIyd" />
+
+<gvxy     name="CentralRailReinforcementPlateInner_extremity"  material="Iron"   dZ="RAIL_CeRRPEzl_CentralRailReinforcementPlate_extremity_Zlength"  >
+  <gvxy_point  X_Y=" -RAIL_CeRRPIxa  ;  RAIL_CeRRPIya "   />
+  <gvxy_point  X_Y=" -RAIL_CeRRPIxb  ;  RAIL_CeRRPIyb "   />
+  <gvxy_point  X_Y=" -RAIL_CeRRPIxc  ;  RAIL_CeRRPIyc "   />
+  <gvxy_point  X_Y=" -RAIL_CeRRPIxd  ;  RAIL_CeRRPIyd "   />
+  <gvxy_point  X_Y=" -RAIL_CeRRPIxe  ;  RAIL_CeRRPIye "   />
+</gvxy>
+
+
+<var  name="RAIL_CeRRPOxa"       value="-RAIL_CeRxd" />
+<var  name="RAIL_CeRRPOya"       value=" RAIL_CeRyd" />
+<var  name="RAIL_CeRRPOxb"       value="-RAIL_CeRxc" />
+<var  name="RAIL_CeRRPOyb"       value=" RAIL_CeRyc" />
+<var  name="RAIL_CeRRPOxc"       value="-RAIL_CeRxd - RAIL_CeRRPOx1_CentralRailReinforcementPlateOuter_Xdist1" />
+<var  name="RAIL_CeRRPOyc"       value=" RAIL_CeRyc + RAIL_CeRRPIy2_CentralRailReinforcementPlateInner_Ydist2" />
+<var  name="RAIL_CeRRPOxd"       value=" RAIL_CeRRPOxc" />
+<var  name="RAIL_CeRRPOyd"       value=" RAIL_CeRye" />
+<var  name="RAIL_CeRRPOxe"       value=" RAIL_CeRRPOxa" />
+<var  name="RAIL_CeRRPOye"       value=" RAIL_CeRRPOyd" />
+
+<gvxy     name="CentralRailReinforcementPlateOuter_extremity"         material="Iron"   dZ="RAIL_CeRRPEzl_CentralRailReinforcementPlate_extremity_Zlength"  >
+  <gvxy_point  X_Y="  RAIL_CeRRPOxa  ;  RAIL_CeRRPOya "   />
+  <gvxy_point  X_Y="  RAIL_CeRRPOxb  ;  RAIL_CeRRPOyb "   />
+  <gvxy_point  X_Y="  RAIL_CeRRPOxc  ;  RAIL_CeRRPOyc "   />
+  <gvxy_point  X_Y="  RAIL_CeRRPOxd  ;  RAIL_CeRRPOyd "   />
+  <gvxy_point  X_Y="  RAIL_CeRRPOxe  ;  RAIL_CeRRPOye "   />
+</gvxy>
+
+<var  name="RAIL_CeRRPe1z_CentralRailReinforcementPlate_extremity1_Zpos"      value="-RAIL_CeRzleng_CentralRail_Zlength/2. + RAIL_CeRRPEzl_CentralRailReinforcementPlate_extremity_Zlength/2. " />
+<var  name="RAIL_CeRRPe2z_CentralRailReinforcementPlate_extremity2_Zpos"      value="-RAIL_CeRRPe1z_CentralRailReinforcementPlate_extremity1_Zpos" />
+<var  name="RAIL_ExRRPe1z_ExtremityRailReinforcementPlate_extremity1_Zpos"    value="-RAIL_ExRzleng_ExtremityRail_Zlength/2. + RAIL_CeRRPEzl_CentralRailReinforcementPlate_extremity_Zlength/2. " />
+<var  name="RAIL_ExRRPe2z_ExtremityRailReinforcementPlate_extremity2_Zpos"    value="-RAIL_ExRRPe1z_ExtremityRailReinforcementPlate_extremity1_Zpos" />
+
+<gvxy     name="CentralRailReinforcementPlateInner_std"         material="Iron"   dZ="RAIL_CeRRPSzl_CentralRailReinforcementPlate_std_Zlength"  >
+  <gvxy_point  X_Y=" -RAIL_CeRRPIxa  ;  RAIL_CeRRPIya "   />
+  <gvxy_point  X_Y=" -RAIL_CeRRPIxb  ;  RAIL_CeRRPIyb "   />
+  <gvxy_point  X_Y=" -RAIL_CeRRPIxc  ;  RAIL_CeRRPIyc "   />
+  <gvxy_point  X_Y=" -RAIL_CeRRPIxd  ;  RAIL_CeRRPIyd "   />
+  <gvxy_point  X_Y=" -RAIL_CeRRPIxe  ;  RAIL_CeRRPIye "   />
+</gvxy>
+<gvxy     name="CentralRailReinforcementPlateOuter_std"         material="Iron"   dZ="RAIL_CeRRPSzl_CentralRailReinforcementPlate_std_Zlength"  >
+  <gvxy_point  X_Y="  RAIL_CeRRPOxa  ;  RAIL_CeRRPOya "   />
+  <gvxy_point  X_Y="  RAIL_CeRRPOxb  ;  RAIL_CeRRPOyb "   />
+  <gvxy_point  X_Y="  RAIL_CeRRPOxc  ;  RAIL_CeRRPOyc "   />
+  <gvxy_point  X_Y="  RAIL_CeRRPOxd  ;  RAIL_CeRRPOyd "   />
+  <gvxy_point  X_Y="  RAIL_CeRRPOxe  ;  RAIL_CeRRPOye "   />
+</gvxy>
+
+
+
+<composition  name="CentralRailReinforcementPlate_extremity_minus" >
+  <posXYZ  volume="CentralRailReinforcementPlateInner_extremity"   rot="0.;180.;0." />
+  <posXYZ  volume="CentralRailReinforcementPlateOuter_extremity"   />
+</composition>
+<composition  name="CentralRailReinforcementPlate_extremity_plus" >
+  <posXYZ  volume="CentralRailReinforcementPlateInner_extremity"   />
+  <posXYZ  volume="CentralRailReinforcementPlateOuter_extremity"   rot="0.;180.;0." />
+</composition>
+
+<composition  name="CentralRailReinforcementPlate_std_minus" >
+  <posXYZ  volume="CentralRailReinforcementPlateInner_std"         rot="0.;180.;0." />
+  <posXYZ  volume="CentralRailReinforcementPlateOuter_std"         />
+</composition>
+<composition  name="CentralRailReinforcementPlate_std_plus" >
+  <posXYZ  volume="CentralRailReinforcementPlateInner_std"         />
+  <posXYZ  volume="CentralRailReinforcementPlateOuter_std"         rot="0.;180.;0." />
+</composition>
+
+
+
+<!--  Feet Assembly  -->
+
+<composition  name="CentralRailAssembly" >
+  <!-- posXYZ  volume="CentralRail" rot="0.;180.;0." /-->
+  <posXYZ  volume="CentralRail_new" rot="0.;180.;0." />
+  <posXYZ  volume="CentralRailReinforcementPlate_extremity_minus"    X_Y_Z=" 0.;0.; RAIL_CeRRPe1z_CentralRailReinforcementPlate_extremity1_Zpos"  />
+  <posXYZ  volume="CentralRailReinforcementPlate_extremity_minus"    X_Y_Z=" 0.;0.; RAIL_CeRRPe2z_CentralRailReinforcementPlate_extremity2_Zpos"  />
+  <foreach  index="I"  begin="0"  loops="11" >
+    <posXYZ  volume="CentralRailReinforcementPlate_std_minus"        X_Y_Z=" 0.;0.;-RAIL_CeRzleng_CentralRail_Zlength/2. + RAIL_CeRRPSzl_CentralRailReinforcementPlate_std_Zlength/2. + RAIL_CeRRPSzp[I]"  />
+  </foreach>
+</composition>
+
+
+<var  name="RAIL_Ypos"        value="RAIL_Ypos_above - RAIL_totHeight" /> <!-- ATTENTION THIS VARIABLE IS ALSO USED IN SHIELDING AND HFTRUCK SECTIONS -->
+<var  name="RAIL_ExtrZpos"    value="RAIL_CeRzleng_CentralRail_Zlength/2.+RAIL_ExRzleng_ExtremityRail_Zlength/2." />
+
+
+<composition  name="ExtremityRailAssembly" >
+  <posXYZ  volume="ExtremityRail_minus"                            X_Y_Z=" -RAIL_Xpos;0.; 0."  />
+  <posXYZ  volume="CentralRailReinforcementPlate_extremity_minus"  X_Y_Z="-RAIL_Xpos;0.; RAIL_ExRRPe1z_ExtremityRailReinforcementPlate_extremity1_Zpos"  />
+  <posXYZ  volume="CentralRailReinforcementPlate_extremity_minus"  X_Y_Z="-RAIL_Xpos;0.; RAIL_ExRRPe2z_ExtremityRailReinforcementPlate_extremity2_Zpos"  />
+  
+  <foreach  index="I"  begin="0"  loops="17" >
+    <posXYZ  volume="CentralRailReinforcementPlate_std_minus"      X_Y_Z=" -RAIL_Xpos;0.;-RAIL_ExRzleng_ExtremityRail_Zlength/2. - RAIL_CeRRPSzl_CentralRailReinforcementPlate_std_Zlength/2. + RAIL_ExRRPSzp[I]"  />
+  </foreach>
+
+  <!--posXYZ  volume="ExtremityRail_plus"                             X_Y_Z=" RAIL_Xpos;0.; 0."  /-->
+  <posXYZ  volume="ExtremityRail_plus_new"                             X_Y_Z=" RAIL_Xpos;0.; 0."  />
+  <posXYZ  volume="CentralRailReinforcementPlate_extremity_plus"   X_Y_Z=" RAIL_Xpos;0.; RAIL_ExRRPe1z_ExtremityRailReinforcementPlate_extremity1_Zpos"  />
+  <posXYZ  volume="CentralRailReinforcementPlate_extremity_plus"   X_Y_Z=" RAIL_Xpos;0.; RAIL_ExRRPe2z_ExtremityRailReinforcementPlate_extremity2_Zpos"  />
+  
+  <foreach  index="I"  begin="0"  loops="17" >
+    <posXYZ  volume="CentralRailReinforcementPlate_std_plus"       X_Y_Z=" RAIL_Xpos;0.;-RAIL_ExRzleng_ExtremityRail_Zlength/2. - RAIL_CeRRPSzl_CentralRailReinforcementPlate_std_Zlength/2. + RAIL_ExRRPSzp[I]"  />
+  </foreach>
+</composition>
+
+<composition  name="RailAssembly" >
+  <posXYZ  volume="CentralRailAssembly"    X_Y_Z="-RAIL_Xpos;RAIL_Ypos; 0."      rot="0.;  0.;0." />
+  <posXYZ  volume="CentralRailAssembly"    X_Y_Z=" RAIL_Xpos;RAIL_Ypos; 0."      rot="0.;180.;0." />
+  <posXYZ  volume="ExtremityRailAssembly"  X_Y_Z=" 0.;RAIL_Ypos; RAIL_ExtrZpos"  rot="0.;  0.;0." />
+  <posXYZ  volume="ExtremityRailAssembly"  X_Y_Z=" 0.;RAIL_Ypos;-RAIL_ExtrZpos"  rot="0.;180.;0." /> 
+</composition>
+
+</section>
+
+
+
+  
+
+<section name       = "ATLAS Shielding"
+         version    = "8.0"
+         date       = "10 January 2011"
+         author     = "Daniel Pomarede, reviewed by Jochen"
+         top_volume = "useless">
+
+
+<!--     name       =  A Frame Welded Assembly       section name       = "Shielding" -->
+
+<!--  **************************************************************
+      **************************************************************
+      ***                                                       ****
+      ***                     ATLAS Shields                     ****
+      ***                                                       ****
+      **************************************************************  
+      **************************************************************  -->
+
+
+
+<!--  JF Shielding  -->
+
+<!--  "A" Frame Welded Assembly  -->
+
+
+
+<!--  Useful variables  -->
+
+<var  name="JFSH_XYZref"                                      value="   0." />  <!-- NO CONFIRMATION NEEDED -->
+<var  name="JFSH_rot180"                                      value=" 180." />  <!-- NO CONFIRMATION NEEDED -->
+
+<!--  Primary variables  -->
+
+<!-- BEGIN confirmation with atljf___0087-vAC (if no other comment) -->
+<var  name="JFSH_AFBBleng_AFrame_BottomBar_length"            value="5498." />
+<var  name="JFSH_AFBheigh_AFrame_Bar_height"                  value=" 250." />
+<var  name="JFSH_AFrwidth_AFrame_width"                       value=" 250." />
+<var  name="JFSH_AFBthic1_AFrame_Bar_thickness1"              value="   9." />
+<var  name="JFSH_AFBthic2_AFrame_Bar_thickness2"              value="  14." />
+<var  name="JFSH_AFLangle_AFrame_Leg_angle"                   value="  42." />
+
+<var  name="JFSH_AFSlengt_AFrame_Spacer_length"               value=" 140." />
+<var  name="JFSH_AFSheigh_AFrame_Spacer_height"               value=" 290." />
+
+<var  name="JFSH_AFWEBBx1_AFrame_Web_element_BottomBar_X1"    value="   0." />  <!-- NO CONFIRMATION NEEDED -->
+<var  name="JFSH_AFWEBBx2_AFrame_Web_element_BottomBar_X2"    value="1306." />  <!-- confirmed atljf___0028-vAD -->
+<var  name="JFSH_AFWEleng_AFrame_Web_element_length"          value="  30." />
+<var  name="JFSH_AFWEBLx1_AFrame_Web_element_Leg_DX1"         value="1090.+8." />    <!-- temporarily sum to avoid overlap, second Flange needs to be introduced, confirmed atljf___0028-vAD-->
+<var  name="JFSH_AFWEBLx2_AFrame_Web_element_Leg_DX2"         value=" 965." />  <!-- confirmed atljf___0028-vAD -->
+
+<var  name="JFSH_AFFthick_AFrame_Flange_thickness"            value="  15." />
+<var  name="JFSH_AFFlengt_AFrame_Flange_length"               value=" 935." />
+
+<var  name="JFSH_AFTPleng_AFrame_TopPlate_length"             value=" 300." />
+<var  name="JFSH_AFTPheig_AFrame_TopPlate_height"             value="  50." />
+
+<var  name="JFSH_AFWheigh_AFrame_Wedge_height"                value=" 149.2"/>
+<var  name="JFSH_AFWexten_AFrame_Wedge_extension"             value=" 200." />
+<var  name="JFSH_AFWthick_AFrame_Wedge_thickness"             value="  50." />
+<var  name="JFSH_AFWzoffs_AFrame_Wedge_zoffset"               value="  20." />  <!-- confirmed atljf___0028-vAD -->
+
+<var  name="JFSH_AFFEElen_AFrame_Feet_length"                 value="  830."/>
+<var  name="JFSH_AFFEEthi_AFrame_Feet_thickness"              value="   50."/>
+<var  name="JFSH_AFFEEsle_AFrame_Feet_shortlength"            value="  100. - 20."/> <!-- reduced value to avoid clash with rail -->
+<var  name="JFSH_AFFEEhei_AFrame_Feet_height"                 value="  225."/>
+<var  name="JFSH_AFFEEext_AFrame_Feet_X_extension"            value=" 6830."/>  <!-- confirmed atljf___0028-vAD -->
+
+<var  name="JFSH_AFtothei_AFrame_Total_height"                value=" 2740."/>  <!-- confirmed atljf___0028-vAD -->
+<var  name="JFSH_AFECTcle_Clearance_ECT_AFrame"               value="   25."/>  <!-- confirmed atljf___0010-vAC -->
+
+<var  name="JFSH_ECTnomiz_ECT_Nominal_zpos"                   value="12914."/>  <!-- confirmed atljf___0010-vAC -->
+<!-- END confirmation with atljf___0087-vAC -->
+
+<!--  Derived variables  TEMPORAY already declare in RAIL Section laurent 05-05-10 ********* -->
+<var  name="RAIL_CeRthic1_CentralRail_Thick1JFSH" value="  100." />  <!-- confirmed atlhbrb_0001-vAH -->
+<var  name="RAIL_CeRthic2_CentralRail_Thick2JFSH" value="  200." />  <!-- confirmed atlhbrb_0001-vAH -->
+<var  name="RAIL_Ypos_aboveJFSH"                  value="-4390." />  <!-- confirmed atcnh___0005-vAG -->
+<var  name="RAIL_totHeightJFSH"                   value="RAIL_CeRthic2_CentralRail_Thick2JFSH+2.*RAIL_CeRthic1_CentralRail_Thick1JFSH" />
+<var  name="RAIL_YposJFSH"                        value="RAIL_Ypos_aboveJFSH - RAIL_totHeightJFSH" />
+<var  name="JFSH_AFyposit_AFrame_Ypos"            value="RAIL_YposJFSH+RAIL_totHeightJFSH+JFSH_AFFEEthi_AFrame_Feet_thickness" />
+<var  name="JFSH_AFzposit_AFrame_Zpos"            value="JFSH_XYZref + JFSH_AFECTcle_Clearance_ECT_AFrame +JFSH_AFrwidth_AFrame_width/2." />
+<var  name="JFSH_AFASposy_AFrame_Assembly_Y"          value=" JFSH_AFyposit_AFrame_Ypos" />
+<var  name="JFSH_AFASposz_AFrame_Assembly_Z"          value=" JFSH_AFzposit_AFrame_Zpos" />
+<!--  Derived variables  TEMPORAY already declare in RAIL Section ********* -->
+
+
+<!--  "A" Frame Welded Assembly Bottom Bar Lower Horizontal Plate -->
+<var  name="JFSH_AFBLHPxa"      value="JFSH_AFBBleng_AFrame_BottomBar_length/2." />
+<var  name="JFSH_AFBLHPya"      value="JFSH_XYZref" />
+<var  name="JFSH_AFBLHPyb"      value="JFSH_AFBLHPya+JFSH_AFBthic2_AFrame_Bar_thickness2" />
+
+<var  name="JFSH_AFBLHPxb"      value="JFSH_AFBLHPxa - (JFSH_AFBLHPyb-JFSH_AFBLHPya)/tan(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+
+<trd name="JFSH_AFrame_BottomBar_LowerHorizontalPlate"  material="ShieldSteel"  Xmp_Ymp_Z="2.*JFSH_AFBLHPxb; 2.*JFSH_AFBLHPxa; JFSH_AFrwidth_AFrame_width; JFSH_AFrwidth_AFrame_width; JFSH_AFBLHPyb-JFSH_AFBLHPya" />
+
+
+<!--  "A" Frame Welded Assembly Bottom Bar Vertical Plate -->
+
+<var  name="JFSH_AFBBVPxa"      value="JFSH_AFBLHPxb" />
+<var  name="JFSH_AFBBVPya"      value="JFSH_AFBthic2_AFrame_Bar_thickness2" />
+<var  name="JFSH_AFBBVPyb"      value="JFSH_AFBheigh_AFrame_Bar_height - JFSH_AFBthic2_AFrame_Bar_thickness2" />
+
+<var  name="JFSH_AFBBVPxb"      value="JFSH_AFBBVPxa - (JFSH_AFBBVPyb-JFSH_AFBBVPya)/tan(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+
+<trd name="JFSH_AFrame_BottomBar_VerticalPlate"  material="ShieldSteel"  Xmp_Ymp_Z="2.*JFSH_AFBBVPxb; 2.*JFSH_AFBBVPxa; JFSH_AFBthic1_AFrame_Bar_thickness1; JFSH_AFBthic1_AFrame_Bar_thickness1; JFSH_AFBBVPyb-JFSH_AFBBVPya" />
+
+<!--  "A" Frame Welded Assembly Bottom Bar Upper Horizontal Plate -->
+
+<var  name="JFSH_AFBUHPxa"      value="JFSH_AFBBVPxb" />
+<var  name="JFSH_AFBUHPya"      value="JFSH_AFBBVPyb" />
+<var  name="JFSH_AFBUHPyb"      value="JFSH_AFBUHPya + JFSH_AFBthic2_AFrame_Bar_thickness2" />
+
+<var  name="JFSH_AFBUHPxb"      value="JFSH_AFBUHPxa - (JFSH_AFBUHPyb-JFSH_AFBUHPya)/tan(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+
+<trd name="JFSH_AFrame_BottomBar_UpperHorizontalPlate"  material="ShieldSteel"  Xmp_Ymp_Z="2.*JFSH_AFBUHPxb; 2.*JFSH_AFBUHPxa; JFSH_AFrwidth_AFrame_width; JFSH_AFrwidth_AFrame_width; JFSH_AFBUHPyb-JFSH_AFBUHPya" />
+
+
+<!--  "A" Frame Welded Assembly Leg Lower Horizontal Plate -->
+
+<var  name="JFSH_AFLLHPxa"      value="JFSH_AFBLHPxa" />
+<var  name="JFSH_AFLLHPya"      value="JFSH_AFBLHPya" />
+
+<var  name="JFSH_AFLLHPxb"      value="JFSH_AFSlengt_AFrame_Spacer_length/2." />
+<var  name="JFSH_AFLLHPyb"      value="(JFSH_AFLLHPxa-JFSH_AFLLHPxb)*tan(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)    " />
+
+<var  name="JFSH_AFLLHPxc"      value="JFSH_AFLLHPxb" />
+<var  name="JFSH_AFLLHPyc"      value="JFSH_AFLLHPyb + JFSH_AFBthic2_AFrame_Bar_thickness2/cos(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+
+<var  name="JFSH_AFLLHPxd"      value="JFSH_AFLLHPxa + JFSH_AFBthic2_AFrame_Bar_thickness2/sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFLLHPyd"      value="JFSH_AFBLHPya" />
+
+<box  name="JFSH_AFrame_Leg_LowerHorizontalPlate_basic" material="ShieldSteel"   X_Y_Z="JFSH_AFBthic2_AFrame_Bar_thickness2; JFSH_AFLLHPyc/sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180);    JFSH_AFrwidth_AFrame_width"  />
+<box  name="JFSH_AFrame_Leg_LowerHorizontalPlate_cut1"  material="ShieldSteel"   X_Y_Z="2.*JFSH_AFLLHPxb; JFSH_AFrwidth_AFrame_width; 2.*JFSH_AFrwidth_AFrame_width"  />
+<box  name="JFSH_AFrame_Leg_LowerHorizontalPlate_cut2"  material="ShieldSteel"   X_Y_Z="JFSH_AFrwidth_AFrame_width; JFSH_AFrwidth_AFrame_width; 2.*JFSH_AFrwidth_AFrame_width"  />
+
+<subtraction name="JFSH_AFrame_Leg_LowerHorizontalPlate">
+  <posXYZ  volume="JFSH_AFrame_Leg_LowerHorizontalPlate_basic"  X_Y_Z="(JFSH_AFLLHPxd+JFSH_AFLLHPxb)/2.-JFSH_AFBthic2_AFrame_Bar_thickness2*sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)/2.; JFSH_AFLLHPyc/2.-JFSH_AFBthic2_AFrame_Bar_thickness2*cos(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)/2.; 0. " rot=" 0.; 0.; 90-JFSH_AFLangle_AFrame_Leg_angle"/>
+  <posXYZ  volume="JFSH_AFrame_Leg_LowerHorizontalPlate_cut1"   X_Y_Z="0.; JFSH_AFLLHPyc; 0."/>
+  <posXYZ  volume="JFSH_AFrame_Leg_LowerHorizontalPlate_cut2"   X_Y_Z="JFSH_AFLLHPxd; -JFSH_AFrwidth_AFrame_width/2.; 0."/>
+</subtraction>
+
+<!--  "A" Frame Welded Assembly Leg Vertical Plate -->
+
+<var  name="JFSH_AFLVPxa"      value="JFSH_AFLLHPxd" />
+<var  name="JFSH_AFLVPya"      value="JFSH_AFLLHPyd" />
+
+<var  name="JFSH_AFLVPxb"      value="JFSH_AFLLHPxc" />
+<var  name="JFSH_AFLVPyb"      value="JFSH_AFLLHPyc" />
+
+<var  name="JFSH_AFLVPxc"      value="JFSH_AFLVPxb" />
+<var  name="JFSH_AFLVPyc"      value="JFSH_AFtothei_AFrame_Total_height - JFSH_AFTPheig_AFrame_TopPlate_height" />
+
+<var  name="JFSH_AFLVPxe"      value="JFSH_AFLVPxa + (JFSH_AFBheigh_AFrame_Bar_height-2*JFSH_AFBthic2_AFrame_Bar_thickness2)/sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFLVPye"      value="JFSH_AFBLHPya" />
+
+<var  name="JFSH_AFLVPyd"      value="JFSH_AFLVPyc" />
+<var  name="JFSH_AFLVPxd"      value="JFSH_AFLVPxe - (JFSH_AFLVPyd)/tan(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+
+<box  name="JFSH_AFrame_Leg_VerticalPlate_basic" material="ShieldSteel"   X_Y_Z="-(JFSH_AFLVPxa-JFSH_AFLVPxe)*sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180); (JFSH_AFLVPxe-JFSH_AFLVPxb)/cos(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180); JFSH_AFBthic1_AFrame_Bar_thickness1" />
+<box  name="JFSH_AFrame_Leg_VerticalPlate_cut1"  material="ShieldSteel"   X_Y_Z="JFSH_AFLVPxa; JFSH_AFLVPxa; JFSH_AFLVPxa"/>
+<box  name="JFSH_AFrame_Leg_VerticalPlate_cut2"  material="ShieldSteel"   X_Y_Z="JFSH_AFLVPxa; JFSH_AFLVPxa; JFSH_AFLVPxa"/>
+<box  name="JFSH_AFrame_Leg_VerticalPlate_cut3"  material="ShieldSteel"   X_Y_Z="JFSH_AFLVPxa; JFSH_AFLVPxa; JFSH_AFLVPxa"/>
+
+<subtraction     name="JFSH_AFrame_Leg_VerticalPlate">
+  <posXYZ  volume="JFSH_AFrame_Leg_VerticalPlate_basic"  X_Y_Z="(JFSH_AFLVPxe+JFSH_AFLVPxc)/2.+(JFSH_AFLVPxa-JFSH_AFLVPxe)*(1-cos(2.*JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180))/4.; (JFSH_AFLVPxe-JFSH_AFLVPxb)*tan(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)/2.+(JFSH_AFLVPxa-JFSH_AFLVPxe)*sin(2.*JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)/4.; 0" rot=" 0.; 0.; 90-JFSH_AFLangle_AFrame_Leg_angle"/>
+  <posXYZ  volume="JFSH_AFrame_Leg_VerticalPlate_cut1"   X_Y_Z="JFSH_AFLVPxa; -JFSH_AFLVPxa/2.; 0"/>
+  <posXYZ  volume="JFSH_AFrame_Leg_VerticalPlate_cut2"   X_Y_Z="-JFSH_AFLVPxa/2.+JFSH_AFLVPxb; JFSH_AFLVPyb; 0"/>
+  <posXYZ  volume="JFSH_AFrame_Leg_VerticalPlate_cut3"   X_Y_Z="0.; JFSH_AFLVPyc+JFSH_AFLVPxa/2.; 0"/>
+</subtraction>
+
+<!--  "A" Frame Welded Assembly Leg Upper Horizontal Plate -->
+
+<var  name="JFSH_AFLUHPxa"      value="JFSH_AFLVPxe" />
+<var  name="JFSH_AFLUHPya"      value="JFSH_AFLVPye" />
+
+<var  name="JFSH_AFLUHPxb"      value="JFSH_AFLVPxd" />
+<var  name="JFSH_AFLUHPyb"      value="JFSH_AFLVPyd" />
+
+<var  name="JFSH_AFLUHPxc"      value="JFSH_AFLUHPxb + JFSH_AFBthic2_AFrame_Bar_thickness2/sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFLUHPyc"      value="JFSH_AFLVPyc" />
+
+<var  name="JFSH_AFLUHPxd"      value="JFSH_AFLUHPxa + JFSH_AFBthic2_AFrame_Bar_thickness2/sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFLUHPyd"      value="JFSH_AFLUHPya" />
+
+<var  name="JFSH_AFrame_Leg_Angle" value="atan(JFSH_AFLUHPyb / (JFSH_AFLUHPxb - JFSH_AFLUHPxa))"/>
+<box  name="JFSH_AFrame_Leg_UpperHorizontalPlate_basic" material="ShieldSteel" X_Y_Z="(JFSH_AFLUHPxa - JFSH_AFLUHPxb)/cos(JFSH_AFrame_Leg_Angle) + cos(JFSH_AFrame_Leg_Angle)*(JFSH_AFLUHPxd - JFSH_AFLUHPxa); -sin(JFSH_AFrame_Leg_Angle)*(JFSH_AFLUHPxd - JFSH_AFLUHPxa);JFSH_AFrwidth_AFrame_width"/> 
+<box  name="JFSH_AFrame_Leg_UpperHorizontalPlate_cut" material="ShieldSteel" X_Y_Z="(JFSH_AFLUHPxd-JFSH_AFLUHPxa)*4.;(JFSH_AFLUHPxd-JFSH_AFLUHPxa)*4.;JFSH_AFrwidth_AFrame_width*2."/>
+
+<subtraction name="JFSH_AFrame_Leg_UpperHorizontalPlate">
+  <posXYZ  volume="JFSH_AFrame_Leg_UpperHorizontalPlate_basic"    X_Y_Z="JFSH_AFLUHPxb + (JFSH_AFLUHPxd - JFSH_AFLUHPxb)/2.; JFSH_AFLUHPyb/2.; 0."           rot="0.;0.;JFSH_AFrame_Leg_Angle/GENV_Pi*180." />
+  <posXYZ  volume="JFSH_AFrame_Leg_UpperHorizontalPlate_cut"      X_Y_Z="JFSH_AFLUHPxd; -2.*(JFSH_AFLUHPxd - JFSH_AFLUHPxa); 0."/>
+  <posXYZ  volume="JFSH_AFrame_Leg_UpperHorizontalPlate_cut"      X_Y_Z="JFSH_AFLUHPxc; JFSH_AFLUHPyc + 2.*(JFSH_AFLUHPxd - JFSH_AFLUHPxa); 0."/>
+</subtraction>
+
+<!--  "A" Frame Welded Assembly Top Plate -->
+
+<var  name="JFSH_AFTPLAxa"      value="JFSH_AFTPleng_AFrame_TopPlate_length/2." />
+<var  name="JFSH_AFTPLAya"      value="JFSH_AFtothei_AFrame_Total_height-JFSH_AFTPheig_AFrame_TopPlate_height" />
+
+<var  name="JFSH_AFTPLAxb"      value="JFSH_AFTPLAxa " />
+<var  name="JFSH_AFTPLAyb"      value="JFSH_AFtothei_AFrame_Total_height" />
+
+<trd name="JFSH_AFrame_TopPlate"  material="ShieldSteel"  Xmp_Ymp_Z="2.*JFSH_AFTPLAxb; 2.*JFSH_AFTPLAxa; JFSH_AFrwidth_AFrame_width; JFSH_AFrwidth_AFrame_width; JFSH_AFTPLAyb-JFSH_AFTPLAya" />
+
+<!--  "A" Frame Welded Assembly Spacer -->
+
+<var  name="JFSH_AFSPACxa"      value="JFSH_AFSlengt_AFrame_Spacer_length/2." />
+<var  name="JFSH_AFSPACya"      value="JFSH_AFTPLAya-JFSH_AFSheigh_AFrame_Spacer_height" />
+
+<var  name="JFSH_AFSPACxb"      value="JFSH_AFSPACxa " />
+<var  name="JFSH_AFSPACyb"      value="JFSH_AFTPLAya" />
+
+<trd name="JFSH_AFrame_Spacer"  material="ShieldSteel"  Xmp_Ymp_Z="2.*JFSH_AFSPACxb; 2.*JFSH_AFSPACxa; JFSH_AFrwidth_AFrame_width; JFSH_AFrwidth_AFrame_width; JFSH_AFSPACyb-JFSH_AFSPACya" />
+
+
+<!--  "A" Frame Welded Assembly Web -->
+
+<var  name="JFSH_AFWEBwid_AFrame_Web_element_width"      value="(JFSH_AFrwidth_AFrame_width-JFSH_AFBthic1_AFrame_Bar_thickness1)/2." />
+<var  name="JFSH_AFWEBhei_AFrame_Web_element_height"     value="JFSH_AFBheigh_AFrame_Bar_height-2.*JFSH_AFBthic2_AFrame_Bar_thickness2" />
+
+<var  name="JFSH_AFWEBBBy_AFrame_Web_element_BottomBar_Y"     value="JFSH_AFBthic2_AFrame_Bar_thickness2+JFSH_AFWEBhei_AFrame_Web_element_height/2" />
+<var  name="JFSH_AFWEBzpo_AFrame_Web_element_Z"     value="JFSH_AFBthic1_AFrame_Bar_thickness1/2. + JFSH_AFWEBwid_AFrame_Web_element_width/2." />
+
+<box  name="JFSH_AFrame_Web_element"     material="ShieldSteel"  X_Y_Z="JFSH_AFWEleng_AFrame_Web_element_length;JFSH_AFWEBhei_AFrame_Web_element_height;JFSH_AFWEBwid_AFrame_Web_element_width"    />
+
+<composition  name="JFSH_AFrame_Web_composite_element" >
+  <posXYZ  volume="JFSH_AFrame_Web_element"    X_Y_Z="0.;0.; JFSH_AFWEBzpo_AFrame_Web_element_Z"           rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_Web_element"    X_Y_Z="0.;0.;-JFSH_AFWEBzpo_AFrame_Web_element_Z"           rot="0.;0.;0." />
+</composition>
+
+<!--  "A" Frame Welded Assembly Web element leg -->
+
+<var  name="JFSH_AFWELxi1"    value="JFSH_AFLUHPxd - JFSH_AFWEBLx1_AFrame_Web_element_Leg_DX1*cos(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFWELyi1"    value="JFSH_AFWEBLx1_AFrame_Web_element_Leg_DX1*sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFWELxp1"    value="JFSH_AFWELxi1-(JFSH_AFWEBhei_AFrame_Web_element_height/2 + JFSH_AFBthic2_AFrame_Bar_thickness2)*sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFWELyp1"    value="JFSH_AFWELyi1-(JFSH_AFWEBhei_AFrame_Web_element_height/2 + JFSH_AFBthic2_AFrame_Bar_thickness2)*cos(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+
+<var  name="JFSH_AFWELxi2"    value="JFSH_AFWELxi1 - JFSH_AFWEBLx2_AFrame_Web_element_Leg_DX2*cos(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFWELyi2"    value="JFSH_AFWELyi1 + JFSH_AFWEBLx2_AFrame_Web_element_Leg_DX2*sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFWELxp2"    value="JFSH_AFWELxi2-(JFSH_AFWEBhei_AFrame_Web_element_height/2 + JFSH_AFBthic2_AFrame_Bar_thickness2)*sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFWELyp2"    value="JFSH_AFWELyi2-(JFSH_AFWEBhei_AFrame_Web_element_height/2 + JFSH_AFBthic2_AFrame_Bar_thickness2)*cos(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+
+<var  name="JFSH_AFWELxi3"    value="JFSH_AFWELxi2 - JFSH_AFWEBLx2_AFrame_Web_element_Leg_DX2*cos(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFWELyi3"    value="JFSH_AFWELyi2 + JFSH_AFWEBLx2_AFrame_Web_element_Leg_DX2*sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFWELxp3"    value="JFSH_AFWELxi3-(JFSH_AFWEBhei_AFrame_Web_element_height/2 + JFSH_AFBthic2_AFrame_Bar_thickness2)*sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFWELyp3"    value="JFSH_AFWELyi3-(JFSH_AFWEBhei_AFrame_Web_element_height/2 + JFSH_AFBthic2_AFrame_Bar_thickness2)*cos(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+
+<!--  "A" Frame Welded Assembly Flanges -->
+
+<var  name="JFSH_AFFwidth_AFrame_Flange_width"      value="JFSH_AFWEBwid_AFrame_Web_element_width" />
+<var  name="JFSH_AFFzposi_AFrame_Flange_Z"          value="JFSH_AFWEBzpo_AFrame_Web_element_Z" />
+
+<box  name="JFSH_AFrame_Flange"     material="ShieldSteel"  X_Y_Z="JFSH_AFFlengt_AFrame_Flange_length;JFSH_AFFthick_AFrame_Flange_thickness;JFSH_AFFwidth_AFrame_Flange_width"    />
+<composition  name="JFSH_AFrame_Flange_composite" >
+  <posXYZ  volume="JFSH_AFrame_Flange"    X_Y_Z="0.;0.; JFSH_AFFzposi_AFrame_Flange_Z"           rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_Flange"    X_Y_Z="0.;0.;-JFSH_AFFzposi_AFrame_Flange_Z"           rot="0.;0.;0." />
+</composition>
+
+<var  name="JFSH_AFFposx1_AFrame_Flange_X1"    value="JFSH_AFWELxp1+(JFSH_AFFlengt_AFrame_Flange_length+JFSH_AFWEleng_AFrame_Web_element_length)*cos(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)/2" />
+<var  name="JFSH_AFFposy1_AFrame_Flange_Y1"    value="JFSH_AFWELyp1-(JFSH_AFFlengt_AFrame_Flange_length+JFSH_AFWEleng_AFrame_Web_element_length)*sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)/2" />
+
+<var  name="JFSH_AFFposx2_AFrame_Flange_X2"    value="JFSH_AFWELxp2+(JFSH_AFFlengt_AFrame_Flange_length+JFSH_AFWEleng_AFrame_Web_element_length)*cos(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)/2" />
+<var  name="JFSH_AFFposy2_AFrame_Flange_Y2"    value="JFSH_AFWELyp2-(JFSH_AFFlengt_AFrame_Flange_length+JFSH_AFWEleng_AFrame_Web_element_length)*sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)/2" />
+
+<!--  "A" Frame Welded Assembly Wedges -->
+
+<var  name="JFSH_AFWposxa_AFrame_Wedge_XA"    value="JFSH_XYZref" />
+<var  name="JFSH_AFWposya_AFrame_Wedge_YA"    value="JFSH_XYZref" />
+<var  name="JFSH_AFWposxb_AFrame_Wedge_XB"    value="JFSH_AFWheigh_AFrame_Wedge_height*tan(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFWposyb_AFrame_Wedge_YB"    value="JFSH_AFWheigh_AFrame_Wedge_height" />
+<var  name="JFSH_AFWposxc_AFrame_Wedge_XC"    value="JFSH_AFWposxb_AFrame_Wedge_XB+JFSH_AFWexten_AFrame_Wedge_extension*cos(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFWposyc_AFrame_Wedge_YC"    value="JFSH_AFWposyb_AFrame_Wedge_YB-JFSH_AFWexten_AFrame_Wedge_extension*sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFWposxd_AFrame_Wedge_XD"    value="JFSH_AFWposxc_AFrame_Wedge_XC- JFSH_AFWposyc_AFrame_Wedge_YC * tan(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFWposyd_AFrame_Wedge_YD"    value="JFSH_AFWposya_AFrame_Wedge_YA" />
+
+<var  name="JFSH_AFWposx0_AFrame_Wedge_X0"    value="JFSH_AFWposxb_AFrame_Wedge_XB + JFSH_AFWposyb_AFrame_Wedge_YB / tan(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180)" />
+<var  name="JFSH_AFWposy0_AFrame_Wedge_Y0"    value="JFSH_AFWposxa_AFrame_Wedge_XA" />
+
+<box  name="JFSH_AFrame_Wedge_basic"  material="ShieldSteel"   X_Y_Z="JFSH_AFWposxc_AFrame_Wedge_XC; JFSH_AFWposyb_AFrame_Wedge_YB; JFSH_AFWthick_AFrame_Wedge_thickness"/>
+<box  name="JFSH_AFrame_Wedge_cut1"   material="ShieldSteel"   X_Y_Z="2.*(JFSH_AFWposxc_AFrame_Wedge_XC-JFSH_AFWposxb_AFrame_Wedge_XB)*sin(JFSH_AFLangle_AFrame_Leg_angle*GENV_PiS180); JFSH_AFWposxc_AFrame_Wedge_XC; 2.*JFSH_AFWthick_AFrame_Wedge_thickness"/>
+<box  name="JFSH_AFrame_Wedge_cut2"   material="ShieldSteel"   X_Y_Z="JFSH_AFWposxc_AFrame_Wedge_XC; 2.*JFSH_AFWposxb_AFrame_Wedge_XB*cos(atan(JFSH_AFWposxb_AFrame_Wedge_XB/JFSH_AFWposyb_AFrame_Wedge_YB)); 2.*JFSH_AFWthick_AFrame_Wedge_thickness"/>
+<box  name="JFSH_AFrame_Wedge_cut3"   material="ShieldSteel"   X_Y_Z="JFSH_AFWposxc_AFrame_Wedge_XC; 2.*(JFSH_AFWposxc_AFrame_Wedge_XC-JFSH_AFWposxd_AFrame_Wedge_XD)*cos(atan((JFSH_AFWposxc_AFrame_Wedge_XC-JFSH_AFWposxd_AFrame_Wedge_XD)/JFSH_AFWposyc_AFrame_Wedge_YC)); 2.*JFSH_AFWthick_AFrame_Wedge_thickness"/>
+
+<subtraction  name="JFSH_AFrame_Wedge">
+  <posXYZ  volume="JFSH_AFrame_Wedge_basic" X_Y_Z="JFSH_AFWposxc_AFrame_Wedge_XC/2.; JFSH_AFWposyb_AFrame_Wedge_YB/2.; 0." />
+  <posXYZ  volume="JFSH_AFrame_Wedge_cut1"  X_Y_Z="JFSH_AFWposxc_AFrame_Wedge_XC; JFSH_AFWposyb_AFrame_Wedge_YB; 0." rot=" 0.; 0.; 90-JFSH_AFLangle_AFrame_Leg_angle" />
+  <posXYZ  volume="JFSH_AFrame_Wedge_cut2"  X_Y_Z="0.; JFSH_AFWposyb_AFrame_Wedge_YB; 0." rot=" 0.; 0.; 90-atan(JFSH_AFWposxb_AFrame_Wedge_XB/JFSH_AFWposyb_AFrame_Wedge_YB)/GENV_PiS180" />
+  <posXYZ  volume="JFSH_AFrame_Wedge_cut3"  X_Y_Z="JFSH_AFWposxc_AFrame_Wedge_XC; 0.; 0." rot=" 0.; 0.; 90-atan((JFSH_AFWposxc_AFrame_Wedge_XC-JFSH_AFWposxd_AFrame_Wedge_XD)/JFSH_AFWposyc_AFrame_Wedge_YC)/GENV_PiS180" />
+</subtraction>
+
+<var  name="JFSH_AFWposix_AFrame_Wedge_X"    value=" JFSH_AFBUHPxb - JFSH_AFWposx0_AFrame_Wedge_X0" />
+<var  name="JFSH_AFWposiy_AFrame_Wedge_Y"    value=" JFSH_AFBUHPyb - JFSH_AFWposy0_AFrame_Wedge_Y0" />
+<var  name="JFSH_AFWposiz_AFrame_Wedge_Z"    value=" JFSH_AFrwidth_AFrame_width/2. - JFSH_AFWzoffs_AFrame_Wedge_zoffset - JFSH_AFWthick_AFrame_Wedge_thickness/2." />
+
+<!--  "A" Frame Welded Assembly Feet -->
+
+<var  name="JFSH_AFFeetxa_AFrame_Feet_XA"    value="JFSH_AFFEElen_AFrame_Feet_length/2." />
+<var  name="JFSH_AFFeetya_AFrame_Feet_YA"    value="JFSH_XYZref" />
+<var  name="JFSH_AFFeetxb_AFrame_Feet_XB"    value="JFSH_AFFeetxa_AFrame_Feet_XA" />
+<var  name="JFSH_AFFeetyb_AFrame_Feet_YB"    value="JFSH_AFFeetya_AFrame_Feet_YA - JFSH_AFFEEhei_AFrame_Feet_height" />
+<var  name="JFSH_AFFeetxc_AFrame_Feet_XC"    value="JFSH_AFFeetxb_AFrame_Feet_XB - JFSH_AFFEEsle_AFrame_Feet_shortlength" />
+<var  name="JFSH_AFFeetyc_AFrame_Feet_YC"    value="JFSH_AFFeetyb_AFrame_Feet_YB" />
+<var  name="JFSH_AFFeetxd_AFrame_Feet_XD"    value="JFSH_AFFeetxc_AFrame_Feet_XC" />
+<var  name="JFSH_AFFeetyd_AFrame_Feet_YD"    value="JFSH_AFFeetyb_AFrame_Feet_YB+JFSH_AFFEEthi_AFrame_Feet_thickness" />
+<var  name="JFSH_AFFeetxe_AFrame_Feet_XE"    value="JFSH_AFFeetxc_AFrame_Feet_XC+JFSH_AFFEEsle_AFrame_Feet_shortlength-JFSH_AFFEEthi_AFrame_Feet_thickness" />
+<var  name="JFSH_AFFeetye_AFrame_Feet_YE"    value="JFSH_AFFeetyd_AFrame_Feet_YD" />
+<var  name="JFSH_AFFeetxf_AFrame_Feet_XF"    value="JFSH_AFFeetxe_AFrame_Feet_XE" />
+<var  name="JFSH_AFFeetyf_AFrame_Feet_YF"    value="JFSH_AFFeetya_AFrame_Feet_YA-JFSH_AFFEEthi_AFrame_Feet_thickness" />
+
+<var  name="JFSH_AFFeetpx_AFrame_Feet_X"     value=" JFSH_AFFEEext_AFrame_Feet_X_extension/2. - JFSH_AFFEElen_AFrame_Feet_length/2." />
+
+<box name="JFSH_AFrame_Feet_basic"  material="ShieldSteel" X_Y_Z="2.*JFSH_AFFeetxa_AFrame_Feet_XA; -JFSH_AFFeetyb_AFrame_Feet_YB; JFSH_AFrwidth_AFrame_width" />
+<box name="JFSH_AFrame_Feet_cut1"   material="ShieldSteel" X_Y_Z="2.*JFSH_AFFeetxe_AFrame_Feet_XE; JFSH_AFFeetyf_AFrame_Feet_YF-JFSH_AFFeetye_AFrame_Feet_YE; 2.*JFSH_AFrwidth_AFrame_width" />
+<box name="JFSH_AFrame_Feet_cut2"   material="ShieldSteel" X_Y_Z="2.*JFSH_AFFeetxc_AFrame_Feet_XC; JFSH_AFFeetyf_AFrame_Feet_YF-JFSH_AFFeetye_AFrame_Feet_YE; 2.*JFSH_AFrwidth_AFrame_width" />
+
+<subtraction  name="JFSH_AFrame_Feet">
+  <posXYZ  volume="JFSH_AFrame_Feet_basic"  X_Y_Z="0.; JFSH_AFFeetyb_AFrame_Feet_YB/2.; 0."/>
+  <posXYZ  volume="JFSH_AFrame_Feet_cut1"   X_Y_Z="0.; (JFSH_AFFeetye_AFrame_Feet_YE-JFSH_AFFeetyf_AFrame_Feet_YF)/2.+JFSH_AFFeetyf_AFrame_Feet_YF; 0."/>
+  <posXYZ  volume="JFSH_AFrame_Feet_cut2"   X_Y_Z="0.; JFSH_AFFeetyc_AFrame_Feet_YC; 0."/>
+</subtraction>
+
+<!-- +++++++++++++++++++++++++++++++++++++++++++++++++ -->
+<!--  "A" Frame Welded Assembly Composition of volumes -->
+<!-- +++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+<composition  name="JFSH_AFrame_BottomBar" >
+  <posXYZ  volume="JFSH_AFrame_BottomBar_LowerHorizontalPlate"    X_Y_Z="0.;(JFSH_AFBLHPyb-JFSH_AFBLHPya)/2.; 0."                                                          rot="90.;0.;0."/>
+  <posXYZ  volume="JFSH_AFrame_BottomBar_VerticalPlate"           X_Y_Z="0.;(JFSH_AFBBVPyb-JFSH_AFBBVPya)/2.+JFSH_AFBLHPyb-JFSH_AFBLHPya; 0."                              rot="90.;0.;0."/>
+  <posXYZ  volume="JFSH_AFrame_BottomBar_UpperHorizontalPlate"    X_Y_Z="0.;(JFSH_AFBUHPyb-JFSH_AFBUHPya)/2.+JFSH_AFBBVPyb-JFSH_AFBBVPya+JFSH_AFBLHPyb-JFSH_AFBLHPya; 0."  rot="90.;0.;0."/>
+  <posXYZ  volume="JFSH_AFrame_Web_composite_element"    X_Y_Z=" JFSH_AFWEBBx1_AFrame_Web_element_BottomBar_X1;JFSH_AFWEBBBy_AFrame_Web_element_BottomBar_Y;0. "           rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_Web_composite_element"    X_Y_Z=" JFSH_AFWEBBx2_AFrame_Web_element_BottomBar_X2;JFSH_AFWEBBBy_AFrame_Web_element_BottomBar_Y;0. "           rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_Web_composite_element"    X_Y_Z="-JFSH_AFWEBBx2_AFrame_Web_element_BottomBar_X2;JFSH_AFWEBBBy_AFrame_Web_element_BottomBar_Y;0. "           rot="0.;0.;0." />
+</composition>
+
+<composition  name="JFSH_AFrame_Leg" >
+  <posXYZ  volume="JFSH_AFrame_Leg_LowerHorizontalPlate"    X_Y_Z="0.;0.; 0."           rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_Leg_VerticalPlate"           X_Y_Z="0.;0.; 0."           rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_Leg_UpperHorizontalPlate"    X_Y_Z="0.;0.; 0."           rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_Web_composite_element"    X_Y_Z=" JFSH_AFWELxp1;JFSH_AFWELyp1;0. "           rot="0.;0.;-JFSH_AFLangle_AFrame_Leg_angle" />
+  <posXYZ  volume="JFSH_AFrame_Web_composite_element"    X_Y_Z=" JFSH_AFWELxp2;JFSH_AFWELyp2;0. "           rot="0.;0.;-JFSH_AFLangle_AFrame_Leg_angle" />
+  <posXYZ  volume="JFSH_AFrame_Web_composite_element"    X_Y_Z=" JFSH_AFWELxp3;JFSH_AFWELyp3;0. "           rot="0.;0.;-JFSH_AFLangle_AFrame_Leg_angle" />
+  <posXYZ  volume="JFSH_AFrame_Flange_composite"         X_Y_Z=" JFSH_AFFposx1_AFrame_Flange_X1;JFSH_AFFposy1_AFrame_Flange_Y1;0. "           rot="0.;0.;-JFSH_AFLangle_AFrame_Leg_angle" />
+  <posXYZ  volume="JFSH_AFrame_Flange_composite"         X_Y_Z=" JFSH_AFFposx2_AFrame_Flange_X2;JFSH_AFFposy2_AFrame_Flange_Y2;0. "           rot="0.;0.;-JFSH_AFLangle_AFrame_Leg_angle" />
+</composition>
+
+<composition  name="JFSH_AFrame_Assembly" >
+  <posXYZ  volume="JFSH_AFrame_TopPlate"    X_Y_Z="0.;JFSH_AFTPLAyb-(JFSH_AFTPLAyb-JFSH_AFTPLAya)/2.; 0."           rot="90.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_Spacer"      X_Y_Z="0.;JFSH_AFSPACyb-(JFSH_AFSPACyb-JFSH_AFSPACya)/2.; 0."           rot="90.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_BottomBar"   X_Y_Z="0.;0.; 0."           rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_Leg"         X_Y_Z="0.;0.; 0."           rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_Leg"         X_Y_Z="0.;0.; 0."           rot="0.;JFSH_rot180;0." />
+  <posXYZ  volume="JFSH_AFrame_Wedge"       X_Y_Z=" JFSH_AFWposix_AFrame_Wedge_X;JFSH_AFWposiy_AFrame_Wedge_Y; JFSH_AFWposiz_AFrame_Wedge_Z"           rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_Wedge"       X_Y_Z=" JFSH_AFWposix_AFrame_Wedge_X;JFSH_AFWposiy_AFrame_Wedge_Y;-JFSH_AFWposiz_AFrame_Wedge_Z"           rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_Wedge"       X_Y_Z="-JFSH_AFWposix_AFrame_Wedge_X;JFSH_AFWposiy_AFrame_Wedge_Y; JFSH_AFWposiz_AFrame_Wedge_Z"           rot="0.;JFSH_rot180;0." />
+  <posXYZ  volume="JFSH_AFrame_Wedge"       X_Y_Z="-JFSH_AFWposix_AFrame_Wedge_X;JFSH_AFWposiy_AFrame_Wedge_Y;-JFSH_AFWposiz_AFrame_Wedge_Z"           rot="0.;JFSH_rot180;0." />
+  <posXYZ  volume="JFSH_AFrame_Feet"        X_Y_Z=" JFSH_AFFeetpx_AFrame_Feet_X;0.;0."           rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_Feet"        X_Y_Z="-JFSH_AFFeetpx_AFrame_Feet_X;0.;0."           rot="0.;0.;0." />
+</composition>
+
+<!--     name       =  JF Shielding                  section name       = "Shielding" -->
+<!--  Simple modelization -->
+
+
+<!--  Primary variables  -->
+
+<!-- BEGIN confirmation with atljf___0010-vAC (if no other comment) -->
+<!--  Main Cylinder  -->
+<var  name="JFSH_JFCMClen_JFCMainCylinder_length"                  value=" 5041." />
+<var  name="JFSH_JFCMCir1_JFCMainCylinder_innerRadius1"            value="  282." />  <!-- NO CONFIRMATION POSSIBLE; changed by Sven.Menke@CERN.CH Jul 2020 from 304 to 282 according to http://atlas.web.cern.ch/Atlas/GROUPS/Shielding/shielding.htm -->
+<var  name="JFSH_JFCMCouR_JFCMainCylinder_outerRadius"             value=" 1550." />
+<var  name="JFSH_JFCMChSl_JFCMainCylinder_HoleSLope"               value="    1.1"/>  <!-- NO CONFIRMATION POSSIBLE -->
+<var  name="JFSH_JFCMChSl_JFCMainCylinder_HoleSLope_zoffset"       value=" 1630." />  <!-- this length plus plug is straight; introduced by Sven.Menke@CERN.CH Jul 2020 according to https://edms.cern.ch/ui/file/322317/AC/atljf___0003-vAC.pdf -->
+<var  name="JFSH_JFCMChSl_JFCMainCylinder_OctoZoverlap"            value="  520." />  <!-- this is the z-portion of JFC3 that is modeled here as Oct; introduced by Sven.Menke@CERN.CH Jul 2020 -->
+<var  name="JFSH_JFCMCzof_JFCMainCylinder_zoffset"                 value="   45." />
+<var  name="JFSH_JFCMCrso_JFCMainCylinder_rolledsteeloff"          value="   30." />  <!-- confirmed atljf___0031-vAE -->
+<var  name="JFSH_JFCMCpoo_JFCMainCylinder_polybaronoff"            value="   50." />  <!-- confirmed atljf___0030-vAD -->
+
+<!--  PLUG  -->
+<var  name="JFSH_PLUGleng_Plug_length"                             value="  250." />
+<var  name="JFSH_PLUGinRa_Plug_innerRadius"                        value="  280." />  <!-- confirmed atljf___0006-vAE -->
+<var  name="JFSH_PLUGouRa_Plug_outerRadius"                        value="  520." />  <!-- confirmed atljf___0006-vAE -->
+        
+<!--  JFS Octogon  -->
+<var  name="JFSH_JFSOCmRa_JFSOctogon_mainRadius"                   value=" 2100." />
+<var  name="JFSH_JFSOClen_JFSOctogon_length"                       value=" 3000." />
+<var  name="JFSH_JFSOCzof_JFSOctogon_zoffset"                      value=" 5086." />
+<var  name="JFSH_JFSOCrso_JFSOctogon_rolledsteeloff"               value="   30." />  <!-- confirmed atljf___0029-vAG -->
+<var  name="JFSH_JFSOCpoo_JFSOctogon_polybaronoff"                 value="   80." />  <!-- confirmed atljf___0024-vAD -->
+
+<!-- END confirmation with atljf___0010-vAC -->
+
+<!--  A-Frame to JFS Octogon connection -->
+<var  name="JFSH_AFOconle_AFrame_to_JFSOctogon_connection_length"  value="  230." />  <!-- NO CONFIRMATION POSSIBLE -->
+<var  name="JFSH_AFOconwi_AFrame_to_JFSOctogon_connection_width"   value="  200." />  <!-- NO CONFIRMATION POSSIBLE -->
+<var  name="JFSH_AFOconhe_AFrame_to_JFSOctogon_connection_height"  value="   67." />  <!-- NO CONFIRMATION POSSIBLE -->
+
+<!--  Derived variables  -->
+
+<var  name="JFSH_JFCMCir2_JFCMainCylinder_innerRadius2"   value="JFSH_JFCMCir1_JFCMainCylinder_innerRadius1+(JFSH_JFCMClen_JFCMainCylinder_length-JFSH_JFCMChSl_JFCMainCylinder_HoleSLope_zoffset)*tan(JFSH_JFCMChSl_JFCMainCylinder_HoleSLope*GENV_PiS180)"/> <!-- changed by SvenMenke@CERN.CH Jul 2020 -->
+<var  name="JFSH_JFCMCir3_JFCMainCylinder_innerRadius3"   value="JFSH_JFCMCir2_JFCMainCylinder_innerRadius2+JFSH_JFCMChSl_JFCMainCylinder_OctoZoverlap*tan(JFSH_JFCMChSl_JFCMainCylinder_HoleSLope*GENV_PiS180)"/> <!-- added by SvenMenke@CERN.CH Jul 2020 -->
+<var  name="JFSH_JFCMCzpo_JFCMainCylinder_Z"              value="JFSH_XYZref+JFSH_JFCMCzof_JFCMainCylinder_zoffset" />
+<var  name="JFSH_JFSOCzpo_JFSOctogon_Z"                   value="JFSH_XYZref+JFSH_JFSOCzof_JFSOctogon_zoffset+JFSH_JFSOClen_JFSOctogon_length/2." />
+<var  name="JFSH_PLUGzpos_Plug_posz"                      value="JFSH_XYZref-JFSH_PLUGleng_Plug_length"/>
+
+<!--  JFC Cylinder -->
+<pcon   name="JFSH_JFCMainCylinder_core"      material="ShieldIron"  >
+     <polyplane   Rio_Z="JFSH_PLUGinRa_Plug_innerRadius;JFSH_PLUGouRa_Plug_outerRadius;JFSH_PLUGzpos_Plug_posz"  />
+     <polyplane   Rio_Z="JFSH_PLUGinRa_Plug_innerRadius;JFSH_PLUGouRa_Plug_outerRadius;0."  />
+     <polyplane   Rio_Z="JFSH_JFCMCir1_JFCMainCylinder_innerRadius1;JFSH_JFCMCouR_JFCMainCylinder_outerRadius-JFSH_JFCMCrso_JFCMainCylinder_rolledsteeloff-JFSH_JFCMCpoo_JFCMainCylinder_polybaronoff-GENV_Eps;0."  />
+     <polyplane   Rio_Z="JFSH_JFCMCir1_JFCMainCylinder_innerRadius1;JFSH_JFCMCouR_JFCMainCylinder_outerRadius-JFSH_JFCMCrso_JFCMainCylinder_rolledsteeloff-JFSH_JFCMCpoo_JFCMainCylinder_polybaronoff-GENV_Eps;JFSH_JFCMChSl_JFCMainCylinder_HoleSLope_zoffset"  /> <!-- added plane by Sven.Menke@CERN.CH Jul 2020 since JFC2 is first straight and then with 1.1 degrees like JFC3 -->
+     <polyplane   Rio_Z="JFSH_JFCMCir2_JFCMainCylinder_innerRadius2;JFSH_JFCMCouR_JFCMainCylinder_outerRadius-JFSH_JFCMCrso_JFCMainCylinder_rolledsteeloff-JFSH_JFCMCpoo_JFCMainCylinder_polybaronoff-GENV_Eps;JFSH_JFCMClen_JFCMainCylinder_length"  />
+</pcon>
+
+<tubs name="JFSH_JFCMainCylinder_steelroll" material="ShieldSteel" Rio_Z=" JFSH_JFCMCouR_JFCMainCylinder_outerRadius-JFSH_JFCMCrso_JFCMainCylinder_rolledsteeloff+GENV_Eps; JFSH_JFCMCouR_JFCMainCylinder_outerRadius; JFSH_JFCMClen_JFCMainCylinder_length"/>
+<tubs name="JFSH_JFCMainCylinder_polyroll" material="PolyBoronH3B03" Rio_Z=" JFSH_JFCMCouR_JFCMainCylinder_outerRadius-JFSH_JFCMCrso_JFCMainCylinder_rolledsteeloff-JFSH_JFCMCpoo_JFCMainCylinder_polybaronoff; JFSH_JFCMCouR_JFCMainCylinder_outerRadius-JFSH_JFCMCrso_JFCMainCylinder_rolledsteeloff; JFSH_JFCMClen_JFCMainCylinder_length"/>
+
+<!--  A Frame to JFC Cylinder connection -->
+
+<box  name="JFSH_AFrame_to_JFCMainCylinder_connection"     material="ShieldSteel"  X_Y_Z="JFSH_AFOconwi_AFrame_to_JFSOctogon_connection_width;JFSH_AFOconhe_AFrame_to_JFSOctogon_connection_height;JFSH_AFOconle_AFrame_to_JFSOctogon_connection_length"    />
+
+<var  name="JFSH_AFMCcony_AFrame_to_JFCMainCylinder_connection_Y"   value="JFSH_AFASposy_AFrame_Assembly_Y  + JFSH_AFtothei_AFrame_Total_height + JFSH_AFOconhe_AFrame_to_JFSOctogon_connection_height/2." />
+<var  name="JFSH_AFMCconz_AFrame_to_JFCMainCylinder_connection_Z"   value="JFSH_AFOconle_AFrame_to_JFSOctogon_connection_length/2.+GENV_Eps" />
+<var  name="JFSH_AFconnexion2" value="15." />  <!-- former value 290. -->
+<union  name="JFSH_JFCMainCylinder_compsteel" >
+  <posXYZ  volume="JFSH_JFCMainCylinder_steelroll"              X_Y_Z=" 0. ; 0. ; JFSH_JFCMClen_JFCMainCylinder_length/2. "  rot="   0. ; 0. ; 0."  />
+  <posXYZ  volume="JFSH_AFrame_to_JFCMainCylinder_connection"   X_Y_Z=" 0. ; JFSH_AFMCcony_AFrame_to_JFCMainCylinder_connection_Y ; JFSH_AFMCconz_AFrame_to_JFCMainCylinder_connection_Z+JFSH_AFconnexion2"  rot="   0. ; 0. ; 0."  />
+</union>
+
+<composition  name="JFSH_JFCCylinder" >
+  <posXYZ  volume="JFSH_JFCMainCylinder_core"       X_Y_Z=" 0. ; 0. ; 0. "  rot="   0. ; 0. ; 0."  />
+  <posXYZ  volume="JFSH_JFCMainCylinder_compsteel"  X_Y_Z=" 0. ; 0. ; 0. "  rot="   0. ; 0. ; 0."  />
+  <posXYZ  volume="JFSH_JFCMainCylinder_polyroll"   X_Y_Z=" 0. ; 0. ; JFSH_JFCMClen_JFCMainCylinder_length/2. "  rot="   0. ; 0. ; 0."  />
+</composition>
+
+<!--  JFS Octogon -->
+
+<var  name="JFSH_JFSOctxa_JFSOctogon_XA"    value="JFSH_JFSOCmRa_JFSOctogon_mainRadius-JFSH_JFSOCrso_JFSOctogon_rolledsteeloff-JFSH_JFSOCpoo_JFSOctogon_polybaronoff-GENV_Eps" />
+<var  name="JFSH_JFSOctya_JFSOctogon_YA"    value="JFSH_JFSOctxa_JFSOctogon_XA*GENV_Ta225" />
+<var  name="JFSH_JFSOctxb_JFSOctogon_XB"    value="JFSH_JFSOctya_JFSOctogon_YA" />
+<var  name="JFSH_JFSOctyb_JFSOctogon_YB"    value="JFSH_JFSOctxa_JFSOctogon_XA" />
+
+<gvxysxy     name="JFSH_JFSOctogon_Coreedge"  material="ShieldIron"  dZ="JFSH_JFSOClen_JFSOctogon_length-JFSH_JFSOCrso_JFSOctogon_rolledsteeloff-JFSH_JFSOCpoo_JFSOctogon_polybaronoff-GENV_Eps"  >
+  <gvxy_point  X_Y="  JFSH_JFSOctxa_JFSOctogon_XA  ; JFSH_JFSOctya_JFSOctogon_YA  "   />
+  <gvxy_point  X_Y="  JFSH_JFSOctxb_JFSOctogon_XB  ; JFSH_JFSOctyb_JFSOctogon_YB  "   />
+</gvxysxy>
+
+<tubs name="JFSH_JFSOctogon_Coreround" material="ShieldIron" Rio_Z=" 0. ;JFSH_JFCMCouR_JFCMainCylinder_outerRadius-JFSH_JFCMCrso_JFCMainCylinder_rolledsteeloff-JFSH_JFCMCpoo_JFCMainCylinder_polybaronoff-GENV_Eps; JFSH_JFSOCrso_JFSOctogon_rolledsteeloff+JFSH_JFSOCpoo_JFSOctogon_polybaronoff+2.*GENV_Eps"/>
+
+<union name="JFSH_JFSOctogon_Core" > 
+  <posXYZ  volume="JFSH_JFSOctogon_Coreedge"  X_Y_Z=" 0.; 0.; (JFSH_JFSOCrso_JFSOctogon_rolledsteeloff+JFSH_JFSOCpoo_JFSOctogon_polybaronoff+GENV_Eps)/2. "/>
+  <posXYZ  volume="JFSH_JFSOctogon_Coreround" X_Y_Z=" 0.; 0.;-(JFSH_JFSOClen_JFSOctogon_length-JFSH_JFSOCrso_JFSOctogon_rolledsteeloff-JFSH_JFSOCpoo_JFSOctogon_polybaronoff)/2.+GENV_Eps" />
+</union>
+
+<pcon name="JFSH_JFSOctogon_Hole" material="ShieldIron" > <!-- changed from tubs to pcon by Sven.Menke@CERN.CH Jul 2020 since inner bore of JFC3 has 1.1 degree angle -->
+     <polyplane   Rio_Z="0.;JFSH_JFCMCir2_JFCMainCylinder_innerRadius2;-0.6*JFSH_JFSOClen_JFSOctogon_length"/>
+     <polyplane   Rio_Z="0.;JFSH_JFCMCir2_JFCMainCylinder_innerRadius2;-0.5*JFSH_JFSOClen_JFSOctogon_length"/>
+     <polyplane   Rio_Z="0.;JFSH_JFCMCir2_JFCMainCylinder_innerRadius2;-0.5*JFSH_JFSOClen_JFSOctogon_length"/>
+     <polyplane   Rio_Z="0.;JFSH_JFCMCir3_JFCMainCylinder_innerRadius3;-0.5*JFSH_JFSOClen_JFSOctogon_length+JFSH_JFCMChSl_JFCMainCylinder_OctoZoverlap"/>
+     <polyplane   Rio_Z="0.;JFSH_JFCMCir3_JFCMainCylinder_innerRadius3; 0.6*JFSH_JFSOClen_JFSOctogon_length"/>
+</pcon>
+<var  name="JFSH_JFSOctHBPzo_JFSOctogon_HoleBPzoffset"    value=" 600." />       <!-- confirmed atljf___0010-vAC -->
+<var  name="JFSH_JFSOctHBPoR_JFSOctogon_HoleBPoutRad"     value=" 436. + 1." />  <!-- value of MuonSys mother volume -->
+<tubs name="JFSH_JFSOctogon_HoleBP" material="ShieldIron" Rio_Z=" 0. ;JFSH_JFSOctHBPoR_JFSOctogon_HoleBPoutRad; JFSH_JFSOClen_JFSOctogon_length"/>
+<subtraction  name="JFSH_JFSOctogon_main" >
+  <posXYZ  volume="JFSH_JFSOctogon_Core"   X_Y_Z=" 0. ; 0. ; 0. "  rot="   0. ; 0. ; 0."  />
+  <posXYZ  volume="JFSH_JFSOctogon_Hole"   X_Y_Z=" 0. ; 0. ; 0. "  rot="   0. ; 0. ; 0."  />
+  <posXYZ  volume="JFSH_JFSOctogon_HoleBP"   X_Y_Z=" 0. ; 0. ; JFSH_JFSOctHBPzo_JFSOctogon_HoleBPzoffset "  rot="   0. ; 0. ; 0."  />
+</subtraction>
+
+<gvxysxy     name="JFSH_JFSOctogon_Polyedge_baseside"  material="PolyBoronH3B03"  dZ="JFSH_JFSOClen_JFSOctogon_length-JFSH_JFSOCrso_JFSOctogon_rolledsteeloff - JFSH_JFSOCpoo_JFSOctogon_polybaronoff - GENV_Eps"  >
+  <gvxy_point  X_Y="  JFSH_JFSOctxa_JFSOctogon_XA+JFSH_JFSOCpoo_JFSOctogon_polybaronoff+GENV_Eps  ; JFSH_JFSOctya_JFSOctogon_YA+(JFSH_JFSOCpoo_JFSOctogon_polybaronoff+GENV_Eps)*GENV_Ta225  "   />
+  <gvxy_point  X_Y="  JFSH_JFSOctxb_JFSOctogon_XB+(JFSH_JFSOCpoo_JFSOctogon_polybaronoff+GENV_Eps)*GENV_Ta225  ; JFSH_JFSOctyb_JFSOctogon_YB+JFSH_JFSOCpoo_JFSOctogon_polybaronoff+GENV_Eps  "   />
+</gvxysxy>
+
+<gvxysxy     name="JFSH_JFSOctogon_Polyedge_subblock"  material="PolyBoronH3B03"  dZ="JFSH_JFSOClen_JFSOctogon_length-JFSH_JFSOCpoo_JFSOctogon_polybaronoff-JFSH_JFSOCrso_JFSOctogon_rolledsteeloff+GENV_Eps"  >
+  <gvxy_point  X_Y="  JFSH_JFSOctxa_JFSOctogon_XA+GENV_Eps  ; JFSH_JFSOctya_JFSOctogon_YA+GENV_Eps*GENV_Ta225  "   />
+  <gvxy_point  X_Y="  JFSH_JFSOctxb_JFSOctogon_XB+GENV_Eps*GENV_Ta225  ; JFSH_JFSOctyb_JFSOctogon_YB+GENV_Eps  "   />
+</gvxysxy>
+
+<subtraction   name="JFSH_JFSOctogon_Polyedge_side">
+  <posXYZ  volume="JFSH_JFSOctogon_Polyedge_baseside"      X_Y_Z=" 0. ; 0. ; JFSH_JFSOCrso_JFSOctogon_rolledsteeloff/2. + JFSH_JFSOCpoo_JFSOctogon_polybaronoff/2."  />
+  <posXYZ  volume="JFSH_JFSOctogon_Polyedge_subblock"  X_Y_Z=" 0. ; 0. ; (JFSH_JFSOCpoo_JFSOctogon_polybaronoff+JFSH_JFSOCrso_JFSOctogon_rolledsteeloff-GENV_Eps)/2.+GENV_Eps"  />
+</subtraction>
+
+<gvxysxy     name="JFSH_JFSOctogon_Polyedge_basefront"  material="PolyBoronB2O3"  dZ="JFSH_JFSOCpoo_JFSOctogon_polybaronoff"  >
+  <gvxy_point  X_Y="  JFSH_JFSOctxa_JFSOctogon_XA+JFSH_JFSOCpoo_JFSOctogon_polybaronoff+GENV_Eps  ; JFSH_JFSOctya_JFSOctogon_YA+(JFSH_JFSOCpoo_JFSOctogon_polybaronoff+GENV_Eps)*GENV_Ta225  "   />
+  <gvxy_point  X_Y="  JFSH_JFSOctxb_JFSOctogon_XB+(JFSH_JFSOCpoo_JFSOctogon_polybaronoff+GENV_Eps)*GENV_Ta225  ; JFSH_JFSOctyb_JFSOctogon_YB+JFSH_JFSOCpoo_JFSOctogon_polybaronoff+GENV_Eps  "   />
+</gvxysxy>
+
+<tubs name="JFSH_JFSOctogon_Polyedge_subtube" material="PolyBoronB2O3" Rio_Z=" 0. ;JFSH_JFCMCouR_JFCMainCylinder_outerRadius-JFSH_JFCMCrso_JFCMainCylinder_rolledsteeloff-JFSH_JFCMCpoo_JFCMainCylinder_polybaronoff+GENV_Eps; JFSH_JFSOCpoo_JFSOctogon_polybaronoff+2.*GENV_Eps"/>
+
+<subtraction   name="JFSH_JFSOctogon_Polyedge_front">
+  <posXYZ  volume="JFSH_JFSOctogon_Polyedge_basefront"      X_Y_Z=" 0. ; 0. ; -(JFSH_JFSOClen_JFSOctogon_length-JFSH_JFSOCpoo_JFSOctogon_polybaronoff)/2.+JFSH_JFSOCrso_JFSOctogon_rolledsteeloff"  />
+  <posXYZ  volume="JFSH_JFSOctogon_Polyedge_subtube"   X_Y_Z=" 0. ; 0. ; -(JFSH_JFSOClen_JFSOctogon_length-JFSH_JFSOCpoo_JFSOctogon_polybaronoff)/2.+JFSH_JFSOCrso_JFSOctogon_rolledsteeloff"  />
+</subtraction>
+
+<gvxysxy     name="JFSH_JFSOctogon_Steeledge_base"  material="ShieldSteel"  dZ="JFSH_JFSOClen_JFSOctogon_length"  >
+  <gvxy_point  X_Y="  JFSH_JFSOctxa_JFSOctogon_XA+(JFSH_JFSOCpoo_JFSOctogon_polybaronoff+JFSH_JFSOCrso_JFSOctogon_rolledsteeloff+GENV_Eps)  ; JFSH_JFSOctya_JFSOctogon_YA+(JFSH_JFSOCpoo_JFSOctogon_polybaronoff+JFSH_JFSOCrso_JFSOctogon_rolledsteeloff+GENV_Eps)*GENV_Ta225  "   />
+  <gvxy_point  X_Y="  JFSH_JFSOctxb_JFSOctogon_XB+(JFSH_JFSOCpoo_JFSOctogon_polybaronoff+JFSH_JFSOCrso_JFSOctogon_rolledsteeloff+GENV_Eps)*GENV_Ta225  ; JFSH_JFSOctyb_JFSOctogon_YB+(JFSH_JFSOCpoo_JFSOctogon_polybaronoff+JFSH_JFSOCrso_JFSOctogon_rolledsteeloff+GENV_Eps)  "   />
+</gvxysxy>
+
+<gvxysxy     name="JFSH_JFSOctogon_Steeledge_subblock"  material="ShieldSteel"  dZ="JFSH_JFSOClen_JFSOctogon_length-JFSH_JFSOCrso_JFSOctogon_rolledsteeloff+2.*GENV_Eps"  >
+  <gvxy_point  X_Y="  JFSH_JFSOctxa_JFSOctogon_XA+(JFSH_JFSOCpoo_JFSOctogon_polybaronoff+2.*GENV_Eps)  ; JFSH_JFSOctya_JFSOctogon_YA+(JFSH_JFSOCpoo_JFSOctogon_polybaronoff+2.*GENV_Eps)*GENV_Ta225  "   />
+  <gvxy_point  X_Y="  JFSH_JFSOctxb_JFSOctogon_XB+(JFSH_JFSOCpoo_JFSOctogon_polybaronoff+2.*GENV_Eps)*GENV_Ta225  ; JFSH_JFSOctyb_JFSOctogon_YB+(JFSH_JFSOCpoo_JFSOctogon_polybaronoff+2.*GENV_Eps)  "   />
+</gvxysxy>
+<tubs name="JFSH_JFSOctogon_Steeledge_subtube" material="ShieldSteel" Rio_Z=" 0. ;JFSH_JFCMCouR_JFCMainCylinder_outerRadius-JFSH_JFCMCrso_JFCMainCylinder_rolledsteeloff-JFSH_JFCMCpoo_JFCMainCylinder_polybaronoff+GENV_Eps; JFSH_JFSOCrso_JFSOctogon_rolledsteeloff+2.*GENV_Eps"/>
+
+<subtraction   name="JFSH_JFSOctogon_Steeledge_main">
+  <posXYZ  volume="JFSH_JFSOctogon_Steeledge_base"      X_Y_Z=" 0. ; 0. ; 0."  />
+  <posXYZ  volume="JFSH_JFSOctogon_Steeledge_subblock"  X_Y_Z=" 0. ; 0. ; JFSH_JFSOCrso_JFSOctogon_rolledsteeloff/2."  />
+  <posXYZ  volume="JFSH_JFSOctogon_Steeledge_subtube"   X_Y_Z=" 0. ; 0. ; -(JFSH_JFSOClen_JFSOctogon_length-JFSH_JFSOCrso_JFSOctogon_rolledsteeloff)/2."  />
+</subtraction>
+
+<composition name="JFSH_JFSOctogon">
+  <posXYZ  volume="JFSH_JFSOctogon_main"            X_Y_Z=" 0. ; 0. ; 0. "  rot="   0. ; 0. ; 0."  />
+  <posXYZ  volume="JFSH_JFSOctogon_Polyedge_side"   X_Y_Z=" 0. ; 0. ; 0. "  rot="   0. ; 0. ; 0."  />
+  <posXYZ  volume="JFSH_JFSOctogon_Polyedge_front"  X_Y_Z=" 0. ; 0. ; 0. "  rot="   0. ; 0. ; 0."  />
+  <posXYZ  volume="JFSH_JFSOctogon_Steeledge_main"  X_Y_Z=" 0. ; 0. ; 0. "  rot="   0. ; 0. ; 0."  />
+</composition>
+
+<!--  JN Nose Shielding  -->
+
+<!--  TX1STM Elements -->
+<var  name="JNSH_TX1e1oRa"    value=" 1480." />   <!-- JFSH_tx1stm_element1_outerRadius -->
+<var  name="JNSH_TX1e1iRa"    value=" 1285." />   <!-- JFSH_tx1stm_element1_innerRadius -->
+<var  name="JNSH_TX1e1iLe"    value=" 1045." />   <!-- JFSH_tx1stm_element1_length -->
+<var  name="JNSH_TX1e2iRa"    value=" 1085." />   <!-- JFSH_tx1stm_element2_innerRadius -->
+<var  name="JNSH_TX1e2iLe"    value=" 1100." />   <!-- JFSH_tx1stm_element2_length -->
+<var  name="JNSH_TX1e3iLe"    value=" 2900." />   <!-- JFSH_tx1stm_element3_length -->
+
+<var  name="JNSH_TX1SO1iRa"   value=" 1550." />
+<var  name="JNSH_TX1SO1oRa"   value=" 2620." />
+<var  name="JNSH_TX1SO1iLe"   value=" 1800." />   <!-- to adjust for cavern asymmetry and wall-position -->
+<var  name="JNSH_TX1SO6oRa"   value=" 2075." />
+<var  name="JNSH_TX1SO6iLe"   value="  200." />
+
+<var  name="JNSH_TX1STzof"    value=" JFSH_JFSOClen_JFSOctogon_length + JFSH_JFSOCzof_JFSOctogon_zoffset" />
+
+<var  name="JNSH_TX1e1zpo_tx1stm_element1_Z"              value="JFSH_XYZref+JNSH_TX1STzof+JNSH_TX1e1iLe/2." />
+<var  name="JNSH_TX1e2zpo_tx1stm_element2_Z"              value="JNSH_TX1e1zpo_tx1stm_element1_Z+JNSH_TX1e1iLe/2.+JNSH_TX1e2iLe/2."/>
+<var  name="JNSH_TX1e3zpo_tx1stm_element3_Z"              value="JNSH_TX1e2zpo_tx1stm_element2_Z+JNSH_TX1e2iLe/2.+JNSH_TX1e3iLe/2."/>
+
+<var  name="JNSH_TX1SO6zpo_tx1som_element6_Z"              value="JFSH_XYZref+JNSH_TX1STzof+JNSH_TX1SO6iLe/2."/>
+<var  name="JNSH_TX1SO1zpo_tx1som_element1_Z"              value="JNSH_TX1SO6zpo_tx1som_element6_Z+JNSH_TX1SO6iLe/2.+JNSH_TX1SO1iLe/2."/>
+
+<!--  JFS TX1STM -->
+<tubs   name="JNSH_tx1stm_element1"    material="ShieldIron"    Rio_Z="JNSH_TX1e1iRa ; JNSH_TX1e1oRa ; JNSH_TX1e1iLe"/>
+<tubs   name="JNSH_tx1stm_element2"    material="ShieldIron"    Rio_Z="JNSH_TX1e2iRa ; JNSH_TX1e1oRa ; JNSH_TX1e2iLe"/>
+<tubs   name="JNSH_tx1stm_element3"    material="ShieldIron"    Rio_Z="JNSH_TX1e1iRa ; JNSH_TX1e1oRa ; JNSH_TX1e3iLe"/>
+
+<var  name="JNSH_tx1som_e1_XA"    value="JNSH_TX1SO1oRa * tan(11.25 * GENV_PiS180)" />
+<var  name="JNSH_tx1som_e1_YA"    value="JNSH_TX1SO1oRa" />
+<var  name="JNSH_tx1som_e1_XB"    value="JNSH_tx1som_e1_XA * (1. + 2.*GENV_Co225)" />
+<var  name="JNSH_tx1som_e1_YB"    value="JNSH_tx1som_e1_YA - 2.*JNSH_tx1som_e1_XA*GENV_Si225" />
+<var  name="JNSH_tx1som_e1_XC"    value="JNSH_tx1som_e1_YB" />
+<var  name="JNSH_tx1som_e1_YC"    value="JNSH_tx1som_e1_XB" />
+<var  name="JNSH_tx1som_e1_XD"    value="JNSH_tx1som_e1_YA" />
+<var  name="JNSH_tx1som_e1_YD"    value="JNSH_tx1som_e1_XA" />
+
+<gvxysxy     name="JNSH_tx1som_element1_basic"         material="ShieldIron"   dZ="JNSH_TX1SO1iLe"  >
+  <gvxy_point  X_Y="  JNSH_tx1som_e1_XD  ; JNSH_tx1som_e1_YD  "   />
+  <gvxy_point  X_Y="  JNSH_tx1som_e1_XC  ; JNSH_tx1som_e1_YC  "   />
+  <gvxy_point  X_Y="  JNSH_tx1som_e1_XB  ; JNSH_tx1som_e1_YB  "   />
+  <gvxy_point  X_Y="  JNSH_tx1som_e1_XA  ; JNSH_tx1som_e1_YA  "   />
+</gvxysxy>
+<tubs   name="JNSH_tx1som_element6_cutout"    material="ShieldIron"    Rio_Z="0. ; JNSH_TX1SO1iRa ; 2.*JNSH_TX1SO1iLe"/>
+<subtraction  name="JNSH_tx1som_element1" >
+  <posXYZ  volume="JNSH_tx1som_element1_basic"    X_Y_Z=" 0. ; 0. ; 0. "  rot="   0. ; 0. ; 0."  />
+  <posXYZ  volume="JNSH_tx1som_element6_cutout"   X_Y_Z=" 0. ; 0. ; 0. "  rot="   0. ; 0. ; 0."  />
+</subtraction>
+
+<tubs   name="JNSH_tx1som_element6"    material="ShieldIron"    Rio_Z="JNSH_TX1SO1iRa ; JNSH_TX1SO6oRa ; JNSH_TX1SO6iLe"/>
+
+
+<!-- +++++++++++++++++++++++++++++++++++++++++++++++++ -->
+<!--  JF and JN Shield Composition of volumes          -->
+<!-- +++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+<composition  name="JFSH_ShieldElements" >
+  <posXYZ  volume="JFSH_JFCCylinder"        X_Y_Z="0.;0.;JFSH_JFCMCzpo_JFCMainCylinder_Z"                         rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_AFrame_Assembly"    X_Y_Z="0.;-4340; JFSH_JFCMCzpo_JFCMainCylinder_Z+JFSH_AFconnexion2+110."                rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_JFSOctogon"         X_Y_Z="0.;0.;JFSH_JFSOCzpo_JFSOctogon_Z"                              rot="0.;0.;0." />
+  <posXYZ  volume="JNSH_tx1stm_element1"    X_Y_Z="0.;0.;JNSH_TX1e1zpo_tx1stm_element1_Z"                         rot="0.;0.;0." />
+  <posXYZ  volume="JNSH_tx1stm_element2"    X_Y_Z="0.;0.;JNSH_TX1e2zpo_tx1stm_element2_Z"                         rot="0.;0.;0." />
+  <posXYZ  volume="JNSH_tx1stm_element3"    X_Y_Z="0.;0.;JNSH_TX1e3zpo_tx1stm_element3_Z"                         rot="0.;0.;0." />
+  <posXYZ  volume="JNSH_tx1som_element6"    X_Y_Z="0.;0.;JNSH_TX1SO6zpo_tx1som_element6_Z"                        rot="0.;0.;0." />
+  <posXYZ  volume="JNSH_tx1som_element1"    X_Y_Z="0.;0.;JNSH_TX1SO1zpo_tx1som_element1_Z"                        rot="0.;0.;0." />
+</composition>
+
+
+<composition  name="JFSH_Shield" >
+  <posXYZ  volume="JFSH_ShieldElements"    X_Y_Z="0.;0.; JFSH_ECTnomiz_ECT_Nominal_zpos"     rot="0.;0.;0." />
+  <posXYZ  volume="JFSH_ShieldElements"    X_Y_Z="0.;0.;-JFSH_ECTnomiz_ECT_Nominal_zpos"     rot="0.;JFSH_rot180;0." />
+</composition>
+
+
+<!--     name       =  JT Toroid Shielding           section name       = "Shielding" -->
+<!--  Primary variables  -->
+<var  name="JTSH_OPlength_OuterPlugs_length"                        value=" 4736. " />  <!-- confirmed atljt___0055-vAC -->
+<!-- BEGIN confirmation with atljt___0059-vAB (if no other comment) -->
+<var  name="JTSH_OPinnRad_OuterPlugs_innerRadius"                   value="  600. " />
+<var  name="JTSH_OPinnRad_OuterPlugs_innerRadiusSmall"              value="  562.5" /> <!-- confirmed atljt___0056-vAC -->
+<var  name="JTSH_OPoutRad_OuterPlugs_outerRadius"                   value="  802. " />
+<var  name="JTSH_IPlength_InnerPlugs_length"                        value=" 3686. " />  <!-- confirmed atljt___0055-vAC -->
+<var  name="JTSH_IPinnRa1_InnerPlugs_innerRadius1"                  value="  170.8" />
+<var  name="JTSH_IPtiltAn_InnerPlugs_tiltAngle"                     value="    1.1" />
+<var  name="JTSH_IPzoffse_InnerPlugs_zoffset"                       value=" 1000. " />
+<var  name="JTSH_PRlenoff_PolyRings_lengthoffset"                   value="   67. " />  <!-- confirmed atljt___0055-vAC -->
+<!-- END confirmation with atljt___0059-vAB -->
+<!-- BEGIN confirmation with atljt___0052-vAA (if no other comment) -->
+<var  name="JTSH_PRinnRad_PolyRings_innerRadius"                    value="  802. " />
+<var  name="JTSH_PRinRaof_PolyRings_innerRadoff"                    value="   15. " />
+<var  name="JTSH_PRoutRad_PolyRings_outerRadius"                    value="  857. " />
+<var  name="JTSH_PRexttAn_PolyRings_extension_tiltAngle"            value="   18. " />
+<!-- END confirmation with atljt___0052-vAA -->
+<var  name="JTSH_PRipexle_PolyRings_IPextension_length"             value="  205. " />  <!-- confirmed atljt___0059-vAB -->
+<var  name="JTSH_zpositio_Shield_Z"                                 value=" 7917. " />  <!-- atljt___0055-vAC says 7941. , TC says wrong by 3cm -->
+<var  name="JTSH_yrotatio_Shield_rotY"                              value="  180. " />  <!-- NO CONFIRMATION NEEDED -->
+
+<var  name="JTSH_IPinnRa2_InnerPlugs_innerRadius2" value="JTSH_IPinnRa1_InnerPlugs_innerRadius1 + JTSH_IPlength_InnerPlugs_length *tan(JTSH_IPtiltAn_InnerPlugs_tiltAngle*GENV_PiS180)"/> <!-- changed by Sven.Menke@CERN.CH Jul 2020 from JTSH_OPlength_OuterPlugs_length to JTSH_IPlength_InnerPlugs_length -->
+<var  name="JTSH_PRextzpo_PolyRings_extension_z"   value="(JTSH_PRoutRad_PolyRings_outerRadius-JTSH_PRinnRad_PolyRings_innerRadius-JTSH_PRinRaof_PolyRings_innerRadoff)/tan(JTSH_PRexttAn_PolyRings_extension_tiltAngle*GENV_PiS180)"/>
+
+<var  name="JTSH_OPzposi1_OuterPlugs_z1"    value="JTSH_PRipexle_PolyRings_IPextension_length" />
+<var  name="JTSH_OPzposi2_OuterPlugs_z2"    value="JTSH_OPzposi1_OuterPlugs_z1+JTSH_OPlength_OuterPlugs_length" />
+
+<var  name="JTSH_IPzposi1_InnerPlugs_z1"    value="JTSH_IPzoffse_InnerPlugs_zoffset" />
+<var  name="JTSH_IPzposi2_InnerPlugs_z2"    value="JTSH_IPzposi1_InnerPlugs_z1+JTSH_IPlength_InnerPlugs_length" />
+
+<var  name="JTSH_PRzposi1_PolyRings_z1"     value="JTSH_OPzposi2_OuterPlugs_z2-JTSH_OPlength_OuterPlugs_length+JTSH_PRlenoff_PolyRings_lengthoffset" />
+<var  name="JTSH_PRzposi2_PolyRings_z2"     value="JTSH_OPzposi2_OuterPlugs_z2-JTSH_OPlength_OuterPlugs_length+JTSH_PRlenoff_PolyRings_lengthoffset+JTSH_PRextzpo_PolyRings_extension_z" />
+<var  name="JTSH_PRzposi3_PolyRings_z3"     value="JTSH_OPzposi2_OuterPlugs_z2" />
+
+<!-- Modelization of JT Plugs (outer and inner combined) -->
+<pcon   name="JTSH_Plugs"          material="ShieldIron"  >
+  <polyplane  Rio_Z="JTSH_OPinnRad_OuterPlugs_innerRadius;JTSH_OPoutRad_OuterPlugs_outerRadius;JTSH_OPzposi1_OuterPlugs_z1" />
+  <polyplane  Rio_Z="JTSH_OPinnRad_OuterPlugs_innerRadius;JTSH_OPoutRad_OuterPlugs_outerRadius;JTSH_IPzposi1_InnerPlugs_z1" />
+  <polyplane Rio_Z="JTSH_IPinnRa1_InnerPlugs_innerRadius1;JTSH_OPoutRad_OuterPlugs_outerRadius;JTSH_IPzposi1_InnerPlugs_z1" />
+  <polyplane Rio_Z="JTSH_IPinnRa2_InnerPlugs_innerRadius2;JTSH_OPoutRad_OuterPlugs_outerRadius;JTSH_IPzposi2_InnerPlugs_z2" />
+  <polyplane  Rio_Z="JTSH_OPinnRad_OuterPlugs_innerRadiusSmall;JTSH_OPoutRad_OuterPlugs_outerRadius;JTSH_IPzposi2_InnerPlugs_z2" />
+  <polyplane  Rio_Z="JTSH_OPinnRad_OuterPlugs_innerRadiusSmall;JTSH_OPoutRad_OuterPlugs_outerRadius;JTSH_OPzposi2_OuterPlugs_z2" />
+</pcon>
+
+<pcon name="JTSH_PolyRings" material="PolyBoronB2O3" >
+  <polyplane Rio_Z="JTSH_PRinnRad_PolyRings_innerRadius;JTSH_PRinnRad_PolyRings_innerRadius+JTSH_PRinRaof_PolyRings_innerRadoff;JTSH_PRzposi1_PolyRings_z1" />
+  <polyplane Rio_Z="JTSH_PRinnRad_PolyRings_innerRadius;JTSH_PRoutRad_PolyRings_outerRadius;JTSH_PRzposi2_PolyRings_z2" />
+  <polyplane Rio_Z="JTSH_PRinnRad_PolyRings_innerRadius;JTSH_PRoutRad_PolyRings_outerRadius;JTSH_PRzposi3_PolyRings_z3" />
+</pcon>
+
+<!--  **************************************************************
+      ***                   Installed for Run2                  ****
+      **************************************************************  -->
+
+<var name="JTC_JTCC_JTCCommonAngle"           value="     66. " /> <!-- atujt___0020-v0 -->
+<var name="JTC_JTCB_JTCBottomRadYOffset"      value="    177. " /> <!-- atujt___0020-v0 -->
+<var name="JTC_JTCB_JTCBottomCenterCutX"      value="    300. " /> <!-- atujt___0020-v0 -->
+<var name="JTC_JTCB_JTCBottomCenterCutY"      value="JTC_JTCB_JTCBottomCenterCutX" /> <!-- atujt___0020-v0 -->
+<var name="JTC_JTCB_JTCBottomSideCutY"        value="    400. " /> <!-- atujt___0020-v0 -->
+<var name="JTC_JTCB_JTCBottomBigRad"          value="   1500. " /> <!-- atujt___0020-v0 -->
+<var name="JTC_JTCB_JTCBottomBigX"            value="   1220. " /> <!-- atujt___0020-v0 -->
+<var name="JTC_JTCB_JTCBottomBigZ"            value="     25. + 13. " /> <!-- atujt___0020-v0 , adjustments discussed with TC-->
+<var name="JTC_JTCB_JTCBottomSmallRad"        value="    864.9" /> <!-- atujt___0022-v0 says 865. but overlaps with ECT_EV_CentralTube -->
+<var name="JTC_JTCB_JTCBottomSmallX"          value="    610. " /> <!-- atujt___0022-v0 -->
+<var name="JTC_JTCB_JTCBottomSmallZ"          value="     36. - 13. " /> <!-- atujt___0022-v0 , TC says distance to JF is 4cm, it's mounted on ECT -->
+
+<var name="JTC_JTCT_JTCTopInnerRad"           value="    522.5" /> <!-- atujt___0018-v0 -->
+<var name="JTC_JTCT_JTCTopMediumRad"          value="   1050. " /> <!-- atujt___0029-v0 -->
+<var name="JTC_JTCT_JTCTopOuterRad"           value="   1500. " /> <!-- atujt___0018-v0 -->
+<var name="JTC_JTCT_JTCTopFullZ"              value="     65. + 10. " /> <!-- atujt___0018-v0 , adding 1cm to close gap to ECT, agreed with TC -->
+<var name="JTC_JTCT_JTCTopThickZ"             value="     45. +  5. " /> <!-- atujt___0018-v0 , adding 5mm just to be a bit closer, agreed with TC-->
+<var name="JTC_JTCT_JTCTopCenterXCut"         value="    374. " /> <!-- atujt___0026-v0 -->
+<var name="JTC_JTCT_JTCTopSideCutY"           value="    395. " /> <!-- atujt___0026-v0 -->
+<var name="JTC_JTCT_JTCTopRadYOff"            value="    161. " /> <!-- atujt___0026-v0 -->
+
+<var name="JTC_JTCB_BottomTiltedXOffset" value="tan(JTC_JTCC_JTCCommonAngle*GENV_PiS180)*(JTC_JTCB_JTCBottomSideCutY-JTC_JTCB_JTCBottomRadYOffset)"/>
+<var name="JTC_JTCT_TopTiltedXOffset"    value="tan(JTC_JTCC_JTCCommonAngle*GENV_PiS180)*(JTC_JTCT_JTCTopSideCutY-JTC_JTCT_JTCTopRadYOff)"/>
+
+<tubs name="JTC_JTCB_BottomBigTubeBase" material="PolyBoron207HD5"  Rio_Z=" 0.; JTC_JTCB_JTCBottomBigRad; JTC_JTCB_JTCBottomBigZ" nbPhi="20" profile="180.; 180."/>
+<tubs name="JTC_JTCB_BottomSmallTubeBase" material="PolyBoron207HD5"  Rio_Z=" 0.; JTC_JTCB_JTCBottomSmallRad; JTC_JTCB_JTCBottomSmallZ" nbPhi="20" profile="180.; 180."/>
+<tubs name="JTC_JTCB_BottomAuxCutTube" material="PolyBoron207HD5"  Rio_Z=" 0.; JFSH_PLUGouRa_Plug_outerRadius+GENV_Eps; JTC_JTCT_JTCTopFullZ" />
+
+<!-- not required since approximations in JFSH
+box name="JTC_JTCB_BottomCentralCut" material="PolyBoron207HD5" X_Y_Z=" 2.*(JTC_JTCB_JTCBottomCenterCutX+GENV_Eps); JTC_JTCB_JTCBottomCenterCutY+2.*GENV_Eps; JTC_JTCB_JTCBottomBigZ+2.*GENV_Eps"/>
+-->
+<box name="JTC_JTCB_SideCut" material="PolyBoron207HD5" X_Y_Z=" 2.*JTC_JTCB_JTCBottomCenterCutX; JTC_JTCB_JTCBottomSideCutY+2.*GENV_Eps; JTC_JTCB_JTCBottomBigZ+4.*GENV_Eps"/>
+<box name="JTC_JTCB_EndCut" material="PolyBoron207HD5" X_Y_Z=" JTC_JTCB_JTCBottomBigX; JTC_JTCB_JTCBottomBigRad+2.*GENV_Eps; JTC_JTCB_JTCBottomBigZ+6.*GENV_Eps"/>
+<box name="JTC_JTCB_TiltCut" material="PolyBoron207HD5" X_Y_Z=" JTC_JTCB_JTCBottomBigRad; JTC_JTCB_JTCBottomBigRad; JTC_JTCT_JTCTopFullZ+8.*GENV_Eps"/>
+
+<subtraction name="JTC_JTCB_BottomBigTube">
+  <posXYZ volume="JTC_JTCB_BottomBigTubeBase"  X_Y_Z=" 0.; 0.; 0. " />
+  <posXYZ volume="JTC_JTCB_BottomAuxCutTube"   X_Y_Z=" 0.; 0.; 0. " />
+<!--  <posXYZ volume="JTC_JTCB_BottomCentralCut"   X_Y_Z=" 0.; -JTC_JTCB_JTCBottomCenterCutY/2.+GENV_Eps; 0." /> -->
+  <posXYZ volume="JTC_JTCB_SideCut"       X_Y_Z="  2.*JTC_JTCB_JTCBottomCenterCutX; -JTC_JTCB_JTCBottomSideCutY/2.+GENV_Eps; 0." />
+  <posXYZ volume="JTC_JTCB_SideCut"       X_Y_Z=" -2.*JTC_JTCB_JTCBottomCenterCutX; -JTC_JTCB_JTCBottomSideCutY/2.+GENV_Eps; 0." />
+  <posXYZ volume="JTC_JTCB_EndCut"   X_Y_Z="  1.5*JTC_JTCB_JTCBottomBigX; -JTC_JTCB_JTCBottomBigRad/2.; 0." />
+  <posXYZ volume="JTC_JTCB_EndCut"   X_Y_Z=" -1.5*JTC_JTCB_JTCBottomBigX; -JTC_JTCB_JTCBottomBigRad/2.; 0." />
+  <posXYZ volume="JTC_JTCB_TiltCut"   X_Y_Z=" -JTC_JTCB_BottomTiltedXOffset-cos((45.-(90-JTC_JTCC_JTCCommonAngle))*GENV_PiS180)*JTC_JTCB_JTCBottomBigRad/sqrt(2.); -JTC_JTCB_JTCBottomSideCutY+sin((45.-(90-JTC_JTCC_JTCCommonAngle))*GENV_PiS180)*JTC_JTCB_JTCBottomBigRad/sqrt(2.); 0." rot="0.; 0.; 90.-JTC_JTCC_JTCCommonAngle"/>
+  <posXYZ volume="JTC_JTCB_TiltCut"   X_Y_Z=" JTC_JTCB_BottomTiltedXOffset+cos((45.-(90-JTC_JTCC_JTCCommonAngle))*GENV_PiS180)*JTC_JTCB_JTCBottomBigRad/sqrt(2.); -JTC_JTCB_JTCBottomSideCutY+sin((45.-(90-JTC_JTCC_JTCCommonAngle))*GENV_PiS180)*JTC_JTCB_JTCBottomBigRad/sqrt(2.); 0." rot="0.; 0.; -90.+JTC_JTCC_JTCCommonAngle"/>
+</subtraction>
+
+<subtraction name="JTC_JTCB_BottomSmallTube">
+  <posXYZ volume="JTC_JTCB_BottomSmallTubeBase"  X_Y_Z=" 0.; 0.; 0. " />
+  <posXYZ volume="JTC_JTCB_BottomAuxCutTube"   X_Y_Z=" 0.; 0.; 0. " />
+<!--  <posXYZ volume="JTC_JTCB_BottomCentralCut"   X_Y_Z=" 0.; -JTC_JTCB_JTCBottomCenterCutY/2.+GENV_Eps; 0." /> -->
+  <posXYZ volume="JTC_JTCB_SideCut"       X_Y_Z="  2.*JTC_JTCB_JTCBottomCenterCutX; -JTC_JTCB_JTCBottomSideCutY/2.+GENV_Eps; 0." />
+  <posXYZ volume="JTC_JTCB_SideCut"       X_Y_Z=" -2.*JTC_JTCB_JTCBottomCenterCutX; -JTC_JTCB_JTCBottomSideCutY/2.+GENV_Eps; 0." />
+  <posXYZ volume="JTC_JTCB_EndCut"   X_Y_Z="  0.5*JTC_JTCB_JTCBottomBigX+JTC_JTCB_JTCBottomSmallX; -JTC_JTCB_JTCBottomBigRad/2.; 0." />
+  <posXYZ volume="JTC_JTCB_EndCut"   X_Y_Z=" -0.5*JTC_JTCB_JTCBottomBigX-JTC_JTCB_JTCBottomSmallX; -JTC_JTCB_JTCBottomBigRad/2.; 0." />
+  <posXYZ volume="JTC_JTCB_TiltCut"   X_Y_Z=" -JTC_JTCB_BottomTiltedXOffset-cos((45.-(90-JTC_JTCC_JTCCommonAngle))*GENV_PiS180)*JTC_JTCB_JTCBottomBigRad/sqrt(2.); -JTC_JTCB_JTCBottomSideCutY+sin((45.-(90-JTC_JTCC_JTCCommonAngle))*GENV_PiS180)*JTC_JTCB_JTCBottomBigRad/sqrt(2.); 0." rot="0.; 0.; 90.-JTC_JTCC_JTCCommonAngle"/>
+  <posXYZ volume="JTC_JTCB_TiltCut"   X_Y_Z=" JTC_JTCB_BottomTiltedXOffset+cos((45.-(90-JTC_JTCC_JTCCommonAngle))*GENV_PiS180)*JTC_JTCB_JTCBottomBigRad/sqrt(2.); -JTC_JTCB_JTCBottomSideCutY+sin((45.-(90-JTC_JTCC_JTCCommonAngle))*GENV_PiS180)*JTC_JTCB_JTCBottomBigRad/sqrt(2.); 0." rot="0.; 0.; -90.+JTC_JTCC_JTCCommonAngle"/>
+</subtraction>
+
+<tubs name="JTC_JTCT_TopTubeBase" material="PolyBoron207HD5"  Rio_Z=" JTC_JTCT_JTCTopInnerRad; JTC_JTCT_JTCTopOuterRad; JTC_JTCT_JTCTopFullZ" nbPhi="25" />
+<tubs name="JTC_JTCT_TopCutTube" material="PolyBoron207HD5"  Rio_Z=" 0.; JTC_JTCT_JTCTopMediumRad; JTC_JTCT_JTCTopFullZ-JTC_JTCT_JTCTopThickZ+GENV_Eps" nbPhi="25"/>
+
+<box name="JTC_JTCT_TopCentralCut" material="PolyBoron207HD5" X_Y_Z=" 2.*JTC_JTCT_JTCTopCenterXCut; JTC_JTCT_JTCTopOuterRad+2.*GENV_Eps; JTC_JTCT_JTCTopFullZ+4.*GENV_Eps"/>
+<box name="JTC_JTCT_SideCut" material="PolyBoron207HD5" X_Y_Z=" 2.*JTC_JTCT_TopTiltedXOffset; JTC_JTCT_JTCTopOuterRad; JTC_JTCT_JTCTopFullZ+6.*GENV_Eps"/>
+
+<subtraction name="JTC_JTCT_TopTube">
+  <posXYZ volume="JTC_JTCT_TopTubeBase"     X_Y_Z=" 0.; 0.; 0. " />
+  <posXYZ volume="JTC_JTCT_TopCutTube"      X_Y_Z=" 0.; 0.; JTC_JTCT_JTCTopThickZ/2.+GENV_Eps" />
+  <posXYZ volume="JTC_JTCT_TopCentralCut"   X_Y_Z=" 0.; -JTC_JTCT_JTCTopOuterRad/2.-GENV_Eps; 0." />
+  <posXYZ volume="JTC_JTCT_SideCut"         X_Y_Z=" 0.; -JTC_JTCT_JTCTopOuterRad/2.-JTC_JTCT_JTCTopSideCutY; 0." />
+  <posXYZ volume="JTC_JTCB_TiltCut"   X_Y_Z=" JTC_JTCT_TopTiltedXOffset+sin((45.-(90-JTC_JTCC_JTCCommonAngle))*GENV_PiS180)*JTC_JTCB_JTCBottomBigRad/sqrt(2.); -JTC_JTCT_JTCTopSideCutY-cos((45.-(90-JTC_JTCC_JTCCommonAngle))*GENV_PiS180)*JTC_JTCB_JTCBottomBigRad/sqrt(2.); 0." rot="0.; 0.; JTC_JTCC_JTCCommonAngle"/>
+  <posXYZ volume="JTC_JTCB_TiltCut"   X_Y_Z=" -JTC_JTCT_TopTiltedXOffset-sin((45.-(90-JTC_JTCC_JTCCommonAngle))*GENV_PiS180)*JTC_JTCB_JTCBottomBigRad/sqrt(2.); -JTC_JTCT_JTCTopSideCutY-cos((45.-(90-JTC_JTCC_JTCCommonAngle))*GENV_PiS180)*JTC_JTCB_JTCBottomBigRad/sqrt(2.); 0." rot="0.; 0.; -JTC_JTCC_JTCCommonAngle"/>
+</subtraction>
+
+<!-- Composition of JT Shields  -->
+<composition  name="JTSH_ShieldElements" >
+  <posXYZ  volume="JTSH_Plugs"        X_Y_Z="0.;0.;0."      rot="0.;0.;0." />
+  <posXYZ  volume="JTSH_PolyRings"    X_Y_Z="0.;0.;0."      rot="0.;0.;0." />
+</composition>
+
+<composition  name="JTSH_Shield" >
+ <posXYZ  volume="JTSH_ShieldElements"   X_Y_Z="0.;0.; JTSH_zpositio_Shield_Z"      rot="0.;0.;0." /> 
+ <posXYZ  volume="JTSH_ShieldElements"   X_Y_Z="0.;0.;-JTSH_zpositio_Shield_Z"      rot="0.;JTSH_yrotatio_Shield_rotY;0." /> 
+ <posXYZ  volume="JTC_JTCT_TopTube"      X_Y_Z="0.;0.; JFSH_ECTnomiz_ECT_Nominal_zpos+JFSH_JFCMCzof_JFCMainCylinder_zoffset-JTC_JTCT_JTCTopFullZ/2.-GENV_Eps"      rot="0.;JTSH_yrotatio_Shield_rotY;0." />
+ <posXYZ  volume="JTC_JTCT_TopTube"      X_Y_Z="0.;0.;-JFSH_ECTnomiz_ECT_Nominal_zpos-JFSH_JFCMCzof_JFCMainCylinder_zoffset+JTC_JTCT_JTCTopFullZ/2.+GENV_Eps"      rot="0.;0.;0." />
+ <posXYZ  volume="JTC_JTCB_BottomSmallTube" X_Y_Z="0.;0.;JTSH_OPzposi2_OuterPlugs_z2+JTSH_zpositio_Shield_Z+JTC_JTCB_JTCBottomSmallZ/2.+GENV_Eps" /> 
+ <posXYZ  volume="JTC_JTCB_BottomBigTube" X_Y_Z="0.;0.;JTSH_OPzposi2_OuterPlugs_z2+JTSH_zpositio_Shield_Z+JTC_JTCB_JTCBottomSmallZ+JTC_JTCB_JTCBottomBigZ/2.+2.*GENV_Eps"/>
+ <posXYZ  volume="JTC_JTCB_BottomSmallTube" X_Y_Z="0.;0.;-(JTSH_OPzposi2_OuterPlugs_z2+JTSH_zpositio_Shield_Z+JTC_JTCB_JTCBottomSmallZ/2.+GENV_Eps)" /> 
+ <posXYZ  volume="JTC_JTCB_BottomBigTube" X_Y_Z="0.;0.;-(JTSH_OPzposi2_OuterPlugs_z2+JTSH_zpositio_Shield_Z+JTC_JTCB_JTCBottomSmallZ+JTC_JTCB_JTCBottomBigZ/2.+2.*GENV_Eps)"/> 
+</composition>
+
+</section>
+
+
+<section name       = "pp2"
+         version    = "7.0"
+         date       = "01-04-2010"
+         author     = "new simplified pp2 by Jochen - old versions by Laurent, Andrea Dell'Acqua and Daniel Pomarede removed"
+         top_volume = "pp2">
+
+
+<!--     name       =  pp2                           section name       = "Services"  -->
+<!--  **************************************************************
+      **************************************************************
+      ***                                                       ****
+      ***        ATLAS Services : ID Patch Panels PP2           ****
+      ***                                                       ****
+      **************************************************************
+      **************************************************************  -->
+
+<!-- New Simplified PP2 - subboxes merged by Jochen Meyer-->
+
+<!-- variables for semi simplified boxes -->
+<!-- sector 13 - one -->
+<var  name="IPP2_Sec13_Box1_z"      value=" 520. " />
+<var  name="IPP2_Sec13_Box1_x"      value="1300. " />
+<var  name="IPP2_Sec13_Box1_y"      value=" 420. " />
+
+<var  name="IPP2_Sec13_Box2_z"      value="IPP2_Sec13_Box1_z"    />
+<var  name="IPP2_Sec13_Box2_x"      value="IPP2_Sec13_Box1_x/2." />
+<var  name="IPP2_Sec13_Box2_y"      value=" 450. " />
+
+<!-- sector 13 - two -->
+<var  name="IPP2_Sec13_Box3_z"      value=" 380. " />
+<var  name="IPP2_Sec13_Box3_x"      value=" 420. " />
+<var  name="IPP2_Sec13_Box3_y"      value=" 440. " />
+
+<var  name="IPP2_Sec13_Box4_z"      value=" 700. " />
+<var  name="IPP2_Sec13_Box4_x"      value=" 400. " />
+<var  name="IPP2_Sec13_Box4_y"      value="IPP2_Sec13_Box3_y" />
+
+<var  name="IPP2_Sec13_Box5_z"      value=" 590. " />
+<var  name="IPP2_Sec13_Box5_x"      value=" 540. " />
+<var  name="IPP2_Sec13_Box5_y"      value=" 170. " />
+
+<var  name="IPP2_Sec13_Box6_z"      value=" 500. " />
+<var  name="IPP2_Sec13_Box6_x"      value=" 150. " />
+<var  name="IPP2_Sec13_Box6_y"      value=" 100. " />
+
+<var  name="IPP2_Sec13_xspace"      value="   37.5" />
+
+<!-- sector 3 & 7 -->
+<var  name="IPP2_Sec37_Box1_z"      value=" 610. " />
+<var  name="IPP2_Sec37_Box1_x"      value=" 520. " />
+<var  name="IPP2_Sec37_Box1_y"      value=" 850. " />
+
+<var  name="IPP2_Sec37_Box2_z"      value=" 300. " />
+<var  name="IPP2_Sec37_Box2_x"      value="IPP2_Sec37_Box1_x" />
+<var  name="IPP2_Sec37_Box2_y"      value=" 420. " />
+
+<var  name="IPP2_Sec37_Box3_z"      value=" 300. " />
+<var  name="IPP2_Sec37_Box3_x"      value=" 260. " />
+<var  name="IPP2_Sec37_Box3_y"      value=" 360. " />
+
+<var  name="IPP2_Sec37_Box4_z"      value=" 360. " />
+<var  name="IPP2_Sec37_Box4_x"      value=" 560. " />
+<var  name="IPP2_Sec37_Box4_y"      value="IPP2_Sec37_Box3_y" />
+
+<var  name="IPP2_Sec37_Box5_z"      value=" 120. " />
+<var  name="IPP2_Sec37_Box5_x"      value=" 320. " />
+<var  name="IPP2_Sec37_Box5_y"      value=" 120. " />
+
+<var  name="IPP2_Sec37_Box6_z"      value=" 200. " />
+<var  name="IPP2_Sec37_Box6_x"      value=" 120. " />
+<var  name="IPP2_Sec37_Box6_y"      value=" 120. " />
+
+<var  name="IPP2_Sec37_xoffset"     value="  40. " />
+
+<!-- sector 1 & 9 -->
+<var  name="IPP2_Sec19_Box1_z"      value=" 610. " />
+<var  name="IPP2_Sec19_Box1_x"      value=" 520. " />
+<var  name="IPP2_Sec19_Box1_y"      value="1260. " />
+
+<var  name="IPP2_Sec19_Box2_z"      value=" 300." />
+<var  name="IPP2_Sec19_Box2_x"      value=" 520." />
+<var  name="IPP2_Sec19_Box2_y"      value=" 850." />
+
+<var  name="IPP2_Sec19_Box3_z"      value=" 420." />
+<var  name="IPP2_Sec19_Box3_x"      value=" 380." />
+<var  name="IPP2_Sec19_Box3_y"      value=" 710." />
+
+<var  name="IPP2_Sec19_Box4_z"      value=" 400." />
+<var  name="IPP2_Sec19_Box4_x"      value=" 700." />
+<var  name="IPP2_Sec19_Box4_y"      value="IPP2_Sec19_Box3_y" />
+
+<var  name="IPP2_Sec19_Box5_z"      value=" 110." />
+<var  name="IPP2_Sec19_Box5_x"      value=" 400." />
+<var  name="IPP2_Sec19_Box5_y"      value=" 100." />
+
+<var  name="IPP2_Sec19_Box2_yoffset" value=" 300." />
+<var  name="IPP2_Sec19_xoffset"      value="IPP2_Sec37_xoffset" />
+
+<!-- universal floor -->
+<var  name="IPP2_UniFloor_x"        value=" 900. "/>
+<var  name="IPP2_UniFloor_y"        value="  15. "/>
+<var  name="IPP2_UniFloor_z"        value="1770. "/>
+
+<var  name="IPP2_UniFl_Sec13Zshift" value="  40. "/>
+
+<!-- coordinates -->
+<var  name="IPP2_xpos19"       value="+5880. "/>
+<var  name="IPP2_ypos19"       value="-1100. "/>
+<var  name="IPP2_zpos19"       value="+2560. "/>
+<var  name="IPP2_xpos37"       value="+4710. "/>
+<var  name="IPP2_ypos37"       value="+3340. "/>
+<var  name="IPP2_zpos37"       value="+2710. "/>
+<var  name="IPP2_xpos13_one"   value="  650. "/>
+<var  name="IPP2_ypos13_one"   value="-6380. "/>
+<var  name="IPP2_zpos13_one"   value="+3820. "/>
+<var  name="IPP2_xpos13_two"   value=" +890. "/>
+<var  name="IPP2_ypos13_two"   value="-6380. "/>
+<var  name="IPP2_zpos13_two"   value="+2460. "/>
+
+<box  name="IPP2_UniFloor"   material="Aluminium4"  X_Y_Z="IPP2_UniFloor_x; IPP2_UniFloor_y; IPP2_UniFloor_z" />
+
+<box  name="IPP2_Sec13_Box1" material="Aluminium1"  X_Y_Z="IPP2_Sec13_Box1_x; IPP2_Sec13_Box1_y; IPP2_Sec13_Box1_z" />
+<box  name="IPP2_Sec13_Box2" material="Aluminium1"  X_Y_Z="IPP2_Sec13_Box2_x; IPP2_Sec13_Box2_y; IPP2_Sec13_Box2_z" />
+<box  name="IPP2_Sec13_Box3" material="Aluminium1"  X_Y_Z="IPP2_Sec13_Box3_x; IPP2_Sec13_Box3_y; IPP2_Sec13_Box3_z" />
+<box  name="IPP2_Sec13_Box4" material="Aluminium1"  X_Y_Z="IPP2_Sec13_Box4_x; IPP2_Sec13_Box4_y; IPP2_Sec13_Box4_z" />
+<box  name="IPP2_Sec13_Box5" material="Aluminium1"  X_Y_Z="IPP2_Sec13_Box5_x; IPP2_Sec13_Box5_y; IPP2_Sec13_Box5_z" />
+<box  name="IPP2_Sec13_Box6" material="Aluminium1"  X_Y_Z="IPP2_Sec13_Box6_x; IPP2_Sec13_Box6_y; IPP2_Sec13_Box6_z" />
+
+<box  name="IPP2_Sec37_Box1" material="Aluminium1"  X_Y_Z="IPP2_Sec37_Box1_x; IPP2_Sec37_Box1_y; IPP2_Sec37_Box1_z" />
+<box  name="IPP2_Sec37_Box2" material="Aluminium1"  X_Y_Z="IPP2_Sec37_Box2_x; IPP2_Sec37_Box2_y; IPP2_Sec37_Box2_z" />
+<box  name="IPP2_Sec37_Box3" material="Aluminium1"  X_Y_Z="IPP2_Sec37_Box3_x; IPP2_Sec37_Box3_y; IPP2_Sec37_Box3_z" />
+<box  name="IPP2_Sec37_Box4" material="Aluminium1"  X_Y_Z="IPP2_Sec37_Box4_x; IPP2_Sec37_Box4_y; IPP2_Sec37_Box4_z" />
+<box  name="IPP2_Sec37_Box5" material="Aluminium1"  X_Y_Z="IPP2_Sec37_Box5_x; IPP2_Sec37_Box5_y; IPP2_Sec37_Box5_z" />
+<box  name="IPP2_Sec37_Box6" material="Aluminium1"  X_Y_Z="IPP2_Sec37_Box6_x; IPP2_Sec37_Box6_y; IPP2_Sec37_Box6_z" />
+
+<box  name="IPP2_Sec19_Box1" material="Aluminium1"  X_Y_Z="IPP2_Sec19_Box1_x; IPP2_Sec19_Box1_y; IPP2_Sec19_Box1_z" />
+<box  name="IPP2_Sec19_Box2" material="Aluminium1"  X_Y_Z="IPP2_Sec19_Box2_x; IPP2_Sec19_Box2_y; IPP2_Sec19_Box2_z" />
+<box  name="IPP2_Sec19_Box3" material="Aluminium1"  X_Y_Z="IPP2_Sec19_Box3_x; IPP2_Sec19_Box3_y; IPP2_Sec19_Box3_z" />
+<box  name="IPP2_Sec19_Box4" material="Aluminium1"  X_Y_Z="IPP2_Sec19_Box4_x; IPP2_Sec19_Box4_y; IPP2_Sec19_Box4_z" />
+<box  name="IPP2_Sec19_Box5" material="Aluminium1"  X_Y_Z="IPP2_Sec19_Box5_x; IPP2_Sec19_Box5_y; IPP2_Sec19_Box5_z" />
+
+<composition name="IPP2_Sec13_single_one">
+  <posXYZ  volume="IPP2_UniFloor"     X_Y_Z="0.; -IPP2_UniFloor_y/2.; IPP2_UniFl_Sec13Zshift"  rot="0.; 90.; 0." />
+  <posXYZ  volume="IPP2_Sec13_Box1"   X_Y_Z="0.;  IPP2_Sec13_Box1_y/2. + GENV_Eps; 0." />
+  <posXYZ  volume="IPP2_Sec13_Box2"   X_Y_Z="0.;  IPP2_Sec13_Box2_y/2. + IPP2_Sec13_Box1_y + 2.*GENV_Eps; 0." />
+</composition>
+
+<var name="IPP2_Sec13_length"  value="(IPP2_Sec13_Box3_x + IPP2_Sec13_Box4_x + IPP2_Sec13_xspace)*2."/>
+
+<composition name="IPP2_Sec13_single_two_Cside">
+  <posXYZ  volume="IPP2_UniFloor"        X_Y_Z="0.; -IPP2_UniFloor_y/2.; -IPP2_UniFl_Sec13Zshift"  rot="0.; 90.; 0." />
+  <posXYZ  volume="IPP2_Sec13_Box3"      X_Y_Z=" IPP2_Sec13_Box4_x + IPP2_Sec13_Box3_x/2. + IPP2_Sec13_xspace + GENV_Eps; IPP2_Sec13_Box3_y/2. + GENV_Eps; (IPP2_Sec13_Box3_z - IPP2_Sec13_Box4_z)/2." />
+  <posXYZ  volume="IPP2_Sec13_Box4"      X_Y_Z=" IPP2_Sec13_Box4_x/2. + IPP2_Sec13_xspace; IPP2_Sec13_Box4_y/2. + GENV_Eps; 0." />
+  <posXYZ  volume="IPP2_Sec13_Box3"      X_Y_Z="-IPP2_Sec13_Box3_x/2. - IPP2_Sec13_xspace; IPP2_Sec13_Box3_y/2. + GENV_Eps; (IPP2_Sec13_Box3_z - IPP2_Sec13_Box4_z)/2." />
+  <posXYZ  volume="IPP2_Sec13_Box4"      X_Y_Z="-IPP2_Sec13_Box3_x - IPP2_Sec13_Box4_x/2. - IPP2_Sec13_xspace - GENV_Eps; IPP2_Sec13_Box4_y/2. + GENV_Eps; 0." />
+  <posXYZ  volume="IPP2_Sec13_Box5"      X_Y_Z=" IPP2_Sec13_Box5_x/2. + IPP2_Sec13_xspace; IPP2_Sec13_Box3_y + IPP2_Sec13_Box5_y/2. + 2.*GENV_Eps; (IPP2_Sec13_Box5_z - IPP2_Sec13_Box4_z)/2." />
+  <posXYZ  volume="IPP2_Sec13_Box6"      X_Y_Z="-IPP2_Sec13_Box6_x/2. - IPP2_Sec13_xspace; IPP2_Sec13_Box3_y + IPP2_Sec13_Box6_y/2. + 2.*GENV_Eps; (IPP2_Sec13_Box6_z - IPP2_Sec13_Box4_z)/2." />
+</composition>
+
+<composition name="IPP2_Sec13_single_two_Aside">
+  <posXYZ  volume="IPP2_UniFloor"        X_Y_Z="0.; -IPP2_UniFloor_y/2.; -IPP2_UniFl_Sec13Zshift"  rot="0.; 90.; 0." />
+  <posXYZ  volume="IPP2_Sec13_Box3"      X_Y_Z=" IPP2_Sec13_Box4_x + IPP2_Sec13_Box3_x/2. + IPP2_Sec13_xspace + GENV_Eps; IPP2_Sec13_Box3_y/2. + GENV_Eps; (IPP2_Sec13_Box3_z - IPP2_Sec13_Box4_z)/2." />
+  <posXYZ  volume="IPP2_Sec13_Box4"      X_Y_Z=" IPP2_Sec13_Box4_x/2. + IPP2_Sec13_xspace; IPP2_Sec13_Box4_y/2. + GENV_Eps; 0." />
+  <posXYZ  volume="IPP2_Sec13_Box3"      X_Y_Z="-IPP2_Sec13_Box3_x/2. - IPP2_Sec13_xspace; IPP2_Sec13_Box3_y/2. + GENV_Eps; (IPP2_Sec13_Box3_z - IPP2_Sec13_Box4_z)/2." />
+  <posXYZ  volume="IPP2_Sec13_Box4"      X_Y_Z="-IPP2_Sec13_Box3_x - IPP2_Sec13_Box4_x/2. - IPP2_Sec13_xspace - GENV_Eps; IPP2_Sec13_Box4_y/2. + GENV_Eps; 0." />
+  <posXYZ  volume="IPP2_Sec13_Box5"      X_Y_Z="-IPP2_Sec13_Box5_x/2. - IPP2_Sec13_xspace; IPP2_Sec13_Box3_y + IPP2_Sec13_Box5_y/2. + 2.*GENV_Eps; (IPP2_Sec13_Box5_z - IPP2_Sec13_Box4_z)/2." />
+  <posXYZ  volume="IPP2_Sec13_Box6"      X_Y_Z=" IPP2_Sec13_Box6_x/2. + IPP2_Sec13_xspace; IPP2_Sec13_Box3_y + IPP2_Sec13_Box6_y/2. + 2.*GENV_Eps; (IPP2_Sec13_Box6_z - IPP2_Sec13_Box4_z)/2." />
+</composition>
+
+<var name="IPP_Sec37_length"  value="IPP2_Sec37_Box1_z + IPP2_Sec37_Box2_z + IPP2_Sec13_Box3_x + IPP2_Sec13_Box4_x"/>
+
+<composition name="IPP2_Sec37_single">
+  <posXYZ  volume="IPP2_UniFloor"   X_Y_Z="0.; -IPP2_UniFloor_y/2.; 0."  rot="0.; 0.; 0." />
+  <posXYZ  volume="IPP2_Sec37_Box1" X_Y_Z="0.; IPP2_Sec37_Box1_y/2. + GENV_Eps; - IPP_Sec37_length/2. - 2.*GENV_Eps + IPP2_Sec37_Box1_z/2." />
+  <posXYZ  volume="IPP2_Sec37_Box2" X_Y_Z="0.; IPP2_Sec37_Box2_y/2. + GENV_Eps; - IPP_Sec37_length/2. - GENV_Eps + IPP2_Sec37_Box1_z + IPP2_Sec37_Box2_z/2." />
+  <posXYZ  volume="IPP2_Sec13_Box3" X_Y_Z="IPP2_Sec37_xoffset + (IPP2_Sec13_Box3_z-IPP2_Sec13_Box4_z)/2.; IPP2_Sec13_Box3_y/2. + GENV_Eps; IPP_Sec37_length/2. + 2.*GENV_Eps - IPP2_Sec13_Box3_x/2." rot="0.; 90.; 0."/>
+  <posXYZ  volume="IPP2_Sec13_Box4" X_Y_Z="IPP2_Sec37_xoffset ; IPP2_Sec13_Box4_y/2. + GENV_Eps; IPP_Sec37_length/2. + GENV_Eps - IPP2_Sec13_Box3_x - IPP2_Sec13_Box4_x/2." rot="0.; 90.; 0."/>
+  <posXYZ  volume="IPP2_Sec37_Box3" X_Y_Z="IPP2_Sec37_xoffset + (-IPP2_Sec13_Box4_z + IPP2_Sec37_Box3_x)/2.; IPP2_Sec13_Box3_y + IPP2_Sec37_Box3_y/2. + 2.*GENV_Eps; IPP_Sec37_length/2. - IPP2_Sec13_Box3_x - IPP2_Sec13_Box4_x + IPP2_Sec37_Box4_z + IPP2_Sec37_Box3_z/2. + 2.*GENV_Eps" />
+  <posXYZ  volume="IPP2_Sec37_Box4" X_Y_Z="IPP2_Sec37_xoffset + (-IPP2_Sec13_Box4_z + IPP2_Sec37_Box4_x)/2.; IPP2_Sec13_Box4_y + IPP2_Sec37_Box4_y/2. + 2.*GENV_Eps; IPP_Sec37_length/2. - IPP2_Sec13_Box3_x - IPP2_Sec13_Box4_x + IPP2_Sec37_Box4_z/2. + GENV_Eps" />
+  <posXYZ  volume="IPP2_Sec37_Box5" X_Y_Z="IPP2_Sec37_xoffset - IPP2_Sec13_Box4_z/2. + IPP2_Sec37_Box3_x - IPP2_Sec37_Box6_x + IPP2_Sec37_Box5_x/2.; IPP2_Sec37_Box4_y + IPP2_Sec13_Box4_y + IPP2_Sec37_Box5_y/2. + 3.*GENV_Eps; IPP_Sec37_length/2. - IPP2_Sec13_Box3_x - IPP2_Sec13_Box4_x + IPP2_Sec37_Box4_z - IPP2_Sec37_Box5_z/2. + GENV_Eps" />
+  <posXYZ  volume="IPP2_Sec37_Box6" X_Y_Z="IPP2_Sec37_xoffset - IPP2_Sec13_Box4_z/2. + IPP2_Sec37_Box3_x - IPP2_Sec37_Box6_x/2.; IPP2_Sec37_Box4_y + IPP2_Sec13_Box4_y + IPP2_Sec37_Box5_y/2. + 3.*GENV_Eps; IPP_Sec37_length/2. - IPP2_Sec13_Box3_x - IPP2_Sec13_Box4_x + IPP2_Sec37_Box4_z + IPP2_Sec37_Box6_z/2. + 2.*GENV_Eps" />
+</composition>
+
+<var name="IPP_Sec19_length"  value="IPP2_Sec19_Box1_z + IPP2_Sec19_Box2_z + IPP2_Sec19_Box3_z + IPP2_Sec19_Box4_z"/>
+
+<composition name="IPP2_Sec19_single">
+  <posXYZ  volume="IPP2_UniFloor"   X_Y_Z="0.; -IPP2_UniFloor_y/2.; 0."  rot="0.; 0.; 0." />
+  <posXYZ  volume="IPP2_Sec19_Box1" X_Y_Z="0.; IPP2_Sec19_Box1_y/2. + GENV_Eps; - IPP_Sec19_length/2. - 2.*GENV_Eps + IPP2_Sec19_Box1_z/2." />
+  <posXYZ  volume="IPP2_Sec19_Box2" X_Y_Z="0.; IPP2_Sec19_Box2_y/2. + IPP2_Sec19_Box2_yoffset; - IPP_Sec19_length/2. - GENV_Eps + IPP2_Sec19_Box1_z + IPP2_Sec19_Box2_z/2." />
+  <posXYZ  volume="IPP2_Sec19_Box3" X_Y_Z="IPP2_Sec19_xoffset + (IPP2_Sec19_Box3_x - IPP2_Sec19_Box4_x)/2.; IPP2_Sec37_Box4_y + IPP2_Sec19_Box3_y/2. + 2.*GENV_Eps; IPP_Sec19_length/2. + 2.*GENV_Eps - IPP2_Sec19_Box3_z/2." />
+  <posXYZ  volume="IPP2_Sec19_Box4" X_Y_Z="IPP2_Sec19_xoffset; IPP2_Sec37_Box3_y + IPP2_Sec19_Box4_y/2. + 2.*GENV_Eps; IPP_Sec19_length/2. + GENV_Eps  - IPP2_Sec19_Box3_z - IPP2_Sec19_Box4_z/2." />
+  <posXYZ  volume="IPP2_Sec37_Box3" X_Y_Z="IPP2_Sec19_xoffset + (-IPP2_Sec19_Box4_x + IPP2_Sec37_Box3_x)/2.; IPP2_Sec37_Box3_y/2. + GENV_Eps; IPP_Sec19_length/2. - IPP2_Sec19_Box3_z - IPP2_Sec19_Box4_z + IPP2_Sec37_Box4_z + IPP2_Sec37_Box3_z/2. + 2.*GENV_Eps" />
+  <posXYZ  volume="IPP2_Sec37_Box4" X_Y_Z="IPP2_Sec19_xoffset + (-IPP2_Sec19_Box4_x + IPP2_Sec37_Box4_x)/2.; IPP2_Sec37_Box4_y/2. + GENV_Eps; IPP_Sec19_length/2. - IPP2_Sec19_Box3_z - IPP2_Sec19_Box4_z + IPP2_Sec37_Box4_z/2. + GENV_Eps" />
+  <posXYZ  volume="IPP2_Sec37_Box5" X_Y_Z="IPP2_Sec19_xoffset - IPP2_Sec19_Box4_x/2. + IPP2_Sec37_Box3_x - IPP2_Sec37_Box6_x + IPP2_Sec37_Box5_x/2.; IPP2_Sec37_Box4_y + IPP2_Sec19_Box4_y + IPP2_Sec37_Box5_y/2. + 3.*GENV_Eps; IPP_Sec19_length/2. - IPP2_Sec19_Box3_z - IPP2_Sec19_Box4_z + IPP2_Sec37_Box4_z - IPP2_Sec37_Box5_z/2. + GENV_Eps" />
+  <posXYZ  volume="IPP2_Sec37_Box6" X_Y_Z="IPP2_Sec19_xoffset - IPP2_Sec19_Box4_x/2. + IPP2_Sec37_Box3_x - IPP2_Sec37_Box6_x/2.; IPP2_Sec37_Box4_y + IPP2_Sec19_Box4_y + IPP2_Sec37_Box5_y/2. + 3.*GENV_Eps; IPP_Sec19_length/2. - IPP2_Sec19_Box3_z - IPP2_Sec19_Box4_z + IPP2_Sec37_Box4_z + IPP2_Sec37_Box6_z/2. + 2.*GENV_Eps" />
+  <posXYZ  volume="IPP2_Sec19_Box5" X_Y_Z="0.; IPP2_Sec37_Box4_y + IPP2_Sec19_Box4_y + IPP2_Sec19_Box5_y/2. + 3.*GENV_Eps; 3.*IPP2_Sec19_Box5_z/2." />
+</composition>
+
+<composition name="pp2">
+  <posXYZ  volume="IPP2_Sec13_single_one"       X_Y_Z="IPP2_xpos13_one - IPP2_Sec13_Box1_x/2.; IPP2_ypos13_one; IPP2_zpos13_one + IPP2_Sec13_Box1_z/2."/>
+  <posXYZ  volume="IPP2_Sec13_single_one"       X_Y_Z="IPP2_xpos13_one - IPP2_Sec13_Box1_x/2.; IPP2_ypos13_one; -IPP2_zpos13_one - IPP2_Sec13_Box1_z/2." rot="0.; 180.; 0."/>
+  <posXYZ  volume="IPP2_Sec13_single_two_Aside" X_Y_Z="IPP2_xpos13_two - IPP2_Sec13_length/2.; IPP2_ypos13_two; IPP2_zpos13_two + IPP2_Sec13_Box4_z/2."/>
+  <posXYZ  volume="IPP2_Sec13_single_two_Cside" X_Y_Z="IPP2_xpos13_two - IPP2_Sec13_length/2.; IPP2_ypos13_two; -IPP2_zpos13_two - IPP2_Sec13_Box4_z/2." rot="0.; 180.; 0."/>
+  <posXYZ  volume="IPP2_Sec37_single"           X_Y_Z=" IPP2_xpos37 + IPP2_Sec13_Box4_z/2. - IPP2_Sec37_xoffset; IPP2_ypos37;  IPP2_zpos37 - IPP_Sec37_length/2. + IPP2_Sec37_Box1_z + IPP2_Sec37_Box2_z + IPP2_Sec13_Box3_x + IPP2_Sec13_Box4_x"/>
+  <posXYZ  volume="IPP2_Sec37_single"           X_Y_Z=" IPP2_xpos37 + IPP2_Sec13_Box4_z/2. - IPP2_Sec37_xoffset; IPP2_ypos37; -IPP2_zpos37 + IPP_Sec37_length/2. - IPP2_Sec37_Box1_z - IPP2_Sec37_Box2_z - IPP2_Sec13_Box3_x - IPP2_Sec13_Box4_x"/>
+  <posXYZ  volume="IPP2_Sec37_single"           X_Y_Z="-IPP2_xpos37 - IPP2_Sec13_Box4_z/2. + IPP2_Sec37_xoffset; IPP2_ypos37;  IPP2_zpos37 - IPP_Sec37_length/2. + IPP2_Sec37_Box1_z + IPP2_Sec37_Box2_z + IPP2_Sec13_Box3_x + IPP2_Sec13_Box4_x" rot="0.; 180.; 0."/>
+  <posXYZ  volume="IPP2_Sec37_single"           X_Y_Z="-IPP2_xpos37 - IPP2_Sec13_Box4_z/2. + IPP2_Sec37_xoffset; IPP2_ypos37; -IPP2_zpos37 + IPP_Sec37_length/2. - IPP2_Sec37_Box1_z - IPP2_Sec37_Box2_z - IPP2_Sec13_Box3_x - IPP2_Sec13_Box4_x" rot="0.; 180.; 0."/>
+  <posXYZ  volume="IPP2_Sec19_single"           X_Y_Z=" IPP2_xpos19 + IPP2_Sec19_Box4_x/2. - IPP2_Sec37_xoffset; IPP2_ypos19;  IPP2_zpos19 - IPP_Sec19_length/2. + IPP2_Sec19_Box1_z + IPP2_Sec19_Box2_z + IPP2_Sec19_Box3_z + IPP2_Sec19_Box4_z"/>
+  <posXYZ  volume="IPP2_Sec19_single"           X_Y_Z=" IPP2_xpos19 + IPP2_Sec19_Box4_x/2. - IPP2_Sec37_xoffset; IPP2_ypos19; -IPP2_zpos19 + IPP_Sec19_length/2. - IPP2_Sec19_Box1_z - IPP2_Sec19_Box2_z - IPP2_Sec37_Box4_z - IPP2_Sec37_Box3_z"/>
+  <posXYZ  volume="IPP2_Sec19_single"           X_Y_Z="-IPP2_xpos19 - IPP2_Sec19_Box4_x/2. + IPP2_Sec37_xoffset; IPP2_ypos19;  IPP2_zpos19 - IPP_Sec19_length/2. + IPP2_Sec19_Box1_z + IPP2_Sec19_Box2_z + IPP2_Sec37_Box4_z + IPP2_Sec37_Box3_z" rot="0.; 180.; 0."/>
+  <posXYZ  volume="IPP2_Sec19_single"           X_Y_Z="-IPP2_xpos19 - IPP2_Sec19_Box4_x/2. + IPP2_Sec37_xoffset; IPP2_ypos19; -IPP2_zpos19 + IPP_Sec19_length/2. - IPP2_Sec19_Box1_z - IPP2_Sec19_Box2_z - IPP2_Sec19_Box3_z - IPP2_Sec19_Box4_z" rot="0.; 180.; 0."/>
+</composition>
+
+</section>
+
+<section name       = "Eta0Services"
+         version    = "7.0"
+         date       = "29 Mar 2010"
+         author     = "Laurent Chevalier"
+         top_volume = "servicesAtZ0">
+
+<!--     name       =  Eta0Services                  section name       = "Services"  -->
+<!--  
+      **************************************************************
+      ***                                                       ****
+      ***                  Services                             ****
+      ***                                                       ****
+      **************************************************************
+-->
+<tubs  name="EMCaloPipeI"   material="Iron1"       Rio_Z=" 310 ; 320; 5500"    nbPhi="20" />
+<tubs  name="EMCaloPipeO"   material="Iron1"       Rio_Z=" 190 ; 200; 1400"    nbPhi="20" />
+<tubs  name="CuivreCable"   material="Aluminium2"  Rio_Z="   0.; 170; 5500"    nbPhi="20" />
+<tubs  name="CuivreCabl0"   material="Aluminium2"  Rio_Z="   0.; 170; 5000"    nbPhi="20" />
+<var  name="SerStart" value="7500"/>
+<var  name="SerZ"     value="-100"/>
+
+<composition  name="services0" > <!-- modified positions to avoid overlap -->	
+    <posXYZ  volume="CuivreCable"    X_Y_Z="    0; 541 ;SerZ"  rot="  0.;90.;0." />
+    <posXYZ  volume="CuivreCable"    X_Y_Z="    0; 181 ;SerZ"  rot="  0.;90.;0." />
+    <posXYZ  volume="CuivreCable"    X_Y_Z="    0;-181 ;SerZ"  rot="  0.;90.;0." />
+    <posXYZ  volume="CuivreCable"    X_Y_Z="    0;-541 ;SerZ"  rot="  0.;90.;0." />
+</composition>
+
+<composition  name="services1" >	
+    <posRPhiZ  volume="services0"    R_Phi_Z=" SerStart; Zero ; Zero"   />
+</composition>
+
+<composition  name="services2" > <!-- modified positions to avoid overlap -->	
+    <posXYZ  volume="CuivreCabl0"    X_Y_Z="  300; 541 ;SerZ"  rot="  0.;90.;0." />
+    <posXYZ  volume="CuivreCabl0"    X_Y_Z="  300; 181 ;SerZ"  rot="  0.;90.;0." />
+    <posXYZ  volume="CuivreCable"    X_Y_Z="    0;-181 ;SerZ"  rot="  0.;90.;0." />
+    <posXYZ  volume="CuivreCable"    X_Y_Z="    0;-541 ;SerZ"  rot="  0.;90.;0." />
+</composition>
+
+<!-- flexible chain sector 9
+
+name       = "Flexible Chain Sector 9-35Volumes"
+version    = "0.0"
+date       = "01.03.2019"
+author     = "Niko Tsutskiridze - Georgian Team" -->
+
+
+<!-- Towing ARM -->
+<box  name="TowingArm_main"     material="ShieldSteel" X_Y_Z=" 263.; 795.; 2480." />
+<box  name="TowingArm_main_Subtr"     material="ShieldSteel" X_Y_Z="250.; 782.; 2500." />
+
+<subtraction  name="TowingArm_Sub" >
+  <posXYZ   volume="TowingArm_main" />
+  <posXYZ   volume="TowingArm_main_Subtr" />
+</subtraction>
+
+<box  name="TowingARM_Plate_main"     material="ShieldSteel" X_Y_Z="102.; 550.; 550." />
+<box  name="TowingARM_Plate_Subtr"     material="ShieldSteel" X_Y_Z="102.; 510.; 510. " />
+
+<subtraction  name="TowingArm_Plate" >
+  <posXYZ   volume="TowingARM_Plate_main" />
+  <posXYZ   volume="TowingARM_Plate_Subtr" X_Y_Z=" 10. ; 0. ; 0. " />
+</subtraction>
+
+<composition  name="TowingArm" >
+  <posXYZ  volume="TowingArm_Sub"   rot="0. ; 0. ; 0." />
+  <posXYZ  volume="TowingArm_Plate"  X_Y_Z="182.6; 0. ; 930. " rot="   0. ; 0. ; 0." />
+</composition>
+<!-- End Towing ARM -->
+
+<!-- Drag Chain -->
+<box  name="DragChain_Main"  material="ShieldSteel" X_Y_Z=" 5555.; 804.; 17.5" />
+<tubs name="DragChain_Tube" material="ShieldSteel" Rio_Z="912.5; 930.; 804." profile="0.; 90." nbPhi="36."/>
+<box  name="DragChain_SmMain" material="ShieldSteel" X_Y_Z=" 17.5; 804.; 275." />
+
+<union name="DragChain" >
+  <posXYZ  volume="DragChain_Main"/>
+  <posXYZ  volume="DragChain_Tube" X_Y_Z="2777.5; 0. ; 921.25 " rot="  270. ; 0. ; 0." />
+  <posXYZ  volume="DragChain_SmMain" X_Y_Z="3698.75; 0. ; 1056.75 "/>
+</union>
+<!-- End Towing ARM -->
+
+<!-- Pipes -->
+<box  name="Pipe_Main"  material="ShieldSteel" X_Y_Z=" 5425.; 439.; 2.05" />
+<tubs name="Pipe_Tube" material="ShieldSteel" Rio_Z="900.; 902.05; 439." profile="0.; 90." nbPhi="36."/>
+<box  name="Pipe_SmMain" material="ShieldSteel" X_Y_Z=" 2.05; 439.; 5114." />
+
+<union name="FCH_Pipes" >
+  <posXYZ  volume="Pipe_Main" X_Y_Z="0.; 0. ; 0. " rot="0. ; 0. ; 0." />
+  <posXYZ  volume="Pipe_Tube" X_Y_Z="2712.5; 0. ; 901.025 " rot="  270. ; 0. ; 0." />
+  <posXYZ  volume="Pipe_SmMain" X_Y_Z="3613.525; 0. ; 3454.025 "/>
+</union>
+<!-- End Pipes -->
+
+<!-- Cables -->
+<box  name="Cable_Main"  material="Copper" X_Y_Z=" 5425.; 720.; 6.7" />
+<tubs name="Cable_Tube" material="Copper" Rio_Z="1013.3; 1020.; 720." profile="0.; 90." nbPhi="36."/>
+<box  name="Cable_SmMain" material="Copper" X_Y_Z=" 6.7; 720.; 2504." />
+
+<union name="FCH_Cable" >
+  <posXYZ  volume="Cable_Main" X_Y_Z="0.; 0. ; 0. " rot="0. ; 0. ; 0." />
+  <posXYZ  volume="Cable_Tube" X_Y_Z="2712.5; 0. ; 1016.65 " rot="  270. ; 0. ; 0." />
+  <posXYZ  volume="Cable_SmMain" X_Y_Z="3729.15; 0. ; 2266.65 "/>
+</union>
+<!-- End Cables -->
+
+<!-- Support -->
+<box  name="Support_MaBox"  material="ShieldSteel" X_Y_Z=" 5230.; 1005.; 750." />
+<box  name="Support_MaCutBox1"  material="ShieldSteel" X_Y_Z=" 5240.; 1005.; 336.9" />
+<box  name="Support_MaCutBox2"  material="ShieldSteel" X_Y_Z=" 5130.; 895.; 760." />
+
+<subtraction  name="Support_Ma" >
+  <posXYZ   volume="Support_MaBox"  />
+  <posXYZ   volume="Support_MaCutBox1" X_Y_Z="0.; 12.6 ; -181.15 " rot=" 0. ; 0. ; 0."/>
+  <posXYZ   volume="Support_MaCutBox1" X_Y_Z="0.; 12.6 ; 181.15 " rot=" 0. ; 0. ; 0."/>
+  <posXYZ   volume="Support_MaCutBox2" X_Y_Z="0.; 0. ; 0. " rot=" 0. ; 0. ; 0."/>
+</subtraction>
+
+<gvxy name="Support_Leg1" material="ShieldSteel" dZ="700.">
+  <gvxy_point X_Y="-50.; -50."/>
+  <gvxy_point X_Y="-50.; -40."/>
+  <gvxy_point X_Y="-6.5; -40."/>
+  <gvxy_point X_Y="-6.5; 40."/>
+  <gvxy_point X_Y="-50.; 40."/>
+  <gvxy_point X_Y="-50.; 50."/>
+  <gvxy_point X_Y="50.; 50."/>
+  <gvxy_point X_Y="50.; 40."/>
+  <gvxy_point X_Y="6.5; 40."/>
+  <gvxy_point X_Y="6.5; -40."/>
+  <gvxy_point X_Y="50.; -40."/>
+  <gvxy_point X_Y="50.; -50."/>
+</gvxy>
+
+<gvxy name="Support_Leg2" material="ShieldSteel" dZ="522.7">
+  <gvxy_point X_Y="-50.; -50."/>
+  <gvxy_point X_Y="-50.; -31.4"/>
+  <gvxy_point X_Y="-9.3; -31.4"/>
+  <gvxy_point X_Y="-9.3; 40."/>
+  <gvxy_point X_Y="-50.; 31.4"/>
+  <gvxy_point X_Y="-50.; 50."/>
+  <gvxy_point X_Y="50.; 50."/>
+  <gvxy_point X_Y="50.; 31.4"/>
+  <gvxy_point X_Y="9.3; 31.4"/>
+  <gvxy_point X_Y="9.3; -31.4"/>
+  <gvxy_point X_Y="50.; -31.4"/>
+  <gvxy_point X_Y="50.; -50."/>
+</gvxy>
+
+<composition  name="FCH_SupportLeg" >
+  <posXYZ  volume="Support_Leg1"  X_Y_Z="0.; 0. ; 0. " rot="0. ; 90. ; 0." />
+  <posXYZ  volume="Support_Leg2"  X_Y_Z="-257.5; 311.36 ; 0. " rot="0. ; 90. ; 90." />
+</composition>
+
+<gvxy name="Support_SidePl1" material="ShieldSteel" dZ="3150.5">
+  <gvxy_point X_Y="150.; 62.5"/>
+  <gvxy_point X_Y="156.; 62.5"/>
+  <gvxy_point X_Y="156.; -62.5"/>
+  <gvxy_point X_Y="-156.; -62.5"/>
+  <gvxy_point X_Y="-156.; 62.5"/>
+  <gvxy_point X_Y="-150.; 62.5"/>
+  <gvxy_point X_Y="-150.; -56.7"/>
+  <gvxy_point X_Y="150.; -57.7"/>
+</gvxy>
+
+<gvxy name="Support_SidePl2" material="ShieldSteel" dZ="2300.">
+  <gvxy_point X_Y="-150.; 812.5"/>
+  <gvxy_point X_Y="-156.; 812.5"/>
+  <gvxy_point X_Y="-156.; 937.5"/>
+  <gvxy_point X_Y="156.; 937.5"/>
+  <gvxy_point X_Y="156.; 812.5"/>
+  <gvxy_point X_Y="150.; 812.5"/>
+  <gvxy_point X_Y="150.; 931.7"/>
+  <gvxy_point X_Y="-150.; 931.7"/>
+</gvxy>
+
+<composition  name="Support_SidePl" >
+  <posXYZ  volume="Support_SidePl1"  X_Y_Z="0.; 0. ; 0. " rot="0. ; 0. ; 0." />
+  <posXYZ  volume="Support_SidePl2"  X_Y_Z="0.; 0. ; 425.25 " rot="0. ; 0. ; 0." />
+</composition>
+
+<gvxy name="Support_SideFrPl1" material="ShieldSteel" dZ="14.">
+  <gvxy_point X_Y="-379.; -329.5"/>
+  <gvxy_point X_Y="-379.; -444.5"/>
+  <gvxy_point X_Y="-928.5; -594.5"/>
+  <gvxy_point X_Y="-1118.5; -594.5"/>
+  <gvxy_point X_Y="-1118.5; -220.5"/>
+  <gvxy_point X_Y="-300.; 594.5"/>
+  <gvxy_point X_Y="300.; 594.5"/>
+  <gvxy_point X_Y="1118.5; -220.5"/>
+  <gvxy_point X_Y="1118.5; -594.5"/>
+  <gvxy_point X_Y="928.5; -594.5"/>
+  <gvxy_point X_Y="379.; -444.5"/>
+  <gvxy_point X_Y="379.; -329.5"/>
+</gvxy>
+
+<box  name="Support_SideFrPl2_Box"  material="ShieldSteel" X_Y_Z=" 431.5; 1054.; 76." />
+<box  name="Support_SideFrPl2_Cut"  material="ShieldSteel" X_Y_Z=" 431.5; 1000.; 80." />
+
+<subtraction  name="Support_SideFrPl2" >
+  <posXYZ   volume="Support_SideFrPl2_Box"  />
+  <posXYZ   volume="Support_SideFrPl2_Cut" X_Y_Z="27.; 0. ; 0. " rot=" 0. ; 0. ; 0."/>
+</subtraction>
+
+<box  name="Support_SideFrPl3_Box"  material="ShieldSteel" X_Y_Z=" 1252.; 100.; 708." />
+<box  name="Support_SideFrPl3_Cut"  material="ShieldSteel" X_Y_Z=" 1252.; 110.; 650." />
+
+<subtraction  name="Support_SideFrPl3" >
+  <posXYZ   volume="Support_SideFrPl3_Box"  />
+  <posXYZ   volume="Support_SideFrPl3_Cut" X_Y_Z="29.; 0. ; 0. " rot=" 0. ; 0. ; 0."/>
+</subtraction>
+
+<composition  name="FCH_Support" >
+  <posXYZ  volume="Support_Ma"  X_Y_Z="0.; 0. ; 0. " rot="0. ; 0. ; 0." />
+  <posXYZ  volume="FCH_SupportLeg"  X_Y_Z="-2283.; -1075.31 ; 333.5 " rot="0. ; 0. ; 0." />
+  <posXYZ  volume="FCH_SupportLeg"  X_Y_Z="-2283.; -1075.31 ; -333.5 " rot="0. ; 0. ; 0." />
+  <posXYZ  volume="Support_SidePl"  X_Y_Z="3636.8; -439.8 ; 2825.25 " rot="0. ; 180. ; 0." />
+  <posXYZ  volume="Support_SidePl"  X_Y_Z="3636.8; -439.8 ; -2825.25 " rot="0. ; 0. ; 0." />
+  <posXYZ  volume="Support_SideFrPl1"  X_Y_Z="3241.3; -500. ; 0. " rot="0. ; 90. ; 90." />
+  <posXYZ  volume="Support_SideFrPl2"  X_Y_Z="3668.55; -2.6 ; 1156.51 " rot="0. ; 0. ; 0." />
+  <posXYZ  volume="Support_SideFrPl2"  X_Y_Z="3668.55; -2.6 ; -1156.51 " rot="0. ; 0. ; 0." />
+  <posXYZ  volume="Support_SideFrPl3"  X_Y_Z="3263.3; 576.92 ; 0. " rot="0. ; 0. ; 0." />
+</composition>
+<!-- End Support -->
+
+<composition  name="FlexibleChainSector9" >
+  <posXYZ  volume="TowingArm"   X_Y_Z="-4469.28; 0. ; 2659.1 " rot="   0. ; 0. ; 0." />
+  <posXYZ  volume="TowingArm"  X_Y_Z="-4469.28; 0. ; -2659.1 " rot="   180. ; 0. ; 0." />
+  <posXYZ  volume="DragChain"  X_Y_Z="-8197.5; 0. ; 222.75 " rot="0. ; 0. ; 0." />
+  <posXYZ  volume="DragChain"  X_Y_Z="-8197.5; 0. ; -222.75 " rot="180. ; 0. ; 0." />
+  <posXYZ  volume="FCH_Pipes"  X_Y_Z="-8090.84; -158.75 ; 194.625 " rot="0. ; 0. ; 0." />
+  <posXYZ  volume="FCH_Pipes"  X_Y_Z="-8090.84; -158.75 ; -194.625 " rot="180. ; 0. ; 0." />
+  <posXYZ  volume="FCH_Cable"  X_Y_Z="-8091.32; -21. ; 79. " rot="0. ; 0. ; 0." />
+  <posXYZ  volume="FCH_Cable"  X_Y_Z="-8091.32; -21. ; -79. " rot="180. ; 0. ; 0." />
+  <posXYZ  volume="FCH_Support"  X_Y_Z="-8103.; 2.5 ; 0. " rot="0. ; 0. ; 0." />
+</composition>
+
+<!-- end of flexible chain sector 9 -->
+
+<!-- flexible chain sector 11 and 15
+
+name       = "41_Vol_-_FlexibleChainSector11-15"
+version    = "0.0"
+date       = "07-06-2019"
+author     = "Niko Tsutskiridze, Davit Shekiladze" -->
+
+<!-- Support -->
+<box   name="Support_BottomPlate"     material="ShieldSteel"  X_Y_Z=" 4300.; 9.5; 506." />
+<box   name="Support_SidesPlates"     material="ShieldSteel"  X_Y_Z=" 4312.; 828.5; 25." />
+<box   name="Support_SidesPlatesCutBox"     material="ShieldSteel"  X_Y_Z=" 1956.; 710.; 30." />
+
+<subtraction name="Support_SidesPlatesSubtr" >
+   <posXYZ  volume="Support_SidesPlates"   X_Y_Z=" 0. ; 0. ; 0.  "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_SidesPlatesCutBox"  X_Y_Z=" -1078. ; -40.75 ; 0. "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_SidesPlatesCutBox"  X_Y_Z=" 1078. ; -40.75 ; 0. "  rot=" 0. ; 0. ; 0. "/>
+</subtraction>
+
+<box   name="Support_MidlPlates"     material="ShieldSteel"  X_Y_Z=" 4312.; 814.9; 20." />
+<box   name="Support_MidlPlatesCutBox"     material="ShieldSteel"  X_Y_Z=" 1954.; 615.; 25." />
+
+<subtraction name="Support_MidlPlatesSubtr" >
+   <posXYZ  volume="Support_MidlPlates"   X_Y_Z=" 0. ; 0. ; 0.  "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_MidlPlatesCutBox"  X_Y_Z=" -1079. ; -0.05 ; 0. "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_MidlPlatesCutBox"  X_Y_Z=" 1079. ; -0.05 ; 0. "  rot=" 0. ; 0. ; 0. "/>
+</subtraction>
+
+<composition name="Support_SidesPlatesM" >
+   <posXYZ  volume="Support_SidesPlatesSubtr"   X_Y_Z=" 0. ; 405.547 ; 265.6  "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_SidesPlatesSubtr"   X_Y_Z=" 0. ; 405.547 ; -265.6  "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_MidlPlatesSubtr"   X_Y_Z=" 0. ; 412.35 ; 0.  "  rot=" 0. ; 0. ; 0. "/>
+</composition>
+
+<gvxy  name="Support_WingPlate"  material="ShieldSteel"  dZ="2287." >
+  <gvxy_point  X_Y=" -114.148; 64.757 " />
+  <gvxy_point  X_Y=" -114.148; -69.961 " />
+  <gvxy_point  X_Y=" -119.041; -69.961 " />
+  <gvxy_point  X_Y=" -119.041; 69.961 " />
+  <gvxy_point  X_Y=" 119.041; 69.961 " />
+  <gvxy_point  X_Y=" 119.041; -69.961 " />
+  <gvxy_point  X_Y=" 114.148; -69.961 " />
+  <gvxy_point  X_Y=" 114.148; 64.757 " />
+</gvxy>
+
+<box   name="Support_WingBox1"     material="ShieldSteel"  X_Y_Z=" 297.155; 896.845; 100." />
+<box   name="Support_WingCutBox1"     material="ShieldSteel"  X_Y_Z=" 238.155; 846.845; 110." />
+
+<subtraction name="Support_WingBox1Subtr" >
+   <posXYZ  volume="Support_WingBox1"   X_Y_Z=" 0. ; 0. ; 0.  "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingCutBox1"  X_Y_Z=" 0. ; 0. ; 0. "  rot=" 0. ; 0. ; 0. "/>
+</subtraction>
+
+
+<box   name="Support_WingBox"     material="ShieldSteel"  X_Y_Z=" 302.155; 901.845; 100." />
+<box   name="Support_WingCutBox"     material="ShieldSteel"  X_Y_Z=" 238.155; 846.845; 110." />
+
+<subtraction name="Support_WingBoxSubtr" >
+   <posXYZ  volume="Support_WingBox"   X_Y_Z=" 0. ; 0. ; 0.  "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingCutBox"  X_Y_Z=" 0. ; 0. ; 0. "  rot=" 0. ; 0. ; 0. "/>
+</subtraction>
+
+<box   name="Support_WingBox2"     material="ShieldSteel"  X_Y_Z=" 291.; 866.094; 100." />
+<box   name="Support_WingCutBox2"     material="ShieldSteel"  X_Y_Z=" 246.155; 821.094; 110." />
+
+<subtraction name="Support_WingBox2Subtr" >
+   <posXYZ  volume="Support_WingBox2"   X_Y_Z=" 0. ; 0. ; 0.  "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingCutBox2"  X_Y_Z=" 0. ; 0. ; 0. "  rot=" 0. ; 0. ; 0. "/>
+</subtraction>
+
+<box   name="Support_WingBox3"     material="ShieldSteel"  X_Y_Z=" 242.; 629.5; 1041." />
+<box   name="Support_WingCutBox3"     material="ShieldSteel"  X_Y_Z=" 217.; 600.; 1050." />
+
+<subtraction name="Support_WingBox3Subtr" >
+   <posXYZ  volume="Support_WingBox3"   X_Y_Z=" 0. ; 0. ; 0.  "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingCutBox3"  X_Y_Z=" 0. ; 0. ; 0. "  rot=" 0. ; 0. ; 0. "/>
+</subtraction>
+
+<composition  name="Support_WingSidepartsLeft" >
+   <posXYZ  volume="Support_WingPlate"    X_Y_Z=" 0. ; 344.027 ; 0." rot=" 0.; 0.;0." />
+   <posXYZ  volume="Support_WingPlate"    X_Y_Z=" 0. ; -344.027 ; 0." rot=" 180.; 0.;0." />
+   <posXYZ  volume="Support_WingBox1Subtr"   X_Y_Z=" 0. ; 0.; 583.5 "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingBoxSubtr"   X_Y_Z=" 0. ; 0.; 1087.5 "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingBoxSubtr"   X_Y_Z=" 0. ; 0.; -133.5 "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingBoxSubtr"   X_Y_Z=" 0. ; 0.; -794.5 "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingBox2Subtr"   X_Y_Z=" 18.6 ; 15.3; 1237.2 "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingBox3Subtr"   X_Y_Z=" -11. ; 3.6; -1744. "  rot=" 0. ; 0. ; 0. "/>
+</composition>
+
+<composition  name="Support_WingSidepartsRight" >
+   <posXYZ  volume="Support_WingPlate"    X_Y_Z=" 0. ; 344.027 ; 0." rot=" 0.; 0.;0." />
+   <posXYZ  volume="Support_WingPlate"    X_Y_Z=" 0. ; -344.027 ; 0." rot=" 180.; 0.;0." />
+   <posXYZ  volume="Support_WingBox1Subtr"   X_Y_Z=" 0. ; 0.; -583.5 "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingBoxSubtr"   X_Y_Z=" 0. ; 0.; -1087.5 "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingBoxSubtr"   X_Y_Z=" 0. ; 0.; 133.5 "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingBoxSubtr"   X_Y_Z=" 0. ; 0.; 794.5 "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingBox2Subtr"   X_Y_Z=" 18.6 ; 15.3; -1237.2 "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingBox3Subtr"   X_Y_Z=" -11. ; 3.6; 1744. "  rot=" 0. ; 0. ; 0. "/>
+</composition>
+
+<box   name="Support_WingCentBottom"     material="ShieldSteel"  X_Y_Z=" 1396.; 795.; 18." />
+
+<tubs   name="Support_WingCentBottomCutTube"  material="ShieldSteel"  Rio_Z=" 0. ; 385. ; 20. "  nbPhi="32" />
+<subtraction name="Support_WingCentBottomCut" >
+   <posXYZ  volume="Support_WingCentBottom"   X_Y_Z=" 0. ; 10. ; 0.  "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingCentBottomCutTube"  X_Y_Z=" 690. ; 292.5 ; 0. "  rot=" 0. ; 0. ; 0. "/>
+   <posXYZ  volume="Support_WingCentBottomCutTube"  X_Y_Z=" -690. ; 292.5 ; 0. "  rot=" 0. ; 0. ; 0. "/>
+</subtraction>
+
+<gvxy  name="Support_WingMiddleTopPlate"  material="ShieldSteel"  dZ="14." >
+  <gvxy_point  X_Y=" -463.; 290.825 " />
+  <gvxy_point  X_Y=" -463.; -290.825 " />
+  <gvxy_point  X_Y=" -563.; -290.825 " />
+  <gvxy_point  X_Y=" -563.; 390.825 " />
+  <gvxy_point  X_Y=" 563.; 390.825 " />
+  <gvxy_point  X_Y=" 563.; -290.825 " />
+  <gvxy_point  X_Y=" 463.; -290.825 " />
+  <gvxy_point  X_Y=" 463.; 290.825 " />
+</gvxy>
+
+<gvxy  name="Support_WingMiddleBackPlate"  material="ShieldSteel"  dZ="100." >
+  <gvxy_point  X_Y=" -263.; 410.525 " />
+  <gvxy_point  X_Y=" -263.; -410.525 " />
+  <gvxy_point  X_Y=" -288.; -410.525 " />
+  <gvxy_point  X_Y=" -288.; 430.525 " />
+  <gvxy_point  X_Y=" 288.; 430.525 " />
+  <gvxy_point  X_Y=" 288.; -410.525 " />
+  <gvxy_point  X_Y=" 263.; -410.525 " />
+  <gvxy_point  X_Y=" 263.; 410.525 " />
+</gvxy>
+
+<composition  name="Support_WingMiddle" >
+    <posXYZ  volume="Support_WingCentBottomCut"  X_Y_Z=" 2690. ; -4.774 ; 0." rot=" 90.; -90.;0."    />
+    <posXYZ  volume="Support_WingMiddleTopPlate"  X_Y_Z=" 3065.32 ; 835.9 ; 0." rot=" 90.; -90.;0."    />
+    <posXYZ  volume="Support_WingMiddleBackPlate"  X_Y_Z=" 2324.5 ; 418.6 ; 0." rot=" 0.; 90.;0."    />
+</composition>
+
+<!-- End Support -->
+
+<!-- Drag Chain-->
+<box name="plate_of_drag_chain1" material="ShieldSteel" X_Y_Z="4639.; 640.; 16."/>
+<tubs name="plate_of_drag_chain2" material="ShieldSteel" Rio_Z="409.; 425.; 640." profile="90.; 90." nbPhi="32"/>
+<box name="plate_of_drag_chain3" material="ShieldSteel" X_Y_Z="16; 640.; 324.5"/>
+
+<composition  name="Drag_Chain_assembly" >
+  <posXYZ  volume="plate_of_drag_chain1"    X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 0."/>
+  <posXYZ  volume="plate_of_drag_chain2"    X_Y_Z="  2319.55; 0.; -417." rot=" 90.; 90.; 0."/>
+  <posXYZ  volume="plate_of_drag_chain3"    X_Y_Z="  2736.5; 0.; -579.3" rot=" 0.; 0.; 0."/>
+</composition>
+
+<composition  name="Drag_Chain" >
+  <posXYZ  volume="Drag_Chain_assembly"    X_Y_Z=" 178.09; 387.39; -134." rot=" 0.; 0.; 0."/>
+  <posXYZ  volume="Drag_Chain_assembly"    X_Y_Z=" 178.09; 387.39; 134." rot=" 180.; 0.; 0."/>
+</composition>
+<!--End Drag Chain-->
+
+<!--  Cable-->
+<box name="plate_of_Cable1" material="Copper" X_Y_Z="4609.; 192.; 16."/>
+<tubs name="plate_of_Cable2" material="Copper" Rio_Z="409.; 425.; 192." profile="90.; 90." nbPhi="32"/>
+<box name="plate_of_Cable3" material="Copper" X_Y_Z="16.; 192.; 3282."/>
+
+<composition  name="Cable_assembly" >
+  <posXYZ  volume="plate_of_Cable1"    X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 0."/>
+  <posXYZ  volume="plate_of_Cable2"    X_Y_Z="  2304.55; 0; -417." rot=" 90.; 90.; 0."/>
+  <posXYZ  volume="plate_of_Cable3"    X_Y_Z="  2721.5; 0.; -2058.05" rot=" 0.; 0.; 0."/>
+</composition>
+
+<composition  name="Cable" >
+  <posXYZ  volume="Cable_assembly"    X_Y_Z=" 163.09; 554.39;  -180." rot=" 0.; 0.; 0."/>
+  <posXYZ  volume="Cable_assembly"    X_Y_Z=" 163.09; 554.39;  180." rot=" 180.; 0.; 0."/>
+</composition>
+<!--End  Cable-->
+
+<!--  Pipes-->
+<box name="plate_of_Pipes1" material="ShieldSteel" X_Y_Z="4609.; 240.; 16."/>
+<tubs name="plate_of_Pipes2" material="ShieldSteel" Rio_Z="409.; 425.; 240." profile="90.; 90." nbPhi="32"/>
+<box name="plate_of_Pipes3" material="ShieldSteel" X_Y_Z="16.; 240.; 3282."/>
+
+<composition  name="Pipes_assembly" >
+  <posXYZ  volume="plate_of_Pipes1"    X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 0."/>
+  <posXYZ  volume="plate_of_Pipes2"    X_Y_Z="  2304.55; 0.; -417." rot=" 90.; 90.; 0."/>
+  <posXYZ  volume="plate_of_Pipes3"    X_Y_Z="  2721.5; 0.; -2058.05" rot=" 0.; 0.; 0."/>
+</composition>
+
+<composition  name="Pipes" >
+  <posXYZ  volume="Pipes_assembly"    X_Y_Z=" 163.09; 287.39;  180." rot=" 180.; 0.; 0."/>
+  <posXYZ  volume="Pipes_assembly"    X_Y_Z=" 163.09; 287.39;  -180." rot=" 0.; 0.; 0."/>
+</composition>
+<!--End Pipes-->
+
+<composition  name="Flexible_Chain_Sector11-15" >
+     <posXYZ  volume="Support_BottomPlate"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+     <posXYZ  volume="Support_SidesPlatesM"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+     <posXYZ  volume="Support_WingSidepartsLeft"  X_Y_Z=" 2913.853 ; 402.7 ; -1985.5" rot=" 0.; 0.; 0."  />
+     <posXYZ  volume="Support_WingSidepartsRight"  X_Y_Z=" 2913.853 ; 402.7 ; 1985.5" rot=" 0.; 0.; 0."  />
+     <posXYZ  volume="Support_WingMiddle"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+     <posXYZ  volume="Drag_Chain"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+     <posXYZ  volume="Cable"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+     <posXYZ  volume="Pipes"    X_Y_Z=" 0. ; 0. ; 0." rot=" 0.; 0.;0." />
+</composition>
+
+<composition  name="FlexibleChainSector11-15" >
+     <posXYZ  volume="Flexible_Chain_Sector11-15"    X_Y_Z=" -5446.554 ; -5631.994 ; 0." rot=" 0.; 0.;45." />
+     <posXYZ  volume="Flexible_Chain_Sector11-15"    X_Y_Z=" 5446.554 ; -5631.994 ; 0." rot=" 0.; 180.; -45." />
+</composition>
+
+<!-- end of flexible chain sector 11 and 15 -->
+
+<composition  name="servicesAtZ0" >
+   <posXYZ    volume="EMCaloPipeI"    X_Y_Z="  Zero;  7000 ; Zero"  rot=" 90.; 0.;0." />
+   <posXYZ    volume="EMCaloPipeO"    X_Y_Z="  Zero; -5000 ;  100"  rot=" 90.; 0.;0." />
+   <posXYZ    volume="services1"      X_Y_Z="  Zero;  Zero ; Zero"  rot="  0.; 0.;0." />
+   <posRPhiZ  volume="services1"      R_Phi_Z="Zero;    45 ; Zero"  rot="  0.; 0.;0." />
+   <posRPhiZ  volume="services1"      R_Phi_Z="Zero;   135 ; Zero"  rot="  0.; 0.;0." />
+   <posXYZ volume="FlexibleChainSector9"  X_Y_Z="0;0;0"   rot="0;0;0"/>
+   <posXYZ volume="FlexibleChainSector11-15"  X_Y_Z="0;0;0"   rot="0;0;0"/>
+</composition>
+</section>
+
+<section name       = "AccessPlatforms"
+         version    = "7.0"
+         date       = "21 Mar 2005"
+         author     = "Laurent Chevalier, Daniel Pomarede"
+         top_volume = "MBAP_AccessPlatform">
+
+
+<!--     name       =  AccessPlatforms               section name       = "Services"  -->
+<!--  **************************************************************
+      **************************************************************
+      ***                                                       ****
+      ***     ATLAS Access : Muon Barrel Access Platforms       ****
+      ***                                                       ****
+      **************************************************************
+      **************************************************************  -->
+<!--  Design from ATLHXT__0001 -->
+
+<!--  Platform 1-2 positioned between Strut 1 and Strut 2  -->
+<!--  Platform 2-3 positioned between Strut 2 and Strut 3  -->
+<!--  Platform 3-4 positioned between Strut 3 and Strut 4  -->
+
+<!--  Platform dimensions  -->
+<var  name="MBAP_P12s1dz1"  value="3000." />
+<var  name="MBAP_P12s1dz2"  value="2500." />
+<var  name="MBAP_P23s1dz1"  value="2700." />
+<var  name="MBAP_P23s1dz2"  value="2200." />
+<var  name="MBAP_P34s1dz1"  value="2200." />
+<var  name="MBAP_P34s1dz2"  value="1700." />
+
+<var  name="MBAP_P14s3dz"   value="8600." />
+<var  name="MBAP_P14s3dx"   value=" 540." />
+
+<var  name="MBAP_PLAs1dx1"  value="1225." />
+<var  name="MBAP_PLAs1dx2"  value=" 600." />
+<var  name="MBAP_PFLhe"     value="  1.5" />
+
+<!--  Platform positions  -->
+<!--  sector 1 & 9  -->
+<var  name="MBAP_Ps01posx"  value=" 7800." />
+<var  name="MBAP_Ps01posy"  value="-1200." />
+<!--  sector 11 & 15  -->
+<var  name="MBAP_Ps11posx"  value=" 5000." />
+<var  name="MBAP_Ps11posy"  value="-6500." />
+<!--  sector 3 & 7  -->
+<var  name="MBAP_Ps14posx"  value=" 6730." />
+<var  name="MBAP_Ps14posy"  value=" 5300." />
+<var  name="MBAP_Ps14angz"  value="   45." />
+
+<var  name="MBAP_P12posz"   value=" 3425."   />  <!-- ??? could use (ABRT_Zvouss(5)+ABRT_Zvouss(6))/2. ??? -->
+<var  name="MBAP_P23posz"   value=" 6691.25" />  <!-- ??? could use (ABRT_Zvouss(6)+ABRT_Zvouss(7))/2. ??? -->
+<var  name="MBAP_P34posz"   value=" 9545."   />  <!-- ??? could use (ABRT_Zvouss(7)+ABRT_Zvouss(8))/2. ??? -->
+
+<!--  Useful variables  -->
+<var  name="MBAP_xyzref"    value="    0.  " />
+
+<!--  Modelization of floor of Platform -->
+
+<var  name="MBAP_PFL12xa" value="MBAP_P12s1dz1/2." />
+<var  name="MBAP_PFL23xa" value="MBAP_P23s1dz1/2." />
+<var  name="MBAP_PFL34xa" value="MBAP_P34s1dz1/2." />
+<var  name="MBAP_PFLya"   value="MBAP_xyzref" />
+
+<var  name="MBAP_PFL12xb" value="MBAP_PFL12xa" />
+<var  name="MBAP_PFL23xb" value="MBAP_PFL23xa" />
+<var  name="MBAP_PFL34xb" value="MBAP_PFL34xa" />
+<var  name="MBAP_PFLyb"   value="MBAP_PLAs1dx2" />
+
+<var  name="MBAP_PFL12xc" value="MBAP_P12s1dz2/2." />
+<var  name="MBAP_PFL23xc" value="MBAP_P23s1dz2/2." />
+<var  name="MBAP_PFL34xc" value="MBAP_P34s1dz2/2." />
+<var  name="MBAP_PFLyc"   value="MBAP_PFLyb" />
+
+<var  name="MBAP_PFL12xd" value="MBAP_PFL12xc" />
+<var  name="MBAP_PFL23xd" value="MBAP_PFL23xc" />
+<var  name="MBAP_PFL34xd" value="MBAP_PFL34xc" />
+<var  name="MBAP_PFLyd"   value="MBAP_PLAs1dx1-GENV_Eps" />
+
+<!--  sector 1 & 9  -->
+
+<gvxysx name="MBAP_PlatformFloor12s1s9"    material="Aluminium4"   dZ="MBAP_PFLhe"  >
+  <gvxy_point X_Y="MBAP_PFL12xa;MBAP_PFLya"/>
+  <gvxy_point X_Y="MBAP_PFL12xb;MBAP_PFLyb"/>
+  <gvxy_point X_Y="MBAP_PFL12xc;MBAP_PFLyc"/>
+  <gvxy_point X_Y="MBAP_PFL12xd;MBAP_PFLyd"/>
+</gvxysx>
+
+<gvxysx name="MBAP_PlatformFloor23s1s9"    material="Aluminium4"   dZ="MBAP_PFLhe"  >
+  <gvxy_point X_Y="MBAP_PFL23xa;MBAP_PFLya"/>
+  <gvxy_point X_Y="MBAP_PFL23xb;MBAP_PFLyb"/>
+  <gvxy_point X_Y="MBAP_PFL23xc;MBAP_PFLyc"/>
+  <gvxy_point X_Y="MBAP_PFL23xd;MBAP_PFLyd"/>
+</gvxysx>
+
+<gvxysx name="MBAP_PlatformFloor34s1s9"    material="Aluminium4"   dZ="MBAP_PFLhe"  >
+  <gvxy_point X_Y="MBAP_PFL34xa;MBAP_PFLya"/>
+  <gvxy_point X_Y="MBAP_PFL34xb;MBAP_PFLyb"/>
+  <gvxy_point X_Y="MBAP_PFL34xc;MBAP_PFLyc"/>
+  <gvxy_point X_Y="MBAP_PFL34xd;MBAP_PFLyd"/>
+</gvxysx>
+
+<!--  sector 11 & 15  -->
+
+<gvxysx name="MBAP_PlatformFloor12s11s15"  material="Aluminium4"   dZ="MBAP_PFLhe"  >
+  <gvxy_point X_Y="MBAP_PFL12xa;MBAP_PFLya"/>
+  <gvxy_point X_Y="MBAP_PFL12xa;MBAP_PFLyd"/>
+</gvxysx>
+
+<gvxysx name="MBAP_PlatformFloor23s11s15"  material="Aluminium4"   dZ="MBAP_PFLhe"  >
+  <gvxy_point X_Y="MBAP_PFL23xa;MBAP_PFLya"/>
+  <gvxy_point X_Y="MBAP_PFL23xa;MBAP_PFLyd"/>
+</gvxysx>
+
+<gvxysx name="MBAP_PlatformFloor34s11s15"  material="Aluminium4"   dZ="MBAP_PFLhe"  >
+  <gvxy_point X_Y="MBAP_PFL34xa;MBAP_PFLya"/>
+  <gvxy_point X_Y="MBAP_PFL34xa;MBAP_PFLyd"/>
+</gvxysx>
+
+<!--  sector 3 & 7  -->
+
+<box name="MBAP_PlatformFloor14s3s7"  material="Aluminium4"   X_Y_Z="MBAP_P14s3dx;MBAP_PFLhe;MBAP_P14s3dz"  />
+     
+<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+<!--  Modelization of rambarde of Platforms 1-2, 2-3, 3-4 -->
+
+<!--  Primary variables -->
+
+<!-- Tubes radii -->
+<var  name="MBAP_PlatRaRo"   value="  17." />
+
+<!--  Slanted Support for Platform 1-4 sector 3 & 7   -->
+<!--  dimensions  -->
+<var  name="MBAP_PSSs3dy1"   value=" 242.5"/>
+<var  name="MBAP_PSSs3dy2"   value=" 393." />
+<var  name="MBAP_PSSs3dx1"   value=" 393." />
+
+<!--  absolute positions  -->
+<var  name="MBAP_PSSs3zp1"   value=" 1975. " /> <!-- could use ABRT_Zvouss(5) + 200 + 62.5 , see ATLHXT__0001 -->
+<var  name="MBAP_PSSs3zp6"   value="10582.5" /> <!-- could use ABRT_Zvouss(8) - 200 - 62.5 , see ATLHXT__0001 -->
+
+<!--  Relative positions of Slanted Supports  -->
+<var  name="MBAP_PSSzrp6"    value="MBAP_PSSs3zp6-MBAP_PSSs3zp1" />
+
+<!-- Bottom Frame Tube angle -->
+<var  name="MBAP_P14s3BFa"   value="-atan(MBAP_PSSs3dy2/MBAP_PSSs3dx1)/GENV_PiS180" />
+
+<!-- Floor Position, angle w.r.t Frame -->
+<var  name="MBAP_P14s3Fla"   value="MBAP_P14s3BFa" />
+<var  name="MBAP_P14s3Flx"   value="-(MBAP_PSSs3dy1+MBAP_PSSs3dy2/2.)+(MBAP_PlatRaRo+MBAP_PFLhe/2.)*cos(MBAP_P14s3Fla*GENV_PiS180)" />
+<var  name="MBAP_P14s3Fly"   value="MBAP_PSSs3dx1/2.+(MBAP_PlatRaRo+MBAP_PFLhe/2.)*cos(MBAP_P14s3Fla*GENV_PiS180)" />
+<var  name="MBAP_P14s3Flz"   value="MBAP_PSSzrp6/2." />
+
+<!--  Primary variables -->
+
+<!--  Supporting Frame  -->
+<!--  longitudinal and transverse beams  -->
+
+<var  name="AP13_SFBeamTh"   value="  8."/>  <!--  Thickness  -->
+<var  name="AP13_SFBeamHe"   value=" 50."/>  <!--  Height  -->
+<var  name="AP13_SFBeamDx"   value="100."/>  <!--  Transverse Size (X-wise) -->
+ 
+<!--  Frame 12 (connect BT strut 1 - strut 2) -->
+
+<!-- Longitudinal and Transverse beam length / cf ATLHXT__0032  -->
+<var  name="AP13_Fr34Llen"   value="2400."/>
+
+<!--  Longitudinal and Transverse Positions -->
+<var  name="AP13_Fr23xsp1"   value="2160."/> <!--  separation of longitudinal beams along x -->
+<var  name="AP13_Fr34Tzof"   value=" 615."/> <!--  offset transverse beams along z -->
+<var  name="AP13_Fr34Tzsp"   value=" 840."/> <!--  separation of transverse beams along z -->
+
+<!--  Y-position -->
+<var  name="AP13_Fr12y"      value="-9190."/>
+
+<!--  Modelization of beam -->
+<var  name="AP13_SFBeamXa"   value="AP13_SFBeamDx/2."/>
+<var  name="AP13_SFBeamYa"   value="0."/>
+<var  name="AP13_SFBeamXb"   value="AP13_SFBeamXa"/>
+<var  name="AP13_SFBeamYb"   value="AP13_SFBeamHe"/>
+<var  name="AP13_SFBeamXc"   value="AP13_SFBeamXa-AP13_SFBeamTh"/>
+<var  name="AP13_SFBeamYc"   value="AP13_SFBeamYb"/>
+<var  name="AP13_SFBeamXd"   value="AP13_SFBeamXc"/>
+<var  name="AP13_SFBeamYd"   value="AP13_SFBeamYa+AP13_SFBeamTh"/>
+
+<!--  Positions of beams -->
+<var  name="AP13_Fr23x1"   value="AP13_Fr23xsp1/2.+AP13_SFBeamDx/2."/>
+<var  name="AP13_Fr12Typ"  value="-AP13_SFBeamHe"/> <!--  Transversal beam y position --> 
+<var  name="AP13_Fr34Tz1"  value="-AP13_Fr34Llen/2.+ AP13_Fr34Tzof +AP13_SFBeamDx/2."/> <!--  Transversal beam z position --> 
+<var  name="AP13_Fr34Tz2"  value="AP13_Fr34Tz1  + AP13_Fr34Tzsp -AP13_SFBeamDx"/> <!--  Transversal beam z position --> 
+
+<var  name="PL05"   value="2200."/>
+<var  name="DZS5"   value="3000."/>
+
+<gvxysx name="MBAP_Sector05_Beam12Transversal" material="Aluminium" dZ="DZS5">
+  <gvxy_point X_Y="AP13_SFBeamXa;AP13_SFBeamYa"/>
+  <gvxy_point X_Y="AP13_SFBeamXb;AP13_SFBeamYb"/>
+  <gvxy_point X_Y="AP13_SFBeamXc;AP13_SFBeamYc"/>
+  <gvxy_point X_Y="AP13_SFBeamXd;AP13_SFBeamYd"/>
+</gvxysx>
+
+<gvxysx name="MBAP_Sector05_Beam34Longitudinal" material="Aluminium" dZ="PL05">
+  <gvxy_point X_Y="AP13_SFBeamXa;AP13_SFBeamYa"/>
+  <gvxy_point X_Y="AP13_SFBeamXb;AP13_SFBeamYb"/>
+  <gvxy_point X_Y="AP13_SFBeamXc;AP13_SFBeamYc"/>
+  <gvxy_point X_Y="AP13_SFBeamXd;AP13_SFBeamYd"/>
+</gvxysx>
+
+<!-- NEw simplify Platforms lc 24-03-10 -->
+
+<!--  sector 3 & 7  -->
+<composition name="MBAP_AccessPlatform14s3s7AssemblyS">
+  <posXYZ volume="MBAP_PlatformFloor14s3s7" X_Y_Z="MBAP_P14s3Flx;MBAP_P14s3Fly;MBAP_P14s3Flz" rot="0.;0.;MBAP_P14s3Fla"/>
+</composition>
+<composition name="MBAP_AccessPlatform14s3s7AssemblySymS">
+  <posXYZ volume="MBAP_PlatformFloor14s3s7" X_Y_Z="MBAP_P14s3Flx;MBAP_P14s3Fly;-MBAP_P14s3Flz" rot="0.;0.;MBAP_P14s3Fla"/>
+</composition>
+<composition name="MBAP_AccessPlatform14s3s7_zplusS">
+  <posXYZ volume="MBAP_AccessPlatform14s3s7AssemblyS"   X_Y_Z=" MBAP_Ps14posx;MBAP_Ps14posy; MBAP_PSSs3zp1" rot="0.;  0.; MBAP_Ps14angz"/>
+</composition>
+<composition name="MBAP_AccessPlatform14s3s7Sym_zplusS">
+  <posXYZ volume="MBAP_AccessPlatform14s3s7AssemblySymS"   X_Y_Z=" MBAP_Ps14posx;MBAP_Ps14posy; -MBAP_PSSs3zp1" rot="0.;  0.; MBAP_Ps14angz"/>
+</composition>
+<composition name="MBAP_AccessPlatform14s3s7_zminusS">
+  <posXYZ volume="MBAP_AccessPlatform14s3s7AssemblyS"   X_Y_Z="-MBAP_Ps14posx;MBAP_Ps14posy;-MBAP_PSSs3zp1" rot="0.;180.;-MBAP_Ps14angz"/>
+</composition>
+<composition name="MBAP_AccessPlatform14s3s7Sym_zminusS">
+  <posXYZ volume="MBAP_AccessPlatform14s3s7AssemblySymS"   X_Y_Z="-MBAP_Ps14posx;MBAP_Ps14posy;MBAP_PSSs3zp1" rot="0.;180.;-MBAP_Ps14angz"/>
+</composition>
+
+
+<box name="MBAP_PlatformFloorS"  material="Aluminium4"   X_Y_Z="DZS5;MBAP_PFLhe;2*AP13_Fr23x1-65"  />
+<composition name="MBAP_Sector05_Platform2">
+  <posXYZ volume="MBAP_Sector05_Beam34Longitudinal" X_Y_Z=" AP13_Fr23x1;2.*MBAP_PFLhe;0." />
+  <posXYZ volume="MBAP_Sector05_Beam34Longitudinal" X_Y_Z="-AP13_Fr23x1;2.*MBAP_PFLhe;0." />
+  <posXYZ volume="MBAP_Sector05_Beam12Transversal" X_Y_Z="0.;AP13_Fr12Typ; AP13_Fr34Tz1" rot="0.;90.;0." />
+  <posXYZ volume="MBAP_Sector05_Beam12Transversal" X_Y_Z="0.;AP13_Fr12Typ; AP13_Fr34Tz2" rot="0.;90.;0." />
+   <posXYZ volume="MBAP_PlatformFloorS"  X_Y_Z="0.;MBAP_PFLhe+0.1;0."  />
+</composition>
+
+<var  name="AP05"   value="5370."/>
+
+<composition name="MBAP_Sector05S">
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP05; +5900"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP05; +1500."/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP05; +3700"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP05; -5900"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP05; -1500"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP05; -3700"/>
+</composition>
+
+<var  name="AP05_MS"   value="7650.1"/>
+<composition name="MBAP_Sector05_MediumS">
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP05_MS; +8100"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP05_MS; +5900"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP05_MS; +1500."/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP05_MS; +3700"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP05_MS; -5900"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP05_MS; -8100"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP05_MS; -1500"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP05_MS; -3700"/>
+</composition>
+
+<var  name="AP13_MS"   value="-6700."/>
+<composition name="MBAP_Sector13_MediumS">
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP13_MS; +8100"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP13_MS; +5900"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP13_MS; +1500."/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP13_MS; +3700"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP13_MS; -5900"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP13_MS; -8100"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP13_MS; -1500"/>
+  <posXYZ volume="MBAP_Sector05_Platform2" X_Y_Z="0.;AP13_MS; -3700"/>
+</composition>
+
+<gvxysx name="MBAP_Sector13_Beam12Transversal2" material="Aluminium" dZ="5000.">
+  <gvxy_point X_Y="AP13_SFBeamXa;AP13_SFBeamYa"/>
+  <gvxy_point X_Y="AP13_SFBeamXb;AP13_SFBeamYb"/>
+  <gvxy_point X_Y="AP13_SFBeamXc;AP13_SFBeamYc"/>
+  <gvxy_point X_Y="AP13_SFBeamXd;AP13_SFBeamYd"/>
+</gvxysx>
+<gvxysx name="MBAP_Sector13_Beam34Longitudinal2" material="Aluminium" dZ="5000">
+  <gvxy_point X_Y="AP13_SFBeamXa;AP13_SFBeamYa"/>
+  <gvxy_point X_Y="AP13_SFBeamXb;AP13_SFBeamYb"/>
+  <gvxy_point X_Y="AP13_SFBeamXc;AP13_SFBeamYc"/>
+  <gvxy_point X_Y="AP13_SFBeamXd;AP13_SFBeamYd"/>
+</gvxysx>
+<gvxysx name="MBAP_Sector13_Beam34Longitudinal3" material="Aluminium" dZ="6000">
+  <gvxy_point X_Y="AP13_SFBeamXa;AP13_SFBeamYa"/>
+  <gvxy_point X_Y="AP13_SFBeamXb;AP13_SFBeamYb"/>
+  <gvxy_point X_Y="AP13_SFBeamXc;AP13_SFBeamYc"/>
+  <gvxy_point X_Y="AP13_SFBeamXd;AP13_SFBeamYd"/>
+</gvxysx>
+<box name="MBAP_PlatformFloorS2"  material="Aluminium4"   X_Y_Z="DZS5+1700;MBAP_PFLhe; 6000."  />
+<composition name="MBAP_Sector13_Platform3">
+  <posXYZ volume="MBAP_Sector13_Beam34Longitudinal3" X_Y_Z=" AP13_Fr23x1;2.*MBAP_PFLhe;0." />
+  <posXYZ volume="MBAP_Sector13_Beam34Longitudinal3" X_Y_Z="-AP13_Fr23x1;2.*MBAP_PFLhe;0." />
+  <posXYZ volume="MBAP_Sector13_Beam12Transversal2" X_Y_Z="0.;AP13_Fr12Typ; AP13_Fr34Tz1" rot="0.;90.;0." />
+  <posXYZ volume="MBAP_Sector13_Beam12Transversal2" X_Y_Z="0.;AP13_Fr12Typ; AP13_Fr34Tz2" rot="0.;90.;0." />
+   <posXYZ volume="MBAP_PlatformFloorS2"  X_Y_Z="0.;MBAP_PFLhe;0."  />
+</composition>
+<box name="MBAP_PlatformFloorS3"  material="Aluminium4"   X_Y_Z="DZS5+1700;MBAP_PFLhe; 4900."  />
+<composition name="MBAP_Sector13_Platform2">
+  <posXYZ volume="MBAP_Sector13_Beam34Longitudinal2" X_Y_Z=" AP13_Fr23x1;2.*MBAP_PFLhe;0." />
+  <posXYZ volume="MBAP_Sector13_Beam34Longitudinal2" X_Y_Z="-AP13_Fr23x1;2.*MBAP_PFLhe;0." />
+  <posXYZ volume="MBAP_Sector13_Beam12Transversal2" X_Y_Z="0.;AP13_Fr12Typ; AP13_Fr34Tz1" rot="0.;90.;0." />
+  <posXYZ volume="MBAP_Sector13_Beam12Transversal2" X_Y_Z="0.;AP13_Fr12Typ; AP13_Fr34Tz2" rot="0.;90.;0." />
+   <posXYZ volume="MBAP_PlatformFloorS3"  X_Y_Z="0.;MBAP_PFLhe;0."  />
+</composition>
+
+<composition name="MBAP_Sector13S">
+  <posXYZ volume="MBAP_Sector13_Platform3" X_Y_Z="0.;AP13_Fr12y; +9300"/>
+  <posXYZ volume="MBAP_Sector13_Platform2" X_Y_Z="0.;AP13_Fr12y; +3000"/>
+  <posXYZ volume="MBAP_Sector13_Platform2" X_Y_Z="0.;AP13_Fr12y; -2650"/>
+  <posXYZ volume="MBAP_Sector13_Platform3" X_Y_Z="0.;AP13_Fr12y; -9300"/>
+</composition>
+
+
+<composition name="MBAP_AccessPlatform">
+
+<!--  sector 1 & 9  -->
+
+  <posXYZ volume="MBAP_PlatformFloor12s1s9" X_Y_Z=" MBAP_Ps01posx;MBAP_Ps01posy; MBAP_P12posz" rot="90.; 90.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor23s1s9" X_Y_Z=" MBAP_Ps01posx;MBAP_Ps01posy; MBAP_P23posz" rot="90.; 90.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor34s1s9" X_Y_Z=" MBAP_Ps01posx;MBAP_Ps01posy; MBAP_P34posz" rot="90.; 90.;0."/>
+
+  <posXYZ volume="MBAP_PlatformFloor12s1s9" X_Y_Z=" MBAP_Ps01posx;MBAP_Ps01posy;-MBAP_P12posz" rot="90.; 90.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor23s1s9" X_Y_Z=" MBAP_Ps01posx;MBAP_Ps01posy;-MBAP_P23posz" rot="90.; 90.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor34s1s9" X_Y_Z=" MBAP_Ps01posx;MBAP_Ps01posy;-MBAP_P34posz" rot="90.; 90.;0."/>
+
+  <posXYZ volume="MBAP_PlatformFloor12s1s9" X_Y_Z="-MBAP_Ps01posx;MBAP_Ps01posy; MBAP_P12posz" rot="90.;270.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor23s1s9" X_Y_Z="-MBAP_Ps01posx;MBAP_Ps01posy; MBAP_P23posz" rot="90.;270.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor34s1s9" X_Y_Z="-MBAP_Ps01posx;MBAP_Ps01posy; MBAP_P34posz" rot="90.;270.;0."/>
+
+  <posXYZ volume="MBAP_PlatformFloor12s1s9" X_Y_Z="-MBAP_Ps01posx;MBAP_Ps01posy;-MBAP_P12posz" rot="90.;270.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor23s1s9" X_Y_Z="-MBAP_Ps01posx;MBAP_Ps01posy;-MBAP_P23posz" rot="90.;270.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor34s1s9" X_Y_Z="-MBAP_Ps01posx;MBAP_Ps01posy;-MBAP_P34posz" rot="90.;270.;0."/>
+
+<!--  sector 11 & 15  -->
+
+  <posXYZ volume="MBAP_PlatformFloor12s11s15" X_Y_Z=" MBAP_Ps11posx;MBAP_Ps11posy; MBAP_P12posz" rot="90.; 90.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor23s11s15" X_Y_Z=" MBAP_Ps11posx;MBAP_Ps11posy; MBAP_P23posz" rot="90.; 90.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor34s11s15" X_Y_Z=" MBAP_Ps11posx;MBAP_Ps11posy; MBAP_P34posz" rot="90.; 90.;0."/>
+
+  <posXYZ volume="MBAP_PlatformFloor12s11s15" X_Y_Z=" MBAP_Ps11posx;MBAP_Ps11posy;-MBAP_P12posz" rot="90.; 90.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor23s11s15" X_Y_Z=" MBAP_Ps11posx;MBAP_Ps11posy;-MBAP_P23posz" rot="90.; 90.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor34s11s15" X_Y_Z=" MBAP_Ps11posx;MBAP_Ps11posy;-MBAP_P34posz" rot="90.; 90.;0."/>
+
+  <posXYZ volume="MBAP_PlatformFloor12s11s15" X_Y_Z="-MBAP_Ps11posx;MBAP_Ps11posy; MBAP_P12posz" rot="90.;270.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor23s11s15" X_Y_Z="-MBAP_Ps11posx;MBAP_Ps11posy; MBAP_P23posz" rot="90.;270.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor34s11s15" X_Y_Z="-MBAP_Ps11posx;MBAP_Ps11posy; MBAP_P34posz" rot="90.;270.;0."/>
+
+  <posXYZ volume="MBAP_PlatformFloor12s11s15" X_Y_Z="-MBAP_Ps11posx;MBAP_Ps11posy;-MBAP_P12posz" rot="90.;270.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor23s11s15" X_Y_Z="-MBAP_Ps11posx;MBAP_Ps11posy;-MBAP_P23posz" rot="90.;270.;0."/>
+  <posXYZ volume="MBAP_PlatformFloor34s11s15" X_Y_Z="-MBAP_Ps11posx;MBAP_Ps11posy;-MBAP_P34posz" rot="90.;270.;0."/>
+
+<!--  sector 3 & 7  -->
+  <posXYZ volume="MBAP_AccessPlatform14s3s7_zplusS"           />
+  <posXYZ volume="MBAP_AccessPlatform14s3s7Sym_zplusS"        />
+  <posXYZ volume="MBAP_AccessPlatform14s3s7_zminusS"          />
+  <posXYZ volume="MBAP_AccessPlatform14s3s7Sym_zminusS"       />
+
+
+<!--  Access Platform Sector 13 Bottom Level -->
+  <posXYZ volume="MBAP_Sector13S"           />
+  <posXYZ volume="MBAP_Sector13_MediumS"    />
+<!--  Access Platform Sector 05 Top    Level -->
+  <posXYZ volume="MBAP_Sector05S"           />
+  <posXYZ volume="MBAP_Sector05_MediumS"    />
+  
+</composition>
+
+</section>
+<section name       = "MDT Big Wheel"
+         version    = "7.0"
+         date       = "11 Oct 2005"
+         author     = "Daniel Pomarede"
+         top_volume = "MBWH_BigWheels">
+
+
+<!--     name       =  MDT Big Wheel                 section name       = "Supports"  -->
+<!--  **************************************************************
+      **************************************************************
+      ***                                                       ****
+      ***                      MDT Big Wheel                    ****
+      ***                                                       ****
+      **************************************************************
+      **************************************************************  -->
+
+
+
+
+<var  name="MBWH_zposL" value="13950" />
+
+
+
+
+<!--  
+      **************************************************************
+      ***                                                       ****
+      ***                    common items                       ****
+      ***                                                       ****
+      **************************************************************
+-->
+
+
+<!--  Cut profiles cross bracing large and small sector -->
+<!--  ATLMHHBM0091 & ATLMHHBM0100-->
+<var  name="MBWH_CBext" value="200"/>
+<var  name="MBWH_CBhei" value="60"/>
+
+<!--  Spokes U profile -->
+
+<!--  ATLMHHBM0130 & ATLMHHBM0085 & ATLMHHBM0086 & ATLMHHBM0087 -->
+
+<var  name="MBWH_SUPthi"  value="   5." />
+<var  name="MBWH_SUPext"  value=" 230." />
+<var  name="MBWH_SUPhei"  value="  55." />
+
+<!--  Spokes Reinforcing bar -->
+
+<!--  ATLMHHBM0082A & ATLMHHBM0051A & ATLMHHBM0154A  -->
+
+<!--  Slate -->
+<var  name="MBWH_RBSlen" value="1080"/>
+<var  name="MBWH_RBSwid" value="100"/>
+<var  name="MBWH_RBSthi" value="25"/>
+<!--  Bracket -->
+<var  name="MBWH_RBBlen" value="200"/>
+<var  name="MBWH_RBBsiz" value="60"/>
+<var  name="MBWH_RBBthi" value="10"/>
+
+<!--  holes spacing for clamping Reinforcing bar on spokes -->
+<!--  ATLMHHBM0130 & ATLMHHBM0085 -->
+<var name="MBWH_SRBhos" value="160" />
+
+<!--  Plates of Cross Bracings --> 
+<var  name="MBWH_CBPth" value="8"/>    <!-- thickness -->
+
+<!--  Derived variables -->
+<var  name="MBWH_RBBxa" value="0"/>
+<var  name="MBWH_RBBya" value="0"/>
+<var  name="MBWH_RBBxb" value="MBWH_RBBsiz"/>
+<var  name="MBWH_RBByb" value="MBWH_RBBya"/>
+<var  name="MBWH_RBBxc" value="MBWH_RBBxb"/>
+<var  name="MBWH_RBByc" value="MBWH_RBBsiz"/>
+<var  name="MBWH_RBBxd" value="MBWH_RBBxc-MBWH_RBBthi"/>
+<var  name="MBWH_RBByd" value="MBWH_RBByc"/>
+<var  name="MBWH_RBBxe" value="MBWH_RBBxd"/>
+<var  name="MBWH_RBBye" value="MBWH_RBBthi"/>
+<var  name="MBWH_RBBxf" value="MBWH_RBBxa"/>
+<var  name="MBWH_RBByf" value="MBWH_RBBye"/>
+
+<var  name="MBWH_RBBxp"  value="-MBWH_RBSlen/2.+MBWH_RBBsiz"/>
+<var  name="MBWH_RBByp1" value="-MBWH_RBSthi/2.-MBWH_RBBsiz"/>
+<var  name="MBWH_RBByp2" value="MBWH_RBSthi/2."/>
+
+<box name="MBWH_ReinforcingBarSlate" material="Aluminium1" X_Y_Z="MBWH_RBSlen;MBWH_RBSthi;MBWH_RBSwid"/>
+
+<gvxy name="MBWH_ReinforcingBarBracket" material="Aluminium2" dZ="MBWH_RBBlen">
+  <gvxy_point X_Y="MBWH_RBBxa;MBWH_RBBya"/>
+  <gvxy_point X_Y="MBWH_RBBxb;MBWH_RBByb"/>
+  <gvxy_point X_Y="MBWH_RBBxc;MBWH_RBByc"/>
+  <gvxy_point X_Y="MBWH_RBBxd;MBWH_RBByd"/>
+  <gvxy_point X_Y="MBWH_RBBxe;MBWH_RBBye"/>
+  <gvxy_point X_Y="MBWH_RBBxf;MBWH_RBByf"/>
+</gvxy>
+
+<composition name="MBWH_ReinforcingBar">
+  <posXYZ volume="MBWH_ReinforcingBarSlate"/>
+  <posXYZ volume="MBWH_ReinforcingBarBracket" X_Y_Z=" MBWH_RBBxp;MBWH_RBByp1;0" rot="0;0;90"/>
+  <posXYZ volume="MBWH_ReinforcingBarBracket" X_Y_Z="-MBWH_RBBxp;MBWH_RBByp2;0"/>
+</composition>
+
+<!--  positions of reinforcing bars -->
+<var name="MBWH_SRBpx" value="MBWH_SUPext/2.+MBWH_RBSthi/2.+MBWH_RBBthi"/>
+<var name="MBWH_SRBpy" value="-MBWH_RBSlen/2.+MBWH_SUPhei+MBWH_RBBthi"/>
+
+<!--  Spokes -->
+<!--  Derived variables -->
+<var  name="MBWH_SUPxa"  value="MBWH_SUPext/2." />
+<var  name="MBWH_SUPya"  value="0." />
+<var  name="MBWH_SUPxb"  value="MBWH_SUPxa" />
+<var  name="MBWH_SUPyb"  value="MBWH_SUPhei" />
+<var  name="MBWH_SUPxc"  value="MBWH_SUPxb-MBWH_SUPthi" />
+<var  name="MBWH_SUPyc"  value="MBWH_SUPyb" />
+<var  name="MBWH_SUPxd"  value="MBWH_SUPxc" />
+<var  name="MBWH_SUPyd"  value="MBWH_SUPthi" />
+
+<!--  Plates of Cross Bracings --> 
+<var  name="MBWH_CBPx"  value="(MBWH_CBext+MBWH_CBPth)/2." />   <!-- x pos -->
+
+
+
+
+<!--  
+      **************************************************************
+      ***                                                       ****
+      ***                      Large Sector                     ****
+      ***                                                       ****
+      **************************************************************
+-->
+
+<!--  ATLMHHBM0091 -->
+<!--  Cut profiles cross bracing large sector -->
+<var  name="MBWH_CBLthi" value="5"/>
+
+<!--  Contreventements lengths -->
+<!--  item numbering in ATLMHHBM0002 -->
+<var  name="MBWH_CBLl11"  value="3690." />  <!--  item 11 -->
+<var  name="MBWH_CBLl17"  value="2700." />  <!--  item 17 -->
+<var  name="MBWH_CBLl22"  value="1740." />  <!--  item 22 -->
+<var  name="MBWH_CBLl26"  value=" 750." />  <!--  item 26 -->
+
+<!--  Contreventements positions (...to be confirmed...) -->
+<var  name="MBWH_CBLy11"  value="9700." />  <!--  item 11 -->
+<var  name="MBWH_CBLy17"  value="7750." />  <!--  item 17 -->
+<var  name="MBWH_CBLy22"  value="5800." />  <!--  item 22 -->
+<var  name="MBWH_CBLy26"  value="3850." />  <!--  item 26 -->
+
+
+<!--  item numbering in ATLMHHBM0002 -->
+<!--  Cross bracing, bay 1 large sector -->
+<var  name="MBWH_CBLl10"  value="4260." />  <!--  item 10 --> <!--  drawing ATLMHHBM0066 -->
+<!--  Cross bracing, bay 2 large sector -->
+<var  name="MBWH_CBLl15"  value="3590." />  <!--  item 15 --> <!--  drawing ATLMHHBM0068 -->
+<!--  Cross bracing, bay 3 large sector -->
+<var  name="MBWH_CBLl21"  value="2830." />  <!--  item 21 --> <!--  drawing ATLMHHBM0070 -->
+<!--  Cross bracing, bay 4 large sector -->
+<var  name="MBWH_CBLl25"  value="2130." />  <!--  item 25 --> <!--  drawing ATLMHHBM0073 -->
+
+<!--  item numbering in ATLMHHBM0002 -->
+<!--  Contreventements, bay 1 large sector -->
+<var  name="MBWH_CBLl8"  value="1780."/>  <!--  item 8 --> <!--  drawing ATLMHHBM0091 -->
+<var  name="MBWH_CBLl9"  value="2310."/>  <!--  item 9 --> <!--  drawing ATLMHHBM0091 -->
+
+<!--  Contreventements, bay 2 large sector -->
+<var  name="MBWH_CBLl14" value="1450."/>  <!--  item 14 --> <!--  drawing ATLMHHBM0091 -->
+<var  name="MBWH_CBLl13" value="2005."/>  <!--  item 13 --> <!--  drawing ATLMHHBM0091 -->
+
+<!--  Contreventements, bay 3 large sector -->
+<var  name="MBWH_CBLl20" value="1055."/>  <!--  item 20 --> <!--  drawing ATLMHHBM0091 -->
+<var  name="MBWH_CBLl18" value="1685."/>  <!--  item 18 --> <!--  drawing ATLMHHBM0091 -->
+
+<!--  Contreventements, bay 4 large sector -->
+<var  name="MBWH_CBLl24" value="590."/>   <!--  item 24 --> <!--  drawing ATLMHHBM0091 -->
+<var  name="MBWH_CBLl23" value="1430."/>  <!--  item 23 --> <!--  drawing ATLMHHBM0091 -->
+
+
+<!--  Plates --> 
+ <!--  item 10 for Bay 1 --> <!--  drawing ATLMHHBM0066 -->
+<var  name="MBWH_CBPL10le" value="419"/>  <!-- length -->
+<var  name="MBWH_CBPL10wi" value="216"/>  <!-- width -->
+<var  name="MBWH_CBPL10cu" value="40"/>   <!-- cut -->
+<var  name="MBWH_CBPL10ti" value="22"/>   <!-- tilt -->
+<var  name="MBWH_CBPL10za" value="2174"/> <!-- Plate offset -->
+<var  name="MBWH_CBPL10ya" value="14"/>   <!-- Plate offset -->
+ <!--  item 15 for Bay 2 --> <!--  drawing ATLMHHBM0068 -->
+<var  name="MBWH_CBPL15le" value="345"/>  <!-- length -->
+<var  name="MBWH_CBPL15wi" value="224"/>  <!-- width -->
+<var  name="MBWH_CBPL15cu" value="30"/>   <!-- cut -->
+<var  name="MBWH_CBPL15ti" value="30"/>   <!-- tilt -->
+<var  name="MBWH_CBPL15za" value="1322"/> <!-- Plate offset -->
+<var  name="MBWH_CBPL15ya" value="9"/>    <!-- Plate offset -->
+ <!--  item 21 for Bay 3 --> <!--  drawing ATLMHHBM0070 -->
+<var  name="MBWH_CBPL21le" value="269"/>  <!-- length -->
+<var  name="MBWH_CBPL21wi" value="230"/>  <!-- width -->
+<var  name="MBWH_CBPL21cu" value="20"/>   <!-- cut -->
+<var  name="MBWH_CBPL21ti" value="40"/>   <!-- tilt -->
+<var  name="MBWH_CBPL21za" value="938"/>  <!-- Plate offset -->
+<var  name="MBWH_CBPL21ya" value="13"/>   <!-- Plate offset -->
+ <!--  item 25 for Bay 4 --> <!--  drawing ATLMHHBM0073 -->
+<var  name="MBWH_CBPL25le" value="300"/>  <!-- length -->
+<var  name="MBWH_CBPL25wi" value="222"/>  <!-- width -->
+<var  name="MBWH_CBPL25cu" value="20"/>   <!-- cut -->
+<var  name="MBWH_CBPL25ti" value="33"/>   <!-- tilt -->   <!-- ==> to be confirmed <== -->
+<var  name="MBWH_CBPL25za" value="470"/>  <!-- Plate offset -->
+<var  name="MBWH_CBPL25ya" value="21"/>   <!-- Plate offset -->
+
+
+<!--  positions (...to be confirmed...) -->
+<var  name="MBWH_Croily10" value="10500"/> <!--  item 10 --> 
+<var  name="MBWH_Croily15" value="8600"/>  <!--  item 15 --> 
+<var  name="MBWH_Croily21" value="6600"/>  <!--  item 21 --> 
+<var  name="MBWH_Croily25" value="4450"/>  <!--  item 25 --> 
+
+
+<!--  ATLMHHBM0002 -->
+<!--  Spokes Opening angle large sector -->
+<var  name="MBWH_SLangle"  value="14." />
+
+<!--  Spoke large sector -->
+<!--  Inner spoke large sector  ATLMHHBM0130 -->
+<!--  External spoke large sector  ATLMHHBM0128 -->
+
+<!--  ATLMHHBM0130 -->
+<!--  U profile length -->
+<var  name="MBWH_SlsUPlen"  value="8465" />   <!-- ??? to be confirmed for both -->
+
+<!--  relative positions of reinforcing bars -->
+<var name="MBWH_SlsRBdz1" value="1317" />
+<var name="MBWH_SlsRBdz2" value="1787" />
+<var name="MBWH_SlsRBdz3" value="2030" />
+<var name="MBWH_SlsRBdz4" value="1740" />
+
+  
+<!--  External Spokes supports -->
+
+<!--  ATLMHHBM0128 -->
+<!--  position along the spoke of 1st support -->
+<var  name="MBWH_SlsSup1" value=" 414" />
+<!--  size of support -->
+<var  name="MBWH_SlsSSize" value=" 220" />   <!-- as measured on drawing, to be confirmed in atlmhhbm0123 ? -->
+
+<!--  Transversal beam, central support -->
+
+<!--  ATLMHHBM0080 -->
+<var  name="MBWH_TBCSlen1" value="2396." />
+<var  name="MBWH_TBCSlen2" value="2526.6"/>
+<var  name="MBWH_TBCSext"  value="  87." />
+<var  name="MBWH_TBCShei"  value=" 180." />
+<var  name="MBWH_TBCSthi1" value="  15." />
+<var  name="MBWH_TBCSthi2" value="  10." />
+<var  name="MBWH_TBCSoffs" value=" 135." />
+<var  name="MBWH_TBCSang1" value="  14." />
+<var  name="MBWH_TBCSang2" value="22.5"/>
+
+
+<!--  Connection beam / extremity plate -->
+
+<!--  ATLMHHBM0076 -->
+<!--  thickness, assumed constant -->
+<var  name="MBWH_CBEPthic" value="15."/>
+<!--  dimensions and angles -->
+<var  name="MBWH_CBEPl1" value="195.8"/>
+<var  name="MBWH_CBEPl2" value="230."/>
+<var  name="MBWH_CBEPl3" value="263."/>
+
+<var  name="MBWH_CBEPh1" value="89.5"/>
+<var  name="MBWH_CBEPh2" value="169.2"/>
+<var  name="MBWH_CBEPh3" value="72.8"/>
+<var  name="MBWH_CBEPh4" value="81.2"/>
+<var  name="MBWH_CBEPh5" value="125"/>
+
+<var  name="MBWH_CBEPa1" value="22.5"/>
+<var  name="MBWH_CBEPa2" value="67.5"/>
+<var  name="MBWH_CBEPa3" value="82."/>
+<var  name="MBWH_CBEPa4" value="15."/>
+
+
+<!--  Extremity plate -->
+
+<!--  ATLMHHBM0075 -->
+<!--  thickness, assumed constant -->
+<var  name="MBWH_EPthic" value="15."/>
+<!--  dimensions and angles -->
+<var  name="MBWH_EPl1" value="227.8"/>
+<var  name="MBWH_EPl2" value="423"/>
+<var  name="MBWH_EPl3" value="193.7"/>
+
+<var  name="MBWH_EPh1" value="250.7"/>
+<var  name="MBWH_EPh2" value="170.3"/>
+<var  name="MBWH_EPh3" value="383"/>
+<var  name="MBWH_EPh4" value="76.1"/>
+
+
+<!--  Central Reinforcing bar -->
+
+<!--  ATLMHHBM0113 -->
+
+<var  name="MBWH_CRBLPwid" value="180"/>
+<var  name="MBWH_CRBPL1pi" value="643"/>
+<var  name="MBWH_CRBPL1po" value="647"/>
+<var  name="MBWH_CRBSHIof" value="4"/>
+
+<!--  L Profile -->
+<var  name="MBWH_CRBLPthi" value="12"/>
+<var  name="MBWH_CRBLPle1" value="910"/>
+<var  name="MBWH_CRBLPhe1" value="60"/>
+<var  name="MBWH_CRBLPle2" value="145"/>
+<var  name="MBWH_CRBLPhe2" value="39"/>
+
+<!--  Plate 1 -->
+<var  name="MBWH_CRBPL1th" value="12"/>
+<var  name="MBWH_CRBPL1le" value="340"/>
+<var  name="MBWH_CRBPL1wi" value="156"/>
+
+<!--  Plate 2 -->
+<var  name="MBWH_CRBPL2th" value="12"/>
+<var  name="MBWH_CRBPL2le" value="210"/>
+<var  name="MBWH_CRBPL2wi" value="156"/>
+
+<!--  Shim -->
+<var  name="MBWH_CRBSHIth" value="12"/>
+<var  name="MBWH_CRBSHIle" value="165"/>
+<var  name="MBWH_CRBSHIwi" value="156"/>
+
+<!--  position of Reinforcing Bar relative to extremity plate ... pifometric, to be confirmed -->
+<var  name="MBWH_CRBxoff" value="-200"/>
+<var  name="MBWH_CRByoff" value="-400"/>
+<var  name="MBWH_CRBzoff" value="-300"/>
+
+
+<!--  ATLMHHBM0002 -->
+<!--  position of 1st support in atlas ref system -->
+<var  name="MBWH_SlsSuy1"   value=" 3612.7" />
+<var  name="MBWH_SlsSux1"   value=" 1305." />
+<!--  ATLMHHBM0128 -->
+<!--  x extension -->
+<var  name="MBWH_SlsSxext"  value=" 139.3" />
+
+<!--  Derived variables -->
+<!--  Positions -->
+<var  name="MBWH_Slsypos" value="MBWH_SlsSuy1+(.5*MBWH_SlsUPlen-MBWH_SlsSup1)*cos(MBWH_SLangle*GENV_PiS180)"/>
+<var  name="MBWH_Slsxp1"  value="MBWH_SlsSux1+(MBWH_SlsSxext-.5*MBWH_SUPhei)/cos(MBWH_SLangle*GENV_PiS180)-.5*MBWH_SlsSSize*sin(MBWH_SLangle*GENV_PiS180) " />
+<!--  external spokes -->
+<var  name="MBWH_SlsExref" value="MBWH_Slsxp1 +(.5*MBWH_SlsUPlen-MBWH_SlsSup1)*sin(MBWH_SLangle*GENV_PiS180) "/>
+<!--  inner spokes -->
+<var  name="MBWH_SlsIxref" value="MBWH_SlsExref - (MBWH_RBSlen-MBWH_RBBsiz)/cos(MBWH_SLangle*GENV_PiS180) "/>
+
+<!--  Connection beam / extremity plate -->
+<!--  Derived variables -->
+<var  name="MBWH_CBEPxa" value="0"/>
+<var  name="MBWH_CBEPya" value="0"/>
+<var  name="MBWH_CBEPxb" value="MBWH_CBEPxa"/>
+<var  name="MBWH_CBEPyb" value="MBWH_CBEPh1"/>
+<var  name="MBWH_CBEPxc" value="MBWH_CBEPl2-MBWH_CBEPl3"/>
+<var  name="MBWH_CBEPyc" value="MBWH_CBEPh2"/>
+<var  name="MBWH_CBEPxd" value="MBWH_CBEPxc+MBWH_CBEPl1"/>
+<var  name="MBWH_CBEPyd" value="MBWH_CBEPyc"/>
+<var  name="MBWH_CBEPxe" value="MBWH_CBEPxd+(MBWH_CBEPh2-MBWH_CBEPh5)/tan(MBWH_CBEPa2*GENV_PiS180)"/>
+<var  name="MBWH_CBEPye" value="MBWH_CBEPh5"/>
+<var  name="MBWH_CBEPxf" value="MBWH_CBEPxe+(MBWH_CBEPh5-MBWH_CBEPh4)/tan(MBWH_CBEPa3*GENV_PiS180)"/>
+<var  name="MBWH_CBEPyf" value="MBWH_CBEPh4"/>
+<var  name="MBWH_CBEPxg" value="MBWH_CBEPxf+(MBWH_CBEPh4-MBWH_CBEPh3)/tan(MBWH_CBEPa4*GENV_PiS180)"/>
+<var  name="MBWH_CBEPyg" value="MBWH_CBEPh3"/>
+<var  name="MBWH_CBEPxh" value="MBWH_CBEPl2"/>
+<var  name="MBWH_CBEPyh" value="MBWH_CBEPya"/>
+
+<!--  Modelization -->
+<gvxy name="MBWH_ConnectionBeamExtremityPlate" material="Aluminium2" dZ="MBWH_CBEPthic">
+  <gvxy_point X_Y="MBWH_CBEPxa;MBWH_CBEPya"/>
+  <gvxy_point X_Y="MBWH_CBEPxb;MBWH_CBEPyb"/>
+  <gvxy_point X_Y="MBWH_CBEPxc;MBWH_CBEPyc"/>
+  <gvxy_point X_Y="MBWH_CBEPxd;MBWH_CBEPyd"/>
+  <gvxy_point X_Y="MBWH_CBEPxe;MBWH_CBEPye"/>
+  <gvxy_point X_Y="MBWH_CBEPxf;MBWH_CBEPyf"/>
+  <gvxy_point X_Y="MBWH_CBEPxg;MBWH_CBEPyg"/>
+  <gvxy_point X_Y="MBWH_CBEPxh;MBWH_CBEPyh"/>
+</gvxy>
+
+<!--  Extremity plate -->
+<!--  Derived variables -->
+<var  name="MBWH_EPxa" value="0"/>
+<var  name="MBWH_EPya" value="0"/>
+<var  name="MBWH_EPxb" value="MBWH_EPxa"/>
+<var  name="MBWH_EPyb" value="MBWH_EPh1"/>
+<var  name="MBWH_EPxc" value="MBWH_EPl2-MBWH_EPl3"/>
+<var  name="MBWH_EPyc" value="MBWH_EPh3"/>
+<var  name="MBWH_EPxd" value="MBWH_EPl2"/>
+<var  name="MBWH_EPyd" value="MBWH_EPyc"/>
+<var  name="MBWH_EPxe" value="MBWH_EPxd"/>
+<var  name="MBWH_EPye" value="MBWH_EPyd-MBWH_EPh2"/>
+<var  name="MBWH_EPxf" value="MBWH_EPl1"/>
+<var  name="MBWH_EPyf" value="MBWH_EPh4"/>
+<var  name="MBWH_EPxg" value="MBWH_EPxf"/>
+<var  name="MBWH_EPyg" value="MBWH_EPya"/>
+
+<!--  Modelization -->
+<gvxy name="MBWH_ExtremityPlate" material="Aluminium1" dZ="MBWH_EPthic">
+  <gvxy_point X_Y="MBWH_EPxa;MBWH_EPya"/>
+  <gvxy_point X_Y="MBWH_EPxb;MBWH_EPyb"/>
+  <gvxy_point X_Y="MBWH_EPxc;MBWH_EPyc"/>
+  <gvxy_point X_Y="MBWH_EPxd;MBWH_EPyd"/>
+  <gvxy_point X_Y="MBWH_EPxe;MBWH_EPye"/>
+  <gvxy_point X_Y="MBWH_EPxf;MBWH_EPyf"/>
+  <gvxy_point X_Y="MBWH_EPxg;MBWH_EPyg"/>
+</gvxy>
+
+
+<!-- Central Reinforcing bar  -->
+<!--  L Profile -->
+<!--  Derived variables -->
+<!--  piece 1 -->
+<var  name="MBWH_CRBLP1xa" value="0"/>
+<var  name="MBWH_CRBLP1ya" value="0"/>
+<var  name="MBWH_CRBLP1xb" value="MBWH_CRBLPle1"/>
+<var  name="MBWH_CRBLP1yb" value="MBWH_CRBLP1ya"/>
+<var  name="MBWH_CRBLP1xc" value="MBWH_CRBLP1xb"/>
+<var  name="MBWH_CRBLP1yc" value="MBWH_CRBLPhe2"/>
+<var  name="MBWH_CRBLP1xd" value="MBWH_CRBLPle1-MBWH_CRBLPle2"/>
+<var  name="MBWH_CRBLP1yd" value="MBWH_CRBLPhe1"/>
+<var  name="MBWH_CRBLP1xe" value="MBWH_CRBLP1xa"/>
+<var  name="MBWH_CRBLP1ye" value="MBWH_CRBLP1yd"/>
+
+<!--  piece 2 -->
+<var  name="MBWH_CRBLP2dy" value="MBWH_CRBLPhe1-MBWH_CRBLPthi"/>
+
+
+<!--  Modelization -->
+<gvxy name="MBWH_CRB-LProfile1" material="Aluminium1" dZ="MBWH_CRBLPthi">
+  <gvxy_point X_Y="MBWH_CRBLP1xa;MBWH_CRBLP1ya"/>
+  <gvxy_point X_Y="MBWH_CRBLP1xb;MBWH_CRBLP1yb"/>
+  <gvxy_point X_Y="MBWH_CRBLP1xc;MBWH_CRBLP1yc"/>
+  <gvxy_point X_Y="MBWH_CRBLP1xd;MBWH_CRBLP1yd"/>
+  <gvxy_point X_Y="MBWH_CRBLP1xe;MBWH_CRBLP1ye"/>
+</gvxy>
+
+<var  name="MBWH_CRBLP1z" value="-MBWH_CRBLPwid/2.+MBWH_CRBLPthi/2"/>
+
+<box name="MBWH_CRB-LProfile2" material="Aluminium1" X_Y_Z="MBWH_CRBLPle1;MBWH_CRBLP2dy;MBWH_CRBLPthi"/>
+<var name="MBWH_CRBLP2x" value="MBWH_CRBLPle1/2"/>
+<var name="MBWH_CRBLP2y" value="MBWH_CRBLPthi/2"/>
+<var name="MBWH_CRBLP2z" value="MBWH_CRBLP1z+(MBWH_CRBLPthi+MBWH_CRBLP2dy)/2"/>
+
+<box name="MBWH_CRB-Plate2" material="Aluminium1" X_Y_Z="MBWH_CRBPL2le;MBWH_CRBPL2th;MBWH_CRBPL2wi"/>
+<var name="MBWH_CRBPL2xp" value="MBWH_CRBLPle1/2"/>
+<var name="MBWH_CRBPL2yp" value="MBWH_CRBLPthi+MBWH_CRBPL2th/2"/>
+
+<box name="MBWH_CRB-Plate1" material="Aluminium1" X_Y_Z="MBWH_CRBPL1le;MBWH_CRBPL1th;MBWH_CRBPL1wi"/>
+<var name="MBWH_CRBPL1x1" value="MBWH_CRBLPle1/2+MBWH_CRBPL1pi-MBWH_CRBPL1le/2"/>
+<var name="MBWH_CRBPL1x2" value="MBWH_CRBLPle1/2-MBWH_CRBPL1po+MBWH_CRBPL1le/2"/>
+<var name="MBWH_CRBPL1yp" value="-MBWH_CRBPL1th/2."/>
+
+<box name="MBWH_CRB-Shim" material="Aluminium1" X_Y_Z="MBWH_CRBSHIle;MBWH_CRBSHIth;MBWH_CRBSHIwi"/>
+<var name="MBWH_CRBSHIx1" value="MBWH_CRBPL1x1+MBWH_CRBPL1le/2.-MBWH_CRBSHIle/2.-MBWH_CRBSHIof"/>
+<var name="MBWH_CRBSHIx2" value="MBWH_CRBPL1x2-MBWH_CRBPL1le/2.+MBWH_CRBSHIle/2.+MBWH_CRBSHIof"/>
+<var name="MBWH_CRBSHIyp" value="MBWH_CRBPL1yp-MBWH_CRBPL1th/2.-MBWH_CRBSHIth/2."/>
+
+
+<composition name="MBWH_CRB-LProfile_1">
+  <posXYZ volume="MBWH_CRB-LProfile1" X_Y_Z="0;0;MBWH_CRBLP1z"/>
+  <posXYZ volume="MBWH_CRB-LProfile2" X_Y_Z="MBWH_CRBLP2x;MBWH_CRBLP2y;MBWH_CRBLP2z" rot="90;0;0"/>
+</composition>
+
+<composition name="MBWH_CRB-LProfile_2">
+  <posXYZ volume="MBWH_CRB-LProfile1" X_Y_Z="0;0;-MBWH_CRBLP1z"/>
+  <posXYZ volume="MBWH_CRB-LProfile2" X_Y_Z="MBWH_CRBLP2x;MBWH_CRBLP2y;-MBWH_CRBLP2z" rot="90;0;0"/>
+</composition>
+
+
+<composition name="MBWH_CentralReinforcingbar">
+  <posXYZ volume="MBWH_CRB-LProfile_1"/>
+  <posXYZ volume="MBWH_CRB-LProfile_2"/>
+  <posXYZ volume="MBWH_CRB-Plate2"   X_Y_Z="MBWH_CRBPL2xp;MBWH_CRBPL2yp;0"/>
+  <posXYZ volume="MBWH_CRB-Plate1"   X_Y_Z="MBWH_CRBPL1x1;MBWH_CRBPL1yp;0"/>
+  <posXYZ volume="MBWH_CRB-Plate1"   X_Y_Z="MBWH_CRBPL1x2;MBWH_CRBPL1yp;0"/>
+  <posXYZ volume="MBWH_CRB-Shim"     X_Y_Z="MBWH_CRBSHIx1;MBWH_CRBSHIyp;0"/>
+  <posXYZ volume="MBWH_CRB-Shim"     X_Y_Z="MBWH_CRBSHIx2;MBWH_CRBSHIyp;0"/>
+</composition>
+
+<!--  Cut profiles cross bracing large sector -->
+<!--  Derived variables -->
+<var  name="MBWH_CBLxa"  value="MBWH_CBext/2." />
+<var  name="MBWH_CBLya"  value="0." />
+<var  name="MBWH_CBLxb"  value="MBWH_CBLxa" />
+<var  name="MBWH_CBLyb"  value="MBWH_CBhei" />
+<var  name="MBWH_CBLxc"  value="MBWH_CBLxb-MBWH_CBLthi" />
+<var  name="MBWH_CBLyc"  value="MBWH_CBLyb" />
+<var  name="MBWH_CBLxd"  value="MBWH_CBLxc" />
+<var  name="MBWH_CBLyd"  value="MBWH_CBLthi" />
+
+<!--  Modelization -->
+
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem11" material="Aluminium1" dZ="MBWH_CBLl11">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem17" material="Aluminium1" dZ="MBWH_CBLl17">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem22" material="Aluminium1" dZ="MBWH_CBLl22">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem26" material="Aluminium1" dZ="MBWH_CBLl26">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem10" material="Aluminium1" dZ="MBWH_CBLl10">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem15" material="Aluminium1" dZ="MBWH_CBLl15">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem21" material="Aluminium1" dZ="MBWH_CBLl21">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem25" material="Aluminium1" dZ="MBWH_CBLl25">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+
+
+<!--  Contreventements, bay 1 large sector -->
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem8" material="Aluminium1" dZ="MBWH_CBLl8">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem9" material="Aluminium1" dZ="MBWH_CBLl9">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+
+<!--  Contreventements, bay 2 large sector -->
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem14" material="Aluminium1" dZ="MBWH_CBLl14">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem13" material="Aluminium1" dZ="MBWH_CBLl13">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+
+<!--  Contreventements, bay 3 large sector -->
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem20" material="Aluminium1" dZ="MBWH_CBLl20">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem18" material="Aluminium1" dZ="MBWH_CBLl18">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+
+<!--  Contreventements, bay 4 large sector -->
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem24" material="Aluminium1" dZ="MBWH_CBLl24">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingLargeSectorItem23" material="Aluminium1" dZ="MBWH_CBLl23">
+  <gvxy_point X_Y="MBWH_CBLxa;MBWH_CBLya"/>
+  <gvxy_point X_Y="MBWH_CBLxb;MBWH_CBLyb"/>
+  <gvxy_point X_Y="MBWH_CBLxc;MBWH_CBLyc"/>
+  <gvxy_point X_Y="MBWH_CBLxd;MBWH_CBLyd"/>
+</gvxysx>
+
+
+<!--  cross bracing Plates large sector -->
+
+<!--  Bay 1 -->
+<var  name="MBWH_CBPL10x1"  value="MBWH_CBPL10le/2." />
+<var  name="MBWH_CBPL10y1"  value="MBWH_CBPL10wi/2.-MBWH_CBPL10cu" />
+<var  name="MBWH_CBPL10x2"  value="MBWH_CBPL10x1-MBWH_CBPL10cu" />
+<var  name="MBWH_CBPL10y2"  value="MBWH_CBPL10wi/2." />
+<gvxysxy name="MBWH_CrossBracingPlateLargeSectorItem10" material="Aluminium1" dZ="MBWH_CBPth">
+  <gvxy_point X_Y="MBWH_CBPL10x1;MBWH_CBPL10y1"/>
+  <gvxy_point X_Y="MBWH_CBPL10x2;MBWH_CBPL10y2"/>
+</gvxysxy>
+
+<!--  Bay 2 -->
+<var  name="MBWH_CBPL15x1"  value="MBWH_CBPL15le/2." />
+<var  name="MBWH_CBPL15y1"  value="MBWH_CBPL15wi/2.-MBWH_CBPL15cu" />
+<var  name="MBWH_CBPL15x2"  value="MBWH_CBPL15x1-MBWH_CBPL15cu" />
+<var  name="MBWH_CBPL15y2"  value="MBWH_CBPL15wi/2." />
+<gvxysxy name="MBWH_CrossBracingPlateLargeSectorItem15" material="Aluminium1" dZ="MBWH_CBPth">
+  <gvxy_point X_Y="MBWH_CBPL15x1;MBWH_CBPL15y1"/>
+  <gvxy_point X_Y="MBWH_CBPL15x2;MBWH_CBPL15y2"/>
+</gvxysxy>
+
+<!--  Bay 3 -->
+<var  name="MBWH_CBPL21x1"  value="MBWH_CBPL21le/2." />
+<var  name="MBWH_CBPL21y1"  value="MBWH_CBPL21wi/2.-MBWH_CBPL21cu" />
+<var  name="MBWH_CBPL21x2"  value="MBWH_CBPL21x1-MBWH_CBPL21cu" />
+<var  name="MBWH_CBPL21y2"  value="MBWH_CBPL21wi/2." />
+<gvxysxy name="MBWH_CrossBracingPlateLargeSectorItem21" material="Aluminium1" dZ="MBWH_CBPth">
+  <gvxy_point X_Y="MBWH_CBPL21x1;MBWH_CBPL21y1"/>
+  <gvxy_point X_Y="MBWH_CBPL21x2;MBWH_CBPL21y2"/>
+</gvxysxy>
+
+<!--  Bay 4 -->
+<var  name="MBWH_CBPL25x1"  value="MBWH_CBPL25le/2." />
+<var  name="MBWH_CBPL25y1"  value="MBWH_CBPL25wi/2.-MBWH_CBPL25cu" />
+<var  name="MBWH_CBPL25x2"  value="MBWH_CBPL25x1-MBWH_CBPL25cu" />
+<var  name="MBWH_CBPL25y2"  value="MBWH_CBPL25wi/2." />
+<gvxysxy name="MBWH_CrossBracingPlateLargeSectorItem25" material="Aluminium1" dZ="MBWH_CBPth">
+  <gvxy_point X_Y="MBWH_CBPL25x1;MBWH_CBPL25y1"/>
+  <gvxy_point X_Y="MBWH_CBPL25x2;MBWH_CBPL25y2"/>
+</gvxysxy>
+
+
+<!-- Bay 1 -->
+<var  name="MBWH_CBL10z" value="MBWH_CBLl10/2." />
+<var  name="MBWH_CBPL10d"  value="MBWH_CBPL10wi-2.*MBWH_CBPL10cu" />
+<var  name="MBWH_CBPL10zb" value="MBWH_CBPL10za+sin(MBWH_CBPL10ti*GENV_PiS180)*MBWH_CBPL10d/2." />
+<var  name="MBWH_CBPL10yb" value="MBWH_CBPL10ya-cos(MBWH_CBPL10ti*GENV_PiS180)*MBWH_CBPL10d/2." />
+<var  name="MBWH_CBPL10zc" value="MBWH_CBPL10zb+cos(MBWH_CBPL10ti*GENV_PiS180)*MBWH_CBPL10le/2" />
+<var  name="MBWH_CBPL10yc" value="MBWH_CBPL10yb+sin(MBWH_CBPL10ti*GENV_PiS180)*MBWH_CBPL10le/2" />
+  <!-- get positions of contreventements 8,9 using locations of item 10 extremities -->
+<var  name="MBWH_cvl10xo" value="-MBWH_CBPL10zc*cos(MBWH_CBPL10ti*GENV_PiS180)-0.5*(MBWH_CBhei)*sin(MBWH_CBPL10ti*GENV_PiS180)" />
+<var  name="MBWH_cvl10yo" value=" MBWH_CBPL10zc*sin(MBWH_CBPL10ti*GENV_PiS180)-0.5*(MBWH_CBhei)*cos(MBWH_CBPL10ti*GENV_PiS180)" />
+<var  name="MBWH_cvl10xu" value="MBWH_cvl10xo+MBWH_CBLl10*cos(MBWH_CBPL10ti*GENV_PiS180)" />
+<var  name="MBWH_cvl10yu" value="MBWH_cvl10yo-MBWH_CBLl10*sin(MBWH_CBPL10ti*GENV_PiS180)" />
+<var  name="MBWH_cvlx8"   value="-MBWH_cvl10xu+cos(MBWH_CBPL10ti*GENV_PiS180)*MBWH_CBLl8/2." />
+<var  name="MBWH_cvly8"   value=" MBWH_cvl10yu+sin(MBWH_CBPL10ti*GENV_PiS180)*MBWH_CBLl8/2." />
+<var  name="MBWH_cvlx9"   value="-MBWH_cvl10xo-cos(MBWH_CBPL10ti*GENV_PiS180)*MBWH_CBLl9/2." />
+<var  name="MBWH_cvly9"   value=" MBWH_cvl10yo-sin(MBWH_CBPL10ti*GENV_PiS180)*MBWH_CBLl9/2." />
+
+<composition name="MBWH_CrossBracingPlateLargeSectorItem10Rot">
+  <posXYZ volume="MBWH_CrossBracingPlateLargeSectorItem10" rot="0.;90.;0" />
+</composition>
+<composition name="MBWH_CrossBracingBay1LargeSector">
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem10" X_Y_Z="0;0;MBWH_CBL10z" />
+  <posXYZ volume="MBWH_CrossBracingPlateLargeSectorItem10Rot" X_Y_Z="-MBWH_CBPx;MBWH_CBPL10yc;MBWH_CBPL10zc" rot="-MBWH_CBPL10ti;0;0" />
+  <posXYZ volume="MBWH_CrossBracingPlateLargeSectorItem10Rot" X_Y_Z=" MBWH_CBPx;MBWH_CBPL10yc;MBWH_CBPL10zc" rot="-MBWH_CBPL10ti;0;0"/>
+</composition>
+<composition name="MBWH_CroisillonBay1LargeSector">
+  <posXYZ volume="MBWH_CrossBracingBay1LargeSector" X_Y_Z="0;-MBWH_CBPL10yc;-MBWH_CBPL10zc"  />
+</composition>
+<composition name="MBWH_CroisillonBay1LargeSectorRot">
+  <posXYZ volume="MBWH_CroisillonBay1LargeSector" rot="MBWH_CBPL10ti;90;0" />
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem8" X_Y_Z="MBWH_cvlx8;MBWH_cvly8;0" rot="-MBWH_CBPL10ti;90;0" />
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem9" X_Y_Z="MBWH_cvlx9;MBWH_cvly9;0" rot="-MBWH_CBPL10ti;90;0" />
+</composition>
+
+<!-- Bay 2 -->
+<var  name="MBWH_CBL15z" value="MBWH_CBLl15/2." />
+<var  name="MBWH_CBPL15d"  value="MBWH_CBPL15wi-2.*MBWH_CBPL15cu" />
+<var  name="MBWH_CBPL15zb" value="MBWH_CBPL15za+sin(MBWH_CBPL15ti*GENV_PiS180)*MBWH_CBPL15d/2." />
+<var  name="MBWH_CBPL15yb" value="MBWH_CBPL15ya-cos(MBWH_CBPL15ti*GENV_PiS180)*MBWH_CBPL15d/2." />
+<var  name="MBWH_CBPL15zi" value="MBWH_CBPL15zb+cos(MBWH_CBPL15ti*GENV_PiS180)*MBWH_CBPL15le/2" />
+<var  name="MBWH_CBPL15yi" value="MBWH_CBPL15yb+sin(MBWH_CBPL15ti*GENV_PiS180)*MBWH_CBPL15le/2" />
+<var  name="MBWH_CBPL15zc" value="MBWH_CBLl15-MBWH_CBPL15zi" />
+<var  name="MBWH_CBPL15yc" value="MBWH_CBhei-MBWH_CBPL15yi" />
+  <!-- get positions of contreventements 14, 13 using locations of item 15 extremities -->
+<var  name="MBWH_cvl15xo" value="-MBWH_CBPL15zc*cos(MBWH_CBPL15ti*GENV_PiS180)-0.5*(MBWH_CBhei+MBWH_CBPL15ya)*sin(MBWH_CBPL15ti*GENV_PiS180)"/>
+<var  name="MBWH_cvl15yo" value=" MBWH_CBPL15zc*sin(MBWH_CBPL15ti*GENV_PiS180)-0.5*(MBWH_CBhei+MBWH_CBPL15ya)*cos(MBWH_CBPL15ti*GENV_PiS180)"/>
+<var  name="MBWH_cvl15xu" value="MBWH_cvl15xo+MBWH_CBLl15*cos(MBWH_CBPL15ti*GENV_PiS180)" />
+<var  name="MBWH_cvl15yu" value="MBWH_cvl15yo-MBWH_CBLl15*sin(MBWH_CBPL15ti*GENV_PiS180)" />
+<var  name="MBWH_cvlx14"  value="-MBWH_cvl15xu+cos(MBWH_CBPL15ti*GENV_PiS180)*MBWH_CBLl14/2." />
+<var  name="MBWH_cvly14"  value=" MBWH_cvl15yu+sin(MBWH_CBPL15ti*GENV_PiS180)*MBWH_CBLl14/2." />
+<var  name="MBWH_cvlx13"  value="-MBWH_cvl15xo-cos(MBWH_CBPL15ti*GENV_PiS180)*MBWH_CBLl13/2." />
+<var  name="MBWH_cvly13"  value=" MBWH_cvl15yo-sin(MBWH_CBPL15ti*GENV_PiS180)*MBWH_CBLl13/2." />
+
+
+<composition name="MBWH_CrossBracingPlateLargeSectorItem15Rot">
+  <posXYZ volume="MBWH_CrossBracingPlateLargeSectorItem15" rot="0.;90.;0" />
+</composition>
+<composition name="MBWH_CrossBracingBay2LargeSector">
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem15" X_Y_Z="0;0;MBWH_CBL15z" />
+  <posXYZ volume="MBWH_CrossBracingPlateLargeSectorItem15Rot" X_Y_Z="-MBWH_CBPx;MBWH_CBPL15yc;MBWH_CBPL15zc" rot="-MBWH_CBPL15ti;0;0" />
+  <posXYZ volume="MBWH_CrossBracingPlateLargeSectorItem15Rot" X_Y_Z=" MBWH_CBPx;MBWH_CBPL15yc;MBWH_CBPL15zc" rot="-MBWH_CBPL15ti;0;0"/>
+</composition>
+<composition name="MBWH_CroisillonBay2LargeSector">
+  <posXYZ volume="MBWH_CrossBracingBay2LargeSector" X_Y_Z="0;-MBWH_CBPL15yc;-MBWH_CBPL15zc"  />
+</composition>
+<composition name="MBWH_CroisillonBay2LargeSectorRot">
+  <posXYZ volume="MBWH_CroisillonBay2LargeSector" rot="MBWH_CBPL15ti;90;0" />
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem14" X_Y_Z="MBWH_cvlx14;MBWH_cvly14;0" rot="-MBWH_CBPL15ti;90;0" />
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem13" X_Y_Z="MBWH_cvlx13;MBWH_cvly13;0" rot="-MBWH_CBPL15ti;90;0" />
+</composition>
+
+
+<!-- Bay 3 -->
+<var  name="MBWH_CBL21z" value="MBWH_CBLl21/2." />
+<var  name="MBWH_CBPL21d"  value="MBWH_CBPL21wi-2.*MBWH_CBPL21cu" />
+<var  name="MBWH_CBPL21zb" value="MBWH_CBPL21za+sin(MBWH_CBPL21ti*GENV_PiS180)*MBWH_CBPL21d/2." />
+<var  name="MBWH_CBPL21yb" value="MBWH_CBPL21ya-cos(MBWH_CBPL21ti*GENV_PiS180)*MBWH_CBPL21d/2." />
+<var  name="MBWH_CBPL21z" value="MBWH_CBPL21zb+cos(MBWH_CBPL21ti*GENV_PiS180)*MBWH_CBPL21le/2" />
+<var  name="MBWH_CBPL21yi" value="MBWH_CBPL21yb+sin(MBWH_CBPL21ti*GENV_PiS180)*MBWH_CBPL21le/2" />
+<var  name="MBWH_CBPL21zc" value="MBWH_CBLl21-MBWH_CBPL21z" />
+<var  name="MBWH_CBPL21yc" value="MBWH_CBhei-MBWH_CBPL21yi" />
+  <!-- get positions of contreventements 14, 13 using locations of item 21 extremities -->
+<var  name="MBWH_cvl21xo" value="-MBWH_CBPL21zc*cos(MBWH_CBPL21ti*GENV_PiS180)-0.5*(MBWH_CBhei+MBWH_CBPL21ya)*sin(MBWH_CBPL21ti*GENV_PiS180)"/>
+<var  name="MBWH_cvl21yo" value=" MBWH_CBPL21zc*sin(MBWH_CBPL21ti*GENV_PiS180)-0.5*(MBWH_CBhei+MBWH_CBPL21ya)*cos(MBWH_CBPL21ti*GENV_PiS180)"/>
+<var  name="MBWH_cvl21xu" value="MBWH_cvl21xo+MBWH_CBLl21*cos(MBWH_CBPL21ti*GENV_PiS180)" />
+<var  name="MBWH_cvl21yu" value="MBWH_cvl21yo-MBWH_CBLl21*sin(MBWH_CBPL21ti*GENV_PiS180)" />
+<var  name="MBWH_cvlx20"  value="-MBWH_cvl21xu+cos(MBWH_CBPL21ti*GENV_PiS180)*MBWH_CBLl20/2." />
+<var  name="MBWH_cvly20"  value=" MBWH_cvl21yu+sin(MBWH_CBPL21ti*GENV_PiS180)*MBWH_CBLl20/2." />
+<var  name="MBWH_cvlx18"  value="-MBWH_cvl21xo-cos(MBWH_CBPL21ti*GENV_PiS180)*MBWH_CBLl18/2." />
+<var  name="MBWH_cvly18"  value=" MBWH_cvl21yo-sin(MBWH_CBPL21ti*GENV_PiS180)*MBWH_CBLl18/2." />
+
+<composition name="MBWH_CrossBracingPlateLargeSectorItem21Rot">
+  <posXYZ volume="MBWH_CrossBracingPlateLargeSectorItem21" rot="0.;90.;0" />
+</composition>
+<composition name="MBWH_CrossBracingBay3LargeSector">
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem21" X_Y_Z="0;0;MBWH_CBL21z" />
+  <posXYZ volume="MBWH_CrossBracingPlateLargeSectorItem21Rot" X_Y_Z="-MBWH_CBPx;MBWH_CBPL21yc;MBWH_CBPL21zc" rot="-MBWH_CBPL21ti;0;0" />
+  <posXYZ volume="MBWH_CrossBracingPlateLargeSectorItem21Rot" X_Y_Z=" MBWH_CBPx;MBWH_CBPL21yc;MBWH_CBPL21zc" rot="-MBWH_CBPL21ti;0;0"/>
+</composition>
+<composition name="MBWH_CroisillonBay3LargeSector">
+  <posXYZ volume="MBWH_CrossBracingBay3LargeSector" X_Y_Z="0;-MBWH_CBPL21yc;-MBWH_CBPL21zc"  />
+</composition>
+<composition name="MBWH_CroisillonBay3LargeSectorRot">
+  <posXYZ volume="MBWH_CroisillonBay3LargeSector" rot="MBWH_CBPL21ti;90;0" />
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem20" X_Y_Z="MBWH_cvlx20;MBWH_cvly20;0" rot="-MBWH_CBPL21ti;90;0" />
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem18" X_Y_Z="MBWH_cvlx18;MBWH_cvly18;0" rot="-MBWH_CBPL21ti;90;0" />
+</composition>
+
+
+
+<!-- Bay 4 -->
+<var  name="MBWH_CBPL25tii" value="90-MBWH_CBPL25ti" />
+<var  name="MBWH_CBL25z" value="-MBWH_CBLl25/2." />
+<var  name="MBWH_CBPL25d"  value="MBWH_CBPL25wi-2.*MBWH_CBPL25cu" />
+<var  name="MBWH_CBPL25zb" value="-MBWH_CBPL25za-sin(MBWH_CBPL25ti*GENV_PiS180)*MBWH_CBPL25d/2." />
+<var  name="MBWH_CBPL25yb" value="MBWH_CBPL25ya-cos(MBWH_CBPL25ti*GENV_PiS180)*MBWH_CBPL25d/2." />
+<var  name="MBWH_CBPL25zc" value="MBWH_CBPL25zb-cos(MBWH_CBPL25ti*GENV_PiS180)*MBWH_CBPL25le/2" />
+<var  name="MBWH_CBPL25yc" value="MBWH_CBPL25yb+sin(MBWH_CBPL25ti*GENV_PiS180)*MBWH_CBPL25le/2" />
+  <!-- get positions of contreventements 14, 13 using locations of item 25 extremities -->
+<var  name="MBWH_cvl25xo" value="-MBWH_CBPL25zc*cos(MBWH_CBPL25tii*GENV_PiS180)-0.5*(MBWH_CBhei+MBWH_CBPL25ya)*sin(MBWH_CBPL25ti*GENV_PiS180)"/>
+<var  name="MBWH_cvl25yo" value=" MBWH_CBPL25zc*sin(MBWH_CBPL25tii*GENV_PiS180)-0.5*(MBWH_CBhei+MBWH_CBPL25ya)*cos(MBWH_CBPL25ti*GENV_PiS180)"/>
+<var  name="MBWH_cvl25xo" value="-MBWH_CBPL25zc*cos(MBWH_CBPL25tii*GENV_PiS180)-0.5*(MBWH_CBhei)*cos(MBWH_CBPL25ti*GENV_PiS180)"/>
+<var  name="MBWH_cvl25yo" value=" MBWH_CBPL25zc*sin(MBWH_CBPL25tii*GENV_PiS180)-0.5*(MBWH_CBhei)*sin(MBWH_CBPL25ti*GENV_PiS180)"/>
+<var  name="MBWH_cvl25xu" value="MBWH_cvl25xo-MBWH_CBLl25*cos(MBWH_CBPL25tii*GENV_PiS180)" />
+<var  name="MBWH_cvl25yu" value="MBWH_cvl25yo+MBWH_CBLl25*sin(MBWH_CBPL25tii*GENV_PiS180)" />
+<var  name="MBWH_cvlx24"  value="-MBWH_cvl25xo+cos(MBWH_CBPL25tii*GENV_PiS180)*MBWH_CBLl24/2." />
+<var  name="MBWH_cvly24"  value=" MBWH_cvl25yo+sin(MBWH_CBPL25tii*GENV_PiS180)*MBWH_CBLl24/2." />
+<var  name="MBWH_cvlx23"  value="-MBWH_cvl25xu-cos(MBWH_CBPL25tii*GENV_PiS180)*MBWH_CBLl23/2." />
+<var  name="MBWH_cvly23"  value=" MBWH_cvl25yu-sin(MBWH_CBPL25tii*GENV_PiS180)*MBWH_CBLl23/2." />
+
+<composition name="MBWH_CrossBracingPlateLargeSectorItem25Rot">
+  <posXYZ volume="MBWH_CrossBracingPlateLargeSectorItem25" rot="0.;90.;0" />
+</composition>
+<composition name="MBWH_CrossBracingBay4LargeSector">
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem25" X_Y_Z="0;0;MBWH_CBL25z" />
+  <posXYZ volume="MBWH_CrossBracingPlateLargeSectorItem25Rot" X_Y_Z="-MBWH_CBPx;MBWH_CBPL25yc;MBWH_CBPL25zc" rot="MBWH_CBPL25ti;0;0" />
+  <posXYZ volume="MBWH_CrossBracingPlateLargeSectorItem25Rot" X_Y_Z=" MBWH_CBPx;MBWH_CBPL25yc;MBWH_CBPL25zc" rot="MBWH_CBPL25ti;0;0"/>
+</composition>
+<composition name="MBWH_CroisillonBay4LargeSector">
+  <posXYZ volume="MBWH_CrossBracingBay4LargeSector" X_Y_Z="0;-MBWH_CBPL25yc;-MBWH_CBPL25zc"  />
+</composition>
+<composition name="MBWH_CroisillonBay4LargeSectorRot">
+  <posXYZ volume="MBWH_CroisillonBay4LargeSector" rot="90-MBWH_CBPL25ti;90;0" />
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem24" X_Y_Z="MBWH_cvlx24;MBWH_cvly24;0" rot="MBWH_CBPL25ti-90;90;0" />
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem23" X_Y_Z="MBWH_cvlx23;MBWH_cvly23;0" rot="MBWH_CBPL25ti-90;90;0" />
+</composition>
+
+
+
+<!--  Inner and Outer spoke large sector -->
+
+<gvxysx name="MBWH_SpokeLargeSectorUprofile" material="Aluminium1" dZ="MBWH_SlsUPlen">
+  <gvxy_point X_Y="MBWH_SUPxa;MBWH_SUPya"/>
+  <gvxy_point X_Y="MBWH_SUPxb;MBWH_SUPyb"/>
+  <gvxy_point X_Y="MBWH_SUPxc;MBWH_SUPyc"/>
+  <gvxy_point X_Y="MBWH_SUPxd;MBWH_SUPyd"/>
+</gvxysx>
+
+<!--  Derived variables -->
+<!--  positions of reinforcing bars -->
+<var name="MBWH_SlsRBpz1" value="MBWH_SlsUPlen/2.-MBWH_SlsRBdz1-MBWH_SRBhos/2."/>
+<var name="MBWH_SlsRBpz2" value="MBWH_SlsRBpz1-MBWH_SlsRBdz2"/>
+<var name="MBWH_SlsRBpz3" value="MBWH_SlsRBpz2-MBWH_SlsRBdz3"/>
+<var name="MBWH_SlsRBpz4" value="MBWH_SlsRBpz3-MBWH_SlsRBdz4"/>
+
+<!--  Relative positions of spokes -->
+<var  name="MBWH_SlsIxpos"  value="MBWH_SRBpx+MBWH_SUPext/2.+MBWH_RBBthi+MBWH_RBSthi/2." />
+<var  name="MBWH_SlsIypos"  value="-MBWH_RBSlen+MBWH_RBBsiz" />
+<var  name="MBWH_SlsIzpos"  value="-MBWH_SlsIypos*tan(MBWH_SLangle*GENV_PiS180)" />
+
+
+<!--  Transversal beam, central support -->
+<!--  Derived variables -->
+<var  name="MBWH_TBCSxa" value="MBWH_TBCSlen1/2." />
+<var  name="MBWH_TBCSya" value="0." />
+<var  name="MBWH_TBCSxc" value="MBWH_TBCSlen2/2.-MBWH_TBCSext" />
+<var  name="MBWH_TBCSyc" value="MBWH_TBCShei" />
+<var  name="MBWH_TBCSxb" value="MBWH_TBCSlen2/2." />
+<var  name="MBWH_TBCSyb" value="MBWH_TBCSyc-MBWH_TBCSext*tan(MBWH_TBCSang1*GENV_PiS180)" />
+
+<var  name="MBWH_TBCSxa1" value="MBWH_TBCSxa-MBWH_TBCSoffs/cos(MBWH_TBCSang1*GENV_PiS180)" />
+<var  name="MBWH_TBCSya1" value="0." />
+<var  name="MBWH_TBCSxb1" value="MBWH_TBCSxa1+MBWH_TBCShei*tan(MBWH_TBCSang2*GENV_PiS180)" />
+<var  name="MBWH_TBCSyb1" value="MBWH_TBCShei" />
+
+<var  name="MBWH_TBCSxoff" value="(MBWH_TBCSthi1+MBWH_TBCSthi2)/2." />
+
+<!--  Transversal beam, central support Position -->
+<var  name="MBWH_TBCSypos" value="MBWH_Slsypos-(.5*MBWH_SlsUPlen)*cos(MBWH_SLangle*GENV_PiS180)-MBWH_TBCShei"/>
+<var  name="MBWH_TBCSzpos" value="-MBWH_SlsIzpos/2.-MBWH_TBCSxoff"/>
+<!--  Connection beam / extremity plate position relative to Transversal beam, central support -->
+<var  name="MBWH_CBEPxpos" value="MBWH_TBCSxa1+MBWH_CBEPyb*cos(MBWH_CBEPa1*GENV_PiS180)+(MBWH_CBEPyc-MBWH_CBEPyb)/cos(MBWH_CBEPa1*GENV_PiS180)"/>
+<var  name="MBWH_CBEPypos" value="-MBWH_CBEPyb*sin(MBWH_CBEPa1*GENV_PiS180)-GENV_Eps"/>
+<var  name="MBWH_CBEPzpos" value="MBWH_TBCSthi1/2+MBWH_CBEPthic/2+GENV_Eps"/>
+<!--  extremity plate position relative to Transversal beam, central support -->
+<var  name="MBWH_EPxpos" value="MBWH_CBEPxpos+MBWH_EPl1*sin(MBWH_CBEPa1*GENV_PiS180)-0.5*MBWH_EPthic*cos(MBWH_CBEPa1*GENV_PiS180)"/>
+<var  name="MBWH_EPypos" value="MBWH_CBEPypos+MBWH_EPl1*cos(MBWH_CBEPa1*GENV_PiS180)+0.5*MBWH_EPthic*sin(MBWH_CBEPa1*GENV_PiS180)"/>
+<var  name="MBWH_EPzpos" value="MBWH_CBEPzpos-MBWH_CBEPthic/2"/>
+<!--  Reinforcing Bar relative to extremity plate position -->
+<var  name="MBWH_RBxpos" value="MBWH_EPxpos+MBWH_CRBxoff"/>
+<var  name="MBWH_RBypos" value="MBWH_EPypos+MBWH_CRByoff"/>
+<var  name="MBWH_RBzpos" value="MBWH_EPzpos+MBWH_CRBzoff"/>
+
+
+<gvxysx name="MBWH_TransvBeamCSupLargeSect1" material="Aluminium1" dZ="MBWH_TBCSthi1">
+  <gvxy_point X_Y="MBWH_TBCSxa;MBWH_TBCSya"/>
+  <gvxy_point X_Y="MBWH_TBCSxb;MBWH_TBCSyb"/>
+  <gvxy_point X_Y="MBWH_TBCSxc;MBWH_TBCSyc"/>
+</gvxysx>
+<gvxysx name="MBWH_TransvBeamCSupLargeSect2" material="Aluminium1" dZ="MBWH_TBCSthi2">
+  <gvxy_point X_Y="MBWH_TBCSxa1;MBWH_TBCSya1"/>
+  <gvxy_point X_Y="MBWH_TBCSxb1;MBWH_TBCSyb1"/>
+</gvxysx>
+
+<composition name="MBWH_TransvBeamCSupLargeSect">
+  <posXYZ volume="MBWH_TransvBeamCSupLargeSect1" />
+  <posXYZ volume="MBWH_TransvBeamCSupLargeSect2" X_Y_Z="0;0;MBWH_TBCSxoff"/>
+</composition>
+
+
+<composition name="MBWH_SpokesLargeSectorAssembly1">
+  <posXYZ volume="MBWH_SpokeLargeSectorUprofile"/>
+  <posXYZ volume="MBWH_ReinforcingBar" X_Y_Z=" MBWH_SRBpx;MBWH_SRBpy;MBWH_SlsRBpz1" rot="0.;0.;90."/>
+  <posXYZ volume="MBWH_ReinforcingBar" X_Y_Z=" MBWH_SRBpx;MBWH_SRBpy;MBWH_SlsRBpz2" rot="0.;0.;90."/>
+  <posXYZ volume="MBWH_ReinforcingBar" X_Y_Z=" MBWH_SRBpx;MBWH_SRBpy;MBWH_SlsRBpz3" rot="0.;0.;90."/>
+  <posXYZ volume="MBWH_ReinforcingBar" X_Y_Z=" MBWH_SRBpx;MBWH_SRBpy;MBWH_SlsRBpz4" rot="0.;0.;90."/>
+  <posXYZ volume="MBWH_SpokeLargeSectorUprofile"  X_Y_Z=" MBWH_SlsIxpos;MBWH_SlsIypos;MBWH_SlsIzpos"/>
+</composition>
+
+<composition name="MBWH_SpokesLargeSectorAssembly2">
+  <posXYZ volume="MBWH_SpokeLargeSectorUprofile"/>
+  <posXYZ volume="MBWH_ReinforcingBar" X_Y_Z=" MBWH_SRBpx;MBWH_SRBpy;-MBWH_SlsRBpz1" rot="0.;0.;90."/>
+  <posXYZ volume="MBWH_ReinforcingBar" X_Y_Z=" MBWH_SRBpx;MBWH_SRBpy;-MBWH_SlsRBpz2" rot="0.;0.;90."/>
+  <posXYZ volume="MBWH_ReinforcingBar" X_Y_Z=" MBWH_SRBpx;MBWH_SRBpy;-MBWH_SlsRBpz3" rot="0.;0.;90."/>
+  <posXYZ volume="MBWH_ReinforcingBar" X_Y_Z=" MBWH_SRBpx;MBWH_SRBpy;-MBWH_SlsRBpz4" rot="0.;0.;90."/>
+  <posXYZ volume="MBWH_SpokeLargeSectorUprofile"  X_Y_Z=" MBWH_SlsIxpos;MBWH_SlsIypos;-MBWH_SlsIzpos"/>
+</composition>
+
+
+<composition name="MBWH_SpokesLargeSectorAssemblyTemp1">
+  <posXYZ volume="MBWH_SpokesLargeSectorAssembly1" X_Y_Z="MBWH_SlsIxref;MBWH_Slsypos;0" rot="0.; 90.;90-MBWH_SLangle" />
+</composition>
+
+<composition name="MBWH_SpokesLargeSectorAssemblyTemp2">
+  <posXYZ volume="MBWH_SpokesLargeSectorAssembly2" X_Y_Z="-MBWH_SlsIxref;MBWH_Slsypos;0" rot="180.; 90.;90+MBWH_SLangle" />
+</composition>
+
+<composition name="MBWH_InnerAssemblyTemp1">
+  <posXYZ volume="MBWH_ConnectionBeamExtremityPlate" X_Y_Z="MBWH_CBEPxpos;MBWH_CBEPypos;MBWH_CBEPzpos" rot="0;0;90-MBWH_CBEPa1"  />
+  <posXYZ volume="MBWH_ExtremityPlate" X_Y_Z="MBWH_EPxpos;MBWH_EPypos;MBWH_EPzpos" rot="-90.; 0.;-90-MBWH_CBEPa1"  />
+  <posXYZ volume="MBWH_CentralReinforcingbar" X_Y_Z="MBWH_RBxpos;MBWH_RBypos;MBWH_RBzpos" rot="180.; 0.;-90-MBWH_CBEPa1"  />
+</composition>
+
+<composition name="MBWH_InnerAssemblyTemp2">
+  <posXYZ volume="MBWH_ConnectionBeamExtremityPlate" X_Y_Z="-MBWH_CBEPxpos;MBWH_CBEPypos;MBWH_CBEPzpos" rot="180;0;90+MBWH_CBEPa1"  />
+  <posXYZ volume="MBWH_ExtremityPlate" X_Y_Z="-MBWH_EPxpos;MBWH_EPypos;MBWH_EPzpos" rot="-90.; 0.;-90+MBWH_CBEPa1"  />
+  <posXYZ volume="MBWH_CentralReinforcingbar" X_Y_Z="-MBWH_RBxpos;MBWH_RBypos;MBWH_RBzpos" rot="0.; 0.;-90+MBWH_CBEPa1"  />
+</composition>
+
+<composition name="MBWH_InnerAssembly">
+  <posXYZ volume="MBWH_TransvBeamCSupLargeSect" X_Y_Z="0;0;0"  />
+  <posXYZ volume="MBWH_InnerAssemblyTemp1"  />
+  <posXYZ volume="MBWH_InnerAssemblyTemp2"  />
+</composition>
+
+
+
+<composition name="MBWH_LargeSector">
+  <posXYZ volume="MBWH_SpokesLargeSectorAssemblyTemp1" />
+  <posXYZ volume="MBWH_SpokesLargeSectorAssemblyTemp2" /> 
+  <posXYZ volume="MBWH_InnerAssembly" X_Y_Z="0;MBWH_TBCSypos;MBWH_TBCSzpos"/> 
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem11" X_Y_Z=" 0.;MBWH_CBLy11;0" rot="0.;90.;0."/>
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem17" X_Y_Z=" 0.;MBWH_CBLy17;0" rot="0.;90.;0."/>
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem22" X_Y_Z=" 0.;MBWH_CBLy22;0" rot="0.;90.;0."/>
+  <posXYZ volume="MBWH_CutProfilesCrossBracingLargeSectorItem26" X_Y_Z=" 0.;MBWH_CBLy26;0" rot="0.;90.;0."/>
+  
+  <posXYZ volume="MBWH_CroisillonBay1LargeSectorRot" X_Y_Z=" 0.;MBWH_Croily10;0" rot="0.;0.;0."/>
+  <posXYZ volume="MBWH_CroisillonBay2LargeSectorRot" X_Y_Z=" 0.;MBWH_Croily15;0" rot="0.;0.;0."/>
+  <posXYZ volume="MBWH_CroisillonBay3LargeSectorRot" X_Y_Z=" 0.;MBWH_Croily21;0" rot="0.;0.;0."/>
+  <posXYZ volume="MBWH_CroisillonBay4LargeSectorRot" X_Y_Z=" 0.;MBWH_Croily25+20;0" rot="0.;0.;0."/>
+</composition>
+
+
+
+<!--  
+      **************************************************************
+      ***                                                       ****
+      ***                      Small Sector                     ****
+      ***                                                       ****
+      **************************************************************
+-->
+
+<!--  ATLMHHBM0100 -->
+<!--  Cut profiles Cross Bracing small sector -->
+<var  name="MBWH_CBSthi" value="6"/>
+
+<!--  Contreventements lengths -->
+<!--  item numbering in ATLMHHBM0003 -->
+<var  name="MBWH_CBSl10"  value="1650" />  <!-- item 10 -->
+<var  name="MBWH_CBSl14"  value="1050" />  <!-- item 14 -->
+<var  name="MBWH_CBSl18a" value="533" />   <!-- item 18 -->
+<var  name="MBWH_CBSl18b" value="510" />   <!-- item 18 -->
+
+<!--  Contreventements positions (...to be confirmed...) -->
+<var  name="MBWH_CBSy10"  value="9730" />  <!-- item 10 -->
+<var  name="MBWH_CBSy14"  value="7760" />  <!-- item 14 -->
+<var  name="MBWH_CBSy18"  value="5820" />  <!-- item 18 -->
+
+<!--  item numbering in ATLMHHBM0003 -->
+<!--  Cross bracing, bay 1 small sector -->
+<var  name="MBWH_CBSl9"   value="2625"/>  <!-- item  9 --> <!-- drawing ATLMHHBM0047 -->
+<!--  Cross bracing, bay 2 small sector -->
+<var  name="MBWH_CBSl11"  value="2360"/>  <!-- item 11 --> <!-- drawing ATLMHHBM0049 -->
+<!--  Cross bracing, bay 3 small sector -->
+<var  name="MBWH_CBSl15"  value="2025"/>  <!-- item 15 --> <!-- drawing ATLMHHBM0052 -->
+
+<!--  item numbering in ATLMHHBM0003 -->
+<!--  Contreventements, bay 1 small sector -->
+<var  name="MBWH_CBSl7"   value="1430"/>  <!--  item  7 --> <!-- drawing ATLMHHBM0100 -->
+<var  name="MBWH_CBSl8"   value="1120"/>  <!--  item  8 --> <!-- drawing ATLMHHBM0100 -->
+<var  name="MBWH_CBSb1xof" value="6"/>  <!--  x offset item  7 & 8 , to be confirmed - see drawing ATLMHHBM0003 -->
+<var  name="MBWH_CBSb1yof" value="2"/>  <!--  y offset item  7 & 8 , to be confirmed - see drawing ATLMHHBM0003 -->
+
+<!--  Contreventements, bay 2 small sector -->
+<var  name="MBWH_CBSl12"  value="1360"/>  <!--  item 12 --> <!-- drawing ATLMHHBM0100 -->
+<var  name="MBWH_CBSl13"  value="890"/>   <!--  item 13 --> <!-- drawing ATLMHHBM0100 -->
+
+<!--  Contreventements, bay 3 small sector -->
+<var  name="MBWH_CBSl16"  value="1260"/>  <!--  item 16 --> <!-- drawing ATLMHHBM0100 -->
+<var  name="MBWH_CBSl17"  value="600"/>   <!--  item 17 --> <!-- drawing ATLMHHBM0100 -->
+<var  name="MBWH_CBSb3xof" value="8"/>  <!--  x offset item 16 & 17, to be confirmed - see drawing ATLMHHBM0003 -->
+<var  name="MBWH_CBSb3yof" value="2"/>  <!--  y offset item 16 & 17, to be confirmed - see drawing ATLMHHBM0003 -->
+
+<!--  Plates --> 
+ <!--  item 9 for Bay 1 --> <!--  drawing ATLMHHBM0057 -->
+<var  name="MBWH_CBPS9le" value="300"/>    <!-- length -->
+<var  name="MBWH_CBPS9wi" value="270"/>    <!-- width -->
+<var  name="MBWH_CBPS9cu" value="60"/>     <!-- cut -->
+<var  name="MBWH_CBPS9ti" value="41.2"/>   <!-- tilt -->       <!-- ????????????? -->
+<var  name="MBWH_CBPS9za" value="1311"/>   <!-- Plate offset -->
+<var  name="MBWH_CBPS9ya" value="-13.3"/>   <!-- Plate offset -->
+ <!--  item 11 for Bay 2 --> <!--  drawing ATLMHHBM0049 -->
+<var  name="MBWH_CBPS11le" value="260"/>   <!-- length -->
+<var  name="MBWH_CBPS11wi" value="300"/>   <!-- width -->
+<var  name="MBWH_CBPS11cu" value="20"/>    <!-- cut -->
+<var  name="MBWH_CBPS11ti" value="52.9"/>  <!-- tilt -->       <!-- ????????????? -->
+<var  name="MBWH_CBPS11za" value="764.9"/> <!-- Plate offset -->
+<var  name="MBWH_CBPS11ya" value="32.1"/>  <!-- Plate offset w.r.t base -->
+ <!--  item 15 for Bay 3 --> <!--  drawing ATLMHHBM0052 -->
+<var  name="MBWH_CBPS15le" value="200"/>   <!-- length -->
+<var  name="MBWH_CBPS15wi" value="380"/>   <!-- width -->
+<var  name="MBWH_CBPS15cu" value="20"/>    <!-- cut -->
+<var  name="MBWH_CBPS15ti" value="65.5"/>  <!-- tilt -->       <!-- ????????????? -->
+<var  name="MBWH_CBPS15za" value="473.8"/> <!-- Plate offset -->
+<var  name="MBWH_CBPS15ya" value="26"/>    <!-- Plate offset -->
+
+<!--  positions (... measured on ATLMHHBM003 ... to be confirmed ...) -->
+<var  name="MBWH_Croisy9" value="10550"/> <!--  item 9 --> 
+<var  name="MBWH_Croisy11" value="8580"/>  <!--  item 11 --> 
+<var  name="MBWH_Croisy15" value="6520"/>  <!--  item 15 --> 
+
+<!--  Special Cut profiles cross bracing small sector item 18-->
+<!--  ATLMHHBM0067-->
+<var  name="MBWH_CBext18" value="138"/>
+<var  name="MBWH_CBhei18" value="35"/>
+<var  name="MBWH_CBSthi18" value="5"/>
+
+
+<!--  ATLMHHBM0003B -->
+<!--  Spokes Opening angle small sector -->
+<var  name="MBWH_SSangle" value="8.5"/>
+<!--  Y-ref -->
+<var  name="MBWH_yref"   value="1682.7"/>
+<!--  Inner spoke y position wrt ref -->
+<var  name="MBWH_SIypos" value="2252.8"/>
+<!--  External spoke y position wrt ref -->
+<var  name="MBWH_SEypos" value="280.7"/>
+
+<!--  Spoke small sector -->
+<!--  Inner spoke small sector  ATLMHHBM0085 -->
+<!--  External spoke small sector  ATLMHHBM0086 & ATLMHHBM0087 -->
+
+<!--  ATLMHHBM0085 ... --> 
+<!--  U profile length Inner spoke -->
+<var  name="MBWH_SsiUPlen"  value="7680"/>   
+<!--  U profile length External spoke -->
+<var  name="MBWH_SseUPlen"  value="9530"/>   
+<!--  U profile Inner spoke extremity cut height -->
+<var  name="MBWH_SsiUPhcu"  value="12"/>   
+
+
+<!--  ATLMHHBM0085 -->
+<!--  relative positions of reinforcing bars -->
+<var name="MBWH_SssRBdz1" value="2575"/>
+<var name="MBWH_SssRBdz2" value="2055"/>
+<var name="MBWH_SssRBdz3" value="2250"/>
+
+<!--  Spoke Reinforcing Bar 1 and 2 -->
+<var name="MBWH_SRBthi" value="25"/>
+
+<!--  ATLMHHBM0054 -->
+<!--  Spoke Reinforcing Bar 1 -->
+<var name="MBWH_SRB1dx1" value="962"/>
+<var name="MBWH_SRB1dx2" value="1765"/>
+<var name="MBWH_SRB1dx3" value="81"/>
+<var name="MBWH_SRB1dx4" value="1712"/>
+<var name="MBWH_SRB1dy1" value="150"/>
+<var name="MBWH_SRB1dy2" value="440"/>
+<var name="MBWH_SRB1dy3" value="180"/>
+<var name="MBWH_SRB1alph" value="39"/>
+<var name="MBWH_SRB1ypos" value="2910"/>
+
+<!--  ATLMHHBM0058 -->
+<!--  Spoke Reinforcing Bar 2 -->
+<var name="MBWH_SRB2dx1" value="2474"/>
+<var name="MBWH_SRB2dx2" value="2429"/>
+<var name="MBWH_SRB2dy"  value="152"/>
+<var name="MBWH_SRB2ypos" value="5020"/>
+
+
+<!--  Cut profiles cross bracing small sector -->
+<!--  Derived variables -->
+<var  name="MBWH_CBSxa"  value="MBWH_CBext/2." />
+<var  name="MBWH_CBSya"  value="0." />
+<var  name="MBWH_CBSxb"  value="MBWH_CBSxa" />
+<var  name="MBWH_CBSyb"  value="MBWH_CBhei" />
+<var  name="MBWH_CBSxc"  value="MBWH_CBSxb-MBWH_CBSthi" />
+<var  name="MBWH_CBSyc"  value="MBWH_CBSyb" />
+<var  name="MBWH_CBSxd"  value="MBWH_CBSxc" />
+<var  name="MBWH_CBSyd"  value="MBWH_CBSthi" />
+<!--  Derived variables for special item 18 -->
+<var  name="MBWH_CBS18xa"  value="MBWH_CBext18/2." />
+<var  name="MBWH_CBS18ya"  value="0." />
+<var  name="MBWH_CBS18xb"  value="MBWH_CBS18xa" />
+<var  name="MBWH_CBS18yb"  value="MBWH_CBhei18" />
+<var  name="MBWH_CBS18xc"  value="MBWH_CBS18xb-MBWH_CBSthi18" />
+<var  name="MBWH_CBS18yc"  value="MBWH_CBS18yb" />
+<var  name="MBWH_CBS18xd"  value="MBWH_CBS18xc" />
+<var  name="MBWH_CBS18yd"  value="MBWH_CBSthi18" />
+
+<var  name="MBWH_CBSy18b"  value="MBWH_CBSy18-MBWH_CBhei18" />
+
+<!--  Modelization -->
+
+<gvxysx name="MBWH_CutProfilesCrossBracingSmallSectorItem10" material="Aluminium1" dZ="MBWH_CBSl10">
+  <gvxy_point X_Y="MBWH_CBSxa;MBWH_CBSya"/>
+  <gvxy_point X_Y="MBWH_CBSxb;MBWH_CBSyb"/>
+  <gvxy_point X_Y="MBWH_CBSxc;MBWH_CBSyc"/>
+  <gvxy_point X_Y="MBWH_CBSxd;MBWH_CBSyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingSmallSectorItem14" material="Aluminium1" dZ="MBWH_CBSl14">
+  <gvxy_point X_Y="MBWH_CBSxa;MBWH_CBSya"/>
+  <gvxy_point X_Y="MBWH_CBSxb;MBWH_CBSyb"/>
+  <gvxy_point X_Y="MBWH_CBSxc;MBWH_CBSyc"/>
+  <gvxy_point X_Y="MBWH_CBSxd;MBWH_CBSyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingSmallSectorItem18a" material="Aluminium1" dZ="MBWH_CBSl18a">
+  <gvxy_point X_Y="MBWH_CBSxa;MBWH_CBSya"/>
+  <gvxy_point X_Y="MBWH_CBSxb;MBWH_CBSyb"/>
+  <gvxy_point X_Y="MBWH_CBSxc;MBWH_CBSyc"/>
+  <gvxy_point X_Y="MBWH_CBSxd;MBWH_CBSyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingSmallSectorItem18b" material="Aluminium1" dZ="MBWH_CBSl18b">
+  <gvxy_point X_Y="MBWH_CBS18xa;MBWH_CBS18ya"/>
+  <gvxy_point X_Y="MBWH_CBS18xb;MBWH_CBS18yb"/>
+  <gvxy_point X_Y="MBWH_CBS18xc;MBWH_CBS18yc"/>
+  <gvxy_point X_Y="MBWH_CBS18xd;MBWH_CBS18yd"/>
+</gvxysx>
+
+<gvxysx name="MBWH_CutProfilesCrossBracingSmallSectorItem9" material="Aluminium1" dZ="MBWH_CBSl9">
+  <gvxy_point X_Y="MBWH_CBSxa;MBWH_CBSya"/>
+  <gvxy_point X_Y="MBWH_CBSxb;MBWH_CBSyb"/>
+  <gvxy_point X_Y="MBWH_CBSxc;MBWH_CBSyc"/>
+  <gvxy_point X_Y="MBWH_CBSxd;MBWH_CBSyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingSmallSectorItem11" material="Aluminium1" dZ="MBWH_CBSl11">
+  <gvxy_point X_Y="MBWH_CBSxa;MBWH_CBSya"/>
+  <gvxy_point X_Y="MBWH_CBSxb;MBWH_CBSyb"/>
+  <gvxy_point X_Y="MBWH_CBSxc;MBWH_CBSyc"/>
+  <gvxy_point X_Y="MBWH_CBSxd;MBWH_CBSyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingSmallSectorItem15" material="Aluminium1" dZ="MBWH_CBSl15">
+  <gvxy_point X_Y="MBWH_CBSxa;MBWH_CBSya"/>
+  <gvxy_point X_Y="MBWH_CBSxb;MBWH_CBSyb"/>
+  <gvxy_point X_Y="MBWH_CBSxc;MBWH_CBSyc"/>
+  <gvxy_point X_Y="MBWH_CBSxd;MBWH_CBSyd"/>
+</gvxysx>
+
+
+<!--  Contreventements, bay 1 small sector -->
+<gvxysx name="MBWH_CutProfilesCrossBracingSmallSectorItem7" material="Aluminium1" dZ="MBWH_CBSl7">
+  <gvxy_point X_Y="MBWH_CBSxa;MBWH_CBSya"/>
+  <gvxy_point X_Y="MBWH_CBSxb;MBWH_CBSyb"/>
+  <gvxy_point X_Y="MBWH_CBSxc;MBWH_CBSyc"/>
+  <gvxy_point X_Y="MBWH_CBSxd;MBWH_CBSyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingSmallSectorItem8" material="Aluminium1" dZ="MBWH_CBSl8">
+  <gvxy_point X_Y="MBWH_CBSxa;MBWH_CBSya"/>
+  <gvxy_point X_Y="MBWH_CBSxb;MBWH_CBSyb"/>
+  <gvxy_point X_Y="MBWH_CBSxc;MBWH_CBSyc"/>
+  <gvxy_point X_Y="MBWH_CBSxd;MBWH_CBSyd"/>
+</gvxysx>
+
+<!--  Contreventements, bay 2 small sector -->
+<gvxysx name="MBWH_CutProfilesCrossBracingSmallSectorItem12" material="Aluminium1" dZ="MBWH_CBSl12">
+  <gvxy_point X_Y="MBWH_CBSxa;MBWH_CBSya"/>
+  <gvxy_point X_Y="MBWH_CBSxb;MBWH_CBSyb"/>
+  <gvxy_point X_Y="MBWH_CBSxc;MBWH_CBSyc"/>
+  <gvxy_point X_Y="MBWH_CBSxd;MBWH_CBSyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingSmallSectorItem13" material="Aluminium1" dZ="MBWH_CBSl13">
+  <gvxy_point X_Y="MBWH_CBSxa;MBWH_CBSya"/>
+  <gvxy_point X_Y="MBWH_CBSxb;MBWH_CBSyb"/>
+  <gvxy_point X_Y="MBWH_CBSxc;MBWH_CBSyc"/>
+  <gvxy_point X_Y="MBWH_CBSxd;MBWH_CBSyd"/>
+</gvxysx>
+
+<!--  Contreventements, bay 3 small sector -->
+<gvxysx name="MBWH_CutProfilesCrossBracingSmallSectorItem16" material="Aluminium1" dZ="MBWH_CBSl16">
+  <gvxy_point X_Y="MBWH_CBSxa;MBWH_CBSya"/>
+  <gvxy_point X_Y="MBWH_CBSxb;MBWH_CBSyb"/>
+  <gvxy_point X_Y="MBWH_CBSxc;MBWH_CBSyc"/>
+  <gvxy_point X_Y="MBWH_CBSxd;MBWH_CBSyd"/>
+</gvxysx>
+<gvxysx name="MBWH_CutProfilesCrossBracingSmallSectorItem17" material="Aluminium1" dZ="MBWH_CBSl17">
+  <gvxy_point X_Y="MBWH_CBSxa;MBWH_CBSya"/>
+  <gvxy_point X_Y="MBWH_CBSxb;MBWH_CBSyb"/>
+  <gvxy_point X_Y="MBWH_CBSxc;MBWH_CBSyc"/>
+  <gvxy_point X_Y="MBWH_CBSxd;MBWH_CBSyd"/>
+</gvxysx>
+
+
+
+<!--  cross bracing Plates small sector -->
+
+<!--  Bay 1 -->
+<var  name="MBWH_CBPS9x1"  value="MBWH_CBPS9le/2." />
+<var  name="MBWH_CBPS9y1"  value="MBWH_CBPS9wi/2.-MBWH_CBPS9cu" />
+<var  name="MBWH_CBPS9x2"  value="MBWH_CBPS9x1-MBWH_CBPS9cu" />
+<var  name="MBWH_CBPS9y2"  value="MBWH_CBPS9wi/2." />
+<gvxysxy name="MBWH_CrossBracingPlateSmallSectorItem9" material="Aluminium1" dZ="MBWH_CBPth">
+  <gvxy_point X_Y="MBWH_CBPS9x1;MBWH_CBPS9y1"/>
+  <gvxy_point X_Y="MBWH_CBPS9x2;MBWH_CBPS9y2"/>
+</gvxysxy>
+
+<!--  Bay 2 -->
+<var  name="MBWH_CBPS11x1"  value="MBWH_CBPS11le/2." />
+<var  name="MBWH_CBPS11y1"  value="MBWH_CBPS11wi/2.-MBWH_CBPS11cu" />
+<var  name="MBWH_CBPS11x2"  value="MBWH_CBPS11x1-MBWH_CBPS11cu" />
+<var  name="MBWH_CBPS11y2"  value="MBWH_CBPS11wi/2." />
+<gvxysxy name="MBWH_CrossBracingPlateSmallSectorItem11" material="Aluminium1" dZ="MBWH_CBPth">
+  <gvxy_point X_Y="MBWH_CBPS11x1;MBWH_CBPS11y1"/>
+  <gvxy_point X_Y="MBWH_CBPS11x2;MBWH_CBPS11y2"/>
+</gvxysxy>
+
+<!--  Bay 3 -->
+<var  name="MBWH_CBPS15x1"  value="MBWH_CBPS15le/2." />
+<var  name="MBWH_CBPS15y1"  value="MBWH_CBPS15wi/2.-MBWH_CBPS15cu" />
+<var  name="MBWH_CBPS15x2"  value="MBWH_CBPS15x1-MBWH_CBPS15cu" />
+<var  name="MBWH_CBPS15y2"  value="MBWH_CBPS15wi/2." />
+<gvxysxy name="MBWH_CrossBracingPlateSmallSectorItem15" material="Aluminium1" dZ="MBWH_CBPth">
+  <gvxy_point X_Y="MBWH_CBPS15x1;MBWH_CBPS15y1"/>
+  <gvxy_point X_Y="MBWH_CBPS15x2;MBWH_CBPS15y2"/>
+</gvxysxy>
+
+
+<!-- Bay 1 -->
+<var  name="MBWH_CBS9z" value="MBWH_CBSl9/2." />
+<var  name="MBWH_CBPS9d"  value="MBWH_CBPS9wi-2.*MBWH_CBPS9cu" />
+<var  name="MBWH_CBPS9zb" value="MBWH_CBPS9za+sin(MBWH_CBPS9ti*GENV_PiS180)*MBWH_CBPS9d/2." />
+<var  name="MBWH_CBPS9ya" value="MBWH_CBPS9cu*sqrt(2.)*cos((45-MBWH_CBPS9ti)*GENV_PiS180)  -MBWH_CBhei+MBWH_CBPS9ya" />
+<var  name="MBWH_CBPS9yb" value="-MBWH_CBPS9ya-cos(MBWH_CBPS9ti*GENV_PiS180)*MBWH_CBPS9d/2." />
+<var  name="MBWH_CBPS9zc" value="MBWH_CBPS9zb+cos(MBWH_CBPS9ti*GENV_PiS180)*MBWH_CBPS9le/2" />
+<var  name="MBWH_CBPS9yc" value="MBWH_CBPS9yb+sin(MBWH_CBPS9ti*GENV_PiS180)*MBWH_CBPS9le/2" />
+  <!-- get positions of contreventements 7,8 using locations of item 9 extremities -->
+<var  name="MBWH_cvs9xo" value="-MBWH_CBPS9zc*cos(MBWH_CBPS9ti*GENV_PiS180)-0.5*(MBWH_CBhei)*sin(MBWH_CBPS9ti*GENV_PiS180)" />
+<var  name="MBWH_cvs9yo" value=" MBWH_CBPS9zc*sin(MBWH_CBPS9ti*GENV_PiS180)-0.5*(MBWH_CBhei)*cos(MBWH_CBPS9ti*GENV_PiS180)" />
+<var  name="MBWH_cvs9xu" value="MBWH_cvs9xo+MBWH_CBSl9*cos(MBWH_CBPS9ti*GENV_PiS180)" />
+<var  name="MBWH_cvs9yu" value="MBWH_cvs9yo-MBWH_CBSl9*sin(MBWH_CBPS9ti*GENV_PiS180)" />
+<var  name="MBWH_cvsx8"   value="-MBWH_cvs9xu+cos(MBWH_CBPS9ti*GENV_PiS180)*MBWH_CBSl8/2.-MBWH_CBSb1xof" />
+<var  name="MBWH_cvsy8"   value=" MBWH_cvs9yu+sin(MBWH_CBPS9ti*GENV_PiS180)*MBWH_CBSl8/2.-MBWH_CBSb1yof" />
+<var  name="MBWH_cvsx7"   value="-MBWH_cvs9xo-cos(MBWH_CBPS9ti*GENV_PiS180)*MBWH_CBSl7/2.-MBWH_CBSb1xof" />
+<var  name="MBWH_cvsy7"   value=" MBWH_cvs9yo-sin(MBWH_CBPS9ti*GENV_PiS180)*MBWH_CBSl7/2.-MBWH_CBSb1yof" />
+
+<composition name="MBWH_CrossBracingPlateSmallSectorItem9Rot">
+  <posXYZ volume="MBWH_CrossBracingPlateSmallSectorItem9" rot="0.;90.;0" />
+</composition>
+<composition name="MBWH_CrossBracingBay1SmallSector">
+  <posXYZ volume="MBWH_CutProfilesCrossBracingSmallSectorItem9" X_Y_Z="0;0;MBWH_CBS9z" />
+  <posXYZ volume="MBWH_CrossBracingPlateSmallSectorItem9Rot" X_Y_Z="-MBWH_CBPx;MBWH_CBPS9yc;MBWH_CBPS9zc" rot="-MBWH_CBPS9ti;0;0" />
+  <posXYZ volume="MBWH_CrossBracingPlateSmallSectorItem9Rot" X_Y_Z=" MBWH_CBPx;MBWH_CBPS9yc;MBWH_CBPS9zc" rot="-MBWH_CBPS9ti;0;0"/>
+</composition>
+<composition name="MBWH_CroisillonBay1SmallSector">
+ <posXYZ volume="MBWH_CrossBracingBay1SmallSector" X_Y_Z="0;-MBWH_CBPS9yc;-MBWH_CBPS9zc"  /> 
+</composition>
+<composition name="MBWH_CroisillonBay1SmallSectorRot">
+  <posXYZ volume="MBWH_CroisillonBay1SmallSector" rot="MBWH_CBPS9ti;90;0" />
+  <posXYZ volume="MBWH_CutProfilesCrossBracingSmallSectorItem7" X_Y_Z="MBWH_cvsx7;MBWH_cvsy7;0" rot="-MBWH_CBPS9ti;90;0" />
+  <posXYZ volume="MBWH_CutProfilesCrossBracingSmallSectorItem8" X_Y_Z="MBWH_cvsx8;MBWH_cvsy8;0" rot="-MBWH_CBPS9ti;90;0" />
+</composition>
+
+<!-- Bay 2 -->
+<var  name="MBWH_CBS11z" value="MBWH_CBSl11/2." />
+<var  name="MBWH_CBPS11d"  value="MBWH_CBPS11le-2.*MBWH_CBPS11cu" />
+<var  name="MBWH_CBPS11zb" value="MBWH_CBPS11za+cos(MBWH_CBPS11ti*GENV_PiS180)*MBWH_CBPS11d/2." />
+<var  name="MBWH_CBPS11yb" value="MBWH_CBPS11ya+sin(MBWH_CBPS11ti*GENV_PiS180)*MBWH_CBPS11d/2." />
+<var  name="MBWH_CBPS11zc" value="MBWH_CBPS11zb+sin(MBWH_CBPS11ti*GENV_PiS180)*MBWH_CBPS11wi/2" />
+<var  name="MBWH_CBPS11yc" value="MBWH_CBPS11yb-cos(MBWH_CBPS11ti*GENV_PiS180)*MBWH_CBPS11wi/2" />
+  <!-- get positions of contreventements 13, 12 using locations of item 11 extremities -->
+<var  name="MBWH_cvs11xo" value="-(MBWH_CBSl11-MBWH_CBPS11zc)*cos(MBWH_CBPS11ti*GENV_PiS180)-(MBWH_CBhei-MBWH_CBPS11yc)*sin(MBWH_CBPS11ti*GENV_PiS180)"/>
+<var  name="MBWH_cvs11yo" value=" (MBWH_CBSl11-MBWH_CBPS11zc)*sin(MBWH_CBPS11ti*GENV_PiS180)-(MBWH_CBhei-MBWH_CBPS11yc)*cos(MBWH_CBPS11ti*GENV_PiS180)"/>
+<var  name="MBWH_cvs11xu" value="MBWH_cvs11xo+MBWH_CBSl11*cos(MBWH_CBPS11ti*GENV_PiS180)" />
+<var  name="MBWH_cvs11yu" value="MBWH_cvs11yo-MBWH_CBSl11*sin(MBWH_CBPS11ti*GENV_PiS180)" />
+<var  name="MBWH_cvsx13"  value="-MBWH_cvs11xu+cos(MBWH_CBPS11ti*GENV_PiS180)*MBWH_CBSl13/2." />
+<var  name="MBWH_cvsy13"  value=" MBWH_cvs11yu+sin(MBWH_CBPS11ti*GENV_PiS180)*MBWH_CBSl13/2." />
+<var  name="MBWH_cvsx12"  value="-MBWH_cvs11xo-cos(MBWH_CBPS11ti*GENV_PiS180)*MBWH_CBSl12/2." />
+<var  name="MBWH_cvsy12"  value=" MBWH_cvs11yo-sin(MBWH_CBPS11ti*GENV_PiS180)*MBWH_CBSl12/2." />
+
+<composition name="MBWH_CrossBracingPlateSmallSectorItem11Rot">
+  <posXYZ volume="MBWH_CrossBracingPlateSmallSectorItem11" rot="0.;90.;0" />
+</composition>
+<composition name="MBWH_CrossBracingBay2SmallSector">
+  <posXYZ volume="MBWH_CutProfilesCrossBracingSmallSectorItem11" X_Y_Z="0;MBWH_CBhei;MBWH_CBS11z"  rot="0.;0.;180" />
+  <posXYZ volume="MBWH_CrossBracingPlateSmallSectorItem11Rot" X_Y_Z="-MBWH_CBPx;MBWH_CBPS11yc;MBWH_CBPS11zc" rot="-MBWH_CBPS11ti;0;0" />
+  <posXYZ volume="MBWH_CrossBracingPlateSmallSectorItem11Rot" X_Y_Z=" MBWH_CBPx;MBWH_CBPS11yc;MBWH_CBPS11zc" rot="-MBWH_CBPS11ti;0;0"/>
+</composition>
+
+<composition name="MBWH_CroisillonBay2SmallSector">
+  <posXYZ volume="MBWH_CrossBracingBay2SmallSector" X_Y_Z="0;-MBWH_CBPS11yc;-MBWH_CBPS11zc"  />
+</composition>
+<composition name="MBWH_CroisillonBay2SmallSectorRot">
+  <posXYZ volume="MBWH_CroisillonBay2SmallSector" rot="MBWH_CBPS11ti;90;180" />
+  <posXYZ volume="MBWH_CutProfilesCrossBracingSmallSectorItem13" X_Y_Z="MBWH_cvsx13;MBWH_cvsy13;0" rot="-MBWH_CBPS11ti;90;0" />
+  <posXYZ volume="MBWH_CutProfilesCrossBracingSmallSectorItem12" X_Y_Z="MBWH_cvsx12;MBWH_cvsy12;0" rot="-MBWH_CBPS11ti;90;0" />
+</composition>
+
+
+
+<!-- Bay 3 -->
+<var  name="MBWH_CBS15z" value="MBWH_CBSl15/2." />
+<var  name="MBWH_CBPS15d"  value="MBWH_CBPS15le-2.*MBWH_CBPS15cu" />
+<var  name="MBWH_CBPS15zb" value="MBWH_CBPS15za+cos(MBWH_CBPS15ti*GENV_PiS180)*MBWH_CBPS15d/2." />
+<var  name="MBWH_CBPS15yb" value="MBWH_CBPS15ya+sin(MBWH_CBPS15ti*GENV_PiS180)*MBWH_CBPS15d/2." />
+<var  name="MBWH_CBPS15zc" value="MBWH_CBPS15zb+sin(MBWH_CBPS15ti*GENV_PiS180)*MBWH_CBPS15wi/2" />
+<var  name="MBWH_CBPS15yc" value="MBWH_CBPS15yb-cos(MBWH_CBPS15ti*GENV_PiS180)*MBWH_CBPS15wi/2" />
+  <!-- get positions of contreventements 16, 17 using locations of item 15 extremities -->
+<var  name="MBWH_cvs15xo" value="-(MBWH_CBSl15-MBWH_CBPS15zc)*cos(MBWH_CBPS15ti*GENV_PiS180)-(MBWH_CBhei-MBWH_CBPS15yc)*sin(MBWH_CBPS15ti*GENV_PiS180)"/>
+<var  name="MBWH_cvs15yo" value=" (MBWH_CBSl15-MBWH_CBPS15zc)*sin(MBWH_CBPS15ti*GENV_PiS180)-(MBWH_CBhei-MBWH_CBPS15yc)*cos(MBWH_CBPS15ti*GENV_PiS180)"/>
+<var  name="MBWH_cvs15xu" value="MBWH_cvs15xo+MBWH_CBSl15*cos(MBWH_CBPS15ti*GENV_PiS180)" />
+<var  name="MBWH_cvs15yu" value="MBWH_cvs15yo-MBWH_CBSl15*sin(MBWH_CBPS15ti*GENV_PiS180)" />
+<var  name="MBWH_cvsx17"  value="-MBWH_cvs15xu+cos(MBWH_CBPS15ti*GENV_PiS180)*MBWH_CBSl17/2.-MBWH_CBSb3xof" />
+<var  name="MBWH_cvsy17"  value=" MBWH_cvs15yu+sin(MBWH_CBPS15ti*GENV_PiS180)*MBWH_CBSl17/2.-MBWH_CBSb3yof" />
+<var  name="MBWH_cvsx16"  value="-MBWH_cvs15xo-cos(MBWH_CBPS15ti*GENV_PiS180)*MBWH_CBSl16/2.-MBWH_CBSb3xof" />
+<var  name="MBWH_cvsy16"  value=" MBWH_cvs15yo-sin(MBWH_CBPS15ti*GENV_PiS180)*MBWH_CBSl16/2.-MBWH_CBSb3yof" />
+
+<composition name="MBWH_CrossBracingPlateSmallSectorItem15Rot">
+  <posXYZ volume="MBWH_CrossBracingPlateSmallSectorItem15" rot="0.;90.;0" />
+</composition>
+<composition name="MBWH_CrossBracingBay3SmallSector">
+  <posXYZ volume="MBWH_CutProfilesCrossBracingSmallSectorItem15" X_Y_Z="0;MBWH_CBhei;MBWH_CBS15z"  rot="0.;0.;180" />
+  <posXYZ volume="MBWH_CrossBracingPlateSmallSectorItem15Rot" X_Y_Z="-MBWH_CBPx;MBWH_CBPS15yc;MBWH_CBPS15zc" rot="-MBWH_CBPS15ti;0;0" />
+  <posXYZ volume="MBWH_CrossBracingPlateSmallSectorItem15Rot" X_Y_Z=" MBWH_CBPx;MBWH_CBPS15yc;MBWH_CBPS15zc" rot="-MBWH_CBPS15ti;0;0"/>
+</composition>
+
+<composition name="MBWH_CroisillonBay3SmallSector">
+  <posXYZ volume="MBWH_CrossBracingBay3SmallSector" X_Y_Z="0;-MBWH_CBPS15yc;-MBWH_CBPS15zc"  />
+</composition>
+<composition name="MBWH_CroisillonBay3SmallSectorRot">
+  <posXYZ volume="MBWH_CroisillonBay3SmallSector" rot="MBWH_CBPS15ti;90;180" />
+  <posXYZ volume="MBWH_CutProfilesCrossBracingSmallSectorItem16" X_Y_Z="MBWH_cvsx16;MBWH_cvsy16;0" rot="-MBWH_CBPS15ti;90;0" />
+  <posXYZ volume="MBWH_CutProfilesCrossBracingSmallSectorItem17" X_Y_Z="MBWH_cvsx17;MBWH_cvsy17;0" rot="-MBWH_CBPS15ti;90;0" />
+</composition>
+
+
+
+
+
+
+<!--  Derived variables -->
+<!--  positions of reinforcing bars -->
+<var name="MBWH_SssRBpz1" value="MBWH_SsiUPlen/2.-MBWH_SssRBdz1-MBWH_SRBhos/2."/>
+<var name="MBWH_SssRBpz2" value="MBWH_SssRBpz1-MBWH_SssRBdz2"/>
+<var name="MBWH_SssRBpz3" value="MBWH_SssRBpz2-MBWH_SssRBdz3"/>
+
+<!--  Relative positions of spokes -->
+<var  name="MBWH_SssIxpos" value="MBWH_SRBpx+MBWH_SUPext/2.+MBWH_RBBthi+MBWH_RBSthi/2." />
+<var  name="MBWH_SssIypos" value="-MBWH_RBSlen+MBWH_RBBsiz" />
+<var  name="MBWH_SssIzof1" value="-(MBWH_SseUPlen-MBWH_SsiUPlen)/2." />
+<var  name="MBWH_SssIzof2" value=" MBWH_SssIypos*tan(MBWH_SSangle*GENV_PiS180)+(MBWH_SIypos-MBWH_SEypos)/cos(MBWH_SSangle*GENV_PiS180)" />
+<var  name="MBWH_SssIzpos" value="MBWH_SssIzof1+MBWH_SssIzof2" />
+
+<!--  inner spokes position -->
+<var  name="MBWH_SssIxref" value="0.5*MBWH_SsiUPlen*sin(MBWH_SSangle*GENV_PiS180)+(MBWH_SUPhei-MBWH_SsiUPhcu)*cos(MBWH_SSangle*GENV_PiS180)"/>
+<var  name="MBWH_Sssypos" value="MBWH_yref+MBWH_SIypos+0.5*MBWH_SsiUPlen*cos(MBWH_SSangle*GENV_PiS180) "/>
+
+<!--  Inner spoke small sector -->
+
+<gvxysx name="MBWH_InnerSpokeSmallSectorUprofile" material="Aluminium4" dZ="MBWH_SsiUPlen-180">
+  <gvxy_point X_Y="MBWH_SUPxa;MBWH_SUPya"/>
+  <gvxy_point X_Y="MBWH_SUPxb;MBWH_SUPyb"/>
+  <gvxy_point X_Y="MBWH_SUPxc;MBWH_SUPyc"/>
+  <gvxy_point X_Y="MBWH_SUPxd;MBWH_SUPyd"/>
+</gvxysx>
+
+<!--  External spoke small sector -->
+
+<gvxysx name="MBWH_ExternalSpokeSmallSectorUprofile" material="Aluminium4" dZ="MBWH_SseUPlen">
+  <gvxy_point X_Y="MBWH_SUPxa;MBWH_SUPya"/>
+  <gvxy_point X_Y="MBWH_SUPxb;MBWH_SUPyb"/>
+  <gvxy_point X_Y="MBWH_SUPxc;MBWH_SUPyc"/>
+  <gvxy_point X_Y="MBWH_SUPxd;MBWH_SUPyd"/>
+</gvxysx>
+
+<!--  Spoke Reinforcing Bar 1 -->
+<var  name="MBWH_SRB1x1" value="MBWH_SRB1dx1/2"/>
+<var  name="MBWH_SRB1y1" value="0"/>
+<var  name="MBWH_SRB1x3" value="MBWH_SRB1dx2/2"/>
+<var  name="MBWH_SRB1y3" value="MBWH_SRB1dy3-MBWH_SRB1dy2"/>
+<var  name="MBWH_SRB1x2" value="MBWH_SRB1x3-MBWH_SRB1dx3"/>
+<var  name="MBWH_SRB1y2" value="MBWH_SRB1y3"/>
+<var  name="MBWH_SRB1x4" value="MBWH_SRB1dx4/2"/>
+<var  name="MBWH_SRB1y4" value="-MBWH_SRB1dy2"/>
+<var  name="MBWH_SRB1x6" value="MBWH_SRB1x1-MBWH_SRB1dy1*tan(0.5*MBWH_SRB1alph*GENV_PiS180)"/>
+<var  name="MBWH_SRB1y6" value="-MBWH_SRB1dy1"/>
+<var  name="MBWH_SRB1x5" value="MBWH_SRB1x6+(MBWH_SRB1dy2-MBWH_SRB1dy1)/tan(MBWH_SRB1alph*GENV_PiS180)"/>
+<var  name="MBWH_SRB1y5" value="MBWH_SRB1y4"/>
+
+<var  name="MBWH_SRB1zpos" value="MBWH_SssIxpos-MBWH_CBext/2.-MBWH_SRBthi"/>
+
+<gvxysx name="MBWH_SpokeReinforcingBar1SmallSector" material="Aluminium1" dZ="MBWH_SRBthi">
+  <gvxy_point X_Y="MBWH_SRB1x1;MBWH_SRB1y1"/>
+  <gvxy_point X_Y="MBWH_SRB1x2;MBWH_SRB1y2"/>
+  <gvxy_point X_Y="MBWH_SRB1x3;MBWH_SRB1y3"/>
+  <gvxy_point X_Y="MBWH_SRB1x4;MBWH_SRB1y4"/>
+  <gvxy_point X_Y="MBWH_SRB1x5;MBWH_SRB1y5"/>
+  <gvxy_point X_Y="MBWH_SRB1x6;MBWH_SRB1y6"/>
+</gvxysx>
+
+<!--  Spoke Reinforcing Bar 1 -->
+<var  name="MBWH_SRB2x1" value="MBWH_SRB2dx1/2"/>
+<var  name="MBWH_SRB2y1" value="0"/>
+<var  name="MBWH_SRB2x2" value="MBWH_SRB2dx2/2"/>
+<var  name="MBWH_SRB2y2" value="-MBWH_SRB2dy"/>
+
+<var  name="MBWH_SRB2zpos" value="MBWH_SssIxpos-MBWH_CBext/2.-MBWH_SRBthi"/>
+
+<gvxysx name="MBWH_SpokeReinforcingBar2SmallSector" material="Aluminium1" dZ="MBWH_SRBthi">
+  <gvxy_point X_Y="MBWH_SRB2x1;MBWH_SRB2y1"/>
+  <gvxy_point X_Y="MBWH_SRB2x2;MBWH_SRB2y2"/>
+</gvxysx>
+
+
+<composition name="MBWH_SpokesSmallSectorAssembly1">
+  <posXYZ volume="MBWH_InnerSpokeSmallSectorUprofile"/>
+  <posXYZ volume="MBWH_ReinforcingBar" X_Y_Z=" MBWH_SRBpx;MBWH_SRBpy;MBWH_SssRBpz1" rot="0;0;90"/>
+  <posXYZ volume="MBWH_ReinforcingBar" X_Y_Z=" MBWH_SRBpx;MBWH_SRBpy;MBWH_SssRBpz2" rot="0;0;90"/>
+  <posXYZ volume="MBWH_ReinforcingBar" X_Y_Z=" MBWH_SRBpx;MBWH_SRBpy;MBWH_SssRBpz3" rot="0;0;90"/>
+  <posXYZ volume="MBWH_ExternalSpokeSmallSectorUprofile"  X_Y_Z=" MBWH_SssIxpos;MBWH_SssIypos;MBWH_SssIzpos"/>
+</composition>
+
+<composition name="MBWH_SpokesSmallSectorAssembly2">
+  <posXYZ volume="MBWH_InnerSpokeSmallSectorUprofile"/>
+  <posXYZ volume="MBWH_ReinforcingBar" X_Y_Z=" MBWH_SRBpx;MBWH_SRBpy;-MBWH_SssRBpz1" rot="0;0;90"/>
+  <posXYZ volume="MBWH_ReinforcingBar" X_Y_Z=" MBWH_SRBpx;MBWH_SRBpy;-MBWH_SssRBpz2" rot="0;0;90"/>
+  <posXYZ volume="MBWH_ReinforcingBar" X_Y_Z=" MBWH_SRBpx;MBWH_SRBpy;-MBWH_SssRBpz3" rot="0;0;90"/>
+  <posXYZ volume="MBWH_ExternalSpokeSmallSectorUprofile"  X_Y_Z=" MBWH_SssIxpos;MBWH_SssIypos;-MBWH_SssIzpos"/>
+</composition>
+
+<composition name="MBWH_SpokesSmallSectorAssemblyTemp1">
+  <posXYZ volume="MBWH_SpokesSmallSectorAssembly1" X_Y_Z="MBWH_SssIxref;MBWH_Sssypos;0" rot="0.; -90.;90-MBWH_SSangle" />
+</composition>
+
+<composition name="MBWH_SpokesSmallSectorAssemblyTemp2">
+  <posXYZ volume="MBWH_SpokesSmallSectorAssembly2" X_Y_Z="-MBWH_SssIxref;MBWH_Sssypos;0" rot="180.; -90.;90+MBWH_SSangle" />
+</composition>
+
+<composition name="MBWH_SmallSector">
+  <posXYZ volume="MBWH_SpokesSmallSectorAssemblyTemp1" />
+  <posXYZ volume="MBWH_SpokesSmallSectorAssemblyTemp2" /> 
+  <posXYZ volume="MBWH_CutProfilesCrossBracingSmallSectorItem10"  X_Y_Z="0;MBWH_CBSy10-5.;0" rot="0;90;0"/>
+  <posXYZ volume="MBWH_CutProfilesCrossBracingSmallSectorItem14"  X_Y_Z="0;MBWH_CBSy14;0" rot="0;90;0"/>
+  <posXYZ volume="MBWH_CutProfilesCrossBracingSmallSectorItem18a" X_Y_Z="0;MBWH_CBSy18;0" rot="0;90;0"/>
+  <posXYZ volume="MBWH_CutProfilesCrossBracingSmallSectorItem18b" X_Y_Z="0;MBWH_CBSy18b;0" rot="0;90;0"/>
+  <posXYZ volume="MBWH_CroisillonBay1SmallSectorRot" X_Y_Z="0;MBWH_Croisy9;0"/>
+  <posXYZ volume="MBWH_CroisillonBay2SmallSectorRot" X_Y_Z="0;MBWH_Croisy11;0" rot="0;180;0"/>
+  <posXYZ volume="MBWH_CroisillonBay3SmallSectorRot" X_Y_Z="0;MBWH_Croisy15;0"/>
+  <posXYZ volume="MBWH_SpokeReinforcingBar1SmallSector" X_Y_Z="0;MBWH_SRB1ypos;MBWH_SRB1zpos-2.6"/>
+  <posXYZ volume="MBWH_SpokeReinforcingBar2SmallSector" X_Y_Z="0;MBWH_SRB2ypos;MBWH_SRB2zpos-2.6"/> 
+</composition>
+
+
+<!--  
+      **************************************************************
+      ***                                                       ****
+      ***                  Big Wheel Assembly                   ****
+      ***                                                       ****
+      **************************************************************
+-->
+
+<var  name="MBWH_zposS" value="MBWH_zposL+MBWH_SlsIxpos" />
+
+<composition name="MBWH_BigWheelOctant">
+  <posXYZ volume="MBWH_SmallSector" X_Y_Z=" 0.;0.;MBWH_zposS" rot="0.;180.;22.5"/>
+  <posXYZ volume="MBWH_LargeSector" X_Y_Z=" 0.;0.;MBWH_zposL" rot="0.;180.;0."/>
+</composition>
+
+<array name="MBWH_BWOA" values="-90;-45;0;45;90;135;180;225" /> <!--  octant angles -->
+
+<composition name="MBWH_BigWheel">
+  <foreach  index="I"  begin="0"  loops="8" >
+   <posXYZ volume="MBWH_BigWheelOctant" rot="0.;0.;MBWH_BWOA[I]"/>
+  </foreach>
+</composition>
+
+<composition name="MBWH_BigWheels">
+  <posXYZ volume="MBWH_BigWheel"/>
+  <posXYZ volume="MBWH_BigWheel" rot="0.;180.;0."/>
+</composition>
+
+</section>
+
+<section name       = "Calorimeter Saddle"
+         version    = "7.0"
+         date       = "9 May 2006"
+         author     = "Daniel Pomarede"
+         top_volume = "SADL_CalorimeterSaddle">
+
+<!--     name       =  Calorimeter Saddle            section name       = "Supports"  -->
+<!--  **************************************************************
+      **************************************************************
+      ***                                                       ****
+      ***                  Calorimeter Saddle                   ****
+      ***                                                       ****
+      **************************************************************
+      **************************************************************  -->
+
+
+
+<!--  Andrei Table need for the structure missing in Oracle table -->
+<var  name="SADL_numboxes"      value="12"/>
+<var  name="SADL_numbreps"      value="1"/>
+<var  name="SADL_numtubes"      value="4"/>
+<var  name="SADL_NumEmTubesBrep"      value="1"/>
+<var  name="SADL_Gusset_tubecut"      value="0"/>
+<var  name="SADL_num_Gusset_vol"      value="12"/>
+<var  name="SADL_numbreppoint"      value="10"/>
+<var  name="SADL_SymX"   value="1"/>
+<var  name="SADL_SymY"   value="0"/>
+<var  name="SADL_SymZ"   value="1"/>
+<var name="PiDegOver4"       value=" 45"/>
+<var name="PiDegOver2"       value=" 90"/>
+<var name="Pideg"            value="180"/>
+<var name="2Pideg"            value="360"/>
+<var name="SADL_Stzrot"    value="45"/>
+<var name="SADL_Stzrotmoins"    value="-45"/>
+<!--SaddleBOVN -->
+<var name="SADL_BoxBeam_numHPlateVol"	value="1"/>
+<var name="SADL_BoxBeam_numVPlateVol"   value="2"/>
+<var name="SADL_numConnGussetBBeamVol"  value="4"/>
+<var name="SADL_numStiffenerVol"	value="4"/>
+<var name="SADL_numBarrelBlocking_JackVol"   value="4"/>
+<array name="SADL_SymBoxBeam"           values="1;0;0"/>
+<array name="SADL_SymExtendedBoxBeam"   values="1;0;1"/>
+<array name="SADL_SymConnGussetBBeam"   values="1;0;1"/>
+<array name="SADL_SymStiffener"         values="1;0;1"/>
+<array name="SADL_SymBarrel_Blocking_Jack"   values="1;0;1"/>
+<array name="SADL_Material"	        values="1;2"/> <!-- 1=Iron, 2=Aluminium-->
+<array name="SADL_EmptyVolBoxBeam"           values="0;0;0"/> <!--values="NUMEMBO(number empty boxes);NUMEMTU(tubes);NUMEMBR(breps)"-->
+<array name="SADL_EmptyVolExtendedBoxBeam"           values="0;0;0"/>
+<array name="SADL_EmptyVolConnGussetBBeam"           values="0;0;0"/>
+<array name="SADL_EmptyVolStiffener"         	     values="0;0;0"/>
+<array name="SADL_EmptyVolBarrel_Blocking_Jack"      values="0;0;0"/>
+<!--SaddleTUVN -->
+<var name="SADL_RoundedSupport"	value="2"/>
+<var name="SAD_Barrel_Blocking_Jack_Cylinder"  		 value="4"/>
+<array name="SADL_SymRoundedSupport"          		 values="1;0;1"/>
+<array name="SADL_SymBarrel_Blocking_Jack_Cylinder"      values="1;0;1"/>
+<array name="SADL_EmptyVolRoundedSupport"         	 values="0;0;0"/>
+<array name="SADL_EmptyVolBarrel_Blocking_Jack_Cylinder" values="0;0;0"/>
+
+
+
+<!-- for box -->
+<var  name="SADL_BoxBeam_HPlate_vol"      value="1"/>
+<var  name="SADL_BoxBeam_VPlate_vol"      value="2"/>
+<var  name="SADL_ConnGussetBBeam_vol"      value="4"/>
+<var  name="SADL_ConnGussetBBeam_VPlate_vol"      value="2"/>
+
+<!--  END -->
+
+<!--  ATLLBUS_0019 -->
+<var  name="SADL_BxBLen"   value="6200"/>
+<var  name="SADL_BxBWid"   value="520"/>
+<var  name="SADL_BxBHei"   value="360"/>
+<var  name="SADL_BxBHThi1" value="90"/>
+<var  name="SADL_BxBHThi2" value="40"/>
+<var  name="SADL_BxBVThi"  value="60"/>
+<!--  ATLLBUS_0003 -->
+<var  name="SADL_BxBxref"  value="2740"/>
+<var  name="SADL_BxByref"  value="4000"/>
+
+<!--  Extended Barrel Box Beam -->
+
+<!--  ATLLEUS_0002 -->
+<var  name="SADL_BxBELen"  value="3355"/>
+<var  name="SADL_EBxBzpos" value="4832.5"/>
+
+<!--  Rounded Support -->
+
+<!--  ATLLBUS_0006 & ATLLBUS_0009 & ATLLBUS_0012 & ATLLBUS_0015 -->
+<var  name="SADL_RSprof1"  value="301.8"/>
+<var  name="SADL_RSprof2"  value="32"/>
+<var  name="SADL_RSLenAC"  value="731"/>
+<var  name="SADL_RSLenBD"  value="746"/>
+<var  name="SADL_RSrin"    value="4240"/>
+<var  name="SADL_RSrout"   value="4310"/>
+
+<!--  Gusset -->
+
+<!--  ATLLBUS_0005 -->
+<var  name="SADL_GudZ"     value="70"/>
+<var  name="SADL_GualphA"  value="31"/>
+<var  name="SADL_GualphE"  value="22.5"/>
+<var  name="SADL_GuthicAB" value="61"/>
+<var  name="SADL_GuthicBC" value="63.6"/>
+<var  name="SADL_GudyAF"   value="252"/>
+<var  name="SADL_GudxAF"   value="443.8"/>
+<var  name="SADL_GudxEF"   value="55"/>
+<var  name="SADL_GudxFJ"   value="1087.7"/>
+<var  name="SADL_GudyAJ"   value="1634.3"/>
+<var  name="SADL_GudyFG"   value="430"/>
+<var  name="SADL_GudxGH"   value="510"/>
+<var  name="SADL_GudxFI"   value="1125.5"/>
+<var  name="SADL_GudyHI"   value="1440.6"/>
+
+<!--  ATLLBUS_0006 -->
+<var  name="SADL_Guposxg"  value="2715"/>
+<var  name="SADL_Guposyg"  value="-3485"/>
+
+<!--  ATLLBUS_0006  -->
+<var  name="SADL_Gussdz1"  value="265"/>
+<var  name="SADL_Gussdz2"  value="280"/>
+
+<!--  Connection Gusset / Box Beam -->
+<!--  ATLLBUS_0006 & ATLLBUS_0007 -->
+<var name="SADL_CGBBthi"   value="25"/>
+<var name="SADL_CGBBlen"   value="870"/>
+<var name="SADL_CGBBHwid"  value="545"/>
+<var name="SADL_CGBBVwid"  value="400"/>
+
+<!--  Stiffener -->
+<!--  ATLLBUS_0018 & ATLLEUS_0021 -->
+
+<var name="SADL_StifLen"   value="1149"/>
+<!--  extremity plate -->
+<var name="SADL_StEPwid"   value="152"/>
+<var name="SADL_StEPthi"   value="15"/>
+<!--  tube-square -->
+<var name="SADL_StTUthi"   value="10"/>
+<var name="SADL_StTUext"   value="100"/>
+
+<!--  Doublet -->
+<!--  ATLLBUS_0003 -->
+<var name="SADL_SaddZmax"  value="2820"/> <!--  Gusset surface is in this plane -->
+<!--  ATLLEUS_0002 -->
+<var name="SADL_ESadZmax"  value="6150"/> <!--  Gusset surface is in this plane -->
+
+<!--  stiffener position -->
+<!--  ATLLBUS_0008 -->
+<var name="SADL_Stxpos"    value=" 3362"/>
+<var name="SADL_Stypos"    value="-2910"/>
+
+<!--  Barrel Blocking Jacks -->
+<!--  Barrel Blocking Jacks positions -->
+<array name="SADL_BlJazpos" values="529;2369;3989;5789" /> 
+<var  name="SADL_BlJaypos" value="-4390+50"/> <!-- added 50 for the modification of SADL_BBJSCthi (few lines below)-->
+<var  name="SADL_BlJaxpos" value="3000"/>
+
+<var  name="SADL_BBJPlen"  value="520"/>
+<var  name="SADL_BBJPwid"  value="360"/>
+<var  name="SADL_BBJPthi"  value="45"/>
+
+<var  name="SADL_BBJBCthi" value="290"/>
+<var  name="SADL_BBJBCrad" value="152"/>
+<var  name="SADL_BBJSCthi" value="5"/> <!-- modified from 55 to 5 to avoid overlap -->
+<var  name="SADL_BBJSCrad" value="98"/>
+
+
+
+<!--  Derived variables -->
+
+<!--  Box Beam -->
+
+<var  name="SADL_BxBHyp1" value="-SADL_BxBHei/2.-SADL_BxBHThi1/2."/>
+<var  name="SADL_BxBHyp2" value="SADL_BxBHei/2.+SADL_BxBHThi2/2."/>
+<var  name="SADL_BxBVxpos" value="SADL_BxBWid/2.-SADL_BxBVThi/2."/>
+
+<!--  Gusset -->
+
+<var  name="SADL_Guxa" value="0"/>
+<var  name="SADL_Guya" value="0"/>
+<var  name="SADL_Guxb" value="SADL_Guxa+SADL_GuthicAB*sin(SADL_GualphA*GENV_PiS180)"/>
+<var  name="SADL_Guyb" value="SADL_Guya-SADL_GuthicAB*cos(SADL_GualphA*GENV_PiS180)"/>
+<var  name="SADL_Guxc" value="SADL_Guxb+SADL_GuthicBC/tan(SADL_GualphA*GENV_PiS180)"/>
+<var  name="SADL_Guyc" value="SADL_Guyb+SADL_GuthicBC"/>
+
+<var  name="SADL_Guxf" value="SADL_Guxa+SADL_GudxAF"/>
+<var  name="SADL_Guyf" value="SADL_Guya-SADL_GudyAF"/>
+<var  name="SADL_Guxe" value="SADL_Guxf-SADL_GudxEF"/>
+<var  name="SADL_Guye" value="SADL_Guyf"/>
+<var  name="SADL_Guyd" value="SADL_Guyc"/>
+<var  name="SADL_Guxd" value="SADL_Guxe-(SADL_Guyd-SADL_Guye)*tan(SADL_GualphE*GENV_PiS180)"/>
+<var  name="SADL_Guxg" value="SADL_Guxf"/>
+<var  name="SADL_Guyg" value="SADL_Guyf+SADL_GudyFG"/>
+<var  name="SADL_Guxh" value="SADL_Guxg+SADL_GudxGH"/>
+<var  name="SADL_Guyh" value="SADL_Guyg"/>
+
+<var  name="SADL_Guxi" value="SADL_Guxf+SADL_GudxFI"/>
+<var  name="SADL_Guyi" value="SADL_Guyh+SADL_GudyHI"/>
+<var  name="SADL_Guxj" value="SADL_Guxf+SADL_GudxFJ"/>
+<var  name="SADL_Guyj" value="SADL_Guya+SADL_GudyAJ"/>
+
+<var  name="SADL_Guposxa" value="SADL_Guposxg-SADL_Guxg"/>
+<var  name="SADL_Guposya" value="SADL_Guposyg-SADL_Guyg"/>
+
+<var  name="SADL_Gusspz2" value="SADL_Gussdz2+SADL_GudZ"/>
+<var  name="SADL_Gusspz1" value="SADL_Gussdz1+SADL_GudZ"/>
+
+<!--  Box beam positions -->
+
+<var  name="SADL_BxBxpos" value="SADL_BxBxref+SADL_BxBWid/2"/>
+<var  name="SADL_BxBypos" value="-SADL_BxByref+SADL_BxBHei/2+SADL_BxBHThi1"/>
+
+<!--  Connection Gusset / Box Beam -->
+
+<var  name="SADL_CGBBHPx"   value="SADL_Guposxg+SADL_CGBBHwid/2"/>
+<var  name="SADL_CGBBHPy"   value="SADL_Guposyg-SADL_CGBBthi/2"/>
+<var  name="SADL_CGBBVPx"   value="SADL_Guposxg+SADL_CGBBthi/2"/>
+<var  name="SADL_CGBBVPy"   value="SADL_Guposyg-SADL_CGBBVwid/2-SADL_CGBBthi"/>
+
+<!--  Stiffener -->
+
+<!--  height of flange -->
+<var name="SADL_StTFlhei" value="SADL_StTUext-2*SADL_StTUthi"/>
+<!--  x/y pos of flange/plate -->
+<var name="SADL_StTFlpos" value="SADL_StTUext/2-SADL_StTUthi/2"/>
+<!--  length -->
+<var name="SADL_StifLen0" value="SADL_StifLen-2*SADL_StEPthi"/>
+<!--  z pos of extremity plate -->
+<var name="SADL_StEPzpos" value="SADL_StifLen/2-SADL_StEPthi/2"/>
+
+<!--  Barrel Doublet -->
+<!--  ATLLBUS_0003 -->
+<var  name="SADL_SaddZ2"  value="SADL_SaddZmax-SADL_Gussdz1-1.5*SADL_GudZ"/>
+<!--  position of first unit is inferred from stiffener length -->
+<var  name="SADL_SaddZ1"  value="SADL_SaddZ2-3.*SADL_GudZ-2.*SADL_Gussdz2-SADL_StifLen"/>
+
+<!--  stiffener position -->
+<var name="SADL_Stzpos" value="(SADL_SaddZ1+SADL_SaddZ2)/2"/>
+
+<!--  Extended Barrel Doublet -->
+<!--  ATLLEUS_0002 -->
+<var name="SADL_ESaddZ2"  value="SADL_ESadZmax-SADL_Gussdz1-1.5*SADL_GudZ"/>
+<!--  position of first unit is inferred from stiffener length -->
+<var name="SADL_ESaddZ1"  value="SADL_ESaddZ2-3.*SADL_GudZ-2.*SADL_Gussdz2-SADL_StifLen"/>
+
+<!--  stiffener position -->
+<var name="SADL_EStzpos" value="(SADL_ESaddZ1+SADL_ESaddZ2)/2"/>
+
+<!--  Barrel Blocking Jacks -->
+
+<var  name="SADL_BBJSCyp" value="SADL_BBJSCthi/2"/>
+<var  name="SADL_BBJBCyp" value="SADL_BBJSCthi+SADL_BBJBCthi/2"/>
+<var  name="SADL_BBJPyp"  value="SADL_BBJSCthi+SADL_BBJBCthi+SADL_BBJPthi/2"/>
+
+<!--  Andrei Table need for the structure missing in Oracle table -->
+<var  name="SADL_Gusset_Plate_Zmoins"  value="-SADL_Gusspz2"/>
+<var  name="SADL_BxBVxposmoins"	value="-SADL_BxBVxpos"/>
+<var  name="SADL_StEPzposmoins" value="-SADL_StEPzpos"/>
+<var  name="SADL_StTFlposRot"   value="SADL_StTFlpos*sin(SADL_Stzrot*GENV_PiS180)"/>
+<var  name="SADL_StTFlposRotmoins" value="-SADL_StTFlposRot"/>
+<!--  Andrei Table need for the structure missing in Oracle table -->
+
+<!--  Modelization -->
+
+<!--  Box Beam -->
+<box name="SADL_BoxBeam_HPlate_Lower" material="Iron1" X_Y_Z="SADL_BxBWid ;SADL_BxBHThi1;SADL_BxBLen"/>
+<box name="SADL_BoxBeam_HPlate_Upper" material="Iron1" X_Y_Z="SADL_BxBWid ;SADL_BxBHThi2;SADL_BxBLen"/>
+<box name="SADL_BoxBeam_VPlate"       material="Iron1" X_Y_Z="SADL_BxBVThi;SADL_BxBHei  ;SADL_BxBLen"/>
+
+<!--  Extended Barrel Box Beam -->
+<box name="SADL_Extended_BoxBeam_HPlate_Lower" material="Iron1" X_Y_Z="SADL_BxBWid ;SADL_BxBHThi1;SADL_BxBELen"/>
+<box name="SADL_Extended_BoxBeam_HPlate_Upper" material="Iron1" X_Y_Z="SADL_BxBWid ;SADL_BxBHThi2;SADL_BxBELen"/>
+<box name="SADL_Extended_BoxBeam_VPlate"       material="Iron1" X_Y_Z="SADL_BxBVThi;SADL_BxBHei  ;SADL_BxBELen"/>
+
+<composition name="SADL_BoxBeam">
+  <posXYZ volume="SADL_BoxBeam_HPlate_Lower" X_Y_Z="0;SADL_BxBHyp1;0" />
+  <posXYZ volume="SADL_BoxBeam_HPlate_Upper" X_Y_Z="0;SADL_BxBHyp2;0" />
+  <posXYZ volume="SADL_BoxBeam_VPlate" X_Y_Z=" SADL_BxBVxpos;0;0" />
+  <posXYZ volume="SADL_BoxBeam_VPlate" X_Y_Z="-SADL_BxBVxpos;0;0" />
+</composition>
+
+<composition name="SADL_Extended_BoxBeam">
+  <posXYZ volume="SADL_Extended_BoxBeam_HPlate_Lower" X_Y_Z="0;SADL_BxBHyp1;0" />
+  <posXYZ volume="SADL_Extended_BoxBeam_HPlate_Upper" X_Y_Z="0;SADL_BxBHyp2;0" />
+  <posXYZ volume="SADL_Extended_BoxBeam_VPlate" X_Y_Z=" SADL_BxBVxpos;0;0" />
+  <posXYZ volume="SADL_Extended_BoxBeam_VPlate" X_Y_Z="-SADL_BxBVxpos;0;0" />
+</composition>
+
+<!--  Rounded Support -->
+<tubs name="SADL_RoundedSupportAC" material="Iron2" Rio_Z="SADL_RSrin;SADL_RSrout;SADL_RSLenAC" profile="SADL_RSprof1;SADL_RSprof2"/>
+<tubs name="SADL_RoundedSupportBD" material="Iron2" Rio_Z="SADL_RSrin;SADL_RSrout;SADL_RSLenBD" profile="SADL_RSprof1;SADL_RSprof2"/>
+
+<!--  Gusset -->
+<gvxy name="SADL_Gusset_Core" material="Iron" dZ="SADL_GudZ">
+  <gvxy_point X_Y="SADL_Guxa;SADL_Guya"/>
+  <gvxy_point X_Y="SADL_Guxb;SADL_Guyb"/>
+  <gvxy_point X_Y="SADL_Guxc;SADL_Guyc"/>
+  <gvxy_point X_Y="SADL_Guxd;SADL_Guyd"/>
+  <gvxy_point X_Y="SADL_Guxe;SADL_Guye"/>
+  <gvxy_point X_Y="SADL_Guxf;SADL_Guyf"/>
+  <gvxy_point X_Y="SADL_Guxg;SADL_Guyg"/>
+  <gvxy_point X_Y="SADL_Guxh;SADL_Guyh"/>
+  <gvxy_point X_Y="SADL_Guxi;SADL_Guyi"/>
+  <gvxy_point X_Y="SADL_Guxj;SADL_Guyj"/>
+</gvxy>
+
+<tubs name="SADL_Gusset_Cut" material="Aluminium4" Rio_Z="0;SADL_RSrout;SADL_RSLenBD"  profile="SADL_RSprof1;SADL_RSprof2"    />
+
+<subtraction  name="SADL_Gusset_Plate"  >
+  <posXYZ volume="SADL_Gusset_Core" X_Y_Z="SADL_Guposxa;SADL_Guposya;0"/>
+  <posXYZ volume="SADL_Gusset_Cut"/>
+</subtraction>
+
+<!--  Connection Gusset / Box Beam -->
+
+<box name="SADL_ConnGussetBBeam_HPlate" material="Iron4" X_Y_Z="SADL_CGBBHwid;SADL_CGBBthi;SADL_CGBBlen"/>
+<box name="SADL_ConnGussetBBeam_VPlate" material="Iron4" X_Y_Z="SADL_CGBBthi;SADL_CGBBVwid;SADL_CGBBlen"/>
+
+<composition name="SADL_Saddle_UnitA">
+  <posXYZ volume="SADL_RoundedSupportAC"  />
+  <posXYZ volume="SADL_Gusset_Plate" />
+  <posXYZ volume="SADL_Gusset_Plate" X_Y_Z="Zero;Zero;SADL_Gusspz1" />
+  <posXYZ volume="SADL_Gusset_Plate" X_Y_Z="Zero;Zero;SADL_Gusset_Plate_Zmoins" />
+  <posXYZ volume="SADL_ConnGussetBBeam_HPlate" X_Y_Z="SADL_CGBBHPx;SADL_CGBBHPy;0" />
+  <posXYZ volume="SADL_ConnGussetBBeam_VPlate" X_Y_Z="SADL_CGBBVPx;SADL_CGBBVPy;0" />
+</composition>
+
+<composition name="SADL_Saddle_UnitB">
+  <posXYZ volume="SADL_RoundedSupportBD"  />
+  <posXYZ volume="SADL_Gusset_Plate" />
+  <posXYZ volume="SADL_Gusset_Plate" X_Y_Z="0;0;SADL_Gusspz2" />
+  <posXYZ volume="SADL_Gusset_Plate" X_Y_Z="0;0;-SADL_Gusspz2" />
+  <posXYZ volume="SADL_ConnGussetBBeam_HPlate" X_Y_Z="SADL_CGBBHPx;SADL_CGBBHPy;0" />
+  <posXYZ volume="SADL_ConnGussetBBeam_VPlate" X_Y_Z="SADL_CGBBVPx;SADL_CGBBVPy;0" />
+</composition>
+
+<!--  Stiffener -->
+
+<box name="SADL_Stiffener_Plate" material="Iron1" X_Y_Z="SADL_StEPwid;SADL_StEPwid;SADL_StEPthi"/>
+<box name="SADL_Stiffener_Tube_Plate"  material="Iron1" X_Y_Z="SADL_StTUext;SADL_StTUthi; SADL_StifLen0"/>
+<box name="SADL_Stiffener_Tube_Flange" material="Iron1" X_Y_Z="SADL_StTUthi;SADL_StTFlhei;SADL_StifLen0"/>
+
+<composition name="SADL_Stiffener">
+  <posXYZ volume="SADL_Stiffener_Tube_Flange" X_Y_Z=" SADL_StTFlpos;0;0" />
+  <posXYZ volume="SADL_Stiffener_Tube_Flange" X_Y_Z="-SADL_StTFlpos;0;0" />
+  <posXYZ volume="SADL_Stiffener_Tube_Plate"  X_Y_Z="0; SADL_StTFlpos;0;0" />
+  <posXYZ volume="SADL_Stiffener_Tube_Plate"  X_Y_Z="0;-SADL_StTFlpos;0;0" />
+  <posXYZ volume="SADL_Stiffener_Plate" X_Y_Z="0;0; SADL_StEPzpos" />
+  <posXYZ volume="SADL_Stiffener_Plate" X_Y_Z="0;0;-SADL_StEPzpos" />
+</composition>
+
+<composition name="SADL_Saddle_Doublet">
+  <posXYZ volume="SADL_Saddle_UnitB" X_Y_Z="0;0;SADL_SaddZ1"  />
+  <posXYZ volume="SADL_Saddle_UnitA" X_Y_Z="0;0;SADL_SaddZ2"  />
+  <posXYZ volume="SADL_Stiffener" X_Y_Z="SADL_Stxpos;SADL_Stypos;SADL_Stzpos" rot="Zero;Zero;SADL_Stzrot" />
+</composition>
+
+<composition name="SADL_Extended_Saddle_Doublet">
+  <posXYZ volume="SADL_Extended_BoxBeam" X_Y_Z="SADL_BxBxpos;SADL_BxBypos;SADL_EBxBzpos"  />
+  <posXYZ volume="SADL_Saddle_UnitB" X_Y_Z="0;0;SADL_ESaddZ1"  />
+  <posXYZ volume="SADL_Saddle_UnitA" X_Y_Z="0;0;SADL_ESaddZ2"  />
+  <posXYZ volume="SADL_Stiffener" X_Y_Z="SADL_Stxpos;SADL_Stypos;SADL_EStzpos" rot="Zero;Zero;SADL_Stzrot" />
+</composition>
+
+<composition name="SADL_Saddle_Quadruplet">
+  <posXYZ volume="SADL_Saddle_Doublet" />
+  <posXYZ volume="SADL_Saddle_Doublet" rot="0;180;0" X_Y_Z="0.;0.;2*SADL_Stzpos"/>
+</composition>
+
+<composition name="SADL_Extended_Saddle_Quadruplet">
+  <posXYZ volume="SADL_Extended_Saddle_Doublet" />
+  <posXYZ volume="SADL_Extended_Saddle_Doublet" rot="0;180;0" X_Y_Z="0.;0.;2*SADL_EStzpos" />
+</composition>
+
+<!--  Barrel Blocking Jacks -->
+
+<box name="SADL_Barrel_Blocking_Jack_Plate" material="Iron1" X_Y_Z="SADL_BBJPlen;SADL_BBJPwid;SADL_BBJPthi"/>
+
+<tubs name="SADL_Barrel_Blocking_Jack_BigCylinder" material="Iron2" Rio_Z="0;SADL_BBJBCrad;SADL_BBJBCthi" />
+<tubs name="SADL_Barrel_Blocking_Jack_SmallCylinder" material="Iron2" Rio_Z="0;SADL_BBJSCrad;SADL_BBJSCthi" />
+
+<composition name="SADL_Barrel_Blocking_Jack_Unit">
+  <posXYZ volume="SADL_Barrel_Blocking_Jack_SmallCylinder" X_Y_Z="0;SADL_BBJSCyp;0" rot="PiDegOver2;Zero;Zero"/>
+  <posXYZ volume="SADL_Barrel_Blocking_Jack_BigCylinder" X_Y_Z="0;SADL_BBJBCyp;0"   rot="PiDegOver2;Zero;Zero"/>
+  <posXYZ volume="SADL_Barrel_Blocking_Jack_Plate" X_Y_Z="0;SADL_BBJPyp;0"          rot="PiDegOver2;Zero;Zero"/>
+</composition>
+
+<composition name="SADL_Barrel_Blocking_Jacks">
+  <foreach  index="I"  begin="0"  loops="4" >
+   <posXYZ volume="SADL_Barrel_Blocking_Jack_Unit" X_Y_Z=" SADL_BlJaxpos;SADL_BlJaypos; SADL_BlJazpos[I]"/>
+   <posXYZ volume="SADL_Barrel_Blocking_Jack_Unit" X_Y_Z="-SADL_BlJaxpos;SADL_BlJaypos; SADL_BlJazpos[I]"/>
+   <posXYZ volume="SADL_Barrel_Blocking_Jack_Unit" X_Y_Z=" SADL_BlJaxpos;SADL_BlJaypos;-SADL_BlJazpos[I]"/>
+   <posXYZ volume="SADL_Barrel_Blocking_Jack_Unit" X_Y_Z="-SADL_BlJaxpos;SADL_BlJaypos;-SADL_BlJazpos[I]"/>
+  </foreach>
+</composition>
+
+<composition name="SADL_CalorimeterSaddle1">
+  <posXYZ volume="SADL_BoxBeam" X_Y_Z=" SADL_BxBxpos;SADL_BxBypos;0" />
+  <posXYZ volume="SADL_BoxBeam" X_Y_Z="-SADL_BxBxpos;SADL_BxBypos;0" />
+  <posXYZ volume="SADL_Saddle_Quadruplet" />
+  <posXYZ volume="SADL_Saddle_Quadruplet" rot="0;180.;0" />
+  <posXYZ volume="SADL_Extended_Saddle_Quadruplet" />
+  <posXYZ volume="SADL_Extended_Saddle_Quadruplet" rot="0;180.;0" />
+  <posXYZ volume="SADL_Barrel_Blocking_Jacks" />
+</composition>
+
+<composition name="SADL_CalorimeterSaddle">
+  <posXYZ volume="SADL_CalorimeterSaddle1" X_Y_Z=" 0.;-50.;0" />
+</composition>
+
+</section>
+
+
+<section name       = "TGC Big Wheel"
+         version    = "7.0"
+         date       = "14 04 2008, redone 20 08 2013"
+         author     = "laurent+andrea, jochen - initial implementation removed "
+         top_volume = "useless">
+
+<!-- general parameters for surrounding boxes -->
+
+<var name="TGC_BigWheel_SurBoxWallThick"    value="    12.  " />
+<var name="TGC_BigWheel_SurBoxSideLength"   value="   250.  " />
+<var name="TGC_BigWheel_SurBoxDistance"     value="    50.  " />
+<var name="TGC_BigWheel_SurBoxSpcLength"    value="   200.  " />
+<var name="TGC_BigWheel_SurBoxSpcHeight"    value="    80.  " />
+<var name="TGC_BigWheel_SurBoxSpcWall"      value="     5.  " />
+
+<!--     name       =  TGC2 Big Wheel                section name       = "Supports"  -->
+<!--  **************************************************************
+      **************************************************************
+      ***                                                       ****
+      ***                      TGC Big Wheel                    ****
+      ***                                                       ****
+      **************************************************************
+      **************************************************************  -->
+<var name="TBWH_BigWheel_ZPosL"             value=" 14730.  "/>
+
+<var name="TBWH_BigWheel_RadDist00"         value="  2445.  "/>
+<var name="TBWH_BigWheel_RadDist01"         value="  3700.  - TBWH_BigWheel_RadDist00"/>
+<var name="TBWH_BigWheel_RadDist02"         value="  4562.  - TBWH_BigWheel_RadDist00"/>
+<var name="TBWH_BigWheel_RadDist03"         value="  5946.  - TBWH_BigWheel_RadDist00"/>
+<var name="TBWH_BigWheel_RadDist04"         value="  6974.  - TBWH_BigWheel_RadDist00"/>
+<var name="TBWH_BigWheel_RadDist05"         value="  8134.  - TBWH_BigWheel_RadDist00"/>
+<var name="TBWH_BigWheel_RadDist06"         value="  9161.  - TBWH_BigWheel_RadDist00"/>
+<var name="TBWH_BigWheel_RadDist07"         value=" 10527.  - TBWH_BigWheel_RadDist00"/>
+<var name="TBWH_BigWheel_RadDist08"         value=" 11348.  - TBWH_BigWheel_RadDist00"/>
+<var name="TBWH_BigWheel_RadDist09"         value=" 12230.  "/>
+<var name="TBWH_BigWheel_RadDistOutPlate"   value="  4195.  "/>
+<var name="TBWH_BigWheel_RadDistPlate02"    value="  4140.  - TBWH_BigWheel_RadDist00  +  170. + 30. "/> <!-- two different values on same blueprint -->
+<var name="TBWH_BigWheel_PhiDistRPlate1"    value="   388.  "/>
+
+<var name="TBWH_BigWheel_ZThickPhiPlate"    value="    30.  "/>
+<var name="TBWH_BigWheel_WallThickPhiPlate" value="    16.  "/>
+<var name="TBWH_BigWheel_RThickPhiPlate1"   value="   200.  "/>
+<var name="TBWH_BigWheel_RThickPhiPlate2"   value="   150.  "/>
+<var name="TBWH_BigWheel_RThickPhiPlate3"   value="   100.  "/>
+<var name="TBWH_BigWheel_ZThickRPlate"      value="   150.  "/>
+<var name="TBWH_BigWheel_PhiThickRPlate"    value="    50.  "/>
+<var name="TBWH_BigWheel_WallThickRPlate"   value="     5.  "/>
+
+<var name="TBWH_BigWheel_PhiPlaDelEvenOdd"  value="TBWH_BigWheel_RThickPhiPlate2 + TBWH_BigWheel_PhiThickRPlate/2."/>
+
+<var name="TBWH_BigWheel_PhiStepAngle1"     value="     7.5 * GENV_PiS180 "/>
+<var name="TBWH_BigWheel_PhiStepAngle2"     value="    15.  * GENV_PiS180  "/>
+
+<var name="TBWH_BigWheel_PhiStep1toP1"      value="   -88.  "/> <!-- estimate -->
+<var name="TBWH_BigWheel_PhiStepP1toP2"     value="   372.  "/> <!-- estimate -->
+
+<var name="TBWH_BigWheel_PhiStep2toP1"      value="   459.  "/>
+<var name="TBWH_BigWheel_PhiStepP2toP2"     value="   780. + TBWH_BigWheel_PhiThickRPlate"/> <!-- estimate -->
+
+<var name="TBWH_BigWheel_TubeInnerR"        value="  2335.  "/>
+<var name="TBWH_BigWheel_TubeOuterR"        value="  TBWH_BigWheel_TubeInnerR + 405. "/>
+
+<!-- lowest phi plate - plate 1 -->
+<gvxysx name="TBWH_PhiPlate1" material="Aluminium" dZ="TBWH_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y=" (TBWH_BigWheel_RadDist00+TBWH_BigWheel_RadDist01+TBWH_BigWheel_RThickPhiPlate1)*sin(TBWH_BigWheel_PhiStepAngle2); TBWH_BigWheel_RadDist01+TBWH_BigWheel_RThickPhiPlate1"/>
+  <gvxy_point X_Y=" (TBWH_BigWheel_RadDist00+TBWH_BigWheel_RadDist01)*sin(TBWH_BigWheel_PhiStepAngle2); TBWH_BigWheel_RadDist01"/>
+</gvxysx>
+
+<!-- first phi plate with kink - plate 2 -->
+<var name="TBWH_PhiPlate2_XPos1"  value="tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RadDist02-TBWH_BigWheel_PhiStep1toP1/cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/cos(TBWH_BigWheel_PhiStepAngle2)/2." />
+<var name="TBWH_PhiPlate2_XPos3"  value="tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RadDist02-TBWH_BigWheel_PhiStep1toP1/cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/cos(TBWH_BigWheel_PhiStepAngle2)/2.+tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RThickPhiPlate2" />
+<var name="TBWH_PhiPlate2_XPos2"  value="TBWH_PhiPlate2_XPos1+(TBWH_BigWheel_RadDist02*tan(TBWH_BigWheel_PhiStepAngle2)-TBWH_PhiPlate2_XPos1)*cos(TBWH_BigWheel_PhiStepAngle2)*cos(TBWH_BigWheel_PhiStepAngle2)" />
+<var name="TBWH_PhiPlate2_YPos2"  value="TBWH_BigWheel_RadDist02-(TBWH_BigWheel_RadDist02*tan(TBWH_BigWheel_PhiStepAngle2)-TBWH_PhiPlate2_XPos1)*cos(TBWH_BigWheel_PhiStepAngle2)*sin(TBWH_BigWheel_PhiStepAngle2)" />
+
+<gvxysx name="TBWH_PhiPlate2_Even" material="Aluminium" dZ="TBWH_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TBWH_PhiPlate2_XPos3; TBWH_BigWheel_RadDist02+TBWH_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate2_XPos2+TBWH_BigWheel_RThickPhiPlate2*sin(TBWH_BigWheel_PhiStepAngle2)+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2); TBWH_PhiPlate2_YPos2+TBWH_BigWheel_RThickPhiPlate2*cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate2_XPos2+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2); TBWH_PhiPlate2_YPos2-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate2_XPos1; TBWH_BigWheel_RadDist02"/>
+</gvxysx>
+
+<gvxysx name="TBWH_PhiPlate2_Odd" material="Aluminium" dZ="TBWH_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TBWH_PhiPlate2_XPos3-tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_BigWheel_RadDist02+TBWH_BigWheel_RThickPhiPlate2-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate2_XPos2+TBWH_BigWheel_RThickPhiPlate2*sin(TBWH_BigWheel_PhiStepAngle2)+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2)-tan(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_PhiPlate2_YPos2+TBWH_BigWheel_RThickPhiPlate2*cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate2_XPos2+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2)-tan(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_PhiPlate2_YPos2-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate2_XPos1-tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_BigWheel_RadDist02-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+</gvxysx>
+
+<!-- second phi plate with kink - plate 3 -->
+<var name="TBWH_PhiPlate3_XPos1"  value="tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RadDist03-TBWH_BigWheel_PhiStep1toP1/cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/cos(TBWH_BigWheel_PhiStepAngle2)/2." />
+<var name="TBWH_PhiPlate3_XPos3"  value="tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RadDist03-TBWH_BigWheel_PhiStep1toP1/cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/cos(TBWH_BigWheel_PhiStepAngle2)/2.+tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RThickPhiPlate3" />
+<var name="TBWH_PhiPlate3_XPos2"  value="TBWH_PhiPlate3_XPos1+(TBWH_BigWheel_RadDist03*tan(TBWH_BigWheel_PhiStepAngle2)-TBWH_PhiPlate3_XPos1)*cos(TBWH_BigWheel_PhiStepAngle2)*cos(TBWH_BigWheel_PhiStepAngle2)-cos(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiThickRPlate" />
+<var name="TBWH_PhiPlate3_YPos2"  value="TBWH_BigWheel_RadDist03-(TBWH_BigWheel_RadDist03*tan(TBWH_BigWheel_PhiStepAngle2)-TBWH_PhiPlate3_XPos1)*cos(TBWH_BigWheel_PhiStepAngle2)*sin(TBWH_BigWheel_PhiStepAngle2)+sin(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiThickRPlate" />
+
+<gvxysx name="TBWH_PhiPlate3" material="Aluminium" dZ="TBWH_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TBWH_PhiPlate3_XPos3; TBWH_BigWheel_RadDist03+TBWH_BigWheel_RThickPhiPlate3"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate3_XPos2+TBWH_BigWheel_RThickPhiPlate3*sin(TBWH_BigWheel_PhiStepAngle2)+(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1)*cos(TBWH_BigWheel_PhiStepAngle2); TBWH_PhiPlate3_YPos2+TBWH_BigWheel_RThickPhiPlate3*cos(TBWH_BigWheel_PhiStepAngle2)-(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1)*sin(TBWH_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate3_XPos2+(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1)*cos(TBWH_BigWheel_PhiStepAngle2); TBWH_PhiPlate3_YPos2-(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1)*sin(TBWH_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate3_XPos1; TBWH_BigWheel_RadDist03"/>
+</gvxysx>
+
+<!-- third phi plate with kink - plate 4 -->
+<var name="TBWH_PhiPlate4_XPos1"  value="tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RadDist04-TBWH_BigWheel_PhiStep1toP1/cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/cos(TBWH_BigWheel_PhiStepAngle2)/2." />
+<var name="TBWH_PhiPlate4_XPos3"  value="tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RadDist04-TBWH_BigWheel_PhiStep1toP1/cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/cos(TBWH_BigWheel_PhiStepAngle2)/2.+tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RThickPhiPlate2" />
+<var name="TBWH_PhiPlate4_XPos2"  value="TBWH_PhiPlate4_XPos1+(TBWH_BigWheel_RadDist04*tan(TBWH_BigWheel_PhiStepAngle2)-TBWH_PhiPlate4_XPos1)*cos(TBWH_BigWheel_PhiStepAngle2)*cos(TBWH_BigWheel_PhiStepAngle2)" />
+<var name="TBWH_PhiPlate4_YPos2"  value="TBWH_BigWheel_RadDist04-(TBWH_BigWheel_RadDist04*tan(TBWH_BigWheel_PhiStepAngle2)-TBWH_PhiPlate4_XPos1)*cos(TBWH_BigWheel_PhiStepAngle2)*sin(TBWH_BigWheel_PhiStepAngle2)" />
+
+<gvxysx name="TBWH_PhiPlate4_Even" material="Aluminium" dZ="TBWH_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TBWH_PhiPlate4_XPos3; TBWH_BigWheel_RadDist04+TBWH_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate4_XPos2+TBWH_BigWheel_RThickPhiPlate2*sin(TBWH_BigWheel_PhiStepAngle2)+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2); TBWH_PhiPlate4_YPos2+TBWH_BigWheel_RThickPhiPlate2*cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate4_XPos2+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2); TBWH_PhiPlate4_YPos2-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate4_XPos1; TBWH_BigWheel_RadDist04"/>
+</gvxysx>
+
+<gvxysx name="TBWH_PhiPlate4_Odd" material="Aluminium" dZ="TBWH_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TBWH_PhiPlate4_XPos3-tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_BigWheel_RadDist04+TBWH_BigWheel_RThickPhiPlate2-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate4_XPos2+TBWH_BigWheel_RThickPhiPlate2*sin(TBWH_BigWheel_PhiStepAngle2)+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2)-tan(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_PhiPlate4_YPos2+TBWH_BigWheel_RThickPhiPlate2*cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate4_XPos2+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2)-tan(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_PhiPlate4_YPos2-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate4_XPos1-tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_BigWheel_RadDist04-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+</gvxysx>
+
+<!-- forth phi plate with kink - plate 5 -->
+<var name="TBWH_PhiPlate5_XPos1"  value="tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RadDist05-TBWH_BigWheel_PhiStep1toP1/cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/cos(TBWH_BigWheel_PhiStepAngle2)/2." />
+<var name="TBWH_PhiPlate5_XPos3"  value="tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RadDist05-TBWH_BigWheel_PhiStep1toP1/cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/cos(TBWH_BigWheel_PhiStepAngle2)/2.+tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RThickPhiPlate3" />
+<var name="TBWH_PhiPlate5_XPos2"  value="TBWH_PhiPlate5_XPos1+(TBWH_BigWheel_RadDist05*tan(TBWH_BigWheel_PhiStepAngle2)-TBWH_PhiPlate5_XPos1)*cos(TBWH_BigWheel_PhiStepAngle2)*cos(TBWH_BigWheel_PhiStepAngle2)-cos(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiThickRPlate" />
+<var name="TBWH_PhiPlate5_YPos2"  value="TBWH_BigWheel_RadDist05-(TBWH_BigWheel_RadDist05*tan(TBWH_BigWheel_PhiStepAngle2)-TBWH_PhiPlate5_XPos1)*cos(TBWH_BigWheel_PhiStepAngle2)*sin(TBWH_BigWheel_PhiStepAngle2)+sin(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiThickRPlate" />
+
+<gvxysx name="TBWH_PhiPlate5" material="Aluminium" dZ="TBWH_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TBWH_PhiPlate5_XPos3; TBWH_BigWheel_RadDist05+TBWH_BigWheel_RThickPhiPlate3"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate5_XPos2+TBWH_BigWheel_RThickPhiPlate3*sin(TBWH_BigWheel_PhiStepAngle2)+(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1)*cos(TBWH_BigWheel_PhiStepAngle2); TBWH_PhiPlate5_YPos2+TBWH_BigWheel_RThickPhiPlate3*cos(TBWH_BigWheel_PhiStepAngle2)-(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1)*sin(TBWH_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate5_XPos2+(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1)*cos(TBWH_BigWheel_PhiStepAngle2); TBWH_PhiPlate5_YPos2-(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1)*sin(TBWH_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate5_XPos1; TBWH_BigWheel_RadDist05"/>
+</gvxysx>
+
+<!-- fifth phi plate with kink - plate 6 -->
+<var name="TBWH_PhiPlate6_XPos1"  value="tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RadDist06-TBWH_BigWheel_PhiStep1toP1/cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/cos(TBWH_BigWheel_PhiStepAngle2)/2." />
+<var name="TBWH_PhiPlate6_XPos3"  value="tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RadDist06-TBWH_BigWheel_PhiStep1toP1/cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/cos(TBWH_BigWheel_PhiStepAngle2)/2.+tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RThickPhiPlate2" />
+<var name="TBWH_PhiPlate6_XPos2"  value="TBWH_PhiPlate6_XPos1+(TBWH_BigWheel_RadDist06*tan(TBWH_BigWheel_PhiStepAngle2)-TBWH_PhiPlate6_XPos1)*cos(TBWH_BigWheel_PhiStepAngle2)*cos(TBWH_BigWheel_PhiStepAngle2)" />
+<var name="TBWH_PhiPlate6_YPos2"  value="TBWH_BigWheel_RadDist06-(TBWH_BigWheel_RadDist06*tan(TBWH_BigWheel_PhiStepAngle2)-TBWH_PhiPlate6_XPos1)*cos(TBWH_BigWheel_PhiStepAngle2)*sin(TBWH_BigWheel_PhiStepAngle2)" />
+
+<gvxysx name="TBWH_PhiPlate6_Even" material="Aluminium" dZ="TBWH_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TBWH_PhiPlate6_XPos3; TBWH_BigWheel_RadDist06+TBWH_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate6_XPos2+TBWH_BigWheel_RThickPhiPlate2*sin(TBWH_BigWheel_PhiStepAngle2)+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2); TBWH_PhiPlate6_YPos2+TBWH_BigWheel_RThickPhiPlate2*cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate6_XPos2+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2); TBWH_PhiPlate6_YPos2-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate6_XPos1; TBWH_BigWheel_RadDist06"/>
+</gvxysx>
+
+<gvxysx name="TBWH_PhiPlate6_Odd" material="Aluminium" dZ="TBWH_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TBWH_PhiPlate6_XPos3-tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_BigWheel_RadDist06+TBWH_BigWheel_RThickPhiPlate2-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate6_XPos2+TBWH_BigWheel_RThickPhiPlate2*sin(TBWH_BigWheel_PhiStepAngle2)+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2)-tan(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_PhiPlate6_YPos2+TBWH_BigWheel_RThickPhiPlate2*cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate6_XPos2+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2)-tan(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_PhiPlate6_YPos2-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate6_XPos1-tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_BigWheel_RadDist06-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+</gvxysx>
+
+<!-- sixth phi plate with kink - plate 7 -->
+<var name="TBWH_PhiPlate7_XPos1"  value="tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RadDist07-TBWH_BigWheel_PhiStep1toP1/cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/cos(TBWH_BigWheel_PhiStepAngle2)/2." />
+<var name="TBWH_PhiPlate7_XPos3"  value="tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RadDist07-TBWH_BigWheel_PhiStep1toP1/cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/cos(TBWH_BigWheel_PhiStepAngle2)/2.+tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RThickPhiPlate3" />
+<var name="TBWH_PhiPlate7_XPos2"  value="TBWH_PhiPlate7_XPos1+(TBWH_BigWheel_RadDist07*tan(TBWH_BigWheel_PhiStepAngle2)-TBWH_PhiPlate7_XPos1)*cos(TBWH_BigWheel_PhiStepAngle2)*cos(TBWH_BigWheel_PhiStepAngle2)-cos(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiThickRPlate" />
+<var name="TBWH_PhiPlate7_YPos2"  value="TBWH_BigWheel_RadDist07-(TBWH_BigWheel_RadDist07*tan(TBWH_BigWheel_PhiStepAngle2)-TBWH_PhiPlate7_XPos1)*cos(TBWH_BigWheel_PhiStepAngle2)*sin(TBWH_BigWheel_PhiStepAngle2)+sin(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiThickRPlate" />
+
+<gvxysx name="TBWH_PhiPlate7" material="Aluminium" dZ="TBWH_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TBWH_PhiPlate7_XPos3; TBWH_BigWheel_RadDist07+TBWH_BigWheel_RThickPhiPlate3"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate7_XPos2+TBWH_BigWheel_RThickPhiPlate3*sin(TBWH_BigWheel_PhiStepAngle2)+(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1)*cos(TBWH_BigWheel_PhiStepAngle2); TBWH_PhiPlate7_YPos2+TBWH_BigWheel_RThickPhiPlate3*cos(TBWH_BigWheel_PhiStepAngle2)-(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1)*sin(TBWH_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate7_XPos2+(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1)*cos(TBWH_BigWheel_PhiStepAngle2); TBWH_PhiPlate7_YPos2-(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1)*sin(TBWH_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate7_XPos1; TBWH_BigWheel_RadDist07"/>
+</gvxysx>
+
+<!-- seventh phi plate with kink - plate 8 -->
+<var name="TBWH_PhiPlate8_XPos1"  value="tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RadDist08-TBWH_BigWheel_PhiStep1toP1/cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/cos(TBWH_BigWheel_PhiStepAngle2)/2." />
+<var name="TBWH_PhiPlate8_XPos3"  value="tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RadDist08-TBWH_BigWheel_PhiStep1toP1/cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/cos(TBWH_BigWheel_PhiStepAngle2)/2.+tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_RThickPhiPlate2" />
+<var name="TBWH_PhiPlate8_XPos2"  value="TBWH_PhiPlate8_XPos1+(TBWH_BigWheel_RadDist08*tan(TBWH_BigWheel_PhiStepAngle2)-TBWH_PhiPlate8_XPos1)*cos(TBWH_BigWheel_PhiStepAngle2)*cos(TBWH_BigWheel_PhiStepAngle2)" />
+<var name="TBWH_PhiPlate8_YPos2"  value="TBWH_BigWheel_RadDist08-(TBWH_BigWheel_RadDist08*tan(TBWH_BigWheel_PhiStepAngle2)-TBWH_PhiPlate8_XPos1)*cos(TBWH_BigWheel_PhiStepAngle2)*sin(TBWH_BigWheel_PhiStepAngle2)" />
+
+<gvxysx name="TBWH_PhiPlate8_Even" material="Aluminium" dZ="TBWH_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TBWH_PhiPlate8_XPos3; TBWH_BigWheel_RadDist08+TBWH_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate8_XPos2+TBWH_BigWheel_RThickPhiPlate2*sin(TBWH_BigWheel_PhiStepAngle2)+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2); TBWH_PhiPlate8_YPos2+TBWH_BigWheel_RThickPhiPlate2*cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate8_XPos2+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2); TBWH_PhiPlate8_YPos2-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate8_XPos1; TBWH_BigWheel_RadDist08"/>
+</gvxysx>
+
+<gvxysx name="TBWH_PhiPlate8_Odd" material="Aluminium" dZ="TBWH_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TBWH_PhiPlate8_XPos3-tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_BigWheel_RadDist08+TBWH_BigWheel_RThickPhiPlate2-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate8_XPos2+TBWH_BigWheel_RThickPhiPlate2*sin(TBWH_BigWheel_PhiStepAngle2)+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2)-tan(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_PhiPlate8_YPos2+TBWH_BigWheel_RThickPhiPlate2*cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate8_XPos2+TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2)-tan(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_PhiPlate8_YPos2-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TBWH_PhiPlate8_XPos1-tan(TBWH_BigWheel_PhiStepAngle1)*TBWH_BigWheel_PhiPlaDelEvenOdd; TBWH_BigWheel_RadDist08-TBWH_BigWheel_PhiPlaDelEvenOdd"/>
+</gvxysx>
+
+<!-- first R plate - center -->
+<box name="TBWH_RPlate1_base" material="Aluminium"   X_Y_Z=" TBWH_BigWheel_PhiThickRPlate; TBWH_BigWheel_RadDist09-TBWH_BigWheel_RadDistPlate02-TBWH_BigWheel_RadDist00; TBWH_BigWheel_ZThickRPlate" />
+<box name="TBWH_RPlate1_sub"  material="Aluminium"   X_Y_Z=" TBWH_BigWheel_PhiThickRPlate; TBWH_BigWheel_RadDist09-TBWH_BigWheel_RadDistPlate02-TBWH_BigWheel_RadDist00+TBWH_BigWheel_WallThickRPlate; TBWH_BigWheel_ZThickRPlate-2.*TBWH_BigWheel_WallThickRPlate" />
+
+<subtraction name="TBWH_RPlate1">
+  <posXYZ volume="TBWH_RPlate1_base" X_Y_Z=" TBWH_BigWheel_PhiDistRPlate1/2.+TBWH_BigWheel_PhiThickRPlate/2.; (TBWH_BigWheel_RadDist09+TBWH_BigWheel_RadDistPlate02-TBWH_BigWheel_RadDist00)/2.; 0." />
+  <posXYZ volume="TBWH_RPlate1_sub"  X_Y_Z=" TBWH_BigWheel_PhiDistRPlate1/2.+TBWH_BigWheel_PhiThickRPlate/2.+TBWH_BigWheel_WallThickRPlate; (TBWH_BigWheel_RadDist09+TBWH_BigWheel_RadDistPlate02-TBWH_BigWheel_RadDist00)/2.; 0." />
+</subtraction>
+
+<!-- second R plate - 7.5 degrees -->
+<box name="TBWH_RPlate2_base" material="Aluminium"   X_Y_Z=" TBWH_BigWheel_PhiThickRPlate; (TBWH_BigWheel_RadDist09-TBWH_BigWheel_RadDistPlate02-TBWH_BigWheel_RadDist00)/cos(TBWH_BigWheel_PhiStepAngle1); TBWH_BigWheel_ZThickRPlate" />
+<box name="TBWH_RPlate2_sub"  material="Aluminium"   X_Y_Z=" TBWH_BigWheel_PhiThickRPlate; (TBWH_BigWheel_RadDist09-TBWH_BigWheel_RadDistPlate02-TBWH_BigWheel_RadDist00+TBWH_BigWheel_WallThickRPlate)/cos(TBWH_BigWheel_PhiStepAngle1); TBWH_BigWheel_ZThickRPlate-2.*TBWH_BigWheel_WallThickRPlate" />
+
+<subtraction name="TBWH_RPlate2">
+  <posXYZ volume="TBWH_RPlate2_base" X_Y_Z=" TBWH_PhiPlate2_XPos1+(TBWH_BigWheel_RadDist09+TBWH_BigWheel_RadDistPlate02-TBWH_BigWheel_RadDist00-2.*TBWH_BigWheel_RadDist02)*tan(TBWH_BigWheel_PhiStepAngle1)/2.; (TBWH_BigWheel_RadDist09+TBWH_BigWheel_RadDistPlate02-TBWH_BigWheel_RadDist00)/2.; 0." rot=" 0.;   0.; -TBWH_BigWheel_PhiStepAngle1/GENV_PiS180" />
+  <posXYZ volume="TBWH_RPlate2_sub"  X_Y_Z=" TBWH_PhiPlate2_XPos1+(TBWH_BigWheel_RadDist09+TBWH_BigWheel_RadDistPlate02-TBWH_BigWheel_RadDist00-2.*TBWH_BigWheel_RadDist02)*tan(TBWH_BigWheel_PhiStepAngle1)/2.-TBWH_BigWheel_WallThickRPlate; (TBWH_BigWheel_RadDist09+TBWH_BigWheel_RadDistPlate02-TBWH_BigWheel_RadDist00)/2.; 0." rot=" 0.;   0.; -TBWH_BigWheel_PhiStepAngle1/GENV_PiS180" />
+</subtraction>
+
+<!-- third R plate - 7.5 degrees TBWH_BigWheel_PhiThickRPlate-->
+<var name="TBWH_RPlate3_length"  value="(TBWH_BigWheel_RadDist09 - TBWH_BigWheel_RadDist00 - (TBWH_PhiPlate2_YPos2-TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)) - (TBWH_BigWheel_PhiStep2toP1 + TBWH_BigWheel_PhiThickRPlate) * sin(TBWH_BigWheel_PhiStepAngle2) ) / cos(TBWH_BigWheel_PhiStepAngle1)" />
+
+<box name="TBWH_RPlate3_base" material="Aluminium"   X_Y_Z=" TBWH_BigWheel_PhiThickRPlate; TBWH_RPlate3_length; TBWH_BigWheel_ZThickRPlate" />
+<box name="TBWH_RPlate3_sub1"  material="Aluminium"   X_Y_Z=" TBWH_BigWheel_PhiThickRPlate; TBWH_RPlate3_length + TBWH_BigWheel_WallThickRPlate/cos(TBWH_BigWheel_PhiStepAngle1); TBWH_BigWheel_ZThickRPlate-2.*TBWH_BigWheel_WallThickRPlate" />
+<box name="TBWH_RPlate3_sub2"  material="Aluminium"   X_Y_Z=" TBWH_BigWheel_PhiThickRPlate; TBWH_RPlate3_length; TBWH_BigWheel_ZThickRPlate+2.*TBWH_BigWheel_WallThickRPlate" />
+
+<subtraction name="TBWH_RPlate3_tmp">
+  <posXYZ volume="TBWH_RPlate3_base" X_Y_Z=" TBWH_RPlate3_length/2.*sin(TBWH_BigWheel_PhiStepAngle1); TBWH_RPlate3_length/2.*cos(TBWH_BigWheel_PhiStepAngle1); 0." rot=" 0.;   0.; -TBWH_BigWheel_PhiStepAngle1/GENV_PiS180" />
+  <posXYZ volume="TBWH_RPlate3_sub1"  X_Y_Z=" TBWH_RPlate3_length/2.*sin(TBWH_BigWheel_PhiStepAngle1)-TBWH_BigWheel_WallThickRPlate; TBWH_RPlate3_length/2.*cos(TBWH_BigWheel_PhiStepAngle1); 0." rot=" 0.; 0.; -TBWH_BigWheel_PhiStepAngle1/GENV_PiS180" />
+  <posXYZ volume="TBWH_RPlate3_sub2" X_Y_Z="TBWH_RPlate3_length/2.*sin(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/2*(cos(TBWH_BigWheel_PhiStepAngle1)-cos(TBWH_BigWheel_PhiStepAngle2));TBWH_RPlate3_length/2.*cos(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_PhiThickRPlate/2*(sin(TBWH_BigWheel_PhiStepAngle2)-sin(TBWH_BigWheel_PhiStepAngle1)); 0." rot=" 0.; 0.; -TBWH_BigWheel_PhiStepAngle2/GENV_PiS180" />
+</subtraction>
+
+<var name="TBWH_RPlate3_PosX" value="TBWH_PhiPlate2_XPos2+(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1)*cos(TBWH_BigWheel_PhiStepAngle2)+TBWH_BigWheel_PhiThickRPlate*(0.5*cos(TBWH_BigWheel_PhiStepAngle1)-cos(TBWH_BigWheel_PhiStepAngle2))-cos(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiThickRPlate" />
+
+<var name="TBWH_RPlate3_PosY" value="TBWH_PhiPlate2_YPos2+(TBWH_BigWheel_PhiStep2toP1-TBWH_BigWheel_PhiStepP2toP2)*sin(TBWH_BigWheel_PhiStepAngle2)+TBWH_BigWheel_PhiThickRPlate*(sin(TBWH_BigWheel_PhiStepAngle2)-0.5*sin(TBWH_BigWheel_PhiStepAngle1))+sin(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiThickRPlate" />
+
+<composition name="TBWH_RPlate3" >
+  <posXYZ  volume="TBWH_RPlate3_tmp" X_Y_Z=" TBWH_RPlate3_PosX-GENV_Eps; TBWH_RPlate3_PosY ; 0." />
+</composition>
+
+<!-- first R plate - 15 degrees -->
+<box name="TBWH_RPlate4_base" material="Aluminium"   X_Y_Z=" TBWH_BigWheel_PhiThickRPlate; (TBWH_BigWheel_RadDist09-TBWH_BigWheel_RadDist00)/cos(TBWH_BigWheel_PhiStepAngle2); TBWH_BigWheel_ZThickRPlate" />
+<box name="TBWH_RPlate4_sub"  material="Aluminium"   X_Y_Z=" TBWH_BigWheel_PhiThickRPlate; (TBWH_BigWheel_RadDist09-TBWH_BigWheel_RadDist00+TBWH_BigWheel_WallThickRPlate)/cos(TBWH_BigWheel_PhiStepAngle2); TBWH_BigWheel_ZThickRPlate-2.*TBWH_BigWheel_WallThickRPlate" />
+
+<subtraction name="TBWH_RPlate4">
+  <posXYZ volume="TBWH_RPlate4_base" X_Y_Z=" (TBWH_BigWheel_RadDist09-TBWH_BigWheel_RadDist00)*tan(TBWH_BigWheel_PhiStepAngle2)/2.+(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1-1.5*TBWH_BigWheel_PhiThickRPlate)/cos(TBWH_BigWheel_PhiStepAngle2); (TBWH_BigWheel_RadDist09-TBWH_BigWheel_RadDist00)/2.; 0." rot=" 0.;   0.; -TBWH_BigWheel_PhiStepAngle2/GENV_PiS180" />
+  <posXYZ volume="TBWH_RPlate4_sub"  X_Y_Z=" (TBWH_BigWheel_RadDist09-TBWH_BigWheel_RadDist00)*tan(TBWH_BigWheel_PhiStepAngle2)/2.-TBWH_BigWheel_WallThickRPlate+(TBWH_BigWheel_PhiStepP2toP2-TBWH_BigWheel_PhiStep2toP1-1.5*TBWH_BigWheel_PhiThickRPlate)/cos(TBWH_BigWheel_PhiStepAngle2); (TBWH_BigWheel_RadDist09-TBWH_BigWheel_RadDist00)/2.; 0." rot=" 0.;   0.; -TBWH_BigWheel_PhiStepAngle2/GENV_PiS180" />
+</subtraction>
+
+<!-- second R plate - 15 degrees -->
+<box name="TBWH_RPlate5_base" material="Aluminium"   X_Y_Z=" TBWH_BigWheel_PhiThickRPlate; (TBWH_BigWheel_RadDist09-cos(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_RadDistOutPlate)/cos(TBWH_BigWheel_PhiStepAngle2); TBWH_BigWheel_ZThickRPlate" />
+<box name="TBWH_RPlate5_sub"  material="Aluminium"   X_Y_Z=" TBWH_BigWheel_PhiThickRPlate; (TBWH_BigWheel_RadDist09-cos(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_RadDistOutPlate)/cos(TBWH_BigWheel_PhiStepAngle2)+TBWH_BigWheel_WallThickRPlate; TBWH_BigWheel_ZThickRPlate-2.*TBWH_BigWheel_WallThickRPlate" />
+
+<var name="TBWH_RPlate5_PosX" value="sin(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_RadDistOutPlate/2. +TBWH_PhiPlate2_XPos2 +TBWH_BigWheel_PhiStepP2toP2*cos(TBWH_BigWheel_PhiStepAngle2) +tan(TBWH_BigWheel_PhiStepAngle2)*(TBWH_BigWheel_RadDist09/2.-TBWH_PhiPlate2_YPos2+TBWH_BigWheel_PhiStepP2toP2*sin(TBWH_BigWheel_PhiStepAngle2)-TBWH_BigWheel_RadDist00)"/>
+
+<subtraction name="TBWH_RPlate5">
+  <posXYZ volume="TBWH_RPlate5_base" X_Y_Z=" TBWH_RPlate5_PosX - cos(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiThickRPlate/2.; (TBWH_BigWheel_RadDist09+cos(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_RadDistOutPlate)/2. - TBWH_BigWheel_RadDist00 + sin(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiThickRPlate/2.; 0." rot=" 0.;   0.; -TBWH_BigWheel_PhiStepAngle2/GENV_PiS180" />
+  <posXYZ volume="TBWH_RPlate5_sub"  X_Y_Z=" TBWH_RPlate5_PosX - cos(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiThickRPlate/2.+TBWH_BigWheel_WallThickRPlate; (TBWH_BigWheel_RadDist09+cos(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_RadDistOutPlate)/2.- TBWH_BigWheel_RadDist00 + sin(TBWH_BigWheel_PhiStepAngle2)*TBWH_BigWheel_PhiThickRPlate/2.; 0." rot=" 0.;   0.; -TBWH_BigWheel_PhiStepAngle2/GENV_PiS180" />
+</subtraction>
+
+<composition name="TBWH_Support_EvenSector_ASide">
+  <posXYZ volume="TBWH_PhiPlate1"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate2_Even"  X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate3"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate4_Even"  X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate5"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate6_Even"  X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate7"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate8_Even"  X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_RPlate1"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate1"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate2"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate2"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate3"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate3"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate4"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate4"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate5"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate5"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+</composition>
+
+<composition name="TBWH_Support_OddSector_ASide">
+  <posXYZ volume="TBWH_PhiPlate1"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate2_Odd"   X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate3"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate4_Odd"   X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate5"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate6_Odd"   X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate7"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate8_Odd"   X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_RPlate1"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate1"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate2"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate2"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate3"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate3"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate4"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate4"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate5"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate5"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+</composition>
+
+<composition name="TBWH_Support_EvenSector_CSide">
+  <posXYZ volume="TBWH_PhiPlate1"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate2_Even"  X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate3"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate4_Even"  X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate5"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate6_Even"  X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate7"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate8_Even"  X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_RPlate1"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate1"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate2"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate2"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate3"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate3"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate4"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate4"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate5"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate5"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+</composition>
+
+<composition name="TBWH_Support_OddSector_CSide">
+  <posXYZ volume="TBWH_PhiPlate1"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate2_Odd"   X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate3"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate4_Odd"   X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate5"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate6_Odd"   X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate7"       X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_PhiPlate8_Odd"   X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TBWH_RPlate1"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate1"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate2"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate2"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate3"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate3"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate4"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate4"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TBWH_RPlate5"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00; -TBWH_BigWheel_ZThickPhiPlate-TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TBWH_RPlate5"         X_Y_Z=" 0.; TBWH_BigWheel_RadDist00;  TBWH_BigWheel_ZThickPhiPlate+TBWH_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+</composition>
+
+<!-- tube and boxes are rather rouhg approximated here - should be okay though - Cavern Background only -->
+
+<tubs name="TBWH_CentralTube" material="Aluminium" Rio_Z="TBWH_BigWheel_TubeInnerR; TBWH_BigWheel_TubeOuterR; TBWH_BigWheel_WallThickPhiPlate" nbPhi="20" />
+
+<box name="TBWH_SurBox_base" material="Aluminium" X_Y_Z=" 2.*TBWH_BigWheel_RadDist09*tan(TBWH_BigWheel_PhiStepAngle2); TGC_BigWheel_SurBoxSideLength; TGC_BigWheel_SurBoxSideLength" />
+<box name="TBWH_SurBox_inner" material="Aluminium" X_Y_Z=" 2.*TBWH_BigWheel_RadDist09*tan(TBWH_BigWheel_PhiStepAngle2)+2.*GENV_Eps; TGC_BigWheel_SurBoxSideLength-2.*TGC_BigWheel_SurBoxSpcWall; TGC_BigWheel_SurBoxSideLength-2.*TGC_BigWheel_SurBoxSpcWall" />
+
+<subtraction name="TBWH_SurBox_default" >
+  <posXYZ volume="TBWH_SurBox_base"  X_Y_Z=" 0.; TBWH_BigWheel_RadDist09+TGC_BigWheel_SurBoxSideLength; 0." />
+  <posXYZ volume="TBWH_SurBox_inner"  X_Y_Z=" 0.; TBWH_BigWheel_RadDist09+TGC_BigWheel_SurBoxSideLength; 0." />
+</subtraction>
+
+<box name="TBWH_SurBoxSpc_base" material="Aluminium" X_Y_Z=" 2.*TBWH_BigWheel_RadDist09*tan(TBWH_BigWheel_PhiStepAngle2); TGC_BigWheel_SurBoxSpcLength; TGC_BigWheel_SurBoxSpcHeight" />
+<box name="TBWH_SurBoxSpc_inner" material="Aluminium" X_Y_Z="  2.*TBWH_BigWheel_RadDist09*tan(TBWH_BigWheel_PhiStepAngle2)+2.*GENV_Eps; TGC_BigWheel_SurBoxSpcLength-2.*TGC_BigWheel_SurBoxSpcWall; TGC_BigWheel_SurBoxSpcHeight" />
+
+<subtraction name="TBWH_SurBoxSpc" >
+  <posXYZ volume="TBWH_SurBoxSpc_base"   X_Y_Z=" 0.; TBWH_BigWheel_RadDist09+1.5*TGC_BigWheel_SurBoxSideLength+TGC_BigWheel_SurBoxDistance/2.; TGC_BigWheel_SurBoxSideLength/2.+TGC_BigWheel_SurBoxSpcHeight/2." />
+  <posXYZ volume="TBWH_SurBoxSpc_inner"  X_Y_Z=" 0.; TBWH_BigWheel_RadDist09+1.5*TGC_BigWheel_SurBoxSideLength+TGC_BigWheel_SurBoxDistance/2.; TGC_BigWheel_SurBoxSideLength/2.+TGC_BigWheel_SurBoxSpcHeight/2.-TGC_BigWheel_SurBoxSpcWall" />
+</subtraction>
+
+<composition name="TBWH_SurBox_extended" >
+  <posXYZ volume="TBWH_SurBox_default"  X_Y_Z=" 0.; TGC_BigWheel_SurBoxSideLength + TGC_BigWheel_SurBoxDistance; 0." />
+  <posXYZ volume="TBWH_SurBoxSpc"       X_Y_Z=" 0.; 0.;  GENV_Eps" />
+  <posXYZ volume="TBWH_SurBoxSpc"       X_Y_Z=" 0.; 0.; -GENV_Eps" rot=" 0.; 180.; 0."/>
+</composition>
+
+<composition name="TBWH_BigWheel_ASide">
+  <foreach  index="counter"  begin="0"  loops="6" >
+    <posXYZ volume="TBWH_Support_EvenSector_ASide"  X_Y_Z=" 0.; 0.; TBWH_BigWheel_ZPosL" rot="0.; 0.; counter*60." />
+    <posXYZ volume="TBWH_Support_OddSector_ASide"   X_Y_Z=" 0.; 0.; TBWH_BigWheel_ZPosL" rot="0.; 0.; 30.+(counter)*60." />
+  </foreach>
+  <foreach  index="counter"  begin="0"  loops="12" >
+    <posXYZ volume="TBWH_SurBox_default"   X_Y_Z=" 0.; 0.; TBWH_BigWheel_ZPosL" rot="0.; 0.; counter*30." />
+  </foreach>
+  <foreach  index="counter"  begin="0"  loops="7" >
+    <posXYZ volume="TBWH_SurBox_extended"  X_Y_Z=" 0.; 0.; TBWH_BigWheel_ZPosL" rot="0.; 0.; -90.+counter*30." />
+  </foreach>
+  <posXYZ volume="TBWH_CentralTube"   X_Y_Z=" 0.; 0.; TBWH_BigWheel_ZPosL" />
+</composition>
+
+<composition name="TBWH_BigWheel_CSide">
+  <foreach  index="counter"  begin="0"  loops="6" >
+    <posXYZ volume="TBWH_Support_EvenSector_CSide"  X_Y_Z=" 0.; 0.; -TBWH_BigWheel_ZPosL" rot="0.; 0.; counter*60." />
+    <posXYZ volume="TBWH_Support_OddSector_CSide"   X_Y_Z=" 0.; 0.; -TBWH_BigWheel_ZPosL" rot="0.; 0.; 30.+(counter)*60." />
+  </foreach>
+  <foreach  index="counter"  begin="0"  loops="12" >
+    <posXYZ volume="TBWH_SurBox_default"   X_Y_Z=" 0.; 0.; -TBWH_BigWheel_ZPosL" rot="0.; 0.; counter*30." />
+  </foreach>
+  <foreach  index="counter"  begin="0"  loops="7" >
+    <posXYZ volume="TBWH_SurBox_extended"  X_Y_Z=" 0.; 0.; -TBWH_BigWheel_ZPosL" rot="0.; 0.; -90.+counter*30." />
+  </foreach>
+  <posXYZ volume="TBWH_CentralTube"   X_Y_Z=" 0.; 0.; -TBWH_BigWheel_ZPosL" />
+</composition>
+
+<composition name="TBWH_BigWheels">
+  <posXYZ volume="TBWH_BigWheel_ASide" X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="TBWH_BigWheel_CSide" X_Y_Z=" 0.; 0.; 0." />
+</composition>
+
+<!--     name       =  TGC3 Big Wheel                section name       = "Supports"  -->
+<var name="TGC3_BigWheel_ZPosL"             value=" 15150.  "/>
+
+<var name="TGC3_BigWheel_RadDist00"         value="  2445.  "/>
+<var name="TGC3_BigWheel_RadDist01"         value="   970.  "/>
+<var name="TGC3_BigWheel_RadDist02"         value="  2528.  "/>
+<var name="TGC3_BigWheel_RadDist03"         value="  3560.  "/>
+<var name="TGC3_BigWheel_RadDist04"         value="  4767.  "/>
+<var name="TGC3_BigWheel_RadDist05"         value="  5800.  "/>
+<var name="TGC3_BigWheel_RadDist06"         value="  7005.  "/>
+<var name="TGC3_BigWheel_RadDist07"         value="  8037.  "/>
+<var name="TGC3_BigWheel_RadDist08"         value="  9243.  "/>
+<var name="TGC3_BigWheel_RadDist09"         value=" 12230.  "/>
+<var name="TGC3_BigWheel_RadDistOutPlate"   value="  4150.  "/>
+<var name="TGC3_BigWheel_RadDistPlate02"    value="  2353.  "/>
+<var name="TGC3_BigWheel_PhiDistRPlate1"    value="   390.  "/>
+
+<var name="TGC3_BigWheel_ZThickPhiPlate"    value="    30.  "/>
+<var name="TGC3_BigWheel_WallThickPhiPlate" value="    16.  "/>
+<var name="TGC3_BigWheel_RThickPhiPlate1"   value="   200.  "/>
+<var name="TGC3_BigWheel_RThickPhiPlate2"   value="   130.  "/> <!-- estimated -->
+<var name="TGC3_BigWheel_ZThickRPlate"      value="   150.  "/>
+<var name="TGC3_BigWheel_PhiThickRPlate"    value="    50.  "/>
+<var name="TGC3_BigWheel_WallThickRPlate"   value="     5.  "/>
+
+<var name="TGC3_BigWheel_PhiPlaDelEvenOdd"  value="TGC3_BigWheel_RThickPhiPlate2 + TGC3_BigWheel_PhiThickRPlate"/>
+
+<var name="TGC3_BigWheel_PhiStepAngle1"     value="     7.5 * GENV_PiS180 "/>
+<var name="TGC3_BigWheel_PhiStepAngle2"     value="    15.  * GENV_PiS180  "/>
+
+<var name="TGC3_BigWheel_PhiStep1toP1"      value="   -28.  "/> <!-- estimate -->
+<var name="TGC3_BigWheel_PhiStepP1toP2"     value="   456.  "/>
+
+<var name="TGC3_BigWheel_PhiStep2toP1"      value="   468.  "/>
+<var name="TGC3_BigWheel_PhiStepP2toP2"     value="   765. + TGC3_BigWheel_PhiThickRPlate"/> <!-- estimate -->
+
+<var name="TGC3_BigWheel_TubeInnerR"        value="  2335.  "/>
+<var name="TGC3_BigWheel_TubeOuterR"        value="  TGC3_BigWheel_TubeInnerR + 405. "/>
+
+<!-- lowest phi plate - plate 1 -->
+<gvxysx name="TGC3_PhiPlate1" material="Aluminium" dZ="TGC3_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y=" (TGC3_BigWheel_RadDist00+TGC3_BigWheel_RadDist01+TGC3_BigWheel_RThickPhiPlate1)*sin(TGC3_BigWheel_PhiStepAngle2); TGC3_BigWheel_RadDist01+TGC3_BigWheel_RThickPhiPlate1"/>
+  <gvxy_point X_Y=" (TGC3_BigWheel_RadDist00+TGC3_BigWheel_RadDist01)*sin(TGC3_BigWheel_PhiStepAngle2); TGC3_BigWheel_RadDist01"/>
+</gvxysx>
+
+<!-- first phi plate with kink - plate 2 -->
+<var name="TGC3_PhiPlate2_XPos1"  value="tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RadDist02-TGC3_BigWheel_PhiStep1toP1/cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/cos(TGC3_BigWheel_PhiStepAngle2)/2." />
+<var name="TGC3_PhiPlate2_XPos3"  value="tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RadDist02-TGC3_BigWheel_PhiStep1toP1/cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/cos(TGC3_BigWheel_PhiStepAngle2)/2.+tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RThickPhiPlate2" />
+<var name="TGC3_PhiPlate2_XPos2"  value="TGC3_PhiPlate2_XPos1+(TGC3_BigWheel_RadDist02*tan(TGC3_BigWheel_PhiStepAngle2)-TGC3_PhiPlate2_XPos1)*cos(TGC3_BigWheel_PhiStepAngle2)*cos(TGC3_BigWheel_PhiStepAngle2)" />
+<var name="TGC3_PhiPlate2_YPos2"  value="TGC3_BigWheel_RadDist02-(TGC3_BigWheel_RadDist02*tan(TGC3_BigWheel_PhiStepAngle2)-TGC3_PhiPlate2_XPos1)*cos(TGC3_BigWheel_PhiStepAngle2)*sin(TGC3_BigWheel_PhiStepAngle2)" />
+
+<gvxysx name="TGC3_PhiPlate2_Even" material="Aluminium" dZ="TGC3_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC3_PhiPlate2_XPos3; TGC3_BigWheel_RadDist02+TGC3_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate2_XPos2+TGC3_BigWheel_RThickPhiPlate2*sin(TGC3_BigWheel_PhiStepAngle2)+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2); TGC3_PhiPlate2_YPos2+TGC3_BigWheel_RThickPhiPlate2*cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate2_XPos2+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2); TGC3_PhiPlate2_YPos2-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate2_XPos1; TGC3_BigWheel_RadDist02"/>
+</gvxysx>
+
+<gvxysx name="TGC3_PhiPlate2_Odd" material="Aluminium" dZ="TGC3_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC3_PhiPlate2_XPos3-tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_BigWheel_RadDist02+TGC3_BigWheel_RThickPhiPlate2-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate2_XPos2+TGC3_BigWheel_RThickPhiPlate2*sin(TGC3_BigWheel_PhiStepAngle2)+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2)-tan(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_PhiPlate2_YPos2+TGC3_BigWheel_RThickPhiPlate2*cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate2_XPos2+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2)-tan(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_PhiPlate2_YPos2-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate2_XPos1-tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_BigWheel_RadDist02-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+</gvxysx>
+
+<!-- second phi plate with kink - plate 3 -->
+<var name="TGC3_PhiPlate3_XPos1"  value="tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RadDist03-TGC3_BigWheel_PhiStep1toP1/cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/cos(TGC3_BigWheel_PhiStepAngle2)/2." />
+<var name="TGC3_PhiPlate3_XPos3"  value="tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RadDist03-TGC3_BigWheel_PhiStep1toP1/cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/cos(TGC3_BigWheel_PhiStepAngle2)/2.+tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RThickPhiPlate2" />
+<var name="TGC3_PhiPlate3_XPos2"  value="TGC3_PhiPlate3_XPos1+(TGC3_BigWheel_RadDist03*tan(TGC3_BigWheel_PhiStepAngle2)-TGC3_PhiPlate3_XPos1)*cos(TGC3_BigWheel_PhiStepAngle2)*cos(TGC3_BigWheel_PhiStepAngle2)-cos(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiThickRPlate" />
+<var name="TGC3_PhiPlate3_YPos2"  value="TGC3_BigWheel_RadDist03-(TGC3_BigWheel_RadDist03*tan(TGC3_BigWheel_PhiStepAngle2)-TGC3_PhiPlate3_XPos1)*cos(TGC3_BigWheel_PhiStepAngle2)*sin(TGC3_BigWheel_PhiStepAngle2)+sin(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiThickRPlate" />
+
+<gvxysx name="TGC3_PhiPlate3" material="Aluminium" dZ="TGC3_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC3_PhiPlate3_XPos3; TGC3_BigWheel_RadDist03+TGC3_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate3_XPos2+TGC3_BigWheel_RThickPhiPlate2*sin(TGC3_BigWheel_PhiStepAngle2)+(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*cos(TGC3_BigWheel_PhiStepAngle2); TGC3_PhiPlate3_YPos2+TGC3_BigWheel_RThickPhiPlate2*cos(TGC3_BigWheel_PhiStepAngle2)-(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*sin(TGC3_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate3_XPos2+(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*cos(TGC3_BigWheel_PhiStepAngle2); TGC3_PhiPlate3_YPos2-(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*sin(TGC3_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate3_XPos1; TGC3_BigWheel_RadDist03"/>
+</gvxysx>
+
+<!-- third phi plate with kink - plate 4 -->
+<var name="TGC3_PhiPlate4_XPos1"  value="tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RadDist04-TGC3_BigWheel_PhiStep1toP1/cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/cos(TGC3_BigWheel_PhiStepAngle2)/2." />
+<var name="TGC3_PhiPlate4_XPos3"  value="tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RadDist04-TGC3_BigWheel_PhiStep1toP1/cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/cos(TGC3_BigWheel_PhiStepAngle2)/2.+tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RThickPhiPlate2" />
+<var name="TGC3_PhiPlate4_XPos2"  value="TGC3_PhiPlate4_XPos1+(TGC3_BigWheel_RadDist04*tan(TGC3_BigWheel_PhiStepAngle2)-TGC3_PhiPlate4_XPos1)*cos(TGC3_BigWheel_PhiStepAngle2)*cos(TGC3_BigWheel_PhiStepAngle2)" />
+<var name="TGC3_PhiPlate4_YPos2"  value="TGC3_BigWheel_RadDist04-(TGC3_BigWheel_RadDist04*tan(TGC3_BigWheel_PhiStepAngle2)-TGC3_PhiPlate4_XPos1)*cos(TGC3_BigWheel_PhiStepAngle2)*sin(TGC3_BigWheel_PhiStepAngle2)" />
+
+<gvxysx name="TGC3_PhiPlate4_Even" material="Aluminium" dZ="TGC3_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC3_PhiPlate4_XPos3; TGC3_BigWheel_RadDist04+TGC3_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate4_XPos2+TGC3_BigWheel_RThickPhiPlate2*sin(TGC3_BigWheel_PhiStepAngle2)+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2); TGC3_PhiPlate4_YPos2+TGC3_BigWheel_RThickPhiPlate2*cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate4_XPos2+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2); TGC3_PhiPlate4_YPos2-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate4_XPos1; TGC3_BigWheel_RadDist04"/>
+</gvxysx>
+
+<gvxysx name="TGC3_PhiPlate4_Odd" material="Aluminium" dZ="TGC3_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC3_PhiPlate4_XPos3-tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_BigWheel_RadDist04+TGC3_BigWheel_RThickPhiPlate2-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate4_XPos2+TGC3_BigWheel_RThickPhiPlate2*sin(TGC3_BigWheel_PhiStepAngle2)+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2)-tan(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_PhiPlate4_YPos2+TGC3_BigWheel_RThickPhiPlate2*cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate4_XPos2+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2)-tan(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_PhiPlate4_YPos2-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate4_XPos1-tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_BigWheel_RadDist04-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+</gvxysx>
+
+<!-- forth phi plate with kink - plate 5 -->
+<var name="TGC3_PhiPlate5_XPos1"  value="tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RadDist05-TGC3_BigWheel_PhiStep1toP1/cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/cos(TGC3_BigWheel_PhiStepAngle2)/2." />
+<var name="TGC3_PhiPlate5_XPos3"  value="tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RadDist05-TGC3_BigWheel_PhiStep1toP1/cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/cos(TGC3_BigWheel_PhiStepAngle2)/2.+tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RThickPhiPlate2" />
+<var name="TGC3_PhiPlate5_XPos2"  value="TGC3_PhiPlate5_XPos1+(TGC3_BigWheel_RadDist05*tan(TGC3_BigWheel_PhiStepAngle2)-TGC3_PhiPlate5_XPos1)*cos(TGC3_BigWheel_PhiStepAngle2)*cos(TGC3_BigWheel_PhiStepAngle2)-cos(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiThickRPlate" />
+<var name="TGC3_PhiPlate5_YPos2"  value="TGC3_BigWheel_RadDist05-(TGC3_BigWheel_RadDist05*tan(TGC3_BigWheel_PhiStepAngle2)-TGC3_PhiPlate5_XPos1)*cos(TGC3_BigWheel_PhiStepAngle2)*sin(TGC3_BigWheel_PhiStepAngle2)+sin(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiThickRPlate" />
+
+<gvxysx name="TGC3_PhiPlate5" material="Aluminium" dZ="TGC3_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC3_PhiPlate5_XPos3; TGC3_BigWheel_RadDist05+TGC3_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate5_XPos2+TGC3_BigWheel_RThickPhiPlate2*sin(TGC3_BigWheel_PhiStepAngle2)+(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*cos(TGC3_BigWheel_PhiStepAngle2); TGC3_PhiPlate5_YPos2+TGC3_BigWheel_RThickPhiPlate2*cos(TGC3_BigWheel_PhiStepAngle2)-(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*sin(TGC3_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate5_XPos2+(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*cos(TGC3_BigWheel_PhiStepAngle2); TGC3_PhiPlate5_YPos2-(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*sin(TGC3_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate5_XPos1; TGC3_BigWheel_RadDist05"/>
+</gvxysx>
+
+<!-- fifth phi plate with kink - plate 6 -->
+<var name="TGC3_PhiPlate6_XPos1"  value="tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RadDist06-TGC3_BigWheel_PhiStep1toP1/cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/cos(TGC3_BigWheel_PhiStepAngle2)/2." />
+<var name="TGC3_PhiPlate6_XPos3"  value="tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RadDist06-TGC3_BigWheel_PhiStep1toP1/cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/cos(TGC3_BigWheel_PhiStepAngle2)/2.+tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RThickPhiPlate2" />
+<var name="TGC3_PhiPlate6_XPos2"  value="TGC3_PhiPlate6_XPos1+(TGC3_BigWheel_RadDist06*tan(TGC3_BigWheel_PhiStepAngle2)-TGC3_PhiPlate6_XPos1)*cos(TGC3_BigWheel_PhiStepAngle2)*cos(TGC3_BigWheel_PhiStepAngle2)" />
+<var name="TGC3_PhiPlate6_YPos2"  value="TGC3_BigWheel_RadDist06-(TGC3_BigWheel_RadDist06*tan(TGC3_BigWheel_PhiStepAngle2)-TGC3_PhiPlate6_XPos1)*cos(TGC3_BigWheel_PhiStepAngle2)*sin(TGC3_BigWheel_PhiStepAngle2)" />
+
+<gvxysx name="TGC3_PhiPlate6_Even" material="Aluminium" dZ="TGC3_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC3_PhiPlate6_XPos3; TGC3_BigWheel_RadDist06+TGC3_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate6_XPos2+TGC3_BigWheel_RThickPhiPlate2*sin(TGC3_BigWheel_PhiStepAngle2)+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2); TGC3_PhiPlate6_YPos2+TGC3_BigWheel_RThickPhiPlate2*cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate6_XPos2+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2); TGC3_PhiPlate6_YPos2-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate6_XPos1; TGC3_BigWheel_RadDist06"/>
+</gvxysx>
+
+<gvxysx name="TGC3_PhiPlate6_Odd" material="Aluminium" dZ="TGC3_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC3_PhiPlate6_XPos3-tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_BigWheel_RadDist06+TGC3_BigWheel_RThickPhiPlate2-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate6_XPos2+TGC3_BigWheel_RThickPhiPlate2*sin(TGC3_BigWheel_PhiStepAngle2)+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2)-tan(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_PhiPlate6_YPos2+TGC3_BigWheel_RThickPhiPlate2*cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate6_XPos2+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2)-tan(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_PhiPlate6_YPos2-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate6_XPos1-tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_BigWheel_RadDist06-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+</gvxysx>
+
+<!-- sixth phi plate with kink - plate 7 -->
+<var name="TGC3_PhiPlate7_XPos1"  value="tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RadDist07-TGC3_BigWheel_PhiStep1toP1/cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/cos(TGC3_BigWheel_PhiStepAngle2)/2." />
+<var name="TGC3_PhiPlate7_XPos3"  value="tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RadDist07-TGC3_BigWheel_PhiStep1toP1/cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/cos(TGC3_BigWheel_PhiStepAngle2)/2.+tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RThickPhiPlate2" />
+<var name="TGC3_PhiPlate7_XPos2"  value="TGC3_PhiPlate7_XPos1+(TGC3_BigWheel_RadDist07*tan(TGC3_BigWheel_PhiStepAngle2)-TGC3_PhiPlate7_XPos1)*cos(TGC3_BigWheel_PhiStepAngle2)*cos(TGC3_BigWheel_PhiStepAngle2)-cos(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiThickRPlate" />
+<var name="TGC3_PhiPlate7_YPos2"  value="TGC3_BigWheel_RadDist07-(TGC3_BigWheel_RadDist07*tan(TGC3_BigWheel_PhiStepAngle2)-TGC3_PhiPlate7_XPos1)*cos(TGC3_BigWheel_PhiStepAngle2)*sin(TGC3_BigWheel_PhiStepAngle2)+sin(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiThickRPlate" />
+
+<gvxysx name="TGC3_PhiPlate7" material="Aluminium" dZ="TGC3_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC3_PhiPlate7_XPos3; TGC3_BigWheel_RadDist07+TGC3_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate7_XPos2+TGC3_BigWheel_RThickPhiPlate2*sin(TGC3_BigWheel_PhiStepAngle2)+(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*cos(TGC3_BigWheel_PhiStepAngle2); TGC3_PhiPlate7_YPos2+TGC3_BigWheel_RThickPhiPlate2*cos(TGC3_BigWheel_PhiStepAngle2)-(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*sin(TGC3_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate7_XPos2+(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*cos(TGC3_BigWheel_PhiStepAngle2); TGC3_PhiPlate7_YPos2-(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*sin(TGC3_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate7_XPos1; TGC3_BigWheel_RadDist07"/>
+</gvxysx>
+
+<!-- seventh phi plate with kink - plate 8 -->
+<var name="TGC3_PhiPlate8_XPos1"  value="tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RadDist08-TGC3_BigWheel_PhiStep1toP1/cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/cos(TGC3_BigWheel_PhiStepAngle2)/2." />
+<var name="TGC3_PhiPlate8_XPos3"  value="tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RadDist08-TGC3_BigWheel_PhiStep1toP1/cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/cos(TGC3_BigWheel_PhiStepAngle2)/2.+tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_RThickPhiPlate2" />
+<var name="TGC3_PhiPlate8_XPos2"  value="TGC3_PhiPlate8_XPos1+(TGC3_BigWheel_RadDist08*tan(TGC3_BigWheel_PhiStepAngle2)-TGC3_PhiPlate8_XPos1)*cos(TGC3_BigWheel_PhiStepAngle2)*cos(TGC3_BigWheel_PhiStepAngle2)" />
+<var name="TGC3_PhiPlate8_YPos2"  value="TGC3_BigWheel_RadDist08-(TGC3_BigWheel_RadDist08*tan(TGC3_BigWheel_PhiStepAngle2)-TGC3_PhiPlate8_XPos1)*cos(TGC3_BigWheel_PhiStepAngle2)*sin(TGC3_BigWheel_PhiStepAngle2)" />
+
+<gvxysx name="TGC3_PhiPlate8_Even" material="Aluminium" dZ="TGC3_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC3_PhiPlate8_XPos3; TGC3_BigWheel_RadDist08+TGC3_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate8_XPos2+TGC3_BigWheel_RThickPhiPlate2*sin(TGC3_BigWheel_PhiStepAngle2)+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2); TGC3_PhiPlate8_YPos2+TGC3_BigWheel_RThickPhiPlate2*cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate8_XPos2+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2); TGC3_PhiPlate8_YPos2-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate8_XPos1; TGC3_BigWheel_RadDist08"/>
+</gvxysx>
+
+<gvxysx name="TGC3_PhiPlate8_Odd" material="Aluminium" dZ="TGC3_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC3_PhiPlate8_XPos3-tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_BigWheel_RadDist08+TGC3_BigWheel_RThickPhiPlate2-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate8_XPos2+TGC3_BigWheel_RThickPhiPlate2*sin(TGC3_BigWheel_PhiStepAngle2)+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2)-tan(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_PhiPlate8_YPos2+TGC3_BigWheel_RThickPhiPlate2*cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate8_XPos2+TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2)-tan(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_PhiPlate8_YPos2-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC3_PhiPlate8_XPos1-tan(TGC3_BigWheel_PhiStepAngle1)*TGC3_BigWheel_PhiPlaDelEvenOdd; TGC3_BigWheel_RadDist08-TGC3_BigWheel_PhiPlaDelEvenOdd"/>
+</gvxysx>
+
+<!-- first R plate - center -->
+<box name="TGC3_RPlate1_base" material="Aluminium"   X_Y_Z=" TGC3_BigWheel_PhiThickRPlate; TGC3_BigWheel_RadDist09-TGC3_BigWheel_RadDistPlate02-TGC3_BigWheel_RadDist00; TGC3_BigWheel_ZThickRPlate" />
+<box name="TGC3_RPlate1_sub"  material="Aluminium"   X_Y_Z=" TGC3_BigWheel_PhiThickRPlate; TGC3_BigWheel_RadDist09-TGC3_BigWheel_RadDistPlate02-TGC3_BigWheel_RadDist00+TGC3_BigWheel_WallThickRPlate; TGC3_BigWheel_ZThickRPlate-2.*TGC3_BigWheel_WallThickRPlate" />
+
+<subtraction name="TGC3_RPlate1">
+  <posXYZ volume="TGC3_RPlate1_base" X_Y_Z=" TGC3_BigWheel_PhiDistRPlate1/2.+TGC3_BigWheel_PhiThickRPlate/2.; (TGC3_BigWheel_RadDist09+TGC3_BigWheel_RadDistPlate02-TGC3_BigWheel_RadDist00)/2.; 0." />
+  <posXYZ volume="TGC3_RPlate1_sub"  X_Y_Z=" TGC3_BigWheel_PhiDistRPlate1/2.+TGC3_BigWheel_PhiThickRPlate/2.+TGC3_BigWheel_WallThickRPlate; (TGC3_BigWheel_RadDist09+TGC3_BigWheel_RadDistPlate02-TGC3_BigWheel_RadDist00)/2.; 0." />
+</subtraction>
+
+<!-- second R plate - 7.5 degrees -->
+<box name="TGC3_RPlate2_base" material="Aluminium"   X_Y_Z=" TGC3_BigWheel_PhiThickRPlate; (TGC3_BigWheel_RadDist09-TGC3_BigWheel_RadDistPlate02-TGC3_BigWheel_RadDist00)/cos(TGC3_BigWheel_PhiStepAngle1); TGC3_BigWheel_ZThickRPlate" />
+<box name="TGC3_RPlate2_sub"  material="Aluminium"   X_Y_Z=" TGC3_BigWheel_PhiThickRPlate; (TGC3_BigWheel_RadDist09-TGC3_BigWheel_RadDistPlate02-TGC3_BigWheel_RadDist00+TGC3_BigWheel_WallThickRPlate)/cos(TGC3_BigWheel_PhiStepAngle1); TGC3_BigWheel_ZThickRPlate-2.*TGC3_BigWheel_WallThickRPlate" />
+
+<subtraction name="TGC3_RPlate2">
+  <posXYZ volume="TGC3_RPlate2_base" X_Y_Z=" TGC3_PhiPlate2_XPos1+(TGC3_BigWheel_RadDist09+TGC3_BigWheel_RadDistPlate02-TGC3_BigWheel_RadDist00-2.*TGC3_BigWheel_RadDist02)*tan(TGC3_BigWheel_PhiStepAngle1)/2.; (TGC3_BigWheel_RadDist09+TGC3_BigWheel_RadDistPlate02-TGC3_BigWheel_RadDist00)/2.; 0." rot=" 0.;   0.; -TGC3_BigWheel_PhiStepAngle1/GENV_PiS180" />
+  <posXYZ volume="TGC3_RPlate2_sub"  X_Y_Z=" TGC3_PhiPlate2_XPos1+(TGC3_BigWheel_RadDist09+TGC3_BigWheel_RadDistPlate02-TGC3_BigWheel_RadDist00-2.*TGC3_BigWheel_RadDist02)*tan(TGC3_BigWheel_PhiStepAngle1)/2.-TGC3_BigWheel_WallThickRPlate; (TGC3_BigWheel_RadDist09+TGC3_BigWheel_RadDistPlate02-TGC3_BigWheel_RadDist00)/2.; 0." rot=" 0.;   0.; -TGC3_BigWheel_PhiStepAngle1/GENV_PiS180" />
+</subtraction>
+
+<!-- third R plate - 7.5 degrees TGC3_BigWheel_PhiThickRPlate-->
+<var name="TGC3_RPlate3_length"  value="(TGC3_BigWheel_RadDist09 - TGC3_BigWheel_RadDist00 - (TGC3_PhiPlate2_YPos2-TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)) - (TGC3_BigWheel_PhiStep2toP1 + TGC3_BigWheel_PhiThickRPlate) * sin(TGC3_BigWheel_PhiStepAngle2) ) / cos(TGC3_BigWheel_PhiStepAngle1)" />
+
+<box name="TGC3_RPlate3_base" material="Aluminium"   X_Y_Z=" TGC3_BigWheel_PhiThickRPlate; TGC3_RPlate3_length; TGC3_BigWheel_ZThickRPlate" />
+<box name="TGC3_RPlate3_sub1"  material="Aluminium"   X_Y_Z=" TGC3_BigWheel_PhiThickRPlate; TGC3_RPlate3_length + TGC3_BigWheel_WallThickRPlate/cos(TGC3_BigWheel_PhiStepAngle1); TGC3_BigWheel_ZThickRPlate-2.*TGC3_BigWheel_WallThickRPlate" />
+<box name="TGC3_RPlate3_sub2"  material="Aluminium"   X_Y_Z=" TGC3_BigWheel_PhiThickRPlate; TGC3_RPlate3_length; TGC3_BigWheel_ZThickRPlate+2.*TGC3_BigWheel_WallThickRPlate" />
+
+<subtraction name="TGC3_RPlate3_tmp">
+  <posXYZ volume="TGC3_RPlate3_base" X_Y_Z=" TGC3_RPlate3_length/2.*sin(TGC3_BigWheel_PhiStepAngle1); TGC3_RPlate3_length/2.*cos(TGC3_BigWheel_PhiStepAngle1); 0." rot=" 0.;   0.; -TGC3_BigWheel_PhiStepAngle1/GENV_PiS180" />
+  <posXYZ volume="TGC3_RPlate3_sub1"  X_Y_Z=" TGC3_RPlate3_length/2.*sin(TGC3_BigWheel_PhiStepAngle1)-TGC3_BigWheel_WallThickRPlate; TGC3_RPlate3_length/2.*cos(TGC3_BigWheel_PhiStepAngle1); 0." rot=" 0.; 0.; -TGC3_BigWheel_PhiStepAngle1/GENV_PiS180" />
+  <posXYZ volume="TGC3_RPlate3_sub2" X_Y_Z="TGC3_RPlate3_length/2.*sin(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/2*(cos(TGC3_BigWheel_PhiStepAngle1)-cos(TGC3_BigWheel_PhiStepAngle2));TGC3_RPlate3_length/2.*cos(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_PhiThickRPlate/2*(sin(TGC3_BigWheel_PhiStepAngle2)-sin(TGC3_BigWheel_PhiStepAngle1)); 0." rot=" 0.; 0.; -TGC3_BigWheel_PhiStepAngle2/GENV_PiS180" />
+</subtraction>
+
+<var name="TGC3_RPlate3_PosX" value="TGC3_PhiPlate2_XPos2+(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*cos(TGC3_BigWheel_PhiStepAngle2)+TGC3_BigWheel_PhiThickRPlate*(0.5*cos(TGC3_BigWheel_PhiStepAngle1)-cos(TGC3_BigWheel_PhiStepAngle2))-cos(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiThickRPlate" />
+
+<var name="TGC3_RPlate3_PosY" value="TGC3_PhiPlate2_YPos2+(TGC3_BigWheel_PhiStep2toP1-TGC3_BigWheel_PhiStepP2toP2)*sin(TGC3_BigWheel_PhiStepAngle2)+TGC3_BigWheel_PhiThickRPlate*(sin(TGC3_BigWheel_PhiStepAngle2)-0.5*sin(TGC3_BigWheel_PhiStepAngle1))+sin(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiThickRPlate" />
+
+<composition name="TGC3_RPlate3" >
+  <posXYZ  volume="TGC3_RPlate3_tmp" X_Y_Z=" TGC3_RPlate3_PosX-GENV_Eps; TGC3_RPlate3_PosY ; 0." />
+</composition>
+
+<!-- first R plate - 15 degrees -->
+<box name="TGC3_RPlate4_base" material="Aluminium"   X_Y_Z=" TGC3_BigWheel_PhiThickRPlate; (TGC3_BigWheel_RadDist09-TGC3_BigWheel_RadDist00)/cos(TGC3_BigWheel_PhiStepAngle2); TGC3_BigWheel_ZThickRPlate" />
+<box name="TGC3_RPlate4_sub"  material="Aluminium"   X_Y_Z=" TGC3_BigWheel_PhiThickRPlate; (TGC3_BigWheel_RadDist09-TGC3_BigWheel_RadDist00+TGC3_BigWheel_WallThickRPlate)/cos(TGC3_BigWheel_PhiStepAngle2); TGC3_BigWheel_ZThickRPlate-2.*TGC3_BigWheel_WallThickRPlate" />
+
+<subtraction name="TGC3_RPlate4">
+  <posXYZ volume="TGC3_RPlate4_base" X_Y_Z=" (TGC3_BigWheel_RadDist09-TGC3_BigWheel_RadDist00)*tan(TGC3_BigWheel_PhiStepAngle2)/2.+(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1-1.5*TGC3_BigWheel_PhiThickRPlate)/cos(TGC3_BigWheel_PhiStepAngle2); (TGC3_BigWheel_RadDist09-TGC3_BigWheel_RadDist00)/2.; 0." rot=" 0.;   0.; -TGC3_BigWheel_PhiStepAngle2/GENV_PiS180" />
+  <posXYZ volume="TGC3_RPlate4_sub"  X_Y_Z=" (TGC3_BigWheel_RadDist09-TGC3_BigWheel_RadDist00)*tan(TGC3_BigWheel_PhiStepAngle2)/2.-TGC3_BigWheel_WallThickRPlate+(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1-1.5*TGC3_BigWheel_PhiThickRPlate)/cos(TGC3_BigWheel_PhiStepAngle2); (TGC3_BigWheel_RadDist09-TGC3_BigWheel_RadDist00)/2.; 0." rot=" 0.;   0.; -TGC3_BigWheel_PhiStepAngle2/GENV_PiS180" />
+</subtraction>
+
+<!-- second R plate - 15 degrees -->
+<box name="TGC3_RPlate5_base" material="Aluminium"   X_Y_Z=" TGC3_BigWheel_PhiThickRPlate; (TGC3_BigWheel_RadDist09-cos(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_RadDistOutPlate)/cos(TGC3_BigWheel_PhiStepAngle2); TGC3_BigWheel_ZThickRPlate" />
+<box name="TGC3_RPlate5_sub"  material="Aluminium"   X_Y_Z=" TGC3_BigWheel_PhiThickRPlate; (TGC3_BigWheel_RadDist09-cos(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_RadDistOutPlate)/cos(TGC3_BigWheel_PhiStepAngle2)+TGC3_BigWheel_WallThickRPlate; TGC3_BigWheel_ZThickRPlate-2.*TGC3_BigWheel_WallThickRPlate" />
+
+<var name="TGC3_RPlate5_PosX" value="sin(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_RadDistOutPlate/2. +TGC3_PhiPlate2_XPos2 +TGC3_BigWheel_PhiStepP2toP2*cos(TGC3_BigWheel_PhiStepAngle2) +tan(TGC3_BigWheel_PhiStepAngle2)*(TGC3_BigWheel_RadDist09/2.-TGC3_PhiPlate2_YPos2+TGC3_BigWheel_PhiStepP2toP2*sin(TGC3_BigWheel_PhiStepAngle2)-TGC3_BigWheel_RadDist00)"/>
+
+<subtraction name="TGC3_RPlate5">
+  <posXYZ volume="TGC3_RPlate5_base" X_Y_Z=" TGC3_RPlate5_PosX - cos(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiThickRPlate/2.; (TGC3_BigWheel_RadDist09+cos(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_RadDistOutPlate)/2. - TGC3_BigWheel_RadDist00 + sin(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiThickRPlate/2.; 0." rot=" 0.;   0.; -TGC3_BigWheel_PhiStepAngle2/GENV_PiS180" />
+  <posXYZ volume="TGC3_RPlate5_sub"  X_Y_Z=" TGC3_RPlate5_PosX - cos(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiThickRPlate/2.+TGC3_BigWheel_WallThickRPlate; (TGC3_BigWheel_RadDist09+cos(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_RadDistOutPlate)/2.- TGC3_BigWheel_RadDist00 + sin(TGC3_BigWheel_PhiStepAngle2)*TGC3_BigWheel_PhiThickRPlate/2.; 0." rot=" 0.;   0.; -TGC3_BigWheel_PhiStepAngle2/GENV_PiS180" />
+</subtraction>
+
+<!-- very rough approximation of trigger boxes and cables - everything estimated - even/odd sectors for TGC3 -->
+<!-- change of variables does not change placement correctly - fine tuning required -->
+
+<var name="TGC3_TrigBoxThicknessZ"   value="    2.  " />
+<var name="TGC3_TrigBoxWidthPhi"     value="  260.  " />
+<var name="TGC3_TrigBoxLengthR"      value=" 5160.  " />
+<var name="TGC3_TrigBoxAngle1"       value="    3.25" />
+<var name="TGC3_TrigBoxAngle2"       value="   12. " />
+
+<box name="TGC3_TrigBox" material="Aluminium" X_Y_Z="TGC3_TrigBoxWidthPhi; TGC3_TrigBoxLengthR; TGC3_TrigBoxThicknessZ" />
+
+<var name="TGC3_TrigCableThicknessZ1"   value="    5.  " />
+<var name="TGC3_TrigCableThicknessZ2"   value="    3.  " />
+<var name="TGC3_TrigCableThicknessZ3"   value="    6.5  " />
+<var name="TGC3_TrigCableWidthPhi1"     value="  130.  " />
+<var name="TGC3_TrigCableWidthPhi2"     value="  100.  " />
+<var name="TGC3_TrigCableWidthPhi3"     value="   75.  " />
+<var name="TGC3_TrigCableWidthPhi4"     value="   60.  " />
+<var name="TGC3_TrigCableWidthPhi5"     value="  250.  " />
+<var name="TGC3_TrigCableLengthR1"      value=" 4500.  " />
+<var name="TGC3_TrigCableLengthR3"      value=" 1600.  " />
+<var name="TGC3_TrigCableLengthR4"      value=" 1400.  " />
+<var name="TGC3_TrigCableLengthR5"      value=" 1550.  " />
+
+<box name="TGC3_TrigCable1" material="Copper" X_Y_Z=" TGC3_TrigCableWidthPhi1; TGC3_TrigCableLengthR1; TGC3_TrigCableThicknessZ1" />
+<box name="TGC3_TrigCable2" material="Copper" X_Y_Z=" TGC3_TrigCableWidthPhi2; TGC3_TrigCableLengthR1; TGC3_TrigCableThicknessZ2" />
+<box name="TGC3_TrigCable3" material="Copper" X_Y_Z=" TGC3_TrigCableWidthPhi3; TGC3_TrigCableLengthR3; TGC3_TrigCableThicknessZ3" />
+<box name="TGC3_TrigCable4" material="Copper" X_Y_Z=" TGC3_TrigCableWidthPhi4; TGC3_TrigCableLengthR4; TGC3_TrigCableThicknessZ3" />
+<box name="TGC3_TrigCable5" material="Copper" X_Y_Z=" TGC3_TrigCableWidthPhi5; TGC3_TrigCableLengthR5; TGC3_TrigCableThicknessZ1" />
+
+<composition name="TGC3_Support_EvenSector_ASide">
+  <posXYZ volume="TGC3_PhiPlate1"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate2_Even"  X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate3"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate4_Even"  X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate5"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate6_Even"  X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate7"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate8_Even"  X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_RPlate1"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate1"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate2"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate2"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate3"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate3"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate4"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate4"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate5"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate5"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+
+  <posXYZ volume="TGC3_TrigBox"         X_Y_Z=" TGC3_PhiPlate4_XPos3-TGC3_TrigBoxLengthR/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_TrigBoxWidthPhi/4.*cos(TGC3_TrigBoxAngle1*GENV_PiS180); -TGC3_TrigBoxLengthR/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_ZThickPhiPlate" rot="0.; 0.; -TGC3_TrigBoxAngle1" />
+  <posXYZ volume="TGC3_TrigBox"         X_Y_Z=" -TGC3_TrigBoxLengthR/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-7.*TGC3_TrigBoxWidthPhi/10.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-(TGC3_PhiPlate3_XPos2+(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*cos(TGC3_BigWheel_PhiStepAngle2)); -TGC3_TrigBoxLengthR/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_ZThickPhiPlate" rot="0.; 0.; TGC3_TrigBoxAngle2" />
+
+  <posXYZ volume="TGC3_TrigCable1"      X_Y_Z="-TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_TrigCableWidthPhi1/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180) + 850.; -TGC3_TrigCableWidthPhi1/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ1/2." rot="0.; 0.; -TGC3_TrigBoxAngle1"/>
+  <posXYZ volume="TGC3_TrigCable2"      X_Y_Z="-TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-TGC3_TrigCableWidthPhi2/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180) + 580.; -TGC3_TrigCableWidthPhi2/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ2/2." rot="0.; 0.; -TGC3_TrigBoxAngle1"/>
+  <posXYZ volume="TGC3_TrigCable3"      X_Y_Z="-TGC3_TrigCableLengthR3/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_TrigCableWidthPhi3/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180) + 380.; -TGC3_TrigCableWidthPhi3/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-(TGC3_TrigCableLengthR3/2.+TGC3_TrigBoxLengthR)*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ3/2." rot="0.; 0.; -TGC3_TrigBoxAngle1"/>
+
+  <posXYZ volume="TGC3_TrigCable1"      X_Y_Z="TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_TrigCableWidthPhi1/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-2315; TGC3_TrigCableWidthPhi1*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ1/2." rot="0.; 0.; TGC3_TrigBoxAngle2"/>
+  <posXYZ volume="TGC3_TrigCable2"      X_Y_Z="TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-TGC3_TrigCableWidthPhi2/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-2620.; TGC3_TrigCableWidthPhi2/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ2/2." rot="0.; 0.; TGC3_TrigBoxAngle2"/>
+  <posXYZ volume="TGC3_TrigCable4"      X_Y_Z="TGC3_TrigCableLengthR4/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_TrigCableWidthPhi4/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-1430.; -TGC3_TrigCableWidthPhi4/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-(TGC3_TrigCableLengthR4/2.+TGC3_TrigBoxLengthR)*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ3/2." rot="0.; 0.; TGC3_TrigBoxAngle2"/>
+
+  <posXYZ volume="TGC3_TrigCable5"      X_Y_Z="TGC3_TrigCableLengthR5/2.*sin(TGC3_BigWheel_PhiStepAngle2)+TGC3_TrigCableWidthPhi5/2.*cos(TGC3_BigWheel_PhiStepAngle2)-700.; TGC3_BigWheel_RadDist00+TGC3_BigWheel_RadDist01+TGC3_BigWheel_RThickPhiPlate1-75; TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ1/2." rot="0.; 0.; TGC3_BigWheel_PhiStepAngle2/GENV_PiS180"/>
+
+</composition>
+
+<composition name="TGC3_Support_OddSector_ASide">
+  <posXYZ volume="TGC3_PhiPlate1"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate2_Odd"   X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate3"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate4_Odd"   X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate5"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate6_Odd"   X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate7"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate8_Odd"   X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_RPlate1"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate1"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate2"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate2"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate3"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate3"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate4"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate4"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate5"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate5"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+
+  <posXYZ volume="TGC3_TrigBox"         X_Y_Z=" TGC3_PhiPlate4_XPos3-TGC3_TrigBoxLengthR/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_TrigBoxWidthPhi/4.*cos(TGC3_TrigBoxAngle1*GENV_PiS180); -TGC3_TrigBoxLengthR/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_ZThickPhiPlate" rot="0.; 0.; -TGC3_TrigBoxAngle1" />
+  <posXYZ volume="TGC3_TrigBox"         X_Y_Z=" -TGC3_TrigBoxLengthR/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-7.*TGC3_TrigBoxWidthPhi/10.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-(TGC3_PhiPlate3_XPos2+(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*cos(TGC3_BigWheel_PhiStepAngle2)); -TGC3_TrigBoxLengthR/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_ZThickPhiPlate" rot="0.; 0.; TGC3_TrigBoxAngle2" />
+
+  <posXYZ volume="TGC3_TrigCable1"      X_Y_Z="-TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_TrigCableWidthPhi1/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180) + 850.; -TGC3_TrigCableWidthPhi1/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ1/2." rot="0.; 0.; -TGC3_TrigBoxAngle1"/>
+  <posXYZ volume="TGC3_TrigCable2"      X_Y_Z="-TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-TGC3_TrigCableWidthPhi2/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180) + 580.; -TGC3_TrigCableWidthPhi2/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ2/2." rot="0.; 0.; -TGC3_TrigBoxAngle1"/>
+  <posXYZ volume="TGC3_TrigCable3"      X_Y_Z="-TGC3_TrigCableLengthR3/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_TrigCableWidthPhi3/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180) + 380.; -TGC3_TrigCableWidthPhi3/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-(TGC3_TrigCableLengthR3/2.+TGC3_TrigBoxLengthR)*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ3/2." rot="0.; 0.; -TGC3_TrigBoxAngle1"/>
+
+  <posXYZ volume="TGC3_TrigCable1"      X_Y_Z="TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_TrigCableWidthPhi1/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-2315; TGC3_TrigCableWidthPhi1*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ1/2." rot="0.; 0.; TGC3_TrigBoxAngle2"/>
+  <posXYZ volume="TGC3_TrigCable2"      X_Y_Z="TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-TGC3_TrigCableWidthPhi2/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-2620.; TGC3_TrigCableWidthPhi2/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ2/2." rot="0.; 0.; TGC3_TrigBoxAngle2"/>
+  <posXYZ volume="TGC3_TrigCable4"      X_Y_Z="TGC3_TrigCableLengthR4/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_TrigCableWidthPhi4/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-1430.; -TGC3_TrigCableWidthPhi4/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-(TGC3_TrigCableLengthR4/2.+TGC3_TrigBoxLengthR)*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ3/2." rot="0.; 0.; TGC3_TrigBoxAngle2"/>
+
+  <posXYZ volume="TGC3_TrigCable5"      X_Y_Z="TGC3_TrigCableLengthR5/2.*sin(TGC3_BigWheel_PhiStepAngle2)+TGC3_TrigCableWidthPhi5/2.*cos(TGC3_BigWheel_PhiStepAngle2)-700.; TGC3_BigWheel_RadDist00+TGC3_BigWheel_RadDist01+TGC3_BigWheel_RThickPhiPlate1-75; TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ1/2." rot="0.; 0.; TGC3_BigWheel_PhiStepAngle2/GENV_PiS180"/>
+
+</composition>
+
+<composition name="TGC3_Support_EvenSector_CSide">
+  <posXYZ volume="TGC3_PhiPlate1"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate2_Even"  X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate3"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate4_Even"  X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate5"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate6_Even"  X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate7"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate8_Even"  X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_RPlate1"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate1"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate2"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate2"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate3"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate3"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate4"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate4"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate5"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate5"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+
+  <posXYZ volume="TGC3_TrigBox"         X_Y_Z=" TGC3_PhiPlate4_XPos3-TGC3_TrigBoxLengthR/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_TrigBoxWidthPhi/4.*cos(TGC3_TrigBoxAngle1*GENV_PiS180); -TGC3_TrigBoxLengthR/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; -TGC3_BigWheel_ZThickPhiPlate" rot="0.; 0.; -TGC3_TrigBoxAngle1" />
+  <posXYZ volume="TGC3_TrigBox"         X_Y_Z=" -TGC3_TrigBoxLengthR/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-7.*TGC3_TrigBoxWidthPhi/10.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-(TGC3_PhiPlate3_XPos2+(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*cos(TGC3_BigWheel_PhiStepAngle2)); -TGC3_TrigBoxLengthR/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; -TGC3_BigWheel_ZThickPhiPlate" rot="0.; 0.; TGC3_TrigBoxAngle2" />
+
+  <posXYZ volume="TGC3_TrigCable1"      X_Y_Z="-TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_TrigCableWidthPhi1/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180) + 850.; -TGC3_TrigCableWidthPhi1/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; -(TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ1/2.)" rot="0.; 0.; -TGC3_TrigBoxAngle1"/>
+  <posXYZ volume="TGC3_TrigCable2"      X_Y_Z="-TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-TGC3_TrigCableWidthPhi2/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180) + 580.; -TGC3_TrigCableWidthPhi2/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; -(TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ2/2.)" rot="0.; 0.; -TGC3_TrigBoxAngle1"/>
+  <posXYZ volume="TGC3_TrigCable3"      X_Y_Z="-TGC3_TrigCableLengthR3/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_TrigCableWidthPhi3/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180) + 380.; -TGC3_TrigCableWidthPhi3/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-(TGC3_TrigCableLengthR3/2.+TGC3_TrigBoxLengthR)*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; -(TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ3/2.)" rot="0.; 0.; -TGC3_TrigBoxAngle1"/>
+
+  <posXYZ volume="TGC3_TrigCable1"      X_Y_Z="TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_TrigCableWidthPhi1/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-2315; TGC3_TrigCableWidthPhi1*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; -(TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ1/2.)" rot="0.; 0.; TGC3_TrigBoxAngle2"/>
+  <posXYZ volume="TGC3_TrigCable2"      X_Y_Z="TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-TGC3_TrigCableWidthPhi2/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-2620.; TGC3_TrigCableWidthPhi2/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; -(TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ2/2.)" rot="0.; 0.; TGC3_TrigBoxAngle2"/>
+  <posXYZ volume="TGC3_TrigCable4"      X_Y_Z="TGC3_TrigCableLengthR4/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_TrigCableWidthPhi4/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-1430.; -TGC3_TrigCableWidthPhi4/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-(TGC3_TrigCableLengthR4/2.+TGC3_TrigBoxLengthR)*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; -(TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ3/2.)" rot="0.; 0.; TGC3_TrigBoxAngle2"/>
+
+  <posXYZ volume="TGC3_TrigCable5"      X_Y_Z="TGC3_TrigCableLengthR5/2.*sin(TGC3_BigWheel_PhiStepAngle2)+TGC3_TrigCableWidthPhi5/2.*cos(TGC3_BigWheel_PhiStepAngle2)-700.; TGC3_BigWheel_RadDist00+TGC3_BigWheel_RadDist01+TGC3_BigWheel_RThickPhiPlate1-75; -(TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ1/2.)" rot="0.; 0.; TGC3_BigWheel_PhiStepAngle2/GENV_PiS180"/>
+
+</composition>
+
+<composition name="TGC3_Support_OddSector_CSide">
+  <posXYZ volume="TGC3_PhiPlate1"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate2_Odd"   X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate3"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate4_Odd"   X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate5"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate6_Odd"   X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate7"       X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_PhiPlate8_Odd"   X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC3_RPlate1"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate1"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate2"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate2"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate3"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate3"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate4"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate4"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC3_RPlate5"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00; -TGC3_BigWheel_ZThickPhiPlate-TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC3_RPlate5"         X_Y_Z=" 0.; TGC3_BigWheel_RadDist00;  TGC3_BigWheel_ZThickPhiPlate+TGC3_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+
+  <posXYZ volume="TGC3_TrigBox"         X_Y_Z=" TGC3_PhiPlate4_XPos3-TGC3_TrigBoxLengthR/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_TrigBoxWidthPhi/4.*cos(TGC3_TrigBoxAngle1*GENV_PiS180); -TGC3_TrigBoxLengthR/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; -TGC3_BigWheel_ZThickPhiPlate" rot="0.; 0.; -TGC3_TrigBoxAngle1" />
+  <posXYZ volume="TGC3_TrigBox"         X_Y_Z=" -TGC3_TrigBoxLengthR/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-7.*TGC3_TrigBoxWidthPhi/10.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-(TGC3_PhiPlate3_XPos2+(TGC3_BigWheel_PhiStepP2toP2-TGC3_BigWheel_PhiStep2toP1)*cos(TGC3_BigWheel_PhiStepAngle2)); -TGC3_TrigBoxLengthR/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; -TGC3_BigWheel_ZThickPhiPlate" rot="0.; 0.; TGC3_TrigBoxAngle2" />
+
+  <posXYZ volume="TGC3_TrigCable1"      X_Y_Z="-TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_TrigCableWidthPhi1/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180) + 850.; -TGC3_TrigCableWidthPhi1/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; -(TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ1/2.)" rot="0.; 0.; -TGC3_TrigBoxAngle1"/>
+  <posXYZ volume="TGC3_TrigCable2"      X_Y_Z="-TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-TGC3_TrigCableWidthPhi2/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180) + 580.; -TGC3_TrigCableWidthPhi2/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; -(TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ2/2.)" rot="0.; 0.; -TGC3_TrigBoxAngle1"/>
+  <posXYZ volume="TGC3_TrigCable3"      X_Y_Z="-TGC3_TrigCableLengthR3/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_TrigCableWidthPhi3/2.*cos(TGC3_TrigBoxAngle1*GENV_PiS180) + 380.; -TGC3_TrigCableWidthPhi3/2.*sin(TGC3_TrigBoxAngle1*GENV_PiS180)-(TGC3_TrigCableLengthR3/2.+TGC3_TrigBoxLengthR)*cos(TGC3_TrigBoxAngle1*GENV_PiS180)+TGC3_BigWheel_RadDist09; -(TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ3/2.)" rot="0.; 0.; -TGC3_TrigBoxAngle1"/>
+
+  <posXYZ volume="TGC3_TrigCable1"      X_Y_Z="TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_TrigCableWidthPhi1/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-2315; TGC3_TrigCableWidthPhi1*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; -(TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ1/2.)" rot="0.; 0.; TGC3_TrigBoxAngle2"/>
+  <posXYZ volume="TGC3_TrigCable2"      X_Y_Z="TGC3_TrigCableLengthR1/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-TGC3_TrigCableWidthPhi2/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-2620.; TGC3_TrigCableWidthPhi2/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-TGC3_TrigCableLengthR1/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; -(TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ2/2.)" rot="0.; 0.; TGC3_TrigBoxAngle2"/>
+  <posXYZ volume="TGC3_TrigCable4"      X_Y_Z="TGC3_TrigCableLengthR4/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_TrigCableWidthPhi4/2.*cos(TGC3_TrigBoxAngle2*GENV_PiS180)-1430.; -TGC3_TrigCableWidthPhi4/2.*sin(TGC3_TrigBoxAngle2*GENV_PiS180)-(TGC3_TrigCableLengthR4/2.+TGC3_TrigBoxLengthR)*cos(TGC3_TrigBoxAngle2*GENV_PiS180)+TGC3_BigWheel_RadDist09; -(TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ3/2.)" rot="0.; 0.; TGC3_TrigBoxAngle2"/>
+
+  <posXYZ volume="TGC3_TrigCable5"      X_Y_Z="TGC3_TrigCableLengthR5/2.*sin(TGC3_BigWheel_PhiStepAngle2)+TGC3_TrigCableWidthPhi5/2.*cos(TGC3_BigWheel_PhiStepAngle2)-700.; TGC3_BigWheel_RadDist00+TGC3_BigWheel_RadDist01+TGC3_BigWheel_RThickPhiPlate1-75; -(TGC3_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC3_TrigCableThicknessZ1/2.)" rot="0.; 0.; TGC3_BigWheel_PhiStepAngle2/GENV_PiS180"/>
+
+</composition>
+
+<!-- tube and boxes are rather rouhg approximated here - should be okay though - Cavern Background only -->
+
+<tubs name="TGC3_CentralTube" material="Aluminium" Rio_Z="TGC3_BigWheel_TubeInnerR; TGC3_BigWheel_TubeOuterR; TGC3_BigWheel_WallThickPhiPlate" nbPhi="20" />
+
+<box name="TGC3_SurBox_base" material="Aluminium" X_Y_Z=" 2.*TGC3_BigWheel_RadDist09*tan(TGC3_BigWheel_PhiStepAngle2); TGC_BigWheel_SurBoxSideLength; TGC_BigWheel_SurBoxSideLength" />
+<box name="TGC3_SurBox_inner" material="Aluminium" X_Y_Z=" 2.*TGC3_BigWheel_RadDist09*tan(TGC3_BigWheel_PhiStepAngle2)+2.*GENV_Eps; TGC_BigWheel_SurBoxSideLength-2.*TGC_BigWheel_SurBoxSpcWall; TGC_BigWheel_SurBoxSideLength-2.*TGC_BigWheel_SurBoxSpcWall" />
+
+<subtraction name="TGC3_SurBox_default" >
+  <posXYZ volume="TGC3_SurBox_base"  X_Y_Z=" 0.; TGC3_BigWheel_RadDist09+TGC_BigWheel_SurBoxSideLength; 0." />
+  <posXYZ volume="TGC3_SurBox_inner"  X_Y_Z=" 0.; TGC3_BigWheel_RadDist09+TGC_BigWheel_SurBoxSideLength; 0." />
+</subtraction>
+
+<box name="TGC3_SurBoxSpc_base" material="Aluminium" X_Y_Z=" 2.*TGC3_BigWheel_RadDist09*tan(TGC3_BigWheel_PhiStepAngle2); TGC_BigWheel_SurBoxSpcLength; TGC_BigWheel_SurBoxSpcHeight" />
+<box name="TGC3_SurBoxSpc_inner" material="Aluminium" X_Y_Z="  2.*TGC3_BigWheel_RadDist09*tan(TGC3_BigWheel_PhiStepAngle2)+2.*GENV_Eps; TGC_BigWheel_SurBoxSpcLength-2.*TGC_BigWheel_SurBoxSpcWall; TGC_BigWheel_SurBoxSpcHeight" />
+
+<subtraction name="TGC3_SurBoxSpc" >
+  <posXYZ volume="TGC3_SurBoxSpc_base"   X_Y_Z=" 0.; TGC3_BigWheel_RadDist09+1.5*TGC_BigWheel_SurBoxSideLength+TGC_BigWheel_SurBoxDistance/2.; TGC_BigWheel_SurBoxSideLength/2.+TGC_BigWheel_SurBoxSpcHeight/2." />
+  <posXYZ volume="TGC3_SurBoxSpc_inner"  X_Y_Z=" 0.; TGC3_BigWheel_RadDist09+1.5*TGC_BigWheel_SurBoxSideLength+TGC_BigWheel_SurBoxDistance/2.; TGC_BigWheel_SurBoxSideLength/2.+TGC_BigWheel_SurBoxSpcHeight/2.-TGC_BigWheel_SurBoxSpcWall" />
+</subtraction>
+
+<composition name="TGC3_SurBox_extended" >
+  <posXYZ volume="TGC3_SurBox_default"  X_Y_Z=" 0.; TGC_BigWheel_SurBoxSideLength + TGC_BigWheel_SurBoxDistance; 0." />
+  <posXYZ volume="TGC3_SurBoxSpc"       X_Y_Z=" 0.; 0.;  GENV_Eps" />
+  <posXYZ volume="TGC3_SurBoxSpc"       X_Y_Z=" 0.; 0.; -GENV_Eps" rot=" 0.; 180.; 0."/>
+</composition>
+
+<composition name="TGC3_BigWheel_ASide">
+  <foreach  index="counter"  begin="0"  loops="6" >
+    <posXYZ volume="TGC3_Support_EvenSector_ASide"  X_Y_Z=" 0.; 0.; TGC3_BigWheel_ZPosL" rot="0.; 0.; counter*60." />
+    <posXYZ volume="TGC3_Support_OddSector_ASide"   X_Y_Z=" 0.; 0.; TGC3_BigWheel_ZPosL" rot="0.; 0.; 30.+(counter)*60." />
+  </foreach>
+  <foreach  index="counter"  begin="0"  loops="12" >
+    <posXYZ volume="TGC3_SurBox_default"   X_Y_Z=" 0.; 0.; TGC3_BigWheel_ZPosL" rot="0.; 0.; counter*30." />
+  </foreach>
+  <foreach  index="counter"  begin="0"  loops="7" >
+    <posXYZ volume="TGC3_SurBox_extended"  X_Y_Z=" 0.; 0.; TGC3_BigWheel_ZPosL" rot="0.; 0.; -90.+counter*30." />
+  </foreach>
+  <posXYZ volume="TGC3_CentralTube"  X_Y_Z=" 0.; 0.; TGC3_BigWheel_ZPosL" />
+</composition>
+
+<composition name="TGC3_BigWheel_CSide">
+  <foreach  index="counter"  begin="0"  loops="6" >
+    <posXYZ volume="TGC3_Support_EvenSector_CSide"  X_Y_Z=" 0.; 0.; -TGC3_BigWheel_ZPosL" rot="0.; 0.; counter*60." />
+    <posXYZ volume="TGC3_Support_OddSector_CSide"   X_Y_Z=" 0.; 0.; -TGC3_BigWheel_ZPosL" rot="0.; 0.; 30.+(counter)*60." />
+  </foreach>
+  <foreach  index="counter"  begin="0"  loops="12" >
+    <posXYZ volume="TGC3_SurBox_default"   X_Y_Z=" 0.; 0.; -TGC3_BigWheel_ZPosL" rot="0.; 0.; counter*30." />
+  </foreach>
+  <foreach  index="counter"  begin="0"  loops="7" >
+    <posXYZ volume="TGC3_SurBox_extended"  X_Y_Z=" 0.; 0.; -TGC3_BigWheel_ZPosL" rot="0.; 0.; -90.+counter*30." />
+  </foreach>
+  <posXYZ volume="TGC3_CentralTube"  X_Y_Z=" 0.; 0.; -TGC3_BigWheel_ZPosL" />
+</composition>
+
+<composition name="TGC3_BigWheels">
+  <posXYZ volume="TGC3_BigWheel_ASide" X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="TGC3_BigWheel_CSide" X_Y_Z=" 0.; 0.; 0." />
+</composition>
+
+<!--     name       =  TGC1 Big Wheel                section name       = "Supports"  -->
+<!--  Spokes U zposition -->
+<var name="TGC1_BigWheel_ZPosL"             value=" 13435.  " />
+
+<var name="TGC1_BigWheel_RadDist00"         value="  1777.5 "/>
+<var name="TGC1_BigWheel_RadDist01"         value="   922.  "/>
+<var name="TGC1_BigWheel_RadDist02"         value="  2582.5 "/>
+<var name="TGC1_BigWheel_RadDist03"         value="  3572.5 "/>
+<var name="TGC1_BigWheel_RadDist04"         value="  4667.5 "/>
+<var name="TGC1_BigWheel_RadDist05"         value="  5672.5 "/>
+<var name="TGC1_BigWheel_RadDist06"         value="  6754.5 "/>
+<var name="TGC1_BigWheel_RadDist07"         value="  7772.5 "/>
+<var name="TGC1_BigWheel_RadDist08"         value="  8682.5 "/>
+<var name="TGC1_BigWheel_RadDist09"         value=" 10990.  "/>
+<var name="TGC1_BigWheel_RadDistOutPlate"   value="  3670.  "/>
+<var name="TGC1_BigWheel_RadDistPlate02"    value="  2547.  "/>
+<var name="TGC1_BigWheel_PhiDistRPlate1"    value="   350.  "/>
+
+<var name="TGC1_BigWheel_ZThickPhiPlate"    value="    30.  "/>
+<var name="TGC1_BigWheel_WallThickPhiPlate" value="    16.  "/>
+<var name="TGC1_BigWheel_RThickPhiPlate1"   value="   200.  "/>
+<var name="TGC1_BigWheel_RThickPhiPlate2"   value="   120.  "/>
+<var name="TGC1_BigWheel_ZThickRPlate"      value="   150.  "/>
+<var name="TGC1_BigWheel_PhiThickRPlate"    value="    50.  "/>
+<var name="TGC1_BigWheel_WallThickRPlate"   value="     5.  "/>
+
+<var name="TGC1_BigWheel_PhiPlaDelEvenOdd"  value="TGC1_BigWheel_RThickPhiPlate2 + TGC1_BigWheel_PhiThickRPlate/2."/>
+
+<var name="TGC1_BigWheel_PhiStepAngle1"     value="     7.5 * GENV_PiS180 "/>
+<var name="TGC1_BigWheel_PhiStepAngle2"     value="    15.  * GENV_PiS180  "/>
+
+<var name="TGC1_BigWheel_PhiStep1toP1"      value="    18.  "/>
+<var name="TGC1_BigWheel_PhiStepP1toP2"     value="   497.  "/>
+
+<var name="TGC1_BigWheel_PhiStep2toP1"      value="   442.  "/>
+<var name="TGC1_BigWheel_PhiStepP2toP2"     value="   642. + TGC1_BigWheel_PhiThickRPlate"/>
+
+<var name="TGC1_BigWheel_TubeInnerR"        value="  1715.  "/>
+<var name="TGC1_BigWheel_TubeOuterR"        value="  TGC1_BigWheel_TubeInnerR + 405. "/>
+
+<!-- lowest phi plate - plate 1 -->
+<gvxysx name="TGC1_PhiPlate1" material="Aluminium" dZ="TGC1_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y=" (TGC1_BigWheel_RadDist00+TGC1_BigWheel_RadDist01+TGC1_BigWheel_RThickPhiPlate1)*sin(TGC1_BigWheel_PhiStepAngle2); TGC1_BigWheel_RadDist01+TGC1_BigWheel_RThickPhiPlate1"/>
+  <gvxy_point X_Y=" (TGC1_BigWheel_RadDist00+TGC1_BigWheel_RadDist01)*sin(TGC1_BigWheel_PhiStepAngle2); TGC1_BigWheel_RadDist01"/>
+</gvxysx>
+
+<!-- first phi plate with kink - plate 2 -->
+<var name="TGC1_PhiPlate2_XPos1"  value="tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RadDist02-TGC1_BigWheel_PhiStep1toP1/cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/cos(TGC1_BigWheel_PhiStepAngle2)/2." />
+<var name="TGC1_PhiPlate2_XPos3"  value="tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RadDist02-TGC1_BigWheel_PhiStep1toP1/cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/cos(TGC1_BigWheel_PhiStepAngle2)/2.+tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RThickPhiPlate2" />
+<var name="TGC1_PhiPlate2_XPos2"  value="TGC1_PhiPlate2_XPos1+(TGC1_BigWheel_RadDist02*tan(TGC1_BigWheel_PhiStepAngle2)-TGC1_PhiPlate2_XPos1)*cos(TGC1_BigWheel_PhiStepAngle2)*cos(TGC1_BigWheel_PhiStepAngle2)" />
+<var name="TGC1_PhiPlate2_YPos2"  value="TGC1_BigWheel_RadDist02-(TGC1_BigWheel_RadDist02*tan(TGC1_BigWheel_PhiStepAngle2)-TGC1_PhiPlate2_XPos1)*cos(TGC1_BigWheel_PhiStepAngle2)*sin(TGC1_BigWheel_PhiStepAngle2)" />
+
+<gvxysx name="TGC1_PhiPlate2_Even" material="Aluminium" dZ="TGC1_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC1_PhiPlate2_XPos3; TGC1_BigWheel_RadDist02+TGC1_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate2_XPos2+TGC1_BigWheel_RThickPhiPlate2*sin(TGC1_BigWheel_PhiStepAngle2)+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2); TGC1_PhiPlate2_YPos2+TGC1_BigWheel_RThickPhiPlate2*cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate2_XPos2+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2); TGC1_PhiPlate2_YPos2-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate2_XPos1; TGC1_BigWheel_RadDist02"/>
+</gvxysx>
+
+<gvxysx name="TGC1_PhiPlate2_Odd" material="Aluminium" dZ="TGC1_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC1_PhiPlate2_XPos3-tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_BigWheel_RadDist02+TGC1_BigWheel_RThickPhiPlate2-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate2_XPos2+TGC1_BigWheel_RThickPhiPlate2*sin(TGC1_BigWheel_PhiStepAngle2)+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2)-tan(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_PhiPlate2_YPos2+TGC1_BigWheel_RThickPhiPlate2*cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate2_XPos2+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2)-tan(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_PhiPlate2_YPos2-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate2_XPos1-tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_BigWheel_RadDist02-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+</gvxysx>
+
+<!-- second phi plate with kink - plate 3 -->
+<var name="TGC1_PhiPlate3_XPos1"  value="tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RadDist03-TGC1_BigWheel_PhiStep1toP1/cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/cos(TGC1_BigWheel_PhiStepAngle2)/2." />
+<var name="TGC1_PhiPlate3_XPos3"  value="tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RadDist03-TGC1_BigWheel_PhiStep1toP1/cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/cos(TGC1_BigWheel_PhiStepAngle2)/2.+tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RThickPhiPlate2" />
+<var name="TGC1_PhiPlate3_XPos2"  value="TGC1_PhiPlate3_XPos1+(TGC1_BigWheel_RadDist03*tan(TGC1_BigWheel_PhiStepAngle2)-TGC1_PhiPlate3_XPos1)*cos(TGC1_BigWheel_PhiStepAngle2)*cos(TGC1_BigWheel_PhiStepAngle2)-cos(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiThickRPlate" />
+<var name="TGC1_PhiPlate3_YPos2"  value="TGC1_BigWheel_RadDist03-(TGC1_BigWheel_RadDist03*tan(TGC1_BigWheel_PhiStepAngle2)-TGC1_PhiPlate3_XPos1)*cos(TGC1_BigWheel_PhiStepAngle2)*sin(TGC1_BigWheel_PhiStepAngle2)+sin(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiThickRPlate" />
+
+<gvxysx name="TGC1_PhiPlate3" material="Aluminium" dZ="TGC1_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC1_PhiPlate3_XPos3; TGC1_BigWheel_RadDist03+TGC1_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate3_XPos2+TGC1_BigWheel_RThickPhiPlate2*sin(TGC1_BigWheel_PhiStepAngle2)+(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1)*cos(TGC1_BigWheel_PhiStepAngle2); TGC1_PhiPlate3_YPos2+TGC1_BigWheel_RThickPhiPlate2*cos(TGC1_BigWheel_PhiStepAngle2)-(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1)*sin(TGC1_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate3_XPos2+(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1)*cos(TGC1_BigWheel_PhiStepAngle2); TGC1_PhiPlate3_YPos2-(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1)*sin(TGC1_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate3_XPos1; TGC1_BigWheel_RadDist03"/>
+</gvxysx>
+
+<!-- third phi plate with kink - plate 4 -->
+<var name="TGC1_PhiPlate4_XPos1"  value="tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RadDist04-TGC1_BigWheel_PhiStep1toP1/cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/cos(TGC1_BigWheel_PhiStepAngle2)/2." />
+<var name="TGC1_PhiPlate4_XPos3"  value="tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RadDist04-TGC1_BigWheel_PhiStep1toP1/cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/cos(TGC1_BigWheel_PhiStepAngle2)/2.+tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RThickPhiPlate2" />
+<var name="TGC1_PhiPlate4_XPos2"  value="TGC1_PhiPlate4_XPos1+(TGC1_BigWheel_RadDist04*tan(TGC1_BigWheel_PhiStepAngle2)-TGC1_PhiPlate4_XPos1)*cos(TGC1_BigWheel_PhiStepAngle2)*cos(TGC1_BigWheel_PhiStepAngle2)" />
+<var name="TGC1_PhiPlate4_YPos2"  value="TGC1_BigWheel_RadDist04-(TGC1_BigWheel_RadDist04*tan(TGC1_BigWheel_PhiStepAngle2)-TGC1_PhiPlate4_XPos1)*cos(TGC1_BigWheel_PhiStepAngle2)*sin(TGC1_BigWheel_PhiStepAngle2)" />
+
+<gvxysx name="TGC1_PhiPlate4_Even" material="Aluminium" dZ="TGC1_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC1_PhiPlate4_XPos3; TGC1_BigWheel_RadDist04+TGC1_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate4_XPos2+TGC1_BigWheel_RThickPhiPlate2*sin(TGC1_BigWheel_PhiStepAngle2)+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2); TGC1_PhiPlate4_YPos2+TGC1_BigWheel_RThickPhiPlate2*cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate4_XPos2+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2); TGC1_PhiPlate4_YPos2-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate4_XPos1; TGC1_BigWheel_RadDist04"/>
+</gvxysx>
+
+<gvxysx name="TGC1_PhiPlate4_Odd" material="Aluminium" dZ="TGC1_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC1_PhiPlate4_XPos3-tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_BigWheel_RadDist04+TGC1_BigWheel_RThickPhiPlate2-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate4_XPos2+TGC1_BigWheel_RThickPhiPlate2*sin(TGC1_BigWheel_PhiStepAngle2)+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2)-tan(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_PhiPlate4_YPos2+TGC1_BigWheel_RThickPhiPlate2*cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate4_XPos2+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2)-tan(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_PhiPlate4_YPos2-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate4_XPos1-tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_BigWheel_RadDist04-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+</gvxysx>
+
+<!-- forth phi plate with kink - plate 5 -->
+<var name="TGC1_PhiPlate5_XPos1"  value="tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RadDist05-TGC1_BigWheel_PhiStep1toP1/cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/cos(TGC1_BigWheel_PhiStepAngle2)/2." />
+<var name="TGC1_PhiPlate5_XPos3"  value="tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RadDist05-TGC1_BigWheel_PhiStep1toP1/cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/cos(TGC1_BigWheel_PhiStepAngle2)/2.+tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RThickPhiPlate2" />
+<var name="TGC1_PhiPlate5_XPos2"  value="TGC1_PhiPlate5_XPos1+(TGC1_BigWheel_RadDist05*tan(TGC1_BigWheel_PhiStepAngle2)-TGC1_PhiPlate5_XPos1)*cos(TGC1_BigWheel_PhiStepAngle2)*cos(TGC1_BigWheel_PhiStepAngle2)-cos(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiThickRPlate" />
+<var name="TGC1_PhiPlate5_YPos2"  value="TGC1_BigWheel_RadDist05-(TGC1_BigWheel_RadDist05*tan(TGC1_BigWheel_PhiStepAngle2)-TGC1_PhiPlate5_XPos1)*cos(TGC1_BigWheel_PhiStepAngle2)*sin(TGC1_BigWheel_PhiStepAngle2)+sin(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiThickRPlate" />
+
+<gvxysx name="TGC1_PhiPlate5" material="Aluminium" dZ="TGC1_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC1_PhiPlate5_XPos3; TGC1_BigWheel_RadDist05+TGC1_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate5_XPos2+TGC1_BigWheel_RThickPhiPlate2*sin(TGC1_BigWheel_PhiStepAngle2)+(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1)*cos(TGC1_BigWheel_PhiStepAngle2); TGC1_PhiPlate5_YPos2+TGC1_BigWheel_RThickPhiPlate2*cos(TGC1_BigWheel_PhiStepAngle2)-(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1)*sin(TGC1_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate5_XPos2+(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1)*cos(TGC1_BigWheel_PhiStepAngle2); TGC1_PhiPlate5_YPos2-(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1)*sin(TGC1_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate5_XPos1; TGC1_BigWheel_RadDist05"/>
+</gvxysx>
+
+<!-- fifth phi plate with kink - plate 6 -->
+<var name="TGC1_PhiPlate6_XPos1"  value="tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RadDist06-TGC1_BigWheel_PhiStep1toP1/cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/cos(TGC1_BigWheel_PhiStepAngle2)/2." />
+<var name="TGC1_PhiPlate6_XPos3"  value="tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RadDist06-TGC1_BigWheel_PhiStep1toP1/cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/cos(TGC1_BigWheel_PhiStepAngle2)/2.+tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RThickPhiPlate2" />
+<var name="TGC1_PhiPlate6_XPos2"  value="TGC1_PhiPlate6_XPos1+(TGC1_BigWheel_RadDist06*tan(TGC1_BigWheel_PhiStepAngle2)-TGC1_PhiPlate6_XPos1)*cos(TGC1_BigWheel_PhiStepAngle2)*cos(TGC1_BigWheel_PhiStepAngle2)" />
+<var name="TGC1_PhiPlate6_YPos2"  value="TGC1_BigWheel_RadDist06-(TGC1_BigWheel_RadDist06*tan(TGC1_BigWheel_PhiStepAngle2)-TGC1_PhiPlate6_XPos1)*cos(TGC1_BigWheel_PhiStepAngle2)*sin(TGC1_BigWheel_PhiStepAngle2)" />
+
+<gvxysx name="TGC1_PhiPlate6_Even" material="Aluminium" dZ="TGC1_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC1_PhiPlate6_XPos3; TGC1_BigWheel_RadDist06+TGC1_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate6_XPos2+TGC1_BigWheel_RThickPhiPlate2*sin(TGC1_BigWheel_PhiStepAngle2)+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2); TGC1_PhiPlate6_YPos2+TGC1_BigWheel_RThickPhiPlate2*cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate6_XPos2+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2); TGC1_PhiPlate6_YPos2-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate6_XPos1; TGC1_BigWheel_RadDist06"/>
+</gvxysx>
+
+<gvxysx name="TGC1_PhiPlate6_Odd" material="Aluminium" dZ="TGC1_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC1_PhiPlate6_XPos3-tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_BigWheel_RadDist06+TGC1_BigWheel_RThickPhiPlate2-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate6_XPos2+TGC1_BigWheel_RThickPhiPlate2*sin(TGC1_BigWheel_PhiStepAngle2)+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2)-tan(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_PhiPlate6_YPos2+TGC1_BigWheel_RThickPhiPlate2*cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate6_XPos2+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2)-tan(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_PhiPlate6_YPos2-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate6_XPos1-tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_BigWheel_RadDist06-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+</gvxysx>
+
+<!-- sixth phi plate with kink - plate 7 -->
+<var name="TGC1_PhiPlate7_XPos1"  value="tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RadDist07-TGC1_BigWheel_PhiStep1toP1/cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/cos(TGC1_BigWheel_PhiStepAngle2)/2." />
+<var name="TGC1_PhiPlate7_XPos3"  value="tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RadDist07-TGC1_BigWheel_PhiStep1toP1/cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/cos(TGC1_BigWheel_PhiStepAngle2)/2.+tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RThickPhiPlate2" />
+<var name="TGC1_PhiPlate7_XPos2"  value="TGC1_PhiPlate7_XPos1+(TGC1_BigWheel_RadDist07*tan(TGC1_BigWheel_PhiStepAngle2)-TGC1_PhiPlate7_XPos1)*cos(TGC1_BigWheel_PhiStepAngle2)*cos(TGC1_BigWheel_PhiStepAngle2)-cos(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiThickRPlate" />
+<var name="TGC1_PhiPlate7_YPos2"  value="TGC1_BigWheel_RadDist07-(TGC1_BigWheel_RadDist07*tan(TGC1_BigWheel_PhiStepAngle2)-TGC1_PhiPlate7_XPos1)*cos(TGC1_BigWheel_PhiStepAngle2)*sin(TGC1_BigWheel_PhiStepAngle2)+sin(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiThickRPlate" />
+
+<gvxysx name="TGC1_PhiPlate7" material="Aluminium" dZ="TGC1_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC1_PhiPlate7_XPos3; TGC1_BigWheel_RadDist07+TGC1_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate7_XPos2+TGC1_BigWheel_RThickPhiPlate2*sin(TGC1_BigWheel_PhiStepAngle2)+(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1)*cos(TGC1_BigWheel_PhiStepAngle2); TGC1_PhiPlate7_YPos2+TGC1_BigWheel_RThickPhiPlate2*cos(TGC1_BigWheel_PhiStepAngle2)-(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1)*sin(TGC1_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate7_XPos2+(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1)*cos(TGC1_BigWheel_PhiStepAngle2); TGC1_PhiPlate7_YPos2-(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1)*sin(TGC1_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate7_XPos1; TGC1_BigWheel_RadDist07"/>
+</gvxysx>
+
+<!-- seventh phi plate with kink - plate 8 -->
+<var name="TGC1_PhiPlate8_XPos1"  value="tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RadDist08-TGC1_BigWheel_PhiStep1toP1/cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/cos(TGC1_BigWheel_PhiStepAngle2)/2." />
+<var name="TGC1_PhiPlate8_XPos3"  value="tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RadDist08-TGC1_BigWheel_PhiStep1toP1/cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/cos(TGC1_BigWheel_PhiStepAngle2)/2.+tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_RThickPhiPlate2" />
+<var name="TGC1_PhiPlate8_XPos2"  value="TGC1_PhiPlate8_XPos1+(TGC1_BigWheel_RadDist08*tan(TGC1_BigWheel_PhiStepAngle2)-TGC1_PhiPlate8_XPos1)*cos(TGC1_BigWheel_PhiStepAngle2)*cos(TGC1_BigWheel_PhiStepAngle2)" />
+<var name="TGC1_PhiPlate8_YPos2"  value="TGC1_BigWheel_RadDist08-(TGC1_BigWheel_RadDist08*tan(TGC1_BigWheel_PhiStepAngle2)-TGC1_PhiPlate8_XPos1)*cos(TGC1_BigWheel_PhiStepAngle2)*sin(TGC1_BigWheel_PhiStepAngle2)" />
+
+<gvxysx name="TGC1_PhiPlate8_Even" material="Aluminium" dZ="TGC1_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC1_PhiPlate8_XPos3; TGC1_BigWheel_RadDist08+TGC1_BigWheel_RThickPhiPlate2"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate8_XPos2+TGC1_BigWheel_RThickPhiPlate2*sin(TGC1_BigWheel_PhiStepAngle2)+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2); TGC1_PhiPlate8_YPos2+TGC1_BigWheel_RThickPhiPlate2*cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate8_XPos2+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2); TGC1_PhiPlate8_YPos2-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate8_XPos1; TGC1_BigWheel_RadDist08"/>
+</gvxysx>
+
+<gvxysx name="TGC1_PhiPlate8_Odd" material="Aluminium" dZ="TGC1_BigWheel_WallThickPhiPlate" >
+  <gvxy_point X_Y="  TGC1_PhiPlate8_XPos3-tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_BigWheel_RadDist08+TGC1_BigWheel_RThickPhiPlate2-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate8_XPos2+TGC1_BigWheel_RThickPhiPlate2*sin(TGC1_BigWheel_PhiStepAngle2)+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2)-tan(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_PhiPlate8_YPos2+TGC1_BigWheel_RThickPhiPlate2*cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate8_XPos2+TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2)-tan(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_PhiPlate8_YPos2-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+  <gvxy_point X_Y="  TGC1_PhiPlate8_XPos1-tan(TGC1_BigWheel_PhiStepAngle1)*TGC1_BigWheel_PhiPlaDelEvenOdd; TGC1_BigWheel_RadDist08-TGC1_BigWheel_PhiPlaDelEvenOdd"/>
+</gvxysx>
+
+<!-- first R plate - center -->
+<box name="TGC1_RPlate1_base" material="Aluminium"   X_Y_Z=" TGC1_BigWheel_PhiThickRPlate; TGC1_BigWheel_RadDist09-TGC1_BigWheel_RadDistPlate02-TGC1_BigWheel_RadDist00; TGC1_BigWheel_ZThickRPlate" />
+<box name="TGC1_RPlate1_sub"  material="Aluminium"   X_Y_Z=" TGC1_BigWheel_PhiThickRPlate; TGC1_BigWheel_RadDist09-TGC1_BigWheel_RadDistPlate02-TGC1_BigWheel_RadDist00+TGC1_BigWheel_WallThickRPlate; TGC1_BigWheel_ZThickRPlate-2.*TGC1_BigWheel_WallThickRPlate" />
+
+<subtraction name="TGC1_RPlate1">
+  <posXYZ volume="TGC1_RPlate1_base" X_Y_Z=" TGC1_BigWheel_PhiDistRPlate1/2.+TGC1_BigWheel_PhiThickRPlate/2.; (TGC1_BigWheel_RadDist09+TGC1_BigWheel_RadDistPlate02-TGC1_BigWheel_RadDist00)/2.; 0." />
+  <posXYZ volume="TGC1_RPlate1_sub"  X_Y_Z=" TGC1_BigWheel_PhiDistRPlate1/2.+TGC1_BigWheel_PhiThickRPlate/2.+TGC1_BigWheel_WallThickRPlate; (TGC1_BigWheel_RadDist09+TGC1_BigWheel_RadDistPlate02-TGC1_BigWheel_RadDist00)/2.; 0." />
+</subtraction>
+
+<!-- second R plate - 7.5 degrees -->
+<box name="TGC1_RPlate2_base" material="Aluminium"   X_Y_Z=" TGC1_BigWheel_PhiThickRPlate; (TGC1_BigWheel_RadDist09-TGC1_BigWheel_RadDistPlate02-TGC1_BigWheel_RadDist00)/cos(TGC1_BigWheel_PhiStepAngle1); TGC1_BigWheel_ZThickRPlate" />
+<box name="TGC1_RPlate2_sub"  material="Aluminium"   X_Y_Z=" TGC1_BigWheel_PhiThickRPlate; (TGC1_BigWheel_RadDist09-TGC1_BigWheel_RadDistPlate02-TGC1_BigWheel_RadDist00+TGC1_BigWheel_WallThickRPlate)/cos(TGC1_BigWheel_PhiStepAngle1); TGC1_BigWheel_ZThickRPlate-2.*TGC1_BigWheel_WallThickRPlate" />
+
+<subtraction name="TGC1_RPlate2">
+  <posXYZ volume="TGC1_RPlate2_base" X_Y_Z=" TGC1_PhiPlate2_XPos1+(TGC1_BigWheel_RadDist09+TGC1_BigWheel_RadDistPlate02-TGC1_BigWheel_RadDist00-2.*TGC1_BigWheel_RadDist02)*tan(TGC1_BigWheel_PhiStepAngle1)/2.; (TGC1_BigWheel_RadDist09+TGC1_BigWheel_RadDistPlate02-TGC1_BigWheel_RadDist00)/2.; 0." rot=" 0.;   0.; -TGC1_BigWheel_PhiStepAngle1/GENV_PiS180" />
+  <posXYZ volume="TGC1_RPlate2_sub"  X_Y_Z=" TGC1_PhiPlate2_XPos1+(TGC1_BigWheel_RadDist09+TGC1_BigWheel_RadDistPlate02-TGC1_BigWheel_RadDist00-2.*TGC1_BigWheel_RadDist02)*tan(TGC1_BigWheel_PhiStepAngle1)/2.-TGC1_BigWheel_WallThickRPlate; (TGC1_BigWheel_RadDist09+TGC1_BigWheel_RadDistPlate02-TGC1_BigWheel_RadDist00)/2.; 0." rot=" 0.;   0.; -TGC1_BigWheel_PhiStepAngle1/GENV_PiS180" />
+</subtraction>
+
+<!-- third R plate - 7.5 degrees TGC1_BigWheel_PhiThickRPlate-->
+<var name="TGC1_RPlate3_length"  value="(TGC1_BigWheel_RadDist09 - TGC1_BigWheel_RadDist00 - (TGC1_PhiPlate2_YPos2-TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)) - (TGC1_BigWheel_PhiStep2toP1 + TGC1_BigWheel_PhiThickRPlate) * sin(TGC1_BigWheel_PhiStepAngle2) ) / cos(TGC1_BigWheel_PhiStepAngle1)" />
+
+<box name="TGC1_RPlate3_base" material="Aluminium"   X_Y_Z=" TGC1_BigWheel_PhiThickRPlate; TGC1_RPlate3_length; TGC1_BigWheel_ZThickRPlate" />
+<box name="TGC1_RPlate3_sub1"  material="Aluminium"   X_Y_Z=" TGC1_BigWheel_PhiThickRPlate; TGC1_RPlate3_length + TGC1_BigWheel_WallThickRPlate/cos(TGC1_BigWheel_PhiStepAngle1); TGC1_BigWheel_ZThickRPlate-2.*TGC1_BigWheel_WallThickRPlate" />
+<box name="TGC1_RPlate3_sub2"  material="Aluminium"   X_Y_Z=" TGC1_BigWheel_PhiThickRPlate; TGC1_RPlate3_length; TGC1_BigWheel_ZThickRPlate+2.*TGC1_BigWheel_WallThickRPlate" />
+
+<subtraction name="TGC1_RPlate3_tmp">
+  <posXYZ volume="TGC1_RPlate3_base" X_Y_Z=" TGC1_RPlate3_length/2.*sin(TGC1_BigWheel_PhiStepAngle1); TGC1_RPlate3_length/2.*cos(TGC1_BigWheel_PhiStepAngle1); 0." rot=" 0.;   0.; -TGC1_BigWheel_PhiStepAngle1/GENV_PiS180" />
+  <posXYZ volume="TGC1_RPlate3_sub1"  X_Y_Z=" TGC1_RPlate3_length/2.*sin(TGC1_BigWheel_PhiStepAngle1)-TGC1_BigWheel_WallThickRPlate; TGC1_RPlate3_length/2.*cos(TGC1_BigWheel_PhiStepAngle1); 0." rot=" 0.; 0.; -TGC1_BigWheel_PhiStepAngle1/GENV_PiS180" />
+  <posXYZ volume="TGC1_RPlate3_sub2" X_Y_Z="TGC1_RPlate3_length/2.*sin(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/2*(cos(TGC1_BigWheel_PhiStepAngle1)-cos(TGC1_BigWheel_PhiStepAngle2));TGC1_RPlate3_length/2.*cos(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_PhiThickRPlate/2*(sin(TGC1_BigWheel_PhiStepAngle2)-sin(TGC1_BigWheel_PhiStepAngle1)); 0." rot=" 0.; 0.; -TGC1_BigWheel_PhiStepAngle2/GENV_PiS180" />
+</subtraction>
+
+<var name="TGC1_RPlate3_PosX" value="TGC1_PhiPlate2_XPos2+(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1)*cos(TGC1_BigWheel_PhiStepAngle2)+TGC1_BigWheel_PhiThickRPlate*(0.5*cos(TGC1_BigWheel_PhiStepAngle1)-cos(TGC1_BigWheel_PhiStepAngle2))-cos(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiThickRPlate" />
+
+<var name="TGC1_RPlate3_PosY" value="TGC1_PhiPlate2_YPos2+(TGC1_BigWheel_PhiStep2toP1-TGC1_BigWheel_PhiStepP2toP2)*sin(TGC1_BigWheel_PhiStepAngle2)+TGC1_BigWheel_PhiThickRPlate*(sin(TGC1_BigWheel_PhiStepAngle2)-0.5*sin(TGC1_BigWheel_PhiStepAngle1))+sin(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiThickRPlate" />
+
+<composition name="TGC1_RPlate3" >
+  <posXYZ  volume="TGC1_RPlate3_tmp" X_Y_Z=" TGC1_RPlate3_PosX-GENV_Eps; TGC1_RPlate3_PosY ; 0." />
+</composition>
+
+<!-- first R plate - 15 degrees -->
+<box name="TGC1_RPlate4_base" material="Aluminium"   X_Y_Z=" TGC1_BigWheel_PhiThickRPlate; (TGC1_BigWheel_RadDist09-TGC1_BigWheel_RadDist00)/cos(TGC1_BigWheel_PhiStepAngle2); TGC1_BigWheel_ZThickRPlate" />
+<box name="TGC1_RPlate4_sub"  material="Aluminium"   X_Y_Z=" TGC1_BigWheel_PhiThickRPlate; (TGC1_BigWheel_RadDist09-TGC1_BigWheel_RadDist00+TGC1_BigWheel_WallThickRPlate)/cos(TGC1_BigWheel_PhiStepAngle2); TGC1_BigWheel_ZThickRPlate-2.*TGC1_BigWheel_WallThickRPlate" />
+
+<subtraction name="TGC1_RPlate4">
+  <posXYZ volume="TGC1_RPlate4_base" X_Y_Z=" (TGC1_BigWheel_RadDist09-TGC1_BigWheel_RadDist00)*tan(TGC1_BigWheel_PhiStepAngle2)/2.+(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1-1.5*TGC1_BigWheel_PhiThickRPlate)/cos(TGC1_BigWheel_PhiStepAngle2); (TGC1_BigWheel_RadDist09-TGC1_BigWheel_RadDist00)/2.; 0." rot=" 0.;   0.; -TGC1_BigWheel_PhiStepAngle2/GENV_PiS180" />
+  <posXYZ volume="TGC1_RPlate4_sub"  X_Y_Z=" (TGC1_BigWheel_RadDist09-TGC1_BigWheel_RadDist00)*tan(TGC1_BigWheel_PhiStepAngle2)/2.-TGC1_BigWheel_WallThickRPlate+(TGC1_BigWheel_PhiStepP2toP2-TGC1_BigWheel_PhiStep2toP1-1.5*TGC1_BigWheel_PhiThickRPlate)/cos(TGC1_BigWheel_PhiStepAngle2); (TGC1_BigWheel_RadDist09-TGC1_BigWheel_RadDist00)/2.; 0." rot=" 0.;   0.; -TGC1_BigWheel_PhiStepAngle2/GENV_PiS180" />
+</subtraction>
+
+<!-- second R plate - 15 degrees -->
+<box name="TGC1_RPlate5_base" material="Aluminium"   X_Y_Z=" TGC1_BigWheel_PhiThickRPlate; (TGC1_BigWheel_RadDist09-cos(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_RadDistOutPlate)/cos(TGC1_BigWheel_PhiStepAngle2); TGC1_BigWheel_ZThickRPlate" />
+<box name="TGC1_RPlate5_sub"  material="Aluminium"   X_Y_Z=" TGC1_BigWheel_PhiThickRPlate; (TGC1_BigWheel_RadDist09-cos(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_RadDistOutPlate)/cos(TGC1_BigWheel_PhiStepAngle2)+TGC1_BigWheel_WallThickRPlate; TGC1_BigWheel_ZThickRPlate-2.*TGC1_BigWheel_WallThickRPlate" />
+
+<var name="TGC1_RPlate5_PosX" value="sin(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_RadDistOutPlate/2. +TGC1_PhiPlate2_XPos2 +TGC1_BigWheel_PhiStepP2toP2*cos(TGC1_BigWheel_PhiStepAngle2) +tan(TGC1_BigWheel_PhiStepAngle2)*(TGC1_BigWheel_RadDist09/2.-TGC1_PhiPlate2_YPos2+TGC1_BigWheel_PhiStepP2toP2*sin(TGC1_BigWheel_PhiStepAngle2)-TGC1_BigWheel_RadDist00)"/>
+
+<subtraction name="TGC1_RPlate5">
+  <posXYZ volume="TGC1_RPlate5_base" X_Y_Z=" TGC1_RPlate5_PosX - cos(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiThickRPlate/2.; (TGC1_BigWheel_RadDist09+cos(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_RadDistOutPlate)/2. - TGC1_BigWheel_RadDist00 + sin(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiThickRPlate/2.; 0." rot=" 0.;   0.; -TGC1_BigWheel_PhiStepAngle2/GENV_PiS180" />
+  <posXYZ volume="TGC1_RPlate5_sub"  X_Y_Z=" TGC1_RPlate5_PosX - cos(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiThickRPlate/2.+TGC1_BigWheel_WallThickRPlate; (TGC1_BigWheel_RadDist09+cos(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_RadDistOutPlate)/2.- TGC1_BigWheel_RadDist00 + sin(TGC1_BigWheel_PhiStepAngle2)*TGC1_BigWheel_PhiThickRPlate/2.; 0." rot=" 0.;   0.; -TGC1_BigWheel_PhiStepAngle2/GENV_PiS180" />
+</subtraction>
+
+<!-- very rough approximation of trigger boxes and cables - everything estimated - everywhere for TGC1 -->
+<!-- change of variables does not change placement correctly - fine tuning required -->
+
+<var name="TGC1_TrigBoxThicknessZ"   value="    2.  " />
+<var name="TGC1_TrigBoxWidthPhi"     value="  260.  " />
+<var name="TGC1_TrigBoxLengthR"      value=" 3160.  " />
+
+<box name="TGC1_TrigBox" material="Aluminium" X_Y_Z="TGC1_TrigBoxWidthPhi; TGC1_TrigBoxLengthR; TGC1_TrigBoxThicknessZ" />
+
+<var name="TGC1_TrigCableThicknessZ1"   value="    4.  " />
+<var name="TGC1_TrigCableWidthPhi1"     value="  100.  " />
+<var name="TGC1_TrigCableLengthR1"      value=" 5650.  " />
+
+<box name="TGC1_TrigCable1" material="Copper" X_Y_Z=" TGC1_TrigCableWidthPhi1; TGC1_TrigCableLengthR1; TGC1_TrigCableThicknessZ1" />
+
+<composition name="TGC1_Support_EvenSector_ASide">
+  <posXYZ volume="TGC1_PhiPlate1"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate2_Even"  X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate3"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate4_Even"  X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate5"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate6_Even"  X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate7"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate8_Even"  X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_RPlate1"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate1"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate2"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate2"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate3"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate3"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate4"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate4"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate5"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate5"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+
+  <posXYZ volume="TGC1_TrigBox"         X_Y_Z=" -(TGC1_PhiPlate6_XPos1-TGC1_TrigBoxLengthR/2.*sin(TGC1_BigWheel_PhiStepAngle1)+TGC1_TrigBoxWidthPhi/8.*cos(TGC1_BigWheel_PhiStepAngle1)); -TGC1_TrigBoxLengthR/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; -TGC1_BigWheel_ZThickPhiPlate" rot="0.; 0.; TGC1_BigWheel_PhiStepAngle1/GENV_PiS180" />
+  <posXYZ volume="TGC1_TrigBox"         X_Y_Z=" -(-TGC1_TrigBoxLengthR/2.*sin(TGC1_BigWheel_PhiStepAngle1)-3.*TGC1_TrigBoxWidthPhi/4.*cos(TGC1_BigWheel_PhiStepAngle1)-TGC1_PhiPlate5_XPos2); -TGC1_TrigBoxLengthR/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; -TGC1_BigWheel_ZThickPhiPlate" rot="0.; 0.; -TGC1_BigWheel_PhiStepAngle1/GENV_PiS180" />
+
+  <posXYZ volume="TGC1_TrigCable1"      X_Y_Z="-(-TGC1_TrigCableLengthR1/2.*sin(TGC1_BigWheel_PhiStepAngle1)+TGC1_TrigCableWidthPhi1/2.*cos(TGC1_BigWheel_PhiStepAngle1) + TGC1_PhiPlate6_XPos1 + 175.); -TGC1_TrigCableWidthPhi1/2.*sin(TGC1_BigWheel_PhiStepAngle1)-TGC1_TrigCableLengthR1/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; -(TGC1_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC1_TrigCableThicknessZ1/2.)" rot="0.; 0.; TGC1_BigWheel_PhiStepAngle1/GENV_PiS180"/>
+  <posXYZ volume="TGC1_TrigCable1"      X_Y_Z="-(TGC1_TrigCableLengthR1/2.*sin(TGC1_BigWheel_PhiStepAngle1)+3.*TGC1_TrigCableWidthPhi1/2.*cos(TGC1_BigWheel_PhiStepAngle1)-TGC1_PhiPlate7_XPos2); TGC1_TrigCableWidthPhi1*sin(TGC1_BigWheel_PhiStepAngle1)-TGC1_TrigCableLengthR1/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; -(TGC1_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC1_TrigCableThicknessZ1/2.)" rot="0.; 0.; -TGC1_BigWheel_PhiStepAngle1/GENV_PiS180"/>
+
+</composition>
+
+<composition name="TGC1_Support_OddSector_ASide">
+  <posXYZ volume="TGC1_PhiPlate1"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate2_Odd"   X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate3"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate4_Odd"   X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate5"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate6_Odd"   X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate7"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate8_Odd"   X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_RPlate1"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate1"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate2"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate2"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate3"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate3"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate4"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate4"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate5"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate5"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+
+  <posXYZ volume="TGC1_TrigBox"         X_Y_Z=" -(TGC1_PhiPlate6_XPos1-TGC1_TrigBoxLengthR/2.*sin(TGC1_BigWheel_PhiStepAngle1)+TGC1_TrigBoxWidthPhi/8.*cos(TGC1_BigWheel_PhiStepAngle1)); -TGC1_TrigBoxLengthR/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; -TGC1_BigWheel_ZThickPhiPlate" rot="0.; 0.; TGC1_BigWheel_PhiStepAngle1/GENV_PiS180" />
+  <posXYZ volume="TGC1_TrigBox"         X_Y_Z=" -(-TGC1_TrigBoxLengthR/2.*sin(TGC1_BigWheel_PhiStepAngle1)-3.*TGC1_TrigBoxWidthPhi/4.*cos(TGC1_BigWheel_PhiStepAngle1)-TGC1_PhiPlate5_XPos2); -TGC1_TrigBoxLengthR/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; -TGC1_BigWheel_ZThickPhiPlate" rot="0.; 0.; -TGC1_BigWheel_PhiStepAngle1/GENV_PiS180" />
+
+  <posXYZ volume="TGC1_TrigCable1"      X_Y_Z="-(-TGC1_TrigCableLengthR1/2.*sin(TGC1_BigWheel_PhiStepAngle1)+TGC1_TrigCableWidthPhi1/2.*cos(TGC1_BigWheel_PhiStepAngle1) + TGC1_PhiPlate6_XPos1 + 175.); -TGC1_TrigCableWidthPhi1/2.*sin(TGC1_BigWheel_PhiStepAngle1)-TGC1_TrigCableLengthR1/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; -(TGC1_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC1_TrigCableThicknessZ1/2.)" rot="0.; 0.; TGC1_BigWheel_PhiStepAngle1/GENV_PiS180"/>
+  <posXYZ volume="TGC1_TrigCable1"      X_Y_Z="-(TGC1_TrigCableLengthR1/2.*sin(TGC1_BigWheel_PhiStepAngle1)+3.*TGC1_TrigCableWidthPhi1/2.*cos(TGC1_BigWheel_PhiStepAngle1)-TGC1_PhiPlate7_XPos2); TGC1_TrigCableWidthPhi1*sin(TGC1_BigWheel_PhiStepAngle1)-TGC1_TrigCableLengthR1/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; -(TGC1_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC1_TrigCableThicknessZ1/2.)" rot="0.; 0.; -TGC1_BigWheel_PhiStepAngle1/GENV_PiS180"/>
+
+</composition>
+
+<composition name="TGC1_Support_EvenSector_CSide">
+  <posXYZ volume="TGC1_PhiPlate1"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate2_Even"  X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate3"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate4_Even"  X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate5"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate6_Even"  X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate7"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate8_Even"  X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_RPlate1"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate1"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate2"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate2"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate3"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate3"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate4"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate4"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate5"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate5"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+
+  <posXYZ volume="TGC1_TrigBox"         X_Y_Z=" -(TGC1_PhiPlate6_XPos1-TGC1_TrigBoxLengthR/2.*sin(TGC1_BigWheel_PhiStepAngle1)+TGC1_TrigBoxWidthPhi/8.*cos(TGC1_BigWheel_PhiStepAngle1)); -TGC1_TrigBoxLengthR/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; TGC1_BigWheel_ZThickPhiPlate" rot="0.; 0.; TGC1_BigWheel_PhiStepAngle1/GENV_PiS180" />
+  <posXYZ volume="TGC1_TrigBox"         X_Y_Z=" -(-TGC1_TrigBoxLengthR/2.*sin(TGC1_BigWheel_PhiStepAngle1)-3.*TGC1_TrigBoxWidthPhi/4.*cos(TGC1_BigWheel_PhiStepAngle1)-TGC1_PhiPlate5_XPos2); -TGC1_TrigBoxLengthR/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; TGC1_BigWheel_ZThickPhiPlate" rot="0.; 0.; -TGC1_BigWheel_PhiStepAngle1/GENV_PiS180" />
+
+  <posXYZ volume="TGC1_TrigCable1"      X_Y_Z="-(-TGC1_TrigCableLengthR1/2.*sin(TGC1_BigWheel_PhiStepAngle1)+TGC1_TrigCableWidthPhi1/2.*cos(TGC1_BigWheel_PhiStepAngle1) + TGC1_PhiPlate6_XPos1 + 175.); -TGC1_TrigCableWidthPhi1/2.*sin(TGC1_BigWheel_PhiStepAngle1)-TGC1_TrigCableLengthR1/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; TGC1_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC1_TrigCableThicknessZ1/2." rot="0.; 0.; TGC1_BigWheel_PhiStepAngle1/GENV_PiS180"/>
+  <posXYZ volume="TGC1_TrigCable1"      X_Y_Z="-(TGC1_TrigCableLengthR1/2.*sin(TGC1_BigWheel_PhiStepAngle1)+3.*TGC1_TrigCableWidthPhi1/2.*cos(TGC1_BigWheel_PhiStepAngle1)-TGC1_PhiPlate7_XPos2); TGC1_TrigCableWidthPhi1*sin(TGC1_BigWheel_PhiStepAngle1)-TGC1_TrigCableLengthR1/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; TGC1_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC1_TrigCableThicknessZ1/2." rot="0.; 0.; -TGC1_BigWheel_PhiStepAngle1/GENV_PiS180"/>
+
+</composition>
+
+<composition name="TGC1_Support_OddSector_CSide">
+  <posXYZ volume="TGC1_PhiPlate1"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate2_Odd"   X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate3"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate4_Odd"   X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate5"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate6_Odd"   X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate7"       X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_PhiPlate8_Odd"   X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; 0." />
+  <posXYZ volume="TGC1_RPlate1"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate1"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate2"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate2"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate3"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate3"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate4"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate4"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+  <posXYZ volume="TGC1_RPlate5"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00; -TGC1_BigWheel_ZThickPhiPlate-TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.;   0.; 0."/>
+  <posXYZ volume="TGC1_RPlate5"         X_Y_Z=" 0.; TGC1_BigWheel_RadDist00;  TGC1_BigWheel_ZThickPhiPlate+TGC1_BigWheel_ZThickRPlate/2."   rot=" 0.; 180.; 0."/>
+
+  <posXYZ volume="TGC1_TrigBox"         X_Y_Z=" -(TGC1_PhiPlate6_XPos1-TGC1_TrigBoxLengthR/2.*sin(TGC1_BigWheel_PhiStepAngle1)+TGC1_TrigBoxWidthPhi/8.*cos(TGC1_BigWheel_PhiStepAngle1)); -TGC1_TrigBoxLengthR/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; TGC1_BigWheel_ZThickPhiPlate" rot="0.; 0.; TGC1_BigWheel_PhiStepAngle1/GENV_PiS180" />
+  <posXYZ volume="TGC1_TrigBox"         X_Y_Z=" -(-TGC1_TrigBoxLengthR/2.*sin(TGC1_BigWheel_PhiStepAngle1)-3.*TGC1_TrigBoxWidthPhi/4.*cos(TGC1_BigWheel_PhiStepAngle1)-TGC1_PhiPlate5_XPos2); -TGC1_TrigBoxLengthR/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; TGC1_BigWheel_ZThickPhiPlate" rot="0.; 0.; -TGC1_BigWheel_PhiStepAngle1/GENV_PiS180" />
+
+  <posXYZ volume="TGC1_TrigCable1"      X_Y_Z="-(-TGC1_TrigCableLengthR1/2.*sin(TGC1_BigWheel_PhiStepAngle1)+TGC1_TrigCableWidthPhi1/2.*cos(TGC1_BigWheel_PhiStepAngle1) + TGC1_PhiPlate6_XPos1 + 175.); -TGC1_TrigCableWidthPhi1/2.*sin(TGC1_BigWheel_PhiStepAngle1)-TGC1_TrigCableLengthR1/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; TGC1_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC1_TrigCableThicknessZ1/2." rot="0.; 0.; TGC1_BigWheel_PhiStepAngle1/GENV_PiS180"/>
+  <posXYZ volume="TGC1_TrigCable1"      X_Y_Z="-(TGC1_TrigCableLengthR1/2.*sin(TGC1_BigWheel_PhiStepAngle1)+3.*TGC1_TrigCableWidthPhi1/2.*cos(TGC1_BigWheel_PhiStepAngle1)-TGC1_PhiPlate7_XPos2); TGC1_TrigCableWidthPhi1*sin(TGC1_BigWheel_PhiStepAngle1)-TGC1_TrigCableLengthR1/2.*cos(TGC1_BigWheel_PhiStepAngle1)+TGC1_BigWheel_RadDist09; TGC1_BigWheel_WallThickPhiPlate/2.+GENV_Eps+TGC1_TrigCableThicknessZ1/2." rot="0.; 0.; -TGC1_BigWheel_PhiStepAngle1/GENV_PiS180"/>
+
+</composition>
+
+<!-- tube and boxes are rather rouhg approximated here - should be okay though - Cavern Background only -->
+
+<tubs name="TGC1_CentralTube" material="Aluminium" Rio_Z="TGC1_BigWheel_TubeInnerR; TGC1_BigWheel_TubeOuterR; TGC1_BigWheel_WallThickPhiPlate" nbPhi="20" />
+
+<box name="TGC1_SurBox_base" material="Aluminium" X_Y_Z=" 2.*TGC1_BigWheel_RadDist09*tan(TGC1_BigWheel_PhiStepAngle2); TGC_BigWheel_SurBoxSideLength; TGC_BigWheel_SurBoxSideLength" />
+<box name="TGC1_SurBox_inner" material="Aluminium" X_Y_Z=" 2.*TGC1_BigWheel_RadDist09*tan(TGC1_BigWheel_PhiStepAngle2)+2.*GENV_Eps; TGC_BigWheel_SurBoxSideLength-2.*TGC_BigWheel_SurBoxSpcWall; TGC_BigWheel_SurBoxSideLength-2.*TGC_BigWheel_SurBoxSpcWall" />
+
+<subtraction name="TGC1_SurBox_default" >
+  <posXYZ volume="TGC1_SurBox_base"  X_Y_Z=" 0.; TGC1_BigWheel_RadDist09+TGC_BigWheel_SurBoxSideLength; 0." />
+  <posXYZ volume="TGC1_SurBox_inner"  X_Y_Z=" 0.; TGC1_BigWheel_RadDist09+TGC_BigWheel_SurBoxSideLength; 0." />
+</subtraction>
+
+<box name="TGC1_SurBoxSpc_base" material="Aluminium" X_Y_Z=" 2.*TGC1_BigWheel_RadDist09*tan(TGC1_BigWheel_PhiStepAngle2); TGC_BigWheel_SurBoxSpcLength; TGC_BigWheel_SurBoxSpcHeight" />
+<box name="TGC1_SurBoxSpc_inner" material="Aluminium" X_Y_Z="  2.*TGC1_BigWheel_RadDist09*tan(TGC1_BigWheel_PhiStepAngle2)+2.*GENV_Eps; TGC_BigWheel_SurBoxSpcLength-2.*TGC_BigWheel_SurBoxSpcWall; TGC_BigWheel_SurBoxSpcHeight" />
+
+<subtraction name="TGC1_SurBoxSpc" >
+  <posXYZ volume="TGC1_SurBoxSpc_base"   X_Y_Z=" 0.; TGC1_BigWheel_RadDist09+1.5*TGC_BigWheel_SurBoxSideLength+TGC_BigWheel_SurBoxDistance/2.; TGC_BigWheel_SurBoxSideLength/2.+TGC_BigWheel_SurBoxSpcHeight/2." />
+  <posXYZ volume="TGC1_SurBoxSpc_inner"  X_Y_Z=" 0.; TGC1_BigWheel_RadDist09+1.5*TGC_BigWheel_SurBoxSideLength+TGC_BigWheel_SurBoxDistance/2.; TGC_BigWheel_SurBoxSideLength/2.+TGC_BigWheel_SurBoxSpcHeight/2.-TGC_BigWheel_SurBoxSpcWall" />
+</subtraction>
+
+<composition name="TGC1_SurBox_extended" >
+  <posXYZ volume="TGC1_SurBox_default"  X_Y_Z=" 0.; TGC_BigWheel_SurBoxSideLength + TGC_BigWheel_SurBoxDistance; 0." />
+  <posXYZ volume="TGC1_SurBoxSpc"       X_Y_Z=" 0.; 0.;  GENV_Eps" />
+  <posXYZ volume="TGC1_SurBoxSpc"       X_Y_Z=" 0.; 0.; -GENV_Eps" rot=" 0.; 180.; 0."/>
+</composition>
+
+<composition name="TGC1_BigWheel_ASide">
+  <foreach  index="counter"  begin="0"  loops="6" >
+    <posXYZ volume="TGC1_Support_EvenSector_ASide"  X_Y_Z=" 0.; 0.; TGC1_BigWheel_ZPosL" rot="0.; 0.; counter*60." />
+    <posXYZ volume="TGC1_Support_OddSector_ASide"   X_Y_Z=" 0.; 0.; TGC1_BigWheel_ZPosL" rot="0.; 0.; 30.+(counter)*60." />
+  </foreach>
+  <foreach  index="counter"  begin="0"  loops="12" >
+    <posXYZ volume="TGC1_SurBox_default"   X_Y_Z=" 0.; 0.; TGC1_BigWheel_ZPosL" rot="0.; 0.; counter*30." />
+    <posXYZ volume="TGC1_SurBox_extended"  X_Y_Z=" 0.; 0.; TGC1_BigWheel_ZPosL" rot="0.; 0.; counter*30." />
+  </foreach>
+  <posXYZ volume="TGC1_CentralTube"   X_Y_Z=" 0.; 0.; TGC1_BigWheel_ZPosL" />
+</composition>
+
+<composition name="TGC1_BigWheel_CSide">
+  <foreach  index="counter"  begin="0"  loops="6" >
+    <posXYZ volume="TGC1_Support_EvenSector_CSide"  X_Y_Z=" 0.; 0.; -TGC1_BigWheel_ZPosL" rot="0.; 0.; counter*60." />
+    <posXYZ volume="TGC1_Support_OddSector_CSide"   X_Y_Z=" 0.; 0.; -TGC1_BigWheel_ZPosL" rot="0.; 0.; 30.+(counter)*60." />
+  </foreach>
+  <foreach  index="counter"  begin="0"  loops="12" >
+    <posXYZ volume="TGC1_SurBox_default"   X_Y_Z=" 0.; 0.; -TGC1_BigWheel_ZPosL" rot="0.; 0.; counter*30." />
+    <posXYZ volume="TGC1_SurBox_extended"  X_Y_Z=" 0.; 0.; -TGC1_BigWheel_ZPosL" rot="0.; 0.; counter*30." />
+  </foreach>
+  <posXYZ volume="TGC1_CentralTube"   X_Y_Z=" 0.; 0.; -TGC1_BigWheel_ZPosL" />
+</composition>
+
+<composition name="TGC1_BigWheels">
+  <posXYZ volume="TGC1_BigWheel_ASide" X_Y_Z=" 0.; 0.; 0." />
+  <posXYZ volume="TGC1_BigWheel_CSide" X_Y_Z=" 0.; 0.; 0." />
+</composition>
+
+</section>
+
+<section name       = "MdtRailSupport"
+         version    = "1.0"
+         date       = "21 10 2010"
+         author     = "Claude, Jochen, laurent"
+         top_volume = "MDTRail">
+<defaults   unit_length="mm"   />
+
+<var name="Zero"             value="  0"/>
+
+<var  name="R_BOL_rail"    value="9650."/>
+<var  name="S_BOL_rail"    value="2710."/>
+<var  name="Z_BOL_rail"    value="6350."/>
+<box   name="rail_BOL"        material="Aluminium"  X_Y_Z="120.;120.;11300."   />
+
+<composition name="BOL_MDTRail">
+   <mposPhi volume="rail_BOL"  ncopy="7"  Phi0="-45." dPhi=" 45." S=" S_BOL_rail" R_Z="R_BOL_rail; Z_BOL_rail" impliedRot="true" />
+   <mposPhi volume="rail_BOL"  ncopy="7"  Phi0="-45." dPhi=" 45." S="-S_BOL_rail" R_Z="R_BOL_rail; Z_BOL_rail" impliedRot="true" />
+   <mposPhi volume="rail_BOL"  ncopy="7"  Phi0="-45." dPhi=" 45." S=" S_BOL_rail" R_Z="R_BOL_rail;-Z_BOL_rail" impliedRot="true" />
+   <mposPhi volume="rail_BOL"  ncopy="7"  Phi0="-45." dPhi=" 45." S="-S_BOL_rail" R_Z="R_BOL_rail;-Z_BOL_rail" impliedRot="true" />
+</composition>
+
+<var  name="R_BOL_service"    value="9520."/>
+<var  name="S_BOL_service"    value="2570."/>
+<var  name="Z_BOL_service"    value="6350."/>
+<box   name="service_BOL"        material="Carbon"  X_Y_Z="200.;150.; 11300."   />
+
+<composition name="BOL_MDTService">
+   <mposPhi volume="service_BOL"  ncopy="8"  Phi0="0." S=" S_BOL_service" R_Z="R_BOL_service; Z_BOL_service" impliedRot="true" />
+   <mposPhi volume="service_BOL"  ncopy="8"  Phi0="0." S="-S_BOL_service" R_Z="R_BOL_service; Z_BOL_service" impliedRot="true" />
+   <mposPhi volume="service_BOL"  ncopy="8"  Phi0="0." S=" S_BOL_service" R_Z="R_BOL_service;-Z_BOL_service" impliedRot="true" />
+   <mposPhi volume="service_BOL"  ncopy="8"  Phi0="0." S="-S_BOL_service" R_Z="R_BOL_service;-Z_BOL_service" impliedRot="true" />
+</composition>
+
+
+<var  name="R_BML_rail"    value="7139."/>
+<var  name="S_BML_rail"    value="1998."/>
+<var  name="Z_BML_rail"    value="4850."/>
+<box   name="rail_BML"        material="Aluminium"  X_Y_Z="120.;120.; 8300."   />
+
+<composition name="BML_MDTRail">
+   <mposPhi volume="rail_BML"  ncopy="8"  Phi0="0." S=" S_BML_rail" R_Z="R_BML_rail; Z_BML_rail" impliedRot="true" />
+   <mposPhi volume="rail_BML"  ncopy="8"  Phi0="0." S="-S_BML_rail" R_Z="R_BML_rail; Z_BML_rail" impliedRot="true" />
+   <mposPhi volume="rail_BML"  ncopy="8"  Phi0="0." S=" S_BML_rail" R_Z="R_BML_rail;-Z_BML_rail" impliedRot="true" />
+   <mposPhi volume="rail_BML"  ncopy="8"  Phi0="0." S="-S_BML_rail" R_Z="R_BML_rail;-Z_BML_rail" impliedRot="true" />
+</composition>
+
+<var  name="R_BML_support1"    value="6900."/>
+<var  name="S_BML_support1"    value="2120."/>
+<var  name="Z1_BML_support1"    value="1712.5"/>
+<var  name="Z2_BML_support1"    value="5137.5"/>
+<var  name="Z3_BML_support1"    value="8245.0"/>
+<box   name="support1_BML"        material="Aluminium"  X_Y_Z="590.;120.; 120."   />
+
+<composition name="BML_RailSupport1">
+   <mposPhi volume="support1_BML"  ncopy="8"  Phi0="0." S=" S_BML_support1" R_Z="R_BML_support1; Z1_BML_support1" impliedRot="true" />
+   <mposPhi volume="support1_BML"  ncopy="8"  Phi0="0." S="-S_BML_support1" R_Z="R_BML_support1; Z1_BML_support1" impliedRot="true" />
+   <mposPhi volume="support1_BML"  ncopy="8"  Phi0="0." S=" S_BML_support1" R_Z="R_BML_support1;-Z1_BML_support1" impliedRot="true" />
+   <mposPhi volume="support1_BML"  ncopy="8"  Phi0="0." S="-S_BML_support1" R_Z="R_BML_support1;-Z1_BML_support1" impliedRot="true" />
+   <mposPhi volume="support1_BML"  ncopy="8"  Phi0="0." S=" S_BML_support1" R_Z="R_BML_support1; Z2_BML_support1" impliedRot="true" />
+   <mposPhi volume="support1_BML"  ncopy="8"  Phi0="0." S="-S_BML_support1" R_Z="R_BML_support1; Z2_BML_support1" impliedRot="true" />
+   <mposPhi volume="support1_BML"  ncopy="8"  Phi0="0." S=" S_BML_support1" R_Z="R_BML_support1;-Z2_BML_support1" impliedRot="true" />
+   <mposPhi volume="support1_BML"  ncopy="8"  Phi0="0." S="-S_BML_support1" R_Z="R_BML_support1;-Z2_BML_support1" impliedRot="true" />
+   <mposPhi volume="support1_BML"  ncopy="8"  Phi0="0." S=" S_BML_support1" R_Z="R_BML_support1; Z3_BML_support1" impliedRot="true" />
+   <mposPhi volume="support1_BML"  ncopy="8"  Phi0="0." S="-S_BML_support1" R_Z="R_BML_support1; Z3_BML_support1" impliedRot="true" />
+   <mposPhi volume="support1_BML"  ncopy="8"  Phi0="0." S=" S_BML_support1" R_Z="R_BML_support1;-Z3_BML_support1" impliedRot="true" />
+   <mposPhi volume="support1_BML"  ncopy="8"  Phi0="0." S="-S_BML_support1" R_Z="R_BML_support1;-Z3_BML_support1" impliedRot="true" />
+</composition>
+
+<var  name="R_BML_support2"    value="7139."/>
+<var  name="S_BML_support2"    value="2362."/>
+<var  name="Z1_BML_support2"    value="3490.0"/>
+<var  name="Z2_BML_support2"    value="6760.0"/>
+<box   name="support2_BML"        material="Aluminium"  X_Y_Z=" 120.; 590.; 120."   />
+
+<composition name="BML_RailSupport2">
+   <!-- the standard BML rail support brackets are in 2 orthogonal directions, but not in sectors 11/13/15,
+        to account for it, just add 7 brackets each (i.e. leave out the bottom sectors),
+        4 by using symmetry and the 3 remaining ones positioned manually -->
+   <mposPhi volume="support2_BML"  ncopy="4"  Phi0="0." S=" S_BML_support2" R_Z="R_BML_support2; Z1_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="45." S=" S_BML_support2" R_Z="R_BML_support2; Z1_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="135." S=" S_BML_support2" R_Z="R_BML_support2; Z1_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="-45." S=" S_BML_support2" R_Z="R_BML_support2; Z1_BML_support2" impliedRot="true" />
+
+   <mposPhi volume="support2_BML"  ncopy="4"  Phi0="0." S="-S_BML_support2" R_Z="R_BML_support2; Z1_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="45." S="-S_BML_support2" R_Z="R_BML_support2; Z1_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="135." S="-S_BML_support2" R_Z="R_BML_support2; Z1_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="225." S="-S_BML_support2" R_Z="R_BML_support2; Z1_BML_support2" impliedRot="true" />
+
+   <mposPhi volume="support2_BML"  ncopy="4"  Phi0="0." S=" S_BML_support2" R_Z="R_BML_support2;-Z1_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="45." S=" S_BML_support2" R_Z="R_BML_support2;-Z1_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="135." S=" S_BML_support2" R_Z="R_BML_support2;-Z1_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="-45." S=" S_BML_support2" R_Z="R_BML_support2;-Z1_BML_support2" impliedRot="true" />
+
+   <mposPhi volume="support2_BML"  ncopy="4"  Phi0="0." S="-S_BML_support2" R_Z="R_BML_support2;-Z1_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="45." S="-S_BML_support2" R_Z="R_BML_support2;-Z1_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="135." S="-S_BML_support2" R_Z="R_BML_support2;-Z1_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="225." S="-S_BML_support2" R_Z="R_BML_support2;-Z1_BML_support2" impliedRot="true" />
+
+   <mposPhi volume="support2_BML"  ncopy="4"  Phi0="0." S=" S_BML_support2" R_Z="R_BML_support2; Z2_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="45." S=" S_BML_support2" R_Z="R_BML_support2; Z2_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="135." S=" S_BML_support2" R_Z="R_BML_support2; Z2_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="-45." S=" S_BML_support2" R_Z="R_BML_support2; Z2_BML_support2" impliedRot="true" />
+
+   <mposPhi volume="support2_BML"  ncopy="4"  Phi0="0." S="-S_BML_support2" R_Z="R_BML_support2; Z2_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="45." S="-S_BML_support2" R_Z="R_BML_support2; Z2_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="135." S="-S_BML_support2" R_Z="R_BML_support2; Z2_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="225." S="-S_BML_support2" R_Z="R_BML_support2; Z2_BML_support2" impliedRot="true" />
+
+   <mposPhi volume="support2_BML"  ncopy="4"  Phi0="0." S=" S_BML_support2" R_Z="R_BML_support2;-Z2_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="45." S=" S_BML_support2" R_Z="R_BML_support2;-Z2_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="135." S=" S_BML_support2" R_Z="R_BML_support2;-Z2_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="-45." S=" S_BML_support2" R_Z="R_BML_support2;-Z2_BML_support2" impliedRot="true" />
+
+   <mposPhi volume="support2_BML"  ncopy="4"  Phi0="0." S="-S_BML_support2" R_Z="R_BML_support2;-Z2_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="45." S="-S_BML_support2" R_Z="R_BML_support2;-Z2_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="135." S="-S_BML_support2" R_Z="R_BML_support2;-Z2_BML_support2" impliedRot="true" />
+   <mposPhi volume="support2_BML"  ncopy="1"  Phi0="225." S="-S_BML_support2" R_Z="R_BML_support2;-Z2_BML_support2" impliedRot="true" />
+</composition>
+
+
+<var  name="R_BML_service"    value="7139."/>
+<var  name="S_BML_service"    value="1860."/>
+<var  name="Z_BML_service"    value="4850."/>
+<box   name="service_BML"        material="Carbon"  X_Y_Z="250.;120.; 8300."   />
+
+<composition name="BML_MDTService">
+   <mposPhi volume="service_BML"  ncopy="8"  Phi0="0." S=" S_BML_service" R_Z="R_BML_service; Z_BML_service" impliedRot="true" />
+   <mposPhi volume="service_BML"  ncopy="8"  Phi0="0." S="-S_BML_service" R_Z="R_BML_service; Z_BML_service" impliedRot="true" />
+   <mposPhi volume="service_BML"  ncopy="8"  Phi0="0." S=" S_BML_service" R_Z="R_BML_service;-Z_BML_service" impliedRot="true" />
+   <mposPhi volume="service_BML"  ncopy="8"  Phi0="0." S="-S_BML_service" R_Z="R_BML_service;-Z_BML_service" impliedRot="true" />
+</composition>
+
+<var  name="R_BML_trigbox"    value="7575."/>
+<var  name="S_BML_trigbox"    value=" 900."/>
+<var  name="Z_BML_trigbox"    value="4850."/>
+<box   name="trigbox_BML"        material="Carbon"  X_Y_Z="50.;1000.; 8300."   />
+<composition name="BML_trigbox">
+   <mposPhi volume="trigbox_BML"  ncopy="8"  Phi0="0." S=" S_BML_trigbox" R_Z="R_BML_trigbox; Z_BML_trigbox" impliedRot="true" />
+   <mposPhi volume="trigbox_BML"  ncopy="8"  Phi0="0." S="-S_BML_trigbox" R_Z="R_BML_trigbox; Z_BML_trigbox" impliedRot="true" />
+   <mposPhi volume="trigbox_BML"  ncopy="8"  Phi0="0." S=" S_BML_trigbox" R_Z="R_BML_trigbox;-Z_BML_trigbox" impliedRot="true" />
+   <mposPhi volume="trigbox_BML"  ncopy="8"  Phi0="0." S="-S_BML_trigbox" R_Z="R_BML_trigbox;-Z_BML_trigbox" impliedRot="true" />
+</composition>
+
+<var  name="R_BMS_service"    value="8095."/>
+<var  name="S_BMS_service"    value="1610."/>
+<var  name="Z_BMS_service"    value="4850."/>
+<box   name="service_BMS"        material="Carbon"  X_Y_Z="100.;120.; 8300."   />
+
+<composition name="BMS_MDTService">
+   <mposPhi volume="service_BMS"  ncopy="8"  Phi0="22.5" S=" S_BMS_service" R_Z="R_BMS_service; Z_BMS_service" impliedRot="true" />
+   <mposPhi volume="service_BMS"  ncopy="8"  Phi0="22.5" S="-S_BMS_service" R_Z="R_BMS_service; Z_BMS_service" impliedRot="true" />
+   <mposPhi volume="service_BMS"  ncopy="8"  Phi0="22.5" S=" S_BMS_service" R_Z="R_BMS_service;-Z_BMS_service" impliedRot="true" />
+   <mposPhi volume="service_BMS"  ncopy="8"  Phi0="22.5" S="-S_BMS_service" R_Z="R_BMS_service;-Z_BMS_service" impliedRot="true" />
+</composition>
+
+<var  name="R_BMS_trigbox"    value="7740."/>
+<var  name="S_BMS_trigbox"    value=" 550."/>
+<var  name="Z_BMS_trigbox1"   value="1950."/>
+<var  name="Z_BMS_trigbox2"   value="5150."/>
+<var  name="Z_BMS_trigbox3"   value="8150."/>
+<box   name="trigbox_BMS"     material="Carbon"  X_Y_Z="50.;900.; 2000."   />
+
+<composition name="BMS_trigbox">
+   <mposPhi volume="trigbox_BMS"  ncopy="6"  Phi0="-22.5" dPhi="45." S=" S_BMS_trigbox" R_Z="R_BMS_trigbox; Z_BMS_trigbox1" impliedRot="true" />
+   <mposPhi volume="trigbox_BMS"  ncopy="6"  Phi0="-22.5" dPhi="45." S="-S_BMS_trigbox" R_Z="R_BMS_trigbox; Z_BMS_trigbox1" impliedRot="true" />
+   <mposPhi volume="trigbox_BMS"  ncopy="6"  Phi0="-22.5" dPhi="45." S=" S_BMS_trigbox" R_Z="R_BMS_trigbox;-Z_BMS_trigbox1" impliedRot="true" />
+   <mposPhi volume="trigbox_BMS"  ncopy="6"  Phi0="-22.5" dPhi="45." S="-S_BMS_trigbox" R_Z="R_BMS_trigbox;-Z_BMS_trigbox1" impliedRot="true" />
+   <mposPhi volume="trigbox_BMS"  ncopy="6"  Phi0="-22.5" dPhi="45." S=" S_BMS_trigbox" R_Z="R_BMS_trigbox; Z_BMS_trigbox2" impliedRot="true" />
+   <mposPhi volume="trigbox_BMS"  ncopy="6"  Phi0="-22.5" dPhi="45." S="-S_BMS_trigbox" R_Z="R_BMS_trigbox; Z_BMS_trigbox2" impliedRot="true" />
+   <mposPhi volume="trigbox_BMS"  ncopy="6"  Phi0="-22.5" dPhi="45." S=" S_BMS_trigbox" R_Z="R_BMS_trigbox;-Z_BMS_trigbox2" impliedRot="true" />
+   <mposPhi volume="trigbox_BMS"  ncopy="6"  Phi0="-22.5" dPhi="45." S="-S_BMS_trigbox" R_Z="R_BMS_trigbox;-Z_BMS_trigbox2" impliedRot="true" />
+   <mposPhi volume="trigbox_BMS"  ncopy="6"  Phi0="-22.5" dPhi="45." S=" S_BMS_trigbox" R_Z="R_BMS_trigbox; Z_BMS_trigbox3" impliedRot="true" />
+   <mposPhi volume="trigbox_BMS"  ncopy="6"  Phi0="-22.5" dPhi="45." S="-S_BMS_trigbox" R_Z="R_BMS_trigbox; Z_BMS_trigbox3" impliedRot="true" />
+   <mposPhi volume="trigbox_BMS"  ncopy="6"  Phi0="-22.5" dPhi="45." S=" S_BMS_trigbox" R_Z="R_BMS_trigbox;-Z_BMS_trigbox3" impliedRot="true" />
+   <mposPhi volume="trigbox_BMS"  ncopy="6"  Phi0="-22.5" dPhi="45." S="-S_BMS_trigbox" R_Z="R_BMS_trigbox;-Z_BMS_trigbox3" impliedRot="true" />
+</composition>
+
+
+<composition name="MDTRail">
+   <posXYZ volume="BOL_MDTRail"	     X_Y_Z="Zero;Zero;Zero"/>
+   <posXYZ volume="BOL_MDTService"   X_Y_Z="Zero;Zero;Zero"/>
+   <posXYZ volume="BML_MDTRail"	     X_Y_Z="Zero;Zero;Zero"/>
+   <posXYZ volume="BML_RailSupport1" X_Y_Z="Zero;Zero;Zero"/>
+   <posXYZ volume="BML_RailSupport2" X_Y_Z="Zero;Zero;Zero"/>
+   <posXYZ volume="BML_MDTService"   X_Y_Z="Zero;Zero;Zero"/>
+   <posXYZ volume="BML_trigbox"	     X_Y_Z="Zero;Zero;Zero"/>
+   <posXYZ volume="BMS_MDTService"   X_Y_Z="Zero;Zero;Zero"/>
+   <posXYZ volume="BMS_trigbox"      X_Y_Z="Zero;Zero;Zero"/>
+</composition>
+
+</section>
+
+<section name       = "HFtruck"
+         version    = "0.0"
+         date       = "13-09-2017"
+         author     = "Besik Kekelia"
+         top_volume = "HFTruckRail">
+
+<!--     name       =  HFTruck                       section name       = "Supports"  -->
+<!--  
+      **************************************************************
+      ***                                                       ****
+      ***                  HF Truck                             ****
+      ***                                                       ****
+      **************************************************************
+-->
+
+<defaults   unit_length="mm"   />
+
+<!--  Description of HF Truck  -->
+
+<!--  Description of Column C1-L, C2-R  -->
+<gvxy name="Column" material="Iron" dZ="6662.">
+<gvxy_point X_Y="1485.; 1645."/>
+<gvxy_point X_Y="1525.; 1645."/>
+<gvxy_point X_Y="1525.; 1409.5"/>
+<gvxy_point X_Y="2225.; 1409.5"/>
+<gvxy_point X_Y="2225.; 1645."/>
+<gvxy_point X_Y="2265.; 1645."/>
+<gvxy_point X_Y="2265.; 1105."/>
+<gvxy_point X_Y="2225.; 1105."/>
+<gvxy_point X_Y="2225.; 1340.5"/>
+<gvxy_point X_Y="1525.; 1340.5"/>
+<gvxy_point X_Y="1525.; 1105."/>
+<gvxy_point X_Y="1485.; 1105."/>
+</gvxy>
+
+<tubs name="Column_Tube" material="Iron" Rio_Z="147.95; 254.; 2680.9" nbPhi="32"/>
+
+<composition  name="Column_C1-L_C2-R" >
+  <posXYZ  volume="Column" X_Y_Z=" 0.; 0.; 0. " rot=" 90.; 0.; 0." />
+  <posXYZ  volume="Column" X_Y_Z=" 0.; 0.; 0. " rot=" 90.; 0.; 180." />
+  <posXYZ  volume="Column" X_Y_Z=" 0.; 0.; -2750. " rot=" 90.; 0.; 0." />
+  <posXYZ  volume="Column" X_Y_Z=" 0.; 0.; -2750. " rot=" 90.; 0.; 180." />
+  <posXYZ  volume="Column_Tube" X_Y_Z=" 1875.; 2068.; 0. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Column_Tube" X_Y_Z=" -1875.; 2068.; 0. " rot=" 0.; 0.; 0." />
+</composition>
+<!-- end of  Description of Column C1-L, C2-R  -->
+
+
+<!--  Description of Beam  -->
+<gvxy name="Beam_1" material="Iron" dZ="5319.9">
+<gvxy_point X_Y="-1645.; 4211.05"/>
+<gvxy_point X_Y="-1645.; 4171.05"/>
+<gvxy_point X_Y="-1420.05; 4171.05"/>
+<gvxy_point X_Y="-1420.05; 3371.05"/>
+<gvxy_point X_Y="-1645.; 3371.05"/>
+<gvxy_point X_Y="-1645.; 3331.05"/>
+<gvxy_point X_Y="-1109.95; 3331.05"/>
+<gvxy_point X_Y="-1109.95; 3371.05"/>
+<gvxy_point X_Y="-1329.95; 3371.05"/>
+<gvxy_point X_Y="-1329.95; 4171.05"/>
+<gvxy_point X_Y="-1109.95; 4171.05"/>
+<gvxy_point X_Y="-1109.95; 4211.05"/>
+</gvxy>
+
+<box name="Beam_Box" material="Iron" X_Y_Z="880.; 40.; 540."/>
+
+<composition  name="Beam" >
+  <posXYZ  volume="Beam_1" X_Y_Z=" 0.; 0.; 0. " rot=" 0.; 90.; 0." />
+  <posXYZ  volume="Beam_1" X_Y_Z=" 0.; 0.; -2750. " rot=" 0.; 90.; 0." />
+  <posXYZ  volume="Beam_Box" X_Y_Z=" -2680.; 3771.05; 1375. " rot=" 0.; 0.; 90." />
+  <posXYZ  volume="Beam_Box" X_Y_Z=" 2680.; 3771.05; 1375. " rot=" 0.; 0.; 90." />
+  <posXYZ  volume="Beam_Box" X_Y_Z=" -2680.; 3771.05; -1375. " rot=" 0.; 0.; 90." />
+  <posXYZ  volume="Beam_Box" X_Y_Z=" 2680.; 3771.05; -1375. " rot=" 0.; 0.; 90." />
+</composition>
+<!-- end of  Description of Beam  -->
+
+<!--  Description of Rail  -->
+
+<gvxy name="Rail_1" material="Iron" dZ="5400.">
+<gvxy_point X_Y="-1740.; 4659.14"/>
+<gvxy_point X_Y="-1010.; 4659.14"/>
+<gvxy_point X_Y="-1010.; 4559.14"/>
+<gvxy_point X_Y="-1345.; 4559.14"/>
+<gvxy_point X_Y="-1345.; 4319.14"/>
+<gvxy_point X_Y="-1150.; 4319.14"/>
+<gvxy_point X_Y="-1150.; 4259.14"/>
+<gvxy_point X_Y="-1600.; 4259.14"/>
+<gvxy_point X_Y="-1600.; 4319.14"/>
+<gvxy_point X_Y="-1405.; 4319.14"/>
+<gvxy_point X_Y="-1405.; 4559.14"/>
+<gvxy_point X_Y="-1740.; 4559.14"/>
+</gvxy>
+
+<composition  name="Rail" >
+  <posXYZ  volume="Rail_1" X_Y_Z=" 0.; 0.; 0. " rot=" 0.; 90.; -0.708" />
+  <posXYZ  volume="Rail_1" X_Y_Z=" 0.; 0.; -2750. " rot=" 0.; 90.; -0.708" />
+</composition>
+<!-- end of  Description of Rail  -->
+
+
+<!--  Description of Shims  -->
+<gvxy name="Shims_1" material="Iron" dZ="238.">
+<gvxy_point X_Y="-2700.; 4291.76"/>
+<gvxy_point X_Y="2700.; 4225.029"/>
+<gvxy_point X_Y="2700.; 4211."/>
+<gvxy_point X_Y="-2700.; 4211."/>
+</gvxy>
+
+<composition  name="Shims" >
+  <posXYZ  volume="Shims_1" X_Y_Z=" 0.; 1.; 1375. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Shims_1" X_Y_Z=" 0.; 1.; -1375. " rot=" 0.; 0.; 0." />
+</composition>
+<!-- end of  Description of Shims  -->
+
+<!--  Description of Bracing  -->
+<gvxy name="Bracing_1" material="Aluminium" dZ="4038.">
+<gvxy_point X_Y="1745.; 99.5"/>
+<gvxy_point X_Y="1745.; 120."/>
+<gvxy_point X_Y="2005.; 120."/>
+<gvxy_point X_Y="2005.; 99.5"/>
+<gvxy_point X_Y="1883.; 99.5"/>
+<gvxy_point X_Y="1883.; -99.5"/>
+<gvxy_point X_Y="2005.; -99.5"/>
+<gvxy_point X_Y="2005.; -120."/>
+<gvxy_point X_Y="1745.; -120."/>
+<gvxy_point X_Y="1745.; -99.5"/>
+<gvxy_point X_Y="1847.; -99.5"/>
+<gvxy_point X_Y="1847.; 99.5"/>
+</gvxy>
+
+<gvxy name="subt_box" material="Aluminium" dZ="4038.">
+<gvxy_point X_Y="1735.46; 120.05"/>
+<gvxy_point X_Y="2016.3; 120.05"/>
+<gvxy_point X_Y="2016.3; -120.05"/>
+<gvxy_point X_Y="1735.46; -120.05"/>
+</gvxy>
+
+ <subtraction name="Sub_Bracing_1" >
+  <posXYZ volume="Bracing_1" X_Y_Z=" 0.; 0.; 0." rot=" -60.3; 0.; 0."/>
+  <posXYZ volume="subt_box" X_Y_Z=" 0.; 0; 0." rot=" 60.3; 0.; 0."/>
+ </subtraction>
+
+<gvxy name="Bracing_2" material="Aluminium" dZ="3588.">
+<gvxy_point X_Y="-120.; 120."/>
+<gvxy_point X_Y="-102.; 120."/>
+<gvxy_point X_Y="-102.; 6.25"/>
+<gvxy_point X_Y="102.; 6.25"/>
+<gvxy_point X_Y="102.; 120."/>
+<gvxy_point X_Y="120.; 120."/>
+<gvxy_point X_Y="120.; -120."/>
+<gvxy_point X_Y="102.; -120."/>
+<gvxy_point X_Y="102.; -6.25"/>
+<gvxy_point X_Y="-102.; -6.25"/>
+<gvxy_point X_Y="-102.; -120."/>
+<gvxy_point X_Y="-120.; -120."/>
+</gvxy>
+
+<box name="sub_Bracing_2" material="Aluminium" X_Y_Z="241.1; 240.1; 3600."/>
+
+ <subtraction name="Sub_Bracing_2" >
+  <posXYZ volume="Bracing_2" X_Y_Z=" 0.; 0.; 0." rot=" 0; 90.; 38.2"/>
+  <posXYZ volume="sub_Bracing_2" X_Y_Z=" 0.; 0; 0." rot=" 0.; 90.; -38.2"/>
+ </subtraction>
+
+<composition  name="Bracing" >
+  <posXYZ  volume="Bracing_1" X_Y_Z=" 0.; 0.; 0. " rot="60.3; 0.; 0." />
+  <posXYZ  volume="Sub_Bracing_1" X_Y_Z=" 0.; 0.; 0. " rot="0.; 0.; 0." />
+  <posXYZ  volume="Bracing_1" X_Y_Z=" -3750.; 0.; 0. " rot="60.3; 0.; 0." />
+  <posXYZ  volume="Sub_Bracing_1" X_Y_Z=" -3750.; 0.; 0. " rot="0.; 0.; 0." />
+  <posXYZ  volume="Bracing_2" X_Y_Z=" 0.; -712.3; 1375. " rot="0.; 90.; -38.2" />
+  <posXYZ  volume="Sub_Bracing_2" X_Y_Z=" 0.; -712.3; 1375. " rot="0.; 0.; 0." />
+  <posXYZ  volume="Bracing_2" X_Y_Z=" 0.; 1990.7; 1375. " rot="0.; 90.; -38.2" />
+  <posXYZ  volume="Sub_Bracing_2" X_Y_Z=" 0.; 1990.7; 1375. " rot="0.; 0.; 0." />
+  <posXYZ  volume="Bracing_2" X_Y_Z=" 0.; -712.3; -1375. " rot="0.; 90.; -38.2" />
+  <posXYZ  volume="Sub_Bracing_2" X_Y_Z=" 0.; -712.3; -1375. " rot="0.; 0.; 0." />
+  <posXYZ  volume="Bracing_2" X_Y_Z=" 0.; 1990.7; -1375. " rot="0.; 90.; -38.2" />
+  <posXYZ  volume="Sub_Bracing_2" X_Y_Z=" 0.; 1990.7; -1375. " rot="0.; 0.; 0." />
+</composition>
+
+<!-- end of  Description of Bracing  -->
+
+
+<!--  Description of Brackets  -->
+<gvxy name="Brackets_1" material="Iron" dZ="880.">
+<gvxy_point X_Y="-2145.; -2028.9"/>
+<gvxy_point X_Y="-1605.; -2028.9"/>
+<gvxy_point X_Y="-1605.; -2094.9"/>
+<gvxy_point X_Y="-1845.; -2094.9"/>
+<gvxy_point X_Y="-1845.; -3175."/>
+<gvxy_point X_Y="-1605.; -3175."/>
+<gvxy_point X_Y="-1605.; -3241."/>
+<gvxy_point X_Y="-2145.; -3241."/>
+<gvxy_point X_Y="-2145.; -3175."/>
+<gvxy_point X_Y="-1905.; -3175."/>
+<gvxy_point X_Y="-1905.; -2094.9"/>
+<gvxy_point X_Y="-2145.; -2094.9"/>
+</gvxy>
+
+<composition  name="Brackets" >
+  <posXYZ  volume="Brackets_1" X_Y_Z=" 0.; 0.; 665. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Brackets_1" X_Y_Z=" 0.; 0.; -665. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Brackets_1" X_Y_Z=" 3750.; 0.; 665. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Brackets_1" X_Y_Z=" 3750.; 0.; -665. " rot=" 0.; 0.; 0." />
+</composition>
+<!-- end of  Description of Brackets  -->
+
+<!--  Description of Inox  -->
+<box name="Inox_1" material="Iron" X_Y_Z="267.; 5478.; 36.8"/>
+
+<composition  name="Inox" >
+  <posXYZ  volume="Inox_1" X_Y_Z=" -2398.5; 500.; 1086.55 " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Inox_1" X_Y_Z=" -2398.5; 500.; -1086.55 " rot=" 0.; 0.; 0." />
+</composition>
+<!-- end of  Description of Inox  -->
+
+<!--  Description of Infrastructure  -->
+<gvxy name="Infrastructure_Feet_1" material="Iron" dZ="974.">
+<gvxy_point X_Y="1935.; -467."/>
+<gvxy_point X_Y="1935.; -478."/>
+<gvxy_point X_Y="1878.25; -478."/>
+<gvxy_point X_Y="1878.25; -576."/>
+<gvxy_point X_Y="1935.; -576."/>
+<gvxy_point X_Y="1935.; -587."/>
+<gvxy_point X_Y="1815.; -587."/>
+<gvxy_point X_Y="1815.; -576."/>
+<gvxy_point X_Y="1871.75; -576."/>
+<gvxy_point X_Y="1871.75; -478."/>
+<gvxy_point X_Y="1815.; -478."/>
+<gvxy_point X_Y="1815.; -467."/>
+</gvxy>
+
+<box name="Infrastructure_box_1" material="Iron" X_Y_Z="4449.1; 11.3; 1949.1"/>
+
+<gvxy name="Infrastructure_Feet_2" material="Iron" dZ="974.">
+<gvxy_point X_Y="-1476.; 1355.95"/>
+<gvxy_point X_Y="-1476.; 1349.05"/>
+<gvxy_point X_Y="-1510.15; 1349.05"/>
+<gvxy_point X_Y="-1510.15; 1222.85"/>
+<gvxy_point X_Y="-1476.; 1222.85"/>
+<gvxy_point X_Y="-1476.; 1215.95"/>
+<gvxy_point X_Y="-1549.; 1215.95"/>
+<gvxy_point X_Y="-1549.; 1222.85"/>
+<gvxy_point X_Y="-1515.95; 1222.85"/>
+<gvxy_point X_Y="-1514.85; 1349.05"/>
+<gvxy_point X_Y="-1549.; 1349.05"/>
+<gvxy_point X_Y="-1549.; 1355.95"/>
+</gvxy>
+
+<box name="Infrastructure_box_2" material="Iron" X_Y_Z="5360.; 20.4; 510."/>
+
+<composition  name="Infrastructure" >
+  <posXYZ  volume="Infrastructure_Feet_1" X_Y_Z=" 0.; 2809.05; 0. " rot=" 90.; 0.; 0." />
+  <posXYZ  volume="Infrastructure_Feet_1" X_Y_Z=" 0.; 2809.05; -1054. " rot=" 90.; 0.; 0." />
+  <posXYZ  volume="Infrastructure_Feet_1" X_Y_Z=" -3750.; 2809.05; 0. " rot=" 90.; 0.; 0." />
+  <posXYZ  volume="Infrastructure_Feet_1" X_Y_Z=" -3750.; 2809.05; -1054. " rot=" 90.; 0.; 0." />
+  <posXYZ  volume="Infrastructure_box_1" X_Y_Z=" 0.; 3301.75; 0. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Infrastructure_Feet_2" X_Y_Z=" 0.; 0.; 610.5 " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Infrastructure_Feet_2" X_Y_Z=" 0.; 0.; -610.5 " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Infrastructure_Feet_2" X_Y_Z=" 3025.; 0.; 610.5 " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Infrastructure_Feet_2" X_Y_Z=" 3025.; 0.; -610.5 " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Infrastructure_box_2" X_Y_Z=" 0.; 1366.2; 379. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Infrastructure_box_2" X_Y_Z=" 0.; 1366.2; -379. " rot=" 0.; 0.; 0." />
+</composition>
+<!-- end of  Description of Infrastructure  -->
+
+<!--  Description of JF Table  -->
+
+<!--  Description of JF Table Beam  -->
+
+<box name="Table_Beam_2" material="Iron" X_Y_Z="3500.; 50.; 500."/>
+<tubs name="sub_tube" material="Iron" Rio_Z="0.; 155.; 2700." nbPhi="32"/>
+
+ <subtraction name="Sub_Beam_2" >
+  <posXYZ volume="Table_Beam_2" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 0."/>
+  <posXYZ volume="sub_tube" X_Y_Z=" -825.; 0.; 0." rot=" 90.; 0.; 0."/>
+  <posXYZ volume="sub_tube" X_Y_Z=" 825.; 0.; 0." rot=" 90.; 0.; 0."/>
+ </subtraction>
+
+<gvxy name="Table_Beam_3" material="Iron" dZ="500.">
+<gvxy_point X_Y="-1750.; -225."/>
+<gvxy_point X_Y="-979.29; -225."/>
+<gvxy_point X_Y="-679.29; -525."/>
+<gvxy_point X_Y="679.29; -525."/>
+<gvxy_point X_Y="979.29; -225."/>
+<gvxy_point X_Y="1750.; -225."/>
+<gvxy_point X_Y="1750.; -317."/>
+<gvxy_point X_Y="958.; -317."/>
+<gvxy_point X_Y="700.; -575."/>
+<gvxy_point X_Y="-700.; -575."/>
+<gvxy_point X_Y="-958.; -317."/>
+<gvxy_point X_Y="-1750.; -317."/>
+</gvxy>
+
+ <subtraction name="Sub_Table_Beam_3" >
+  <posXYZ volume="Table_Beam_3" X_Y_Z=" 0.; 0.; 0." rot=" 0; 0.; 0."/>
+  <posXYZ volume="sub_tube" X_Y_Z=" -825.; 0.; 0." rot=" 90.; 0.; 0."/>
+  <posXYZ volume="sub_tube" X_Y_Z=" 825.; 0.; 0." rot=" 90.; 0.; 0."/>
+ </subtraction>
+
+<box name="Table_Beam_4" material="Iron" X_Y_Z="80.; 199.9; 500."/>
+<box name="Table_Beam_5" material="Iron" X_Y_Z="400.; 199.9; 50."/>
+<box name="Table_Beam_6" material="Iron" X_Y_Z="50.; 400.; 500."/>
+
+<gvxy name="Table_Beam_7" material="Iron" dZ="499.9">
+<gvxy_point X_Y="-640.05; 250."/>
+<gvxy_point X_Y="-540.05; 250."/>
+<gvxy_point X_Y="-540.05; 34."/>
+<gvxy_point X_Y="540.05; 34."/>
+<gvxy_point X_Y="540.05; 250."/>
+<gvxy_point X_Y="640.05; 250."/>
+<gvxy_point X_Y="640.05; -250."/>
+<gvxy_point X_Y="540.05; -250."/>
+<gvxy_point X_Y="540.05; -34."/>
+<gvxy_point X_Y="-540.05; -34."/>
+<gvxy_point X_Y="-540.05; -250."/>
+<gvxy_point X_Y="-640.05; -250."/>
+</gvxy>
+
+<composition  name="JF_Table_Beam_1" >
+  <posXYZ  volume="Sub_Beam_2" X_Y_Z=" 0.; 0.; 0. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Sub_Table_Beam_3" X_Y_Z=" 0.; 0.; 0. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Table_Beam_4" X_Y_Z=" 1080.; -125.; 0. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Table_Beam_4" X_Y_Z=" -1080.; -125.; 0. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Table_Beam_5" X_Y_Z=" -1550.; -125.; 0. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Table_Beam_5" X_Y_Z=" -1550.; -125.; 225. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Table_Beam_5" X_Y_Z=" -1550.; -125.; -225. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Table_Beam_5" X_Y_Z=" 1549.95; -125.; 0. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Table_Beam_5" X_Y_Z=" 1549.95; -125.; 225. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Table_Beam_5" X_Y_Z=" 1549.95; -125.; -225. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Table_Beam_6" X_Y_Z=" 1775.1; -75.; 0. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Table_Beam_7" X_Y_Z=" 0.; -275.; 0. " rot=" 90.; 0.; 0." />
+</composition>
+
+<!-- end of  Description of JF Table Beam  -->
+
+<!--  Description of JF Table Cross Bar  -->
+
+<box name="HF_Cross_Bar_1" material="Iron" X_Y_Z="200.; 200.; 1049.9"/>
+<box name="HF_Cross_Bar_sub_box" material="Iron" X_Y_Z="170.; 170.; 1100."/>
+
+<subtraction name="Sub_HF_Cross_Bar" >
+  <posXYZ volume="HF_Cross_Bar_1" X_Y_Z=" 0.; 0.; 0." rot=" 0; 0.; 0."/>
+  <posXYZ volume="HF_Cross_Bar_sub_box" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 0."/>
+ </subtraction>
+<!-- end of  Description of JF Table Cross Bar  -->
+
+<!--  Description of Jacks  -->
+<tubs name="Jacks_1" material="ShieldBrass" Rio_Z="122.5; 149.; 1540." nbPhi="32"/>
+<tubs name="Jacks_2" material="ShieldBrass" Rio_Z="120.; 245.; 90." nbPhi="32"/>
+<tubs name="Jacks_3" material="ShieldBrass" Rio_Z="0.; 103.5; 1570." nbPhi="32"/>
+<tubs name="Jacks_4" material="ShieldBrass" Rio_Z="105.; 155.; 100." nbPhi="32"/>
+<tubs name="Jacks_5" material="ShieldBrass" Rio_Z="0.; 80.; 160." nbPhi="32"/>
+
+<composition  name="Jacks" >
+  <posXYZ  volume="Jacks_1" X_Y_Z=" 0.; -745.; 0. " rot=" 90.; 0.; 0." />
+  <posXYZ  volume="Jacks_2" X_Y_Z=" 0.; 70.05; 0. " rot=" 90.; 0.; 0." />
+  <posXYZ  volume="Jacks_3" X_Y_Z=" 0.; 900.05; 0. " rot=" 90.; 0.; 0." />
+  <posXYZ  volume="Jacks_4" X_Y_Z=" 0.; 1735.1; 0. " rot=" 90.; 0.; 0." />
+  <posXYZ  volume="Jacks_5" X_Y_Z=" 0.; 1787.; 0. " rot=" 90.; 0.; 0." />
+</composition>
+<!--  end of Description of Jacks  -->
+
+<!--  Description of Motorised NuT  -->
+
+<box name="Motorised_NuT" material="Aluminium" X_Y_Z="290.; 280.; 300."/>
+
+<!--  end of Description of Motorised NuT  -->
+
+<composition  name="JF_Table" >
+  <posXYZ  volume="JF_Table_Beam_1" X_Y_Z=" 0.; 0.; 775. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="JF_Table_Beam_1" X_Y_Z=" 0.; 0.; -775. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Sub_HF_Cross_Bar" X_Y_Z=" 1552.5; -120.; 0. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Sub_HF_Cross_Bar" X_Y_Z=" -1552.5; -120.; 0. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Jacks" X_Y_Z=" 825.; 0.; 775. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Jacks" X_Y_Z=" -825.; 0.; 775. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Jacks" X_Y_Z=" 825.; 0.; -775. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Jacks" X_Y_Z=" -825.; 0.; -775. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Motorised_NuT" X_Y_Z=" 410.; 195.05; 775. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Motorised_NuT" X_Y_Z=" 410.; 195.05; -775. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Motorised_NuT" X_Y_Z=" -410.; 195.05; 775. " rot=" 0.; 0.; 0." />
+  <posXYZ  volume="Motorised_NuT" X_Y_Z=" -410.; 195.05; -775. " rot=" 0.; 0.; 0." />
+</composition>
+
+<!--  end of Description of JF Table Beam  -->
+<composition  name="Truck_A_C" >
+<posXYZ volume="Column_C1-L_C2-R" X_Y_Z=" 0. ; 0. ; 0." />
+  <posXYZ volume="Beam" X_Y_Z=" 0. ; 0. ; 0." />
+  <posXYZ volume="Rail" X_Y_Z=" 0. ; 0. ; 0." />
+  <posXYZ volume="Shims" X_Y_Z=" 0. ; 0. ; 0." />
+  <posXYZ volume="Bracing" X_Y_Z=" 0. ; 0. ; 0." />
+  <posXYZ volume="Brackets" X_Y_Z=" 0. ; 0. ; 0." />
+  <posXYZ volume="Inox" X_Y_Z=" 0. ; 0. ; 0." />
+  <posXYZ volume="Infrastructure" X_Y_Z=" 0. ; 0. ; 0." />
+  <posXYZ  volume="JF_Table" X_Y_Z=" 0.; 5000.; 0. " rot=" 0.; 90.; 0." />
+</composition>
+
+<composition  name="HFTruckRail" >
+  <posXYZ volume="Truck_A_C"      X_Y_Z=" 0. ; -9000.; 19132." />
+  <posXYZ volume="Truck_A_C"      X_Y_Z=" 0. ; -9000.; -19132." />
+</composition>
+
+
+</section>
+
+
+<section name       = "RUN2_Services"
+         version    = "1.0"
+         date       = "September 2014"
+         author     = "Antonios Leisos, Jochen Meyer"
+         top_volume = "RUN2_Services">
+
+<!--     name       =  Run2 supports                  section name       = "Services"     -->
+
+<var name="BME_ElectronicsBox_Frame_xwid"        value="2350."/> <!-- ATLMHS_0114 -->
+<var name="BME_ElectronicsBox_Frame_ywid"        value=" 100."/> <!-- ATLMHS_0114 -->
+<var name="BME_ElectronicsBox_Frame_zwid"        value=" 600."/> <!-- ATLMHS_0114 -->
+<var name="BME_ElectronicsBox_Frame_width"       value="  50."/> <!-- ATLMHS_0114 -->
+<var name="BME_ElectronicsBox_Frame_plate_width" value="   7."/> <!-- Approximate value -->
+<var name="BME_ElectronicsBox_Frame_box_width"   value="   5."/> <!-- Approximate value tuned to the weight -->
+<var name="BME_ElectronicsBox_Frame_distance_from_chamber" value="120."/> <!-- Markus Lippert:121mm and a little bit smaller since thery are not parallel -->
+
+<box  name="BME_ElectronicsBox_Outer"  material="Aluminium"  X_Y_Z="BME_ElectronicsBox_Frame_xwid; BME_ElectronicsBox_Frame_ywid ;  BME_ElectronicsBox_Frame_zwid" />
+<box  name="BME_ElectronicsBox_Inner"  material="Aluminium"  X_Y_Z="BME_ElectronicsBox_Frame_xwid-2.*BME_ElectronicsBox_Frame_width; BME_ElectronicsBox_Frame_ywid+10. ;  BME_ElectronicsBox_Frame_zwid-2.*BME_ElectronicsBox_Frame_width" />
+
+<subtraction  name="BME_Electronics_Box" >
+  <posXYZ  volume="BME_ElectronicsBox_Outer"  />
+  <posXYZ  volume="BME_ElectronicsBox_Inner"  />
+</subtraction>
+
+<box  name="BME_ElectronicsBox_Plate"  material="Aluminium"  X_Y_Z="BME_ElectronicsBox_Frame_xwid-2.*BME_ElectronicsBox_Frame_width-2.*GENV_Eps; BME_ElectronicsBox_Frame_plate_width;  BME_ElectronicsBox_Frame_zwid-2.*BME_ElectronicsBox_Frame_width-2.*GENV_Eps" />
+
+<box  name="BME_ElectronicsBox_Box"    material="Carbon"  X_Y_Z="BME_ElectronicsBox_Frame_xwid-2.*BME_ElectronicsBox_Frame_width-2.*GENV_Eps; BME_ElectronicsBox_Frame_box_width;  BME_ElectronicsBox_Frame_zwid-2.*BME_ElectronicsBox_Frame_width-2.*GENV_Eps" />
+
+<composition name="BME_Electronics">
+  <posXYZ volume="BME_Electronics_Box" />
+  <posXYZ volume="BME_ElectronicsBox_Plate" X_Y_Z=" 0.;BME_ElectronicsBox_Frame_ywid*0.5-BME_ElectronicsBox_Frame_plate_width*0.5;0." />
+  <posXYZ volume="BME_ElectronicsBox_Box" X_Y_Z=" 0.;BME_ElectronicsBox_Frame_ywid*0.5-BME_ElectronicsBox_Frame_plate_width-BME_ElectronicsBox_Frame_box_width/2.-GENV_Eps;0." />
+</composition>
+
+<var name="BOEwall_thickness"   value="200."/>
+<var name="BOEwall_ywid"        value="2000."/>
+<var name="BOEwall_xwid"        value="3400."/>
+<var name="BOEwall_zwid"        value="2200."/>
+
+<var name="BOEbox4_xwid"        value="BOEwall_xwid-2*BOEwall_thickness"/> 
+<var name="BOEbox4_ywid"        value="BOEwall_ywid"/> 
+<var name="BOEbox4_zwid"        value="BOEwall_thickness"/> 
+<var name="BOEbox4_xpos"        value="0."/>
+<var name="BOEbox4_ypos"        value="0."/>
+<var name="BOEbox4_zpos"        value="0."/>
+
+<var name="BOEbox5_xwid"        value="BOEwall_thickness"/> 
+<var name="BOEbox5_ywid"        value="BOEwall_ywid"/> 
+<var name="BOEbox5_zwid"        value="BOEwall_zwid"/> 
+<var name="BOEbox5_xpos"        value="BOEbox4_xwid/2+BOEbox5_xwid/2+GENV_Eps"/>
+<var name="BOEbox5_ypos"        value="BOEbox4_ypos"/>
+<var name="BOEbox5_zpos"        value="BOEwall_zwid/2-BOEwall_thickness/2"/>
+
+<box name="BOEbox4" material="Aluminium" X_Y_Z=" BOEbox4_xwid;BOEbox4_ywid;BOEbox4_zwid" /> 
+<box name="BOEbox5" material="Aluminium" X_Y_Z=" BOEbox5_xwid;BOEbox5_ywid;BOEbox5_zwid" /> 
+
+<var name="ElavatorSupport_xwid"         value=" 200. "/> <!-- approximate value -->
+<var name="ElavatorSupport_zwid"         value=" 200. "/> <!-- approximate value -->
+<var name="ElavatorSupport_ywid"         value="BOEwall_ywid"/>
+<var name="ElavatorSupport_xpos"         value="1000. "/>  <!-- approximate value -->
+<var name="ElavatorSupport_ypos"         value="BOEbox5_ypos"/> 
+<var name="ElavatorSupport_zpos"         value="BOEbox5_zpos"/>
+
+<var name="ElavatorCross_zwid"           value="  10. "/> <!-- approximate value -->
+<var name="ElavatorCross_xwid"           value="2.*ElavatorSupport_xpos-ElavatorSupport_xwid-2.*GENV_Eps"/> 
+<var name="ElavatorCross_ywid"           value="1000. "/> <!-- approximate value -->
+<var name="ElavatorCross_xpos"           value="BOEbox4_xpos"/> 
+<var name="ElavatorCross_ypos"           value="BOEwall_ywid/2.-ElavatorCross_ywid/2."/>
+<var name="ElavatorCross_zpos"           value="ElavatorSupport_zpos"/> 
+
+<var name="ElavatorTopFrame_xwid"        value="BOEbox4_xwid+2.*BOEbox5_xwid"/>
+<var name="ElavatorTopFrame_zwid"        value="BOEbox5_zwid"/> 
+<var name="ElavatorTopFrame_ywid"        value=" 200. "/>  <!-- approximate value --> 
+<var name="ElavatorTopFrame_xpos"        value="BOEbox4_xpos"/> 
+<var name="ElavatorTopFrame_ypos"        value="BOEbox4_ywid/2+ElavatorTopFrame_ywid/2+GENV_Eps"/> 
+<var name="ElavatorTopFrame_zpos"        value="BOEbox5_zpos"/> 
+<var name="ElavatorTopFrame_thickness"   value="  30. "/> <!-- approximate value -->  
+<var name="ElavatorTopPlate_xwid"        value="ElavatorTopFrame_xwid"/>  
+<var name="ElavatorTopPlate_zwid"        value="ElavatorTopFrame_zwid"/> 
+<var name="ElavatorTopPlate_ywid"        value="   5. "/>  <!-- approximate value --> 
+<var name="ElavatorTopPlate_xpos"        value="BOEbox4_xpos"/> 
+<var name="ElavatorTopPlate_ypos"        value="ElavatorTopFrame_ypos+ElavatorTopFrame_ywid/2+ElavatorTopPlate_ywid/2+GENV_Eps"/>  
+<var name="ElavatorTopPlate_zpos"        value="BOEbox5_zpos"/> 
+
+<box name="ElevatorSupport"        material="Aluminium" X_Y_Z=" ElavatorSupport_xwid;  ElavatorSupport_ywid;  ElavatorSupport_zwid" /> 
+<box name="ElevatorCross"          material="Aluminium" X_Y_Z="   ElavatorCross_xwid;    ElavatorCross_ywid;    ElavatorCross_zwid" /> 
+<box name="ElevatorTopFrame_Outer" material="Aluminium" X_Y_Z="ElavatorTopFrame_xwid; ElavatorTopFrame_ywid; ElavatorTopFrame_zwid" /> 
+<box name="ElevatorTopFrame_Inner" material="Aluminium" X_Y_Z="ElavatorTopFrame_xwid-ElavatorTopFrame_thickness; ElavatorTopFrame_ywid; ElavatorTopFrame_zwid-ElavatorTopFrame_thickness" /> 
+
+<subtraction  name="ElevatorTopFrame" >
+  <posXYZ  volume="ElevatorTopFrame_Outer"  />
+  <posXYZ  volume="ElevatorTopFrame_Inner"  />
+</subtraction>
+
+<box name="ElevatorTopPlate" material="Aluminium" X_Y_Z=" ElavatorTopPlate_xwid; ElavatorTopPlate_ywid; ElavatorTopPlate_zwid" /> 
+
+<composition  name="BOEwallside" >
+   <posXYZ  volume="BOEbox4"          X_Y_Z="          BOEbox4_xpos;          BOEbox4_ypos;          BOEbox4_zpos" /> 
+   <posXYZ  volume="ElevatorSupport"  X_Y_Z="  ElavatorSupport_xpos;  ElavatorSupport_ypos;  ElavatorSupport_zpos" /> 
+   <posXYZ  volume="ElevatorCross"    X_Y_Z="    ElavatorCross_xpos;    ElavatorCross_ypos;    ElavatorCross_zpos" /> 
+   <posXYZ  volume="ElevatorSupport"  X_Y_Z=" -ElavatorSupport_xpos;  ElavatorSupport_ypos;  ElavatorSupport_zpos" /> 
+   <posXYZ  volume="ElevatorTopFrame" X_Y_Z=" ElavatorTopFrame_xpos; ElavatorTopFrame_ypos; ElavatorTopFrame_zpos" /> 
+   <posXYZ  volume="ElevatorTopPlate" X_Y_Z=" ElavatorTopPlate_xpos; ElavatorTopPlate_ypos; ElavatorTopPlate_zpos" /> 
+   <posXYZ  volume="BOEbox5"          X_Y_Z="          BOEbox5_xpos;          BOEbox5_ypos;          BOEbox5_zpos" /> 
+   <posXYZ  volume="BOEbox5"          X_Y_Z="         -BOEbox5_xpos;          BOEbox5_ypos;          BOEbox5_zpos" /> 
+</composition>
+
+<composition name="BOEwall">
+   <posXYZ volume="BOEwallside"    X_Y_Z="  0.;  -12970 ;   6900." rot="0.;180.; 0" />
+   <posXYZ volume="BOEwallside"    X_Y_Z="  0.;  -12970 ;  -7060." rot="0.;  0.; 0" />
+</composition>
+
+<composition name="RUN2_Services">
+  <posXYZ volume="BME_Electronics" X_Y_Z="0.;-7786.6-0.5*229.5;GENV_Eps+7057.8+0.5*BME_ElectronicsBox_Frame_zwid+BME_ElectronicsBox_Frame_distance_from_chamber" />
+  <posXYZ volume="BME_Electronics" X_Y_Z="0.;-7786.6-0.5*229.5;-GENV_Eps-7057.8-0.5*BME_ElectronicsBox_Frame_zwid-BME_ElectronicsBox_Frame_distance_from_chamber" />
+  <posXYZ volume="BOEwall"         X_Y_Z="0.; 0.; 0."  rot="-0.708; 0.; 0"/>
+</composition>
+
+</section>
+
+<section name       = "ATLAS Plancher (in french in the text)"
+         version    = "7.0"
+         date       = "22 November 2008"
+         author     = "Laurent"
+         top_volume = "Plancher">
+
+<!--     name       =  Plancher                      section name       = "Supports"  -->
+<!--     plan:ATF1 UX 150001   -->
+<defaults unit_length="mm"/>
+
+<box name="box1" material="Iron" X_Y_Z="30000; 5002;27000" />
+<box name="box2" material="Iron" X_Y_Z="30000; 1336; 9000" />
+<box name="box3" material="Iron" X_Y_Z=" 5200;10000;27010" /> <!-- use larger length in z than box1 to not run into issues with volume subtraction -->
+
+<subtraction  name="central" >
+  <posXYZ  volume="box1" X_Y_Z="0;   0;0" />
+  <posXYZ  volume="box3" X_Y_Z="0;4541;0" />
+</subtraction>
+
+<composition name="PlancherTilte">
+   <posXYZ volume="central" X_Y_Z="0;  -13871;      0"  /> <!-- the distance between cavern floor and centre of beam axis at IP is 11370mm, cf. atcz____0005-vAC -->
+   <posXYZ volume="box2"    X_Y_Z="0;  -15704;  18005"  />
+   <posXYZ volume="box2"    X_Y_Z="0;  -15704; -18005"  />
+</composition>
+
+<composition name="Plancher">
+   <posXYZ volume="PlancherTilte" X_Y_Z="0;0;0"  rot="-0.708;0;0"/>
+</composition>
+
+</section>
+
+<section name       = "ID-EMC-Tile"
+         version    = "7.0"
+         date       = "21 Juin 2010"
+         author     = "Laurent Chevalier"
+         top_volume = "IDEMTile">
+
+<!--     name       =  Tile Fingers                  section name       = "ID-EM-Tile"-->
+
+<trd name="TileFinger1"   material="Iron1"     Xmp_Ymp_Z="420 ;  420 ; 176  ; 130 ;  300 "  />
+
+<var name="FingerPos"      value="6540" />
+<var name="FingerShift"    value="210" />
+<var  name="JDSH_BDRRouRa_RetrunRing_outerRadius"       value=" 4220." />
+<var name="JDReturnL"                              value="385. " />
+
+<composition name="TileFinger2">
+       <posXYZ volume="TileFinger1" X_Y_Z="JDSH_BDRRouRa_RetrunRing_outerRadius-JDReturnL/2. ; 0 ; 0." rot=" 90.;  90.; 270."  />
+</composition>
+
+<composition name="TileFinger3">
+  <foreach  index="IFing"  begin="1"  loops="8" >
+    <posXYZ volume="TileFinger2" X_Y_Z="0 ; 0 ; 0" rot="0.;0.; IFing*45/8 +2.81"  />
+  </foreach>
+</composition>
+
+<composition name="TileFingersA">
+ <posXYZ volume="TileFinger3" X_Y_Z="0 ; 0 ; 0" rot="0.;0.; 270"  />
+ <posXYZ volume="TileFinger3" X_Y_Z="0 ; 0 ; 0" rot="0.;0.; 315"  />
+ <posXYZ volume="TileFinger3" X_Y_Z="0 ; 0 ; 0" rot="0.;0.;   0"  />
+ <posXYZ volume="TileFinger3" X_Y_Z="0 ; 0 ; 0" rot="0.;0.;  45"  />
+</composition>
+<composition name="TileFingersB">
+ <posXYZ volume="TileFinger3" X_Y_Z="0 ; 0 ; 0" rot="0.;0.;  90"  />
+ <posXYZ volume="TileFinger3" X_Y_Z="0 ; 0 ; 0" rot="0.;0.; 135"  />
+ <posXYZ volume="TileFinger3" X_Y_Z="0 ; 0 ; 0" rot="0.;0.; 180"  />
+ <posXYZ volume="TileFinger3" X_Y_Z="0 ; 0 ; 0" rot="0.;0.; 225"  />
+</composition>
+
+<composition name="TileFingers">
+ <posXYZ volume="TileFingersA" X_Y_Z="0 ; 0 ; FingerPos - FingerShift"   />
+ <posXYZ volume="TileFingersB" X_Y_Z="0 ; 0 ; FingerPos - FingerShift"   />
+ <posXYZ volume="TileFingersA" X_Y_Z="0 ; 0 ;-FingerPos + FingerShift"   />
+ <posXYZ volume="TileFingersB" X_Y_Z="0 ; 0 ;-FingerPos + FingerShift"   />
+</composition>
+
+</section>
+
+<!-- ===========================================NJD=========================================== -->
+
+<section name       = "NJD Disk"
+         version    = "0.0"
+         date       = "16-11-2016"
+         author     = "Georgian Engineering Team - Niko Tsutskiridze"
+         top_volume = "JDSH_Shield_NSW">
+
+<!-- NJD Disk -->
+
+<!-- main disk-->
+<tubs name="MD01"   material="ShieldSteel"  Rio_Z="430.; 4360.; 40."  nbPhi="32." />
+<tubs name="MD02"   material="ShieldSteel"  Rio_Z="430.; 2700.;  48.7"  nbPhi="32." />
+<tubs name="MDB01_Cut"   material="ShieldSteel"  Rio_Z="0.; 840.; 3."  nbPhi="32." />
+
+<gvxy   name="MD03"   material="ShieldSteel"  dZ="40." >
+  <gvxy_point X_Y="-3370.; -3950."/>
+  <gvxy_point X_Y="-3370.; -3880."/>
+  <gvxy_point X_Y="-3679.5; -2484."/>
+  <gvxy_point X_Y="-3990.; -1734.39"/>
+  <gvxy_point X_Y="-2599.16; -3470."/>
+  <gvxy_point X_Y="-2670.; -3570."/>
+  <gvxy_point X_Y="-2670.; -3950."/>
+</gvxy>
+
+<subtraction name="MDB01_Un" >
+ <posXYZ volume="MD01" />
+ <posXYZ volume="MDB01_Cut" X_Y_Z=" 0.; 0.; 19.4 " />
+</subtraction>
+
+<union name="MDB01" >
+ <posXYZ volume="MDB01_Un" />
+ <posXYZ volume="MD03"  />
+ <posXYZ volume="MD03" rot=" 0.; 180.; 0."/>
+</union>
+<!-- End main disk-->
+
+
+<!-- Ret.Flux -->
+<tubs name="FLUX_Box"   material="ShieldSteel"  Rio_Z="3800.; 4360.; 39.9"  nbPhi="32." />
+<box  name="FLUX_Cut_Box" material="ShieldSteel"  X_Y_Z="2200.; 400.;  50." />
+
+<subtraction name="FLUX" >
+ <posXYZ volume="FLUX_Box" />
+ <posXYZ volume="FLUX_Cut_Box" X_Y_Z=" -1930.; 3430.; 0." />
+</subtraction>
+<!-- End Ret.Flux -->
+
+<!-- FIXING PLATE -->
+<box  name="FIXING_PLATE" material="ShieldSteel"  X_Y_Z="350.; 975.;  40.9" />
+<box  name="FIXING_PLATE_Special" material="ShieldSteel"  X_Y_Z="350.; 787.5;  40.9" />
+
+<composition name="FIXING_PLATE_Pos" >
+ <posXYZ volume="FIXING_PLATE" X_Y_Z=" 0.; 3252.5; 0." />
+</composition>
+
+<composition name="FIXING_PLATE_Ass" >
+ <posXYZ volume="FIXING_PLATE_Special" X_Y_Z=" -1208.8; 2918.31; 0." rot=" 0.; 0.; 22.5" />
+ <posXYZ volume="FIXING_PLATE_Pos" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 67.5" />
+ <posXYZ volume="FIXING_PLATE_Pos" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 112.5" />
+ <posXYZ volume="FIXING_PLATE_Pos" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 157.5" />
+ <posXYZ volume="FIXING_PLATE_Pos" X_Y_Z=" 0.; 0.; 0."  rot=" 0.; 0.; 202.5" />
+ <posXYZ volume="FIXING_PLATE_Pos" X_Y_Z=" 0.; 0.; 0."  rot=" 0.; 0.; 247.5" />
+ <posXYZ volume="FIXING_PLATE_Pos" X_Y_Z=" 0.; 0.; 0."  rot=" 0.; 0.; 292.5" />
+ <posXYZ volume="FIXING_PLATE_Pos" X_Y_Z=" 0.; 0.; 0."  rot=" 0.; 0.; 337.5" />
+</composition>
+<!-- End FIXING PLATE -->
+
+<!-- NJD feet-->
+<gvxy   name="JF01"   material="ShieldSteel"  dZ="37.3" >
+  <gvxy_point X_Y="-3300.; -3950."/>
+  <gvxy_point X_Y="-3300.; -3480."/>
+  <gvxy_point X_Y="-3270.; -3450."/>
+  <gvxy_point X_Y="-2730.; -3450."/>
+  <gvxy_point X_Y="-2700.; -3480."/>
+  <gvxy_point X_Y="-2700.; -3950."/>
+</gvxy>
+
+<gvxy   name="JF02"   material="ShieldSteel"  dZ="35." >
+  <gvxy_point X_Y="-342.4; -3950."/>
+  <gvxy_point X_Y="-342.4; -3930."/>
+  <gvxy_point X_Y="-77.4; -3470."/>
+  <gvxy_point X_Y="-57.4; -3470."/>
+  <gvxy_point X_Y="-57.4; -3920."/>
+  <gvxy_point X_Y="-87.4; -3950."/>
+</gvxy>
+
+<gvxy   name="JF03"   material="ShieldSteel"  dZ="48." >
+  <gvxy_point X_Y="-3370.; -362."/>
+  <gvxy_point X_Y="-3370.; 704."/>
+  <gvxy_point X_Y="-3495.; 704."/>
+  <gvxy_point X_Y="-3495.; 933."/>
+  <gvxy_point X_Y="-2660.; 933."/>
+  <gvxy_point X_Y="-2660.; 653."/>
+  <gvxy_point X_Y="-2700.; 653."/>
+  <gvxy_point X_Y="-2700.; 523."/>
+  <gvxy_point X_Y="-2590.; 523."/>
+  <gvxy_point X_Y="-2590.; -52."/>
+  <gvxy_point X_Y="-2685.; -52."/>
+  <gvxy_point X_Y="-2685.; -362."/>
+</gvxy>
+
+<gvxy   name="JF04"   material="ShieldSteel"  dZ="41.6" >
+  <gvxy_point X_Y="-453.5; -4251.1"/>
+  <gvxy_point X_Y="-453.5; -4158.1"/>
+  <gvxy_point X_Y="-603.; -4083.1"/>
+  <gvxy_point X_Y="-603.; -4038.1"/>
+  <gvxy_point X_Y="-362.; -4038.1"/>
+  <gvxy_point X_Y="-362.; -3998.1"/>
+  <gvxy_point X_Y="883.; -3998.1"/>
+  <gvxy_point X_Y="883.; -4251.1"/>
+</gvxy>
+
+<gvxy   name="JF05"   material="ShieldSteel"  dZ="356.1" >
+  <gvxy_point X_Y="-603.; -4048.1"/>
+  <gvxy_point X_Y="-603.; -4038.1"/>
+  <gvxy_point X_Y="-362.; -4038.1"/>
+  <gvxy_point X_Y="-362.; -3998.1"/>
+  <gvxy_point X_Y="-253.; -3998.1"/>
+  <gvxy_point X_Y="-253.; -4048.1"/>
+</gvxy>
+
+<box  name="JF06" material="ShieldSteel"  X_Y_Z="536.; 253.; 71.4" />
+
+<!-- Right-->
+<composition name="Right_Feet" >
+ <posXYZ volume="JF01" X_Y_Z=" 0.; 0.; 38.7" rot=" 0.; 0.; 0." />
+ <posXYZ volume="JF02" X_Y_Z=" -2802.5; 0.; 0." rot=" 0.; 90.; 0." />
+ <posXYZ volume="JF02" X_Y_Z=" -3197.5; 0.; 0." rot=" 0.; 90.; 0." />
+ <posXYZ volume="JF03" X_Y_Z=" 0.; -3974.05; 0." rot=" -90.; 0.; 0." />
+ <posXYZ volume="JF04" X_Y_Z=" -2805.2; 0.; 0." rot=" 0.; 90.; 0." />
+ <posXYZ volume="JF04" X_Y_Z=" -3203.; 0.; 0." rot=" 0.; 90.; 0." />
+ <posXYZ volume="JF05" X_Y_Z=" -3004.1; 0.; 0." rot=" 0.; 90.; 0." />
+ <posXYZ volume="JF06" X_Y_Z=" -3000.; -4124.6; -918.75" rot=" 0.; 0.; 0." />
+</composition>
+<!-- End Right-->
+
+<!-- Left-->
+<composition name="Left_Feet" >
+ <posXYZ volume="JF01" X_Y_Z=" 0.; 0.; 38.7" rot=" 0.; 180.; 0." />
+ <posXYZ volume="JF02" X_Y_Z=" 2802.5; 0.; 0." rot=" 0.; 90.; 0." />
+ <posXYZ volume="JF02" X_Y_Z=" 3197.5; 0.; 0." rot=" 0.; 90.; 0." />
+ <posXYZ volume="JF03" X_Y_Z=" 0.; -3974.05; 0." rot=" -90.; 0.; 180." />
+ <posXYZ volume="JF04" X_Y_Z=" 2805.2; 0.; 0." rot=" 0.; 90.; 0." />
+ <posXYZ volume="JF04" X_Y_Z=" 3203.; 0.; 0." rot=" 0.; 90.; 0." />
+ <posXYZ volume="JF05" X_Y_Z=" 3004.1; 0.; 0." rot=" 0.; 90.; 0." />
+ <posXYZ volume="JF06" X_Y_Z=" 3000.; -4124.6; -918.75" rot=" 0.; 0.; 0." />
+</composition>
+<!-- End Right-->
+<!-- End NJD feet-->
+
+<composition name="JDDisk_ASide" >
+ <posXYZ volume="MDB01"  X_Y_Z=" 0.; 0.; 6880." rot=" 0.; 0.; 0." />
+ <posXYZ volume="MD02" X_Y_Z=" 0.; 0.; 6835.6" rot=" 0.; 0.;0."/>
+ <posXYZ volume="FLUX" X_Y_Z=" 0.; 0.; 6840." rot=" 0.; 0.; 0." />
+ <posXYZ volume="FIXING_PLATE_Ass" X_Y_Z=" 0.; 0.; 6839.5" rot=" 0.; 0.; 0." />
+ <posXYZ volume="Right_Feet"  X_Y_Z=" 0.; 0.; 6880." rot=" 0.; 180.; 0." />
+ <posXYZ volume="Left_Feet"  X_Y_Z=" 0.; 0.; 6880." rot=" 0.; 180.; 0." />
+</composition>
+
+<composition name="JDDisk_CSide" >
+ <posXYZ volume="MDB01"  X_Y_Z=" 0.; 0.; -6880." rot=" 0.; 180.; 0." />
+ <posXYZ volume="MD02" X_Y_Z=" 0.; 0.; -6835.6" rot=" 0.; 0.;0."/>
+ <posXYZ volume="FLUX" X_Y_Z=" 0.; 0.; -6840." rot=" 0.; 0.; 0." />
+ <posXYZ volume="FIXING_PLATE_Ass" X_Y_Z=" 0.; 0.; -6839.5" rot=" 0.; 0.; 0." />
+ <posXYZ volume="Right_Feet"  X_Y_Z=" 0.; 0.; -6880." rot=" 0.; 0.; 0." />
+ <posXYZ volume="Left_Feet"  X_Y_Z=" 0.; 0.; -6880." rot=" 0.; 0.; 0." />
+</composition>
+<!-- End NJD Disk -->
+
+<!-- Vertical Shielding HO -->
+<tubs name="Vertical_Shielding_HO_Poly" material="PolyBoronB2O3"  Rio_Z=" 840. ; 1655. ; 40."  nbPhi="32." /> <!-- HD PE Borotron 5% HD050 - Density: 1010kg/m3 -->
+<tubs name="Lateral_plate_TubeCut_Lead" material="Lead"  Rio_Z=" 870. ; 1655. ; 10."  nbPhi="32." />
+
+<composition  name="Vertical_Shielding_HO_Assembly" > 
+   <posXYZ volume="Vertical_Shielding_HO_Poly" X_Y_Z=" 0. ; 0.; 6920." rot="0. ; 0. ; 0."  />
+   <posXYZ volume="Lateral_plate_TubeCut_Lead" X_Y_Z=" 0. ; 0.; 6945.01" rot="0. ; 0. ; 0."  />
+</composition>
+<!-- End Vertical Shielding HO -->
+
+<!-- NJD Vert Shield -->
+    <!-- Inner -->
+<tubs name="Inner_SST" material="ShieldSteel"  Rio_Z="1025. ; 1105. ; 70."  nbPhi="32." />
+    <!-- End Inner -->
+
+    <!-- Middle -->
+<tubs name="Middle_Iron" material="Iron"  Rio_Z="1135. ; 1359.9 ; 70."  nbPhi="32." />
+<tubs name="Middle_Borotron" material="PolyBoronB2O3"  Rio_Z=" 1360. ; 1589.9 ; 70."  nbPhi="32." /> <!-- HD PE Borotron 5% HD050 - Density: 1010kg/m3 -->
+<tubs name="Middle_Lead" material="Lead"  Rio_Z="1590. ; 1610. ; 70."  nbPhi="32." />
+
+<composition  name="Middle_VS" > 
+   <posXYZ volume="Middle_Iron" X_Y_Z=" 0. ; 0.; 6775." rot="0. ; 0. ; 0."  />
+   <posXYZ volume="Middle_Borotron" X_Y_Z=" 0. ; 0.; 6775." rot="0. ; 0. ; 0."  />
+   <posXYZ volume="Middle_Lead" X_Y_Z=" 0. ; 0.; 6775." rot="0. ; 0. ; 0."  />
+</composition>
+    <!-- End Middle -->
+
+    <!-- Outer -->
+<tubs name="Outer_Borotron" material="PolyBoronB2O3"  Rio_Z="1643. ; 1762.9 ; 50."  nbPhi="32." /> <!-- HD PE Borotron 5% HD050 - Density: 1010kg/m3 -->
+<tubs name="Outer_Lead" material="Lead"  Rio_Z="1763. ; 1772.9 ; 50."  nbPhi="32." /> 
+<tubs name="Outer_SSteel" material="ShieldSteel"  Rio_Z="1773. ; 1777. ; 50."  nbPhi="32." /> 
+
+<composition  name="Outer_VS" > 
+   <posXYZ volume="Outer_Borotron" X_Y_Z=" 0. ; 0.; 6760." rot="0. ; 0. ; 0."  />   
+   <posXYZ volume="Outer_Lead" X_Y_Z=" 0. ; 0.; 6760." rot="0. ; 0. ; 0."  />  
+   <posXYZ volume="Outer_SSteel" X_Y_Z=" 0. ; 0.; 6760." rot="0. ; 0. ; 0."  />     
+</composition>
+    <!-- End Outer -->
+
+<composition  name="NJD_Vert_Shield_assembly" > 
+   <posXYZ volume="Inner_SST" X_Y_Z=" 0. ; 0.; 6770." rot="0. ; 0. ; 0."  />
+   <posXYZ volume="Middle_VS" />
+   <posXYZ volume="Outer_VS" />   
+</composition>
+    <!-- NJD Vert Shield -->
+
+<!-- ================================================ NSW movement ========================================= -->  
+<!-- NSW movement -->
+<tubs name="JD_PAD"  material="Iron"  Rio_Z="0.; 352.75; 105."  nbPhi="36" />
+<tubs name="JD_TOP_Pad"  material="Iron"  Rio_Z="0.; 155.8; 226.4"  nbPhi="36" />
+<tubs name="BJ_asse"  material="Iron"  Rio_Z="0.; 73.; 380."  nbPhi="36" />
+<box  name="XbracketN"  material="Iron"  X_Y_Z="95.88; 230.; 218." />
+<tubs name="VerinN"  material="Iron"  Rio_Z="22.5; 55.65; 1477."  nbPhi="36" />
+
+<box  name="JD_TOP_Pad2"  material="Iron"  X_Y_Z="180.; 425.; 226." />
+
+
+
+<box  name="Bracket_FC"  material="Iron"  X_Y_Z="613.; 56.; 56." />
+
+<box  name="NSW_Extension_Main"  material="Iron"  X_Y_Z="478.8; 252.2; 340." />
+
+<box  name="NSW_Extension_CutBox"  material="Iron"  X_Y_Z="218.; 270.2; 480." />
+
+<subtraction name="NSW_Extension">
+    <posXYZ volume="NSW_Extension_Main" rot="0. ; 90. ; 0." />
+    <posXYZ volume="NSW_Extension_CutBox" X_Y_Z="0.; -58.2; 0." />
+</subtraction>
+
+<composition  name="NSW_MovementL" > 
+   <posXYZ volume="JD_PAD" X_Y_Z=" 0.; 496.94; 0. " rot="0. ; 0. ; 0." />
+   <posXYZ volume="JD_TOP_Pad2" X_Y_Z=" 0.; 635.14; 166.42 " rot="0. ; 0. ; 0." />
+   <posXYZ volume="JD_PAD" X_Y_Z=" 0.; 1701.; 0. " rot="0. ; 0. ; 0." />
+   <posXYZ volume="JD_TOP_Pad" X_Y_Z=" 0.; 1701.; 166.01 " rot="0. ; 0. ; 0." />
+   <posXYZ volume="BJ_asse" X_Y_Z=" 0.; 950.58; 130. " rot="0. ; 0. ; 0." />
+   <posXYZ volume="BJ_asse" X_Y_Z=" 0.; 1273.; 130. " rot="0. ; 0. ; 0." />
+   <posXYZ volume="XbracketN" X_Y_Z=" -272.7; 604.; 170. " rot="0. ; 0. ; 0." />
+   <posXYZ volume="XbracketN" X_Y_Z=" -272.7; 1611.5; 170. " rot="0. ; 0. ; 0." />
+   <posXYZ volume="VerinN" X_Y_Z=" -388.; 1002.5; 212. " rot="90. ; 0. ; 0." />
+   <posXYZ volume="Bracket_FC" X_Y_Z=" 524.51; 254.66; 339.5 " rot="0. ; 0. ; 0." />
+   <posXYZ volume="NSW_Extension" X_Y_Z=" 0.; 635.14; 202.62 " rot="90. ; 0. ; 180." />
+</composition>
+
+<composition  name="NSW_MovementR" > 
+   <posXYZ volume="JD_PAD" X_Y_Z=" 0.; 496.94; 0. " rot="0. ; 0. ; 0." />
+   <posXYZ volume="JD_TOP_Pad2" X_Y_Z=" 0.; 635.14; 166.42 " rot="0. ; 0. ; 0." />
+   <posXYZ volume="JD_PAD" X_Y_Z=" 0.; 1701.; 0. " rot="0. ; 0. ; 0." />
+   <posXYZ volume="JD_TOP_Pad" X_Y_Z=" 0.; 1701.; 166.01 " rot="0. ; 0. ; 0." />
+   <posXYZ volume="BJ_asse" X_Y_Z=" 0.; 950.58; 130. " rot="0. ; 0. ; 0." />
+   <posXYZ volume="BJ_asse" X_Y_Z=" 0.; 1273.; 130. " rot="0. ; 0. ; 0." />
+   <posXYZ volume="XbracketN" X_Y_Z=" 272.7; 604.; 170. " rot="0. ; 0. ; 0." />
+   <posXYZ volume="XbracketN" X_Y_Z=" 272.7; 1611.5; 170. " rot="0. ; 0. ; 0." />
+   <posXYZ volume="VerinN" X_Y_Z=" 388.; 1002.5; 212. " rot="90. ; 0. ; 0." />
+   <posXYZ volume="Bracket_FC" X_Y_Z=" -524.51; 254.66; 339.5 " rot="0. ; 0. ; 0." />
+   <posXYZ volume="NSW_Extension" X_Y_Z=" 0.; 635.14; 202.62 " rot="90. ; 0. ; 180." />
+</composition>
+
+<composition  name="NSW_Movement" > 
+   <posXYZ volume="NSW_MovementL" X_Y_Z=" -3000.; -4329.5; 8153. " rot="-90. ; 0. ; 0." />
+   <posXYZ volume="NSW_MovementR" X_Y_Z=" 3000.; -4329.5; 8153. " rot="-90. ; 0. ; 0." />
+</composition>
+<!-- end NSW movement -->
+
+<composition  name="JDSH_Shield_NSW" >
+ <posXYZ volume="JDDisk_ASide"  X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 0." />
+ <posXYZ volume="JDDisk_CSide"  X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 0." />
+ <!-- Aside -->
+ <posXYZ volume="Vertical_Shielding_HO_Assembly" />
+ <posXYZ volume="NJD_Vert_Shield_assembly" />
+ <posXYZ volume="NSW_Movement" X_Y_Z=" 0.; 0.; 0. " rot="0. ; 0. ; 0."/>
+ <!-- Cside -->
+ <posXYZ volume="Vertical_Shielding_HO_Assembly" rot="0. ; 180. ; 0." />
+ <posXYZ volume="NJD_Vert_Shield_assembly" rot="0. ; 180. ; 0." />
+ <posXYZ volume="NSW_Movement" X_Y_Z=" 0.; 0.; 0. " rot="0. ; 180. ; 0."/>
+</composition>
+
+</section>
+
+<!-- ===========================================Full ATLAS=========================================== -->
+
+<section name       = "ATLAS"
+         version    = "7.0"
+         date       = "22 November 2008"
+         author     = "Laurent"
+         top_volume = "All">
+
+<composition name="Magnets">
+   <posXYZ volume="ECT_Toroids"        X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="BAR_Toroid"         X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="Solenoid"           X_Y_Z="0.;0.;0."/>
+</composition>
+
+<composition name="Service">
+   <posXYZ volume="servicesAtZ0"           X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="pp2"                    X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="MBAP_AccessPlatform"    X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="RUN2_Services"          X_Y_Z="0.;0.;0."/>
+</composition>
+
+<composition name="Shield">
+   <posXYZ volume="JTSH_Shield"         X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="JDSH_Shield_NSW"     X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="JFSH_Shield"         X_Y_Z="0.;0.;0."/>
+</composition>
+
+<composition name="Supports">
+   <posXYZ volume="Feet"                      X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="RailAssembly"              X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="HFTruckRail"               X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="SADL_CalorimeterSaddle"    X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="MBWH_BigWheels"            X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="TBWH_BigWheels"            X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="TGC1_BigWheels"            X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="TGC3_BigWheels"            X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="MDTRail"                   X_Y_Z="0.;0.;0."/>
+   <posXYZ volume="Plancher"                  X_Y_Z="0.;0.;0."/>
+</composition>
+
+<composition name="IdEmTile">
+   <posXYZ  volume="TileFingers"  X_Y_Z="0.;0.;0." />
+</composition>
+
+</section>
+
+</AGDD>
diff --git a/MuonSpectrometer/MuonG4/NSW_Sim/data/stations.v2.08.xml b/MuonSpectrometer/MuonG4/NSW_Sim/data/stations.v2.08.xml
new file mode 100644
index 000000000000..32a5a4b96bf3
--- /dev/null
+++ b/MuonSpectrometer/MuonG4/NSW_Sim/data/stations.v2.08.xml
@@ -0,0 +1,1808 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<AGDD>
+
+<section name="NSW_Parameters" version="1" top_volume="useless" date="December 16 2014" author="S.Chen" >
+<!-- Global variables-->
+<var name="NSW_NbrOfLayers" value="4"/>
+<var name="NSW_NbrOfDriftPcb" value="3"/>
+<var name="NSW_NbrOfROPcb" value="2"/>
+<!--Center between the large sectors and the small sectors-->
+<var name="ZCenter_Global" value="7409"/>
+</section>
+
+<section name="NSW_sTGC_Parameters" version="13.7" top_volume="useless" date=" June 30, 2016 " author="Daniel Lellouch">
+<!-- ================ Global Variables ================= -->
+
+<!-- Thickness of a quadruplet -->
+<var name="NSW_sTGC_Tck" value="49.34"/>
+<!-- Gas Gap inside one layer -->
+<var name="NSW_sTGC_GasTck" value="2.85"/>
+<!-- G10 thickness per layer -->
+<var name="NSW_sTGC_pcbTck" value="3"/>
+<!-- Number of layers in a quaduplet -->
+<var name="NSW_sTGC_NbrOfLayers" value="4"/>
+<!-- Wire pitch -->
+<var name="NSW_sTGC_WirePitch" value="1.8"/>
+<!-- Strip pitch -->
+<var name="NSW_sTGC_StripPitch" value="3.2"/>
+<!-- Strip width -->
+<var name="NSW_sTGC_StripWidth" value="2.7"/>
+<!-- Width of G10 frame besides gas volume -->
+<var name="NSW_sTGC_SideFrame" value="28.5"/>
+<!-- Width of G10 frame in base w/o capacitor -->
+<var name="NSW_sTGC_hFrameNoCapacitor" value="11"/>
+<!-- Width of G10 frame in base with capacitor -->
+<var name="NSW_sTGC_hFrameCapacitor" value="14"/>
+<!-- Opening (in degrees) of trapezes in small wedges -->
+<var name="NSW_sTGC_SmallOpening" value="17"/>
+<!-- Opening (in degrees) of trapezes in large wedges -->
+<var name="NSW_sTGC_LargeOpening" value="28"/>
+<!-- Z center of small Pivot -->
+<var name="NSW_sTGC_ZSmallPivot" value="ZCenter_Global-65"/>
+<!-- Z center of small Confirm -->
+<var name="NSW_sTGC_ZSmallConfirm" value="ZCenter_Global-399"/>
+<!-- Z center of Large Pivot -->
+<var name="NSW_sTGC_ZLargePivot" value="ZCenter_Global+65"/>
+<!-- Z center of Large Confirm -->
+<var name="NSW_sTGC_ZLargeConfirm" value="ZCenter_Global+399"/>
+<!-- Z of each volume, relative to center of quadruplet -->
+<array name="NSW_sTGC_LayerDeltaZ" values="-16.45;-5.48;5.49;16.46"/>
+<!-- Side of the Pad readout -->
+<array name="NSW_sTGC_PadSide" values="-1;1;-1;1"/>
+<!-- Side of the Strip readout -->
+<array name="NSW_sTGC_StripSide" values="1;-1;1;-1"/>
+</section>
+
+<!-- ================ sTGC ========================= -->
+
+
+<section name="NewSmallWheels_sTGC" version="22.1" top_volume="NSW_sTGC" date=" June 22, 2018 " author="Daniel Lellouch">
+
+<composition name="NSW_sTGC">
+
+<sTGC_Tech type="sTGC_1" geometryLevel="1" nLayers="NSW_sTGC_NbrOfLayers" gasTck="NSW_sTGC_GasTck" pcbTck="NSW_sTGC_pcbTck" Tck="NSW_sTGC_Tck" f4="NSW_sTGC_hFrameNoCapacitor" f5="NSW_sTGC_hFrameNoCapacitor" f6="NSW_sTGC_SideFrame"/>
+
+<!-- ================ small Pivot ========================= -->
+
+<sTGC type="sTG1-QS1P" tech="sTGC_1" subType="QS1P" sWidth="346.93" lWidth="743.15" Length="1325.6" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0">
+
+<sTGC_readout sPadWidth="279.32" lPadWidth="667.18" padH="80;80;80.24;80.24" rankPadPhi="4;3;2;1" nPadPhi="4;4;3;3" anglePadPhi="5" firstPadPhiDivision_C="-5;-5;-2.5;-2.5" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="-5;-5;-2.5;-2.5" PadPhiShift_A="-2;2;-2;2" rankPadH="1;2;3;4" nPadH="17;17;17;17" firstPadH="65.8;65.8;28.61;28.61" firstPadRow="1;1;1;1" sStripWidth="293.48" lStripWidth="681.33" wireCutout="802.8;829.8;856.8;883.8" nWires="371;370;370;370" firstWire="-333;-331.65;-332.55;-332.1" wireGroupWidth="20" nStrips="406" firstTriggerBand="6;6;6;6" nTriggerBands="28;28;28;28" firstStripInTrigger="73;73;73;73" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="13;12;13;12;13;12;13;12;13;12;13;12; 13;12;13;12;13;12;13;12;12;13;12;13;12;13; 12;13;12;13;12;10;9" StripsInBandsLayer2="13;12;13;12;13;12;13;12;13;12;13;12; 13;12;13;12;13;12;13;12;12;13;12;13;12;13; 12;13;12;13;12;10;9" StripsInBandsLayer3="14;14;13;12;13;12;13;12;13;12;13;12; 13;12;13;12;13;12;13;12;12;13;12;13;12;13; 12;13;12;13;12;10;6" StripsInBandsLayer4="14;14;13;12;13;12;13;12;13;12;13;12; 13;12;13;12;13;12;13;12;12;13;12;13;12;13; 12;13;12;13;12;10;6" nWireGroups="19;20;19;19" firstWireGroup="20;5;10;15"/>
+</sTGC>
+
+<chamberPosition volume="sTG1-QS1P" type="ENDCAP" chamberType="sTGS" radius="1563" zPos="NSW_sTGC_ZSmallPivot" phi0="22.5"/>
+
+<sTGC type="sTG1-QS2P" tech="sTGC_1" subType="QS2P" sWidth="746.14" lWidth="1102.25" Length="1191.4" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0">
+
+<sTGC_readout sPadWidth="677.64" lPadWidth="1026.28" padH="80;80;80.24;80.24" rankPadPhi="2;1;4;3" nPadPhi="2;2;3;3" anglePadPhi="7.5" firstPadPhiDivision_C="0;0;-3.75;-3.75" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="0;0;-3.75;-3.75" PadPhiShift_A="-2;2;-2;2" rankPadH="1;2;3;4" nPadH="15;15;15;15" firstPadH="93.2;93.2;60.09;60.09" firstPadRow="18;18;18;18" sStripWidth="691.8" lStripWidth="1040.43" wireCutout="0;0;0;0" nWires="569;570;570;570" firstWire="-511.2;-511.65;-512.55;-512.1" wireGroupWidth="20" nStrips="365" firstTriggerBand="34;34;34;34" nTriggerBands="29;29;29;29" firstStripInTrigger="1;1;1;1" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="14;14;14;13;12;12;13;12;13;12; 12;13;12;13;12;13;12;13;13;12; 13;12;13;12;13;12;13;12;11" StripsInBandsLayer2="14;14;14;13;12;12;13;12;13;12; 12;13;12;13;12;13;12;13;13;12; 13;12;13;12;13;12;13;12;11" StripsInBandsLayer3="14;14;14;13;12;12;13;12;13;12; 12;13;12;13;12;13;12;13;13;12; 13;12;13;12;13;12;13;12;10" StripsInBandsLayer4="14;14;14;13;12;12;13;12;13;12; 13;13;13;12;13;12;13;12;13;12; 13;12;13;12;13;12;13;12;10" nWireGroups="29;30;29;29" firstWireGroup="20;5;10;15"/>
+</sTGC>
+
+<chamberPosition volume="sTG1-QS2P" type="ENDCAP" chamberType="sTGS" radius="2831.5" zPos="NSW_sTGC_ZSmallPivot" phi0="22.5"/>
+
+<sTGC type="sTG1-QS3P" tech="sTGC_1" subType="QS3P" sWidth="1105.96" lWidth="1406.59" Length="1005.8" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0">
+
+<sTGC_readout sPadWidth="1037.46" lPadWidth="1330.62" padH="80;80;80.24;80.24" rankPadPhi="2;1;4;3" nPadPhi="2;2;3;3" anglePadPhi="7.5" firstPadPhiDivision_C="0;0;-3.75;-3.75" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="0;0;-3.75;-3.75" PadPhiShift_A="-2;2;-2;2" rankPadH="1;2;3;4" nPadH="12;12;13;13" firstPadH="89.4;89.4;59.88;59.88" firstPadRow="33;33;33;33" sStripWidth="1051.61" lStripWidth="1344.78" wireCutout="0;0;0;0" nWires="739;739;739;738" firstWire="-664.2;-664.65;-663.75;-663.3" wireGroupWidth="20" nStrips="307" firstTriggerBand="64;64;64;64" nTriggerBands="25;25;25;25" firstStripInTrigger="1;1;1;1" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="3;13;13;10;13;13;13;13;13;13;13; 13;12;12;13;12;13;12;13;12;12; 13;13;13;14" StripsInBandsLayer2="3;13;13;10;13;13;13;13;13;13;13; 13;12;12;13;12;13;12;13;12;12; 13;13;13;14" StripsInBandsLayer3="6;13;12;11;14;12;13;12;13;13;13; 13;13;12;13;12;13;12;13;12;13; 13;12;13;11" StripsInBandsLayer4="6;13;12;11;14;12;13;12;13;13;13; 13;13;12;13;12;13;12;13;12;13; 13;12;13;11" nWireGroups="37;38;38;38" firstWireGroup="20;14;10;3"/>
+</sTGC>
+
+<chamberPosition volume="sTG1-QS3P" type="ENDCAP" chamberType="sTGS" radius="3942.5" zPos="NSW_sTGC_ZSmallPivot" phi0="22.5"/>
+
+
+<!-- ================ small confirm =============== -->
+
+<sTGC type="sTG1-QS1C" tech="sTGC_1" subType="QS1C" sWidth="346.93" lWidth="743.15" Length="1325.6" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0">
+
+<sTGC_readout sPadWidth="293.48" lPadWidth="681.33" padH="76.35;76.35;76.59;76.59" rankPadPhi="1;4;2;3" nPadPhi="4;4;4;4" anglePadPhi="5" firstPadPhiDivision_C="-3.75;-6.25;-3.75;-6.25" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-6.25;-3.75;-6.25;-3.75" PadPhiShift_A="2;-2;2;-2" rankPadH="1;2;3;4" nPadH="17;17;18;18" firstPadH="78.4;78.4;43.21;43.21" firstPadRow="2;2;2;2" sStripWidth="293.48" lStripWidth="681.33" wireCutout="883.8;856.8;829.8;802.8" nWires="370;370;370;371" firstWire="-332.1;-332.55;-331.65;-333" wireGroupWidth="20" nStrips="406" firstTriggerBand="7;7;8;8" nTriggerBands="29;29;29;29" firstStripInTrigger="73;73;73;73" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="13;12;12;12;12;12;12;12;12;12;11;12;12;12;12;12;12;12;12;12;12;12;12; 12;11;12;12;12;12;12;12;14;10;11" StripsInBandsLayer2="13;12;12;12;12;12;12;12;12;12;11;12;12;12;12;12;12;12;12;12;12;12;12; 12;11;12;12;12;12;12;12;14;10;11" StripsInBandsLayer3="8;12;12;12;12;12;12;12;12;12;12;12; 12;12;12;12;12;11;12;12;12;12; 12;12;12;12;12;12;12;12;12;13;14" StripsInBandsLayer4="8;12;12;12;12;12;12;12;12;12;12;12; 12;12;12;12;12;11;12;12;12;12; 12;12;12;12;12;12;12;12;12;13;14" nWireGroups="19;19;20;19" firstWireGroup="15;10;5;20"/>
+</sTGC>
+
+<chamberPosition volume="sTG1-QS1C" type="ENDCAP" chamberType="sTGS" radius="1563" zPos="NSW_sTGC_ZSmallConfirm" phi0="22.5"/>
+
+<sTGC type="sTG1-QS2C" tech="sTGC_1" subType="QS2C" sWidth="746.14" lWidth="1102.25" Length="1191.4" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0">
+
+<sTGC_readout sPadWidth="691.8" lPadWidth="1040.43" padH="76.35;76.35;76.59;76.59" rankPadPhi="3;2;4;1" nPadPhi="3;3;3;3" anglePadPhi="7.5" firstPadPhiDivision_C="-5.62;-1.87;-5.62;-1.87" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-1.87;-5.62;-1.87;-5.62" PadPhiShift_A="2;-2;2;-2" rankPadH="1;2;3;4" nPadH="16;16;15;15" firstPadH="43.8;43.8;89.29;89.29" firstPadRow="19;19;20;20" sStripWidth="691.8" lStripWidth="1040.43" wireCutout="0;0;0;0" nWires="570;570;570;569" firstWire="-512.1;-512.55;-511.65;-511.2" wireGroupWidth="20" nStrips="365" firstTriggerBand="36;36;36;36" nTriggerBands="31;31;31;31" firstStripInTrigger="1;1;1;1" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="7;12;12;12;11;12;12;12;12;12;12;12; 12;12;11;12;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12" StripsInBandsLayer2="7;12;12;12;11;12;12;12;12;12;12;12; 12;12;11;12;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12" StripsInBandsLayer3="9;12;12;12;12;12;12;12;12;12;12;11; 12;12;11;12;12;12;12;12;12;12; 12;12;12;12;12;12;11;11;11" StripsInBandsLayer4="9;12;12;12;12;12;12;12;12;12;12;11; 12;12;12;12;12;12;12;12;12;12; 12;12;12;12;12;12;11;11;11" nWireGroups="29;29;30;29" firstWireGroup="15;10;5;20"/>
+</sTGC>
+
+<chamberPosition volume="sTG1-QS2C" type="ENDCAP" chamberType="sTGS" radius="2831.5" zPos="NSW_sTGC_ZSmallConfirm" phi0="22.5"/>
+
+<sTGC type="sTG1-QS3C" tech="sTGC_1" subType="QS3C" sWidth="1105.96" lWidth="1406.59" Length="1005.8" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0">
+
+<sTGC_readout sPadWidth="1051.61" lPadWidth="1344.78" padH="76.35;76.35;76.59;76.59" rankPadPhi="3;2;4;1" nPadPhi="3;3;3;3" anglePadPhi="7.5" firstPadPhiDivision_C="-5.62;-1.87;-5.62;-1.87" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-1.87;-5.62;-1.87;-5.62" PadPhiShift_A="2;-2;2;-2" rankPadH="1;2;3;4" nPadH="13;13;14;14" firstPadH="61.66;61.66;34.38;34.38" firstPadRow="35;35;35;35" sStripWidth="1051.61" lStripWidth="1344.78" wireCutout="0;0;0;0" nWires="738;739;739;739" firstWire="-663.3;-663.75;-664.65;-664.2" wireGroupWidth="20" nStrips="307" firstTriggerBand="67;67;67;67" nTriggerBands="21;21;21;21" firstStripInTrigger="1;1;1;1" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="3;12;12;12;12;12;12;12;12;12;12; 12;12;11;12;12;12;12;12;11;12;13;13;13;13;14" StripsInBandsLayer2="3;12;12;12;12;12;12;12;12;12;12; 12;12;11;12;12;12;12;12;11;12;13;13;13;13;14" StripsInBandsLayer3="5;13;12;12;12;12;12;12;12;12;12; 11;12;12;12;12;12;12;12;12;12;12;12;12;12;14" StripsInBandsLayer4="5;13;12;12;12;12;12;12;12;12;12; 11;12;12;12;12;12;12;12;12;12;12;12;12;12;14" nWireGroups="38;38;38;37" firstWireGroup="3;10;14;20"/>
+</sTGC>
+
+<chamberPosition volume="sTG1-QS3C" type="ENDCAP" chamberType="sTGS" radius="3942.5" zPos="NSW_sTGC_ZSmallConfirm" phi0="22.5"/>
+
+
+<!-- ================ Large Pivot ==================== -->
+
+<sTGC type="sTG1-QL1P" tech="sTGC_1" subType="QL1P" sWidth="542.61" lWidth="1206.82" Length="1332" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0">
+
+<sTGC_readout sPadWidth="476.42" lPadWidth="1126.66" padH="81.42;81.42;81.66;81.66" rankPadPhi="4;3;2;1" nPadPhi="6;6;7;7" anglePadPhi="5" firstPadPhiDivision_C="-10;-10;-12.5;-12.5" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="-10;-10;-12.5;-12.5" PadPhiShift_A="-2;2;-2;2" rankPadH="1;2;3;4" nPadH="17;17;16;16" firstPadH="54.39;54.39;98.15;98.15" firstPadRow="1;1;2;2" sStripWidth="490.84" lStripWidth="1141.09" wireCutout="808;835;862;889" nWires="621;620;620;620" firstWire="-558;-556.65;-557.55;-557.1" wireGroupWidth="20" nStrips="408" firstTriggerBand="7;7;7;7" nTriggerBands="28;28;28;28" firstStripInTrigger="73;73;73;73" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="11;12;13;13;13;12;13;13;12;13;13;12;13;13;13;12;13;13;12;13;13;12;13; 13;13;12;13;13;12;9;13;12;8" StripsInBandsLayer2="11;12;13;13;13;12;13;13;12;13;13;12;13;13;13;12;13;13;12;13;13;12;13; 13;13;12;13;13;12;9;13;12;8" StripsInBandsLayer3="12;12;13;13;13;12;13;13;13;12;13;13;13;12;13;13;12;13;13;13;12;13;13; 13;12;13;13;13;12;9;13;12;6" StripsInBandsLayer4="12;12;13;13;13;12;13;13;13;12;13;13;13;12;13;13;12;13;13;13;12;13;13; 13;12;13;13;13;12;9;13;12;6" nWireGroups="32;32;32;32" firstWireGroup="20;5;10;15"/>
+</sTGC>
+
+<chamberPosition volume="sTG1-QL1P" type="ENDCAP" chamberType="sTGL" radius="1595" zPos="NSW_sTGC_ZLargePivot" phi0="0.0"/>
+
+<sTGC type="sTG1-QL2P" tech="sTGC_1" subType="QL2P" sWidth="1211.81" lWidth="1807.5" Length="1194.6" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0">
+
+<sTGC_readout sPadWidth="1144.12" lPadWidth="1727.34" padH="81.42;81.42;81.66;81.66" rankPadPhi="2;1;4;3" nPadPhi="4;4;5;5" anglePadPhi="7.5" firstPadPhiDivision_C="-7.5;-7.5;-11.25;-11.25" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="-7.5;-7.5;-11.25;-11.25" PadPhiShift_A="-2;2;-2;2" rankPadH="1;2;3;4" nPadH="14;14;15;15" firstPadH="99.51;99.51;65.69;65.69" firstPadRow="18;18;18;18" sStripWidth="1158.55" lStripWidth="1741.77" wireCutout="0;0;0;0" nWires="953;954;954;954" firstWire="-856.8;-857.25;-858.15;-857.7" wireGroupWidth="20" nStrips="366" firstTriggerBand="35;35;35;35" nTriggerBands="29;29;29;29" firstStripInTrigger="1;1;1;1" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="11;13;13;13;12;13;13;12;13;13; 13;12;13;13;12;13;13;12;13;13;13; 12;13;13;11;13;13;13;12" StripsInBandsLayer2="11;13;13;13;12;13;13;12;13;13; 13;12;13;13;12;13;13;12;13;13;13; 12;13;13;11;13;13;13;12" StripsInBandsLayer3="14;12;13;13;13;12;13;13;13;12; 13;13;13;12;13;13;12;13;13;13;12; 13;13;13;11;13;13;13;9" StripsInBandsLayer4="14;12;13;13;13;12;13;13;13;12; 13;13;13;12;13;13;12;13;13;13;12; 13;13;13;11;13;13;13;9" nWireGroups="48;49;49;48" firstWireGroup="20;5;10;15"/>
+</sTGC>
+
+<chamberPosition volume="sTG1-QL2P" type="ENDCAP" chamberType="sTGL" radius="2868.3" zPos="NSW_sTGC_ZLargePivot" phi0="0.0"/>
+
+<sTGC type="sTG1-QL3P" tech="sTGC_1" subType="QL3P" sWidth="1813.68" lWidth="2111" Length="1153" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="545.3" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode="539.26">
+
+<sTGC_readout sPadWidth="1745.99" lPadWidth="2054" padH="81.42;81.42;81.66;81.66"
+ rankPadPhi="2;1;4;3" nPadPhi="4;4;5;5" anglePadPhi="7.5" firstPadPhiDivision_C="-7.5;-7.5;-11.25;-11.25" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="-7.5;-7.5;-11.25;-11.25" PadPhiShift_A="-2;2;-2;2" rankPadH="1;2;3;4" nPadH="15;15;14;14" firstPadH="32.38;32.38;83.57;83.57" firstPadRow="32;32;33;33" sStripWidth="1760.42" lStripWidth="2054" wireCutout="0;0;0;0" nWires="1133;1134;1134;1134" firstWire="-1018.8;-1019.25;-1020.15;-1019.7" wireGroupWidth="20" nStrips="353" firstTriggerBand="64;64;64;64" nTriggerBands="24;24;24;24" firstStripInTrigger="1;1;1;1" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="11;11;13;13;12;13;13;13;12; 13;13;12;13;13;13;12;13;13;13; 12;13;12;13;12;11;11;10;10;10" StripsInBandsLayer2="11;11;13;13;12;13;13;13;12; 13;13;12;13;13;13;12;13;13;13; 12;13;12;13;12;11;11;10;10;10" StripsInBandsLayer3="13;13;12;13;13;13;13;13;12; 13;13;13;12;13;13;13;13;12;13; 13;13;12;13;13;13;13;13;7" StripsInBandsLayer4="13;13;12;13;13;13;13;13;12; 13;13;13;12;13;13;13;13;12;13; 13;13;12;13;13;13;13;13;7" nWireGroups="57;58;58;57" firstWireGroup="20;5;10;15"/>
+</sTGC>
+
+<chamberPosition volume="sTG1-QL3P" type="ENDCAP" chamberType="sTGL" radius="4054.5" zPos="NSW_sTGC_ZLargePivot" phi0="0.0"/>
+
+<!-- =============== Large Confirm ===================== -->
+
+<sTGC type="sTG1-QL1C" tech="sTGC_1" subType="QL1C" sWidth="542.61" lWidth="1206.82" Length="1332" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0">
+
+<sTGC_readout sPadWidth="490.84" lPadWidth="1141.09" padH="85.07;85.07;85.31;85.31" rankPadPhi="4;3;2;1" nPadPhi="6;6;6;6" anglePadPhi="5" firstPadPhiDivision_C="-8.75;-11.25;-8.75;-11.25" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-11.25;-8.75;-11.25;-8.75" PadPhiShift_A="2;-2;2;-2" rankPadH="1;2;3;4" nPadH="16;16;16;16" firstPadH="77.79;77.79;38.01;38.01" firstPadRow="1;1;1;1" sStripWidth="490.84" lStripWidth="1141.09" wireCutout="889;862;835;808" nWires="620;620;620;621" firstWire="-557.1;-556.65;-557.55;-558" wireGroupWidth="20" nStrips="408" firstTriggerBand="6;6;6;6" nTriggerBands="26;26;26;26" firstStripInTrigger="73;73;73;73" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="13;11;14;13;13;13;14;13;13;14;13;13; 13;14;13;13;13;14;13;13;14;13; 13;13;14;13;13;13;14;14;11" StripsInBandsLayer2="13;11;14;13;13;13;14;13;13;14;13;13; 13;14;13;13;13;14;13;13;14;13; 13;13;14;13;13;13;14;14;11" StripsInBandsLayer3="14;11;14;13;13;14;13;13;13;14;13;13; 14;13;13;14;13;13;14;13;13;13; 14;13;13;14;13;13;14;13;10" StripsInBandsLayer4="14;11;14;13;13;14;13;13;13;14;13;13; 14;13;13;14;13;13;14;13;13;13; 14;13;13;14;13;13;14;13;10" nWireGroups="32;32;32;32" firstWireGroup="15;10;5;20"/>
+</sTGC>
+
+<chamberPosition volume="sTG1-QL1C" type="ENDCAP" chamberType="sTGL" radius="1595" zPos="NSW_sTGC_ZLargeConfirm" phi0="0.0"/>
+
+<sTGC type="sTG1-QL2C" tech="sTGC_1" subType="QL2C" sWidth="1211.81" lWidth="1807.5" Length="1194.6" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0">
+
+<sTGC_readout sPadWidth="1158.55" lPadWidth="1741.77" padH="85.07;85.07;85.31;85.31" rankPadPhi="3;2;4;1" nPadPhi="4;4;4;4" anglePadPhi="7.5" firstPadPhiDivision_C="-5.62;-9.37;-5.62;-9.37" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-9.37;-5.62;-9.37;-5.62" PadPhiShift_A="2;-2;2;-2" rankPadH="1;2;3;4" nPadH="14;14;14;14" firstPadH="99.84;99.84;63.9;63.9" firstPadRow="17;17;17;17" sStripWidth="1158.55" lStripWidth="1741.77" wireCutout="0;0;0;0" nWires="954;954;954;953" firstWire="-857.7;-857.25;-858.15;-856.8" wireGroupWidth="20" nStrips="366" firstTriggerBand="32;32;32;32" nTriggerBands="29;29;29;29" firstStripInTrigger="1;1;1;1" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="10;10;11;13;13;14;13;13;14; 13;13;14;13;14;13;13;13;13;14; 13;13;13;14;13;13;14;13;13;3" StripsInBandsLayer2="10;10;11;13;13;14;13;13;14; 13;13;14;13;14;13;13;13;13;14; 13;13;13;14;13;13;14;13;13;3" StripsInBandsLayer3="11;11;12;12;13;14;13;13;14; 13;13;14;13;13;13;14;13;13;14; 13;13;14;13;13;14;13;13;12;2" StripsInBandsLayer4="11;11;12;12;13;14;13;13;14; 13;13;14;13;13;13;14;13;13;14; 13;13;14;13;13;14;13;13;12;2" nWireGroups="48;49;49;48" firstWireGroup="20;5;10;15"/>
+</sTGC>
+
+<chamberPosition volume="sTG1-QL2C" type="ENDCAP" chamberType="sTGL" radius="2868.3" zPos="NSW_sTGC_ZLargeConfirm" phi0="0.0"/>
+
+<sTGC type="sTG1-QL3C" tech="sTGC_1" subType="QL3C" sWidth="1813.68" lWidth="2111" Length="1153" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="545.3" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode="539.26">
+
+<sTGC_readout sPadWidth="1760.42" lPadWidth="2054" padH="85.07;85.07;85.31;85.31" rankPadPhi="3;2;4;1" nPadPhi="4;4;4;4" anglePadPhi="7.5" firstPadPhiDivision_C="-5.62;-9.37;-5.62;-9.37" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-9.37;-5.62;-9.37;-5.62" PadPhiShift_A="2;-2;2;-2" rankPadH="1;2;3;4" nPadH="13;13;14;14" firstPadH="83.76;83.76;51.17;51.17" firstPadRow="31;31;31;31" sStripWidth="1760.42" lStripWidth="2054" wireCutout="0;0;0;0" nWires="1134;1134;1134;1133" firstWire="-1019.7;-1019.25;-1020.15;-1018.8" wireGroupWidth="20" nStrips="353" firstTriggerBand="61;61;61;61" nTriggerBands="27;27;27;27" firstStripInTrigger="1;1;1;1" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="12;12;12;12;11;14;13;13;14;13; 13;14;13;13;14;13;13;13;14;13; 13;13;14;13;13;14;14" StripsInBandsLayer2="12;12;12;12;11;14;13;13;14;13; 13;14;13;13;14;13;13;13;14;13; 13;13;14;13;13;14;14" StripsInBandsLayer3="13;13;13;14;10;13;13;14;13;13; 14;13;13;14;13;13;14;13;13;13; 14;13;13;14;13;13;11" StripsInBandsLayer4="13;13;13;14;10;13;13;14;13;13; 14;13;13;14;13;13;14;13;13;13; 14;13;13;14;13;13;11" nWireGroups="57;58;58;57" firstWireGroup="20;5;10;15"/>
+</sTGC>
+
+<chamberPosition volume="sTG1-QL3C" type="ENDCAP" chamberType="sTGL" radius="4054.5" zPos="NSW_sTGC_ZLargeConfirm" phi0="0.0"/>
+
+</composition>
+</section>
+
+
+<!-- ========== MicroMegas ============================== -->
+
+<section name="NSW_MM_Parameters" version="1" top_volume="useless" date="December 16 2014" author="S.Chen" >
+
+<!-- Frames. "f1": frame width close to the trapezium large side. "f2": frame width close to the trapezium small side. "f3": frame width close to the trapezium oblique side  -->
+
+<!-- Distance from IP, labeled zmin_MM in Parameter Book -->
+<var name="NSW_MM_LM_distanceFromIP" value="7536"/>
+<var name="NSW_MM_SM_distanceFromIP" value="7072"/>
+<!-- Thickness of Multilayer and the subcomponent (mm)-->
+<var name="NSW_MM_GasTck" value="5.05"/>
+<var name="NSW_MM_ROPcbTck" value="11.75"/>
+<var name="NSW_MM_DriftPcbTck" value="11.3"/>
+<var name="NSW_MM_MultilayerTck" value="NSW_NbrOfLayers* NSW_MM_GasTck + (NSW_NbrOfDriftPcb) * NSW_MM_DriftPcbTck+ ( NSW_NbrOfROPcb) * NSW_MM_ROPcbTck" /> <!-- Thickness of one multilayer -->
+
+<!-- Large sector modules (LM1" LM2). Modules are all trapezoid. ""Height"": radial envelope" ""base/top Width"": upper/lower side of the trapezoid-->
+<var name="NSW_MM_LM1_InnerRadius" value="923" />
+<var name="NSW_MM_LM1_Length" value="2310" />
+<var name="NSW_MM_LM1_outerRadius" value="NSW_MM_LM1_InnerRadius+NSW_MM_LM1_Length" />
+<var name="NSW_MM_LM1_f1" value="35.175"/>
+<var name="NSW_MM_LM1_f2" value="35.625"/>
+<var name="NSW_MM_LM1_f3" value="117.26"/>
+<var name="NSW_MM_LMGap_Length" value="5" /> <!-- Radial gap between LM1 and LM2 -->
+<var name="NSW_MM_LM2_InnerRadius" value="NSW_MM_LM1_outerRadius+NSW_MM_LMGap_Length" />
+<var name="NSW_MM_LM2_Length" value="1410" />
+<var name="NSW_MM_LM2_outerRadius" value="NSW_MM_LM2_InnerRadius+NSW_MM_LM2_Length" />
+<var name="NSW_MM_LM1_baseWidth" value="640" />
+<var name="NSW_MM_LM1_topWidth" value="2008.5" />
+<var name="NSW_MM_LM2_baseWidth" value="2022.8" />
+<var name="NSW_MM_LM2_topWidth" value="2220" />
+<var name="NSW_MM_LM2_f1" value="35.175"/>
+<var name="NSW_MM_LM2_f2" value="35.175"/>
+<var name="NSW_MM_LM2_f3" value="112.52"/>
+<!-- These lines added by Alexandre Laurier to fix MM active Geometry / updated values by Chara Kitsaki -->
+<!-- *_activeBottom: bottom length -->
+<!-- *_activeTop: top length -->
+<!-- *_activeH: radial distance -->
+<var name="NSW_MM_LM1_activeBottom" value="426.73"/>
+<var name="NSW_MM_LM1_activeTop" value="1753.0"/>
+<var name="NSW_MM_LM1_activeH" value="2239.2"/>
+<var name="NSW_MM_LM2_activeBottom" value="1802.5"/>
+<var name="NSW_MM_LM2_activeTop" value="1990.0"/>
+<var name="NSW_MM_LM2_activeH" value="1339.65"/>
+<!-- These lines added by Chara Kitsaki to implement all the parameters needed for the strips description -->
+<!-- *_etaMissedTop: the #of eta strips that are not connected to the FE boards (top part of the module) -->
+<!-- *_etaMissedBottom: the #of eta strips that are not connected to the FE boards (bottom part of the module) -->
+<!-- *_stereoMissedBottom: the #of stereo strips that are not connected to the FE boards (bottom part of the module) -->
+<!-- *_stereoMissedTop: the #of stereo strips that are not connected to the FE boards (top part of the module) -->
+<!-- *_stereoRoutedTop: the #of stereo strips that are shorter in length due to geometry restrictions (top part of the module) -->
+<!-- *_stereoRoutedBottom: the #of stereo strips that are shorter in length due to geometry restrictions (bottom part of the module) -->
+<var name="NSW_MM_LM1_etaMissedTop" value="72"/>
+<var name="NSW_MM_LM1_etaMissedBottom" value="72"/>
+<var name="NSW_MM_LM1_stereoMissedTop" value="36"/>
+<var name="NSW_MM_LM1_stereoMissedBottom" value="86"/>
+<var name="NSW_MM_LM1_stereoRoutedTop" value="88"/>
+<var name="NSW_MM_LM1_stereoRoutedBottom" value="0"/>
+<var name="NSW_MM_LM2_etaMissedTop" value="48"/>
+<var name="NSW_MM_LM2_etaMissedBottom" value="47"/>
+<var name="NSW_MM_LM2_stereoMissedTop" value="43"/>
+<var name="NSW_MM_LM2_stereoMissedBottom" value="42"/>
+<var name="NSW_MM_LM2_stereoRoutedTop" value="64"/>
+<var name="NSW_MM_LM2_stereoRoutedBottom" value="58"/>
+<!-- Small sector modules (SM1" SM2). Modules are all trapezoids. ""Height"": radial envelope" ""base/top Width"": upper/lower side -->
+<var name="NSW_MM_SM1_InnerRadius" value="895" />
+<var name="NSW_MM_SM1_Length" value="2210" />
+<var name="NSW_MM_SM1_outerRadius" value="NSW_MM_SM1_InnerRadius+NSW_MM_SM1_Length" />
+<var name="NSW_MM_SMGap_Length" value="5" /> <!-- Radial gap between SM1 and SM2 -->
+<var name="NSW_MM_SM1_f1" value="34.1875"/>
+<var name="NSW_MM_SM1_f2" value="35.0875"/>
+<var name="NSW_MM_SM1_f3" value="114.02"/>
+<var name="NSW_MM_SM2_InnerRadius" value="NSW_MM_SM1_outerRadius+NSW_MM_SMGap_Length" />
+<var name="NSW_MM_SM2_Length" value="1350" />
+<var name="NSW_MM_SM2_outerRadius" value="NSW_MM_SM2_InnerRadius+NSW_MM_SM2_Length" />
+<var name="NSW_MM_SM1_baseWidth" value="500" />
+<var name="NSW_MM_SM1_topWidth" value="1319.2" />
+<var name="NSW_MM_SM2_baseWidth" value="1321.1" />
+<var name="NSW_MM_SM2_topWidth" value="1821.5" />
+<var name="NSW_MM_SM2_f1" value="35.1375"/>
+<var name="NSW_MM_SM2_f2" value="34.7625"/>
+<var name="NSW_MM_SM2_f3" value="114.4"/>
+<!-- These lines added by Alexandre Laurier to fix MM active Geometry / updated values by Chara Kitsaki -->
+<var name="NSW_MM_SM1_activeBottom" value="284.0"/>
+<var name="NSW_MM_SM1_activeTop" value="1078.4"/>
+<var name="NSW_MM_SM1_activeH" value="2140.725"/>
+<var name="NSW_MM_SM2_activeBottom" value="1103.05"/>
+<var name="NSW_MM_SM2_activeTop" value="1579.6"/>
+<var name="NSW_MM_SM2_activeH" value="1280.1"/>
+<!-- These lines added by Chara Kitsaki to implement all the parameters needed for the strips description -->
+<var name="NSW_MM_SM1_etaMissedTop" value="41"/>
+<var name="NSW_MM_SM1_etaMissedBottom" value="42"/>
+<var name="NSW_MM_SM1_stereoMissedTop" value="11"/>
+<var name="NSW_MM_SM1_stereoMissedBottom" value="35"/>
+<var name="NSW_MM_SM1_stereoRoutedTop" value="66"/>
+<var name="NSW_MM_SM1_stereoRoutedBottom" value="18"/>
+<var name="NSW_MM_SM2_etaMissedTop" value="31"/>
+<var name="NSW_MM_SM2_etaMissedBottom" value="29"/>
+<var name="NSW_MM_SM2_stereoMissedTop" value="1"/>
+<var name="NSW_MM_SM2_stereoMissedBottom" value="1"/>
+<var name="NSW_MM_SM2_stereoRoutedTop" value="79"/>
+<var name="NSW_MM_SM2_stereoRoutedBottom" value="64"/>
+
+<var name="NSW_MM_LargeSector_ZCENTER" value="ZCenter_Global+232."/>
+<var name="NSW_MM_SmallSector_ZCENTER" value="ZCenter_Global-232."/>
+
+
+<!-- Thickness of inter-multilayer spacers -->
+<var name="NSW_MM_SpacerThickness" value="52" />
+
+<!-- Global z-coordinate for the sector center -->
+<!--  <var name="NSW_MM_LargeSector_ZCENTER" value="NSW_MM_LM_distanceFromIP + 4.*NSW_MM_DriftPcbTck + 4.*NSW_MM_ROPcbTck + 4.*NSW_MM_GasTck + NSW_MM_SpacerThickness/2."/>
+<var name="NSW_MM_SmallSector_ZCENTER" value="NSW_MM_SM_distanceFromIP + 4.*NSW_MM_DriftPcbTck + 4.*NSW_MM_ROPcbTck + 4.*NSW_MM_GasTck + NSW_MM_SpacerThickness/2."/>  -->
+
+</section>
+
+<section name="NewSmallWheelsMM" version="1" top_volume="NSW_MM" date="December 16 2014" author="S.Chen" >
+
+
+<!-- Technologies  -->
+<mm_Tech type="MM_1" geometryLevel="1" nLayers="NSW_NbrOfLayers" gasTck="NSW_MM_GasTck" driftPcbTck="NSW_MM_DriftPcbTck" ROPcbTck="NSW_MM_ROPcbTck" Tck="NSW_MM_MultilayerTck" />
+<!--Chilufya<mmSpacer_Tech type="Spa_1" Tck="NSW_MM_SpacerThickness" />Chilufya-->
+
+<!-- large wheel -->
+<!-- These lines are modified by Chara Kitsaki -->
+<!-- minYPhiL minYPhiR: the (radial)distance kept (left and right part of the module) between the first active stereo and eta strips -->
+<!-- dlStereoTop, dlStereoBottom: the distance between the first stereo and eta strip that is kept starting from the corner-->
+<!-- Some strips are not connected to the FE boards these we call missed strips -->
+<!-- At the corners of the module some strips are shorter in length and they are routed to the FE boards (routed strips). These areas are of low efficiency. LM1 is the special case (there is not much space to route any strips at the module's bottom part) -->
+
+<micromegas type="sMD1-1-1" tech="MM_1" subType="M1L1" sWidth="NSW_MM_LM1_baseWidth" lWidth="NSW_MM_LM1_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_LM1_Length" ylFrame="NSW_MM_LM1_f1" ysFrame="NSW_MM_LM1_f2" xFrame="NSW_MM_LM1_f3" >
+<mm_readout stripPitch="0.45" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.; 0.; 0.02618; -0.02618" readoutSide="-1; 1; -1; 1" zPos="NSW_MM_LargeSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_LM1_InnerRadius" roLength="NSW_MM_LM1_Length" activeBottomLength="NSW_MM_LM1_activeBottom" activeTopLength="NSW_MM_LM1_activeTop" activeH="NSW_MM_LM1_activeH" minYPhiR="12" minYPhiL="0.69" maxYPhi="6.69" nMissedTopEta="NSW_MM_LM1_etaMissedTop" nMissedBottomEta="NSW_MM_LM1_etaMissedBottom" nMissedTopStereo="NSW_MM_LM1_stereoMissedTop" nMissedBottomStereo="NSW_MM_LM1_stereoMissedBottom" nRoutedTop="NSW_MM_LM1_stereoRoutedTop" nRoutedBottom="NSW_MM_LM1_stereoRoutedBottom" dlStereoTop="257.61" dlStereoBottom="426.73" totalStrips="5120"/>
+</micromegas>
+<micromegas type="sMD1-2-1" tech="MM_1" subType="M2L1" sWidth="NSW_MM_LM2_baseWidth" lWidth="NSW_MM_LM2_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_LM2_Length" ylFrame="NSW_MM_LM2_f1" ysFrame="NSW_MM_LM2_f2" xFrame="NSW_MM_LM2_f3" >
+<mm_readout stripPitch="0.45" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.; 0.; 0.02618; -0.02618" readoutSide="-1; 1; -1; 1" zPos="NSW_MM_LargeSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_LM2_InnerRadius" roLength="NSW_MM_LM2_Length" activeBottomLength="NSW_MM_LM2_activeBottom" activeTopLength="NSW_MM_LM2_activeTop" activeH="NSW_MM_LM2_activeH" minYPhiR="21.39" minYPhiL="0" maxYPhi="23.77" nMissedTopEta="NSW_MM_LM2_etaMissedTop" nMissedBottomEta="NSW_MM_LM2_etaMissedBottom" nMissedTopStereo="NSW_MM_LM2_stereoMissedTop" nMissedBottomStereo="NSW_MM_LM2_stereoMissedBottom" nRoutedTop="NSW_MM_LM2_stereoRoutedTop" nRoutedBottom="NSW_MM_LM2_stereoRoutedBottom" dlStereoTop="909.4" dlStereoBottom="815.32" totalStrips="3072"/>
+</micromegas>
+<micromegas type="sMD1-1-2" tech="MM_1" subType="M1L2" sWidth="NSW_MM_LM1_baseWidth" lWidth="NSW_MM_LM1_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_LM1_Length" ylFrame="NSW_MM_LM1_f1" ysFrame="NSW_MM_LM1_f2" xFrame="NSW_MM_LM1_f3" >
+<mm_readout stripPitch="0.45" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.02618; -0.02618; 0.; 0." readoutSide="-1; 1; -1; 1" zPos="NSW_MM_LargeSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_LM1_InnerRadius" roLength="NSW_MM_LM1_Length" activeBottomLength="NSW_MM_LM1_activeBottom" activeTopLength="NSW_MM_LM1_activeTop" activeH="NSW_MM_LM1_activeH" minYPhiR="12" minYPhiL="0.69" maxYPhi="6.69" nMissedTopEta="NSW_MM_LM1_etaMissedTop" nMissedBottomEta="NSW_MM_LM1_etaMissedBottom" nMissedTopStereo="NSW_MM_LM1_stereoMissedTop" nMissedBottomStereo="NSW_MM_LM1_stereoMissedBottom" nRoutedTop="NSW_MM_LM1_stereoRoutedTop" nRoutedBottom="NSW_MM_LM1_stereoRoutedBottom" dlStereoTop="257.61" dlStereoBottom="426.73" totalStrips="5120"/>
+</micromegas>
+<micromegas type="sMD1-2-2" tech="MM_1" subType="M2L2" sWidth="NSW_MM_LM2_baseWidth" lWidth="NSW_MM_LM2_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_LM2_Length" ylFrame="NSW_MM_LM2_f1" ysFrame="NSW_MM_LM2_f2" xFrame="NSW_MM_LM2_f3" >
+<mm_readout stripPitch="0.45" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.02618; -0.02618; 0.; 0." readoutSide="-1; 1; -1; 1" zPos="NSW_MM_LargeSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_LM2_InnerRadius" roLength="NSW_MM_LM2_Length" activeBottomLength="NSW_MM_LM2_activeBottom" activeTopLength="NSW_MM_LM2_activeTop" activeH="NSW_MM_LM2_activeH" minYPhiR="21.39" minYPhiL="0" maxYPhi="23.77" nMissedTopEta="NSW_MM_LM2_etaMissedTop" nMissedBottomEta="NSW_MM_LM2_etaMissedBottom" nMissedTopStereo="NSW_MM_LM2_stereoMissedTop" nMissedBottomStereo="NSW_MM_LM2_stereoMissedBottom" nRoutedTop="NSW_MM_LM2_stereoRoutedTop" nRoutedBottom="NSW_MM_LM2_stereoRoutedBottom" dlStereoTop="909.4" dlStereoBottom="815.32" totalStrips="3072"/>
+</micromegas>
+
+<!--Chilufya<mmSpacer type="spa1-1" tech="Spa_1" sWidth="NSW_MM_LM1_baseWidth" lWidth="NSW_MM_LM1_topWidth" Tck="NSW_MM_SpacerThickness" Length="NSW_MM_LM1_Length" />
+<mmSpacer type="spa1-2" tech="Spa_1" sWidth="NSW_MM_LM2_baseWidth" lWidth="NSW_MM_LM2_topWidth" Tck="NSW_MM_SpacerThickness" Length="NSW_MM_LM2_Length" />Chilufya-->
+
+
+<!-- small wheel -->
+<micromegas type="sMD3-1-1" tech="MM_1" subType="M1S1" sWidth="NSW_MM_SM1_baseWidth" lWidth="NSW_MM_SM1_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_SM1_Length" ylFrame="NSW_MM_SM1_f1" ysFrame="NSW_MM_SM1_f2" xFrame="NSW_MM_SM1_f3" >
+<mm_readout stripPitch="0.425" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.; 0.; 0.02618; -0.02618" readoutSide="-1; 1; -1; 1" zPos="NSW_MM_SmallSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_SM1_InnerRadius" roLength="NSW_MM_SM1_Length" activeBottomLength="NSW_MM_SM1_activeBottom" activeTopLength="NSW_MM_SM1_activeTop" activeH="NSW_MM_SM1_activeH" minYPhiR="0.75" minYPhiL="0" maxYPhi="1.36" nMissedTopEta="NSW_MM_SM1_etaMissedTop" nMissedBottomEta="NSW_MM_SM1_etaMissedBottom" nMissedTopStereo="NSW_MM_SM1_stereoMissedTop" nMissedBottomStereo="NSW_MM_SM1_stereoMissedBottom" nRoutedTop="NSW_MM_SM1_stereoRoutedTop" nRoutedBottom="NSW_MM_SM1_stereoRoutedBottom" dlStereoTop="52.15" dlStereoBottom="28.41" totalStrips="5120"/>
+</micromegas>
+<micromegas type="sMD3-2-1" tech="MM_1" subType="M2S1" sWidth="NSW_MM_SM2_baseWidth" lWidth="NSW_MM_SM2_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_SM2_Length" ylFrame="NSW_MM_SM2_f1" ysFrame="NSW_MM_SM2_f2" xFrame="NSW_MM_SM2_f3" >
+<mm_readout stripPitch="0.425" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.; 0.; 0.02618; -0.02618" readoutSide="-1; 1; -1; 1" zPos="NSW_MM_SmallSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_SM2_InnerRadius" roLength="NSW_MM_SM2_Length" activeBottomLength="NSW_MM_SM2_activeBottom" activeTopLength="NSW_MM_SM2_activeTop" activeH="NSW_MM_SM2_activeH" minYPhiR="2.53" minYPhiL="0" maxYPhi="7.92" nMissedTopEta="NSW_MM_SM2_etaMissedTop" nMissedBottomEta="NSW_MM_SM2_etaMissedBottom" nMissedTopStereo="NSW_MM_SM2_stereoMissedTop" nMissedBottomStereo="NSW_MM_SM2_stereoMissedBottom" nRoutedTop="NSW_MM_SM2_stereoRoutedTop" nRoutedBottom="NSW_MM_SM2_stereoRoutedBottom" dlStereoTop="303.86" dlStereoBottom="96.14" totalStrips="3072"/>
+</micromegas>
+<micromegas type="sMD3-1-2" tech="MM_1" subType="M1S2" sWidth="NSW_MM_SM1_baseWidth" lWidth="NSW_MM_SM1_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_SM1_Length" ylFrame="NSW_MM_SM1_f1" ysFrame="NSW_MM_SM1_f2" xFrame="NSW_MM_SM1_f3" >
+<mm_readout stripPitch="0.425" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.02618; -0.02618; 0.; 0." readoutSide="-1; 1; -1; 1" zPos="NSW_MM_SmallSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_SM1_InnerRadius" roLength="NSW_MM_SM1_Length" activeBottomLength="NSW_MM_SM1_activeBottom" activeTopLength="NSW_MM_SM1_activeTop" activeH="NSW_MM_SM1_activeH" minYPhiR="0.75" minYPhiL="0" maxYPhi="1.36" nMissedTopEta="NSW_MM_SM1_etaMissedTop" nMissedBottomEta="NSW_MM_SM1_etaMissedBottom" nMissedTopStereo="NSW_MM_SM1_stereoMissedTop" nMissedBottomStereo="NSW_MM_SM1_stereoMissedBottom" nRoutedTop="NSW_MM_SM1_stereoRoutedTop" nRoutedBottom="NSW_MM_SM1_stereoRoutedBottom" dlStereoTop="52.15" dlStereoBottom="28.41" totalStrips="5120"/>
+</micromegas>
+<micromegas type="sMD3-2-2" tech="MM_1" subType="M2S2" sWidth="NSW_MM_SM2_baseWidth" lWidth="NSW_MM_SM2_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_SM2_Length" ylFrame="NSW_MM_SM2_f1" ysFrame="NSW_MM_SM2_f2" xFrame="NSW_MM_SM2_f3" >
+<mm_readout stripPitch="0.425" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.02618; -0.02618; 0.; 0." readoutSide="-1; 1; -1; 1" zPos="NSW_MM_SmallSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_SM2_InnerRadius" roLength="NSW_MM_SM2_Length" activeBottomLength="NSW_MM_SM2_activeBottom" activeTopLength="NSW_MM_SM2_activeTop" activeH="NSW_MM_SM2_activeH" minYPhiR="2.53" minYPhiL="0" maxYPhi="7.92" nMissedTopEta="NSW_MM_SM2_etaMissedTop" nMissedBottomEta="NSW_MM_SM2_etaMissedBottom" nMissedTopStereo="NSW_MM_SM2_stereoMissedTop" nMissedBottomStereo="NSW_MM_SM2_stereoMissedBottom" nRoutedTop="NSW_MM_SM2_stereoRoutedTop" nRoutedBottom="NSW_MM_SM2_stereoRoutedBottom" dlStereoTop="303.86" dlStereoBottom="96.14" totalStrips="3072"/>
+</micromegas>
+<!--Chilufya<mmSpacer type="spa3-1" tech="Spa_1" sWidth="NSW_MM_SM1_baseWidth" lWidth="NSW_MM_SM1_topWidth" Tck="NSW_MM_SpacerThickness" Length="NSW_MM_SM1_Length" />
+<mmSpacer type="spa3-2" tech="Spa_1" sWidth="NSW_MM_SM2_baseWidth" lWidth="NSW_MM_SM2_topWidth" Tck="NSW_MM_SpacerThickness" Length="NSW_MM_SM2_Length" />Chilufya-->
+
+<composition name="NSW_MM" >
+<!-- A-SIDE -->
+
+<!-- LARGE SECTOR -->
+
+<!-- MM multilayer 1 -->
+<chamberPosition volume="sMD1-1-1" radius="(NSW_MM_LM1_InnerRadius+NSW_MM_LM1_outerRadius)/2" zPos="NSW_MM_LargeSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="0" />
+<chamberPosition volume="sMD1-2-1" radius="(NSW_MM_LM2_InnerRadius+NSW_MM_LM2_outerRadius)/2" zPos="NSW_MM_LargeSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="0" />
+<!-- spacer -->
+<!--Chilufya<mposPhi volume="spa1-1" ncopy="8" R_Z="(NSW_MM_LM1_InnerRadius+NSW_MM_LM1_outerRadius)/2;NSW_MM_LargeSector_ZCENTER" Phi0="0" rot=" 90.; 270.; 90." />
+<mposPhi volume="spa1-2" ncopy="8" R_Z="(NSW_MM_LM2_InnerRadius+NSW_MM_LM2_outerRadius)/2;NSW_MM_LargeSector_ZCENTER" Phi0="0" rot=" 90.; 270.; 90." />Chilufya-->
+
+<!-- MM multilayer 2 -->
+<chamberPosition volume="sMD1-1-2" radius="(NSW_MM_LM1_InnerRadius+NSW_MM_LM1_outerRadius)/2" zPos="NSW_MM_LargeSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="0" />
+<chamberPosition volume="sMD1-2-2" radius="(NSW_MM_LM2_InnerRadius+NSW_MM_LM2_outerRadius)/2" zPos="NSW_MM_LargeSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="0" />
+
+<!-- SMALL SECTOR -->
+
+<!-- MM multilayer 1 -->
+<chamberPosition volume="sMD3-1-1" radius="(NSW_MM_SM1_InnerRadius+NSW_MM_SM1_outerRadius)/2" zPos="NSW_MM_SmallSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="22.5" />
+<chamberPosition volume="sMD3-2-1" radius="(NSW_MM_SM2_InnerRadius+NSW_MM_SM2_outerRadius)/2" zPos="NSW_MM_SmallSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="22.5" />
+
+<!-- spacer -->
+<!--Chilufya<mposPhi volume="spa3-1" ncopy="8" R_Z="(NSW_MM_SM1_InnerRadius+NSW_MM_SM1_outerRadius)/2;NSW_MM_SmallSector_ZCENTER" Phi0="22.5" rot=" 90.; 270.; 90." />
+<mposPhi volume="spa3-2" ncopy="8" R_Z="(NSW_MM_SM2_InnerRadius+NSW_MM_SM2_outerRadius)/2;NSW_MM_SmallSector_ZCENTER" Phi0="22.5" rot=" 90.; 270.; 90." />Chilufya-->
+
+<!-- MM multilayer 2 -->
+<chamberPosition volume="sMD3-1-2" radius="(NSW_MM_SM1_InnerRadius+NSW_MM_SM1_outerRadius)/2" zPos="NSW_MM_SmallSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="22.5" />
+<chamberPosition volume="sMD3-2-2" radius="(NSW_MM_SM2_InnerRadius+NSW_MM_SM2_outerRadius)/2" zPos="NSW_MM_SmallSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="22.5" />
+
+<!-- C-SIDE -->
+<!-- LARGE SECTOR -->
+<!-- spacer -->
+<!--Chilufya<mposPhi volume="spa1-1" ncopy="8" R_Z="(NSW_MM_LM1_InnerRadius+NSW_MM_LM1_outerRadius)/2;-NSW_MM_LargeSector_ZCENTER" Phi0="0" rot=" 90.; 90.; 90." />
+<mposPhi volume="spa1-2" ncopy="8" R_Z="(NSW_MM_LM2_InnerRadius+NSW_MM_LM2_outerRadius)/2;-NSW_MM_LargeSector_ZCENTER" Phi0="0" rot=" 90.; 90.; 90." />Chilufya-->
+
+<!-- SMALL SECTOR -->
+<!-- spacer -->
+<!--Chilufya<mposPhi volume="spa3-1" ncopy="8" R_Z="(NSW_MM_SM1_InnerRadius+NSW_MM_SM1_outerRadius)/2;-NSW_MM_SmallSector_ZCENTER" Phi0="22.5" rot=" 90.; 90.; 90." />
+<mposPhi volume="spa3-2" ncopy="8" R_Z="(NSW_MM_SM2_InnerRadius+NSW_MM_SM2_outerRadius)/2;-NSW_MM_SmallSector_ZCENTER" Phi0="22.5" rot=" 90.; 90.; 90." />Chilufya-->
+
+</composition>
+
+</section>
+
+
+
+
+
+
+
+<!--====================================SPACER FRAME===============================================-->
+
+<section name       = "LS and SS Spacer Frames"
+         version    = "0.0"
+         date       = "25-07-2017"
+         author     = "Georgian Engineering Team - Niko Tsutskiridze"
+         top_volume = "NSW_Spacer">
+
+<!-- LS Spacer Ftame -->
+<gvxy name="LS_StructuralPlate_Main" material="Aluminium" dZ="5.9">
+  <gvxy_point X_Y="226.; 958."/>
+  <gvxy_point X_Y="914.15; 3281."/>
+  <gvxy_point X_Y="1007.3; 4613."/>
+  <gvxy_point X_Y="0.01; 4613."/>
+  <gvxy_point X_Y="0.01; 958."/>
+</gvxy>
+
+<gvxy name="LS_StructuralPlate_Cut1" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="902.87; 4123."/>
+  <gvxy_point X_Y="932.24; 4543."/>
+  <gvxy_point X_Y="40.; 4543."/>
+  <gvxy_point X_Y="40.; 4123."/>
+</gvxy>
+
+<gvxy name="LS_StructuralPlate_Cut2" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="774.41; 3913.25"/>
+  <gvxy_point X_Y="770.86; 3963."/>
+  <gvxy_point X_Y="135.; 3963."/>
+  <gvxy_point X_Y="135.; 3821.33"/>
+</gvxy>
+
+<gvxy name="LS_StructuralPlate_Cut3" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="778.83; 3639.29"/>
+  <gvxy_point X_Y="792.52; 3835.04"/>
+  <gvxy_point X_Y="203.42; 3750.35"/>
+  <gvxy_point X_Y="203.46; 3720.65"/>
+</gvxy>
+
+<gvxy name="LS_StructuralPlate_Cut4" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="477.15; 3586.36"/>
+  <gvxy_point X_Y="477.24; 3606.18"/>
+  <gvxy_point X_Y="135.; 3654.58"/>
+  <gvxy_point X_Y="135.; 3541.07"/>
+</gvxy>
+
+<gvxy name="LS_StructuralPlate_Cut5" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="762.41; 3404.48"/>
+  <gvxy_point X_Y="772.57; 3549.82"/>
+  <gvxy_point X_Y="286.06; 3485.41"/>
+  <gvxy_point X_Y="286.1; 3465.58"/>
+</gvxy>
+
+<gvxy name="LS_StructuralPlate_Cut6" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="600.; 3314.58"/>
+  <gvxy_point X_Y="602.55; 3354.42"/>
+  <gvxy_point X_Y="60.; 3424.01"/>
+  <gvxy_point X_Y="60.; 3314.58"/>
+</gvxy>
+
+<box  name="LS_StructuralPlate_Cut7" material="Aluminium"  X_Y_Z="138.; 70.; 7. " />
+
+<gvxy name="LS_StructuralPlate_Cut8" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="678.71; 2838.18"/>
+  <gvxy_point X_Y="772.71; 3155.5"/>
+  <gvxy_point X_Y="63.52; 3155.5"/>
+</gvxy>
+
+<gvxy name="LS_StructuralPlate_Cut9" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="533.6; 2715.5"/>
+  <gvxy_point X_Y="551.94; 2791.05"/>
+  <gvxy_point X_Y="40.; 3055.11"/>
+  <gvxy_point X_Y="40.; 2715.5"/>
+</gvxy>
+
+<gvxy name="LS_StructuralPlate_Cut10" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="459.9; 2169.9"/>
+  <gvxy_point X_Y="585.97; 2595.5"/>
+  <gvxy_point X_Y="117.42; 2595.5"/>
+</gvxy>
+
+<gvxy name="LS_StructuralPlate_Cut11" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="391.41; 2095.5"/>
+  <gvxy_point X_Y="135.; 2414.15"/>
+  <gvxy_point X_Y="135.; 2095.5"/>
+</gvxy>
+
+<gvxy name="LS_StructuralPlate_Cut12" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="344.91; 1865.18"/>
+  <gvxy_point X_Y="389.44; 2015.5"/>
+  <gvxy_point X_Y="258.79; 2015.5"/>
+</gvxy>
+<gvxy name="LS_StructuralPlate_Cut13" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="275.45; 1825.5"/>
+  <gvxy_point X_Y="172.35; 2005.44"/>
+  <gvxy_point X_Y="135.; 1995.5"/>
+  <gvxy_point X_Y="135.; 1825.5"/>
+</gvxy>
+
+<gvxy name="LS_StructuralPlate_Cut14" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="173.8; 1028."/>
+  <gvxy_point X_Y="380.41; 1725.5"/>
+  <gvxy_point X_Y="40.; 1725.5"/>
+  <gvxy_point X_Y="40.; 1028."/>
+</gvxy>
+
+<subtraction  name="LS_StructuralPlateSub" >
+  <posXYZ   volume="LS_StructuralPlate_Main"   />
+  <posXYZ   volume="LS_StructuralPlate_Cut1" />
+  <posXYZ   volume="LS_StructuralPlate_Cut2" />
+  <posXYZ   volume="LS_StructuralPlate_Cut3" />
+  <posXYZ   volume="LS_StructuralPlate_Cut4" />
+  <posXYZ   volume="LS_StructuralPlate_Cut5" />
+  <posXYZ   volume="LS_StructuralPlate_Cut6" />
+  <posXYZ   volume="LS_StructuralPlate_Cut7" X_Y_Z="589.; 3235.5; 0." />
+  <posXYZ   volume="LS_StructuralPlate_Cut8" />
+  <posXYZ   volume="LS_StructuralPlate_Cut9" />
+  <posXYZ   volume="LS_StructuralPlate_Cut10" />
+  <posXYZ   volume="LS_StructuralPlate_Cut11" />
+  <posXYZ   volume="LS_StructuralPlate_Cut12" />
+  <posXYZ   volume="LS_StructuralPlate_Cut13" />
+  <posXYZ   volume="LS_StructuralPlate_Cut14" />
+</subtraction>
+
+<composition  name="LS_StructuralPlate" >
+  <posXYZ  volume="LS_StructuralPlateSub" />
+  <posXYZ  volume="LS_StructuralPlateSub" rot="0. ; 180. ; 0." />
+</composition>
+
+<box  name="LS_Central_reference_bar" material="Aluminium"  X_Y_Z="1704.; 100.; 27.8 " />
+
+<box  name="LS_Channel_section_L2000_Main" material="Aluminium"  X_Y_Z="50.; 2000.; 30. " />
+<box  name="LS_Channel_section_L2000_Cut" material="Aluminium"  X_Y_Z="40.; 2050.; 20. " />
+<subtraction  name="LS_Channel_section_L2000" >
+  <posXYZ   volume="LS_Channel_section_L2000_Main"   />
+  <posXYZ   volume="LS_Channel_section_L2000_Cut" />
+</subtraction>
+
+<box  name="LS_Channel_section_L1200_Main" material="Aluminium"  X_Y_Z="50.; 1200.; 30. " />
+<subtraction  name="LS_Channel_section_L1200" >
+  <posXYZ   volume="LS_Channel_section_L1200_Main"   />
+  <posXYZ   volume="LS_Channel_section_L2000_Cut" />
+</subtraction>
+
+<box  name="LS_Channel_section_L850_Main" material="Aluminium"  X_Y_Z="50.; 850.; 30. " />
+<subtraction  name="LS_Channel_section_L850" >
+  <posXYZ   volume="LS_Channel_section_L850_Main"   />
+  <posXYZ   volume="LS_Channel_section_L2000_Cut" />
+</subtraction>
+
+<box  name="LS_Channel_section_L1000_Main" material="Aluminium"  X_Y_Z="50.; 1000.; 30. " />
+<subtraction  name="LS_Channel_section_L1000" >
+  <posXYZ   volume="LS_Channel_section_L1000_Main"   />
+  <posXYZ   volume="LS_Channel_section_L2000_Cut" />
+</subtraction>
+
+<box  name="LS_UProfile_L1460_Main" material="Aluminium"  X_Y_Z="20.; 1460.; 30. " />
+<box  name="LS_UProfile_L1460_Cut" material="Aluminium"  X_Y_Z="20.; 1500.; 24. " />
+<subtraction  name="LS_UProfile_L1460" >
+  <posXYZ   volume="LS_UProfile_L1460_Main"   />
+  <posXYZ   volume="LS_UProfile_L1460_Cut" X_Y_Z="-3.; 0.; 0." />
+</subtraction>
+
+<box  name="LS_UProfile_L750_Main" material="Aluminium"  X_Y_Z="20.; 750.; 30. " />
+<subtraction  name="LS_UProfile_L750" >
+  <posXYZ   volume="LS_UProfile_L750_Main"   />
+  <posXYZ   volume="LS_UProfile_L1460_Cut" X_Y_Z="3.; 0.; 0." />
+</subtraction>
+
+<gvxy name="LS_Top_Interface" material="Aluminium" dZ="30.">
+  <gvxy_point X_Y="914.3; 3484.44"/>
+  <gvxy_point X_Y="1146.47; 3571.68"/>
+  <gvxy_point X_Y="1141.27; 3656.86"/>
+  <gvxy_point X_Y="1054.98; 3656.86"/>
+  <gvxy_point X_Y="1054.98; 4070."/>
+  <gvxy_point X_Y="813.64; 4070."/>
+  <gvxy_point X_Y="774.65; 3494.2"/>
+</gvxy>
+
+<gvxy name="LS_Bottom_Grabber_interface" material="Aluminium" dZ="30.">
+  <gvxy_point X_Y="-801.54; 2552.21"/>
+  <gvxy_point X_Y="-858.34; 2743.97"/>
+  <gvxy_point X_Y="-591.97; 2822.88"/>
+  <gvxy_point X_Y="-535.17; 2631.11"/>
+</gvxy>
+
+<gvxy name="LS_Bottom_Interface" material="Aluminium" dZ="30.">
+  <gvxy_point X_Y="-558.42; 1731.46"/>
+  <gvxy_point X_Y="-616.93; 1928.98"/>
+  <gvxy_point X_Y="-678.34; 1910.78"/>
+  <gvxy_point X_Y="-727.9; 1985.99"/>
+  <gvxy_point X_Y="-570.48; 2124.21"/>
+  <gvxy_point X_Y="-437.49; 2163.6"/>
+  <gvxy_point X_Y="-329.56; 1799.25"/>
+</gvxy>
+
+<box  name="LS_MM_Connectors" material="Aluminium"  X_Y_Z="76.; 40.; 30. " />
+<composition  name="LS_MM_Connectors_Assembly" >
+  <posXYZ  volume="LS_MM_Connectors" X_Y_Z="323.24; 1278.98; 0." rot="0. ; 0. ; -16.5" />
+  <posXYZ  volume="LS_MM_Connectors" X_Y_Z="596.23; 2200.58; 0." rot="0. ; 0. ; -16.5" />
+  <posXYZ  volume="LS_MM_Connectors" X_Y_Z="800.97; 2891.78; 0." rot="0. ; 0. ; -16.5" />
+  <posXYZ  volume="LS_MM_Connectors" X_Y_Z="922.31; 3368.81; 0." rot="0. ; 0. ; -4." />
+  <posXYZ  volume="LS_MM_Connectors" X_Y_Z="986.76; 4290.41; 0." rot="0. ; 0. ; -4." />
+  <posXYZ  volume="LS_MM_Connectors" X_Y_Z="824.; 4615.; 0." rot="0. ; 0. ; 90." />
+</composition>
+
+<box  name="LS_KM_Joint" material="ShieldSteel"  X_Y_Z="150.; 118.; 48. " />
+
+<composition  name="LS_Spacer_Frame_Assembly" >
+  <posXYZ  volume="LS_StructuralPlate" X_Y_Z="0.; 0.; 18." />
+  <posXYZ  volume="LS_StructuralPlate" X_Y_Z="0.; 0.; -18." />
+  <posXYZ  volume="LS_Central_reference_bar" X_Y_Z="0.; 3235.5; 0." />
+  <posXYZ  volume="LS_Channel_section_L2000" X_Y_Z="0.; 2185.49; 0." />
+  <posXYZ  volume="LS_Channel_section_L1200" X_Y_Z="0.; 3885.51; 0." />
+  <posXYZ  volume="LS_Channel_section_L850" X_Y_Z="130.5; 3710.51; 0." />
+  <posXYZ  volume="LS_Channel_section_L850" X_Y_Z="-130.5; 3710.51; 0." />
+  <posXYZ  volume="LS_Channel_section_L1000" X_Y_Z="130.5; 2223.; 0." />
+  <posXYZ  volume="LS_Channel_section_L1000" X_Y_Z="-130.5; 2223.; 0." />
+  <posXYZ  volume="LS_UProfile_L1460" X_Y_Z="252.; 2455.49; 0." />
+  <posXYZ  volume="LS_UProfile_L1460" X_Y_Z="-252.; 2455.49; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="LS_UProfile_L750" X_Y_Z="252.; 3760.5; 0." />
+  <posXYZ  volume="LS_UProfile_L750" X_Y_Z="-252.; 3760.5; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="LS_UProfile_L750" X_Y_Z="465.; 3760.5; 0." />
+  <posXYZ  volume="LS_UProfile_L750" X_Y_Z="-465.; 3760.5; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="LS_UProfile_L750" X_Y_Z="678.; 3760.5; 0." />
+  <posXYZ  volume="LS_UProfile_L750" X_Y_Z="-678.; 3760.5; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="LS_UProfile_L750" X_Y_Z="465.; 2551.; 0." />
+  <posXYZ  volume="LS_UProfile_L750" X_Y_Z="-465.; 2551.; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="LS_Top_Interface" X_Y_Z="0.; 0.; 0." />
+  <posXYZ  volume="LS_Top_Interface" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="LS_Bottom_Grabber_interface" X_Y_Z="0.; 0.; 0." rot="0. ; 0. ; 0." />
+  <posXYZ  volume="LS_Bottom_Grabber_interface" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="LS_Bottom_Interface" X_Y_Z="0.; 0.; 0." rot="0. ; 0. ; 0." />
+  <posXYZ  volume="LS_Bottom_Interface" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="LS_MM_Connectors_Assembly" X_Y_Z="0.; 0.; 0." rot="0. ; 0. ; 0." />
+  <posXYZ  volume="LS_MM_Connectors_Assembly" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="LS_MM_Connectors" X_Y_Z="0.; 956.; 0." rot="0. ; 0. ; 90." />
+  <posXYZ  volume="LS_MM_Connectors" X_Y_Z="0.; 4615.; 0." rot="0. ; 0. ; 90." />
+  <posXYZ  volume="LS_KM_Joint" X_Y_Z="-1130.01; 3970.; 0." rot="0. ; 0. ; 0." />
+  <posXYZ  volume="LS_KM_Joint" X_Y_Z="1130.01; 3970.; 0." rot="0. ; 0. ; 0." />
+  <posXYZ  volume="LS_KM_Joint" X_Y_Z="656.6; 1798.8; 0." rot="0. ; 0. ; -16.5" />
+</composition>
+
+<composition  name="LS" >
+  <posXYZ  volume="LS_Spacer_Frame_Assembly"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 0." />
+  <posXYZ  volume="LS_Spacer_Frame_Assembly"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 45." />
+  <posXYZ  volume="LS_Spacer_Frame_Assembly"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 90." />
+  <posXYZ  volume="LS_Spacer_Frame_Assembly"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 135." />
+  <posXYZ  volume="LS_Spacer_Frame_Assembly"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 180." />
+  <posXYZ  volume="LS_Spacer_Frame_Assembly"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 225." />
+  <posXYZ  volume="LS_Spacer_Frame_Assembly"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 270." />
+  <posXYZ  volume="LS_Spacer_Frame_Assembly"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 315." />
+</composition>
+<!-- LS Spacer Ftame -->
+
+<!-- SS Spacer Ftame -->
+<gvxy name="SS_StructuralPlate_Main" material="Aluminium" dZ="5.9">
+  <gvxy_point X_Y="154.8; 930."/>
+  <gvxy_point X_Y="745.; 4114.46"/>
+  <gvxy_point X_Y="745.; 4425."/>
+  <gvxy_point X_Y="0.01; 4425."/>
+  <gvxy_point X_Y="0.01; 930."/>
+</gvxy>
+
+<gvxy name="SS_StructuralPlate_Cut1" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="685.; 4242.5"/>
+  <gvxy_point X_Y="685.; 4375."/>
+  <gvxy_point X_Y="25.; 4375."/>
+  <gvxy_point X_Y="25.; 4242.5"/>
+</gvxy>
+
+<gvxy name="SS_StructuralPlate_Cut2" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="449.11; 4102.75"/>
+  <gvxy_point X_Y="446.87; 4122.5"/>
+  <gvxy_point X_Y="125.; 4122.5"/>
+  <gvxy_point X_Y="125.; 4028.36"/>
+</gvxy>
+
+<gvxy name="SS_StructuralPlate_Cut3" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="577.21; 3867.18"/>
+  <gvxy_point X_Y="620.57; 4101.07"/>
+  <gvxy_point X_Y="131.86; 3988.9"/>
+  <gvxy_point X_Y="131.86; 3969.4"/>
+</gvxy>
+
+<gvxy name="SS_StructuralPlate_Cut4" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="395.9; 3847.5"/>
+  <gvxy_point X_Y="398.14; 3867.25"/>
+  <gvxy_point X_Y="125.; 3929.94"/>
+  <gvxy_point X_Y="125.; 3847.5"/>
+</gvxy>
+
+<gvxy name="SS_StructuralPlate_Cut5" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="495.98; 3705.39"/>
+  <gvxy_point X_Y="495.98; 3747.5"/>
+  <gvxy_point X_Y="25.; 3747.5"/>
+  <gvxy_point X_Y="25.; 3475.7"/>
+</gvxy>
+
+<gvxy name="SS_StructuralPlate_Cut6" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="488.74; 3225.16"/>
+  <gvxy_point X_Y="576.8; 3700.3"/>
+  <gvxy_point X_Y="45.63; 3441.26"/>
+</gvxy>
+
+<gvxy name="SS_StructuralPlate_Cut7" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="408.58; 3177.5"/>
+  <gvxy_point X_Y="417.35; 3215.48"/>
+  <gvxy_point X_Y="25.; 3406.82"/>
+  <gvxy_point X_Y="25.; 3177.5"/>
+</gvxy>
+
+<box  name="SS_StructuralPlate_Cut8" material="Aluminium"  X_Y_Z="92.; 70.; 7. " />
+
+<gvxy name="SS_StructuralPlate_Cut9" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="429.19; 3037.5"/>
+  <gvxy_point X_Y="25.; 3037.5"/>
+  <gvxy_point X_Y="25.; 2483.96"/>
+</gvxy>
+
+<gvxy name="SS_StructuralPlate_Cut10" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="342.44; 2435.8"/>
+  <gvxy_point X_Y="445.53; 2992.05"/>
+  <gvxy_point X_Y="50.98; 2451.7"/>
+  <gvxy_point X_Y="59.05; 2435.8"/>
+</gvxy>
+
+<gvxy name="SS_StructuralPlate_Cut11" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="275.17; 2072.87"/>
+  <gvxy_point X_Y="330.64; 2372.16"/>
+  <gvxy_point X_Y="310.98; 2395.8"/>
+  <gvxy_point X_Y="39.37; 2395.8"/>
+</gvxy>
+
+<gvxy name="SS_StructuralPlate_Cut12" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="245.39; 2045.82"/>
+  <gvxy_point X_Y="25.; 2347.65"/>
+  <gvxy_point X_Y="25.; 2045.82"/>
+</gvxy>
+
+<gvxy name="SS_StructuralPlate_Cut13" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="144.83; 1534.74"/>
+  <gvxy_point X_Y="203.73; 1852.5"/>
+  <gvxy_point X_Y="125.; 1852.5"/>
+  <gvxy_point X_Y="125.; 1536.56"/>
+</gvxy>
+
+<gvxy name="SS_StructuralPlate_Cut14" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="123.38; 980."/>
+  <gvxy_point X_Y="201.04; 1399."/>
+  <gvxy_point X_Y="25.; 1399."/>
+  <gvxy_point X_Y="25.; 980."/>
+</gvxy>
+
+<subtraction  name="SS_StructuralPlateSub" >
+  <posXYZ   volume="SS_StructuralPlate_Main"   />
+  <posXYZ   volume="SS_StructuralPlate_Cut1" />
+  <posXYZ   volume="SS_StructuralPlate_Cut2" />
+  <posXYZ   volume="SS_StructuralPlate_Cut3" />
+  <posXYZ   volume="SS_StructuralPlate_Cut4" />
+  <posXYZ   volume="SS_StructuralPlate_Cut5" />
+  <posXYZ   volume="SS_StructuralPlate_Cut6" />
+  <posXYZ   volume="SS_StructuralPlate_Cut7" />
+  <posXYZ   volume="SS_StructuralPlate_Cut8" X_Y_Z="-340.5; 3107.5; 0." />
+  <posXYZ   volume="SS_StructuralPlate_Cut9" />
+  <posXYZ   volume="SS_StructuralPlate_Cut10" />
+  <posXYZ   volume="SS_StructuralPlate_Cut11" />
+  <posXYZ   volume="SS_StructuralPlate_Cut12" />
+  <posXYZ   volume="SS_StructuralPlate_Cut13" />
+  <posXYZ   volume="SS_StructuralPlate_Cut14" />
+</subtraction>
+
+<composition  name="SS_StructuralPlate" >
+  <posXYZ  volume="SS_StructuralPlateSub" X_Y_Z="0.; 0.; 0." rot="0. ; 0. ; 0." />
+  <posXYZ  volume="SS_StructuralPlateSub" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." />
+</composition>
+
+<box  name="SS_Central_reference_bar" material="Aluminium"  X_Y_Z="1012.; 100.; 28. " />
+
+<box  name="SS_Channel_section_L1100_Main" material="Aluminium"  X_Y_Z="50.; 1100.; 30. " />
+<subtraction  name="SS_Channel_section_L1100" >
+  <posXYZ   volume="SS_Channel_section_L1100_Main"   />
+  <posXYZ   volume="LS_Channel_section_L2000_Cut" />
+</subtraction>
+
+
+<box  name="SS_Channel_section_L650_Main" material="Aluminium"  X_Y_Z="50.; 650.; 30. " />
+<subtraction  name="SS_Channel_section_L650" >
+  <posXYZ   volume="SS_Channel_section_L650_Main"   />
+  <posXYZ   volume="LS_Channel_section_L2000_Cut" />
+</subtraction>
+
+<box  name="SS_UProfile_L1000_Main" material="Aluminium"  X_Y_Z="20.; 1000.; 30. " />
+<subtraction  name="SS_UProfile_L1000" >
+  <posXYZ   volume="SS_UProfile_L1000_Main"   />
+  <posXYZ   volume="LS_UProfile_L1460_Cut" X_Y_Z="-3.; 0.; 0." />
+</subtraction>
+
+<box  name="SS_UProfile_L920_Main" material="Aluminium"  X_Y_Z="20.; 920.; 30. " />
+<subtraction  name="SS_UProfile_L920" >
+  <posXYZ   volume="SS_UProfile_L920_Main"   />
+  <posXYZ   volume="LS_UProfile_L1460_Cut" X_Y_Z="-3.; 0.; 0." />
+</subtraction>
+
+<box  name="SS_UProfile_L1200_Main" material="Aluminium"  X_Y_Z="20.; 1200.; 30. " />
+<subtraction  name="SS_UProfile_L1200" >
+  <posXYZ   volume="SS_UProfile_L1200_Main"   />
+  <posXYZ   volume="LS_UProfile_L1460_Cut" X_Y_Z="-3.; 0.; 0." />
+</subtraction>
+
+<box  name="SS_UProfile_L700_Main" material="Aluminium"  X_Y_Z="20.; 700.; 30. " />
+<subtraction  name="SS_UProfile_L700" >
+  <posXYZ   volume="SS_UProfile_L700_Main"   />
+  <posXYZ   volume="LS_UProfile_L1460_Cut" X_Y_Z="-3.; 0.; 0." />
+</subtraction>
+
+<gvxy name="SS_Top_Interface" material="Aluminium" dZ="30.">
+  <gvxy_point X_Y="849.99; 3705.17"/>
+  <gvxy_point X_Y="849.99; 4260."/>
+  <gvxy_point X_Y="627.69; 4260."/>
+  <gvxy_point X_Y="627.69; 4106.34"/>
+  <gvxy_point X_Y="564.77; 3758.03"/>
+</gvxy>
+
+<gvxy name="SS_Bottom_Grabber_interface" material="Aluminium" dZ="30.">
+  <gvxy_point X_Y="454.99; 1875."/>
+  <gvxy_point X_Y="454.99; 2075."/>
+  <gvxy_point X_Y="255.; 2075."/>
+  <gvxy_point X_Y="255.; 1875."/>
+</gvxy>
+
+<gvxy name="SS_Bottom_Interface" material="Aluminium" dZ="30.">
+  <gvxy_point X_Y="442.2; 1397.5"/>
+  <gvxy_point X_Y="442.2; 1560.65"/>
+  <gvxy_point X_Y="397.; 1560.65"/>
+  <gvxy_point X_Y="397.; 1792.5"/>
+  <gvxy_point X_Y="194.29; 1792.5"/>
+  <gvxy_point X_Y="149.53; 1434.71"/>
+  <gvxy_point X_Y="204.54; 1397.5"/>
+</gvxy>
+
+<box  name="SS_MM_Connectors" material="Aluminium"  X_Y_Z="76.; 40.; 30. " />
+<box  name="SS_MM_Connectors_Lar" material="Aluminium"  X_Y_Z="120.; 40.; 30. " />
+<composition  name="SS_MM_Connectors_Assembly" >
+  <posXYZ  volume="SS_MM_Connectors" X_Y_Z="214.86; 1243.14; 0." rot="0. ; 0. ; -10.5" />
+  <posXYZ  volume="SS_MM_Connectors" X_Y_Z="376.17; 2113.54; 0." rot="0. ; 0. ; -10.5" />
+  <posXYZ  volume="SS_MM_Connectors" X_Y_Z="497.16; 2766.34; 0." rot="0. ; 0. ; -10.5" />
+  <posXYZ  volume="SS_MM_Connectors" X_Y_Z="626.36; 3463.34; 0." rot="0. ; 0. ; -10.5" />
+  <posXYZ  volume="SS_MM_Connectors_Lar" X_Y_Z="766.02; 4337.75; 0." rot="0. ; 0. ; -10.5" />
+  <posXYZ  volume="SS_MM_Connectors" X_Y_Z="624.; 4427.; 0." rot="0. ; 0. ; 90." />
+</composition>
+
+<box  name="SS_KM_Joint" material="ShieldSteel"  X_Y_Z="154.; 101.; 48. " />
+
+<composition  name="SS_Spacer_Frame_Assembly" >
+  <posXYZ  volume="SS_StructuralPlate" X_Y_Z="0.; 0.; 18." />
+  <posXYZ  volume="SS_StructuralPlate" X_Y_Z="0.; 0.; -18." />
+  <posXYZ  volume="SS_Central_reference_bar" X_Y_Z="0.; 3107.5; 0." />
+  <posXYZ  volume="LS_Channel_section_L2000" X_Y_Z="0.; 2057.49; 0." />
+  <posXYZ  volume="SS_Channel_section_L1100" X_Y_Z="0.; 3707.51; 0." />
+  <posXYZ  volume="SS_Channel_section_L1100" X_Y_Z="-110.5; 3707.51; 0." />
+  <posXYZ  volume="SS_Channel_section_L1100" X_Y_Z="110.5; 3707.51; 0." />
+  <posXYZ  volume="SS_Channel_section_L650" X_Y_Z="-110.5; 1722.; 0." />
+  <posXYZ  volume="SS_Channel_section_L650" X_Y_Z="110.5; 1722.; 0." />
+  <posXYZ  volume="SS_UProfile_L1000" X_Y_Z="-345.; 3742.5; 0." />
+  <posXYZ  volume="SS_UProfile_L1000" X_Y_Z="345.; 3742.5; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="SS_UProfile_L920" X_Y_Z="-195.; 3782.5; 0." />
+  <posXYZ  volume="SS_UProfile_L920" X_Y_Z="195.; 3782.5; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="SS_UProfile_L1200" X_Y_Z="-195.; 2457.49; 0." />
+  <posXYZ  volume="SS_UProfile_L1200" X_Y_Z="195.; 2457.49; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="SS_UProfile_L700" X_Y_Z="-360.; 2587.5; 0." />
+  <posXYZ  volume="SS_UProfile_L700" X_Y_Z="360.; 2587.5; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="SS_Top_Interface" X_Y_Z="0.; 0.; 0." />
+  <posXYZ  volume="SS_Top_Interface" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="SS_Bottom_Grabber_interface" X_Y_Z="0.; 0.; 0." rot="0. ; 0. ; 0." />
+  <posXYZ  volume="SS_Bottom_Grabber_interface" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="SS_Bottom_Interface" X_Y_Z="0.; 0.; 0." rot="0. ; 0. ; 0." />
+  <posXYZ  volume="SS_Bottom_Interface" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="SS_MM_Connectors_Assembly" X_Y_Z="0.; 0.; 0." rot="0. ; 0. ; 0." />
+  <posXYZ  volume="SS_MM_Connectors_Assembly" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="SS_MM_Connectors" X_Y_Z="0.; 928.; 0." rot="0. ; 0. ; 90." />
+  <posXYZ  volume="SS_MM_Connectors" X_Y_Z="0.; 4427.; 0." rot="0. ; 0. ; 90." />
+  <posXYZ  volume="SS_KM_Joint" X_Y_Z="-927.01; 4160.; 0." rot="0. ; 0. ; 0." />
+  <posXYZ  volume="SS_KM_Joint" X_Y_Z="927.01; 4160.; 0." rot="0. ; 0. ; 0." />
+  <posXYZ  volume="SS_KM_Joint" X_Y_Z="-532.01; 1975.; 0." rot="0. ; 0. ; 0." />
+</composition>
+
+<composition  name="SS_AssemblyRot" >
+  <posXYZ  volume="SS_Spacer_Frame_Assembly"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 22.5" />
+</composition>
+
+<composition  name="SS" >
+  <posXYZ  volume="SS_AssemblyRot"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 0." />
+  <posXYZ  volume="SS_AssemblyRot"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 45." />
+  <posXYZ  volume="SS_AssemblyRot"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 90." />
+  <posXYZ  volume="SS_AssemblyRot"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 135." />
+  <posXYZ  volume="SS_AssemblyRot"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 180." />
+  <posXYZ  volume="SS_AssemblyRot"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 225." />
+  <posXYZ  volume="SS_AssemblyRot"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 270." />
+  <posXYZ  volume="SS_AssemblyRot"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 315." />
+</composition>
+<!-- End SS Spacer_Frame-->
+
+<composition  name="LS_and_SS_SideA" >
+  <posXYZ  volume="LS"  X_Y_Z="0.; 0.; 7641." rot=" 0. ; 0. ; 0." />
+  <posXYZ  volume="SS"  X_Y_Z="0.; 0.; 7177." rot=" 0. ; 0. ; 0." />
+</composition>
+
+<composition  name="LS_and_SS_SideC" >
+  <posXYZ  volume="LS"  X_Y_Z="0.; 0.; -7641." rot=" 0. ; 0. ; 0." />
+  <posXYZ  volume="SS"  X_Y_Z="0.; 0.; -7177." rot=" 0. ; 0. ; 0." />
+</composition>
+
+<!-- ================================================ LS/SS Frames ========================================= -->
+<!-- SS_Frame -->
+<gvxysx name="SS_Frame_Main" material="muo::FR4" dZ="10.4">
+    <gvxy_point X_Y="172.6; 911.2"/>
+    <gvxy_point X_Y="172.6; 986.2"/>
+    <gvxy_point X_Y="235.1; 1403.7"/>
+    <gvxy_point X_Y="348.7; 1386.7"/>
+    <gvxy_point X_Y="366.4; 1505.4"/>
+    <gvxy_point X_Y="252.7; 1522.4"/>
+    <gvxy_point X_Y="582.3; 3727.8"/>
+    <gvxy_point X_Y="795.; 3696.1"/>
+    <gvxy_point X_Y="812.7; 3814.8"/>
+    <gvxy_point X_Y="600.1; 3846.5"/>
+    <gvxy_point X_Y="688.2; 4436.4"/>
+</gvxysx>
+
+<gvxysx name="SS_Frame_Sub1" material="muo::FR4" dZ="11.">
+    <gvxy_point X_Y="470.5; 3486.4"/>
+    <gvxy_point X_Y="601.2; 4361.4"/>
+</gvxysx>
+
+<gvxysx name="SS_Frame_Sub2" material="muo::FR4" dZ="11.">
+    <gvxy_point X_Y="290.5; 2282.6"/>
+    <gvxy_point X_Y="452.5; 3366.4"/>
+</gvxysx>
+
+<gvxysx name="SS_Frame_Sub3" material="muo::FR4" dZ="11.">
+    <gvxy_point X_Y="96.8; 986.2"/>
+    <gvxy_point X_Y="272.6; 2162.6"/>
+</gvxysx>
+
+<subtraction name="SS_Frame" >
+    <posXYZ volume="SS_Frame_Main" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.;0."/>
+    <posXYZ volume="SS_Frame_Sub1" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.;0."/>
+    <posXYZ volume="SS_Frame_Sub2" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.;0."/>
+    <posXYZ volume="SS_Frame_Sub3" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.;0."/>
+</subtraction>
+
+<tubs name="LM_SS_Fixed_Interfaces_main" material="ShieldSteel" Rio_Z="0.; 37.5; 410." nbPhi="32"/>
+
+<box name="LM_SS_Fixed_Interfaces_Subtr" material="ShieldSteel" X_Y_Z="80.; 130.; 31."/>
+
+<subtraction name="LM_SS_Fixed_Interfaces" >
+    <posXYZ volume="LM_SS_Fixed_Interfaces_main" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.;0."/>
+    <posXYZ volume="LM_SS_Fixed_Interfaces_Subtr" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.;0."/>
+</subtraction>
+
+<composition  name="SS_Frame_Assembly" >
+    <posXYZ volume="SS_Frame" X_Y_Z=" 0.; 0.; 136.8" rot=" 0.; 0.; 0." />
+    <posXYZ volume="SS_Frame" X_Y_Z=" 0.; 0.; -136.8" rot=" 0.; 0.; 0." />
+    <posXYZ volume="SS_Frame" X_Y_Z=" 0.; 0.; 197.2" rot=" 0.; 0.; 0." />
+    <posXYZ volume="SS_Frame" X_Y_Z=" 0.; 0.; -197.2" rot=" 0.; 0.; 0." />
+    <posXYZ volume="LM_SS_Fixed_Interfaces" X_Y_Z=" 846.; 3749.; 0." rot=" 0.; 0.; 0." />
+    <posXYZ volume="LM_SS_Fixed_Interfaces" X_Y_Z=" -846.; 3749.; 0." rot=" 0.; 0.; 0." />
+    <posXYZ volume="LM_SS_Fixed_Interfaces" X_Y_Z=" -399.7; 1439.7; 0." rot=" 0.; 0.; 0." />
+</composition>
+
+<composition  name="SS_Frame_Assembly_Pos" >
+    <posXYZ volume="SS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 22.5" />
+    <posXYZ volume="SS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 67.5" />
+    <posXYZ volume="SS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 112.5" />
+    <posXYZ volume="SS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 157.5" />
+    <posXYZ volume="SS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 202.5" />
+    <posXYZ volume="SS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 247.5" />
+    <posXYZ volume="SS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 292.5" />
+    <posXYZ volume="SS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 337.5" />
+</composition>
+<!-- End SS_Frame -->
+
+<!-- LS_Frame -->
+<gvxysx name="LS_Frame_Main" material="muo::FR4" dZ="10.6">
+    <gvxy_point X_Y="277.29; 940."/>
+    <gvxy_point X_Y="277.29; 1015."/>
+    <gvxy_point X_Y="495.6; 1890.3"/>
+    <gvxy_point X_Y="665.5; 1890.3"/>
+    <gvxy_point X_Y="695.4; 2010.2"/>
+    <gvxy_point X_Y="525.5; 2010.2"/>
+    <gvxy_point X_Y="923.57; 3606.2"/>
+    <gvxy_point X_Y="1083.2; 3566.4"/>
+    <gvxy_point X_Y="1112.2; 3682.8"/>
+    <gvxy_point X_Y="952.6; 3722.6"/>
+    <gvxy_point X_Y="1040.5; 4075."/>
+    <gvxy_point X_Y="1040.5; 4622."/>
+</gvxysx>
+
+<gvxysx name="LS_Frame_Sub1" material="muo::FR4" dZ="11.">
+    <gvxy_point X_Y="965.5; 4547."/>
+    <gvxy_point X_Y="965.5; 4085."/>
+    <gvxy_point X_Y="825.; 3525."/>
+</gvxysx>
+
+<gvxysx name="LS_Frame_Sub2" material="muo::FR4" dZ="11.">
+    <gvxy_point X_Y="796.; 3405."/>
+    <gvxy_point X_Y="525.; 2317.8"/>
+</gvxysx>
+
+<gvxysx name="LS_Frame_Sub3" material="muo::FR4" dZ="11.">
+    <gvxy_point X_Y="494.9; 2197.8"/>
+    <gvxy_point X_Y="200.; 1015."/>
+</gvxysx>
+
+<subtraction name="LS_Frame" >
+    <posXYZ volume="LS_Frame_Main" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.;0."/>
+    <posXYZ volume="LS_Frame_Sub1" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.;0."/>
+    <posXYZ volume="LS_Frame_Sub2" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.;0."/>
+    <posXYZ volume="LS_Frame_Sub3" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.;0."/>
+</subtraction>
+
+<tubs name="LM_LS_Fixed_Interfaces_main" material="ShieldSteel" Rio_Z="0.; 37.4; 410." nbPhi="32"/>
+
+<subtraction name="LM_LS_Fixed_Interfaces" >
+    <posXYZ volume="LM_LS_Fixed_Interfaces_main" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.;0."/>
+    <posXYZ volume="LM_SS_Fixed_Interfaces_Subtr" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.;0."/>
+</subtraction>
+
+<composition  name="LS_Frame_Assembly" >
+    <posXYZ volume="LS_Frame" X_Y_Z=" 0.; 0.; 136.7" rot=" 0.; 0.; 0." />
+    <posXYZ volume="LS_Frame" X_Y_Z=" 0.; 0.; -136.7" rot=" 0.; 0.; 0." />
+    <posXYZ volume="LS_Frame" X_Y_Z=" 0.; 0.; 197.3" rot=" 0.; 0.; 0." />
+    <posXYZ volume="LS_Frame" X_Y_Z=" 0.; 0.; -197.3" rot=" 0.; 0.; 0." />
+    <posXYZ volume="LM_LS_Fixed_Interfaces" X_Y_Z=" 1139.32; 3615.; 0." rot=" 0.; 0.; 0." />
+    <posXYZ volume="LM_LS_Fixed_Interfaces" X_Y_Z=" -1139.32; 3615.; 0." rot=" 0.; 0.; 0." />
+    <posXYZ volume="LM_LS_Fixed_Interfaces" X_Y_Z=" -720.55; 1935.83; 0." rot=" 0.; 0.; 0." />
+</composition>
+
+<composition  name="LS_Frame_Assembly_Pos" >
+    <posXYZ volume="LS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 0." />
+    <posXYZ volume="LS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 45." />
+    <posXYZ volume="LS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 90." />
+    <posXYZ volume="LS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 135." />
+    <posXYZ volume="LS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 180." />
+    <posXYZ volume="LS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 225." />
+    <posXYZ volume="LS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 270." />
+    <posXYZ volume="LS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 315." />
+</composition>
+<!-- End LS_Frame -->
+
+<composition  name="NSW_Spacer" >
+  <!-- Aside -->
+  <posXYZ  volume="LS_and_SS_SideA" />
+  <posXYZ volume="SS_Frame_Assembly_Pos" X_Y_Z=" 0.; 0.; 7177." rot=" 0.; 0.; 0." />
+  <posXYZ volume="LS_Frame_Assembly_Pos" X_Y_Z=" 0.; 0.; 7641." rot=" 0.; 0.; 0." />
+  <!-- Cside -->
+  <posXYZ  volume="LS_and_SS_SideC" />
+  <posXYZ volume="SS_Frame_Assembly_Pos" X_Y_Z=" 0.; 0.; -7177." rot=" 0.; 0.; 0." />
+  <posXYZ volume="LS_Frame_Assembly_Pos" X_Y_Z=" 0.; 0.; -7641." rot=" 0.; 0.; 0." />
+</composition>
+
+</section>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<!--====================================Support Structures and Hub===============================================-->
+
+<section name       = "NSW Aluminum Structure and HUB"
+         version    = "0.0"
+         date       = "25-04-2017"
+         author     = "Georgian Engineering Team - Niko Tsutskiridze"
+         top_volume = "NSW_Aluminum_Structure_and_HUB">
+
+<!-- ********************************************** New Hub ************************************************** -->
+
+<!-- Horizontal Shielding -->
+<gvxysx name="Hub_Outer_Plate1" material="Lead" dZ="517.5">
+  <gvxy_point X_Y="-163.1; 820.05"/>
+  <gvxy_point X_Y=" -169.25; 850.95"/>
+</gvxysx>
+
+ <gvxysx name="Hub_Outer_Plate2" material="PolyBoron207HD5" dZ="517.5">
+  <gvxy_point X_Y="-163.1; 820."/>
+  <gvxy_point X_Y=" -153.15; 770."/>
+</gvxysx>
+
+<gvxysx name="Hub_Outer_Plate3" material="Lead" dZ="504.">
+  <gvxy_point X_Y="-163.1; 820.05"/>
+  <gvxy_point X_Y=" -169.25; 850.95"/>
+</gvxysx>
+
+<gvxysx name="Hub_Outer_Plate4" material="PolyBoron207HD5" dZ="545.">
+  <gvxy_point X_Y="-163.1; 820."/>
+  <gvxy_point X_Y=" -153.15; 770."/>
+</gvxysx>
+
+<gvxysx name="Hub_Outer_Plate5" material="Lead" dZ="30.">
+  <gvxy_point X_Y="-163.1; 820.05"/>
+  <gvxy_point X_Y=" -169.25; 850.95"/>
+</gvxysx>
+
+<gvxysx name="Hub_Outer_Plate6" material="PolyBoron207HD5" dZ="30.">
+  <gvxy_point X_Y="-163.1; 820."/>
+  <gvxy_point X_Y=" -153.15; 770."/>
+</gvxysx>
+
+<gvxysx name="Hub_Outer_Plate7" material="Lead" dZ="85.">
+  <gvxy_point X_Y="-163.1; 820.05"/>
+  <gvxy_point X_Y=" -169.25; 850.95"/>
+</gvxysx>
+
+<gvxysx name="Hub_Outer_Plate8" material="PolyBoron207HD5" dZ="126.">
+<gvxy_point X_Y="-163.1; 820."/>
+  <gvxy_point X_Y=" -153.15; 770."/>
+</gvxysx>
+
+<composition  name="Horizontal_Shielding_ForRot_Spec" >
+  <posXYZ  volume="Hub_Outer_Plate5"  X_Y_Z="0.; 0.; 908.2" />
+  <posXYZ  volume="Hub_Outer_Plate6"  X_Y_Z="0.; 0.; 908.2" />
+</composition>
+
+<composition  name="Horizontal_Shielding_ForRot_Spec2" >
+  <posXYZ  volume="Hub_Outer_Plate3"  X_Y_Z="0.; 0.; 248.7" rot="   0. ; 0. ; 22.5" />
+  <posXYZ  volume="Hub_Outer_Plate4"  X_Y_Z="0.; 0.; 228.2" rot="   0. ; 0. ; 22.5" />
+</composition>
+
+<composition  name="Horizontal_Shielding_ForRot" >
+  <posXYZ  volume="Hub_Outer_Plate1"  X_Y_Z="0.; 0.; 643.45" />
+  <posXYZ  volume="Hub_Outer_Plate2"  X_Y_Z="0.; 0.; 643.45" />
+  <posXYZ  volume="Horizontal_Shielding_ForRot_Spec2" />
+  <posXYZ  volume="Hub_Outer_Plate7"  X_Y_Z="0.; 0.; 39.2" />
+  <posXYZ  volume="Hub_Outer_Plate8"  X_Y_Z="0.; 0.; 18.7" />
+</composition>
+
+<composition  name="Horizontal_Shielding" >
+  <posXYZ  volume="Horizontal_Shielding_ForRot"  rot="   0. ; 0. ; 0." />
+  <posXYZ  volume="Horizontal_Shielding_ForRot"  rot="   0. ; 0. ; 45." />
+  <posXYZ  volume="Horizontal_Shielding_ForRot"  rot="   0. ; 0. ; 90." />
+  <posXYZ  volume="Horizontal_Shielding_ForRot"  rot="   0. ; 0. ; 135." />
+  <posXYZ  volume="Horizontal_Shielding_ForRot"  rot="   0. ; 0. ; 180." />
+  <posXYZ  volume="Horizontal_Shielding_ForRot"  rot="   0. ; 0. ; 225." />
+  <posXYZ  volume="Horizontal_Shielding_ForRot"  rot="   0. ; 0. ; 270." />
+  <posXYZ  volume="Horizontal_Shielding_ForRot"  rot="   0. ; 0. ; 315." />
+  <posXYZ  volume="Horizontal_Shielding_ForRot_Spec"  rot="   0. ; 0. ; 22.5" />
+  <posXYZ  volume="Horizontal_Shielding_ForRot_Spec"  rot="   0. ; 0. ; 67.5" />
+  <posXYZ  volume="Horizontal_Shielding_ForRot_Spec"  rot="   0. ; 0. ; -22.5" />
+  <posXYZ  volume="Horizontal_Shielding_ForRot_Spec"  rot="   0. ; 0. ; -67.5" />
+</composition>
+<!-- End Horizontal Shielding (New Hub) -->
+
+<!-- Other Parts of New Hub -->
+<pcon name="HUB_Extension_inner_tube" material="ShieldSteel" nbPhi="20">
+  <polyplane Rio_Z="172.; 225.; 997.75"/>
+  <polyplane Rio_Z=" 152.3; 225.; 0."/>
+</pcon>
+<tubs   name="HUB_Extension_plate_HO_side"      material="ShieldSteel"   Rio_Z="172.5; 530.; 59.2" />
+<tubs   name="Copper_disk_Extension"      material="Copper"   Rio_Z="225.5; 454.5; 998." />
+<tubs   name="HUB_Extension_outer_tube"      material="ShieldSteel"   Rio_Z="455.5; 530.; 998.7" />
+
+<pcon name="HUB_Main_part_inner_tube" material="ShieldSteel" nbPhi="20">
+  <polyplane Rio_Z="148.7; 225.; 858.5"/>
+  <polyplane Rio_Z=" 137.; 225.; 0."/>
+</pcon>
+
+<tubs   name="Copper_disk_Main_part"      material="Copper"   Rio_Z="225.5; 699.5; 760." />
+
+<gvxysxy name="Plate_IP_Main" material="ShieldSteel" dZ="91.6">
+  <gvxy_point X_Y="769.95; 153.16"/>
+  <gvxy_point X_Y="652.77; 436.16"/>
+  <gvxy_point X_Y="436.16; 652.77"/>
+  <gvxy_point X_Y="153.16; 769.95"/>
+</gvxysxy>
+
+<tubs   name="Plate_IP_Cut_Tube"      material="ShieldSteel"   Rio_Z="0.; 226.; 95." />
+
+<subtraction  name="Plate_IP" >
+  <posXYZ   volume="Plate_IP_Main"   />
+  <posXYZ   volume="Plate_IP_Cut_Tube" />
+</subtraction>
+
+<gvxysxy name="HUB_Main_part_outer_tube_Main" material="ShieldSteel" dZ="767.7">
+  <gvxy_point X_Y="769.95; 153.16"/>
+  <gvxy_point X_Y="652.77; 436.16"/>
+  <gvxy_point X_Y="436.16; 652.77"/>
+  <gvxy_point X_Y="153.16; 769.95"/>
+</gvxysxy>
+
+<tubs   name="HUB_Main_part_outer_tube_Cut_Tube"      material="ShieldSteel"   Rio_Z="0.; 700.; 770." />
+
+<subtraction  name="HUB_Main_part_outer_tube" >
+  <posXYZ   volume="HUB_Main_part_outer_tube_Main"   />
+  <posXYZ   volume="HUB_Main_part_outer_tube_Cut_Tube" />
+</subtraction>
+
+<gvxysxy name="Plate_HO_Main" material="ShieldSteel" dZ="78.">
+  <gvxy_point X_Y="769.95; 153.16"/>
+  <gvxy_point X_Y="652.77; 436.16"/>
+  <gvxy_point X_Y="436.16; 652.77"/>
+  <gvxy_point X_Y="153.16; 769.95"/>
+</gvxysxy>
+
+<tubs   name="Plate_HO_Cut_Tube"      material="ShieldSteel"   Rio_Z="0.; 150.5; 80." />
+
+<subtraction  name="Plate_HO" >
+  <posXYZ   volume="Plate_HO_Main"   />
+  <posXYZ   volume="Plate_HO_Cut_Tube" />
+</subtraction>
+
+<tubs name="Plate_HO_SupportTube" material="ShieldSteel" Rio_Z="585.; 770.; 21.4" profile="-15.; 210." nbPhi="20"/>
+
+<tubs   name="Disque_shileding_ext"      material="PolyBoron207HD5"   Rio_Z="532.5; 800.; 40." />
+<tubs   name="Plaque_polyboron_droite_v2"      material="PolyBoron207HD5"   Rio_Z="532.5; 582.5; 200." />
+
+<composition  name="Hub_Other_Parts_Assembly" >
+  <posXYZ  volume="HUB_Extension_plate_HO_side"  X_Y_Z="0.; 0.; 1920.6" />
+  <posXYZ  volume="HUB_Extension_inner_tube"  X_Y_Z="0.; 0.; 892.25" />
+  <posXYZ  volume="Copper_disk_Extension"  X_Y_Z="0.; 0.; 1391.95" />
+  <posXYZ  volume="HUB_Extension_outer_tube"  X_Y_Z="0.; 0.; 1391.6" />
+  <posXYZ  volume="HUB_Main_part_inner_tube"  X_Y_Z="0.; 0.; -45.8" />
+  <posXYZ  volume="Copper_disk_Main_part"  X_Y_Z="0.; 0.; 434.2" />
+  <posXYZ  volume="Plate_IP" />
+  <posXYZ  volume="HUB_Main_part_outer_tube"  X_Y_Z="0.; 0.; 430.3" />
+  <posXYZ  volume="Disque_shileding_ext"  X_Y_Z="0.; 0.; 944.2" />
+  <posXYZ  volume="Plaque_polyboron_droite_v2"  X_Y_Z="0.; 0.; 1064.25" />
+  <posXYZ  volume="Plate_HO"  X_Y_Z="0.; 0.; 853.2" />
+  <posXYZ  volume="Plate_HO_SupportTube"  X_Y_Z="0.; 0.; 902.95" />
+</composition>
+<!-- End Other Parts of New Hub -->
+
+<composition  name="New_Hub" >
+  <posXYZ  volume="Hub_Other_Parts_Assembly" />
+  <posXYZ  volume="Horizontal_Shielding" />
+</composition>
+<!-- ************************************************************************************** End New Hub *********************************************** -->
+
+<!-- **************************************************** Inner Spoke ******************************************************************* -->
+<gvxysx name="Base_Leg" material="Aluminium" dZ="390.">
+  <gvxy_point X_Y="40.; 531.5"/>
+  <gvxy_point X_Y=" 40.; -501.5"/>
+  <gvxy_point X_Y="150.; -501.5"/>
+  <gvxy_point X_Y=" 150.; -531.5"/>
+</gvxysx>
+
+<gvxy name="JOINING_BAR3" material="Aluminium" dZ="150.">
+  <gvxy_point X_Y="75.; 23."/>
+  <gvxy_point X_Y="75.; 7."/>
+  <gvxy_point X_Y="640.; 7."/>
+  <gvxy_point X_Y="640.; -23."/>
+  <gvxy_point X_Y="-640.; -23."/>
+  <gvxy_point X_Y="-640.; 7."/>
+  <gvxy_point X_Y="-75.; 7."/>
+  <gvxy_point X_Y="-75.; 23."/>
+</gvxy>
+
+<box  name="LATERAL_PLATE_L"      material="Aluminium"  X_Y_Z="21.; 1680.; 390. " />
+
+<gvxysx name="Front_plate2" material="Aluminium" dZ="14.">
+  <gvxy_point X_Y="98.65; 2867.18"/>
+  <gvxy_point X_Y=" 89.94; 2805.19"/>
+  <gvxy_point X_Y="89.94; 2587.18"/>
+</gvxysx>
+
+<gvxysx name="LS_OUTER3_MainBox" material="Aluminium" dZ="30.">
+  <gvxy_point X_Y="323.7; 450."/>
+  <gvxy_point X_Y=" 197.21; -450."/>
+</gvxysx>
+
+<box  name="LS_OUTER3_CutBox"      material="Aluminium"  X_Y_Z="250.; 600.; 35. " />
+
+<subtraction  name="LS_OUTER3" >
+  <posXYZ   volume="LS_OUTER3_MainBox"  />
+  <posXYZ   volume="LS_OUTER3_CutBox"  X_Y_Z=" 0.; -50.; 0. " />
+</subtraction>
+
+<gvxysx name="REAR_PLATE1" material="Aluminium" dZ="30.">
+  <gvxy_point X_Y="176.95; 309.25"/>
+  <gvxy_point X_Y=" 90.03; -309.25"/>
+</gvxysx>
+
+<gvxy name="REAR_PLATE2" material="Aluminium" dZ="30.">
+ <gvxy_point X_Y="273.95; 174.5"/>
+  <gvxy_point X_Y="224.9; -174.5"/>
+  <gvxy_point X_Y="125.; -174.5"/>
+  <gvxy_point X_Y="125.; -154.5"/>
+  <gvxy_point X_Y="-125.; -154.5"/>
+  <gvxy_point X_Y="-125.; -174.5"/>
+  <gvxy_point X_Y="-224.9; -174.5"/>
+  <gvxy_point X_Y="-273.95; 174.5"/>
+</gvxy>
+
+<box  name="SHIM1"      material="Aluminium"  X_Y_Z="700.; 150.; 21.6 " />
+<box  name="SHIM2"      material="Aluminium"  X_Y_Z="350.; 150.; 21.6 " />
+
+<gvxysx name="REAR_PLATE3" material="Aluminium" dZ="30.">
+  <gvxy_point X_Y="323.7; 80."/>
+  <gvxy_point X_Y=" 301.21; -80."/>
+</gvxysx>
+
+<box  name="KM_FRONT_PLATE1"      material="ShieldSteel"  X_Y_Z="34.; 160.; 250. " />
+<box  name="KM_LOCKING_PLATE1"      material="ShieldSteel"  X_Y_Z="20.; 120.; 200. " />
+
+<gvxy name="JOINING_BAR2" material="Aluminium" dZ="29.">
+  <gvxy_point X_Y="175.; 75."/>
+  <gvxy_point X_Y="964.81; -64.27"/>
+  <gvxy_point X_Y="938.77; -211.99"/>
+  <gvxy_point X_Y="161.88; -75."/>
+  <gvxy_point X_Y="-161.88; -75."/>
+  <gvxy_point X_Y="-938.77; -211.99"/>
+  <gvxy_point X_Y="-964.81; -64.27"/>
+  <gvxy_point X_Y="-175.; 75."/>
+</gvxy>
+
+<gvxy name="JOINING_BAR1" material="Aluminium" dZ="29.">
+  <gvxy_point X_Y="350.; 75."/>
+  <gvxy_point X_Y="1196.93; -74.34"/>
+  <gvxy_point X_Y="1170.88; -222.06"/>
+  <gvxy_point X_Y="336.88; -75."/>
+  <gvxy_point X_Y="-336.88; -75."/>
+  <gvxy_point X_Y="-1170.88; -222.06"/>
+  <gvxy_point X_Y="-1196.93; -74.34"/>
+  <gvxy_point X_Y="-350.; 75."/>
+</gvxy>
+
+<composition  name="Inner_Spoke_Assembly" >
+  <posXYZ  volume="Base_Leg"  X_Y_Z="0.; 1301.5; 0." />
+  <posXYZ  volume="JOINING_BAR1"  X_Y_Z="0.; 4385.; -231.2" />
+  <posXYZ  volume="JOINING_BAR2"  X_Y_Z="0.; 3065.; -231.2" />
+  <posXYZ  volume="JOINING_BAR3"  X_Y_Z="0.; 1715.; -218.05" rot="   90. ; 0. ; 0." />
+  <posXYZ  volume="LATERAL_PLATE_L"  X_Y_Z="-217.3; 3635.56; 0." rot="   0. ; 0. ; 8." />
+  <posXYZ  volume="LATERAL_PLATE_L"  X_Y_Z="217.3; 3635.56; 0." rot="   0. ; 0. ; -8." />
+  <posXYZ  volume="Front_plate2"  X_Y_Z="0.; 0.; 188." />
+  <posXYZ  volume="LS_OUTER3"  X_Y_Z="0.; 4018.41; 180." />
+  <posXYZ  volume="REAR_PLATE1"  X_Y_Z="0.; 3114.99; -180." />
+  <posXYZ  volume="REAR_PLATE2"  X_Y_Z="0.; 3939.93; -180." />
+  <posXYZ  volume="REAR_PLATE3"  X_Y_Z="0.; 4388.42; -180." />
+  <posXYZ  volume="SHIM1"  X_Y_Z="0.; 4385.; -205.85" />
+  <posXYZ  volume="SHIM2"  X_Y_Z="0.; 3065.; -205.85" />
+  <posXYZ  volume="KM_FRONT_PLATE1"  X_Y_Z="318.34; 4156.56; 25." rot="   0. ; 0. ; -8." />
+  <posXYZ  volume="KM_FRONT_PLATE1"  X_Y_Z="-318.34; 4156.56; 25." rot="   0. ; 0. ; 8." />
+  <posXYZ  volume="KM_LOCKING_PLATE1"  X_Y_Z="270.71; 4163.26; 0." rot="   0. ; 0. ; -8." />
+  <posXYZ  volume="KM_LOCKING_PLATE1"  X_Y_Z="-270.71; 4163.26; 0." rot="   0. ; 0. ; 8." />
+</composition>
+
+<composition  name="Inner_Spoke" >
+  <posXYZ  volume="Inner_Spoke_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 22.5" />
+  <posXYZ  volume="Inner_Spoke_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 67.5" />
+  <posXYZ  volume="Inner_Spoke_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 112.5" />
+  <posXYZ  volume="Inner_Spoke_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 157.5" />
+  <posXYZ  volume="Inner_Spoke_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 202.5" />
+  <posXYZ  volume="Inner_Spoke_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 247.5" />
+  <posXYZ  volume="Inner_Spoke_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 292.5" />
+  <posXYZ  volume="Inner_Spoke_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 337.5" />
+</composition>
+
+<!-- *********************************************************************************** End Inner Spoke **************************************************\
+************************************* -->
+
+<!-- *********************************************************************************** Outer Spoke ******************************************************\
+************************************* -->
+
+<box  name="NSW_F1_spoke_MainBox"      material="Aluminium"  X_Y_Z="135.; 1060.; 185. " />
+<box  name="NSW_F1_spoke_CutBox"      material="Aluminium"  X_Y_Z="111.; 1070.; 161. " />
+
+<subtraction  name="NSW_F1_spoke" >
+  <posXYZ  volume="NSW_F1_spoke_MainBox" />
+  <posXYZ  volume="NSW_F1_spoke_CutBox" />
+</subtraction>
+<box  name="NSW_F1_spoke_Bot_Plate"      material="Aluminium"  X_Y_Z="300.; 48.; 300. " />
+
+<gvxysx name="Plaque_interface2" material="Aluminium" dZ="37.">
+  <gvxy_point X_Y="182.5; 375."/>
+  <gvxy_point X_Y="146.5; 213.2"/>
+  <gvxy_point X_Y="90.; -375."/>
+</gvxysx>
+
+<gvxysx name="Plaque_interface2.1" material="Aluminium" dZ="45.">
+  <gvxy_point X_Y="182.5; 375."/>
+  <gvxy_point X_Y="146.5; 213.2"/>
+  <gvxy_point X_Y="90.; -375."/>
+</gvxysx>
+
+<box  name="NSW_SS_spoke_Pillar_MainBox"      material="Aluminium"  X_Y_Z="135.; 2683.25; 185. " />
+<box  name="NSW_SS_spoke_Pillar_CutBox"      material="Aluminium"  X_Y_Z="113.; 2685.; 163. " />
+
+<subtraction  name="NSW_SS_spoke_Pillar" >
+  <posXYZ  volume="NSW_SS_spoke_Pillar_MainBox" />
+  <posXYZ  volume="NSW_SS_spoke_Pillar_CutBox" />
+</subtraction>
+
+<box  name="Spoke_Joint"      material="ShieldSteel"  X_Y_Z="75.; 85.; 124.4 " />
+
+<gvxysx name="Manifolds_Support_Main" material="Aluminium" dZ="150.">
+  <gvxy_point X_Y="585.; 75."/>
+  <gvxy_point X_Y=" 551.74; -75."/>
+</gvxysx>
+
+<box  name="Manifolds_Support_CutBox1"      material="Aluminium"  X_Y_Z="1180.; 140.; 140. " />
+<box  name="Manifolds_Support_CutBox2"      material="Aluminium"  X_Y_Z="160.; 90.; 160. " />
+
+<subtraction  name="Manifolds_Support" >
+  <posXYZ  volume="Manifolds_Support_Main" />
+  <posXYZ  volume="Manifolds_Support_CutBox1" />
+  <posXYZ  volume="Manifolds_Support_CutBox2"  X_Y_Z="135.; -45.; 0." />
+</subtraction>
+
+<box  name="Cale"      material="Aluminium"  X_Y_Z="135.; 280.; 52. " />
+<box  name="JD_JOINT2.1_Plate1"      material="Aluminium"  X_Y_Z="250.; 270.; 20. " />
+<box  name="Shim_JD"      material="Aluminium"  X_Y_Z="250.; 270.; 29. " />
+<box  name="JD_JOINT1_Pipe_MainBox" material="Aluminium"  X_Y_Z="1300.; 120.; 80." />
+<box  name="JD_JOINT1_Pipe_CutBox"      material="Aluminium"  X_Y_Z="1305.; 100.; 60. " />
+
+<subtraction  name="JD_JOINT1_Pipe" >
+  <posXYZ  volume="JD_JOINT1_Pipe_MainBox"  />
+  <posXYZ  volume="JD_JOINT1_Pipe_CutBox"  />
+</subtraction>
+
+<box  name="JD_JOINT2_Pipe_MainBox" material="Aluminium"  X_Y_Z="900.; 120.; 80." />
+
+<subtraction  name="JD_JOINT2_Pipe" >
+  <posXYZ  volume="JD_JOINT2_Pipe_MainBox" />
+  <posXYZ  volume="JD_JOINT1_Pipe_CutBox"  />
+</subtraction>
+
+<box  name="KM_FRONT_PLATE.1.1"      material="ShieldSteel"  X_Y_Z="27.; 272.; 120. " />
+<box  name="Manifolds_Support_Plate"      material="Aluminium"  X_Y_Z="9.8; 275.; 175. " />
+<box  name="AL_BAR_KM_INCLINED_PLATE"      material="Aluminium"  X_Y_Z="290.; 38.; 67. " />
+
+<composition  name="Outer_Spoke_Assembly" >
+  <posXYZ  volume="NSW_F1_spoke"  X_Y_Z="0.; 1350.; 0." />
+  <posXYZ  volume="NSW_F1_spoke_Bot_Plate"  X_Y_Z="0.; 795.95; 0." />
+  <posXYZ  volume="Manifolds_Support"  X_Y_Z="0.; 4515.33; 0." />
+  <posXYZ  volume="Plaque_interface2"  X_Y_Z="0.; 1745.; 111.05" />
+  <posXYZ  volume="Plaque_interface2.1"  X_Y_Z="0.; 1745.; -115.05" />
+  <posXYZ  volume="NSW_SS_spoke_Pillar"  X_Y_Z="371.; 3267.85; 0." rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="NSW_SS_spoke_Pillar"  X_Y_Z="-371.; 3267.85; 0." rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="Spoke_Joint"  X_Y_Z="610.52; 4348.24; 154.75" rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="Spoke_Joint"  X_Y_Z="322.65; 3049.77; 154.75" rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="Spoke_Joint"  X_Y_Z="-610.52; 4348.24; 154.75" rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="Spoke_Joint"  X_Y_Z="-322.65; 3049.77; 154.75" rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="Cale"  X_Y_Z="537.79; 4020.21; -118.55" rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="Cale"  X_Y_Z="338.24; 3120.06; -118.55" rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="Cale"  X_Y_Z="-537.79; 4020.21; -118.55" rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="Cale"  X_Y_Z="-338.24; 3120.06; -118.55" rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="JD_JOINT2.1_Plate1"  X_Y_Z="515.; 4020.2; -154.6" />
+  <posXYZ  volume="JD_JOINT2.1_Plate1"  X_Y_Z="315.; 3120.6; -154.6" />
+  <posXYZ  volume="JD_JOINT2.1_Plate1"  X_Y_Z="-515.; 4020.2; -154.6" />
+  <posXYZ  volume="JD_JOINT2.1_Plate1"  X_Y_Z="-315.; 3120.6; -154.6" />
+  <posXYZ  volume="Shim_JD"  X_Y_Z="515.; 4020.2; -261.55" />
+  <posXYZ  volume="Shim_JD"  X_Y_Z="315.; 3120.6; -261.55" />
+  <posXYZ  volume="Shim_JD"  X_Y_Z="-515.; 4020.2; -261.55" />
+  <posXYZ  volume="Shim_JD"  X_Y_Z="-315.; 3120.6; -261.55" />
+  <posXYZ  volume="JD_JOINT1_Pipe"  X_Y_Z="0.; 4020.2; -207." />
+  <posXYZ  volume="JD_JOINT2_Pipe"  X_Y_Z="0.; 3120.6; -207." />
+  <posXYZ  volume="KM_FRONT_PLATE.1.1"  X_Y_Z="641.41; 4289.16; 0." rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="KM_FRONT_PLATE.1.1"  X_Y_Z="-641.41; 4289.16; 0." rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="Manifolds_Support_Plate"  X_Y_Z="560.93; 4459.11; 0." rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="Manifolds_Support_Plate"  X_Y_Z="-560.93; 4459.11; 0." rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="AL_BAR_KM_INCLINED_PLATE"  X_Y_Z="-243.; 4099.25; -228.5" />
+</composition>
+
+<!-- Outer Spoke Foot -->
+<gvxysx name="Plaque_interface2_SpecMain" material="Aluminium" dZ="37.">
+  <gvxy_point X_Y="182.5; 375."/>
+  <gvxy_point X_Y="146.5; 213.2"/>
+  <gvxy_point X_Y="90.; -375."/>
+</gvxysx>
+
+<box  name="Plaque_interface2_Spec_CutBox"      material="Aluminium"  X_Y_Z="160.; 260.; 13. " />
+
+<subtraction  name="Plaque_interface2_Spec" >
+  <posXYZ  volume="Plaque_interface2_SpecMain" />
+  <posXYZ  volume="Plaque_interface2_Spec_CutBox"  X_Y_Z="-120.94; 337.19; -12.5" rot="   0. ; 0. ; 12.5" />
+</subtraction>
+
+<gvxysx name="Plaque_interface2.1_SpecMain" material="Aluminium" dZ="45.">
+  <gvxy_point X_Y="182.5; 375."/>
+  <gvxy_point X_Y="146.5; 213.2"/>
+  <gvxy_point X_Y="90.; -375."/>
+</gvxysx>
+
+<subtraction  name="Plaque_interface2.1_Spec" >
+  <posXYZ  volume="Plaque_interface2.1_SpecMain" />
+  <posXYZ  volume="Plaque_interface2_Spec_CutBox"  X_Y_Z="-120.94; 337.19; 16.5" rot="   0. ; 0. ; 12.5" />
+</subtraction>
+
+<box  name="NSW_SS_spoke_PillarSpec_MainBox"      material="ShieldSteel"  X_Y_Z="135.; 2818.1; 210. " />
+<box  name="NSW_SS_spoke_PillarSpec_CutBox"      material="Aluminium"  X_Y_Z="91.; 2820.; 166. " />
+
+<subtraction  name="NSW_SS_spokeSpec_Pillar" >
+  <posXYZ  volume="NSW_SS_spoke_PillarSpec_MainBox" />
+  <posXYZ  volume="NSW_SS_spoke_PillarSpec_CutBox" />
+</subtraction>
+
+<box  name="Cale_Spec"      material="Aluminium"  X_Y_Z="135.; 280.; 38.6 " />
+<box  name="Spoke_Joint1.2"      material="Aluminium"  X_Y_Z="66.; 100.; 111.9 " />
+
+<box  name="BOTTOM_PLATE.1_Horisontal_Plate"      material="ShieldSteel"  X_Y_Z="29.8; 775.; 495. " />
+<box  name="BOTTOM_PLATE.1_Vertical_Main_Plate"      material="ShieldSteel"  X_Y_Z="460.; 640.; 35. " />
+
+<gvxy name="Connecting_Plates2.1" material="Aluminium" dZ="22.">
+  <gvxy_point X_Y="-252.; 130.65"/>
+  <gvxy_point X_Y="70.; 130.65"/>
+  <gvxy_point X_Y="252.; 25.65"/>
+  <gvxy_point X_Y="258.6; -124.1"/>
+  <gvxy_point X_Y="108.7; -130.65"/>
+  <gvxy_point X_Y="-252.; 19.35"/>
+</gvxy>
+
+<box  name="Tube_alu_feet_MainBox"      material="Aluminium"  X_Y_Z="1050.; 135.; 185. " />
+<box  name="Tube_alu_feet_CutBox"      material="Aluminium"  X_Y_Z="1055.; 111.4; 161.4 " />
+
+<subtraction  name="Tube_alu_feet" >
+  <posXYZ  volume="Tube_alu_feet_MainBox" />
+  <posXYZ  volume="Tube_alu_feet_CutBox" />
+</subtraction>
+
+<box  name="Fix_nut"      material="ShieldSteel"  X_Y_Z="50.; 52.; 290. " />
+
+<gvxy name="Beam_Interface" material="Aluminium" dZ="300.">
+  <gvxy_point X_Y="-80.; 73.4"/>
+  <gvxy_point X_Y="80.; 73.4"/>
+  <gvxy_point X_Y="80.; -73.4"/>
+  <gvxy_point X_Y="-80.; 28.5"/>
+</gvxy>
+
+<gvxy name="Beam_Interface2" material="Aluminium" dZ="300.">
+  <gvxy_point X_Y="-80.; 79.8"/>
+  <gvxy_point X_Y="80.; 79.8"/>
+  <gvxy_point X_Y="80.; 12.6"/>
+  <gvxy_point X_Y="-80.; -79.8"/>
+</gvxy>
+
+<box  name="LS_T_Joint"      material="ShieldSteel"  X_Y_Z="80.; 70.; 134.9 " />
+<box  name="LS_T_Joint2"      material="ShieldSteel"  X_Y_Z="77.; 67.; 147.4 " />
+
+<gvxy name="Renfort_Bas1_MainBox" material="Aluminium" dZ="135.">
+  <gvxy_point X_Y="-337.73; -67.5"/>
+  <gvxy_point X_Y="-251.72; 67.5"/>
+  <gvxy_point X_Y="251.72; 67.5"/>
+  <gvxy_point X_Y="337.27; -67.5"/>
+</gvxy>
+
+<box  name="Renfort_Bas1_CutBox"      material="Aluminium"  X_Y_Z="680.; 115.; 115. " />
+
+
+<subtraction  name="Renfort_Bas1" >
+  <posXYZ  volume="Renfort_Bas1_MainBox" />
+  <posXYZ  volume="Renfort_Bas1_CutBox" />
+</subtraction>
+
+<composition  name="Outer_Spoke_Assembly_FOOT1" >
+  <posXYZ  volume="NSW_F1_spoke"  X_Y_Z="0.; 1350.; 0." />
+  <posXYZ  volume="NSW_F1_spoke_Bot_Plate"  X_Y_Z="0.; 795.95; 0." />
+  <posXYZ  volume="Plaque_interface2_Spec"  X_Y_Z="0.; 1745.; 111.05" />
+  <posXYZ  volume="Plaque_interface2.1_Spec"  X_Y_Z="0.; 1745.; -115.05" />
+  <posXYZ  volume="NSW_SS_spoke_Pillar"  X_Y_Z="371.; 3267.85; 0." rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="NSW_SS_spokeSpec_Pillar"  X_Y_Z="-385.59; 3333.67; 0." rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="Shim_JD"  X_Y_Z="515.; 4020.2; -261.55" />
+  <posXYZ  volume="Shim_JD"  X_Y_Z="315.; 3120.6; -261.55" />
+  <posXYZ  volume="Shim_JD"  X_Y_Z="-515.; 4020.2; -261.55" />
+  <posXYZ  volume="Shim_JD"  X_Y_Z="-315.; 3120.6; -261.55" />
+  <posXYZ  volume="JD_JOINT2.1_Plate1"  X_Y_Z="515.; 4020.2; -154.6" />
+  <posXYZ  volume="JD_JOINT2.1_Plate1"  X_Y_Z="315.; 3120.6; -154.6" />
+  <posXYZ  volume="JD_JOINT2.1_Plate1"  X_Y_Z="-515.; 4020.2; -154.6" />
+  <posXYZ  volume="JD_JOINT2.1_Plate1"  X_Y_Z="-315.; 3120.6; -154.6" />
+  <posXYZ  volume="Cale"  X_Y_Z="537.79; 4020.21; -118.55" rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="Cale"  X_Y_Z="338.24; 3120.06; -118.55" rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="Cale_Spec"  X_Y_Z="-537.79; 4020.21; -124.35" rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="Cale_Spec"  X_Y_Z="-338.24; 3120.06; -124.35" rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="JD_JOINT1_Pipe"  X_Y_Z="0.; 4020.2; -207." />
+  <posXYZ  volume="JD_JOINT2_Pipe"  X_Y_Z="0.; 3120.6; -207." />
+  <posXYZ  volume="AL_BAR_KM_INCLINED_PLATE"  X_Y_Z="-243.; 4099.25; -228.5" />
+  <posXYZ  volume="Spoke_Joint"  X_Y_Z="322.65; 3049.77; 154.75" rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="Spoke_Joint"  X_Y_Z="610.52; 4348.24; 154.75" rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="Spoke_Joint1.2"  X_Y_Z="-322.65; 3049.28; 161." rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="Spoke_Joint1.2"  X_Y_Z="-610.4; 4347.75; 161." rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="KM_FRONT_PLATE.1.1"  X_Y_Z="641.41; 4289.16; 0." rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="BOTTOM_PLATE.1_Horisontal_Plate"  X_Y_Z="-675.29; 4889.64; -29." rot="   0. ; 0. ; -45." />
+  <posXYZ  volume="BOTTOM_PLATE.1_Vertical_Main_Plate"  X_Y_Z="-491.47; 4727.04; -257.5" rot="   0. ; 0. ; -45." />
+  <posXYZ  volume="Connecting_Plates2.1"  X_Y_Z="475.73; 4596.28; 103.55" rot="   0. ; 0. ; -15." />
+  <posXYZ  volume="Connecting_Plates2.1"  X_Y_Z="475.73; 4596.28; -103.55" rot="   0. ; 0. ; -15." />
+  <posXYZ  volume="Tube_alu_feet"  X_Y_Z="35.49; 4779.63; 0." rot="   0. ; 0. ; -15." />
+  <posXYZ  volume="Fix_nut"  X_Y_Z="-840.79; 4666.23; -5." rot="   0. ; 0. ; -45." />
+  <posXYZ  volume="Fix_nut"  X_Y_Z="-443.82; 5063.2; -5." rot="   0. ; 0. ; -45." />
+  <posXYZ  volume="Beam_Interface"  X_Y_Z="-716.12; 4723.86; 0." rot="   0. ; 0. ; 45." />
+  <posXYZ  volume="Beam_Interface2"  X_Y_Z="-496.92; 4934.01; 0." rot="   0. ; 0. ; 45." />
+  <posXYZ  volume="LS_T_Joint"  X_Y_Z="-649.; 4560.58; -172.5" rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="LS_T_Joint2"  X_Y_Z="-356.49; 4881.55; -166.25" rot="   0. ; 0. ; 75." />
+  <posXYZ  volume="Renfort_Bas1"  X_Y_Z="-329.24; 4539.98; 0." rot="   0. ; 0. ; 45." />
+</composition>
+
+<composition  name="Outer_Spoke_Assembly_FOOT2" >
+  <posXYZ  volume="NSW_F1_spoke"  X_Y_Z="0.; 1350.; 0." />
+  <posXYZ  volume="NSW_F1_spoke_Bot_Plate"  X_Y_Z="0.; 795.95; 0." />
+  <posXYZ  volume="Plaque_interface2_Spec"  X_Y_Z="0.; 1745.; 111.05" />
+  <posXYZ  volume="Plaque_interface2.1_Spec"  X_Y_Z="0.; 1745.; -115.05" />
+  <posXYZ  volume="NSW_SS_spoke_Pillar"  X_Y_Z="371.; 3267.85; 0." rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="NSW_SS_spokeSpec_Pillar"  X_Y_Z="-385.59; 3333.67; 0." rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="Shim_JD"  X_Y_Z="515.; 4020.2; 261.55" />
+  <posXYZ  volume="Shim_JD"  X_Y_Z="315.; 3120.6; 261.55" />
+  <posXYZ  volume="Shim_JD"  X_Y_Z="-515.; 4020.2; 261.55" />
+  <posXYZ  volume="Shim_JD"  X_Y_Z="-315.; 3120.6; 261.55" />
+  <posXYZ  volume="JD_JOINT2.1_Plate1"  X_Y_Z="515.; 4020.2; 154.6" />
+  <posXYZ  volume="JD_JOINT2.1_Plate1"  X_Y_Z="315.; 3120.6; 154.6" />
+  <posXYZ  volume="JD_JOINT2.1_Plate1"  X_Y_Z="-515.; 4020.2; 154.6" />
+  <posXYZ  volume="JD_JOINT2.1_Plate1"  X_Y_Z="-315.; 3120.6; 154.6" />
+  <posXYZ  volume="Cale"  X_Y_Z="537.79; 4020.21; 118.55" rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="Cale"  X_Y_Z="338.24; 3120.06; 118.55" rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="Cale_Spec"  X_Y_Z="-537.79; 4020.21; 124.35" rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="Cale_Spec"  X_Y_Z="-338.24; 3120.06; 124.35" rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="JD_JOINT1_Pipe"  X_Y_Z="0.; 4020.2; 207." />
+  <posXYZ  volume="JD_JOINT2_Pipe"  X_Y_Z="0.; 3120.6; 207." />
+  <posXYZ  volume="AL_BAR_KM_INCLINED_PLATE"  X_Y_Z="-243.; 4099.25; 228.5" />
+  <posXYZ  volume="Spoke_Joint"  X_Y_Z="322.65; 3049.77; -154.75" rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="Spoke_Joint"  X_Y_Z="610.52; 4348.24; -154.75" rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="Spoke_Joint1.2"  X_Y_Z="-322.65; 3049.28; -161." rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="Spoke_Joint1.2"  X_Y_Z="-610.4; 4347.75; -161." rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="KM_FRONT_PLATE.1.1"  X_Y_Z="641.41; 4289.16; 0." rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="BOTTOM_PLATE.1_Horisontal_Plate"  X_Y_Z="-675.29; 4889.64; 29." rot="   0. ; 0. ; -45." />
+  <posXYZ  volume="BOTTOM_PLATE.1_Vertical_Main_Plate"  X_Y_Z="-491.47; 4727.04; 257.5" rot="   0. ; 0. ; -45." />
+  <posXYZ  volume="Connecting_Plates2.1"  X_Y_Z="475.73; 4596.28; -103.55" rot="   0. ; 0. ; -15." />
+  <posXYZ  volume="Connecting_Plates2.1"  X_Y_Z="475.73; 4596.28; 103.55" rot="   0. ; 0. ; -15." />
+  <posXYZ  volume="Tube_alu_feet"  X_Y_Z="35.49; 4779.63; 0." rot="   0. ; 0. ; -15." />
+  <posXYZ  volume="Fix_nut"  X_Y_Z="-840.79; 4666.23; -5." rot="   0. ; 0. ; -45." />
+  <posXYZ  volume="Fix_nut"  X_Y_Z="-443.82; 5063.2; -5." rot="   0. ; 0. ; -45." />
+  <posXYZ  volume="Beam_Interface"  X_Y_Z="-716.12; 4723.86; 0." rot="   0. ; 0. ; 45." />
+  <posXYZ  volume="Beam_Interface2"  X_Y_Z="-496.92; 4934.01; 0." rot="   0. ; 0. ; 45." />
+  <posXYZ  volume="LS_T_Joint"  X_Y_Z="-649.; 4560.58; 172.5" rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="LS_T_Joint2"  X_Y_Z="-356.49; 4881.55; 166.25" rot="   0. ; 0. ; 75." />
+  <posXYZ  volume="Renfort_Bas1"  X_Y_Z="-329.24; 4539.98; 0." rot="   0. ; 0. ; 45." />
+</composition>
+<!-- End Outer Spoke Foot -->
+
+
+<composition  name="Outer_Spoke" >
+  <posXYZ  volume="Outer_Spoke_Assembly"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 0." />
+  <posXYZ  volume="Outer_Spoke_Assembly"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 45." />
+  <posXYZ  volume="Outer_Spoke_Assembly"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 90." />
+  <posXYZ  volume="Outer_Spoke_Assembly_FOOT1"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 135." />
+  <posXYZ  volume="Outer_Spoke_Assembly"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 180." />
+  <posXYZ  volume="Outer_Spoke_Assembly_FOOT2"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 180. ; 225." />
+  <posXYZ  volume="Outer_Spoke_Assembly"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 270." />
+  <posXYZ  volume="Outer_Spoke_Assembly"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 315." />
+</composition>
+<!-- ********************************************************************************* End Outer Spoke ****************************************************\
+************************************** -->
+
+<!-- *********************************************************************************** LSO LSI Connection ***********************************************\
+************************************* -->
+
+<box  name="LSO_LSI_connection_Rot"      material="ShieldSteel"  X_Y_Z="63.; 754.1; 46. " />
+
+<composition  name="LSO_LSI_connection_Pos" >
+  <posXYZ  volume="LSO_LSI_connection_Rot"  X_Y_Z="0.; 2210.09; 0." />
+</composition>
+
+<composition  name="LSO_LSI_Connection" >
+  <posXYZ  volume="LSO_LSI_connection_Pos"  X_Y_Z="0.; 0.; 870.2" rot="   0. ; 0. ; 22.5" />
+  <posXYZ  volume="LSO_LSI_connection_Pos"  X_Y_Z="0.; 0.; 870.2" rot="   0. ; 0. ; 67.5" />
+  <posXYZ  volume="LSO_LSI_connection_Pos"  X_Y_Z="0.; 0.; 870.2" rot="   0. ; 0. ; -22.5" />
+  <posXYZ  volume="LSO_LSI_connection_Pos"  X_Y_Z="0.; 0.; 870.2" rot="   0. ; 0. ; -67.5" />
+</composition>
+
+<!-- *********************************************************************************** End LSO LSI Connection *******************************************\
+************************************* -->
+
+<!-- *********************************************************************************** Alignment Bars ***************************************************\
+**************************************** -->
+
+<!-- SS Bar -->
+<tubs   name="SS_Bar_Tube"      material="Aluminium"   Rio_Z="0.; 49.1; 2382." />
+
+<composition  name="SS_Bar_Assembly" >
+  <posXYZ  volume="SS_Bar_Tube"  X_Y_Z="69.2; 3364.6; 0" rot="   90. ; 0. ; -3.35" />
+</composition>
+
+<composition  name="SS_Bar" >
+  <posXYZ  volume="SS_Bar_Assembly"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 0." />
+  <posXYZ  volume="SS_Bar_Assembly"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 45." />
+  <posXYZ  volume="SS_Bar_Assembly"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 90." />
+  <posXYZ  volume="SS_Bar_Assembly"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 135." />
+  <posXYZ  volume="SS_Bar_Assembly"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 180." />
+  <posXYZ  volume="SS_Bar_Assembly"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 225." />
+  <posXYZ  volume="SS_Bar_Assembly"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 270." />
+  <posXYZ  volume="SS_Bar_Assembly"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 315." />
+</composition>
+<!-- End SS Bar -->
+
+<!-- LS Bar -->
+<tubs   name="LS_Bar_Tube"      material="Aluminium"   Rio_Z="0.; 48.; 2340." />
+<box  name="LS_Arm"      material="Aluminium"  X_Y_Z="1010.; 40.; 50. " />
+
+<composition  name="LS_Bar_Assembly" >
+  <posXYZ  volume="LS_Bar_Tube"  X_Y_Z="1286.4; 3086.18; 0." rot="   90. ; 0. ; -25." />
+  <posXYZ  volume="LS_Arm"  X_Y_Z="1789.34; 4164.73; 0." rot="   0. ; 0. ; -25." />
+</composition>
+
+<composition  name="LS_Bar" >
+  <posXYZ  volume="LS_Bar_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 0." />
+  <posXYZ  volume="LS_Bar_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 45." />
+  <posXYZ  volume="LS_Bar_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 90." />
+  <posXYZ  volume="LS_Bar_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 135." />
+  <posXYZ  volume="LS_Bar_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 180." />
+  <posXYZ  volume="LS_Bar_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 225." />
+  <posXYZ  volume="LS_Bar_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 270." />
+  <posXYZ  volume="LS_Bar_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 315." />
+</composition>
+<!-- End LS Bar -->
+
+<!-- *********************************************************************************** End Alignment Bars ***********************************************\
+******************************************** -->
+
+
+<composition  name="NSW_Aluminum_Structure_and_HUB_Assembly" >
+  <posXYZ  volume="New_Hub" />
+  <posXYZ  volume="Inner_Spoke" />
+  <posXYZ  volume="LSO_LSI_Connection" />
+  <posXYZ  volume="Outer_Spoke" />
+  <posXYZ  volume="SS_Bar" />
+  <posXYZ  volume="LS_Bar" />
+</composition>
+
+<composition  name="NSW_Aluminum_Structure_and_HUB_SideA" >
+  <posXYZ  volume="NSW_Aluminum_Structure_and_HUB_Assembly"  X_Y_Z="0.; 0.; 6943.8" rot="   0. ; 0. ; 0." />
+</composition>
+
+<composition  name="NSW_Aluminum_Structure_and_HUB_SideC" >
+  <posXYZ  volume="NSW_Aluminum_Structure_and_HUB_Assembly"  X_Y_Z="0.; 0.; -6943.8" rot="   0. ; 180. ; 0." />
+</composition>
+
+<composition  name="NSW_Aluminum_Structure_and_HUB" >
+  <posXYZ  volume="NSW_Aluminum_Structure_and_HUB_SideA" />
+  <posXYZ  volume="NSW_Aluminum_Structure_and_HUB_SideC" />
+</composition>
+
+</section>
+
+<!-- ==================================================Feet========================================= -->
+
+<section name       = "A Plate"
+         version    = "0.0"
+         date       = "29-05-2017"
+         author     = "Georgian Engineering Team - Niko Tsutskiridze"
+         top_volume = "A_Plate">
+
+<gvxy name="Lateral_Plate_Main" material="ShieldSteel" dZ="21.">
+  <gvxy_point X_Y="-3300.; -4000."/>
+  <gvxy_point X_Y="-3548.3; -3235.72"/>
+  <gvxy_point X_Y="-1458.4; -560.8"/>
+  <gvxy_point X_Y="73.9; 73.9"/>
+  <gvxy_point X_Y="-628.9; -1622.8"/>
+  <gvxy_point X_Y="-818.3; -1544.4"/>
+  <gvxy_point X_Y="-1558.6; -2491.9"/>
+  <gvxy_point X_Y="-1427.8; -2980."/>
+  <gvxy_point X_Y="-0.01; -2980."/>
+  <gvxy_point X_Y="-0.01; -3280."/>
+  <gvxy_point X_Y="-1701.9; -3280."/>
+  <gvxy_point X_Y="-1995.3; -3050.8"/>
+  <gvxy_point X_Y="-2650.; -3889."/>
+  <gvxy_point X_Y="-2650.; -4000."/>
+</gvxy>
+
+<tubs name="Lateral_plate_TubeCut" material="ShieldSteel"  Rio_Z=" 0. ; 600. ; 25."  nbPhi="36." />
+
+<subtraction  name="Lateral_Plate" >
+  <posXYZ   volume="Lateral_Plate_Main"  />
+  <posXYZ   volume="Lateral_plate_TubeCut" X_Y_Z="-0.01; -0.01; 0." rot="   0. ; 0. ; 0." />
+</subtraction>
+
+<tubs     name="Anchorage"  material="ShieldSteel"  Rio_Z=" 0. ; 22.6 ; 577."  nbPhi="36." />
+
+<gvxy name="Vertical_Top_Plate" material="ShieldSteel" dZ="33.">
+  <gvxy_point X_Y="-3300.; -3998."/>
+  <gvxy_point X_Y="-3300.; -3730."/>
+  <gvxy_point X_Y="-2865.; -3730."/>
+  <gvxy_point X_Y="-2675.; -3920."/>
+  <gvxy_point X_Y="-2675.; -3998."/>
+</gvxy>
+
+<box  name="Horizontal_Plate" material="ShieldSteel"  X_Y_Z="625.; 40.6; 287. " />
+
+<composition  name="A_Plate_Assembly" >
+  <posXYZ   volume="Lateral_Plate"  />
+  <posXYZ   volume="Lateral_Plate" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." />
+  <posXYZ   volume="Anchorage" X_Y_Z="-3447.; -3283.25; -299.01" rot="0. ; 0. ; 0." />
+  <posXYZ   volume="Anchorage" X_Y_Z="3447.; -3283.25; -299.01" rot="0. ; 0. ; 0." />
+  <posXYZ   volume="Vertical_Top_Plate" X_Y_Z="0.; 0.; -27.01" rot="0. ; 0. ; 0." />
+  <posXYZ   volume="Vertical_Top_Plate" X_Y_Z="0.; 0.; -27.01" rot="0. ; 180. ; 0." />
+  <posXYZ   volume="Horizontal_Plate" X_Y_Z="-2987.5; -3929.7; -187.02" rot="0. ; 0. ; 0." />
+  <posXYZ   volume="Horizontal_Plate" X_Y_Z="2987.5; -3929.7; -187.02" rot="0. ; 0. ; 0." />
+</composition>
+
+<composition  name="A_Plate_SideA" >
+   <posXYZ volume="A_Plate_Assembly" X_Y_Z=" 0. ; 0.; 7857.5"  />
+</composition>
+
+<composition  name="A_Plate_SideC" >
+   <posXYZ volume="A_Plate_Assembly" X_Y_Z=" 0. ; 0.; -7857.5" rot="0. ; 180. ; 0."  />
+</composition>
+
+<composition  name="A_Plate" >
+   <posXYZ volume="A_Plate_SideA" />
+   <posXYZ volume="A_Plate_SideC" />
+</composition>
+
+</section>
+
+<!-- ========== Poisitionning all Volumes in NSW================ -->
+
+<section name="NewSmallWheels" version="4.3" top_volume="NewSmallWheel" date=" April 20, 2015 " author="Daniel Lellouch">
+
+<composition name="NewSmallWheel">
+ <posXYZ volume="NSW_sTGC" X_Y_Z="0.;0.;0."/>
+ <posXYZ volume="NSW_MM" X_Y_Z="0.;0.;0." />
+ <posXYZ volume="NSW_Spacer" />
+ <posXYZ volume="NSW_Aluminum_Structure_and_HUB" />
+ <posXYZ volume="A_Plate" />
+</composition>
+
+</section>
+
+</AGDD>
diff --git a/MuonSpectrometer/MuonG4/NSW_Sim/data/stations.v2.08_Aside.xml b/MuonSpectrometer/MuonG4/NSW_Sim/data/stations.v2.08_Aside.xml
new file mode 100644
index 000000000000..5315642e882f
--- /dev/null
+++ b/MuonSpectrometer/MuonG4/NSW_Sim/data/stations.v2.08_Aside.xml
@@ -0,0 +1,1796 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<AGDD>
+
+<section name="NSW_Parameters" version="1" top_volume="useless" date="December 16 2014" author="S.Chen" >
+<!-- Global variables-->
+<var name="NSW_NbrOfLayers" value="4"/>
+<var name="NSW_NbrOfDriftPcb" value="3"/>
+<var name="NSW_NbrOfROPcb" value="2"/>
+<!--Center between the large sectors and the small sectors-->
+<var name="ZCenter_Global" value="7409"/>
+</section>
+
+<section name="NSW_sTGC_Parameters" version="13.7" top_volume="useless" date=" June 30, 2016 " author="Daniel Lellouch">
+<!-- ================ Global Variables ================= -->
+
+<!-- Thickness of a quadruplet -->
+<var name="NSW_sTGC_Tck" value="49.34"/>
+<!-- Gas Gap inside one layer -->
+<var name="NSW_sTGC_GasTck" value="2.85"/>
+<!-- G10 thickness per layer -->
+<var name="NSW_sTGC_pcbTck" value="3"/>
+<!-- Number of layers in a quaduplet -->
+<var name="NSW_sTGC_NbrOfLayers" value="4"/>
+<!-- Wire pitch -->
+<var name="NSW_sTGC_WirePitch" value="1.8"/>
+<!-- Strip pitch -->
+<var name="NSW_sTGC_StripPitch" value="3.2"/>
+<!-- Strip width -->
+<var name="NSW_sTGC_StripWidth" value="2.7"/>
+<!-- Width of G10 frame besides gas volume -->
+<var name="NSW_sTGC_SideFrame" value="28.5"/>
+<!-- Width of G10 frame in base w/o capacitor -->
+<var name="NSW_sTGC_hFrameNoCapacitor" value="11"/>
+<!-- Width of G10 frame in base with capacitor -->
+<var name="NSW_sTGC_hFrameCapacitor" value="14"/>
+<!-- Opening (in degrees) of trapezes in small wedges -->
+<var name="NSW_sTGC_SmallOpening" value="17"/>
+<!-- Opening (in degrees) of trapezes in large wedges -->
+<var name="NSW_sTGC_LargeOpening" value="28"/>
+<!-- Z center of small Pivot -->
+<var name="NSW_sTGC_ZSmallPivot" value="ZCenter_Global-65"/>
+<!-- Z center of small Confirm -->
+<var name="NSW_sTGC_ZSmallConfirm" value="ZCenter_Global-399"/>
+<!-- Z center of Large Pivot -->
+<var name="NSW_sTGC_ZLargePivot" value="ZCenter_Global+65"/>
+<!-- Z center of Large Confirm -->
+<var name="NSW_sTGC_ZLargeConfirm" value="ZCenter_Global+399"/>
+<!-- Z of each volume, relative to center of quadruplet -->
+<array name="NSW_sTGC_LayerDeltaZ" values="-16.45;-5.48;5.49;16.46"/>
+<!-- Side of the Pad readout -->
+<array name="NSW_sTGC_PadSide" values="-1;1;-1;1"/>
+<!-- Side of the Strip readout -->
+<array name="NSW_sTGC_StripSide" values="1;-1;1;-1"/>
+</section>
+
+<!-- ================ sTGC ========================= -->
+
+
+<section name="NewSmallWheels_sTGC" version="22.1" top_volume="NSW_sTGC" date=" June 22, 2018 " author="Daniel Lellouch">
+
+<composition name="NSW_sTGC">
+
+<sTGC_Tech type="sTGC_1" geometryLevel="1" nLayers="NSW_sTGC_NbrOfLayers" gasTck="NSW_sTGC_GasTck" pcbTck="NSW_sTGC_pcbTck" Tck="NSW_sTGC_Tck" f4="NSW_sTGC_hFrameNoCapacitor" f5="NSW_sTGC_hFrameNoCapacitor" f6="NSW_sTGC_SideFrame" zLayout="Z_POSITIVE"/>
+
+<!-- ================ small Pivot ========================= -->
+
+<sTGC type="sTG1-QS1P" tech="sTGC_1" subType="QS1P" sWidth="346.93" lWidth="743.15" Length="1325.6" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0">
+
+<sTGC_readout sPadWidth="279.32" lPadWidth="667.18" padH="80;80;80.24;80.24" rankPadPhi="4;3;2;1" nPadPhi="4;4;3;3" anglePadPhi="5" firstPadPhiDivision_C="-5;-5;-2.5;-2.5" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="-5;-5;-2.5;-2.5" PadPhiShift_A="-2;2;-2;2" rankPadH="1;2;3;4" nPadH="17;17;17;17" firstPadH="65.8;65.8;28.61;28.61" firstPadRow="1;1;1;1" sStripWidth="293.48" lStripWidth="681.33" wireCutout="802.8;829.8;856.8;883.8" nWires="371;370;370;370" firstWire="-333;-331.65;-332.55;-332.1" wireGroupWidth="20" nStrips="406" firstTriggerBand="6;6;6;6" nTriggerBands="28;28;28;28" firstStripInTrigger="73;73;73;73" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="13;12;13;12;13;12;13;12;13;12;13;12; 13;12;13;12;13;12;13;12;12;13;12;13;12;13; 12;13;12;13;12;10;9" StripsInBandsLayer2="13;12;13;12;13;12;13;12;13;12;13;12; 13;12;13;12;13;12;13;12;12;13;12;13;12;13; 12;13;12;13;12;10;9" StripsInBandsLayer3="14;14;13;12;13;12;13;12;13;12;13;12; 13;12;13;12;13;12;13;12;12;13;12;13;12;13; 12;13;12;13;12;10;6" StripsInBandsLayer4="14;14;13;12;13;12;13;12;13;12;13;12; 13;12;13;12;13;12;13;12;12;13;12;13;12;13; 12;13;12;13;12;10;6" nWireGroups="19;20;19;19" firstWireGroup="20;5;10;15" zLayout="Z_POSITIVE"/>
+</sTGC>
+
+<chamberPosition volume="sTG1-QS1P" type="ENDCAP" chamberType="sTGS" radius="1563" zPos="NSW_sTGC_ZSmallPivot" phi0="22.5" zLayout="Z_POSITIVE"/>
+
+<sTGC type="sTG1-QS2P" tech="sTGC_1" subType="QS2P" sWidth="746.14" lWidth="1102.25" Length="1191.4" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0">
+
+<sTGC_readout sPadWidth="677.64" lPadWidth="1026.28" padH="80;80;80.24;80.24" rankPadPhi="2;1;4;3" nPadPhi="2;2;3;3" anglePadPhi="7.5" firstPadPhiDivision_C="0;0;-3.75;-3.75" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="0;0;-3.75;-3.75" PadPhiShift_A="-2;2;-2;2" rankPadH="1;2;3;4" nPadH="15;15;15;15" firstPadH="93.2;93.2;60.09;60.09" firstPadRow="18;18;18;18" sStripWidth="691.8" lStripWidth="1040.43" wireCutout="0;0;0;0" nWires="569;570;570;570" firstWire="-511.2;-511.65;-512.55;-512.1" wireGroupWidth="20" nStrips="365" firstTriggerBand="34;34;34;34" nTriggerBands="29;29;29;29" firstStripInTrigger="1;1;1;1" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="14;14;14;13;12;12;13;12;13;12; 12;13;12;13;12;13;12;13;13;12; 13;12;13;12;13;12;13;12;11" StripsInBandsLayer2="14;14;14;13;12;12;13;12;13;12; 12;13;12;13;12;13;12;13;13;12; 13;12;13;12;13;12;13;12;11" StripsInBandsLayer3="14;14;14;13;12;12;13;12;13;12; 12;13;12;13;12;13;12;13;13;12; 13;12;13;12;13;12;13;12;10" StripsInBandsLayer4="14;14;14;13;12;12;13;12;13;12; 13;13;13;12;13;12;13;12;13;12; 13;12;13;12;13;12;13;12;10" nWireGroups="29;30;29;29" firstWireGroup="20;5;10;15" zLayout="Z_POSITIVE"/>
+</sTGC>
+
+<chamberPosition volume="sTG1-QS2P" type="ENDCAP" chamberType="sTGS" radius="2831.5" zPos="NSW_sTGC_ZSmallPivot" phi0="22.5" zLayout="Z_POSITIVE"/>
+
+<sTGC type="sTG1-QS3P" tech="sTGC_1" subType="QS3P" sWidth="1105.96" lWidth="1406.59" Length="1005.8" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0">
+
+<sTGC_readout sPadWidth="1037.46" lPadWidth="1330.62" padH="80;80;80.24;80.24" rankPadPhi="2;1;4;3" nPadPhi="2;2;3;3" anglePadPhi="7.5" firstPadPhiDivision_C="0;0;-3.75;-3.75" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="0;0;-3.75;-3.75" PadPhiShift_A="-2;2;-2;2" rankPadH="1;2;3;4" nPadH="12;12;13;13" firstPadH="89.4;89.4;59.88;59.88" firstPadRow="33;33;33;33" sStripWidth="1051.61" lStripWidth="1344.78" wireCutout="0;0;0;0" nWires="739;739;739;738" firstWire="-664.2;-664.65;-663.75;-663.3" wireGroupWidth="20" nStrips="307" firstTriggerBand="64;64;64;64" nTriggerBands="25;25;25;25" firstStripInTrigger="1;1;1;1" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="3;13;13;10;13;13;13;13;13;13;13; 13;12;12;13;12;13;12;13;12;12; 13;13;13;14" StripsInBandsLayer2="3;13;13;10;13;13;13;13;13;13;13; 13;12;12;13;12;13;12;13;12;12; 13;13;13;14" StripsInBandsLayer3="6;13;12;11;14;12;13;12;13;13;13; 13;13;12;13;12;13;12;13;12;13; 13;12;13;11" StripsInBandsLayer4="6;13;12;11;14;12;13;12;13;13;13; 13;13;12;13;12;13;12;13;12;13; 13;12;13;11" nWireGroups="37;38;38;38" firstWireGroup="20;14;10;3" zLayout="Z_POSITIVE"/>
+</sTGC>
+
+<chamberPosition volume="sTG1-QS3P" type="ENDCAP" chamberType="sTGS" radius="3942.5" zPos="NSW_sTGC_ZSmallPivot" phi0="22.5" zLayout="Z_POSITIVE"/>
+
+
+<!-- ================ small confirm =============== -->
+
+<sTGC type="sTG1-QS1C" tech="sTGC_1" subType="QS1C" sWidth="346.93" lWidth="743.15" Length="1325.6" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0">
+
+<sTGC_readout sPadWidth="293.48" lPadWidth="681.33" padH="76.35;76.35;76.59;76.59" rankPadPhi="1;4;2;3" nPadPhi="4;4;4;4" anglePadPhi="5" firstPadPhiDivision_C="-3.75;-6.25;-3.75;-6.25" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-6.25;-3.75;-6.25;-3.75" PadPhiShift_A="2;-2;2;-2" rankPadH="1;2;3;4" nPadH="17;17;18;18" firstPadH="78.4;78.4;43.21;43.21" firstPadRow="2;2;2;2" sStripWidth="293.48" lStripWidth="681.33" wireCutout="883.8;856.8;829.8;802.8" nWires="370;370;370;371" firstWire="-332.1;-332.55;-331.65;-333" wireGroupWidth="20" nStrips="406" firstTriggerBand="7;7;8;8" nTriggerBands="29;29;29;29" firstStripInTrigger="73;73;73;73" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="13;12;12;12;12;12;12;12;12;12;11;12;12;12;12;12;12;12;12;12;12;12;12; 12;11;12;12;12;12;12;12;14;10;11" StripsInBandsLayer2="13;12;12;12;12;12;12;12;12;12;11;12;12;12;12;12;12;12;12;12;12;12;12; 12;11;12;12;12;12;12;12;14;10;11" StripsInBandsLayer3="8;12;12;12;12;12;12;12;12;12;12;12; 12;12;12;12;12;11;12;12;12;12; 12;12;12;12;12;12;12;12;12;13;14" StripsInBandsLayer4="8;12;12;12;12;12;12;12;12;12;12;12; 12;12;12;12;12;11;12;12;12;12; 12;12;12;12;12;12;12;12;12;13;14" nWireGroups="19;19;20;19" firstWireGroup="15;10;5;20" zLayout="Z_POSITIVE"/>
+</sTGC>
+
+<chamberPosition volume="sTG1-QS1C" type="ENDCAP" chamberType="sTGS" radius="1563" zPos="NSW_sTGC_ZSmallConfirm" phi0="22.5" zLayout="Z_POSITIVE"/>
+
+<sTGC type="sTG1-QS2C" tech="sTGC_1" subType="QS2C" sWidth="746.14" lWidth="1102.25" Length="1191.4" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0">
+
+<sTGC_readout sPadWidth="691.8" lPadWidth="1040.43" padH="76.35;76.35;76.59;76.59" rankPadPhi="3;2;4;1" nPadPhi="3;3;3;3" anglePadPhi="7.5" firstPadPhiDivision_C="-5.62;-1.87;-5.62;-1.87" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-1.87;-5.62;-1.87;-5.62" PadPhiShift_A="2;-2;2;-2" rankPadH="1;2;3;4" nPadH="16;16;15;15" firstPadH="43.8;43.8;89.29;89.29" firstPadRow="19;19;20;20" sStripWidth="691.8" lStripWidth="1040.43" wireCutout="0;0;0;0" nWires="570;570;570;569" firstWire="-512.1;-512.55;-511.65;-511.2" wireGroupWidth="20" nStrips="365" firstTriggerBand="36;36;36;36" nTriggerBands="31;31;31;31" firstStripInTrigger="1;1;1;1" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="7;12;12;12;11;12;12;12;12;12;12;12; 12;12;11;12;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12" StripsInBandsLayer2="7;12;12;12;11;12;12;12;12;12;12;12; 12;12;11;12;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12" StripsInBandsLayer3="9;12;12;12;12;12;12;12;12;12;12;11; 12;12;11;12;12;12;12;12;12;12; 12;12;12;12;12;12;11;11;11" StripsInBandsLayer4="9;12;12;12;12;12;12;12;12;12;12;11; 12;12;12;12;12;12;12;12;12;12; 12;12;12;12;12;12;11;11;11" nWireGroups="29;29;30;29" firstWireGroup="15;10;5;20" zLayout="Z_POSITIVE"/>
+</sTGC>
+
+<chamberPosition volume="sTG1-QS2C" type="ENDCAP" chamberType="sTGS" radius="2831.5" zPos="NSW_sTGC_ZSmallConfirm" phi0="22.5" zLayout="Z_POSITIVE"/>
+
+<sTGC type="sTG1-QS3C" tech="sTGC_1" subType="QS3C" sWidth="1105.96" lWidth="1406.59" Length="1005.8" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0">
+
+<sTGC_readout sPadWidth="1051.61" lPadWidth="1344.78" padH="76.35;76.35;76.59;76.59" rankPadPhi="3;2;4;1" nPadPhi="3;3;3;3" anglePadPhi="7.5" firstPadPhiDivision_C="-5.62;-1.87;-5.62;-1.87" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-1.87;-5.62;-1.87;-5.62" PadPhiShift_A="2;-2;2;-2" rankPadH="1;2;3;4" nPadH="13;13;14;14" firstPadH="61.66;61.66;34.38;34.38" firstPadRow="35;35;35;35" sStripWidth="1051.61" lStripWidth="1344.78" wireCutout="0;0;0;0" nWires="738;739;739;739" firstWire="-663.3;-663.75;-664.65;-664.2" wireGroupWidth="20" nStrips="307" firstTriggerBand="67;67;67;67" nTriggerBands="21;21;21;21" firstStripInTrigger="1;1;1;1" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="3;12;12;12;12;12;12;12;12;12;12; 12;12;11;12;12;12;12;12;11;12;13;13;13;13;14" StripsInBandsLayer2="3;12;12;12;12;12;12;12;12;12;12; 12;12;11;12;12;12;12;12;11;12;13;13;13;13;14" StripsInBandsLayer3="5;13;12;12;12;12;12;12;12;12;12; 11;12;12;12;12;12;12;12;12;12;12;12;12;12;14" StripsInBandsLayer4="5;13;12;12;12;12;12;12;12;12;12; 11;12;12;12;12;12;12;12;12;12;12;12;12;12;14" nWireGroups="38;38;38;37" firstWireGroup="3;10;14;20" zLayout="Z_POSITIVE"/>
+</sTGC>
+
+<chamberPosition volume="sTG1-QS3C" type="ENDCAP" chamberType="sTGS" radius="3942.5" zPos="NSW_sTGC_ZSmallConfirm" phi0="22.5" zLayout="Z_POSITIVE"/>
+
+
+<!-- ================ Large Pivot ==================== -->
+
+<sTGC type="sTG1-QL1P" tech="sTGC_1" subType="QL1P" sWidth="542.61" lWidth="1206.82" Length="1332" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0">
+
+<sTGC_readout sPadWidth="476.42" lPadWidth="1126.66" padH="81.42;81.42;81.66;81.66" rankPadPhi="4;3;2;1" nPadPhi="6;6;7;7" anglePadPhi="5" firstPadPhiDivision_C="-10;-10;-12.5;-12.5" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="-10;-10;-12.5;-12.5" PadPhiShift_A="-2;2;-2;2" rankPadH="1;2;3;4" nPadH="17;17;16;16" firstPadH="54.39;54.39;98.15;98.15" firstPadRow="1;1;2;2" sStripWidth="490.84" lStripWidth="1141.09" wireCutout="808;835;862;889" nWires="621;620;620;620" firstWire="-558;-556.65;-557.55;-557.1" wireGroupWidth="20" nStrips="408" firstTriggerBand="7;7;7;7" nTriggerBands="28;28;28;28" firstStripInTrigger="73;73;73;73" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="11;12;13;13;13;12;13;13;12;13;13;12;13;13;13;12;13;13;12;13;13;12;13; 13;13;12;13;13;12;9;13;12;8" StripsInBandsLayer2="11;12;13;13;13;12;13;13;12;13;13;12;13;13;13;12;13;13;12;13;13;12;13; 13;13;12;13;13;12;9;13;12;8" StripsInBandsLayer3="12;12;13;13;13;12;13;13;13;12;13;13;13;12;13;13;12;13;13;13;12;13;13; 13;12;13;13;13;12;9;13;12;6" StripsInBandsLayer4="12;12;13;13;13;12;13;13;13;12;13;13;13;12;13;13;12;13;13;13;12;13;13; 13;12;13;13;13;12;9;13;12;6" nWireGroups="32;32;32;32" firstWireGroup="20;5;10;15" zLayout="Z_POSITIVE"/>
+</sTGC>
+
+<chamberPosition volume="sTG1-QL1P" type="ENDCAP" chamberType="sTGL" radius="1595" zPos="NSW_sTGC_ZLargePivot" phi0="0.0" zLayout="Z_POSITIVE"/>
+
+<sTGC type="sTG1-QL2P" tech="sTGC_1" subType="QL2P" sWidth="1211.81" lWidth="1807.5" Length="1194.6" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0">
+
+<sTGC_readout sPadWidth="1144.12" lPadWidth="1727.34" padH="81.42;81.42;81.66;81.66" rankPadPhi="2;1;4;3" nPadPhi="4;4;5;5" anglePadPhi="7.5" firstPadPhiDivision_C="-7.5;-7.5;-11.25;-11.25" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="-7.5;-7.5;-11.25;-11.25" PadPhiShift_A="-2;2;-2;2" rankPadH="1;2;3;4" nPadH="14;14;15;15" firstPadH="99.51;99.51;65.69;65.69" firstPadRow="18;18;18;18" sStripWidth="1158.55" lStripWidth="1741.77" wireCutout="0;0;0;0" nWires="953;954;954;954" firstWire="-856.8;-857.25;-858.15;-857.7" wireGroupWidth="20" nStrips="366" firstTriggerBand="35;35;35;35" nTriggerBands="29;29;29;29" firstStripInTrigger="1;1;1;1" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="11;13;13;13;12;13;13;12;13;13; 13;12;13;13;12;13;13;12;13;13;13; 12;13;13;11;13;13;13;12" StripsInBandsLayer2="11;13;13;13;12;13;13;12;13;13; 13;12;13;13;12;13;13;12;13;13;13; 12;13;13;11;13;13;13;12" StripsInBandsLayer3="14;12;13;13;13;12;13;13;13;12; 13;13;13;12;13;13;12;13;13;13;12; 13;13;13;11;13;13;13;9" StripsInBandsLayer4="14;12;13;13;13;12;13;13;13;12; 13;13;13;12;13;13;12;13;13;13;12; 13;13;13;11;13;13;13;9" nWireGroups="48;49;49;48" firstWireGroup="20;5;10;15" zLayout="Z_POSITIVE"/>
+</sTGC>
+
+<chamberPosition volume="sTG1-QL2P" type="ENDCAP" chamberType="sTGL" radius="2868.3" zPos="NSW_sTGC_ZLargePivot" phi0="0.0" zLayout="Z_POSITIVE"/>
+
+<sTGC type="sTG1-QL3P" tech="sTGC_1" subType="QL3P" sWidth="1813.68" lWidth="2111" Length="1153" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="545.3" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode="539.26">
+
+<sTGC_readout sPadWidth="1745.99" lPadWidth="2054" padH="81.42;81.42;81.66;81.66"
+ rankPadPhi="2;1;4;3" nPadPhi="4;4;5;5" anglePadPhi="7.5" firstPadPhiDivision_C="-7.5;-7.5;-11.25;-11.25" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="-7.5;-7.5;-11.25;-11.25" PadPhiShift_A="-2;2;-2;2" rankPadH="1;2;3;4" nPadH="15;15;14;14" firstPadH="32.38;32.38;83.57;83.57" firstPadRow="32;32;33;33" sStripWidth="1760.42" lStripWidth="2054" wireCutout="0;0;0;0" nWires="1133;1134;1134;1134" firstWire="-1018.8;-1019.25;-1020.15;-1019.7" wireGroupWidth="20" nStrips="353" firstTriggerBand="64;64;64;64" nTriggerBands="24;24;24;24" firstStripInTrigger="1;1;1;1" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="11;11;13;13;12;13;13;13;12; 13;13;12;13;13;13;12;13;13;13; 12;13;12;13;12;11;11;10;10;10" StripsInBandsLayer2="11;11;13;13;12;13;13;13;12; 13;13;12;13;13;13;12;13;13;13; 12;13;12;13;12;11;11;10;10;10" StripsInBandsLayer3="13;13;12;13;13;13;13;13;12; 13;13;13;12;13;13;13;13;12;13; 13;13;12;13;13;13;13;13;7" StripsInBandsLayer4="13;13;12;13;13;13;13;13;12; 13;13;13;12;13;13;13;13;12;13; 13;13;12;13;13;13;13;13;7" nWireGroups="57;58;58;57" firstWireGroup="20;5;10;15" zLayout="Z_POSITIVE"/>
+</sTGC>
+
+<chamberPosition volume="sTG1-QL3P" type="ENDCAP" chamberType="sTGL" radius="4054.5" zPos="NSW_sTGC_ZLargePivot" phi0="0.0" zLayout="Z_POSITIVE"/>
+
+<!-- =============== Large Confirm ===================== -->
+
+<sTGC type="sTG1-QL1C" tech="sTGC_1" subType="QL1C" sWidth="542.61" lWidth="1206.82" Length="1332" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0">
+
+<sTGC_readout sPadWidth="490.84" lPadWidth="1141.09" padH="85.07;85.07;85.31;85.31" rankPadPhi="4;3;2;1" nPadPhi="6;6;6;6" anglePadPhi="5" firstPadPhiDivision_C="-8.75;-11.25;-8.75;-11.25" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-11.25;-8.75;-11.25;-8.75" PadPhiShift_A="2;-2;2;-2" rankPadH="1;2;3;4" nPadH="16;16;16;16" firstPadH="77.79;77.79;38.01;38.01" firstPadRow="1;1;1;1" sStripWidth="490.84" lStripWidth="1141.09" wireCutout="889;862;835;808" nWires="620;620;620;621" firstWire="-557.1;-556.65;-557.55;-558" wireGroupWidth="20" nStrips="408" firstTriggerBand="6;6;6;6" nTriggerBands="26;26;26;26" firstStripInTrigger="73;73;73;73" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="13;11;14;13;13;13;14;13;13;14;13;13; 13;14;13;13;13;14;13;13;14;13; 13;13;14;13;13;13;14;14;11" StripsInBandsLayer2="13;11;14;13;13;13;14;13;13;14;13;13; 13;14;13;13;13;14;13;13;14;13; 13;13;14;13;13;13;14;14;11" StripsInBandsLayer3="14;11;14;13;13;14;13;13;13;14;13;13; 14;13;13;14;13;13;14;13;13;13; 14;13;13;14;13;13;14;13;10" StripsInBandsLayer4="14;11;14;13;13;14;13;13;13;14;13;13; 14;13;13;14;13;13;14;13;13;13; 14;13;13;14;13;13;14;13;10" nWireGroups="32;32;32;32" firstWireGroup="15;10;5;20" zLayout="Z_POSITIVE"/>
+</sTGC>
+
+<chamberPosition volume="sTG1-QL1C" type="ENDCAP" chamberType="sTGL" radius="1595" zPos="NSW_sTGC_ZLargeConfirm" phi0="0.0" zLayout="Z_POSITIVE"/>
+
+<sTGC type="sTG1-QL2C" tech="sTGC_1" subType="QL2C" sWidth="1211.81" lWidth="1807.5" Length="1194.6" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0">
+
+<sTGC_readout sPadWidth="1158.55" lPadWidth="1741.77" padH="85.07;85.07;85.31;85.31" rankPadPhi="3;2;4;1" nPadPhi="4;4;4;4" anglePadPhi="7.5" firstPadPhiDivision_C="-5.62;-9.37;-5.62;-9.37" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-9.37;-5.62;-9.37;-5.62" PadPhiShift_A="2;-2;2;-2" rankPadH="1;2;3;4" nPadH="14;14;14;14" firstPadH="99.84;99.84;63.9;63.9" firstPadRow="17;17;17;17" sStripWidth="1158.55" lStripWidth="1741.77" wireCutout="0;0;0;0" nWires="954;954;954;953" firstWire="-857.7;-857.25;-858.15;-856.8" wireGroupWidth="20" nStrips="366" firstTriggerBand="32;32;32;32" nTriggerBands="29;29;29;29" firstStripInTrigger="1;1;1;1" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="10;10;11;13;13;14;13;13;14; 13;13;14;13;14;13;13;13;13;14; 13;13;13;14;13;13;14;13;13;3" StripsInBandsLayer2="10;10;11;13;13;14;13;13;14; 13;13;14;13;14;13;13;13;13;14; 13;13;13;14;13;13;14;13;13;3" StripsInBandsLayer3="11;11;12;12;13;14;13;13;14; 13;13;14;13;13;13;14;13;13;14; 13;13;14;13;13;14;13;13;12;2" StripsInBandsLayer4="11;11;12;12;13;14;13;13;14; 13;13;14;13;13;13;14;13;13;14; 13;13;14;13;13;14;13;13;12;2" nWireGroups="48;49;49;48" firstWireGroup="20;5;10;15" zLayout="Z_POSITIVE"/>
+</sTGC>
+
+<chamberPosition volume="sTG1-QL2C" type="ENDCAP" chamberType="sTGL" radius="2868.3" zPos="NSW_sTGC_ZLargeConfirm" phi0="0.0" zLayout="Z_POSITIVE"/>
+
+<sTGC type="sTG1-QL3C" tech="sTGC_1" subType="QL3C" sWidth="1813.68" lWidth="2111" Length="1153" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="545.3" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode="539.26">
+
+<sTGC_readout sPadWidth="1760.42" lPadWidth="2054" padH="85.07;85.07;85.31;85.31" rankPadPhi="3;2;4;1" nPadPhi="4;4;4;4" anglePadPhi="7.5" firstPadPhiDivision_C="-5.62;-9.37;-5.62;-9.37" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-9.37;-5.62;-9.37;-5.62" PadPhiShift_A="2;-2;2;-2" rankPadH="1;2;3;4" nPadH="13;13;14;14" firstPadH="83.76;83.76;51.17;51.17" firstPadRow="31;31;31;31" sStripWidth="1760.42" lStripWidth="2054" wireCutout="0;0;0;0" nWires="1134;1134;1134;1133" firstWire="-1019.7;-1019.25;-1020.15;-1018.8" wireGroupWidth="20" nStrips="353" firstTriggerBand="61;61;61;61" nTriggerBands="27;27;27;27" firstStripInTrigger="1;1;1;1" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="12;12;12;12;11;14;13;13;14;13; 13;14;13;13;14;13;13;13;14;13; 13;13;14;13;13;14;14" StripsInBandsLayer2="12;12;12;12;11;14;13;13;14;13; 13;14;13;13;14;13;13;13;14;13; 13;13;14;13;13;14;14" StripsInBandsLayer3="13;13;13;14;10;13;13;14;13;13; 14;13;13;14;13;13;14;13;13;13; 14;13;13;14;13;13;11" StripsInBandsLayer4="13;13;13;14;10;13;13;14;13;13; 14;13;13;14;13;13;14;13;13;13; 14;13;13;14;13;13;11" nWireGroups="57;58;58;57" firstWireGroup="20;5;10;15" zLayout="Z_POSITIVE"/>
+</sTGC>
+
+<chamberPosition volume="sTG1-QL3C" type="ENDCAP" chamberType="sTGL" radius="4054.5" zPos="NSW_sTGC_ZLargeConfirm" phi0="0.0" zLayout="Z_POSITIVE"/>
+
+</composition>
+</section>
+
+
+<!-- ========== MicroMegas ============================== -->
+
+<section name="NSW_MM_Parameters" version="1" top_volume="useless" date="December 16 2014" author="S.Chen" >
+
+<!-- Frames. "f1": frame width close to the trapezium large side. "f2": frame width close to the trapezium small side. "f3": frame width close to the trapezium oblique side  -->
+
+<!-- Distance from IP, labeled zmin_MM in Parameter Book -->
+<var name="NSW_MM_LM_distanceFromIP" value="7536"/>
+<var name="NSW_MM_SM_distanceFromIP" value="7072"/>
+<!-- Thickness of Multilayer and the subcomponent (mm)-->
+<var name="NSW_MM_GasTck" value="5.05"/>
+<var name="NSW_MM_ROPcbTck" value="11.75"/>
+<var name="NSW_MM_DriftPcbTck" value="11.3"/>
+<var name="NSW_MM_MultilayerTck" value="NSW_NbrOfLayers* NSW_MM_GasTck + (NSW_NbrOfDriftPcb) * NSW_MM_DriftPcbTck+ ( NSW_NbrOfROPcb) * NSW_MM_ROPcbTck" /> <!-- Thickness of one multilayer -->
+
+<!-- Large sector modules (LM1" LM2). Modules are all trapezoid. ""Height"": radial envelope" ""base/top Width"": upper/lower side of the trapezoid-->
+<var name="NSW_MM_LM1_InnerRadius" value="923" />
+<var name="NSW_MM_LM1_Length" value="2310" />
+<var name="NSW_MM_LM1_outerRadius" value="NSW_MM_LM1_InnerRadius+NSW_MM_LM1_Length" />
+<var name="NSW_MM_LM1_f1" value="35.175"/>
+<var name="NSW_MM_LM1_f2" value="35.625"/>
+<var name="NSW_MM_LM1_f3" value="117.26"/>
+<var name="NSW_MM_LMGap_Length" value="5" /> <!-- Radial gap between LM1 and LM2 -->
+<var name="NSW_MM_LM2_InnerRadius" value="NSW_MM_LM1_outerRadius+NSW_MM_LMGap_Length" />
+<var name="NSW_MM_LM2_Length" value="1410" />
+<var name="NSW_MM_LM2_outerRadius" value="NSW_MM_LM2_InnerRadius+NSW_MM_LM2_Length" />
+<var name="NSW_MM_LM1_baseWidth" value="640" />
+<var name="NSW_MM_LM1_topWidth" value="2008.5" />
+<var name="NSW_MM_LM2_baseWidth" value="2022.8" />
+<var name="NSW_MM_LM2_topWidth" value="2220" />
+<var name="NSW_MM_LM2_f1" value="35.175"/>
+<var name="NSW_MM_LM2_f2" value="35.175"/>
+<var name="NSW_MM_LM2_f3" value="112.52"/>
+<!-- These lines added by Alexandre Laurier to fix MM active Geometry / updated values by Chara Kitsaki -->
+<!-- *_activeBottom: bottom length -->
+<!-- *_activeTop: top length -->
+<!-- *_activeH: radial distance -->
+<var name="NSW_MM_LM1_activeBottom" value="426.73"/>
+<var name="NSW_MM_LM1_activeTop" value="1753.0"/>
+<var name="NSW_MM_LM1_activeH" value="2239.2"/>
+<var name="NSW_MM_LM2_activeBottom" value="1802.5"/>
+<var name="NSW_MM_LM2_activeTop" value="1990.0"/>
+<var name="NSW_MM_LM2_activeH" value="1339.65"/>
+<!-- These lines added by Chara Kitsaki to implement all the parameters needed for the strips description -->
+<!-- *_etaMissedTop: the #of eta strips that are not connected to the FE boards (top part of the module) -->
+<!-- *_etaMissedBottom: the #of eta strips that are not connected to the FE boards (bottom part of the module) -->
+<!-- *_stereoMissedBottom: the #of stereo strips that are not connected to the FE boards (bottom part of the module) -->
+<!-- *_stereoMissedTop: the #of stereo strips that are not connected to the FE boards (top part of the module) -->
+<!-- *_stereoRoutedTop: the #of stereo strips that are shorter in length due to geometry restrictions (top part of the module) -->
+<!-- *_stereoRoutedBottom: the #of stereo strips that are shorter in length due to geometry restrictions (bottom part of the module) -->
+<var name="NSW_MM_LM1_etaMissedTop" value="72"/>
+<var name="NSW_MM_LM1_etaMissedBottom" value="72"/>
+<var name="NSW_MM_LM1_stereoMissedTop" value="36"/>
+<var name="NSW_MM_LM1_stereoMissedBottom" value="86"/>
+<var name="NSW_MM_LM1_stereoRoutedTop" value="88"/>
+<var name="NSW_MM_LM1_stereoRoutedBottom" value="0"/>
+<var name="NSW_MM_LM2_etaMissedTop" value="48"/>
+<var name="NSW_MM_LM2_etaMissedBottom" value="47"/>
+<var name="NSW_MM_LM2_stereoMissedTop" value="43"/>
+<var name="NSW_MM_LM2_stereoMissedBottom" value="42"/>
+<var name="NSW_MM_LM2_stereoRoutedTop" value="64"/>
+<var name="NSW_MM_LM2_stereoRoutedBottom" value="58"/>
+<!-- Small sector modules (SM1" SM2). Modules are all trapezoids. ""Height"": radial envelope" ""base/top Width"": upper/lower side -->
+<var name="NSW_MM_SM1_InnerRadius" value="895" />
+<var name="NSW_MM_SM1_Length" value="2210" />
+<var name="NSW_MM_SM1_outerRadius" value="NSW_MM_SM1_InnerRadius+NSW_MM_SM1_Length" />
+<var name="NSW_MM_SMGap_Length" value="5" /> <!-- Radial gap between SM1 and SM2 -->
+<var name="NSW_MM_SM1_f1" value="34.1875"/>
+<var name="NSW_MM_SM1_f2" value="35.0875"/>
+<var name="NSW_MM_SM1_f3" value="114.02"/>
+<var name="NSW_MM_SM2_InnerRadius" value="NSW_MM_SM1_outerRadius+NSW_MM_SMGap_Length" />
+<var name="NSW_MM_SM2_Length" value="1350" />
+<var name="NSW_MM_SM2_outerRadius" value="NSW_MM_SM2_InnerRadius+NSW_MM_SM2_Length" />
+<var name="NSW_MM_SM1_baseWidth" value="500" />
+<var name="NSW_MM_SM1_topWidth" value="1319.2" />
+<var name="NSW_MM_SM2_baseWidth" value="1321.1" />
+<var name="NSW_MM_SM2_topWidth" value="1821.5" />
+<var name="NSW_MM_SM2_f1" value="35.1375"/>
+<var name="NSW_MM_SM2_f2" value="34.7625"/>
+<var name="NSW_MM_SM2_f3" value="114.4"/>
+<!-- These lines added by Alexandre Laurier to fix MM active Geometry / updated values by Chara Kitsaki -->
+<var name="NSW_MM_SM1_activeBottom" value="284.0"/>
+<var name="NSW_MM_SM1_activeTop" value="1078.4"/>
+<var name="NSW_MM_SM1_activeH" value="2140.725"/>
+<var name="NSW_MM_SM2_activeBottom" value="1103.05"/>
+<var name="NSW_MM_SM2_activeTop" value="1579.6"/>
+<var name="NSW_MM_SM2_activeH" value="1280.1"/>
+<!-- These lines added by Chara Kitsaki to implement all the parameters needed for the strips description -->
+<var name="NSW_MM_SM1_etaMissedTop" value="41"/>
+<var name="NSW_MM_SM1_etaMissedBottom" value="42"/>
+<var name="NSW_MM_SM1_stereoMissedTop" value="11"/>
+<var name="NSW_MM_SM1_stereoMissedBottom" value="35"/>
+<var name="NSW_MM_SM1_stereoRoutedTop" value="66"/>
+<var name="NSW_MM_SM1_stereoRoutedBottom" value="18"/>
+<var name="NSW_MM_SM2_etaMissedTop" value="31"/>
+<var name="NSW_MM_SM2_etaMissedBottom" value="29"/>
+<var name="NSW_MM_SM2_stereoMissedTop" value="1"/>
+<var name="NSW_MM_SM2_stereoMissedBottom" value="1"/>
+<var name="NSW_MM_SM2_stereoRoutedTop" value="79"/>
+<var name="NSW_MM_SM2_stereoRoutedBottom" value="64"/>
+
+<var name="NSW_MM_LargeSector_ZCENTER" value="ZCenter_Global+232."/>
+<var name="NSW_MM_SmallSector_ZCENTER" value="ZCenter_Global-232."/>
+
+
+<!-- Thickness of inter-multilayer spacers -->
+<var name="NSW_MM_SpacerThickness" value="52" />
+
+<!-- Global z-coordinate for the sector center -->
+<!--  <var name="NSW_MM_LargeSector_ZCENTER" value="NSW_MM_LM_distanceFromIP + 4.*NSW_MM_DriftPcbTck + 4.*NSW_MM_ROPcbTck + 4.*NSW_MM_GasTck + NSW_MM_SpacerThickness/2."/>
+<var name="NSW_MM_SmallSector_ZCENTER" value="NSW_MM_SM_distanceFromIP + 4.*NSW_MM_DriftPcbTck + 4.*NSW_MM_ROPcbTck + 4.*NSW_MM_GasTck + NSW_MM_SpacerThickness/2."/>  -->
+
+</section>
+
+<section name="NewSmallWheelsMM" version="1" top_volume="NSW_MM" date="December 16 2014" author="S.Chen" >
+
+<!-- Technologies  -->
+<mm_Tech type="MM_1" geometryLevel="1" nLayers="NSW_NbrOfLayers" gasTck="NSW_MM_GasTck" driftPcbTck="NSW_MM_DriftPcbTck" ROPcbTck="NSW_MM_ROPcbTck" Tck="NSW_MM_MultilayerTck" zLayout="Z_POSITIVE"/>
+<!--Chilufya<mmSpacer_Tech type="Spa_1" Tck="NSW_MM_SpacerThickness" />Chilufya-->
+
+<!-- large wheel -->
+<!-- These lines are modified by Chara Kitsaki -->
+<!-- minYPhiL minYPhiR: the (radial)distance kept (left and right part of the module) between the first active stereo and eta strips -->
+<!-- dlStereoTop, dlStereoBottom: the distance between the first stereo and eta strip that is kept starting from the corner-->
+<!-- Some strips are not connected to the FE boards these we call missed strips -->
+<!-- At the corners of the module some strips are shorter in length and they are routed to the FE boards (routed strips). These areas are of low efficiency. LM1 is the special case (there is not much space to route any strips at the module's bottom part) -->
+
+<micromegas type="sMD1-1-1" tech="MM_1" subType="M1L1" sWidth="NSW_MM_LM1_baseWidth" lWidth="NSW_MM_LM1_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_LM1_Length" ylFrame="NSW_MM_LM1_f1" ysFrame="NSW_MM_LM1_f2" xFrame="NSW_MM_LM1_f3" >
+<mm_readout stripPitch="0.45" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.; 0.; 0.02618; -0.02618" readoutSide="-1; 1; -1; 1" zPos="NSW_MM_LargeSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_LM1_InnerRadius" roLength="NSW_MM_LM1_Length" activeBottomLength="NSW_MM_LM1_activeBottom" activeTopLength="NSW_MM_LM1_activeTop" activeH="NSW_MM_LM1_activeH" minYPhiR="12" minYPhiL="0.69" maxYPhi="6.69" nMissedTopEta="NSW_MM_LM1_etaMissedTop" nMissedBottomEta="NSW_MM_LM1_etaMissedBottom" nMissedTopStereo="NSW_MM_LM1_stereoMissedTop" nMissedBottomStereo="NSW_MM_LM1_stereoMissedBottom" nRoutedTop="NSW_MM_LM1_stereoRoutedTop" nRoutedBottom="NSW_MM_LM1_stereoRoutedBottom" dlStereoTop="257.61" dlStereoBottom="426.73" totalStrips="5120" zLayout="Z_POSITIVE" />
+</micromegas>
+<micromegas type="sMD1-2-1" tech="MM_1" subType="M2L1" sWidth="NSW_MM_LM2_baseWidth" lWidth="NSW_MM_LM2_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_LM2_Length" ylFrame="NSW_MM_LM2_f1" ysFrame="NSW_MM_LM2_f2" xFrame="NSW_MM_LM2_f3" >
+<mm_readout stripPitch="0.45" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.; 0.; 0.02618; -0.02618" readoutSide="-1; 1; -1; 1" zPos="NSW_MM_LargeSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_LM2_InnerRadius" roLength="NSW_MM_LM2_Length" activeBottomLength="NSW_MM_LM2_activeBottom" activeTopLength="NSW_MM_LM2_activeTop" activeH="NSW_MM_LM2_activeH" minYPhiR="21.39" minYPhiL="0" maxYPhi="23.77" nMissedTopEta="NSW_MM_LM2_etaMissedTop" nMissedBottomEta="NSW_MM_LM2_etaMissedBottom" nMissedTopStereo="NSW_MM_LM2_stereoMissedTop" nMissedBottomStereo="NSW_MM_LM2_stereoMissedBottom" nRoutedTop="NSW_MM_LM2_stereoRoutedTop" nRoutedBottom="NSW_MM_LM2_stereoRoutedBottom" dlStereoTop="909.4" dlStereoBottom="815.32" totalStrips="3072" zLayout="Z_POSITIVE" />
+</micromegas>
+<micromegas type="sMD1-1-2" tech="MM_1" subType="M1L2" sWidth="NSW_MM_LM1_baseWidth" lWidth="NSW_MM_LM1_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_LM1_Length" ylFrame="NSW_MM_LM1_f1" ysFrame="NSW_MM_LM1_f2" xFrame="NSW_MM_LM1_f3" >
+<mm_readout stripPitch="0.45" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.02618; -0.02618; 0.; 0." readoutSide="-1; 1; -1; 1" zPos="NSW_MM_LargeSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_LM1_InnerRadius" roLength="NSW_MM_LM1_Length" activeBottomLength="NSW_MM_LM1_activeBottom" activeTopLength="NSW_MM_LM1_activeTop" activeH="NSW_MM_LM1_activeH" minYPhiR="12" minYPhiL="0.69" maxYPhi="6.69" nMissedTopEta="NSW_MM_LM1_etaMissedTop" nMissedBottomEta="NSW_MM_LM1_etaMissedBottom" nMissedTopStereo="NSW_MM_LM1_stereoMissedTop" nMissedBottomStereo="NSW_MM_LM1_stereoMissedBottom" nRoutedTop="NSW_MM_LM1_stereoRoutedTop" nRoutedBottom="NSW_MM_LM1_stereoRoutedBottom" dlStereoTop="257.61" dlStereoBottom="426.73" totalStrips="5120" zLayout="Z_POSITIVE" />
+</micromegas>
+<micromegas type="sMD1-2-2" tech="MM_1" subType="M2L2" sWidth="NSW_MM_LM2_baseWidth" lWidth="NSW_MM_LM2_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_LM2_Length" ylFrame="NSW_MM_LM2_f1" ysFrame="NSW_MM_LM2_f2" xFrame="NSW_MM_LM2_f3" >
+<mm_readout stripPitch="0.45" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.02618; -0.02618; 0.; 0." readoutSide="-1; 1; -1; 1" zPos="NSW_MM_LargeSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_LM2_InnerRadius" roLength="NSW_MM_LM2_Length" activeBottomLength="NSW_MM_LM2_activeBottom" activeTopLength="NSW_MM_LM2_activeTop" activeH="NSW_MM_LM2_activeH" minYPhiR="21.39" minYPhiL="0" maxYPhi="23.77" nMissedTopEta="NSW_MM_LM2_etaMissedTop" nMissedBottomEta="NSW_MM_LM2_etaMissedBottom" nMissedTopStereo="NSW_MM_LM2_stereoMissedTop" nMissedBottomStereo="NSW_MM_LM2_stereoMissedBottom" nRoutedTop="NSW_MM_LM2_stereoRoutedTop" nRoutedBottom="NSW_MM_LM2_stereoRoutedBottom" dlStereoTop="909.4" dlStereoBottom="815.32" totalStrips="3072" zLayout="Z_POSITIVE" />
+</micromegas>
+
+<!--Chilufya<mmSpacer type="spa1-1" tech="Spa_1" sWidth="NSW_MM_LM1_baseWidth" lWidth="NSW_MM_LM1_topWidth" Tck="NSW_MM_SpacerThickness" Length="NSW_MM_LM1_Length" />
+<mmSpacer type="spa1-2" tech="Spa_1" sWidth="NSW_MM_LM2_baseWidth" lWidth="NSW_MM_LM2_topWidth" Tck="NSW_MM_SpacerThickness" Length="NSW_MM_LM2_Length" />Chilufya-->
+
+
+<!-- small wheel -->
+<micromegas type="sMD3-1-1" tech="MM_1" subType="M1S1" sWidth="NSW_MM_SM1_baseWidth" lWidth="NSW_MM_SM1_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_SM1_Length" ylFrame="NSW_MM_SM1_f1" ysFrame="NSW_MM_SM1_f2" xFrame="NSW_MM_SM1_f3" >
+<mm_readout stripPitch="0.425" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.; 0.; 0.02618; -0.02618" readoutSide="-1; 1; -1; 1" zPos="NSW_MM_SmallSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_SM1_InnerRadius" roLength="NSW_MM_SM1_Length" activeBottomLength="NSW_MM_SM1_activeBottom" activeTopLength="NSW_MM_SM1_activeTop" activeH="NSW_MM_SM1_activeH" minYPhiR="0.75" minYPhiL="0" maxYPhi="1.36" nMissedTopEta="NSW_MM_SM1_etaMissedTop" nMissedBottomEta="NSW_MM_SM1_etaMissedBottom" nMissedTopStereo="NSW_MM_SM1_stereoMissedTop" nMissedBottomStereo="NSW_MM_SM1_stereoMissedBottom" nRoutedTop="NSW_MM_SM1_stereoRoutedTop" nRoutedBottom="NSW_MM_SM1_stereoRoutedBottom" dlStereoTop="52.15" dlStereoBottom="28.41" totalStrips="5120" zLayout="Z_POSITIVE" />
+</micromegas>
+<micromegas type="sMD3-2-1" tech="MM_1" subType="M2S1" sWidth="NSW_MM_SM2_baseWidth" lWidth="NSW_MM_SM2_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_SM2_Length" ylFrame="NSW_MM_SM2_f1" ysFrame="NSW_MM_SM2_f2" xFrame="NSW_MM_SM2_f3" >
+<mm_readout stripPitch="0.425" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.; 0.; 0.02618; -0.02618" readoutSide="-1; 1; -1; 1" zPos="NSW_MM_SmallSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_SM2_InnerRadius" roLength="NSW_MM_SM2_Length" activeBottomLength="NSW_MM_SM2_activeBottom" activeTopLength="NSW_MM_SM2_activeTop" activeH="NSW_MM_SM2_activeH" minYPhiR="2.53" minYPhiL="0" maxYPhi="7.92" nMissedTopEta="NSW_MM_SM2_etaMissedTop" nMissedBottomEta="NSW_MM_SM2_etaMissedBottom" nMissedTopStereo="NSW_MM_SM2_stereoMissedTop" nMissedBottomStereo="NSW_MM_SM2_stereoMissedBottom" nRoutedTop="NSW_MM_SM2_stereoRoutedTop" nRoutedBottom="NSW_MM_SM2_stereoRoutedBottom" dlStereoTop="303.86" dlStereoBottom="96.14" totalStrips="3072" zLayout="Z_POSITIVE" />
+</micromegas>
+<micromegas type="sMD3-1-2" tech="MM_1" subType="M1S2" sWidth="NSW_MM_SM1_baseWidth" lWidth="NSW_MM_SM1_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_SM1_Length" ylFrame="NSW_MM_SM1_f1" ysFrame="NSW_MM_SM1_f2" xFrame="NSW_MM_SM1_f3" >
+<mm_readout stripPitch="0.425" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.02618; -0.02618; 0.; 0." readoutSide="-1; 1; -1; 1" zPos="NSW_MM_SmallSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_SM1_InnerRadius" roLength="NSW_MM_SM1_Length" activeBottomLength="NSW_MM_SM1_activeBottom" activeTopLength="NSW_MM_SM1_activeTop" activeH="NSW_MM_SM1_activeH" minYPhiR="0.75" minYPhiL="0" maxYPhi="1.36" nMissedTopEta="NSW_MM_SM1_etaMissedTop" nMissedBottomEta="NSW_MM_SM1_etaMissedBottom" nMissedTopStereo="NSW_MM_SM1_stereoMissedTop" nMissedBottomStereo="NSW_MM_SM1_stereoMissedBottom" nRoutedTop="NSW_MM_SM1_stereoRoutedTop" nRoutedBottom="NSW_MM_SM1_stereoRoutedBottom" dlStereoTop="52.15" dlStereoBottom="28.41" totalStrips="5120" zLayout="Z_POSITIVE" />
+</micromegas>
+<micromegas type="sMD3-2-2" tech="MM_1" subType="M2S2" sWidth="NSW_MM_SM2_baseWidth" lWidth="NSW_MM_SM2_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_SM2_Length" ylFrame="NSW_MM_SM2_f1" ysFrame="NSW_MM_SM2_f2" xFrame="NSW_MM_SM2_f3" >
+<mm_readout stripPitch="0.425" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.02618; -0.02618; 0.; 0." readoutSide="-1; 1; -1; 1" zPos="NSW_MM_SmallSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_SM2_InnerRadius" roLength="NSW_MM_SM2_Length" activeBottomLength="NSW_MM_SM2_activeBottom" activeTopLength="NSW_MM_SM2_activeTop" activeH="NSW_MM_SM2_activeH" minYPhiR="2.53" minYPhiL="0" maxYPhi="7.92" nMissedTopEta="NSW_MM_SM2_etaMissedTop" nMissedBottomEta="NSW_MM_SM2_etaMissedBottom" nMissedTopStereo="NSW_MM_SM2_stereoMissedTop" nMissedBottomStereo="NSW_MM_SM2_stereoMissedBottom" nRoutedTop="NSW_MM_SM2_stereoRoutedTop" nRoutedBottom="NSW_MM_SM2_stereoRoutedBottom" dlStereoTop="303.86" dlStereoBottom="96.14" totalStrips="3072" zLayout="Z_POSITIVE" />
+</micromegas>
+<!--Chilufya<mmSpacer type="spa3-1" tech="Spa_1" sWidth="NSW_MM_SM1_baseWidth" lWidth="NSW_MM_SM1_topWidth" Tck="NSW_MM_SpacerThickness" Length="NSW_MM_SM1_Length" />
+<mmSpacer type="spa3-2" tech="Spa_1" sWidth="NSW_MM_SM2_baseWidth" lWidth="NSW_MM_SM2_topWidth" Tck="NSW_MM_SpacerThickness" Length="NSW_MM_SM2_Length" />Chilufya-->
+
+<composition name="NSW_MM" >
+<!-- A-SIDE -->
+
+<!-- LARGE SECTOR -->
+
+<!-- MM multilayer 1 -->
+<chamberPosition volume="sMD1-1-1" radius="(NSW_MM_LM1_InnerRadius+NSW_MM_LM1_outerRadius)/2" zPos="NSW_MM_LargeSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="0" zLayout="Z_POSITIVE"/>
+<chamberPosition volume="sMD1-2-1" radius="(NSW_MM_LM2_InnerRadius+NSW_MM_LM2_outerRadius)/2" zPos="NSW_MM_LargeSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="0" zLayout="Z_POSITIVE"/>
+<!-- spacer -->
+<!--Chilufya<mposPhi volume="spa1-1" ncopy="8" R_Z="(NSW_MM_LM1_InnerRadius+NSW_MM_LM1_outerRadius)/2;NSW_MM_LargeSector_ZCENTER" Phi0="0" rot=" 90.; 270.; 90." />
+<mposPhi volume="spa1-2" ncopy="8" R_Z="(NSW_MM_LM2_InnerRadius+NSW_MM_LM2_outerRadius)/2;NSW_MM_LargeSector_ZCENTER" Phi0="0" rot=" 90.; 270.; 90." />Chilufya-->
+
+<!-- MM multilayer 2 -->
+<chamberPosition volume="sMD1-1-2" radius="(NSW_MM_LM1_InnerRadius+NSW_MM_LM1_outerRadius)/2" zPos="NSW_MM_LargeSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="0" zLayout="Z_POSITIVE"/>
+<chamberPosition volume="sMD1-2-2" radius="(NSW_MM_LM2_InnerRadius+NSW_MM_LM2_outerRadius)/2" zPos="NSW_MM_LargeSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="0" zLayout="Z_POSITIVE"/>
+
+<!-- SMALL SECTOR -->
+
+<!-- MM multilayer 1 -->
+<chamberPosition volume="sMD3-1-1" radius="(NSW_MM_SM1_InnerRadius+NSW_MM_SM1_outerRadius)/2" zPos="NSW_MM_SmallSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="22.5" zLayout="Z_POSITIVE"/>
+<chamberPosition volume="sMD3-2-1" radius="(NSW_MM_SM2_InnerRadius+NSW_MM_SM2_outerRadius)/2" zPos="NSW_MM_SmallSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="22.5" zLayout="Z_POSITIVE"/>
+
+<!-- spacer -->
+<!--Chilufya<mposPhi volume="spa3-1" ncopy="8" R_Z="(NSW_MM_SM1_InnerRadius+NSW_MM_SM1_outerRadius)/2;NSW_MM_SmallSector_ZCENTER" Phi0="22.5" rot=" 90.; 270.; 90." />
+<mposPhi volume="spa3-2" ncopy="8" R_Z="(NSW_MM_SM2_InnerRadius+NSW_MM_SM2_outerRadius)/2;NSW_MM_SmallSector_ZCENTER" Phi0="22.5" rot=" 90.; 270.; 90." />Chilufya-->
+
+<!-- MM multilayer 2 -->
+<chamberPosition volume="sMD3-1-2" radius="(NSW_MM_SM1_InnerRadius+NSW_MM_SM1_outerRadius)/2" zPos="NSW_MM_SmallSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="22.5" zLayout="Z_POSITIVE"/>
+<chamberPosition volume="sMD3-2-2" radius="(NSW_MM_SM2_InnerRadius+NSW_MM_SM2_outerRadius)/2" zPos="NSW_MM_SmallSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="22.5" zLayout="Z_POSITIVE"/>
+
+<!-- C-SIDE -->
+<!-- LARGE SECTOR -->
+<!-- spacer -->
+<!--Chilufya<mposPhi volume="spa1-1" ncopy="8" R_Z="(NSW_MM_LM1_InnerRadius+NSW_MM_LM1_outerRadius)/2;-NSW_MM_LargeSector_ZCENTER" Phi0="0" rot=" 90.; 90.; 90." />
+<mposPhi volume="spa1-2" ncopy="8" R_Z="(NSW_MM_LM2_InnerRadius+NSW_MM_LM2_outerRadius)/2;-NSW_MM_LargeSector_ZCENTER" Phi0="0" rot=" 90.; 90.; 90." />Chilufya-->
+
+<!-- SMALL SECTOR -->
+<!-- spacer -->
+<!--Chilufya<mposPhi volume="spa3-1" ncopy="8" R_Z="(NSW_MM_SM1_InnerRadius+NSW_MM_SM1_outerRadius)/2;-NSW_MM_SmallSector_ZCENTER" Phi0="22.5" rot=" 90.; 90.; 90." />
+<mposPhi volume="spa3-2" ncopy="8" R_Z="(NSW_MM_SM2_InnerRadius+NSW_MM_SM2_outerRadius)/2;-NSW_MM_SmallSector_ZCENTER" Phi0="22.5" rot=" 90.; 90.; 90." />Chilufya-->
+
+</composition>
+
+</section>
+
+
+
+
+
+
+
+<!--====================================SPACER FRAME===============================================-->
+
+<section name       = "LS and SS Spacer Frames"
+         version    = "0.0"
+         date       = "25-07-2017"
+         author     = "Georgian Engineering Team - Niko Tsutskiridze"
+         top_volume = "NSW_Spacer">
+
+<!-- LS Spacer Ftame -->
+<gvxy name="LS_StructuralPlate_Main" material="Aluminium" dZ="5.9">
+  <gvxy_point X_Y="226.; 958."/>
+  <gvxy_point X_Y="914.15; 3281."/>
+  <gvxy_point X_Y="1007.3; 4613."/>
+  <gvxy_point X_Y="0.01; 4613."/>
+  <gvxy_point X_Y="0.01; 958."/>
+</gvxy>
+
+<gvxy name="LS_StructuralPlate_Cut1" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="902.87; 4123."/>
+  <gvxy_point X_Y="932.24; 4543."/>
+  <gvxy_point X_Y="40.; 4543."/>
+  <gvxy_point X_Y="40.; 4123."/>
+</gvxy>
+
+<gvxy name="LS_StructuralPlate_Cut2" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="774.41; 3913.25"/>
+  <gvxy_point X_Y="770.86; 3963."/>
+  <gvxy_point X_Y="135.; 3963."/>
+  <gvxy_point X_Y="135.; 3821.33"/>
+</gvxy>
+
+<gvxy name="LS_StructuralPlate_Cut3" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="778.83; 3639.29"/>
+  <gvxy_point X_Y="792.52; 3835.04"/>
+  <gvxy_point X_Y="203.42; 3750.35"/>
+  <gvxy_point X_Y="203.46; 3720.65"/>
+</gvxy>
+
+<gvxy name="LS_StructuralPlate_Cut4" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="477.15; 3586.36"/>
+  <gvxy_point X_Y="477.24; 3606.18"/>
+  <gvxy_point X_Y="135.; 3654.58"/>
+  <gvxy_point X_Y="135.; 3541.07"/>
+</gvxy>
+
+<gvxy name="LS_StructuralPlate_Cut5" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="762.41; 3404.48"/>
+  <gvxy_point X_Y="772.57; 3549.82"/>
+  <gvxy_point X_Y="286.06; 3485.41"/>
+  <gvxy_point X_Y="286.1; 3465.58"/>
+</gvxy>
+
+<gvxy name="LS_StructuralPlate_Cut6" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="600.; 3314.58"/>
+  <gvxy_point X_Y="602.55; 3354.42"/>
+  <gvxy_point X_Y="60.; 3424.01"/>
+  <gvxy_point X_Y="60.; 3314.58"/>
+</gvxy>
+
+<box  name="LS_StructuralPlate_Cut7" material="Aluminium"  X_Y_Z="138.; 70.; 7. " />
+
+<gvxy name="LS_StructuralPlate_Cut8" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="678.71; 2838.18"/>
+  <gvxy_point X_Y="772.71; 3155.5"/>
+  <gvxy_point X_Y="63.52; 3155.5"/>
+</gvxy>
+
+<gvxy name="LS_StructuralPlate_Cut9" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="533.6; 2715.5"/>
+  <gvxy_point X_Y="551.94; 2791.05"/>
+  <gvxy_point X_Y="40.; 3055.11"/>
+  <gvxy_point X_Y="40.; 2715.5"/>
+</gvxy>
+
+<gvxy name="LS_StructuralPlate_Cut10" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="459.9; 2169.9"/>
+  <gvxy_point X_Y="585.97; 2595.5"/>
+  <gvxy_point X_Y="117.42; 2595.5"/>
+</gvxy>
+
+<gvxy name="LS_StructuralPlate_Cut11" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="391.41; 2095.5"/>
+  <gvxy_point X_Y="135.; 2414.15"/>
+  <gvxy_point X_Y="135.; 2095.5"/>
+</gvxy>
+
+<gvxy name="LS_StructuralPlate_Cut12" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="344.91; 1865.18"/>
+  <gvxy_point X_Y="389.44; 2015.5"/>
+  <gvxy_point X_Y="258.79; 2015.5"/>
+</gvxy>
+<gvxy name="LS_StructuralPlate_Cut13" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="275.45; 1825.5"/>
+  <gvxy_point X_Y="172.35; 2005.44"/>
+  <gvxy_point X_Y="135.; 1995.5"/>
+  <gvxy_point X_Y="135.; 1825.5"/>
+</gvxy>
+
+<gvxy name="LS_StructuralPlate_Cut14" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="173.8; 1028."/>
+  <gvxy_point X_Y="380.41; 1725.5"/>
+  <gvxy_point X_Y="40.; 1725.5"/>
+  <gvxy_point X_Y="40.; 1028."/>
+</gvxy>
+
+<subtraction  name="LS_StructuralPlateSub" >
+  <posXYZ   volume="LS_StructuralPlate_Main"   />
+  <posXYZ   volume="LS_StructuralPlate_Cut1" />
+  <posXYZ   volume="LS_StructuralPlate_Cut2" />
+  <posXYZ   volume="LS_StructuralPlate_Cut3" />
+  <posXYZ   volume="LS_StructuralPlate_Cut4" />
+  <posXYZ   volume="LS_StructuralPlate_Cut5" />
+  <posXYZ   volume="LS_StructuralPlate_Cut6" />
+  <posXYZ   volume="LS_StructuralPlate_Cut7" X_Y_Z="589.; 3235.5; 0." />
+  <posXYZ   volume="LS_StructuralPlate_Cut8" />
+  <posXYZ   volume="LS_StructuralPlate_Cut9" />
+  <posXYZ   volume="LS_StructuralPlate_Cut10" />
+  <posXYZ   volume="LS_StructuralPlate_Cut11" />
+  <posXYZ   volume="LS_StructuralPlate_Cut12" />
+  <posXYZ   volume="LS_StructuralPlate_Cut13" />
+  <posXYZ   volume="LS_StructuralPlate_Cut14" />
+</subtraction>
+
+<composition  name="LS_StructuralPlate" >
+  <posXYZ  volume="LS_StructuralPlateSub" />
+  <posXYZ  volume="LS_StructuralPlateSub" rot="0. ; 180. ; 0." />
+</composition>
+
+<box  name="LS_Central_reference_bar" material="Aluminium"  X_Y_Z="1704.; 100.; 27.8 " />
+
+<box  name="LS_Channel_section_L2000_Main" material="Aluminium"  X_Y_Z="50.; 2000.; 30. " />
+<box  name="LS_Channel_section_L2000_Cut" material="Aluminium"  X_Y_Z="40.; 2050.; 20. " />
+<subtraction  name="LS_Channel_section_L2000" >
+  <posXYZ   volume="LS_Channel_section_L2000_Main"   />
+  <posXYZ   volume="LS_Channel_section_L2000_Cut" />
+</subtraction>
+
+<box  name="LS_Channel_section_L1200_Main" material="Aluminium"  X_Y_Z="50.; 1200.; 30. " />
+<subtraction  name="LS_Channel_section_L1200" >
+  <posXYZ   volume="LS_Channel_section_L1200_Main"   />
+  <posXYZ   volume="LS_Channel_section_L2000_Cut" />
+</subtraction>
+
+<box  name="LS_Channel_section_L850_Main" material="Aluminium"  X_Y_Z="50.; 850.; 30. " />
+<subtraction  name="LS_Channel_section_L850" >
+  <posXYZ   volume="LS_Channel_section_L850_Main"   />
+  <posXYZ   volume="LS_Channel_section_L2000_Cut" />
+</subtraction>
+
+<box  name="LS_Channel_section_L1000_Main" material="Aluminium"  X_Y_Z="50.; 1000.; 30. " />
+<subtraction  name="LS_Channel_section_L1000" >
+  <posXYZ   volume="LS_Channel_section_L1000_Main"   />
+  <posXYZ   volume="LS_Channel_section_L2000_Cut" />
+</subtraction>
+
+<box  name="LS_UProfile_L1460_Main" material="Aluminium"  X_Y_Z="20.; 1460.; 30. " />
+<box  name="LS_UProfile_L1460_Cut" material="Aluminium"  X_Y_Z="20.; 1500.; 24. " />
+<subtraction  name="LS_UProfile_L1460" >
+  <posXYZ   volume="LS_UProfile_L1460_Main"   />
+  <posXYZ   volume="LS_UProfile_L1460_Cut" X_Y_Z="-3.; 0.; 0." />
+</subtraction>
+
+<box  name="LS_UProfile_L750_Main" material="Aluminium"  X_Y_Z="20.; 750.; 30. " />
+<subtraction  name="LS_UProfile_L750" >
+  <posXYZ   volume="LS_UProfile_L750_Main"   />
+  <posXYZ   volume="LS_UProfile_L1460_Cut" X_Y_Z="3.; 0.; 0." />
+</subtraction>
+
+<gvxy name="LS_Top_Interface" material="Aluminium" dZ="30.">
+  <gvxy_point X_Y="914.3; 3484.44"/>
+  <gvxy_point X_Y="1146.47; 3571.68"/>
+  <gvxy_point X_Y="1141.27; 3656.86"/>
+  <gvxy_point X_Y="1054.98; 3656.86"/>
+  <gvxy_point X_Y="1054.98; 4070."/>
+  <gvxy_point X_Y="813.64; 4070."/>
+  <gvxy_point X_Y="774.65; 3494.2"/>
+</gvxy>
+
+<gvxy name="LS_Bottom_Grabber_interface" material="Aluminium" dZ="30.">
+  <gvxy_point X_Y="-801.54; 2552.21"/>
+  <gvxy_point X_Y="-858.34; 2743.97"/>
+  <gvxy_point X_Y="-591.97; 2822.88"/>
+  <gvxy_point X_Y="-535.17; 2631.11"/>
+</gvxy>
+
+<gvxy name="LS_Bottom_Interface" material="Aluminium" dZ="30.">
+  <gvxy_point X_Y="-558.42; 1731.46"/>
+  <gvxy_point X_Y="-616.93; 1928.98"/>
+  <gvxy_point X_Y="-678.34; 1910.78"/>
+  <gvxy_point X_Y="-727.9; 1985.99"/>
+  <gvxy_point X_Y="-570.48; 2124.21"/>
+  <gvxy_point X_Y="-437.49; 2163.6"/>
+  <gvxy_point X_Y="-329.56; 1799.25"/>
+</gvxy>
+
+<box  name="LS_MM_Connectors" material="Aluminium"  X_Y_Z="76.; 40.; 30. " />
+<composition  name="LS_MM_Connectors_Assembly" >
+  <posXYZ  volume="LS_MM_Connectors" X_Y_Z="323.24; 1278.98; 0." rot="0. ; 0. ; -16.5" />
+  <posXYZ  volume="LS_MM_Connectors" X_Y_Z="596.23; 2200.58; 0." rot="0. ; 0. ; -16.5" />
+  <posXYZ  volume="LS_MM_Connectors" X_Y_Z="800.97; 2891.78; 0." rot="0. ; 0. ; -16.5" />
+  <posXYZ  volume="LS_MM_Connectors" X_Y_Z="922.31; 3368.81; 0." rot="0. ; 0. ; -4." />
+  <posXYZ  volume="LS_MM_Connectors" X_Y_Z="986.76; 4290.41; 0." rot="0. ; 0. ; -4." />
+  <posXYZ  volume="LS_MM_Connectors" X_Y_Z="824.; 4615.; 0." rot="0. ; 0. ; 90." />
+</composition>
+
+<box  name="LS_KM_Joint" material="ShieldSteel"  X_Y_Z="150.; 118.; 48. " />
+
+<composition  name="LS_Spacer_Frame_Assembly" >
+  <posXYZ  volume="LS_StructuralPlate" X_Y_Z="0.; 0.; 18." />
+  <posXYZ  volume="LS_StructuralPlate" X_Y_Z="0.; 0.; -18." />
+  <posXYZ  volume="LS_Central_reference_bar" X_Y_Z="0.; 3235.5; 0." />
+  <posXYZ  volume="LS_Channel_section_L2000" X_Y_Z="0.; 2185.49; 0." />
+  <posXYZ  volume="LS_Channel_section_L1200" X_Y_Z="0.; 3885.51; 0." />
+  <posXYZ  volume="LS_Channel_section_L850" X_Y_Z="130.5; 3710.51; 0." />
+  <posXYZ  volume="LS_Channel_section_L850" X_Y_Z="-130.5; 3710.51; 0." />
+  <posXYZ  volume="LS_Channel_section_L1000" X_Y_Z="130.5; 2223.; 0." />
+  <posXYZ  volume="LS_Channel_section_L1000" X_Y_Z="-130.5; 2223.; 0." />
+  <posXYZ  volume="LS_UProfile_L1460" X_Y_Z="252.; 2455.49; 0." />
+  <posXYZ  volume="LS_UProfile_L1460" X_Y_Z="-252.; 2455.49; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="LS_UProfile_L750" X_Y_Z="252.; 3760.5; 0." />
+  <posXYZ  volume="LS_UProfile_L750" X_Y_Z="-252.; 3760.5; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="LS_UProfile_L750" X_Y_Z="465.; 3760.5; 0." />
+  <posXYZ  volume="LS_UProfile_L750" X_Y_Z="-465.; 3760.5; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="LS_UProfile_L750" X_Y_Z="678.; 3760.5; 0." />
+  <posXYZ  volume="LS_UProfile_L750" X_Y_Z="-678.; 3760.5; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="LS_UProfile_L750" X_Y_Z="465.; 2551.; 0." />
+  <posXYZ  volume="LS_UProfile_L750" X_Y_Z="-465.; 2551.; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="LS_Top_Interface" X_Y_Z="0.; 0.; 0." />
+  <posXYZ  volume="LS_Top_Interface" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="LS_Bottom_Grabber_interface" X_Y_Z="0.; 0.; 0." rot="0. ; 0. ; 0." />
+  <posXYZ  volume="LS_Bottom_Grabber_interface" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="LS_Bottom_Interface" X_Y_Z="0.; 0.; 0." rot="0. ; 0. ; 0." />
+  <posXYZ  volume="LS_Bottom_Interface" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="LS_MM_Connectors_Assembly" X_Y_Z="0.; 0.; 0." rot="0. ; 0. ; 0." />
+  <posXYZ  volume="LS_MM_Connectors_Assembly" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="LS_MM_Connectors" X_Y_Z="0.; 956.; 0." rot="0. ; 0. ; 90." />
+  <posXYZ  volume="LS_MM_Connectors" X_Y_Z="0.; 4615.; 0." rot="0. ; 0. ; 90." />
+  <posXYZ  volume="LS_KM_Joint" X_Y_Z="-1130.01; 3970.; 0." rot="0. ; 0. ; 0." />
+  <posXYZ  volume="LS_KM_Joint" X_Y_Z="1130.01; 3970.; 0." rot="0. ; 0. ; 0." />
+  <posXYZ  volume="LS_KM_Joint" X_Y_Z="656.6; 1798.8; 0." rot="0. ; 0. ; -16.5" />
+</composition>
+
+<composition  name="LS" >
+  <posXYZ  volume="LS_Spacer_Frame_Assembly"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 0." />
+  <posXYZ  volume="LS_Spacer_Frame_Assembly"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 45." />
+  <posXYZ  volume="LS_Spacer_Frame_Assembly"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 90." />
+  <posXYZ  volume="LS_Spacer_Frame_Assembly"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 135." />
+  <posXYZ  volume="LS_Spacer_Frame_Assembly"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 180." />
+  <posXYZ  volume="LS_Spacer_Frame_Assembly"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 225." />
+  <posXYZ  volume="LS_Spacer_Frame_Assembly"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 270." />
+  <posXYZ  volume="LS_Spacer_Frame_Assembly"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 315." />
+</composition>
+<!-- LS Spacer Ftame -->
+
+<!-- SS Spacer Ftame -->
+<gvxy name="SS_StructuralPlate_Main" material="Aluminium" dZ="5.9">
+  <gvxy_point X_Y="154.8; 930."/>
+  <gvxy_point X_Y="745.; 4114.46"/>
+  <gvxy_point X_Y="745.; 4425."/>
+  <gvxy_point X_Y="0.01; 4425."/>
+  <gvxy_point X_Y="0.01; 930."/>
+</gvxy>
+
+<gvxy name="SS_StructuralPlate_Cut1" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="685.; 4242.5"/>
+  <gvxy_point X_Y="685.; 4375."/>
+  <gvxy_point X_Y="25.; 4375."/>
+  <gvxy_point X_Y="25.; 4242.5"/>
+</gvxy>
+
+<gvxy name="SS_StructuralPlate_Cut2" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="449.11; 4102.75"/>
+  <gvxy_point X_Y="446.87; 4122.5"/>
+  <gvxy_point X_Y="125.; 4122.5"/>
+  <gvxy_point X_Y="125.; 4028.36"/>
+</gvxy>
+
+<gvxy name="SS_StructuralPlate_Cut3" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="577.21; 3867.18"/>
+  <gvxy_point X_Y="620.57; 4101.07"/>
+  <gvxy_point X_Y="131.86; 3988.9"/>
+  <gvxy_point X_Y="131.86; 3969.4"/>
+</gvxy>
+
+<gvxy name="SS_StructuralPlate_Cut4" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="395.9; 3847.5"/>
+  <gvxy_point X_Y="398.14; 3867.25"/>
+  <gvxy_point X_Y="125.; 3929.94"/>
+  <gvxy_point X_Y="125.; 3847.5"/>
+</gvxy>
+
+<gvxy name="SS_StructuralPlate_Cut5" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="495.98; 3705.39"/>
+  <gvxy_point X_Y="495.98; 3747.5"/>
+  <gvxy_point X_Y="25.; 3747.5"/>
+  <gvxy_point X_Y="25.; 3475.7"/>
+</gvxy>
+
+<gvxy name="SS_StructuralPlate_Cut6" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="488.74; 3225.16"/>
+  <gvxy_point X_Y="576.8; 3700.3"/>
+  <gvxy_point X_Y="45.63; 3441.26"/>
+</gvxy>
+
+<gvxy name="SS_StructuralPlate_Cut7" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="408.58; 3177.5"/>
+  <gvxy_point X_Y="417.35; 3215.48"/>
+  <gvxy_point X_Y="25.; 3406.82"/>
+  <gvxy_point X_Y="25.; 3177.5"/>
+</gvxy>
+
+<box  name="SS_StructuralPlate_Cut8" material="Aluminium"  X_Y_Z="92.; 70.; 7. " />
+
+<gvxy name="SS_StructuralPlate_Cut9" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="429.19; 3037.5"/>
+  <gvxy_point X_Y="25.; 3037.5"/>
+  <gvxy_point X_Y="25.; 2483.96"/>
+</gvxy>
+
+<gvxy name="SS_StructuralPlate_Cut10" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="342.44; 2435.8"/>
+  <gvxy_point X_Y="445.53; 2992.05"/>
+  <gvxy_point X_Y="50.98; 2451.7"/>
+  <gvxy_point X_Y="59.05; 2435.8"/>
+</gvxy>
+
+<gvxy name="SS_StructuralPlate_Cut11" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="275.17; 2072.87"/>
+  <gvxy_point X_Y="330.64; 2372.16"/>
+  <gvxy_point X_Y="310.98; 2395.8"/>
+  <gvxy_point X_Y="39.37; 2395.8"/>
+</gvxy>
+
+<gvxy name="SS_StructuralPlate_Cut12" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="245.39; 2045.82"/>
+  <gvxy_point X_Y="25.; 2347.65"/>
+  <gvxy_point X_Y="25.; 2045.82"/>
+</gvxy>
+
+<gvxy name="SS_StructuralPlate_Cut13" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="144.83; 1534.74"/>
+  <gvxy_point X_Y="203.73; 1852.5"/>
+  <gvxy_point X_Y="125.; 1852.5"/>
+  <gvxy_point X_Y="125.; 1536.56"/>
+</gvxy>
+
+<gvxy name="SS_StructuralPlate_Cut14" material="Aluminium" dZ="7.">
+  <gvxy_point X_Y="123.38; 980."/>
+  <gvxy_point X_Y="201.04; 1399."/>
+  <gvxy_point X_Y="25.; 1399."/>
+  <gvxy_point X_Y="25.; 980."/>
+</gvxy>
+
+<subtraction  name="SS_StructuralPlateSub" >
+  <posXYZ   volume="SS_StructuralPlate_Main"   />
+  <posXYZ   volume="SS_StructuralPlate_Cut1" />
+  <posXYZ   volume="SS_StructuralPlate_Cut2" />
+  <posXYZ   volume="SS_StructuralPlate_Cut3" />
+  <posXYZ   volume="SS_StructuralPlate_Cut4" />
+  <posXYZ   volume="SS_StructuralPlate_Cut5" />
+  <posXYZ   volume="SS_StructuralPlate_Cut6" />
+  <posXYZ   volume="SS_StructuralPlate_Cut7" />
+  <posXYZ   volume="SS_StructuralPlate_Cut8" X_Y_Z="-340.5; 3107.5; 0." />
+  <posXYZ   volume="SS_StructuralPlate_Cut9" />
+  <posXYZ   volume="SS_StructuralPlate_Cut10" />
+  <posXYZ   volume="SS_StructuralPlate_Cut11" />
+  <posXYZ   volume="SS_StructuralPlate_Cut12" />
+  <posXYZ   volume="SS_StructuralPlate_Cut13" />
+  <posXYZ   volume="SS_StructuralPlate_Cut14" />
+</subtraction>
+
+<composition  name="SS_StructuralPlate" >
+  <posXYZ  volume="SS_StructuralPlateSub" X_Y_Z="0.; 0.; 0." rot="0. ; 0. ; 0." />
+  <posXYZ  volume="SS_StructuralPlateSub" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." />
+</composition>
+
+<box  name="SS_Central_reference_bar" material="Aluminium"  X_Y_Z="1012.; 100.; 28. " />
+
+<box  name="SS_Channel_section_L1100_Main" material="Aluminium"  X_Y_Z="50.; 1100.; 30. " />
+<subtraction  name="SS_Channel_section_L1100" >
+  <posXYZ   volume="SS_Channel_section_L1100_Main"   />
+  <posXYZ   volume="LS_Channel_section_L2000_Cut" />
+</subtraction>
+
+
+<box  name="SS_Channel_section_L650_Main" material="Aluminium"  X_Y_Z="50.; 650.; 30. " />
+<subtraction  name="SS_Channel_section_L650" >
+  <posXYZ   volume="SS_Channel_section_L650_Main"   />
+  <posXYZ   volume="LS_Channel_section_L2000_Cut" />
+</subtraction>
+
+<box  name="SS_UProfile_L1000_Main" material="Aluminium"  X_Y_Z="20.; 1000.; 30. " />
+<subtraction  name="SS_UProfile_L1000" >
+  <posXYZ   volume="SS_UProfile_L1000_Main"   />
+  <posXYZ   volume="LS_UProfile_L1460_Cut" X_Y_Z="-3.; 0.; 0." />
+</subtraction>
+
+<box  name="SS_UProfile_L920_Main" material="Aluminium"  X_Y_Z="20.; 920.; 30. " />
+<subtraction  name="SS_UProfile_L920" >
+  <posXYZ   volume="SS_UProfile_L920_Main"   />
+  <posXYZ   volume="LS_UProfile_L1460_Cut" X_Y_Z="-3.; 0.; 0." />
+</subtraction>
+
+<box  name="SS_UProfile_L1200_Main" material="Aluminium"  X_Y_Z="20.; 1200.; 30. " />
+<subtraction  name="SS_UProfile_L1200" >
+  <posXYZ   volume="SS_UProfile_L1200_Main"   />
+  <posXYZ   volume="LS_UProfile_L1460_Cut" X_Y_Z="-3.; 0.; 0." />
+</subtraction>
+
+<box  name="SS_UProfile_L700_Main" material="Aluminium"  X_Y_Z="20.; 700.; 30. " />
+<subtraction  name="SS_UProfile_L700" >
+  <posXYZ   volume="SS_UProfile_L700_Main"   />
+  <posXYZ   volume="LS_UProfile_L1460_Cut" X_Y_Z="-3.; 0.; 0." />
+</subtraction>
+
+<gvxy name="SS_Top_Interface" material="Aluminium" dZ="30.">
+  <gvxy_point X_Y="849.99; 3705.17"/>
+  <gvxy_point X_Y="849.99; 4260."/>
+  <gvxy_point X_Y="627.69; 4260."/>
+  <gvxy_point X_Y="627.69; 4106.34"/>
+  <gvxy_point X_Y="564.77; 3758.03"/>
+</gvxy>
+
+<gvxy name="SS_Bottom_Grabber_interface" material="Aluminium" dZ="30.">
+  <gvxy_point X_Y="454.99; 1875."/>
+  <gvxy_point X_Y="454.99; 2075."/>
+  <gvxy_point X_Y="255.; 2075."/>
+  <gvxy_point X_Y="255.; 1875."/>
+</gvxy>
+
+<gvxy name="SS_Bottom_Interface" material="Aluminium" dZ="30.">
+  <gvxy_point X_Y="442.2; 1397.5"/>
+  <gvxy_point X_Y="442.2; 1560.65"/>
+  <gvxy_point X_Y="397.; 1560.65"/>
+  <gvxy_point X_Y="397.; 1792.5"/>
+  <gvxy_point X_Y="194.29; 1792.5"/>
+  <gvxy_point X_Y="149.53; 1434.71"/>
+  <gvxy_point X_Y="204.54; 1397.5"/>
+</gvxy>
+
+<box  name="SS_MM_Connectors" material="Aluminium"  X_Y_Z="76.; 40.; 30. " />
+<box  name="SS_MM_Connectors_Lar" material="Aluminium"  X_Y_Z="120.; 40.; 30. " />
+<composition  name="SS_MM_Connectors_Assembly" >
+  <posXYZ  volume="SS_MM_Connectors" X_Y_Z="214.86; 1243.14; 0." rot="0. ; 0. ; -10.5" />
+  <posXYZ  volume="SS_MM_Connectors" X_Y_Z="376.17; 2113.54; 0." rot="0. ; 0. ; -10.5" />
+  <posXYZ  volume="SS_MM_Connectors" X_Y_Z="497.16; 2766.34; 0." rot="0. ; 0. ; -10.5" />
+  <posXYZ  volume="SS_MM_Connectors" X_Y_Z="626.36; 3463.34; 0." rot="0. ; 0. ; -10.5" />
+  <posXYZ  volume="SS_MM_Connectors_Lar" X_Y_Z="766.02; 4337.75; 0." rot="0. ; 0. ; -10.5" />
+  <posXYZ  volume="SS_MM_Connectors" X_Y_Z="624.; 4427.; 0." rot="0. ; 0. ; 90." />
+</composition>
+
+<box  name="SS_KM_Joint" material="ShieldSteel"  X_Y_Z="154.; 101.; 48. " />
+
+<composition  name="SS_Spacer_Frame_Assembly" >
+  <posXYZ  volume="SS_StructuralPlate" X_Y_Z="0.; 0.; 18." />
+  <posXYZ  volume="SS_StructuralPlate" X_Y_Z="0.; 0.; -18." />
+  <posXYZ  volume="SS_Central_reference_bar" X_Y_Z="0.; 3107.5; 0." />
+  <posXYZ  volume="LS_Channel_section_L2000" X_Y_Z="0.; 2057.49; 0." />
+  <posXYZ  volume="SS_Channel_section_L1100" X_Y_Z="0.; 3707.51; 0." />
+  <posXYZ  volume="SS_Channel_section_L1100" X_Y_Z="-110.5; 3707.51; 0." />
+  <posXYZ  volume="SS_Channel_section_L1100" X_Y_Z="110.5; 3707.51; 0." />
+  <posXYZ  volume="SS_Channel_section_L650" X_Y_Z="-110.5; 1722.; 0." />
+  <posXYZ  volume="SS_Channel_section_L650" X_Y_Z="110.5; 1722.; 0." />
+  <posXYZ  volume="SS_UProfile_L1000" X_Y_Z="-345.; 3742.5; 0." />
+  <posXYZ  volume="SS_UProfile_L1000" X_Y_Z="345.; 3742.5; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="SS_UProfile_L920" X_Y_Z="-195.; 3782.5; 0." />
+  <posXYZ  volume="SS_UProfile_L920" X_Y_Z="195.; 3782.5; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="SS_UProfile_L1200" X_Y_Z="-195.; 2457.49; 0." />
+  <posXYZ  volume="SS_UProfile_L1200" X_Y_Z="195.; 2457.49; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="SS_UProfile_L700" X_Y_Z="-360.; 2587.5; 0." />
+  <posXYZ  volume="SS_UProfile_L700" X_Y_Z="360.; 2587.5; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="SS_Top_Interface" X_Y_Z="0.; 0.; 0." />
+  <posXYZ  volume="SS_Top_Interface" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="SS_Bottom_Grabber_interface" X_Y_Z="0.; 0.; 0." rot="0. ; 0. ; 0." />
+  <posXYZ  volume="SS_Bottom_Grabber_interface" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="SS_Bottom_Interface" X_Y_Z="0.; 0.; 0." rot="0. ; 0. ; 0." />
+  <posXYZ  volume="SS_Bottom_Interface" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="SS_MM_Connectors_Assembly" X_Y_Z="0.; 0.; 0." rot="0. ; 0. ; 0." />
+  <posXYZ  volume="SS_MM_Connectors_Assembly" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." />
+  <posXYZ  volume="SS_MM_Connectors" X_Y_Z="0.; 928.; 0." rot="0. ; 0. ; 90." />
+  <posXYZ  volume="SS_MM_Connectors" X_Y_Z="0.; 4427.; 0." rot="0. ; 0. ; 90." />
+  <posXYZ  volume="SS_KM_Joint" X_Y_Z="-927.01; 4160.; 0." rot="0. ; 0. ; 0." />
+  <posXYZ  volume="SS_KM_Joint" X_Y_Z="927.01; 4160.; 0." rot="0. ; 0. ; 0." />
+  <posXYZ  volume="SS_KM_Joint" X_Y_Z="-532.01; 1975.; 0." rot="0. ; 0. ; 0." />
+</composition>
+
+<composition  name="SS_AssemblyRot" >
+  <posXYZ  volume="SS_Spacer_Frame_Assembly"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 22.5" />
+</composition>
+
+<composition  name="SS" >
+  <posXYZ  volume="SS_AssemblyRot"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 0." />
+  <posXYZ  volume="SS_AssemblyRot"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 45." />
+  <posXYZ  volume="SS_AssemblyRot"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 90." />
+  <posXYZ  volume="SS_AssemblyRot"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 135." />
+  <posXYZ  volume="SS_AssemblyRot"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 180." />
+  <posXYZ  volume="SS_AssemblyRot"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 225." />
+  <posXYZ  volume="SS_AssemblyRot"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 270." />
+  <posXYZ  volume="SS_AssemblyRot"  X_Y_Z="0.; 0.; 0." rot="   0. ; 0. ; 315." />
+</composition>
+<!-- End SS Spacer_Frame-->
+
+<composition  name="LS_and_SS_SideA" >
+  <posXYZ  volume="LS"  X_Y_Z="0.; 0.; 7641." rot=" 0. ; 0. ; 0." />
+  <posXYZ  volume="SS"  X_Y_Z="0.; 0.; 7177." rot=" 0. ; 0. ; 0." />
+</composition>
+
+<!-- ================================================ LS/SS Frames ========================================= -->
+<!-- SS_Frame -->
+<gvxysx name="SS_Frame_Main" material="muo::FR4" dZ="10.4">
+    <gvxy_point X_Y="172.6; 911.2"/>
+    <gvxy_point X_Y="172.6; 986.2"/>
+    <gvxy_point X_Y="235.1; 1403.7"/>
+    <gvxy_point X_Y="348.7; 1386.7"/>
+    <gvxy_point X_Y="366.4; 1505.4"/>
+    <gvxy_point X_Y="252.7; 1522.4"/>
+    <gvxy_point X_Y="582.3; 3727.8"/>
+    <gvxy_point X_Y="795.; 3696.1"/>
+    <gvxy_point X_Y="812.7; 3814.8"/>
+    <gvxy_point X_Y="600.1; 3846.5"/>
+    <gvxy_point X_Y="688.2; 4436.4"/>
+</gvxysx>
+
+<gvxysx name="SS_Frame_Sub1" material="muo::FR4" dZ="11.">
+    <gvxy_point X_Y="470.5; 3486.4"/>
+    <gvxy_point X_Y="601.2; 4361.4"/>
+</gvxysx>
+
+<gvxysx name="SS_Frame_Sub2" material="muo::FR4" dZ="11.">
+    <gvxy_point X_Y="290.5; 2282.6"/>
+    <gvxy_point X_Y="452.5; 3366.4"/>
+</gvxysx>
+
+<gvxysx name="SS_Frame_Sub3" material="muo::FR4" dZ="11.">
+    <gvxy_point X_Y="96.8; 986.2"/>
+    <gvxy_point X_Y="272.6; 2162.6"/>
+</gvxysx>
+
+<subtraction name="SS_Frame" >
+    <posXYZ volume="SS_Frame_Main" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.;0."/>
+    <posXYZ volume="SS_Frame_Sub1" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.;0."/>
+    <posXYZ volume="SS_Frame_Sub2" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.;0."/>
+    <posXYZ volume="SS_Frame_Sub3" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.;0."/>
+</subtraction>
+
+<tubs name="LM_SS_Fixed_Interfaces_main" material="ShieldSteel" Rio_Z="0.; 37.5; 410." nbPhi="32"/>
+
+<box name="LM_SS_Fixed_Interfaces_Subtr" material="ShieldSteel" X_Y_Z="80.; 130.; 31."/>
+
+<subtraction name="LM_SS_Fixed_Interfaces" >
+    <posXYZ volume="LM_SS_Fixed_Interfaces_main" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.;0."/>
+    <posXYZ volume="LM_SS_Fixed_Interfaces_Subtr" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.;0."/>
+</subtraction>
+
+<composition  name="SS_Frame_Assembly" >
+    <posXYZ volume="SS_Frame" X_Y_Z=" 0.; 0.; 136.8" rot=" 0.; 0.; 0." />
+    <posXYZ volume="SS_Frame" X_Y_Z=" 0.; 0.; -136.8" rot=" 0.; 0.; 0." />
+    <posXYZ volume="SS_Frame" X_Y_Z=" 0.; 0.; 197.2" rot=" 0.; 0.; 0." />
+    <posXYZ volume="SS_Frame" X_Y_Z=" 0.; 0.; -197.2" rot=" 0.; 0.; 0." />
+    <posXYZ volume="LM_SS_Fixed_Interfaces" X_Y_Z=" 846.; 3749.; 0." rot=" 0.; 0.; 0." />
+    <posXYZ volume="LM_SS_Fixed_Interfaces" X_Y_Z=" -846.; 3749.; 0." rot=" 0.; 0.; 0." />
+    <posXYZ volume="LM_SS_Fixed_Interfaces" X_Y_Z=" -399.7; 1439.7; 0." rot=" 0.; 0.; 0." />
+</composition>
+
+<composition  name="SS_Frame_Assembly_Pos" >
+    <posXYZ volume="SS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 22.5" />
+    <posXYZ volume="SS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 67.5" />
+    <posXYZ volume="SS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 112.5" />
+    <posXYZ volume="SS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 157.5" />
+    <posXYZ volume="SS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 202.5" />
+    <posXYZ volume="SS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 247.5" />
+    <posXYZ volume="SS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 292.5" />
+    <posXYZ volume="SS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 337.5" />
+</composition>
+<!-- End SS_Frame -->
+
+<!-- LS_Frame -->
+<gvxysx name="LS_Frame_Main" material="muo::FR4" dZ="10.6">
+    <gvxy_point X_Y="277.29; 940."/>
+    <gvxy_point X_Y="277.29; 1015."/>
+    <gvxy_point X_Y="495.6; 1890.3"/>
+    <gvxy_point X_Y="665.5; 1890.3"/>
+    <gvxy_point X_Y="695.4; 2010.2"/>
+    <gvxy_point X_Y="525.5; 2010.2"/>
+    <gvxy_point X_Y="923.57; 3606.2"/>
+    <gvxy_point X_Y="1083.2; 3566.4"/>
+    <gvxy_point X_Y="1112.2; 3682.8"/>
+    <gvxy_point X_Y="952.6; 3722.6"/>
+    <gvxy_point X_Y="1040.5; 4075."/>
+    <gvxy_point X_Y="1040.5; 4622."/>
+</gvxysx>
+
+<gvxysx name="LS_Frame_Sub1" material="muo::FR4" dZ="11.">
+    <gvxy_point X_Y="965.5; 4547."/>
+    <gvxy_point X_Y="965.5; 4085."/>
+    <gvxy_point X_Y="825.; 3525."/>
+</gvxysx>
+
+<gvxysx name="LS_Frame_Sub2" material="muo::FR4" dZ="11.">
+    <gvxy_point X_Y="796.; 3405."/>
+    <gvxy_point X_Y="525.; 2317.8"/>
+</gvxysx>
+
+<gvxysx name="LS_Frame_Sub3" material="muo::FR4" dZ="11.">
+    <gvxy_point X_Y="494.9; 2197.8"/>
+    <gvxy_point X_Y="200.; 1015."/>
+</gvxysx>
+
+<subtraction name="LS_Frame" >
+    <posXYZ volume="LS_Frame_Main" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.;0."/>
+    <posXYZ volume="LS_Frame_Sub1" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.;0."/>
+    <posXYZ volume="LS_Frame_Sub2" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.;0."/>
+    <posXYZ volume="LS_Frame_Sub3" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.;0."/>
+</subtraction>
+
+<tubs name="LM_LS_Fixed_Interfaces_main" material="ShieldSteel" Rio_Z="0.; 37.4; 410." nbPhi="32"/>
+
+<subtraction name="LM_LS_Fixed_Interfaces" >
+    <posXYZ volume="LM_LS_Fixed_Interfaces_main" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.;0."/>
+    <posXYZ volume="LM_SS_Fixed_Interfaces_Subtr" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.;0."/>
+</subtraction>
+
+<composition  name="LS_Frame_Assembly" >
+    <posXYZ volume="LS_Frame" X_Y_Z=" 0.; 0.; 136.7" rot=" 0.; 0.; 0." />
+    <posXYZ volume="LS_Frame" X_Y_Z=" 0.; 0.; -136.7" rot=" 0.; 0.; 0." />
+    <posXYZ volume="LS_Frame" X_Y_Z=" 0.; 0.; 197.3" rot=" 0.; 0.; 0." />
+    <posXYZ volume="LS_Frame" X_Y_Z=" 0.; 0.; -197.3" rot=" 0.; 0.; 0." />
+    <posXYZ volume="LM_LS_Fixed_Interfaces" X_Y_Z=" 1139.32; 3615.; 0." rot=" 0.; 0.; 0." />
+    <posXYZ volume="LM_LS_Fixed_Interfaces" X_Y_Z=" -1139.32; 3615.; 0." rot=" 0.; 0.; 0." />
+    <posXYZ volume="LM_LS_Fixed_Interfaces" X_Y_Z=" -720.55; 1935.83; 0." rot=" 0.; 0.; 0." />
+</composition>
+
+<composition  name="LS_Frame_Assembly_Pos" >
+    <posXYZ volume="LS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 0." />
+    <posXYZ volume="LS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 45." />
+    <posXYZ volume="LS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 90." />
+    <posXYZ volume="LS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 135." />
+    <posXYZ volume="LS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 180." />
+    <posXYZ volume="LS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 225." />
+    <posXYZ volume="LS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 270." />
+    <posXYZ volume="LS_Frame_Assembly" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 315." />
+</composition>
+<!-- End LS_Frame -->
+
+<composition  name="NSW_Spacer" >
+  <!-- Aside -->
+  <posXYZ  volume="LS_and_SS_SideA" />
+  <posXYZ volume="SS_Frame_Assembly_Pos" X_Y_Z=" 0.; 0.; 7177." rot=" 0.; 0.; 0." />
+  <posXYZ volume="LS_Frame_Assembly_Pos" X_Y_Z=" 0.; 0.; 7641." rot=" 0.; 0.; 0." />
+</composition>
+
+</section>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<!--====================================Support Structures and Hub===============================================-->
+
+<section name       = "NSW Aluminum Structure and HUB"
+         version    = "0.0"
+         date       = "25-04-2017"
+         author     = "Georgian Engineering Team - Niko Tsutskiridze"
+         top_volume = "NSW_Aluminum_Structure_and_HUB">
+
+<!-- ********************************************** New Hub ************************************************** -->
+
+<!-- Horizontal Shielding -->
+<gvxysx name="Hub_Outer_Plate1" material="Lead" dZ="517.5">
+  <gvxy_point X_Y="-163.1; 820.05"/>
+  <gvxy_point X_Y=" -169.25; 850.95"/>
+</gvxysx>
+
+ <gvxysx name="Hub_Outer_Plate2" material="PolyBoron207HD5" dZ="517.5">
+  <gvxy_point X_Y="-163.1; 820."/>
+  <gvxy_point X_Y=" -153.15; 770."/>
+</gvxysx>
+
+<gvxysx name="Hub_Outer_Plate3" material="Lead" dZ="504.">
+  <gvxy_point X_Y="-163.1; 820.05"/>
+  <gvxy_point X_Y=" -169.25; 850.95"/>
+</gvxysx>
+
+<gvxysx name="Hub_Outer_Plate4" material="PolyBoron207HD5" dZ="545.">
+  <gvxy_point X_Y="-163.1; 820."/>
+  <gvxy_point X_Y=" -153.15; 770."/>
+</gvxysx>
+
+<gvxysx name="Hub_Outer_Plate5" material="Lead" dZ="30.">
+  <gvxy_point X_Y="-163.1; 820.05"/>
+  <gvxy_point X_Y=" -169.25; 850.95"/>
+</gvxysx>
+
+<gvxysx name="Hub_Outer_Plate6" material="PolyBoron207HD5" dZ="30.">
+  <gvxy_point X_Y="-163.1; 820."/>
+  <gvxy_point X_Y=" -153.15; 770."/>
+</gvxysx>
+
+<gvxysx name="Hub_Outer_Plate7" material="Lead" dZ="85.">
+  <gvxy_point X_Y="-163.1; 820.05"/>
+  <gvxy_point X_Y=" -169.25; 850.95"/>
+</gvxysx>
+
+<gvxysx name="Hub_Outer_Plate8" material="PolyBoron207HD5" dZ="126.">
+<gvxy_point X_Y="-163.1; 820."/>
+  <gvxy_point X_Y=" -153.15; 770."/>
+</gvxysx>
+
+<composition  name="Horizontal_Shielding_ForRot_Spec" >
+  <posXYZ  volume="Hub_Outer_Plate5"  X_Y_Z="0.; 0.; 908.2" />
+  <posXYZ  volume="Hub_Outer_Plate6"  X_Y_Z="0.; 0.; 908.2" />
+</composition>
+
+<composition  name="Horizontal_Shielding_ForRot_Spec2" >
+  <posXYZ  volume="Hub_Outer_Plate3"  X_Y_Z="0.; 0.; 248.7" rot="   0. ; 0. ; 22.5" />
+  <posXYZ  volume="Hub_Outer_Plate4"  X_Y_Z="0.; 0.; 228.2" rot="   0. ; 0. ; 22.5" />
+</composition>
+
+<composition  name="Horizontal_Shielding_ForRot" >
+  <posXYZ  volume="Hub_Outer_Plate1"  X_Y_Z="0.; 0.; 643.45" />
+  <posXYZ  volume="Hub_Outer_Plate2"  X_Y_Z="0.; 0.; 643.45" />
+  <posXYZ  volume="Horizontal_Shielding_ForRot_Spec2" />
+  <posXYZ  volume="Hub_Outer_Plate7"  X_Y_Z="0.; 0.; 39.2" />
+  <posXYZ  volume="Hub_Outer_Plate8"  X_Y_Z="0.; 0.; 18.7" />
+</composition>
+
+<composition  name="Horizontal_Shielding" >
+  <posXYZ  volume="Horizontal_Shielding_ForRot"  rot="   0. ; 0. ; 0." />
+  <posXYZ  volume="Horizontal_Shielding_ForRot"  rot="   0. ; 0. ; 45." />
+  <posXYZ  volume="Horizontal_Shielding_ForRot"  rot="   0. ; 0. ; 90." />
+  <posXYZ  volume="Horizontal_Shielding_ForRot"  rot="   0. ; 0. ; 135." />
+  <posXYZ  volume="Horizontal_Shielding_ForRot"  rot="   0. ; 0. ; 180." />
+  <posXYZ  volume="Horizontal_Shielding_ForRot"  rot="   0. ; 0. ; 225." />
+  <posXYZ  volume="Horizontal_Shielding_ForRot"  rot="   0. ; 0. ; 270." />
+  <posXYZ  volume="Horizontal_Shielding_ForRot"  rot="   0. ; 0. ; 315." />
+  <posXYZ  volume="Horizontal_Shielding_ForRot_Spec"  rot="   0. ; 0. ; 22.5" />
+  <posXYZ  volume="Horizontal_Shielding_ForRot_Spec"  rot="   0. ; 0. ; 67.5" />
+  <posXYZ  volume="Horizontal_Shielding_ForRot_Spec"  rot="   0. ; 0. ; -22.5" />
+  <posXYZ  volume="Horizontal_Shielding_ForRot_Spec"  rot="   0. ; 0. ; -67.5" />
+</composition>
+<!-- End Horizontal Shielding (New Hub) -->
+
+<!-- Other Parts of New Hub -->
+<pcon name="HUB_Extension_inner_tube" material="ShieldSteel" nbPhi="20">
+  <polyplane Rio_Z="172.; 225.; 997.75"/>
+  <polyplane Rio_Z=" 152.3; 225.; 0."/>
+</pcon>
+<tubs   name="HUB_Extension_plate_HO_side"      material="ShieldSteel"   Rio_Z="172.5; 530.; 59.2" />
+<tubs   name="Copper_disk_Extension"      material="Copper"   Rio_Z="225.5; 454.5; 998." />
+<tubs   name="HUB_Extension_outer_tube"      material="ShieldSteel"   Rio_Z="455.5; 530.; 998.7" />
+
+<pcon name="HUB_Main_part_inner_tube" material="ShieldSteel" nbPhi="20">
+  <polyplane Rio_Z="148.7; 225.; 858.5"/>
+  <polyplane Rio_Z=" 137.; 225.; 0."/>
+</pcon>
+
+<tubs   name="Copper_disk_Main_part"      material="Copper"   Rio_Z="225.5; 699.5; 760." />
+
+<gvxysxy name="Plate_IP_Main" material="ShieldSteel" dZ="91.6">
+  <gvxy_point X_Y="769.95; 153.16"/>
+  <gvxy_point X_Y="652.77; 436.16"/>
+  <gvxy_point X_Y="436.16; 652.77"/>
+  <gvxy_point X_Y="153.16; 769.95"/>
+</gvxysxy>
+
+<tubs   name="Plate_IP_Cut_Tube"      material="ShieldSteel"   Rio_Z="0.; 226.; 95." />
+
+<subtraction  name="Plate_IP" >
+  <posXYZ   volume="Plate_IP_Main"   />
+  <posXYZ   volume="Plate_IP_Cut_Tube" />
+</subtraction>
+
+<gvxysxy name="HUB_Main_part_outer_tube_Main" material="ShieldSteel" dZ="767.7">
+  <gvxy_point X_Y="769.95; 153.16"/>
+  <gvxy_point X_Y="652.77; 436.16"/>
+  <gvxy_point X_Y="436.16; 652.77"/>
+  <gvxy_point X_Y="153.16; 769.95"/>
+</gvxysxy>
+
+<tubs   name="HUB_Main_part_outer_tube_Cut_Tube"      material="ShieldSteel"   Rio_Z="0.; 700.; 770." />
+
+<subtraction  name="HUB_Main_part_outer_tube" >
+  <posXYZ   volume="HUB_Main_part_outer_tube_Main"   />
+  <posXYZ   volume="HUB_Main_part_outer_tube_Cut_Tube" />
+</subtraction>
+
+<gvxysxy name="Plate_HO_Main" material="ShieldSteel" dZ="78.">
+  <gvxy_point X_Y="769.95; 153.16"/>
+  <gvxy_point X_Y="652.77; 436.16"/>
+  <gvxy_point X_Y="436.16; 652.77"/>
+  <gvxy_point X_Y="153.16; 769.95"/>
+</gvxysxy>
+
+<tubs   name="Plate_HO_Cut_Tube"      material="ShieldSteel"   Rio_Z="0.; 150.5; 80." />
+
+<subtraction  name="Plate_HO" >
+  <posXYZ   volume="Plate_HO_Main"   />
+  <posXYZ   volume="Plate_HO_Cut_Tube" />
+</subtraction>
+
+<tubs name="Plate_HO_SupportTube" material="ShieldSteel" Rio_Z="585.; 770.; 21.4" profile="-15.; 210." nbPhi="20"/>
+
+<tubs   name="Disque_shileding_ext"      material="PolyBoron207HD5"   Rio_Z="532.5; 800.; 40." />
+<tubs   name="Plaque_polyboron_droite_v2"      material="PolyBoron207HD5"   Rio_Z="532.5; 582.5; 200." />
+
+<composition  name="Hub_Other_Parts_Assembly" >
+  <posXYZ  volume="HUB_Extension_plate_HO_side"  X_Y_Z="0.; 0.; 1920.6" />
+  <posXYZ  volume="HUB_Extension_inner_tube"  X_Y_Z="0.; 0.; 892.25" />
+  <posXYZ  volume="Copper_disk_Extension"  X_Y_Z="0.; 0.; 1391.95" />
+  <posXYZ  volume="HUB_Extension_outer_tube"  X_Y_Z="0.; 0.; 1391.6" />
+  <posXYZ  volume="HUB_Main_part_inner_tube"  X_Y_Z="0.; 0.; -45.8" />
+  <posXYZ  volume="Copper_disk_Main_part"  X_Y_Z="0.; 0.; 434.2" />
+  <posXYZ  volume="Plate_IP" />
+  <posXYZ  volume="HUB_Main_part_outer_tube"  X_Y_Z="0.; 0.; 430.3" />
+  <posXYZ  volume="Disque_shileding_ext"  X_Y_Z="0.; 0.; 944.2" />
+  <posXYZ  volume="Plaque_polyboron_droite_v2"  X_Y_Z="0.; 0.; 1064.25" />
+  <posXYZ  volume="Plate_HO"  X_Y_Z="0.; 0.; 853.2" />
+  <posXYZ  volume="Plate_HO_SupportTube"  X_Y_Z="0.; 0.; 902.95" />
+</composition>
+<!-- End Other Parts of New Hub -->
+
+<composition  name="New_Hub" >
+  <posXYZ  volume="Hub_Other_Parts_Assembly" />
+  <posXYZ  volume="Horizontal_Shielding" />
+</composition>
+<!-- ************************************************************************************** End New Hub *********************************************** -->
+
+<!-- **************************************************** Inner Spoke ******************************************************************* -->
+<gvxysx name="Base_Leg" material="Aluminium" dZ="390.">
+  <gvxy_point X_Y="40.; 531.5"/>
+  <gvxy_point X_Y=" 40.; -501.5"/>
+  <gvxy_point X_Y="150.; -501.5"/>
+  <gvxy_point X_Y=" 150.; -531.5"/>
+</gvxysx>
+
+<gvxy name="JOINING_BAR3" material="Aluminium" dZ="150.">
+  <gvxy_point X_Y="75.; 23."/>
+  <gvxy_point X_Y="75.; 7."/>
+  <gvxy_point X_Y="640.; 7."/>
+  <gvxy_point X_Y="640.; -23."/>
+  <gvxy_point X_Y="-640.; -23."/>
+  <gvxy_point X_Y="-640.; 7."/>
+  <gvxy_point X_Y="-75.; 7."/>
+  <gvxy_point X_Y="-75.; 23."/>
+</gvxy>
+
+<box  name="LATERAL_PLATE_L"      material="Aluminium"  X_Y_Z="21.; 1680.; 390. " />
+
+<gvxysx name="Front_plate2" material="Aluminium" dZ="14.">
+  <gvxy_point X_Y="98.65; 2867.18"/>
+  <gvxy_point X_Y=" 89.94; 2805.19"/>
+  <gvxy_point X_Y="89.94; 2587.18"/>
+</gvxysx>
+
+<gvxysx name="LS_OUTER3_MainBox" material="Aluminium" dZ="30.">
+  <gvxy_point X_Y="323.7; 450."/>
+  <gvxy_point X_Y=" 197.21; -450."/>
+</gvxysx>
+
+<box  name="LS_OUTER3_CutBox"      material="Aluminium"  X_Y_Z="250.; 600.; 35. " />
+
+<subtraction  name="LS_OUTER3" >
+  <posXYZ   volume="LS_OUTER3_MainBox"  />
+  <posXYZ   volume="LS_OUTER3_CutBox"  X_Y_Z=" 0.; -50.; 0. " />
+</subtraction>
+
+<gvxysx name="REAR_PLATE1" material="Aluminium" dZ="30.">
+  <gvxy_point X_Y="176.95; 309.25"/>
+  <gvxy_point X_Y=" 90.03; -309.25"/>
+</gvxysx>
+
+<gvxy name="REAR_PLATE2" material="Aluminium" dZ="30.">
+ <gvxy_point X_Y="273.95; 174.5"/>
+  <gvxy_point X_Y="224.9; -174.5"/>
+  <gvxy_point X_Y="125.; -174.5"/>
+  <gvxy_point X_Y="125.; -154.5"/>
+  <gvxy_point X_Y="-125.; -154.5"/>
+  <gvxy_point X_Y="-125.; -174.5"/>
+  <gvxy_point X_Y="-224.9; -174.5"/>
+  <gvxy_point X_Y="-273.95; 174.5"/>
+</gvxy>
+
+<box  name="SHIM1"      material="Aluminium"  X_Y_Z="700.; 150.; 21.6 " />
+<box  name="SHIM2"      material="Aluminium"  X_Y_Z="350.; 150.; 21.6 " />
+
+<gvxysx name="REAR_PLATE3" material="Aluminium" dZ="30.">
+  <gvxy_point X_Y="323.7; 80."/>
+  <gvxy_point X_Y=" 301.21; -80."/>
+</gvxysx>
+
+<box  name="KM_FRONT_PLATE1"      material="ShieldSteel"  X_Y_Z="34.; 160.; 250. " />
+<box  name="KM_LOCKING_PLATE1"      material="ShieldSteel"  X_Y_Z="20.; 120.; 200. " />
+
+<gvxy name="JOINING_BAR2" material="Aluminium" dZ="29.">
+  <gvxy_point X_Y="175.; 75."/>
+  <gvxy_point X_Y="964.81; -64.27"/>
+  <gvxy_point X_Y="938.77; -211.99"/>
+  <gvxy_point X_Y="161.88; -75."/>
+  <gvxy_point X_Y="-161.88; -75."/>
+  <gvxy_point X_Y="-938.77; -211.99"/>
+  <gvxy_point X_Y="-964.81; -64.27"/>
+  <gvxy_point X_Y="-175.; 75."/>
+</gvxy>
+
+<gvxy name="JOINING_BAR1" material="Aluminium" dZ="29.">
+  <gvxy_point X_Y="350.; 75."/>
+  <gvxy_point X_Y="1196.93; -74.34"/>
+  <gvxy_point X_Y="1170.88; -222.06"/>
+  <gvxy_point X_Y="336.88; -75."/>
+  <gvxy_point X_Y="-336.88; -75."/>
+  <gvxy_point X_Y="-1170.88; -222.06"/>
+  <gvxy_point X_Y="-1196.93; -74.34"/>
+  <gvxy_point X_Y="-350.; 75."/>
+</gvxy>
+
+<composition  name="Inner_Spoke_Assembly" >
+  <posXYZ  volume="Base_Leg"  X_Y_Z="0.; 1301.5; 0." />
+  <posXYZ  volume="JOINING_BAR1"  X_Y_Z="0.; 4385.; -231.2" />
+  <posXYZ  volume="JOINING_BAR2"  X_Y_Z="0.; 3065.; -231.2" />
+  <posXYZ  volume="JOINING_BAR3"  X_Y_Z="0.; 1715.; -218.05" rot="   90. ; 0. ; 0." />
+  <posXYZ  volume="LATERAL_PLATE_L"  X_Y_Z="-217.3; 3635.56; 0." rot="   0. ; 0. ; 8." />
+  <posXYZ  volume="LATERAL_PLATE_L"  X_Y_Z="217.3; 3635.56; 0." rot="   0. ; 0. ; -8." />
+  <posXYZ  volume="Front_plate2"  X_Y_Z="0.; 0.; 188." />
+  <posXYZ  volume="LS_OUTER3"  X_Y_Z="0.; 4018.41; 180." />
+  <posXYZ  volume="REAR_PLATE1"  X_Y_Z="0.; 3114.99; -180." />
+  <posXYZ  volume="REAR_PLATE2"  X_Y_Z="0.; 3939.93; -180." />
+  <posXYZ  volume="REAR_PLATE3"  X_Y_Z="0.; 4388.42; -180." />
+  <posXYZ  volume="SHIM1"  X_Y_Z="0.; 4385.; -205.85" />
+  <posXYZ  volume="SHIM2"  X_Y_Z="0.; 3065.; -205.85" />
+  <posXYZ  volume="KM_FRONT_PLATE1"  X_Y_Z="318.34; 4156.56; 25." rot="   0. ; 0. ; -8." />
+  <posXYZ  volume="KM_FRONT_PLATE1"  X_Y_Z="-318.34; 4156.56; 25." rot="   0. ; 0. ; 8." />
+  <posXYZ  volume="KM_LOCKING_PLATE1"  X_Y_Z="270.71; 4163.26; 0." rot="   0. ; 0. ; -8." />
+  <posXYZ  volume="KM_LOCKING_PLATE1"  X_Y_Z="-270.71; 4163.26; 0." rot="   0. ; 0. ; 8." />
+</composition>
+
+<composition  name="Inner_Spoke" >
+  <posXYZ  volume="Inner_Spoke_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 22.5" />
+  <posXYZ  volume="Inner_Spoke_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 67.5" />
+  <posXYZ  volume="Inner_Spoke_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 112.5" />
+  <posXYZ  volume="Inner_Spoke_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 157.5" />
+  <posXYZ  volume="Inner_Spoke_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 202.5" />
+  <posXYZ  volume="Inner_Spoke_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 247.5" />
+  <posXYZ  volume="Inner_Spoke_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 292.5" />
+  <posXYZ  volume="Inner_Spoke_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 337.5" />
+</composition>
+
+<!-- *********************************************************************************** End Inner Spoke **************************************************\
+************************************* -->
+
+<!-- *********************************************************************************** Outer Spoke ******************************************************\
+************************************* -->
+
+<box  name="NSW_F1_spoke_MainBox"      material="Aluminium"  X_Y_Z="135.; 1060.; 185. " />
+<box  name="NSW_F1_spoke_CutBox"      material="Aluminium"  X_Y_Z="111.; 1070.; 161. " />
+
+<subtraction  name="NSW_F1_spoke" >
+  <posXYZ  volume="NSW_F1_spoke_MainBox" />
+  <posXYZ  volume="NSW_F1_spoke_CutBox" />
+</subtraction>
+<box  name="NSW_F1_spoke_Bot_Plate"      material="Aluminium"  X_Y_Z="300.; 48.; 300. " />
+
+<gvxysx name="Plaque_interface2" material="Aluminium" dZ="37.">
+  <gvxy_point X_Y="182.5; 375."/>
+  <gvxy_point X_Y="146.5; 213.2"/>
+  <gvxy_point X_Y="90.; -375."/>
+</gvxysx>
+
+<gvxysx name="Plaque_interface2.1" material="Aluminium" dZ="45.">
+  <gvxy_point X_Y="182.5; 375."/>
+  <gvxy_point X_Y="146.5; 213.2"/>
+  <gvxy_point X_Y="90.; -375."/>
+</gvxysx>
+
+<box  name="NSW_SS_spoke_Pillar_MainBox"      material="Aluminium"  X_Y_Z="135.; 2683.25; 185. " />
+<box  name="NSW_SS_spoke_Pillar_CutBox"      material="Aluminium"  X_Y_Z="113.; 2685.; 163. " />
+
+<subtraction  name="NSW_SS_spoke_Pillar" >
+  <posXYZ  volume="NSW_SS_spoke_Pillar_MainBox" />
+  <posXYZ  volume="NSW_SS_spoke_Pillar_CutBox" />
+</subtraction>
+
+<box  name="Spoke_Joint"      material="ShieldSteel"  X_Y_Z="75.; 85.; 124.4 " />
+
+<gvxysx name="Manifolds_Support_Main" material="Aluminium" dZ="150.">
+  <gvxy_point X_Y="585.; 75."/>
+  <gvxy_point X_Y=" 551.74; -75."/>
+</gvxysx>
+
+<box  name="Manifolds_Support_CutBox1"      material="Aluminium"  X_Y_Z="1180.; 140.; 140. " />
+<box  name="Manifolds_Support_CutBox2"      material="Aluminium"  X_Y_Z="160.; 90.; 160. " />
+
+<subtraction  name="Manifolds_Support" >
+  <posXYZ  volume="Manifolds_Support_Main" />
+  <posXYZ  volume="Manifolds_Support_CutBox1" />
+  <posXYZ  volume="Manifolds_Support_CutBox2"  X_Y_Z="135.; -45.; 0." />
+</subtraction>
+
+<box  name="Cale"      material="Aluminium"  X_Y_Z="135.; 280.; 52. " />
+<box  name="JD_JOINT2.1_Plate1"      material="Aluminium"  X_Y_Z="250.; 270.; 20. " />
+<box  name="Shim_JD"      material="Aluminium"  X_Y_Z="250.; 270.; 29. " />
+<box  name="JD_JOINT1_Pipe_MainBox" material="Aluminium"  X_Y_Z="1300.; 120.; 80." />
+<box  name="JD_JOINT1_Pipe_CutBox"      material="Aluminium"  X_Y_Z="1305.; 100.; 60. " />
+
+<subtraction  name="JD_JOINT1_Pipe" >
+  <posXYZ  volume="JD_JOINT1_Pipe_MainBox"  />
+  <posXYZ  volume="JD_JOINT1_Pipe_CutBox"  />
+</subtraction>
+
+<box  name="JD_JOINT2_Pipe_MainBox" material="Aluminium"  X_Y_Z="900.; 120.; 80." />
+
+<subtraction  name="JD_JOINT2_Pipe" >
+  <posXYZ  volume="JD_JOINT2_Pipe_MainBox" />
+  <posXYZ  volume="JD_JOINT1_Pipe_CutBox"  />
+</subtraction>
+
+<box  name="KM_FRONT_PLATE.1.1"      material="ShieldSteel"  X_Y_Z="27.; 272.; 120. " />
+<box  name="Manifolds_Support_Plate"      material="Aluminium"  X_Y_Z="9.8; 275.; 175. " />
+<box  name="AL_BAR_KM_INCLINED_PLATE"      material="Aluminium"  X_Y_Z="290.; 38.; 67. " />
+
+<composition  name="Outer_Spoke_Assembly" >
+  <posXYZ  volume="NSW_F1_spoke"  X_Y_Z="0.; 1350.; 0." />
+  <posXYZ  volume="NSW_F1_spoke_Bot_Plate"  X_Y_Z="0.; 795.95; 0." />
+  <posXYZ  volume="Manifolds_Support"  X_Y_Z="0.; 4515.33; 0." />
+  <posXYZ  volume="Plaque_interface2"  X_Y_Z="0.; 1745.; 111.05" />
+  <posXYZ  volume="Plaque_interface2.1"  X_Y_Z="0.; 1745.; -115.05" />
+  <posXYZ  volume="NSW_SS_spoke_Pillar"  X_Y_Z="371.; 3267.85; 0." rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="NSW_SS_spoke_Pillar"  X_Y_Z="-371.; 3267.85; 0." rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="Spoke_Joint"  X_Y_Z="610.52; 4348.24; 154.75" rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="Spoke_Joint"  X_Y_Z="322.65; 3049.77; 154.75" rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="Spoke_Joint"  X_Y_Z="-610.52; 4348.24; 154.75" rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="Spoke_Joint"  X_Y_Z="-322.65; 3049.77; 154.75" rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="Cale"  X_Y_Z="537.79; 4020.21; -118.55" rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="Cale"  X_Y_Z="338.24; 3120.06; -118.55" rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="Cale"  X_Y_Z="-537.79; 4020.21; -118.55" rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="Cale"  X_Y_Z="-338.24; 3120.06; -118.55" rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="JD_JOINT2.1_Plate1"  X_Y_Z="515.; 4020.2; -154.6" />
+  <posXYZ  volume="JD_JOINT2.1_Plate1"  X_Y_Z="315.; 3120.6; -154.6" />
+  <posXYZ  volume="JD_JOINT2.1_Plate1"  X_Y_Z="-515.; 4020.2; -154.6" />
+  <posXYZ  volume="JD_JOINT2.1_Plate1"  X_Y_Z="-315.; 3120.6; -154.6" />
+  <posXYZ  volume="Shim_JD"  X_Y_Z="515.; 4020.2; -261.55" />
+  <posXYZ  volume="Shim_JD"  X_Y_Z="315.; 3120.6; -261.55" />
+  <posXYZ  volume="Shim_JD"  X_Y_Z="-515.; 4020.2; -261.55" />
+  <posXYZ  volume="Shim_JD"  X_Y_Z="-315.; 3120.6; -261.55" />
+  <posXYZ  volume="JD_JOINT1_Pipe"  X_Y_Z="0.; 4020.2; -207." />
+  <posXYZ  volume="JD_JOINT2_Pipe"  X_Y_Z="0.; 3120.6; -207." />
+  <posXYZ  volume="KM_FRONT_PLATE.1.1"  X_Y_Z="641.41; 4289.16; 0." rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="KM_FRONT_PLATE.1.1"  X_Y_Z="-641.41; 4289.16; 0." rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="Manifolds_Support_Plate"  X_Y_Z="560.93; 4459.11; 0." rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="Manifolds_Support_Plate"  X_Y_Z="-560.93; 4459.11; 0." rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="AL_BAR_KM_INCLINED_PLATE"  X_Y_Z="-243.; 4099.25; -228.5" />
+</composition>
+
+<!-- Outer Spoke Foot -->
+<gvxysx name="Plaque_interface2_SpecMain" material="Aluminium" dZ="37.">
+  <gvxy_point X_Y="182.5; 375."/>
+  <gvxy_point X_Y="146.5; 213.2"/>
+  <gvxy_point X_Y="90.; -375."/>
+</gvxysx>
+
+<box  name="Plaque_interface2_Spec_CutBox"      material="Aluminium"  X_Y_Z="160.; 260.; 13. " />
+
+<subtraction  name="Plaque_interface2_Spec" >
+  <posXYZ  volume="Plaque_interface2_SpecMain" />
+  <posXYZ  volume="Plaque_interface2_Spec_CutBox"  X_Y_Z="-120.94; 337.19; -12.5" rot="   0. ; 0. ; 12.5" />
+</subtraction>
+
+<gvxysx name="Plaque_interface2.1_SpecMain" material="Aluminium" dZ="45.">
+  <gvxy_point X_Y="182.5; 375."/>
+  <gvxy_point X_Y="146.5; 213.2"/>
+  <gvxy_point X_Y="90.; -375."/>
+</gvxysx>
+
+<subtraction  name="Plaque_interface2.1_Spec" >
+  <posXYZ  volume="Plaque_interface2.1_SpecMain" />
+  <posXYZ  volume="Plaque_interface2_Spec_CutBox"  X_Y_Z="-120.94; 337.19; 16.5" rot="   0. ; 0. ; 12.5" />
+</subtraction>
+
+<box  name="NSW_SS_spoke_PillarSpec_MainBox"      material="ShieldSteel"  X_Y_Z="135.; 2818.1; 210. " />
+<box  name="NSW_SS_spoke_PillarSpec_CutBox"      material="Aluminium"  X_Y_Z="91.; 2820.; 166. " />
+
+<subtraction  name="NSW_SS_spokeSpec_Pillar" >
+  <posXYZ  volume="NSW_SS_spoke_PillarSpec_MainBox" />
+  <posXYZ  volume="NSW_SS_spoke_PillarSpec_CutBox" />
+</subtraction>
+
+<box  name="Cale_Spec"      material="Aluminium"  X_Y_Z="135.; 280.; 38.6 " />
+<box  name="Spoke_Joint1.2"      material="Aluminium"  X_Y_Z="66.; 100.; 111.9 " />
+
+<box  name="BOTTOM_PLATE.1_Horisontal_Plate"      material="ShieldSteel"  X_Y_Z="29.8; 775.; 495. " />
+<box  name="BOTTOM_PLATE.1_Vertical_Main_Plate"      material="ShieldSteel"  X_Y_Z="460.; 640.; 35. " />
+
+<gvxy name="Connecting_Plates2.1" material="Aluminium" dZ="22.">
+  <gvxy_point X_Y="-252.; 130.65"/>
+  <gvxy_point X_Y="70.; 130.65"/>
+  <gvxy_point X_Y="252.; 25.65"/>
+  <gvxy_point X_Y="258.6; -124.1"/>
+  <gvxy_point X_Y="108.7; -130.65"/>
+  <gvxy_point X_Y="-252.; 19.35"/>
+</gvxy>
+
+<box  name="Tube_alu_feet_MainBox"      material="Aluminium"  X_Y_Z="1050.; 135.; 185. " />
+<box  name="Tube_alu_feet_CutBox"      material="Aluminium"  X_Y_Z="1055.; 111.4; 161.4 " />
+
+<subtraction  name="Tube_alu_feet" >
+  <posXYZ  volume="Tube_alu_feet_MainBox" />
+  <posXYZ  volume="Tube_alu_feet_CutBox" />
+</subtraction>
+
+<box  name="Fix_nut"      material="ShieldSteel"  X_Y_Z="50.; 52.; 290. " />
+
+<gvxy name="Beam_Interface" material="Aluminium" dZ="300.">
+  <gvxy_point X_Y="-80.; 73.4"/>
+  <gvxy_point X_Y="80.; 73.4"/>
+  <gvxy_point X_Y="80.; -73.4"/>
+  <gvxy_point X_Y="-80.; 28.5"/>
+</gvxy>
+
+<gvxy name="Beam_Interface2" material="Aluminium" dZ="300.">
+  <gvxy_point X_Y="-80.; 79.8"/>
+  <gvxy_point X_Y="80.; 79.8"/>
+  <gvxy_point X_Y="80.; 12.6"/>
+  <gvxy_point X_Y="-80.; -79.8"/>
+</gvxy>
+
+<box  name="LS_T_Joint"      material="ShieldSteel"  X_Y_Z="80.; 70.; 134.9 " />
+<box  name="LS_T_Joint2"      material="ShieldSteel"  X_Y_Z="77.; 67.; 147.4 " />
+
+<gvxy name="Renfort_Bas1_MainBox" material="Aluminium" dZ="135.">
+  <gvxy_point X_Y="-337.73; -67.5"/>
+  <gvxy_point X_Y="-251.72; 67.5"/>
+  <gvxy_point X_Y="251.72; 67.5"/>
+  <gvxy_point X_Y="337.27; -67.5"/>
+</gvxy>
+
+<box  name="Renfort_Bas1_CutBox"      material="Aluminium"  X_Y_Z="680.; 115.; 115. " />
+
+
+<subtraction  name="Renfort_Bas1" >
+  <posXYZ  volume="Renfort_Bas1_MainBox" />
+  <posXYZ  volume="Renfort_Bas1_CutBox" />
+</subtraction>
+
+<composition  name="Outer_Spoke_Assembly_FOOT1" >
+  <posXYZ  volume="NSW_F1_spoke"  X_Y_Z="0.; 1350.; 0." />
+  <posXYZ  volume="NSW_F1_spoke_Bot_Plate"  X_Y_Z="0.; 795.95; 0." />
+  <posXYZ  volume="Plaque_interface2_Spec"  X_Y_Z="0.; 1745.; 111.05" />
+  <posXYZ  volume="Plaque_interface2.1_Spec"  X_Y_Z="0.; 1745.; -115.05" />
+  <posXYZ  volume="NSW_SS_spoke_Pillar"  X_Y_Z="371.; 3267.85; 0." rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="NSW_SS_spokeSpec_Pillar"  X_Y_Z="-385.59; 3333.67; 0." rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="Shim_JD"  X_Y_Z="515.; 4020.2; -261.55" />
+  <posXYZ  volume="Shim_JD"  X_Y_Z="315.; 3120.6; -261.55" />
+  <posXYZ  volume="Shim_JD"  X_Y_Z="-515.; 4020.2; -261.55" />
+  <posXYZ  volume="Shim_JD"  X_Y_Z="-315.; 3120.6; -261.55" />
+  <posXYZ  volume="JD_JOINT2.1_Plate1"  X_Y_Z="515.; 4020.2; -154.6" />
+  <posXYZ  volume="JD_JOINT2.1_Plate1"  X_Y_Z="315.; 3120.6; -154.6" />
+  <posXYZ  volume="JD_JOINT2.1_Plate1"  X_Y_Z="-515.; 4020.2; -154.6" />
+  <posXYZ  volume="JD_JOINT2.1_Plate1"  X_Y_Z="-315.; 3120.6; -154.6" />
+  <posXYZ  volume="Cale"  X_Y_Z="537.79; 4020.21; -118.55" rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="Cale"  X_Y_Z="338.24; 3120.06; -118.55" rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="Cale_Spec"  X_Y_Z="-537.79; 4020.21; -124.35" rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="Cale_Spec"  X_Y_Z="-338.24; 3120.06; -124.35" rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="JD_JOINT1_Pipe"  X_Y_Z="0.; 4020.2; -207." />
+  <posXYZ  volume="JD_JOINT2_Pipe"  X_Y_Z="0.; 3120.6; -207." />
+  <posXYZ  volume="AL_BAR_KM_INCLINED_PLATE"  X_Y_Z="-243.; 4099.25; -228.5" />
+  <posXYZ  volume="Spoke_Joint"  X_Y_Z="322.65; 3049.77; 154.75" rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="Spoke_Joint"  X_Y_Z="610.52; 4348.24; 154.75" rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="Spoke_Joint1.2"  X_Y_Z="-322.65; 3049.28; 161." rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="Spoke_Joint1.2"  X_Y_Z="-610.4; 4347.75; 161." rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="KM_FRONT_PLATE.1.1"  X_Y_Z="641.41; 4289.16; 0." rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="BOTTOM_PLATE.1_Horisontal_Plate"  X_Y_Z="-675.29; 4889.64; -29." rot="   0. ; 0. ; -45." />
+  <posXYZ  volume="BOTTOM_PLATE.1_Vertical_Main_Plate"  X_Y_Z="-491.47; 4727.04; -257.5" rot="   0. ; 0. ; -45." />
+  <posXYZ  volume="Connecting_Plates2.1"  X_Y_Z="475.73; 4596.28; 103.55" rot="   0. ; 0. ; -15." />
+  <posXYZ  volume="Connecting_Plates2.1"  X_Y_Z="475.73; 4596.28; -103.55" rot="   0. ; 0. ; -15." />
+  <posXYZ  volume="Tube_alu_feet"  X_Y_Z="35.49; 4779.63; 0." rot="   0. ; 0. ; -15." />
+  <posXYZ  volume="Fix_nut"  X_Y_Z="-840.79; 4666.23; -5." rot="   0. ; 0. ; -45." />
+  <posXYZ  volume="Fix_nut"  X_Y_Z="-443.82; 5063.2; -5." rot="   0. ; 0. ; -45." />
+  <posXYZ  volume="Beam_Interface"  X_Y_Z="-716.12; 4723.86; 0." rot="   0. ; 0. ; 45." />
+  <posXYZ  volume="Beam_Interface2"  X_Y_Z="-496.92; 4934.01; 0." rot="   0. ; 0. ; 45." />
+  <posXYZ  volume="LS_T_Joint"  X_Y_Z="-649.; 4560.58; -172.5" rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="LS_T_Joint2"  X_Y_Z="-356.49; 4881.55; -166.25" rot="   0. ; 0. ; 75." />
+  <posXYZ  volume="Renfort_Bas1"  X_Y_Z="-329.24; 4539.98; 0." rot="   0. ; 0. ; 45." />
+</composition>
+
+<composition  name="Outer_Spoke_Assembly_FOOT2" >
+  <posXYZ  volume="NSW_F1_spoke"  X_Y_Z="0.; 1350.; 0." />
+  <posXYZ  volume="NSW_F1_spoke_Bot_Plate"  X_Y_Z="0.; 795.95; 0." />
+  <posXYZ  volume="Plaque_interface2_Spec"  X_Y_Z="0.; 1745.; 111.05" />
+  <posXYZ  volume="Plaque_interface2.1_Spec"  X_Y_Z="0.; 1745.; -115.05" />
+  <posXYZ  volume="NSW_SS_spoke_Pillar"  X_Y_Z="371.; 3267.85; 0." rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="NSW_SS_spokeSpec_Pillar"  X_Y_Z="-385.59; 3333.67; 0." rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="Shim_JD"  X_Y_Z="515.; 4020.2; 261.55" />
+  <posXYZ  volume="Shim_JD"  X_Y_Z="315.; 3120.6; 261.55" />
+  <posXYZ  volume="Shim_JD"  X_Y_Z="-515.; 4020.2; 261.55" />
+  <posXYZ  volume="Shim_JD"  X_Y_Z="-315.; 3120.6; 261.55" />
+  <posXYZ  volume="JD_JOINT2.1_Plate1"  X_Y_Z="515.; 4020.2; 154.6" />
+  <posXYZ  volume="JD_JOINT2.1_Plate1"  X_Y_Z="315.; 3120.6; 154.6" />
+  <posXYZ  volume="JD_JOINT2.1_Plate1"  X_Y_Z="-515.; 4020.2; 154.6" />
+  <posXYZ  volume="JD_JOINT2.1_Plate1"  X_Y_Z="-315.; 3120.6; 154.6" />
+  <posXYZ  volume="Cale"  X_Y_Z="537.79; 4020.21; 118.55" rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="Cale"  X_Y_Z="338.24; 3120.06; 118.55" rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="Cale_Spec"  X_Y_Z="-537.79; 4020.21; 124.35" rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="Cale_Spec"  X_Y_Z="-338.24; 3120.06; 124.35" rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="JD_JOINT1_Pipe"  X_Y_Z="0.; 4020.2; 207." />
+  <posXYZ  volume="JD_JOINT2_Pipe"  X_Y_Z="0.; 3120.6; 207." />
+  <posXYZ  volume="AL_BAR_KM_INCLINED_PLATE"  X_Y_Z="-243.; 4099.25; 228.5" />
+  <posXYZ  volume="Spoke_Joint"  X_Y_Z="322.65; 3049.77; -154.75" rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="Spoke_Joint"  X_Y_Z="610.52; 4348.24; -154.75" rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="Spoke_Joint1.2"  X_Y_Z="-322.65; 3049.28; -161." rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="Spoke_Joint1.2"  X_Y_Z="-610.4; 4347.75; -161." rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="KM_FRONT_PLATE.1.1"  X_Y_Z="641.41; 4289.16; 0." rot="   0. ; 0. ; -12.5" />
+  <posXYZ  volume="BOTTOM_PLATE.1_Horisontal_Plate"  X_Y_Z="-675.29; 4889.64; 29." rot="   0. ; 0. ; -45." />
+  <posXYZ  volume="BOTTOM_PLATE.1_Vertical_Main_Plate"  X_Y_Z="-491.47; 4727.04; 257.5" rot="   0. ; 0. ; -45." />
+  <posXYZ  volume="Connecting_Plates2.1"  X_Y_Z="475.73; 4596.28; -103.55" rot="   0. ; 0. ; -15." />
+  <posXYZ  volume="Connecting_Plates2.1"  X_Y_Z="475.73; 4596.28; 103.55" rot="   0. ; 0. ; -15." />
+  <posXYZ  volume="Tube_alu_feet"  X_Y_Z="35.49; 4779.63; 0." rot="   0. ; 0. ; -15." />
+  <posXYZ  volume="Fix_nut"  X_Y_Z="-840.79; 4666.23; -5." rot="   0. ; 0. ; -45." />
+  <posXYZ  volume="Fix_nut"  X_Y_Z="-443.82; 5063.2; -5." rot="   0. ; 0. ; -45." />
+  <posXYZ  volume="Beam_Interface"  X_Y_Z="-716.12; 4723.86; 0." rot="   0. ; 0. ; 45." />
+  <posXYZ  volume="Beam_Interface2"  X_Y_Z="-496.92; 4934.01; 0." rot="   0. ; 0. ; 45." />
+  <posXYZ  volume="LS_T_Joint"  X_Y_Z="-649.; 4560.58; 172.5" rot="   0. ; 0. ; 12.5" />
+  <posXYZ  volume="LS_T_Joint2"  X_Y_Z="-356.49; 4881.55; 166.25" rot="   0. ; 0. ; 75." />
+  <posXYZ  volume="Renfort_Bas1"  X_Y_Z="-329.24; 4539.98; 0." rot="   0. ; 0. ; 45." />
+</composition>
+<!-- End Outer Spoke Foot -->
+
+
+<composition  name="Outer_Spoke" >
+  <posXYZ  volume="Outer_Spoke_Assembly"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 0." />
+  <posXYZ  volume="Outer_Spoke_Assembly"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 45." />
+  <posXYZ  volume="Outer_Spoke_Assembly"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 90." />
+  <posXYZ  volume="Outer_Spoke_Assembly_FOOT1"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 135." />
+  <posXYZ  volume="Outer_Spoke_Assembly"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 180." />
+  <posXYZ  volume="Outer_Spoke_Assembly_FOOT2"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 180. ; 225." />
+  <posXYZ  volume="Outer_Spoke_Assembly"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 270." />
+  <posXYZ  volume="Outer_Spoke_Assembly"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 315." />
+</composition>
+<!-- ********************************************************************************* End Outer Spoke ****************************************************\
+************************************** -->
+
+<!-- *********************************************************************************** LSO LSI Connection ***********************************************\
+************************************* -->
+
+<box  name="LSO_LSI_connection_Rot"      material="ShieldSteel"  X_Y_Z="63.; 754.1; 46. " />
+
+<composition  name="LSO_LSI_connection_Pos" >
+  <posXYZ  volume="LSO_LSI_connection_Rot"  X_Y_Z="0.; 2210.09; 0." />
+</composition>
+
+<composition  name="LSO_LSI_Connection" >
+  <posXYZ  volume="LSO_LSI_connection_Pos"  X_Y_Z="0.; 0.; 870.2" rot="   0. ; 0. ; 22.5" />
+  <posXYZ  volume="LSO_LSI_connection_Pos"  X_Y_Z="0.; 0.; 870.2" rot="   0. ; 0. ; 67.5" />
+  <posXYZ  volume="LSO_LSI_connection_Pos"  X_Y_Z="0.; 0.; 870.2" rot="   0. ; 0. ; -22.5" />
+  <posXYZ  volume="LSO_LSI_connection_Pos"  X_Y_Z="0.; 0.; 870.2" rot="   0. ; 0. ; -67.5" />
+</composition>
+
+<!-- *********************************************************************************** End LSO LSI Connection *******************************************\
+************************************* -->
+
+<!-- *********************************************************************************** Alignment Bars ***************************************************\
+**************************************** -->
+
+<!-- SS Bar -->
+<tubs   name="SS_Bar_Tube"      material="Aluminium"   Rio_Z="0.; 49.1; 2382." />
+
+<composition  name="SS_Bar_Assembly" >
+  <posXYZ  volume="SS_Bar_Tube"  X_Y_Z="69.2; 3364.6; 0" rot="   90. ; 0. ; -3.35" />
+</composition>
+
+<composition  name="SS_Bar" >
+  <posXYZ  volume="SS_Bar_Assembly"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 0." />
+  <posXYZ  volume="SS_Bar_Assembly"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 45." />
+  <posXYZ  volume="SS_Bar_Assembly"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 90." />
+  <posXYZ  volume="SS_Bar_Assembly"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 135." />
+  <posXYZ  volume="SS_Bar_Assembly"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 180." />
+  <posXYZ  volume="SS_Bar_Assembly"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 225." />
+  <posXYZ  volume="SS_Bar_Assembly"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 270." />
+  <posXYZ  volume="SS_Bar_Assembly"  X_Y_Z="0.; 0.; 233.2" rot="   0. ; 0. ; 315." />
+</composition>
+<!-- End SS Bar -->
+
+<!-- LS Bar -->
+<tubs   name="LS_Bar_Tube"      material="Aluminium"   Rio_Z="0.; 48.; 2340." />
+<box  name="LS_Arm"      material="Aluminium"  X_Y_Z="1010.; 40.; 50. " />
+
+<composition  name="LS_Bar_Assembly" >
+  <posXYZ  volume="LS_Bar_Tube"  X_Y_Z="1286.4; 3086.18; 0." rot="   90. ; 0. ; -25." />
+  <posXYZ  volume="LS_Arm"  X_Y_Z="1789.34; 4164.73; 0." rot="   0. ; 0. ; -25." />
+</composition>
+
+<composition  name="LS_Bar" >
+  <posXYZ  volume="LS_Bar_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 0." />
+  <posXYZ  volume="LS_Bar_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 45." />
+  <posXYZ  volume="LS_Bar_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 90." />
+  <posXYZ  volume="LS_Bar_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 135." />
+  <posXYZ  volume="LS_Bar_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 180." />
+  <posXYZ  volume="LS_Bar_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 225." />
+  <posXYZ  volume="LS_Bar_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 270." />
+  <posXYZ  volume="LS_Bar_Assembly"  X_Y_Z="0.; 0.; 697.2" rot="   0. ; 0. ; 315." />
+</composition>
+<!-- End LS Bar -->
+
+<!-- *********************************************************************************** End Alignment Bars ***********************************************\
+******************************************** -->
+
+
+<composition  name="NSW_Aluminum_Structure_and_HUB_Assembly" >
+  <posXYZ  volume="New_Hub" />
+  <posXYZ  volume="Inner_Spoke" />
+  <posXYZ  volume="LSO_LSI_Connection" />
+  <posXYZ  volume="Outer_Spoke" />
+  <posXYZ  volume="SS_Bar" />
+  <posXYZ  volume="LS_Bar" />
+</composition>
+
+<composition  name="NSW_Aluminum_Structure_and_HUB_SideA" >
+  <posXYZ  volume="NSW_Aluminum_Structure_and_HUB_Assembly"  X_Y_Z="0.; 0.; 6943.8" rot="   0. ; 0. ; 0." />
+</composition>
+
+<composition  name="NSW_Aluminum_Structure_and_HUB_SideC" >
+  <posXYZ  volume="NSW_Aluminum_Structure_and_HUB_Assembly"  X_Y_Z="0.; 0.; -6943.8" rot="   0. ; 180. ; 0." />
+</composition>
+
+<composition  name="NSW_Aluminum_Structure_and_HUB" >
+  <posXYZ  volume="NSW_Aluminum_Structure_and_HUB_SideA" />
+</composition>
+
+</section>
+
+<!-- ==================================================Feet========================================= -->
+
+<section name       = "A Plate"
+         version    = "0.0"
+         date       = "29-05-2017"
+         author     = "Georgian Engineering Team - Niko Tsutskiridze"
+         top_volume = "A_Plate">
+
+<gvxy name="Lateral_Plate_Main" material="ShieldSteel" dZ="21.">
+  <gvxy_point X_Y="-3300.; -4000."/>
+  <gvxy_point X_Y="-3548.3; -3235.72"/>
+  <gvxy_point X_Y="-1458.4; -560.8"/>
+  <gvxy_point X_Y="73.9; 73.9"/>
+  <gvxy_point X_Y="-628.9; -1622.8"/>
+  <gvxy_point X_Y="-818.3; -1544.4"/>
+  <gvxy_point X_Y="-1558.6; -2491.9"/>
+  <gvxy_point X_Y="-1427.8; -2980."/>
+  <gvxy_point X_Y="-0.01; -2980."/>
+  <gvxy_point X_Y="-0.01; -3280."/>
+  <gvxy_point X_Y="-1701.9; -3280."/>
+  <gvxy_point X_Y="-1995.3; -3050.8"/>
+  <gvxy_point X_Y="-2650.; -3889."/>
+  <gvxy_point X_Y="-2650.; -4000."/>
+</gvxy>
+
+<tubs name="Lateral_plate_TubeCut" material="ShieldSteel"  Rio_Z=" 0. ; 600. ; 25."  nbPhi="36." />
+
+<subtraction  name="Lateral_Plate" >
+  <posXYZ   volume="Lateral_Plate_Main"  />
+  <posXYZ   volume="Lateral_plate_TubeCut" X_Y_Z="-0.01; -0.01; 0." rot="   0. ; 0. ; 0." />
+</subtraction>
+
+<tubs     name="Anchorage"  material="ShieldSteel"  Rio_Z=" 0. ; 22.6 ; 577."  nbPhi="36." />
+
+<gvxy name="Vertical_Top_Plate" material="ShieldSteel" dZ="33.">
+  <gvxy_point X_Y="-3300.; -3998."/>
+  <gvxy_point X_Y="-3300.; -3730."/>
+  <gvxy_point X_Y="-2865.; -3730."/>
+  <gvxy_point X_Y="-2675.; -3920."/>
+  <gvxy_point X_Y="-2675.; -3998."/>
+</gvxy>
+
+<box  name="Horizontal_Plate" material="ShieldSteel"  X_Y_Z="625.; 40.6; 287. " />
+
+<composition  name="A_Plate_Assembly" >
+  <posXYZ   volume="Lateral_Plate"  />
+  <posXYZ   volume="Lateral_Plate" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." />
+  <posXYZ   volume="Anchorage" X_Y_Z="-3447.; -3283.25; -299.01" rot="0. ; 0. ; 0." />
+  <posXYZ   volume="Anchorage" X_Y_Z="3447.; -3283.25; -299.01" rot="0. ; 0. ; 0." />
+  <posXYZ   volume="Vertical_Top_Plate" X_Y_Z="0.; 0.; -27.01" rot="0. ; 0. ; 0." />
+  <posXYZ   volume="Vertical_Top_Plate" X_Y_Z="0.; 0.; -27.01" rot="0. ; 180. ; 0." />
+  <posXYZ   volume="Horizontal_Plate" X_Y_Z="-2987.5; -3929.7; -187.02" rot="0. ; 0. ; 0." />
+  <posXYZ   volume="Horizontal_Plate" X_Y_Z="2987.5; -3929.7; -187.02" rot="0. ; 0. ; 0." />
+</composition>
+
+<composition  name="A_Plate_SideA" >
+   <posXYZ volume="A_Plate_Assembly" X_Y_Z=" 0. ; 0.; 7857.5"  />
+</composition>
+
+<composition  name="A_Plate_SideC" >
+   <posXYZ volume="A_Plate_Assembly" X_Y_Z=" 0. ; 0.; -7857.5" rot="0. ; 180. ; 0."  />
+</composition>
+
+<composition  name="A_Plate" >
+   <posXYZ volume="A_Plate_SideA" />
+</composition>
+
+</section>
+
+<!-- ========== Poisitionning all Volumes in NSW================ -->
+
+<section name="NewSmallWheels" version="4.3" top_volume="NewSmallWheel" date=" April 20, 2015 " author="Daniel Lellouch">
+
+<composition name="NewSmallWheel">
+ <posXYZ volume="NSW_sTGC" X_Y_Z="0.;0.;0." zLayout="Z_POSITIVE"/>
+ <posXYZ volume="NSW_MM" X_Y_Z="0.;0.;0." zLayout="Z_POSITIVE"/>
+ <posXYZ volume="NSW_Spacer" />
+ <posXYZ volume="NSW_Aluminum_Structure_and_HUB" />
+ <posXYZ volume="A_Plate" />
+</composition>
+
+</section>
+
+</AGDD>
-- 
GitLab


From cd8661d399312c1da524d96fba59b786d6074eb5 Mon Sep 17 00:00:00 2001
From: sutt <sutt@cern.ch>
Date: Tue, 6 Oct 2020 20:25:10 +0200
Subject: [PATCH 265/403] Fix configureation for new jo job

---
 .../RegionSelector/python/RegSelToolConfig.py |  8 +++--
 .../TrigInDetConfig/python/TrigInDetConfig.py | 31 +++++++++++++++----
 2 files changed, 31 insertions(+), 8 deletions(-)

diff --git a/DetectorDescription/RegionSelector/python/RegSelToolConfig.py b/DetectorDescription/RegionSelector/python/RegSelToolConfig.py
index aee84b9695e5..8ed2f0a3b34d 100644
--- a/DetectorDescription/RegionSelector/python/RegSelToolConfig.py
+++ b/DetectorDescription/RegionSelector/python/RegSelToolConfig.py
@@ -187,11 +187,15 @@ def regSelToolCfg(flags, detector, CondAlg, CablingConfigCfg=0):
 
 # inner detector
 
+def regSelTool_Pixel_Cfg(flags):
+    return regSelToolCfg(flags, "Pixel", CompFactory.SiRegSelCondAlg)
+
 def regSelTool_SCT_Cfg(flags):
     return regSelToolCfg(flags, "SCT", CompFactory.SiRegSelCondAlg)
 
-def regSelTool_Pixel_Cfg(flags):
-    return regSelToolCfg(flags, "Pixel", CompFactory.SiRegSelCondAlg)
+def regSelTool_TRT_Cfg(flags):
+    return regSelToolCfg(flags, "TRT", CompFactory.TRT_RegSelCondAlg)
+
 
 # muon spectrometer
 
diff --git a/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetConfig.py b/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetConfig.py
index af506b4c5f2f..fc93a77b7436 100644
--- a/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetConfig.py
+++ b/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetConfig.py
@@ -441,9 +441,17 @@ def TrigInDetConfig( flags, roisKey="EMRoIs", signatureName='' ):
 
   from InDetRecExample.InDetKeys import InDetKeys
 
-  # Region selector tool for SCT
+  # Region selector tools for Pixel, SCT and TRT
+
+  from RegionSelector.RegSelToolConfig import regSelTool_Pixel_Cfg
+  RegSelTool_Pixel = acc.popToolsAndMerge(regSelTool_Pixel_Cfg(flags))
+
   from RegionSelector.RegSelToolConfig import regSelTool_SCT_Cfg
-  RegSelTool_SCT = acc.popToolsAndMerge(regSelTool_SCT_Cfg(flags))
+  RegSelTool_SCT   = acc.popToolsAndMerge(regSelTool_SCT_Cfg(flags))
+
+  from RegionSelector.RegSelToolConfig import regSelTool_TRT_Cfg
+  RegSelTool_TRT = acc.popToolsAndMerge(regSelTool_TRT_Cfg(flags))
+
 
   verifier = CompFactory.AthViews.ViewDataVerifier( name = 'VDVInDet'+signature,
                                                     DataObjects= [('xAOD::EventInfo', 'StoreGateSvc+EventInfo'),
@@ -490,8 +498,10 @@ def TrigInDetConfig( flags, roisKey="EMRoIs", signatureName='' ):
     InDetPixelRawDataProvider.RoIs = roisKey
     InDetPixelRawDataProvider.RDOCacheKey = InDetCacheNames.PixRDOCacheKey
 
-    from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
-    InDetPixelRawDataProvider.RegSelTool = makeRegSelTool_Pixel()
+#   from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
+#   InDetPixelRawDataProvider.RegSelTool = makeRegSelTool_Pixel()
+
+    InDetPixelRawDataProvider.RegSelTool = RegSelTool_Pixel
 
     acc.addEventAlgo(InDetPixelRawDataProvider)
 
@@ -517,7 +527,9 @@ def TrigInDetConfig( flags, roisKey="EMRoIs", signatureName='' ):
     InDetSCTRawDataProvider.isRoI_Seeded = True
     InDetSCTRawDataProvider.RoIs = roisKey
     InDetSCTRawDataProvider.RDOCacheKey = InDetCacheNames.SCTRDOCacheKey
+
     InDetSCTRawDataProvider.RegSelTool = RegSelTool_SCT
+
     acc.addEventAlgo(InDetSCTRawDataProvider)
 
     # load the SCTEventFlagWriter
@@ -549,6 +561,11 @@ def TrigInDetConfig( flags, roisKey="EMRoIs", signatureName='' ):
     InDetTRTRawDataProvider.isRoI_Seeded = True
     InDetTRTRawDataProvider.RoIs = roisKey
 
+#   from RegionSelector.RegSelToolConfig import makeRegSelTool_TRT
+#   InDetTRTRawDataProvider.RegSelTool_TRT = makeRegSelTool_TRT()
+
+    InDetTRTRawDataProvider.RegSelTool = RegSelTool_TRT
+
     acc.addEventAlgo(InDetTRTRawDataProvider)
 
 
@@ -583,8 +600,10 @@ def TrigInDetConfig( flags, roisKey="EMRoIs", signatureName='' ):
   InDetPixelClusterization.isRoI_Seeded = True
   InDetPixelClusterization.RoIs = roisKey
   InDetPixelClusterization.ClusterContainerCacheKey = InDetCacheNames.Pixel_ClusterKey
-  from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
-  InDetPixelClusterization.RegSelTool = makeRegSelTool_Pixel()
+
+  #  from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel
+  InDetPixelClusterization.RegSelTool = RegSelTool_Pixel
+
   acc.addEventAlgo(InDetPixelClusterization)
 
   from InDetConfig.InDetRecToolConfig import InDetSCT_ConditionsSummaryToolCfg
-- 
GitLab


From 0ee3e11168c3e90a8152d71da7291949ffa18dfc Mon Sep 17 00:00:00 2001
From: Vakho Tsulaia <vakhtang.tsulaia@cern.ch>
Date: Tue, 6 Oct 2020 20:29:45 +0200
Subject: [PATCH 266/403] Fixed refs

---
 .../share/ToolConstantsCondAlg_test.ref       |  61 +-
 .../CaloUtils/share/CaloTowerStore_test.ref   |  74 ++-
 .../DataModelRunTests/share/CondReadWrite.ref |  34 +-
 .../DataModelRunTests/share/CondReader.ref    |  73 ++-
 .../DataModelRunTests/share/CondReaderMT.ref  |  51 +-
 .../DataModelRunTests/share/CondWriter.ref    |  54 +-
 .../share/LArCellDeadOTXCorr_test.ref         | 124 ++--
 .../share/LArFCalTowerBuilderTool.ref         |  79 ++-
 .../share/LArConditionsTest.ref               |  83 ++-
 .../share/LArConditionsTestReadNoReg.ref      | 116 ++--
 .../share/LArConditionsTestWriteNoReg.ref     | 103 ++-
 .../share/TileCellBuilderFromHit_test.ref     | 115 ++--
 .../share/TileCellBuilder_test.ref            | 114 ++--
 .../share/TileDQstatusAlg_test.ref            | 101 ++-
 .../share/TileDQstatusTool_test.ref           | 101 ++-
 .../share/TileRawChannelBuilder_test.ref      | 105 ++--
 .../TileDigitsContByteStreamCnv_test.ref      | 502 ++++++++-------
 .../share/TileL2ContByteStreamCnv_test.ref    | 592 +++++++++---------
 .../share/TileLaserObjByteStreamCnv_test.ref  | 534 ++++++++--------
 .../share/TileMuRcvContByteStreamCnv_test.ref | 524 ++++++++--------
 .../TileRawChannelContByteStreamCnv_test.ref  | 556 ++++++++--------
 21 files changed, 2037 insertions(+), 2059 deletions(-)

diff --git a/Calorimeter/CaloRec/share/ToolConstantsCondAlg_test.ref b/Calorimeter/CaloRec/share/ToolConstantsCondAlg_test.ref
index 1fe498cfaf9d..480472195299 100644
--- a/Calorimeter/CaloRec/share/ToolConstantsCondAlg_test.ref
+++ b/Calorimeter/CaloRec/share/ToolConstantsCondAlg_test.ref
@@ -1,18 +1,61 @@
+Py:AutoConfigFlags    INFO Obtaining metadata of auto-configuration by peeking into /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/q221/21.0/v1/myRDO.pool.root
 Py:MetaReader        INFO Current mode used: peeker
+Py:MetaReader        INFO Current filenames: ['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/q221/21.0/v1/myRDO.pool.root']
 Py:MetaReader        INFO MetaReader is called with the parameter "unique_tag_info_values" set to True. This is a workaround to remove all duplicate values from "/TagInfo" key
+ApplicationMgr    SUCCESS 
+====================================================================================================================================
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on aibuild028.cern.ch on Tue Oct  6 19:13:20 2020
+====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
-IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
+AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
+ClassIDSvc           INFO  getRegistryEntries: read 23732 CLIDRegistry entries for module ALL
+CondInputLoader      INFO Initializing CondInputLoader...
 IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
+IOVDbSvc             INFO Cache alignment will be done in 3 slices
 IOVDbSvc             INFO Global tag: OFLCOND-MC16-SDR-17 set from joboptions
 IOVDbSvc             INFO Initialised with 2 connections and 1 folders
 IOVDbSvc             INFO Service IOVDbSvc initialised successfully
+MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
+PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok]
+PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
+PoolSvc              INFO Frontier compression level set to 5
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+PoolSvc              INFO Successfully setup replica sorting algorithm
+PoolSvc              INFO Setting up APR FileCatalog and Streams
+PoolSvc              INFO Resolved path (via ATLAS_POOLCOND_PATH) is /cvmfs/atlas-condb.cern.ch/repo/conditions/poolcond/PoolFileCatalog.xml
+PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
+PoolSvc           WARNING Unable to locate catalog for apcfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
+PoolSvc              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(['IOVDbMetaDataTool/IOVDbMetaDataTool'])
+OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
+CondProxyProvider    INFO Initializing CondProxyProvider - package version EventSelectorAthenaPool-00-00-00
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] BC292F26-AE73-9041-BF5C-BCE6C5C651EC
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000079.gen.COND/cond09_mc.000079.gen.COND._0002.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000079.gen.COND/cond09_mc.000079.gen.COND._0002.pool.root File version:53413
+ClassIDSvc           INFO  getRegistryEntries: read 1569 CLIDRegistry entries for module ALL
+IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
+IOVSvc.IOVSvcTool    INFO IOVRanges will be checked at every Event
 IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
 IOVDbSvc             INFO Added taginfo remove for /LAR/CellCorrOfl/deadOTX
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] BC292F26-AE73-9041-BF5C-BCE6C5C651EC
+Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
 EventPersistenc...   INFO Added successfully Conversion service:McCnvSvc
 EventPersistenc...   INFO Added successfully Conversion service:TagInfoMgr
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
+DbSession            INFO     Open     DbSession    
+Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] BC292F26-AE73-9041-BF5C-BCE6C5C651EC
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000079.gen.COND/cond09_mc.000079.gen.COND._0002.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000079.gen.COND/cond09_mc.000079.gen.COND._0002.pool.root File version:53413
+ClassIDSvc           INFO  getRegistryEntries: read 112 CLIDRegistry entries for module ALL
 CondInputLoader      INFO Adding base classes:
   +  ( 'CondAttrListCollection' , 'ConditionStore+/LAR/CellCorrOfl/deadOTX' )   ->
 CondInputLoader      INFO Will create WriteCondHandle dependencies for the following DataObjects:
@@ -42,8 +85,10 @@ CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'Con
 ApplicationMgr       INFO Application Manager Started successfully
 AthenaEventLoopMgr   INFO   ===>>>  start of run 284500    <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #0, run #284500 0 events processed so far  <<<===
+IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVDbFolder          INFO HVS tag OFLCOND-MC16-SDR-17 resolved to LARCellCorrOflDeadOTX-000-00 for folder /LAR/CellCorrOfl/deadOTX
 IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
+IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 dumper1              INFO dumper.energyCalibrationTypes = [0, 0, 0, -1]
 dumper.energyCalibrations = [2, 0.9959, 0.07493, -0.1599, 2, 2, 0.9962, 0.04997, -0.1839, 2, 2, 0.9984, 0.0143, -0.9648, 2]
 dumper.etaCalibrationSizes = [14, 14, 13, 0]
@@ -2497,11 +2542,25 @@ dumper.gam55.region = 4
 
 
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #284500 1 events processed so far  <<<===
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] BC292F26-AE73-9041-BF5C-BCE6C5C651EC
+Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
 ApplicationMgr       INFO Application Manager Stopped successfully
+IncidentProcAlg1     INFO Finalize
+CondInputLoader      INFO Finalizing CondInputLoader...
+IncidentProcAlg2     INFO Finalize
+EventSelector        INFO finalize
+IOVDbFolder          INFO Folder /LAR/CellCorrOfl/deadOTX (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/705 ((     0.07 ))s
+IOVDbSvc             INFO  bytes in ((      0.07 ))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: 1 ReadTime: ((     0.07 ))s
 ToolSvc              INFO Removing all tools created by ToolSvc
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
+cObjR_ALL            INFO Time User   : Tot=   10 [ms] Ave/Min/Max=    3.33(+-    4.71)/       0/      10 [ms] #=  3
+cObj_ALL             INFO Time User   : Tot=   60 [ms] Ave/Min/Max=      20(+-    21.6)/       0/      50 [ms] #=  3
+ChronoStatSvc        INFO Time User   : Tot= 0.74  [s]  #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/Calorimeter/CaloUtils/share/CaloTowerStore_test.ref b/Calorimeter/CaloUtils/share/CaloTowerStore_test.ref
index b597552a0de5..acdbf23cbfdc 100644
--- a/Calorimeter/CaloUtils/share/CaloTowerStore_test.ref
+++ b/Calorimeter/CaloUtils/share/CaloTowerStore_test.ref
@@ -1,16 +1,16 @@
-Wed Aug  5 18:46:10 CEST 2020
+Tue Oct  6 18:57:36 CEST 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.17] [x86_64-centos7-gcc8-opt] [CaloMgrTooEarlyError/1cd056abc58] -- built on [2020-08-05T1835]
+Py:Athena            INFO using release [WorkDir-22.0.19] [x86_64-centos7-gcc8-opt] [master-refs/ea3e66422c4] -- built on [2020-10-06T1855]
 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 "CaloTowerStore_test.py"
+Py:Athena            INFO including file "CaloUtils/CaloTowerStore_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 5547 configurables from 23 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 4 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.17
+EventInfoMgtInit: Got release version  Athena-22.0.19
 Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
 Py:Athena            INFO including file "CaloIdCnv/CaloIdCnv_joboptions.py"
 Py:Athena            INFO including file "CaloConditions/CaloConditions_jobOptions.py"
@@ -20,23 +20,21 @@ Py:Athena            INFO including file "TileIdCnv/TileIdCnv_jobOptions.py"
 Py:Athena            INFO including file "AthenaCommon/runbatch.py"
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r2)
-                                          running on 05d0ccd909cb on Wed Aug  5 18:46:19 2020
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on aibuild028.cern.ch on Tue Oct  6 18:57:48 2020
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
-ClassIDSvc           INFO  getRegistryEntries: read 3581 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3586 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
-AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 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-ai.cern.ch:8000/atlr)(serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-08-04T2146/Athena/22.0.17/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 05d0ccd909cb [ATLF atlas_dd ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -47,14 +45,13 @@ DbSession            INFO     Open     DbSession
 Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
 MetaDataSvc          INFO Found MetaDataTools = PublicToolHandleArray([])
 OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
-IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
 IOVDbSvc             INFO Cache alignment will be done in 3 slices
 IOVDbSvc             INFO Global tag: OFLCOND-SDR-BS14T-IBL-06 set from joboptions
 IOVDbFolder          INFO Read from meta data only for folder /TagInfo
 IOVDbSvc             INFO Initialised with 3 connections and 7 folders
 IOVDbSvc             INFO Service IOVDbSvc initialised successfully
-ClassIDSvc           INFO  getRegistryEntries: read 1488 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1629 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found.
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
@@ -68,9 +65,9 @@ IOVDbSvc             INFO Added taginfo remove for /CALO/Ofl/Identifier/CaloTTOn
 IOVDbSvc             INFO Added taginfo remove for /CALO/Ofl/Identifier/CaloTTPpmRxIdMapAtlas
 IOVDbSvc             INFO Added taginfo remove for /LAR/LArCellPositionShift
 IOVDbSvc             INFO Added taginfo remove for /LAR/Identifier/LArTTCellMapAtlas
-ClassIDSvc           INFO  getRegistryEntries: read 268 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 24 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 239 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 273 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 26 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 243 CLIDRegistry entries for module ALL
 DetDescrCnvSvc       INFO  initializing 
 DetDescrCnvSvc       INFO Found DetectorStore service
 DetDescrCnvSvc       INFO  filling proxies for detector managers 
@@ -155,7 +152,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 5947 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 6007 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
@@ -173,7 +170,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_Athena_x86_64-centos7-gcc8-opt/2020-08-04T2146/Athena/22.0.17/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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
@@ -185,15 +182,15 @@ CaloIDHelper_ID...   INFO in createObj: creating a LArHEC_ID helper object in th
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIDHelper_ID...   INFO in createObj: creating a LArFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-08-04T2146/Athena/22.0.17/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-08-04T2146/Athena/22.0.17/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-08-04T2146/Athena/22.0.17/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
 CaloIDHelper_ID...   INFO in createObj: creating a LArMiniFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 LArMiniFCAL_ID       INFO  initialize_from_dict - LArCalorimeter dictionary does NOT contain miniFCAL description. Unable to initialize LArMiniFCAL_ID.
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 TileDetDescrMan...   INFO Entering create_elements()
-ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 67 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 CondInputLoader      INFO Initializing CondInputLoader...
 CondInputLoader      INFO Adding base classes:
@@ -203,18 +200,19 @@ ApplicationMgr       INFO Application Manager Started successfully
 AthenaEventLoopMgr   INFO   ===>>>  start of run 1    <<<===
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 EventPersistenc...   INFO Added successfully Conversion service:TagInfoMgr
-ClassIDSvc           INFO  getRegistryEntries: read 2529 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2430 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVDbFolder          INFO HVS tag OFLCOND-SDR-BS14T-IBL-06 resolved to LARAlign-mc11-00 for folder /LAR/Align
 IOVDbFolder          INFO HVS tag OFLCOND-SDR-BS14T-IBL-06 resolved to LArCellPositionShift-ideal for folder /LAR/LArCellPositionShift
 IOVDbFolder          INFO HVS tag OFLCOND-SDR-BS14T-IBL-06 resolved to LARIdentifierLArTTCellMapAtlas-HadFcalFix2 for folder /LAR/Identifier/LArTTCellMapAtlas
 IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
+IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 06C9EAE8-6F5B-E011-BAAA-003048F0E7AC
 Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root
 RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root File version:52200
 CaloMgrDetDescrCnv   INFO in createObj: creating a Calo Detector Manager object in the detector store
 CaloIdMgrDetDes...   INFO in createObj: creating a CaloDescrManager object in the detector store
-ClassIDSvc           INFO  getRegistryEntries: read 198 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 201 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a CaloDM_ID helper object in the detector store
 CaloDM_ID            INFO initialize_from_dictionary
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -231,12 +229,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_Athena_x86_64-centos7-gcc8-opt/2020-08-04T2146/Athena/22.0.17/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-08-04T2146/Athena/22.0.17/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-08-04T2146/Athena/22.0.17/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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_Athena_x86_64-centos7-gcc8-opt/2020-08-04T2146/Athena/22.0.17/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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 
@@ -256,25 +254,25 @@ IncidentProcAlg1     INFO Finalize
 CondInputLoader      INFO Finalizing CondInputLoader...
 IncidentProcAlg2     INFO Finalize
 IdDictDetDescrCnv    INFO in finalize
-IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     1.07 ))s
+IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.05 ))s
 IOVDbFolder          INFO Folder /CALO/Ofl/Identifier/CaloTTOnAttrIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 ((     0.00 ))s
 IOVDbFolder          INFO Folder /CALO/Ofl/Identifier/CaloTTOnOffIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 ((     0.00 ))s
 IOVDbFolder          INFO Folder /CALO/Ofl/Identifier/CaloTTPpmRxIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 ((     0.00 ))s
-IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.69 ))s
-IOVDbFolder          INFO Folder /LAR/Identifier/LArTTCellMapAtlas (PoolRef) db-read 1/0 objs/chan/bytes 1/1/173 ((     0.77 ))s
+IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.22 ))s
+IOVDbFolder          INFO Folder /LAR/Identifier/LArTTCellMapAtlas (PoolRef) db-read 1/0 objs/chan/bytes 1/1/173 ((     0.02 ))s
 IOVDbFolder       WARNING Folder /LAR/Identifier/LArTTCellMapAtlas is requested but no data retrieved
-IOVDbSvc             INFO  bytes in ((      2.53 ))s
+IOVDbSvc             INFO  bytes in ((      0.28 ))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: 3 ReadTime: ((     2.53 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 3 ReadTime: ((     0.28 ))s
 IOVDbSvc             INFO Connection COOLOFL_CALO/OFLP200 : nConnect: 1 nFolders: 3 ReadTime: ((     0.00 ))s
 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 ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot=  210 [ms] Ave/Min/Max=     105(+-     105)/       0/     210 [ms] #=  2
-cObj_ALL             INFO Time User   : Tot=  270 [ms] Ave/Min/Max=     135(+-     125)/      10/     260 [ms] #=  2
-ChronoStatSvc        INFO Time User   : Tot= 1.71  [s]  #=  1
+cObjR_ALL            INFO Time User   : Tot=  490 [ms] Ave/Min/Max=     245(+-     235)/      10/     480 [ms] #=  2
+cObj_ALL             INFO Time User   : Tot= 0.55  [s] Ave/Min/Max=   0.275(+-   0.245)/    0.03/    0.52  [s] #=  2
+ChronoStatSvc        INFO Time User   : Tot= 2.21  [s]  #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/Control/DataModelTest/DataModelRunTests/share/CondReadWrite.ref b/Control/DataModelTest/DataModelRunTests/share/CondReadWrite.ref
index 2eee7689daf9..a46bff238fb6 100644
--- a/Control/DataModelTest/DataModelRunTests/share/CondReadWrite.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/CondReadWrite.ref
@@ -1,7 +1,7 @@
-Mon Apr 13 19:56:26 CEST 2020
+Tue Oct  6 19:46:51 CEST 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.12] [x86_64-centos7-gcc8-opt] [atlas-work3/b3d13b8558d] -- built on [2020-04-13T1856]
+Py:Athena            INFO using release [WorkDir-22.0.19] [x86_64-centos7-gcc8-opt] [master-refs/ea3e66422c4] -- built on [2020-10-06T1923]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
@@ -21,37 +21,33 @@ Folder created
 >== Storing COOL object succeeded. Current content:
 [0,0] - [0,5) (0) [xint (Int32) : 10]
 [0,5] - [2147483647,4294967295) (0) [xint (Int32) : 20]
-Py:ConfigurableDb    INFO Read module info for 5552 configurables from 69 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 10 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.12
+EventInfoMgtInit: Got release version  Athena-22.0.19
 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
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
-                                          running on lxplus775.cern.ch on Mon Apr 13 19:56:49 2020
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on aibuild028.cern.ch on Tue Oct  6 19:47:10 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 3463 CLIDRegistry entries for module ALL
+ClassIDSvc                                         INFO  getRegistryEntries: read 3308 CLIDRegistry entries for module ALL
 CoreDumpSvc                                        INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr                                 INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc                                  0      INFO  getRegistryEntries: read 1934 CLIDRegistry entries for module ALL
+ClassIDSvc                                  0      INFO  getRegistryEntries: read 1971 CLIDRegistry entries for module ALL
 CondInputLoader                             0      INFO Initializing CondInputLoader...
 MetaDataSvc                                 0      INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
-AthenaPoolCnvSvc                            0      INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 PoolSvc                                     0      INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok]
 PoolSvc                                     0      INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc                                     0      INFO Frontier compression level set to 5
 DBReplicaSvc                                0      INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc                                0      INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-04-12T2139/Athena/22.0.12/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc                                0      INFO Total of 10 servers found for host lxplus775.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc                                0      INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc                                0      INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc                                     0      INFO Successfully setup replica sorting algorithm
 PoolSvc                                     0      INFO Setting up APR FileCatalog and Streams
 PoolSvc                                     0   WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -61,13 +57,13 @@ PoolSvc                                     0      INFO POOL WriteCatalog is xml
 DbSession                                   0      INFO     Open     DbSession    
 Domain[ROOT_All]                            0      INFO >   Access   DbDomain     READ      [ROOT_All] 
 MetaDataSvc                                 0      INFO Found MetaDataTools = PublicToolHandleArray([])
-IOVDbSvc                                    0      INFO Opened read transaction for POOL PersistencySvc
+OutputStreamSequencerSvc                    0      INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 IOVDbSvc                                    0      INFO Only 5 POOL conditions files will be open at once
 IOVDbFolder                                 0      INFO Read from meta data only for folder /TagInfo
 IOVDbFolder                                 0      INFO Extensible folder /DMTest/TestAttrList
 IOVDbSvc                                    0      INFO Initialised with 2 connections and 2 folders
 IOVDbSvc                                    0      INFO Service IOVDbSvc initialised successfully
-ClassIDSvc                                  0      INFO  getRegistryEntries: read 1785 CLIDRegistry entries for module ALL
+ClassIDSvc                                  0      INFO  getRegistryEntries: read 1629 CLIDRegistry entries for module ALL
 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_rw.db;dbname=OFLP200
 IOVSvc                                      0      INFO No IOVSvcTool associated with store "StoreGateSvc"
@@ -78,7 +74,7 @@ CondInputLoader                             0      INFO Adding base classes:
   +  ( 'AthenaAttributeList' , 'ConditionStore+/DMTest/TestAttrList' )   ->
 CondInputLoader                             0      INFO Will create WriteCondHandle dependencies for the following DataObjects:
     +  ( 'AthenaAttributeList' , 'ConditionStore+/DMTest/TestAttrList' ) 
-ClassIDSvc                                  0      INFO  getRegistryEntries: read 440 CLIDRegistry entries for module ALL
+ClassIDSvc                                  0      INFO  getRegistryEntries: read 452 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
@@ -86,17 +82,17 @@ xAODMaker::EventInfoCnvAlg.EventInfoC...    0   WARNING Will not fill beam spot
 EventSelector                               0      INFO  Enter McEventSelector Initialization 
 AthenaEventLoopMgr                          0      INFO Setup EventSelector service EventSelector
 ApplicationMgr                              0      INFO Application Manager Initialized successfully
-ClassIDSvc                                  0      INFO  getRegistryEntries: read 108 CLIDRegistry entries for module ALL
+ClassIDSvc                                  0      INFO  getRegistryEntries: read 110 CLIDRegistry entries for module ALL
 CondInputLoader                             0      INFO created CondCont<AthenaAttributeList> with key 'ConditionStore+/DMTest/TestAttrList'
 ApplicationMgr                              0      INFO Application Manager Started successfully
 EventPersistencySvc                         0      INFO Added successfully Conversion service:McCnvSvc
 AthenaEventLoopMgr                      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
 AthenaEventLoopMgr                      0   0      INFO   ===>>>  start processing event #0, run #0 0 events processed so far  <<<===
 IOVDbSvc                                0   0      INFO Opening COOL connection for sqlite://;schema=condtest_rw.db;dbname=OFLP200
 IOVDbSvc                                0   0      INFO Disconnecting from sqlite://;schema=condtest_rw.db;dbname=OFLP200
+IOVDbSvc                                0   0      INFO Opened read transaction for POOL PersistencySvc
 DMTest::CondWriterExtAlg                0   0      INFO Event 0 LBN 0
 DMTest::CondReaderAlg                   0   0      INFO Event 0 LBN 0
 DMTest::CondReaderAlg                   0   0      INFO   xint xint (int) : 10
diff --git a/Control/DataModelTest/DataModelRunTests/share/CondReader.ref b/Control/DataModelTest/DataModelRunTests/share/CondReader.ref
index 319d8ff0b75f..1409fbd9807c 100644
--- a/Control/DataModelTest/DataModelRunTests/share/CondReader.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/CondReader.ref
@@ -1,60 +1,57 @@
-Tue Dec 11 15:25:53 CET 2018
+Tue Oct  6 19:46:10 CEST 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.1] [x86_64-slc6-gcc62-opt] [atlas-work3g/fc1ea6b7761] -- built on [2018-12-11T1514]
+Py:Athena            INFO using release [WorkDir-22.0.19] [x86_64-centos7-gcc8-opt] [master-refs/ea3e66422c4] -- built on [2020-10-06T1923]
 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 "DataModelRunTests/CondReader_jo.py"
 Py:Athena            INFO including file "AthenaPoolCnvSvc/AthenaPool_jobOptions.py"
-Py:ConfigurableDb    INFO Read module info for 5443 configurables from 42 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 10 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.1
+EventInfoMgtInit: Got release version  Athena-22.0.19
 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"
-[?1034hApplicationMgr       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 v30r5)
-                                          running on lxplus079.cern.ch on Tue Dec 11 15:26:12 2018
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on aibuild028.cern.ch on Tue Oct  6 19:46:21 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 2946 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3308 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 1877 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1971 CLIDRegistry entries for module ALL
 CondInputLoader      INFO Initializing CondInputLoader...
 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/2018-12-10T2259/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host lxplus079.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host aibuild028.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] 
-IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
+MetaDataSvc          INFO Found MetaDataTools = PublicToolHandleArray([])
+OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 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           INFO  getRegistryEntries: read 1629 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 sqlite://;schema=condtest.db;dbname=OFLP200
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
-IOVSvcTool           INFO IOVRanges will be checked at every Event
-ClassIDSvc           INFO  getRegistryEntries: read 1341 CLIDRegistry entries for module ALL
+IOVSvc.IOVSvcTool    INFO IOVRanges will be checked at every Event
 IOVDbSvc             INFO Disconnecting from sqlite://;schema=condtest.db;dbname=OFLP200
 IOVDbSvc             INFO Added taginfo remove for /DMTest/RLTest
 IOVDbSvc             INFO Added taginfo remove for /DMTest/S2
@@ -71,14 +68,18 @@ CondInputLoader      INFO Will create WriteCondHandle dependencies for the follo
     +  ( 'AthenaAttributeList' , 'ConditionStore+/DMTest/TestAttrList' ) 
     +  ( 'DMTest::S1' , 'ConditionStore+/DMTest/S2' ) 
     +  ( 'DMTest::S2' , 'ConditionStore+/DMTest/S2' ) 
-ClassIDSvc           INFO  getRegistryEntries: read 319 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 452 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 271 CLIDRegistry entries for module ALL
+xAODMaker::Even...   INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
+xAODMaker::Even...   INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
+xAODMaker::Even...WARNING Beam conditions service not available
+xAODMaker::Even...WARNING Will not fill beam spot information into xAOD::EventInfo
 PyComponentMgr       INFO Initializing PyComponentMgr...
 LoadReadDicts        INFO Initializing LoadReadDicts...
-HistogramPersis...WARNING Histograms saving not required.
 EventSelector        INFO  Enter McEventSelector Initialization 
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
-ClassIDSvc           INFO  getRegistryEntries: read 7221 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 9320 CLIDRegistry entries for module ALL
 CondInputLoader      INFO created CondCont<AthenaAttributeList> with key 'ConditionStore+/DMTest/RLTest'
 CondInputLoader      INFO created CondCont<AthenaAttributeList> with key 'ConditionStore+/DMTest/TSTest'
 CondInputLoader      INFO created CondCont<AthenaAttributeList> with key 'ConditionStore+/DMTest/TestAttrList'
@@ -88,13 +89,19 @@ EventPersistenc...   INFO Added successfully Conversion service:McCnvSvc
 AthenaEventLoopMgr   INFO   ===>>>  start of run 0    <<<===
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 EventPersistenc...   INFO Added successfully Conversion service:TagInfoMgr
-ClassIDSvc           INFO  getRegistryEntries: read 109 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #0, run #0 0 events processed so far  <<<===
 IOVDbSvc             INFO Opening COOL connection for sqlite://;schema=condtest.db;dbname=OFLP200
 IOVDbSvc             INFO Disconnecting from sqlite://;schema=condtest.db;dbname=OFLP200
-Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] A834E12A-0572-2942-88EC-5A969061BCA7
+IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
+IOVDbSvc             INFO Opening COOL connection for sqlite://;schema=condtest.db;dbname=OFLP200
+IOVDbSvc             INFO Disconnecting from sqlite://;schema=condtest.db;dbname=OFLP200
+IOVDbSvc             INFO Opening COOL connection for sqlite://;schema=condtest.db;dbname=OFLP200
+IOVDbSvc             INFO Disconnecting from sqlite://;schema=condtest.db;dbname=OFLP200
+IOVDbSvc             INFO Opening COOL connection for sqlite://;schema=condtest.db;dbname=OFLP200
+IOVDbSvc             INFO Disconnecting from sqlite://;schema=condtest.db;dbname=OFLP200
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 04EAD7FD-B145-8B49-BF7D-419CCEC08071
 Domain[ROOT_All]     INFO                           condtest.pool.root
-RootDatabase.open    INFO condtest.pool.root File version:61404
+RootDatabase.open    INFO condtest.pool.root File version:62200
 DMTest::CondRea...   INFO Event 0 LBN 0
 DMTest::CondRea...   INFO   xint xint (int) : 10
 DMTest::CondRea...   INFO   scond 1000
@@ -365,7 +372,7 @@ DMTest::CondRea...   INFO   ts xint (int) : 900
 DMTest::CondRea...   INFO   s3 907
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #29, run #0 30 events processed so far  <<<===
 condtest.pool.root   INFO Database being retired...
-Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] A834E12A-0572-2942-88EC-5A969061BCA7
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 04EAD7FD-B145-8B49-BF7D-419CCEC08071
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
 ApplicationMgr       INFO Application Manager Stopped successfully
 IncidentProcAlg1     INFO Finalize
@@ -374,13 +381,13 @@ LoadReadDicts        INFO Finalizing LoadReadDicts...
 IncidentProcAlg2     INFO Finalize
 EventSelector        INFO finalize
 PyComponentMgr       INFO Finalizing PyComponentMgr...
-IOVDbFolder          INFO Folder /DMTest/RLTest (AttrList) db-read 1/7 objs/chan/bytes 7/1/28 ((     0.01 ))s
-IOVDbFolder          INFO Folder /DMTest/S2 (PoolRef) db-read 1/5 objs/chan/bytes 15/1/2715 ((     0.00 ))s
-IOVDbFolder          INFO Folder /DMTest/TSTest (AttrList) db-read 1/9 objs/chan/bytes 9/1/36 ((     0.00 ))s
-IOVDbFolder          INFO Folder /DMTest/TestAttrList (AttrList) db-read 1/10 objs/chan/bytes 30/1/120 ((     0.00 ))s
-IOVDbSvc             INFO  bytes in ((      0.01 ))s
+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.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: 2 nFolders: 4 ReadTime: ((     0.01 ))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.f...   INFO  Service finalized successfully 
diff --git a/Control/DataModelTest/DataModelRunTests/share/CondReaderMT.ref b/Control/DataModelTest/DataModelRunTests/share/CondReaderMT.ref
index 750f7b01db70..bb166a6ab970 100644
--- a/Control/DataModelTest/DataModelRunTests/share/CondReaderMT.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/CondReaderMT.ref
@@ -1,7 +1,7 @@
-Wed Jun  3 16:05:38 PDT 2020
+Tue Oct  6 19:46:30 CEST 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1534]
+Py:Athena            INFO using release [WorkDir-22.0.19] [x86_64-centos7-gcc8-opt] [master-refs/ea3e66422c4] -- built on [2020-10-06T1923]
 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,59 +10,54 @@ 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 5530 configurables from 17 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 10 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.15
+EventInfoMgtInit: Got release version  Athena-22.0.19
 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 v33r1)
-                                          running on zeus on Wed Jun  3 16:05:46 2020
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on aibuild028.cern.ch on Tue Oct  6 19:46:41 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 3835 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 3308 CLIDRegistry entries for module ALL
 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 ]
+DBReplicaSvc                                        INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc                                        INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc                                        INFO Total of 10 servers found for host aibuild028.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
+OutputStreamSequencerSvc                            INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 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
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 2351 CLIDRegistry entries for module ALL
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 1699 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
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 273 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
@@ -72,7 +67,7 @@ xAODMaker::EventInfoCnvAlg.EventInfoC...       0 WARNING Beam conditions service
 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
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 9210 CLIDRegistry entries for module ALL
 CondInputLoader                                0    INFO Initializing CondInputLoader...
 CondInputLoader                                0    INFO Adding base classes:
   +  ( 'AthenaAttributeList' , 'ConditionStore+/DMTest/RLTest' )   ->
@@ -146,7 +141,7 @@ AvalancheSchedulerSvc                          0    INFO  o Scheduling of condit
 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
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 110 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'
@@ -157,19 +152,19 @@ EventPersistencySvc                        0   0    INFO Added successfully Conv
 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 Opened read transaction for POOL PersistencySvc
 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 ->  Access   DbDatabase   READ      [ROOT_All] 04EAD7FD-B145-8B49-BF7D-419CCEC08071
 Domain[ROOT_All]                           0   0    INFO                           condtest.pool.root
-RootDatabase.open                          0   0    INFO condtest.pool.root File version:62002
+RootDatabase.open                          0   0    INFO condtest.pool.root File version:62200
 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
@@ -179,7 +174,7 @@ 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
+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
@@ -440,9 +435,9 @@ 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
+AthenaHiveEventLoopMgr                    29   0    INFO ---> Loop Finished (seconds): 0.308121
 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 DbDatabase   READ      [ROOT_All] 04EAD7FD-B145-8B49-BF7D-419CCEC08071
 Domain[ROOT_All]                                    INFO >   Deaccess DbDomain     READ      [ROOT_All] 
 ApplicationMgr                                      INFO Application Manager Stopped successfully
 IncidentProcAlg1                                    INFO Finalize
@@ -454,7 +449,7 @@ 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/RLTest (AttrList) db-read 4/7 objs/chan/bytes 28/1/112 ((     0.03 ))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
diff --git a/Control/DataModelTest/DataModelRunTests/share/CondWriter.ref b/Control/DataModelTest/DataModelRunTests/share/CondWriter.ref
index 62c522b7d481..0f0751cb7802 100644
--- a/Control/DataModelTest/DataModelRunTests/share/CondWriter.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/CondWriter.ref
@@ -1,66 +1,58 @@
-Sat Feb  9 06:07:09 CET 2019
+Tue Oct  6 19:45:42 CEST 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [AthenaExternals-22.0.1] [x86_64-centos7-gcc8-opt] [2.0.22/2840e19] -- built on [2019-02-07T2103]
+Py:Athena            INFO using release [WorkDir-22.0.19] [x86_64-centos7-gcc8-opt] [master-refs/ea3e66422c4] -- built on [2020-10-06T1923]
 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 "DataModelRunTests/CondWriter_jo.py"
-Py:ConfigurableDb    INFO Read module info for 5454 configurables from 43 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 10 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Py:Athena            INFO including file "DataModelRunTests/loadWriteDicts.py"
-EventInfoMgtInit: Got release version  Athena-22.0.1
+EventInfoMgtInit: Got release version  Athena-22.0.19
+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
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v30r5)
-                                          running on lxplus054.cern.ch on Sat Feb  9 06:07:23 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on aibuild028.cern.ch on Tue Oct  6 19:45:52 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 3045 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3308 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 770 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 1295 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 722 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1699 CLIDRegistry entries for module ALL
 xAODMaker::Even...   INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
 xAODMaker::Even...   INFO Initializing - Package version: xAODEventInfoCnv-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-02-07T2139/Athena/22.0.1/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host lxplus054.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host aibuild028.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:CondWriter_catalog.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
+OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
 IOVDbFolder          INFO Read from meta data only for folder /TagInfo
 IOVDbSvc             INFO Initialised with 1 connections and 1 folders
 IOVDbSvc             INFO Service IOVDbSvc initialised successfully
+ClassIDSvc           INFO  getRegistryEntries: read 1629 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found.
 xAODMaker::Even...WARNING Beam conditions service not available
 xAODMaker::Even...WARNING Will not fill beam spot information into xAOD::EventInfo
-xAODMaker::Even...   INFO Luminosity information not available
-xAODMaker::Even...   INFO Will take information from the EventInfo object
-ClassIDSvc           INFO  getRegistryEntries: read 1612 CLIDRegistry entries for module ALL
 PyComponentMgr       INFO Initializing PyComponentMgr...
 LoadWriteDicts       INFO Initializing LoadWriteDicts...
-ClassIDSvc           INFO  getRegistryEntries: read 7317 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 9274 CLIDRegistry entries for module ALL
 DMTest::CondWri...   INFO Initializing DMTest::CondWriterAlg.CondStream - package version AthenaServices-00-00-00
-HistogramPersis...WARNING Histograms saving not required.
 EventSelector        INFO  Enter McEventSelector Initialization 
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
@@ -70,27 +62,27 @@ AthenaEventLoopMgr   INFO   ===>>>  start of run 0    <<<===
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 EventPersistenc...   INFO Added successfully Conversion service:TagInfoMgr
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #0, run #0 0 events processed so far  <<<===
-ClassIDSvc           INFO  getRegistryEntries: read 217 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 110 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO Opening COOL connection for sqlite://;schema=condtest.db;dbname=OFLP200
 IOVDbSvc             INFO *** COOL  exception caught: The database does not exist
 IOVDbSvc             INFO Create a new conditions database: sqlite://;schema=condtest.db;dbname=OFLP200
 DbSession            INFO     Open     DbSession    
 Domain[ROOT_All]     INFO >   Access   DbDomain     UPDATE    [ROOT_All] 
-Domain[ROOT_All]     INFO ->  Access   DbDatabase   CREATE    [ROOT_All] 56DD3528-75B9-E244-AE4D-904205EE8FDE
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   CREATE    [ROOT_All] 04EAD7FD-B145-8B49-BF7D-419CCEC08071
 Domain[ROOT_All]     INFO                           condtest.pool.root
-RootDatabase.open    INFO condtest.pool.root File version:61404
+RootDatabase.open    INFO condtest.pool.root File version:62200
 StorageSvc           INFO Building shape according to reflection information using shape ID for:
 StorageSvc           INFO DMTest::S2 [EC2D9BCD-4B99-41EB-A799-82BAF48887FC]
 StorageSvc           INFO Building shape according to reflection information using shape ID for:
 StorageSvc           INFO DataHeader_p6 [4DDBD295-EFCE-472A-9EC8-15CD35A9EB8D]
 StorageSvc           INFO Building shape according to reflection information using shape ID for:
 StorageSvc           INFO DataHeaderForm_p6 [7BE56CEF-C866-4BEE-9348-A5F34B5F1DAD]
-ClassIDSvc           INFO  getRegistryEntries: read 37 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 49 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #0 1 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #1, run #0 1 events processed so far  <<<===
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
-IOVSvcTool           INFO IOVRanges will be checked at every Event
-ClassIDSvc           INFO  getRegistryEntries: read 54 CLIDRegistry entries for module ALL
+IOVSvc.IOVSvcTool    INFO IOVRanges will be checked at every Event
+ClassIDSvc           INFO  getRegistryEntries: read 273 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #0 2 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #2, run #0 2 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #0 3 events processed so far  <<<===
@@ -150,7 +142,7 @@ AthenaEventLoopMgr   INFO   ===>>>  start processing event #29, run #0 29 events
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #29, run #0 30 events processed so far  <<<===
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
 condtest.pool.root   INFO Database being retired...
-Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   CREATE    [ROOT_All] 56DD3528-75B9-E244-AE4D-904205EE8FDE
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   CREATE    [ROOT_All] 04EAD7FD-B145-8B49-BF7D-419CCEC08071
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     UPDATE    [ROOT_All] 
 ApplicationMgr       INFO Application Manager Stopped successfully
 IncidentProcAlg1     INFO Finalize
diff --git a/LArCalorimeter/LArCellRec/share/LArCellDeadOTXCorr_test.ref b/LArCalorimeter/LArCellRec/share/LArCellDeadOTXCorr_test.ref
index 528b6b3e0f9b..67f208ab6657 100644
--- a/LArCalorimeter/LArCellRec/share/LArCellDeadOTXCorr_test.ref
+++ b/LArCalorimeter/LArCellRec/share/LArCellDeadOTXCorr_test.ref
@@ -1,16 +1,16 @@
-Wed Aug 12 22:07:02 CEST 2020
+Tue Oct  6 19:48:02 CEST 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.17] [x86_64-centos7-gcc8-opt] [atlas-work3/ed2484eb9f5] -- built on [2020-08-12T1632]
+Py:Athena            INFO using release [WorkDir-22.0.19] [x86_64-centos7-gcc8-opt] [master-refs/ea3e66422c4] -- built on [2020-10-06T1923]
 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 "LArCellRec/LArCellDeadOTXCorr_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 5547 configurables from 32 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 10 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.17
+EventInfoMgtInit: Got release version  Athena-22.0.19
 Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
 Py:Athena            INFO including file "CaloIdCnv/CaloIdCnv_joboptions.py"
 Py:Athena            INFO including file "CaloConditions/CaloConditions_jobOptions.py"
@@ -26,22 +26,21 @@ Py:JobPropertyContainer::    INFO  setting folder /LAR/Identifier/FebRodMap with
 Py:Athena            INFO including file "AthenaCommon/runbatch.py"
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r2)
-                                          running on lxplus770.cern.ch on Wed Aug 12 22:07:13 2020
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on aibuild028.cern.ch on Tue Oct  6 19:48:14 2020
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
-ClassIDSvc           INFO  getRegistryEntries: read 3589 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3586 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
-AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok]
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
 DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-08-11T2101/Athena/22.0.17/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host lxplus770.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -52,7 +51,6 @@ DbSession            INFO     Open     DbSession
 Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
 MetaDataSvc          INFO Found MetaDataTools = PublicToolHandleArray([])
 OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
-IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
 IOVDbSvc             INFO Cache alignment will be done in 3 slices
 IOVDbSvc             INFO Global tag: OFLCOND-RUN12-SDR-35 set from joboptions
@@ -62,12 +60,12 @@ IOVDbSvc             INFO Folder /LAR/Identifier/FebRodMap, adding new key tag w
 IOVDbFolder          INFO Read from meta data only for folder /TagInfo
 IOVDbSvc             INFO Initialised with 3 connections and 25 folders
 IOVDbSvc             INFO Service IOVDbSvc initialised successfully
-ClassIDSvc           INFO  getRegistryEntries: read 1488 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1629 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found.
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
 IOVSvc.IOVSvcTool    INFO IOVRanges will be checked at every Event
-ClassIDSvc           INFO  getRegistryEntries: read 268 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 273 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_CALO/OFLP200
 IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
 IOVDbSvc             INFO Disconnecting from COOLOFL_CALO/OFLP200
@@ -95,9 +93,9 @@ IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/Shape
 IOVDbSvc             INFO Added taginfo remove for /LAR/Identifier/LArTTCellMapAtlas
 IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/fSampl
 IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/uA2MeV
-ClassIDSvc           INFO  getRegistryEntries: read 24 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 2436 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 35 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 26 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2511 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 39 CLIDRegistry entries for module ALL
 DetDescrCnvSvc       INFO  initializing 
 DetDescrCnvSvc       INFO Found DetectorStore service
 DetDescrCnvSvc       INFO  filling proxies for detector managers 
@@ -188,7 +186,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 3602 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3621 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
@@ -197,12 +195,12 @@ 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= 24348Kb 	 Time = 0.58S
-ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
+GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 25380Kb 	 Time = 0.68S
+ClassIDSvc           INFO  getRegistryEntries: read 67 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 5546 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 608 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 2989 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 5651 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 618 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3030 CLIDRegistry entries for module ALL
 CondInputLoader      INFO Initializing CondInputLoader...
 CondInputLoader      INFO Adding base classes:
   +  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/BadChannels/MissingFEBs' )   ->
@@ -256,7 +254,7 @@ CondInputLoader      INFO Will create WriteCondHandle dependencies for the follo
     +  ( 'LAruA2MeVMC' , 'ConditionStore+LAruA2MeV' ) 
 PyComponentMgr       INFO Initializing PyComponentMgr...
 testalg1             INFO Initializing testalg1...
-ClassIDSvc           INFO  getRegistryEntries: read 1123 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1042 CLIDRegistry entries for module ALL
 CaloIdMgrDetDes...   INFO in createObj: creating a CaloDescrManager object in the detector store
 CaloIDHelper_ID...   INFO in createObj: creating a CaloCell_ID helper object in the detector store
 CaloIDHelper_ID...   INFO in createObj: creating a LArEM_ID helper object in the detector store
@@ -265,15 +263,15 @@ CaloIDHelper_ID...   INFO in createObj: creating a LArHEC_ID helper object in th
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIDHelper_ID...   INFO in createObj: creating a LArFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-08-11T2101/Athena/22.0.17/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-08-11T2101/Athena/22.0.17/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-08-11T2101/Athena/22.0.17/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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.
 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_Athena_x86_64-centos7-gcc8-opt/2020-08-11T2101/Athena/22.0.17/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIDHelper_ID...   INFO in createObj: creating a CaloDM_ID helper object in the detector store
 CaloDM_ID            INFO initialize_from_dictionary
@@ -291,21 +289,21 @@ CaloIDHelper_ID...   INFO in createObj: creating a LArHEC_SuperCell_ID helper ob
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIDHelper_ID...   INFO in createObj: creating a LArFCAL_SuperCell_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-08-11T2101/Athena/22.0.17/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-08-11T2101/Athena/22.0.17/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-08-11T2101/Athena/22.0.17/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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_Athena_x86_64-centos7-gcc8-opt/2020-08-11T2101/Athena/22.0.17/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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 
-ClassIDSvc           INFO  getRegistryEntries: read 301 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 306 CLIDRegistry entries for module ALL
 LArOnlineIDDetD...   INFO in createObj: creating a LArOnlineID helper object in the detector store
 LArOnlineID          INFO initialize_from_dictionary
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 1454 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1473 CLIDRegistry entries for module ALL
 ToolSvc.tool1        INFO Initializing LArCellDeadOTXCorr
 ToolSvc.tool1        INFO L1Calo database won't be used. Pedestal values will be constant and equal to 32.
 ToolSvc.CaloTri...   INFO  => CaloTriggerTowerService::initialize() 
@@ -315,9 +313,9 @@ LArIdMgrDetDesc...   INFO Set LArHVLineID helper in LArIdMgr
 LArIdMgrDetDesc...   INFO Set LArElectrodeID helper in LArIdMgr 
 LArIdMgrDetDesc...   INFO Set CaloCell_ID helper in LArIdMgr 
 LArIdMgrDetDesc...   INFO Initializing LArIdMgr from values in LArIdMgrDetDescrCnv 
-ClassIDSvc           INFO  getRegistryEntries: read 59 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
-IOVSvc.IOVSvcTool    INFO Still in initialize phase, not tiggering callback for LArCablingLegacyService[0x3230e000]+7f214a4ac2b0 bound to AthenaAttributeList[/LAR/Identifier/OnOffIdMap]
+ClassIDSvc           INFO  getRegistryEntries: read 60 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 67 CLIDRegistry entries for module ALL
+IOVSvc.IOVSvcTool    INFO Still in initialize phase, not tiggering callback for LArCablingLegacyService[0x343e3a00]+7f8339c5f400 bound to AthenaAttributeList[/LAR/Identifier/OnOffIdMap]
 ToolSvc.LArCabl...   INFO Successfully installed callback on folder/LAR/Identifier/OnOffIdMap
 ToolSvc.LArCabl...   INFO Successfully installed callback on folder/LAR/Identifier/CalibIdMap
 ToolSvc.LArCabl...   INFO Successfully installed callback on folder/LAR/Identifier/FebRodMap
@@ -326,7 +324,7 @@ ToolSvc.CaloTri...   INFO  ====> ...CaloTriggerTowerService::init() OK
 ToolSvc.tool2        INFO Initializing LArCellDeadOTXCorr
 ToolSvc.tool2        INFO L1Calo database won't be used. Pedestal values will be constant and equal to 32.
 ApplicationMgr       INFO Application Manager Initialized successfully
-ClassIDSvc           INFO  getRegistryEntries: read 131 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 133 CLIDRegistry entries for module ALL
 CondInputLoader      INFO created CondCont<AthenaAttributeList> with key 'ConditionStore+/LAR/BadChannels/MissingFEBs'
 CondInputLoader      INFO created CondCont<AthenaAttributeList> with key 'ConditionStore+/LAR/Identifier/CalibIdMap'
 CondInputLoader      INFO created CondCont<AthenaAttributeList> with key 'ConditionStore+/LAR/Identifier/FebRodMap'
@@ -349,7 +347,6 @@ ApplicationMgr       INFO Application Manager Started successfully
 AthenaEventLoopMgr   INFO   ===>>>  start of run 1    <<<===
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 EventPersistenc...   INFO Added successfully Conversion service:TagInfoMgr
-ClassIDSvc           INFO  getRegistryEntries: read 118 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARAlign-IOVDEP-00 for folder /LAR/Align
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LArBadChannelsBadChannels-IOVDEP-06 for folder /LAR/BadChannels/BadChannels
@@ -370,6 +367,7 @@ IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARIdentifier
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARElecCalibMCfSampl-G496-19213-FTFP_BERT_BIRK for folder /LAR/ElecCalibMC/fSampl
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARuA2MeV-Feb2011 for folder /LAR/ElecCalibMC/uA2MeV
 IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
+IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_CALO/OFLP200
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to CALOOflIdentifierCaloTTOnAttrIdMapAtlas-0001 for folder /CALO/Ofl/Identifier/CaloTTOnAttrIdMapAtlas
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to CALOOflIdentifierCaloTTOnOffIdMapAtlas-0002 for folder /CALO/Ofl/Identifier/CaloTTOnOffIdMapAtlas
@@ -482,8 +480,8 @@ LArBadFebCondAl...   INFO Read a total of 0 problematic febs from database
 LArBadFebCondAl...   INFO Recorded LArBadFebCont object with GoodFebs with EventRange {[0,l:0] - [4294967294,l:4294967294]} into Conditions Store
 LArBadFebCondAl...   INFO Read a total of 3 problematic febs from database
 LArBadFebCondAl...   INFO Recorded LArBadFebCont object with BadFebs with EventRange {[0,l:0] - [4294967294,l:4294967294]} into Conditions Store
-ClassIDSvc           INFO  getRegistryEntries: read 1123 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 130 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1157 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 138 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 1 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #2, run #1 1 events processed so far  <<<===
 LArTTCellMapCnv      INFO initialize()
@@ -512,8 +510,6 @@ AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 2 events pr
 /cvmfs/atlas-co...   INFO Database being retired...
 /cvmfs/atlas-co...   INFO Database being retired...
 /cvmfs/atlas-co...   INFO Database being retired...
-Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] EC2448FE-EFE2-DD11-80D3-000423D98B8C
-/cvmfs/atlas-co...   INFO Database being retired...
 /cvmfs/atlas-co...   INFO Database being retired...
 /cvmfs/atlas-co...   INFO Database being retired...
 /cvmfs/atlas-co...   INFO Database being retired...
@@ -524,6 +520,8 @@ Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] EC2448F
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] CE5211E9-F51F-DC11-87A7-000423D6460E
 /cvmfs/atlas-co...   INFO Database being retired...
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] B2E3B2B6-B76C-DF11-A505-000423D5ADDA
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] EC2448FE-EFE2-DD11-80D3-000423D98B8C
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
 ApplicationMgr       INFO Application Manager Stopped successfully
 IncidentProcAlg1     INFO Finalize
@@ -532,43 +530,43 @@ testalg1             INFO Finalizing testalg1...
 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 /LAR/BadChannels/BadChannels (AttrListColl) db-read 1/1 objs/chan/bytes 0/8/0 ((     0.01 ))s
-IOVDbFolder          INFO Folder /LAR/BadChannels/MissingFEBs (AttrList) db-read 1/1 objs/chan/bytes 1/1/16 ((     0.01 ))s
-IOVDbFolder          INFO Folder /LAR/CellCorrOfl/deadOTX (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/705 ((     0.01 ))s
-IOVDbFolder          INFO Folder /LAR/Identifier/CalibIdMap (AttrList) db-read 1/2 objs/chan/bytes 1/1/1520148 ((     0.01 ))s
+IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.25 ))s
+IOVDbFolder          INFO Folder /LAR/BadChannels/BadChannels (AttrListColl) db-read 1/1 objs/chan/bytes 0/8/0 ((     0.03 ))s
+IOVDbFolder          INFO Folder /LAR/BadChannels/MissingFEBs (AttrList) db-read 1/1 objs/chan/bytes 1/1/16 ((     0.02 ))s
+IOVDbFolder          INFO Folder /LAR/CellCorrOfl/deadOTX (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/705 ((     0.02 ))s
+IOVDbFolder          INFO Folder /LAR/Identifier/CalibIdMap (AttrList) db-read 1/2 objs/chan/bytes 1/1/1520148 ((     0.02 ))s
 IOVDbFolder          INFO Folder /LAR/Identifier/FebRodMap (AttrList) db-read 1/2 objs/chan/bytes 1/1/6100 ((     0.01 ))s
-IOVDbFolder          INFO Folder /LAR/Identifier/OnOffIdMap (AttrList) db-read 1/2 objs/chan/bytes 1/1/780292 ((     0.02 ))s
-IOVDbFolder          INFO Folder /CALO/Ofl/Identifier/CaloTTOnAttrIdMapAtlas (PoolRef) db-read 1/1 objs/chan/bytes 1/1/183 ((     0.03 ))s
-IOVDbFolder          INFO Folder /CALO/Ofl/Identifier/CaloTTOnOffIdMapAtlas (PoolRef) db-read 1/1 objs/chan/bytes 1/1/181 ((     0.02 ))s
-IOVDbFolder          INFO Folder /CALO/Ofl/Identifier/CaloTTPpmRxIdMapAtlas (PoolRef) db-read 1/1 objs/chan/bytes 1/1/181 ((     0.02 ))s
-IOVDbFolder          INFO Folder /LAR/ElecCalibMC/AutoCorr (PoolRefColl) db-read 1/1 objs/chan/bytes 3/3/486 ((     0.02 ))s
+IOVDbFolder          INFO Folder /LAR/Identifier/OnOffIdMap (AttrList) db-read 1/2 objs/chan/bytes 1/1/780292 ((     0.03 ))s
+IOVDbFolder          INFO Folder /CALO/Ofl/Identifier/CaloTTOnAttrIdMapAtlas (PoolRef) db-read 1/1 objs/chan/bytes 1/1/183 ((     0.05 ))s
+IOVDbFolder          INFO Folder /CALO/Ofl/Identifier/CaloTTOnOffIdMapAtlas (PoolRef) db-read 1/1 objs/chan/bytes 1/1/181 ((     0.03 ))s
+IOVDbFolder          INFO Folder /CALO/Ofl/Identifier/CaloTTPpmRxIdMapAtlas (PoolRef) db-read 1/1 objs/chan/bytes 1/1/181 ((     0.03 ))s
+IOVDbFolder          INFO Folder /LAR/ElecCalibMC/AutoCorr (PoolRefColl) db-read 1/1 objs/chan/bytes 3/3/486 ((     0.01 ))s
 IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.01 ))s
 IOVDbFolder          INFO Folder /LAR/ElecCalibMC/DAC2uA (PoolRefColl) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.01 ))s
-IOVDbFolder          INFO Folder /LAR/ElecCalibMC/HVScaleCorr (PoolRefColl) db-read 1/1 objs/chan/bytes 12/12/1980 ((     0.01 ))s
+IOVDbFolder          INFO Folder /LAR/ElecCalibMC/HVScaleCorr (PoolRefColl) db-read 1/1 objs/chan/bytes 12/12/1980 ((     0.02 ))s
 IOVDbFolder          INFO Folder /LAR/ElecCalibMC/MinBias (PoolRefColl) db-read 1/1 objs/chan/bytes 1/1/174 ((     0.02 ))s
-IOVDbFolder          INFO Folder /LAR/ElecCalibMC/MinBiasAverage (PoolRefColl) db-read 1/1 objs/chan/bytes 1/1/181 ((     0.01 ))s
+IOVDbFolder          INFO Folder /LAR/ElecCalibMC/MinBiasAverage (PoolRefColl) db-read 1/1 objs/chan/bytes 1/1/181 ((     0.02 ))s
 IOVDbFolder          INFO Folder /LAR/ElecCalibMC/MphysOverMcal (PoolRefColl) db-read 1/1 objs/chan/bytes 3/3/516 ((     0.02 ))s
 IOVDbFolder          INFO Folder /LAR/ElecCalibMC/Noise (PoolRefColl) db-read 1/1 objs/chan/bytes 3/3/516 ((     0.02 ))s
-IOVDbFolder          INFO Folder /LAR/ElecCalibMC/Pedestal (PoolRef) db-read 1/1 objs/chan/bytes 1/1/167 ((     0.01 ))s
+IOVDbFolder          INFO Folder /LAR/ElecCalibMC/Pedestal (PoolRef) db-read 1/1 objs/chan/bytes 1/1/167 ((     0.02 ))s
 IOVDbFolder          INFO Folder /LAR/ElecCalibMC/Ramp (PoolRefColl) db-read 1/1 objs/chan/bytes 3/3/489 ((     0.01 ))s
-IOVDbFolder          INFO Folder /LAR/ElecCalibMC/Shape (PoolRefColl) db-read 1/1 objs/chan/bytes 3/3/477 ((     0.01 ))s
+IOVDbFolder          INFO Folder /LAR/ElecCalibMC/Shape (PoolRefColl) db-read 1/1 objs/chan/bytes 3/3/477 ((     0.02 ))s
 IOVDbFolder          INFO Folder /LAR/Identifier/LArTTCellMapAtlas (PoolRef) db-read 1/1 objs/chan/bytes 1/1/173 ((     0.01 ))s
-IOVDbFolder          INFO Folder /LAR/ElecCalibMC/fSampl (PoolRefColl) db-read 1/1 objs/chan/bytes 1/1/194 ((     0.01 ))s
+IOVDbFolder          INFO Folder /LAR/ElecCalibMC/fSampl (PoolRefColl) db-read 1/1 objs/chan/bytes 1/1/194 ((     0.22 ))s
 IOVDbFolder          INFO Folder /LAR/ElecCalibMC/uA2MeV (PoolRefColl) db-read 1/1 objs/chan/bytes 1/1/165 ((     0.02 ))s
-IOVDbSvc             INFO  bytes in ((      0.38 ))s
+IOVDbSvc             INFO  bytes in ((      0.92 ))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: 21 ReadTime: ((     0.32 ))s
-IOVDbSvc             INFO Connection COOLOFL_CALO/OFLP200 : nConnect: 2 nFolders: 3 ReadTime: ((     0.07 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 21 ReadTime: ((     0.81 ))s
+IOVDbSvc             INFO Connection COOLOFL_CALO/OFLP200 : nConnect: 2 nFolders: 3 ReadTime: ((     0.11 ))s
 AthDictLoaderSvc     INFO in finalize...
 ToolSvc              INFO Removing all tools created by ToolSvc
 ToolSvc.CaloTri...   INFO  => CaloTriggerTowerService::finalize() 
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot= 0.53  [s] Ave/Min/Max=  0.0139(+-   0.064)/       0/     0.4  [s] #= 38
-cObj_ALL             INFO Time User   : Tot= 0.76  [s] Ave/Min/Max=  0.0317(+-  0.0842)/       0/    0.41  [s] #= 24
-ChronoStatSvc        INFO Time User   : Tot=   49  [s]  #=  1
+cObjR_ALL            INFO Time User   : Tot= 0.68  [s] Ave/Min/Max=  0.0179(+-  0.0833)/       0/    0.52  [s] #= 38
+cObj_ALL             INFO Time User   : Tot= 0.94  [s] Ave/Min/Max=  0.0392(+-   0.113)/       0/    0.55  [s] #= 24
+ChronoStatSvc        INFO Time User   : Tot= 54.7  [s]  #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/LArCalorimeter/LArRecUtils/share/LArFCalTowerBuilderTool.ref b/LArCalorimeter/LArRecUtils/share/LArFCalTowerBuilderTool.ref
index 21955d2c176f..60fcbe73332a 100644
--- a/LArCalorimeter/LArRecUtils/share/LArFCalTowerBuilderTool.ref
+++ b/LArCalorimeter/LArRecUtils/share/LArFCalTowerBuilderTool.ref
@@ -1,16 +1,16 @@
-Tue Aug  6 20:57:27 CEST 2019
+Tue Oct  6 19:49:20 CEST 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.3] [x86_64-centos7-gcc8-opt] [atlas-work3/da00b53be39] -- built on [2019-08-06T2037]
+Py:Athena            INFO using release [WorkDir-22.0.19] [x86_64-centos7-gcc8-opt] [master-refs/ea3e66422c4] -- built on [2020-10-06T1923]
 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 "LArRecUtils/LArFCalTowerBuilderTool_test.py"
-SetGeometryVersion.py obtained major release version 22
+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 5520 configurables from 75 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 10 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.3
+EventInfoMgtInit: Got release version  Athena-22.0.19
 Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
 Py:Athena            INFO including file "CaloIdCnv/CaloIdCnv_joboptions.py"
 Py:Athena            INFO including file "CaloConditions/CaloConditions_jobOptions.py"
@@ -18,28 +18,23 @@ Py:Athena            INFO including file "CaloConditions/LArTTCellMap_ATLAS_jobO
 Py:Athena            INFO including file "CaloConditions/CaloTTIdMap_ATLAS_jobOptions.py"
 Py:Athena            INFO including file "TileIdCnv/TileIdCnv_jobOptions.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
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r0)
-                                          running on lxplus724.cern.ch on Tue Aug  6 20:57:37 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on aibuild028.cern.ch on Tue Oct  6 19:49:32 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 3542 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3586 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
-AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 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-08-05T2130/Athena/22.0.3/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host lxplus724.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -49,13 +44,14 @@ PoolSvc              INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.x
 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
+OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
 IOVDbSvc             INFO Cache alignment will be done in 3 slices
 IOVDbSvc             INFO Global tag: OFLCOND-SDR-BS14T-IBL-06 set from joboptions
 IOVDbFolder          INFO Read from meta data only for folder /TagInfo
 IOVDbSvc             INFO Initialised with 3 connections and 7 folders
 IOVDbSvc             INFO Service IOVDbSvc initialised successfully
+ClassIDSvc           INFO  getRegistryEntries: read 1629 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found.
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
@@ -69,9 +65,9 @@ IOVDbSvc             INFO Added taginfo remove for /CALO/Ofl/Identifier/CaloTTOn
 IOVDbSvc             INFO Added taginfo remove for /CALO/Ofl/Identifier/CaloTTPpmRxIdMapAtlas
 IOVDbSvc             INFO Added taginfo remove for /LAR/LArCellPositionShift
 IOVDbSvc             INFO Added taginfo remove for /LAR/Identifier/LArTTCellMapAtlas
-ClassIDSvc           INFO  getRegistryEntries: read 2165 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 17 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 287 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 273 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 26 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 243 CLIDRegistry entries for module ALL
 DetDescrCnvSvc       INFO  initializing 
 DetDescrCnvSvc       INFO Found DetectorStore service
 DetDescrCnvSvc       INFO  filling proxies for detector managers 
@@ -106,8 +102,6 @@ DetDescrCnvSvc       INFO  filling address for MDTIDHELPER with CLID 4170 and st
 DetDescrCnvSvc       INFO  filling address for CSCIDHELPER with CLID 4171 and storage type 68 to detector store 
 DetDescrCnvSvc       INFO  filling address for RPCIDHELPER with CLID 4172 and storage type 68 to detector store 
 DetDescrCnvSvc       INFO  filling address for TGCIDHELPER with CLID 4173 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for STGCIDHELPER with CLID 4174 and storage type 68 to detector store 
-DetDescrCnvSvc       INFO  filling address for MMIDHELPER with CLID 4175 and storage type 68 to detector store 
 DetDescrCnvSvc       INFO  filling address for CaloLVL1_ID with CLID 108133391 and storage type 68 to detector store 
 DetDescrCnvSvc       INFO  filling address for CaloCell_ID with CLID 123500438 and storage type 68 to detector store 
 DetDescrCnvSvc       INFO  filling address for CaloCell_SuperCell_ID with CLID 128365736 and storage type 68 to detector store 
@@ -158,7 +152,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 5934 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 6007 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
@@ -176,7 +170,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-08-05T2130/Athena/22.0.3/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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
@@ -188,39 +182,38 @@ 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-08-05T2130/Athena/22.0.3/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-08-05T2130/Athena/22.0.3/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-08-05T2130/Athena/22.0.3/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
 CaloIDHelper_ID...   INFO in createObj: creating a LArMiniFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 LArMiniFCAL_ID       INFO  initialize_from_dict - LArCalorimeter dictionary does NOT contain miniFCAL description. Unable to initialize LArMiniFCAL_ID.
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 TileDetDescrMan...   INFO Entering create_elements()
-ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 67 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 CondInputLoader      INFO Initializing CondInputLoader...
 CondInputLoader      INFO Adding base classes:
 CondInputLoader      INFO Will create WriteCondHandle dependencies for the following DataObjects:
-ClassIDSvc           INFO  getRegistryEntries: read 6852 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 7305 CLIDRegistry entries for module ALL
 ToolSvc.LArFCal...   INFO CaloTowerBuilder for the FCal initiated
-HistogramPersis...WARNING Histograms saving not required.
 ApplicationMgr       INFO Application Manager Initialized successfully
 ApplicationMgr       INFO Application Manager Started successfully
 AthenaEventLoopMgr   INFO   ===>>>  start of run 1    <<<===
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 EventPersistenc...   INFO Added successfully Conversion service:TagInfoMgr
-ClassIDSvc           INFO  getRegistryEntries: read 109 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVDbFolder          INFO HVS tag OFLCOND-SDR-BS14T-IBL-06 resolved to LARAlign-mc11-00 for folder /LAR/Align
 IOVDbFolder          INFO HVS tag OFLCOND-SDR-BS14T-IBL-06 resolved to LArCellPositionShift-ideal for folder /LAR/LArCellPositionShift
 IOVDbFolder          INFO HVS tag OFLCOND-SDR-BS14T-IBL-06 resolved to LARIdentifierLArTTCellMapAtlas-HadFcalFix2 for folder /LAR/Identifier/LArTTCellMapAtlas
 IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
+IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 06C9EAE8-6F5B-E011-BAAA-003048F0E7AC
 Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root
 RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root File version:52200
 CaloMgrDetDescrCnv   INFO in createObj: creating a Calo Detector Manager object in the detector store
 CaloIdMgrDetDes...   INFO in createObj: creating a CaloDescrManager object in the detector store
-ClassIDSvc           INFO  getRegistryEntries: read 195 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 201 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a CaloDM_ID helper object in the detector store
 CaloDM_ID            INFO initialize_from_dictionary
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -237,12 +230,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-08-05T2130/Athena/22.0.3/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-08-05T2130/Athena/22.0.3/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-08-05T2130/Athena/22.0.3/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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-08-05T2130/Athena/22.0.3/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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 
@@ -6663,25 +6656,25 @@ IncidentProcAlg1     INFO Finalize
 CondInputLoader      INFO Finalizing CondInputLoader...
 IncidentProcAlg2     INFO Finalize
 IdDictDetDescrCnv    INFO in finalize
-IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.13 ))s
+IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.04 ))s
 IOVDbFolder          INFO Folder /CALO/Ofl/Identifier/CaloTTOnAttrIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 ((     0.00 ))s
 IOVDbFolder          INFO Folder /CALO/Ofl/Identifier/CaloTTOnOffIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 ((     0.00 ))s
 IOVDbFolder          INFO Folder /CALO/Ofl/Identifier/CaloTTPpmRxIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 ((     0.00 ))s
-IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.03 ))s
+IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.02 ))s
 IOVDbFolder          INFO Folder /LAR/Identifier/LArTTCellMapAtlas (PoolRef) db-read 1/0 objs/chan/bytes 1/1/173 ((     0.02 ))s
 IOVDbFolder       WARNING Folder /LAR/Identifier/LArTTCellMapAtlas is requested but no data retrieved
-IOVDbSvc             INFO  bytes in ((      0.17 ))s
+IOVDbSvc             INFO  bytes in ((      0.07 ))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: 3 ReadTime: ((     0.17 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 3 ReadTime: ((     0.07 ))s
 IOVDbSvc             INFO Connection COOLOFL_CALO/OFLP200 : nConnect: 1 nFolders: 3 ReadTime: ((     0.00 ))s
 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 ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot=  330 [ms] Ave/Min/Max=  165(+-  155)/   10/  320 [ms] #=  2
-cObj_ALL             INFO Time User   : Tot=  390 [ms] Ave/Min/Max=  195(+-  175)/   20/  370 [ms] #=  2
-ChronoStatSvc        INFO Time User   : Tot= 2.41  [s]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot=  0.5  [s] Ave/Min/Max=    0.25(+-    0.25)/       0/     0.5  [s] #=  2
+cObj_ALL             INFO Time User   : Tot= 0.55  [s] Ave/Min/Max=   0.275(+-   0.265)/    0.01/    0.54  [s] #=  2
+ChronoStatSvc        INFO Time User   : Tot= 2.55  [s]  #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/LArCalorimeter/LArTest/LArConditionsTest/share/LArConditionsTest.ref b/LArCalorimeter/LArTest/LArConditionsTest/share/LArConditionsTest.ref
index 6cf04029d418..9dc169f72014 100644
--- a/LArCalorimeter/LArTest/LArConditionsTest/share/LArConditionsTest.ref
+++ b/LArCalorimeter/LArTest/LArConditionsTest/share/LArConditionsTest.ref
@@ -1,7 +1,7 @@
-Fri Jun 19 19:05:25 CEST 2020
+Tue Oct  6 19:50:02 CEST 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [master/b9ffea6f446] -- built on [2020-06-18T1816]
+Py:Athena            INFO using release [WorkDir-22.0.19] [x86_64-centos7-gcc8-opt] [master-refs/ea3e66422c4] -- built on [2020-10-06T1923]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
@@ -11,9 +11,9 @@ Py:Athena            INFO including file "AtlasGeoModel/SetGeometryVersion.py"
 AtlasGeoModel/SetGeometryVersion.py is OBSOLETE
 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 5534 configurables from 58 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 10 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.15
+EventInfoMgtInit: Got release version  Athena-22.0.19
 Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
 Py:Athena            INFO including file "LArRawConditions/LArIdMap_ATLAS_jobOptions.py"
 Py:Athena            INFO including file "LArConditionsCommon/LArIdMap_MC_jobOptions.py"
@@ -30,26 +30,22 @@ Py:Athena            INFO including file "CaloDetMgrDetDescrCnv/CaloDetMgrDetDes
 Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
 Py:Athena            INFO including file "LArCondAthenaPool/LArCondAthenaPool_joboptions.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
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
-                                          running on aibuild20-040.cern.ch on Fri Jun 19 19:05:48 2020
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on aibuild028.cern.ch on Tue Oct  6 19:50: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 3634 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3586 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
-AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
 DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-06-18T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host aibuild20-040.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -60,7 +56,6 @@ DbSession            INFO     Open     DbSession
 Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
 MetaDataSvc          INFO Found MetaDataTools = PublicToolHandleArray([])
 OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
-IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
 IOVDbSvc             INFO Cache alignment will be done in 3 slices
 IOVDbSvc             INFO Global tag: OFLCOND-CSC-00-01-00 set from joboptions
@@ -70,7 +65,7 @@ IOVDbSvc             INFO Folder /LAR/Identifier/FebRodMap, adding new key tag w
 IOVDbFolder          INFO Read from meta data only for folder /TagInfo
 IOVDbSvc             INFO Initialised with 3 connections and 10 folders
 IOVDbSvc             INFO Service IOVDbSvc initialised successfully
-ClassIDSvc           INFO  getRegistryEntries: read 1429 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1629 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found.
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
@@ -87,9 +82,9 @@ IOVDbSvc             INFO Added taginfo remove for /CALO/Ofl/Identifier/CaloTTOn
 IOVDbSvc             INFO Added taginfo remove for /CALO/Ofl/Identifier/CaloTTPpmRxIdMapAtlas
 IOVDbSvc             INFO Added taginfo remove for /LAR/LArCellPositionShift
 IOVDbSvc             INFO Added taginfo remove for /LAR/Identifier/LArTTCellMapAtlas
-ClassIDSvc           INFO  getRegistryEntries: read 268 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 24 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 239 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 273 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 26 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 243 CLIDRegistry entries for module ALL
 DetDescrCnvSvc       INFO  initializing 
 DetDescrCnvSvc       INFO Found DetectorStore service
 DetDescrCnvSvc       INFO  filling proxies for detector managers 
@@ -177,7 +172,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 6055 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 6117 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
@@ -195,7 +190,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_Athena_x86_64-centos7-gcc8-opt/2020-06-18T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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
@@ -207,17 +202,17 @@ 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_Athena_x86_64-centos7-gcc8-opt/2020-06-18T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-06-18T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-06-18T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
 CaloIDHelper_ID...   INFO in createObj: creating a LArMiniFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 LArMiniFCAL_ID       INFO  initialize_from_dict - LArCalorimeter dictionary does NOT contain miniFCAL description. Unable to initialize LArMiniFCAL_ID.
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 TileDetDescrMan...   INFO Entering create_elements()
-ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 67 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 7140 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 7305 CLIDRegistry entries for module ALL
 CondInputLoader      INFO Initializing CondInputLoader...
 CondInputLoader      INFO Adding base classes:
   +  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/CalibIdMap' )   ->
@@ -227,9 +222,9 @@ CondInputLoader      INFO Will create WriteCondHandle dependencies for the follo
     +  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/CalibIdMap' ) 
     +  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/FebRodMap' ) 
     +  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/OnOffIdMap' ) 
-ClassIDSvc           INFO  getRegistryEntries: read 440 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 452 CLIDRegistry entries for module ALL
 xAODMaker::Even...   INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 468 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 473 CLIDRegistry entries for module ALL
 xAODMaker::Even...   INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
 xAODMaker::Even...WARNING Beam conditions service not available
 xAODMaker::Even...WARNING Will not fill beam spot information into xAOD::EventInfo
@@ -259,12 +254,12 @@ ApplicationMgr       INFO Application Manager Started successfully
 AthenaEventLoopMgr   INFO   ===>>>  start of run 0    <<<===
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 EventPersistenc...   INFO Added successfully Conversion service:TagInfoMgr
-ClassIDSvc           INFO  getRegistryEntries: read 118 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVDbFolder          INFO HVS tag OFLCOND-CSC-00-01-00 resolved to LARAlign_CSC_01 for folder /LAR/Align
 IOVDbFolder          INFO HVS tag OFLCOND-CSC-00-01-00 resolved to LArCellPositionShift-ideal for folder /LAR/LArCellPositionShift
 IOVDbFolder          INFO HVS tag OFLCOND-CSC-00-01-00 resolved to LARIdentifierLArTTCellMapAtlas-HadFcalFix for folder /LAR/Identifier/LArTTCellMapAtlas
 IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
+IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
 Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] E01BD448-BF95-DB11-983E-0015C5098AA3
@@ -272,7 +267,7 @@ Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/r
 RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/oflcond/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0058.pool.root File version:51304
 CaloMgrDetDescrCnv   INFO in createObj: creating a Calo Detector Manager object in the detector store
 CaloIdMgrDetDes...   INFO in createObj: creating a CaloDescrManager object in the detector store
-ClassIDSvc           INFO  getRegistryEntries: read 196 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 200 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a CaloDM_ID helper object in the detector store
 CaloDM_ID            INFO initialize_from_dictionary
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -289,12 +284,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_Athena_x86_64-centos7-gcc8-opt/2020-06-18T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-06-18T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-06-18T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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_Athena_x86_64-centos7-gcc8-opt/2020-06-18T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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 
@@ -6904,28 +6899,28 @@ CondInputLoader      INFO Finalizing CondInputLoader...
 IncidentProcAlg2     INFO Finalize
 EventSelector        INFO finalize
 IdDictDetDescrCnv    INFO in finalize
-IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 5/1 objs/chan/bytes 5/1/840 ((    11.11 ))s
-IOVDbFolder          INFO Folder /LAR/Identifier/CalibIdMap (AttrList) db-read 5/1 objs/chan/bytes 5/1/7600740 ((     7.42 ))s
-IOVDbFolder          INFO Folder /LAR/Identifier/FebRodMap (AttrList) db-read 5/1 objs/chan/bytes 5/1/30500 ((     6.24 ))s
-IOVDbFolder          INFO Folder /LAR/Identifier/OnOffIdMap (AttrList) db-read 5/1 objs/chan/bytes 5/1/3901460 ((    20.03 ))s
+IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 5/1 objs/chan/bytes 5/1/840 ((     0.12 ))s
+IOVDbFolder          INFO Folder /LAR/Identifier/CalibIdMap (AttrList) db-read 5/1 objs/chan/bytes 5/1/7600740 ((     0.06 ))s
+IOVDbFolder          INFO Folder /LAR/Identifier/FebRodMap (AttrList) db-read 5/1 objs/chan/bytes 5/1/30500 ((     0.03 ))s
+IOVDbFolder          INFO Folder /LAR/Identifier/OnOffIdMap (AttrList) db-read 5/1 objs/chan/bytes 5/1/3901460 ((     0.08 ))s
 IOVDbFolder          INFO Folder /CALO/Ofl/Identifier/CaloTTOnAttrIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 ((     0.00 ))s
 IOVDbFolder          INFO Folder /CALO/Ofl/Identifier/CaloTTOnOffIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 ((     0.00 ))s
 IOVDbFolder          INFO Folder /CALO/Ofl/Identifier/CaloTTPpmRxIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 ((     0.00 ))s
-IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 2/1 objs/chan/bytes 2/1/390 ((     2.01 ))s
-IOVDbFolder          INFO Folder /LAR/Identifier/LArTTCellMapAtlas (PoolRef) db-read 5/0 objs/chan/bytes 5/1/865 ((     5.96 ))s
+IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 2/1 objs/chan/bytes 2/1/390 ((     0.02 ))s
+IOVDbFolder          INFO Folder /LAR/Identifier/LArTTCellMapAtlas (PoolRef) db-read 5/0 objs/chan/bytes 5/1/865 ((     0.04 ))s
 IOVDbFolder       WARNING Folder /LAR/Identifier/LArTTCellMapAtlas is requested but no data retrieved
-IOVDbSvc             INFO  bytes in ((     52.77 ))s
+IOVDbSvc             INFO  bytes in ((      0.35 ))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: 6 nFolders: 6 ReadTime: ((    52.77 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 6 nFolders: 6 ReadTime: ((     0.35 ))s
 IOVDbSvc             INFO Connection COOLOFL_CALO/OFLP200 : nConnect: 1 nFolders: 3 ReadTime: ((     0.00 ))s
 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 ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot=  480 [ms] Ave/Min/Max=  240(+-  220)/   20/  460 [ms] #=  2
-cObj_ALL             INFO Time User   : Tot= 0.56  [s] Ave/Min/Max=0.112(+-0.205)/    0/ 0.52  [s] #=  5
-ChronoStatSvc        INFO Time User   : Tot= 3.22  [s]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot=  490 [ms] Ave/Min/Max=     245(+-     225)/      20/     470 [ms] #=  2
+cObj_ALL             INFO Time User   : Tot= 0.56  [s] Ave/Min/Max=   0.112(+-   0.209)/       0/    0.53  [s] #=  5
+ChronoStatSvc        INFO Time User   : Tot= 3.49  [s]  #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/LArCalorimeter/LArTest/LArConditionsTest/share/LArConditionsTestReadNoReg.ref b/LArCalorimeter/LArTest/LArConditionsTest/share/LArConditionsTestReadNoReg.ref
index 5fdc0c5dc44b..09f0b67af928 100644
--- a/LArCalorimeter/LArTest/LArConditionsTest/share/LArConditionsTestReadNoReg.ref
+++ b/LArCalorimeter/LArTest/LArConditionsTest/share/LArConditionsTestReadNoReg.ref
@@ -1,7 +1,7 @@
-Fri Jun 19 19:12:26 CEST 2020
+Tue Oct  6 19:51:07 CEST 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [master/b9ffea6f446] -- built on [2020-06-18T1816]
+Py:Athena            INFO using release [WorkDir-22.0.19] [x86_64-centos7-gcc8-opt] [master-refs/ea3e66422c4] -- built on [2020-10-06T1923]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
@@ -11,9 +11,9 @@ Py:Athena            INFO including file "AtlasGeoModel/SetGeometryVersion.py"
 AtlasGeoModel/SetGeometryVersion.py is OBSOLETE
 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 5534 configurables from 58 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 10 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.15
+EventInfoMgtInit: Got release version  Athena-22.0.19
 Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
 Py:Athena            INFO including file "LArRawConditions/LArIdMap_ATLAS_jobOptions.py"
 Py:Athena            INFO including file "LArConditionsCommon/LArIdMap_MC_jobOptions.py"
@@ -32,26 +32,22 @@ Py:Athena            INFO including file "LArCondAthenaPool/LArCondAthenaPool_jo
 Py:Athena            INFO including file "AthenaPoolServices/AthenaRootStreamerSvc_jobOptions.py"
 Py:Athena            INFO including file "AthenaPoolCnvSvc/AthenaPool_jobOptions.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
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
-                                          running on aibuild20-040.cern.ch on Fri Jun 19 19:12:42 2020
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on aibuild028.cern.ch on Tue Oct  6 19:51:17 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 3634 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3586 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
-AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
 DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-06-18T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host aibuild20-040.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -62,7 +58,6 @@ DbSession            INFO     Open     DbSession
 Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
 MetaDataSvc          INFO Found MetaDataTools = PublicToolHandleArray([])
 OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
-IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
 IOVDbSvc             INFO Cache alignment will be done in 3 slices
 IOVDbSvc             INFO Global tag: OFLCOND-CSC-00-01-00 set from joboptions
@@ -73,10 +68,29 @@ IOVDbFolder          INFO Read from meta data only for folder /TagInfo
 IOVDbSvc             INFO Initialised with 3 connections and 10 folders
 IOVDbSvc             INFO Service IOVDbSvc initialised successfully
 CondProxyProvider    INFO Initializing CondProxyProvider - package version EventSelectorAthenaPool-00-00-00
-Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] A6B968DB-9C78-4148-9C5C-A41979AF763A
+PoolSvc              INFO File is not in Catalog! Attempt to open it anyway.
+DbSession            INFO     Open     DbSession    
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 99993A5D-2110-B45C-8015-27A23799B9A5
+Domain[ROOT_All]     INFO                           LarCondTestNoReg.root
+RootDatabase.open    INFO LarCondTestNoReg.root File version:62200
+LarCondTestNoRe...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 99993A5D-2110-B45C-8015-27A23799B9A5
+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] 99993A5D-2110-B45C-8015-27A23799B9A5
 Domain[ROOT_All]     INFO                           LarCondTestNoReg.root
-RootDatabase.open    INFO LarCondTestNoReg.root File version:62002
-ClassIDSvc           INFO  getRegistryEntries: read 4078 CLIDRegistry entries for module ALL
+RootDatabase.open    INFO LarCondTestNoReg.root File version:62200
+LarCondTestNoRe...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 99993A5D-2110-B45C-8015-27A23799B9A5
+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] AD51FB41-BEBD-D549-A173-BDBAE85C2199
+Domain[ROOT_All]     INFO                           LarCondTestNoReg.root
+RootDatabase.open    INFO LarCondTestNoReg.root File version:62200
+ClassIDSvc           INFO  getRegistryEntries: read 4365 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found.
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
@@ -94,9 +108,9 @@ IOVDbSvc             INFO Added taginfo remove for /CALO/Ofl/Identifier/CaloTTPp
 IOVDbSvc             INFO Added taginfo remove for /LAR/LArCellPositionShift
 IOVDbSvc             INFO Added taginfo remove for /LAR/Identifier/LArTTCellMapAtlas
 LarCondTestNoRe...   INFO Database being retired...
-Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] A6B968DB-9C78-4148-9C5C-A41979AF763A
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] AD51FB41-BEBD-D549-A173-BDBAE85C2199
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
-ClassIDSvc           INFO  getRegistryEntries: read 268 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 273 CLIDRegistry entries for module ALL
 EventPersistenc...   INFO Added successfully Conversion service:McCnvSvc
 DetDescrCnvSvc       INFO  initializing 
 DetDescrCnvSvc       INFO Found DetectorStore service
@@ -141,12 +155,12 @@ EventPersistenc...   INFO Added successfully Conversion service:DetDescrCnvSvc
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 DbSession            INFO     Open     DbSession    
 Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] A6B968DB-9C78-4148-9C5C-A41979AF763A
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] AD51FB41-BEBD-D549-A173-BDBAE85C2199
 Domain[ROOT_All]     INFO                           LarCondTestNoReg.root
-RootDatabase.open    INFO LarCondTestNoReg.root File version:62002
-ClassIDSvc           INFO  getRegistryEntries: read 161 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 18 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 35 CLIDRegistry entries for module ALL
+RootDatabase.open    INFO LarCondTestNoReg.root File version:62200
+ClassIDSvc           INFO  getRegistryEntries: read 163 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 20 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 39 CLIDRegistry entries for module ALL
 GeoModelSvc::RD...WARNING  Getting PixTBMatComponents with default tag
 GeoModelSvc::RD...WARNING  Getting PixTBMaterials with default tag
 GeoModelSvc::RD...WARNING  Getting InDetMatComponents with default tag
@@ -193,7 +207,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 5545 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 5595 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
@@ -211,7 +225,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_Athena_x86_64-centos7-gcc8-opt/2020-06-18T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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
@@ -223,17 +237,17 @@ 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_Athena_x86_64-centos7-gcc8-opt/2020-06-18T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-06-18T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-06-18T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
 CaloIDHelper_ID...   INFO in createObj: creating a LArMiniFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 LArMiniFCAL_ID       INFO  initialize_from_dict - LArCalorimeter dictionary does NOT contain miniFCAL description. Unable to initialize LArMiniFCAL_ID.
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 TileDetDescrMan...   INFO Entering create_elements()
-ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 67 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 5548 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 5651 CLIDRegistry entries for module ALL
 CondInputLoader      INFO Initializing CondInputLoader...
 CondInputLoader      INFO Adding base classes:
   +  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/CalibIdMap' )   ->
@@ -243,9 +257,9 @@ CondInputLoader      INFO Will create WriteCondHandle dependencies for the follo
     +  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/CalibIdMap' ) 
     +  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/FebRodMap' ) 
     +  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/OnOffIdMap' ) 
-ClassIDSvc           INFO  getRegistryEntries: read 440 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 452 CLIDRegistry entries for module ALL
 xAODMaker::Even...   INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 468 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 473 CLIDRegistry entries for module ALL
 xAODMaker::Even...   INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
 xAODMaker::Even...WARNING Beam conditions service not available
 xAODMaker::Even...WARNING Will not fill beam spot information into xAOD::EventInfo
@@ -274,12 +288,12 @@ CondInputLoader      INFO created CondCont<AthenaAttributeList> with key 'Condit
 ApplicationMgr       INFO Application Manager Started successfully
 AthenaEventLoopMgr   INFO   ===>>>  start of run 0    <<<===
 EventPersistenc...   INFO Added successfully Conversion service:TagInfoMgr
-ClassIDSvc           INFO  getRegistryEntries: read 118 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVDbFolder          INFO HVS tag OFLCOND-CSC-00-01-00 resolved to LARAlign_CSC_01 for folder /LAR/Align
 IOVDbFolder          INFO HVS tag OFLCOND-CSC-00-01-00 resolved to LArCellPositionShift-ideal for folder /LAR/LArCellPositionShift
 IOVDbFolder          INFO HVS tag OFLCOND-CSC-00-01-00 resolved to LARIdentifierLArTTCellMapAtlas-HadFcalFix for folder /LAR/Identifier/LArTTCellMapAtlas
 IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
+IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
 Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] E01BD448-BF95-DB11-983E-0015C5098AA3
@@ -287,7 +301,7 @@ Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/r
 RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/oflcond/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0058.pool.root File version:51304
 CaloMgrDetDescrCnv   INFO in createObj: creating a Calo Detector Manager object in the detector store
 CaloIdMgrDetDes...   INFO in createObj: creating a CaloDescrManager object in the detector store
-ClassIDSvc           INFO  getRegistryEntries: read 196 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 200 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a CaloDM_ID helper object in the detector store
 CaloDM_ID            INFO initialize_from_dictionary
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -304,12 +318,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_Athena_x86_64-centos7-gcc8-opt/2020-06-18T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-06-18T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-06-18T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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_Athena_x86_64-centos7-gcc8-opt/2020-06-18T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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 
@@ -6251,7 +6265,7 @@ LArConditionsTe...  DEBUG Total number of correction objects 20
 LArConditionsTe...  DEBUG End of testCondObjects 
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #0 1 events processed so far  <<<===
 LarCondTestNoRe...   INFO Database being retired...
-Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] A6B968DB-9C78-4148-9C5C-A41979AF763A
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] AD51FB41-BEBD-D549-A173-BDBAE85C2199
 /cvmfs/atlas-co...   INFO Database being retired...
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] E01BD448-BF95-DB11-983E-0015C5098AA3
 /cvmfs/atlas-co...   INFO Database being retired...
@@ -6263,28 +6277,28 @@ CondInputLoader      INFO Finalizing CondInputLoader...
 IncidentProcAlg2     INFO Finalize
 EventSelector        INFO finalize
 IdDictDetDescrCnv    INFO in finalize
-IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 5/1 objs/chan/bytes 5/1/840 ((     1.33 ))s
-IOVDbFolder          INFO Folder /LAR/Identifier/CalibIdMap (AttrList) db-read 5/1 objs/chan/bytes 5/1/7600740 ((     1.31 ))s
-IOVDbFolder          INFO Folder /LAR/Identifier/FebRodMap (AttrList) db-read 5/1 objs/chan/bytes 5/1/30500 ((     0.17 ))s
-IOVDbFolder          INFO Folder /LAR/Identifier/OnOffIdMap (AttrList) db-read 5/1 objs/chan/bytes 5/1/3901460 ((     0.76 ))s
+IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 5/1 objs/chan/bytes 5/1/840 ((     0.15 ))s
+IOVDbFolder          INFO Folder /LAR/Identifier/CalibIdMap (AttrList) db-read 5/1 objs/chan/bytes 5/1/7600740 ((     0.08 ))s
+IOVDbFolder          INFO Folder /LAR/Identifier/FebRodMap (AttrList) db-read 5/1 objs/chan/bytes 5/1/30500 ((     0.03 ))s
+IOVDbFolder          INFO Folder /LAR/Identifier/OnOffIdMap (AttrList) db-read 5/1 objs/chan/bytes 5/1/3901460 ((     0.11 ))s
 IOVDbFolder          INFO Folder /CALO/Ofl/Identifier/CaloTTOnAttrIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 ((     0.00 ))s
 IOVDbFolder          INFO Folder /CALO/Ofl/Identifier/CaloTTOnOffIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 ((     0.00 ))s
 IOVDbFolder          INFO Folder /CALO/Ofl/Identifier/CaloTTPpmRxIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 ((     0.00 ))s
-IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 2/1 objs/chan/bytes 2/1/390 ((     0.03 ))s
-IOVDbFolder          INFO Folder /LAR/Identifier/LArTTCellMapAtlas (PoolRef) db-read 5/0 objs/chan/bytes 5/1/865 ((     0.22 ))s
+IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 2/1 objs/chan/bytes 2/1/390 ((     0.04 ))s
+IOVDbFolder          INFO Folder /LAR/Identifier/LArTTCellMapAtlas (PoolRef) db-read 5/0 objs/chan/bytes 5/1/865 ((     0.25 ))s
 IOVDbFolder       WARNING Folder /LAR/Identifier/LArTTCellMapAtlas is requested but no data retrieved
-IOVDbSvc             INFO  bytes in ((      3.82 ))s
+IOVDbSvc             INFO  bytes in ((      0.65 ))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: 6 nFolders: 6 ReadTime: ((     3.82 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 6 nFolders: 6 ReadTime: ((     0.65 ))s
 IOVDbSvc             INFO Connection COOLOFL_CALO/OFLP200 : nConnect: 1 nFolders: 3 ReadTime: ((     0.00 ))s
 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 ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot=  300 [ms] Ave/Min/Max= 1.17(+- 18.1)/    0/  290 [ms] #=257
-cObj_ALL             INFO Time User   : Tot=  400 [ms] Ave/Min/Max= 44.4(+-  102)/    0/  330 [ms] #=  9
-ChronoStatSvc        INFO Time User   : Tot=  3.2  [s]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot=  370 [ms] Ave/Min/Max=    1.44(+-      23)/       0/     370 [ms] #=257
+cObj_ALL             INFO Time User   : Tot= 0.52  [s] Ave/Min/Max=  0.0578(+-   0.133)/       0/    0.43  [s] #=  9
+ChronoStatSvc        INFO Time User   : Tot= 4.04  [s]  #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/LArCalorimeter/LArTest/LArConditionsTest/share/LArConditionsTestWriteNoReg.ref b/LArCalorimeter/LArTest/LArConditionsTest/share/LArConditionsTestWriteNoReg.ref
index a039b9093546..9b5e40c3428f 100644
--- a/LArCalorimeter/LArTest/LArConditionsTest/share/LArConditionsTestWriteNoReg.ref
+++ b/LArCalorimeter/LArTest/LArConditionsTest/share/LArConditionsTestWriteNoReg.ref
@@ -1,7 +1,7 @@
-Fri Jun 19 19:10:37 CEST 2020
+Tue Oct  6 19:50:22 CEST 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [master/b9ffea6f446] -- built on [2020-06-18T1816]
+Py:Athena            INFO using release [WorkDir-22.0.19] [x86_64-centos7-gcc8-opt] [master-refs/ea3e66422c4] -- built on [2020-10-06T1923]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
@@ -11,9 +11,9 @@ Py:Athena            INFO including file "AtlasGeoModel/SetGeometryVersion.py"
 AtlasGeoModel/SetGeometryVersion.py is OBSOLETE
 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 5534 configurables from 58 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 10 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.15
+EventInfoMgtInit: Got release version  Athena-22.0.19
 Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
 Py:Athena            INFO including file "LArRawConditions/LArIdMap_ATLAS_jobOptions.py"
 Py:Athena            INFO including file "LArConditionsCommon/LArIdMap_MC_jobOptions.py"
@@ -31,26 +31,22 @@ Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_jo
 Py:Athena            INFO including file "LArCondAthenaPool/LArCondAthenaPool_joboptions.py"
 Py:Athena            INFO including file "LArCondAthenaPool/LArCondAthenaPool_joboptions.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
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
-                                          running on aibuild20-040.cern.ch on Fri Jun 19 19:10:55 2020
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on aibuild028.cern.ch on Tue Oct  6 19:50:33 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 3634 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3586 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
-AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
 DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-06-18T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host aibuild20-040.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -61,7 +57,6 @@ DbSession            INFO     Open     DbSession
 Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
 MetaDataSvc          INFO Found MetaDataTools = PublicToolHandleArray([])
 OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
-IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
 IOVDbSvc             INFO Cache alignment will be done in 3 slices
 IOVDbSvc             INFO Global tag: OFLCOND-CSC-00-01-00 set from joboptions
@@ -71,7 +66,7 @@ IOVDbSvc             INFO Folder /LAR/Identifier/FebRodMap, adding new key tag w
 IOVDbFolder          INFO Read from meta data only for folder /TagInfo
 IOVDbSvc             INFO Initialised with 3 connections and 10 folders
 IOVDbSvc             INFO Service IOVDbSvc initialised successfully
-ClassIDSvc           INFO  getRegistryEntries: read 1429 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1629 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found.
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
@@ -88,9 +83,9 @@ IOVDbSvc             INFO Added taginfo remove for /CALO/Ofl/Identifier/CaloTTOn
 IOVDbSvc             INFO Added taginfo remove for /CALO/Ofl/Identifier/CaloTTPpmRxIdMapAtlas
 IOVDbSvc             INFO Added taginfo remove for /LAR/LArCellPositionShift
 IOVDbSvc             INFO Added taginfo remove for /LAR/Identifier/LArTTCellMapAtlas
-ClassIDSvc           INFO  getRegistryEntries: read 268 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 24 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 239 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 273 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 26 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 243 CLIDRegistry entries for module ALL
 DetDescrCnvSvc       INFO  initializing 
 DetDescrCnvSvc       INFO Found DetectorStore service
 DetDescrCnvSvc       INFO  filling proxies for detector managers 
@@ -178,7 +173,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 6055 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 6117 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
@@ -196,7 +191,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_Athena_x86_64-centos7-gcc8-opt/2020-06-18T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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
@@ -208,17 +203,17 @@ 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_Athena_x86_64-centos7-gcc8-opt/2020-06-18T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-06-18T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-06-18T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
 CaloIDHelper_ID...   INFO in createObj: creating a LArMiniFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 LArMiniFCAL_ID       INFO  initialize_from_dict - LArCalorimeter dictionary does NOT contain miniFCAL description. Unable to initialize LArMiniFCAL_ID.
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 TileDetDescrMan...   INFO Entering create_elements()
-ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 67 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 7140 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 7305 CLIDRegistry entries for module ALL
 CondInputLoader      INFO Initializing CondInputLoader...
 CondInputLoader      INFO Adding base classes:
   +  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/CalibIdMap' )   ->
@@ -228,9 +223,9 @@ CondInputLoader      INFO Will create WriteCondHandle dependencies for the follo
     +  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/CalibIdMap' ) 
     +  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/FebRodMap' ) 
     +  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/OnOffIdMap' ) 
-ClassIDSvc           INFO  getRegistryEntries: read 440 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 452 CLIDRegistry entries for module ALL
 xAODMaker::Even...   INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 798 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 809 CLIDRegistry entries for module ALL
 xAODMaker::Even...   INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
 xAODMaker::Even...WARNING Beam conditions service not available
 xAODMaker::Even...WARNING Will not fill beam spot information into xAOD::EventInfo
@@ -261,12 +256,12 @@ ApplicationMgr       INFO Application Manager Started successfully
 AthenaEventLoopMgr   INFO   ===>>>  start of run 0    <<<===
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 EventPersistenc...   INFO Added successfully Conversion service:TagInfoMgr
-ClassIDSvc           INFO  getRegistryEntries: read 118 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVDbFolder          INFO HVS tag OFLCOND-CSC-00-01-00 resolved to LARAlign_CSC_01 for folder /LAR/Align
 IOVDbFolder          INFO HVS tag OFLCOND-CSC-00-01-00 resolved to LArCellPositionShift-ideal for folder /LAR/LArCellPositionShift
 IOVDbFolder          INFO HVS tag OFLCOND-CSC-00-01-00 resolved to LARIdentifierLArTTCellMapAtlas-HadFcalFix for folder /LAR/Identifier/LArTTCellMapAtlas
 IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
+IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
 Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] E01BD448-BF95-DB11-983E-0015C5098AA3
@@ -274,7 +269,7 @@ Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/r
 RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/oflcond/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0058.pool.root File version:51304
 CaloMgrDetDescrCnv   INFO in createObj: creating a Calo Detector Manager object in the detector store
 CaloIdMgrDetDes...   INFO in createObj: creating a CaloDescrManager object in the detector store
-ClassIDSvc           INFO  getRegistryEntries: read 196 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 200 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a CaloDM_ID helper object in the detector store
 CaloDM_ID            INFO initialize_from_dictionary
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -291,12 +286,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_Athena_x86_64-centos7-gcc8-opt/2020-06-18T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-06-18T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-06-18T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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_Athena_x86_64-centos7-gcc8-opt/2020-06-18T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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 
@@ -6906,10 +6901,10 @@ CondInputLoader      INFO Finalizing CondInputLoader...
 OutputCondition...   INFO Finalize: preparing to write conditions objects 
 DbSession            INFO     Open     DbSession    
 Domain[ROOT_All]     INFO >   Access   DbDomain     UPDATE    [ROOT_All] 
-Domain[ROOT_All]     INFO ->  Access   DbDatabase   CREATE    [ROOT_All] A6B968DB-9C78-4148-9C5C-A41979AF763A
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   CREATE    [ROOT_All] AD51FB41-BEBD-D549-A173-BDBAE85C2199
 Domain[ROOT_All]     INFO                           LarCondTestNoReg.root
-RootDatabase.open    INFO LarCondTestNoReg.root File version:62002
-ClassIDSvc           INFO  getRegistryEntries: read 33 CLIDRegistry entries for module ALL
+RootDatabase.open    INFO LarCondTestNoReg.root File version:62200
+ClassIDSvc           INFO  getRegistryEntries: read 34 CLIDRegistry entries for module ALL
 OutputCondition...   INFO Identified a total of 3 objects to write out:
 OutputCondition...   INFO 0: LArRampMC#/LArCalorimeter/LArTests/LArRampsSingleGroup#/LArCalorimeter/LArTests/LArRampsSingleGroup
 OutputCondition...   INFO 1: LArRampMC#/LArCalorimeter/LArTests/LArRampsSubDetectorGrouping#/LArCalorimeter/LArTests/LArRampsSubDetectorGrouping
@@ -6925,44 +6920,46 @@ StorageSvc           INFO DataHeaderForm_p6 [7BE56CEF-C866-4BEE-9348-A5F34B5F1DA
 OutputCondition...   INFO Written 3 objects to output stream
 OutputCondition...   INFO Register objects in IOV database, interval of validity [run,LB] from [0,0] to [2147483647,4294967295]
 OutputCondition...   INFO Register object LArRampMC#/LArCalorimeter/LArTests/LArRampsSingleGroup in IOV database folder /LArCalorimeter/LArTests/LArRampsSingleGroup without tagging
-ClassIDSvc           INFO  getRegistryEntries: read 861 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 892 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO Opening COOL connection for sqlite://;schema=mycool.db;dbname=OFLP200
+IOVDbSvc             INFO *** COOL  exception caught: The database does not exist
+IOVDbSvc             INFO Create a new conditions database: sqlite://;schema=mycool.db;dbname=OFLP200
 OutputCondition...   INFO Register object LArRampMC#/LArCalorimeter/LArTests/LArRampsSubDetectorGrouping in IOV database folder /LArCalorimeter/LArTests/LArRampsSubDetectorGrouping without tagging
 OutputCondition...   INFO Register object LArRampMC#/LArCalorimeter/LArTests/LArRampsFeedThroughGrouping in IOV database folder /LArCalorimeter/LArTests/LArRampsFeedThroughGrouping without tagging
 OutputCondition...   INFO Registered 3 objects in IOV database
 IncidentProcAlg2     INFO Finalize
 EventSelector        INFO finalize
 IdDictDetDescrCnv    INFO in finalize
-IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 5/1 objs/chan/bytes 5/1/840 ((     9.49 ))s
-IOVDbFolder          INFO Folder /LAR/Identifier/CalibIdMap (AttrList) db-read 5/1 objs/chan/bytes 5/1/7600740 ((     1.37 ))s
-IOVDbFolder          INFO Folder /LAR/Identifier/FebRodMap (AttrList) db-read 5/1 objs/chan/bytes 5/1/30500 ((     1.73 ))s
-IOVDbFolder          INFO Folder /LAR/Identifier/OnOffIdMap (AttrList) db-read 5/1 objs/chan/bytes 5/1/3901460 ((     4.75 ))s
+IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 5/1 objs/chan/bytes 5/1/840 ((     0.10 ))s
+IOVDbFolder          INFO Folder /LAR/Identifier/CalibIdMap (AttrList) db-read 5/1 objs/chan/bytes 5/1/7600740 ((     0.05 ))s
+IOVDbFolder          INFO Folder /LAR/Identifier/FebRodMap (AttrList) db-read 5/1 objs/chan/bytes 5/1/30500 ((     0.03 ))s
+IOVDbFolder          INFO Folder /LAR/Identifier/OnOffIdMap (AttrList) db-read 5/1 objs/chan/bytes 5/1/3901460 ((     0.07 ))s
 IOVDbFolder          INFO Folder /CALO/Ofl/Identifier/CaloTTOnAttrIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 ((     0.00 ))s
 IOVDbFolder          INFO Folder /CALO/Ofl/Identifier/CaloTTOnOffIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 ((     0.00 ))s
 IOVDbFolder          INFO Folder /CALO/Ofl/Identifier/CaloTTPpmRxIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 ((     0.00 ))s
-IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 2/1 objs/chan/bytes 2/1/390 ((     0.13 ))s
-IOVDbFolder          INFO Folder /LAR/Identifier/LArTTCellMapAtlas (PoolRef) db-read 5/0 objs/chan/bytes 5/1/865 ((     0.48 ))s
+IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 2/1 objs/chan/bytes 2/1/390 ((     0.02 ))s
+IOVDbFolder          INFO Folder /LAR/Identifier/LArTTCellMapAtlas (PoolRef) db-read 5/0 objs/chan/bytes 5/1/865 ((     0.04 ))s
 IOVDbFolder       WARNING Folder /LAR/Identifier/LArTTCellMapAtlas is requested but no data retrieved
-IOVDbSvc             INFO  bytes in ((     17.95 ))s
+IOVDbSvc             INFO  bytes in ((      0.31 ))s
 IOVDbSvc             INFO Disconnecting from sqlite://;schema=mycool.db;dbname=OFLP200
 IOVDbSvc             INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 1 nFolders: 0 ReadTime: ((     0.00 ))s
-IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 6 nFolders: 6 ReadTime: ((    17.95 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 6 nFolders: 6 ReadTime: ((     0.31 ))s
 IOVDbSvc             INFO Connection COOLOFL_CALO/OFLP200 : nConnect: 1 nFolders: 3 ReadTime: ((     0.00 ))s
 LarCondTestNoRe...   INFO Database being retired...
-Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   CREATE    [ROOT_All] A6B968DB-9C78-4148-9C5C-A41979AF763A
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   CREATE    [ROOT_All] AD51FB41-BEBD-D549-A173-BDBAE85C2199
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     UPDATE    [ROOT_All] 
 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 ****************************************************************************************************
-fRep_ALL             INFO Time User   : Tot=    0 [us] Ave/Min/Max=    0(+-    0)/    0/    0 [us] #=  4
-commitOutput         INFO Time User   : Tot=   10 [ms]                                             #=  1
-cRepR_ALL            INFO Time User   : Tot=   20 [ms] Ave/Min/Max=0.0784(+-0.882)/    0/   10 [ms] #=255
-cRep_ALL             INFO Time User   : Tot=  100 [ms] Ave/Min/Max=   25(+- 37.7)/    0/   90 [ms] #=  4
-cObjR_ALL            INFO Time User   : Tot=  400 [ms] Ave/Min/Max=  200(+-  190)/   10/  390 [ms] #=  2
-cObj_ALL             INFO Time User   : Tot=  460 [ms] Ave/Min/Max=   92(+-  174)/    0/  440 [ms] #=  5
-ChronoStatSvc        INFO Time User   : Tot= 3.55  [s]                                             #=  1
+commitOutput         INFO Time User   : Tot=    0 [us]  #=  1
+fRep_ALL             INFO Time User   : Tot=   10 [ms] Ave/Min/Max=     2.5(+-    4.33)/       0/      10 [ms] #=  4
+cRepR_ALL            INFO Time User   : Tot=   10 [ms] Ave/Min/Max=  0.0392(+-   0.625)/       0/      10 [ms] #=255
+cRep_ALL             INFO Time User   : Tot=  120 [ms] Ave/Min/Max=      30(+-    46.4)/       0/     110 [ms] #=  4
+cObjR_ALL            INFO Time User   : Tot=  490 [ms] Ave/Min/Max=     245(+-     235)/      10/     480 [ms] #=  2
+cObj_ALL             INFO Time User   : Tot= 0.55  [s] Ave/Min/Max=    0.11(+-    0.21)/       0/    0.53  [s] #=  5
+ChronoStatSvc        INFO Time User   : Tot=  4.8  [s]  #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/TileCalorimeter/TileRecUtils/share/TileCellBuilderFromHit_test.ref b/TileCalorimeter/TileRecUtils/share/TileCellBuilderFromHit_test.ref
index 26e7e3fc1ab7..7b1a53e2fd82 100644
--- a/TileCalorimeter/TileRecUtils/share/TileCellBuilderFromHit_test.ref
+++ b/TileCalorimeter/TileRecUtils/share/TileCellBuilderFromHit_test.ref
@@ -1,16 +1,16 @@
-Fri Nov 29 11:05:44 CET 2019
+Tue Oct  6 19:52:23 CEST 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.19] [x86_64-centos7-gcc8-opt] [master-refs/ea3e66422c4] -- built on [2020-10-06T1923]
 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 "TileRecUtils/TileCellBuilderFromHit_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 5569 configurables from 10 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.19
 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
@@ -25,28 +25,23 @@ Py:TileConditions_jobOptions.py    INFO Adjusting TileInfo to return cell noise
 Py:TileConditions_jobOptions.py    INFO Setting 10-bit ADC configuration
 Py:TileInfoConf.     INFO Setting 10-bit Tile ADC
 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
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r2)
-                                          running on pcpraha5 on Fri Nov 29 11:05:50 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on aibuild028.cern.ch on Tue Oct  6 19:52: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 6906 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
-AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 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://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -56,13 +51,14 @@ PoolSvc              INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.x
 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
+OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
 IOVDbSvc             INFO Cache alignment will be done in 3 slices
 IOVDbSvc             INFO Global tag: OFLCOND-RUN12-SDR-35 set from joboptions
 IOVDbFolder          INFO Read from meta data only for folder /TagInfo
 IOVDbSvc             INFO Initialised with 3 connections and 14 folders
 IOVDbSvc             INFO Service IOVDbSvc initialised successfully
+ClassIDSvc           INFO  getRegistryEntries: read 1629 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found.
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
@@ -83,8 +79,8 @@ 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 2007 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 24 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 273 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 26 CLIDRegistry entries for module ALL
 DetDescrCnvSvc       INFO  initializing 
 DetDescrCnvSvc       INFO Found DetectorStore service
 DetDescrCnvSvc       INFO  filling proxies for detector managers 
@@ -169,7 +165,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 3005 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
@@ -187,7 +183,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  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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
@@ -199,15 +195,15 @@ CaloIDHelper_ID...   INFO in createObj: creating a LArHEC_ID helper object in th
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIDHelper_ID...   INFO in createObj: creating a LArFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-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 /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
 CaloIDHelper_ID...   INFO in createObj: creating a LArMiniFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 LArMiniFCAL_ID       INFO  initialize_from_dict - LArCalorimeter dictionary does NOT contain miniFCAL description. Unable to initialize LArMiniFCAL_ID.
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 TileDetDescrMan...   INFO Entering create_elements()
-ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 67 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
 CaloIDHelper_ID...   INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
@@ -217,7 +213,7 @@ TileCablingSvc       INFO RUN2 ATLAS geometry flag detected for geometry: ATLAS-
 TileCablingSvc       INFO Cabling for RUN2 (2014-2017) ATLAS geometry is set via jobOptions 
 TileCablingSvc       INFO Setting Cabling type to 4
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 265 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 270 CLIDRegistry entries for module ALL
 CondInputLoader      INFO Initializing CondInputLoader...
 CondInputLoader      INFO Adding base classes:
   +  ( 'CondAttrListCollection' , 'ConditionStore+/TILE/OFL02/CALIB/CES' )   ->
@@ -263,15 +259,15 @@ TileSampleNoise...   INFO Creating TileCondProxyCool(TileSampleNoiseCondAlg.Tile
 TileTimingCondA...   INFO Creating TileCondProxyCool(TileTimingCondAlg.TileCondProxyCool_AdcOffset) for folder: "/TILE/OFL02/TIME/CHANNELOFFSET/PHY"
 tilecellbuilder...   INFO ProxyOnlBch and ProxyOflBch will be used for bad channel status
 tilecellbuilder...   INFO ProxyOnlBch and ProxyOflBch will be used for bad channel status
-ClassIDSvc           INFO  getRegistryEntries: read 380 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 452 CLIDRegistry entries for module ALL
 xAODMaker::Even...   INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 319 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 271 CLIDRegistry entries for module ALL
 xAODMaker::Even...   INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
 xAODMaker::Even...WARNING Beam conditions service not available
 xAODMaker::Even...WARNING Will not fill beam spot information into xAOD::EventInfo
 PyComponentMgr       INFO Initializing PyComponentMgr...
 testalg1             INFO Initializing testalg1...
-ClassIDSvc           INFO  getRegistryEntries: read 4706 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 6722 CLIDRegistry entries for module ALL
 ToolSvc.tool1        INFO Storing MBTS cells in MBTSContainer
 ToolSvc.tool1        INFO Noise Sigma 0 MeV is selected!
 AtRndmGenSvc         INFO Initializing AtRndmGenSvc - package version RngComps-00-00-00
@@ -283,7 +279,7 @@ ToolSvc.tool1        INFO min time thr  -25 ns
 ToolSvc.tool1        INFO taking hits from 'TileHitCnt'
 ToolSvc.tool1        INFO Storing E4'  cells in E4prContainer
 ToolSvc.tool1        INFO TileCellBuilderFromHit initialization completed
-ClassIDSvc           INFO  getRegistryEntries: read 265 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 270 CLIDRegistry entries for module ALL
 ToolSvc.tool2        INFO Storing MBTS cells in MBTSContainer
 ToolSvc.tool2        INFO Noise Sigma 0 MeV is selected!
 ToolSvc.tool2        INFO max time thr  25 ns
@@ -298,7 +294,6 @@ ToolSvc.tool3        INFO min time thr  -25 ns
 ToolSvc.tool3        INFO taking hits from 'TileHitCnt'
 ToolSvc.tool3        INFO Storing E4'  cells in E4prContainer
 ToolSvc.tool3        INFO TileCellBuilderFromHit initialization completed
-HistogramPersis...WARNING Histograms saving not required.
 ApplicationMgr       INFO Application Manager Initialized successfully
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CES'
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/LIN'
@@ -315,17 +310,17 @@ ApplicationMgr       INFO Application Manager Started successfully
 AthenaEventLoopMgr   INFO   ===>>>  start of run 1    <<<===
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 EventPersistenc...   INFO Added successfully Conversion service:TagInfoMgr
-ClassIDSvc           INFO  getRegistryEntries: read 114 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARAlign-IOVDEP-00 for folder /LAR/Align
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LArCellPositionShift-ideal for folder /LAR/LArCellPositionShift
 IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
+IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] EACFEBD4-9BD2-E211-848A-02163E006B20
 Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000057.gen.COND/cond09_mc.000057.gen.COND._0001.pool.root
 RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000057.gen.COND/cond09_mc.000057.gen.COND._0001.pool.root File version:52200
 CaloMgrDetDescrCnv   INFO in createObj: creating a Calo Detector Manager object in the detector store
 CaloIdMgrDetDes...   INFO in createObj: creating a CaloDescrManager object in the detector store
-ClassIDSvc           INFO  getRegistryEntries: read 198 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 201 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a CaloDM_ID helper object in the detector store
 CaloDM_ID            INFO initialize_from_dictionary
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -339,12 +334,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 /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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 
@@ -375,8 +370,8 @@ 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
-tilecellbuilder...   INFO Creating TileCondProxyFile(tilecellbuilder_bct1Cond.tilecellbuilder_bct1_onl) for ASCII file name: "/localscratch4/pleskot/tilecal/r22-tilecal-12bit/build/x86_64-centos7-gcc8-opt/share/TileNoBad.oflBch"
-tilecellbuilder...   INFO Creating TileCondProxyFile(tilecellbuilder_bct1Cond.tilecellbuilder_bct1_ofl) for ASCII file name: "/localscratch4/pleskot/tilecal/r22-tilecal-12bit/build/x86_64-centos7-gcc8-opt/share/TileNoBad.oflBch"
+tilecellbuilder...   INFO Creating TileCondProxyFile(tilecellbuilder_bct1Cond.tilecellbuilder_bct1_onl) for ASCII file name: "/cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/TileNoBad.oflBch"
+tilecellbuilder...   INFO Creating TileCondProxyFile(tilecellbuilder_bct1Cond.tilecellbuilder_bct1_ofl) for ASCII file name: "/cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/TileNoBad.oflBch"
 tilecellbuilder...   INFO No TileBchStatus::isBad() definition found in DB, using defaults
 tilecellbuilder...   INFO No TileBchStatus::isNoisy() definition found in DB, using defaults
 tilecellbuilder...   INFO No TileBchStatus::isNoGainL1() definition found in DB, using defaults
@@ -388,8 +383,8 @@ tilecellbuilder...   INFO TileBchStatus::isNoGainL1() is defined by: ADC dead; N
 tilecellbuilder...   INFO TileBchStatus::isBadTiming() is defined by: Bad timing; Online bad timing; 
 tilecellbuilder...   INFO TileBchStatus::isWrongBCID() is defined by: Wrong BCID; Online wrong BCID; 
 tilecellbuilder...   INFO No drawer trips probabilities found in DB
-tilecellbuilder...   INFO Creating TileCondProxyFile(tilecellbuilder_bct2Cond.tilecellbuilder_bct2_onl) for ASCII file name: "/localscratch4/pleskot/tilecal/r22-tilecal-12bit/build/x86_64-centos7-gcc8-opt/share/TileNoBad.oflBch"
-tilecellbuilder...   INFO Creating TileCondProxyFile(tilecellbuilder_bct2Cond.tilecellbuilder_bct2_ofl) for ASCII file name: "/localscratch4/pleskot/tilecal/r22-tilecal-12bit/build/TileCalorimeter/TileRecUtils/CMakeFiles/unitTestRun/tilecellbuilder_bct2.bch"
+tilecellbuilder...   INFO Creating TileCondProxyFile(tilecellbuilder_bct2Cond.tilecellbuilder_bct2_onl) for ASCII file name: "/cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/TileNoBad.oflBch"
+tilecellbuilder...   INFO Creating TileCondProxyFile(tilecellbuilder_bct2Cond.tilecellbuilder_bct2_ofl) for ASCII file name: "/build1/tsulaia/athena-devel/build/TileCalorimeter/TileRecUtils/CMakeFiles/unitTestRun/tilecellbuilder_bct2.bch"
 tilecellbuilder...   INFO No TileBchStatus::isBad() definition found in DB, using defaults
 tilecellbuilder...   INFO No TileBchStatus::isNoisy() definition found in DB, using defaults
 tilecellbuilder...   INFO No TileBchStatus::isNoGainL1() definition found in DB, using defaults
@@ -401,9 +396,9 @@ tilecellbuilder...   INFO TileBchStatus::isNoGainL1() is defined by: ADC dead; N
 tilecellbuilder...   INFO TileBchStatus::isBadTiming() is defined by: Bad timing; Online bad timing; 
 tilecellbuilder...   INFO TileBchStatus::isWrongBCID() is defined by: Wrong BCID; Online wrong BCID; 
 tilecellbuilder...   INFO No drawer trips probabilities found in DB
-ClassIDSvc           INFO  getRegistryEntries: read 674 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 204 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 9 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 657 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 444 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 49 CLIDRegistry entries for module ALL
 AtRndmGenSvc         INFO  Stream =  Tile_DigitsMaker, Seed1 =  288581169, Seed2 = 758068585
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 1 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #2, run #1 1 events processed so far  <<<===
@@ -426,22 +421,22 @@ AtRndmGenSvc         INFO  FINALISING
 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.04 ))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.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/641476 ((     0.04 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/97884 ((     0.03 ))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/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/103344 ((     0.03 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.02 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.02 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/EMS (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/92 ((     0.02 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/FIBER (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/940 ((     0.02 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/72 ((     0.02 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.02 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641476 ((     0.03 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/97884 ((     0.04 ))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.41 ))s
+IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.01 ))s
+IOVDbSvc             INFO  bytes in ((      0.31 ))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.36 ))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.26 ))s
 AthDictLoaderSvc     INFO in finalize...
 ToolSvc              INFO Removing all tools created by ToolSvc
 ToolSvc.tool3        INFO Finalizing
@@ -450,9 +445,9 @@ ToolSvc.tool1        INFO Finalizing
 *****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=  320 [ms] Ave/Min/Max= 24.6(+- 79.7)/    0/  300 [ms] #= 13
-ChronoStatSvc        INFO Time User   : Tot=   26  [s]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot=  0.5  [s] Ave/Min/Max=    0.25(+-    0.25)/       0/     0.5  [s] #=  2
+cObj_ALL             INFO Time User   : Tot= 0.56  [s] Ave/Min/Max=  0.0431(+-   0.141)/       0/    0.53  [s] #= 13
+ChronoStatSvc        INFO Time User   : Tot= 38.1  [s]  #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/TileCalorimeter/TileRecUtils/share/TileCellBuilder_test.ref b/TileCalorimeter/TileRecUtils/share/TileCellBuilder_test.ref
index a7f332aae587..88c8c54bda4c 100644
--- a/TileCalorimeter/TileRecUtils/share/TileCellBuilder_test.ref
+++ b/TileCalorimeter/TileRecUtils/share/TileCellBuilder_test.ref
@@ -1,16 +1,16 @@
-Fri Nov 29 11:05:09 CET 2019
+Tue Oct  6 19:51:26 CEST 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.19] [x86_64-centos7-gcc8-opt] [master-refs/ea3e66422c4] -- built on [2020-10-06T1923]
 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 "TileRecUtils/TileCellBuilder_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 5569 configurables from 10 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.19
 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
@@ -25,28 +25,23 @@ Py:TileConditions_jobOptions.py    INFO Adjusting TileInfo to return cell noise
 Py:TileConditions_jobOptions.py    INFO Setting 10-bit ADC configuration
 Py:TileInfoConf.     INFO Setting 10-bit Tile ADC
 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
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r2)
-                                          running on pcpraha5 on Fri Nov 29 11:05:15 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on aibuild028.cern.ch on Tue Oct  6 19:51:38 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 6906 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
-AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 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://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -56,13 +51,14 @@ PoolSvc              INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.x
 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
+OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
 IOVDbSvc             INFO Cache alignment will be done in 3 slices
 IOVDbSvc             INFO Global tag: OFLCOND-RUN12-SDR-35 set from joboptions
 IOVDbFolder          INFO Read from meta data only for folder /TagInfo
 IOVDbSvc             INFO Initialised with 3 connections and 14 folders
 IOVDbSvc             INFO Service IOVDbSvc initialised successfully
+ClassIDSvc           INFO  getRegistryEntries: read 1629 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found.
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
@@ -83,8 +79,8 @@ 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 2007 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 24 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 273 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 26 CLIDRegistry entries for module ALL
 DetDescrCnvSvc       INFO  initializing 
 DetDescrCnvSvc       INFO Found DetectorStore service
 DetDescrCnvSvc       INFO  filling proxies for detector managers 
@@ -169,7 +165,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 3005 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
@@ -187,7 +183,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  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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
@@ -199,15 +195,15 @@ CaloIDHelper_ID...   INFO in createObj: creating a LArHEC_ID helper object in th
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIDHelper_ID...   INFO in createObj: creating a LArFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-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 /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
 CaloIDHelper_ID...   INFO in createObj: creating a LArMiniFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 LArMiniFCAL_ID       INFO  initialize_from_dict - LArCalorimeter dictionary does NOT contain miniFCAL description. Unable to initialize LArMiniFCAL_ID.
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 TileDetDescrMan...   INFO Entering create_elements()
-ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 67 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
 CaloIDHelper_ID...   INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
@@ -217,7 +213,7 @@ TileCablingSvc       INFO RUN2 ATLAS geometry flag detected for geometry: ATLAS-
 TileCablingSvc       INFO Cabling for RUN2 (2014-2017) ATLAS geometry is set via jobOptions 
 TileCablingSvc       INFO Setting Cabling type to 4
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 265 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 270 CLIDRegistry entries for module ALL
 CondInputLoader      INFO Initializing CondInputLoader...
 CondInputLoader      INFO Adding base classes:
   +  ( 'CondAttrListCollection' , 'ConditionStore+/TILE/OFL02/CALIB/CES' )   ->
@@ -263,17 +259,17 @@ TileSampleNoise...   INFO Creating TileCondProxyCool(TileSampleNoiseCondAlg.Tile
 TileTimingCondA...   INFO Creating TileCondProxyCool(TileTimingCondAlg.TileCondProxyCool_AdcOffset) for folder: "/TILE/OFL02/TIME/CHANNELOFFSET/PHY"
 tilecellbuilder...   INFO ProxyOnlBch and ProxyOflBch will be used for bad channel status
 tilecellbuilder...   INFO ProxyOnlBch and ProxyOflBch will be used for bad channel status
-ClassIDSvc           INFO  getRegistryEntries: read 380 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 4905 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 452 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 5090 CLIDRegistry entries for module ALL
 xAODMaker::Even...   INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
 xAODMaker::Even...   INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
 xAODMaker::Even...WARNING Beam conditions service not available
 xAODMaker::Even...WARNING Will not fill beam spot information into xAOD::EventInfo
 PyComponentMgr       INFO Initializing PyComponentMgr...
 prepalg1             INFO Initializing prepalg1...
-ClassIDSvc           INFO  getRegistryEntries: read 106 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 108 CLIDRegistry entries for module ALL
 testalg1             INFO Initializing testalg1...
-ClassIDSvc           INFO  getRegistryEntries: read 14 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1795 CLIDRegistry entries for module ALL
 ToolSvc.tool1        INFO Storing MBTS cells in MBTSContainer
 ToolSvc.tool1        INFO none of thresholds set, all RawChannels will be converted to Cells
 ToolSvc.tool1        INFO taking RawChannels from 'TileRawChannelCnt'
@@ -326,7 +322,6 @@ ToolSvc.tool11       INFO none of thresholds set, all RawChannels will be conver
 ToolSvc.tool11       INFO taking RawChannels from 'TileRawChannelCnt'
 ToolSvc.tool11       INFO Storing E4'  cells in E4prContainer
 ToolSvc.tool11       INFO TileCellBuilder initialization completed
-HistogramPersis...WARNING Histograms saving not required.
 ApplicationMgr       INFO Application Manager Initialized successfully
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CES'
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/LIN'
@@ -343,17 +338,17 @@ ApplicationMgr       INFO Application Manager Started successfully
 AthenaEventLoopMgr   INFO   ===>>>  start of run 1    <<<===
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 EventPersistenc...   INFO Added successfully Conversion service:TagInfoMgr
-ClassIDSvc           INFO  getRegistryEntries: read 114 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARAlign-IOVDEP-00 for folder /LAR/Align
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LArCellPositionShift-ideal for folder /LAR/LArCellPositionShift
 IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
+IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] EACFEBD4-9BD2-E211-848A-02163E006B20
 Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000057.gen.COND/cond09_mc.000057.gen.COND._0001.pool.root
 RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000057.gen.COND/cond09_mc.000057.gen.COND._0001.pool.root File version:52200
 CaloMgrDetDescrCnv   INFO in createObj: creating a Calo Detector Manager object in the detector store
 CaloIdMgrDetDes...   INFO in createObj: creating a CaloDescrManager object in the detector store
-ClassIDSvc           INFO  getRegistryEntries: read 198 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 201 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a CaloDM_ID helper object in the detector store
 CaloDM_ID            INFO initialize_from_dictionary
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -367,12 +362,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 /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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 
@@ -403,8 +398,8 @@ 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
-tilecellbuilder...   INFO Creating TileCondProxyFile(tilecellbuilder_bct1Cond.tilecellbuilder_bct1_onl) for ASCII file name: "/localscratch4/pleskot/tilecal/r22-tilecal-12bit/build/x86_64-centos7-gcc8-opt/share/TileNoBad.oflBch"
-tilecellbuilder...   INFO Creating TileCondProxyFile(tilecellbuilder_bct1Cond.tilecellbuilder_bct1_ofl) for ASCII file name: "/localscratch4/pleskot/tilecal/r22-tilecal-12bit/build/x86_64-centos7-gcc8-opt/share/TileNoBad.oflBch"
+tilecellbuilder...   INFO Creating TileCondProxyFile(tilecellbuilder_bct1Cond.tilecellbuilder_bct1_onl) for ASCII file name: "/cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/TileNoBad.oflBch"
+tilecellbuilder...   INFO Creating TileCondProxyFile(tilecellbuilder_bct1Cond.tilecellbuilder_bct1_ofl) for ASCII file name: "/cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/TileNoBad.oflBch"
 tilecellbuilder...   INFO No TileBchStatus::isBad() definition found in DB, using defaults
 tilecellbuilder...   INFO No TileBchStatus::isNoisy() definition found in DB, using defaults
 tilecellbuilder...   INFO No TileBchStatus::isNoGainL1() definition found in DB, using defaults
@@ -416,8 +411,8 @@ tilecellbuilder...   INFO TileBchStatus::isNoGainL1() is defined by: ADC dead; N
 tilecellbuilder...   INFO TileBchStatus::isBadTiming() is defined by: Bad timing; Online bad timing; 
 tilecellbuilder...   INFO TileBchStatus::isWrongBCID() is defined by: Wrong BCID; Online wrong BCID; 
 tilecellbuilder...   INFO No drawer trips probabilities found in DB
-tilecellbuilder...   INFO Creating TileCondProxyFile(tilecellbuilder_bct2Cond.tilecellbuilder_bct2_onl) for ASCII file name: "/localscratch4/pleskot/tilecal/r22-tilecal-12bit/build/x86_64-centos7-gcc8-opt/share/TileNoBad.oflBch"
-tilecellbuilder...   INFO Creating TileCondProxyFile(tilecellbuilder_bct2Cond.tilecellbuilder_bct2_ofl) for ASCII file name: "/localscratch4/pleskot/tilecal/r22-tilecal-12bit/build/TileCalorimeter/TileRecUtils/CMakeFiles/unitTestRun/tilecellbuilder_bct2.bch"
+tilecellbuilder...   INFO Creating TileCondProxyFile(tilecellbuilder_bct2Cond.tilecellbuilder_bct2_onl) for ASCII file name: "/cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/TileNoBad.oflBch"
+tilecellbuilder...   INFO Creating TileCondProxyFile(tilecellbuilder_bct2Cond.tilecellbuilder_bct2_ofl) for ASCII file name: "/build1/tsulaia/athena-devel/build/TileCalorimeter/TileRecUtils/CMakeFiles/unitTestRun/tilecellbuilder_bct2.bch"
 tilecellbuilder...   INFO No TileBchStatus::isBad() definition found in DB, using defaults
 tilecellbuilder...   INFO No TileBchStatus::isNoisy() definition found in DB, using defaults
 tilecellbuilder...   INFO No TileBchStatus::isNoGainL1() definition found in DB, using defaults
@@ -429,13 +424,12 @@ tilecellbuilder...   INFO TileBchStatus::isNoGainL1() is defined by: ADC dead; N
 tilecellbuilder...   INFO TileBchStatus::isBadTiming() is defined by: Bad timing; Online bad timing; 
 tilecellbuilder...   INFO TileBchStatus::isWrongBCID() is defined by: Wrong BCID; Online wrong BCID; 
 tilecellbuilder...   INFO No drawer trips probabilities found in DB
-ClassIDSvc           INFO  getRegistryEntries: read 674 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 196 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 9 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 68 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 657 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 436 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 49 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 1 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #2, run #1 1 events processed so far  <<<===
-ClassIDSvc           INFO  getRegistryEntries: read 17 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 96 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 2 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #3, run #1 2 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 3 events processed so far  <<<===
@@ -470,23 +464,23 @@ testalg1             INFO Finalizing testalg1...
 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.05 ))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 /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.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.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/641476 ((     0.06 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/97884 ((     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/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641476 ((     0.05 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/97884 ((     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.04 ))s
-IOVDbSvc             INFO  bytes in ((      0.53 ))s
+IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.01 ))s
+IOVDbSvc             INFO  bytes in ((      0.44 ))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.09 ))s
-IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     0.44 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.04 ))s
+IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     0.39 ))s
 AthDictLoaderSvc     INFO in finalize...
 ToolSvc              INFO Removing all tools created by ToolSvc
 ToolSvc.tool11       INFO Finalizing
@@ -501,9 +495,9 @@ ToolSvc.tool1        INFO Finalizing
 *****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= 26.1  [s]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot= 0.51  [s] Ave/Min/Max=   0.255(+-   0.245)/    0.01/     0.5  [s] #=  2
+cObj_ALL             INFO Time User   : Tot= 0.55  [s] Ave/Min/Max=  0.0423(+-   0.138)/       0/    0.52  [s] #= 13
+ChronoStatSvc        INFO Time User   : Tot= 38.9  [s]  #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/TileCalorimeter/TileRecUtils/share/TileDQstatusAlg_test.ref b/TileCalorimeter/TileRecUtils/share/TileDQstatusAlg_test.ref
index a5ee1a2b0af2..0394f00dd50d 100644
--- a/TileCalorimeter/TileRecUtils/share/TileDQstatusAlg_test.ref
+++ b/TileCalorimeter/TileRecUtils/share/TileDQstatusAlg_test.ref
@@ -1,16 +1,16 @@
-Fri Nov 29 11:06:55 CET 2019
+Tue Oct  6 19:54:13 CEST 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.19] [x86_64-centos7-gcc8-opt] [master-refs/ea3e66422c4] -- built on [2020-10-06T1923]
 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 "TileRecUtils/TileDQstatusAlg_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 5569 configurables from 10 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.19
 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
@@ -25,28 +25,23 @@ Py:TileConditions_jobOptions.py    INFO Adjusting TileInfo to return cell noise
 Py:TileConditions_jobOptions.py    INFO Setting 10-bit ADC configuration
 Py:TileInfoConf.     INFO Setting 10-bit Tile ADC
 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
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r2)
-                                          running on pcpraha5 on Fri Nov 29 11:07:01 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on aibuild028.cern.ch on Tue Oct  6 19:54:24 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 6906 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
-AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 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://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -56,13 +51,14 @@ PoolSvc              INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.x
 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
+OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
 IOVDbSvc             INFO Cache alignment will be done in 3 slices
 IOVDbSvc             INFO Global tag: OFLCOND-RUN12-SDR-35 set from joboptions
 IOVDbFolder          INFO Read from meta data only for folder /TagInfo
 IOVDbSvc             INFO Initialised with 3 connections and 14 folders
 IOVDbSvc             INFO Service IOVDbSvc initialised successfully
+ClassIDSvc           INFO  getRegistryEntries: read 1629 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found.
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
@@ -83,8 +79,8 @@ 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 2007 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 24 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 273 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 26 CLIDRegistry entries for module ALL
 DetDescrCnvSvc       INFO  initializing 
 DetDescrCnvSvc       INFO Found DetectorStore service
 DetDescrCnvSvc       INFO  filling proxies for detector managers 
@@ -175,7 +171,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 3005 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
@@ -184,7 +180,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= 24344Kb 	 Time = 0.43S
+GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 24356Kb 	 Time = 0.6S
 GeoModelSvc.Til...   INFO  Entering TileDetectorTool::create()
 TileDddbManager      INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager      INFO n_tiglob = 5
@@ -195,7 +191,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  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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
@@ -207,9 +203,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 /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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.
@@ -244,8 +240,8 @@ 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
-ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
+GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 3576Kb 	 Time = 0.14S
+ClassIDSvc           INFO  getRegistryEntries: read 67 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
 CaloIDHelper_ID...   INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
@@ -255,7 +251,7 @@ TileCablingSvc       INFO RUN2 ATLAS geometry flag detected for geometry: ATLAS-
 TileCablingSvc       INFO Cabling for RUN2 (2014-2017) ATLAS geometry is set via jobOptions 
 TileCablingSvc       INFO Setting Cabling type to 4
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 265 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 270 CLIDRegistry entries for module ALL
 CondInputLoader      INFO Initializing CondInputLoader...
 CondInputLoader      INFO Adding base classes:
   +  ( 'CondAttrListCollection' , 'ConditionStore+/TILE/OFL02/CALIB/CES' )   ->
@@ -299,12 +295,11 @@ 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 4905 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 5090 CLIDRegistry entries for module ALL
 PyComponentMgr       INFO Initializing PyComponentMgr...
 record1              INFO Initializing record1...
-ClassIDSvc           INFO  getRegistryEntries: read 106 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 108 CLIDRegistry entries for module ALL
 check1               INFO Initializing check1...
-HistogramPersis...WARNING Histograms saving not required.
 ApplicationMgr       INFO Application Manager Initialized successfully
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CES'
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/LIN'
@@ -321,17 +316,17 @@ ApplicationMgr       INFO Application Manager Started successfully
 AthenaEventLoopMgr   INFO   ===>>>  start of run 1    <<<===
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 EventPersistenc...   INFO Added successfully Conversion service:TagInfoMgr
-ClassIDSvc           INFO  getRegistryEntries: read 114 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARAlign-IOVDEP-00 for folder /LAR/Align
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LArCellPositionShift-ideal for folder /LAR/LArCellPositionShift
 IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
+IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] EACFEBD4-9BD2-E211-848A-02163E006B20
 Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000057.gen.COND/cond09_mc.000057.gen.COND._0001.pool.root
 RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000057.gen.COND/cond09_mc.000057.gen.COND._0001.pool.root File version:52200
 CaloMgrDetDescrCnv   INFO in createObj: creating a Calo Detector Manager object in the detector store
 CaloIdMgrDetDes...   INFO in createObj: creating a CaloDescrManager object in the detector store
-ClassIDSvc           INFO  getRegistryEntries: read 198 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 201 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a CaloDM_ID helper object in the detector store
 CaloDM_ID            INFO initialize_from_dictionary
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -345,12 +340,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 /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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 
@@ -381,9 +376,9 @@ 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 674 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 206 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 12 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 657 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2221 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 1 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #2, run #1 1 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 2 events processed so far  <<<===
@@ -400,31 +395,31 @@ check1               INFO Finalizing check1...
 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.04 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/103344 ((     0.03 ))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 /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.24 ))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.02 ))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.02 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/72 ((     0.03 ))s
 IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.03 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641476 ((     0.04 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641476 ((     0.25 ))s
 IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/97884 ((     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/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/96 ((     0.05 ))s
 IOVDbFolder          INFO Folder /TILE/ONL01/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.01 ))s
-IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.02 ))s
-IOVDbSvc             INFO  bytes in ((      0.37 ))s
+IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.01 ))s
+IOVDbSvc             INFO  bytes in ((      0.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.06 ))s
-IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     0.31 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.04 ))s
+IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     0.77 ))s
 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 ****************************************************************************************************
-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= 25.7  [s]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot= 0.52  [s] Ave/Min/Max=    0.26(+-    0.25)/    0.01/    0.51  [s] #=  2
+cObj_ALL             INFO Time User   : Tot= 0.57  [s] Ave/Min/Max=  0.0438(+-   0.141)/       0/    0.53  [s] #= 13
+ChronoStatSvc        INFO Time User   : Tot= 36.3  [s]  #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/TileCalorimeter/TileRecUtils/share/TileDQstatusTool_test.ref b/TileCalorimeter/TileRecUtils/share/TileDQstatusTool_test.ref
index 8173dca6aeaf..b35d5645c6a3 100644
--- a/TileCalorimeter/TileRecUtils/share/TileDQstatusTool_test.ref
+++ b/TileCalorimeter/TileRecUtils/share/TileDQstatusTool_test.ref
@@ -1,16 +1,16 @@
-Fri Nov 29 11:07:30 CET 2019
+Tue Oct  6 19:55:07 CEST 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.19] [x86_64-centos7-gcc8-opt] [master-refs/ea3e66422c4] -- built on [2020-10-06T1923]
 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 "TileRecUtils/TileDQstatusTool_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 5569 configurables from 10 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.19
 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
@@ -25,28 +25,23 @@ Py:TileConditions_jobOptions.py    INFO Adjusting TileInfo to return cell noise
 Py:TileConditions_jobOptions.py    INFO Setting 10-bit ADC configuration
 Py:TileInfoConf.     INFO Setting 10-bit Tile ADC
 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
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r2)
-                                          running on pcpraha5 on Fri Nov 29 11:07:36 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on aibuild028.cern.ch on Tue Oct  6 19:55:18 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 6906 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
-AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 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://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -56,13 +51,14 @@ PoolSvc              INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.x
 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
+OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
 IOVDbSvc             INFO Cache alignment will be done in 3 slices
 IOVDbSvc             INFO Global tag: OFLCOND-RUN12-SDR-35 set from joboptions
 IOVDbFolder          INFO Read from meta data only for folder /TagInfo
 IOVDbSvc             INFO Initialised with 3 connections and 14 folders
 IOVDbSvc             INFO Service IOVDbSvc initialised successfully
+ClassIDSvc           INFO  getRegistryEntries: read 1629 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found.
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
@@ -83,8 +79,8 @@ 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 2007 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 24 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 273 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 26 CLIDRegistry entries for module ALL
 DetDescrCnvSvc       INFO  initializing 
 DetDescrCnvSvc       INFO Found DetectorStore service
 DetDescrCnvSvc       INFO  filling proxies for detector managers 
@@ -175,7 +171,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 3005 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
@@ -184,7 +180,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= 24344Kb 	 Time = 0.43S
+GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 24356Kb 	 Time = 0.56S
 GeoModelSvc.Til...   INFO  Entering TileDetectorTool::create()
 TileDddbManager      INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager      INFO n_tiglob = 5
@@ -195,7 +191,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  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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
@@ -207,9 +203,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 /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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.
@@ -244,8 +240,8 @@ 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
-ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
+GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 3576Kb 	 Time = 0.15S
+ClassIDSvc           INFO  getRegistryEntries: read 67 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
 CaloIDHelper_ID...   INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
@@ -255,7 +251,7 @@ TileCablingSvc       INFO RUN2 ATLAS geometry flag detected for geometry: ATLAS-
 TileCablingSvc       INFO Cabling for RUN2 (2014-2017) ATLAS geometry is set via jobOptions 
 TileCablingSvc       INFO Setting Cabling type to 4
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 265 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 270 CLIDRegistry entries for module ALL
 CondInputLoader      INFO Initializing CondInputLoader...
 CondInputLoader      INFO Adding base classes:
   +  ( 'CondAttrListCollection' , 'ConditionStore+/TILE/OFL02/CALIB/CES' )   ->
@@ -301,10 +297,9 @@ TileSampleNoise...   INFO Creating TileCondProxyCool(TileSampleNoiseCondAlg.Tile
 TileTimingCondA...   INFO Creating TileCondProxyCool(TileTimingCondAlg.TileCondProxyCool_AdcOffset) for folder: "/TILE/OFL02/TIME/CHANNELOFFSET/PHY"
 PyComponentMgr       INFO Initializing PyComponentMgr...
 test1                INFO Initializing test1...
-ClassIDSvc           INFO  getRegistryEntries: read 5116 CLIDRegistry entries for module ALL
-HistogramPersis...WARNING Histograms saving not required.
+ClassIDSvc           INFO  getRegistryEntries: read 7355 CLIDRegistry entries for module ALL
 ApplicationMgr       INFO Application Manager Initialized successfully
-ClassIDSvc           INFO  getRegistryEntries: read 265 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 270 CLIDRegistry entries for module ALL
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CES'
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/LIN'
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/NLN'
@@ -320,17 +315,17 @@ ApplicationMgr       INFO Application Manager Started successfully
 AthenaEventLoopMgr   INFO   ===>>>  start of run 1    <<<===
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 EventPersistenc...   INFO Added successfully Conversion service:TagInfoMgr
-ClassIDSvc           INFO  getRegistryEntries: read 114 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARAlign-IOVDEP-00 for folder /LAR/Align
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LArCellPositionShift-ideal for folder /LAR/LArCellPositionShift
 IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
+IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] EACFEBD4-9BD2-E211-848A-02163E006B20
 Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000057.gen.COND/cond09_mc.000057.gen.COND._0001.pool.root
 RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000057.gen.COND/cond09_mc.000057.gen.COND._0001.pool.root File version:52200
 CaloMgrDetDescrCnv   INFO in createObj: creating a Calo Detector Manager object in the detector store
 CaloIdMgrDetDes...   INFO in createObj: creating a CaloDescrManager object in the detector store
-ClassIDSvc           INFO  getRegistryEntries: read 198 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 201 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a CaloDM_ID helper object in the detector store
 CaloDM_ID            INFO initialize_from_dictionary
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -344,12 +339,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 /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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 
@@ -381,8 +376,8 @@ 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
 *** Starting test1
-ClassIDSvc           INFO  getRegistryEntries: read 674 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 185 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 657 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 155 CLIDRegistry entries for module ALL
 *** Starting test2
 *** Starting test3
 *** Starting test4
@@ -404,31 +399,31 @@ test1                INFO Finalizing test1...
 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.04 ))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 /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.03 ))s
 IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.02 ))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/CIS/FIT/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.02 ))s
 IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/EMS (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/92 ((     0.02 ))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/FIBER (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/940 ((     0.02 ))s
 IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/72 ((     0.02 ))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/641476 ((     0.04 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/97884 ((     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/OFL02/CALIB/LAS/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.02 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641476 ((     0.03 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/97884 ((     0.03 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/96 ((     0.02 ))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.38 ))s
+IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.01 ))s
+IOVDbSvc             INFO  bytes in ((      0.27 ))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.31 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.04 ))s
+IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     0.23 ))s
 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 ****************************************************************************************************
-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= 28.5  [s]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot= 0.52  [s] Ave/Min/Max=    0.26(+-    0.25)/    0.01/    0.51  [s] #=  2
+cObj_ALL             INFO Time User   : Tot= 0.57  [s] Ave/Min/Max=  0.0438(+-   0.141)/       0/    0.53  [s] #= 13
+ChronoStatSvc        INFO Time User   : Tot= 39.5  [s]  #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/TileCalorimeter/TileRecUtils/share/TileRawChannelBuilder_test.ref b/TileCalorimeter/TileRecUtils/share/TileRawChannelBuilder_test.ref
index 33779261bc48..6f3ea37b0826 100644
--- a/TileCalorimeter/TileRecUtils/share/TileRawChannelBuilder_test.ref
+++ b/TileCalorimeter/TileRecUtils/share/TileRawChannelBuilder_test.ref
@@ -1,16 +1,16 @@
-Fri Nov 29 11:06:19 CET 2019
+Tue Oct  6 19:53:18 CEST 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.19] [x86_64-centos7-gcc8-opt] [master-refs/ea3e66422c4] -- built on [2020-10-06T1923]
 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 "TileRecUtils/TileRawChannelBuilder_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 5569 configurables from 10 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.19
 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
@@ -25,28 +25,23 @@ Py:TileConditions_jobOptions.py    INFO Adjusting TileInfo to return cell noise
 Py:TileConditions_jobOptions.py    INFO Setting 10-bit ADC configuration
 Py:TileInfoConf.     INFO Setting 10-bit Tile ADC
 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
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v32r2)
-                                          running on pcpraha5 on Fri Nov 29 11:06:26 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on aibuild028.cern.ch on Tue Oct  6 19:53:29 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 6906 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
-AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 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://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -56,13 +51,14 @@ PoolSvc              INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.x
 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
+OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
 IOVDbSvc             INFO Cache alignment will be done in 3 slices
 IOVDbSvc             INFO Global tag: OFLCOND-RUN12-SDR-35 set from joboptions
 IOVDbFolder          INFO Read from meta data only for folder /TagInfo
 IOVDbSvc             INFO Initialised with 3 connections and 14 folders
 IOVDbSvc             INFO Service IOVDbSvc initialised successfully
+ClassIDSvc           INFO  getRegistryEntries: read 1629 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found.
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
@@ -83,8 +79,8 @@ 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 2007 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 24 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 273 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 26 CLIDRegistry entries for module ALL
 DetDescrCnvSvc       INFO  initializing 
 DetDescrCnvSvc       INFO Found DetectorStore service
 DetDescrCnvSvc       INFO  filling proxies for detector managers 
@@ -175,7 +171,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 3005 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
@@ -184,7 +180,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= 24356Kb 	 Time = 0.55S
 GeoModelSvc.Til...   INFO  Entering TileDetectorTool::create()
 TileDddbManager      INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager      INFO n_tiglob = 5
@@ -195,7 +191,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  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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
@@ -207,9 +203,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 /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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.
@@ -244,8 +240,8 @@ 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
-ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
+GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 4600Kb 	 Time = 0.16S
+ClassIDSvc           INFO  getRegistryEntries: read 67 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
 CaloIDHelper_ID...   INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
@@ -255,7 +251,7 @@ TileCablingSvc       INFO RUN2 ATLAS geometry flag detected for geometry: ATLAS-
 TileCablingSvc       INFO Cabling for RUN2 (2014-2017) ATLAS geometry is set via jobOptions 
 TileCablingSvc       INFO Setting Cabling type to 4
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 265 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 270 CLIDRegistry entries for module ALL
 CondInputLoader      INFO Initializing CondInputLoader...
 CondInputLoader      INFO Adding base classes:
   +  ( 'CondAttrListCollection' , 'ConditionStore+/TILE/OFL02/CALIB/CES' )   ->
@@ -299,21 +295,20 @@ 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 380 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 4905 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 452 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 5090 CLIDRegistry entries for module ALL
 xAODMaker::Even...   INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
 xAODMaker::Even...   INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
 xAODMaker::Even...WARNING Beam conditions service not available
 xAODMaker::Even...WARNING Will not fill beam spot information into xAOD::EventInfo
 PyComponentMgr       INFO Initializing PyComponentMgr...
 prepalg1             INFO Initializing prepalg1...
-ClassIDSvc           INFO  getRegistryEntries: read 106 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 108 CLIDRegistry entries for module ALL
 testalg1             INFO Initializing testalg1...
-ClassIDSvc           INFO  getRegistryEntries: read 105 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2182 CLIDRegistry entries for module ALL
 ToolSvc.tool1        INFO TileRawChannelBuilder::initialize()
 ToolSvc.tool2        INFO TileRawChannelBuilder::initialize()
 ToolSvc.tool2.n...   INFO Initializing...
-HistogramPersis...WARNING Histograms saving not required.
 ApplicationMgr       INFO Application Manager Initialized successfully
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CES'
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/LIN'
@@ -330,17 +325,17 @@ ApplicationMgr       INFO Application Manager Started successfully
 AthenaEventLoopMgr   INFO   ===>>>  start of run 1    <<<===
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 EventPersistenc...   INFO Added successfully Conversion service:TagInfoMgr
-ClassIDSvc           INFO  getRegistryEntries: read 114 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARAlign-IOVDEP-00 for folder /LAR/Align
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LArCellPositionShift-ideal for folder /LAR/LArCellPositionShift
 IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
+IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] EACFEBD4-9BD2-E211-848A-02163E006B20
 Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000057.gen.COND/cond09_mc.000057.gen.COND._0001.pool.root
 RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000057.gen.COND/cond09_mc.000057.gen.COND._0001.pool.root File version:52200
 CaloMgrDetDescrCnv   INFO in createObj: creating a Calo Detector Manager object in the detector store
 CaloIdMgrDetDes...   INFO in createObj: creating a CaloDescrManager object in the detector store
-ClassIDSvc           INFO  getRegistryEntries: read 198 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 201 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a CaloDM_ID helper object in the detector store
 CaloDM_ID            INFO initialize_from_dictionary
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -354,12 +349,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 /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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 
@@ -390,8 +385,8 @@ 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 674 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 185 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 657 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 133 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 1 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #2, run #1 1 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 2 events processed so far  <<<===
@@ -412,23 +407,23 @@ testalg1             INFO Finalizing testalg1...
 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.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.02 ))s
+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.03 ))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.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/641476 ((     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/641476 ((     0.25 ))s
 IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/97884 ((     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/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.42 ))s
+IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.01 ))s
+IOVDbSvc             INFO  bytes in ((      0.61 ))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.35 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.04 ))s
+IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     0.57 ))s
 AthDictLoaderSvc     INFO in finalize...
 ToolSvc              INFO Removing all tools created by ToolSvc
 ToolSvc.tool2        INFO Finalizing
@@ -436,9 +431,9 @@ ToolSvc.tool1        INFO Finalizing
 *****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(+-  145)/   10/  300 [ms] #=  2
-cObj_ALL             INFO Time User   : Tot=  340 [ms] Ave/Min/Max= 26.2(+-   85)/    0/  320 [ms] #= 13
-ChronoStatSvc        INFO Time User   : Tot= 26.3  [s]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot= 0.52  [s] Ave/Min/Max=    0.26(+-    0.26)/       0/    0.52  [s] #=  2
+cObj_ALL             INFO Time User   : Tot= 0.57  [s] Ave/Min/Max=  0.0438(+-   0.143)/       0/    0.54  [s] #= 13
+ChronoStatSvc        INFO Time User   : Tot= 37.6  [s]  #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   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 80bba733b55f..a40aa5355cdf 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/share/TileDigitsContByteStreamCnv_test.ref
+++ b/TileCalorimeter/TileSvc/TileByteStream/share/TileDigitsContByteStreamCnv_test.ref
@@ -1,16 +1,16 @@
-Wed Jun  3 16:09:45 PDT 2020
+Tue Oct  6 19:57:24 CEST 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1607]
+Py:Athena            INFO using release [WorkDir-22.0.19] [x86_64-centos7-gcc8-opt] [master-refs/ea3e66422c4] -- built on [2020-10-06T1923]
 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 5530 configurables from 19 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 10 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.15
+EventInfoMgtInit: Got release version  Athena-22.0.19
 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
@@ -25,28 +25,23 @@ Py:TileConditions_jobOptions.py    INFO Adjusting TileInfo to return cell noise
 Py:TileConditions_jobOptions.py    INFO Setting 10-bit ADC configuration
 Py:TileInfoConf.     INFO Setting 10-bit Tile ADC
 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
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
-                                          running on zeus on Wed Jun  3 16:09:55 2020
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on aibuild028.cern.ch on Tue Oct  6 19:57: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 7006 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 6906 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
-AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 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 ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -57,7 +52,7 @@ DbSession            INFO     Open     DbSession
 Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
 ToolSvc.ByteStr...   INFO Initializing ToolSvc.ByteStreamMetadataTool - package version ByteStreamCnvSvc-00-00-00
 MetaDataSvc          INFO Found MetaDataTools = PublicToolHandleArray(['IOVDbMetaDataTool','ByteStreamMetadataTool'])
-IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
+OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
 IOVDbSvc             INFO Cache alignment will be done in 3 slices
 IOVDbSvc             INFO Global tag: OFLCOND-RUN12-SDR-35 set from joboptions
@@ -67,11 +62,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
+ClassIDSvc           INFO  getRegistryEntries: read 2841 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 268 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 2575 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 273 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2643 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
@@ -90,7 +85,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 18 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 20 CLIDRegistry entries for module ALL
 DetDescrCnvSvc       INFO  initializing 
 DetDescrCnvSvc       INFO Found DetectorStore service
 DetDescrCnvSvc       INFO  filling proxies for detector managers 
@@ -181,7 +176,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 2902 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2914 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 +185,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= 25364Kb 	 Time = 0.75S
+GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 24356Kb 	 Time = 0.54S
 GeoModelSvc.Til...   INFO  Entering TileDetectorTool::create()
 TileDddbManager      INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager      INFO n_tiglob = 5
@@ -201,7 +196,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  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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 +208,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 /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
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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,8 +245,8 @@ 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.2S
-ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
+GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 4600Kb 	 Time = 0.15S
+ClassIDSvc           INFO  getRegistryEntries: read 67 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
 CaloIDHelper_ID...   INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
@@ -261,7 +256,7 @@ TileCablingSvc       INFO RUN2 ATLAS geometry flag detected for geometry: ATLAS-
 TileCablingSvc       INFO Cabling for RUN2 (2014-2017) ATLAS geometry is set via jobOptions 
 TileCablingSvc       INFO Setting Cabling type to 4
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 265 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 270 CLIDRegistry entries for module ALL
 CondInputLoader      INFO Initializing CondInputLoader...
 CondInputLoader      INFO Adding base classes:
   +  ( 'CondAttrListCollection' , 'ConditionStore+/TILE/OFL02/CALIB/CES' )   ->
@@ -305,7 +300,7 @@ TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCond
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlEms) for folder: "/TILE/OFL02/CALIB/EMS"
 TileSampleNoise...   INFO Creating TileCondProxyCool(TileSampleNoiseCondAlg.TileCondProxyCool_NoiseSample) for folder: "/TILE/OFL02/NOISE/SAMPLE"
 TileTimingCondA...   INFO Creating TileCondProxyCool(TileTimingCondAlg.TileCondProxyCool_AdcOffset) for folder: "/TILE/OFL02/TIME/CHANNELOFFSET/PHY"
-ClassIDSvc           INFO  getRegistryEntries: read 4030 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 4147 CLIDRegistry entries for module ALL
 PyComponentMgr       INFO Initializing PyComponentMgr...
 Finalizer            INFO Initializing Finalizer...
 ByteStreamInputSvc   INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00
@@ -316,7 +311,7 @@ ROBDataProviderSvc   INFO  ---> Filter out Sub Detector ROBs by Status Code: # S
 EventSelector        INFO reinitialization...
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
-ClassIDSvc           INFO  getRegistryEntries: read 425 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 379 CLIDRegistry entries for module ALL
 ByteStreamInputSvc   INFO Picked valid file: /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_JetTauEtmiss.merge.RAW._lb0144._SFO-5._0001.1
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CES'
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/LIN'
@@ -341,12 +336,13 @@ IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARAlign-IOVDEP-00 for folder /LAR/Align
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LArCellPositionShift-ideal for folder /LAR/LArCellPositionShift
 IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
+IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 06C9EAE8-6F5B-E011-BAAA-003048F0E7AC
 Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root
 RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root File version:52200
 CaloMgrDetDescrCnv   INFO in createObj: creating a Calo Detector Manager object in the detector store
 CaloIdMgrDetDes...   INFO in createObj: creating a CaloDescrManager object in the detector store
-ClassIDSvc           INFO  getRegistryEntries: read 198 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 201 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a CaloDM_ID helper object in the detector store
 CaloDM_ID            INFO initialize_from_dictionary
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -360,12 +356,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 /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
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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 
@@ -396,8 +392,8 @@ 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 2266 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 91 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2315 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 92 CLIDRegistry entries for module ALL
 ToolSvc.TileROD...   INFO TileL2Builder initialization completed
 ToolSvc.TileDig...   INFO Initializing TileDigitsContByteStreamTool
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1129572, run #204073 1 events processed so far  <<<===
@@ -612,23 +608,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.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
+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.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.23 ))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.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.04 ))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.01 ))s
+IOVDbSvc             INFO  bytes in ((      0.58 ))s
 IOVDbSvc             INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: ((     0.00 ))s
-IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     1.58 ))s
-IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     8.26 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.04 ))s
+IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     0.54 ))s
 AthDictLoaderSvc     INFO in finalize...
 ToolSvc              INFO Removing all tools created by ToolSvc
 ToolSvc.TileDig...   INFO Finalizing TileDigitsContByteStreamTool successfuly
@@ -637,18 +633,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=  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
+cObjR_ALL            INFO Time User   : Tot=  0.5  [s] Ave/Min/Max=    0.25(+-    0.25)/       0/     0.5  [s] #=  2
+cObj_ALL             INFO Time User   : Tot= 0.55  [s] Ave/Min/Max=  0.0423(+-   0.138)/       0/    0.52  [s] #= 13
+ChronoStatSvc        INFO Time User   : Tot= 10.7  [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"
-Wed Jun  3 16:10:29 PDT 2020
+Tue Oct  6 19:57:54 CEST 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1607]
+Py:Athena            INFO using release [WorkDir-22.0.19] [x86_64-centos7-gcc8-opt] [master-refs/ea3e66422c4] -- built on [2020-10-06T1923]
 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 +653,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 5530 configurables from 19 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 10 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.15
+EventInfoMgtInit: Got release version  Athena-22.0.19
 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
@@ -674,29 +670,24 @@ Py:TileConditions_jobOptions.py    INFO Adjusting TileInfo to return cell noise
 Py:TileConditions_jobOptions.py    INFO Setting 10-bit ADC configuration
 Py:TileInfoConf.     INFO Setting 10-bit Tile ADC
 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 v33r1)
-                                          running on zeus on Wed Jun  3 16:10:38 2020
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on aibuild028.cern.ch on Tue Oct  6 19:58:05 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 7378 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 6906 CLIDRegistry entries for module ALL
 CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc                                         INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
-AthenaPoolCnvSvc                                    INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 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 ]
+DBReplicaSvc                                        INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc                                        INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc                                        INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc                                             INFO Successfully setup replica sorting algorithm
 PoolSvc                                             INFO Setting up APR FileCatalog and Streams
 PoolSvc                                          WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -707,7 +698,7 @@ DbSession                                           INFO     Open     DbSession
 Domain[ROOT_All]                                    INFO >   Access   DbDomain     READ      [ROOT_All] 
 ToolSvc.ByteStreamMetadataTool                      INFO Initializing ToolSvc.ByteStreamMetadataTool - package version ByteStreamCnvSvc-00-00-00
 MetaDataSvc                                         INFO Found MetaDataTools = PublicToolHandleArray(['IOVDbMetaDataTool','ByteStreamMetadataTool'])
-IOVDbSvc                                            INFO Opened read transaction for POOL PersistencySvc
+OutputStreamSequencerSvc                            INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 IOVDbSvc                                            INFO Only 5 POOL conditions files will be open at once
 IOVDbSvc                                            INFO Cache alignment will be done in 3 slices
 IOVDbSvc                                            INFO Global tag: OFLCOND-RUN12-SDR-35 set from joboptions
@@ -717,11 +708,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
+ClassIDSvc                                          INFO  getRegistryEntries: read 2841 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 268 CLIDRegistry entries for module ALL
-ClassIDSvc                                          INFO  getRegistryEntries: read 2575 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 273 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 2643 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 +731,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 18 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 20 CLIDRegistry entries for module ALL
 DetDescrCnvSvc                                      INFO  initializing 
 DetDescrCnvSvc                                      INFO Found DetectorStore service
 DetDescrCnvSvc                                      INFO  filling proxies for detector managers 
@@ -831,7 +822,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 2902 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 2914 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 +831,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= 25364Kb 	 Time = 0.72S
+GeoModelSvc                                         INFO GeoModelSvc.LArDetectorToolNV	 SZ= 24356Kb 	 Time = 0.66S
 GeoModelSvc.TileDetectorTool                        INFO  Entering TileDetectorTool::create()
 TileDddbManager                                     INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager                                     INFO n_tiglob = 5
@@ -851,7 +842,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  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour                                       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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 +854,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 /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
+LArFCAL_Base_ID                                     INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID                                     INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID                                     INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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,8 +891,8 @@ 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.21S
-ClassIDSvc                                          INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
+GeoModelSvc                                         INFO GeoModelSvc.TileDetectorTool	 SZ= 4600Kb 	 Time = 0.18S
+ClassIDSvc                                          INFO  getRegistryEntries: read 67 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
 CaloIDHelper_IDDetDescrCnv                          INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
@@ -911,10 +902,10 @@ 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 4295 CLIDRegistry entries for module ALL
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 4417 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
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 379 CLIDRegistry entries for module ALL
 CondInputLoader                                0    INFO Initializing CondInputLoader...
 CondInputLoader                                0    INFO Adding base classes:
   +  ( 'CondAttrListCollection' , 'ConditionStore+/TILE/OFL02/CALIB/CES' )   ->
@@ -1010,12 +1001,13 @@ IOVDbSvc                                   0   0    INFO Opening COOL connection
 IOVDbFolder                                0   0    INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARAlign-IOVDEP-00 for folder /LAR/Align
 IOVDbFolder                                0   0    INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LArCellPositionShift-ideal for folder /LAR/LArCellPositionShift
 IOVDbSvc                                   0   0    INFO Disconnecting from COOLOFL_LAR/OFLP200
+IOVDbSvc                                   0   0    INFO Opened read transaction for POOL PersistencySvc
 Domain[ROOT_All]                           0   0    INFO ->  Access   DbDatabase   READ      [ROOT_All] 06C9EAE8-6F5B-E011-BAAA-003048F0E7AC
 Domain[ROOT_All]                           0   0    INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root
 RootDatabase.open                          0   0    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root File version:52200
 CaloMgrDetDescrCnv                         0   0    INFO in createObj: creating a Calo Detector Manager object in the detector store
 CaloIdMgrDetDescrCnv                       0   0    INFO in createObj: creating a CaloDescrManager object in the detector store
-ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 198 CLIDRegistry entries for module ALL
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 201 CLIDRegistry entries for module ALL
 CaloIDHelper_IDDetDescrCnv                 0   0    INFO in createObj: creating a CaloDM_ID helper object in the detector store
 CaloDM_ID                                  0   0    INFO initialize_from_dictionary
 AtlasDetectorID                            0   0    INFO initialize_from_dictionary - OK
@@ -1029,12 +1021,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 /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
+LArFCAL_Base_ID                            0   0    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour                              0   0    INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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,211 +1034,211 @@ 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 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
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 503 CLIDRegistry entries for module ALL
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 1812 CLIDRegistry entries for module ALL
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 92 CLIDRegistry entries for module ALL
 ToolSvc.TileROD_Decoder.TileL2Builder      0   0    INFO TileL2Builder initialization completed
 ToolSvc.TileDigitsContByteStreamTool       0   0    INFO Initializing TileDigitsContByteStreamTool
-AthenaHiveEventLoopMgr                     1   1    INFO   ===>>>  start processing event #1129665, run #204073 on slot 1,  0 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     2   2    INFO   ===>>>  start processing event #1131212, run #204073 on slot 2,  0 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     3   3    INFO   ===>>>  start processing event #1131086, run #204073 on slot 3,  0 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                     6   2    INFO   ===>>>  done processing event #1130716, run #204073 on slot 2,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     1   0    INFO   ===>>>  start processing event #1129665, run #204073 on slot 0,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     2   1    INFO   ===>>>  start processing event #1131212, run #204073 on slot 1,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     3   2    INFO   ===>>>  start processing event #1131086, run #204073 on slot 2,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     4   3    INFO   ===>>>  start processing event #1130272, run #204073 on slot 3,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     1   0    INFO   ===>>>  done processing event #1129665, run #204073 on slot 0,  2 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     2   1    INFO   ===>>>  done processing event #1131212, run #204073 on slot 1,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     3   2    INFO   ===>>>  done processing event #1131086, run #204073 on slot 2,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     5   0    INFO   ===>>>  start processing event #1131269, run #204073 on slot 0,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     6   1    INFO   ===>>>  start processing event #1130716, run #204073 on slot 1,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     7   2    INFO   ===>>>  start processing event #1132019, run #204073 on slot 2,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     4   3    INFO   ===>>>  done processing event #1130272, 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   1    INFO   ===>>>  done processing event #1130716, run #204073 on slot 1,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     8   0    INFO   ===>>>  start processing event #1132092, run #204073 on slot 0,  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   3    INFO   ===>>>  done processing event #1132092, run #204073 on slot 3,  9 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    10   3    INFO   ===>>>  start processing event #1134553, run #204073 on slot 3,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     7   2    INFO   ===>>>  done processing event #1132019, run #204073 on slot 2,  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                    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                    13   2    INFO   ===>>>  start processing event #1131152, run #204073 on slot 2,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    10   3    INFO   ===>>>  done processing event #1134553, run #204073 on slot 3,  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   ===>>>  start processing event #1130142, run #204073 on slot 0,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    15   1    INFO   ===>>>  start processing event #1132770, run #204073 on slot 1,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    16   3    INFO   ===>>>  start processing event #1132365, run #204073 on slot 3,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    13   2    INFO   ===>>>  done processing event #1131152, run #204073 on slot 2,  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   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                    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                    17   0    INFO   ===>>>  start processing event #1136791, run #204073 on slot 0,  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                    16   3    INFO   ===>>>  done processing event #1132365, run #204073 on slot 3,  17 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    17   0    INFO   ===>>>  done processing event #1136791, run #204073 on slot 0,  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                    19   0    INFO   ===>>>  done processing event #1132067, run #204073 on slot 0,  20 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                    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                    27   3    INFO   ===>>>  start processing event #1139599, run #204073 on slot 3,  24 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                    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                    27   3    INFO   ===>>>  done processing event #1139599, run #204073 on slot 3,  28 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                    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                    32   1    INFO   ===>>>  start processing event #1139927, run #204073 on slot 1,  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   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                    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                    32   1    INFO   ===>>>  done processing event #1139927, 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                    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   ===>>>  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                    34   0    INFO   ===>>>  done processing event #1140039, run #204073 on slot 0,  35 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                    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                    39   3    INFO   ===>>>  start processing event #1143097, 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                    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                    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                    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   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                    46   0    INFO   ===>>>  start processing event #1144170, run #204073 on slot 0,  44 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    47   2    INFO   ===>>>  start processing event #1145987, run #204073 on slot 2,  44 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    44   1    INFO   ===>>>  done processing event #1141705, run #204073 on slot 1,  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                    48   0    INFO   ===>>>  start processing event #1145633, run #204073 on slot 0,  47 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    49   1    INFO   ===>>>  start processing event #1135005, run #204073 on slot 1,  47 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    50   3    INFO   ===>>>  start processing event #1142167, run #204073 on slot 3,  47 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    47   2    INFO   ===>>>  done processing event #1145987, run #204073 on slot 2,  48 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    48   0    INFO   ===>>>  done processing event #1145633, run #204073 on slot 0,  49 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    49   1    INFO   ===>>>  done processing event #1135005, run #204073 on slot 1,  50 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    51   0    INFO   ===>>>  start processing event #1144646, run #204073 on slot 0,  50 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    52   1    INFO   ===>>>  start processing event #1145027, run #204073 on slot 1,  50 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    53   2    INFO   ===>>>  start processing event #1144112, run #204073 on slot 2,  50 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    50   3    INFO   ===>>>  done processing event #1142167, run #204073 on slot 3,  51 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    51   0    INFO   ===>>>  done processing event #1144646, run #204073 on slot 0,  52 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    52   1    INFO   ===>>>  done processing event #1145027, run #204073 on slot 1,  53 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    54   0    INFO   ===>>>  start processing event #1138485, run #204073 on slot 0,  53 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    55   1    INFO   ===>>>  start processing event #1144565, run #204073 on slot 1,  53 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    56   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                    56   3    INFO   ===>>>  start processing event #1139498, run #204073 on slot 3,  53 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    53   2    INFO   ===>>>  done processing event #1144112, run #204073 on slot 2,  54 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    54   0    INFO   ===>>>  done processing event #1138485, run #204073 on slot 0,  55 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    57   0    INFO   ===>>>  start processing event #1136546, run #204073 on slot 0,  55 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    58   2    INFO   ===>>>  start processing event #1143799, run #204073 on slot 2,  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                    56   3    INFO   ===>>>  done processing event #1139498, run #204073 on slot 3,  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   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                    66   2    INFO   ===>>>  done processing event #1144808, run #204073 on slot 2,  67 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    59   0    INFO   ===>>>  start processing event #1142877, run #204073 on slot 0,  58 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    60   1    INFO   ===>>>  start processing event #1149894, run #204073 on slot 1,  58 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    61   3    INFO   ===>>>  start processing event #1145364, run #204073 on slot 3,  58 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    58   2    INFO   ===>>>  done processing event #1143799, run #204073 on slot 2,  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   1    INFO   ===>>>  done processing event #1149894, run #204073 on slot 1,  61 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    62   0    INFO   ===>>>  start processing event #1143770, run #204073 on slot 0,  61 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    63   1    INFO   ===>>>  start processing event #1148361, run #204073 on slot 1,  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   3    INFO   ===>>>  done processing event #1145364, run #204073 on slot 3,  62 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    62   0    INFO   ===>>>  done processing event #1143770, run #204073 on slot 0,  63 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    63   1    INFO   ===>>>  done processing event #1148361, run #204073 on slot 1,  64 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    65   0    INFO   ===>>>  start processing event #1138948, run #204073 on slot 0,  64 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    66   1    INFO   ===>>>  start processing event #1144808, run #204073 on slot 1,  64 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    67   3    INFO   ===>>>  start processing event #1145832, run #204073 on slot 3,  64 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    64   2    INFO   ===>>>  done processing event #1148167, run #204073 on slot 2,  65 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    65   0    INFO   ===>>>  done processing event #1138948, run #204073 on slot 0,  66 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    66   1    INFO   ===>>>  done processing event #1144808, run #204073 on slot 1,  67 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    68   0    INFO   ===>>>  start processing event #1153100, run #204073 on slot 0,  67 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    69   1    INFO   ===>>>  start processing event #1142524, run #204073 on slot 1,  67 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    70   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   3    INFO   ===>>>  done processing event #1153100, run #204073 on slot 3,  69 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    67   3    INFO   ===>>>  done processing event #1145832, run #204073 on slot 3,  68 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    68   0    INFO   ===>>>  done processing event #1153100, run #204073 on slot 0,  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                    74   0    INFO   ===>>>  start processing event #1152242, run #204073 on slot 0,  73 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    75   1    INFO   ===>>>  start processing event #1148416, run #204073 on slot 1,  73 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    76   2    INFO   ===>>>  start processing event #1142753, run #204073 on slot 2,  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   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                    81   3    INFO   ===>>>  done processing event #1142485, run #204073 on slot 3,  82 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    75   1    INFO   ===>>>  done processing event #1148416, run #204073 on slot 1,  76 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    77   0    INFO   ===>>>  start processing event #1149997, run #204073 on slot 0,  76 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    78   1    INFO   ===>>>  start processing event #1151617, run #204073 on slot 1,  76 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    79   3    INFO   ===>>>  start processing event #1149794, run #204073 on slot 3,  76 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    76   2    INFO   ===>>>  done processing event #1142753, run #204073 on slot 2,  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   1    INFO   ===>>>  done processing event #1151617, run #204073 on slot 1,  79 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    80   0    INFO   ===>>>  start processing event #1152504, run #204073 on slot 0,  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   2    INFO   ===>>>  start processing event #1151364, run #204073 on slot 2,  79 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    79   3    INFO   ===>>>  done processing event #1149794, run #204073 on slot 3,  80 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    80   0    INFO   ===>>>  done processing event #1152504, run #204073 on slot 0,  81 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    81   1    INFO   ===>>>  done processing event #1142485, run #204073 on slot 1,  82 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    83   0    INFO   ===>>>  start processing event #1143901, run #204073 on slot 0,  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   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                    82   2    INFO   ===>>>  done processing event #1151364, run #204073 on slot 2,  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   1    INFO   ===>>>  done processing event #1153979, run #204073 on slot 1,  85 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    86   0    INFO   ===>>>  start processing event #1152633, run #204073 on slot 0,  85 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    87   1    INFO   ===>>>  start processing event #1155482, run #204073 on slot 1,  85 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    88   2    INFO   ===>>>  start processing event #1150472, run #204073 on slot 2,  85 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    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   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                    93   3    INFO   ===>>>  done processing event #1156381, run #204073 on slot 3,  94 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    87   1    INFO   ===>>>  done processing event #1155482, run #204073 on slot 1,  88 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    89   0    INFO   ===>>>  start processing event #1140275, run #204073 on slot 0,  88 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    90   1    INFO   ===>>>  start processing event #1145882, run #204073 on slot 1,  88 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    91   3    INFO   ===>>>  start processing event #1151732, run #204073 on slot 3,  88 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    88   2    INFO   ===>>>  done processing event #1150472, run #204073 on slot 2,  89 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    89   0    INFO   ===>>>  done processing event #1140275, run #204073 on slot 0,  90 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    90   1    INFO   ===>>>  done processing event #1145882, run #204073 on slot 1,  91 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    92   0    INFO   ===>>>  start processing event #1137896, run #204073 on slot 0,  91 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    93   1    INFO   ===>>>  start processing event #1156381, run #204073 on slot 1,  91 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    94   2    INFO   ===>>>  start processing event #1149161, run #204073 on slot 2,  91 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    91   3    INFO   ===>>>  done processing event #1151732, run #204073 on slot 3,  92 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    92   0    INFO   ===>>>  done processing event #1137896, run #204073 on slot 0,  93 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    93   1    INFO   ===>>>  done processing event #1156381, run #204073 on slot 1,  94 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    95   0    INFO   ===>>>  start processing event #1153794, run #204073 on slot 0,  94 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    96   1    INFO   ===>>>  start processing event #1151312, run #204073 on slot 1,  94 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    97   3    INFO   ===>>>  start processing event #1148893, run #204073 on slot 3,  94 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    94   0    INFO   ===>>>  done processing event #1149161, run #204073 on slot 0,  95 events processed so far  <<<===
-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                    94   2    INFO   ===>>>  done processing event #1149161, run #204073 on slot 2,  95 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    95   0    INFO   ===>>>  done processing event #1153794, run #204073 on slot 0,  96 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    96   1    INFO   ===>>>  done processing event #1151312, run #204073 on slot 1,  97 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    98   0    INFO   ===>>>  start processing event #1156938, run #204073 on slot 0,  97 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    99   1    INFO   ===>>>  start processing event #1156351, run #204073 on slot 1,  97 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    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
+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): 5.79007
 /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...
@@ -1263,7 +1255,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.65 ))s
+IOVDbFolder                                         INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.04 ))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
@@ -1275,10 +1267,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.54 ))s
-IOVDbSvc                                            INFO  bytes in ((      1.19 ))s
+IOVDbFolder                                         INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     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 COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     1.19 ))s
+IOVDbSvc                                            INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.05 ))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
@@ -1289,9 +1281,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=  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
+cObjR_ALL                                           INFO Time User   : Tot= 0.51  [s] Ave/Min/Max=   0.255(+-   0.245)/    0.01/     0.5  [s] #=  2
+cObj_ALL                                            INFO Time User   : Tot= 0.56  [s] Ave/Min/Max=    0.28(+-    0.24)/    0.04/    0.52  [s] #=  2
+ChronoStatSvc                                       INFO Time User   : Tot= 11.3  [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 ca5eaeeea7e3..a0b772d19e8e 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/share/TileL2ContByteStreamCnv_test.ref
+++ b/TileCalorimeter/TileSvc/TileByteStream/share/TileL2ContByteStreamCnv_test.ref
@@ -1,16 +1,16 @@
-Wed Jun  3 16:17:59 PDT 2020
+Tue Oct  6 20:00:19 CEST 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1607]
+Py:Athena            INFO using release [WorkDir-22.0.19] [x86_64-centos7-gcc8-opt] [master-refs/ea3e66422c4] -- built on [2020-10-06T1923]
 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 5530 configurables from 19 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 10 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.15
+EventInfoMgtInit: Got release version  Athena-22.0.19
 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
@@ -25,28 +25,23 @@ Py:TileConditions_jobOptions.py    INFO Adjusting TileInfo to return cell noise
 Py:TileConditions_jobOptions.py    INFO Setting 10-bit ADC configuration
 Py:TileInfoConf.     INFO Setting 10-bit Tile ADC
 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
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
-                                          running on zeus on Wed Jun  3 16:18:07 2020
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on aibuild028.cern.ch on Tue Oct  6 20:00:32 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 7006 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 6906 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
-AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 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 ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -57,7 +52,7 @@ DbSession            INFO     Open     DbSession
 Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
 ToolSvc.ByteStr...   INFO Initializing ToolSvc.ByteStreamMetadataTool - package version ByteStreamCnvSvc-00-00-00
 MetaDataSvc          INFO Found MetaDataTools = PublicToolHandleArray(['IOVDbMetaDataTool','ByteStreamMetadataTool'])
-IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
+OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
 IOVDbSvc             INFO Cache alignment will be done in 3 slices
 IOVDbSvc             INFO Global tag: OFLCOND-RUN12-SDR-35 set from joboptions
@@ -67,10 +62,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
+ClassIDSvc           INFO  getRegistryEntries: read 2841 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 268 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 273 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,8 +84,8 @@ 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 2586 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 18 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2653 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 20 CLIDRegistry entries for module ALL
 DetDescrCnvSvc       INFO  initializing 
 DetDescrCnvSvc       INFO Found DetectorStore service
 DetDescrCnvSvc       INFO  filling proxies for detector managers 
@@ -181,7 +176,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 2902 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2914 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 +185,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= 24340Kb 	 Time = 0.71S
+GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 25380Kb 	 Time = 0.57S
 GeoModelSvc.Til...   INFO  Entering TileDetectorTool::create()
 TileDddbManager      INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager      INFO n_tiglob = 5
@@ -201,7 +196,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  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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 +208,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 /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
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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,8 +245,8 @@ 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.18S
-ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
+GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 3576Kb 	 Time = 0.2S
+ClassIDSvc           INFO  getRegistryEntries: read 67 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
 CaloIDHelper_ID...   INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
@@ -261,7 +256,7 @@ TileCablingSvc       INFO RUN2 ATLAS geometry flag detected for geometry: ATLAS-
 TileCablingSvc       INFO Cabling for RUN2 (2014-2017) ATLAS geometry is set via jobOptions 
 TileCablingSvc       INFO Setting Cabling type to 4
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 265 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 270 CLIDRegistry entries for module ALL
 CondInputLoader      INFO Initializing CondInputLoader...
 CondInputLoader      INFO Adding base classes:
   +  ( 'CondAttrListCollection' , 'ConditionStore+/TILE/OFL02/CALIB/CES' )   ->
@@ -305,7 +300,7 @@ TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCond
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlEms) for folder: "/TILE/OFL02/CALIB/EMS"
 TileSampleNoise...   INFO Creating TileCondProxyCool(TileSampleNoiseCondAlg.TileCondProxyCool_NoiseSample) for folder: "/TILE/OFL02/NOISE/SAMPLE"
 TileTimingCondA...   INFO Creating TileCondProxyCool(TileTimingCondAlg.TileCondProxyCool_AdcOffset) for folder: "/TILE/OFL02/TIME/CHANNELOFFSET/PHY"
-ClassIDSvc           INFO  getRegistryEntries: read 4030 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 4147 CLIDRegistry entries for module ALL
 PyComponentMgr       INFO Initializing PyComponentMgr...
 Finalizer            INFO Initializing Finalizer...
 ByteStreamInputSvc   INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00
@@ -316,7 +311,7 @@ ROBDataProviderSvc   INFO  ---> Filter out Sub Detector ROBs by Status Code: # S
 EventSelector        INFO reinitialization...
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
-ClassIDSvc           INFO  getRegistryEntries: read 425 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 379 CLIDRegistry entries for module ALL
 ByteStreamInputSvc   INFO Picked valid file: /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_JetTauEtmiss.merge.RAW._lb0144._SFO-5._0001.1
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CES'
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/LIN'
@@ -341,12 +336,13 @@ IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARAlign-IOVDEP-00 for folder /LAR/Align
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LArCellPositionShift-ideal for folder /LAR/LArCellPositionShift
 IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
+IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 06C9EAE8-6F5B-E011-BAAA-003048F0E7AC
 Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root
 RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root File version:52200
 CaloMgrDetDescrCnv   INFO in createObj: creating a Calo Detector Manager object in the detector store
 CaloIdMgrDetDes...   INFO in createObj: creating a CaloDescrManager object in the detector store
-ClassIDSvc           INFO  getRegistryEntries: read 198 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 201 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a CaloDM_ID helper object in the detector store
 CaloDM_ID            INFO initialize_from_dictionary
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -360,12 +356,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 /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
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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 
@@ -396,8 +392,8 @@ 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 2266 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 91 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2315 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 92 CLIDRegistry entries for module ALL
 ToolSvc.TileROD...   INFO TileL2Builder initialization completed
 ToolSvc.TileL2C...   INFO Initializing TileL2ContByteStreamTool
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1129572, run #204073 1 events processed so far  <<<===
@@ -612,23 +608,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.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
+IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.02 ))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.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.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.02 ))s
+IOVDbFolder          INFO Folder /TILE/ONL01/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.00 ))s
+IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.02 ))s
+IOVDbSvc             INFO  bytes in ((      0.37 ))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.99 ))s
-IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     4.85 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.04 ))s
+IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     0.33 ))s
 AthDictLoaderSvc     INFO in finalize...
 ToolSvc              INFO Removing all tools created by ToolSvc
 ToolSvc.TileROD...   INFO Finalizing
@@ -636,18 +632,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=  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
+cObjR_ALL            INFO Time User   : Tot=  0.5  [s] Ave/Min/Max=    0.25(+-    0.25)/       0/     0.5  [s] #=  2
+cObj_ALL             INFO Time User   : Tot= 0.55  [s] Ave/Min/Max=  0.0423(+-   0.138)/       0/    0.52  [s] #= 13
+ChronoStatSvc        INFO Time User   : Tot= 9.11  [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"
-Wed Jun  3 16:18:31 PDT 2020
+Tue Oct  6 20:00:46 CEST 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1607]
+Py:Athena            INFO using release [WorkDir-22.0.19] [x86_64-centos7-gcc8-opt] [master-refs/ea3e66422c4] -- built on [2020-10-06T1923]
 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 +652,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 5530 configurables from 19 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 10 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.15
+EventInfoMgtInit: Got release version  Athena-22.0.19
 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
@@ -673,29 +669,24 @@ Py:TileConditions_jobOptions.py    INFO Adjusting TileInfo to return cell noise
 Py:TileConditions_jobOptions.py    INFO Setting 10-bit ADC configuration
 Py:TileInfoConf.     INFO Setting 10-bit Tile ADC
 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 v33r1)
-                                          running on zeus on Wed Jun  3 16:18:37 2020
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on aibuild028.cern.ch on Tue Oct  6 20:00: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 7378 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 6906 CLIDRegistry entries for module ALL
 CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc                                         INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
-AthenaPoolCnvSvc                                    INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 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 ]
+DBReplicaSvc                                        INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc                                        INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc                                        INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc                                             INFO Successfully setup replica sorting algorithm
 PoolSvc                                             INFO Setting up APR FileCatalog and Streams
 PoolSvc                                          WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -706,7 +697,7 @@ DbSession                                           INFO     Open     DbSession
 Domain[ROOT_All]                                    INFO >   Access   DbDomain     READ      [ROOT_All] 
 ToolSvc.ByteStreamMetadataTool                      INFO Initializing ToolSvc.ByteStreamMetadataTool - package version ByteStreamCnvSvc-00-00-00
 MetaDataSvc                                         INFO Found MetaDataTools = PublicToolHandleArray(['IOVDbMetaDataTool','ByteStreamMetadataTool'])
-IOVDbSvc                                            INFO Opened read transaction for POOL PersistencySvc
+OutputStreamSequencerSvc                            INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 IOVDbSvc                                            INFO Only 5 POOL conditions files will be open at once
 IOVDbSvc                                            INFO Cache alignment will be done in 3 slices
 IOVDbSvc                                            INFO Global tag: OFLCOND-RUN12-SDR-35 set from joboptions
@@ -716,10 +707,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
+ClassIDSvc                                          INFO  getRegistryEntries: read 2841 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 268 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 273 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,8 +729,8 @@ 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 2586 CLIDRegistry entries for module ALL
-ClassIDSvc                                          INFO  getRegistryEntries: read 18 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 2653 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 20 CLIDRegistry entries for module ALL
 DetDescrCnvSvc                                      INFO  initializing 
 DetDescrCnvSvc                                      INFO Found DetectorStore service
 DetDescrCnvSvc                                      INFO  filling proxies for detector managers 
@@ -830,7 +821,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 2902 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 2914 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 +830,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= 25364Kb 	 Time = 0.68S
+GeoModelSvc                                         INFO GeoModelSvc.LArDetectorToolNV	 SZ= 25380Kb 	 Time = 0.61S
 GeoModelSvc.TileDetectorTool                        INFO  Entering TileDetectorTool::create()
 TileDddbManager                                     INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager                                     INFO n_tiglob = 5
@@ -850,7 +841,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  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour                                       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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 +853,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 /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
+LArFCAL_Base_ID                                     INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID                                     INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID                                     INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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 +891,7 @@ GeoModelSvc.TileDetectorTool                        INFO  Global positioning of
 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.15S
-ClassIDSvc                                          INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 67 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
 CaloIDHelper_IDDetDescrCnv                          INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
@@ -910,10 +901,10 @@ 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 4295 CLIDRegistry entries for module ALL
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 4417 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
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 379 CLIDRegistry entries for module ALL
 CondInputLoader                                0    INFO Initializing CondInputLoader...
 CondInputLoader                                0    INFO Adding base classes:
   +  ( 'CondAttrListCollection' , 'ConditionStore+/TILE/OFL02/CALIB/CES' )   ->
@@ -1007,12 +998,13 @@ IOVDbSvc                                   0   0    INFO Opening COOL connection
 IOVDbFolder                                0   0    INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARAlign-IOVDEP-00 for folder /LAR/Align
 IOVDbFolder                                0   0    INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LArCellPositionShift-ideal for folder /LAR/LArCellPositionShift
 IOVDbSvc                                   0   0    INFO Disconnecting from COOLOFL_LAR/OFLP200
+IOVDbSvc                                   0   0    INFO Opened read transaction for POOL PersistencySvc
 Domain[ROOT_All]                           0   0    INFO ->  Access   DbDatabase   READ      [ROOT_All] 06C9EAE8-6F5B-E011-BAAA-003048F0E7AC
 Domain[ROOT_All]                           0   0    INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root
 RootDatabase.open                          0   0    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root File version:52200
 CaloMgrDetDescrCnv                         0   0    INFO in createObj: creating a Calo Detector Manager object in the detector store
 CaloIdMgrDetDescrCnv                       0   0    INFO in createObj: creating a CaloDescrManager object in the detector store
-ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 198 CLIDRegistry entries for module ALL
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 201 CLIDRegistry entries for module ALL
 CaloIDHelper_IDDetDescrCnv                 0   0    INFO in createObj: creating a CaloDM_ID helper object in the detector store
 CaloDM_ID                                  0   0    INFO initialize_from_dictionary
 AtlasDetectorID                            0   0    INFO initialize_from_dictionary - OK
@@ -1026,12 +1018,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 /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
+LArFCAL_Base_ID                            0   0    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour                              0   0    INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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 
@@ -1039,211 +1031,211 @@ 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 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
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 503 CLIDRegistry entries for module ALL
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 1812 CLIDRegistry entries for module ALL
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 92 CLIDRegistry entries for module ALL
 ToolSvc.TileROD_Decoder.TileL2Builder      0   0    INFO TileL2Builder initialization completed
 ToolSvc.TileL2ContByteStreamTool           0   0    INFO Initializing TileL2ContByteStreamTool
-AthenaHiveEventLoopMgr                     1   1    INFO   ===>>>  start processing event #1129665, run #204073 on slot 1,  0 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     2   2    INFO   ===>>>  start processing event #1131212, run #204073 on slot 2,  0 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     3   3    INFO   ===>>>  start processing event #1131086, run #204073 on slot 3,  0 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                     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                     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                    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                    16   0    INFO   ===>>>  done processing event #1132365, run #204073 on slot 0,  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                    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                    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                    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                    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                    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                    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                    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                    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                    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                    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                    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                    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                    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                    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                    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                    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                    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                    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                    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                    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): 4.16024
+AthenaHiveEventLoopMgr                     1   0    INFO   ===>>>  start processing event #1129665, run #204073 on slot 0,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     2   1    INFO   ===>>>  start processing event #1131212, run #204073 on slot 1,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     3   2    INFO   ===>>>  start processing event #1131086, run #204073 on slot 2,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     4   3    INFO   ===>>>  start processing event #1130272, run #204073 on slot 3,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     1   0    INFO   ===>>>  done processing event #1129665, run #204073 on slot 0,  2 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     2   1    INFO   ===>>>  done processing event #1131212, run #204073 on slot 1,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     3   2    INFO   ===>>>  done processing event #1131086, run #204073 on slot 2,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     5   0    INFO   ===>>>  start processing event #1131269, run #204073 on slot 0,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     6   1    INFO   ===>>>  start processing event #1130716, run #204073 on slot 1,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     7   2    INFO   ===>>>  start processing event #1132019, run #204073 on slot 2,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     4   3    INFO   ===>>>  done processing event #1130272, 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   1    INFO   ===>>>  done processing event #1130716, run #204073 on slot 1,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     8   0    INFO   ===>>>  start processing event #1132092, run #204073 on slot 0,  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   3    INFO   ===>>>  start processing event #1134553, run #204073 on slot 3,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     7   2    INFO   ===>>>  done processing event #1132019, run #204073 on slot 2,  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                    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   2    INFO   ===>>>  start processing event #1131152, run #204073 on slot 2,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    10   3    INFO   ===>>>  done processing event #1134553, run #204073 on slot 3,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    11   0    INFO   ===>>>  done processing event #1130999, run #204073 on slot 0,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    12   1    INFO   ===>>>  done processing event #1133461, run #204073 on slot 1,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    14   0    INFO   ===>>>  start processing event #1130142, run #204073 on slot 0,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    15   1    INFO   ===>>>  start processing event #1132770, run #204073 on slot 1,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    16   3    INFO   ===>>>  start processing event #1132365, run #204073 on slot 3,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    13   2    INFO   ===>>>  done processing event #1131152, run #204073 on slot 2,  14 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    14   0    INFO   ===>>>  done processing event #1130142, run #204073 on slot 0,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    15   1    INFO   ===>>>  done processing event #1132770, run #204073 on slot 1,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    17   0    INFO   ===>>>  start processing event #1136791, run #204073 on slot 0,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    18   1    INFO   ===>>>  start processing event #1133781, run #204073 on slot 1,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    19   2    INFO   ===>>>  start processing event #1132067, run #204073 on slot 2,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    16   3    INFO   ===>>>  done processing event #1132365, run #204073 on slot 3,  17 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    17   0    INFO   ===>>>  done processing event #1136791, run #204073 on slot 0,  18 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    18   1    INFO   ===>>>  done processing event #1133781, run #204073 on slot 1,  19 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    20   0    INFO   ===>>>  start processing event #1138637, run #204073 on slot 0,  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   2    INFO   ===>>>  done processing event #1132067, run #204073 on slot 2,  20 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    20   0    INFO   ===>>>  done processing event #1138637, 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                    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                    24   1    INFO   ===>>>  done processing event #1139127, run #204073 on slot 1,  25 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    26   0    INFO   ===>>>  start processing event #1137117, run #204073 on slot 0,  25 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    27   1    INFO   ===>>>  start processing event #1139599, run #204073 on slot 1,  25 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    28   3    INFO   ===>>>  start processing event #1140314, run #204073 on slot 3,  25 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    25   2    INFO   ===>>>  done processing event #1141272, 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   1    INFO   ===>>>  done processing event #1139599, run #204073 on slot 1,  28 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    29   0    INFO   ===>>>  start processing event #1133685, run #204073 on slot 0,  28 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    30   1    INFO   ===>>>  start processing event #1143279, run #204073 on slot 1,  28 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    31   2    INFO   ===>>>  start processing event #1137563, run #204073 on slot 2,  28 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    28   3    INFO   ===>>>  done processing event #1140314, run #204073 on slot 3,  29 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    29   0    INFO   ===>>>  done processing event #1133685, run #204073 on slot 0,  30 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    30   1    INFO   ===>>>  done processing event #1143279, run #204073 on slot 1,  31 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    32   0    INFO   ===>>>  start processing event #1139927, run #204073 on slot 0,  31 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    33   1    INFO   ===>>>  start processing event #1141197, run #204073 on slot 1,  31 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    34   3    INFO   ===>>>  start processing event #1140039, run #204073 on slot 3,  31 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    31   2    INFO   ===>>>  done processing event #1137563, run #204073 on slot 2,  32 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    32   0    INFO   ===>>>  done processing event #1139927, 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                    35   0    INFO   ===>>>  start processing event #1142531, run #204073 on slot 0,  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   3    INFO   ===>>>  done processing event #1140039, run #204073 on slot 3,  35 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    35   0    INFO   ===>>>  done processing event #1142531, run #204073 on slot 0,  36 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    36   1    INFO   ===>>>  done processing event #1139475, run #204073 on slot 1,  37 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    38   0    INFO   ===>>>  start processing event #1143765, run #204073 on slot 0,  37 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    39   1    INFO   ===>>>  start processing event #1143097, run #204073 on slot 1,  37 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    40   3    INFO   ===>>>  start processing event #1134147, run #204073 on slot 3,  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                    39   1    INFO   ===>>>  done processing event #1143097, run #204073 on slot 1,  40 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    41   0    INFO   ===>>>  start processing event #1137156, run #204073 on slot 0,  40 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    42   1    INFO   ===>>>  start processing event #1136377, run #204073 on slot 1,  40 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    43   2    INFO   ===>>>  start processing event #1137842, run #204073 on slot 2,  40 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    40   3    INFO   ===>>>  done processing event #1134147, 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                    42   1    INFO   ===>>>  done processing event #1136377, run #204073 on slot 1,  43 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    44   0    INFO   ===>>>  start processing event #1141705, run #204073 on slot 0,  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   3    INFO   ===>>>  start processing event #1144170, run #204073 on slot 3,  43 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    43   2    INFO   ===>>>  done processing event #1137842, run #204073 on slot 2,  44 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    44   0    INFO   ===>>>  done processing event #1141705, 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                    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   2    INFO   ===>>>  start processing event #1135005, run #204073 on slot 2,  46 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    46   3    INFO   ===>>>  done processing event #1144170, run #204073 on slot 3,  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   3    INFO   ===>>>  start processing event #1145027, run #204073 on slot 3,  49 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    49   2    INFO   ===>>>  done processing event #1135005, run #204073 on slot 2,  50 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    50   0    INFO   ===>>>  done processing event #1142167, run #204073 on slot 0,  51 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    51   1    INFO   ===>>>  done processing event #1144646, run #204073 on slot 1,  52 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    53   0    INFO   ===>>>  start processing event #1144112, run #204073 on slot 0,  52 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    54   1    INFO   ===>>>  start processing event #1138485, run #204073 on slot 1,  52 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    55   2    INFO   ===>>>  start processing event #1144565, run #204073 on slot 2,  52 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    52   3    INFO   ===>>>  done processing event #1145027, run #204073 on slot 3,  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   1    INFO   ===>>>  done processing event #1138485, run #204073 on slot 1,  55 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    56   0    INFO   ===>>>  start processing event #1139498, run #204073 on slot 0,  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   2    INFO   ===>>>  done processing event #1144565, run #204073 on slot 2,  56 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    56   0    INFO   ===>>>  done processing event #1139498, run #204073 on slot 0,  57 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    57   1    INFO   ===>>>  done processing event #1136546, run #204073 on slot 1,  58 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    59   0    INFO   ===>>>  start processing event #1142877, run #204073 on slot 0,  58 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    60   1    INFO   ===>>>  start processing event #1149894, run #204073 on slot 1,  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   3    INFO   ===>>>  done processing event #1143799, 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   1    INFO   ===>>>  done processing event #1149894, run #204073 on slot 1,  61 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    62   0    INFO   ===>>>  start processing event #1143770, run #204073 on slot 0,  61 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    63   1    INFO   ===>>>  start processing event #1148361, run #204073 on slot 1,  61 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    64   3    INFO   ===>>>  start processing event #1148167, run #204073 on slot 3,  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   0    INFO   ===>>>  done processing event #1143770, run #204073 on slot 0,  63 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    63   1    INFO   ===>>>  done processing event #1148361, run #204073 on slot 1,  64 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    65   0    INFO   ===>>>  start processing event #1138948, run #204073 on slot 0,  64 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    66   1    INFO   ===>>>  start processing event #1144808, run #204073 on slot 1,  64 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    67   2    INFO   ===>>>  start processing event #1145832, run #204073 on slot 2,  64 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    64   3    INFO   ===>>>  done processing event #1148167, run #204073 on slot 3,  65 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    65   0    INFO   ===>>>  done processing event #1138948, run #204073 on slot 0,  66 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    66   1    INFO   ===>>>  done processing event #1144808, run #204073 on slot 1,  67 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    68   0    INFO   ===>>>  start processing event #1153100, run #204073 on slot 0,  67 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    69   1    INFO   ===>>>  start processing event #1142524, run #204073 on slot 1,  67 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    70   3    INFO   ===>>>  start processing event #1138294, run #204073 on slot 3,  67 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    67   2    INFO   ===>>>  done processing event #1145832, run #204073 on slot 2,  68 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    68   0    INFO   ===>>>  done processing event #1153100, run #204073 on slot 0,  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   2    INFO   ===>>>  start processing event #1151102, run #204073 on slot 2,  70 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    70   3    INFO   ===>>>  done processing event #1138294, 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   1    INFO   ===>>>  done processing event #1149424, run #204073 on slot 1,  73 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    74   0    INFO   ===>>>  start processing event #1152242, run #204073 on slot 0,  73 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    75   1    INFO   ===>>>  start processing event #1148416, run #204073 on slot 1,  73 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    76   3    INFO   ===>>>  start processing event #1142753, run #204073 on slot 3,  73 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    73   2    INFO   ===>>>  done processing event #1151102, run #204073 on slot 2,  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   1    INFO   ===>>>  done processing event #1148416, run #204073 on slot 1,  76 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    77   0    INFO   ===>>>  start processing event #1149997, run #204073 on slot 0,  76 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    78   1    INFO   ===>>>  start processing event #1151617, run #204073 on slot 1,  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   3    INFO   ===>>>  done processing event #1142753, 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   1    INFO   ===>>>  done processing event #1151617, run #204073 on slot 1,  79 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    80   0    INFO   ===>>>  start processing event #1152504, run #204073 on slot 0,  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   2    INFO   ===>>>  done processing event #1149794, run #204073 on slot 2,  80 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    80   0    INFO   ===>>>  done processing event #1152504, run #204073 on slot 0,  81 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    81   1    INFO   ===>>>  done processing event #1142485, run #204073 on slot 1,  82 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    83   0    INFO   ===>>>  start processing event #1143901, run #204073 on slot 0,  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   2    INFO   ===>>>  start processing event #1150212, run #204073 on slot 2,  82 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    82   3    INFO   ===>>>  done processing event #1151364, 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   1    INFO   ===>>>  done processing event #1153979, run #204073 on slot 1,  85 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    86   0    INFO   ===>>>  start processing event #1152633, run #204073 on slot 0,  85 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    87   1    INFO   ===>>>  start processing event #1155482, run #204073 on slot 1,  85 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    88   3    INFO   ===>>>  start processing event #1150472, run #204073 on slot 3,  85 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    85   2    INFO   ===>>>  done processing event #1150212, run #204073 on slot 2,  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   1    INFO   ===>>>  done processing event #1155482, run #204073 on slot 1,  88 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    89   0    INFO   ===>>>  start processing event #1140275, run #204073 on slot 0,  88 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    90   1    INFO   ===>>>  start processing event #1145882, run #204073 on slot 1,  88 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    91   2    INFO   ===>>>  start processing event #1151732, run #204073 on slot 2,  88 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    88   3    INFO   ===>>>  done processing event #1150472, run #204073 on slot 3,  89 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    89   0    INFO   ===>>>  done processing event #1140275, run #204073 on slot 0,  90 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    90   1    INFO   ===>>>  done processing event #1145882, run #204073 on slot 1,  91 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    92   0    INFO   ===>>>  start processing event #1137896, run #204073 on slot 0,  91 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    93   1    INFO   ===>>>  start processing event #1156381, run #204073 on slot 1,  91 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    94   3    INFO   ===>>>  start processing event #1149161, run #204073 on slot 3,  91 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    91   2    INFO   ===>>>  done processing event #1151732, run #204073 on slot 2,  92 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    92   0    INFO   ===>>>  done processing event #1137896, run #204073 on slot 0,  93 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    93   1    INFO   ===>>>  done processing event #1156381, run #204073 on slot 1,  94 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    95   0    INFO   ===>>>  start processing event #1153794, run #204073 on slot 0,  94 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    96   1    INFO   ===>>>  start processing event #1151312, run #204073 on slot 1,  94 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    97   2    INFO   ===>>>  start processing event #1148893, run #204073 on slot 2,  94 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    94   3    INFO   ===>>>  done processing event #1149161, run #204073 on slot 3,  95 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    95   0    INFO   ===>>>  done processing event #1153794, run #204073 on slot 0,  96 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    96   1    INFO   ===>>>  done processing event #1151312, run #204073 on slot 1,  97 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    98   0    INFO   ===>>>  start processing event #1156938, run #204073 on slot 0,  97 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    99   1    INFO   ===>>>  start processing event #1156351, run #204073 on slot 1,  97 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    97   2    INFO   ===>>>  done processing event #1148893, run #204073 on slot 2,  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   1    INFO   ===>>>  done processing event #1156351, run #204073 on slot 1,  100 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    99   1    INFO ---> Loop Finished (seconds): 5.77103
 /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 +1252,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.13 ))s
+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 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 +1264,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.07 ))s
-IOVDbSvc                                            INFO  bytes in ((      0.20 ))s
+IOVDbFolder                                         INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     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 COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.20 ))s
+IOVDbSvc                                            INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.05 ))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
@@ -1285,9 +1277,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=  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
+cObjR_ALL                                           INFO Time User   : Tot= 0.51  [s] Ave/Min/Max=   0.255(+-   0.255)/       0/    0.51  [s] #=  2
+cObj_ALL                                            INFO Time User   : Tot= 0.56  [s] Ave/Min/Max=    0.28(+-    0.25)/    0.03/    0.53  [s] #=  2
+ChronoStatSvc                                       INFO Time User   : Tot= 9.65  [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 a1560684b443..6be2e77d660e 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/share/TileLaserObjByteStreamCnv_test.ref
+++ b/TileCalorimeter/TileSvc/TileByteStream/share/TileLaserObjByteStreamCnv_test.ref
@@ -1,16 +1,16 @@
-Wed Jun  3 16:19:25 PDT 2020
+Tue Oct  6 20:01:15 CEST 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1607]
+Py:Athena            INFO using release [WorkDir-22.0.19] [x86_64-centos7-gcc8-opt] [master-refs/ea3e66422c4] -- built on [2020-10-06T1923]
 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 5530 configurables from 19 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 10 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.15
+EventInfoMgtInit: Got release version  Athena-22.0.19
 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
@@ -25,28 +25,23 @@ Py:TileConditions_jobOptions.py    INFO Adjusting TileInfo to return cell noise
 Py:TileConditions_jobOptions.py    INFO Setting 10-bit ADC configuration
 Py:TileInfoConf.     INFO Setting 10-bit Tile ADC
 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
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
-                                          running on zeus on Wed Jun  3 16:19:34 2020
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on aibuild028.cern.ch on Tue Oct  6 20:01:26 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 7006 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 6906 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
-AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 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 ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -57,7 +52,7 @@ DbSession            INFO     Open     DbSession
 Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
 ToolSvc.ByteStr...   INFO Initializing ToolSvc.ByteStreamMetadataTool - package version ByteStreamCnvSvc-00-00-00
 MetaDataSvc          INFO Found MetaDataTools = PublicToolHandleArray(['IOVDbMetaDataTool','ByteStreamMetadataTool'])
-IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
+OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
 IOVDbSvc             INFO Cache alignment will be done in 3 slices
 IOVDbSvc             INFO Global tag: OFLCOND-RUN12-SDR-35 set from joboptions
@@ -67,10 +62,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
+ClassIDSvc           INFO  getRegistryEntries: read 2841 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 268 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 273 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 +84,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 24 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 26 CLIDRegistry entries for module ALL
 DetDescrCnvSvc       INFO  initializing 
 DetDescrCnvSvc       INFO Found DetectorStore service
 DetDescrCnvSvc       INFO  filling proxies for detector managers 
@@ -180,7 +175,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 2990 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3005 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 +184,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= 25364Kb 	 Time = 0.69S
+GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 24356Kb 	 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 +195,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  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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 +207,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 /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
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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,8 +244,8 @@ 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.18S
-ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
+GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 4600Kb 	 Time = 0.17S
+ClassIDSvc           INFO  getRegistryEntries: read 67 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
 CaloIDHelper_ID...   INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
@@ -260,7 +255,7 @@ TileCablingSvc       INFO RUN2 ATLAS geometry flag detected for geometry: ATLAS-
 TileCablingSvc       INFO Cabling for RUN2a (2018) ATLAS geometry is set via jobOptions 
 TileCablingSvc       INFO Setting Cabling type to 5
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 265 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 270 CLIDRegistry entries for module ALL
 CondInputLoader      INFO Initializing CondInputLoader...
 CondInputLoader      INFO Adding base classes:
   +  ( 'CondAttrListCollection' , 'ConditionStore+/TILE/OFL02/CALIB/CES' )   ->
@@ -304,7 +299,7 @@ TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCond
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlEms) for folder: "/TILE/OFL02/CALIB/EMS"
 TileSampleNoise...   INFO Creating TileCondProxyCool(TileSampleNoiseCondAlg.TileCondProxyCool_NoiseSample) for folder: "/TILE/OFL02/NOISE/SAMPLE"
 TileTimingCondA...   INFO Creating TileCondProxyCool(TileTimingCondAlg.TileCondProxyCool_AdcOffset) for folder: "/TILE/OFL02/TIME/CHANNELOFFSET/PHY"
-ClassIDSvc           INFO  getRegistryEntries: read 4701 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 4819 CLIDRegistry entries for module ALL
 PyComponentMgr       INFO Initializing PyComponentMgr...
 Finalizer            INFO Initializing Finalizer...
 ByteStreamInputSvc   INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00
@@ -315,7 +310,7 @@ ROBDataProviderSvc   INFO  ---> Filter out Sub Detector ROBs by Status Code: # S
 EventSelector        INFO reinitialization...
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
-ClassIDSvc           INFO  getRegistryEntries: read 425 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 379 CLIDRegistry entries for module ALL
 ByteStreamInputSvc   INFO Picked valid file: /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TileByteStream/TileByteStream-02-00-00/data18_tilecomm.00363899.calibration_tile.daq.RAW._lb0000._TileREB-ROS._0005-200ev.data
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CES'
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/LIN'
@@ -340,12 +335,13 @@ IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARAlign-IOVDEP-00 for folder /LAR/Align
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LArCellPositionShift-ideal for folder /LAR/LArCellPositionShift
 IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
+IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 06C9EAE8-6F5B-E011-BAAA-003048F0E7AC
 Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root
 RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root File version:52200
 CaloMgrDetDescrCnv   INFO in createObj: creating a Calo Detector Manager object in the detector store
 CaloIdMgrDetDes...   INFO in createObj: creating a CaloDescrManager object in the detector store
-ClassIDSvc           INFO  getRegistryEntries: read 198 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 201 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a CaloDM_ID helper object in the detector store
 CaloDM_ID            INFO initialize_from_dictionary
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -359,12 +355,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 /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
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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 
@@ -395,8 +391,8 @@ 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 2266 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 91 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2315 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 92 CLIDRegistry entries for module ALL
 ToolSvc.TileROD...   INFO TileL2Builder initialization completed
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18124, run #363899 1 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #18125, run #363899 1 events processed so far  <<<===
@@ -610,23 +606,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.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
+IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.06 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/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.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.03 ))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
 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.30 ))s
-IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     4.51 ))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.33 ))s
 AthDictLoaderSvc     INFO in finalize...
 ToolSvc              INFO Removing all tools created by ToolSvc
 ToolSvc.TileROD...   INFO Finalizing
@@ -634,18 +630,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=  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
+cObjR_ALL            INFO Time User   : Tot= 0.52  [s] Ave/Min/Max=    0.26(+-    0.25)/    0.01/    0.51  [s] #=  2
+cObj_ALL             INFO Time User   : Tot= 0.56  [s] Ave/Min/Max=  0.0431(+-   0.141)/       0/    0.53  [s] #= 13
+ChronoStatSvc        INFO Time User   : Tot=  4.4  [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"
-Wed Jun  3 16:19:46 PDT 2020
+Tue Oct  6 20:01:35 CEST 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1607]
+Py:Athena            INFO using release [WorkDir-22.0.19] [x86_64-centos7-gcc8-opt] [master-refs/ea3e66422c4] -- built on [2020-10-06T1923]
 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
@@ -654,9 +650,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 5530 configurables from 19 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 10 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.15
+EventInfoMgtInit: Got release version  Athena-22.0.19
 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
@@ -671,29 +667,24 @@ Py:TileConditions_jobOptions.py    INFO Adjusting TileInfo to return cell noise
 Py:TileConditions_jobOptions.py    INFO Setting 10-bit ADC configuration
 Py:TileInfoConf.     INFO Setting 10-bit Tile ADC
 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 v33r1)
-                                          running on zeus on Wed Jun  3 16:19:53 2020
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on aibuild028.cern.ch on Tue Oct  6 20:01:47 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 7378 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 6906 CLIDRegistry entries for module ALL
 CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc                                         INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
-AthenaPoolCnvSvc                                    INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 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 ]
+DBReplicaSvc                                        INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc                                        INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc                                        INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc                                             INFO Successfully setup replica sorting algorithm
 PoolSvc                                             INFO Setting up APR FileCatalog and Streams
 PoolSvc                                          WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -704,7 +695,7 @@ DbSession                                           INFO     Open     DbSession
 Domain[ROOT_All]                                    INFO >   Access   DbDomain     READ      [ROOT_All] 
 ToolSvc.ByteStreamMetadataTool                      INFO Initializing ToolSvc.ByteStreamMetadataTool - package version ByteStreamCnvSvc-00-00-00
 MetaDataSvc                                         INFO Found MetaDataTools = PublicToolHandleArray(['IOVDbMetaDataTool','ByteStreamMetadataTool'])
-IOVDbSvc                                            INFO Opened read transaction for POOL PersistencySvc
+OutputStreamSequencerSvc                            INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 IOVDbSvc                                            INFO Only 5 POOL conditions files will be open at once
 IOVDbSvc                                            INFO Cache alignment will be done in 3 slices
 IOVDbSvc                                            INFO Global tag: OFLCOND-RUN12-SDR-35 set from joboptions
@@ -714,10 +705,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
+ClassIDSvc                                          INFO  getRegistryEntries: read 2841 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 268 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 273 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
@@ -736,7 +727,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 24 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 26 CLIDRegistry entries for module ALL
 DetDescrCnvSvc                                      INFO  initializing 
 DetDescrCnvSvc                                      INFO Found DetectorStore service
 DetDescrCnvSvc                                      INFO  filling proxies for detector managers 
@@ -827,7 +818,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 2990 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 3005 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
@@ -836,7 +827,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= 26388Kb 	 Time = 0.68S
+GeoModelSvc                                         INFO GeoModelSvc.LArDetectorToolNV	 SZ= 24356Kb 	 Time = 0.57S
 GeoModelSvc.TileDetectorTool                        INFO  Entering TileDetectorTool::create()
 TileDddbManager                                     INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager                                     INFO n_tiglob = 5
@@ -847,7 +838,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  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour                                       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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
@@ -859,9 +850,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 /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
+LArFCAL_Base_ID                                     INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID                                     INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID                                     INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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.
@@ -896,8 +887,8 @@ 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.18S
-ClassIDSvc                                          INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
+GeoModelSvc                                         INFO GeoModelSvc.TileDetectorTool	 SZ= 4600Kb 	 Time = 0.15S
+ClassIDSvc                                          INFO  getRegistryEntries: read 67 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
 CaloIDHelper_IDDetDescrCnv                          INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
@@ -907,10 +898,10 @@ 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 4966 CLIDRegistry entries for module ALL
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 5089 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
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 379 CLIDRegistry entries for module ALL
 CondInputLoader                                0    INFO Initializing CondInputLoader...
 CondInputLoader                                0    INFO Adding base classes:
   +  ( 'CondAttrListCollection' , 'ConditionStore+/TILE/OFL02/CALIB/CES' )   ->
@@ -1004,12 +995,13 @@ IOVDbSvc                                   0   0    INFO Opening COOL connection
 IOVDbFolder                                0   0    INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARAlign-IOVDEP-00 for folder /LAR/Align
 IOVDbFolder                                0   0    INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LArCellPositionShift-ideal for folder /LAR/LArCellPositionShift
 IOVDbSvc                                   0   0    INFO Disconnecting from COOLOFL_LAR/OFLP200
+IOVDbSvc                                   0   0    INFO Opened read transaction for POOL PersistencySvc
 Domain[ROOT_All]                           0   0    INFO ->  Access   DbDatabase   READ      [ROOT_All] 06C9EAE8-6F5B-E011-BAAA-003048F0E7AC
 Domain[ROOT_All]                           0   0    INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root
 RootDatabase.open                          0   0    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root File version:52200
 CaloMgrDetDescrCnv                         0   0    INFO in createObj: creating a Calo Detector Manager object in the detector store
 CaloIdMgrDetDescrCnv                       0   0    INFO in createObj: creating a CaloDescrManager object in the detector store
-ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 198 CLIDRegistry entries for module ALL
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 201 CLIDRegistry entries for module ALL
 CaloIDHelper_IDDetDescrCnv                 0   0    INFO in createObj: creating a CaloDM_ID helper object in the detector store
 CaloDM_ID                                  0   0    INFO initialize_from_dictionary
 AtlasDetectorID                            0   0    INFO initialize_from_dictionary - OK
@@ -1023,12 +1015,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 /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
+LArFCAL_Base_ID                            0   0    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour                              0   0    INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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 
@@ -1036,210 +1028,210 @@ 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 #18124, run #363899 on slot 0,  0 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     1   1    INFO   ===>>>  start processing event #18125, run #363899 on slot 1,  0 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     2   2    INFO   ===>>>  start processing event #18126, run #363899 on slot 2,  0 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     3   3    INFO   ===>>>  start processing event #18127, run #363899 on slot 3,  0 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
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 503 CLIDRegistry entries for module ALL
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 1812 CLIDRegistry entries for module ALL
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 92 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                     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   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                     1   0    INFO   ===>>>  start processing event #18125, run #363899 on slot 0,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     2   1    INFO   ===>>>  start processing event #18126, run #363899 on slot 1,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     3   2    INFO   ===>>>  start processing event #18127, run #363899 on slot 2,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     4   3    INFO   ===>>>  start processing event #18128, run #363899 on slot 3,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     1   0    INFO   ===>>>  done processing event #18125, run #363899 on slot 0,  2 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     2   1    INFO   ===>>>  done processing event #18126, run #363899 on slot 1,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     5   0    INFO   ===>>>  start processing event #18129, run #363899 on slot 0,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     6   1    INFO   ===>>>  start processing event #18130, run #363899 on slot 1,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     3   2    INFO   ===>>>  done processing event #18127, run #363899 on slot 2,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     4   3    INFO   ===>>>  done processing event #18128, run #363899 on slot 3,  5 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     7   2    INFO   ===>>>  start processing event #18131, run #363899 on slot 2,  5 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     8   3    INFO   ===>>>  start processing event #18132, run #363899 on slot 3,  5 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     5   0    INFO   ===>>>  done processing event #18129, run #363899 on slot 0,  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   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   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   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   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   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                    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                     9   0    INFO   ===>>>  start processing event #18133, run #363899 on slot 0,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    10   1    INFO   ===>>>  start processing event #18134, run #363899 on slot 1,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     7   2    INFO   ===>>>  done processing event #18131, run #363899 on slot 2,  8 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     8   3    INFO   ===>>>  done processing event #18132, run #363899 on slot 3,  9 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    11   2    INFO   ===>>>  start processing event #18135, run #363899 on slot 2,  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   0    INFO   ===>>>  done processing event #18133, run #363899 on slot 0,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    10   1    INFO   ===>>>  done processing event #18134, run #363899 on slot 1,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    13   0    INFO   ===>>>  start processing event #18137, run #363899 on slot 0,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    14   1    INFO   ===>>>  start processing event #18138, run #363899 on slot 1,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    11   2    INFO   ===>>>  done processing event #18135, run #363899 on slot 2,  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   2    INFO   ===>>>  start processing event #18139, run #363899 on slot 2,  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   0    INFO   ===>>>  done processing event #18137, run #363899 on slot 0,  14 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    14   1    INFO   ===>>>  done processing event #18138, run #363899 on slot 1,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    17   0    INFO   ===>>>  start processing event #18141, run #363899 on slot 0,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    18   1    INFO   ===>>>  start processing event #18142, run #363899 on slot 1,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    15   2    INFO   ===>>>  done processing event #18139, run #363899 on slot 2,  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   2    INFO   ===>>>  start processing event #18143, run #363899 on slot 2,  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   0    INFO   ===>>>  done processing event #18141, run #363899 on slot 0,  18 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    18   1    INFO   ===>>>  done processing event #18142, run #363899 on slot 1,  19 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    21   0    INFO   ===>>>  start processing event #18145, run #363899 on slot 0,  19 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    22   1    INFO   ===>>>  start processing event #18146, run #363899 on slot 1,  19 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    19   2    INFO   ===>>>  done processing event #18143, run #363899 on slot 2,  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   2    INFO   ===>>>  start processing event #18147, run #363899 on slot 2,  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   0    INFO   ===>>>  done processing event #18145, run #363899 on slot 0,  22 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    22   1    INFO   ===>>>  done processing event #18146, run #363899 on slot 1,  23 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    25   0    INFO   ===>>>  start processing event #18149, run #363899 on slot 0,  23 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    26   1    INFO   ===>>>  start processing event #18150, run #363899 on slot 1,  23 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    23   2    INFO   ===>>>  done processing event #18147, run #363899 on slot 2,  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   2    INFO   ===>>>  start processing event #18151, run #363899 on slot 2,  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   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                    25   0    INFO   ===>>>  done processing event #18149, run #363899 on slot 0,  26 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    26   1    INFO   ===>>>  done processing event #18150, run #363899 on slot 1,  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   1    INFO   ===>>>  done processing event #18151, run #363899 on slot 1,  28 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    30   1    INFO   ===>>>  start processing event #18154, run #363899 on slot 1,  27 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    27   2    INFO   ===>>>  done processing event #18151, run #363899 on slot 2,  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   1    INFO   ===>>>  start processing event #18155, run #363899 on slot 1,  29 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    31   2    INFO   ===>>>  start processing event #18155, run #363899 on slot 2,  29 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    32   3    INFO   ===>>>  start processing event #18156, run #363899 on slot 3,  29 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                    29   0    INFO   ===>>>  done processing event #18153, run #363899 on slot 0,  30 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    30   1    INFO   ===>>>  done processing event #18154, run #363899 on slot 1,  31 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    33   0    INFO   ===>>>  start processing event #18157, run #363899 on slot 0,  31 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    34   1    INFO   ===>>>  start processing event #18158, run #363899 on slot 1,  31 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    31   2    INFO   ===>>>  done processing event #18155, run #363899 on slot 2,  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   2    INFO   ===>>>  start processing event #18159, run #363899 on slot 2,  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   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                    33   0    INFO   ===>>>  done processing event #18157, run #363899 on slot 0,  34 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    34   1    INFO   ===>>>  done processing event #18158, run #363899 on slot 1,  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   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                    38   1    INFO   ===>>>  start processing event #18162, run #363899 on slot 1,  35 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    35   2    INFO   ===>>>  done processing event #18159, run #363899 on slot 2,  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   2    INFO   ===>>>  start processing event #18163, run #363899 on slot 2,  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   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                    38   1    INFO   ===>>>  done processing event #18162, 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   1    INFO   ===>>>  done processing event #18163, run #363899 on slot 1,  40 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    42   1    INFO   ===>>>  start processing event #18166, run #363899 on slot 1,  39 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    39   2    INFO   ===>>>  done processing event #18163, run #363899 on slot 2,  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   1    INFO   ===>>>  start processing event #18167, run #363899 on slot 1,  41 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    43   2    INFO   ===>>>  start processing event #18167, run #363899 on slot 2,  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   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                    42   1    INFO   ===>>>  done processing event #18166, 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   1    INFO   ===>>>  done processing event #18167, run #363899 on slot 1,  44 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    46   1    INFO   ===>>>  start processing event #18170, run #363899 on slot 1,  43 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    43   2    INFO   ===>>>  done processing event #18167, run #363899 on slot 2,  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   1    INFO   ===>>>  start processing event #18171, run #363899 on slot 1,  45 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    47   2    INFO   ===>>>  start processing event #18171, run #363899 on slot 2,  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   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                    46   1    INFO   ===>>>  done processing event #18170, 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   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                    54   2    INFO   ===>>>  start processing event #18178, run #363899 on slot 2,  51 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                    50   1    INFO   ===>>>  start processing event #18174, run #363899 on slot 1,  47 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    47   2    INFO   ===>>>  done processing event #18171, run #363899 on slot 2,  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   2    INFO   ===>>>  start processing event #18175, run #363899 on slot 2,  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   0    INFO   ===>>>  done processing event #18173, run #363899 on slot 0,  50 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    50   1    INFO   ===>>>  done processing event #18174, run #363899 on slot 1,  51 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    53   0    INFO   ===>>>  start processing event #18177, run #363899 on slot 0,  51 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    54   1    INFO   ===>>>  start processing event #18178, run #363899 on slot 1,  51 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    51   2    INFO   ===>>>  done processing event #18175, 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                    55   2    INFO   ===>>>  start processing event #18179, run #363899 on slot 2,  53 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    56   3    INFO   ===>>>  start processing event #18180, run #363899 on slot 3,  53 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                    53   0    INFO   ===>>>  done processing event #18177, run #363899 on slot 0,  54 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    54   1    INFO   ===>>>  done processing event #18178, 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   1    INFO   ===>>>  done processing event #18179, run #363899 on slot 1,  56 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    58   1    INFO   ===>>>  start processing event #18182, 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                    56   3    INFO   ===>>>  done processing event #18180, run #363899 on slot 3,  57 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    59   1    INFO   ===>>>  start processing event #18183, run #363899 on slot 1,  57 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    59   2    INFO   ===>>>  start processing event #18183, run #363899 on slot 2,  57 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    60   3    INFO   ===>>>  start processing event #18184, run #363899 on slot 3,  57 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                    57   0    INFO   ===>>>  done processing event #18181, run #363899 on slot 0,  58 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    58   1    INFO   ===>>>  done processing event #18182, run #363899 on slot 1,  59 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    61   0    INFO   ===>>>  start processing event #18185, run #363899 on slot 0,  59 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    62   1    INFO   ===>>>  start processing event #18186, 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                    60   3    INFO   ===>>>  done processing event #18184, run #363899 on slot 3,  61 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    63   2    INFO   ===>>>  start processing event #18187, run #363899 on slot 2,  61 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    64   3    INFO   ===>>>  start processing event #18188, run #363899 on slot 3,  61 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                    61   0    INFO   ===>>>  done processing event #18185, run #363899 on slot 0,  62 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    62   1    INFO   ===>>>  done processing event #18186, run #363899 on slot 1,  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                    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                    66   1    INFO   ===>>>  start processing event #18190, 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                    64   3    INFO   ===>>>  done processing event #18188, run #363899 on slot 3,  65 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    67   2    INFO   ===>>>  start processing event #18191, run #363899 on slot 2,  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   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                    70   2    INFO   ===>>>  start processing event #18194, run #363899 on slot 2,  67 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                    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   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   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   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                    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   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   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                    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   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   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                    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                    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
+AthenaHiveEventLoopMgr                    66   1    INFO   ===>>>  done processing event #18190, run #363899 on slot 1,  67 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    69   0    INFO   ===>>>  start processing event #18193, run #363899 on slot 0,  67 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    70   1    INFO   ===>>>  start processing event #18194, 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                    68   3    INFO   ===>>>  done processing event #18192, run #363899 on slot 3,  69 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    71   2    INFO   ===>>>  start processing event #18195, run #363899 on slot 2,  69 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    72   3    INFO   ===>>>  start processing event #18196, run #363899 on slot 3,  69 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    69   0    INFO   ===>>>  done processing event #18193, run #363899 on slot 0,  70 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    70   1    INFO   ===>>>  done processing event #18194, run #363899 on slot 1,  71 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    73   0    INFO   ===>>>  start processing event #18197, run #363899 on slot 0,  71 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    74   1    INFO   ===>>>  start processing event #18198, run #363899 on slot 1,  71 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    71   2    INFO   ===>>>  done processing event #18195, run #363899 on slot 2,  72 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    72   3    INFO   ===>>>  done processing event #18196, run #363899 on slot 3,  73 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    75   2    INFO   ===>>>  start processing event #18199, run #363899 on slot 2,  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   0    INFO   ===>>>  done processing event #18197, run #363899 on slot 0,  74 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    74   1    INFO   ===>>>  done processing event #18198, run #363899 on slot 1,  75 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    77   0    INFO   ===>>>  start processing event #18201, run #363899 on slot 0,  75 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    78   1    INFO   ===>>>  start processing event #18202, run #363899 on slot 1,  75 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    75   2    INFO   ===>>>  done processing event #18199, run #363899 on slot 2,  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   2    INFO   ===>>>  start processing event #18203, run #363899 on slot 2,  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   0    INFO   ===>>>  done processing event #18201, run #363899 on slot 0,  78 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    78   1    INFO   ===>>>  done processing event #18202, run #363899 on slot 1,  79 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    81   0    INFO   ===>>>  start processing event #18205, run #363899 on slot 0,  79 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    82   1    INFO   ===>>>  start processing event #18206, run #363899 on slot 1,  79 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    79   2    INFO   ===>>>  done processing event #18203, run #363899 on slot 2,  80 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    80   3    INFO   ===>>>  done processing event #18204, run #363899 on slot 3,  81 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    83   2    INFO   ===>>>  start processing event #18207, run #363899 on slot 2,  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   0    INFO   ===>>>  done processing event #18205, run #363899 on slot 0,  82 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    82   1    INFO   ===>>>  done processing event #18206, run #363899 on slot 1,  83 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    85   0    INFO   ===>>>  start processing event #18209, run #363899 on slot 0,  83 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    86   1    INFO   ===>>>  start processing event #18210, run #363899 on slot 1,  83 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    83   2    INFO   ===>>>  done processing event #18207, run #363899 on slot 2,  84 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    84   3    INFO   ===>>>  done processing event #18208, run #363899 on slot 3,  85 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    87   2    INFO   ===>>>  start processing event #18211, run #363899 on slot 2,  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   0    INFO   ===>>>  done processing event #18209, run #363899 on slot 0,  86 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    86   1    INFO   ===>>>  done processing event #18210, run #363899 on slot 1,  87 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    89   0    INFO   ===>>>  start processing event #18213, run #363899 on slot 0,  87 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    90   1    INFO   ===>>>  start processing event #18214, run #363899 on slot 1,  87 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    87   2    INFO   ===>>>  done processing event #18211, run #363899 on slot 2,  88 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    88   3    INFO   ===>>>  done processing event #18212, run #363899 on slot 3,  89 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    91   2    INFO   ===>>>  start processing event #18215, run #363899 on slot 2,  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   0    INFO   ===>>>  done processing event #18213, run #363899 on slot 0,  90 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    90   1    INFO   ===>>>  done processing event #18214, run #363899 on slot 1,  91 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    93   0    INFO   ===>>>  start processing event #18217, run #363899 on slot 0,  91 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    94   1    INFO   ===>>>  start processing event #18218, run #363899 on slot 1,  91 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    91   2    INFO   ===>>>  done processing event #18215, run #363899 on slot 2,  92 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    92   3    INFO   ===>>>  done processing event #18216, run #363899 on slot 3,  93 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    95   2    INFO   ===>>>  start processing event #18219, run #363899 on slot 2,  93 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    96   3    INFO   ===>>>  start processing event #18220, run #363899 on slot 3,  93 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    93   0    INFO   ===>>>  done processing event #18217, run #363899 on slot 0,  94 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    94   1    INFO   ===>>>  done processing event #18218, run #363899 on slot 1,  95 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    97   0    INFO   ===>>>  start processing event #18221, run #363899 on slot 0,  95 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    98   1    INFO   ===>>>  start processing event #18222, run #363899 on slot 1,  95 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    95   2    INFO   ===>>>  done processing event #18219, run #363899 on slot 2,  96 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    96   3    INFO   ===>>>  done processing event #18220, run #363899 on slot 3,  97 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    99   2    INFO   ===>>>  start processing event #18223, run #363899 on slot 2,  97 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    97   0    INFO   ===>>>  done processing event #18221, run #363899 on slot 0,  98 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    98   1    INFO   ===>>>  done processing event #18222, run #363899 on slot 1,  99 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    99   2    INFO   ===>>>  done processing event #18223, run #363899 on slot 2,  100 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    99   2    INFO ---> Loop Finished (seconds): 1.36429
 /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...
@@ -1256,7 +1248,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.50 ))s
+IOVDbFolder                                         INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.04 ))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
@@ -1268,10 +1260,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.39 ))s
-IOVDbSvc                                            INFO  bytes in ((      0.88 ))s
+IOVDbFolder                                         INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     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 COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.88 ))s
+IOVDbSvc                                            INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.05 ))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
@@ -1281,9 +1273,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=  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
+cObjR_ALL                                           INFO Time User   : Tot=  0.5  [s] Ave/Min/Max=    0.25(+-    0.24)/    0.01/    0.49  [s] #=  2
+cObj_ALL                                            INFO Time User   : Tot= 0.54  [s] Ave/Min/Max=    0.27(+-    0.24)/    0.03/    0.51  [s] #=  2
+ChronoStatSvc                                       INFO Time User   : Tot= 4.11  [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 9d6904eac926..d6d8dcb174af 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/share/TileMuRcvContByteStreamCnv_test.ref
+++ b/TileCalorimeter/TileSvc/TileByteStream/share/TileMuRcvContByteStreamCnv_test.ref
@@ -1,16 +1,16 @@
-Wed Jun  3 16:20:37 PDT 2020
+Tue Oct  6 20:02:00 CEST 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1607]
+Py:Athena            INFO using release [WorkDir-22.0.19] [x86_64-centos7-gcc8-opt] [master-refs/ea3e66422c4] -- built on [2020-10-06T1923]
 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 5530 configurables from 19 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 10 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.15
+EventInfoMgtInit: Got release version  Athena-22.0.19
 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
@@ -25,28 +25,23 @@ Py:TileConditions_jobOptions.py    INFO Adjusting TileInfo to return cell noise
 Py:TileConditions_jobOptions.py    INFO Setting 10-bit ADC configuration
 Py:TileInfoConf.     INFO Setting 10-bit Tile ADC
 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
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
-                                          running on zeus on Wed Jun  3 16:20:46 2020
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on aibuild028.cern.ch on Tue Oct  6 20:02:11 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 7006 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 6906 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
-AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 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 ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -57,7 +52,7 @@ DbSession            INFO     Open     DbSession
 Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
 ToolSvc.ByteStr...   INFO Initializing ToolSvc.ByteStreamMetadataTool - package version ByteStreamCnvSvc-00-00-00
 MetaDataSvc          INFO Found MetaDataTools = PublicToolHandleArray(['IOVDbMetaDataTool','ByteStreamMetadataTool'])
-IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
+OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
 IOVDbSvc             INFO Cache alignment will be done in 3 slices
 IOVDbSvc             INFO Global tag: OFLCOND-RUN12-SDR-35 set from joboptions
@@ -67,10 +62,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
+ClassIDSvc           INFO  getRegistryEntries: read 2841 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 268 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 273 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,8 +84,8 @@ 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 2586 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 18 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2653 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 20 CLIDRegistry entries for module ALL
 DetDescrCnvSvc       INFO  initializing 
 DetDescrCnvSvc       INFO Found DetectorStore service
 DetDescrCnvSvc       INFO  filling proxies for detector managers 
@@ -181,7 +176,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 2902 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2914 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 +185,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= 24340Kb 	 Time = 0.7S
+GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 25380Kb 	 Time = 0.58S
 GeoModelSvc.Til...   INFO  Entering TileDetectorTool::create()
 TileDddbManager      INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager      INFO n_tiglob = 5
@@ -201,7 +196,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  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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 +208,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 /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
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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,8 +245,8 @@ 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.17S
-ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
+GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 3576Kb 	 Time = 0.16S
+ClassIDSvc           INFO  getRegistryEntries: read 67 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
 CaloIDHelper_ID...   INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
@@ -261,7 +256,7 @@ TileCablingSvc       INFO RUN2 ATLAS geometry flag detected for geometry: ATLAS-
 TileCablingSvc       INFO Cabling for RUN2a (2018) ATLAS geometry is set via jobOptions 
 TileCablingSvc       INFO Setting Cabling type to 5
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 265 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 270 CLIDRegistry entries for module ALL
 CondInputLoader      INFO Initializing CondInputLoader...
 CondInputLoader      INFO Adding base classes:
   +  ( 'CondAttrListCollection' , 'ConditionStore+/TILE/OFL02/CALIB/CES' )   ->
@@ -305,7 +300,7 @@ TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCond
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlEms) for folder: "/TILE/OFL02/CALIB/EMS"
 TileSampleNoise...   INFO Creating TileCondProxyCool(TileSampleNoiseCondAlg.TileCondProxyCool_NoiseSample) for folder: "/TILE/OFL02/NOISE/SAMPLE"
 TileTimingCondA...   INFO Creating TileCondProxyCool(TileTimingCondAlg.TileCondProxyCool_AdcOffset) for folder: "/TILE/OFL02/TIME/CHANNELOFFSET/PHY"
-ClassIDSvc           INFO  getRegistryEntries: read 4030 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 4147 CLIDRegistry entries for module ALL
 PyComponentMgr       INFO Initializing PyComponentMgr...
 Finalizer            INFO Initializing Finalizer...
 ByteStreamInputSvc   INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00
@@ -316,7 +311,7 @@ ROBDataProviderSvc   INFO  ---> Filter out Sub Detector ROBs by Status Code: # S
 EventSelector        INFO reinitialization...
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
-ClassIDSvc           INFO  getRegistryEntries: read 425 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 379 CLIDRegistry entries for module ALL
 ByteStreamInputSvc   INFO Picked valid file: /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TileByteStream/TileByteStream-02-00-00/data18_tilecomm.00363899.calibration_tile.daq.RAW._lb0000._TileREB-ROS._0005-200ev.data
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CES'
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/LIN'
@@ -341,12 +336,13 @@ IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARAlign-IOVDEP-00 for folder /LAR/Align
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LArCellPositionShift-ideal for folder /LAR/LArCellPositionShift
 IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
+IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 06C9EAE8-6F5B-E011-BAAA-003048F0E7AC
 Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root
 RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root File version:52200
 CaloMgrDetDescrCnv   INFO in createObj: creating a Calo Detector Manager object in the detector store
 CaloIdMgrDetDes...   INFO in createObj: creating a CaloDescrManager object in the detector store
-ClassIDSvc           INFO  getRegistryEntries: read 198 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 201 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a CaloDM_ID helper object in the detector store
 CaloDM_ID            INFO initialize_from_dictionary
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -360,12 +356,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 /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
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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 
@@ -396,8 +392,8 @@ 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 2266 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 91 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2315 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 92 CLIDRegistry entries for module ALL
 ToolSvc.TileROD...   INFO TileL2Builder initialization completed
 ToolSvc.TileMuR...   INFO Initializing TileMuRcvContByteStreamTool
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18124, run #363899 1 events processed so far  <<<===
@@ -612,23 +608,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.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
+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 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.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.23 ))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.03 ))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.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.01 ))s
+IOVDbSvc             INFO  bytes in ((      0.79 ))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.30 ))s
-IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     1.72 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.25 ))s
+IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     0.55 ))s
 AthDictLoaderSvc     INFO in finalize...
 ToolSvc              INFO Removing all tools created by ToolSvc
 ToolSvc.TileMuR...   INFO Finalizing TileMuRcvContByteStreamTool successfuly
@@ -637,18 +633,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=  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
+cObjR_ALL            INFO Time User   : Tot= 0.53  [s] Ave/Min/Max=   0.265(+-   0.265)/       0/    0.53  [s] #=  2
+cObj_ALL             INFO Time User   : Tot= 0.58  [s] Ave/Min/Max=  0.0446(+-   0.146)/       0/    0.55  [s] #= 13
+ChronoStatSvc        INFO Time User   : Tot= 4.41  [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"
-Wed Jun  3 16:20:55 PDT 2020
+Tue Oct  6 20:02:21 CEST 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1607]
+Py:Athena            INFO using release [WorkDir-22.0.19] [x86_64-centos7-gcc8-opt] [master-refs/ea3e66422c4] -- built on [2020-10-06T1923]
 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 +653,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 5530 configurables from 19 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 10 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.15
+EventInfoMgtInit: Got release version  Athena-22.0.19
 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
@@ -674,29 +670,24 @@ Py:TileConditions_jobOptions.py    INFO Adjusting TileInfo to return cell noise
 Py:TileConditions_jobOptions.py    INFO Setting 10-bit ADC configuration
 Py:TileInfoConf.     INFO Setting 10-bit Tile ADC
 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 v33r1)
-                                          running on zeus on Wed Jun  3 16:21:02 2020
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on aibuild028.cern.ch on Tue Oct  6 20:02:32 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 7378 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 6906 CLIDRegistry entries for module ALL
 CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc                                         INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
-AthenaPoolCnvSvc                                    INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 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 ]
+DBReplicaSvc                                        INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc                                        INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc                                        INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc                                             INFO Successfully setup replica sorting algorithm
 PoolSvc                                             INFO Setting up APR FileCatalog and Streams
 PoolSvc                                          WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -707,7 +698,7 @@ DbSession                                           INFO     Open     DbSession
 Domain[ROOT_All]                                    INFO >   Access   DbDomain     READ      [ROOT_All] 
 ToolSvc.ByteStreamMetadataTool                      INFO Initializing ToolSvc.ByteStreamMetadataTool - package version ByteStreamCnvSvc-00-00-00
 MetaDataSvc                                         INFO Found MetaDataTools = PublicToolHandleArray(['IOVDbMetaDataTool','ByteStreamMetadataTool'])
-IOVDbSvc                                            INFO Opened read transaction for POOL PersistencySvc
+OutputStreamSequencerSvc                            INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 IOVDbSvc                                            INFO Only 5 POOL conditions files will be open at once
 IOVDbSvc                                            INFO Cache alignment will be done in 3 slices
 IOVDbSvc                                            INFO Global tag: OFLCOND-RUN12-SDR-35 set from joboptions
@@ -717,10 +708,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
+ClassIDSvc                                          INFO  getRegistryEntries: read 2841 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 268 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 273 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,8 +730,8 @@ 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 2586 CLIDRegistry entries for module ALL
-ClassIDSvc                                          INFO  getRegistryEntries: read 18 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 2653 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 20 CLIDRegistry entries for module ALL
 DetDescrCnvSvc                                      INFO  initializing 
 DetDescrCnvSvc                                      INFO Found DetectorStore service
 DetDescrCnvSvc                                      INFO  filling proxies for detector managers 
@@ -831,7 +822,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 2902 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 2914 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 +831,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= 25364Kb 	 Time = 0.71S
+GeoModelSvc                                         INFO GeoModelSvc.LArDetectorToolNV	 SZ= 25380Kb 	 Time = 0.54S
 GeoModelSvc.TileDetectorTool                        INFO  Entering TileDetectorTool::create()
 TileDddbManager                                     INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager                                     INFO n_tiglob = 5
@@ -851,7 +842,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  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour                                       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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 +854,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 /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
+LArFCAL_Base_ID                                     INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID                                     INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID                                     INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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,8 +891,8 @@ 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.18S
-ClassIDSvc                                          INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
+GeoModelSvc                                         INFO GeoModelSvc.TileDetectorTool	 SZ= 3576Kb 	 Time = 0.14S
+ClassIDSvc                                          INFO  getRegistryEntries: read 67 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
 CaloIDHelper_IDDetDescrCnv                          INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
@@ -911,10 +902,10 @@ 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 4295 CLIDRegistry entries for module ALL
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 4417 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
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 379 CLIDRegistry entries for module ALL
 CondInputLoader                                0    INFO Initializing CondInputLoader...
 CondInputLoader                                0    INFO Adding base classes:
   +  ( 'CondAttrListCollection' , 'ConditionStore+/TILE/OFL02/CALIB/CES' )   ->
@@ -1008,12 +999,13 @@ IOVDbSvc                                   0   0    INFO Opening COOL connection
 IOVDbFolder                                0   0    INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARAlign-IOVDEP-00 for folder /LAR/Align
 IOVDbFolder                                0   0    INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LArCellPositionShift-ideal for folder /LAR/LArCellPositionShift
 IOVDbSvc                                   0   0    INFO Disconnecting from COOLOFL_LAR/OFLP200
+IOVDbSvc                                   0   0    INFO Opened read transaction for POOL PersistencySvc
 Domain[ROOT_All]                           0   0    INFO ->  Access   DbDatabase   READ      [ROOT_All] 06C9EAE8-6F5B-E011-BAAA-003048F0E7AC
 Domain[ROOT_All]                           0   0    INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root
 RootDatabase.open                          0   0    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root File version:52200
 CaloMgrDetDescrCnv                         0   0    INFO in createObj: creating a Calo Detector Manager object in the detector store
 CaloIdMgrDetDescrCnv                       0   0    INFO in createObj: creating a CaloDescrManager object in the detector store
-ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 198 CLIDRegistry entries for module ALL
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 201 CLIDRegistry entries for module ALL
 CaloIDHelper_IDDetDescrCnv                 0   0    INFO in createObj: creating a CaloDM_ID helper object in the detector store
 CaloDM_ID                                  0   0    INFO initialize_from_dictionary
 AtlasDetectorID                            0   0    INFO initialize_from_dictionary - OK
@@ -1027,12 +1019,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 /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
+LArFCAL_Base_ID                            0   0    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour                              0   0    INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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 
@@ -1040,211 +1032,211 @@ 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 #18124, run #363899 on slot 0,  0 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     1   1    INFO   ===>>>  start processing event #18125, run #363899 on slot 1,  0 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     2   2    INFO   ===>>>  start processing event #18126, run #363899 on slot 2,  0 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     3   3    INFO   ===>>>  start processing event #18127, run #363899 on slot 3,  0 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
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 503 CLIDRegistry entries for module ALL
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 1812 CLIDRegistry entries for module ALL
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 92 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                     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                     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                     1   0    INFO   ===>>>  start processing event #18125, run #363899 on slot 0,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     2   1    INFO   ===>>>  start processing event #18126, run #363899 on slot 1,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     3   2    INFO   ===>>>  start processing event #18127, run #363899 on slot 2,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     4   3    INFO   ===>>>  start processing event #18128, run #363899 on slot 3,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     1   0    INFO   ===>>>  done processing event #18125, run #363899 on slot 0,  2 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     2   1    INFO   ===>>>  done processing event #18126, run #363899 on slot 1,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     5   0    INFO   ===>>>  start processing event #18129, run #363899 on slot 0,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     6   1    INFO   ===>>>  start processing event #18130, run #363899 on slot 1,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     3   2    INFO   ===>>>  done processing event #18127, run #363899 on slot 2,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     4   3    INFO   ===>>>  done processing event #18128, run #363899 on slot 3,  5 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     7   2    INFO   ===>>>  start processing event #18131, run #363899 on slot 2,  5 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     8   3    INFO   ===>>>  start processing event #18132, run #363899 on slot 3,  5 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     5   0    INFO   ===>>>  done processing event #18129, run #363899 on slot 0,  6 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     6   1    INFO   ===>>>  done processing event #18130, run #363899 on slot 1,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     9   0    INFO   ===>>>  start processing event #18133, run #363899 on slot 0,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    10   1    INFO   ===>>>  start processing event #18134, run #363899 on slot 1,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     7   2    INFO   ===>>>  done processing event #18131, run #363899 on slot 2,  8 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     8   3    INFO   ===>>>  done processing event #18132, run #363899 on slot 3,  9 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    11   2    INFO   ===>>>  start processing event #18135, run #363899 on slot 2,  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                    10   2    INFO   ===>>>  done processing event #18134, run #363899 on slot 2,  11 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                     9   0    INFO   ===>>>  done processing event #18133, run #363899 on slot 0,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    10   1    INFO   ===>>>  done processing event #18134, run #363899 on slot 1,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    13   0    INFO   ===>>>  start processing event #18137, run #363899 on slot 0,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    14   1    INFO   ===>>>  start processing event #18138, run #363899 on slot 1,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    11   2    INFO   ===>>>  done processing event #18135, run #363899 on slot 2,  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                    15   2    INFO   ===>>>  start processing event #18139, run #363899 on slot 2,  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                    14   2    INFO   ===>>>  done processing event #18138, run #363899 on slot 2,  15 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    17   1    INFO   ===>>>  start processing event #18141, run #363899 on slot 1,  15 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    18   2    INFO   ===>>>  start processing event #18142, run #363899 on slot 2,  15 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    15   0    INFO   ===>>>  done processing event #18139, run #363899 on slot 0,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    13   0    INFO   ===>>>  done processing event #18137, run #363899 on slot 0,  14 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    14   1    INFO   ===>>>  done processing event #18138, run #363899 on slot 1,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    17   0    INFO   ===>>>  start processing event #18141, run #363899 on slot 0,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    18   1    INFO   ===>>>  start processing event #18142, run #363899 on slot 1,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    15   2    INFO   ===>>>  done processing event #18139, run #363899 on slot 2,  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                    19   2    INFO   ===>>>  start processing event #18143, run #363899 on slot 2,  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                    19   0    INFO   ===>>>  done processing event #18143, run #363899 on slot 0,  20 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    17   0    INFO   ===>>>  done processing event #18141, run #363899 on slot 0,  18 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    18   1    INFO   ===>>>  done processing event #18142, run #363899 on slot 1,  19 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    21   0    INFO   ===>>>  start processing event #18145, run #363899 on slot 0,  19 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    22   1    INFO   ===>>>  start processing event #18146, run #363899 on slot 1,  19 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    19   2    INFO   ===>>>  done processing event #18143, run #363899 on slot 2,  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                    23   2    INFO   ===>>>  start processing event #18147, run #363899 on slot 2,  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                    21   0    INFO   ===>>>  done processing event #18145, run #363899 on slot 0,  22 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    22   1    INFO   ===>>>  done processing event #18146, run #363899 on slot 1,  23 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    25   0    INFO   ===>>>  start processing event #18149, run #363899 on slot 0,  23 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    26   1    INFO   ===>>>  start processing event #18150, run #363899 on slot 1,  23 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    23   2    INFO   ===>>>  done processing event #18147, run #363899 on slot 2,  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                    27   2    INFO   ===>>>  start processing event #18151, run #363899 on slot 2,  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                    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                    25   0    INFO   ===>>>  done processing event #18149, run #363899 on slot 0,  26 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    26   1    INFO   ===>>>  done processing event #18150, run #363899 on slot 1,  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   1    INFO   ===>>>  start processing event #18154, run #363899 on slot 1,  27 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    27   2    INFO   ===>>>  done processing event #18151, run #363899 on slot 2,  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   2    INFO   ===>>>  start processing event #18155, run #363899 on slot 2,  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                    29   0    INFO   ===>>>  done processing event #18153, run #363899 on slot 0,  30 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    30   1    INFO   ===>>>  done processing event #18154, run #363899 on slot 1,  31 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    33   0    INFO   ===>>>  start processing event #18157, run #363899 on slot 0,  31 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    34   1    INFO   ===>>>  start processing event #18158, run #363899 on slot 1,  31 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    31   2    INFO   ===>>>  done processing event #18155, run #363899 on slot 2,  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                    35   2    INFO   ===>>>  start processing event #18159, run #363899 on slot 2,  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                    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                    33   0    INFO   ===>>>  done processing event #18157, run #363899 on slot 0,  34 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    34   1    INFO   ===>>>  done processing event #18158, run #363899 on slot 1,  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   1    INFO   ===>>>  start processing event #18162, run #363899 on slot 1,  35 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    35   2    INFO   ===>>>  done processing event #18159, run #363899 on slot 2,  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                    39   2    INFO   ===>>>  start processing event #18163, run #363899 on slot 2,  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                    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                    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                    37   0    INFO   ===>>>  done processing event #18161, run #363899 on slot 0,  38 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    38   1    INFO   ===>>>  done processing event #18162, 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   1    INFO   ===>>>  start processing event #18166, run #363899 on slot 1,  39 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    39   2    INFO   ===>>>  done processing event #18163, run #363899 on slot 2,  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   2    INFO   ===>>>  start processing event #18167, run #363899 on slot 2,  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                    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                    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                    41   0    INFO   ===>>>  done processing event #18165, run #363899 on slot 0,  42 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    42   1    INFO   ===>>>  done processing event #18166, 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   1    INFO   ===>>>  start processing event #18170, run #363899 on slot 1,  43 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    43   2    INFO   ===>>>  done processing event #18167, run #363899 on slot 2,  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   2    INFO   ===>>>  start processing event #18171, run #363899 on slot 2,  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                    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                    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                    45   0    INFO   ===>>>  done processing event #18169, run #363899 on slot 0,  46 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    46   1    INFO   ===>>>  done processing event #18170, 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   1    INFO   ===>>>  start processing event #18174, run #363899 on slot 1,  47 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    47   2    INFO   ===>>>  done processing event #18171, run #363899 on slot 2,  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                    51   2    INFO   ===>>>  start processing event #18175, run #363899 on slot 2,  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                    50   2    INFO   ===>>>  done processing event #18174, 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                    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                    49   0    INFO   ===>>>  done processing event #18173, run #363899 on slot 0,  50 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    50   1    INFO   ===>>>  done processing event #18174, run #363899 on slot 1,  51 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    53   0    INFO   ===>>>  start processing event #18177, run #363899 on slot 0,  51 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    54   1    INFO   ===>>>  start processing event #18178, run #363899 on slot 1,  51 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    51   2    INFO   ===>>>  done processing event #18175, 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                    55   2    INFO   ===>>>  start processing event #18179, run #363899 on slot 2,  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   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   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                    57   0    INFO   ===>>>  start processing event #18181, run #363899 on slot 0,  55 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    58   1    INFO   ===>>>  start processing event #18182, 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   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   3    INFO   ===>>>  start processing event #18185, run #363899 on slot 3,  58 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    56   3    INFO   ===>>>  done processing event #18180, run #363899 on slot 3,  57 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    59   2    INFO   ===>>>  start processing event #18183, run #363899 on slot 2,  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   0    INFO   ===>>>  done processing event #18181, run #363899 on slot 0,  58 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    58   1    INFO   ===>>>  done processing event #18182, run #363899 on slot 1,  59 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    61   0    INFO   ===>>>  start processing event #18185, run #363899 on slot 0,  59 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    62   1    INFO   ===>>>  start processing event #18186, 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   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   3    INFO   ===>>>  start processing event #18189, run #363899 on slot 3,  62 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    60   3    INFO   ===>>>  done processing event #18184, run #363899 on slot 3,  61 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    63   2    INFO   ===>>>  start processing event #18187, run #363899 on slot 2,  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   0    INFO   ===>>>  done processing event #18185, run #363899 on slot 0,  62 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    62   1    INFO   ===>>>  done processing event #18186, run #363899 on slot 1,  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   1    INFO   ===>>>  start processing event #18190, 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   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   3    INFO   ===>>>  start processing event #18193, run #363899 on slot 3,  66 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    64   3    INFO   ===>>>  done processing event #18188, run #363899 on slot 3,  65 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    67   2    INFO   ===>>>  start processing event #18191, run #363899 on slot 2,  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   0    INFO   ===>>>  done processing event #18189, run #363899 on slot 0,  66 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    66   1    INFO   ===>>>  done processing event #18190, run #363899 on slot 1,  67 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    69   0    INFO   ===>>>  start processing event #18193, run #363899 on slot 0,  67 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    70   1    INFO   ===>>>  start processing event #18194, 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   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   3    INFO   ===>>>  start processing event #18197, run #363899 on slot 3,  70 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    68   3    INFO   ===>>>  done processing event #18192, run #363899 on slot 3,  69 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    71   2    INFO   ===>>>  start processing event #18195, run #363899 on slot 2,  69 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    72   3    INFO   ===>>>  start processing event #18196, run #363899 on slot 3,  69 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    69   0    INFO   ===>>>  done processing event #18193, run #363899 on slot 0,  70 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    70   1    INFO   ===>>>  done processing event #18194, run #363899 on slot 1,  71 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    73   0    INFO   ===>>>  start processing event #18197, run #363899 on slot 0,  71 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    74   1    INFO   ===>>>  start processing event #18198, run #363899 on slot 1,  71 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    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   3    INFO   ===>>>  done processing event #18197, run #363899 on slot 3,  74 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    72   3    INFO   ===>>>  done processing event #18196, run #363899 on slot 3,  73 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    75   2    INFO   ===>>>  start processing event #18199, run #363899 on slot 2,  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   0    INFO   ===>>>  done processing event #18197, run #363899 on slot 0,  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                    77   0    INFO   ===>>>  start processing event #18201, run #363899 on slot 0,  75 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    78   1    INFO   ===>>>  start processing event #18202, run #363899 on slot 1,  75 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    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                    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                    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                    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                    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                    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   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
+AthenaHiveEventLoopMgr                    76   3    INFO   ===>>>  done processing event #18200, run #363899 on slot 3,  77 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    79   2    INFO   ===>>>  start processing event #18203, run #363899 on slot 2,  77 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    80   3    INFO   ===>>>  start processing event #18204, run #363899 on slot 3,  77 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    77   0    INFO   ===>>>  done processing event #18201, run #363899 on slot 0,  78 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    78   1    INFO   ===>>>  done processing event #18202, run #363899 on slot 1,  79 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    81   0    INFO   ===>>>  start processing event #18205, run #363899 on slot 0,  79 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    82   1    INFO   ===>>>  start processing event #18206, run #363899 on slot 1,  79 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    79   2    INFO   ===>>>  done processing event #18203, run #363899 on slot 2,  80 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    80   3    INFO   ===>>>  done processing event #18204, run #363899 on slot 3,  81 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    83   2    INFO   ===>>>  start processing event #18207, run #363899 on slot 2,  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   0    INFO   ===>>>  done processing event #18205, run #363899 on slot 0,  82 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    82   1    INFO   ===>>>  done processing event #18206, run #363899 on slot 1,  83 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    85   0    INFO   ===>>>  start processing event #18209, run #363899 on slot 0,  83 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    86   1    INFO   ===>>>  start processing event #18210, run #363899 on slot 1,  83 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    83   2    INFO   ===>>>  done processing event #18207, run #363899 on slot 2,  84 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    84   3    INFO   ===>>>  done processing event #18208, run #363899 on slot 3,  85 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    87   2    INFO   ===>>>  start processing event #18211, run #363899 on slot 2,  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   0    INFO   ===>>>  done processing event #18209, run #363899 on slot 0,  86 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    86   1    INFO   ===>>>  done processing event #18210, run #363899 on slot 1,  87 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    89   0    INFO   ===>>>  start processing event #18213, run #363899 on slot 0,  87 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    90   1    INFO   ===>>>  start processing event #18214, run #363899 on slot 1,  87 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    87   2    INFO   ===>>>  done processing event #18211, run #363899 on slot 2,  88 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    88   3    INFO   ===>>>  done processing event #18212, run #363899 on slot 3,  89 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    91   2    INFO   ===>>>  start processing event #18215, run #363899 on slot 2,  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   0    INFO   ===>>>  done processing event #18213, run #363899 on slot 0,  90 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    90   1    INFO   ===>>>  done processing event #18214, run #363899 on slot 1,  91 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    93   0    INFO   ===>>>  start processing event #18217, run #363899 on slot 0,  91 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    94   1    INFO   ===>>>  start processing event #18218, run #363899 on slot 1,  91 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    91   2    INFO   ===>>>  done processing event #18215, run #363899 on slot 2,  92 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    92   3    INFO   ===>>>  done processing event #18216, run #363899 on slot 3,  93 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    95   2    INFO   ===>>>  start processing event #18219, run #363899 on slot 2,  93 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    96   3    INFO   ===>>>  start processing event #18220, run #363899 on slot 3,  93 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    93   0    INFO   ===>>>  done processing event #18217, run #363899 on slot 0,  94 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    94   1    INFO   ===>>>  done processing event #18218, run #363899 on slot 1,  95 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    97   0    INFO   ===>>>  start processing event #18221, run #363899 on slot 0,  95 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    98   1    INFO   ===>>>  start processing event #18222, run #363899 on slot 1,  95 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    95   2    INFO   ===>>>  done processing event #18219, run #363899 on slot 2,  96 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    96   3    INFO   ===>>>  done processing event #18220, run #363899 on slot 3,  97 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    99   2    INFO   ===>>>  start processing event #18223, run #363899 on slot 2,  97 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    97   0    INFO   ===>>>  done processing event #18221, run #363899 on slot 0,  98 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    98   1    INFO   ===>>>  done processing event #18222, run #363899 on slot 1,  99 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    99   2    INFO   ===>>>  done processing event #18223, run #363899 on slot 2,  100 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    99   2    INFO ---> Loop Finished (seconds): 1.34168
 /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...
@@ -1261,7 +1253,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.23 ))s
+IOVDbFolder                                         INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.04 ))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
@@ -1273,10 +1265,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.13 ))s
-IOVDbSvc                                            INFO  bytes in ((      0.36 ))s
+IOVDbFolder                                         INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.01 ))s
+IOVDbSvc                                            INFO  bytes in ((      0.06 ))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.36 ))s
+IOVDbSvc                                            INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.06 ))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
@@ -1287,9 +1279,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=  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
+cObjR_ALL                                           INFO Time User   : Tot= 0.51  [s] Ave/Min/Max=   0.255(+-   0.245)/    0.01/     0.5  [s] #=  2
+cObj_ALL                                            INFO Time User   : Tot= 0.56  [s] Ave/Min/Max=    0.28(+-    0.24)/    0.04/    0.52  [s] #=  2
+ChronoStatSvc                                       INFO Time User   : Tot= 4.19  [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 d4cdec9edf9b..f024509a3889 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/share/TileRawChannelContByteStreamCnv_test.ref
+++ b/TileCalorimeter/TileSvc/TileByteStream/share/TileRawChannelContByteStreamCnv_test.ref
@@ -1,16 +1,16 @@
-Wed Jun  3 16:11:56 PDT 2020
+Tue Oct  6 19:58:23 CEST 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1607]
+Py:Athena            INFO using release [WorkDir-22.0.19] [x86_64-centos7-gcc8-opt] [master-refs/ea3e66422c4] -- built on [2020-10-06T1923]
 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 5530 configurables from 19 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 10 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.15
+EventInfoMgtInit: Got release version  Athena-22.0.19
 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
@@ -25,28 +25,23 @@ Py:TileConditions_jobOptions.py    INFO Adjusting TileInfo to return cell noise
 Py:TileConditions_jobOptions.py    INFO Setting 10-bit ADC configuration
 Py:TileInfoConf.     INFO Setting 10-bit Tile ADC
 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
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
-                                          running on zeus on Wed Jun  3 16:12:05 2020
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on aibuild028.cern.ch on Tue Oct  6 19:58:35 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 7006 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 6906 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
-AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 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 ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -57,7 +52,7 @@ DbSession            INFO     Open     DbSession
 Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
 ToolSvc.ByteStr...   INFO Initializing ToolSvc.ByteStreamMetadataTool - package version ByteStreamCnvSvc-00-00-00
 MetaDataSvc          INFO Found MetaDataTools = PublicToolHandleArray(['IOVDbMetaDataTool','ByteStreamMetadataTool'])
-IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
+OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
 IOVDbSvc             INFO Cache alignment will be done in 3 slices
 IOVDbSvc             INFO Global tag: OFLCOND-RUN12-SDR-35 set from joboptions
@@ -67,11 +62,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
+ClassIDSvc           INFO  getRegistryEntries: read 2841 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 268 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 2575 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 273 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2643 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
@@ -90,7 +85,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 18 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 20 CLIDRegistry entries for module ALL
 DetDescrCnvSvc       INFO  initializing 
 DetDescrCnvSvc       INFO Found DetectorStore service
 DetDescrCnvSvc       INFO  filling proxies for detector managers 
@@ -181,7 +176,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 2902 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2914 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 +185,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= 25364Kb 	 Time = 0.71S
+GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 24356Kb 	 Time = 0.58S
 GeoModelSvc.Til...   INFO  Entering TileDetectorTool::create()
 TileDddbManager      INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager      INFO n_tiglob = 5
@@ -201,7 +196,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  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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 +208,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 /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
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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,8 +245,8 @@ 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.2S
-ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
+GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 4600Kb 	 Time = 0.14S
+ClassIDSvc           INFO  getRegistryEntries: read 67 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
 CaloIDHelper_ID...   INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
@@ -261,7 +256,7 @@ TileCablingSvc       INFO RUN2 ATLAS geometry flag detected for geometry: ATLAS-
 TileCablingSvc       INFO Cabling for RUN2 (2014-2017) ATLAS geometry is set via jobOptions 
 TileCablingSvc       INFO Setting Cabling type to 4
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 265 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 270 CLIDRegistry entries for module ALL
 CondInputLoader      INFO Initializing CondInputLoader...
 CondInputLoader      INFO Adding base classes:
   +  ( 'CondAttrListCollection' , 'ConditionStore+/TILE/OFL02/CALIB/CES' )   ->
@@ -305,7 +300,7 @@ TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCond
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlEms) for folder: "/TILE/OFL02/CALIB/EMS"
 TileSampleNoise...   INFO Creating TileCondProxyCool(TileSampleNoiseCondAlg.TileCondProxyCool_NoiseSample) for folder: "/TILE/OFL02/NOISE/SAMPLE"
 TileTimingCondA...   INFO Creating TileCondProxyCool(TileTimingCondAlg.TileCondProxyCool_AdcOffset) for folder: "/TILE/OFL02/TIME/CHANNELOFFSET/PHY"
-ClassIDSvc           INFO  getRegistryEntries: read 4030 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 4147 CLIDRegistry entries for module ALL
 PyComponentMgr       INFO Initializing PyComponentMgr...
 Finalizer            INFO Initializing Finalizer...
 ByteStreamInputSvc   INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00
@@ -316,7 +311,7 @@ ROBDataProviderSvc   INFO  ---> Filter out Sub Detector ROBs by Status Code: # S
 EventSelector        INFO reinitialization...
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
-ClassIDSvc           INFO  getRegistryEntries: read 425 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 379 CLIDRegistry entries for module ALL
 ByteStreamInputSvc   INFO Picked valid file: /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_JetTauEtmiss.merge.RAW._lb0144._SFO-5._0001.1
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CES'
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/LIN'
@@ -341,12 +336,13 @@ IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARAlign-IOVDEP-00 for folder /LAR/Align
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LArCellPositionShift-ideal for folder /LAR/LArCellPositionShift
 IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
+IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 06C9EAE8-6F5B-E011-BAAA-003048F0E7AC
 Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root
 RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root File version:52200
 CaloMgrDetDescrCnv   INFO in createObj: creating a Calo Detector Manager object in the detector store
 CaloIdMgrDetDes...   INFO in createObj: creating a CaloDescrManager object in the detector store
-ClassIDSvc           INFO  getRegistryEntries: read 198 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 201 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a CaloDM_ID helper object in the detector store
 CaloDM_ID            INFO initialize_from_dictionary
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -360,12 +356,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 /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
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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 
@@ -396,8 +392,8 @@ 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 2266 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 91 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2315 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 92 CLIDRegistry entries for module ALL
 ToolSvc.TileROD...   INFO TileL2Builder initialization completed
 ToolSvc.TileRaw...   INFO Initializing TileRawChannelContByteStreamTool
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1129572, run #204073 1 events processed so far  <<<===
@@ -612,23 +608,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.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
+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.03 ))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.23 ))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.03 ))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.02 ))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.01 ))s
+IOVDbSvc             INFO  bytes in ((      0.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: ((     1.10 ))s
-IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     2.47 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.04 ))s
+IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     0.52 ))s
 AthDictLoaderSvc     INFO in finalize...
 ToolSvc              INFO Removing all tools created by ToolSvc
 ToolSvc.TileRaw...   INFO Finalizing TileRawChannelContByteStreamTool successfuly
@@ -637,18 +633,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=  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
+cObjR_ALL            INFO Time User   : Tot=  490 [ms] Ave/Min/Max=     245(+-     235)/      10/     480 [ms] #=  2
+cObj_ALL             INFO Time User   : Tot= 0.53  [s] Ave/Min/Max=  0.0408(+-    0.13)/       0/    0.49  [s] #= 13
+ChronoStatSvc        INFO Time User   : Tot= 14.1  [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"
-Wed Jun  3 16:12:29 PDT 2020
+Tue Oct  6 19:58:55 CEST 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [Unknown/07d2aec7427] -- built on [2020-06-03T1607]
+Py:Athena            INFO using release [WorkDir-22.0.19] [x86_64-centos7-gcc8-opt] [master-refs/ea3e66422c4] -- built on [2020-10-06T1923]
 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 +653,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 5530 configurables from 19 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5569 configurables from 10 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.15
+EventInfoMgtInit: Got release version  Athena-22.0.19
 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
@@ -674,29 +670,24 @@ Py:TileConditions_jobOptions.py    INFO Adjusting TileInfo to return cell noise
 Py:TileConditions_jobOptions.py    INFO Setting 10-bit ADC configuration
 Py:TileInfoConf.     INFO Setting 10-bit Tile ADC
 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 v33r1)
-                                          running on zeus on Wed Jun  3 16:12:36 2020
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on aibuild028.cern.ch on Tue Oct  6 19:59:07 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 7378 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 6906 CLIDRegistry entries for module ALL
 CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc                                         INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
-AthenaPoolCnvSvc                                    INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 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 ]
+DBReplicaSvc                                        INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc                                        INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc                                        INFO Total of 10 servers found for host aibuild028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc                                             INFO Successfully setup replica sorting algorithm
 PoolSvc                                             INFO Setting up APR FileCatalog and Streams
 PoolSvc                                          WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -707,7 +698,7 @@ DbSession                                           INFO     Open     DbSession
 Domain[ROOT_All]                                    INFO >   Access   DbDomain     READ      [ROOT_All] 
 ToolSvc.ByteStreamMetadataTool                      INFO Initializing ToolSvc.ByteStreamMetadataTool - package version ByteStreamCnvSvc-00-00-00
 MetaDataSvc                                         INFO Found MetaDataTools = PublicToolHandleArray(['IOVDbMetaDataTool','ByteStreamMetadataTool'])
-IOVDbSvc                                            INFO Opened read transaction for POOL PersistencySvc
+OutputStreamSequencerSvc                            INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 IOVDbSvc                                            INFO Only 5 POOL conditions files will be open at once
 IOVDbSvc                                            INFO Cache alignment will be done in 3 slices
 IOVDbSvc                                            INFO Global tag: OFLCOND-RUN12-SDR-35 set from joboptions
@@ -717,11 +708,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
+ClassIDSvc                                          INFO  getRegistryEntries: read 2841 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 268 CLIDRegistry entries for module ALL
-ClassIDSvc                                          INFO  getRegistryEntries: read 2575 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 273 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 2643 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 +731,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 18 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 20 CLIDRegistry entries for module ALL
 DetDescrCnvSvc                                      INFO  initializing 
 DetDescrCnvSvc                                      INFO Found DetectorStore service
 DetDescrCnvSvc                                      INFO  filling proxies for detector managers 
@@ -831,7 +822,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 2902 CLIDRegistry entries for module ALL
+ClassIDSvc                                          INFO  getRegistryEntries: read 2914 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 +831,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= 25364Kb 	 Time = 0.73S
+GeoModelSvc                                         INFO GeoModelSvc.LArDetectorToolNV	 SZ= 25380Kb 	 Time = 0.64S
 GeoModelSvc.TileDetectorTool                        INFO  Entering TileDetectorTool::create()
 TileDddbManager                                     INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager                                     INFO n_tiglob = 5
@@ -851,7 +842,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  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour                                       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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 +854,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 /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
+LArFCAL_Base_ID                                     INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID                                     INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID                                     INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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,8 +891,8 @@ 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.19S
-ClassIDSvc                                          INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
+GeoModelSvc                                         INFO GeoModelSvc.TileDetectorTool	 SZ= 3576Kb 	 Time = 0.2S
+ClassIDSvc                                          INFO  getRegistryEntries: read 67 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
 CaloIDHelper_IDDetDescrCnv                          INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
@@ -911,10 +902,10 @@ 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 4295 CLIDRegistry entries for module ALL
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 4417 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
+ClassIDSvc                                     0    INFO  getRegistryEntries: read 379 CLIDRegistry entries for module ALL
 CondInputLoader                                0    INFO Initializing CondInputLoader...
 CondInputLoader                                0    INFO Adding base classes:
   +  ( 'CondAttrListCollection' , 'ConditionStore+/TILE/OFL02/CALIB/CES' )   ->
@@ -1010,12 +1001,13 @@ IOVDbSvc                                   0   0    INFO Opening COOL connection
 IOVDbFolder                                0   0    INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARAlign-IOVDEP-00 for folder /LAR/Align
 IOVDbFolder                                0   0    INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LArCellPositionShift-ideal for folder /LAR/LArCellPositionShift
 IOVDbSvc                                   0   0    INFO Disconnecting from COOLOFL_LAR/OFLP200
+IOVDbSvc                                   0   0    INFO Opened read transaction for POOL PersistencySvc
 Domain[ROOT_All]                           0   0    INFO ->  Access   DbDatabase   READ      [ROOT_All] 06C9EAE8-6F5B-E011-BAAA-003048F0E7AC
 Domain[ROOT_All]                           0   0    INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root
 RootDatabase.open                          0   0    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root File version:52200
 CaloMgrDetDescrCnv                         0   0    INFO in createObj: creating a Calo Detector Manager object in the detector store
 CaloIdMgrDetDescrCnv                       0   0    INFO in createObj: creating a CaloDescrManager object in the detector store
-ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 198 CLIDRegistry entries for module ALL
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 201 CLIDRegistry entries for module ALL
 CaloIDHelper_IDDetDescrCnv                 0   0    INFO in createObj: creating a CaloDM_ID helper object in the detector store
 CaloDM_ID                                  0   0    INFO initialize_from_dictionary
 AtlasDetectorID                            0   0    INFO initialize_from_dictionary - OK
@@ -1029,12 +1021,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 /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
+LArFCAL_Base_ID                            0   0    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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  /bld3/build/master/build/install/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour                              0   0    INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/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,211 +1034,211 @@ 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 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
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 503 CLIDRegistry entries for module ALL
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 1812 CLIDRegistry entries for module ALL
+ClassIDSvc                                 0   0    INFO  getRegistryEntries: read 92 CLIDRegistry entries for module ALL
 ToolSvc.TileROD_Decoder.TileL2Builder      0   0    INFO TileL2Builder initialization completed
 ToolSvc.TileRawChannelContByteStreamTool   0   0    INFO Initializing TileRawChannelContByteStreamTool
-AthenaHiveEventLoopMgr                     1   1    INFO   ===>>>  start processing event #1129665, run #204073 on slot 1,  0 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     2   2    INFO   ===>>>  start processing event #1131212, run #204073 on slot 2,  0 events processed so far  <<<===
-AthenaHiveEventLoopMgr                     3   3    INFO   ===>>>  start processing event #1131086, run #204073 on slot 3,  0 events processed so far  <<<===
 AthenaHiveEventLoopMgr                     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                     3   3    INFO   ===>>>  done processing event #1131086, run #204073 on slot 3,  4 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                    10   2    INFO   ===>>>  start processing event #1134553, run #204073 on slot 2,  7 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   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                    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                     1   0    INFO   ===>>>  start processing event #1129665, run #204073 on slot 0,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     2   1    INFO   ===>>>  start processing event #1131212, run #204073 on slot 1,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     3   2    INFO   ===>>>  start processing event #1131086, run #204073 on slot 2,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     4   3    INFO   ===>>>  start processing event #1130272, run #204073 on slot 3,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     1   0    INFO   ===>>>  done processing event #1129665, run #204073 on slot 0,  2 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     2   1    INFO   ===>>>  done processing event #1131212, run #204073 on slot 1,  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   1    INFO   ===>>>  start processing event #1130716, run #204073 on slot 1,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     3   2    INFO   ===>>>  done processing event #1131086, run #204073 on slot 2,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     4   3    INFO   ===>>>  done processing event #1130272, run #204073 on slot 3,  5 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     7   2    INFO   ===>>>  start processing event #1132019, run #204073 on slot 2,  5 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     8   3    INFO   ===>>>  start processing event #1132092, run #204073 on slot 3,  5 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     5   0    INFO   ===>>>  done processing event #1131269, run #204073 on slot 0,  6 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     6   1    INFO   ===>>>  done processing event #1130716, run #204073 on slot 1,  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   1    INFO   ===>>>  start processing event #1134553, run #204073 on slot 1,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     7   2    INFO   ===>>>  done processing event #1132019, run #204073 on slot 2,  8 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    11   2    INFO   ===>>>  start processing event #1130999, run #204073 on slot 2,  8 events processed so far  <<<===
+AthenaHiveEventLoopMgr                     8   3    INFO   ===>>>  done processing event #1132092, 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   1    INFO   ===>>>  done processing event #1134553, run #204073 on slot 1,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    12   0    INFO   ===>>>  start processing event #1133461, run #204073 on slot 0,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    13   1    INFO   ===>>>  start processing event #1131152, run #204073 on slot 1,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    14   3    INFO   ===>>>  start processing event #1130142, run #204073 on slot 3,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    11   2    INFO   ===>>>  done processing event #1130999, run #204073 on slot 2,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    12   0    INFO   ===>>>  done processing event #1133461, run #204073 on slot 0,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    15   0    INFO   ===>>>  start processing event #1132770, run #204073 on slot 0,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    16   2    INFO   ===>>>  start processing event #1132365, run #204073 on slot 2,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    13   1    INFO   ===>>>  done processing event #1131152, run #204073 on slot 1,  14 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    14   3    INFO   ===>>>  done processing event #1130142, run #204073 on slot 3,  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   3    INFO   ===>>>  start processing event #1133781, run #204073 on slot 3,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    15   0    INFO   ===>>>  done processing event #1132770, run #204073 on slot 0,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    16   2    INFO   ===>>>  done processing event #1132365, run #204073 on slot 2,  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                    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                    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   2    INFO   ===>>>  done processing event #1138637, run #204073 on slot 2,  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   2    INFO   ===>>>  start processing event #1139127, 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                    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                    22   3    INFO   ===>>>  done processing event #1140193, run #204073 on slot 3,  23 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    25   1    INFO   ===>>>  start processing event #1141272, run #204073 on slot 1,  23 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    26   3    INFO   ===>>>  start processing event #1137117, run #204073 on slot 3,  23 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                    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                    23   0    INFO   ===>>>  done processing event #1142953, run #204073 on slot 0,  24 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    24   2    INFO   ===>>>  done processing event #1139127, run #204073 on slot 2,  25 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    27   0    INFO   ===>>>  start processing event #1139599, run #204073 on slot 0,  25 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    28   2    INFO   ===>>>  start processing event #1140314, run #204073 on slot 2,  25 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    25   1    INFO   ===>>>  done processing event #1141272, run #204073 on slot 1,  26 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    26   3    INFO   ===>>>  done processing event #1137117, run #204073 on slot 3,  27 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   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                    29   1    INFO   ===>>>  start processing event #1133685, run #204073 on slot 1,  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   2    INFO   ===>>>  done processing event #1140314, run #204073 on slot 2,  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   2    INFO   ===>>>  start processing event #1139927, run #204073 on slot 2,  29 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    29   1    INFO   ===>>>  done processing event #1133685, run #204073 on slot 1,  30 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    30   3    INFO   ===>>>  done processing event #1143279, run #204073 on slot 3,  31 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    33   1    INFO   ===>>>  start processing event #1141197, run #204073 on slot 1,  31 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    34   3    INFO   ===>>>  start processing event #1140039, 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                    35   0    INFO   ===>>>  start processing event #1142531, run #204073 on slot 0,  32 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    32   2    INFO   ===>>>  done processing event #1139927, run #204073 on slot 2,  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   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                    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   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                    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                    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                    46   2    INFO   ===>>>  start processing event #1144170, run #204073 on slot 2,  43 events processed so far  <<<===
-AthenaHiveEventLoopMgr                    44   3    INFO   ===>>>  done processing event #1141705, run #204073 on slot 3,  44 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   3    INFO   ===>>>  done processing event #1140039, run #204073 on slot 3,  35 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    35   0    INFO   ===>>>  done processing event #1142531, run #204073 on slot 0,  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   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                    40   1    INFO   ===>>>  start processing event #1134147, run #204073 on slot 1,  38 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    41   2    INFO   ===>>>  start processing event #1137156, 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                    39   3    INFO   ===>>>  done processing event #1143097, run #204073 on slot 3,  40 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    42   0    INFO   ===>>>  start processing event #1136377, run #204073 on slot 0,  40 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    43   3    INFO   ===>>>  start processing event #1137842, run #204073 on slot 3,  40 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    40   1    INFO   ===>>>  done processing event #1134147, run #204073 on slot 1,  41 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    41   2    INFO   ===>>>  done processing event #1137156, run #204073 on slot 2,  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   2    INFO   ===>>>  start processing event #1143410, run #204073 on slot 2,  42 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    42   0    INFO   ===>>>  done processing event #1136377, run #204073 on slot 0,  43 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    43   3    INFO   ===>>>  done processing event #1137842, run #204073 on slot 3,  44 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    46   0    INFO   ===>>>  start processing event #1144170, run #204073 on slot 0,  44 events processed so far  <<<===
 AthenaHiveEventLoopMgr                    47   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                    50   2    INFO   ===>>>  start processing event #1142167, run #204073 on slot 2,  47 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    44   1    INFO   ===>>>  done processing event #1141705, run #204073 on slot 1,  45 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    48   1    INFO   ===>>>  start processing event #1145633, run #204073 on slot 1,  45 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    45   2    INFO   ===>>>  done processing event #1143410, run #204073 on slot 2,  46 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    49   2    INFO   ===>>>  start processing event #1135005, run #204073 on slot 2,  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   3    INFO   ===>>>  done processing event #1145987, run #204073 on slot 3,  48 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    50   0    INFO   ===>>>  start processing event #1142167, run #204073 on slot 0,  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                    48   1    INFO   ===>>>  done processing event #1145633, run #204073 on slot 1,  49 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    49   2    INFO   ===>>>  done processing event #1135005, run #204073 on slot 2,  50 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    52   1    INFO   ===>>>  start processing event #1145027, run #204073 on slot 1,  50 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    53   2    INFO   ===>>>  start processing event #1144112, run #204073 on slot 2,  50 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    50   0    INFO   ===>>>  done processing event #1142167, run #204073 on slot 0,  51 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    51   3    INFO   ===>>>  done processing event #1144646, run #204073 on slot 3,  52 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    54   0    INFO   ===>>>  start processing event #1138485, run #204073 on slot 0,  52 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    55   3    INFO   ===>>>  start processing event #1144565, run #204073 on slot 3,  52 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    52   1    INFO   ===>>>  done processing event #1145027, run #204073 on slot 1,  53 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    53   2    INFO   ===>>>  done processing event #1144112, run #204073 on slot 2,  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   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                    54   0    INFO   ===>>>  done processing event #1138485, run #204073 on slot 0,  55 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    55   3    INFO   ===>>>  done processing event #1144565, run #204073 on slot 3,  56 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    58   0    INFO   ===>>>  start processing event #1143799, run #204073 on slot 0,  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                    56   1    INFO   ===>>>  done processing event #1139498, run #204073 on slot 1,  57 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    57   2    INFO   ===>>>  done processing event #1136546, run #204073 on slot 2,  58 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    60   1    INFO   ===>>>  start processing event #1149894, run #204073 on slot 1,  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   0    INFO   ===>>>  done processing event #1143799, run #204073 on slot 0,  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   0    INFO   ===>>>  start processing event #1143770, run #204073 on slot 0,  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                    61   2    INFO   ===>>>  done processing event #1145364, run #204073 on slot 2,  62 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    64   1    INFO   ===>>>  start processing event #1148167, run #204073 on slot 1,  62 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    65   2    INFO   ===>>>  start processing event #1138948, run #204073 on slot 2,  62 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    62   0    INFO   ===>>>  done processing event #1143770, run #204073 on slot 0,  63 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    63   3    INFO   ===>>>  done processing event #1148361, run #204073 on slot 3,  64 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    66   0    INFO   ===>>>  start processing event #1144808, run #204073 on slot 0,  64 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    67   3    INFO   ===>>>  start processing event #1145832, run #204073 on slot 3,  64 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    64   1    INFO   ===>>>  done processing event #1148167, run #204073 on slot 1,  65 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    65   2    INFO   ===>>>  done processing event #1138948, run #204073 on slot 2,  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   2    INFO   ===>>>  start processing event #1142524, run #204073 on slot 2,  66 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    66   0    INFO   ===>>>  done processing event #1144808, run #204073 on slot 0,  67 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    67   3    INFO   ===>>>  done processing event #1145832, run #204073 on slot 3,  68 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    70   0    INFO   ===>>>  start processing event #1138294, run #204073 on slot 0,  68 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    71   3    INFO   ===>>>  start processing event #1138350, run #204073 on slot 3,  68 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    68   1    INFO   ===>>>  done processing event #1153100, run #204073 on slot 1,  69 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    69   2    INFO   ===>>>  done processing event #1142524, run #204073 on slot 2,  70 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    72   1    INFO   ===>>>  start processing event #1149424, run #204073 on slot 1,  70 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    73   2    INFO   ===>>>  start processing event #1151102, run #204073 on slot 2,  70 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    70   0    INFO   ===>>>  done processing event #1138294, run #204073 on slot 0,  71 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    71   3    INFO   ===>>>  done processing event #1138350, run #204073 on slot 3,  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   3    INFO   ===>>>  start processing event #1148416, run #204073 on slot 3,  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   2    INFO   ===>>>  done processing event #1151102, run #204073 on slot 2,  74 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    76   1    INFO   ===>>>  start processing event #1142753, run #204073 on slot 1,  74 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    77   2    INFO   ===>>>  start processing event #1149997, run #204073 on slot 2,  74 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    74   0    INFO   ===>>>  done processing event #1152242, run #204073 on slot 0,  75 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    75   3    INFO   ===>>>  done processing event #1148416, run #204073 on slot 3,  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   3    INFO   ===>>>  start processing event #1149794, run #204073 on slot 3,  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   2    INFO   ===>>>  done processing event #1149997, run #204073 on slot 2,  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   2    INFO   ===>>>  start processing event #1142485, run #204073 on slot 2,  78 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    78   0    INFO   ===>>>  done processing event #1151617, run #204073 on slot 0,  79 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    79   3    INFO   ===>>>  done processing event #1149794, run #204073 on slot 3,  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   3    INFO   ===>>>  start processing event #1143901, run #204073 on slot 3,  80 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    80   1    INFO   ===>>>  done processing event #1152504, run #204073 on slot 1,  81 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    81   2    INFO   ===>>>  done processing event #1142485, run #204073 on slot 2,  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   2    INFO   ===>>>  start processing event #1150212, run #204073 on slot 2,  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   3    INFO   ===>>>  done processing event #1143901, run #204073 on slot 3,  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   3    INFO   ===>>>  start processing event #1155482, run #204073 on slot 3,  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   2    INFO   ===>>>  done processing event #1150212, run #204073 on slot 2,  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   2    INFO   ===>>>  start processing event #1140275, run #204073 on slot 2,  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   3    INFO   ===>>>  done processing event #1155482, run #204073 on slot 3,  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   1    INFO   ===>>>  done processing event #1150472, run #204073 on slot 1,  89 events processed so far  <<<===
+AthenaHiveEventLoopMgr                    89   2    INFO   ===>>>  done processing event #1140275, run #204073 on slot 2,  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   2    INFO   ===>>>  start processing event #1156381, run #204073 on slot 2,  90 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                    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                    93   2    INFO   ===>>>  done processing event #1156381, 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                    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                    94   0    INFO   ===>>>  done processing event #1149161, run #204073 on slot 0,  95 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                    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   ===>>>  done processing event #1156938, run #204073 on slot 0,  99 events processed so far  <<<===
-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
+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): 6.487
 /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...
@@ -1263,7 +1255,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.19 ))s
+IOVDbFolder                                         INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.04 ))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
@@ -1275,7 +1267,7 @@ 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.08 ))s
+IOVDbFolder                                         INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.22 ))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.26 ))s
@@ -1289,9 +1281,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=  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
+cObjR_ALL                                           INFO Time User   : Tot=  490 [ms] Ave/Min/Max=     245(+-     235)/      10/     480 [ms] #=  2
+cObj_ALL                                            INFO Time User   : Tot= 0.54  [s] Ave/Min/Max=    0.27(+-    0.24)/    0.03/    0.51  [s] #=  2
+ChronoStatSvc                                       INFO Time User   : Tot= 15.2  [s]  #=  1
 *****Chrono*****                                    INFO ****************************************************************************************************
 ChronoStatSvc.finalize()                            INFO  Service finalized successfully 
 ApplicationMgr                                      INFO Application Manager Finalized successfully
-- 
GitLab


From ce1b8387fa0bb50aac229efe59499ab4ac645f50 Mon Sep 17 00:00:00 2001
From: Alaettin Serhan Mete <alaettin.serhan.mete@cern.ch>
Date: Tue, 6 Oct 2020 18:38:08 +0000
Subject: [PATCH 267/403] PyUtils + PROCTools: Add regex support to diff-root
 and add diff-root exclusion list support to RunTier0Tests.py

---
 Tools/PROCTools/python/RunTier0Tests.py       | 42 +++++++++++++++----
 Tools/PROCTools/python/RunTier0TestsTools.py  |  2 +
 .../PyUtils/python/scripts/diff_root_files.py | 31 +++++++++++---
 3 files changed, 62 insertions(+), 13 deletions(-)

diff --git a/Tools/PROCTools/python/RunTier0Tests.py b/Tools/PROCTools/python/RunTier0Tests.py
index 46273f15dff3..b433b25b798d 100755
--- a/Tools/PROCTools/python/RunTier0Tests.py
+++ b/Tools/PROCTools/python/RunTier0Tests.py
@@ -299,11 +299,12 @@ def QTestsFailedOrPassed(q,qTestsToRun,CleanRunHeadDir,UniqID,RunPatchedOnly=Fal
              
 
 ############### Run Frozen Tier0 Policy Test 
-def RunFrozenTier0PolicyTest(q,inputFormat,maxEvents,CleanRunHeadDir,UniqID,RunPatchedOnly=False):
+def RunFrozenTier0PolicyTest(q,inputFormat,maxEvents,CleanRunHeadDir,UniqID,DiffExclusionListsDir,RunPatchedOnly=False):
     logging.info("---------------------------------------------------------------------------------------" )
     logging.info("Running "+q+" Frozen Tier0 Policy Test on "+inputFormat+" for "+str(maxEvents)+" events" )
 
     clean_dir = CleanRunHeadDir+"/clean_run_"+q+"_"+UniqID
+    diff_rules_file = DiffExclusionListsDir
 
     if RunPatchedOnly: #overwrite
         # Resolve the subfolder first. Results are stored like: main_folder/q-test/branch/version/.
@@ -311,16 +312,32 @@ def RunFrozenTier0PolicyTest(q,inputFormat,maxEvents,CleanRunHeadDir,UniqID,RunP
         subfolder = os.environ['AtlasVersion'][0:4]
         # Use EOS if mounted, otherwise CVMFS
         clean_dir = '/eos/atlas/atlascerngroupdisk/data-art/grid-input/Tier0ChainTests/{0}/{1}/{2}'.format(q,subfolder,ciRefFileMap['{0}-{1}'.format(q,subfolder)])
+        diff_rules_file = '/eos/atlas/atlascerngroupdisk/data-art/grid-input/Tier0ChainTests/{0}/{1}'.format(q,subfolder)
         if(glob.glob(clean_dir)):
             logging.info("EOS is mounted, going to read the reference files from there instead of CVMFS")
             clean_dir = 'root://eosatlas.cern.ch/'+clean_dir # In case outside CERN
         else:
             logging.info("EOS is not mounted, going to read the reference files from CVMFS")
             clean_dir = '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/{0}/{1}/{2}'.format(q,subfolder,ciRefFileMap['{0}-{1}'.format(q,subfolder)])
+            diff_rules_file = '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/grid-input/Tier0ChainTests/{0}/{1}'.format(q,subfolder)
+
+    diff_rules_file += "/"+q+"_"+inputFormat+"_diff-exclusion-list.txt"
 
     logging.info("Reading the reference file from location "+clean_dir)
 
-    comparison_command = "acmd.py diff-root "+clean_dir+"/my"+inputFormat+".pool.root run_"+q+"/my"+inputFormat+".pool.root --error-mode resilient --ignore-leaves  index_ref  RecoTimingObj_p1_EVNTtoHITS_timings  RecoTimingObj_p1_HITStoRDO_timings  RecoTimingObj_p1_RAWtoESD_mems  RecoTimingObj_p1_RAWtoESD_timings  RecoTimingObj_p1_RAWtoALL_mems  RecoTimingObj_p1_RAWtoALL_timings  RAWtoALL_mems  RAWtoALL_timings  RAWtoESD_mems  RAWtoESD_timings  ESDtoAOD_mems  ESDtoAOD_timings  HITStoRDO_mems  HITStoRDO_timings --entries "+str(maxEvents)+" > run_"+q+"/diff-root-"+q+"."+inputFormat+".log 2>&1"
+    if os.path.exists(diff_rules_file):
+        logging.info("Reading the diff rules file from location "+diff_rules_file)
+        exclusion_list = []
+        with open(diff_rules_file) as f:
+            for line in f:
+                exclusion_list.append('"'+line.rstrip()+'"')
+    else:
+        logging.info("No diff rules file exists, using the default list")
+        exclusion_list = ['"index_ref"', '"(.*)_timings$"', '"(.*)_mems$"']
+
+    exclusion_list = ' '.join(exclusion_list)
+
+    comparison_command = "acmd.py diff-root "+clean_dir+"/my"+inputFormat+".pool.root run_"+q+"/my"+inputFormat+".pool.root -v --error-mode resilient --ignore-leaves "+exclusion_list+" --entries "+str(maxEvents)+" > run_"+q+"/diff-root-"+q+"."+inputFormat+".log 2>&1"
     output,error = subprocess.Popen(['/bin/bash', '-c', comparison_command], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
     output,error = output.decode('utf-8'), error.decode('utf-8')
 
@@ -568,6 +585,14 @@ def main():
                       dest="ci_flag",
                       default=False,
                       help="no-setup will not setup athena - only for CI tests!")
+    parser.add_option("-z",
+                      "--diffExclusionListsDir",
+                      type="string",
+                      dest="diffExclusionListsDir",
+                      default=".",
+                      help="""specify the directory that contains the lists of variables that will be omitted while comparing the
+                      outputs. The default is ./ and the format of the files is ${q-test}_${format}_diff-exclusion-list.txt, e.g.
+                      q431_AOD_diff-exclusion-list.txt.""")
 
 
     (options,args)=parser.parse_args()
@@ -587,6 +612,7 @@ def main():
     r2aMode         = options.r2a_flag
     trigRun2Config  = options.trigRun2Config_flag    
     ciMode          = options.ci_flag
+    DiffExclusionListsDir    = options.diffExclusionListsDir
 
 #        tct_ESD = "root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/proj-sit/rtt/prod/tct/"+latest_nightly+"/"+release+"/"+platform+"/offline/Tier0ChainTests/"+q+"/myESD.pool.root"          
 
@@ -797,26 +823,26 @@ def main():
                 continue
 
             if RunSim:
-                if not RunFrozenTier0PolicyTest(q,"HITS",10,CleanRunHeadDir,UniqName,RunPatchedOnly):
+                if not RunFrozenTier0PolicyTest(q,"HITS",10,CleanRunHeadDir,UniqName,DiffExclusionListsDir,RunPatchedOnly):
                     All_Tests_Passed = False
             elif RunOverlay:
-                if not RunFrozenTier0PolicyTest(q,"RDO",10,CleanRunHeadDir,UniqName,RunPatchedOnly):
+                if not RunFrozenTier0PolicyTest(q,"RDO",10,CleanRunHeadDir,UniqName,DiffExclusionListsDir,RunPatchedOnly):
                     All_Tests_Passed = False
             elif RunPileUp:
-                if not RunFrozenTier0PolicyTest(q,"AOD",10,CleanRunHeadDir,UniqName,RunPatchedOnly):
+                if not RunFrozenTier0PolicyTest(q,"AOD",10,CleanRunHeadDir,UniqName,DiffExclusionListsDir,RunPatchedOnly):
                     All_Tests_Passed = False
             else:
-                if not RunFrozenTier0PolicyTest(q,"ESD",10,CleanRunHeadDir,UniqName,RunPatchedOnly):
+                if not RunFrozenTier0PolicyTest(q,"ESD",10,CleanRunHeadDir,UniqName,DiffExclusionListsDir,RunPatchedOnly):
                     All_Tests_Passed = False
 
-                if not RunFrozenTier0PolicyTest(q,"AOD",20,CleanRunHeadDir,UniqName,RunPatchedOnly):
+                if not RunFrozenTier0PolicyTest(q,"AOD",20,CleanRunHeadDir,UniqName,DiffExclusionListsDir,RunPatchedOnly):
                     All_Tests_Passed = False
 
             if RunPatchedOnly:
                 continue  # Performance checks against static references not possible
     
             if 'q221' in q or 'q440' in q: 
-                if not RunFrozenTier0PolicyTest(q,"RDO",10,CleanRunHeadDir,UniqName):
+                if not RunFrozenTier0PolicyTest(q,"RDO",10,CleanRunHeadDir,UniqName,DiffExclusionListsDir):
                     All_Tests_Passed = False
             
             if not RunTest(q,qTestsToRun,"CPU Time"       ,"evtloop_time"    ,"msec/event"  ,4,0.4,CleanRunHeadDir,UniqName):
diff --git a/Tools/PROCTools/python/RunTier0TestsTools.py b/Tools/PROCTools/python/RunTier0TestsTools.py
index 75597784c7a5..122b90e86c31 100644
--- a/Tools/PROCTools/python/RunTier0TestsTools.py
+++ b/Tools/PROCTools/python/RunTier0TestsTools.py
@@ -17,6 +17,8 @@ ciRefFileMap = {
                 'q431-21.0'            : 'v1',
                 'q221-21.3'            : 'v1',
                 'q431-21.3'            : 'v1',
+                'q221-22.0'            : 'v1',
+                'q431-22.0'            : 'v1',
                 # SimulationTier0Test_required-test
                 's3126-21.0'           : 'v1',
                 's3126-21.3'           : 'v1',
diff --git a/Tools/PyUtils/python/scripts/diff_root_files.py b/Tools/PyUtils/python/scripts/diff_root_files.py
index 68a617e66902..21b3a867cc83 100644
--- a/Tools/PyUtils/python/scripts/diff_root_files.py
+++ b/Tools/PyUtils/python/scripts/diff_root_files.py
@@ -44,7 +44,7 @@ def _is_exit_early():
 @acmdlib.argument('--ignore-leaves',
                   nargs='*',
                   default=('Token', 'index_ref',),
-                  help='set of leaves names to ignore from comparison; can be a branch name or a partial leaf name (without any trailing dots)')
+                  help='set of leaves names to ignore from comparison; can be a branch name or a partial leaf name (accepts regex)')
 @acmdlib.argument('--enforce-leaves',
                   nargs='*',
                   default=('BCID',),
@@ -134,16 +134,37 @@ def main(args):
         fnew = ru.RootFileDumper(args.new, args.tree_name)
         pass
     
+    def build_ignore_list( all_leaves, ignore_leaves ):
+        """ Here we build the list of leaves that'll be ignored in the diff"""
+
+        import re
+        result = set()
+
+        # Loop over leaves and patterns, add matches to the results
+        # The set() is taken elsewhere in the code
+        for leaf in all_leaves:
+            for pattern in ignore_leaves:
+                try:
+                    m = re.match(pattern, leaf)
+                except TypeError:
+                    continue
+                if m:
+                    result.add(leaf)
+
+        return result
+
     def tree_infos(tree, args):
         nentries = tree.GetEntriesFast()
         # l.GetBranch().GetName() gives the full leaf path name
-        leaves = [l.GetBranch().GetName() for l in tree.GetListOfLeaves()
-                  if l.GetBranch().GetName() not in args.ignore_leaves]
+        all_leaves = [ l.GetBranch().GetName() for l in tree.GetListOfLeaves() ]
+        ignore_leaves = build_ignore_list( all_leaves, args.ignore_leaves )
+        leaves = [ leaf for leaf in all_leaves if leaf not in ignore_leaves ]
         if args.leaves_prefix:
             leaves = [l.replace(args.leaves_prefix, '') for l in leaves]
         return {
-            'entries' : nentries,
+            'entries': nentries,
             'leaves': set(leaves),
+            'ignored': ignore_leaves
             }
     
     def ordered_indices(tree, reverse_order = False):
@@ -221,7 +242,7 @@ def main(args):
                 msg.warning(' - [%s]', l)
 
         # need to remove trailing dots as they confuse reach_next()
-        skip_leaves = [ l.rstrip('.') for l in old_leaves | new_leaves | set(args.ignore_leaves) ]
+        skip_leaves = [ l.rstrip('.') for l in old_leaves | new_leaves | infos['old']['ignored'].union(infos['new']['ignored']) ]
         for l in skip_leaves:
             msg.debug('skipping [%s]', l)
 
-- 
GitLab


From 8baa2815042088b897aab369ff6ed9f3364f116b Mon Sep 17 00:00:00 2001
From: Michael Duehrssen-Debling <michael.duehrssen@cern.ch>
Date: Tue, 6 Oct 2020 18:54:04 +0000
Subject: [PATCH 268/403] Manual sweep 35986

---
 .../ISF_FastCaloSimEvent/TFCS1DFunction.h     |   6 +-
 .../TFCS1DFunctionInt32Histogram.h            |   4 +-
 .../ISF_FastCaloSimEvent/TFCSHitCellMapping.h |   4 +-
 .../TFCSHitCellMappingWiggle.h                |   7 +-
 .../TFCSLateralShapeParametrization.h         |   6 +-
 .../TFCSLateralShapeParametrizationHitChain.h |  20 +---
 ...ateralShapeParametrizationHitNumberFromE.h |   8 +-
 .../TFCSParametrization.h                     |   5 +-
 .../TFCSParametrizationBase.h                 |  25 +++-
 .../TFCSParametrizationChain.h                |   1 +
 .../src/TFCS1DFunctionInt32Histogram.cxx      |  13 ++-
 .../src/TFCSHitCellMapping.cxx                |  11 +-
 .../src/TFCSHitCellMappingWiggle.cxx          |  51 +++++++-
 .../src/TFCSLateralShapeParametrization.cxx   |  22 +++-
 ...FCSLateralShapeParametrizationHitChain.cxx |  44 ++++++-
 ...eralShapeParametrizationHitNumberFromE.cxx |  27 ++++-
 .../src/TFCSParametrization.cxx               |  35 +++++-
 .../src/TFCSParametrizationBase.cxx           | 110 ++++++++++++++++++
 .../src/FastCaloSimV2ParamSvc.cxx             |   7 +-
 .../src/FastCaloSimV2ParamSvc.h               |   3 +-
 20 files changed, 370 insertions(+), 39 deletions(-)

diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunction.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunction.h
index e9cb7cf1e132..02c6d47b620a 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunction.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunction.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 ISF_FASTCALOSIMEVENT_TFCS1DFunction_h
@@ -28,6 +28,10 @@ class TFCS1DFunction:public TFCSFunction
     ///Function gets random number rnd in the range [0,1) as argument and returns function value
     virtual double rnd_to_fct(double rnd) const = 0;
 
+    ///The == operator compares the content of instances. 
+    ///The implementation in the base class only returns true for a comparison with itself
+    virtual bool operator==(const TFCS1DFunction& ref) const {return this==&ref;};
+
     static double get_maxdev(TH1* , TH1* );
 
     static double CheckAndIntegrate1DHistogram(const TH1* hist, std::vector<double>& integral_vec,int& first,int& last);
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionInt32Histogram.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionInt32Histogram.h
index a839f69d23c1..1d55b0c178f4 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionInt32Histogram.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionInt32Histogram.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 ISF_FASTCALOSIMEVENT_TFCS1DFunctionInt32Histogram_h
@@ -27,6 +27,8 @@ class TFCS1DFunctionInt32Histogram:public TFCS1DFunction
     ///and returns function value according to a histogram distribution
     virtual double rnd_to_fct(double rnd) const;
 
+    virtual bool operator==(const TFCS1DFunction& ref) const;
+
     const std::vector<float>& get_HistoBordersx() const {return m_HistoBorders;};
     std::vector<float>& get_HistoBordersx() {return m_HistoBorders;};
     const std::vector<HistoContent_t>& get_HistoContents() const {return m_HistoContents;};
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMapping.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMapping.h
index 969fa90398d5..03e474460fa6 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMapping.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMapping.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 TFCSHitCellMapping_h
@@ -19,6 +19,8 @@ public:
   /// fills all hits into calorimeter cells
   virtual FCSReturnCode simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) override;
 
+  virtual bool operator==(const TFCSParametrizationBase& ref) const override;
+
   void Print(Option_t *option) const override;
 
 protected:
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMappingWiggle.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMappingWiggle.h
index a21538c9cf90..a369f4112cb7 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMappingWiggle.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMappingWiggle.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 TFCSHitCellMappingWiggle_h
@@ -34,10 +34,15 @@ public:
   /// and then fills all hits into calorimeter cells
   virtual FCSReturnCode simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) override;
 
+  virtual bool operator==(const TFCSParametrizationBase& ref) const override;
+
   void Print(Option_t *option="") const override;
 
   static void unit_test(TFCSSimulationState* simulstate=nullptr,TFCSTruthState* truth=nullptr, TFCSExtrapolationState* extrapol=nullptr);
 
+protected:  
+  bool compare(const TFCSParametrizationBase& ref) const;
+
 private:
   //** Function for the hit-to-cell assignment accordion structure fix (wiggle)  **//
   //** To be moved to the conditions database at some point **//
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrization.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrization.h
index 41f9dd401878..6de914a1107a 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrization.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrization.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 TFCSLateralShapeParametrization_h
@@ -26,6 +26,10 @@ public:
   virtual void set_pdgid_Ekin_eta_Ekin_bin_calosample(const TFCSLateralShapeParametrization& ref);
   
   void Print(Option_t *option = "") const override;
+
+protected:  
+  bool compare(const TFCSParametrizationBase& ref) const;
+
 private:
   int m_Ekin_bin;
   int m_calosample;
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitChain.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitChain.h
index bfb84fbfd781..4cd1818b2011 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitChain.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitChain.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 TFCSLateralShapeParametrizationHitChain_h
@@ -16,12 +16,11 @@ public:
 
   virtual FCSReturnCode simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) const override;
 
-  virtual void set_geometry(ICaloGeometry* geo) override;
-
   typedef std::vector< TFCSLateralShapeParametrizationHitBase* > Chain_t;
-  virtual unsigned int size() const override {return m_chain.size();};
-  virtual const TFCSParametrizationBase* operator[](unsigned int ind) const override {return m_chain[ind];};
-  virtual TFCSParametrizationBase* operator[](unsigned int ind) override {return m_chain[ind];};
+  virtual unsigned int size() const override;
+  virtual const TFCSParametrizationBase* operator[](unsigned int ind) const override;
+  virtual TFCSParametrizationBase* operator[](unsigned int ind) override;
+  virtual void set_daughter(unsigned int ind,TFCSParametrizationBase* param) override;
   const Chain_t& chain() const {return m_chain;};
   Chain_t& chain() {return m_chain;};
   void push_back( const Chain_t::value_type& value ) {m_chain.push_back(value);};
@@ -48,15 +47,6 @@ public:
 
   void Print(Option_t *option = "") const override;
 
-#if defined(__FastCaloSimStandAlone__)
-  /// Update outputlevel
-  virtual void setLevel(int level,bool recursive=false) override {
-    TFCSLateralShapeParametrization::setLevel(level,recursive);
-    if(recursive) if(m_number_of_hits_simul) m_number_of_hits_simul->setLevel(level,recursive);
-  }
-#endif
-
-
 protected:
   Chain_t m_chain;
   
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitNumberFromE.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitNumberFromE.h
index 8614caf117ff..4f37a5736bef 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitNumberFromE.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitNumberFromE.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 TFCSLateralShapeParametrizationHitNumberFromE_h
@@ -33,7 +33,13 @@ public:
 
   int get_number_of_hits(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) const override;
 
+  virtual bool operator==(const TFCSParametrizationBase& ref) const override;
+
   void Print(Option_t *option = "") const override;
+
+protected:  
+  bool compare(const TFCSParametrizationBase& ref) const;
+
 private:
   // Information for the fluctuation terms
   // The variation is calculated as:
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrization.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrization.h
index 70c9098dccb3..fe1a8d2dfcf0 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrization.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrization.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 ISF_FASTCALOSIMEVENT_TFCSParametrization_h
@@ -45,6 +45,9 @@ public:
   virtual void set_eta(const TFCSParametrizationBase& ref);
   virtual void set_Ekin_eta(const TFCSParametrizationBase& ref);
   virtual void set_pdgid_Ekin_eta(const TFCSParametrizationBase& ref);
+  
+protected:  
+  bool compare(const TFCSParametrizationBase& ref) const;
 
 private:
   std::set< int > m_pdgid;
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationBase.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationBase.h
index 5debb60d7c9e..6cbd89e4faba 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationBase.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationBase.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 ISF_FASTCALOSIMEVENT_TFCSParametrizationBase_h
@@ -7,6 +7,7 @@
 
 #include <TNamed.h>
 #include <set>
+#include <map>
 
 class ICaloGeometry;
 class TFCSSimulationState;
@@ -130,6 +131,15 @@ public:
   ///The size() and operator[] methods give general access to these daughters
   virtual TFCSParametrizationBase* operator[](unsigned int /*ind*/) {return nullptr;};
 
+  ///Some derived classes have daughter instances of TFCSParametrizationBase objects
+  ///The set_daughter method allows to change these daughters - expert use only!
+  ///The original element at this position is not deleted
+  virtual void set_daughter(unsigned int /*ind*/,TFCSParametrizationBase* /*param*/) {};
+  
+  ///The == operator compares the content of instances. 
+  ///The implementation in the base class only returns true for a comparison with itself
+  virtual bool operator==(const TFCSParametrizationBase& ref) const {return compare(ref);};
+
   ///Method in all derived classes to do some simulation
   virtual FCSReturnCode simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) const;
 
@@ -139,6 +149,17 @@ public:
   ///Deletes all objects from the s_cleanup_list. 
   ///This list can get filled during streaming operations, where an immediate delete is not possible
   static void DoCleanup();
+  
+  struct Duplicate_t {
+    TFCSParametrizationBase* replace=nullptr;
+    std::vector< TFCSParametrizationBase* > mother;
+    std::vector< unsigned int > index;
+  };
+  typedef std::map< TFCSParametrizationBase* , Duplicate_t > FindDuplicates_t;
+  typedef std::map< std::string , FindDuplicates_t > FindDuplicateClasses_t;
+  void FindDuplicates(FindDuplicateClasses_t& dup);
+  void RemoveDuplicates();
+  void RemoveNameTitle();
 
 protected:
   static constexpr double init_Ekin_nominal=0;//! Do not persistify!
@@ -149,6 +170,8 @@ protected:
   static constexpr double init_eta_max=100;//! Do not persistify!
 
   static std::vector< TFCSParametrizationBase* > s_cleanup_list;
+  
+  bool compare(const TFCSParametrizationBase& ref) const;
 
 #if defined(__FastCaloSimStandAlone__)
 public:
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationChain.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationChain.h
index 6f708e44a893..5736404088bf 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationChain.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationChain.h
@@ -30,6 +30,7 @@ public:
   virtual unsigned int size() const override {return m_chain.size();};
   virtual const TFCSParametrizationBase* operator[](unsigned int ind) const override {return m_chain[ind];};
   virtual TFCSParametrizationBase* operator[](unsigned int ind) override {return m_chain[ind];};
+  virtual void set_daughter(unsigned int ind,TFCSParametrizationBase* param) override {m_chain.at(ind)=param;};
   const Chain_t& chain() const {return m_chain;};
   Chain_t& chain() {return m_chain;};
   void push_back(const Chain_t::value_type& param) {m_chain.push_back(param);recalc();};
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionInt32Histogram.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionInt32Histogram.cxx
index 1402bd4277fb..d9433fb4c05f 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionInt32Histogram.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionInt32Histogram.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 "ISF_FastCaloSimEvent/TFCS1DFunctionInt32Histogram.h"
@@ -10,6 +10,7 @@
 #include "TH2F.h"
 #include "TRandom.h"
 #include "TFile.h"
+#include "TClass.h"
 
 //=============================================
 //======= TFCS1DFunctionInt32Histogram =========
@@ -78,6 +79,16 @@ double TFCS1DFunctionInt32Histogram::rnd_to_fct(double rnd) const
   }
 }
 
+bool TFCS1DFunctionInt32Histogram::operator==(const TFCS1DFunction& ref) const
+{
+  if(IsA()!=ref.IsA()) return false;
+  const TFCS1DFunctionInt32Histogram& ref_typed=static_cast<const TFCS1DFunctionInt32Histogram&>(ref);
+
+  if(m_HistoBorders!=ref_typed.m_HistoBorders) return false;
+  if(m_HistoContents!=ref_typed.m_HistoContents) return false;
+  return true;
+}
+
 void TFCS1DFunctionInt32Histogram::unit_test(TH1* hist)
 {
   int nbinsx;
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMapping.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMapping.cxx
index ce5eac7bc731..6748d47fb1b9 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMapping.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMapping.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 "ISF_FastCaloSimEvent/TFCSHitCellMapping.h"
@@ -31,6 +31,15 @@ FCSReturnCode TFCSHitCellMapping::simulate_hit(Hit& hit,TFCSSimulationState& sim
   }
 }
 
+bool TFCSHitCellMapping::operator==(const TFCSParametrizationBase& ref) const
+{
+  if(TFCSParametrizationBase::compare(ref)) return true;
+  if(!TFCSParametrization::compare(ref)) return false;
+  if(!TFCSLateralShapeParametrization::compare(ref)) return false;
+
+  return true;
+}
+
 void TFCSHitCellMapping::Print(Option_t *option) const
 {
   TString opt(option);
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMappingWiggle.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMappingWiggle.cxx
index 94a6db4f3eca..9bb98d634b89 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMappingWiggle.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMappingWiggle.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 "CLHEP/Random/RandFlat.h"
@@ -13,10 +13,7 @@
 #include "TH1.h"
 #include "TVector2.h"
 #include "TMath.h"
-
-#if 0 //defined(__FastCaloSimStandAlone__)
-#include "CaloGeometryFromFile.h"
-#endif
+#include <TClass.h>
 
 //=============================================
 //======= TFCSHitCellMappingWiggle =========
@@ -116,6 +113,16 @@ FCSReturnCode TFCSHitCellMappingWiggle::simulate_hit(Hit& hit,TFCSSimulationStat
   return TFCSHitCellMapping::simulate_hit(hit,simulstate,truth,extrapol);
 }
 
+bool TFCSHitCellMappingWiggle::operator==(const TFCSParametrizationBase& ref) const
+{
+  if(TFCSParametrizationBase::compare(ref)) return true;
+  if(!TFCSParametrization::compare(ref)) return false;
+  if(!TFCSLateralShapeParametrization::compare(ref)) return false;
+  if(!TFCSHitCellMappingWiggle::compare(ref)) return false;
+
+  return true;
+}
+
 void TFCSHitCellMappingWiggle::Print(Option_t *option) const
 {
   TFCSHitCellMapping::Print(option);
@@ -131,6 +138,40 @@ void TFCSHitCellMappingWiggle::Print(Option_t *option) const
   }  
 }
 
+bool TFCSHitCellMappingWiggle::compare(const TFCSParametrizationBase& ref) const
+{
+  if(IsA()!=ref.IsA()) {
+    ATH_MSG_DEBUG("compare(): different class types "<<IsA()->GetName()<<" != "<<ref.IsA()->GetName());
+    return false;
+  }
+  const TFCSHitCellMappingWiggle& ref_typed=static_cast<const TFCSHitCellMappingWiggle&>(ref);
+  
+  if(m_bin_low_edge != ref_typed.m_bin_low_edge ) {
+    ATH_MSG_DEBUG("operator==(): different bin edges");
+    return false;
+  }
+
+  for (unsigned int i=0;i<get_number_of_bins();++i) {
+    const TFCS1DFunction* f1=get_function(i);
+    const TFCS1DFunction* f2=ref_typed.get_function(i);
+    if(!f1 && !f2) continue;
+    if((f1 && !f2) || (!f1 && f2)) {
+      ATH_MSG_DEBUG("compare(): different only one function pointer is nullptr");
+      return false;
+    }
+    if(f1->IsA()!=f2->IsA()) {
+      ATH_MSG_DEBUG("compare(): different class types for function "<<i<<": "<<f1->IsA()->GetName()<<" != "<<f2->IsA()->GetName());
+      return false;
+    }
+    if(!(*f1==*f2)) {
+      ATH_MSG_DEBUG("compare(): difference in functions "<<i);
+      return false;
+    }
+  }  
+
+  return true;
+}
+
 void TFCSHitCellMappingWiggle::unit_test(TFCSSimulationState* simulstate,TFCSTruthState* truth, TFCSExtrapolationState* extrapol)
 {
   if(!simulstate) simulstate=new TFCSSimulationState();
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrization.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrization.cxx
index 83d2e7fdb931..a12ca4b84c48 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrization.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrization.cxx
@@ -1,9 +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
 */
 
 #include "ISF_FastCaloSimEvent/TFCSLateralShapeParametrization.h"
 #include "ISF_FastCaloSimEvent/FastCaloSim_CaloCell_ID.h"
+#include <TClass.h>
 
 //=============================================
 //======= TFCSLateralShapeParametrization =========
@@ -30,6 +31,25 @@ void TFCSLateralShapeParametrization::set_pdgid_Ekin_eta_Ekin_bin_calosample(con
   set_pdgid_Ekin_eta(ref);
 }
 
+bool TFCSLateralShapeParametrization::compare(const TFCSParametrizationBase& ref) const
+{
+  if(IsA()!=ref.IsA()) {
+    ATH_MSG_DEBUG("compare(): different class types "<<IsA()->GetName()<<" != "<<ref.IsA()->GetName());
+    return false;
+  }
+  const TFCSLateralShapeParametrization& ref_typed=static_cast<const TFCSLateralShapeParametrization&>(ref);
+  if(Ekin_bin()!=ref_typed.Ekin_bin()) {
+    ATH_MSG_DEBUG("compare(): different Ekin bin");
+    return false;
+  }
+  if(calosample()!=ref_typed.calosample()) {
+    ATH_MSG_DEBUG("compare(): different calosample");
+    return false;
+  }
+
+  return true;
+}
+
 void TFCSLateralShapeParametrization::Print(Option_t *option) const
 {
   TString opt(option);
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitChain.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitChain.cxx
index 969c3cfdb20f..0543c4b891e3 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitChain.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitChain.cxx
@@ -7,6 +7,7 @@
 
 #include "ISF_FastCaloSimEvent/TFCSSimulationState.h"
 #include "TMath.h"
+#include <TClass.h>
 
 //=============================================
 //======= TFCSLateralShapeParametrizationHitChain =========
@@ -23,10 +24,47 @@ TFCSLateralShapeParametrizationHitChain::TFCSLateralShapeParametrizationHitChain
   m_chain.push_back(hitsim);
 }
 
-void TFCSLateralShapeParametrizationHitChain::set_geometry(ICaloGeometry* geo)
+unsigned int TFCSLateralShapeParametrizationHitChain::size() const 
 {
-  TFCSLateralShapeParametrization::set_geometry(geo);
-  if(m_number_of_hits_simul) m_number_of_hits_simul->set_geometry(geo);
+  if(m_number_of_hits_simul) return m_chain.size()+1;
+   else return m_chain.size();
+}
+
+const TFCSParametrizationBase* TFCSLateralShapeParametrizationHitChain::operator[](unsigned int ind) const 
+{
+  if(m_number_of_hits_simul) {
+    if(ind==0) return m_number_of_hits_simul;
+    return m_chain[ind-1];
+  } else {
+    return m_chain[ind];
+  }  
+}
+
+TFCSParametrizationBase* TFCSLateralShapeParametrizationHitChain::operator[](unsigned int ind) {
+  if(m_number_of_hits_simul) {
+    if(ind==0) return m_number_of_hits_simul;
+    return m_chain[ind-1];
+  } else {
+    return m_chain[ind];
+  }  
+}
+
+void TFCSLateralShapeParametrizationHitChain::set_daughter(unsigned int ind,TFCSParametrizationBase* param) 
+{
+  TFCSLateralShapeParametrizationHitBase* param_typed=nullptr;
+  if(param!=nullptr) {
+    if(!param->InheritsFrom(TFCSLateralShapeParametrizationHitBase::Class())) {
+      ATH_MSG_ERROR("Wrong class type "<<param->IsA()->GetName());
+      return;
+    }
+    param_typed=static_cast<TFCSLateralShapeParametrizationHitBase*>(param);
+  }  
+  if(m_number_of_hits_simul) {
+    if(ind==0) m_number_of_hits_simul=param_typed;
+     else m_chain.at(ind-1)=param_typed;
+  } else {
+    m_chain.at(ind)=param_typed;
+  }  
 }
 
 int TFCSLateralShapeParametrizationHitChain::get_number_of_hits(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) const
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitNumberFromE.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitNumberFromE.cxx
index c1bdcd00c14f..aa785ff785d3 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitNumberFromE.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitNumberFromE.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 "CLHEP/Random/RandPoisson.h"
@@ -8,6 +8,7 @@
 #include "ISF_FastCaloSimEvent/TFCSSimulationState.h"
 
 #include "TMath.h"
+#include <TClass.h>
 
 //=============================================
 //======= TFCSHistoLateralShapeParametrization =========
@@ -68,6 +69,30 @@ int TFCSLateralShapeParametrizationHitNumberFromE::get_number_of_hits(TFCSSimula
   return hits;
 }
 
+bool TFCSLateralShapeParametrizationHitNumberFromE::operator==(const TFCSParametrizationBase& ref) const
+{
+  if(TFCSParametrizationBase::compare(ref)) return true;
+  if(!TFCSParametrization::compare(ref)) return false;
+  if(!TFCSLateralShapeParametrization::compare(ref)) return false;
+  if(!TFCSLateralShapeParametrizationHitNumberFromE::compare(ref)) return false;
+  return true;
+}
+
+bool TFCSLateralShapeParametrizationHitNumberFromE::compare(const TFCSParametrizationBase& ref) const
+{
+  if(IsA()!=ref.IsA()) {
+    ATH_MSG_DEBUG("compare(): different class types "<<IsA()->GetName()<<" != "<<ref.IsA()->GetName());
+    return false;
+  }
+  const TFCSLateralShapeParametrizationHitNumberFromE& ref_typed=static_cast<const TFCSLateralShapeParametrizationHitNumberFromE&>(ref);
+  if(m_stochastic!=ref_typed.m_stochastic || m_stochastic_hadron!=ref_typed.m_stochastic_hadron || m_constant!=ref_typed.m_constant) {
+    ATH_MSG_DEBUG("operator==(): different fluctuation model sigma^2=["<<m_stochastic<<"/sqrt(E/GeV)]^2 + ["<<m_constant<<" + "<<m_stochastic_hadron<<"/sqrt(E/GeV)]^2 != sigma^2=["<<ref_typed.m_stochastic<<"/sqrt(E/GeV)]^2 + ["<<ref_typed.m_constant<<" + "<<ref_typed.m_stochastic_hadron<<"/sqrt(E/GeV)]^2");
+    return false;
+  }
+
+  return true;
+}
+
 void TFCSLateralShapeParametrizationHitNumberFromE::Print(Option_t *option) const
 {
   TString opt(option);
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSParametrization.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSParametrization.cxx
index dcadb6cd758c..4a411f333c9c 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSParametrization.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSParametrization.cxx
@@ -1,8 +1,9 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "ISF_FastCaloSimEvent/TFCSParametrization.h"
+#include <TClass.h>
 
 //=============================================
 //======= TFCSParametrization =========
@@ -101,3 +102,35 @@ void TFCSParametrization::set_pdgid_Ekin_eta(const TFCSParametrizationBase& ref)
   set_pdgid(ref.pdgid());
 }
 
+bool TFCSParametrization::compare(const TFCSParametrizationBase& ref) const
+{
+  if(IsA()!=ref.IsA()) {
+    ATH_MSG_DEBUG("compare(): different class types "<<IsA()->GetName()<<" != "<<ref.IsA()->GetName());
+    return false;
+  }
+  std::string name(GetName());
+  if(name!=ref.GetName()) {
+    ATH_MSG_DEBUG("compare(): different names "<<GetName()<<" != "<<ref.GetName());
+    return false;
+  }
+  std::string title(GetTitle());
+  if(title!=ref.GetTitle()) {
+    ATH_MSG_DEBUG("compare(): different titles "<<GetTitle()<<" != "<<ref.GetTitle());
+    return false;
+  }
+  if(is_match_all_pdgid()!=ref.is_match_all_pdgid() || pdgid()!=ref.pdgid()) {
+    ATH_MSG_DEBUG("compare(): different pdgids");
+    return false;
+  }
+  if(Ekin_nominal()!=ref.Ekin_nominal() || Ekin_min()!=ref.Ekin_min() || Ekin_max()!=ref.Ekin_max()) {
+    ATH_MSG_DEBUG("compare(): different Ekin range");
+    return false;
+  }
+  if(eta_nominal()!=ref.eta_nominal() || eta_min()!=ref.eta_min() || eta_max()!=ref.eta_max()) {
+    ATH_MSG_DEBUG("compare(): different eta range");
+    return false;
+  }
+
+  return true;
+}
+
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSParametrizationBase.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSParametrizationBase.cxx
index 8879727dd640..1d55f9e7eb29 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSParametrizationBase.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSParametrizationBase.cxx
@@ -46,6 +46,15 @@ FCSReturnCode TFCSParametrizationBase::simulate(TFCSSimulationState& /*simulstat
   return (FCSReturnCode)(FCSRetry+1);
 }
 
+bool TFCSParametrizationBase::compare(const TFCSParametrizationBase& ref) const
+{
+  if(this==&ref) {
+    ATH_MSG_DEBUG("compare(): identical instances "<< this <<" == " << &ref);
+    return true;
+  }
+  return false;
+}
+
 ///If called with argument "short", only a one line summary will be printed
 void TFCSParametrizationBase::Print(Option_t *option) const
 {
@@ -89,3 +98,104 @@ void TFCSParametrizationBase::DoCleanup()
   }  
   s_cleanup_list.resize(0);
 }
+
+void TFCSParametrizationBase::FindDuplicates(FindDuplicateClasses_t& dupclasses)
+{
+  for(unsigned int i=0;i<size();++i) if((*this)[i]) {
+    TFCSParametrizationBase* param=(*this)[i];
+    FindDuplicates_t& dup=dupclasses[param->GetName()];
+    //If param is already in the duplication list, skip over
+    auto checkexist=dup.find(param);
+    if(checkexist!=dup.end()) {
+      ATH_MSG_DEBUG("Found duplicate pointer for: "<<param<<"="<<param->GetName());
+      if(checkexist->second.replace) {
+        TFCSParametrizationBase* refparam=checkexist->second.replace;
+        ATH_MSG_DEBUG("Found duplicate pointer: "<<refparam<<"="<<refparam->GetName()<<", duplicate is "<<param<<"="<<param->GetName()<<" index "<<i<<" of "<<this);
+        dup[refparam].mother.push_back(this);
+        dup[refparam].index.push_back(i);
+      }
+      continue;
+    }  
+    //Add param to duplication list
+    dup[param]=Duplicate_t();
+    for(auto& ref : dup) {
+      TFCSParametrizationBase* refparam=ref.first;
+      //skip itself, as this just added above
+      if(param==refparam) continue;
+      //skip nullptr reference
+      if(refparam==nullptr) continue;
+      //skip reference that is itself going to get replaced
+      if(ref.second.replace) continue;
+      //Check for objects with identical content
+      if(*param==*refparam) {
+        ATH_MSG_DEBUG("Found duplicate: "<<refparam<<"="<<refparam->GetName()<<", duplicate is "<<param<<"="<<param->GetName()<<" index "<<i<<" of "<<this);
+        dup[param].replace=refparam;
+        dup[refparam].mother.push_back(this);
+        dup[refparam].index.push_back(i);
+        break;
+      }
+    }
+    //Continue for child objects in param
+    param->FindDuplicates(dupclasses);
+  }
+}
+
+void TFCSParametrizationBase::RemoveDuplicates()
+{
+  FindDuplicateClasses_t dupclasses;
+  FindDuplicates(dupclasses);
+  
+  std::set< TFCSParametrizationBase* > dellist;
+  for(auto& dupiter : dupclasses) {
+    FindDuplicates_t& dup=dupiter.second;
+    for(auto onedup : dup) {
+      if(onedup.second.mother.size()==0) continue;
+      TFCSParametrizationBase* ref=onedup.first;
+      ATH_MSG_DEBUG("Main object "<<ref<<"="<<ref->GetName());
+      for(unsigned int i=0;i<onedup.second.mother.size();++i) {
+        int index=onedup.second.index[i];
+        TFCSParametrizationBase* mother=onedup.second.mother[i];
+        TFCSParametrizationBase* delparam=mother->operator[](index);
+        unsigned int delcount=dup[delparam].mother.size();
+        if(delcount==0) {
+          ATH_MSG_DEBUG("  - Delete object "<<delparam<<"="<<delparam->GetName()<<" index "<<index<<" of "<<mother<<", has "<<delcount<<" other replacements attached. Deleting");
+          mother->set_daughter(index,ref);
+          dellist.insert(delparam);
+        } else {
+          ATH_MSG_WARNING("  - Delete object "<<delparam<<"="<<delparam->GetName()<<" index "<<index<<" of "<<mother<<", has "<<delcount<<" other replacements attached. Skipping");
+        }  
+      }
+    }
+  }  
+
+  ATH_MSG_INFO("RERUNNING DUPLICATE FINDING");
+  FindDuplicateClasses_t dupclasses2;
+  FindDuplicates(dupclasses2);
+
+  std::map<std::string,int> ndel;
+  for(auto delparam : dellist) {
+    FindDuplicates_t& dup2=dupclasses2[delparam->GetName()];
+    bool present=dup2.find(delparam) != dup2.end();
+    if(present) {
+      ATH_MSG_WARNING("- Delete object "<<delparam<<"="<<delparam->GetName()<<" still referenced somewhere!");
+    } else {  
+      ATH_MSG_DEBUG("- Delete object "<<delparam<<"="<<delparam->GetName());
+      ++ndel[delparam->ClassName()];
+      delete delparam;
+    }  
+  }
+  for(auto& del : ndel) ATH_MSG_INFO("Deleted "<<del.second<<" duplicate objects of class "<<del.first);
+}
+
+void TFCSParametrizationBase::RemoveNameTitle()
+{
+  for(unsigned int i=0;i<size();++i) if((*this)[i]) {
+    TFCSParametrizationBase* param=(*this)[i];
+    param->SetName("");
+    param->SetTitle("");
+    
+    //Continue for child objects in param
+    param->RemoveNameTitle();
+  }  
+}
+
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimV2ParamSvc.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimV2ParamSvc.cxx
index fbb7c48d0852..4b9f1ccc93d2 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimV2ParamSvc.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimV2ParamSvc.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
 */
 
 // class header include
@@ -46,6 +46,7 @@ ISF::FastCaloSimV2ParamSvc::FastCaloSimV2ParamSvc(const std::string& name, ISvcL
   declareProperty("ParamsInputFilename"            ,       m_paramsFilename);
   declareProperty("ParamsInputObject"              ,       m_paramsObject);
   declareProperty("PrintParametrization"           ,       m_printParametrization);
+  declareProperty("CompressMemory"                 ,       m_CompressMemory);
 }
 
 /** framework methods */
@@ -79,11 +80,13 @@ StatusCode ISF::FastCaloSimV2ParamSvc::initialize()
 
   paramsFile->Close();
 
-  m_param->set_geometry(m_caloGeo.get());
+  if(m_CompressMemory) m_param->RemoveDuplicates();
+  m_param->set_geometry(m_caloGeo.get()); /// does not take ownership
   m_param->setLevel(msg().level());
   if (m_printParametrization) {
     m_param->Print("short");
   }
+  if(m_CompressMemory) m_param->RemoveNameTitle();
   return StatusCode::SUCCESS;
 }
 
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimV2ParamSvc.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimV2ParamSvc.h
index a1ccfcf8f450..b85093a869b4 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimV2ParamSvc.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimV2ParamSvc.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 ISF_FASTCALOSIMV2PARAMSVC_H
@@ -48,6 +48,7 @@ namespace ISF {
     std::unique_ptr<CaloGeometryFromCaloDDM> m_caloGeo{};
 
     bool m_printParametrization{false};
+    bool m_CompressMemory{true};
   };
 
 }
-- 
GitLab


From 688fa977420e43e682e583cd86022ebf3618c81e Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Tue, 6 Oct 2020 21:56:44 +0200
Subject: [PATCH 269/403] ATLASRECTS-5680 : Try to fix memory leak

---
 .../src/JetFitterTrackSelectorTool.cxx        | 316 +++++++++---------
 1 file changed, 158 insertions(+), 158 deletions(-)

diff --git a/InnerDetector/InDetRecTools/InDetSecVxFinderTool/src/JetFitterTrackSelectorTool.cxx b/InnerDetector/InDetRecTools/InDetSecVxFinderTool/src/JetFitterTrackSelectorTool.cxx
index 28b48d77effb..d47542a6635e 100644
--- a/InnerDetector/InDetRecTools/InDetSecVxFinderTool/src/JetFitterTrackSelectorTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetSecVxFinderTool/src/JetFitterTrackSelectorTool.cxx
@@ -1,158 +1,158 @@
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration 
-*/
-
-#include "InDetSecVxFinderTool/JetFitterTrackSelectorTool.h"
-
-using namespace InDet;
-
-    JetFitterTrackSelectorTool::JetFitterTrackSelectorTool(const std::string &t, const std::string &n, const IInterface *p)
-            : AthAlgTool(t, n, p)
-    {
-        declareInterface< JetFitterTrackSelectorTool >(this);
-    }
-
-    JetFitterTrackSelectorTool::~JetFitterTrackSelectorTool() {}
-
-    StatusCode JetFitterTrackSelectorTool::initialize() {
-
-        if ( AlgTool::initialize().isFailure() ) {
-            msg(MSG::ERROR) << " Unable to initialize the AlgTool" << endmsg;
-            return StatusCode::FAILURE;
-        }
-
-	if ( m_trkFilter.retrieve().isFailure() ) {
-	  msg(MSG::ERROR) << " Unable to retrieve InDet::InDetDetailedTrackSelectorTool" << endmsg;
-	  return StatusCode::FAILURE;
-	}
-
-	if ( m_jetFitterUtils.retrieve().isFailure() ) {
-	  msg(MSG::ERROR) << " Unable to retrieve InDet::InDetJetFitterUtils/InDetJetFitterUtils" << endmsg;
-	  return StatusCode::FAILURE;
-	}
-
-	if ( m_extrapolator.retrieve().isFailure() ) {
-	  msg(MSG::ERROR) << " Unable to retrieve Trk::Extrapolator/InDetExtrapolator" << endmsg;
-          return StatusCode::FAILURE;
-	}
-
-        return StatusCode::SUCCESS;
-    }
-
-    StatusCode JetFitterTrackSelectorTool::finalize() {
-        msg(MSG::INFO) << "Finalize successful" << endmsg;
-        return StatusCode::SUCCESS;
-    }
-
-    const Trk::SelectedTracksInJet* JetFitterTrackSelectorTool::doTrackSelection( const xAOD::Vertex &primaryVertex,
-										  const TLorentzVector &jetMomentum,
-										  const std::vector<const xAOD::IParticle *> &inputTracks) const {
-      // perform the track selection
-      // step 1, apply a track filter like "InDet::InDetDetailedTrackSelectorTool"
-      // step 2, calculate the compatibility of filtered tracks with primary vertex
-      // use this to deduce primaryTracks and secondaryTracks
-
-      ATH_MSG_DEBUG( "Doing track selection on " << inputTracks.size() << " tracks ... " );
-
-      // We need to use normal pointers instead of smart pointers since the code breaks.
-      // We have to fix this issue in the future
-      //      if ( m_selectedTracks != nullptr ) delete m_selectedTracks; // May this break the code?
-      Trk::SelectedTracksInJet *selectedTracks = new Trk::SelectedTracksInJet();
-
-      // Vectors of Trk::ITrackLink to be given to m_selectedTracks once we understand if they are primary of secondary tracks
-      std::vector< const Trk::ITrackLink* > primaryTrackLinks;
-      std::vector< const Trk::ITrackLink* > secondaryTrackLinks;
-
-      // Running on input tracks
-      std::vector<const xAOD::IParticle *>::const_iterator trk_iter = inputTracks.begin();
-      std::vector<const xAOD::IParticle*>::const_iterator   trk_end = inputTracks.end();  
-
-      int counter = 0;
-      for ( ; trk_iter != trk_end; trk_iter++ ) {
-	// Convert xAOD::IParticle to xAOD::TrackParticle
-	const xAOD::TrackParticle * tmp = dynamic_cast< const xAOD::TrackParticle* > ( *trk_iter ); 
-
-	// Apply track filter
-	if ( m_trkFilter->decision( *tmp,&primaryVertex ) == false ) continue;
-
-	// Compute compatibility and understand track type
-	// 0: extrapolation of MeasuredPerigee failed
-	// 1: primary
-	// 2: secondary
-	int type = computeTrackCompatibility( primaryVertex,jetMomentum,*tmp );
-
-	// Create Trk::ITrackLink collections to be given to selected tracks
-	ElementLink< xAOD::TrackParticleContainer > linkTP;                                                                                                           
-	linkTP.setElement( tmp ); 
-
-	Trk::LinkToXAODTrackParticle* link= new Trk::LinkToXAODTrackParticle( linkTP );
-
-	if ( type == 1) primaryTrackLinks.push_back( link );
-	else if ( type == 2 ) secondaryTrackLinks.push_back( link );  
-	else continue;
-
-	// How many tracks we are selecting
-	counter++;
-      }
-
-      ATH_MSG_DEBUG( "  Total of selected tracks: "<< counter );
-
-      selectedTracks->setPrimaryTrackLinks( primaryTrackLinks );
-      selectedTracks->setSecondaryTrackLinks( secondaryTrackLinks );
-      return selectedTracks;
-   }
-
-    int JetFitterTrackSelectorTool::computeTrackCompatibility( const xAOD::Vertex &primaryVertex,
-							    const TLorentzVector &jetMomentum,
-							    const xAOD::TrackParticle &track ) const {
-
-      // Decorators for tracks
-      SG::AuxElement::Decorator< float > compatibilityDecorator( "TrackCompatibility" );
-      
-      // Recomputing Perigee w.r.t PV
-      Trk::PerigeeSurface mySurface( primaryVertex.position() );
-      const Trk::TrackParameters* myMeasuredPerigee = m_extrapolator->extrapolate( track,mySurface );
-      if ( myMeasuredPerigee == nullptr ) {
-	ATH_MSG_DEBUG( " Extrapolation to primary vertex failed. Skipping track " );
-	compatibilityDecorator ( track ) = 0.;
-	return 0;
-      }
-      
-      
-      // Prepare for using jetFitterUtils (for the computation of the compatibility)
-      // Is this conrvertion really necessary?
-      Trk::RecVertex primaryVertexRecVertex( primaryVertex.position(), 
-					     primaryVertex.covariancePosition(), 
-					     primaryVertex.numberDoF(), 
-					     primaryVertex.chiSquared());
-      
-      Amg::Vector3D jetMomSpatial( jetMomentum.X(),jetMomentum.Y(),jetMomentum.Z() );
-      double compatibilityValue = m_jetFitterUtils->compatibility( *myMeasuredPerigee,primaryVertexRecVertex ).first;
-      compatibilityValue = fabs( compatibilityValue ) * m_jetFitterUtils->get3DLifetimeSignOfTrack( *myMeasuredPerigee,
-												    jetMomSpatial,
-												    primaryVertexRecVertex );
-      
-      // Decorate
-      ATH_MSG_DEBUG( "compatibilityValue = " << compatibilityValue );
-      compatibilityDecorator ( track ) = compatibilityValue;      
-
-      // Understand if primary or secondary track particle
-      double cutCompatibilityPVforPosTracks = m_cutCompatibilityPrimaryVertexForPositiveLifetimeTracks;
-      double cutCompatibilityPVforNegTracks = m_cutCompatibilityPrimaryVertexForNegativeLifetimeTracks;
-      
-      if ( m_revertFromPositiveToNegativeTags ) {
-	cutCompatibilityPVforNegTracks = m_cutCompatibilityPrimaryVertexForPositiveLifetimeTracks;
-	cutCompatibilityPVforPosTracks = m_cutCompatibilityPrimaryVertexForNegativeLifetimeTracks;
-      }
-      
-      if ( ( compatibilityValue < 0 && 
-	     TMath::Prob( fabs( compatibilityValue ),2 ) < cutCompatibilityPVforNegTracks) ||
-	   ( compatibilityValue >= 0 && 
-	     TMath::Prob( fabs( compatibilityValue ),2 ) < cutCompatibilityPVforPosTracks ) ) 
-	return 2;
-      else return 1;
-
-    }
-
-
-
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration 
+*/
+
+#include "InDetSecVxFinderTool/JetFitterTrackSelectorTool.h"
+
+using namespace InDet;
+
+    JetFitterTrackSelectorTool::JetFitterTrackSelectorTool(const std::string &t, const std::string &n, const IInterface *p)
+            : AthAlgTool(t, n, p)
+    {
+        declareInterface< JetFitterTrackSelectorTool >(this);
+    }
+
+    JetFitterTrackSelectorTool::~JetFitterTrackSelectorTool() {}
+
+    StatusCode JetFitterTrackSelectorTool::initialize() {
+
+        if ( AlgTool::initialize().isFailure() ) {
+            msg(MSG::ERROR) << " Unable to initialize the AlgTool" << endmsg;
+            return StatusCode::FAILURE;
+        }
+
+	if ( m_trkFilter.retrieve().isFailure() ) {
+	  msg(MSG::ERROR) << " Unable to retrieve InDet::InDetDetailedTrackSelectorTool" << endmsg;
+	  return StatusCode::FAILURE;
+	}
+
+	if ( m_jetFitterUtils.retrieve().isFailure() ) {
+	  msg(MSG::ERROR) << " Unable to retrieve InDet::InDetJetFitterUtils/InDetJetFitterUtils" << endmsg;
+	  return StatusCode::FAILURE;
+	}
+
+	if ( m_extrapolator.retrieve().isFailure() ) {
+	  msg(MSG::ERROR) << " Unable to retrieve Trk::Extrapolator/InDetExtrapolator" << endmsg;
+          return StatusCode::FAILURE;
+	}
+
+        return StatusCode::SUCCESS;
+    }
+
+    StatusCode JetFitterTrackSelectorTool::finalize() {
+        msg(MSG::INFO) << "Finalize successful" << endmsg;
+        return StatusCode::SUCCESS;
+    }
+
+    const Trk::SelectedTracksInJet* JetFitterTrackSelectorTool::doTrackSelection( const xAOD::Vertex &primaryVertex,
+										  const TLorentzVector &jetMomentum,
+										  const std::vector<const xAOD::IParticle *> &inputTracks) const {
+      // perform the track selection
+      // step 1, apply a track filter like "InDet::InDetDetailedTrackSelectorTool"
+      // step 2, calculate the compatibility of filtered tracks with primary vertex
+      // use this to deduce primaryTracks and secondaryTracks
+
+      ATH_MSG_DEBUG( "Doing track selection on " << inputTracks.size() << " tracks ... " );
+
+      // We need to use normal pointers instead of smart pointers since the code breaks.
+      // We have to fix this issue in the future
+      //      if ( m_selectedTracks != nullptr ) delete m_selectedTracks; // May this break the code?
+      Trk::SelectedTracksInJet *selectedTracks = new Trk::SelectedTracksInJet();
+
+      // Vectors of Trk::ITrackLink to be given to m_selectedTracks once we understand if they are primary of secondary tracks
+      std::vector< const Trk::ITrackLink* > primaryTrackLinks;
+      std::vector< const Trk::ITrackLink* > secondaryTrackLinks;
+
+      // Running on input tracks
+      std::vector<const xAOD::IParticle *>::const_iterator trk_iter = inputTracks.begin();
+      std::vector<const xAOD::IParticle*>::const_iterator   trk_end = inputTracks.end();  
+
+      int counter = 0;
+      for ( ; trk_iter != trk_end; trk_iter++ ) {
+	// Convert xAOD::IParticle to xAOD::TrackParticle
+	const xAOD::TrackParticle * tmp = dynamic_cast< const xAOD::TrackParticle* > ( *trk_iter ); 
+
+	// Apply track filter
+	if ( m_trkFilter->decision( *tmp,&primaryVertex ) == false ) continue;
+
+	// Compute compatibility and understand track type
+	// 0: extrapolation of MeasuredPerigee failed
+	// 1: primary
+	// 2: secondary
+	int type = computeTrackCompatibility( primaryVertex,jetMomentum,*tmp );
+
+	// Create Trk::ITrackLink collections to be given to selected tracks
+	ElementLink< xAOD::TrackParticleContainer > linkTP;                                                                                                           
+	linkTP.setElement( tmp ); 
+
+	Trk::LinkToXAODTrackParticle* link= new Trk::LinkToXAODTrackParticle( linkTP );
+
+	if ( type == 1) primaryTrackLinks.push_back( link );
+	else if ( type == 2 ) secondaryTrackLinks.push_back( link );  
+	else continue;
+
+	// How many tracks we are selecting
+	counter++;
+      }
+
+      ATH_MSG_DEBUG( "  Total of selected tracks: "<< counter );
+
+      selectedTracks->setPrimaryTrackLinks( primaryTrackLinks );
+      selectedTracks->setSecondaryTrackLinks( secondaryTrackLinks );
+      return selectedTracks;
+   }
+
+    int JetFitterTrackSelectorTool::computeTrackCompatibility( const xAOD::Vertex &primaryVertex,
+							    const TLorentzVector &jetMomentum,
+							    const xAOD::TrackParticle &track ) const {
+
+      // Decorators for tracks
+      SG::AuxElement::Decorator< float > compatibilityDecorator( "TrackCompatibility" );
+      
+      // Recomputing Perigee w.r.t PV
+      Trk::PerigeeSurface mySurface( primaryVertex.position() );
+      std::unique_ptr<const Trk::TrackParameters>  myMeasuredPerigee(m_extrapolator->extrapolate( track,mySurface ));
+      if ( !myMeasuredPerigee) {
+        ATH_MSG_DEBUG( " Extrapolation to primary vertex failed. Skipping track " );
+        compatibilityDecorator ( track ) = 0.;
+        return 0;
+      }
+      
+      
+      // Prepare for using jetFitterUtils (for the computation of the compatibility)
+      // Is this conrvertion really necessary?
+      Trk::RecVertex primaryVertexRecVertex( primaryVertex.position(), 
+					     primaryVertex.covariancePosition(), 
+					     primaryVertex.numberDoF(), 
+					     primaryVertex.chiSquared());
+      
+      Amg::Vector3D jetMomSpatial( jetMomentum.X(),jetMomentum.Y(),jetMomentum.Z() );
+      double compatibilityValue = m_jetFitterUtils->compatibility( *myMeasuredPerigee,primaryVertexRecVertex ).first;
+      compatibilityValue = fabs( compatibilityValue ) * m_jetFitterUtils->get3DLifetimeSignOfTrack( *myMeasuredPerigee,
+												    jetMomSpatial,
+												    primaryVertexRecVertex );
+      
+      // Decorate
+      ATH_MSG_DEBUG( "compatibilityValue = " << compatibilityValue );
+      compatibilityDecorator ( track ) = compatibilityValue;      
+
+      // Understand if primary or secondary track particle
+      double cutCompatibilityPVforPosTracks = m_cutCompatibilityPrimaryVertexForPositiveLifetimeTracks;
+      double cutCompatibilityPVforNegTracks = m_cutCompatibilityPrimaryVertexForNegativeLifetimeTracks;
+      
+      if ( m_revertFromPositiveToNegativeTags ) {
+	cutCompatibilityPVforNegTracks = m_cutCompatibilityPrimaryVertexForPositiveLifetimeTracks;
+	cutCompatibilityPVforPosTracks = m_cutCompatibilityPrimaryVertexForNegativeLifetimeTracks;
+      }
+      
+      if ( ( compatibilityValue < 0 && 
+	     TMath::Prob( fabs( compatibilityValue ),2 ) < cutCompatibilityPVforNegTracks) ||
+	   ( compatibilityValue >= 0 && 
+	     TMath::Prob( fabs( compatibilityValue ),2 ) < cutCompatibilityPVforPosTracks ) ) 
+	return 2;
+      else return 1;
+
+    }
+
+
+
-- 
GitLab


From c30d572ab152187be3583c890174d7785c4c5e58 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Wed, 7 Oct 2020 00:39:17 +0200
Subject: [PATCH 270/403] getMapOfHits: Pass EventContext to it and then down
 to methods to avoid too many calls

---
 .../InDetTrackHoleSearchTool.h                |  31 +--
 .../src/InDetTrackHoleSearchTool.cxx          | 189 +++++++++---------
 2 files changed, 115 insertions(+), 105 deletions(-)

diff --git a/InnerDetector/InDetRecTools/InDetTrackHoleSearch/InDetTrackHoleSearch/InDetTrackHoleSearchTool.h b/InnerDetector/InDetRecTools/InDetTrackHoleSearch/InDetTrackHoleSearch/InDetTrackHoleSearchTool.h
index 4b4c7a4ea00a..bd5fe28c5030 100644
--- a/InnerDetector/InDetRecTools/InDetTrackHoleSearch/InDetTrackHoleSearch/InDetTrackHoleSearchTool.h
+++ b/InnerDetector/InDetRecTools/InDetTrackHoleSearch/InDetTrackHoleSearch/InDetTrackHoleSearchTool.h
@@ -11,11 +11,10 @@
 
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ToolHandle.h"
-#include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/EventContext.h"
 #include "TrkToolInterfaces/ITrackHoleSearchTool.h"
 #include "TrkToolInterfaces/IBoundaryCheckTool.h"
 #include "TrkEventPrimitives/ParticleHypothesis.h"
-#include "InDetConditionsSummaryService/IInDetConditionsTool.h"
 #include "TrkParameters/TrackParameters.h"
 #include <atomic>
 #include <vector>
@@ -136,18 +135,22 @@ namespace InDet
  	  Return value: True if filling was successful, false otherwise
 	  This method distills the relevant hits out of a given track
       */
-      bool getMapOfHits(const Trk::Track& track , 
-			const Trk::ParticleHypothesis partHyp,
-			std::map<const Identifier, const Trk::TrackStateOnSurface*>& mapOfHits,
-			std::map<const Identifier, std::pair<const Trk::TrackParameters*,const bool> >& mapOfPredictions) const;
-      
-      /** This method searches for holes in a track. It receives a list of detector responses sorted along the
-	  track. The TSOS in the list of hits should contain TrackParameters or at least MeasurementOnTrack.
-	  The method extrapolates along the tracks, using the hit information to update the extrapolation procedure.
-	  Surface without detector responses, which are crossed by the extrapolation are counted as holes. The
-	  number of holes found is returned through the information array. 
-	  Input: mapOfHits,mapOfPredicitons
-	  Output: Changes in information,listOfHoles
+      bool getMapOfHits(
+        const EventContext& ctx,
+        const Trk::Track& track,
+        const Trk::ParticleHypothesis partHyp,
+        std::map<const Identifier, const Trk::TrackStateOnSurface*>& mapOfHits,
+        std::map<const Identifier,std::pair<const Trk::TrackParameters*, const bool>>&
+          mapOfPredictions) const;
+
+      /** This method searches for holes in a track. It receives a list of
+         detector responses sorted along the track. The TSOS in the list of hits
+         should contain TrackParameters or at least MeasurementOnTrack. The
+         method extrapolates along the tracks, using the hit information to
+         update the extrapolation procedure. Surface without detector responses,
+         which are crossed by the extrapolation are counted as holes. The number
+         of holes found is returned through the information array. Input:
+         mapOfHits,mapOfPredicitons Output: Changes in information,listOfHoles
       */
       void performHoleSearchStepWise(std::map<const Identifier, const Trk::TrackStateOnSurface*>& mapOfHits,
 				     std::map<const Identifier, std::pair<const Trk::TrackParameters*,const bool> >& mapOfPredictions,
diff --git a/InnerDetector/InDetRecTools/InDetTrackHoleSearch/src/InDetTrackHoleSearchTool.cxx b/InnerDetector/InDetRecTools/InDetTrackHoleSearch/src/InDetTrackHoleSearchTool.cxx
index 53257116bfae..28af03bc232f 100644
--- a/InnerDetector/InDetRecTools/InDetTrackHoleSearch/src/InDetTrackHoleSearchTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetTrackHoleSearch/src/InDetTrackHoleSearchTool.cxx
@@ -43,8 +43,8 @@ InDet::InDetTrackHoleSearchTool::InDetTrackHoleSearchTool(const std::string& t,
   declareProperty("Extrapolator"         , m_extrapolator);
   declareProperty("ExtendedListOfHoles"  , m_extendedListOfHoles = false);
   declareProperty("Cosmics"              , m_cosmic);
-  declareProperty("minSiHits"            , m_minSiHits = 3);  
-  declareProperty("CountDeadModulesAfterLastHit", m_countDeadModulesAfterLastHit = true);  
+  declareProperty("minSiHits"            , m_minSiHits = 3);
+  declareProperty("CountDeadModulesAfterLastHit", m_countDeadModulesAfterLastHit = true);
 }
 
 //================ Destructor =================================================
@@ -53,7 +53,7 @@ InDet::InDetTrackHoleSearchTool::~InDetTrackHoleSearchTool() {
 
 //================ Initialisation =================================================
 StatusCode InDet::InDetTrackHoleSearchTool::initialize() {
-  
+
   StatusCode sc = AlgTool::initialize();
   if (sc.isFailure()) return sc;
 
@@ -76,7 +76,7 @@ StatusCode InDet::InDetTrackHoleSearchTool::finalize() {
 }
 
 //============================================================================================
-void InDet::InDetTrackHoleSearchTool::countHoles(const Trk::Track& track, 
+void InDet::InDetTrackHoleSearchTool::countHoles(const Trk::Track& track,
                                                  std::vector<int>& information,
                                                  const Trk::ParticleHypothesis partHyp) const {
   std::vector<const Trk::TrackStateOnSurface*>* listOfHoles = nullptr;
@@ -87,14 +87,14 @@ void InDet::InDetTrackHoleSearchTool::countHoles(const Trk::Track& track,
          it != listOfHoles->end(); ++it) {
       delete (*it);
     }
-    delete listOfHoles; 
+    delete listOfHoles;
     listOfHoles = nullptr;
   }
   return;
 }
 
 //============================================================================================
-const DataVector<const Trk::TrackStateOnSurface>* InDet::InDetTrackHoleSearchTool::getHolesOnTrack(const Trk::Track& track, 
+const DataVector<const Trk::TrackStateOnSurface>* InDet::InDetTrackHoleSearchTool::getHolesOnTrack(const Trk::Track& track,
                                                                                                    const Trk::ParticleHypothesis partHyp) const {
   std::vector<const Trk::TrackStateOnSurface*>* listOfHoles = new std::vector<const Trk::TrackStateOnSurface*>;
   searchForHoles(track, 0, listOfHoles,partHyp);
@@ -111,7 +111,7 @@ const DataVector<const Trk::TrackStateOnSurface>* InDet::InDetTrackHoleSearchToo
 }
 
 //============================================================================================
-const Trk::Track*  InDet::InDetTrackHoleSearchTool::getTrackWithHoles(const Trk::Track& track, 
+const Trk::Track*  InDet::InDetTrackHoleSearchTool::getTrackWithHoles(const Trk::Track& track,
                                                                       const Trk::ParticleHypothesis partHyp) const {
   std::vector<const Trk::TrackStateOnSurface*>* listOfHoles = new std::vector<const Trk::TrackStateOnSurface*>;
   searchForHoles(track, 0, listOfHoles,partHyp);
@@ -122,7 +122,7 @@ const Trk::Track*  InDet::InDetTrackHoleSearchTool::getTrackWithHoles(const Trk:
 }
 
 //============================================================================================
-const Trk::Track* InDet::InDetTrackHoleSearchTool::getTrackWithHolesAndOutliers(const Trk::Track& track, 
+const Trk::Track* InDet::InDetTrackHoleSearchTool::getTrackWithHolesAndOutliers(const Trk::Track& track,
                                                                                 const Trk::ParticleHypothesis partHyp) const {
   return getTrackWithHoles(track,partHyp);
 }
@@ -130,7 +130,7 @@ const Trk::Track* InDet::InDetTrackHoleSearchTool::getTrackWithHolesAndOutliers(
 
 //============================================================================================
 
-void InDet::InDetTrackHoleSearchTool::searchForHoles(const Trk::Track& track, 
+void InDet::InDetTrackHoleSearchTool::searchForHoles(const Trk::Track& track,
                                                      std::vector<int>* information,
                                                      std::vector<const Trk::TrackStateOnSurface*>* listOfHoles,
                                                      const Trk::ParticleHypothesis partHyp) const {
@@ -146,13 +146,13 @@ void InDet::InDetTrackHoleSearchTool::searchForHoles(const Trk::Track& track,
     (*information)[Trk::numberOfTRTDeadStraws]     = -1;
 
   }
-  
+
   std::map<const Identifier, const Trk::TrackStateOnSurface*> mapOfHits;
 
   // JEF: fix of [bug #44382] Poor Tracking Software Performance without SCT
   // the mapOfPrediction needs the knowledge weather a holesearch should be carried out
   // on this identifier or just the search for dead modules
-  // therefore: if the boolean is set to true, a holesearch will be caarried out, otherwise just 
+  // therefore: if the boolean is set to true, a holesearch will be caarried out, otherwise just
   // the search for dead modules
   // for identifiers BEFORE the last measurement (and after the first): holesearch will be carried out always
   // for identifiers AFTER the last measurement (or before the first), we have to distiguish two different scenarios:
@@ -161,7 +161,8 @@ void InDet::InDetTrackHoleSearchTool::searchForHoles(const Trk::Track& track,
   //    measurement, but no holes
   std::map<const Identifier, std::pair<const Trk::TrackParameters*,const bool> >     mapOfPredictions;
 
-  bool listOk = getMapOfHits(track,partHyp,mapOfHits,mapOfPredictions);
+  bool listOk = getMapOfHits(
+    Gaudi::Hive::currentContext(), track, partHyp, mapOfHits, mapOfPredictions);
 
   if (listOk) {
     ATH_MSG_DEBUG("Perform stepwise hole search");
@@ -180,7 +181,8 @@ void InDet::InDetTrackHoleSearchTool::searchForHoles(const Trk::Track& track,
 }
 
 // ====================================================================================================================
-bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track, 
+bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const EventContext& ctx,
+                                                   const Trk::Track& track,
                                                    const Trk::ParticleHypothesis partHyp,
                                                    std::map<const Identifier, const Trk::TrackStateOnSurface*>& mapOfHits,
                                                    std::map<const Identifier, std::pair<const Trk::TrackParameters*,const bool> >& mapOfPredictions) const {
@@ -194,9 +196,9 @@ bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track,
   //std::cout << "track: " << track << std::endl;
   int imeas = 0;
   const Trk::TrackParameters* firstsipar = nullptr;
-  
+
   for (DataVector<const Trk::TrackStateOnSurface>::const_iterator iterTSOS = track.trackStateOnSurfaces()->begin();
-       iterTSOS!=track.trackStateOnSurfaces()->end();++iterTSOS) { 
+       iterTSOS!=track.trackStateOnSurfaces()->end();++iterTSOS) {
     // type of state is measurement, hole or outlier ?
     if ((*iterTSOS)->type(Trk::TrackStateOnSurface::Measurement) ||
         (*iterTSOS)->type(Trk::TrackStateOnSurface::Outlier)) {
@@ -204,18 +206,18 @@ bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track,
       bool hasID = false;
       if ((*iterTSOS)->measurementOnTrack() != nullptr
           && (*iterTSOS)->measurementOnTrack()->associatedSurface().associatedDetectorElement() != nullptr
-          && (*iterTSOS)->measurementOnTrack()->associatedSurface().associatedDetectorElement()->identify() != 0) { 
+          && (*iterTSOS)->measurementOnTrack()->associatedSurface().associatedDetectorElement()->identify() != 0) {
         id    = (*iterTSOS)->measurementOnTrack()->associatedSurface().associatedDetectorElement()->identify();
         hasID = true;
       } else if ((*iterTSOS)->trackParameters() != nullptr
                  && (*iterTSOS)->trackParameters()->associatedSurface().associatedDetectorElement() != nullptr
-                 && (*iterTSOS)->trackParameters()->associatedSurface().associatedDetectorElement()->identify() != 0) { 
+                 && (*iterTSOS)->trackParameters()->associatedSurface().associatedDetectorElement()->identify() != 0) {
         id    = (*iterTSOS)->trackParameters()->associatedSurface().associatedDetectorElement()->identify();
         hasID = true;
       }
       // copy all Si track states, including the holes and outliers
       if (hasID && (m_atlasId->is_pixel(id) || m_atlasId->is_sct(id))) {
-        // sort the state according to the id 
+        // sort the state according to the id
         mapOfHits.insert(std::pair<const Identifier, const Trk::TrackStateOnSurface*>(id,*iterTSOS));
         if (!(*iterTSOS)->type(Trk::TrackStateOnSurface::Outlier)) {
           ++imeas;
@@ -227,18 +229,18 @@ bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track,
           }
         }
         // for cosmics: remember parameters of first SI TSOS
-        if (m_cosmic && !firstsipar && (*iterTSOS)->trackParameters()) firstsipar=(*iterTSOS)->trackParameters(); 
+        if (m_cosmic && !firstsipar && (*iterTSOS)->trackParameters()) firstsipar=(*iterTSOS)->trackParameters();
         if ((*iterTSOS)->trackParameters()) {
-          ATH_MSG_VERBOSE("TSOS pos: " << (*iterTSOS)->trackParameters()->position() 
+          ATH_MSG_VERBOSE("TSOS pos: " << (*iterTSOS)->trackParameters()->position()
                           << "   r: " << sqrt(pow((*iterTSOS)->trackParameters()->position().x(),2)
                                               +pow((*iterTSOS)->trackParameters()->position().y(),2))
                           << "     Si measurement");
         }
       } else {
         if ((*iterTSOS)->trackParameters()) {
-          ATH_MSG_VERBOSE("TSOS pos: " << (*iterTSOS)->trackParameters()->position() 
+          ATH_MSG_VERBOSE("TSOS pos: " << (*iterTSOS)->trackParameters()->position()
                           << "   r: " << sqrt(pow((*iterTSOS)->trackParameters()->position().x(),2)
-                                              +pow((*iterTSOS)->trackParameters()->position().y(),2)) 
+                                              +pow((*iterTSOS)->trackParameters()->position().y(),2))
                           << "     TRT measurement");
         }
       }
@@ -259,10 +261,10 @@ bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track,
 
   if (m_cosmic) {
     // retrieve surface, from which hole search should start
-    // retrieve tracking geometry 
+    // retrieve tracking geometry
     const Trk::TrackingGeometry* trackingGeometry =  m_extrapolator->trackingGeometry();
     // get sct volume
-    const Trk::TrackingVolume* sctVolume = trackingGeometry->trackingVolume("InDet::Detectors::SCT::Barrel"); 
+    const Trk::TrackingVolume* sctVolume = trackingGeometry->trackingVolume("InDet::Detectors::SCT::Barrel");
     //get BoundarySurface for cylinder between sct and trt
     const Trk::CylinderSurface* sctCylinder = nullptr;
     const Trk::Surface* sctSurface= &(sctVolume->boundarySurfaces()[Trk::tubeOuterCover].get()->surfaceRepresentation());
@@ -277,15 +279,16 @@ bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track,
 
     if (firstsipar) {
       //std::cout << "firstsipar: " << *firstsipar << " pos: " << firstsipar->position() << std::endl;
-      startParameters.reset(m_extrapolator->extrapolate(*firstsipar,
+      startParameters.reset(m_extrapolator->extrapolate(ctx,
+                                                        *firstsipar,
                                                         *sctCylinder,
                                                         Trk::oppositeMomentum,
                                                         true,
                                                         partHyp));
     }
-    
+
     // if track can't be extrapolated to this cylinder (EC track!), extrapolate to disc outside TRT/SCT EC
-    if (!startParameters) {  
+    if (!startParameters) {
       ATH_MSG_DEBUG("no start parameters on SCT cylinder, try TRT ec disc");
       // get BoundarySurface for disk which encloses TRT ECs
       // depending on track origin use neg or pos EC
@@ -298,7 +301,7 @@ bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track,
           trtDisc = static_cast<const Trk::DiscSurface*> (trtSurface);
         }
       } else {
-        const Trk::TrackingVolume* trtVolume = trackingGeometry->trackingVolume("InDet::Detectors::TRT::PositiveEndcap");  
+        const Trk::TrackingVolume* trtVolume = trackingGeometry->trackingVolume("InDet::Detectors::TRT::PositiveEndcap");
         const Trk::Surface* trtSurface = &(trtVolume->boundarySurfaces()[Trk::positiveFaceXY].get()->surfaceRepresentation());
         if(trtSurface->type()==Trk::Surface::Disc){
           trtDisc = static_cast<const Trk::DiscSurface*> (trtSurface);
@@ -307,7 +310,8 @@ bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track,
 
       if (trtDisc) {
         // extrapolate track to disk
-        startParameters.reset(m_extrapolator->extrapolate(*firstsipar,
+        startParameters.reset(m_extrapolator->extrapolate(ctx,
+                                                          *firstsipar,
                                                           *trtDisc,
                                                           Trk::oppositeMomentum,
                                                           true,
@@ -315,13 +319,14 @@ bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track,
       }
     }
   } else {  // no cosmics
-    
+
     if (track.perigeeParameters()) {
        startParameters.reset( track.perigeeParameters()->clone());
     } else if (track.trackParameters()->front()) {
       ATH_MSG_DEBUG("No perigee, extrapolate to 0,0,0");
       // go back to perigee
-      startParameters.reset( m_extrapolator->extrapolate(*(track.trackParameters()->front()),
+      startParameters.reset( m_extrapolator->extrapolate(ctx,
+                                                         *(track.trackParameters()->front()),
                                                          Trk::PerigeeSurface(),
                                                          Trk::anyDirection,
                                                          false, partHyp));
@@ -341,11 +346,11 @@ bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track,
     ATH_MSG_DEBUG("We are looking for an extended list of holes, so add eventual holes before first hits");
     foundFirst = true;
   }
-  
+
   Identifier          id(0);
   const Trk::Surface* surf  = nullptr;
   bool                hasID = false;
-  
+
   // 2nd iteration to find predictions
   DataVector<const Trk::TrackStateOnSurface>::const_iterator iterTSOS = track.trackStateOnSurfaces()->begin();
 
@@ -359,10 +364,10 @@ bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track,
     }
   }
 
-  ATH_MSG_VERBOSE("start position: " << startParameters->position() 
+  ATH_MSG_VERBOSE("start position: " << startParameters->position()
                   << "   r: " << sqrt(pow(startParameters->position().x(),2)
                                       +pow(startParameters->position().y(),2)));
- 
+
   int measno=0;
   int nmeas=(int)track.measurementsOnTrack()->size();
   for (; iterTSOS!=track.trackStateOnSurfaces()->end();++iterTSOS) {
@@ -381,13 +386,13 @@ bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track,
       }
       if ((*iterTSOS)->measurementOnTrack() != nullptr
           && (*iterTSOS)->measurementOnTrack()->associatedSurface().associatedDetectorElement() != nullptr
-          && (*iterTSOS)->measurementOnTrack()->associatedSurface().associatedDetectorElement()->identify() != 0) { 
+          && (*iterTSOS)->measurementOnTrack()->associatedSurface().associatedDetectorElement()->identify() != 0) {
         id    = (*iterTSOS)->measurementOnTrack()->associatedSurface().associatedDetectorElement()->identify();
         surf  = &(*iterTSOS)->measurementOnTrack()->associatedSurface();
         hasID = true;
       } else if ((*iterTSOS)->trackParameters() != nullptr
                  && (*iterTSOS)->trackParameters()->associatedSurface().associatedDetectorElement() != nullptr
-                 && (*iterTSOS)->trackParameters()->associatedSurface().associatedDetectorElement()->identify() != 0) { 
+                 && (*iterTSOS)->trackParameters()->associatedSurface().associatedDetectorElement()->identify() != 0) {
         id    = (*iterTSOS)->trackParameters()->associatedSurface().associatedDetectorElement()->identify();
         surf  = &((*iterTSOS)->trackParameters()->associatedSurface());
         hasID = true;
@@ -397,13 +402,14 @@ bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track,
 
       // see if this is an Si state !
       if ((m_cosmic && per) || (hasID && (m_atlasId->is_pixel(id) || m_atlasId->is_sct(id) || m_atlasId->is_trt(id)))) {
-        
+
         if (m_atlasId->is_trt(id)) ATH_MSG_VERBOSE("Target is TRT, see if we can add something");
-        
+
         // extrapolate stepwise to this parameter (be careful, sorting might be wrong)
 
         std::vector<std::unique_ptr<const Trk::TrackParameters> > paramList =
-          m_extrapolator->extrapolateStepwise(*startParameters,
+          m_extrapolator->extrapolateStepwise(ctx,
+                                              *startParameters,
                                               *surf,
                                               Trk::alongMomentum,
                                               false, partHyp);
@@ -414,12 +420,12 @@ bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track,
         }
 
         ATH_MSG_VERBOSE("Number of parameters in this step: " << paramList.size());
-        
+
         // loop over the predictons and analyze them
         for (std::unique_ptr<const Trk::TrackParameters>& thisParameters : paramList) {
-          ATH_MSG_VERBOSE("extrapolated pos: " << thisParameters->position() << "   r: " << 
+          ATH_MSG_VERBOSE("extrapolated pos: " << thisParameters->position() << "   r: " <<
                           sqrt(pow(thisParameters->position().x(),2)+pow(thisParameters->position().y(),2)));
-      
+
           // check if surface has identifer !
           Identifier id2;
           if ((thisParameters->associatedSurface()).associatedDetectorElement() != nullptr &&
@@ -444,22 +450,22 @@ bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track,
             if (m_cosmic) continue;
             else break;
           }
-      
+
           // see if this surface is in the list
           std::map<const Identifier, const Trk::TrackStateOnSurface*>::iterator iTSOS = mapOfHits.find(id2);
-      
+
           if (iTSOS == mapOfHits.end() && !foundFirst) {
             ATH_MSG_VERBOSE("Si surface before first Si measurement, skip it and continue");
             continue;
           }
-      
+
           // this is a measurement on the track ?
           if (iTSOS != mapOfHits.end()) {
             if (!foundFirst && !(*iterTSOS)->type(Trk::TrackStateOnSurface::Outlier)) {
               ATH_MSG_VERBOSE("Found first Si measurement !");
               foundFirst = true;
             }
-          
+
             // is this a surface which might have a better prediction ?
             if (iTSOS->second->trackParameters()) {
               ATH_MSG_VERBOSE("Found track parameter on Si surface, take it");
@@ -469,7 +475,7 @@ bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track,
               startParameters.reset(thisParameters->clone());
             }
           }
-      
+
           // add surface, test insert !
           std::pair<const Trk::TrackParameters*,const bool> trackparampair (thisParameters.release(),true);
           if (mapOfPredictions.insert(std::pair<const Identifier, std::pair<const Trk::TrackParameters*,const bool> >(id2,trackparampair)).second) {
@@ -485,7 +491,7 @@ bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track,
           ATH_MSG_VERBOSE("Target was no longer an Si element, break loop");
           break;
         }
-        
+
       }
     }
     if ((*iterTSOS)->type(Trk::TrackStateOnSurface::Measurement) && !(*iterTSOS)->type(Trk::TrackStateOnSurface::Outlier)) measno++;
@@ -499,22 +505,23 @@ bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track,
   if (!m_atlasId->is_trt(id) && (m_countDeadModulesAfterLastHit || m_extendedListOfHoles || m_cosmic)) {
     ATH_MSG_DEBUG("Search for dead modules after the last Si measurement");
     if (m_extendedListOfHoles || m_cosmic) ATH_MSG_DEBUG("Search for extended list of holes");
-      
-    Trk::CylinderVolumeBounds* cylinderBounds = new Trk::CylinderVolumeBounds(560, 2750); 
+
+    Trk::CylinderVolumeBounds* cylinderBounds = new Trk::CylinderVolumeBounds(560, 2750);
     // don't delete the cylinderBounds -> it's taken care of by Trk::VOlume (see Trk::SharedObject)
-    Trk::Volume* boundaryVol = new Trk::Volume(0, cylinderBounds); 
+    Trk::Volume* boundaryVol = new Trk::Volume(0, cylinderBounds);
     // extrapolate this parameter blindly to search for more Si hits (not very fast, I know)
 
     std::vector<std::unique_ptr<const Trk::TrackParameters> > paramList =
-      m_extrapolator->extrapolateBlindly(*startParameters,
+      m_extrapolator->extrapolateBlindly(ctx,
+                                         *startParameters,
                                          Trk::alongMomentum,
                                          false, partHyp,
                                          boundaryVol);
 if (paramList.empty()) {
       ATH_MSG_VERBOSE("--> Did not manage to extrapolate to another surface, break loop");
-    } else {    
+    } else {
       ATH_MSG_VERBOSE("Number of parameters in this step: " << paramList.size());
-  
+
       // loop over the predictions and analyze them
       for (std::unique_ptr<const Trk::TrackParameters>& thisParameter : paramList) {
         // check if surface has identifer !
@@ -522,13 +529,13 @@ if (paramList.empty()) {
         if (thisParameter->associatedSurface().associatedDetectorElement() != nullptr &&
             thisParameter->associatedSurface().associatedDetectorElement()->identify() != 0) {
           id2 = thisParameter->associatedSurface().associatedDetectorElement()->identify();
-    
+
           // check if it is Si or Pixel
           if (!(m_atlasId->is_pixel(id2) || m_atlasId->is_sct(id2))) {
             ATH_MSG_VERBOSE("Surface is not Pixel or SCT, stop loop over parameters in this step");
             break;
           }
-    
+
           // JEF: bool parameter in trackparampair: flag weather this hit should be considered as hole; if not, just cound dead modules
           std::pair<const Trk::TrackParameters*,const bool> trackparampair (thisParameter.release(),m_extendedListOfHoles || m_cosmic);
           if (mapOfPredictions.insert(std::pair<const Identifier, std::pair<const Trk::TrackParameters*,const bool> >(id2,trackparampair)).second) {
@@ -552,10 +559,10 @@ if (paramList.empty()) {
     boundaryVol = nullptr;
     //delete cylinderBounds; cylinderBounds = 0; // Till : don't delete this guy, it's deleted already when the boundaryVol gets deleted !
   }
-    
+
   ATH_MSG_DEBUG("Number of Predictions found: " << mapOfPredictions.size());
   return true;
-  
+
 }
 
 //=================================================================================================================
@@ -565,33 +572,33 @@ void InDet::InDetTrackHoleSearchTool::performHoleSearchStepWise(std::map<const I
                                                                 std::vector<const Trk::TrackStateOnSurface*>* listOfHoles) const {
   /** This function looks for holes in a given set of TrackStateOnSurface (TSOS) within the Si-detectors.
       In order to do so, an extrapolation is performed from detector element to the next and compared to the ones in the TSOS.
-      If surfaces other than the ones in the track are crossed, these are possible holes or dead modules. Checks for sensitivity of 
+      If surfaces other than the ones in the track are crossed, these are possible holes or dead modules. Checks for sensitivity of
       struck material are performed.
-      
+
       The function requires the TSOS to have either TrackParameters (should have) or a MeasurementBase (must have). The startPoint
       of an extrapolation is required to be a TP. In case only a MB is present, the extrapolation Startpoint is set by the
       result TP of the last extrapolation, if possible.
   */
-  
+
   // counters to steer first/last Si hit logic
   unsigned int foundTSOS = 0;
   int  PixelHoles = 0, SctHoles = 0, SctDoubleHoles = 0, PixelDead=0, SctDead=0;
   std::set<Identifier> SctHoleIds;
-  
+
   ATH_MSG_DEBUG("Start iteration");
   ATH_MSG_DEBUG("Number of hits+outliers: " << mapOfHits.size() << " and predicted parameters:" << mapOfPredictions.size());
-  
+
   for (std::map<const Identifier,std::pair<const Trk::TrackParameters*,const bool> >::const_iterator it = mapOfPredictions.begin();
        it != mapOfPredictions.end(); ++it) {
-      
+
     const Trk::TrackParameters* nextParameters = (it->second).first;
-      
+
     Identifier id = nextParameters->associatedSurface().associatedDetectorElement()->identify();
-      
+
     // search for this ID in the list
     std::map<const Identifier, const Trk::TrackStateOnSurface*>::iterator iTSOS = mapOfHits.find(id);
-      
-    if (iTSOS == mapOfHits.end()) { 
+
+    if (iTSOS == mapOfHits.end()) {
       switch (m_boundaryCheckTool->boundaryCheck(*nextParameters)) {
         case Trk::BoundaryCheckResult::DeadElement:
           if (m_atlasId->is_pixel(id)) {
@@ -608,8 +615,8 @@ void InDet::InDetTrackHoleSearchTool::performHoleSearchStepWise(std::map<const I
           continue;
         case Trk::BoundaryCheckResult::Candidate:
           break;
-      }   
- 
+      }
+
       // increment tmp counters only if this detElement should be considered for a proper holesearch
       // this info is the boolean in the (mapOfPredictions->second).second
       if (((it->second).second)) {
@@ -619,16 +626,16 @@ void InDet::InDetTrackHoleSearchTool::performHoleSearchStepWise(std::map<const I
         } else if (m_atlasId->is_sct(id)) {
           ATH_MSG_VERBOSE("Found element is a SCT hole, add it to the list and continue");
           ++SctHoles;
-                  
-          // check double sct 
+
+          // check double sct
           // obtain backside of SCT module
-          const InDetDD::SiDetectorElement* thisElement = 
+          const InDetDD::SiDetectorElement* thisElement =
             dynamic_cast<const InDetDD::SiDetectorElement *> (nextParameters->associatedSurface().associatedDetectorElement());
           if (!thisElement) {
             ATH_MSG_ERROR ("cast to SiDetectorElement failed, should never happen !");
             continue;
           }
-                  
+
           const Identifier otherId = thisElement->otherSide()->identify();
           // loop over holes and look for the other one
           if (SctHoleIds.find(otherId) != SctHoleIds.end()) {
@@ -637,7 +644,7 @@ void InDet::InDetTrackHoleSearchTool::performHoleSearchStepWise(std::map<const I
           }
           // keep this id for double side check
           SctHoleIds.insert(id);
-      
+
         }
         // add to tmp list of holes
         if (listOfHoles) listOfHoles->push_back(createHoleTSOS(nextParameters));
@@ -646,7 +653,7 @@ void InDet::InDetTrackHoleSearchTool::performHoleSearchStepWise(std::map<const I
         continue;
       }
     } // end (iTSOS == mapOfHits.end())
-      
+
     if (iTSOS->second->type(Trk::TrackStateOnSurface::Outlier)) {
       ++foundTSOS;
       ATH_MSG_VERBOSE("Found TSOS is an outlier, not a hole, skip it and continue");
@@ -654,7 +661,7 @@ void InDet::InDetTrackHoleSearchTool::performHoleSearchStepWise(std::map<const I
       mapOfHits.erase(iTSOS);
       continue;
     }
-      
+
     if (iTSOS->second->type(Trk::TrackStateOnSurface::Measurement)) {
       ++foundTSOS;
       ATH_MSG_VERBOSE("Found TSOS is a measurement, continue");
@@ -663,17 +670,17 @@ void InDet::InDetTrackHoleSearchTool::performHoleSearchStepWise(std::map<const I
       continue;
     }
   } // end of loop
-  
-  ATH_MSG_DEBUG("==> Total number of holes found: " 
+
+  ATH_MSG_DEBUG("==> Total number of holes found: "
                 << PixelHoles << " Pixel holes, "
                 << SctHoles << " Sct holes, "
                 << SctDoubleHoles << " Double holes");
-  
+
   if (listOfHoles) ATH_MSG_DEBUG("==> Size of listOfHoles: " << listOfHoles->size());
-  
+
   if (mapOfHits.size() != 0) {
     int ioutliers = 0, imeasurements = 0;
-    for (std::map<const Identifier, const Trk::TrackStateOnSurface*>::const_iterator iter = mapOfHits.begin(); 
+    for (std::map<const Identifier, const Trk::TrackStateOnSurface*>::const_iterator iter = mapOfHits.begin();
          iter != mapOfHits.end(); ++iter) {
       if (iter->second->type(Trk::TrackStateOnSurface::Outlier)) ++ioutliers;
       else if (iter->second->type(Trk::TrackStateOnSurface::Measurement)) ++imeasurements;
@@ -684,7 +691,7 @@ void InDet::InDetTrackHoleSearchTool::performHoleSearchStepWise(std::map<const I
       if (PixelHoles+SctHoles+SctDoubleHoles > 0) {
         ATH_MSG_DEBUG("Not all measurements found, but holes. Left measurements: "
                       << imeasurements << " outliers: " << ioutliers << " found: " << foundTSOS
-                      << " Pixel holes: " << PixelHoles << " Sct holes: " << SctHoles 
+                      << " Pixel holes: " << PixelHoles << " Sct holes: " << SctHoles
                       << " Double holes: " << SctDoubleHoles);
       } else {
         ATH_MSG_DEBUG("Problem ? Not all measurements found. Left measurements: "
@@ -692,7 +699,7 @@ void InDet::InDetTrackHoleSearchTool::performHoleSearchStepWise(std::map<const I
       }
     }
   }
-  
+
   // update information and return
   if (information) {
     (*information)[Trk::numberOfPixelHoles]       = PixelHoles;
@@ -701,7 +708,7 @@ void InDet::InDetTrackHoleSearchTool::performHoleSearchStepWise(std::map<const I
     (*information)[Trk::numberOfPixelDeadSensors] = PixelDead;
     (*information)[Trk::numberOfSCTDeadSensors]   = SctDead;
   }
-  
+
   return;
 }
 
@@ -714,11 +721,11 @@ const Trk::TrackStateOnSurface* InDet::InDetTrackHoleSearchTool::createHoleTSOS(
 }
 
 // ====================================================================================================================
-const Trk::Track*  InDet::InDetTrackHoleSearchTool::addHolesToTrack(const Trk::Track& oldTrack, 
+const Trk::Track*  InDet::InDetTrackHoleSearchTool::addHolesToTrack(const Trk::Track& oldTrack,
                                                                     std::vector<const Trk::TrackStateOnSurface*>* listOfHoles) const {
   DataVector<const Trk::TrackStateOnSurface>* trackTSOS = new DataVector<const Trk::TrackStateOnSurface>;
 
-  // get states from track 
+  // get states from track
   for (DataVector<const Trk::TrackStateOnSurface>::const_iterator it = oldTrack.trackStateOnSurfaces()->begin();
        it != oldTrack.trackStateOnSurfaces()->end(); ++it) {
     // veto old holes
@@ -746,10 +753,10 @@ const Trk::Track*  InDet::InDetTrackHoleSearchTool::addHolesToTrack(const Trk::T
   if (perigee) {
 
     Trk::TrackStateOnSurfaceComparisonFunction CompFunc(perigee->momentum());
-  
-    // we always have to sort holes in 
+
+    // we always have to sort holes in
     // if (!is_sorted(trackTSOS->begin(),trackTSOS->end(), CompFunc)) {
-      
+
     if (fabs(perigee->parameters()[Trk::qOverP]) > 0.002) {
       /* invest n*(logN)**2 sorting time for lowPt, coping with a possibly
          not 100% transitive comparison functor.
-- 
GitLab


From e713d3b8cbfe96202ca4165de93fece49070ae2c Mon Sep 17 00:00:00 2001
From: Soshi Tsuno <soshi.tsuno@cern.ch>
Date: Wed, 7 Oct 2020 02:39:35 +0200
Subject: [PATCH 271/403] fix compile problem

---
 .../PixelCalibAlgs/{run2 => }/PixelCalibAlgs/PixelConvert.h       | 0
 .../InDetCalibAlgs/PixelCalibAlgs/{run2 => }/src/PixelConvert.cxx | 0
 2 files changed, 0 insertions(+), 0 deletions(-)
 rename InnerDetector/InDetCalibAlgs/PixelCalibAlgs/{run2 => }/PixelCalibAlgs/PixelConvert.h (100%)
 rename InnerDetector/InDetCalibAlgs/PixelCalibAlgs/{run2 => }/src/PixelConvert.cxx (100%)

diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/run2/PixelCalibAlgs/PixelConvert.h b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelConvert.h
similarity index 100%
rename from InnerDetector/InDetCalibAlgs/PixelCalibAlgs/run2/PixelCalibAlgs/PixelConvert.h
rename to InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelConvert.h
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/run2/src/PixelConvert.cxx b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelConvert.cxx
similarity index 100%
rename from InnerDetector/InDetCalibAlgs/PixelCalibAlgs/run2/src/PixelConvert.cxx
rename to InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelConvert.cxx
-- 
GitLab


From 2196a0d0363fb8bb2357dc49ab0d41779aaffc0c Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Wed, 7 Oct 2020 02:35:04 +0100
Subject: [PATCH 272/403] GSF: Move internal implementation methods to an
 anonymous namespace inside the relevant .cxx

---
 .../MultiComponentStateCombiner.h             |   4 -
 .../QuickCloseComponentsMultiStateMerger.h    |   6 -
 .../src/MultiComponentStateCombiner.cxx       | 256 +++++++++---------
 .../QuickCloseComponentsMultiStateMerger.cxx  | 103 +++----
 4 files changed, 183 insertions(+), 186 deletions(-)

diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/MultiComponentStateCombiner.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/MultiComponentStateCombiner.h
index fb739c82bb92..d48ba5e71ec3 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/MultiComponentStateCombiner.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/MultiComponentStateCombiner.h
@@ -60,10 +60,6 @@ combineWithWeight(const MultiComponentState&,
                   const bool useMode = false,
                   const double fractionPDFused = 1.0);
 
-std::unique_ptr<Trk::ComponentParameters>
-compute(const MultiComponentState*,
-        const bool useMode = false,
-        const double fractionPDFused = 1.0);
 }
 } // end Trk namespace
 
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/QuickCloseComponentsMultiStateMerger.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/QuickCloseComponentsMultiStateMerger.h
index 4175ea904045..191521a60cca 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/QuickCloseComponentsMultiStateMerger.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/QuickCloseComponentsMultiStateMerger.h
@@ -27,13 +27,7 @@ namespace QuickCloseComponentsMultiStateMerger {
 MultiComponentState
 merge(Trk::MultiComponentState&&, const unsigned int maximumNumberOfComponents);
 
-/// Method for merging and assembling a state
-MultiComponentState
-mergeFullDistArray(MultiComponentStateAssembler::Cache& cache,
-                   Trk::MultiComponentState&,
-                   const unsigned int maximumNumberOfComponents);
 }
-
 }
 
 #endif
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/src/MultiComponentStateCombiner.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/src/MultiComponentStateCombiner.cxx
index 7ae67a4ba4d1..1870407f4a97 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/src/MultiComponentStateCombiner.cxx
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/src/MultiComponentStateCombiner.cxx
@@ -16,132 +16,13 @@
 #include "TrkParameters/TrackParameters.h"
 #include "TrkSurfaces/Surface.h"
 
-std::unique_ptr<Trk::TrackParameters>
-Trk::MultiComponentStateCombiner::combine(
-  const Trk::MultiComponentState& uncombinedState,
-  const bool useMode,
-  const double fractionPDFused)
-{
-  std::unique_ptr<Trk::ComponentParameters> combinedComponent =
-    compute(&uncombinedState, useMode, fractionPDFused);
-  return std::move(combinedComponent->first);
-}
-
-std::unique_ptr<Trk::ComponentParameters>
-Trk::MultiComponentStateCombiner::combineWithWeight(
-  const Trk::MultiComponentState& uncombinedState,
-  const bool useMode,
-  const double fractionPDFused)
-
-{
-  return compute(&uncombinedState, useMode, fractionPDFused);
-}
-
-void
-Trk::MultiComponentStateCombiner::combineWithWeight(
-  Trk::ComponentParameters& mergeTo,
-  const Trk::ComponentParameters& addThis)
-{
-  const Trk::TrackParameters* secondParameters = addThis.first.get();
-  combineWithWeight(mergeTo,
-                    secondParameters->parameters(),
-                    secondParameters->covariance(),
-                    addThis.second);
-}
-
-void
-Trk::MultiComponentStateCombiner::combineWithWeight(
-  Trk::ComponentParameters& mergeTo,
-  const AmgVector(5) & secondParameters,
-  const AmgSymMatrix(5) * secondMeasuredCov,
-  const double secondWeight)
-{
-  double firstWeight = mergeTo.second;
-  auto trackParameters = mergeTo.first.get();
-  const AmgVector(5)& firstParameters = trackParameters->parameters();
-  AmgVector(5) finalParameters(firstParameters);
-  // Check to see if first track parameters are measured or not
-  double finalWeight = firstWeight;
-  combineParametersWithWeight(
-    finalParameters, finalWeight, secondParameters, secondWeight);
-
-  if (trackParameters->covariance() && secondMeasuredCov) {
-    AmgSymMatrix(5) finalMeasuredCov(*trackParameters->covariance());
-    combineCovWithWeight(firstParameters,
-                         finalMeasuredCov,
-                         firstWeight,
-                         secondParameters,
-                         *secondMeasuredCov,
-                         secondWeight);
-
-    mergeTo.first->updateParameters(finalParameters, finalMeasuredCov);
-    mergeTo.second = finalWeight;
-  } else {
-    mergeTo.first->updateParameters(finalParameters, nullptr);
-    mergeTo.second = finalWeight;
-  }
-}
-
-void
-Trk::MultiComponentStateCombiner::combineParametersWithWeight(
-  AmgVector(5) & firstParameters,
-  double& firstWeight,
-  const AmgVector(5) & secondParameters,
-  const double secondWeight)
-{
-
-  double totalWeight = firstWeight + secondWeight;
-
-  // Ensure that we don't have any problems with the cyclical nature of phi
-  // Use first state as reference poin
-  double deltaPhi = firstParameters[2] - secondParameters[2];
-  if (deltaPhi > M_PI) {
-    firstParameters[2] -= 2 * M_PI;
-  } else if (deltaPhi < -M_PI) {
-    firstParameters[2] += 2 * M_PI;
-  }
-
-  firstParameters =
-    firstWeight * firstParameters + secondWeight * secondParameters;
-  firstParameters /= totalWeight;
-
-  // Ensure that phi is between -pi and pi
-  //
-  firstParameters[2] = CxxUtils::wrapToPi(firstParameters[2]);
-  firstWeight = totalWeight;
-}
-
-void
-Trk::MultiComponentStateCombiner::combineCovWithWeight(
-  const AmgVector(5) & firstParameters,
-  AmgSymMatrix(5) & firstMeasuredCov,
-  const double firstWeight,
-  const AmgVector(5) & secondParameters,
-  const AmgSymMatrix(5) & secondMeasuredCov,
-  const double secondWeight)
-{
-
-  double totalWeight = firstWeight + secondWeight;
-
-  // Extract local error matrix: Must make sure track parameters are measured,
-  // ie have an associated error matrix.
-
-  AmgVector(5) parameterDifference = firstParameters - secondParameters;
-  parameterDifference[2] = CxxUtils::wrapToPi(parameterDifference[2]);
-  parameterDifference /= totalWeight;
-
-  firstMeasuredCov *= firstWeight;
-  firstMeasuredCov += secondWeight * secondMeasuredCov;
-  firstMeasuredCov /= totalWeight;
-  firstMeasuredCov += firstWeight * secondWeight * parameterDifference *
-                      parameterDifference.transpose();
-}
+namespace {
 
+// Actual implementation method for combining a multi component state
 std::unique_ptr<Trk::ComponentParameters>
-Trk::MultiComponentStateCombiner::compute(
-  const Trk::MultiComponentState* uncombinedState,
-  const bool useMode,
-  const double fractionPDFused)
+computeImpl(const Trk::MultiComponentState* uncombinedState,
+            const bool useMode,
+            const double fractionPDFused)
 {
   if (uncombinedState->empty()) {
     return nullptr;
@@ -183,7 +64,7 @@ Trk::MultiComponentStateCombiner::compute(
 
   for (; component != uncombinedState->end(); ++component) {
 
-    const TrackParameters* trackParameters = (*component).first.get();
+    const Trk::TrackParameters* trackParameters = (*component).first.get();
     double weight = (*component).second;
 
     AmgVector(5) parameters = trackParameters->parameters();
@@ -335,6 +216,129 @@ Trk::MultiComponentStateCombiner::compute(
     delete covariance;
   }
 
-  return std::make_unique<ComponentParameters>(
+  return std::make_unique<Trk::ComponentParameters>(
     std::move(combinedTrackParameters), totalWeight);
 }
+} // end anonymous namespace
+
+std::unique_ptr<Trk::TrackParameters>
+Trk::MultiComponentStateCombiner::combine(
+  const Trk::MultiComponentState& uncombinedState,
+  const bool useMode,
+  const double fractionPDFused)
+{
+  std::unique_ptr<Trk::ComponentParameters> combinedComponent =
+    computeImpl(&uncombinedState, useMode, fractionPDFused);
+  return std::move(combinedComponent->first);
+}
+
+std::unique_ptr<Trk::ComponentParameters>
+Trk::MultiComponentStateCombiner::combineWithWeight(
+  const Trk::MultiComponentState& uncombinedState,
+  const bool useMode,
+  const double fractionPDFused)
+
+{
+  return computeImpl(&uncombinedState, useMode, fractionPDFused);
+}
+
+void
+Trk::MultiComponentStateCombiner::combineWithWeight(
+  Trk::ComponentParameters& mergeTo,
+  const Trk::ComponentParameters& addThis)
+{
+  const Trk::TrackParameters* secondParameters = addThis.first.get();
+  combineWithWeight(mergeTo,
+                    secondParameters->parameters(),
+                    secondParameters->covariance(),
+                    addThis.second);
+}
+
+void
+Trk::MultiComponentStateCombiner::combineWithWeight(
+  Trk::ComponentParameters& mergeTo,
+  const AmgVector(5) & secondParameters,
+  const AmgSymMatrix(5) * secondMeasuredCov,
+  const double secondWeight)
+{
+  double firstWeight = mergeTo.second;
+  auto trackParameters = mergeTo.first.get();
+  const AmgVector(5)& firstParameters = trackParameters->parameters();
+  AmgVector(5) finalParameters(firstParameters);
+  // Check to see if first track parameters are measured or not
+  double finalWeight = firstWeight;
+  combineParametersWithWeight(
+    finalParameters, finalWeight, secondParameters, secondWeight);
+
+  if (trackParameters->covariance() && secondMeasuredCov) {
+    AmgSymMatrix(5) finalMeasuredCov(*trackParameters->covariance());
+    combineCovWithWeight(firstParameters,
+                         finalMeasuredCov,
+                         firstWeight,
+                         secondParameters,
+                         *secondMeasuredCov,
+                         secondWeight);
+
+    mergeTo.first->updateParameters(finalParameters, finalMeasuredCov);
+    mergeTo.second = finalWeight;
+  } else {
+    mergeTo.first->updateParameters(finalParameters, nullptr);
+    mergeTo.second = finalWeight;
+  }
+}
+
+void
+Trk::MultiComponentStateCombiner::combineParametersWithWeight(
+  AmgVector(5) & firstParameters,
+  double& firstWeight,
+  const AmgVector(5) & secondParameters,
+  const double secondWeight)
+{
+
+  double totalWeight = firstWeight + secondWeight;
+
+  // Ensure that we don't have any problems with the cyclical nature of phi
+  // Use first state as reference poin
+  double deltaPhi = firstParameters[2] - secondParameters[2];
+  if (deltaPhi > M_PI) {
+    firstParameters[2] -= 2 * M_PI;
+  } else if (deltaPhi < -M_PI) {
+    firstParameters[2] += 2 * M_PI;
+  }
+
+  firstParameters =
+    firstWeight * firstParameters + secondWeight * secondParameters;
+  firstParameters /= totalWeight;
+
+  // Ensure that phi is between -pi and pi
+  //
+  firstParameters[2] = CxxUtils::wrapToPi(firstParameters[2]);
+  firstWeight = totalWeight;
+}
+
+void
+Trk::MultiComponentStateCombiner::combineCovWithWeight(
+  const AmgVector(5) & firstParameters,
+  AmgSymMatrix(5) & firstMeasuredCov,
+  const double firstWeight,
+  const AmgVector(5) & secondParameters,
+  const AmgSymMatrix(5) & secondMeasuredCov,
+  const double secondWeight)
+{
+
+  double totalWeight = firstWeight + secondWeight;
+
+  // Extract local error matrix: Must make sure track parameters are measured,
+  // ie have an associated error matrix.
+
+  AmgVector(5) parameterDifference = firstParameters - secondParameters;
+  parameterDifference[2] = CxxUtils::wrapToPi(parameterDifference[2]);
+  parameterDifference /= totalWeight;
+
+  firstMeasuredCov *= firstWeight;
+  firstMeasuredCov += secondWeight * secondMeasuredCov;
+  firstMeasuredCov /= totalWeight;
+  firstMeasuredCov += firstWeight * secondWeight * parameterDifference *
+                      parameterDifference.transpose();
+}
+
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/src/QuickCloseComponentsMultiStateMerger.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/src/QuickCloseComponentsMultiStateMerger.cxx
index 6357bb24e5c0..b0259fdef2cd 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/src/QuickCloseComponentsMultiStateMerger.cxx
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/src/QuickCloseComponentsMultiStateMerger.cxx
@@ -19,6 +19,59 @@
 #include <limits>
 
 using namespace GSFUtils;
+namespace {
+
+/// Method for merging and assembling a state
+Trk::MultiComponentState
+mergeFullDistArray(Trk::MultiComponentStateAssembler::Cache& cache,
+                   Trk::MultiComponentState& statesToMerge,
+                   const unsigned int maximumNumberOfComponents)
+{
+  const int32_t n = statesToMerge.size();
+  AlignedDynArray<Component1D, alignment> components(n);
+  for (int32_t i = 0; i < n; ++i) {
+    const AmgSymMatrix(5)* measuredCov = statesToMerge[i].first->covariance();
+    const AmgVector(5)& parameters = statesToMerge[i].first->parameters();
+    // Fill in infomation
+    const double cov =
+      measuredCov ? (*measuredCov)(Trk::qOverP, Trk::qOverP) : -1.;
+    components[i].mean = parameters[Trk::qOverP];
+    components[i].cov = cov;
+    components[i].invCov = cov > 0 ? 1. / cov : 1e10;
+    components[i].weight = statesToMerge[i].second;
+  }
+
+  // Gather the merges
+  const std::vector<std::pair<int16_t, int16_t>> merges =
+    findMerges(components.buffer(), n, maximumNumberOfComponents);
+
+  // Do the full 5D calculations of the merge
+  for (const auto& mergePair : merges) {
+    const int16_t mini = mergePair.first;
+    const int16_t minj = mergePair.second;
+    Trk::MultiComponentStateCombiner::combineWithWeight(statesToMerge[mini],
+                                                        statesToMerge[minj]);
+    statesToMerge[minj].first.reset();
+    statesToMerge[minj].second = 0.;
+  }
+  // Assemble the final result
+  for (auto& state : statesToMerge) {
+    // Avoid merge ones
+    if (!state.first) {
+      continue;
+    }
+    cache.multiComponentState.emplace_back(
+      Trk::ComponentParameters(state.first.release(), state.second));
+    cache.validWeightSum += state.second;
+  }
+  Trk::MultiComponentState mergedState =
+    Trk::MultiComponentStateAssembler::assembledState(cache);
+  // Clear the state vector
+  statesToMerge.clear();
+  return mergedState;
+}
+
+} // end anonympus namespace
 
 Trk::MultiComponentState
 Trk::QuickCloseComponentsMultiStateMerger::merge(
@@ -61,53 +114,3 @@ Trk::QuickCloseComponentsMultiStateMerger::merge(
 
   return mergeFullDistArray(cache, statesToMerge, maximumNumberOfComponents);
 }
-
-Trk::MultiComponentState
-Trk::QuickCloseComponentsMultiStateMerger::mergeFullDistArray(
-  MultiComponentStateAssembler::Cache& cache,
-  Trk::MultiComponentState& statesToMerge,
-  const unsigned int maximumNumberOfComponents)
-{
-  const int32_t n = statesToMerge.size();
-  AlignedDynArray<Component1D, alignment> components(n);
-  for (int32_t i = 0; i < n; ++i) {
-    const AmgSymMatrix(5)* measuredCov = statesToMerge[i].first->covariance();
-    const AmgVector(5)& parameters = statesToMerge[i].first->parameters();
-    // Fill in infomation
-    const double cov =
-      measuredCov ? (*measuredCov)(Trk::qOverP, Trk::qOverP) : -1.;
-    components[i].mean = parameters[Trk::qOverP];
-    components[i].cov = cov;
-    components[i].invCov = cov > 0 ? 1. / cov : 1e10;
-    components[i].weight = statesToMerge[i].second;
-  }
-
-  // Gather the merges
-  const std::vector<std::pair<int16_t, int16_t>> merges =
-    findMerges(components.buffer(), n, maximumNumberOfComponents);
-
-  // Do the full 5D calculations of the merge
-  for (const auto& mergePair : merges) {
-    const int16_t mini = mergePair.first;
-    const int16_t minj = mergePair.second;
-    MultiComponentStateCombiner::combineWithWeight(statesToMerge[mini],
-                                                   statesToMerge[minj]);
-    statesToMerge[minj].first.reset();
-    statesToMerge[minj].second = 0.;
-  }
-  // Assemble the final result
-  for (auto& state : statesToMerge) {
-    // Avoid merge ones
-    if (!state.first) {
-      continue;
-    }
-    cache.multiComponentState.push_back(
-      ComponentParameters(state.first.release(), state.second));
-    cache.validWeightSum += state.second;
-  }
-  Trk::MultiComponentState mergedState =
-    MultiComponentStateAssembler::assembledState(cache);
-  // Clear the state vector
-  statesToMerge.clear();
-  return mergedState;
-}
-- 
GitLab


From 1cee99c6b7aaf513a6280895b74393cde65d5461 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 7 Oct 2020 03:36:25 +0200
Subject: [PATCH 273/403] ByteStreamCnvSvc: Byte stream metadata adjustments.

Don't crash in ByteStreamEventStorageOutputSvc if there's no
bytestream metadata.  (Can happen for example if we're reading pool
and writing bytestream.)

In RDP_ByteStream_jobOptions, add EventInfo as an additional dependency
of StreamBS.  (Needed for SCT_RawDataByteStreamCnv tests.)
---
 .../share/RDP_ByteStream_jobOptions.py                 |  3 ++-
 .../src/ByteStreamEventStorageOutputSvc.cxx            | 10 +++++-----
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/Event/ByteStreamCnvSvc/share/RDP_ByteStream_jobOptions.py b/Event/ByteStreamCnvSvc/share/RDP_ByteStream_jobOptions.py
index dc0cffe0722b..8d3ec14abeae 100644
--- a/Event/ByteStreamCnvSvc/share/RDP_ByteStream_jobOptions.py
+++ b/Event/ByteStreamCnvSvc/share/RDP_ByteStream_jobOptions.py
@@ -25,7 +25,8 @@ from AthenaServices.AthenaServicesConf import AthenaOutputStream
 topSequence += AthenaOutputStream(
     "StreamBS",
     EvtConversionSvc = "ByteStreamCnvSvc",
-    OutputFile = "ByteStreamRDP_OutputSvc"
+    OutputFile = "ByteStreamRDP_OutputSvc",
+    ExtraInputs = [( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' ) ],
     )
 # ByteStreamCnvSvc is an input CnvSvc now. 
 EventPersistencySvc = svcMgr.EventPersistencySvc
diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx
index 3ccda05b67df..b19f9a571fd9 100644
--- a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx
+++ b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx
@@ -291,12 +291,12 @@ ByteStreamEventStorageOutputSvc::io_reinit() {
 
 const ByteStreamMetadata *
 ByteStreamEventStorageOutputSvc::getByteStreamMetadata(
-    const EventContext* ctx) {
-  const ByteStreamMetadataContainer* metaDataCont = ctx == nullptr
-      ? SG::get(m_byteStreamMetadataKey)
-      : SG::get(m_byteStreamMetadataKey, *ctx);
+    const EventContext* ctx)
+{
+  if (!ctx) ctx = &Gaudi::Hive::currentContext();
+  SG::ReadHandle<ByteStreamMetadataContainer> metaDataCont (m_byteStreamMetadataKey, *ctx);
 
-  if (metaDataCont == nullptr) return nullptr;
+  if (!metaDataCont.isValid()) return nullptr;
 
   if (metaDataCont->size() > 1)
     ATH_MSG_WARNING("Multiple run parameters in MetaDataStore. "
-- 
GitLab


From c684b75408fff3187c31e813a5d934cedbb13c51 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 7 Oct 2020 03:05:44 +0200
Subject: [PATCH 274/403] DataModelRunTests: Fix tests in master.

ByteStreamTestWrite needs to define MetaDataStore.
Also update its reference file, and extend the list of patterns to ignore
in reference file comparison.
---
 .../DataModelRunTests/CMakeLists.txt          |  2 +-
 .../share/ByteStreamTestWrite.ref             | 68 ++++++++-----------
 .../share/ByteStreamTestWrite_jo.py           |  1 +
 3 files changed, 31 insertions(+), 40 deletions(-)

diff --git a/Control/DataModelTest/DataModelRunTests/CMakeLists.txt b/Control/DataModelTest/DataModelRunTests/CMakeLists.txt
index 2ed04ff3492c..45a3a4dd5c8c 100644
--- a/Control/DataModelTest/DataModelRunTests/CMakeLists.txt
+++ b/Control/DataModelTest/DataModelRunTests/CMakeLists.txt
@@ -30,7 +30,7 @@ function (datamodel_run_test testName)
   atlas_add_test( ${testName}
                   SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/datamodel_${testName}.sh
                   PROPERTIES TIMEOUT 300
-                  LOG_IGNORE_PATTERN "has different type than the branch|no dictionary for class|^StorageSvc +INFO|Cache alignment|Unable to locate catalog${ARG_EXTRA_IGNORE}"
+                  LOG_IGNORE_PATTERN "has different type than the branch|no dictionary for class|^StorageSvc +INFO|Cache alignment|Unable to locate catalog|IOVDbSvc[0-9 ]+INFO${ARG_EXTRA_IGNORE}"
                   ENVIRONMENT "ATLAS_REFERENCE_TAG=DataModelRunTests/DataModelRunTestsReference-01-00-03"
                    )
   if( ARG_DEPENDS )
diff --git a/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestWrite.ref b/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestWrite.ref
index a57229cabe99..a06527b918e3 100644
--- a/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestWrite.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestWrite.ref
@@ -1,7 +1,7 @@
-Thu Jul 16 19:15:01 CEST 2020
+Wed Oct  7 04:22:45 CEST 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.16] [x86_64-centos7-gcc8-opt] [atlas-work3/e277cdc296a] -- built on [2020-07-16T1652]
+Py:Athena            INFO using release [WorkDir-22.0.19] [x86_64-centos7-gcc8-opt] [atlas-work3/2257af3c1fa] -- built on [2020-10-07T0138]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
@@ -10,68 +10,52 @@ Py:Athena            INFO including file "DataModelRunTests/loadWriteDicts.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"
-Py:ConfigurableDb    INFO Read module info for 5551 configurables from 77 genConfDb files
-Py:ConfigurableDb WARNING Found 1 duplicates among the 77 genConfDb files :
-Py:ConfigurableDb WARNING --------------------------------------------------
-Py:ConfigurableDb WARNING   -<component name>: <module> - [ <duplicates> ]
-Py:ConfigurableDb WARNING --------------------------------------------------
-Py:ConfigurableDb WARNING   -TrigInDetAccelerationTool: TrigInDetAccelerationTool.TrigInDetAccelerationToolConf - ['TrigFastTrackFinder.TrigFastTrackFinderConf']
-Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
-ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
-ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+Py:ConfigurableDb    INFO Read module info for 5570 configurables from 51 genConfDb files
+Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
-                                          running on lxplus708.cern.ch on Thu Jul 16 19:15:12 2020
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on lxplus773.cern.ch on Wed Oct  7 04:22:54 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 3308 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 705 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 1734 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 6320 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 722 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1699 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 6214 CLIDRegistry entries for module ALL
 xAODMaker::Even...   INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
 xAODMaker::Even...   INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
 xAODMaker::Even...WARNING Beam conditions service not available
 xAODMaker::Even...WARNING Will not fill beam spot information into xAOD::EventInfo
-ClassIDSvc           INFO  getRegistryEntries: read 423 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 430 CLIDRegistry entries for module ALL
 PyComponentMgr       INFO Initializing PyComponentMgr...
 LoadWriteDicts       INFO Initializing LoadWriteDicts...
-ClassIDSvc           INFO  getRegistryEntries: read 3020 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3126 CLIDRegistry entries for module ALL
 TrigSerializeCn...   INFO initialize()
-ClassIDSvc           INFO  getRegistryEntries: read 109 CLIDRegistry entries for module ALL
-Warning in <TClass::Init>: no dictionary for class CosmicMuonCollection_tlp1 is available
-Warning in <TClass::Init>: no dictionary for class MdtTrackSegmentCollection_tlp1 is available
-Warning in <TClass::Init>: no dictionary for class CosmicMuonCollection_p1 is available
-Warning in <TClass::Init>: no dictionary for class CosmicMuon_p1 is available
-Warning in <TClass::Init>: no dictionary for class MdtTrackSegmentCollection_p1 is available
-Warning in <TClass::Init>: no dictionary for class MdtTrackSegment_p1 is available
-Warning in <TClass::Init>: no dictionary for class MdtTrackSegmentCollection_p2 is available
-Warning in <TClass::Init>: no dictionary for class PanTauDetails_p1 is available
+ClassIDSvc           INFO  getRegistryEntries: read 111 CLIDRegistry entries for module ALL
 ToolSvc.TrigSer...   INFO Initializing - Package version: TrigSerializeTP-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 17975 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 17980 CLIDRegistry entries for module ALL
 DecisionSvc          INFO Inserting stream: StreamBSFileOutput with no Algs
 OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 StreamBSFileOut...   INFO Initializing StreamBSFileOutput.DefaultNameTool - package version AthenaServices-00-00-00
-AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok]
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
 DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-07-15T2139/Athena/22.0.16/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host lxplus708.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-10-05T2101/Athena/22.0.19/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host lxplus773.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] 
+ClassIDSvc           INFO  getRegistryEntries: read 1297 CLIDRegistry entries for module ALL
 ByteStreamEvent...   INFO Initializing ByteStreamEventStorageOutputSvc - package version ByteStreamCnvSvc-00-00-00
-ByteStreamEvent...   INFO eformat version to use: "current"
-ByteStreamEvent...   INFO event storage (BS) version to use: "current"
+ByteStreamEvent...   INFO eformat version to use: " 'EformatVersion':'current'"
+ByteStreamEvent...   INFO event storage (BS) version to use: " 'EventStorageVersion':'current'"
 ByteStreamEvent...   INFO Reinitialization...
 StreamBSFileOutput   INFO Found HelperTools = PrivateToolHandleArray([])
 StreamBSFileOutput   INFO Data output: ByteStreamEventStorageOutputSvc
@@ -83,19 +67,17 @@ ApplicationMgr       INFO Application Manager Started successfully
 EventPersistenc...   INFO Added successfully Conversion service:McCnvSvc
 AthenaEventLoopMgr   INFO   ===>>>  start of run 0    <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #0, run #0 0 events processed so far  <<<===
-ClassIDSvc           INFO  getRegistryEntries: read 1379 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 110 CLIDRegistry entries for module ALL
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 MetaDataSvc          INFO Found MetaDataTools = PublicToolHandleArray([])
 ROBDataProviderSvc   INFO Initializing ROBDataProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
 ROBDataProviderSvc   INFO  ---> Filter out empty ROB fragments                               =  'filterEmptyROB':False
 ROBDataProviderSvc   INFO  ---> Filter out specific ROBs by Status Code: # ROBs = 0
 ROBDataProviderSvc   INFO  ---> Filter out Sub Detector ROBs by Status Code: # Sub Detectors = 0
-InputMetaDataStoreWARNING retrieve(const): No valid proxy for object ByteStreamMetadata  of type ByteStreamMetadataContainer(CLID 1076128893)
-DetectorStore     WARNING retrieve(default): No valid proxy for default object 
- of type TagInfo(CLID 61780915)
+ByteStreamEvent...WARNING failed to retrieve ByteStreamMetaData
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #0 1 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #1, run #0 1 events processed so far  <<<===
-ClassIDSvc           INFO  getRegistryEntries: read 328 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 334 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #0 2 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #2, run #0 2 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #0 3 events processed so far  <<<===
@@ -149,3 +131,11 @@ 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"
+TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_tlp1 is available
+TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_tlp1 is available
+TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_p1 is available
+TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuon_p1 is available
+TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_p1 is available
+TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegment_p1 is available
+TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_p2 is available
+TClass::Init:0: RuntimeWarning: no dictionary for class PanTauDetails_p1 is available
diff --git a/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestWrite_jo.py b/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestWrite_jo.py
index f8209a97bffc..4b57b1579419 100755
--- a/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestWrite_jo.py
+++ b/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestWrite_jo.py
@@ -94,6 +94,7 @@ athenaCommonFlags.BSRDOOutput = 'test.bs'
 from ByteStreamCnvSvc import WriteByteStream
 from StoreGate.StoreGateConf import StoreGateSvc
 svcMgr += StoreGateSvc('InputMetaDataStore')
+svcMgr += StoreGateSvc('MetaDataStore')
 StreamBSFileOutput = WriteByteStream.getStream("EventStorage","StreamBSFileOutput")
 # List of DO's to write out
 StreamBSFileOutput.ItemList   += fullItemList
-- 
GitLab


From 1908c2cc2559d7aebc5a0bd55144d382af08b106 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 7 Oct 2020 03:30:15 +0200
Subject: [PATCH 275/403] SCT_RawDataByteStreamCnv: Fix tests.

Decoder test: Remove PixelModelData property from ClusterMakerTool.

Encoder test: Turn off WriteEventlessFiles, to avoid crash during stop().
---
 .../SCT_RawDataByteStreamCnv/share/testSCTDecode.py              | 1 -
 .../SCT_RawDataByteStreamCnv/share/testSCTEncode.py              | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTDecode.py b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTDecode.py
index ecbbd1c36b37..03d21f9f4b36 100644
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTDecode.py
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTDecode.py
@@ -122,7 +122,6 @@ sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup()
 from SiClusterizationTool.SiClusterizationToolConf import InDet__ClusterMakerTool
 InDetClusterMakerTool = InDet__ClusterMakerTool(name = "InDetClusterMakerTool",
                                                 PixelCablingSvc = None,
-                                                PixelModuleData = "",
                                                 PixelChargeCalibCondData = "",
                                                 PixelOfflineCalibData = '',
                                                 PixelLorentzAngleTool = None,
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTEncode.py b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTEncode.py
index 0afdbe2d11e3..417a9c770edb 100644
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTEncode.py
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTEncode.py
@@ -123,6 +123,7 @@ include("ByteStreamCnvSvc/RDP_ByteStream_jobOptions.py")
 from ByteStreamCnvSvc import WriteByteStream
 StreamBSFileOutput = WriteByteStream.getStream("EventStorage","StreamBSFileOutput")
 StreamBSFileOutput.ItemList += [ "SCT_RDO_Container#SCT_RDOs" ]
+svcMgr.ByteStreamEventStorageOutputSvc.WriteEventlessFiles = False
 
 # Print algorithms
 if doPrint:
-- 
GitLab


From b6d9ce1a632f9c74d577809813f506466499ecbe Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 7 Oct 2020 03:19:18 +0200
Subject: [PATCH 276/403] LArCellRec: More reference comparison patterns to
 ignore.

Fix test failures in master.
---
 LArCalorimeter/LArCellRec/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/LArCalorimeter/LArCellRec/CMakeLists.txt b/LArCalorimeter/LArCellRec/CMakeLists.txt
index 669544d781c6..2adcbe8fc7a2 100644
--- a/LArCalorimeter/LArCellRec/CMakeLists.txt
+++ b/LArCalorimeter/LArCellRec/CMakeLists.txt
@@ -70,6 +70,6 @@ atlas_install_joboptions( share/*.py )
 atlas_add_test( LArCellDeadOTXCorr_test
   SCRIPT test/LArCellDeadOTXCorr_test.sh
   PROPERTIES TIMEOUT 600
-  LOG_IGNORE_PATTERN "LArDetectorToolNV|is still valid|no data retrieved|Database being retired|Reading file|Unable to locate catalog|Resolved path|DigitizationFlags|^Domain|created CondCont|no dictionary for class|^ +[+]|Reading LArPedestalMC|IOV callback|^DetectorStore|Cache alignment|object with key|recorded new|into Conditions" )
+  LOG_IGNORE_PATTERN "LArDetectorToolNV|is still valid|no data retrieved|Database being retired|Reading file|Unable to locate catalog|Resolved path|DigitizationFlags|^Domain|created CondCont|no dictionary for class|^ +[+]|Reading LArPedestalMC|IOV callback|^DetectorStore|Cache alignment|object with key|recorded new|into Conditions|IOVDbSvc +INFO" )
 
 
-- 
GitLab


From 07add34493aac43db0a14a99196ebe2c15fc80c9 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 7 Oct 2020 03:00:41 +0200
Subject: [PATCH 277/403] CaloRec: More reference comparison patterns to
 ignore.

Fix test failures in master.
---
 Calorimeter/CaloRec/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Calorimeter/CaloRec/CMakeLists.txt b/Calorimeter/CaloRec/CMakeLists.txt
index 4ab7bf01e16e..044728d05c20 100644
--- a/Calorimeter/CaloRec/CMakeLists.txt
+++ b/Calorimeter/CaloRec/CMakeLists.txt
@@ -137,7 +137,7 @@ atlas_add_test( CaloThinCellsByClusterAlg_test
 
 atlas_add_test( ToolConstantsCondAlg_test
                 SCRIPT test/ToolConstantsCondAlg_test.py
-                LOG_IGNORE_PATTERN "Cache alignment|Current filenames|Unable to locate catalog|peeking into" )
+                LOG_IGNORE_PATTERN "Cache alignment|Current filenames|Unable to locate catalog|peeking into|IOVDbSvc +INFO" )
 
 
 atlas_add_test( CaloCellContainerAliasAlgConfig_test
-- 
GitLab


From c7671d03b96495848699072474ba6245eda5995e Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 7 Oct 2020 03:12:23 +0200
Subject: [PATCH 278/403] LArConditionsTest: More reference comparison patterns
 to ignore.

Fix test failures in master.
---
 LArCalorimeter/LArTest/LArConditionsTest/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/LArCalorimeter/LArTest/LArConditionsTest/CMakeLists.txt b/LArCalorimeter/LArTest/LArConditionsTest/CMakeLists.txt
index 0bdbf862d930..1b62213e33d9 100644
--- a/LArCalorimeter/LArTest/LArConditionsTest/CMakeLists.txt
+++ b/LArCalorimeter/LArTest/LArConditionsTest/CMakeLists.txt
@@ -55,7 +55,7 @@ function (larconditions_run_test testName)
                   SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/larconditions_${testName}.sh
                   ENVIRONMENT ATLAS_REFERENCE_TAG=LArConditionsTest/LArConditionsTest-01-00-12
                   PROPERTIES TIMEOUT 1200
-                  LOG_IGNORE_PATTERN "Data source lookup|Resolved path|Failed to connect to service|Release number|Sorting algorithm|Failed to connect|Failure while attempting to connect|Reading file|^CORAL/|being retired|^Domain|INFO GeoModelSvc|locate catalog|Cache alignment|COOL_DISABLE|Failed to get ContainerHandle|^RalSessionMgr Info|^RelationalDatabase Info|Bootstrap.py|MetaDataSvc|xAODMaker|Opening COOL connection|Disconnecting from"
+                  LOG_IGNORE_PATTERN "Data source lookup|Resolved path|Failed to connect to service|Release number|Sorting algorithm|Failed to connect|Failure while attempting to connect|Reading file|^CORAL/|being retired|^Domain|INFO GeoModelSvc|locate catalog|Cache alignment|COOL_DISABLE|Failed to get ContainerHandle|^RalSessionMgr Info|^RelationalDatabase Info|Bootstrap.py|MetaDataSvc|xAODMaker|Opening COOL connection|Disconnecting from|IOVDbSvc +INFO"
                    )
   if( ARG_DEPENDS )
     set_tests_properties( LArConditionsTest_${testName}_ctest
-- 
GitLab


From 7b0a6da868e60c78f097c53196d42b0e1872ca34 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 7 Oct 2020 03:20:15 +0200
Subject: [PATCH 279/403] LArRecUtils: More reference comparison patterns to
 ignore.

Fix test failures in master.
---
 LArCalorimeter/LArRecUtils/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/LArCalorimeter/LArRecUtils/CMakeLists.txt b/LArCalorimeter/LArRecUtils/CMakeLists.txt
index e670a84e2228..1f2fb686f877 100644
--- a/LArCalorimeter/LArRecUtils/CMakeLists.txt
+++ b/LArCalorimeter/LArRecUtils/CMakeLists.txt
@@ -69,7 +69,7 @@ atlas_install_joboptions( share/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-ign
 
 atlas_add_test( LArFCalTowerBuilderTool
                 SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/test/LArFCalTowerBuilderTool_test.sh
-                LOG_IGNORE_PATTERN "Reading file|Unable to locate catalog|Cache alignment"
+                LOG_IGNORE_PATTERN "Reading file|Unable to locate catalog|Cache alignment|IOVDbSvc +INFO"
                 PROPERTIES TIMEOUT 600 )
 
 atlas_add_test( LArRecUtilsConfig_test
-- 
GitLab


From db2f5260d2a9405cfd213f9aedd5e1ad45966a52 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 7 Oct 2020 03:07:51 +0200
Subject: [PATCH 280/403] TileByteStream: More reference comparison patterns to
 ignore.

Fix test failures in master.
---
 TileCalorimeter/TileSvc/TileByteStream/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/TileCalorimeter/TileSvc/TileByteStream/CMakeLists.txt b/TileCalorimeter/TileSvc/TileByteStream/CMakeLists.txt
index e6b171ee81e8..4b90a794ae06 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/CMakeLists.txt
+++ b/TileCalorimeter/TileSvc/TileByteStream/CMakeLists.txt
@@ -51,7 +51,7 @@ atlas_add_component( TileByteStream
    LINK_LIBRARIES TileByteStreamLib )
 
 
-set( extra_patterns "LArDetectorToolNV|is still valid|no data retrieved|Database being retired|Reading file|Unable to locate catalog|Resolved path|DigitizationFlags|^Domain|created CondCont|no dictionary for class|^ +[+]|Reading LArPedestalMC|IOV callback|^DetectorStore|TileDetectorTool|Creating TileCondProxyFile|Cache alignment|INFO opening|loading cache|start processing|done processing|WARNING ../MuRcvDigitsCnt|WARNING ../MuRcvRawChCnt|TileL2Builder initialization completed|Initializing TileMuRcvContByteStreamTool|filled inputFileSummary from file|Picked valid file|No SimFlags|INFO Initializing" )
+set( extra_patterns "LArDetectorToolNV|is still valid|no data retrieved|Database being retired|Reading file|Unable to locate catalog|Resolved path|DigitizationFlags|^Domain|created CondCont|no dictionary for class|^ +[+]|Reading LArPedestalMC|IOV callback|^DetectorStore|TileDetectorTool|Creating TileCondProxyFile|Cache alignment|INFO opening|loading cache|start processing|done processing|WARNING ../MuRcvDigitsCnt|WARNING ../MuRcvRawChCnt|TileL2Builder initialization completed|Initializing TileMuRcvContByteStreamTool|filled inputFileSummary from file|Picked valid file|No SimFlags|INFO Initializing|IOVDbSvc[0-9 ]+INFO" )
 
 atlas_add_test( TileDigitsContByteStreamCnv_test
    SCRIPT test/TileDigitsContByteStreamCnv_test.sh
-- 
GitLab


From 173b6afdd47100b055ccca702a1e88ce8221fb1a Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 7 Oct 2020 05:14:17 +0200
Subject: [PATCH 281/403] Fix warning

---
 .../src/ByteStreamEventStorageOutputSvc.cxx   | 23 +++++++++++++++----
 .../src/ByteStreamEventStorageOutputSvc.h     |  4 ++--
 2 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx
index b19f9a571fd9..8caa1610c8cd 100644
--- a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx
+++ b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx
@@ -125,7 +125,7 @@ ByteStreamEventStorageOutputSvc::initDataWriter(const EventContext* ctx) {
       : SG::get(m_eventInfoKey, *ctx);
   if (eventInfo == nullptr) ATH_MSG_WARNING("failed to retrieve EventInfo");
 
-  const ByteStreamMetadata* metaData = getByteStreamMetadata(ctx);
+  const ByteStreamMetadata* metaData = ctx == nullptr ? getByteStreamMetadata() : getByteStreamMetadata(*ctx);
   if (metaData == nullptr)
     ATH_MSG_WARNING("failed to retrieve ByteStreamMetaData");
 
@@ -289,12 +289,27 @@ ByteStreamEventStorageOutputSvc::io_reinit() {
 }
 
 
+const ByteStreamMetadata *
+ByteStreamEventStorageOutputSvc::getByteStreamMetadata()
+{
+  SG::ReadHandle<ByteStreamMetadataContainer> metaDataCont (m_byteStreamMetadataKey);
+
+  if (!metaDataCont.isValid()) return nullptr;
+
+  if (metaDataCont->size() > 1)
+    ATH_MSG_WARNING("Multiple run parameters in MetaDataStore. "
+                    "Bytestream format only supports one. Arbitrarily "
+                    "choosing first.");
+
+  return metaDataCont->front();
+}
+
+
 const ByteStreamMetadata *
 ByteStreamEventStorageOutputSvc::getByteStreamMetadata(
-    const EventContext* ctx)
+    const EventContext& ctx)
 {
-  if (!ctx) ctx = &Gaudi::Hive::currentContext();
-  SG::ReadHandle<ByteStreamMetadataContainer> metaDataCont (m_byteStreamMetadataKey, *ctx);
+  SG::ReadHandle<ByteStreamMetadataContainer> metaDataCont (m_byteStreamMetadataKey, ctx);
 
   if (!metaDataCont.isValid()) return nullptr;
 
diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.h b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.h
index cf2bc19a2052..0ee70ae110df 100644
--- a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.h
+++ b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.h
@@ -174,8 +174,8 @@ class ByteStreamEventStorageOutputSvc:
   bool initDataWriter(const EventContext* ctx = nullptr);
   bool initDataWriterContents(
       const xAOD::EventInfo*, const ByteStreamMetadata*);
-  const ByteStreamMetadata * getByteStreamMetadata(
-      const EventContext* ctx = nullptr);
+  const ByteStreamMetadata * getByteStreamMetadata();
+  const ByteStreamMetadata * getByteStreamMetadata(const EventContext& ctx);
 
   struct EventCache {
     inline void releaseEvent() {
-- 
GitLab


From bd820b6225823f87f346afd996f42326b2d92e18 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 7 Oct 2020 03:11:11 +0200
Subject: [PATCH 282/403] TileRecUtils: More reference comparison patterns to
 ignore.

Fix test failures in master.
---
 TileCalorimeter/TileRecUtils/CMakeLists.txt | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/TileCalorimeter/TileRecUtils/CMakeLists.txt b/TileCalorimeter/TileRecUtils/CMakeLists.txt
index 0b4ee0695cc8..cbb9ea23b52a 100644
--- a/TileCalorimeter/TileRecUtils/CMakeLists.txt
+++ b/TileCalorimeter/TileRecUtils/CMakeLists.txt
@@ -66,7 +66,7 @@ atlas_add_dictionary( TileRecUtilsDict
 atlas_add_test( TileCellBuilder_test
   SCRIPT test/TileCellBuilder_test.sh
   PROPERTIES TIMEOUT 600
-  LOG_IGNORE_PATTERN "LArDetectorToolNV|is still valid|no data retrieved|Database being retired|Reading file|Unable to locate catalog|Resolved path|DigitizationFlags|^Domain|created CondCont|no dictionary for class|^ +[+]|Reading LArPedestalMC|IOV callback|^DetectorStore|TileDetectorTool|Creating TileCondProxyFile|Cache alignment|No RecFlags available" )
+  LOG_IGNORE_PATTERN "LArDetectorToolNV|is still valid|no data retrieved|Database being retired|Reading file|Unable to locate catalog|Resolved path|DigitizationFlags|^Domain|created CondCont|no dictionary for class|^ +[+]|Reading LArPedestalMC|IOV callback|^DetectorStore|TileDetectorTool|Creating TileCondProxyFile|Cache alignment|No RecFlags available|IOVDbSvc +INFO" )
 
 
 # The entries 
@@ -76,25 +76,25 @@ atlas_add_test( TileCellBuilder_test
 atlas_add_test( TileCellBuilderFromHit_test
   SCRIPT test/TileCellBuilderFromHit_test.sh
   PROPERTIES TIMEOUT 600
-  LOG_IGNORE_PATTERN "LArDetectorToolNV|is still valid|no data retrieved|Database being retired|Reading file|Unable to locate catalog|Resolved path|DigitizationFlags|^Domain|created CondCont|no dictionary for class|^ +[+]|Reading LArPedestalMC|IOV callback|^DetectorStore|TileDetectorTool|Creating TileCondProxyFile|Cache alignment|IncrementalExecutor::executeFunction|You are probably missing the definition|Maybe you need to load|No RecFlags available" )
+  LOG_IGNORE_PATTERN "LArDetectorToolNV|is still valid|no data retrieved|Database being retired|Reading file|Unable to locate catalog|Resolved path|DigitizationFlags|^Domain|created CondCont|no dictionary for class|^ +[+]|Reading LArPedestalMC|IOV callback|^DetectorStore|TileDetectorTool|Creating TileCondProxyFile|Cache alignment|IncrementalExecutor::executeFunction|You are probably missing the definition|Maybe you need to load|No RecFlags available|IOVDbSvc +INFO" )
 
 
 atlas_add_test( TileRawChannelBuilder_test
   SCRIPT test/TileRawChannelBuilder_test.sh
   PROPERTIES TIMEOUT 600
-  LOG_IGNORE_PATTERN "LArDetectorToolNV|is still valid|no data retrieved|Database being retired|Reading file|Unable to locate catalog|Resolved path|DigitizationFlags|^Domain|created CondCont|no dictionary for class|^ +[+]|Reading LArPedestalMC|IOV callback|^DetectorStore|TileDetectorTool|Creating TileCondProxyFile|Cache alignment|No RecFlags available" )
+  LOG_IGNORE_PATTERN "LArDetectorToolNV|is still valid|no data retrieved|Database being retired|Reading file|Unable to locate catalog|Resolved path|DigitizationFlags|^Domain|created CondCont|no dictionary for class|^ +[+]|Reading LArPedestalMC|IOV callback|^DetectorStore|TileDetectorTool|Creating TileCondProxyFile|Cache alignment|No RecFlags available|IOVDbSvc +INFO" )
 
 
 atlas_add_test( TileDQstatusAlg_test
   SCRIPT test/TileDQstatusAlg_test.sh
   PROPERTIES TIMEOUT 600
-  LOG_IGNORE_PATTERN "LArDetectorToolNV|is still valid|no data retrieved|Database being retired|Reading file|Unable to locate catalog|Resolved path|DigitizationFlags|^Domain|created CondCont|no dictionary for class|^ +[+]|Reading LArPedestalMC|IOV callback|^DetectorStore|TileDetectorTool|Creating TileCondProxyFile|Cache alignment|No RecFlags available" )
+  LOG_IGNORE_PATTERN "LArDetectorToolNV|is still valid|no data retrieved|Database being retired|Reading file|Unable to locate catalog|Resolved path|DigitizationFlags|^Domain|created CondCont|no dictionary for class|^ +[+]|Reading LArPedestalMC|IOV callback|^DetectorStore|TileDetectorTool|Creating TileCondProxyFile|Cache alignment|No RecFlags available|IOVDbSvc +INFO" )
 
 
 atlas_add_test( TileDQstatusTool_test
   SCRIPT test/TileDQstatusTool_test.sh
   PROPERTIES TIMEOUT 600
-  LOG_IGNORE_PATTERN "LArDetectorToolNV|is still valid|no data retrieved|Database being retired|Reading file|Unable to locate catalog|Resolved path|DigitizationFlags|^Domain|created CondCont|no dictionary for class|^ +[+]|Reading LArPedestalMC|IOV callback|^DetectorStore|TileDetectorTool|Creating TileCondProxyFile|Cache alignment|No RecFlags available" )
+  LOG_IGNORE_PATTERN "LArDetectorToolNV|is still valid|no data retrieved|Database being retired|Reading file|Unable to locate catalog|Resolved path|DigitizationFlags|^Domain|created CondCont|no dictionary for class|^ +[+]|Reading LArPedestalMC|IOV callback|^DetectorStore|TileDetectorTool|Creating TileCondProxyFile|Cache alignment|No RecFlags available|IOVDbSvc +INFO" )
 
 # Tests:
 atlas_add_test( TileRawChannelBuilderFitConfig_test
-- 
GitLab


From dc37afbb08ba53b453ff2d4fdf5962eabdccf15a Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 7 Oct 2020 03:02:46 +0200
Subject: [PATCH 283/403] AthenaCommon: Update test reference file.

Fix test failure in master.
---
 Control/AthenaCommon/share/GenerateBootstrapTest.ref | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/Control/AthenaCommon/share/GenerateBootstrapTest.ref b/Control/AthenaCommon/share/GenerateBootstrapTest.ref
index 5b5ae6824a7c..85531f8c0cd6 100644
--- a/Control/AthenaCommon/share/GenerateBootstrapTest.ref
+++ b/Control/AthenaCommon/share/GenerateBootstrapTest.ref
@@ -1,16 +1,14 @@
 Willing to acquire file bootstrap.pkl from
-/afs/cern.ch/work/s/smh/ol_reggie/bld/x86_64-centos7-gcc8-opt/share/bootstrap.pkl
+/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-dbg/x86_64-centos7-gcc8-dbg/share/bootstrap.pkl
 copy bootstrap.pkl
 ... Read 2 items from python pickle file:  bootstrap.pkl
 ... Read 2 items from python pickle file:  bootstrap_test.pkl
-Given list of size 0. Not looking for differences.
 Step 1: reference file #components: 27
 Step 2: file to check  #components: 27
 Willing to acquire file bootstrap_threaded.pkl from
-/afs/cern.ch/work/s/smh/ol_reggie/bld/x86_64-centos7-gcc8-opt/share/bootstrap_threaded.pkl
+/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-dbg/x86_64-centos7-gcc8-dbg/share/bootstrap_threaded.pkl
 copy bootstrap_threaded.pkl
 ... Read 2 items from python pickle file:  bootstrap_threaded.pkl
 ... Read 2 items from python pickle file:  bootstrap_threaded_test.pkl
-Given list of size 0. Not looking for differences.
 Step 1: reference file #components: 33
 Step 2: file to check  #components: 33
-- 
GitLab


From 144782c1204440c0ae835bc3e9c8e48e53b9e2b0 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 7 Oct 2020 03:25:17 +0200
Subject: [PATCH 284/403] InDetConfig: Fix typo.

Fix typo: minPt -> minPT
---
 InnerDetector/InDetConfig/python/TrackingCutsFlags.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/InnerDetector/InDetConfig/python/TrackingCutsFlags.py b/InnerDetector/InDetConfig/python/TrackingCutsFlags.py
index fb4bad8789e6..a98f93709d0b 100644
--- a/InnerDetector/InDetConfig/python/TrackingCutsFlags.py
+++ b/InnerDetector/InDetConfig/python/TrackingCutsFlags.py
@@ -515,7 +515,7 @@ def createLowPtLargeD0TrackingFlags():
 def createLowPtTrackingFlags():
     icf = createTrackingFlags()
     icf.extension        = "LowPt"
-    icf.maxPT = lambda pcf: (1e6  if pcf.InDet.doMinBias else pcf.InDet.Tracking.minPt + 0.3) * Units.GeV
+    icf.maxPT = lambda pcf: (1e6  if pcf.InDet.doMinBias else pcf.InDet.Tracking.minPT + 0.3) * Units.GeV
     icf.minPT            = 0.050 * Units.GeV
     icf.minClusters      = 5
     icf.minSiNotShared   = 4
-- 
GitLab


From d312752cd517cebf18caf247a38ef2c321def4d9 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Sat, 3 Oct 2020 10:26:07 -0400
Subject: [PATCH 285/403] InDetConfig: cmake fix

Missing POST_BUILD_CMD keyword.
---
 InnerDetector/InDetConfig/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/InnerDetector/InDetConfig/CMakeLists.txt b/InnerDetector/InDetConfig/CMakeLists.txt
index b5c9ae719cec..193803d2174d 100644
--- a/InnerDetector/InDetConfig/CMakeLists.txt
+++ b/InnerDetector/InDetConfig/CMakeLists.txt
@@ -6,7 +6,7 @@
 atlas_subdir( InDetConfig )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py ${ATLAS_FLAKE8} )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 #atlas_install_scripts( test/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 #atlas_install_joboptions( share/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 
-- 
GitLab


From 5f00af52b93b0eb648a6e32398c51c4a695ae917 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 6 Oct 2020 03:43:40 +0200
Subject: [PATCH 286/403] DataModelRoot: Add TScopeAdapter::Cast.

Add Cast() method to TScopeAdapter (aka RootType), wrapping DynamicCast.
---
 Control/DataModelRoot/DataModelRoot/RootType.h | 6 ++++++
 Control/DataModelRoot/src/RootType.cxx         | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/Control/DataModelRoot/DataModelRoot/RootType.h b/Control/DataModelRoot/DataModelRoot/RootType.h
index 66de2f305af5..d9e25d7c8484 100644
--- a/Control/DataModelRoot/DataModelRoot/RootType.h
+++ b/Control/DataModelRoot/DataModelRoot/RootType.h
@@ -185,6 +185,12 @@ public:
    TTypeAdapter ToType() const { return *this; }
    TScopeAdapter TypeOf() const { return *this; }
 
+   /// Cast obj of this class type up to baseclass cl if up is true.
+   /// Cast obj of this class type down from baseclass cl if up is false.
+   /// If this class is not a baseclass of cl return 0, else the pointer
+   /// to the cl part of this (up) or to this (down).
+   void* Cast (const TScopeAdapter& cl, void* obj, bool up) const;
+
 // for STL containers
    bool operator==( const TScopeAdapter& rh ) const;
    bool operator!=( const TScopeAdapter& rh ) const {
diff --git a/Control/DataModelRoot/src/RootType.cxx b/Control/DataModelRoot/src/RootType.cxx
index 639a6acbe01c..07c69def8756 100644
--- a/Control/DataModelRoot/src/RootType.cxx
+++ b/Control/DataModelRoot/src/RootType.cxx
@@ -950,6 +950,12 @@ Bool_t TScopeAdapter::IsAbstract() const
    return kFALSE;
 }
 
+//____________________________________________________________________________
+void* TScopeAdapter::Cast (const TScopeAdapter& cl, void* obj, bool up) const
+{
+  return fClass->DynamicCast (cl.Class(), obj, up);
+}
+
 //____________________________________________________________________________
 bool TScopeAdapter::operator==( const TScopeAdapter& rh ) const
 {
-- 
GitLab


From 384bfd08ff13236a2979da2cb77c61c23a121627 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Sun, 4 Oct 2020 18:40:47 -0400
Subject: [PATCH 287/403] AthenaBaseComps: Add AthConstConverter.

Add AthConstConverter, deriving from the Gaudi Converter class,
but with const variants for the conversion methods createObjConst
and createRepConst.

This can be used as a base class for converters that are meant to run
concurrently in MT jobs.

We also include AthMessaging.
---
 .../AthenaBaseComps/AthConstConverter.h       | 75 +++++++++++++++++++
 .../AthenaBaseComps/src/AthConstConverter.cxx | 61 +++++++++++++++
 2 files changed, 136 insertions(+)
 create mode 100644 Control/AthenaBaseComps/AthenaBaseComps/AthConstConverter.h
 create mode 100644 Control/AthenaBaseComps/src/AthConstConverter.cxx

diff --git a/Control/AthenaBaseComps/AthenaBaseComps/AthConstConverter.h b/Control/AthenaBaseComps/AthenaBaseComps/AthConstConverter.h
new file mode 100644
index 000000000000..0dcc82c39427
--- /dev/null
+++ b/Control/AthenaBaseComps/AthenaBaseComps/AthConstConverter.h
@@ -0,0 +1,75 @@
+// This file's extension implies that it's C, but it's really -*- C++ -*-.
+/*
+ * Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file AthenaBaseComps/AthConstConverter.h
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Oct, 2020
+ * @brief Gaudi converter base class with const interfaces.
+ */
+
+
+#ifndef ATHENABASECOMPS_ATHCONSTCONVERTER_H
+#define ATHENABASECOMPS_ATHCONSTCONVERTER_H
+
+
+#include "AthenaBaseComps/AthMessaging.h"
+#include "AthenaBaseComps/AthMsgStreamMacros.h"
+#include "GaudiKernel/Converter.h"
+
+
+/**
+ * @brief Gaudi converter base class with const interfaces.
+ *
+ * This is a version of Gaudi Converter which uses const
+ * @c createRepConst and @c createObjConst methods instead
+ * of @c createObj and @c createRep.  This can be used for converters
+ * that one wants to execute concurrently in MT jobs.
+ *
+ * As a bonus, we also include @c AthMessaging functionality.
+ */
+class AthConstConverter : public Converter, public AthMessaging
+{
+public:
+  AthConstConverter (long storage_type,
+                     const CLID& class_type,
+                     ISvcLocator* svc,
+                     const std::string& name)
+    : Converter (storage_type, class_type, svc),
+      AthMessaging (msgSvc().get(), name),
+      m_name (name)
+  {
+  }
+
+
+  /// Create the transient representation of an object.
+  virtual StatusCode createObjConst( IOpaqueAddress* pAddress,
+                                     DataObject*& refpObject ) const;
+
+  /// Convert the transient object to the requested representation.
+  virtual StatusCode createRepConst( DataObject* pObject,
+                                     IOpaqueAddress*& refpAddress ) const;
+
+
+  /// Create the transient representation of an object.
+  // Non-const version; just calls the const version.
+  virtual StatusCode createObj( IOpaqueAddress* pAddress,
+                                DataObject*& refpObject ) override final;
+
+
+  /// Convert the transient object to the requested representation.
+  // Non-const version; just calls the const version.
+  virtual StatusCode createRep( DataObject* pObject,
+                                IOpaqueAddress*& refpAddress ) override final;
+
+
+  std::string name() const { return m_name; }
+
+
+private:
+  std::string m_name;
+};
+
+
+#endif // not ATHENABASECOMPS_ATHCONSTCONVERTER_H
diff --git a/Control/AthenaBaseComps/src/AthConstConverter.cxx b/Control/AthenaBaseComps/src/AthConstConverter.cxx
new file mode 100644
index 000000000000..2b22a70b6ca4
--- /dev/null
+++ b/Control/AthenaBaseComps/src/AthConstConverter.cxx
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file AthenaBaseComps/AthConstConverter.h
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Oct, 2020
+ * @brief Gaudi converter base class with const interfaces.
+ */
+
+
+#include "AthenaBaseComps/AthConstConverter.h"
+
+
+/**
+ * @brief Create the transient representation of an object.
+ *
+ * The default implementation is a no-op.
+ */
+StatusCode AthConstConverter::createObjConst( IOpaqueAddress* /*pAddress*/,
+                                              DataObject*& /*refpObject*/ ) const
+{
+  return StatusCode::SUCCESS;
+}
+
+
+/**
+ * @brief Convert the transient object to the requested representation.
+ *
+ * The default implementation is a no-op.
+ */
+StatusCode AthConstConverter::createRepConst( DataObject* /*pObject*/,
+                                              IOpaqueAddress*& /*refpAddress*/ ) const
+{
+  return StatusCode::SUCCESS;
+}
+
+
+/**
+ * @brief Create the transient representation of an object.
+ *
+ * Non-const version; just calls the const version.
+ */
+StatusCode AthConstConverter::createObj( IOpaqueAddress* pAddress,
+                                         DataObject*& refpObject )
+{
+  return createObjConst (pAddress, refpObject);
+}
+
+
+/**
+ * @brief Convert the transient object to the requested representation.
+ *
+ * Non-const version; just calls the const version.
+ */
+StatusCode AthConstConverter::createRep( DataObject* pObject,
+                                         IOpaqueAddress*& refpAddress )
+{
+  return createRepConst (pObject, refpAddress);
+}
+
-- 
GitLab


From bd59832d33545f52c8d8435646d175d04a8e87bf Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 6 Oct 2020 02:44:54 +0200
Subject: [PATCH 288/403] xAODCoreAthenaPool: Fixes for writing
 ShallowAuxContainer with variable vetoes.

Vetoing variables from a ShallowAuxContainer had a couple problems.

 - When testing for whether we can do a simple copy, we also need to check
   that there are no variable vetoes.
 - Fix setting of number of elements to be copied in the case of
   variable vetoes but no thinning.
 - When we copy variables, the new container should always be set
   for shallowIO.  All the variables we want to write will be copied
   to the new container.  Any that are in the parent but not the new
   container will have been explicitly vetoed.
---
 .../src/xAODShallowAuxContainerCnv.cxx        | 23 ++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

diff --git a/Event/xAOD/xAODCoreAthenaPool/src/xAODShallowAuxContainerCnv.cxx b/Event/xAOD/xAODCoreAthenaPool/src/xAODShallowAuxContainerCnv.cxx
index 12082d97ac42..640d411f9f4b 100644
--- a/Event/xAOD/xAODCoreAthenaPool/src/xAODShallowAuxContainerCnv.cxx
+++ b/Event/xAOD/xAODCoreAthenaPool/src/xAODShallowAuxContainerCnv.cxx
@@ -22,8 +22,8 @@ xAODShallowAuxContainerCnv::createPersistentWithKey( xAOD::ShallowAuxContainer*
 
 ///Here follows a specialized version of the copyAuxStoreThinned method, with a few changes for shallow aux containers
          const xAOD::ShallowAuxContainer& orig = *trans; //need the 'const' version to ensure use the const methods!
-         size_t nremaining = 0;
          size_t size = orig.size();
+         size_t nremaining = size;
 
          std::string key2 = key;
          if (key2.size() >= 4 && key2.substr (key2.size()-4, 4) == "Aux.")
@@ -37,9 +37,26 @@ xAODShallowAuxContainerCnv::createPersistentWithKey( xAOD::ShallowAuxContainer*
          }
 
          //if there is no thinning to do, then just return a regular copy 
-         if(!dec) return new xAOD::ShallowAuxContainer(orig);
+         // Be sure to also check for variable vetoes.
+         if(!dec) {
+           SG::auxid_set_t ids;
+           if (info) {
+             ids = orig.getSelectedAuxIDs();
+             ids &= info->m_vetoed;
+           }
+           if (ids.empty()) {
+             return new xAOD::ShallowAuxContainer(orig);
+           }
+         }
          xAOD::ShallowAuxContainer* newcont = new xAOD::ShallowAuxContainer; //dont use copy constructor (like copyThinned.h), want it to have it's own internal store
-         newcont->setParent(trans->parent());newcont->setShallowIO(trans->shallowIO());
+         newcont->setParent(trans->parent());
+
+         // newcont should be set for shallow IO regardless of the setting
+         // of the original container.  Below we're going to copy all the
+         // variables that should be written.  Any variables left in the
+         // parent that are not also in newcont are ones that were
+         // explicitly vetoed.
+         newcont->setShallowIO(true);
 
          // Access the auxiliary type registry:
          SG::AuxTypeRegistry& r = SG::AuxTypeRegistry::instance();
-- 
GitLab


From 4d4aeb3ec9cac63bd3f0674f11bfbc1ea68636f5 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 5 Oct 2020 13:34:09 -0400
Subject: [PATCH 289/403] CoolConvUtilities: Fix for root 6.22.

Small update for the new pyroot in root 6.22: std::string is no longer
automatically converted to a python string.
---
 Database/CoolConvUtilities/python/AtlCoolTool.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Database/CoolConvUtilities/python/AtlCoolTool.py b/Database/CoolConvUtilities/python/AtlCoolTool.py
index d30686ef56ce..10558b055c5e 100755
--- a/Database/CoolConvUtilities/python/AtlCoolTool.py
+++ b/Database/CoolConvUtilities/python/AtlCoolTool.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 __future__ import print_function
 
@@ -814,6 +814,7 @@ class AtlCoolTool:
         res.append('Searching under %s for tags referenced by %s' % (node,tag))
         nodelist=self.db.listAllNodes()
         for inode in nodelist:
+            inode = str(inode)
             if (inode[:len(node)]==node):
                 # look only in multiversion folders
                 multi=True
-- 
GitLab


From 7fa0c1b39a5483f18715b3220dc2edc713beb33a Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Thu, 18 Jun 2020 09:37:25 -0400
Subject: [PATCH 290/403] InDetSecVxFinderTool: cmake fixes

Library dependency fixes.
---
 .../InDetSecVxFinderTool/CMakeLists.txt       | 33 ++-----------------
 1 file changed, 2 insertions(+), 31 deletions(-)

diff --git a/InnerDetector/InDetRecTools/InDetSecVxFinderTool/CMakeLists.txt b/InnerDetector/InDetRecTools/InDetSecVxFinderTool/CMakeLists.txt
index 9d4d98545fb6..2c0ff13b1f58 100644
--- a/InnerDetector/InDetRecTools/InDetSecVxFinderTool/CMakeLists.txt
+++ b/InnerDetector/InDetRecTools/InDetSecVxFinderTool/CMakeLists.txt
@@ -6,35 +6,6 @@
 atlas_subdir( InDetSecVxFinderTool )
 
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          DetectorDescription/GeoPrimitives
-                          GaudiKernel
-                          InnerDetector/InDetRecTools/InDetRecToolInterfaces
-                          Tracking/TrkEvent/TrkParameters
-                          Tracking/TrkEvent/TrkParticleBase
-                          Tracking/TrkEvent/TrkTrackLink
-                          PRIVATE
-                          Event/EventPrimitives
-                          Event/xAOD/xAODTracking
-                          Tracking/TrkDetDescr/TrkSurfaces
-                          Tracking/TrkEvent/TrkEventPrimitives
-                          Tracking/TrkEvent/TrkLinks
-                          Tracking/TrkEvent/TrkNeutralParameters
-                          Tracking/TrkEvent/TrkTrack
-                          Tracking/TrkEvent/VxJetVertex
-                          Tracking/TrkEvent/VxSecVertex
-                          Tracking/TrkEvent/VxVertex
-                          Tracking/TrkExtrapolation/TrkExInterfaces
-                          Tracking/TrkTools/TrkToolInterfaces
-                          Tracking/TrkVertexFitter/TrkJetVxFitter
-                          Tracking/TrkVertexFitter/TrkVertexFitterInterfaces
-                          Tracking/TrkVertexFitter/TrkVertexFitters
-                          Tracking/TrkVertexFitter/TrkVertexSeedFinderTools
-                          Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils
-                          Tracking/TrkVertexFitter/TrkVxEdmCnv )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( Eigen )
@@ -48,10 +19,10 @@ atlas_add_library( InDetSecVxFinderToolLib
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                    DEFINITIONS ${CLHEP_DEFINITIONS}
                    LINK_LIBRARIES ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps GeoPrimitives GaudiKernel InDetRecToolInterfaces TrkParameters TrkParticleBase TrkJetVxFitterLib TrkVertexFittersLib TrkVxEdmCnvLib
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} EventPrimitives xAODTracking TrkSurfaces TrkEventPrimitives TrkLinks TrkNeutralParameters TrkTrack VxJetVertex VxSecVertex VxVertex TrkExInterfaces TrkToolInterfaces TrkVertexFitterInterfaces )
+                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} EventPrimitives xAODTracking TrkSurfaces TrkEventPrimitives TrkLinks TrkNeutralParameters TrkTrack VxJetVertex VxSecVertex VxVertex TrkExInterfaces TrkToolInterfaces TrkVertexFitterInterfaces TrkVertexSeedFinderUtilsLib TrkVertexSeedFinderToolsLib )
 
 atlas_add_component( InDetSecVxFinderTool
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps GeoPrimitives GaudiKernel InDetRecToolInterfaces TrkParameters TrkParticleBase EventPrimitives xAODTracking TrkSurfaces TrkEventPrimitives TrkLinks TrkNeutralParameters TrkTrack VxJetVertex VxSecVertex VxVertex TrkExInterfaces TrkToolInterfaces TrkJetVxFitterLib TrkVertexFitterInterfaces TrkVertexFittersLib TrkVxEdmCnvLib InDetSecVxFinderToolLib )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps GeoPrimitives GaudiKernel InDetRecToolInterfaces TrkParameters TrkParticleBase EventPrimitives xAODTracking TrkSurfaces TrkEventPrimitives TrkLinks TrkNeutralParameters TrkTrack VxJetVertex VxSecVertex VxVertex TrkExInterfaces TrkToolInterfaces TrkJetVxFitterLib TrkVertexFitterInterfaces TrkVertexFittersLib TrkVxEdmCnvLib InDetSecVxFinderToolLib TrkVertexSeedFinderToolsLib )
 
-- 
GitLab


From 3f11ccc72d22c6eb3a3b7255cdd63e6451fb9767 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Sat, 11 Jul 2020 19:14:22 +0200
Subject: [PATCH 291/403] InDetTrackSelectorTool: cmake fixes

Library dependency fixes.
---
 .../InDetTrackSelectorTool/CMakeLists.txt     | 27 +------------------
 1 file changed, 1 insertion(+), 26 deletions(-)

diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/CMakeLists.txt b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/CMakeLists.txt
index 10381ef7f69c..a768f3b0d44a 100644
--- a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/CMakeLists.txt
+++ b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/CMakeLists.txt
@@ -5,31 +5,6 @@
 # Declare the package name:
 atlas_subdir( InDetTrackSelectorTool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Event/xAOD/xAODTracking
-                          GaudiKernel
-                          InnerDetector/InDetRecTools/InDetRecToolInterfaces
-                          InnerDetector/InDetConditions/BeamSpotConditionsData
-                          Tracking/TrkEvent/TrkEventPrimitives
-                          Tracking/TrkEvent/TrkParameters
-                          Tracking/TrkTools/TrkToolInterfaces
-                          PRIVATE
-                          Control/AthContainers
-                          DetectorDescription/GeoPrimitives
-                          Event/EventPrimitives
-                          InnerDetector/InDetConditions/TRT_ConditionsServices
-                          InnerDetector/InDetRecEvent/InDetRIO_OnTrack
-                          Tracking/TrkDetDescr/TrkSurfaces
-                          Tracking/TrkEvent/TrkParticleBase
-                          Tracking/TrkEvent/TrkRIO_OnTrack
-                          Tracking/TrkEvent/TrkTrack
-                          Tracking/TrkEvent/TrkTrackSummary
-                          Tracking/TrkEvent/VxVertex
-                          Tracking/TrkExtrapolation/TrkExInterfaces
-                          MagneticField/MagFieldElements
-                          MagneticField/MagFieldConditions )
 
 # External dependencies:
 find_package( CLHEP )
@@ -41,7 +16,7 @@ atlas_add_component( InDetTrackSelectorTool
                      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 TrkEventPrimitives TrkParameters TrkToolInterfaces AthContainers GeoPrimitives EventPrimitives TRT_ConditionsServicesLib InDetRIO_OnTrack TrkSurfaces TrkParticleBase TrkRIO_OnTrack TrkTrack TrkTrackSummary VxVertex TrkExInterfaces MagFieldElements MagFieldConditions )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps xAODTracking GaudiKernel InDetRecToolInterfaces TrkEventPrimitives TrkParameters TrkToolInterfaces AthContainers GeoPrimitives EventPrimitives TRT_ConditionsServicesLib InDetRIO_OnTrack TrkSurfaces TrkParticleBase TrkRIO_OnTrack TrkTrack TrkTrackSummary VxVertex TrkExInterfaces MagFieldElements MagFieldConditions BeamSpotConditionsData )
 
 # Install files from the package:
 atlas_install_headers( InDetTrackSelectorTool )
-- 
GitLab


From 21af5c1e53d617a6d1f78ac4cae77d9393cae3af Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Wed, 7 Oct 2020 06:06:52 +0200
Subject: [PATCH 292/403] vec. And two vector blend / permute

---
 Control/CxxUtils/CxxUtils/vec.h         | 72 ++++++++++++++++++-------
 Control/CxxUtils/test/vec_test_common.h | 33 +++++++++++-
 2 files changed, 84 insertions(+), 21 deletions(-)

diff --git a/Control/CxxUtils/CxxUtils/vec.h b/Control/CxxUtils/CxxUtils/vec.h
index a12dd9eee44f..db70b62758bd 100644
--- a/Control/CxxUtils/CxxUtils/vec.h
+++ b/Control/CxxUtils/CxxUtils/vec.h
@@ -71,8 +71,19 @@
  *                          Mask is a list of integers that specifies the elements
  *                          that should be extracted and returned in src.
  *                          dst[i] = src[mask[i]] where mask[i] is the ith integer
- *                          is the mask.
- *
+ *                          in the mask.
+ *  - @c CxxUtils::vblend<mask> (VEC& dst, const VEC& src1,const VEC& src2)
+ *                          Fills dst with permutation of src1 and src2
+ *                          according to mask.
+ *                          Mask is a list of integers that specifies the elements
+ *                          that should be extracted and returned in src1 and src2.
+ *                          An index i in the interval [0,N) indicates that element number i 
+ *                          from the first input vector should be placed in the
+ *                          corresponding position in the result vector.  
+ *                          An index in the interval [N,2N)
+ *                          indicates that the element number i-N
+ *                          from the second input vector should be placed 
+ *                          in the corresponding position in the result vector.
  *
  * In terms of expected performance it might be  advantageous to
  * use vector types that fit the size of the ISA.
@@ -83,10 +94,6 @@
  *
  * Consider using Function Multiversioning (CxxUtils/features.h)
  * if you really need to target efficiently multiple ISAs.
- *
- * Obviously, one should also consider if the same result can be achieved via
- * the auto-vectorization compiler optimizations 
- * (e.g see vectorize.h for GCC -O2)
  */
 
 #ifndef CXXUTILS_VEC_H
@@ -323,6 +330,7 @@ ivec<T, N> operator|| (const vec_fb<T, N>& a, const vec_fb<T, N>& b)
 
 
 
+
 #if HAVE_VECTOR_SIZE_ATTRIBUTE
 
 /// Define a nice alias for a built-in vectorized type.
@@ -359,7 +367,7 @@ template<class VEC>
 using vec_type_t = typename vec_type<VEC>::type;
 
 /**
- * brief Deduce the type of a mask , type returned by relational operations,
+ * brief Deduce the type of the mask returned by relational operations,
  * for a vectorized type.
  */
 template<class VEC>
@@ -398,8 +406,7 @@ vec_size(const VEC&)
 }
 
 /**
- * brief Copy a scalar to each element of a vectorized type.
- * Similar functionality to _mm_set/_mm_broadcast x86-64 intrinsics.
+ * @brief Copy a scalar to each element of a vectorized type.
  */
 template<typename VEC, typename T>
 inline void
@@ -434,7 +441,7 @@ vload(VEC& dst, vec_type_t<VEC> const* src)
 /*
  * @brief store elements from a vectorized type src to
  * to a memory address dst (C-array).
- * Uses memcpy to avoid alignment issue
+ * Uses memcpy to avoid alignment issues
  */
 template<typename VEC>
 inline void
@@ -444,7 +451,7 @@ vstore(vec_type_t<VEC>* dst, const VEC& src)
 }
 
 /*
- * @brief select/blend function.
+ * @brief select elements based on a mask
  * Fill dst according to
  * dst[i] = mask[i] ? a[i] : b[i]
  */
@@ -499,8 +506,7 @@ vmax(VEC& dst, const VEC& a, const VEC& b)
 }
 
 /*
- * Need for static asserts on argument
- * packs
+ * Helper for static asserts for argument packs
  */
 namespace bool_pack_helper {
 template<bool...>
@@ -508,17 +514,10 @@ struct bool_pack;
 template<bool... bs>
 using all_true = std::is_same<bool_pack<bs..., true>, bool_pack<true, bs...>>;
 }
-
 /**
  * @brief vpermute function.
  * move any element of a vector src
  * into any or multiple position inside dst.
- *
- * We try to wrap both 
- * gcc's __builtin_shuffle
- * and 
- * clang's __builtin_shufflevector
- *
  */
 template<size_t... Indices, typename VEC>
 inline void
@@ -541,6 +540,39 @@ vpermute(VEC& dst, const VEC& src)
 #endif
 }
 
+/**
+ * @brief vblend function.
+ * permutes and blends elements from two vectors
+ * Similar to the permute functions, but with two input vectors.  
+ */
+template<size_t... Indices, typename VEC>
+inline void
+vblend(VEC& dst, const VEC& src1, const VEC& src2)
+{
+  constexpr size_t N = vec_size<VEC>();
+  static_assert((sizeof...(Indices) == N),
+                "Number of indices different than vector size");
+  static_assert(
+    bool_pack_helper::all_true<(Indices >= 0 && Indices < 2 * N)...>::value,
+    "blend indices outside allowed range");
+
+#if !HAVE_VECTOR_SIZE_ATTRIBUTE || WANT_VECTOR_FALLBACK
+  size_t pos{ 0 };;
+  for (size_t i : { Indices... }) {
+    if (i < N) {
+      dst[pos] = src1[i];
+    } else {
+      dst[pos] = src2[i - N];
+    }
+    ++pos;
+  }
+#elif defined(__clang__)
+  dst = __builtin_shufflevector(src1, src2, Indices...);
+#else // gcc
+  dst = __builtin_shuffle(src1, src2, mask_type_t<VEC>{ Indices... });
+#endif
+}
+
 } // namespace CxxUtils
 
 #endif // not CXXUTILS_VEC_H
diff --git a/Control/CxxUtils/test/vec_test_common.h b/Control/CxxUtils/test/vec_test_common.h
index c5872d7eadc7..deb4128c4a20 100644
--- a/Control/CxxUtils/test/vec_test_common.h
+++ b/Control/CxxUtils/test/vec_test_common.h
@@ -4,9 +4,9 @@
 /**
  * @file CxxUtils/test/vec_test_common.h
  * @author scott snyder <snyder@bnl.gov>
+ * @author Christos Anastopoulos 
  * @date Feb, 2020
  * @brief Common part for vec vec_fb unit tests.
- *
  */
 
 #ifndef CXXUTILS_VEC_TEST_COMMON
@@ -378,6 +378,34 @@ test_permute(const VEC& v1)
     assert(v2[i] == v1[(N-1)-i]);
   }
 }
+template<class VEC>
+void
+test_blend(const VEC& v1)
+{
+  // Add 10 to V1 (so as to be different)
+  VEC v2 = v1 + 10;
+  VEC v3;
+  // take the bottom half of v1 and v2 and put them together
+  constexpr size_t N = CxxUtils::vec_size<VEC>();
+  if constexpr (N == 2) {
+    CxxUtils::vblend<0, 2>(v3, v1, v2);
+  } else if constexpr (N == 4) {
+    CxxUtils::vblend<0, 1, 4, 5>(v3, v1, v2);
+  } else if constexpr (N == 8) {
+    CxxUtils::vblend<0, 1, 2, 3, 8, 9, 10, 11>(v3, v1, v2);
+  } else {
+    // N==16
+    CxxUtils::vblend<0, 1, 2, 3, 4, 5, 6, 7, 16, 17, 18, 19, 20, 21, 22, 23>(
+      v3, v1, v2);
+  }
+  for (size_t i = 0; i < N; i++) {
+    if (i < N / 2) {
+      assert(v3[i] == v1[i]);
+    } else {
+      assert(v3[i] == v2[i - N/2]);
+    }
+  }
+}
 
 template<template<class T, size_t N> class VEC>
 void
@@ -409,6 +437,7 @@ testFloat1()
     test_min(VEC<T, N> INITN(N, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5));      \
     test_max(VEC<T, N> INITN(N, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5));      \
     test_permute(VEC<T, N> INITN(N, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5));  \
+    test_blend(VEC<T, N> INITN(N, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5));    \
   } while (0)
 
   TEST_FLOAT(float, 4); // 128 bit wide 4 floats
@@ -457,6 +486,8 @@ testInt1()
       N, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16));              \
     test_permute(VEC<T, N> INITN(                                              \
       N, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16));              \
+    test_blend(VEC<T, N> INITN(                                                \
+      N, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16));              \
     test_int(VEC<T, N> INITN(                                                  \
       N, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16));              \
     test_logops(                                                               \
-- 
GitLab


From 7ee54eac1a5f9ee168638368f3fce609e1672473 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 6 Oct 2020 15:16:39 +0200
Subject: [PATCH 293/403] CaloDetMgrDetDescrCnv: Remove reference to
 StoreGate.h.

Remove reference to obsolete header StoreGate.h.
---
 .../CaloCnv/CaloDetMgrDetDescrCnv/src/CaloMgrDetDescrCnv.cxx    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/src/CaloMgrDetDescrCnv.cxx b/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/src/CaloMgrDetDescrCnv.cxx
index b2e1bc8eebd6..74b59f777ab5 100755
--- a/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/src/CaloMgrDetDescrCnv.cxx
+++ b/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/src/CaloMgrDetDescrCnv.cxx
@@ -8,7 +8,7 @@
 #include "DetDescrCnvSvc/DetDescrConverter.h"
 #include "DetDescrCnvSvc/DetDescrAddress.h"
 #include "GaudiKernel/MsgStream.h"
-#include "StoreGate/StoreGate.h"
+#include "StoreGate/StoreGateSvc.h"
 
 #include "CaloDetDescr/CaloDetDescrManager.h"
 #include "CaloDetDescr/CaloDetectorElements.h"
-- 
GitLab


From 81488556cbebe3c2dc0484e52a40b4e18d2f25e5 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 6 Oct 2020 15:17:54 +0200
Subject: [PATCH 294/403] CaloIdCnv: Remove reference to StoreGate.h.

Remove reference to obsolete header StoreGate.h.
---
 .../CaloCnv/CaloIdCnv/src/CaloCell_IDDetDescrCnv.cxx        | 6 ++----
 .../CaloIdCnv/src/CaloCell_SuperCell_IDDetDescrCnv.cxx      | 6 ++----
 Calorimeter/CaloCnv/CaloIdCnv/src/CaloIdMgrDetDescrCnv.cxx  | 4 ++--
 3 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/Calorimeter/CaloCnv/CaloIdCnv/src/CaloCell_IDDetDescrCnv.cxx b/Calorimeter/CaloCnv/CaloIdCnv/src/CaloCell_IDDetDescrCnv.cxx
index e35c573e2aed..0a511afb5161 100755
--- a/Calorimeter/CaloCnv/CaloIdCnv/src/CaloCell_IDDetDescrCnv.cxx
+++ b/Calorimeter/CaloCnv/CaloIdCnv/src/CaloCell_IDDetDescrCnv.cxx
@@ -1,8 +1,6 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
-
-// $Id$
 /**
  * @file CaloIdCnv/src/CaloCell_IDDetDescrCnv.cxx
  * @author RD Schaffer, F. Ledroit, scott snyder <snyder@bnl.gov>
@@ -12,7 +10,7 @@
 
 
 #include "CaloIdCnv/CaloCell_IDDetDescrCnv.h"
-#include "StoreGate/StoreGate.h" 
+#include "StoreGate/StoreGateSvc.h" 
 #include "CaloIdentifier/CaloID.h"
 #include "CaloIdentifier/CaloCell_ID.h"
 #include "AthenaKernel/errorcheck.h"
diff --git a/Calorimeter/CaloCnv/CaloIdCnv/src/CaloCell_SuperCell_IDDetDescrCnv.cxx b/Calorimeter/CaloCnv/CaloIdCnv/src/CaloCell_SuperCell_IDDetDescrCnv.cxx
index fff01c84d638..55eba9184f60 100755
--- a/Calorimeter/CaloCnv/CaloIdCnv/src/CaloCell_SuperCell_IDDetDescrCnv.cxx
+++ b/Calorimeter/CaloCnv/CaloIdCnv/src/CaloCell_SuperCell_IDDetDescrCnv.cxx
@@ -1,8 +1,6 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
-
-// $Id$
 /**
  * @file CaloIdCnv/src/CaloCell_SuperCell_IDDetDescrCnv.cxx
  * @author scott snyder <snyder@bnl.gov>
@@ -12,7 +10,7 @@
 
 
 #include "CaloIdCnv/CaloCell_SuperCell_IDDetDescrCnv.h"
-#include "StoreGate/StoreGate.h" 
+#include "StoreGate/StoreGateSvc.h" 
 #include "CaloIdentifier/CaloID.h"
 #include "CaloIdentifier/CaloCell_SuperCell_ID.h"
 #include "AthenaKernel/errorcheck.h"
diff --git a/Calorimeter/CaloCnv/CaloIdCnv/src/CaloIdMgrDetDescrCnv.cxx b/Calorimeter/CaloCnv/CaloIdCnv/src/CaloIdMgrDetDescrCnv.cxx
index c16a67a290de..5915ac923ae1 100755
--- a/Calorimeter/CaloCnv/CaloIdCnv/src/CaloIdMgrDetDescrCnv.cxx
+++ b/Calorimeter/CaloCnv/CaloIdCnv/src/CaloIdMgrDetDescrCnv.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
 */
 
 /***************************************************************************
@@ -19,7 +19,7 @@
 #include "DetDescrCnvSvc/DetDescrConverter.h"
 #include "DetDescrCnvSvc/DetDescrAddress.h"
 #include "GaudiKernel/MsgStream.h"
-#include "StoreGate/StoreGate.h"
+#include "StoreGate/StoreGateSvc.h"
 #include "AthenaKernel/errorcheck.h"
 
 // Identifier includes
-- 
GitLab


From 65f1035ac98b1bb143b2ac55ed438f82614bfc85 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 6 Oct 2020 15:19:01 +0200
Subject: [PATCH 295/403] CaloTTDetDescrCnv: Remove reference to StoreGate.h.

Remove reference to obsolete header StoreGate.h.
---
 .../CaloCnv/CaloTTDetDescrCnv/src/CaloTTMgrDetDescrCnv.cxx     | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/Calorimeter/CaloCnv/CaloTTDetDescrCnv/src/CaloTTMgrDetDescrCnv.cxx b/Calorimeter/CaloCnv/CaloTTDetDescrCnv/src/CaloTTMgrDetDescrCnv.cxx
index fb8e446005e7..311574e08faf 100644
--- a/Calorimeter/CaloCnv/CaloTTDetDescrCnv/src/CaloTTMgrDetDescrCnv.cxx
+++ b/Calorimeter/CaloCnv/CaloTTDetDescrCnv/src/CaloTTMgrDetDescrCnv.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,7 +17,6 @@
 #include "DetDescrCnvSvc/DetDescrConverter.h"
 #include "DetDescrCnvSvc/DetDescrAddress.h"
 #include "GaudiKernel/MsgStream.h"
-#include "StoreGate/StoreGate.h" 
 #include "StoreGate/StoreGateSvc.h"
 
 // detdescr includes
-- 
GitLab


From 9c863e4ec89e7671b7487ebc55300bf7b4625075 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 6 Oct 2020 15:21:58 +0200
Subject: [PATCH 296/403] CaloCondBlobAlgs: Remove reference to StoreGate.h.

Remove reference to obsolete header StoreGate.h.
---
 Calorimeter/CaloCondBlobAlgs/src/CaloNoiseDbExample.cxx | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/Calorimeter/CaloCondBlobAlgs/src/CaloNoiseDbExample.cxx b/Calorimeter/CaloCondBlobAlgs/src/CaloNoiseDbExample.cxx
index 89d45720186b..f8c8cd9750e0 100644
--- a/Calorimeter/CaloCondBlobAlgs/src/CaloNoiseDbExample.cxx
+++ b/Calorimeter/CaloCondBlobAlgs/src/CaloNoiseDbExample.cxx
@@ -5,9 +5,6 @@
 #include "CaloCondBlobAlgs/CaloNoiseDbExample.h"
 //#include "CaloInterface/ICaloNoiseTool.h"
 
-//=== Athena includes
-#include "StoreGate/StoreGate.h"
-
 //=== Gaudi includes
 #include "GaudiKernel/MsgStream.h"
 
-- 
GitLab


From 3f3dac4e8448134eb9143e119039340d4d4ce707 Mon Sep 17 00:00:00 2001
From: Goetz Gaycken <goetz.gaycken@cern.ch>
Date: Tue, 6 Oct 2020 12:54:40 +0200
Subject: [PATCH 297/403] Synchronize result of combinedClusterSplitProbName
 with InDetRec_jobOptions.py

Propagate relevant recent changes to InDetRec_jobOptions to combinedClusterSplitProbName.
combinedClusterSplitProbName replicates the logic of InDetRec_jobOptions to determine the name
of the ClusterSplitProbabilityContainer name which was used for the combined InDet tracks.
---
 .../InDetRecExample/python/TrackingCommon.py  | 66 ++++++++++++-------
 1 file changed, 43 insertions(+), 23 deletions(-)

diff --git a/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py b/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py
index 26f6a5b5c483..304d9511d613 100644
--- a/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py
+++ b/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py
@@ -1479,14 +1479,17 @@ def hasSplitProb(key) :
     return False
 
 def combinedClusterSplitProbName() :
-    # precisely mimics the configuration in InDetRec_jobOptions
-    # chaings in InDetRec_jobOptions to the ClusterSplitProbContainer also have to be implemented here
-    # @TODO find a better way to provide the final name of ClusterSplitProbContainer used for the combined InDetTrackParticles
-    ClusterSplitProbContainer=''
-    from AthenaCommon.BeamFlags import jobproperties
-    from InDetRecExample.InDetJobProperties import InDetFlags
+  # precisely mimics the configuration in InDetRec_jobOptions
+  # chaings in InDetRec_jobOptions to the ClusterSplitProbContainer also have to be implemented here
+  # @TODO find a better way to provide the final name of ClusterSplitProbContainer used for the combined InDetTrackParticles
+  from AthenaCommon.BeamFlags import jobproperties
+  from InDetRecExample.InDetJobProperties import InDetFlags
+  CombinedInDetClusterSplitProbContainer = ''
+  ClusterSplitProbContainer=''
+  if InDetFlags.Enabled():
+    from InDetRecExample.ConfiguredNewTrackingCuts import ConfiguredNewTrackingCuts
+    # --- ensure that Calo clustering is running if we run in calo seeded mode 
     if ('InDetNewTrackingCuts' not in dir()):
-      from InDetRecExample.ConfiguredNewTrackingCuts import ConfiguredNewTrackingCuts
       if InDetFlags.doDBMstandalone():
         InDetNewTrackingCuts      = ConfiguredNewTrackingCuts("DBM")
       elif InDetFlags.doVtxLumi():
@@ -1509,22 +1512,27 @@ def combinedClusterSplitProbName() :
         InDetNewTrackingCuts      = ConfiguredNewTrackingCuts("R3LargeD0")
       else:
         InDetNewTrackingCuts      = ConfiguredNewTrackingCuts("Offline")
-
     if InDetFlags.doTrackSegmentsPixel():
       if ('InDetNewTrackingCutsPixel' not in dir()):
         InDetNewTrackingCutsPixel = ConfiguredNewTrackingCuts("Pixel")
       ClusterSplitProbContainer = 'InDetAmbiguityProcessorSplitProb'+InDetNewTrackingCutsPixel.extension()
+      # @TODO CombinedInDetClusterSplitProbContainer = ClusterSplitProbContainer
     if InDetFlags.doTrackSegmentsSCT():
       if ('InDetNewTrackingCutsSCT' not in dir()):
         InDetNewTrackingCutsSCT = ConfiguredNewTrackingCuts("SCT")
       ClusterSplitProbContainer = 'InDetAmbiguityProcessorSplitProb'+InDetNewTrackingCutsSCT.extension()
+      # @TODO CombinedInDetClusterSplitProbContainer = ClusterSplitProbContainer
     if InDetFlags.doTRTPhaseCalculation() and not jobproperties.Beam.beamType()=="collisions" and InDetFlags.doNewTracking():
-      ClusterSplitProbContainer = 'InDetAmbiguityProcessorSplitProb'+InDetNewTrackingCuts.extension()
-    if InDetFlags.doNewTracking() and ( not InDetFlags.doTRTPhaseCalculation() or jobproperties.Beam.beamType()=="collisions"):
-      ClusterSplitProbContainer = 'InDetAmbiguityProcessorSplitProb'+InDetNewTrackingCuts.extension()
+        ClusterSplitProbContainer = 'InDetAmbiguityProcessorSplitProb'+InDetNewTrackingCuts.extension()
+        CombinedInDetClusterSplitProbContainer = ClusterSplitProbContainer
+    if InDetFlags.doNewTracking() and (not InDetFlags.doTRTPhaseCalculation() or jobproperties.Beam.beamType()=="collisions"):
+        ClusterSplitProbContainer = 'InDetAmbiguityProcessorSplitProb'+InDetNewTrackingCuts.extension()
+        CombinedInDetClusterSplitProbContainer = ClusterSplitProbContainer
     if InDetFlags.doBackTracking():
       ClusterSplitProbContainer = 'InDetTRT_SeededAmbiguityProcessorSplitProb'+InDetNewTrackingCuts.extension()
-    if (InDetFlags.doLargeD0() or InDetFlags.doR3LargeD0() or InDetFlags.doLowPtLargeD0() ) and  InDetFlags.doDVRetracking():
+      CombinedInDetClusterSplitProbContainer = ClusterSplitProbContainer
+    ClusterSplitProbContainerLargeD0=''
+    if InDetFlags.doLargeD0() or InDetFlags.doR3LargeD0() or InDetFlags.doLowPtLargeD0():
       if ('InDetNewTrackingCutsLargeD0' not in dir()):
         if InDetFlags.doLowPtLargeD0():
           InDetNewTrackingCutsLargeD0 = ConfiguredNewTrackingCuts("LowPtLargeD0")
@@ -1532,40 +1540,52 @@ def combinedClusterSplitProbName() :
           InDetNewTrackingCutsLargeD0 = ConfiguredNewTrackingCuts("R3LargeD0")
         else:
           InDetNewTrackingCutsLargeD0 = ConfiguredNewTrackingCuts("LargeD0")
-      ClusterSplitProbContainer = 'InDetAmbiguityProcessorSplitProb'+InDetNewTrackingCutsLargeD0.extension()
+      ClusterSplitProbContainerLargeD0 = 'InDetAmbiguityProcessorSplitProb'+InDetNewTrackingCutsLargeD0.extension()
+      if not InDetFlags.storeSeparateLargeD0Container():
+        ClusterSplitProbContainer = ClusterSplitProbContainerLargeD0
+        CombinedInDetClusterSplitProbContainer = ClusterSplitProbContainerLargeD0
     if InDetFlags.doLowPt():
       if ('InDetNewTrackingCutsLowPt' not in dir()):
         InDetNewTrackingCutsLowPt = ConfiguredNewTrackingCuts("LowPt")
       ClusterSplitProbContainer = 'InDetAmbiguityProcessorSplitProb'+InDetNewTrackingCutsLowPt.extension()
+      CombinedInDetClusterSplitProbContainer = ClusterSplitProbContainer
     if InDetFlags.doVeryLowPt():
       if ('InDetNewTrackingCutsVeryLowPt' not in dir()):
         InDetNewTrackingCutsVeryLowPt = ConfiguredNewTrackingCuts("VeryLowPt")
       ClusterSplitProbContainer = 'InDetAmbiguityProcessorSplitProb'+InDetNewTrackingCutsVeryLowPt.extension()
+      CombinedInDetClusterSplitProbContainer = ClusterSplitProbContainer
+    if InDetFlags.doTRTStandalone():
+      CombinedInDetClusterSplitProbContainer = ClusterSplitProbContainer
     if InDetFlags.doForwardTracks() and InDetFlags.doSLHC():
       if InDetFlags.doSLHCVeryForward():
        if ('InDetNewTrackingCutsForwardTracks' not in dir()):
-         from InDetRecExample.ConfiguredNewTrackingCuts import ConfiguredNewTrackingCuts
          InDetNewTrackingCutsForwardTracks = ConfiguredNewTrackingCuts("VeryForwardSLHCTracks")
          ClusterSplitProbContainer = 'InDetAmbiguityProcessorSplitProb'+InDetNewTrackingCutsForwardTracks.extension()
+         CombinedInDetClusterSplitProbContainer = ClusterSplitProbContainer
       else:
        if ('InDetNewTrackingCutsForwardTracks' not in dir()):
-        from InDetRecExample.ConfiguredNewTrackingCuts import ConfiguredNewTrackingCuts
         InDetNewTrackingCutsForwardTracks = ConfiguredNewTrackingCuts("ForwardSLHCTracks")
         ClusterSplitProbContainer = 'InDetAmbiguityProcessorSplitProb'+InDetNewTrackingCutsForwardTracks.extension()
+        CombinedInDetClusterSplitProbContainer = ClusterSplitProbContainer
     if InDetFlags.doSLHCConversionFinding() and InDetFlags.doSLHC():
       if ('InDetNewTrackingCutsSLHCConversionFinding' not in dir()):
-        from InDetRecExample.ConfiguredNewTrackingCuts import ConfiguredNewTrackingCuts
         InDetNewTrackingCutsSLHCConversionFinding = ConfiguredNewTrackingCuts("SLHCConversionFinding")
-      ClusterSplitProbContainer = 'InDetAmbiguityProcessorSplitProb'+InDetNewTrackingCutsForwardTracks.extension()
-    if InDetFlags.doBeamGas() and jobproperties.Beam.beamType() == "singlebeam":
+      ClusterSplitProbContainer = 'InDetAmbiguityProcessorSplitProb'+InDetNewTrackingCutsSLHCConversionFinding.extension()
+      CombinedInDetClusterSplitProbContainer = ClusterSplitProbContainer
+    if InDetFlags.doBeamGas():
       if ('InDetNewTrackingCutsBeamGas' not in dir()):
-        from InDetRecExample.ConfiguredNewTrackingCuts import ConfiguredNewTrackingCuts
         InDetNewTrackingCutsBeamGas = ConfiguredNewTrackingCuts("BeamGas")
       ClusterSplitProbContainer = 'InDetAmbiguityProcessorSplitProb'+InDetNewTrackingCutsBeamGas.extension()
-    if InDetFlags.doCosmics() and InDetFlags.doNewTracking() :
-      ClusterSplitProbContainer = '' # @TODO correct  ?
-
-    return ClusterSplitProbContainer if hasSplitProb(ClusterSplitProbContainer) else ''
+      if jobproperties.Beam.beamType() == "singlebeam":
+        CombinedInDetClusterSplitProbContainer = ClusterSplitProbContainer
+    if InDetFlags.doCosmics() and InDetFlags.doNewTracking() : # @TODO should also consider: and len(InputCombinedInDetTracks) > 1:
+      CombinedInDetClusterSplitProbContainer = ''  # @TODO really no split prob container ?
+    if InDetFlags.doNewTrackingPattern() or InDetFlags.doBeamHalo():
+      if InDetFlags.useExistingTracksAsInput():
+          pass # CombinedInDetClusterSplitProbContainer = ClusterSplitProbContainer # @TODO handle cluster splitting probability ?
+      if InDetFlags.doDBMstandalone():
+          CombinedInDetClusterSplitProbContainer=''
+  return CombinedInDetClusterSplitProbContainer if hasSplitProb(CombinedInDetClusterSplitProbContainer) else ''
 
 def pixelClusterSplitProbName() :
     ClusterSplitProbContainer=combinedClusterSplitProbName()
-- 
GitLab


From ad990145b0291ddecfc84fc1497e76a7dc0bd7db Mon Sep 17 00:00:00 2001
From: Goetz Gaycken <goetz.gaycken@cern.ch>
Date: Tue, 6 Oct 2020 19:17:03 +0200
Subject: [PATCH 298/403] Detect whether a cluster split prob map might be
 available by scanning all properties.

---
 .../InDetRecExample/python/TrackingCommon.py  | 39 +++++++++++++------
 1 file changed, 27 insertions(+), 12 deletions(-)

diff --git a/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py b/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py
index 304d9511d613..9e51a95f7036 100644
--- a/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py
+++ b/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py
@@ -1460,27 +1460,43 @@ def getSolenoidalIntersector(name="SolenoidalIntersector", **kwargs) :
     from TrkExSolenoidalIntersector.TrkExSolenoidalIntersectorConf import Trk__SolenoidalIntersector
     return Trk__SolenoidalIntersector(the_name, **setDefaults(kwargs, SolenoidParameterizationKey = 'SolenoidParametrization'))
 
-def hasSplitProb(key) :
-    # @TODO find better solution,
-    import re
-    pat=re.compile('.*Dense.*')
-    from AthenaCommon.AppMgr import ToolSvc
-    for a_tool in ToolSvc.getChildren() :
-        if pat.match( a_tool.getFullName() ) != None :
-            print ('DEBUG split prob probabily set by %s' % a_tool.getFullName() )
-            return True
+def searchProb(prob_val) :
+    def iterateComp() :
+       from AthenaCommon.AppMgr import ToolSvc
+       from AthenaCommon.Configurable import ConfigurableAlgTool
+
+       for a_tool in ToolSvc.getChildren() :
+           yield a_tool
+       from AthenaCommon.AlgSequence import AlgSequence
+       topSequence = AlgSequence()
+       for an_alg in topSequence.getChildren() :
+           yield an_alg
+           for name,prop in an_alg.getProperties().items() :
+               if isinstance(prop,ConfigurableAlgTool) and not prop.isInToolSvc() :
+                   yield prop
+
+    for a_comp in iterateComp() :
+        for name,prop in a_comp.getProperties().items() :
+            if isinstance(prop ,str) and prop == prob_val :
+                return True
+    return False
 
+def hasSplitProb(key) :
+    # @TODO find better solution than searching through a huge number of properties
     from RecExConfig.AutoConfiguration import IsInInputFile
     if IsInInputFile('Trk::ClusterSplitProbabilityContainer',key) :
-        print ('DEBUG split prob  %s in inputfile ' % key )
         return True
 
-    print ('DEBUG split prob is not set.' )
+    if searchProb(key) :
+        return True
     return False
 
 def combinedClusterSplitProbName() :
   # precisely mimics the configuration in InDetRec_jobOptions
   # chaings in InDetRec_jobOptions to the ClusterSplitProbContainer also have to be implemented here
+  # To synchronise with InDetRec_jobOptions the logic can be extracted with
+  # grep "CombinedInDetClusterSplitProbContainer\|ClusterSplitProbContainer\|[[:space:]]\(el\|\)if\([[:space:]]\|(\)\|[[:space:]]else[[:space:]]*:\|ConfiguredNewTrackingCuts" 
+  #    InnerDetector/InDetExample/InDetRecExample/share/InDetRec_jobOptions.py
   # @TODO find a better way to provide the final name of ClusterSplitProbContainer used for the combined InDetTrackParticles
   from AthenaCommon.BeamFlags import jobproperties
   from InDetRecExample.InDetJobProperties import InDetFlags
@@ -1488,7 +1504,6 @@ def combinedClusterSplitProbName() :
   ClusterSplitProbContainer=''
   if InDetFlags.Enabled():
     from InDetRecExample.ConfiguredNewTrackingCuts import ConfiguredNewTrackingCuts
-    # --- ensure that Calo clustering is running if we run in calo seeded mode 
     if ('InDetNewTrackingCuts' not in dir()):
       if InDetFlags.doDBMstandalone():
         InDetNewTrackingCuts      = ConfiguredNewTrackingCuts("DBM")
-- 
GitLab


From 42089a79e39527008bac1573ff483cc5391038dd Mon Sep 17 00:00:00 2001
From: Ivan Sayago Galvan <ivan.sayago.galvan@cern.ch>
Date: Wed, 7 Oct 2020 08:56:04 +0000
Subject: [PATCH 299/403] Update
 TileCalorimeter/TileMonitoring/src/TileTMDBDigitsMonitorAlgorithm.cxx

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

diff --git a/TileCalorimeter/TileMonitoring/src/TileTMDBDigitsMonitorAlgorithm.cxx b/TileCalorimeter/TileMonitoring/src/TileTMDBDigitsMonitorAlgorithm.cxx
index 782ce2670d1a..26ce59a572b4 100644
--- a/TileCalorimeter/TileMonitoring/src/TileTMDBDigitsMonitorAlgorithm.cxx
+++ b/TileCalorimeter/TileMonitoring/src/TileTMDBDigitsMonitorAlgorithm.cxx
@@ -27,7 +27,7 @@ StatusCode TileTMDBDigitsMonitorAlgorithm::initialize() {
 
   ATH_CHECK( AthMonitorAlgorithm::initialize() );
 
-  ATH_MSG_INFO("in initialize()");
+  ATH_MSG_DEBUG("in initialize()");
 
   ATH_CHECK( detStore()->retrieve(m_tileHWID) );
 
-- 
GitLab


From f0013c80e7c26a0d5cd5eb84b4de9a03b57b0fe6 Mon Sep 17 00:00:00 2001
From: Susumu Oda <Susumu.Oda@cern.ch>
Date: Wed, 7 Oct 2020 18:35:08 +0900
Subject: [PATCH 300/403] Update Doxygen documentation of SCT_Monitoring
 package (ATLASRECTS-5238)

---
 .../SCT_Monitoring/doc/packagedoc.h           | 103 ++++++++++--------
 1 file changed, 55 insertions(+), 48 deletions(-)

diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/doc/packagedoc.h b/InnerDetector/InDetMonitoring/SCT_Monitoring/doc/packagedoc.h
index d78de4c4f6f1..42a92f246308 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/doc/packagedoc.h
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/doc/packagedoc.h
@@ -1,59 +1,66 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
 @page SCT_Monitoring_page SCT_MonitoringPackage
-@author Martin White, Helen Hayward, Shaun Roe
+@author Martin White, Helen Hayward, Shaun Roe, Susumu.Oda@cern.ch
 
  
 @section SCT_Monitoring_SCT_MonitoringIntro Introduction
-This package does data monitoring at the event filter level, providing a tool which can give occupancies and efficiencies for the SCT detector.
-The histograms are published and may be used in the Online Histogram Presenter (OHP).
+This package does data monitoring providing algorithms and tools which can give bytestream errors, efficiencies, noises, occupancies, Lorentz angles, tracking quantities for the SCT detector for both online and offline.
+The histograms are published and used in the Online Histogram Presenter (OHP).
  
 @section SCT_Monitoring_SCT_MonitoringOverview Class Overview
-All of the classes used directly for monitoring inherit directly from the ManagedMonitorToolBase to enable histogram registration and use in the Online Presenter.
-Some of the classes in this package are only intended to be compiled when integrating into the online environment, look out for the 'ifdef ONLINE' preprocessor directive.
-
-Here are the active Monitoring Tools:
-
-   - SCTTracksMonTool
-   
-   - SCTHitEffMonTool
-   
-   - SCTHitsNoiseMonTool
-   
-   - SCTErrMonTool
-   
-   - SCTInitialiseTool
-   
-   - SCTHitEfficiencyTool
-   
-   - SCTEffMonTool
-   
-The following are only used in the online environment:
-   - SCTListener
-   
-   - Martin.hh (automatically generated for online code integration)
-   
-The following are utility classes used in the package:
-   - FSCTtoolbox
-   
-   - PairBuilder : Builds all possible pairs of given sets of values for x and y, used for correlation plotting
-   
-The following <i>may</i> be used in other classes but should probably be deprecated:
-   - SCT_ModuleStatistics
-   - SCT_PlanePosition
-   - SCT_ClusterStruct
-   - SCT_StatisticsData
-
-These should definitely be deprecated and removed as soon as possible:
-   - StatusCodeAction
-   - SCT2004MonTool
-   - SCTCosmicHisto
-   - SCTCosmicMonTool
-   - ParsedSCT_RDO
-   - SCTHistoTest
-   
- 
+In the new data quality motitoring framework for Run 3, algorithms inherited directly from AthMonitorAlgorithm are used.
+
+In the old data quality monitoring framework up to Run 2, tools inherited directly from ManagedMonitorToolBase are used.
+Tools will be removed at some point.
+
+Here are the active monitoring algorithms / tools:
+
+   - SCTErrMonAlg / SCTErrMonTool : bytestream errors
+   - SCTHitEffMonAlg / SCTHitEffMonTool : efficiencies
+   - SCTHitsNoiseMonAlg / SCTHitsNoiseMonTool : noises, occupancies
+   - SCTLorentzMonAlg / SCTLorentzMonTool : Lorentz angles
+   - SCTTracksMonAlg / SCTTracksMonTool : tracking quantities
+
+@section SCT_Monitoring_SCT_MonitoringConfiguration Configuration
+@subsection SCT_Monitoring_SCT_MonitoringConfigurationNewNew Configuration in the new DQ framework and the new job configuration framework
+
+InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTMonitoringConfig.py is the main configuration script.
+Only SCTLorentzMonAlg and SCTTracksMonAlg are configured in the script using SCTLorentzMonAlg.py and SCTTracksMonAlg.py because the Inner Dector configuration is not fully ready in the new job configuration framework as of October, 2020.
+
+When the Reco_tf.py command is used, the chain is the following:
+- Reconstruction/RecJobTransforms/scripts/Reco_tf.py
+- Reconstruction/RecJobTransforms/share/skeleton.RAWtoESD_tf.py / Reconstruction/RecJobTransforms/share/skeleton.RAWtoALL_tf.py
+- Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
+- Control/AthenaMonitoring/share/DataQualitySteering_jobOptions.py
+- Control/AthenaMonitoring/python/AthenaMonitoringCfg.py
+- InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTMonitoringConfig.py
+
+Individual algorithms can be run using the configuration scripts like:
+
+\verbatim
+python -m SCT_Monitoring.SCTLorentzMonAlg
+\endverbatim
+
+@subsection SCT_Monitoring_SCT_MonitoringConfigurationNewOld Configuration in the new DQ framework and the old job configuration framework
+
+InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringSCT.py is the main configuration script.
+To use the new DQ framework, the useNewAlgs flag in the script has to be set True.
+The default value is True.
+
+When the Reco_tf.py command is used, the chain is the same as above up to DataQualitySteering_jobOptions.py. The following chain is:
+- Control/AthenaMonitoring/share/DataQualitySteering_jobOptions.py
+- InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoring.py
+- InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringSCT.py
+
+@subsection SCT_Monitoring_SCT_MonitoringConfigurationOldOld Configuration in the old DQ framework and the old job configuration framework
+
+InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringSCT.py is the main configuration script too.
+To use the new DQ framework, the useNewAlgs flag in the script has to be set False.
+The default value is True.
+The chain is the same as above.
+
  */
-- 
GitLab


From 00fbf2a530bc25cbc9b87f7ab0ab5345ad38a1e9 Mon Sep 17 00:00:00 2001
From: Mark Hodgkinson <mhodgkin@aiatlas025.cern.ch>
Date: Wed, 7 Oct 2020 12:48:37 +0200
Subject: [PATCH 301/403] Add two new tests to run the physics validation code
 in two configurations, using AOD from the latest MC setup.

---
 .../test/test_mcLatest_13TeV_PhysValAll.sh        | 15 +++++++++++++++
 .../test/test_mcLatest_13TeV_PhysValExample.sh    | 15 +++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100755 Reconstruction/RecExample/RecJobTransformTests/test/test_mcLatest_13TeV_PhysValAll.sh
 create mode 100755 Reconstruction/RecExample/RecJobTransformTests/test/test_mcLatest_13TeV_PhysValExample.sh

diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_mcLatest_13TeV_PhysValAll.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_mcLatest_13TeV_PhysValAll.sh
new file mode 100755
index 000000000000..53937603459d
--- /dev/null
+++ b/Reconstruction/RecExample/RecJobTransformTests/test/test_mcLatest_13TeV_PhysValAll.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# art-description: Run PhysicaValidation code from all domains. Uses AOD produced from test_mcLatest_13teV.sh on 7 October 2020.
+# art-output: log.*
+# art-athena-mt: 4
+# art-type: grid
+# art-include: master/Athena
+
+export TRF_ECHO=True;
+Reco_tf.py --inputAODFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/mcLatest/mcLatest_13TeV_AOD.pool.root --outputNTUP_PHYSVALFile physval.root  --validationFlags 'doExample,doMET,doPFlow,doTau,doEgamma,doBtag,doZee,doJet,doTopoCluster,doMuon,doTrigMinBias,doTrigIDtrk,doTrigBphys,doTrigMET,doTrigJet,doTrigTau, doTrigEgamma,doTrigMuon,doTrigBjet,doTrigHLTResult'
+RES=$?
+echo "art-result: $RES Reco"
+if [ $RES -ne 0 ];then
+return $RES
+fi
diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_mcLatest_13TeV_PhysValExample.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_mcLatest_13TeV_PhysValExample.sh
new file mode 100755
index 000000000000..f86865001e68
--- /dev/null
+++ b/Reconstruction/RecExample/RecJobTransformTests/test/test_mcLatest_13TeV_PhysValExample.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# art-description: Run PhysicaValidation Example code. Uses AOD produced from test_mcLatest_13teV.sh on 7 October 2020.
+# art-output: log.*
+# art-athena-mt: 4
+# art-type: grid
+# art-include: master/Athena
+
+export TRF_ECHO=True;
+Reco_tf.py --inputAODFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/mcLatest/mcLatest_13TeV_AOD.pool.root --outputNTUP_PHYSVALFile physval.root  --validationFlags doExample
+RES=$?
+echo "art-result: $RES Reco"
+if [ $RES -ne 0 ];then
+return $RES
+fi
-- 
GitLab


From 89d244aad280886c5c5bd372edcf9b5e6eaa84aa Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Wed, 7 Oct 2020 12:10:21 +0200
Subject: [PATCH 302/403] LArCalibUtils: cmake cleanup, enable flake8

---
 LArCalorimeter/LArCalibUtils/CMakeLists.txt   | 40 +++----------------
 .../python/GetCoolChannelSelection.py         |  6 +--
 2 files changed, 7 insertions(+), 39 deletions(-)

diff --git a/LArCalorimeter/LArCalibUtils/CMakeLists.txt b/LArCalorimeter/LArCalibUtils/CMakeLists.txt
index 459654c622a3..a3af10ba9ce3 100644
--- a/LArCalorimeter/LArCalibUtils/CMakeLists.txt
+++ b/LArCalorimeter/LArCalibUtils/CMakeLists.txt
@@ -1,42 +1,14 @@
-################################################################################
-# Package: LArCalibUtils
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArCalibUtils )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          LArCalorimeter/LArElecCalib
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRawConditions
-                          LArCalorimeter/LArRawEvent
-                          LArCalorimeter/LArRawUtils
-                          LArCalorimeter/LArRecConditions
-                          LArCalorimeter/LArRecUtils
-                          LArCalorimeter/LArCabling
-                          TestBeam/TBEvent
-                          PRIVATE
-                          Calorimeter/CaloDetDescr
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Event/xAOD/xAODEventInfo
-                          LArCalorimeter/LArBadChannelTool
-                          LArCalorimeter/LArCOOLConditions
-                          LArCalorimeter/LArSimEvent
-                          Trigger/TrigAnalysis/TrigAnalysisInterfaces )
-
 # External dependencies:
 find_package( CLHEP )
-find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
+find_package( CORAL COMPONENTS CoralBase )
 find_package( Eigen )
 find_package( GSL )
-find_package( ROOT COMPONENTS Minuit Core Tree MathCore Hist RIO pthread MathMore Minuit2 Matrix Physics HistPainter Rint Graf Graf3d Gpad Html Postscript Gui GX11TTF GX11 )
+find_package( ROOT COMPONENTS Minuit Core Tree MathCore Hist RIO Graf )
 find_package( TBB )
 
 # Component(s) in the package:
@@ -44,9 +16,7 @@ atlas_add_component( LArCalibUtils
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${GSL_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${TBB_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${GSL_LIBRARIES} ${CORAL_LIBRARIES} ${EIGEN_LIBRARIES} ${TBB_LIBRARIES} ${CLHEP_LIBRARIES} CaloIdentifier AthenaBaseComps AthenaKernel StoreGateLib SGtests Identifier GaudiKernel LArIdentifier LArRawConditions LArRawEvent LArRawUtilsLib LArRecConditions LArRecUtilsLib LArCablingLib TBEvent CaloDetDescrLib AthenaPoolUtilities xAODEventInfo LArBadChannelToolLib LArCOOLConditions LArSimEvent TrigAnalysisInterfaces )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${GSL_LIBRARIES} ${CORAL_LIBRARIES} ${EIGEN_LIBRARIES} ${TBB_LIBRARIES} ${CLHEP_LIBRARIES} CaloIdentifier AthContainers AthenaBaseComps AthenaKernel StoreGateLib Identifier GaudiKernel LArElecCalib LArIdentifier LArRawConditions LArRawEvent LArRawUtilsLib LArRecConditions LArRecUtilsLib LArCablingLib TBEvent CaloDetDescrLib AthenaPoolUtilities xAODEventInfo LArBadChannelToolLib LArCOOLConditions LArSimEvent TrigAnalysisInterfaces )
 
 # Install files from the package:
-atlas_install_headers( LArCalibUtils )
-atlas_install_python_modules( python/*.py )
-
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/LArCalorimeter/LArCalibUtils/python/GetCoolChannelSelection.py b/LArCalorimeter/LArCalibUtils/python/GetCoolChannelSelection.py
index 164c5e480d9e..30a31fb6c9d3 100644
--- a/LArCalorimeter/LArCalibUtils/python/GetCoolChannelSelection.py
+++ b/LArCalorimeter/LArCalibUtils/python/GetCoolChannelSelection.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 __future__ import print_function
 
 
@@ -6,8 +6,6 @@ def GetCoolChannelSelection(partition, gain, withPS):
     if (gain<0 or gain>3):
         print ("ERROR Gain out of range: ", gain)
         return ""
-    AccList=[]
-    PSList=[]
     if (gain==0):
         g=0
     elif (gain==1): #Medium
@@ -17,7 +15,7 @@ def GetCoolChannelSelection(partition, gain, withPS):
     else:
         print("ERROR Gain out of range: ", gain)
         return ""
-    retString=""
+    retstring=""
     if (partition=="EMBA"):
         retstring="%i:%i"%(g+35,g+66)
         if (withPS):
-- 
GitLab


From eedfbb5bc91bd076e208f46cbf02a49226f9c47b Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Wed, 7 Oct 2020 12:23:03 +0200
Subject: [PATCH 303/403] LArCellRec: cmake cleanup, enable flake8

---
 LArCalorimeter/LArCellRec/CMakeLists.txt      | 53 +++----------------
 .../python/LArCellDeadOTXCorrToolDefault.py   | 10 ++--
 .../LArCellRec/python/LArCellHVCorrDefault.py |  8 ++-
 .../python/LArCollisionTimeGetter.py          |  5 +-
 .../python/LArNoisyROSummaryGetter.py         |  4 +-
 5 files changed, 19 insertions(+), 61 deletions(-)

diff --git a/LArCalorimeter/LArCellRec/CMakeLists.txt b/LArCalorimeter/LArCellRec/CMakeLists.txt
index 669544d781c6..effea2099f2f 100644
--- a/LArCalorimeter/LArCellRec/CMakeLists.txt
+++ b/LArCalorimeter/LArCellRec/CMakeLists.txt
@@ -1,46 +1,8 @@
-################################################################################
-# Package: LArCellRec
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArCellRec )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloConditions
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloEvent
-                          Calorimeter/CaloIdentifier
-                          Calorimeter/CaloInterface
-                          Calorimeter/CaloRec
-                          Calorimeter/CaloUtils
-                          Control/AthAllocators
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/StoreGate
-			  Control/CxxUtils
-                          DetectorDescription/AtlasDetDescr
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          LArCalorimeter/LArElecCalib
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRawEvent
-                          LArCalorimeter/LArRecConditions
-                          LArCalorimeter/LArCOOLConditions
-                          LArCalorimeter/LArSimEvent
-                          Event/xAOD/xAODTrigL1Calo
-                          PRIVATE
-                          Calorimeter/CaloTriggerTool
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Event/xAOD/xAODEventInfo
-                          Generators/GeneratorObjects
-                          LArCalorimeter/LArRecEvent
-                          LArCalorimeter/LArCabling
-                          LArCalorimeter/LArCOOLConditions
-                          Trigger/TrigT1/TrigT1CaloCalibConditions
-                          Trigger/TrigT1/TrigT1CaloCondSvc 
-                          Generators/AtlasHepMC )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
@@ -51,25 +13,22 @@ atlas_add_component( LArCellRec
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}  ${TBB_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib ${TBB_LIBRARIES} CaloConditions CaloDetDescrLib CaloEvent CaloIdentifier 
-		     CaloRecLib CaloUtilsLib AthAllocators AthenaBaseComps AthenaKernel StoreGateLib CxxUtils SGtests AtlasDetDescr Identifier GaudiKernel LArIdentifier 
-		     LArRawEvent LArRecConditions LArCOOLConditions LArSimEvent CaloTriggerToolLib AthenaPoolUtilities xAODEventInfo xAODTrigL1Calo GeneratorObjects 
-		     LArRecEvent LArCablingLib TrigT1CaloCalibConditions TrigT1CaloCondSvcLib )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${TBB_LIBRARIES} CaloConditions CaloDetDescrLib CaloEvent CaloIdentifier CaloInterfaceLib
+		             CaloUtilsLib AthAllocators AthenaBaseComps AthenaKernel StoreGateLib CxxUtils Identifier GaudiKernel LArIdentifier
+		             LArRawEvent LArRecConditions CaloTriggerToolLib AthenaPoolUtilities xAODEventInfo xAODTrigL1Calo
+		             LArRecEvent LArCablingLib LArElecCalib TrigT1CaloCalibConditions TrigT1CaloCondSvcLib )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py )
 
-
 #atlas_add_test( LArBadFebMaskingTool_test
 #  SCRIPT test/LArBadFebMaskingTool_test.sh
 #  PROPERTIES TIMEOUT 600
 #  LOG_IGNORE_PATTERN "LArDetectorToolNV|is still valid|no data retrieved|Database being retired|Reading file|Unable to locate catalog|Resolved path|DigitizationFlags|^Domain|created CondCont|no dictionary for class|^ +[+]|Reading LArPedestalMC|IOV callback|^DetectorStore|Cache alignment" )
 
-
 atlas_add_test( LArCellDeadOTXCorr_test
   SCRIPT test/LArCellDeadOTXCorr_test.sh
   PROPERTIES TIMEOUT 600
   LOG_IGNORE_PATTERN "LArDetectorToolNV|is still valid|no data retrieved|Database being retired|Reading file|Unable to locate catalog|Resolved path|DigitizationFlags|^Domain|created CondCont|no dictionary for class|^ +[+]|Reading LArPedestalMC|IOV callback|^DetectorStore|Cache alignment|object with key|recorded new|into Conditions" )
 
-
diff --git a/LArCalorimeter/LArCellRec/python/LArCellDeadOTXCorrToolDefault.py b/LArCalorimeter/LArCellRec/python/LArCellDeadOTXCorrToolDefault.py
index 09421761b54e..d685adf6a24c 100644
--- a/LArCalorimeter/LArCellRec/python/LArCellDeadOTXCorrToolDefault.py
+++ b/LArCalorimeter/LArCellRec/python/LArCellDeadOTXCorrToolDefault.py
@@ -1,12 +1,14 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 def LArCellDeadOTXCorrToolDefault(name='LArCellDeadOTXCorr'):
+    from AthenaCommon.Logging import logging
+    mlog = logging.getLogger( 'LArCellDeadOTXCorrToolDefault' )
 
-    import traceback
     try :
         from LArCellRec.LArCellRecConf import LArCellDeadOTXCorr
         theLArCellDeadOTXCorr = LArCellDeadOTXCorr(name)
-    except:
+    except Exception:
+        import traceback
         mlog.error("could not get handle to LArCellDeadOTXCorr Quit")
         traceback.print_exc()
         return False 
@@ -51,9 +53,9 @@ def LArCellDeadOTXCorrToolDefault(name='LArCellDeadOTXCorr'):
 
 
         L1CaloDb=""
-        if not 'L1CaloDbConnection' in dir():
+        if 'L1CaloDbConnection' not in dir():
             if 'L1CaloSqliteDB' in dir():
-                L1CaloDbConnection="<dbConnection>sqlite://;schema=" + L1CaloSqliteDB + ";dbname=L1CALO</dbConnection>"
+                L1CaloDbConnection="<dbConnection>sqlite://;schema=" + L1CaloSqliteDB + ";dbname=L1CALO</dbConnection>" # noqa: F821
             else:
                 L1CaloDb="TRIGGER"
                 L1CaloDbConnection=""
diff --git a/LArCalorimeter/LArCellRec/python/LArCellHVCorrDefault.py b/LArCalorimeter/LArCellRec/python/LArCellHVCorrDefault.py
index 69b8315ac656..d489b4915a8b 100644
--- a/LArCalorimeter/LArCellRec/python/LArCellHVCorrDefault.py
+++ b/LArCalorimeter/LArCellRec/python/LArCellHVCorrDefault.py
@@ -1,17 +1,15 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-
-#from AthenaCommon.Logging import logging 
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #Note: This tool is used as CaloCellCorrection tool and by the CaloNoiseTool
 def LArCellHVCorrDefault(name="LArCellHVCorrDefault"):
-     # check if tool already exists
+    # check if tool already exists
     from AthenaCommon.AppMgr import ServiceMgr as svcMgr
     if hasattr(svcMgr.ToolSvc, name):
         # re-use previously configured (public) tool
         return getattr(svcMgr.ToolSvc, name)
     
     
-    from LArConditionsCommon import LArHVDB
+    from LArConditionsCommon import LArHVDB  # noqa: F401
 
     from LArCellRec.LArCellRecConf import LArCellHVCorr
     theLArCellHVCorr = LArCellHVCorr(name)
diff --git a/LArCalorimeter/LArCellRec/python/LArCollisionTimeGetter.py b/LArCalorimeter/LArCellRec/python/LArCollisionTimeGetter.py
index fdaaa599c67a..a175b97da2a9 100644
--- a/LArCalorimeter/LArCellRec/python/LArCollisionTimeGetter.py
+++ b/LArCalorimeter/LArCellRec/python/LArCollisionTimeGetter.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
 
-# $Id$
 #
 # @file LArCellRec/python/LArCollisionTimeGetter.py
 # @author scott snyder <snyder@bnl.gov>
@@ -47,7 +46,7 @@ class LArCollisionTimeGetter ( Configured )  :
             objKeyStore.addTransient (self.outputType(),self.outputKey())
 
             self.seq += self._handle
-        except:
+        except Exception:
             mlog.error ("Error configuring LArCollisionTimeAlg.")
             traceback.print_exc()
 
diff --git a/LArCalorimeter/LArCellRec/python/LArNoisyROSummaryGetter.py b/LArCalorimeter/LArCellRec/python/LArNoisyROSummaryGetter.py
index 41d5e6b8f153..c5c6bda0285a 100755
--- a/LArCalorimeter/LArCellRec/python/LArNoisyROSummaryGetter.py
+++ b/LArCalorimeter/LArCellRec/python/LArNoisyROSummaryGetter.py
@@ -21,7 +21,7 @@ class LArNoisyROSummaryGetter ( Configured )  :
         try:
             from CaloRec.CaloCellGetter import CaloCellGetter
             theCaloCellGetter = CaloCellGetter()
-        except:
+        except Exception:
             mlog.error("could not get handle to CaloCell Quit")
             traceback.print_exc()
             return False
@@ -38,7 +38,7 @@ class LArNoisyROSummaryGetter ( Configured )  :
         # cannot have same name
         try:        
             from LArCellRec.LArCellRecConf import LArNoisyROAlg,LArNoisyROTool
-        except:
+        except Exception:
             mlog.error("could not import LArNoisyROAlg or LArNoisyROTool")
             traceback.print_exc()
             return False
-- 
GitLab


From 1d0f83d14fafe1933b1a8ea5718c9fd151d2e1bd Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Wed, 7 Oct 2020 12:47:53 +0200
Subject: [PATCH 304/403] LArCnv: cmake cleanup

Remove `atlas_depends_on_subdirs` and cleanup link dependencies.
---
 .../LArCnv/LArByteStream/CMakeLists.txt       | 39 ++----------
 .../LArCnv/LArCondAthenaPool/CMakeLists.txt   | 13 +---
 .../LArCnv/LArCondTPCnv/CMakeLists.txt        | 53 ++++++----------
 LArCalorimeter/LArCnv/LArIdCnv/CMakeLists.txt | 19 +-----
 .../LArCnv/LArSimEventTPCnv/CMakeLists.txt    | 45 ++++----------
 LArCalorimeter/LArCnv/LArTPCnv/CMakeLists.txt | 60 +++++--------------
 6 files changed, 51 insertions(+), 178 deletions(-)

diff --git a/LArCalorimeter/LArCnv/LArByteStream/CMakeLists.txt b/LArCalorimeter/LArCnv/LArByteStream/CMakeLists.txt
index af833d5353be..c8923e22a515 100644
--- a/LArCalorimeter/LArCnv/LArByteStream/CMakeLists.txt
+++ b/LArCalorimeter/LArCnv/LArByteStream/CMakeLists.txt
@@ -1,39 +1,8 @@
-# $Id: CMakeLists.txt 757209 2016-06-23 11:15:56Z krasznaa $
-################################################################################
-# Package: LArByteStream
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArByteStream )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Calorimeter/CaloDetDescr
-   Calorimeter/CaloIdentifier
-   Calorimeter/CaloUtils
-   Control/AthenaBaseComps
-   Control/AthenaKernel
-   Control/StoreGate
-   Event/xAOD/xAODEventInfo
-   Event/ByteStreamCnvSvcBase
-   Event/ByteStreamData
-   GaudiKernel
-   LArCalorimeter/LArIdentifier
-   LArCalorimeter/LArROD
-   LArCalorimeter/LArRawEvent
-   LArCalorimeter/LArRawUtils
-   LArCalorimeter/LArRecConditions
-   LArCalorimeter/LArRecEvent
-   LArCalorimeter/LArRecUtils
-   LArCalorimeter/LArCabling
-   PRIVATE
-   Calorimeter/CaloInterface
-   DetectorDescription/AtlasDetDescr
-   DetectorDescription/Identifier
-   Event/ByteStreamCnvSvc
-   LArCalorimeter/LArRawConditions )
-
 # External dependencies:
 find_package( tdaq-common COMPONENTS eformat eformat_write )
 
@@ -45,14 +14,14 @@ atlas_add_library( LArByteStreamLib
    LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} CaloIdentifier AthenaBaseComps
    AthenaKernel xAODEventInfo ByteStreamData GaudiKernel LArIdentifier LArRawEvent
    LArRecConditions LArRecEvent CaloDetDescrLib CaloUtilsLib StoreGateLib
-   ByteStreamCnvSvcBaseLib LArRODLib LArRawUtilsLib LArRecUtilsLib LArCablingLib
+   ByteStreamCnvSvcBaseLib LArRawUtilsLib LArRecUtilsLib LArCablingLib
    ByteStreamCnvSvcLib
-   PRIVATE_LINK_LIBRARIES AtlasDetDescr Identifier LArRawConditions )
+   PRIVATE_LINK_LIBRARIES AtlasDetDescr CaloInterfaceLib Identifier LArRawConditions )
 
 atlas_add_component( LArByteStream
    src/components/*.cxx
    LINK_LIBRARIES LArByteStreamLib )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.txt share/*.py )
diff --git a/LArCalorimeter/LArCnv/LArCondAthenaPool/CMakeLists.txt b/LArCalorimeter/LArCnv/LArCondAthenaPool/CMakeLists.txt
index 0db331bdd062..2f0d71d7a694 100644
--- a/LArCalorimeter/LArCnv/LArCondAthenaPool/CMakeLists.txt
+++ b/LArCalorimeter/LArCnv/LArCondAthenaPool/CMakeLists.txt
@@ -1,19 +1,8 @@
-################################################################################
-# Package: LArCondAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArCondAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          PRIVATE
-                          AtlasTest/TestTools
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          LArCalorimeter/LArCnv/LArCondTPCnv
-                          LArCalorimeter/LArRawConditions )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( LArCondAthenaPoolPoolCnv
                            src/*.cxx
diff --git a/LArCalorimeter/LArCnv/LArCondTPCnv/CMakeLists.txt b/LArCalorimeter/LArCnv/LArCondTPCnv/CMakeLists.txt
index ea3379c40872..11000b86648b 100644
--- a/LArCalorimeter/LArCnv/LArCondTPCnv/CMakeLists.txt
+++ b/LArCalorimeter/LArCnv/LArCondTPCnv/CMakeLists.txt
@@ -1,106 +1,91 @@
-################################################################################
-# Package: LArCondTPCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArCondTPCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          LArCalorimeter/LArRawConditions
-                          PRIVATE
-                          Control/AthenaKernel
-                          LArCalorimeter/LArElecCalib )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_tpcnv_library( LArCondTPCnv
                          src/*.cxx
                          PUBLIC_HEADERS LArCondTPCnv
-                         INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                         LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawConditions AthenaKernel )
+                         LINK_LIBRARIES AthenaPoolCnvSvcLib LArRawConditions
+                         PRIVATE_LINK_LIBRARIES AthenaKernel LArElecCalib )
 
 atlas_add_dictionary( LArCondTPCnvDict
                       LArCondTPCnv/LArCondTPCnvDict.h
                       LArCondTPCnv/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawConditions AthenaKernel LArCondTPCnv )
+                      LINK_LIBRARIES LArCondTPCnv )
 
 atlas_add_dictionary( OLD_LArCondTPCnvDict
                       LArCondTPCnv/LArCondTPCnvDict.h
                       LArCondTPCnv/OLD_selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawConditions AthenaKernel LArCondTPCnv )
+                      LINK_LIBRARIES LArCondTPCnv )
 
 atlas_add_test( LArAutoCorrSubsetCnv_p1_test
                 SOURCES
                 test/LArAutoCorrSubsetCnv_p1_test.cxx
-                LINK_LIBRARIES LArCondTPCnv )
+                LINK_LIBRARIES GaudiKernel LArCondTPCnv TestTools )
 
 atlas_add_test( LArCaliWaveSubsetCnv_p1_test
                 SOURCES
                 test/LArCaliWaveSubsetCnv_p1_test.cxx
-                LINK_LIBRARIES LArCondTPCnv )
+                LINK_LIBRARIES GaudiKernel LArCondTPCnv TestTools )
 
 atlas_add_test( LArCaliWaveSubsetCnv_p2_test
                 SOURCES
                 test/LArCaliWaveSubsetCnv_p2_test.cxx
-                LINK_LIBRARIES LArCondTPCnv )
+                LINK_LIBRARIES GaudiKernel LArCondTPCnv TestTools )
 
 atlas_add_test( LArDSPThresholdsSubsetCnv_p1_test
                 SOURCES
                 test/LArDSPThresholdsSubsetCnv_p1_test.cxx
-                LINK_LIBRARIES LArCondTPCnv )
+                LINK_LIBRARIES GaudiKernel LArCondTPCnv TestTools )
 
 atlas_add_test( LArMphysOverMcalSubsetCnv_p1_test
                 SOURCES
                 test/LArMphysOverMcalSubsetCnv_p1_test.cxx
-                LINK_LIBRARIES LArCondTPCnv )
+                LINK_LIBRARIES GaudiKernel LArCondTPCnv TestTools )
 
 atlas_add_test( LArOFCBinSubsetCnv_p1_test
                 SOURCES
                 test/LArOFCBinSubsetCnv_p1_test.cxx
-                LINK_LIBRARIES LArCondTPCnv )
+                LINK_LIBRARIES GaudiKernel LArCondTPCnv TestTools )
 
 atlas_add_test( LArPedestalMCCnv_p1_test
                 SOURCES
                 test/LArPedestalMCCnv_p1_test.cxx
-                LINK_LIBRARIES LArCondTPCnv )
+                LINK_LIBRARIES GaudiKernel LArCondTPCnv TestTools )
 
 atlas_add_test( LArPedestalSubsetCnv_p1_test
                 SOURCES
                 test/LArPedestalSubsetCnv_p1_test.cxx
-                LINK_LIBRARIES LArCondTPCnv )
+                LINK_LIBRARIES GaudiKernel LArCondTPCnv TestTools )
 
 atlas_add_test( LArPedestalSubsetCnv_p2_test
                 SOURCES
                 test/LArPedestalSubsetCnv_p2_test.cxx
-                LINK_LIBRARIES LArCondTPCnv )
+                LINK_LIBRARIES GaudiKernel LArCondTPCnv TestTools )
 
 atlas_add_test( LArPhysWaveSubsetCnv_p1_test
                 SOURCES
                 test/LArPhysWaveSubsetCnv_p1_test.cxx
-                LINK_LIBRARIES LArCondTPCnv )
+                LINK_LIBRARIES GaudiKernel LArCondTPCnv TestTools )
 
 atlas_add_test( LArRampSubsetCnv_p1_test
                 SOURCES
                 test/LArRampSubsetCnv_p1_test.cxx
-                LINK_LIBRARIES LArCondTPCnv )
+                LINK_LIBRARIES GaudiKernel LArCondTPCnv TestTools )
 
 atlas_add_test( LArShapeSubsetCnv_p1_test
                 SOURCES
                 test/LArShapeSubsetCnv_p1_test.cxx
-                LINK_LIBRARIES LArCondTPCnv )
+                LINK_LIBRARIES GaudiKernel LArCondTPCnv TestTools )
 
 atlas_add_test( LArShapeSubsetCnv_p2_test
                 SOURCES
                 test/LArShapeSubsetCnv_p2_test.cxx
-                LINK_LIBRARIES LArCondTPCnv )
+                LINK_LIBRARIES GaudiKernel LArCondTPCnv TestTools )
 
 atlas_add_test( LArSingleFloatSubsetCnv_p1_test
                 SOURCES
                 test/LArSingleFloatSubsetCnv_p1_test.cxx
-                LINK_LIBRARIES LArCondTPCnv )
+                LINK_LIBRARIES GaudiKernel LArCondTPCnv TestTools )
diff --git a/LArCalorimeter/LArCnv/LArIdCnv/CMakeLists.txt b/LArCalorimeter/LArCnv/LArIdCnv/CMakeLists.txt
index e70f6268749d..7bf3ec8fd4d7 100644
--- a/LArCalorimeter/LArCnv/LArIdCnv/CMakeLists.txt
+++ b/LArCalorimeter/LArCnv/LArIdCnv/CMakeLists.txt
@@ -1,27 +1,12 @@
-################################################################################
-# Package: LArIdCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArIdCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          DetectorDescription/DetDescrCnvSvc
-                          PRIVATE
-                          Calorimeter/CaloIdentifier
-                          Control/StoreGate
-                          DetectorDescription/IdDictDetDescr
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          LArCalorimeter/LArIdentifier )
-
 # Component(s) in the package:
 atlas_add_component( LArIdCnv
                      src/*.cxx
-                     LINK_LIBRARIES DetDescrCnvSvcLib CaloIdentifier StoreGateLib SGtests IdDictDetDescr Identifier GaudiKernel LArIdentifier )
+                     LINK_LIBRARIES DetDescrCnvSvcLib CaloIdentifier StoreGateLib IdDictDetDescr Identifier GaudiKernel LArIdentifier )
 
 # Install files from the package:
-atlas_install_headers( LArIdCnv )
 atlas_install_joboptions( share/*.py )
-
diff --git a/LArCalorimeter/LArCnv/LArSimEventTPCnv/CMakeLists.txt b/LArCalorimeter/LArCnv/LArSimEventTPCnv/CMakeLists.txt
index 76526fcf1dd8..b8f33c2cd49e 100644
--- a/LArCalorimeter/LArCnv/LArSimEventTPCnv/CMakeLists.txt
+++ b/LArCalorimeter/LArCnv/LArSimEventTPCnv/CMakeLists.txt
@@ -1,73 +1,48 @@
-################################################################################
-# Package: LArSimEventTPCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArSimEventTPCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          LArCalorimeter/LArSimEvent
-                          PRIVATE
-                          AtlasTest/TestTools
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          DetectorDescription/IdDictParser
-                          DetectorDescription/Identifier )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_tpcnv_library( LArSimEventTPCnv
                          src/*.cxx
                          PUBLIC_HEADERS LArSimEventTPCnv
-                         INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                         LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArSimEvent TestTools CaloIdentifier AthenaKernel StoreGateLib SGtests IdDictParser Identifier )
+                         LINK_LIBRARIES AthenaPoolCnvSvcLib LArSimEvent
+                         PRIVATE_LINK_LIBRARIES AthenaKernel CaloIdentifier GaudiKernel Identifier StoreGateLib )
 
 atlas_add_dictionary( LArSimEventTPCnvDict
                       LArSimEventTPCnv/LArSimEventTPCnvDict.h
                       LArSimEventTPCnv/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArSimEvent TestTools CaloIdentifier AthenaKernel StoreGateLib SGtests IdDictParser Identifier LArSimEventTPCnv )
+                      LINK_LIBRARIES LArSimEventTPCnv )
 
 atlas_add_dictionary( OLD_LArSimEventTPCnvDict
                       LArSimEventTPCnv/LArSimEventTPCnvDict.h
                       LArSimEventTPCnv/OLD_selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArSimEvent TestTools CaloIdentifier AthenaKernel StoreGateLib SGtests IdDictParser Identifier LArSimEventTPCnv )
+                      LINK_LIBRARIES LArSimEventTPCnv )
 
 atlas_add_test( LArHitCnv_p1_test
                 SOURCES
                 test/LArHitCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArSimEvent TestTools CaloIdentifier AthenaKernel StoreGateLib SGtests IdDictParser Identifier LArSimEventTPCnv )
+                LINK_LIBRARIES LArSimEventTPCnv TestTools )
 
 atlas_add_test( LArHitContainerCnv_p1_test
                 SOURCES
                 test/LArHitContainerCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArSimEvent TestTools CaloIdentifier AthenaKernel StoreGateLib SGtests IdDictParser Identifier LArSimEventTPCnv )
+                LINK_LIBRARIES LArSimEventTPCnv TestTools )
 
 atlas_add_test( LArHitContainerCnv_p2_test
                 SOURCES
                 test/LArHitContainerCnv_p2_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArSimEvent TestTools CaloIdentifier AthenaKernel StoreGateLib SGtests IdDictParser Identifier LArSimEventTPCnv
+                LINK_LIBRARIES CaloIdentifier IdDictParser LArSimEventTPCnv StoreGateLib TestTools
                 ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" )
 
 atlas_add_test( LArHitFloatCnv_p1_test
                 SOURCES
                 test/LArHitFloatCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArSimEvent TestTools CaloIdentifier AthenaKernel StoreGateLib SGtests IdDictParser Identifier LArSimEventTPCnv )
+                LINK_LIBRARIES LArSimEventTPCnv TestTools )
 
 atlas_add_test( LArHitFloatContainerCnv_p2_test
                 SOURCES
                 test/LArHitFloatContainerCnv_p2_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArSimEvent TestTools CaloIdentifier AthenaKernel StoreGateLib SGtests IdDictParser Identifier LArSimEventTPCnv 
+                LINK_LIBRARIES CaloIdentifier IdDictParser LArSimEventTPCnv StoreGateLib TestTools
                 ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" )
-
diff --git a/LArCalorimeter/LArCnv/LArTPCnv/CMakeLists.txt b/LArCalorimeter/LArCnv/LArTPCnv/CMakeLists.txt
index 860e72a1a086..f704ffd54115 100644
--- a/LArCalorimeter/LArCnv/LArTPCnv/CMakeLists.txt
+++ b/LArCalorimeter/LArCnv/LArTPCnv/CMakeLists.txt
@@ -1,101 +1,71 @@
-################################################################################
-# Package: LArTPCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArTPCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          LArCalorimeter/LArRawEvent
-                          LArCalorimeter/LArRecEvent
-                          Control/CxxUtils
-                          PRIVATE
-                          AtlasTest/TestTools
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaKernel
-                          DetectorDescription/Identifier )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_tpcnv_library( LArTPCnv
                          src/*.cxx
                          PUBLIC_HEADERS LArTPCnv
-                         INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                         LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawEvent LArRecEvent TestTools CaloIdentifier AthenaKernel Identifier )
+                         LINK_LIBRARIES AthenaPoolCnvSvcLib CxxUtils Identifier LArRawEvent LArRecEvent
+                         PRIVATE_LINK_LIBRARIES AthenaKernel CaloIdentifier GaudiKernel LArIdentifier )
 
 atlas_add_dictionary( LArTPCnvDict
                       LArTPCnv/LArTPCnvDict.h
                       LArTPCnv/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawEvent LArRecEvent TestTools CaloIdentifier AthenaKernel Identifier LArTPCnv )
+                      LINK_LIBRARIES LArTPCnv )
 
 atlas_add_dictionary( OLD_LArTPCnvDict
                       LArTPCnv/LArTPCnvDict.h
                       LArTPCnv/OLD_selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawEvent LArRecEvent TestTools CaloIdentifier AthenaKernel Identifier LArTPCnv )
+                      LINK_LIBRARIES LArTPCnv )
 
 atlas_add_test( LArDigitContainerCnv_p1_test
                 SOURCES
                 test/LArDigitContainerCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawEvent LArRecEvent TestTools CaloIdentifier AthenaKernel Identifier LArTPCnv )
+                LINK_LIBRARIES GaudiKernel LArTPCnv TestTools )
 
 atlas_add_test( LArFebErrorSummaryCnv_p1_test
                 SOURCES
                 test/LArFebErrorSummaryCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawEvent LArRecEvent TestTools CaloIdentifier AthenaKernel Identifier LArTPCnv )
+                LINK_LIBRARIES GaudiKernel LArTPCnv TestTools )
 
 atlas_add_test( LArNoisyROSummaryCnv_p1_test
                 SOURCES
                 test/LArNoisyROSummaryCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawEvent LArRecEvent TestTools CaloIdentifier AthenaKernel Identifier LArTPCnv )
+                LINK_LIBRARIES GaudiKernel LArTPCnv TestTools )
 
 atlas_add_test( LArNoisyROSummaryCnv_p2_test
                 SOURCES
                 test/LArNoisyROSummaryCnv_p2_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawEvent LArRecEvent TestTools CaloIdentifier AthenaKernel Identifier LArTPCnv )
+                LINK_LIBRARIES GaudiKernel LArTPCnv TestTools )
 
 atlas_add_test( LArNoisyROSummaryCnv_p3_test
                 SOURCES
                 test/LArNoisyROSummaryCnv_p3_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawEvent LArRecEvent TestTools CaloIdentifier AthenaKernel Identifier LArTPCnv )
+                LINK_LIBRARIES GaudiKernel LArTPCnv TestTools )
 
 atlas_add_test( LArNoisyROSummaryCnv_p4_test
                 SOURCES
                 test/LArNoisyROSummaryCnv_p4_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawEvent LArRecEvent TestTools CaloIdentifier AthenaKernel Identifier LArTPCnv )
+                LINK_LIBRARIES GaudiKernel LArTPCnv TestTools )
 
 atlas_add_test( LArNoisyROSummaryCnv_p5_test
                 SOURCES
                 test/LArNoisyROSummaryCnv_p5_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawEvent LArRecEvent TestTools CaloIdentifier AthenaKernel Identifier LArTPCnv )
+                LINK_LIBRARIES GaudiKernel LArTPCnv TestTools )
 
 atlas_add_test( LArRawChannelCnv_p2_test
                 SOURCES
                 test/LArRawChannelCnv_p2_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawEvent LArRecEvent TestTools CaloIdentifier AthenaKernel Identifier LArTPCnv )
+                LINK_LIBRARIES GaudiKernel LArTPCnv TestTools )
 
 atlas_add_test( LArRawChannelContainerCnv_p4_test
                 SOURCES
                 test/LArRawChannelContainerCnv_p4_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawEvent LArRecEvent TestTools CaloIdentifier AthenaKernel Identifier LArTPCnv )
+                LINK_LIBRARIES GaudiKernel LArTPCnv TestTools )
 
 atlas_add_test( LArLATOMEHeaderContainerCnv_p1_test
                 SOURCES
                 test/LArLATOMEHeaderContainerCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawEvent LArRecEvent TestTools CaloIdentifier AthenaKernel Identifier LArTPCnv )
-
+                LINK_LIBRARIES GaudiKernel LArTPCnv TestTools )
-- 
GitLab


From effed5bb683c4f1d2456668647a97de576f8304a Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Wed, 7 Oct 2020 13:00:27 +0200
Subject: [PATCH 305/403] LArG4[TB]: cmake cleanup

---
 .../LArG4/LArG4FastSimulation/CMakeLists.txt  | 30 +++----------------
 .../LArG4/LArG4ShowerLibSvc/CMakeLists.txt    | 22 +++-----------
 .../LArG4TB/LArG4TBSimEvent/CMakeLists.txt    | 18 ++---------
 .../LArG4TBSimEventAthenaPool/CMakeLists.txt  | 11 +------
 4 files changed, 12 insertions(+), 69 deletions(-)

diff --git a/LArCalorimeter/LArG4/LArG4FastSimulation/CMakeLists.txt b/LArCalorimeter/LArG4/LArG4FastSimulation/CMakeLists.txt
index 9a4ca1d4c729..2f5b3a2a4922 100644
--- a/LArCalorimeter/LArG4/LArG4FastSimulation/CMakeLists.txt
+++ b/LArCalorimeter/LArG4/LArG4FastSimulation/CMakeLists.txt
@@ -1,43 +1,21 @@
-################################################################################
-# Package: LArG4FastSimulation
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArG4FastSimulation )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel
-                          PRIVATE
-                          Control/StoreGate
-                          DetectorDescription/GeoModel/GeoSpecialShapes
-			  DetectorDescription/GeoPrimitives
-                          LArCalorimeter/LArG4/LArG4Code
-                          LArCalorimeter/LArG4/LArG4ShowerLibSvc
-                          LArCalorimeter/LArGeoModel/LArReadoutGeometry
-                          LArCalorimeter/LArSimEvent
-                          Simulation/G4Atlas/G4AtlasTools 
-                          Generators/AtlasHepMC )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( Geant4 )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint Graf Graf3d Gpad Html Postscript Gui GX11TTF GX11 )
-find_package( XercesC )
 find_package( GeoModelCore )
 
-# tag ROOTBasicLibs was not recognized in automatic conversion in cmt2cmake
-
-# tag ROOTSTLDictLibs was not recognized in automatic conversion in cmt2cmake
-
 # Component(s) in the package:
 atlas_add_component( LArG4FastSimulation
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}  ${GEOMODELCORE_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib ${GEOMODELCORE_LIBRARIES} GaudiKernel StoreGateLib SGtests GeoSpecialShapes LArG4Code LArReadoutGeometry LArSimEvent G4AtlasToolsLib GeoPrimitives LArG4ShowerLibSvcLib )
+                     INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib ${GEOMODELCORE_LIBRARIES} GaudiKernel StoreGateLib GeoSpecialShapes LArG4Code LArReadoutGeometry LArSimEvent G4AtlasToolsLib GeoPrimitives LArG4ShowerLibSvcLib )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py )
 
diff --git a/LArCalorimeter/LArG4/LArG4ShowerLibSvc/CMakeLists.txt b/LArCalorimeter/LArG4/LArG4ShowerLibSvc/CMakeLists.txt
index ef9f5753b1f8..5158176b0d62 100644
--- a/LArCalorimeter/LArG4/LArG4ShowerLibSvc/CMakeLists.txt
+++ b/LArCalorimeter/LArG4/LArG4ShowerLibSvc/CMakeLists.txt
@@ -1,25 +1,11 @@
-################################################################################
-# Package: LArG4ShowerLibSvc
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArG4ShowerLibSvc )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          LArCalorimeter/LArG4/LArG4Code
-                          PRIVATE
-                          Control/AthenaKernel
-                          LArCalorimeter/LArG4/LArG4ShowerLib
-                          Tools/PathResolver )
-
 # External dependencies:
-find_package( CLHEP )
 find_package( Geant4 )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-find_package( XercesC )
 
 atlas_add_library( LArG4ShowerLibSvcLib
                    LArG4ShowerLibSvc/*.h
@@ -31,10 +17,10 @@ atlas_add_library( LArG4ShowerLibSvcLib
 atlas_add_component( LArG4ShowerLibSvc
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES}  LArG4ShowerLibSvcLib AthenaKernel LArG4ShowerLib PathResolver )
+                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${GEANT4_LIBRARIES} LArG4ShowerLibSvcLib AthenaKernel LArG4ShowerLib PathResolver )
 
 # 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( share/*.py )
 
diff --git a/LArCalorimeter/LArG4TB/LArG4TBSimEvent/CMakeLists.txt b/LArCalorimeter/LArG4TB/LArG4TBSimEvent/CMakeLists.txt
index 0a32bde9c9c0..3be7778afb9d 100644
--- a/LArCalorimeter/LArG4TB/LArG4TBSimEvent/CMakeLists.txt
+++ b/LArCalorimeter/LArG4TB/LArG4TBSimEvent/CMakeLists.txt
@@ -1,32 +1,20 @@
-################################################################################
-# Package: LArG4TBSimEvent
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArG4TBSimEvent )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          Simulation/HitManagement )
-
 # External dependencies:
 find_package( CLHEP )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
 atlas_add_library( LArG4TBSimEvent
                    src/*.cxx
                    PUBLIC_HEADERS LArG4TBSimEvent
                    INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                    DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaKernel HitManagement
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
+                   LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaKernel HitManagement )
 
 atlas_add_dictionary( LArG4TBSimEventDict
                       LArG4TBSimEvent/LArG4TBSimEventDict.h
                       LArG4TBSimEvent/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} HitManagement LArG4TBSimEvent )
-
+                      LINK_LIBRARIES LArG4TBSimEvent )
diff --git a/LArCalorimeter/LArG4TB/LArG4TBSimEventAthenaPool/CMakeLists.txt b/LArCalorimeter/LArG4TB/LArG4TBSimEventAthenaPool/CMakeLists.txt
index 62054562af64..a0ff8c5dda47 100644
--- a/LArCalorimeter/LArG4TB/LArG4TBSimEventAthenaPool/CMakeLists.txt
+++ b/LArCalorimeter/LArG4TB/LArG4TBSimEventAthenaPool/CMakeLists.txt
@@ -1,17 +1,8 @@
-################################################################################
-# Package: LArG4TBSimEventAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArG4TBSimEventAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          PRIVATE
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          LArCalorimeter/LArG4TB/LArG4TBSimEvent )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( LArG4TBSimEventAthenaPoolPoolCnv
                            src/*.cxx
-- 
GitLab


From 9db08c40744fcfbc4ad7d57e0d3b12afd4cebef2 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Wed, 7 Oct 2020 14:35:27 +0200
Subject: [PATCH 306/403] LArTest: cmake cleanup

---
 .../LArTest/LArCalibTest/CMakeLists.txt       | 28 ++---------
 .../LArCalibTest/python/HECNoiseD3PDMaker.py  | 46 +++++++++----------
 .../LArTest/LArConditionsTest/CMakeLists.txt  | 35 +-------------
 .../LArTest/LArEventTest/CMakeLists.txt       | 27 ++---------
 4 files changed, 34 insertions(+), 102 deletions(-)

diff --git a/LArCalorimeter/LArTest/LArCalibTest/CMakeLists.txt b/LArCalorimeter/LArTest/LArCalibTest/CMakeLists.txt
index e0efce0719a3..c373496edc31 100644
--- a/LArCalorimeter/LArTest/LArCalibTest/CMakeLists.txt
+++ b/LArCalorimeter/LArTest/LArCalibTest/CMakeLists.txt
@@ -1,27 +1,10 @@
-################################################################################
-# Package: LArCalibTest
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArCalibTest )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloConditions
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRawEvent
-                          LArCalorimeter/LArRecConditions
-                          LArCalorimeter/LArCabling
-                          PRIVATE
-                          Calorimeter/CaloDetDescr
-                          Control/StoreGate
-                          Event/xAOD/xAODEventInfo
-                          LArCalorimeter/LArRawConditions
-                          LArCalorimeter/LArCOOLConditions
-                          Tools/PathResolver )
+# External dependencies:
+find_package( CORAL COMPONENTS CoralBase )
 
 # Component(s) in the package:
 atlas_add_component( LArCalibTest
@@ -29,10 +12,9 @@ atlas_add_component( LArCalibTest
                      src/DumpCaloBadChannels.cxx
                      src/FixLArElecCalib.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES CaloConditions CaloIdentifier AthenaBaseComps GaudiKernel LArIdentifier LArRawEvent LArRecConditions LArCablingLib CaloDetDescrLib StoreGateLib SGtests xAODEventInfo LArRawConditions LArCOOLConditions PathResolver )
+                     LINK_LIBRARIES ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel AthenaPoolUtilities CaloConditions CaloDetDescrLib CaloIdentifier GaudiKernel Identifier LArCOOLConditions LArCablingLib LArElecCalib LArIdentifier LArRawConditions LArRawEvent LArRecConditions PathResolver StoreGateLib xAODEventInfo )
 
 # Install files from the package:
-atlas_install_headers( LArCalibTest )
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py )
 
diff --git a/LArCalorimeter/LArTest/LArCalibTest/python/HECNoiseD3PDMaker.py b/LArCalorimeter/LArTest/LArCalibTest/python/HECNoiseD3PDMaker.py
index c19fa00d222d..c1c1e66173d7 100644
--- a/LArCalorimeter/LArTest/LArCalibTest/python/HECNoiseD3PDMaker.py
+++ b/LArCalorimeter/LArTest/LArCalibTest/python/HECNoiseD3PDMaker.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
 
 #
 # D3PDMaker
@@ -58,7 +58,7 @@ class HECNoiseD3PDMaker(PyAthena.Alg):
         self.cid = self.cdd.getCaloCell_ID()
         self.tdt = PyAthena.py_tool('Trig::TrigDecisionTool/TrigDecisionTool')
         self.ntfile =  TFile(self.NtupleFileName,"RECREATE")
-        self.hectree = TTree("HECNoise","HECNoise");
+        self.hectree = TTree("HECNoise","HECNoise")
         self.iRun = array('i',[0])
         self.iEvent = array('L',[0])            
         self.iEventCount = array('i',[0])            
@@ -101,30 +101,30 @@ class HECNoiseD3PDMaker(PyAthena.Alg):
             self.hectree.Branch(tl+"_Prescale",self.fPrescale[tl],tl+"_Prescale/F")
             self.hectree.Branch(tl+"_Trigger",self.iTrigger[tl],tl+"_Trigger/I")
             pass
-        self.hectree.Branch("iTime",self.iTime,"iTime/I");
-        self.hectree.Branch("iLB",self.iLB,"iLB/I");
-        self.hectree.Branch("iBCID",self.iBCID,"iBCID/I");
+        self.hectree.Branch("iTime",self.iTime,"iTime/I")
+        self.hectree.Branch("iLB",self.iLB,"iLB/I")
+        self.hectree.Branch("iBCID",self.iBCID,"iBCID/I")
         self.hectree.Branch("avgMu",self.avgMu,"avgMu/F")
         self.hectree.Branch("actMu",self.actMu,"actMu/F")
-        self.hectree.Branch("iGain",self.iGain,"iGain/I");
-        self.hectree.Branch("iOID",self.iOID,"iOID/l");
-        self.hectree.Branch("iSide",self.iSide,"iSide/I");
-        self.hectree.Branch("iSamp",self.iSamp,"iSamp/I");
-        self.hectree.Branch("iReg",self.iReg,"iReg/I");
-        self.hectree.Branch("iEta",self.iEta,"iEta/I");
-        self.hectree.Branch("iPhi",self.iPhi,"iPhi/I");
+        self.hectree.Branch("iGain",self.iGain,"iGain/I")
+        self.hectree.Branch("iOID",self.iOID,"iOID/l")
+        self.hectree.Branch("iSide",self.iSide,"iSide/I")
+        self.hectree.Branch("iSamp",self.iSamp,"iSamp/I")
+        self.hectree.Branch("iReg",self.iReg,"iReg/I")
+        self.hectree.Branch("iEta",self.iEta,"iEta/I")
+        self.hectree.Branch("iPhi",self.iPhi,"iPhi/I")
         self.hectree.Branch("iQuality",self.iQuality,"iQuality/I")
-        self.hectree.Branch("e",self.e,"e/F");
-        self.hectree.Branch("t",self.t,"t/F");
-        self.hectree.Branch("eta",self.eta,"eta/F");
-        self.hectree.Branch("phi",self.phi,"phi/F");
-        self.hectree.Branch("z",self.z,"z/F");
-        self.hectree.Branch("r",self.r,"r/F");
-        self.hectree.Branch("Ped",self.Ped,"Ped/F");
-        self.hectree.Branch("PedRMS",self.PedRMS,"PedRMS/F");
-        self.hectree.Branch("iDigi",self.iDigi,"iDigi[32]/I");
-        self.hectree.Branch("iMax",self.iMax,"iMax/I");
-        self.hectree.Branch("iMin",self.iMin,"iMin/I");
+        self.hectree.Branch("e",self.e,"e/F")
+        self.hectree.Branch("t",self.t,"t/F")
+        self.hectree.Branch("eta",self.eta,"eta/F")
+        self.hectree.Branch("phi",self.phi,"phi/F")
+        self.hectree.Branch("z",self.z,"z/F")
+        self.hectree.Branch("r",self.r,"r/F")
+        self.hectree.Branch("Ped",self.Ped,"Ped/F")
+        self.hectree.Branch("PedRMS",self.PedRMS,"PedRMS/F")
+        self.hectree.Branch("iDigi",self.iDigi,"iDigi[32]/I")
+        self.hectree.Branch("iMax",self.iMax,"iMax/I")
+        self.hectree.Branch("iMin",self.iMin,"iMin/I")
         #
         return True
 
diff --git a/LArCalorimeter/LArTest/LArConditionsTest/CMakeLists.txt b/LArCalorimeter/LArTest/LArConditionsTest/CMakeLists.txt
index 0bdbf862d930..1b67f307ce3a 100644
--- a/LArCalorimeter/LArTest/LArConditionsTest/CMakeLists.txt
+++ b/LArCalorimeter/LArTest/LArConditionsTest/CMakeLists.txt
@@ -1,34 +1,8 @@
-################################################################################
-# Package: LArConditionsTest
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArConditionsTest )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloInterface
-                          Control/AthenaBaseComps
-                          Control/StoreGate
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          LArCalorimeter/LArCabling
-                          LArCalorimeter/LArElecCalib
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRawConditions
-                          LArCalorimeter/LArRawUtils
-                          LArCalorimeter/LArTools
-                          PRIVATE
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloEvent
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaKernel
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          LArCalorimeter/LArCOOLConditions )
-
-# External dependencies:
-find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
-
 # Component(s) in the package:
 atlas_add_component( LArConditionsTest
                      src/LArConditionsTest_entries.cxx
@@ -36,15 +10,11 @@ atlas_add_component( LArConditionsTest
                      src/LArCondDataTest.cxx
                      src/LArConditionsTestAlg.cxx
                      src/LArCablingTest.cxx
-                     INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CORAL_LIBRARIES} AthenaBaseComps StoreGateLib SGtests Identifier GaudiKernel LArCablingLib LArIdentifier LArRawConditions LArRawUtilsLib LArToolsLib CaloDetDescrLib CaloEvent CaloIdentifier AthenaKernel AthenaPoolUtilities LArCOOLConditions CaloInterfaceLib )
+                     LINK_LIBRARIES AthenaBaseComps StoreGateLib Identifier GaudiKernel LArCablingLib LArElecCalib LArIdentifier LArRawConditions LArRawUtilsLib LArRecConditions CaloDetDescrLib CaloEvent CaloIdentifier AthenaKernel CaloInterfaceLib )
 
 # Install files from the package:
-atlas_install_headers( LArConditionsTest )
 atlas_install_joboptions( share/*.py )
 
-
-
 function (larconditions_run_test testName)
   cmake_parse_arguments( ARG "" "DEPENDS" "" ${ARGN} )
 
@@ -63,7 +33,6 @@ function (larconditions_run_test testName)
   endif()
 endfunction (larconditions_run_test)
 
-
 larconditions_run_test (LArConditionsTest)
 larconditions_run_test (LArConditionsTestWriteNoReg)
 larconditions_run_test (LArConditionsTestReadNoReg DEPENDS LArConditionsTestWriteNoReg)
diff --git a/LArCalorimeter/LArTest/LArEventTest/CMakeLists.txt b/LArCalorimeter/LArTest/LArEventTest/CMakeLists.txt
index 66bbb1a95eaa..3d3f783689d5 100644
--- a/LArCalorimeter/LArTest/LArEventTest/CMakeLists.txt
+++ b/LArCalorimeter/LArTest/LArEventTest/CMakeLists.txt
@@ -1,37 +1,18 @@
-################################################################################
-# Package: LArEventTest
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArEventTest )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaBaseComps
-                          Control/StoreGate
-                          GaudiKernel
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRawConditions
-                          LArCalorimeter/LArRawEvent
-                          LArCalorimeter/LArCabling
-                          TestBeam/TBEvent
-                          PRIVATE
-                          Calorimeter/CaloEvent
-                          Event/xAOD/xAODEventInfo
-                          LArCalorimeter/LArElecCalib )
-
 # External dependencies:
 find_package( CLHEP )
+find_package( ROOT COMPONENTS Core Tree )
 
 # Component(s) in the package:
 atlas_add_component( LArEventTest
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CLHEP_LIBRARIES} CaloIdentifier AthenaBaseComps StoreGateLib SGtests GaudiKernel LArIdentifier LArRawConditions LArRawEvent LArCablingLib TBEvent CaloEvent xAODEventInfo )
+                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${CLHEP_LIBRARIES} ${ROOT_LIBRARIES} CaloIdentifier AthenaBaseComps StoreGateLib GaudiKernel LArElecCalib LArIdentifier LArRawConditions LArRawEvent LArCablingLib TBEvent CaloEvent xAODEventInfo )
 
 # Install files from the package:
-atlas_install_headers( LArEventTest )
 atlas_install_joboptions( share/*.py )
-
-- 
GitLab


From 716030d9c39af4fc0b0022c7b9c25222d10b2517 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Wed, 7 Oct 2020 14:35:54 +0200
Subject: [PATCH 307/403] LArExample: cmake cleanup

---
 .../LArExample/TestLArDetDescr/CMakeLists.txt | 23 +++----------------
 .../TestLArHardwareID/CMakeLists.txt          | 23 ++-----------------
 2 files changed, 5 insertions(+), 41 deletions(-)

diff --git a/LArCalorimeter/LArExample/TestLArDetDescr/CMakeLists.txt b/LArCalorimeter/LArExample/TestLArDetDescr/CMakeLists.txt
index 49484db3737f..1335816c0a96 100644
--- a/LArCalorimeter/LArExample/TestLArDetDescr/CMakeLists.txt
+++ b/LArCalorimeter/LArExample/TestLArDetDescr/CMakeLists.txt
@@ -1,25 +1,10 @@
-################################################################################
-# Package: TestLArDetDescr
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TestLArDetDescr )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          PRIVATE
-                          Calorimeter/CaloGeoHelpers
-                          Calorimeter/CaloTTDetDescr
-                          Calorimeter/CaloTrackingGeometry
-                          Control/StoreGate
-                          LArCalorimeter/LArIdentifier )
-
 # External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
+find_package( Boost )
 find_package( CLHEP )
 
 # Component(s) in the package:
@@ -27,9 +12,7 @@ atlas_add_component( TestLArDetDescr
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} CaloDetDescrLib CaloIdentifier AthenaBaseComps GaudiKernel CaloGeoHelpers CaloTTDetDescr StoreGateLib SGtests LArIdentifier CaloTrackingGeometryLib )
+                     LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} CaloDetDescrLib CaloIdentifier AthenaBaseComps GaudiKernel CaloGeoHelpers CaloTTDetDescr StoreGateLib LArIdentifier CaloTrackingGeometryLib )
 
 # Install files from the package:
-atlas_install_headers( TestLArDetDescr )
 atlas_install_joboptions( share/*.py )
-
diff --git a/LArCalorimeter/LArExample/TestLArHardwareID/CMakeLists.txt b/LArCalorimeter/LArExample/TestLArHardwareID/CMakeLists.txt
index 7af2ab21a883..3fead7162f2d 100644
--- a/LArCalorimeter/LArExample/TestLArHardwareID/CMakeLists.txt
+++ b/LArCalorimeter/LArExample/TestLArHardwareID/CMakeLists.txt
@@ -1,32 +1,13 @@
-################################################################################
-# Package: TestLArHardwareID
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TestLArHardwareID )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Database/RegistrationServices
-                          GaudiKernel
-                          PRIVATE
-                          Calorimeter/CaloIdentifier
-                          Calorimeter/CaloTriggerTool
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          LArCalorimeter/LArCabling
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRecConditions
-                          Tools/PathResolver )
-
 # Component(s) in the package:
 atlas_add_component( TestLArHardwareID
                      src/*.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES AthenaBaseComps GaudiKernel CaloIdentifier CaloTriggerToolLib AthenaKernel StoreGateLib SGtests LArCablingLib LArIdentifier LArRecConditions PathResolver RegistrationServicesLib )
+                     LINK_LIBRARIES AthenaBaseComps GaudiKernel CaloIdentifier CaloTriggerToolLib AthenaKernel StoreGateLib LArCablingLib LArIdentifier LArRecConditions PathResolver RegistrationServicesLib )
 
 # Install files from the package:
-atlas_install_headers( TestLArHardwareID )
 atlas_install_joboptions( share/*.py )
-
-- 
GitLab


From d2aca60ad9e0da38e02dfd38b0ff78d48e4ff74b Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Wed, 7 Oct 2020 14:47:18 +0200
Subject: [PATCH 308/403] LArL1Sim: cmake cleanup, enable flake8

---
 LArCalorimeter/LArL1Sim/CMakeLists.txt        | 34 +++----------------
 .../LArL1Sim/python/LArSCL1Getter.py          |  9 +++--
 .../LArL1Sim/python/LArTTL1Getter.py          |  9 +++--
 3 files changed, 12 insertions(+), 40 deletions(-)

diff --git a/LArCalorimeter/LArL1Sim/CMakeLists.txt b/LArCalorimeter/LArL1Sim/CMakeLists.txt
index 7352e14a1c25..92691271c225 100644
--- a/LArCalorimeter/LArL1Sim/CMakeLists.txt
+++ b/LArCalorimeter/LArL1Sim/CMakeLists.txt
@@ -1,46 +1,20 @@
-################################################################################
-# Package: LArL1Sim
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArL1Sim )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthAllocators
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          LArCalorimeter/LArDigitization
-                          LArCalorimeter/LArElecCalib
-                          PRIVATE
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloEvent
-                          Calorimeter/CaloIdentifier
-                          Calorimeter/CaloTriggerTool
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          DetectorDescription/GeoModel/GeoModelInterfaces
-                          Event/EventInfo
-                          LArCalorimeter/LArCabling
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRawEvent
-                          LArCalorimeter/LArSimEvent
-                          Tools/PathResolver )
-
 # External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
 find_package( CLHEP )
 
 # Component(s) in the package:
 atlas_add_component( LArL1Sim
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} AthAllocators AthenaBaseComps GaudiKernel LArDigitizationLib CaloDetDescrLib CaloEvent CaloIdentifier CaloTriggerToolLib AthenaKernel StoreGateLib SGtests EventInfo LArCablingLib LArIdentifier LArRawEvent LArSimEvent PathResolver )
+                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AthAllocators AthenaBaseComps GaudiKernel GeoModelInterfaces LArDigitizationLib CaloDetDescrLib CaloEvent CaloIdentifier CaloTriggerToolLib AthenaKernel StoreGateLib EventInfo LArCablingLib LArElecCalib LArIdentifier LArRawEvent LArSimEvent PathResolver )
 
 # Install files from the package:
-atlas_install_headers( LArL1Sim )
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py )
 atlas_install_runtime( share/Fcal_ptweights_table7.data )
 
diff --git a/LArCalorimeter/LArL1Sim/python/LArSCL1Getter.py b/LArCalorimeter/LArL1Sim/python/LArSCL1Getter.py
index e5e7b1a5efb7..235f308732c8 100644
--- a/LArCalorimeter/LArL1Sim/python/LArSCL1Getter.py
+++ b/LArCalorimeter/LArL1Sim/python/LArSCL1Getter.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
 
 # LArSCL1 creation from LArHits with LArSCL1Maker algorithm
 
@@ -19,7 +19,7 @@ class LArSCL1Getter ( Configured )  :
         try:
             from LArL1Sim.LArSCL1Getter import LArSCL1Getter
             theLArSCL1Getter=LArSCL1Getter()
-        except:
+        except Exception:
             mlog.error("could not get handle to LArSCL1Getter Quit")
             traceback.print_exc()
             return False
@@ -34,7 +34,7 @@ class LArSCL1Getter ( Configured )  :
         # Instantiation of the C++ algorithm
         try:        
             from LArL1Sim.LArL1SimConf import LArSCL1Maker                
-        except:
+        except Exception:
             mlog.error("could not import LArL1Sim.LArSCL1Maker")
             traceback.print_exc()
             return False
@@ -53,13 +53,12 @@ class LArSCL1Getter ( Configured )  :
 
         theLArSCL1Maker.SCL1ContainerName = "LArDigitSCL1"
 
-        self._LArSCL1Maker = theLArSCL1Maker ;
+        self._LArSCL1Maker = theLArSCL1Maker
 
         from AthenaCommon.AlgSequence import AlgSequence
         topSequence = AlgSequence()
 
         # check if LArdigitization is run before. If yes, uses hit map from detector store produces from lardigitization
-        from Digitization.DigitizationFlags import jobproperties
         from AthenaCommon.DetFlags import DetFlags
         if DetFlags.digitize.LAr_on():
             mlog.info("Using hit map from LArDigitMaker algoritm")
diff --git a/LArCalorimeter/LArL1Sim/python/LArTTL1Getter.py b/LArCalorimeter/LArL1Sim/python/LArTTL1Getter.py
index 16c380d2fd57..b3a48e1d73e8 100644
--- a/LArCalorimeter/LArL1Sim/python/LArTTL1Getter.py
+++ b/LArCalorimeter/LArL1Sim/python/LArTTL1Getter.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
 
 # Author: F. Ledroit (ledroit@lpsc.in2p3.fr)
 # LArTTL1 creation from LArHits with LArTTL1Maker algorithm
@@ -20,7 +20,7 @@ class LArTTL1Getter ( Configured )  :
         try:
             from LArL1Sim.LArTTL1Getter import LArTTL1Getter
             theLArTTL1Getter=LArTTL1Getter()
-        except:
+        except Exception:
             mlog.error("could not get handle to LArTTL1Getter Quit")
             traceback.print_exc()
             return False
@@ -35,13 +35,13 @@ class LArTTL1Getter ( Configured )  :
         # Instantiation of the C++ algorithm
         try:        
             from LArL1Sim.LArL1SimConf import LArTTL1Maker                
-        except:
+        except Exception:
             mlog.error("could not import LArL1Sim.LArTTL1Maker")
             traceback.print_exc()
             return False
 
         theLArTTL1Maker=LArTTL1Maker()
-        self._LArTTL1Maker = theLArTTL1Maker ;
+        self._LArTTL1Maker = theLArTTL1Maker
 
         # Configure LArTTL1Maker here
         #theLArTTL1Maker.SubDetectors="LAr_All"
@@ -74,7 +74,6 @@ class LArTTL1Getter ( Configured )  :
         topSequence = AlgSequence()
 
         # check if LArdigitization is run before. If yes, uses hit map from detector store produces from lardigitization
-        from Digitization.DigitizationFlags import jobproperties
         from AthenaCommon.DetFlags import DetFlags
         if DetFlags.digitize.LAr_on():
             mlog.info("Using hit map from LArDigitMaker algoritm")
-- 
GitLab


From 79260c1e6df4a5dd46c58ad2e0420b043c56cd0e Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Wed, 7 Oct 2020 14:55:31 +0200
Subject: [PATCH 309/403] LArCalorimeter: cmake cleanup

Remove `atlas_depends_on_subdirs`, cleanup (link) dependencies, enable
flake8 where relevant.
---
 .../LArAlignmentAlgs/CMakeLists.txt           | 13 +----
 .../LArBadChannelTool/CMakeLists.txt          | 29 ++--------
 .../LArCOOLConditions/CMakeLists.txt          | 27 ++--------
 LArCalorimeter/LArCabling/CMakeLists.txt      | 29 ++--------
 .../LArCalibDataQuality/CMakeLists.txt        | 24 ++-------
 LArCalorimeter/LArCalibTools/CMakeLists.txt   | 40 ++------------
 LArCalorimeter/LArClusterRec/CMakeLists.txt   | 27 ++--------
 LArCalorimeter/LArIdentifier/CMakeLists.txt   | 34 +++---------
 LArCalorimeter/LArMonitoring/CMakeLists.txt   | 32 +----------
 LArCalorimeter/LArOnlDbPrep/CMakeLists.txt    | 26 ++-------
 LArCalorimeter/LArROD/CMakeLists.txt          | 33 ++----------
 .../LArRawConditions/CMakeLists.txt           | 36 ++-----------
 LArCalorimeter/LArRawEvent/CMakeLists.txt     | 20 ++-----
 LArCalorimeter/LArRawUtils/CMakeLists.txt     | 22 +-------
 .../LArRecConditions/CMakeLists.txt           | 35 ++++--------
 LArCalorimeter/LArRecEvent/CMakeLists.txt     | 26 ++-------
 LArCalorimeter/LArRecUtils/CMakeLists.txt     | 53 ++++---------------
 .../LArRegionSelector/CMakeLists.txt          | 28 +---------
 LArCalorimeter/LArSim/CMakeLists.txt          | 17 +-----
 LArCalorimeter/LArSimEvent/CMakeLists.txt     | 21 ++------
 LArCalorimeter/LArTBEvent/CMakeLists.txt      |  9 +---
 LArCalorimeter/LArTools/CMakeLists.txt        | 25 ++-------
 22 files changed, 85 insertions(+), 521 deletions(-)

diff --git a/LArCalorimeter/LArAlignment/LArAlignmentAlgs/CMakeLists.txt b/LArCalorimeter/LArAlignment/LArAlignmentAlgs/CMakeLists.txt
index 25a055221bcd..56a6ea1e5718 100644
--- a/LArCalorimeter/LArAlignment/LArAlignmentAlgs/CMakeLists.txt
+++ b/LArCalorimeter/LArAlignment/LArAlignmentAlgs/CMakeLists.txt
@@ -1,19 +1,8 @@
-################################################################################
-# Package: LArAlignmentAlgs
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArAlignmentAlgs )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Database/RegistrationServices
-                          GaudiKernel
-                          PRIVATE
-                          DetectorDescription/DetDescrCond/DetDescrConditions )
-
 # Component(s) in the package:
 atlas_add_component( LArAlignmentAlgs
                      src/*.cxx
diff --git a/LArCalorimeter/LArBadChannelTool/CMakeLists.txt b/LArCalorimeter/LArBadChannelTool/CMakeLists.txt
index b241c2c5c6f3..ad0d7d2571ad 100644
--- a/LArCalorimeter/LArBadChannelTool/CMakeLists.txt
+++ b/LArCalorimeter/LArBadChannelTool/CMakeLists.txt
@@ -1,55 +1,32 @@
-################################################################################
-# Package: LArBadChannelTool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArBadChannelTool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloConditions
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRecConditions
-                          LArCalorimeter/LArCabling )
-
 # External dependencies:
 find_package( COOL COMPONENTS CoolKernel )
 find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
 atlas_add_library( LArBadChannelToolLib
                    src/*.cxx
                    PUBLIC_HEADERS LArBadChannelTool
                    INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} CaloConditions CaloIdentifier AthenaBaseComps AthenaKernel AthenaPoolUtilities Identifier GaudiKernel LArIdentifier LArRecConditions StoreGateLib SGtests LArCablingLib
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
+                   LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} CaloIdentifier AthenaBaseComps AthenaKernel AthenaPoolUtilities Identifier GaudiKernel LArIdentifier LArRecConditions StoreGateLib LArCablingLib )
 
 atlas_add_component( LArBadChannelTool
                      src/components/*.cxx
-                     INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
                      LINK_LIBRARIES LArBadChannelToolLib )
 
 atlas_add_dictionary( BadChanDict
                       LArBadChannelTool/LArBadChannelDBToolsDict.h
                       LArBadChannelTool/selection.xml
-                      INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} CaloConditions CaloIdentifier AthenaBaseComps AthenaKernel StoreGateLib SGtests AthenaPoolUtilities Identifier GaudiKernel LArIdentifier LArRecConditions LArCablingLib LArBadChannelToolLib )
-
+                      LINK_LIBRARIES LArBadChannelToolLib )
 
 atlas_add_test( LArBadChannelConfigTest
    SCRIPT python -m LArBadChannelTool.LArBadChannelConfig
    POST_EXEC_SCRIPT nopost.sh )
 
-
 # Install files from the package:
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-ignore=F401,F821 )
diff --git a/LArCalorimeter/LArCOOLConditions/CMakeLists.txt b/LArCalorimeter/LArCOOLConditions/CMakeLists.txt
index 719c7aad5eb4..e4a3bfdda261 100644
--- a/LArCalorimeter/LArCOOLConditions/CMakeLists.txt
+++ b/LArCalorimeter/LArCOOLConditions/CMakeLists.txt
@@ -1,37 +1,20 @@
-################################################################################
-# Package: LArCOOLConditions
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArCOOLConditions )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          LArCalorimeter/LArCabling
-                          LArCalorimeter/LArElecCalib
-                          LArCalorimeter/LArIdentifier
-                          PRIVATE
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          Database/AthenaPOOL/AthenaPoolUtilities )
-
 # External dependencies:
 find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
 atlas_add_library( LArCOOLConditions
                    src/*.cxx
                    PUBLIC_HEADERS LArCOOLConditions
-                   PRIVATE_INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES Identifier GaudiKernel LArIdentifier LArCablingLib StoreGateLib SGtests LArElecCalib
-                   PRIVATE_LINK_LIBRARIES ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel AthenaPoolUtilities )
+                   PRIVATE_INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
+                   LINK_LIBRARIES AthenaKernel Identifier GaudiKernel LArIdentifier LArElecCalib
+                   PRIVATE_LINK_LIBRARIES ${CORAL_LIBRARIES} AthenaPoolUtilities StoreGateLib )
 
 atlas_add_dictionary( LArCOOLConditionsDict
                       LArCOOLConditions/LArCOOLConditionsDict.h
                       LArCOOLConditions/selection.xml
-                      INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} Identifier GaudiKernel LArCablingLib LArIdentifier AthenaKernel StoreGateLib SGtests AthenaPoolUtilities LArCOOLConditions )
-
+                      LINK_LIBRARIES LArCOOLConditions )
diff --git a/LArCalorimeter/LArCabling/CMakeLists.txt b/LArCalorimeter/LArCabling/CMakeLists.txt
index 2b24348c698a..e958c3fdd97d 100644
--- a/LArCalorimeter/LArCabling/CMakeLists.txt
+++ b/LArCalorimeter/LArCabling/CMakeLists.txt
@@ -1,46 +1,27 @@
-################################################################################
-# Package: LArCabling
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArCabling )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          Control/CxxUtils
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          LArCalorimeter/LArIdentifier
-                          PRIVATE
-                          Tools/PathResolver )
-
 # External dependencies:
 find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
-find_package( ROOT COMPONENTS RIO Core Tree MathCore Hist pthread )
 
 # Component(s) in the package:
 atlas_add_library( LArCablingLib
                    src/*.cxx
                    PUBLIC_HEADERS LArCabling
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
-                   LINK_LIBRARIES CaloIdentifier AthenaBaseComps AthenaKernel AthenaPoolUtilities Identifier GaudiKernel LArIdentifier StoreGateLib SGtests
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} PathResolver )
+                   PRIVATE_INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
+                   LINK_LIBRARIES CaloIdentifier AthenaBaseComps AthenaKernel AthenaPoolUtilities CxxUtils Identifier LArIdentifier StoreGateLib
+                   PRIVATE_LINK_LIBRARIES ${CORAL_LIBRARIES} PathResolver )
 
 atlas_add_component( LArCabling
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
                      LINK_LIBRARIES LArCablingLib )
 
 atlas_add_dictionary( LArCablingDict
                       LArCabling/LArCablingDict.h
                       LArCabling/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} CaloIdentifier AthenaBaseComps AthenaKernel StoreGateLib SGtests AthenaPoolUtilities Identifier GaudiKernel LArIdentifier PathResolver LArCablingLib )
+                      LINK_LIBRARIES LArCablingLib )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/LArCalorimeter/LArCalibDataQuality/CMakeLists.txt b/LArCalorimeter/LArCalibDataQuality/CMakeLists.txt
index 6d6d3b1bae43..2a3d854e8e1b 100644
--- a/LArCalorimeter/LArCalibDataQuality/CMakeLists.txt
+++ b/LArCalorimeter/LArCalibDataQuality/CMakeLists.txt
@@ -1,33 +1,15 @@
-################################################################################
-# Package: LArCalibDataQuality
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArCalibDataQuality )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaBaseComps
-                          Control/StoreGate
-                          GaudiKernel
-                          LArCalorimeter/LArRawConditions
-                          LArCalorimeter/LArRecConditions
-                          LArCalorimeter/LArCabling
-                          PRIVATE
-                          Event/xAOD/xAODEventInfo
-                          LArCalorimeter/LArElecCalib
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRawEvent )
-
 # Component(s) in the package:
 atlas_add_component( LArCalibDataQuality
                      src/*.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES CaloIdentifier AthenaBaseComps StoreGateLib SGtests GaudiKernel LArRawConditions LArRecConditions LArCablingLib xAODEventInfo LArIdentifier LArRawEvent )
+                     LINK_LIBRARIES CaloIdentifier AthenaBaseComps StoreGateLib GaudiKernel LArElecCalib LArRawConditions LArRecConditions LArCablingLib xAODEventInfo LArIdentifier LArRawEvent )
 
 # Install files from the package:
-atlas_install_headers( LArCalibDataQuality )
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py )
 
diff --git a/LArCalorimeter/LArCalibTools/CMakeLists.txt b/LArCalorimeter/LArCalibTools/CMakeLists.txt
index bc5520802b16..945a3c73452e 100644
--- a/LArCalorimeter/LArCalibTools/CMakeLists.txt
+++ b/LArCalorimeter/LArCalibTools/CMakeLists.txt
@@ -1,48 +1,18 @@
-################################################################################
-# Package: LArCalibTools
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArCalibTools )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaBaseComps
-                          Control/StoreGate
-                          GaudiKernel
-                          LArCalorimeter/LArCabling
-                          LArCalorimeter/LArElecCalib
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRawConditions
-                          LArCalorimeter/LArRecConditions
-                          LArCalorimeter/LArRawEvent
-                          LumiBlock/LumiBlockComps
-                          Trigger/TrigAnalysis/TrigDecisionTool
-                          PRIVATE
-                          Calorimeter/CaloCondBlobObjs
-                          Control/AthenaKernel
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Event/EventInfo
-                          Trigger/TrigAnalysis/TrigDecisionTool
-                          LumiBlock/LumiBlockData
-                          LArCalorimeter/LArCOOLConditions
-                          LArCalorimeter/LArRawEvent
-                          LArCalorimeter/LArCondUtils
-                          LArCalorimeter/LArTools )
-
 # External dependencies:
-find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint Graf Graf3d Gpad Html Postscript Gui GX11TTF GX11 )
+find_package( CORAL COMPONENTS CoralBase )
+find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO )
 
 # Component(s) in the package:
 atlas_add_component( LArCalibTools
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} CaloIdentifier AthenaBaseComps StoreGateLib SGtests GaudiKernel LArCablingLib LArIdentifier LArRawConditions LArRecConditions CaloCondBlobObjs AthenaKernel AthenaPoolUtilities EventInfo LArCOOLConditions LArRawEvent LArToolsLib TrigDecisionToolLib LumiBlockCompsLib )
+                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel AthenaPoolUtilities CaloCondBlobObjs CaloDetDescrLib CaloIdentifier EventInfo GaudiKernel LArCOOLConditions LArCablingLib LArElecCalib LArIdentifier LArRawConditions LArRawEvent LArRecConditions LArToolsLib LumiBlockData StoreGateLib TrigDecisionToolLib xAODEventInfo )
 
 # Install files from the package:
-atlas_install_headers( LArCalibTools )
 atlas_install_joboptions( share/*.py )
-
diff --git a/LArCalorimeter/LArClusterRec/CMakeLists.txt b/LArCalorimeter/LArClusterRec/CMakeLists.txt
index c108a617de4a..54e498696df0 100644
--- a/LArCalorimeter/LArClusterRec/CMakeLists.txt
+++ b/LArCalorimeter/LArClusterRec/CMakeLists.txt
@@ -1,36 +1,15 @@
-################################################################################
-# Package: LArClusterRec
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArClusterRec )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloEvent
-                          Calorimeter/CaloRec
-                          Control/AthenaBaseComps
-                          Control/StoreGate
-                          Event/xAOD/xAODCaloEvent
-                          GaudiKernel
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRecEvent
-                          LArCalorimeter/LArCabling
-                          PRIVATE
-                          Calorimeter/CaloUtils
-                          Control/AthContainers
-                          DetectorDescription/Identifier
-                          LArCalorimeter/LArRawEvent 
-			  LArCalorimeter/LArRecConditions)
-
 # Component(s) in the package:
 atlas_add_component( LArClusterRec
                      src/*.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES CaloEvent CaloRecLib AthenaBaseComps StoreGateLib SGtests xAODCaloEvent GaudiKernel LArIdentifier LArRecEvent LArCablingLib CaloUtilsLib AthContainers Identifier LArRawEvent )
+                     LINK_LIBRARIES CaloEvent CaloRecLib AthenaBaseComps StoreGateLib xAODCaloEvent GaudiKernel LArIdentifier LArRecEvent LArCablingLib CaloUtilsLib AthContainers Identifier LArRawEvent )
 
 # Install files from the package:
-atlas_install_headers( LArClusterRec )
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py )
 
diff --git a/LArCalorimeter/LArIdentifier/CMakeLists.txt b/LArCalorimeter/LArIdentifier/CMakeLists.txt
index 696ba6bdc479..75f9a77f4621 100644
--- a/LArCalorimeter/LArIdentifier/CMakeLists.txt
+++ b/LArCalorimeter/LArIdentifier/CMakeLists.txt
@@ -1,46 +1,28 @@
-################################################################################
-# Package: LArIdentifier
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArIdentifier )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          DetectorDescription/AtlasDetDescr
-                          DetectorDescription/IdDict
-                          DetectorDescription/Identifier
-                          PRIVATE
-                          Calorimeter/CaloIdentifier
-                          Control/StoreGate
-                          DetectorDescription/IdDictParser
-                          GaudiKernel )
-
 # External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
+find_package( Boost )
 
 # Component(s) in the package:
 atlas_add_library( LArIdentifier
                    src/*.cxx
                    PUBLIC_HEADERS LArIdentifier
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES AthenaKernel AtlasDetDescr IdDict Identifier StoreGateLib SGtests
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} CaloIdentifier AthenaKernel IdDictParser GaudiKernel )
+                   INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
+                   LINK_LIBRARIES ${Boost_LIBRARIES} AthenaKernel AtlasDetDescr IdDict Identifier StoreGateLib
+                   PRIVATE_LINK_LIBRARIES CaloIdentifier GaudiKernel )
 
 atlas_add_dictionary( LArIdentifierDict
                       LArIdentifier/LArIdentifierDict.h
                       LArIdentifier/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AtlasDetDescr IdDict Identifier CaloIdentifier AthenaKernel StoreGateLib SGtests IdDictParser GaudiKernel LArIdentifier )
+                      LINK_LIBRARIES LArIdentifier )
 
 atlas_add_executable( test_laronlineid
                       test/test_laronlineid.cxx
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AtlasDetDescr IdDict Identifier CaloIdentifier AthenaKernel StoreGateLib SGtests IdDictParser GaudiKernel LArIdentifier )
+                      LINK_LIBRARIES GaudiKernel IdDictParser LArIdentifier )
 
 atlas_add_executable( test_larhvid
                       test/test_larhvid.cxx
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AtlasDetDescr IdDict Identifier CaloIdentifier AthenaKernel StoreGateLib SGtests IdDictParser GaudiKernel LArIdentifier )
-
+                      LINK_LIBRARIES GaudiKernel IdDictParser LArIdentifier )
diff --git a/LArCalorimeter/LArMonitoring/CMakeLists.txt b/LArCalorimeter/LArMonitoring/CMakeLists.txt
index 31507db6ee03..8419ede74db4 100644
--- a/LArCalorimeter/LArMonitoring/CMakeLists.txt
+++ b/LArCalorimeter/LArMonitoring/CMakeLists.txt
@@ -1,35 +1,8 @@
-################################################################################
-# Package: LArMonitoring
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArMonitoring )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloGeoHelpers
-                          Calorimeter/CaloIdentifier
-                          Calorimeter/CaloInterface
-                          Control/AthenaMonitoring
-                          DetectorDescription/Identifier
-                          Event/EventContainers
-                          LArCalorimeter/LArElecCalib
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRawEvent
-                          LArCalorimeter/LArRecConditions
-                          LArCalorimeter/LArCabling
-                          Trigger/TrigAnalysis/TrigDecisionTool
-                          PRIVATE
-                          Calorimeter/CaloConditions
-                          Control/AthenaKernel
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Event/xAOD/xAODEventInfo
-                          Trigger/TrigAnalysis/TrigAnalysisInterfaces
-                          LArCalorimeter/LArCOOLConditions
-                          LArCalorimeter/LArRawConditions
-                          LArCalorimeter/LArRecEvent )
-
 # External dependencies:
 find_package( Boost COMPONENTS filesystem thread system )
 find_package( CLHEP )
@@ -43,6 +16,5 @@ atlas_add_component( LArMonitoring
                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} CaloDetDescrLib CaloGeoHelpers CaloIdentifier AthenaMonitoringLib  SGtests Identifier LArIdentifier LArRawEvent LArRecConditions LArCablingLib TrigDecisionToolLib CaloConditions AthenaKernel AthenaPoolUtilities xAODEventInfo LArCOOLConditions LArRawConditions LArRecEvent )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py 
-  POST_BUILD_CMD ${ATLAS_FLAKE8} )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.txt share/*.py )
diff --git a/LArCalorimeter/LArOnlDbPrep/CMakeLists.txt b/LArCalorimeter/LArOnlDbPrep/CMakeLists.txt
index 4bd32ce71f6e..c35e7186ad9f 100644
--- a/LArCalorimeter/LArOnlDbPrep/CMakeLists.txt
+++ b/LArCalorimeter/LArOnlDbPrep/CMakeLists.txt
@@ -1,40 +1,20 @@
-################################################################################
-# Package: LArOnlDbPrep
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArOnlDbPrep )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-                          Calorimeter/CaloTriggerTool
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          LArCalorimeter/LArRecConditions
-                          LArCalorimeter/LArCabling
-                          PRIVATE
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloInterface
-                          Control/StoreGate
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          LArCalorimeter/LArCOOLConditions
-                          LArCalorimeter/LArIdentifier )
-
 # External dependencies:
 find_package( COOL COMPONENTS CoolKernel )
 find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
 atlas_add_component( LArOnlDbPrep
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${COOL_LIBRARIES} ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} CaloIdentifier CaloTriggerToolLib AthenaBaseComps GaudiKernel LArRecConditions LArCablingLib CaloDetDescrLib StoreGateLib SGtests AthenaPoolUtilities LArCOOLConditions LArIdentifier CaloInterfaceLib )
+                     INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} CaloIdentifier CaloTriggerToolLib AthenaBaseComps GaudiKernel LArRecConditions LArCablingLib CaloDetDescrLib StoreGateLib AthenaPoolUtilities LArCOOLConditions LArIdentifier CaloInterfaceLib )
 
 # Install files from the package:
-atlas_install_headers( LArOnlDbPrep )
 atlas_install_joboptions( share/*.py )
 atlas_install_scripts( share/*.sh )
 
diff --git a/LArCalorimeter/LArROD/CMakeLists.txt b/LArCalorimeter/LArROD/CMakeLists.txt
index ad2d74386b4d..c53b25571f05 100644
--- a/LArCalorimeter/LArROD/CMakeLists.txt
+++ b/LArCalorimeter/LArROD/CMakeLists.txt
@@ -1,35 +1,8 @@
-################################################################################
-# Package: LArROD
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArROD )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaBaseComps
-                          Control/StoreGate
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          LArCalorimeter/LArCabling
-                          LArCalorimeter/LArElecCalib
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRawConditions
-                          LArCalorimeter/LArRawEvent
-                          LArCalorimeter/LArRawUtils
-                          LArCalorimeter/LArRecConditions
-                          LArCalorimeter/LArRecUtils
-                          TestBeam/TBEvent
-                          PRIVATE
-                          Control/CxxUtils
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloEvent
-                          Commission/CommissionEvent
-                          Control/AthContainers
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          LArCalorimeter/LArCOOLConditions )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
@@ -42,8 +15,8 @@ atlas_add_library( LArRODLib
                    INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                    DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${CLHEP_LIBRARIES} CaloIdentifier AthenaBaseComps Identifier GaudiKernel LArIdentifier LArRawConditions LArRawEvent LArRecConditions TBEvent StoreGateLib SGtests LArCablingLib LArRawUtilsLib LArRecUtilsLib CaloDetDescrLib
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} CaloEvent CommissionEvent AthContainers AthenaPoolUtilities LArCOOLConditions )
+                   LINK_LIBRARIES ${CLHEP_LIBRARIES} CaloIdentifier AthContainers AthenaBaseComps AthenaPoolUtilities Identifier GaudiKernel LArIdentifier LArRawConditions LArRawEvent LArRecConditions TBEvent StoreGateLib LArCablingLib LArElecCalib LArRawUtilsLib LArRecUtilsLib
+                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} CaloEvent CaloDetDescrLib CommissionEvent LArCOOLConditions )
 
 atlas_add_component( LArROD
                      src/components/*.cxx
diff --git a/LArCalorimeter/LArRawConditions/CMakeLists.txt b/LArCalorimeter/LArRawConditions/CMakeLists.txt
index 645d7097b233..92accfdbc3bb 100644
--- a/LArCalorimeter/LArRawConditions/CMakeLists.txt
+++ b/LArCalorimeter/LArRawConditions/CMakeLists.txt
@@ -1,56 +1,28 @@
-################################################################################
-# Package: LArRawConditions
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArRawConditions )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaKernel
-                          Control/AthContainers
-                          Control/SGTools
-                          Control/StoreGate
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          LArCalorimeter/LArElecCalib
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArCabling
-                          LArCalorimeter/LArRecConditions
-                          PRIVATE
-                          DetectorDescription/IdDictParser
-                          LArCalorimeter/LArTools )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_library( LArRawConditions
                    src/*.cxx
                    PUBLIC_HEADERS LArRawConditions
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES CaloIdentifier AthenaKernel AthContainers SGTools AthenaPoolUtilities Identifier GaudiKernel LArIdentifier StoreGateLib SGtests LArToolsLib LArCablingLib LArRecConditions
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
+                   LINK_LIBRARIES CaloIdentifier AthenaKernel AthContainers AthenaPoolUtilities Identifier GaudiKernel LArIdentifier StoreGateLib LArElecCalib LArCablingLib )
 
 atlas_add_dictionary( LArRawConditions1Dict
                       LArRawConditions/LArRawConditionsDict1.h
                       LArRawConditions/selection1.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} CaloIdentifier AthenaKernel AthContainers SGTools StoreGateLib SGtests AthenaPoolUtilities Identifier GaudiKernel LArIdentifier LArToolsLib LArCablingLib LArRawConditions LArRecConditions)
+                      LINK_LIBRARIES LArRawConditions )
 
 atlas_add_dictionary( LArRawConditions2Dict
                       LArRawConditions/LArRawConditionsDict2.h
                       LArRawConditions/selection2.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} CaloIdentifier AthenaKernel AthContainers SGTools StoreGateLib SGtests AthenaPoolUtilities Identifier GaudiKernel LArIdentifier LArToolsLib LArCablingLib LArRawConditions )
+                      LINK_LIBRARIES LArRawConditions )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/*.py )
 
-
 atlas_add_test( LArConditionsContainerDB_test
    SOURCES test/LArConditionsContainerDB_test.cxx
    LINK_LIBRARIES LArRawConditions )
diff --git a/LArCalorimeter/LArRawEvent/CMakeLists.txt b/LArCalorimeter/LArRawEvent/CMakeLists.txt
index a2b566bebfee..708999adfe5b 100644
--- a/LArCalorimeter/LArRawEvent/CMakeLists.txt
+++ b/LArCalorimeter/LArRawEvent/CMakeLists.txt
@@ -1,34 +1,20 @@
-################################################################################
-# Package: LArRawEvent
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArRawEvent )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaKernel
-                          Control/AthContainers
-                          DetectorDescription/Identifier )
-
 # External dependencies:
 find_package( CLHEP )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
 atlas_add_library( LArRawEvent
                    src/*.cxx
                    PUBLIC_HEADERS LArRawEvent
                    INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                    DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${CLHEP_LIBRARIES} CaloIdentifier AthContainers Identifier
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaKernel )
+                   LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaKernel CaloIdentifier AthContainers Identifier )
 
 atlas_add_dictionary( LArRawEventDict
                       LArRawEvent/LArRawEventDict.h
                       LArRawEvent/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} CaloIdentifier AthContainers Identifier AthenaKernel LArRawEvent )
-
+                      LINK_LIBRARIES LArRawEvent )
diff --git a/LArCalorimeter/LArRawUtils/CMakeLists.txt b/LArCalorimeter/LArRawUtils/CMakeLists.txt
index 5c672622a834..1eacf72f7c56 100644
--- a/LArCalorimeter/LArRawUtils/CMakeLists.txt
+++ b/LArCalorimeter/LArRawUtils/CMakeLists.txt
@@ -1,31 +1,13 @@
-################################################################################
-# Package: LArRawUtils
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArRawUtils )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-                          Calorimeter/CaloTTDetDescr
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRawEvent
-                          Calorimeter/CaloTriggerTool
-                          PRIVATE
-                          DetectorDescription/AtlasDetDescr
-                          LArCalorimeter/LArCabling )
-
 # Component(s) in the package:
 atlas_add_library( LArRawUtilsLib
                    src/*.cxx
                    PUBLIC_HEADERS LArRawUtils
-                   LINK_LIBRARIES CaloIdentifier CaloTTDetDescr AthenaBaseComps AthenaKernel Identifier GaudiKernel LArIdentifier LArRawEvent StoreGateLib SGtests CaloTriggerToolLib LArToolsLib
+                   LINK_LIBRARIES CaloIdentifier CaloTTDetDescr AthenaBaseComps AthenaKernel Identifier GaudiKernel LArCablingLib LArIdentifier LArRawEvent StoreGateLib CaloTriggerToolLib
                    PRIVATE_LINK_LIBRARIES AtlasDetDescr )
 
 atlas_add_component( LArRawUtils
diff --git a/LArCalorimeter/LArRecConditions/CMakeLists.txt b/LArCalorimeter/LArRecConditions/CMakeLists.txt
index bd92fe9a79be..6e20c9ac90d0 100644
--- a/LArCalorimeter/LArRecConditions/CMakeLists.txt
+++ b/LArCalorimeter/LArRecConditions/CMakeLists.txt
@@ -1,41 +1,26 @@
-################################################################################
-# Package: LArRecConditions
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArRecConditions )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-			  LArCalorimeter/LArIdentifier
-                          Control/AthenaKernel
-                          Control/AthenaBaseComps
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          PRIVATE
-			  LArCalorimeter/LArElecCalib
-			  LArCalorimeter/LArCabling )
-
 # External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
+find_package( CORAL COMPONENTS CoralBase )
 
 # Component(s) in the package:
 atlas_add_library( LArRecConditions
                    src/*.cxx
                    PUBLIC_HEADERS LArRecConditions
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES CaloIdentifier LArIdentifier AthenaKernel Identifier GaudiKernel AthenaBaseComps LArElecCalib LArCablingLib
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
+                   INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
+                   LINK_LIBRARIES ${CORAL_LIBRARIES} CaloIdentifier AthenaKernel Identifier GaudiKernel AthenaBaseComps LArElecCalib LArCablingLib
+                   PRIVATE_LINK_LIBRARIES LArIdentifier )
 
 atlas_add_dictionary( LArRecConditionsDict
                       LArRecConditions/LArRecConditionsDict.h
                       LArRecConditions/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} CaloIdentifier AthenaKernel Identifier GaudiKernel LArRecConditions)
+                      LINK_LIBRARIES LArRecConditions )
 
+# Test(s) in the package:
 atlas_add_test (test_LArBadChannelCont
-	        SOURCES
-	        test/test_LArBadChannelCont.cxx
-                LINK_LIBRARIES Identifier CxxUtils StoreGateLib LArRecConditions 
-               )
+                SOURCES
+	            test/test_LArBadChannelCont.cxx
+                LINK_LIBRARIES LArRecConditions )
diff --git a/LArCalorimeter/LArRecEvent/CMakeLists.txt b/LArCalorimeter/LArRecEvent/CMakeLists.txt
index 1f4fa867e5d1..efd6bcdb7bcf 100644
--- a/LArCalorimeter/LArRecEvent/CMakeLists.txt
+++ b/LArCalorimeter/LArRecEvent/CMakeLists.txt
@@ -1,34 +1,16 @@
-################################################################################
-# Package: LArRecEvent
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArRecEvent )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloEvent
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaKernel
-                          Control/AthContainers
-                          DetectorDescription/Identifier
-                          PRIVATE
-                          Event/FourMomUtils )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_library( LArRecEvent
                    src/*.cxx
                    PUBLIC_HEADERS LArRecEvent
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES CaloEvent CaloIdentifier AthContainers Identifier
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} FourMomUtils )
+                   LINK_LIBRARIES CaloEvent CaloIdentifier AthContainers AthenaKernel Identifier
+                   PRIVATE_LINK_LIBRARIES FourMomUtils )
 
 atlas_add_dictionary( LArRecEventDict
                       LArRecEvent/LArRecEventDict.h
                       LArRecEvent/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} CaloEvent CaloIdentifier AthContainers Identifier FourMomUtils LArRecEvent )
-
+                      LINK_LIBRARIES LArRecEvent )
diff --git a/LArCalorimeter/LArRecUtils/CMakeLists.txt b/LArCalorimeter/LArRecUtils/CMakeLists.txt
index e670a84e2228..56bef521ae13 100644
--- a/LArCalorimeter/LArRecUtils/CMakeLists.txt
+++ b/LArCalorimeter/LArRecUtils/CMakeLists.txt
@@ -1,67 +1,32 @@
-################################################################################
-# Package: LArRecUtils
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArRecUtils )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloEvent
-                          Calorimeter/CaloIdentifier
-                          Calorimeter/CaloInterface
-                          Calorimeter/CaloUtils
-                          Calorimeter/CaloConditions
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/AthAllocators
-                          Control/StoreGate
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          LArCalorimeter/LArCabling
-                          LArCalorimeter/LArElecCalib
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRawConditions
-                          LArCalorimeter/LArRawEvent
-                          LArCalorimeter/LArRecEvent
-                          PRIVATE
-                          AtlasTest/TestTools
-                          Calorimeter/CaloGeoHelpers
-                          Control/SGTools
-                          Event/xAOD/xAODEventInfo
-                          LArCalorimeter/LArCOOLConditions
-			  LArCalorimeter/LArRecConditions
-                          LArCalorimeter/LArRawUtils
-                          Tools/PathResolver )
-
 # External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
+find_package( Boost )
 find_package( CLHEP )
 find_package( Eigen )
-find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
+find_package( CORAL COMPONENTS CoralBase )
 
 # Component(s) in the package:
 atlas_add_library( LArRecUtilsLib
                    src/*.cxx
                    PUBLIC_HEADERS LArRecUtils
-                   INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
-                   PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
+                   PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
                    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${CORAL_LIBRARIES} ${EIGEN_LIBRARIES} CaloEvent CaloIdentifier AthenaBaseComps AthenaKernel AthAllocators AthenaPoolUtilities Identifier GaudiKernel LArIdentifier LArRawEvent LArRecEvent CaloDetDescrLib CaloUtilsLib StoreGateLib SGtests LArCablingLib LArRawUtilsLib LArRecConditions LArRawConditions
-                   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} TestTools CaloGeoHelpers SGTools xAODEventInfo LArCOOLConditions PathResolver CaloConditions )
+                   LINK_LIBRARIES AthAllocators AthenaBaseComps AthenaKernel CaloIdentifier CaloUtilsLib LArCOOLConditions LArElecCalib LArIdentifier LArRawEvent LArRecConditions LArRecEvent StoreGateLib
+                   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} ${CORAL_LIBRARIES} ${EIGEN_LIBRARIES} ${ROOT_LIBRARIES} AthenaPoolUtilities CaloConditions CaloDetDescrLib CaloEvent CaloGeoHelpers CaloInterfaceLib GaudiKernel Identifier LArCablingLib LArHV LArRawConditions LArRawUtilsLib LArReadoutGeometry PathResolver SGTools )
 
 atlas_add_component( LArRecUtils
                      src/components/*.cxx
-                     INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} CaloDetDescrLib CaloEvent CaloIdentifier CaloUtilsLib AthenaBaseComps AthenaKernel AthAllocators StoreGateLib SGtests AthenaPoolUtilities Identifier GaudiKernel LArCablingLib LArIdentifier LArRawConditions LArRawEvent LArRecEvent TestTools CaloGeoHelpers SGTools xAODEventInfo LArCOOLConditions LArRawUtilsLib PathResolver LArRecUtilsLib LArRecConditions LArRawConditions CaloConditions)
+                     LINK_LIBRARIES LArRecUtilsLib )
 
+# Test(s) in the package:
 atlas_add_test( dummy_test
                 SOURCES
                 test/dummy_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} CaloDetDescrLib CaloEvent CaloIdentifier CaloUtilsLib AthenaBaseComps AthenaKernel AthAllocators StoreGateLib SGtests AthenaPoolUtilities Identifier GaudiKernel LArCablingLib LArIdentifier LArRawConditions LArRawEvent LArRecEvent TestTools CaloGeoHelpers SGTools xAODEventInfo LArCOOLConditions LArRawUtilsLib CaloConditions PathResolver LArRecUtilsLib )
+                LINK_LIBRARIES LArRecUtilsLib )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/LArCalorimeter/LArRegionSelector/CMakeLists.txt b/LArCalorimeter/LArRegionSelector/CMakeLists.txt
index f616cf4727e5..46f91af19306 100644
--- a/LArCalorimeter/LArRegionSelector/CMakeLists.txt
+++ b/LArCalorimeter/LArRegionSelector/CMakeLists.txt
@@ -1,30 +1,8 @@
-################################################################################
-# Package: LArRegionSelector
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArRegionSelector )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaBaseComps
-                          DetectorDescription/Identifier
-                          DetectorDescription/IRegionSelector
-                          DetectorDescription/RegionSelector
-                          DetectorDescription/RegSelLUT
-			  InnerDetector/InDetConditions/PixelConditionsData
-                          GaudiKernel
-                          PRIVATE
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloTTDetDescr
-                          Calorimeter/CaloTriggerTool
-                          Control/StoreGate
-                          Event/ByteStreamData
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRawUtils
-                          LArCalorimeter/LArCabling )
-
 # External dependencies:
 find_package( tdaq-common )
 
@@ -33,9 +11,7 @@ atlas_add_component( LArRegionSelector
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} CaloIdentifier AthenaBaseComps Identifier RegionSelectorLib GaudiKernel CaloDetDescrLib CaloTTDetDescr CaloTriggerToolLib StoreGateLib SGtests ByteStreamData ByteStreamData_test LArIdentifier LArRawUtilsLib LArCablingLib PixelConditionsData )
+                     LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} CaloIdentifier AthenaBaseComps Identifier IRegionSelector RegionSelectorLib GaudiKernel CaloDetDescrLib CaloTTDetDescr CaloTriggerToolLib StoreGateLib ByteStreamData LArIdentifier LArRawUtilsLib PixelConditionsData )
 
 # Install files from the package:
-atlas_install_headers( LArRegionSelector )
 atlas_install_joboptions( share/*.py )
-
diff --git a/LArCalorimeter/LArSim/CMakeLists.txt b/LArCalorimeter/LArSim/CMakeLists.txt
index 6bac08440bc8..eb83225f98bc 100644
--- a/LArCalorimeter/LArSim/CMakeLists.txt
+++ b/LArCalorimeter/LArSim/CMakeLists.txt
@@ -1,26 +1,13 @@
-################################################################################
-# Package: LArSim
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArSim )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          LArCalorimeter/LArSimEvent
-                          PRIVATE
-                          Calorimeter/CaloIdentifier
-                          Control/StoreGate )
-
 # Component(s) in the package:
 atlas_add_component( LArSim
                      src/*.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES AthenaBaseComps GaudiKernel LArSimEvent CaloIdentifier StoreGateLib SGtests )
+                     LINK_LIBRARIES AthenaBaseComps GaudiKernel LArSimEvent CaloIdentifier StoreGateLib )
 
 # Install files from the package:
-atlas_install_headers( LArSim )
 atlas_install_joboptions( share/*.txt share/*.py )
-
diff --git a/LArCalorimeter/LArSimEvent/CMakeLists.txt b/LArCalorimeter/LArSimEvent/CMakeLists.txt
index 48067c191d90..6fca6c432026 100644
--- a/LArCalorimeter/LArSimEvent/CMakeLists.txt
+++ b/LArCalorimeter/LArSimEvent/CMakeLists.txt
@@ -1,35 +1,20 @@
-################################################################################
-# Package: LArSimEvent
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArSimEvent )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          DetectorDescription/Identifier
-                          Simulation/HitManagement
-                          PRIVATE
-                          Control/StoreGate )
-
 # External dependencies:
 find_package( CLHEP )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
 atlas_add_library( LArSimEvent
                    src/*.cxx
                    PUBLIC_HEADERS LArSimEvent
                    INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                    DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaKernel Identifier HitManagement StoreGateLib SGtests
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
+                   LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaKernel Identifier HitManagement StoreGateLib )
 
 atlas_add_dictionary( LArSimEventDict
                       LArSimEvent/LArSimEventDict.h
                       LArSimEvent/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel Identifier HitManagement StoreGateLib SGtests LArSimEvent )
-
+                      LINK_LIBRARIES LArSimEvent )
diff --git a/LArCalorimeter/LArTBEvent/CMakeLists.txt b/LArCalorimeter/LArTBEvent/CMakeLists.txt
index fdc8a60c5c6b..d70559557f2e 100644
--- a/LArCalorimeter/LArTBEvent/CMakeLists.txt
+++ b/LArCalorimeter/LArTBEvent/CMakeLists.txt
@@ -1,15 +1,8 @@
-################################################################################
-# Package: LArTBEvent
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArTBEvent )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthContainers
-                          Control/AthenaKernel )
-
 # Component(s) in the package:
 atlas_add_library( LArTBEvent
                    src/*.cxx
diff --git a/LArCalorimeter/LArTools/CMakeLists.txt b/LArCalorimeter/LArTools/CMakeLists.txt
index 5d16c2c0c279..cc3b936ceafb 100644
--- a/LArCalorimeter/LArTools/CMakeLists.txt
+++ b/LArCalorimeter/LArTools/CMakeLists.txt
@@ -1,23 +1,8 @@
-################################################################################
-# Package: LArTools
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArTools )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          LArCalorimeter/LArCabling
-                          LArCalorimeter/LArElecCalib
-                          PRIVATE
-                          Calorimeter/CaloIdentifier
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          LArCalorimeter/LArRecConditions )
-
 # External dependencies:
 find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
 find_package( ROOT COMPONENTS RIO Core Tree MathCore Hist pthread )
@@ -27,19 +12,17 @@ atlas_add_library( LArToolsLib
                    src/*.cxx
                    PUBLIC_HEADERS LArTools
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
-                   LINK_LIBRARIES AthenaBaseComps AthenaKernel Identifier GaudiKernel LArCablingLib LArElecCalib
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} CaloIdentifier AthenaPoolUtilities LArRecConditions )
+                   LINK_LIBRARIES AthenaBaseComps AthenaKernel CxxUtils Identifier GaudiKernel LArElecCalib
+                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} CaloIdentifier AthenaPoolUtilities LArCablingLib LArRecConditions )
 
 atlas_add_component( LArTools
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
                      LINK_LIBRARIES LArToolsLib )
 
 atlas_add_dictionary( LArToolsDict
                       LArTools/LArToolsDict.h
                       LArTools/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel Identifier GaudiKernel LArCablingLib CaloIdentifier AthenaPoolUtilities LArRecConditions LArToolsLib )
+                      LINK_LIBRARIES LArToolsLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
-- 
GitLab


From c59e7ce5e0fa086edc99550b772a69d230ace0c2 Mon Sep 17 00:00:00 2001
From: Edward Moyse <edward.moyse@cern.ch>
Date: Wed, 7 Oct 2020 15:04:29 +0200
Subject: [PATCH 310/403] Add missing ATH_CHECK for ToolHandle in initialise

---
 .../MdtSegmentT0Fitter/src/MdtSegmentT0Fitter.cxx               | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MdtSegmentT0Fitter/src/MdtSegmentT0Fitter.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MdtSegmentT0Fitter/src/MdtSegmentT0Fitter.cxx
index 60f43aac7fe2..72dc6102c55a 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MdtSegmentT0Fitter/src/MdtSegmentT0Fitter.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MdtSegmentT0Fitter/src/MdtSegmentT0Fitter.cxx
@@ -62,6 +62,8 @@ namespace TrkDriftCircleMath {
     m_minuit->SetPrintLevel(-1); // -1: no output, 1: std output
     if( msgLvl(MSG::VERBOSE) ) m_minuit->SetPrintLevel(1);
     gMinuit = oldMinuit;
+    
+    ATH_CHECK(m_calibrationDbTool.retrieve());
 
     return StatusCode::SUCCESS;
   }
-- 
GitLab


From 6ec11067c92215d656cdf3ab887cbd9125f254b3 Mon Sep 17 00:00:00 2001
From: Daniela Boerner <daniela.boerner@cern.ch>
Date: Wed, 7 Oct 2020 16:08:13 +0200
Subject: [PATCH 311/403] increase energy threshold to 700

---
 Reconstruction/egamma/egammaAlgs/src/egammaTopoClusterCopier.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaTopoClusterCopier.h b/Reconstruction/egamma/egammaAlgs/src/egammaTopoClusterCopier.h
index 7661343ec097..31ba4c5f2d5e 100644
--- a/Reconstruction/egamma/egammaAlgs/src/egammaTopoClusterCopier.h
+++ b/Reconstruction/egamma/egammaAlgs/src/egammaTopoClusterCopier.h
@@ -44,7 +44,7 @@ class egammaTopoClusterCopier : public AthReentrantAlgorithm {
       "View container of selected topoclusters"};
 
   Gaudi::Property<float> m_etaCut {this, "EtaCut", 2.6, "maximum |eta| of selected clusters"};
-  Gaudi::Property<float> m_ECut {this, "ECut", 500, "minimum energy of selected clusters"};
+  Gaudi::Property<float> m_ECut {this, "ECut", 700, "minimum energy of selected clusters"};
   Gaudi::Property<float> m_EMFracCut {this, "EMFracCut", 0.5, "mimimum EM fraction"};
  
   mutable Gaudi::Accumulators::Counter<long int>                     m_AllClusters;            
-- 
GitLab


From 1c0a1202a4d5ef9c65842b3126e94e8281ea4d63 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Wed, 7 Oct 2020 16:15:07 +0200
Subject: [PATCH 312/403] Generators: cleanup cmake of generator interface
 packages

Remove `atlas_depends_on_subdirs` and cleanup link dependencies.
---
 Generators/Charybdis_i/CMakeLists.txt     |  9 +-------
 Generators/Epos_i/CMakeLists.txt          | 16 ++-------------
 Generators/EvtGen_i/CMakeLists.txt        | 19 ++---------------
 Generators/HepMCAnalysis_i/CMakeLists.txt | 18 +---------------
 Generators/Herwig7_i/CMakeLists.txt       | 14 +------------
 Generators/Hijing_i/CMakeLists.txt        | 21 ++-----------------
 Generators/Hydjet_i/CMakeLists.txt        | 25 ++++-------------------
 Generators/Lhef_i/CMakeLists.txt          |  8 +-------
 Generators/MCTester_i/CMakeLists.txt      | 14 +------------
 Generators/Photospp_i/CMakeLists.txt      | 13 +-----------
 Generators/ProtosLHEF_i/CMakeLists.txt    | 11 +---------
 Generators/Pythia8B_i/CMakeLists.txt      | 13 +-----------
 Generators/Pythia8_i/CMakeLists.txt       | 14 +------------
 Generators/QGSJet_i/CMakeLists.txt        | 13 +-----------
 Generators/Sherpa_i/CMakeLists.txt        | 14 +------------
 Generators/Starlight_i/CMakeLists.txt     | 22 ++++----------------
 16 files changed, 25 insertions(+), 219 deletions(-)

diff --git a/Generators/Charybdis_i/CMakeLists.txt b/Generators/Charybdis_i/CMakeLists.txt
index fc93de5edb0f..37ff118e17c9 100644
--- a/Generators/Charybdis_i/CMakeLists.txt
+++ b/Generators/Charybdis_i/CMakeLists.txt
@@ -1,15 +1,8 @@
-################################################################################
-# Package: Charybdis_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( Charybdis_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PRIVATE
-   Generators/GeneratorFortranCommon )
-
 # External dependencies:
 find_package( Herwig )
 find_package( Lhapdf )
diff --git a/Generators/Epos_i/CMakeLists.txt b/Generators/Epos_i/CMakeLists.txt
index 922105d3edaa..46318ba51bb3 100644
--- a/Generators/Epos_i/CMakeLists.txt
+++ b/Generators/Epos_i/CMakeLists.txt
@@ -1,19 +1,8 @@
-################################################################################
-# Package: Epos_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( Epos_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Generators/GeneratorModules
-                          Generators/AtlasHepMC
-                          PRIVATE
-                          Control/AthenaKernel
-                          GaudiKernel
-                          Generators/TruthUtils )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( Crmc COMPONENTS Epos )
@@ -36,8 +25,7 @@ atlas_add_library( Epos_iLib
 
 atlas_add_component( Epos_i
                      src/components/*.cxx
-                     INCLUDE_DIRS ${CRMC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${CRMC_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AtlasHepMCfioLib GeneratorModulesLib AthenaKernel GaudiKernel TruthUtils Epos_iLib )
+                     LINK_LIBRARIES Epos_iLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/Generators/EvtGen_i/CMakeLists.txt b/Generators/EvtGen_i/CMakeLists.txt
index 5b34b7b6f48c..d4ef9a781c24 100644
--- a/Generators/EvtGen_i/CMakeLists.txt
+++ b/Generators/EvtGen_i/CMakeLists.txt
@@ -1,26 +1,12 @@
-################################################################################
-# Package: EvtGen_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( EvtGen_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/StoreGate
-                          GaudiKernel
-                          Generators/GeneratorModules
-                          Generators/GeneratorObjects
-                          Generators/AtlasHepMC
-                          PRIVATE
-                          Control/AthenaKernel )
-
 #set( PHOTOSPP_VERSION 3.61 )
 #set( PHOTOSPP_ROOT
 #   /cvmfs/sft.cern.ch/lcg/releases/LCG_88/MCGenerators/photos++/${PHOTOSPP_VERSION}/${LCG_PLATFORM} )
 
-
-
 # External dependencies:
 find_package( Boost COMPONENTS filesystem thread system )
 find_package( CLHEP )
@@ -58,8 +44,7 @@ atlas_add_library( EvtGen_iLib
 
 atlas_add_component( EvtGen_i
                      src/components/*.cxx
-                     INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${HEPPDT_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${PYTHIA8_INCLUDE_DIRS} ${PHOTOSPP_INCLUDE_DIRS} ${TAUOLAPP_INCLUDE_DIRS}  ${EVTGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${Boost_LIBRARIES} ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${PYTHIA8_LIBRARIES} ${PHOTOSPP_LIBRARIES} ${TAUOLAPP_LIBRARIES} AtlasHepMCLib ${EVTGEN_LIBRARIES} StoreGateLib SGtests GaudiKernel GeneratorModulesLib GeneratorObjects AthenaKernel EvtGen_iLib )
+                     LINK_LIBRARIES EvtGen_iLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/common/*.py )
diff --git a/Generators/HepMCAnalysis_i/CMakeLists.txt b/Generators/HepMCAnalysis_i/CMakeLists.txt
index b970fb62fa61..832b31e70c13 100644
--- a/Generators/HepMCAnalysis_i/CMakeLists.txt
+++ b/Generators/HepMCAnalysis_i/CMakeLists.txt
@@ -1,22 +1,8 @@
-################################################################################
-# Package: HepMCAnalysis_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( HepMCAnalysis_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/AthenaBaseComps
-   GaudiKernel
-   Generators/AtlasHepMC
-   PRIVATE
-   Control/StoreGate
-   Event/EventInfo
-   Generators/GeneratorObjects
-   Generators/TruthUtils )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( HEPUtils )
@@ -30,8 +16,6 @@ else()
 set( HEPMC_HepMCAnalysis_INTERFACE_DIR  )
 endif()
 
-
-
 # Component(s) in the package:
 atlas_add_component( HepMCAnalysis_i
    HepMCAnalysis_i/*.h src/*.cxx src/components/*.cxx
diff --git a/Generators/Herwig7_i/CMakeLists.txt b/Generators/Herwig7_i/CMakeLists.txt
index c58fcf1986d0..0c4b498f6801 100644
--- a/Generators/Herwig7_i/CMakeLists.txt
+++ b/Generators/Herwig7_i/CMakeLists.txt
@@ -1,20 +1,8 @@
-################################################################################
-# Package: Herwig7_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( Herwig7_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Generators/GeneratorModules
-   Generators/AtlasHepMC
-   PRIVATE
-   Event/EventInfo
-   GaudiKernel
-   Tools/PathResolver )
-
 # External dependencies:
 find_package( Boost )
 find_package( Herwig3 COMPONENTS HerwigAPI )
diff --git a/Generators/Hijing_i/CMakeLists.txt b/Generators/Hijing_i/CMakeLists.txt
index 9eb1adf6f6d3..ff26151c56c5 100644
--- a/Generators/Hijing_i/CMakeLists.txt
+++ b/Generators/Hijing_i/CMakeLists.txt
@@ -1,25 +1,8 @@
-################################################################################
-# Package: Hijing_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( Hijing_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Generators/GeneratorFortranCommon
-   Generators/GeneratorModules
-   Generators/AtlasHepMC
-   Control/CxxUtils
-   PRIVATE
-   Control/AthenaKernel
-   Control/StoreGate
-   GaudiKernel
-   Generators/GeneratorObjects
-   Generators/GeneratorUtils
-   Generators/TruthUtils )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( Hijing )
@@ -38,7 +21,7 @@ atlas_add_library( Hijing_iLib
    LINK_LIBRARIES ${HIJING_LIBRARIES} ${CLHEP_LIBRARIES}
    GeneratorFortranCommonLib GeneratorModulesLib StoreGateLib
    PRIVATE_LINK_LIBRARIES AtlasHepMCLib AthenaKernel GaudiKernel
-   GeneratorObjects TruthUtils )
+   GeneratorObjects GeneratorUtilsLib TruthUtils )
 
 atlas_add_component( Hijing_i
    src/components/*.cxx
diff --git a/Generators/Hydjet_i/CMakeLists.txt b/Generators/Hydjet_i/CMakeLists.txt
index 8fa501fba7b1..98b4cfd89695 100644
--- a/Generators/Hydjet_i/CMakeLists.txt
+++ b/Generators/Hydjet_i/CMakeLists.txt
@@ -1,25 +1,8 @@
-################################################################################
-# Package: Hydjet_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( Hydjet_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Generators/GeneratorFortranCommon
-   Generators/GeneratorModules
-   Generators/AtlasHepMC
-   Control/CxxUtils
-   PRIVATE
-   Control/AthenaKernel
-   Control/StoreGate
-   GaudiKernel
-   Generators/GeneratorObjects
-   Generators/GeneratorUtils
-   Generators/TruthUtils )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( Hijing )
@@ -39,10 +22,10 @@ atlas_add_library( Hydjet_iLib
    PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} 
    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
    LINK_LIBRARIES ${PYQUEN_LIBRARIES} ${PYTHIA6_LIBRARIES}
-   ${HYDJET_LIBRARIES} ${HIJING_LIBRARIES} GeneratorFortranCommonLib
-   GeneratorModulesLib StoreGateLib
+   ${HYDJET_LIBRARIES} ${HIJING_LIBRARIES} CxxUtils GeneratorFortranCommonLib
+   GeneratorModulesLib
    PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib
-   AthenaKernel GaudiKernel GeneratorObjects TruthUtils )
+   AthenaKernel GaudiKernel GeneratorObjects GeneratorUtilsLib StoreGateLib TruthUtils )
 
 atlas_add_component( Hydjet_i
    src/components/*.cxx
diff --git a/Generators/Lhef_i/CMakeLists.txt b/Generators/Lhef_i/CMakeLists.txt
index 2657351f8f36..11a14dfc1e9a 100644
--- a/Generators/Lhef_i/CMakeLists.txt
+++ b/Generators/Lhef_i/CMakeLists.txt
@@ -1,14 +1,8 @@
-################################################################################
-# Package: Lhef_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( Lhef_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          Generators/GeneratorFortranCommon )
-
 # External dependencies:
 find_package( Pythia6 )
 
diff --git a/Generators/MCTester_i/CMakeLists.txt b/Generators/MCTester_i/CMakeLists.txt
index 4df0bcb72e4b..d649ac1fe69c 100644
--- a/Generators/MCTester_i/CMakeLists.txt
+++ b/Generators/MCTester_i/CMakeLists.txt
@@ -1,20 +1,8 @@
-################################################################################
-# Package: MCTester_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( MCTester_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          PRIVATE
-                          Control/StoreGate
-                          Event/EventInfo
-                          Generators/AtlasHepMC
-                          Generators/GeneratorObjects )
-
 # External dependencies:
 find_package( MCTester )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint Graf Graf3d Gpad Html Postscript Gui GX11TTF GX11 )
diff --git a/Generators/Photospp_i/CMakeLists.txt b/Generators/Photospp_i/CMakeLists.txt
index cca200250bdd..4cb57036fb67 100644
--- a/Generators/Photospp_i/CMakeLists.txt
+++ b/Generators/Photospp_i/CMakeLists.txt
@@ -1,19 +1,8 @@
-################################################################################
-# Package: Photospp_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( Photospp_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/AthenaBaseComps
-   PRIVATE
-   Control/AthenaKernel
-   GaudiKernel
-   Generators/GeneratorObjects )
-
 # External dependencies:
 find_package( CLHEP )
 if (HEPMC3_USE)
diff --git a/Generators/ProtosLHEF_i/CMakeLists.txt b/Generators/ProtosLHEF_i/CMakeLists.txt
index dfb3990ddc46..b24a7613d6c7 100644
--- a/Generators/ProtosLHEF_i/CMakeLists.txt
+++ b/Generators/ProtosLHEF_i/CMakeLists.txt
@@ -1,17 +1,8 @@
-################################################################################
-# Package: ProtosLHEF_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( ProtosLHEF_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          PRIVATE
-                          GaudiKernel
-                          Generators/GeneratorFortranCommon )
-
 # Component(s) in the package:
 atlas_add_component( ProtosLHEF_i
                      src/*.cxx
diff --git a/Generators/Pythia8B_i/CMakeLists.txt b/Generators/Pythia8B_i/CMakeLists.txt
index fa41256e694b..d55fb351f1f7 100644
--- a/Generators/Pythia8B_i/CMakeLists.txt
+++ b/Generators/Pythia8B_i/CMakeLists.txt
@@ -1,19 +1,8 @@
-################################################################################
-# Package: Pythia8B_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( Pythia8B_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          Generators/Pythia8_i
-                          Generators/AtlasHepMC
-                          PRIVATE
-                          Generators/GeneratorObjects )
-
 # External dependencies:
 find_package( Boost COMPONENTS filesystem thread system )
 find_package( CLHEP )
diff --git a/Generators/Pythia8_i/CMakeLists.txt b/Generators/Pythia8_i/CMakeLists.txt
index 2edc52abdaaf..ebcd213390fd 100644
--- a/Generators/Pythia8_i/CMakeLists.txt
+++ b/Generators/Pythia8_i/CMakeLists.txt
@@ -1,20 +1,8 @@
-################################################################################
-# Package: Pythia8_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( Pythia8_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          Generators/GeneratorModules
-                          Generators/AtlasHepMC
-                          PRIVATE
-                          GaudiKernel
-                          Generators/GeneratorObjects
-                          Tools/PathResolver )
-
 # External dependencies:
 find_package( Boost COMPONENTS filesystem thread system )
 find_package( CLHEP )
diff --git a/Generators/QGSJet_i/CMakeLists.txt b/Generators/QGSJet_i/CMakeLists.txt
index 2a1342711515..0f71dd037f34 100644
--- a/Generators/QGSJet_i/CMakeLists.txt
+++ b/Generators/QGSJet_i/CMakeLists.txt
@@ -1,19 +1,8 @@
-################################################################################
-# Package: QGSJet_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( QGSJet_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Generators/GeneratorModules
-                          Generators/AtlasHepMC
-                          PRIVATE
-                          Control/AthenaKernel
-                          GaudiKernel
-                          Generators/TruthUtils )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( Crmc COMPONENTS QgsjetII04 )
diff --git a/Generators/Sherpa_i/CMakeLists.txt b/Generators/Sherpa_i/CMakeLists.txt
index fde33ef97299..375632d6381d 100644
--- a/Generators/Sherpa_i/CMakeLists.txt
+++ b/Generators/Sherpa_i/CMakeLists.txt
@@ -1,20 +1,8 @@
-################################################################################
-# Package: Sherpa_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( Sherpa_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel
-                          Generators/GeneratorModules
-                          Generators/AtlasHepMC
-                          Generators/TruthUtils
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel )
-
 # Set the version of Sherpa to use:
 #set( SHERPA_VERSION 2.2.2 )
 #set( SHERPA_ROOT
diff --git a/Generators/Starlight_i/CMakeLists.txt b/Generators/Starlight_i/CMakeLists.txt
index 04abb290de4e..8dfb8fbf4e65 100644
--- a/Generators/Starlight_i/CMakeLists.txt
+++ b/Generators/Starlight_i/CMakeLists.txt
@@ -1,23 +1,9 @@
-# $Id: CMakeLists.txt 762209 2016-07-15 14:15:34Z krasznaa $
-################################################################################
-# Package: Starlight_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
 
 # Declare the package name:
 atlas_subdir( Starlight_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Generators/GeneratorModules
-   Generators/AtlasHepMC
-   PRIVATE
-   Control/AthenaKernel
-   Control/StoreGate
-   GaudiKernel
-   Generators/GeneratorUtils
-   Generators/TruthUtils )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( Starlight )
@@ -32,9 +18,9 @@ atlas_add_library( Starlight_iLib
    INCLUDE_DIRS ${STARLIGHT_INCLUDE_DIRS}
    PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} 
    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-   LINK_LIBRARIES ${STARLIGHT_LIBRARIES} GeneratorModulesLib StoreGateLib
+   LINK_LIBRARIES ${STARLIGHT_LIBRARIES} GeneratorModulesLib
    PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaKernel
-   GaudiKernel TruthUtils )
+   GaudiKernel GeneratorUtilsLib TruthUtils StoreGateLib )
 
 atlas_add_component( Starlight_i
    src/components/*.cxx
-- 
GitLab


From 250cf14a1fc75667863be834b2b8153ae8153900 Mon Sep 17 00:00:00 2001
From: Pavol Strizenec <pavol.strizenec@cern.ch>
Date: Wed, 7 Oct 2020 17:08:27 +0000
Subject: [PATCH 313/403] Fixing print statements

---
 .../share/CombinedMuonFit_jobOptions.py              |  4 ++--
 .../share/CosmicSimulationRecoSetup-HLT.py           |  8 ++++----
 .../share/CosmicSimulationRecoSetup.py               |  8 ++++----
 .../RecExCommission/share/GetInputFiles.py           |  4 ++--
 .../share/RecExCommissionCommonFlags_jobOptions.py   |  2 +-
 .../RecExample/RecExCommon/share/AllDet_detDescr.py  |  2 +-
 .../RecExCommon/share/AnalysisCommon_topOptions.py   |  4 ++--
 .../RecExample/RecExCommon/share/DumpDbFolders.py    |  2 +-
 .../RecExCommon/share/RecExCommon_condDb.py          |  4 ++--
 .../RecExCommon/share/RecExCommon_flags.py           |  2 +-
 .../RecExCommon/share/postIncludeForBLSStream.py     |  2 +-
 .../RecExCond/share/testRecExCommonFlags.py          | 10 +++++-----
 .../RecExample/RecExConfig/share/topOptions.py       | 12 ++++++------
 .../share/RecExTB_Combined_2004_jobOptions.py        |  6 +++---
 .../RecExample/RecExTB/share/RecExTB_H6_esdtoesd.py  |  8 ++++----
 .../RecExTB/share/RecExTB_H6_jobOptions.py           | 10 ++++------
 .../RecExTB/share/RecExTB_SetFlags_jobOptions.py     |  4 ++--
 .../share/RecJobTransformTests_CaloHiveExOpts.py     |  4 ++--
 .../RecJobTransformTests_MuonRec_myTopOptions_MT.py  |  2 +-
 .../share/RecJobTransformTests_PFlowHiveExOpts.py    |  4 ++--
 20 files changed, 50 insertions(+), 52 deletions(-)

diff --git a/Reconstruction/RecExample/RecExCommission/share/CombinedMuonFit_jobOptions.py b/Reconstruction/RecExample/RecExCommission/share/CombinedMuonFit_jobOptions.py
index 4a8ddf9e80d6..0fbf5498db6d 100644
--- a/Reconstruction/RecExample/RecExCommission/share/CombinedMuonFit_jobOptions.py
+++ b/Reconstruction/RecExample/RecExCommission/share/CombinedMuonFit_jobOptions.py
@@ -11,7 +11,7 @@ GlobalChi2FitterComb=Trk__GlobalChi2Fitter(name='GlobalChi2FitterComb',
 
 ToolSvc += GlobalChi2FitterComb
 
-print GlobalChi2FitterComb
+print(GlobalChi2FitterComb)
 
 from CombinedMuonRefit.CombinedMuonRefitConf import ReFitMuon
 MuonReFitTrack2 = ReFitMuon (name = "CombMuonRefit",
@@ -25,7 +25,7 @@ MuonReFitTrack2 = ReFitMuon (name = "CombMuonRefit",
                              OutputLevel=3)
 
 topSequence += MuonReFitTrack2
-print          MuonReFitTrack2
+print(MuonReFitTrack2)
 
 #GlobalChi2FitterBarrel.OutputLevel=1
 #GlobalChi2FitterBarrel.NumericalDerivs=True
diff --git a/Reconstruction/RecExample/RecExCommission/share/CosmicSimulationRecoSetup-HLT.py b/Reconstruction/RecExample/RecExCommission/share/CosmicSimulationRecoSetup-HLT.py
index cea26177768b..6a6c1e12d9b4 100644
--- a/Reconstruction/RecExample/RecExCommission/share/CosmicSimulationRecoSetup-HLT.py
+++ b/Reconstruction/RecExample/RecExCommission/share/CosmicSimulationRecoSetup-HLT.py
@@ -31,26 +31,26 @@ if globalflags.DetDescrVersion.get_Value().find('ATLAS-GEONSF-') >= 0 :
     jobproperties.BField.barrelToroidOn.set_Value_and_Lock(True)
     jobproperties.BField.endcapToroidOn.set_Value_and_Lock(True)
     globalflags.ConditionsTag.set_Value_and_Lock('OFLCOND-SIMCT-00-00-00')
-    print 'configuring reco with solenoid off, toroid on from DetDescrVersion:',globalflags.DetDescrVersion.get_Value()
+    print('configuring reco with solenoid off, toroid on from DetDescrVersion:',globalflags.DetDescrVersion.get_Value())
     
 if globalflags.DetDescrVersion.get_Value().find('ATLAS-GEO-') >= 0 :
     jobproperties.BField.solenoidOn.set_Value_and_Lock(True)
     jobproperties.BField.barrelToroidOn.set_Value_and_Lock(True)
     jobproperties.BField.endcapToroidOn.set_Value_and_Lock(True)
     globalflags.ConditionsTag.set_Value_and_Lock('OFLCOND-SIMCST-00-00-00')
-    print 'configuring reco with solenoid on, toroid on from DetDescrVersion:',globalflags.DetDescrVersion.get_Value()
+    print('configuring reco with solenoid on, toroid on from DetDescrVersion:',globalflags.DetDescrVersion.get_Value())
     
 if globalflags.DetDescrVersion.get_Value().find('ATLAS-GEONF-') >= 0 :
     jobproperties.BField.solenoidOn.set_Value_and_Lock(False)
     jobproperties.BField.barrelToroidOn.set_Value_and_Lock(False)
     jobproperties.BField.endcapToroidOn.set_Value_and_Lock(False)
     globalflags.ConditionsTag.set_Value_and_Lock('OFLCOND-SIMC-00-00-00')
-    print 'configuring reco with solenoid off, toroid off from DetDescrVersion:',globalflags.DetDescrVersion.get_Value()
+    print('configuring reco with solenoid off, toroid off from DetDescrVersion:',globalflags.DetDescrVersion.get_Value())
         
 if globalflags.DetDescrVersion.get_Value().find('ATLAS-GEONTF-') >= 0 :
     jobproperties.BField.solenoidOn.set_Value_and_Lock(True)
     jobproperties.BField.barrelToroidOn.set_Value_and_Lock(False)
     jobproperties.BField.endcapToroidOn.set_Value_and_Lock(False)
     globalflags.ConditionsTag.set_Value_and_Lock('OFLCOND-SIMCS-00-00-00')
-    print 'configuring reco with solenoid on, toroid off from DetDescrVersion:',globalflags.DetDescrVersion.get_Value()
+    print('configuring reco with solenoid on, toroid off from DetDescrVersion:',globalflags.DetDescrVersion.get_Value())
  
diff --git a/Reconstruction/RecExample/RecExCommission/share/CosmicSimulationRecoSetup.py b/Reconstruction/RecExample/RecExCommission/share/CosmicSimulationRecoSetup.py
index 23ceee70140e..0065ac4c4354 100644
--- a/Reconstruction/RecExample/RecExCommission/share/CosmicSimulationRecoSetup.py
+++ b/Reconstruction/RecExample/RecExCommission/share/CosmicSimulationRecoSetup.py
@@ -36,28 +36,28 @@ if globalflags.DetDescrVersion=='ATLAS-GEONSF-07-00-00':
     jobproperties.BField.barrelToroidOn.set_Value_and_Lock(True)
     jobproperties.BField.endcapToroidOn.set_Value_and_Lock(True)
     globalflags.ConditionsTag.set_Value_and_Lock('OFLCOND-SIMCT-00-00-00')
-    print 'configuring reco with solenoid off, toroid on from DetDescrVersion: ATLAS-GEONSF-07-00-00'
+    print('configuring reco with solenoid off, toroid on from DetDescrVersion: ATLAS-GEONSF-07-00-00')
     
 if globalflags.DetDescrVersion=='ATLAS-GEO-07-00-00':
     jobproperties.BField.solenoidOn.set_Value_and_Lock(True)
     jobproperties.BField.barrelToroidOn.set_Value_and_Lock(True)
     jobproperties.BField.endcapToroidOn.set_Value_and_Lock(True)
     globalflags.ConditionsTag.set_Value_and_Lock('OFLCOND-SIMCST-00-00-00')
-    print 'configuring reco with solenoid on, toroid on from DetDescrVersion: ATLAS-GEO-07-00-00'
+    print('configuring reco with solenoid on, toroid on from DetDescrVersion: ATLAS-GEO-07-00-00')
     
 if globalflags.DetDescrVersion=='ATLAS-GEONF-07-00-00':
     jobproperties.BField.solenoidOn.set_Value_and_Lock(False)
     jobproperties.BField.barrelToroidOn.set_Value_and_Lock(False)
     jobproperties.BField.endcapToroidOn.set_Value_and_Lock(False)
     globalflags.ConditionsTag.set_Value_and_Lock('OFLCOND-SIMC-00-00-00')
-    print 'configuring reco with solenoid off, toroid off from DetDescrVersion: ATLAS-GEONF-07-00-00'
+    print('configuring reco with solenoid off, toroid off from DetDescrVersion: ATLAS-GEONF-07-00-00')
         
 if globalflags.DetDescrVersion=='ATLAS-GEONTF-07-00-00':
     jobproperties.BField.solenoidOn.set_Value_and_Lock(True)
     jobproperties.BField.barrelToroidOn.set_Value_and_Lock(False)
     jobproperties.BField.endcapToroidOn.set_Value_and_Lock(False)
     globalflags.ConditionsTag.set_Value_and_Lock('OFLCOND-SIMCS-00-00-00')
-    print 'configuring reco with solenoid on, toroid off from DetDescrVersion: ATLAS-GEONTF-07-00-00'
+    print('configuring reco with solenoid on, toroid off from DetDescrVersion: ATLAS-GEONTF-07-00-00')
                             
 
                                                 
diff --git a/Reconstruction/RecExample/RecExCommission/share/GetInputFiles.py b/Reconstruction/RecExample/RecExCommission/share/GetInputFiles.py
index 7258685207ef..a1528d067bc3 100644
--- a/Reconstruction/RecExample/RecExCommission/share/GetInputFiles.py
+++ b/Reconstruction/RecExample/RecExCommission/share/GetInputFiles.py
@@ -1,7 +1,7 @@
 from os import popen
 
 def GetInputFiles(inputPath,filePattern):
-    print "Searching for files with pattern '",filePattern,"' in ",inputPath
+    print("Searching for files with pattern '",filePattern,"' in ",inputPath)
     fileList=[]
     if (inputPath[0:8]=='/castor/'):
         cmd='nsls'
@@ -13,7 +13,7 @@ def GetInputFiles(inputPath,filePattern):
         if f[len(f)-1:]=='\n':
             f=f[0:len(f)-1]
         fileList+=[inputPath+'/'+f]
-    print "Found ",len(fileList), " files"
+    print("Found ",len(fileList), " files")
     return fileList
     
 
diff --git a/Reconstruction/RecExample/RecExCommission/share/RecExCommissionCommonFlags_jobOptions.py b/Reconstruction/RecExample/RecExCommission/share/RecExCommissionCommonFlags_jobOptions.py
index 4d374d8542c7..d08ce74f2f95 100644
--- a/Reconstruction/RecExample/RecExCommission/share/RecExCommissionCommonFlags_jobOptions.py
+++ b/Reconstruction/RecExample/RecExCommission/share/RecExCommissionCommonFlags_jobOptions.py
@@ -194,7 +194,7 @@ if not 'InDetKeys' in dir():
     #
     # --- setup StoreGate keys (JobProperties!)
     #
-    print "InDetRec_jobOptions: InDetKeys not set before - I import them now"
+    print("InDetRec_jobOptions: InDetKeys not set before - I import them now")
     from InDetRecExample.InDetKeys import InDetKeys
 #    InDetKeys.lock_JobProperties()
                                                                          
diff --git a/Reconstruction/RecExample/RecExCommon/share/AllDet_detDescr.py b/Reconstruction/RecExample/RecExCommon/share/AllDet_detDescr.py
index f9357b8839eb..77a0b489e435 100755
--- a/Reconstruction/RecExample/RecExCommon/share/AllDet_detDescr.py
+++ b/Reconstruction/RecExample/RecExCommon/share/AllDet_detDescr.py
@@ -1,4 +1,4 @@
 include.block("RecExCommon/AllDet_detDescr.py")
 # AllDet_detDescr now moved to RecExCond in AtlasConditions
-print "OBSOLETE WARNING please use RecExCond/AllDet_detDescr.py"
+print("OBSOLETE WARNING please use RecExCond/AllDet_detDescr.py")
 include ("RecExCond/AllDet_detDescr.py")
diff --git a/Reconstruction/RecExample/RecExCommon/share/AnalysisCommon_topOptions.py b/Reconstruction/RecExample/RecExCommon/share/AnalysisCommon_topOptions.py
index 7c8d575f4ace..af8117f22ff0 100644
--- a/Reconstruction/RecExample/RecExCommon/share/AnalysisCommon_topOptions.py
+++ b/Reconstruction/RecExample/RecExCommon/share/AnalysisCommon_topOptions.py
@@ -214,8 +214,8 @@ elif rec.readAOD():
 
 
 if rec.OutputLevel() <= DEBUG:
-    print " Initial content of objKeyStore "
-    print objKeyStore
+    print(" Initial content of objKeyStore ")
+    print(objKeyStore)
     pass
 
 # typical objKeyStore usage
diff --git a/Reconstruction/RecExample/RecExCommon/share/DumpDbFolders.py b/Reconstruction/RecExample/RecExCommon/share/DumpDbFolders.py
index 51aa6ff703d3..417647b0c72e 100644
--- a/Reconstruction/RecExample/RecExCommon/share/DumpDbFolders.py
+++ b/Reconstruction/RecExample/RecExCommon/share/DumpDbFolders.py
@@ -14,7 +14,7 @@ except:
     pass
 
 if len(substep)==0:
-    print "Failed to obtain substep, will use PID for file with db folder list" 
+    print("Failed to obtain substep, will use PID for file with db folder list")
     substep=str(getpid())
 
 
diff --git a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_condDb.py b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_condDb.py
index d499a423fb42..62dfbbe688c6 100755
--- a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_condDb.py
+++ b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_condDb.py
@@ -1,3 +1,3 @@
-print "WARNING RecExCommon_condDb.py forwarded to IOVDbSvc/IOVRecExCommon.py"
-print "WARNING ...please update to use directly IOVRecExCommon.py"
+print("WARNING RecExCommon_condDb.py forwarded to IOVDbSvc/IOVRecExCommon.py")
+print("WARNING ...please update to use directly IOVRecExCommon.py")
 include ("IOVDbSvc/IOVRecExCommon.py")
diff --git a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_flags.py b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_flags.py
index a7b08dcff25b..41b070d46dbc 100755
--- a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_flags.py
+++ b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_flags.py
@@ -1,4 +1,4 @@
 include.block("RecExCommon/RecExCommon_flags.py")
 # RecExCommon_flags moved to RecExCond package in AtlasConditions
-print "OBSOLETE WARNING please use RecExCond/RecExCommon_flags.py"
+print("OBSOLETE WARNING please use RecExCond/RecExCommon_flags.py")
 include ("RecExCond/RecExCommon_flags.py")
diff --git a/Reconstruction/RecExample/RecExCommon/share/postIncludeForBLSStream.py b/Reconstruction/RecExample/RecExCommon/share/postIncludeForBLSStream.py
index 918d30348e4e..ecb7680d30eb 100644
--- a/Reconstruction/RecExample/RecExCommon/share/postIncludeForBLSStream.py
+++ b/Reconstruction/RecExample/RecExCommon/share/postIncludeForBLSStream.py
@@ -25,7 +25,7 @@ for item in CILMergeAOD.list():
 CILMergeAOD.removeItem(removed_items)
 
 StreamAOD.ItemList=CILMergeAOD()
-print CILMergeAOD.list()
+print(CILMergeAOD.list())
 
 
 
diff --git a/Reconstruction/RecExample/RecExCond/share/testRecExCommonFlags.py b/Reconstruction/RecExample/RecExCond/share/testRecExCommonFlags.py
index c22ea63f6756..8e88a36a599a 100755
--- a/Reconstruction/RecExample/RecExCond/share/testRecExCommonFlags.py
+++ b/Reconstruction/RecExample/RecExCond/share/testRecExCommonFlags.py
@@ -15,18 +15,18 @@ include ("RecExCommon/RecExCommon_flags.py")
 from AthenaCommon.GlobalFlags  import globalflags
 #if globalflags.InputFormat()=='bytestream': # jobproperties.GlobalFlags.InputFormat() is equivalent
 #   dosomething
-print globalflags.DetDescrVersion()
+print(globalflags.DetDescrVersion())
 
 if globalflags.DetDescrVersion()[0:3]=="DC2":
-    print " this is DC2 "
+    print(" this is DC2 ")
 else:
-    print " this is not DC2 "
+    print(" this is not DC2 ")
 
 from RecExConfig.RecFlags import recAlgs
 if recAlgs.doTrigger() ^ doTrigger:
-    print "recAlgs.doTrigger() and doTrigger inconsistent"
+    print("recAlgs.doTrigger() and doTrigger inconsistent")
 else:
-    print "recAlgs.doTrigger() and doTrigger consistent"
+    print("recAlgs.doTrigger() and doTrigger consistent")
 
 
 # stop the hard way
diff --git a/Reconstruction/RecExample/RecExConfig/share/topOptions.py b/Reconstruction/RecExample/RecExConfig/share/topOptions.py
index 1b2fce302485..f264e1ce4998 100755
--- a/Reconstruction/RecExample/RecExConfig/share/topOptions.py
+++ b/Reconstruction/RecExample/RecExConfig/share/topOptions.py
@@ -60,12 +60,12 @@ aPhotonMaker=PhotonMaker(driving=True)
 bPhotonMaker=PhotonMaker()
 thebPMAlg=bPhotonMaker.PhotonBuilderHandle()
 
-print "Py:top output ",bPhotonMaker.outputTypeKey()
+print("Py:top output ",bPhotonMaker.outputTypeKey())
 # can modify the al property as follow
 # bPhotonMaker.PhotonBuilderHandle().egammaContainer = "egammaContainerTruc"
 
 
-print "Py: top instance property", thebPMAlg.egammaContainer
+print("Py: top instance property", thebPMAlg.egammaContainer)
 
 
 
@@ -74,10 +74,10 @@ print "Py: top instance property", thebPMAlg.egammaContainer
 #topSequence.setup()
 #exec 'topSequence.__self= []'
 #algorithms with property mods
-print topSequence
+print(topSequence)
 # only list algorithms
-print topSequence.sequence()
+print(topSequence.sequence())
 
 
-print "Py:top print again list of top algorithms"
-print theApp.TopAlg
+print("Py:top print again list of top algorithms")
+print(theApp.TopAlg)
diff --git a/Reconstruction/RecExample/RecExTB/share/RecExTB_Combined_2004_jobOptions.py b/Reconstruction/RecExample/RecExTB/share/RecExTB_Combined_2004_jobOptions.py
index 3bccfe6bd3a5..86b2cc75ed96 100755
--- a/Reconstruction/RecExample/RecExTB/share/RecExTB_Combined_2004_jobOptions.py
+++ b/Reconstruction/RecExample/RecExTB/share/RecExTB_Combined_2004_jobOptions.py
@@ -571,10 +571,10 @@ if doLAr or doTile:
                 x.find("/CALO/HadCalibration/CaloOutOfCluster") == -1 and \
                 x.find("/CALO/HadCalibration/CaloOutOfClusterPi0") == -1 and \
                 x.find("/CALO/HadCalibration/CaloDMCorr2") == -1:
-                    print "adding ",x," to IOVDbSvc.Folders" 
+                    print("adding ",x," to IOVDbSvc.Folders")
                     myIOVDbFolders += [x]
              else:
-                    print "removing ",x," from IOVDbSvc.Folders"
+                    print("removing ",x," from IOVDbSvc.Folders")
 
         iovdbsvc.Folders = myIOVDbFolders
         if not doCaloTopoLocalCalibDb or doSim:
@@ -584,7 +584,7 @@ if doLAr or doTile:
              iovdbsvc.Folders+=["/CALO/HadCalibration/CaloOutOfCluster"+"<dbConnection>sqlite://X;schema=myOOC05BERT200.db;dbname=OFLP200</dbConnection>"+"<tag>CaloHadOOCCorr-CSC05-BERT</tag>"]
              iovdbsvc.Folders+=["/CALO/HadCalibration/CaloOutOfClusterPi0"+"<dbConnection>sqlite://X;schema=myOOCPi005BERT200.db;dbname=OFLP200</dbConnection>"+"<tag>CaloHadOOCCorrPi0-CSC05-BERT</tag>"]
              iovdbsvc.Folders+=["/CALO/HadCalibration/CaloDMCorr2"+"<dbConnection>sqlite://X;schema=myDBHadDMCoeff200.db;dbname=OFLP200</dbConnection>"+"<tag>CaloHadDMCorr-002-00</tag>"]
-             print iovdbsvc.Folders
+             print(iovdbsvc.Folders)
              if not os.access('myEMFrac05BERT200.db',os.R_OK):
                 os.system('cp -f /afs/cern.ch/user/m/menke/public/AtlasOffline-14.2.21/myEMFrac05BERT200.db .')
              if not os.access('myInvWeight05BERT200.db',os.R_OK):
diff --git a/Reconstruction/RecExample/RecExTB/share/RecExTB_H6_esdtoesd.py b/Reconstruction/RecExample/RecExTB/share/RecExTB_H6_esdtoesd.py
index 9caf645baf20..b355c882632a 100644
--- a/Reconstruction/RecExample/RecExTB/share/RecExTB_H6_esdtoesd.py
+++ b/Reconstruction/RecExample/RecExTB/share/RecExTB_H6_esdtoesd.py
@@ -63,7 +63,7 @@ include("LArConditionsCommon/LArConditionsCommon_H6G4_jobOptions.py")
 include( "LArConditionsCommon/LArIdMap_H6_jobOptions.py" )
 include( "CaloCondAthenaPool/CaloCondAthenaPool_joboptions.py")
 PoolSvc.ReadCatalog += [ "prfile:PoolCat_H6_tbcond.xml" ]
-print "FileCatalog: ", PoolSvc.ReadCatalog
+print("FileCatalog: ", PoolSvc.ReadCatalog)
 
 
 # - GeoModel ---
@@ -127,7 +127,7 @@ for x in topSequence.CaloTopoCluster.ClusterCorrectionTools:
   if x.find("BadChan") == -1:
      tlist += [x]
   else:   
-     print "Removing: ",x," from CaloTopoCluster.ClusterCorrectionTools" 
+     print("Removing: ",x," from CaloTopoCluster.ClusterCorrectionTools")
 topSequence.CaloTopoCluster.ClusterCorrectionTools = tlist
 
 
@@ -167,8 +167,8 @@ lcPerf.doRecoEfficiency = True
 lcPerf.isTestbeam = True
 
 
-print "topSequence",topSequence
-print "dumpMasterSequence"
+print("topSequence",topSequence)
+print("dumpMasterSequence")
 from AthenaCommon.AlgSequence import dumpMasterSequence
 dumpMasterSequence()
 
diff --git a/Reconstruction/RecExample/RecExTB/share/RecExTB_H6_jobOptions.py b/Reconstruction/RecExample/RecExTB/share/RecExTB_H6_jobOptions.py
index 7c764d1a050a..db2360ac3bf9 100755
--- a/Reconstruction/RecExample/RecExTB/share/RecExTB_H6_jobOptions.py
+++ b/Reconstruction/RecExample/RecExTB/share/RecExTB_H6_jobOptions.py
@@ -273,7 +273,7 @@ if doLAr:
     include( "CaloCondAthenaPool/CaloCondAthenaPool_joboptions.py")
 
     PoolSvc.ReadCatalog += [ "prfile:PoolCat_H6_tbcond.xml" ]
-    print "FileCatalog: ", PoolSvc.ReadCatalog
+    print("FileCatalog: ", PoolSvc.ReadCatalog)
     
 DetectorStore.OutputLevel = ERROR
 
@@ -827,7 +827,7 @@ if doMakeTopoCluster:
       if x.find("BadChan") == -1:
          tlist += [x]
       else:   
-         print "Removing: ",x," from CaloTopoCluster.ClusterCorrectionTools" 
+         print("Removing: ",x," from CaloTopoCluster.ClusterCorrectionTools")
     topSequence.CaloTopoCluster.ClusterCorrectionTools = tlist
     # remove CaloCellNeighborsAverageCorr from CaloCellMaker
     clist=[]
@@ -835,7 +835,7 @@ if doMakeTopoCluster:
       if y.getName().find("NeighborsAverageCorr") == -1:
          clist += [y]
       else:   
-         print "Removing: ",y," from CaloCellMaker.CaloCellMakerToolNames" 
+         print("Removing: ",y," from CaloCellMaker.CaloCellMakerToolNames")
     topSequence.CaloCellMaker.CaloCellMakerToolNames = clist
     
     # Configuring LArBadChanTool    
@@ -1103,11 +1103,9 @@ if doSim:
    conddb.iovdbsvc.forceRunNumber = RunNumber
 conddb.blockFolder("/LAR/LArElecCalibEC04/LArShapeComplete/LArPhysWave")
 conddb.blockFolder("/LAR/CellCorrOfl/deadOTX")
-print conddb.iovdbsvc.Folders
+print(conddb.iovdbsvc.Folders)
 
 
-#print "qqq1> topSequence",topSequence
-#print "qqq2> dumpMasterSequence"
 #from AthenaCommon.AlgSequence import dumpMasterSequence
 #dumpMasterSequence()
 
diff --git a/Reconstruction/RecExample/RecExTB/share/RecExTB_SetFlags_jobOptions.py b/Reconstruction/RecExample/RecExTB/share/RecExTB_SetFlags_jobOptions.py
index 0f8319fc8fb9..2c0f1a02e261 100755
--- a/Reconstruction/RecExample/RecExTB/share/RecExTB_SetFlags_jobOptions.py
+++ b/Reconstruction/RecExample/RecExTB/share/RecExTB_SetFlags_jobOptions.py
@@ -6,7 +6,7 @@ dataPathList.insert(0, os.curdir)
 from AthenaCommon.Utils.unixtools import FindFile
 filename = FindFile( 'prefix.txt', dataPathList, os.R_OK )
 if filename is None:
-   print 'ERROR: SetFlags.py could not find list of file prefixes, prefix.txt'
+   print('ERROR: SetFlags.py could not find list of file prefixes, prefix.txt')
 text = open(filename,'r')
 for line in text.readlines():
     words = string.split(line)
@@ -15,4 +15,4 @@ for line in text.readlines():
         if string.atoi(Run) == RunNumber:
             FilePrefix = words[1]
 text.close()
-print 'Prefix ', FilePrefix    
+print('Prefix ', FilePrefix)
diff --git a/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_CaloHiveExOpts.py b/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_CaloHiveExOpts.py
index 287a1249f5f9..ed01a5bded1c 100644
--- a/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_CaloHiveExOpts.py
+++ b/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_CaloHiveExOpts.py
@@ -135,14 +135,14 @@ StreamESD=createOutputStream("StreamESD","myESD.pool.root",True)
 include ("CaloRecEx/CaloRecOutputItemList_jobOptions.py")
 StreamESD.ItemList+=CaloESDList
 
-print StreamESD.ItemList
+print(StreamESD.ItemList)
 
 #---------------------------------------------------------------------------------#
 # MT-specific code
 if nThreads >=1 :
    include ( "CaloHiveEx/CaloHiveDeps.py" )
 
-print "==========================================================================================\n"
+print("==========================================================================================\n")
 
 #
 ## set which Algorithms can be cloned
diff --git a/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_MuonRec_myTopOptions_MT.py b/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_MuonRec_myTopOptions_MT.py
index 01b64f1749c0..5b072a414161 100644
--- a/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_MuonRec_myTopOptions_MT.py
+++ b/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_MuonRec_myTopOptions_MT.py
@@ -104,7 +104,7 @@ try:
 except:
     # print the stacktrace (saving could fail, and would then obscure the real problem)
     import traceback
-    print traceback.format_exc().rstrip()
+    print(traceback.format_exc().rstrip())
     
     # always write config so far for debugging
     from AthenaCommon.ConfigurationShelve import saveToAscii
diff --git a/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_PFlowHiveExOpts.py b/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_PFlowHiveExOpts.py
index 1bf9061ef828..391666c9bd3d 100644
--- a/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_PFlowHiveExOpts.py
+++ b/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_PFlowHiveExOpts.py
@@ -183,14 +183,14 @@ StreamESD=createOutputStream("StreamESD","myESD.pool.root",True)
 include ("CaloRecEx/CaloRecOutputItemList_jobOptions.py")
 StreamESD.ItemList+=CaloESDList
 
-print StreamESD.ItemList
+print(StreamESD.ItemList)
 
 #---------------------------------------------------------------------------------#
 # MT-specific code
 if nThreads >=1 :
    include ( "RecJobTransformTests_PFlowHiveDeps.py" )
 
-print "==========================================================================================\n"
+print("==========================================================================================\n")
 
 #
 ## set which Algorithms can be cloned
-- 
GitLab


From 5901b04ee3484a921126c98407042a795c020a0a Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Wed, 7 Oct 2020 19:17:02 +0200
Subject: [PATCH 314/403] GeneratorUtils: Add interface library

---
 Generators/GeneratorUtils/CMakeLists.txt | 24 ++++++++++--------------
 1 file changed, 10 insertions(+), 14 deletions(-)

diff --git a/Generators/GeneratorUtils/CMakeLists.txt b/Generators/GeneratorUtils/CMakeLists.txt
index d4c81c159f56..6719593cc8fc 100644
--- a/Generators/GeneratorUtils/CMakeLists.txt
+++ b/Generators/GeneratorUtils/CMakeLists.txt
@@ -1,25 +1,21 @@
-################################################################################
-# Package: GeneratorUtils
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( GeneratorUtils )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          AtlasTest/TestTools )
-
-# External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
-
 # Component(s) in the package:
+atlas_add_library( GeneratorUtilsLib
+                   GeneratorUtils/*.h
+                   INTERFACE
+                   PUBLIC_HEADERS GeneratorUtils
+                   INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
+                   LINK_LIBRARIES ${Boost_LIBRARIES} )
+
+# Test(s) in the package:
 atlas_add_test( StringParse_test
                 SOURCES
                 test/StringParse_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} TestTools )
+                LINK_LIBRARIES GeneratorUtilsLib )
 
 # Install files from the package:
-atlas_install_headers( GeneratorUtils )
 atlas_install_joboptions( share/*.py )
-
-- 
GitLab


From d5c7c636a556f90b0be4491854443d1365971941 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Wed, 7 Oct 2020 19:17:36 +0200
Subject: [PATCH 315/403] GenAnalysisTools: cmake cleanup

---
 .../EventBoost/CMakeLists.txt                 | 14 +------------
 .../ReweightTools/CMakeLists.txt              | 21 +++----------------
 .../TruthHelper/CMakeLists.txt                | 14 +------------
 .../TruthTools/CMakeLists.txt                 | 14 +------------
 4 files changed, 6 insertions(+), 57 deletions(-)

diff --git a/Generators/GenAnalysisTools/EventBoost/CMakeLists.txt b/Generators/GenAnalysisTools/EventBoost/CMakeLists.txt
index 414cee5c5cf7..631db80656d4 100644
--- a/Generators/GenAnalysisTools/EventBoost/CMakeLists.txt
+++ b/Generators/GenAnalysisTools/EventBoost/CMakeLists.txt
@@ -1,20 +1,8 @@
-################################################################################
-# Package: EventBoost
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( EventBoost )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          PRIVATE
-                          Control/StoreGate
-                          Generators/AtlasHepMC
-                          Generators/GeneratorObjects
-                           )
-
 # External dependencies:
 find_package( CLHEP )
 
diff --git a/Generators/GenAnalysisTools/ReweightTools/CMakeLists.txt b/Generators/GenAnalysisTools/ReweightTools/CMakeLists.txt
index 82ba5b5dab6b..03cccdc76371 100644
--- a/Generators/GenAnalysisTools/ReweightTools/CMakeLists.txt
+++ b/Generators/GenAnalysisTools/ReweightTools/CMakeLists.txt
@@ -1,22 +1,8 @@
-################################################################################
-# Package: ReweightTools
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( ReweightTools )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          Generators/AtlasHepMC
-                          Generators/GenInterfaces
-                          PRIVATE
-                          Control/AthContainers
-                          Control/StoreGate
-                          Generators/AtlasHepMC  
-                          Generators/GeneratorObjects )
-
 # External dependencies:
 find_package( Lhapdf )
 
@@ -25,13 +11,12 @@ atlas_add_library( ReweightToolsLib
                    src/*.cxx
                    PUBLIC_HEADERS ReweightTools
                    INCLUDE_DIRS ${LHAPDF_INCLUDE_DIRS} 
-                   LINK_LIBRARIES ${LHAPDF_LIBRARIES} AtlasHepMCLib AthenaBaseComps GaudiKernel StoreGateLib SGtests
+                   LINK_LIBRARIES ${LHAPDF_LIBRARIES} AtlasHepMCLib AthenaBaseComps GaudiKernel GenInterfacesLib
                    PRIVATE_LINK_LIBRARIES AthContainers GeneratorObjects )
 
 atlas_add_component( ReweightTools
                      src/components/*.cxx
-                     INCLUDE_DIRS ${LHAPDF_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${LHAPDF_LIBRARIES} AtlasHepMCLib AthenaBaseComps GaudiKernel AthContainers StoreGateLib SGtests GeneratorObjects ReweightToolsLib )
+                     LINK_LIBRARIES ReweightToolsLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/Generators/GenAnalysisTools/TruthHelper/CMakeLists.txt b/Generators/GenAnalysisTools/TruthHelper/CMakeLists.txt
index 572d21a40444..caa3ad086d79 100644
--- a/Generators/GenAnalysisTools/TruthHelper/CMakeLists.txt
+++ b/Generators/GenAnalysisTools/TruthHelper/CMakeLists.txt
@@ -1,20 +1,8 @@
-################################################################################
-# Package: TruthHelper
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TruthHelper )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/StoreGate
-                          GaudiKernel
-                          Generators/AtlasHepMC
-                          Generators/GeneratorObjects
-                          PRIVATE
-                          Control/AthenaKernel
-                          Generators/TruthUtils )
-
 # External dependencies:
 find_package( HepPDT )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
diff --git a/Generators/GenAnalysisTools/TruthTools/CMakeLists.txt b/Generators/GenAnalysisTools/TruthTools/CMakeLists.txt
index 155e8c5703ff..d057f73b57ed 100644
--- a/Generators/GenAnalysisTools/TruthTools/CMakeLists.txt
+++ b/Generators/GenAnalysisTools/TruthTools/CMakeLists.txt
@@ -1,20 +1,8 @@
-################################################################################
-# Package: TruthTools
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TruthTools )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          PRIVATE
-                          Generators/GenInterfaces
-                          Generators/AtlasHepMC
-                          Generators/GeneratorObjects
-                          Generators/TruthUtils )
-
 # External dependencies:
 find_package( HepPDT )
 
-- 
GitLab


From 382574ba19db87206e77977d17483c3544c0331e Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Wed, 7 Oct 2020 19:18:13 +0200
Subject: [PATCH 316/403] McAsciiEventSelector: cmake cleanup and enable flake8

---
 Generators/McAsciiEventSelector/CMakeLists.txt    | 15 ++-------------
 .../McAsciiEventSelector/python/ReadMcAscii.py    |  4 ++--
 2 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/Generators/McAsciiEventSelector/CMakeLists.txt b/Generators/McAsciiEventSelector/CMakeLists.txt
index cf73dca20a3f..c5786b5f21da 100644
--- a/Generators/McAsciiEventSelector/CMakeLists.txt
+++ b/Generators/McAsciiEventSelector/CMakeLists.txt
@@ -1,19 +1,8 @@
-################################################################################
-# Package: McAsciiEventSelector
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( McAsciiEventSelector )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Event/EventInfo
-                          PhysicsAnalysis/TruthParticleID/McParticleKernel )
-
 # Component(s) in the package:
 atlas_add_component( McAsciiEventSelector
                      src/*.cxx
@@ -21,6 +10,6 @@ atlas_add_component( McAsciiEventSelector
                      LINK_LIBRARIES GaudiKernel AthenaBaseComps AthenaKernel EventInfo McParticleKernel )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py )
 
diff --git a/Generators/McAsciiEventSelector/python/ReadMcAscii.py b/Generators/McAsciiEventSelector/python/ReadMcAscii.py
index a0bcb8fc0ec2..ee38f1505cef 100644
--- a/Generators/McAsciiEventSelector/python/ReadMcAscii.py
+++ b/Generators/McAsciiEventSelector/python/ReadMcAscii.py
@@ -1,10 +1,10 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 ## @file McAsciiEventSelector/python/ReadMcAscii.py
 ## @brief: install the McAsciiEventSelector
 
 def _loadReadMcAscii():
-    import AthenaCommon.AtlasUnixStandardJob
+    import AthenaCommon.AtlasUnixStandardJob  # noqa: F401
     from AthenaCommon.AppMgr import theApp
     from AthenaCommon.AppMgr import ServiceMgr as svcMgr
 
-- 
GitLab


From 10ca1df3a1563d8a623077593dfa835b5b237117 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Wed, 7 Oct 2020 19:18:49 +0200
Subject: [PATCH 317/403] TrackRecordGenerator: cmake cleanup and enable flake8

---
 .../TrackRecordGenerator/CMakeLists.txt       | 29 ++++---------------
 .../python/TrackRecordGeneratorConfig.py      |  4 +--
 2 files changed, 8 insertions(+), 25 deletions(-)

diff --git a/Generators/TrackRecordGenerator/CMakeLists.txt b/Generators/TrackRecordGenerator/CMakeLists.txt
index b67213970726..6eb7d4c93b3e 100644
--- a/Generators/TrackRecordGenerator/CMakeLists.txt
+++ b/Generators/TrackRecordGenerator/CMakeLists.txt
@@ -1,35 +1,18 @@
-################################################################################
-# Package: TrackRecordGenerator
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TrackRecordGenerator )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Generators/GeneratorModules
-                          Generators/AtlasHepMC
-                          PRIVATE
-                          GaudiKernel
-                          Simulation/G4Sim/TrackRecord )
-
 # External dependencies:
 find_package( CLHEP )
 
 # Component(s) in the package:
-atlas_add_library( TrackRecordGeneratorLib
-                   src/TrackRecordGenerator.cxx
-                   PUBLIC_HEADERS TrackRecordGenerator
-                   INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} 
-                   DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib GeneratorModulesLib
-                   PRIVATE_LINK_LIBRARIES GaudiKernel TrackRecordLib )
-
 atlas_add_component( TrackRecordGenerator
+                     src/TrackRecordGenerator.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib GeneratorModulesLib GaudiKernel TrackRecordGeneratorLib )
+                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
+                     DEFINITIONS ${CLHEP_DEFINITIONS}
+                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib GeneratorModulesLib TrackRecordLib )
 
 # 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/Generators/TrackRecordGenerator/python/TrackRecordGeneratorConfig.py b/Generators/TrackRecordGenerator/python/TrackRecordGeneratorConfig.py
index b1e222ea17c2..f456db67df2c 100644
--- a/Generators/TrackRecordGenerator/python/TrackRecordGeneratorConfig.py
+++ b/Generators/TrackRecordGenerator/python/TrackRecordGeneratorConfig.py
@@ -1,9 +1,9 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 ############## Input: Reading Particles from TrackRecord Input File ###############
 def getInput_TrackRecordGenerator(name="TrackRecordGenerator", **kwargs):
     ## Configuring the Athena application for a 'track record' job
-    import G4AtlasApps.AtlasCosmicTrackRecordJob
+    import G4AtlasApps.AtlasCosmicTrackRecordJob  # noqa: F401
     kwargs.setdefault('TRCollection','CosmicRecord') # Collection name
     kwargs.setdefault('TRSmearing', -1) #in millimeters, e.g. 10
     kwargs.setdefault('TRPSmearing', -1) #in radians, e.g. 0.01
-- 
GitLab


From b2976478948ac2f81a8081d98750c771256162b6 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Wed, 7 Oct 2020 19:20:12 +0200
Subject: [PATCH 318/403] McEventSelector: cmake cleanup

---
 Generators/McEventSelector/CMakeLists.txt | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/Generators/McEventSelector/CMakeLists.txt b/Generators/McEventSelector/CMakeLists.txt
index b4209f351eed..582e4fd5356e 100644
--- a/Generators/McEventSelector/CMakeLists.txt
+++ b/Generators/McEventSelector/CMakeLists.txt
@@ -1,18 +1,8 @@
-################################################################################
-# Package: McEventSelector
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( McEventSelector )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          GaudiKernel
-                          PRIVATE
-                          Event/EventInfo )
-
 # Component(s) in the package:
 atlas_add_component( McEventSelector
                      src/McAddress.cxx
@@ -23,5 +13,4 @@ atlas_add_component( McEventSelector
                      LINK_LIBRARIES AthenaBaseComps AthenaKernel GaudiKernel EventInfo )
 
 # Install files from the package:
-atlas_install_headers( McEventSelector )
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
-- 
GitLab


From 9e662da24ca08d4ef2c3411ed826abb8b94a2bfb Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Wed, 7 Oct 2020 19:20:23 +0200
Subject: [PATCH 319/403] Generators: cmake cleanup

Remove `atlas_depends_on_subdirs` and cleanup library dependencies.
---
 Generators/BeamHaloGenerator/CMakeLists.txt   | 16 +------
 Generators/BoostAfterburner/CMakeLists.txt    | 16 ++-----
 Generators/CavernBkgGenerator/CMakeLists.txt  | 14 +-----
 Generators/CosmicGenerator/CMakeLists.txt     | 16 +------
 Generators/EvgenJobTransforms/CMakeLists.txt  |  9 +---
 Generators/EvgenProdTools/CMakeLists.txt      | 20 +--------
 Generators/FlowAfterburner/CMakeLists.txt     | 23 ++--------
 Generators/GenInterfaces/CMakeLists.txt       | 13 ++----
 Generators/GeneratorFilters/CMakeLists.txt    | 28 ++----------
 .../GeneratorFortranCommon/CMakeLists.txt     | 10 +----
 Generators/GeneratorModules/CMakeLists.txt    | 18 ++------
 Generators/GeneratorObjects/CMakeLists.txt    | 36 +++------------
 .../GeneratorObjectsAthenaPool/CMakeLists.txt | 13 +-----
 .../GeneratorObjectsTPCnv/CMakeLists.txt      | 44 ++++++-------------
 Generators/GenzModuleEvent/CMakeLists.txt     |  7 +--
 Generators/HepMCWeightSvc/CMakeLists.txt      | 18 +-------
 Generators/HforTool/CMakeLists.txt            | 27 +-----------
 Generators/ParticleDecayer/CMakeLists.txt     | 16 +------
 Generators/TruthIO/CMakeLists.txt             | 19 +-------
 Generators/TruthUtils/CMakeLists.txt          | 15 ++-----
 20 files changed, 61 insertions(+), 317 deletions(-)

diff --git a/Generators/BeamHaloGenerator/CMakeLists.txt b/Generators/BeamHaloGenerator/CMakeLists.txt
index cb681358ce72..64fc8046e17e 100644
--- a/Generators/BeamHaloGenerator/CMakeLists.txt
+++ b/Generators/BeamHaloGenerator/CMakeLists.txt
@@ -1,19 +1,8 @@
-################################################################################
-# Package: BeamHaloGenerator
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( BeamHaloGenerator )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel
-                          Generators/AtlasHepMC
-                          Generators/GeneratorModules
-                          Generators/AtlasHepMC
-                          PRIVATE
-                          Control/AthenaKernel )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( HepPDT )
@@ -31,8 +20,7 @@ atlas_add_library( BeamHaloGeneratorLib
 
 atlas_add_component( BeamHaloGenerator
                      src/components/*.cxx
-                     INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib GaudiKernel GeneratorModulesLib AthenaKernel BeamHaloGeneratorLib )
+                     LINK_LIBRARIES BeamHaloGeneratorLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/Generators/BoostAfterburner/CMakeLists.txt b/Generators/BoostAfterburner/CMakeLists.txt
index 7a75e5c14773..d16355432a07 100644
--- a/Generators/BoostAfterburner/CMakeLists.txt
+++ b/Generators/BoostAfterburner/CMakeLists.txt
@@ -1,17 +1,8 @@
-################################################################################
-# Package: BoostAfterburner
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( BoostAfterburner )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          PRIVATE
-                          GaudiKernel
-                          Generators/GeneratorObjects )
-
 # External dependencies:
 find_package( CLHEP )
 
@@ -22,12 +13,11 @@ atlas_add_library( BoostAfterburnerLib
                    PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
                    LINK_LIBRARIES AthenaBaseComps
-                   PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} GaudiKernel GeneratorObjects )
+                   PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} GeneratorObjects )
 
 atlas_add_component( BoostAfterburner
                      src/components/*.cxx
-                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps GaudiKernel GeneratorObjects BoostAfterburnerLib )
+                     LINK_LIBRARIES BoostAfterburnerLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/Generators/CavernBkgGenerator/CMakeLists.txt b/Generators/CavernBkgGenerator/CMakeLists.txt
index 9e03eb960fa5..045aea85dbb3 100644
--- a/Generators/CavernBkgGenerator/CMakeLists.txt
+++ b/Generators/CavernBkgGenerator/CMakeLists.txt
@@ -1,17 +1,8 @@
-################################################################################
-# Package: CavernBkgGenerator
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CavernBkgGenerator )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          GaudiKernel
-                          Generators/AtlasHepMC
-                          Generators/GeneratorModules )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( HepPDT )
@@ -35,8 +26,7 @@ atlas_add_library( CavernBkgGeneratorLib
 
 atlas_add_component( CavernBkgGenerator
                      src/components/*.cxx
-                     INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaKernel GaudiKernel GeneratorModulesLib CavernBkgGeneratorLib )
+                     LINK_LIBRARIES CavernBkgGeneratorLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/Generators/CosmicGenerator/CMakeLists.txt b/Generators/CosmicGenerator/CMakeLists.txt
index c3a3ed4d42fe..498f329297b8 100644
--- a/Generators/CosmicGenerator/CMakeLists.txt
+++ b/Generators/CosmicGenerator/CMakeLists.txt
@@ -1,19 +1,8 @@
-################################################################################
-# Package: CosmicGenerator
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CosmicGenerator )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          Generators/AtlasHepMC
-                          Generators/GeneratorModules
-                          Generators/AtlasHepMC
-                          PRIVATE
-                          GaudiKernel )
-
 # External dependencies:
 find_package( CLHEP )
 
@@ -30,8 +19,7 @@ atlas_add_library( CosmicGeneratorLib
 
 atlas_add_component( CosmicGenerator
                      src/components/*.cxx
-                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaKernel GeneratorModulesLib GaudiKernel CosmicGeneratorLib )
+                     LINK_LIBRARIES CosmicGeneratorLib )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
diff --git a/Generators/EvgenJobTransforms/CMakeLists.txt b/Generators/EvgenJobTransforms/CMakeLists.txt
index 53e08f83fde6..c449d97a4d61 100644
--- a/Generators/EvgenJobTransforms/CMakeLists.txt
+++ b/Generators/EvgenJobTransforms/CMakeLists.txt
@@ -1,15 +1,8 @@
-
-################################################################################
-# Package: EvgenJobTransforms
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( EvgenJobTransforms )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Tools/PyJobTransforms )
-
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/*.py )
diff --git a/Generators/EvgenProdTools/CMakeLists.txt b/Generators/EvgenProdTools/CMakeLists.txt
index 9fc1f78f57cb..c2a3600b0573 100644
--- a/Generators/EvgenProdTools/CMakeLists.txt
+++ b/Generators/EvgenProdTools/CMakeLists.txt
@@ -1,23 +1,8 @@
-################################################################################
-# Package: EvgenProdTools
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( EvgenProdTools )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Generators/GenAnalysisTools/TruthHelper
-                          Generators/GenInterfaces
-                          Generators/GeneratorModules
-                          Generators/AtlasHepMC
-                          PRIVATE
-                          Control/AthenaKernel
-                          Event/EventInfo
-                          GaudiKernel
-                          Generators/TruthUtils )
-
 # External dependencies:
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
@@ -31,8 +16,7 @@ atlas_add_library( EvgenProdToolsLib
 
 atlas_add_component( EvgenProdTools
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} AtlasHepMCLib AthenaBaseComps TruthHelper GeneratorModulesLib AthenaKernel EventInfo GaudiKernel TruthUtils EvgenProdToolsLib )
+                     LINK_LIBRARIES EvgenProdToolsLib )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/Generators/FlowAfterburner/CMakeLists.txt b/Generators/FlowAfterburner/CMakeLists.txt
index 0185f2a587c7..bbeab93b32a0 100644
--- a/Generators/FlowAfterburner/CMakeLists.txt
+++ b/Generators/FlowAfterburner/CMakeLists.txt
@@ -1,22 +1,8 @@
-################################################################################
-# Package: FlowAfterburner
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( FlowAfterburner )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          GaudiKernel
-                          Generators/GenAnalysisTools/TruthHelper
-                          Generators/GeneratorObjects
-                          Generators/AtlasHepMC
-                          PRIVATE
-                          Control/StoreGate
-                          Generators/TruthUtils )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( GSL )
@@ -29,13 +15,12 @@ atlas_add_library( FlowAfterburnerLib
                    INCLUDE_DIRS ${GSL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_INCLUDE_DIRS 
                    DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${GSL_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel GaudiKernel TruthHelper GeneratorObjects StoreGateLib SGtests
-                   PRIVATE_LINK_LIBRARIES AtlasHepMCLib AtlasHepMCsearchLib TruthUtils )
+                   LINK_LIBRARIES ${GSL_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel AtlasHepMCLib GaudiKernel TruthHelper GeneratorObjects
+                   PRIVATE_LINK_LIBRARIES StoreGateLib TruthUtils )
 
 atlas_add_component( FlowAfterburner
                      src/components/*.cxx
-                     INCLUDE_DIRS ${GSL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}  ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${GSL_LIBRARIES} ${ROOT_LIBRARIES} AtlasHepMCLib  AtlasHepMCsearchLib ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel GaudiKernel TruthHelper GeneratorObjects StoreGateLib SGtests TruthUtils FlowAfterburnerLib )
+                     LINK_LIBRARIES FlowAfterburnerLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/Generators/GenInterfaces/CMakeLists.txt b/Generators/GenInterfaces/CMakeLists.txt
index 01a1961f64cd..a1d2be08a0a1 100644
--- a/Generators/GenInterfaces/CMakeLists.txt
+++ b/Generators/GenInterfaces/CMakeLists.txt
@@ -1,14 +1,8 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
 # The name of the package:
 atlas_subdir( GenInterfaces )
 
-# The dependencies of the package:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Generators/AtlasHepMC
-   GaudiKernel )
-
-# External dependencies:
-
 # Component(s) in the package:
 atlas_add_library( GenInterfacesLib
    GenInterfaces/*.h
@@ -19,5 +13,4 @@ atlas_add_library( GenInterfacesLib
 atlas_add_dictionary( GenInterfacesDict
    GenInterfaces/GenInterfacesDict.h
    GenInterfaces/selection.xml
-   LINK_LIBRARIES AtlasHepMCLib GenInterfacesLib )
-
+   LINK_LIBRARIES GenInterfacesLib )
diff --git a/Generators/GeneratorFilters/CMakeLists.txt b/Generators/GeneratorFilters/CMakeLists.txt
index 533134312a58..cf026c88f2a8 100644
--- a/Generators/GeneratorFilters/CMakeLists.txt
+++ b/Generators/GeneratorFilters/CMakeLists.txt
@@ -1,26 +1,8 @@
-################################################################################
-# Package: GeneratorFilters
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( GeneratorFilters )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/StoreGate
-                          GaudiKernel
-                          Generators/GeneratorModules
-                          Generators/AtlasHepMC
-                          PRIVATE
-                          Control/AthenaKernel
-                          Control/CxxUtils
-                          Event/EventInfo
-                          Event/xAOD/xAODJet
-                          Event/xAOD/xAODTruth
-                          Generators/TruthUtils
-                          PhysicsAnalysis/AnalysisCommon/ParticleEvent
-                          PhysicsAnalysis/TruthParticleID/McParticleEvent )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( HepPDT )
@@ -33,15 +15,13 @@ atlas_add_library( GeneratorFiltersLib
                    INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
                    PRIVATE_INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS}
                    DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib GaudiKernel StoreGateLib SGtests GeneratorModulesLib
-                   PRIVATE_LINK_LIBRARIES ${HEPPDT_LIBRARIES} AthenaKernel CxxUtils EventInfo xAODJet xAODTruth TruthUtils ParticleEvent McParticleEvent )
+                   LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib GaudiKernel StoreGateLib GeneratorModulesLib xAODJet
+                   PRIVATE_LINK_LIBRARIES ${HEPPDT_LIBRARIES} AthenaKernel CxxUtils EventInfo xAODTruth TruthUtils ParticleEvent McParticleEvent )
 
 atlas_add_component( GeneratorFilters
                      src/components/*.cxx
-                     INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib StoreGateLib SGtests GaudiKernel GeneratorModulesLib AthenaKernel CxxUtils EventInfo xAODJet xAODTruth TruthUtils ParticleEvent McParticleEvent GeneratorFiltersLib )
+                     LINK_LIBRARIES GeneratorFiltersLib )
 
 # Install job option fragments from the package:
 atlas_install_joboptions( share/common/*.py )
 
-
diff --git a/Generators/GeneratorFortranCommon/CMakeLists.txt b/Generators/GeneratorFortranCommon/CMakeLists.txt
index 2f1a30a601de..b1dd5d9fc9da 100644
--- a/Generators/GeneratorFortranCommon/CMakeLists.txt
+++ b/Generators/GeneratorFortranCommon/CMakeLists.txt
@@ -1,16 +1,8 @@
-################################################################################
-# Package: GeneratorFortranCommon
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( GeneratorFortranCommon )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/AthenaKernel
-   GaudiKernel )
-
 # Component(s) in the package:
 atlas_add_library( GeneratorFortranCommonLib
    src/inituser.F src/useuser.F src/getaddr.cxx
diff --git a/Generators/GeneratorModules/CMakeLists.txt b/Generators/GeneratorModules/CMakeLists.txt
index c5a14a50ebec..1239ed294e3a 100644
--- a/Generators/GeneratorModules/CMakeLists.txt
+++ b/Generators/GeneratorModules/CMakeLists.txt
@@ -1,19 +1,8 @@
-################################################################################
-# Package: GeneratorModules
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( GeneratorModules )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          GaudiKernel
-                          Generators/AtlasHepMC
-                          Generators/GeneratorObjects )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( HepPDT )
@@ -25,12 +14,11 @@ atlas_add_library( GeneratorModulesLib
                    PUBLIC_HEADERS GeneratorModules
                    INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
                    DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps AthenaKernel GaudiKernel GeneratorObjects StoreGateLib SGtests )
+                   LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps AthenaKernel GaudiKernel GeneratorObjects StoreGateLib )
 
 atlas_add_component( GeneratorModules
                      src/components/*.cxx
-                     INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps AthenaKernel StoreGateLib SGtests GaudiKernel GeneratorObjects GeneratorModulesLib )
+                     LINK_LIBRARIES GeneratorModulesLib )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
diff --git a/Generators/GeneratorObjects/CMakeLists.txt b/Generators/GeneratorObjects/CMakeLists.txt
index af7edc9db036..3c5a77aadb10 100644
--- a/Generators/GeneratorObjects/CMakeLists.txt
+++ b/Generators/GeneratorObjects/CMakeLists.txt
@@ -1,28 +1,10 @@
-################################################################################
-# Package: GeneratorObjects
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( GeneratorObjects )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthContainers
-                          Control/AthLinks
-                          Control/SGTools
-                          Control/AthenaKernel
-                          Event/xAOD/xAODTruth
-                          GaudiKernel
-                          Generators/AtlasHepMC
-                          PRIVATE
-                          AtlasTest/TestTools
-                          Control/CxxUtils
-                          Control/RootUtils
-                          Control/StoreGate )
-
 # External dependencies:
 find_package( CLHEP )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 find_package( GTest )
 
 # Component(s) in the package:
@@ -31,16 +13,14 @@ atlas_add_library( GeneratorObjects
                    src/McEventCollection.cxx
                    src/HijingEventParams.cxx
                    PUBLIC_HEADERS GeneratorObjects
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
+                   PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES  AtlasHepMCLib AthContainers AthLinks SGTools xAODTruth GaudiKernel RootUtilsPyROOT StoreGateLib SGtests
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} TestTools AthenaKernel RootUtils )
+                   LINK_LIBRARIES AthenaKernel AtlasHepMCLib AthContainers AthLinks SGTools xAODTruth GaudiKernel RootUtils StoreGateLib )
 
 atlas_add_dictionary( GeneratorObjectsDict
                       GeneratorObjects/McEventDict.h
                       GeneratorObjects/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES}  AtlasHepMCLib AthContainers AthLinks SGTools xAODTruth GaudiKernel TestTools AthenaKernel RootUtils RootUtilsPyROOT StoreGateLib SGtests GeneratorObjects )
+                      LINK_LIBRARIES GeneratorObjects RootUtils )
 
 # Install a dummy rootmap file to suppress loading the rootmap from hepmc3,
 # which defines dictionary entries for HepMC types that clash with
@@ -52,11 +32,9 @@ atlas_install_generic ( share/libHepMC3rootIO.rootmap
 
 atlas_add_test( HepMcParticleLink_test
                 SOURCES test/HepMcParticleLink_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}  ${GTEST_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthContainers CxxUtils AthLinks SGTools xAODTruth GaudiKernel TestTools AthenaKernel RootUtils RootUtilsPyROOT StoreGateLib SGtests GeneratorObjects ${GTEST_LIBRARIES} )
-
+                INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${GTEST_INCLUDE_DIRS}
+                LINK_LIBRARIES ${CLHEP_LIBRARIES} ${GTEST_LIBRARIES} CxxUtils GeneratorObjects TestTools )
 
 atlas_add_test( CachedParticlePtr_test
                 SOURCES test/CachedParticlePtr_test.cxx
-                LINK_LIBRARIES GeneratorObjects AtlasHepMCLib)
-
+                LINK_LIBRARIES GeneratorObjects )
diff --git a/Generators/GeneratorObjectsAthenaPool/CMakeLists.txt b/Generators/GeneratorObjectsAthenaPool/CMakeLists.txt
index 2e2c7eb39ece..5ed59bbaf500 100644
--- a/Generators/GeneratorObjectsAthenaPool/CMakeLists.txt
+++ b/Generators/GeneratorObjectsAthenaPool/CMakeLists.txt
@@ -1,19 +1,8 @@
-################################################################################
-# Package: GeneratorObjectsAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( GeneratorObjectsAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Database/AtlasSealCLHEP
-                          PRIVATE
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          Generators/GeneratorObjects
-                          Generators/GeneratorObjectsTPCnv )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( GeneratorObjectsAthenaPoolPoolCnv
                            src/*.cxx
diff --git a/Generators/GeneratorObjectsTPCnv/CMakeLists.txt b/Generators/GeneratorObjectsTPCnv/CMakeLists.txt
index aa5d5b632f0b..5dc8a3771c5d 100644
--- a/Generators/GeneratorObjectsTPCnv/CMakeLists.txt
+++ b/Generators/GeneratorObjectsTPCnv/CMakeLists.txt
@@ -1,65 +1,49 @@
-################################################################################
-# Package: GeneratorObjectsTPCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( GeneratorObjectsTPCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          GaudiKernel
-                          Generators/GeneratorObjects
-                          PRIVATE
-                          AtlasTest/TestTools
-                          Control/AthAllocators
-                          Control/AthenaKernel
-                          Generators/AtlasHepMC
-                          Generators/GenInterfaces )
-
 # External dependencies:
 find_package( CLHEP )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
 atlas_add_tpcnv_library( GeneratorObjectsTPCnv
                          src/*.cxx
                          PUBLIC_HEADERS GeneratorObjectsTPCnv
-                         PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                         LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaPoolCnvSvcLib GaudiKernel GeneratorObjects AthAllocators AthenaKernel GenInterfacesLib TestTools )
+                         PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
+                         LINK_LIBRARIES AthenaPoolCnvSvcLib AtlasHepMCLib GaudiKernel GeneratorObjects
+                         PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} AthAllocators AthenaKernel GenInterfacesLib StoreGateLib TestTools)
 
 atlas_add_dictionary( GeneratorObjectsTPCnvDict
                       GeneratorObjectsTPCnv/GeneratorObjectsTPCnvDict.h
                       GeneratorObjectsTPCnv/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} 
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AtlasHepMCLib AthenaPoolCnvSvcLib GaudiKernel GeneratorObjects AthAllocators AthenaKernel GeneratorObjectsTPCnv TestTools )
+                      LINK_LIBRARIES GeneratorObjectsTPCnv )
 
 atlas_add_dictionary( OLD_GeneratorObjectsTPCnvDict
                       GeneratorObjectsTPCnv/GeneratorObjectsTPCnvDict.h
                       GeneratorObjectsTPCnv/OLD_selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} 
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AtlasHepMCLib AthenaPoolCnvSvcLib GaudiKernel GeneratorObjects AthAllocators AthenaKernel GeneratorObjectsTPCnv TestTools )
+                      LINK_LIBRARIES GeneratorObjectsTPCnv )
 
 atlas_add_test( McEventCollectionCnv_p4_test
                 SOURCES
                 test/McEventCollectionCnv_p4_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
-                LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaPoolCnvSvcLib GaudiKernel GeneratorObjects TestTools StoreGateLib SGtests GeneratorObjectsTPCnv )
+                INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
+                LINK_LIBRARIES ${CLHEP_LIBRARIES} GeneratorObjectsTPCnv )
 
 atlas_add_test( McEventCollectionCnv_p5_test
                 SOURCES
                 test/McEventCollectionCnv_p5_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
-                LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaPoolCnvSvcLib GaudiKernel GeneratorObjects TestTools StoreGateLib SGtests GeneratorObjectsTPCnv )
+                INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
+                LINK_LIBRARIES ${CLHEP_LIBRARIES} GeneratorObjectsTPCnv )
 
 atlas_add_test( HepMcParticleLinkCnv_p1_test
                 SOURCES
                 test/HepMcParticleLinkCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
-                LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaPoolCnvSvcLib GaudiKernel GeneratorObjects TestTools StoreGateLib SGtests GeneratorObjectsTPCnv )
+                INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
+                LINK_LIBRARIES ${CLHEP_LIBRARIES} GeneratorObjectsTPCnv StoreGateLib TestTools )
 
 atlas_add_test( HepMcParticleLinkCnv_p2_test
                 SOURCES
                 test/HepMcParticleLinkCnv_p2_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
-                LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaPoolCnvSvcLib GaudiKernel GeneratorObjects TestTools StoreGateLib SGtests GeneratorObjectsTPCnv )
+                INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
+                LINK_LIBRARIES ${CLHEP_LIBRARIES} GeneratorObjectsTPCnv StoreGateLib TestTools )
diff --git a/Generators/GenzModuleEvent/CMakeLists.txt b/Generators/GenzModuleEvent/CMakeLists.txt
index c8063a30fdcc..04169fddffd5 100644
--- a/Generators/GenzModuleEvent/CMakeLists.txt
+++ b/Generators/GenzModuleEvent/CMakeLists.txt
@@ -1,14 +1,9 @@
-################################################################################
-# Package: GenzModuleEvent
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( GenzModuleEvent )
 
 # The dependencies of the package:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Generators/AtlasHepMC)
 
 # Component(s) in the package:
 atlas_add_library( GenzModuleEvent
diff --git a/Generators/HepMCWeightSvc/CMakeLists.txt b/Generators/HepMCWeightSvc/CMakeLists.txt
index 67bf86e764af..c8fe7876d0c9 100644
--- a/Generators/HepMCWeightSvc/CMakeLists.txt
+++ b/Generators/HepMCWeightSvc/CMakeLists.txt
@@ -1,29 +1,15 @@
-################################################################################
-# Package: HepMCWeightSvc
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( HepMCWeightSvc )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   GaudiKernel
-   PRIVATE
-   Control/AthenaBaseComps
-   Database/AthenaPOOL/AthenaPoolUtilities
-   Database/IOVDbDataModel
-   Database/IOVDbMetaDataTools
-   Event/EventInfo
-   Generators/GenInterfaces )
-
+# External dependencies:
 find_package( Boost )
 find_package( CORAL COMPONENTS CoralBase )
 
 # Component(s) in the package:
 atlas_add_component( HepMCWeightSvc
    src/*.cxx src/components/*.cxx
-   NO_PUBLIC_HEADERS
    INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
    LINK_LIBRARIES ${CORAL_LIBRARIES} GaudiKernel AthenaBaseComps
    AthenaPoolUtilities IOVDbDataModel EventInfo GenInterfacesLib IOVDbMetaDataToolsLib )
diff --git a/Generators/HforTool/CMakeLists.txt b/Generators/HforTool/CMakeLists.txt
index 79cd889ad38f..56ff1587cb23 100644
--- a/Generators/HforTool/CMakeLists.txt
+++ b/Generators/HforTool/CMakeLists.txt
@@ -1,33 +1,10 @@
-################################################################################
-# Package: HforTool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( HforTool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Event/EventInfo
-                          GaudiKernel
-                          Reconstruction/Jet/JetEvent
-                          PRIVATE
-                          Control/StoreGate
-                          Generators/TruthUtils
-                          Generators/GeneratorObjects
-                          Generators/AtlasHepMC
-                          Generators/GenInterfaces )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_component( HforTool
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} AtlasHepMCLib AthenaBaseComps EventInfo GaudiKernel JetEvent StoreGateLib SGtests GeneratorObjects TruthUtils GenInterfacesLib )
-
-# Install files from the package:
-atlas_install_headers( HforTool )
-
+                     LINK_LIBRARIES AtlasHepMCLib AthenaBaseComps EventInfo JetEvent GeneratorObjects TruthUtils GenInterfacesLib )
diff --git a/Generators/ParticleDecayer/CMakeLists.txt b/Generators/ParticleDecayer/CMakeLists.txt
index 9eced30bb549..df2c6b6c9460 100644
--- a/Generators/ParticleDecayer/CMakeLists.txt
+++ b/Generators/ParticleDecayer/CMakeLists.txt
@@ -1,19 +1,8 @@
-################################################################################
-# Package: ParticleDecayer
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( ParticleDecayer )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          Generators/GeneratorModules
-                          Generators/AtlasHepMC
-                          PRIVATE
-                          GaudiKernel
-                          Generators/GeneratorObjects )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( HepPDT )
@@ -26,9 +15,8 @@ atlas_add_component( ParticleDecayer
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaKernel GeneratorModulesLib GaudiKernel GeneratorObjects )
+                     LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaKernel GeneratorModulesLib GeneratorObjects )
 
 # Install files from the package:
-atlas_install_headers( ParticleDecayer )
 atlas_install_joboptions( share/*.py )
 
diff --git a/Generators/TruthIO/CMakeLists.txt b/Generators/TruthIO/CMakeLists.txt
index bd91ec10b475..86a910ee1af5 100644
--- a/Generators/TruthIO/CMakeLists.txt
+++ b/Generators/TruthIO/CMakeLists.txt
@@ -1,21 +1,8 @@
-################################################################################
-# Package: TruthIO
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TruthIO )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          Generators/GeneratorModules
-                          Generators/AtlasHepMC
-                          PRIVATE
-                          Control/StoreGate
-                          Event/EventInfo
-                          Generators/GeneratorObjects )
-
 # External dependencies:
 find_package( HepPDT )
 
@@ -24,9 +11,7 @@ atlas_add_component( TruthIO
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${HEPPDT_LIBRARIES} AtlasHepMCLib AtlasHepMCfioLib AthenaBaseComps GaudiKernel GeneratorModulesLib StoreGateLib SGtests EventInfo GeneratorObjects )
+                     LINK_LIBRARIES ${HEPPDT_LIBRARIES} AtlasHepMCLib AtlasHepMCfioLib AthenaBaseComps GaudiKernel GeneratorModulesLib StoreGateLib EventInfo GeneratorObjects )
 
 # Install files from the package:
-atlas_install_headers( TruthIO )
 atlas_install_joboptions( share/*.py )
-
diff --git a/Generators/TruthUtils/CMakeLists.txt b/Generators/TruthUtils/CMakeLists.txt
index e82e414ea1dc..c13fbe6a159e 100644
--- a/Generators/TruthUtils/CMakeLists.txt
+++ b/Generators/TruthUtils/CMakeLists.txt
@@ -1,18 +1,9 @@
-# $Id: CMakeLists.txt 744476 2016-05-03 13:24:11Z krasznaa $
-################################################################################
-# Package: TruthUtils
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TruthUtils )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Generators/AtlasHepMC )
-
 # External dependencies:
-find_package( Boost )
 find_package( HEPUtils )
 find_package( MCUtils )
 find_package( HepMC )
@@ -37,5 +28,5 @@ endif()
 atlas_add_library( TruthUtils
    TruthUtils/*.h Root/*.cxx
    PUBLIC_HEADERS TruthUtils
-   INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${extra_includes}
-   LINK_LIBRARIES ${Boost_LIBRARIES} ${extra_libs} )
+   INCLUDE_DIRS ${extra_includes}
+   LINK_LIBRARIES ${extra_libs} )
-- 
GitLab


From 6152113bd5bdea6bed469c46bc2e3b4a607cc459 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Wed, 7 Oct 2020 19:26:44 +0200
Subject: [PATCH 320/403] CaloClusterCorrection: fix link dependency

---
 Calorimeter/CaloClusterCorrection/CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Calorimeter/CaloClusterCorrection/CMakeLists.txt b/Calorimeter/CaloClusterCorrection/CMakeLists.txt
index c25ec3234ed0..24c0a64431e4 100644
--- a/Calorimeter/CaloClusterCorrection/CMakeLists.txt
+++ b/Calorimeter/CaloClusterCorrection/CMakeLists.txt
@@ -14,8 +14,8 @@ atlas_add_library( CaloClusterCorrectionLib
                    PUBLIC_HEADERS CaloClusterCorrection
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES AthenaKernel CaloConditions CaloEvent CaloInterfaceLib CaloRecLib CaloUtilsLib CxxUtils GaudiKernel StoreGateLib TileConditionsLib xAODCaloEvent
-                   PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} ${ROOT_LIBRARIES} AthContainers AthenaBaseComps CaloDetDescrLib CaloGeoHelpers CaloIdentifier LArRecConditions PathResolver )
+                   LINK_LIBRARIES AthenaKernel CaloConditions CaloEvent CaloInterfaceLib CaloRecLib CaloUtilsLib CxxUtils GaudiKernel LArRecConditions StoreGateLib TileConditionsLib xAODCaloEvent
+                   PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} ${ROOT_LIBRARIES} AthContainers AthenaBaseComps CaloDetDescrLib CaloGeoHelpers CaloIdentifier PathResolver )
 
 atlas_add_component( CaloClusterCorrection
                      src/components/*.cxx
-- 
GitLab


From dccbe3869754ee579773045bbc92222d55465ba4 Mon Sep 17 00:00:00 2001
From: Werner Wiedenmann <wiedenat@pcuwtr22d.cern.ch>
Date: Wed, 7 Oct 2020 19:32:48 +0200
Subject: [PATCH 321/403] Updates for HltROBDataProviderSvc

- try to release early possible locks in tbb::concurrent_unordered_map (see also ATR-22112)
- put clearing and size allocation for output arrays of the eventCache_checkRobListToCache function
  at the begin of the function
---
 .../src/HltROBDataProviderSvc.cxx             | 44 +++++++++++--------
 1 file changed, 25 insertions(+), 19 deletions(-)

diff --git a/HLT/Trigger/TrigControl/TrigServices/src/HltROBDataProviderSvc.cxx b/HLT/Trigger/TrigControl/TrigServices/src/HltROBDataProviderSvc.cxx
index 5745a8fe3e10..a9d7030af49d 100644
--- a/HLT/Trigger/TrigControl/TrigServices/src/HltROBDataProviderSvc.cxx
+++ b/HLT/Trigger/TrigControl/TrigServices/src/HltROBDataProviderSvc.cxx
@@ -219,11 +219,9 @@ void HltROBDataProviderSvc::addROBData(const EventContext& context, const std::v
 
   // allocate vector of missing ROB Ids
   std::vector<uint32_t> robIds_missing ;
-  robIds_missing.reserve( robIds.size() ) ;
 
   // allocate vector with existing ROB fragments in cache
   std::vector<const ROBF*> robFragments_inCache ;
-  robFragments_inCache.reserve( robIds.size() ) ;
 
   // check input ROB list against cache
   eventCache_checkRobListToCache(cache,robIds, robFragments_inCache, robIds_missing ) ;
@@ -325,7 +323,6 @@ void HltROBDataProviderSvc::getROBData(const EventContext& context,
 
   // allocate vector of missing ROB Ids
   std::vector<uint32_t> robIds_missing ;
-  robIds_missing.reserve( robIds.size() ) ;
 
   // check input ROB list against cache
   eventCache_checkRobListToCache(cache, robIds, robFragments, robIds_missing) ;
@@ -375,8 +372,6 @@ void HltROBDataProviderSvc::getROBData(const EventContext& context,
   eventCache_addRobData(cache, robFragments_missing) ;
 
   // return all the requested ROB fragments from the cache
-  robFragments.clear() ;
-  robIds_missing.clear() ;
   eventCache_checkRobListToCache(cache, robIds, robFragments, robIds_missing) ;
 }
 
@@ -534,7 +529,7 @@ void HltROBDataProviderSvc::eventCache_clear(EventCache* cache)
   cache->globalEventNumber = 0;
   cache->eventStatus       = 0;    
   cache->isEventComplete   = false;    
-  cache->robmap.clear();
+  { cache->robmap.clear(); }
 }
 
 void HltROBDataProviderSvc::eventCache_checkRobListToCache(EventCache* cache, const std::vector<uint32_t>& robIds_toCheck, 
@@ -543,6 +538,15 @@ void HltROBDataProviderSvc::eventCache_checkRobListToCache(EventCache* cache, co
 {
   ATH_MSG_VERBOSE("start of " << __FUNCTION__ << " number of ROB Ids to check = " << robIds_toCheck.size());
 
+  // clear output arrays
+  robFragments_inCache.clear();
+  robIds_missing.clear();
+
+  // allocate sufficient space for output arrays
+  robFragments_inCache.reserve( robIds_toCheck.size() );
+  robIds_missing.reserve( robIds_toCheck.size() );
+
+  // check input ROB ids
   for (uint32_t id : robIds_toCheck) {
 
     // check for duplicate IDs on the list of missing ROBs
@@ -553,12 +557,13 @@ void HltROBDataProviderSvc::eventCache_checkRobListToCache(EventCache* cache, co
     }
 
     // check if ROB is already in cache
-    ROBMAP::const_iterator map_it = cache->robmap.find(id);
-    if (map_it != cache->robmap.end()) {
-      ATH_MSG_VERBOSE(__FUNCTION__ << " ROB Id 0x" << MSG::hex << id << MSG::dec
-		      << " found for (global Id, L1 Id) = (" << cache->globalEventNumber << "," << cache->currentLvl1ID <<")" );
-      robFragments_inCache.push_back( &(map_it->second) );
-      continue;
+    { ROBMAP::const_iterator map_it = cache->robmap.find(id);
+      if (map_it != cache->robmap.end()) {
+	ATH_MSG_VERBOSE(__FUNCTION__ << " ROB Id 0x" << MSG::hex << id << MSG::dec
+			<< " found for (global Id, L1 Id) = (" << cache->globalEventNumber << "," << cache->currentLvl1ID <<")" );
+	robFragments_inCache.push_back( &(map_it->second) );
+	continue;
+      }
     }
 
     // check if ROB is actually enabled for readout
@@ -603,11 +608,12 @@ void HltROBDataProviderSvc::eventCache_addRobData(EventCache* cache, const std::
     }
 
     // check if ROB is already in cache
-    ROBMAP::const_iterator it = cache->robmap.find(id);
-    if (it != cache->robmap.end()) {
-      ATH_MSG_VERBOSE(__FUNCTION__ << " Duplicate ROB Id 0x" << MSG::hex << id << MSG::dec
-		      << " found for (global Id, L1 Id) = (" << cache->globalEventNumber << "," << cache->currentLvl1ID <<")" );
-      continue;
+    { ROBMAP::const_iterator it = cache->robmap.find(id);
+      if (it != cache->robmap.end()) {
+	ATH_MSG_VERBOSE(__FUNCTION__ << " Duplicate ROB Id 0x" << MSG::hex << id << MSG::dec
+			<< " found for (global Id, L1 Id) = (" << cache->globalEventNumber << "," << cache->currentLvl1ID <<")" );
+	continue;
+      }
     }
 
     // check for ROBs with no data 
@@ -632,12 +638,12 @@ void HltROBDataProviderSvc::eventCache_addRobData(EventCache* cache, const std::
     }
 
     // add ROB to map
-    cache->robmap[id] = rob;
+    { cache->robmap[id] = rob; }
   }
 }
 
 HltROBDataProviderSvc::EventCache::~EventCache()
 {
   //  delete event;
-  robmap.clear();
+  { robmap.clear(); }
 }
-- 
GitLab


From 0f51a05ffa2b194db4e51258fa24c26853010c3c Mon Sep 17 00:00:00 2001
From: Pavol Strizenec <pavol.strizenec@cern.ch>
Date: Wed, 7 Oct 2020 17:42:45 +0000
Subject: [PATCH 322/403] Fix LArCalibDigitsAccumulator

---
 .../LArROD/LArROD/LArCalibDigitsAccumulator.h |  7 ++
 .../LArROD/src/LArCalibDigitsAccumulator.cxx  | 77 ++++++++++++++++---
 2 files changed, 75 insertions(+), 9 deletions(-)

diff --git a/LArCalorimeter/LArROD/LArROD/LArCalibDigitsAccumulator.h b/LArCalorimeter/LArROD/LArROD/LArCalibDigitsAccumulator.h
index 20291f0ff284..7a5ac6b233d7 100644
--- a/LArCalorimeter/LArROD/LArROD/LArCalibDigitsAccumulator.h
+++ b/LArCalorimeter/LArROD/LArROD/LArCalibDigitsAccumulator.h
@@ -104,6 +104,13 @@ private:
    * */
   unsigned int m_event_counter;
 
+  // Information to remove certain readings if needed
+  std::map<std::string, std::map<int,std::vector<int>*>*>           m_readingsMap;
+  std::map<std::string, std::map<int,std::vector<int>*>*>::iterator m_readingsMap_it;
+  std::map<int, std::vector<int>*>::iterator                        m_channelMap_it;
+
+
+  int m_sampleShift;
 };
 
 #endif
diff --git a/LArCalorimeter/LArROD/src/LArCalibDigitsAccumulator.cxx b/LArCalorimeter/LArROD/src/LArCalibDigitsAccumulator.cxx
index cdf9a1abbc4e..a5b53859c826 100644
--- a/LArCalorimeter/LArROD/src/LArCalibDigitsAccumulator.cxx
+++ b/LArCalorimeter/LArROD/src/LArCalibDigitsAccumulator.cxx
@@ -14,7 +14,8 @@ using CLHEP::ns;
 
 LArCalibDigitsAccumulator::LArCalibDigitsAccumulator (const std::string& name, ISvcLocator* pSvcLocator):
   AthAlgorithm(name, pSvcLocator),
-  m_onlineHelper(0)
+  m_onlineHelper(0),
+  m_sampleShift(0)
 {
   declareProperty("LArAccuCalibDigitContainerName",m_calibAccuDigitContainerName, "LArAccumulatedCalibDigits");
   declareProperty("KeyList",m_keylist);
@@ -22,6 +23,7 @@ LArCalibDigitsAccumulator::LArCalibDigitsAccumulator (const std::string& name, I
   declareProperty("DelayScale",m_delayScale=1*ns);
   declareProperty("KeepOnlyPulsed",m_keepPulsed=false);
   declareProperty("isSC",m_isSC=false);
+  declareProperty("SampleShift",m_sampleShift=0);
   m_delay=-1;
   m_event_counter=0;
 }
@@ -57,6 +59,14 @@ StatusCode LArCalibDigitsAccumulator::initialize(){
 
   m_Accumulated.resize(m_onlineHelper->channelHashMax());
 
+  std::vector<std::string>::const_iterator key_it=m_keylist.begin();
+  std::vector<std::string>::const_iterator key_it_e=m_keylist.end();
+  for (;key_it!=key_it_e;key_it++) { 
+    std::map<int,std::vector<int>*>* map_forKey = new std::map<int,std::vector<int>*>();
+    m_readingsMap[*key_it] = map_forKey;
+  }
+
+
   return StatusCode::SUCCESS;
 }
 
@@ -98,7 +108,16 @@ StatusCode LArCalibDigitsAccumulator::execute()
   
   //Loop over all containers that are to be processed (e.g. different gains)
   for (;key_it!=key_it_e;key_it++) { 
-    
+
+    std::map<int,std::vector<int>*>* readingsMap_pointer = 0;
+    m_readingsMap_it = m_readingsMap.find(*key_it);
+    if (m_readingsMap_it == m_readingsMap.end()) {
+      ATH_MSG_INFO("Did not find corresponding map for key " << *key_it);
+    } else {
+      readingsMap_pointer = m_readingsMap_it->second;
+    }
+
+
     sc=evtStore()->retrieve(calibDigitContainer,*key_it);
     if(sc.isFailure()) {
       ATH_MSG_ERROR( "Can't retrieve LArCalibDigitContainer with key " << *key_it << "from StoreGate." );
@@ -144,6 +163,19 @@ StatusCode LArCalibDigitsAccumulator::execute()
       const IdentifierHash febhash = m_onlineHelper->feb_Hash(febid);
       const IdentifierHash hashid = m_onlineHelper->channel_Hash(chid);
       
+
+      m_channelMap_it = readingsMap_pointer->find(chid.get_identifier32().get_compact());
+      std::vector<int>* cellStorage;
+      if (m_channelMap_it == readingsMap_pointer->end()) {
+	std::vector<int>* cellVector = new std::vector<int>();
+        (*readingsMap_pointer)[chid.get_identifier32().get_compact()] = cellVector;
+        
+        cellStorage = cellVector;
+      } else {
+        cellStorage = m_channelMap_it->second;
+      }
+
+
       // BELOW: DIRTY HACK BECAUSE THERE SEEMS TO BE A BUG IN THE CABLINGSVC CONCERNING THE CALIBLINES.
 
       // get calibration settings
@@ -172,22 +204,21 @@ StatusCode LArCalibDigitsAccumulator::execute()
 	  ATH_MSG_DEBUG( "Delay is changing to " << (*it)->delay() << " from " << m_delay << ": book a new LArAccumulatedCalibDigitContainer" );
 	  m_delay=(*it)->delay();
 	}
-
+      
       CaloGain::CaloGain gain=(*it)->gain();
       if (gain<0 || gain>CaloGain::LARNGAIN)
 	{ATH_MSG_ERROR( "Found not-matching gain number ("<< (int)gain <<")" );
           delete larAccuCalibDigitContainer;
 	  return StatusCode::FAILURE;
 	}
-
+      
       // object to be filled for each cell
       LArAccumulated& cellAccumulated = m_Accumulated[hashid];
       
       // trigger counter for each cell
       cellAccumulated.m_ntrigger++;
-
-      ATH_MSG_DEBUG( "chid = " << chid << ", trigger = " << cellAccumulated.m_ntrigger << ", DAC = " << (*it)->DAC() );
-
+      ATH_MSG_INFO( "chid = " << chid << ", trigger = " << cellAccumulated.m_ntrigger << ", DAC = " << (*it)->DAC() );
+            
       // at first trigger, initialize vectors
       unsigned int sizeSamples = (*it)->samples().size();
       ATH_MSG_DEBUG( "sizeSteps = " << sizeSteps << ", # of samples = " << sizeSamples );
@@ -215,6 +246,7 @@ StatusCode LArCalibDigitsAccumulator::execute()
       
 
       for(unsigned int j=0;j<sizeSamples;j++){
+	cellStorage->push_back((*it)->samples()[j]);
 	cellAccumulated.m_sum[j] += (*it)->samples()[j];
 	cellAccumulated.m_sum2[j] += (*it)->samples()[j]*(*it)->samples()[j];
       }
@@ -227,12 +259,36 @@ StatusCode LArCalibDigitsAccumulator::execute()
       if(cellAccumulated.m_ntrigger==nTriggerPerStep[febhash]){
 	ATH_MSG_DEBUG( "filling LArAccumulatedCalibDigit " );
 	ATH_MSG_DEBUG( "chid = " << chid << ", gain = " << gain << ", DAC = " << (*it)->DAC() << ", isPulsed = " << isPulsed << ", delay = " << m_delay << ", trigPerStep = " << nTriggerPerStep[febhash] << ", istep = " << iStepTrigger[febhash] );
+
+
+
+	if ( m_sampleShift != 0 ){
+	  int half_sam = (int)((sizeSamples-m_sampleShift)/2.);
+	  
+	  // First loop to find "allGood" samplings and their mean values
+	  for (unsigned int sample = 0; sample < sizeSamples; ++sample) {
+	    std::vector<int> sampleVector;
+	    
+	    for (unsigned int trig = 0; trig < nTriggerPerStep[febhash]; ++trig) {
+	      sampleVector.push_back(cellStorage->at(trig*(sizeSamples-m_sampleShift)+sample));
+	    }
+	    sort(sampleVector.begin(), sampleVector.end());
+	    
+	    uint32_t sum  = 0;
+	    uint32_t sum2 = 0;
+	    
+	    for (unsigned int trig = 0; trig < nTriggerPerStep[febhash]; ++trig) {
+	      if (std::abs(sampleVector.at(trig) - sampleVector.at(half_sam)) < 10) {
+		sum  += sampleVector.at(trig);
+		sum2 += sampleVector.at(trig) * sampleVector.at(trig);
+	      }
+	    }
+	  }
+	}
 	
 	accuCalibDigit->setAddSubStep(cellAccumulated.m_sum,cellAccumulated.m_sum2,nTriggerPerStep[febhash]);
 	iStepTrigger[febhash]++;
 	
-	//	std::cout << "DAC after = " << accuCalibDigit->DAC() << std::endl;
-
 	std::vector<float> mean =  accuCalibDigit->mean();
 	std::vector<float> RMS =  accuCalibDigit->RMS();
 
@@ -245,6 +301,9 @@ StatusCode LArCalibDigitsAccumulator::execute()
 
 	cellAccumulated.m_ntrigger = 0;
 
+	delete cellStorage;
+	(*readingsMap_pointer).erase(chid.get_identifier32().get_compact());
+	
       }
       
     }// loop over cells in container
-- 
GitLab


From 8efbb030fa92d098395c4b39966e4872be9bf3b9 Mon Sep 17 00:00:00 2001
From: William Axel Leight <william.axel.leight@cern.ch>
Date: Wed, 7 Oct 2020 17:46:55 +0000
Subject: [PATCH 323/403] Slightly hacky fix for failure to find CaloExtension

This fix gets around the ongoing problem with rare crashes when determining muon etcone isolation due to failing to find a CaloExtension if the dynamic ID alignment is enabled by adding a second instance of the ParticleCaloExtensionTool to the MuonCreatorTool. Now there is one instance for combined (and MS) tracks, and one for ID tracks: the former starts extrapolating from the perigee, the latter from the ID exit. The CaloIsolationTool no longer performs a separate extrapolation, but uses the result of the one in the MuonCreatorTool.  Note that should the CaloExtension not be found, there will still be a crash in the CaloIsolationTool, but tailoring the starting point correctly in the MuonCreatorTool should ensure that the CaloExtension is found.  The real solution to the crash is to fix the Extrapolator, as discussed in ATLASRECTS-5674, but this will hopefully avoid the problem for the moment.
The real source of the crash is
---
 .../src/MuonCreatorTool.cxx                   |  47 ++++---
 .../src/MuonCreatorTool.h                     |   3 +-
 .../python/MuonCombinedRecToolsConfig.py      |   4 +
 .../python/MuonCombinedAlgs.py                |   1 +
 .../python/MuonCombinedTools.py               |   1 +
 .../IsolationTool/CaloIsolationTool.h         |  23 ++--
 .../IsolationTool/Root/CaloIsolationTool.cxx  | 116 +++++++++++++++---
 .../TrackToCalo/CaloCellSelectorLayerdR.h     |   4 +-
 .../src/CaloCellSelectorLayerdR.cxx           |  22 ++--
 .../TrigMuonEF/python/TrigMuonEFConfig.py     |   2 +
 10 files changed, 171 insertions(+), 52 deletions(-)

diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.cxx b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.cxx
index 814861321f45..f6a12406972d 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.cxx
@@ -59,6 +59,7 @@ namespace MuonCombined {
     ATH_CHECK(m_printer.retrieve());
     ATH_CHECK(m_muonPrinter.retrieve());
     ATH_CHECK(m_caloExtTool.retrieve());
+    ATH_CHECK(m_caloExtToolID.retrieve());
     ATH_CHECK(m_edmHelperSvc.retrieve());
     ATH_CHECK(m_particleCreator.retrieve());
     ATH_CHECK(m_ambiguityProcessor.retrieve());
@@ -318,14 +319,15 @@ namespace MuonCombined {
 
     // check if there is a cluster container, if yes collect the cells around the muon and fill
     // Etcore variables for muon
-    if (m_useCaloCells) collectCells(*muon,outputData.clusterContainer);
+    if(m_useCaloCells) collectCells(*muon,outputData.clusterContainer,caloExtension.get());
     if (m_requireIDTracks){
-        if (!muon->trackParticle(xAOD::Muon::TrackParticleType:: InnerDetectorTrackParticle)){
-            ATH_MSG_DEBUG("The muon does not have any associated ID track although it should have. Discard it");
-            outputData.muonContainer->pop_back();
-            return nullptr;
-        }
+      if (!muon->trackParticle(xAOD::Muon::TrackParticleType:: InnerDetectorTrackParticle)){
+	ATH_MSG_DEBUG("The muon does not have any associated ID track although it should have. Discard it");
+	outputData.muonContainer->pop_back();
+	return nullptr;
+      }
     }
+
     return muon;
   }
 
@@ -1612,7 +1614,7 @@ namespace MuonCombined {
     if (problem) ATH_MSG_VERBOSE("Dumping problematic muon: "<<m_muonPrinter->print(muon));
   }
   
-  void MuonCreatorTool::collectCells( xAOD::Muon& muon, xAOD::CaloClusterContainer* clusterContainer ) const {
+  void MuonCreatorTool::collectCells( xAOD::Muon& muon, xAOD::CaloClusterContainer* clusterContainer, Trk::CaloExtension* inputCaloExt ) const {
     muon.auxdata< float >("ET_Core")     = 0;
     muon.auxdata< float >("ET_EMCore")   = 0;
     muon.auxdata< float >("ET_TileCore") = 0;
@@ -1627,18 +1629,29 @@ namespace MuonCombined {
     // get ParticleCellAssociation
     ATH_MSG_DEBUG(" Selected track: pt " << tp->pt() << " eta " << tp->eta() << " phi " << tp->phi());
 
-    std::unique_ptr<Trk::CaloExtension> caloExtension =m_caloExtTool->caloExtension(*tp);
-    if(!caloExtension){
-      ATH_MSG_WARNING("Can not get caloExtension.");
-      return;
-    };
+    xAOD::CaloCluster* cluster=nullptr;
+    SG::ReadHandle<CaloCellContainer> container(m_cellContainerName);
 
-    if( caloExtension->caloLayerIntersections().empty())
-      ATH_MSG_DEBUG( "Received a caloExtension object without track extrapolation");
+    if(!inputCaloExt){ //need to make one
+      //for some reason, ID tracks need to be extrapolated from the ID exit, and combined from the perigee
+      std::unique_ptr<Trk::CaloExtension> caloExtension;
+      if(muon.muonType()==xAOD::Muon::SegmentTagged || muon.muonType()==xAOD::Muon::CaloTagged){
+	ATH_MSG_DEBUG("use the ID track extension tool");
+	caloExtension=m_caloExtToolID->caloExtension(*tp);
+      }
+      else caloExtension=m_caloExtTool->caloExtension(*tp);
+      if(!caloExtension){
+	ATH_MSG_WARNING("Can not get caloExtension.");
+	return;
+      }
 
-    SG::ReadHandle<CaloCellContainer> container(m_cellContainerName);
+      if( caloExtension->caloLayerIntersections().empty())
+	ATH_MSG_DEBUG( "Received a caloExtension object without track extrapolation");
+
+      cluster = m_cellCollector.collectCells( *caloExtension, *container, *clusterContainer );
+    }
+    else cluster = m_cellCollector.collectCells( *inputCaloExt, *container, *clusterContainer );
 
-    xAOD::CaloCluster* cluster = m_cellCollector.collectCells( *caloExtension, *container, *clusterContainer );
     if( !cluster ){
       ATH_MSG_WARNING("Failed to create cluster from ParticleCellAssociation");
       return;
@@ -1647,7 +1660,7 @@ namespace MuonCombined {
     }
 	
     // create element links
-    ElementLink< xAOD::CaloClusterContainer >   clusterLink(*clusterContainer,clusterContainer->size()-1);
+    ElementLink< xAOD::CaloClusterContainer > clusterLink(*clusterContainer,clusterContainer->size()-1);
     muon.setClusterLink(clusterLink);
 
     const CaloNoise* caloNoise = nullptr;
diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.h b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.h
index a2558dc32571..3762e97b4f21 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.h
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.h
@@ -130,7 +130,7 @@ namespace MuonCombined {
 
     void setP4( xAOD::Muon& muon, const xAOD::TrackParticle& tp ) const;
 
-    void collectCells( xAOD::Muon& muon, xAOD::CaloClusterContainer* clusterContainer ) const;
+    void collectCells( xAOD::Muon& muon, xAOD::CaloClusterContainer* clusterContainer, Trk::CaloExtension* inputCaloExt = nullptr ) const;
 
     void getRpcTiming(const xAOD::TrackParticle& tp,
 		      std::vector<unsigned int>& rpcHitIdentifier,
@@ -151,6 +151,7 @@ namespace MuonCombined {
     ToolHandle<Muon::MuonEDMPrinterTool> m_printer {this, "Printer", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"};
     ToolHandle<Rec::IMuonPrintingTool> m_muonPrinter {this, "MuonPrinter", "Rec::MuonPrintingTool/MuonPrintingTool"};
     ToolHandle<Trk::IParticleCaloExtensionTool> m_caloExtTool {this, "ParticleCaloExtensionTool", "Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool"};
+    ToolHandle<Trk::IParticleCaloExtensionTool> m_caloExtToolID {this, "ParticleCaloExtensionToolID", "Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool"};
     ToolHandle<Trk::ITrackParticleCreatorTool> m_particleCreator {this, "TrackParticleCreator", "Trk::TrackParticleCreatorTool/MuonCombinedTrackParticleCreator"};
     ToolHandle<Trk::ITrackAmbiguityProcessorTool> m_ambiguityProcessor {this, "AmbiguityProcessor", "Trk::TrackSelectionProcessorTool/MuonAmbiProcessor"};
     ToolHandle<Trk::IPropagator> m_propagator {this, "Propagator", "Trk::RungeKuttaPropagator/AtlasRungeKuttaPropagator"};
diff --git a/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedRecToolsConfig.py b/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedRecToolsConfig.py
index 4df13ee9e279..a18ec42c6a3e 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedRecToolsConfig.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedRecToolsConfig.py
@@ -228,6 +228,10 @@ def MuonCreatorToolCfg(flags, name="MuonCreatorTool", **kwargs):
     kwargs.setdefault("ParticleCaloExtensionTool", acc.getPrimary() )
     result.merge(acc)
 
+    acc = ParticleCaloExtensionToolCfg(flags)
+    kwargs.setdefault("ParticleCaloExtensionToolID", acc.getPrimary() )
+    result.merge(acc)
+
     from MuonConfig.MuonRecToolsConfig import MuonAmbiProcessorCfg, MuonTrackSummaryToolCfg
     acc = MuonAmbiProcessorCfg(flags)
     kwargs.setdefault("AmbiguityProcessor", acc.popPrivateTools())
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
index abc43efb1bf5..171470ad2ac3 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
@@ -267,6 +267,7 @@ class MuonCombinedReconstruction(ConfiguredMuonRec):
  
         # setting this here, in the new configuration it will be easier to do
         topSequence.MuonCreatorAlg.MuonCreatorTool.ParticleCaloExtensionTool.StartFromPerigee=True
+        topSequence.MuonCreatorAlg.MuonCreatorTool.ParticleCaloExtensionToolID.StartFromPerigee=False
 
         if muonCombinedRecFlags.doMuGirl() and muonCombinedRecFlags.doMuGirlLowBeta():
             topSequence += getAlgorithm("StauCreatorAlg")
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedTools.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedTools.py
index b8813836f425..bb283fb4241a 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedTools.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedTools.py
@@ -114,6 +114,7 @@ def MuonCreatorTool(name="MuonCreatorTool",**kwargs):
 
     kwargs.setdefault("TrackParticleCreator", getPublicTool("MuonCombinedParticleCreator") )
     kwargs.setdefault("ParticleCaloExtensionTool", getPublicTool("MuonParticleCaloExtensionTool") )
+    kwargs.setdefault("ParticleCaloExtensionToolID", getPublicTool("MuonParticleCaloExtensionTool") )
     kwargs.setdefault("MuonPrinter", getPublicTool("MuonPrintingTool") )
     return CfgMgr.MuonCombined__MuonCreatorTool(name,**kwargs)
 
diff --git a/Reconstruction/RecoTools/IsolationTool/IsolationTool/CaloIsolationTool.h b/Reconstruction/RecoTools/IsolationTool/IsolationTool/CaloIsolationTool.h
index 6109d6865a69..a5a057dd481e 100644
--- a/Reconstruction/RecoTools/IsolationTool/IsolationTool/CaloIsolationTool.h
+++ b/Reconstruction/RecoTools/IsolationTool/IsolationTool/CaloIsolationTool.h
@@ -89,18 +89,17 @@ namespace xAOD {
       // This never seems to have more than one entry???
       typedef std::map<const IParticle*, const IParticle*> derefMap_t;
 
-      /** cast for TrackParticle (etcone muon) */    
-      bool caloCellIsolation( CaloIsolation& result, 
+      /** cast for Muon (etcone muon) */
+      bool caloCellIsolation( CaloIsolation& result,
 #ifndef XAOD_ANALYSIS
-      const TrackParticle& tp, 
+			      const Muon& muon,
 #endif
-      const std::vector<Iso::IsolationType>& cones, CaloCorrection corrections
+			      const std::vector<Iso::IsolationType>& cones, CaloCorrection corrections
 #ifndef XAOD_ANALYSIS
-      , const CaloCellContainer* container
-      , double coneCoreSize
-      , const derefMap_t& derefMap
+			      , double coneCoreSize
+			      , const derefMap_t& derefMap
 #endif
-      ) const;
+			      ) const;
 
       /** cast for egamma (etcone egamma)*/    
       bool caloCellIsolation( CaloIsolation& result, const Egamma& tp, const std::vector<Iso::IsolationType>& cones, CaloCorrection corrections
@@ -153,6 +152,14 @@ namespace xAOD {
                             double coneCoreSize,
                             const derefMap_t& derefMap) const;
 #endif
+
+      // etcone computation for TrackParticle
+#ifndef XAOD_ANALYSIS
+      bool etConeIsolation( CaloIsolation& result, const Muon& muon,
+                            const std::vector<Iso::IsolationType>& isoTypes,
+                            double coneCoreSize,
+                            const derefMap_t& derefMap) const;
+#endif
       
       // etcone computation for Egamma
 #ifndef XAOD_ANALYSIS
diff --git a/Reconstruction/RecoTools/IsolationTool/Root/CaloIsolationTool.cxx b/Reconstruction/RecoTools/IsolationTool/Root/CaloIsolationTool.cxx
index e48ac9c1f8cf..af610bb51f00 100644
--- a/Reconstruction/RecoTools/IsolationTool/Root/CaloIsolationTool.cxx
+++ b/Reconstruction/RecoTools/IsolationTool/Root/CaloIsolationTool.cxx
@@ -154,14 +154,14 @@ namespace xAOD {
       coneCoreSize = m_coneCoreSizeMu;
 
     // muon etcone isolation
-    const TrackParticle* trkp = dynamic_cast<const TrackParticle*>(ip);
-    if( trkp ) return caloCellIsolation(result,*trkp,cones,corrlist,container,coneCoreSize, derefMap);
+    const Muon* muon = dynamic_cast<const Muon*>(&particle);
+    if(muon) return caloCellIsolation(result,*muon,cones,corrlist,coneCoreSize, derefMap);
 
     // egamma etcone isolation
     const Egamma* egam = dynamic_cast<const Egamma*>(ip);
     if( egam ) return caloCellIsolation(result,*egam,cones,corrlist,container);
 
-    ATH_MSG_WARNING("CaloCellIsolation only supported for TrackParticles and Egamma");
+    ATH_MSG_WARNING("CaloCellIsolation only supported for Muons and Egamma");
 
     return true;
 #endif // not XAOD_ANALYSIS
@@ -238,18 +238,17 @@ namespace xAOD {
   }
 
 
-  // casted interface for TrackParticle cell-based isolation (etcone)
+  // casted interface for Muon cell-based isolation (etcone)
   bool CaloIsolationTool::caloCellIsolation( CaloIsolation& result,
 #ifndef XAOD_ANALYSIS
-  const TrackParticle& tp,
+					     const Muon& muon,
 #endif
-	const std::vector<Iso::IsolationType>& isoTypes, CaloCorrection corrlist
+					     const std::vector<Iso::IsolationType>& isoTypes, CaloCorrection corrlist
 #ifndef XAOD_ANALYSIS
-	, const CaloCellContainer* container
-        , double coneCoreSize
-        , const derefMap_t& derefMap
+					     , double coneCoreSize
+					     , const derefMap_t& derefMap
 #endif
-	) const {
+					     ) const {
     if( isoTypes.empty() ) {
       ATH_MSG_WARNING("Empty list passed, failing calculation");
       return false;
@@ -263,13 +262,13 @@ namespace xAOD {
 
     if (theFlavour == Iso::etcone)
 #ifndef XAOD_ANALYSIS
-      return etConeIsolation(result, tp, isoTypes, container, coneCoreSize, derefMap);
+      return etConeIsolation(result, muon, isoTypes, coneCoreSize, derefMap);
 #else
-      return true;
+    return true;
 #endif
 
     ATH_MSG_WARNING("Unsupported isolation flavour passed, cannot calculate isolation " <<
-		    static_cast<int>(theFlavour));
+                    static_cast<int>(theFlavour));
 
     return false;
   }
@@ -702,6 +701,93 @@ namespace xAOD {
   }
 #endif
 
+#ifndef XAOD_ANALYSIS
+  // etcone implementation for Muon
+  bool CaloIsolationTool::etConeIsolation( CaloIsolation& result, const Muon& muon,
+                                           const std::vector<Iso::IsolationType>& isoTypes,
+                                           double coneCoreSize,
+                                           const derefMap_t& derefMap) const {
+
+    std::vector<double> conesf;
+    double maxConeSize = -1;
+    for( auto isoType : isoTypes ){
+      if( Iso::isolationFlavour(isoType) != Iso::etcone ) {
+        ATH_MSG_WARNING("Unsupported isolation type passed, cannot calculate isolation " << static_cast<int>(isoType));
+        return false;
+      }
+      double cone = Iso::coneSize(isoType);
+      conesf.push_back(cone);
+      if(cone>maxConeSize) maxConeSize = cone;
+    }
+
+    const xAOD::CaloCluster* muonCluster=*muon.clusterLink();
+    if(!muonCluster){//have to figure this part out
+      ATH_MSG_WARNING("muon has no cluster, cannot calculate etcone isolation");
+      return false;
+    }
+    /// add coreCone if asked -- make sure it's the last one! or a better
+    const double coreConeDR = coneCoreSize;
+    bool doCoreCone = (!m_saveOnlyRequestedCorrections || result.corrlist.calobitset.test(static_cast<unsigned int>(Iso::coreCone)));
+    if(doCoreCone && maxConeSize<coreConeDR) maxConeSize = coreConeDR;
+    /// start the calculation
+    ATH_MSG_DEBUG("calculating etcone for # " << conesf.size() << " cones");
+    Trk::CaloCellSelectorLayerdR selector(maxConeSize);
+    selector.preSelectAction(*muonCluster);
+    ATH_MSG_DEBUG("looping over cells " << muonCluster->size());
+    for(unsigned int i=0; i<conesf.size(); i++){
+      double totE = 0.;
+      selector.setConeSize(conesf[i]);
+      xAOD::CaloCluster::const_cell_iterator cell_itr=muonCluster->begin();
+      for(; cell_itr!=muonCluster->end(); ++cell_itr){
+        if( !selector.select(**cell_itr) ) continue;
+        if (m_ExcludeTG3 && CaloCell_ID::TileGap3 == (*cell_itr)->caloDDE()->getSampling()) continue;
+        totE += (*cell_itr)->et();
+      }
+      result.etcones[i] = totE;
+      ATH_MSG_DEBUG("etcone raw: coneSize = " << conesf[i] << "; etcone = " << result.etcones[i]);
+    }
+    ATH_MSG_DEBUG("done looping over cells ");
+    /// do coreCone
+    if(doCoreCone){
+      ATH_MSG_DEBUG("starting etcone, coreCone");
+      double totE = 0.;
+      selector.setConeSize(coreConeDR);
+      xAOD::CaloCluster::const_cell_iterator cell_itr=muonCluster->begin();
+      for(; cell_itr!=muonCluster->end(); ++cell_itr){
+        if( !selector.select(**cell_itr) ) continue;
+        if (m_ExcludeTG3 && CaloCell_ID::TileGap3 == (*cell_itr)->caloDDE()->getSampling()) continue;
+        totE += (*cell_itr)->et();
+      }
+      std::map<Iso::IsolationCorrectionParameter,float> corecorr;
+      corecorr[Iso::coreEnergy] = totE;
+      corecorr[Iso::coreArea]   = coreConeDR*coreConeDR*M_PI;
+      result.coreCorrections[Iso::coreCone] = corecorr;
+      ATH_MSG_DEBUG("done etcone, coreCone");
+
+      /// apply the correction if required.
+      if(result.corrlist.calobitset.test(static_cast<unsigned int>(Iso::coreCone))){
+        double ecore = totE;
+        ATH_MSG_DEBUG("Applying coreCone correction for trackParticle etcone isolation.");
+        for( unsigned int i=0;i<result.etcones.size();++i ) {
+          result.etcones[i] -= ecore;
+          ATH_MSG_DEBUG("i: " << i << " cone [before] " << result.etcones[i]+ecore << " cone [after] " << result.etcones[i]);
+        }
+      }
+    }
+
+    // calculate etcore
+    if(!m_saveOnlyRequestedCorrections ||
+       result.corrlist.calobitset.test(static_cast<unsigned int>(Iso::coreMuon))){
+      const TrackParticle* tp = nullptr;
+      if(muon.primaryTrackParticleLink().isValid() && muon.author()!=2) tp = *muon.primaryTrackParticleLink();
+      if( !tp) tp = *muon.inDetTrackParticleLink();
+      correctIsolationEnergy_MuonCore(result, *tp, derefMap);
+    }
+
+    return true;
+  }
+#endif
+
 #ifndef XAOD_ANALYSIS
   // etcone implementation for Egamma
   bool CaloIsolationTool::etConeIsolation( CaloIsolation& result, const Egamma& eg,
@@ -1221,8 +1307,8 @@ bool CaloIsolationTool::correctIsolationEnergy_pflowCore(CaloIsolation& result,
     if(muI!=derefMap.end() && muI->second->isAvailable<float>("ET_Core")){
       ecore = muI->second->auxdataConst<float>("ET_Core");
     }else{
-     ATH_MSG_WARNING("ET_Core of muon not found! coreMuon isolation correction will not be applied!!!");
-     return false;
+      ATH_MSG_WARNING("ET_Core of muon not found! coreMuon isolation correction will not be applied!!!");
+      return false;
     }
 
     std::map<Iso::IsolationCorrectionParameter,float> corecorr;
diff --git a/Reconstruction/RecoTools/TrackToCalo/TrackToCalo/CaloCellSelectorLayerdR.h b/Reconstruction/RecoTools/TrackToCalo/TrackToCalo/CaloCellSelectorLayerdR.h
index b4ecc4d4aee1..8f3130a1b57e 100644
--- a/Reconstruction/RecoTools/TrackToCalo/TrackToCalo/CaloCellSelectorLayerdR.h
+++ b/Reconstruction/RecoTools/TrackToCalo/TrackToCalo/CaloCellSelectorLayerdR.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -12,6 +12,7 @@
 #include "TrkParametersIdentificationHelpers/TrackParametersIdHelper.h"
 #include "GeoPrimitives/GeoPrimitives.h"
 #include "TrkCaloExtension/CaloExtensionHelpers.h"
+#include "xAODCaloEvent/CaloCluster.h"
 
 namespace Trk 
 {
@@ -31,6 +32,7 @@ namespace Trk
     void setConeSize( double coneSize ) { m_coneSize2 = coneSize*coneSize; }
 
     bool preSelectAction( const Trk::CaloExtension& caloExtension );
+    bool preSelectAction( const xAOD::CaloCluster& caloCluster );
     bool select( const CaloCell& cell ) const; // select or reject the cell
 
   private:
diff --git a/Reconstruction/RecoTools/TrackToCalo/src/CaloCellSelectorLayerdR.cxx b/Reconstruction/RecoTools/TrackToCalo/src/CaloCellSelectorLayerdR.cxx
index 0eb73e0173b3..c9a7f690c9c7 100644
--- a/Reconstruction/RecoTools/TrackToCalo/src/CaloCellSelectorLayerdR.cxx
+++ b/Reconstruction/RecoTools/TrackToCalo/src/CaloCellSelectorLayerdR.cxx
@@ -20,32 +20,34 @@ namespace Trk
   CaloCellSelectorLayerdR::~CaloCellSelectorLayerdR(){}
 
   bool CaloCellSelectorLayerdR::preSelectAction( const Trk::CaloExtension& caloExtension ){
-
-    //std::cout << "CaloCellSelectorLayerdR p00" << std::endl;
     if( caloExtension.caloLayerIntersections().empty() ) return false;
-    //std::cout << "CaloCellSelectorLayerdR p01" << std::endl;
     CaloExtensionHelpers::midPointEtaPhiHashLookupVector( caloExtension, m_midPoints );
     return true;
   }
 
+  bool CaloCellSelectorLayerdR::preSelectAction( const xAOD::CaloCluster& caloCluster ){
+    m_midPoints.clear();
+    m_midPoints.resize(CaloSampling::getNumberOfSamplings());
+    for(unsigned int i=0; i<CaloSampling::Unknown; i++){
+      auto s = static_cast<CaloSampling::CaloSample>(i);
+      if(!caloCluster.hasSampling(s)) m_midPoints.push_back(std::make_tuple(false,0.,0.));
+      else m_midPoints.push_back(std::make_tuple(true,caloCluster.etaSample(s),caloCluster.phiSample(s)));
+    }
+    return true;
+  }
+
+
   bool CaloCellSelectorLayerdR::select( const CaloCell& cell )const {
     // select cell within dR from the midPoint of the same calo layer
     const CaloDetDescrElement* dde = cell.caloDDE();
-    //std::cout << "CaloCellSelectorLayerdR p1" << std::endl;
     if(!dde) return false;
 
     int samplingID = dde->getSampling();
-    //std::cout << "CaloCellSelectorLayerdR p2 " << samplingID << std::endl;
-    //for (auto entry : m_midPoints){
-    //  std::cout << std::get<0>(entry) << std::endl;
-    //}
     if ( !std::get<0>(m_midPoints[samplingID]) ) return false;
     double dr = Utils::deltaR2( std::get<1>(m_midPoints[samplingID]),dde->eta(),std::get<2>(m_midPoints[samplingID]),dde->phi());
     if( dr < m_coneSize2){
-      //std::cout << "CaloCellSelectorLayerdR p3" << std::endl;
       return true;
     }
-    //std::cout << "CaloCellSelectorLayerdR p4" << std::endl;
     return false;
   }
 
diff --git a/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py b/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py
index e5701f82322b..b60697b17d69 100755
--- a/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py
+++ b/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py
@@ -363,6 +363,8 @@ def TMEF_MuonCreatorTool(name="TMEF_MuonCreatorTool",**kwargs):
     from TrackToCalo.TrackToCaloConf import Trk__ParticleCaloExtensionTool
     pcExtensionTool = Trk__ParticleCaloExtensionTool(Extrapolator = AtlasExtrapolator())
     kwargs.setdefault("ParticleCaloExtensionTool", pcExtensionTool)
+    #Should be safe as the dynamic alignment is only for data
+    kwargs.setdefault("ParticleCaloExtensionToolID", pcExtensionTool)
     kwargs.setdefault('TrackParticleCreator','TMEF_TrkToTrackParticleConvTool')
     kwargs.setdefault("AmbiguityProcessor", CfgGetter.getPublicTool('TrigMuonAmbiProcessor'))
     kwargs.setdefault('MakeTrackAtMSLink',True)
-- 
GitLab


From 2bb85b298f939425673639a4c095a48c506ea409 Mon Sep 17 00:00:00 2001
From: Edward Moyse <edward.moyse@cern.ch>
Date: Wed, 7 Oct 2020 18:22:41 +0000
Subject: [PATCH 324/403] We currently have three MuonCalibConfig files. I
 think the one in MuonRecExample can be removed, so this is my attempt to do
 that The functions were moved muon MuonCnvExample, into the MuonCalibConfig
 file there.

---
 .../MuonCnvExample/python/MuonCalibConfig.py  | 217 +++++++++++++++
 .../python/CSC_DigitizationConfig.py          |   2 +-
 .../MuonConfig/python/CscOverlayConfig.py     |   2 +-
 .../python/MDT_DigitizationConfig.py          |   2 +-
 .../python/MuonByteStreamCnvTestConfig.py     |   2 +-
 .../python/MuonCSC_CnvToolsConfig.py          |   2 +-
 ...alibConfig.py => MuonCalibrationConfig.py} |   0
 .../python/MuonRIO_OnTrackCreatorConfig.py    |   2 +-
 .../MuonConfig/python/MuonRdoDecodeConfig.py  |   2 +-
 .../python/MuonSegmentFindingConfig.py        |   4 +-
 .../MuonRecExample/python/MuonCalibConfig.py  | 254 ------------------
 .../share/MuonRec_jobOptions.py               |  12 +-
 .../python/CscMonitorAlgorithm.py             |   2 +-
 .../python/MuonCombinedCalibConfig.py         |  14 +-
 14 files changed, 247 insertions(+), 270 deletions(-)
 rename MuonSpectrometer/MuonConfig/python/{MuonCalibConfig.py => MuonCalibrationConfig.py} (100%)
 delete mode 100644 MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonCalibConfig.py

diff --git a/MuonSpectrometer/MuonCnv/MuonCnvExample/python/MuonCalibConfig.py b/MuonSpectrometer/MuonCnv/MuonCnvExample/python/MuonCalibConfig.py
index 814a3631c739..94608b056c31 100644
--- a/MuonSpectrometer/MuonCnv/MuonCnvExample/python/MuonCalibConfig.py
+++ b/MuonSpectrometer/MuonCnv/MuonCnvExample/python/MuonCalibConfig.py
@@ -205,3 +205,220 @@ def setupMdtCondDB():
     MdtCalibrationDbTool.CreateWireSagFunctions = mdtCalibFlags.correctMdtRtWireSag()
     MdtCalibrationDbTool.CreateSlewingFunctions = mdtCalibFlags.correctMdtRtForTimeSlewing()
 
+
+# return a list of dictionaires containing the calib config info (keys etc)
+def getCalibConfigs():
+    global muonRecFlags,rec
+    configs = []
+    if muonRecFlags.calibMuonStandalone and (muonRecFlags.doStandalone or rec.readESD):
+#        try:
+            configs.append( muonRec.getConfig("MuonStandalone").getCalibConfig() )
+#        except KeyError:
+#            logMuon.warning("Could not get calibration config for MuonStandAlone - not adding MuonStandAlone info to calibration")
+#            muonRecFlags.calibMuonStandalone = False
+    else:
+        muonRecFlags.calibMuonStandalone = False
+
+    return configs
+        
+    
+
+## Setup MuonSegmenToCalibSegment algorithm.
+# @param[in] segmentKeys list of segment keys to use or single segments key (string)
+def getMuonSegmentToCalibSegment():
+    global topSequence,muonRecFlags
+    try:
+        return topSequence.MuonSegmentToCalibSegment
+    except AttributeError:
+            
+        from MuonCalibPatRec.MuonCalibPatRecConf import MuonCalib__MuonSegmentToCalibSegment
+        MuonSegmentToCalibSegment = MuonCalib__MuonSegmentToCalibSegment("MuonSegmentToCalibSegment")
+        # set consistent time-of-flight correction with MdtDriftCircleOnTrackCreator
+        mdtCreator = getPublicTool("MdtDriftCircleOnTrackCreator")
+        MuonSegmentToCalibSegment.DoTOF = getProperty(mdtCreator,"DoTofCorrection")
+        # when doing segment fits with floating t0's
+        MuonSegmentToCalibSegment.UpdateForT0Shift = type(MuonSegmentToCalibSegment.getDefaultProperty("UpdateForT0Shift")) (muonRecFlags.doSegmentT0Fit())
+        MuonSegmentToCalibSegment.UseCscSegments = False
+        MuonSegmentToCalibSegment.SegmentLocations = [ "MuonSegments" ]
+        MuonSegmentToCalibSegment.SegmentAuthors = [ 4,8 ] 
+        MuonSegmentToCalibSegment.ReadSegments = True # rather than SegmentCombinations
+
+        from MuonCnvExample import MuonCalibConfig
+        MuonCalibConfig.setupMdtCondDB()
+
+        MuonSegmentToCalibSegment.CalibrationTool = MuonCalibConfig.MdtCalibrationTool()
+
+        # finally add it to topSequence
+        topSequence += MuonSegmentToCalibSegment
+
+    return topSequence.MuonSegmentToCalibSegment
+
+
+## Setup the basic MuonCalibAlg algorithm. Needs further configuration after this call
+# depending on the use-case.
+# @param[in] evenTag The event tag written to file
+def getMuonCalibAlg(eventTag):
+    global topSequence,beamFlags
+    try:
+        return topSequence.MuonCalibAlg
+    except AttributeError:
+        from MuonCalibAlgs.MuonCalibAlgsConf import MuonCalib__MuonCalibAlg
+        MuonCalibAlg = MuonCalib__MuonCalibAlg("MuonCalibAlg",
+                                               doMDTs = muonRecFlags.doMDTs(),
+                                               doCSCs = muonRecFlags.doCSCs(),
+                                               doRPCs = muonRecFlags.doRPCs(),
+                                               doTGCs = (muonRecFlags.doTGCs() and muonRecFlags.calibNtupleRawTGC()),
+                                               doTGCCoinData = (muonRecFlags.doTGCs() and muonRecFlags.calibNtupleRawTGC()),
+                                               doTruth = rec.doTruth(),
+                                               DoPrdSelect = muonRecFlags.doPrdSelect(),  # optional cutting away of PRD hits to simulate dead channels
+                                               NtupleName = muonRecFlags.calibNtupleOutput(),  # set the name of the output calibration ntuple
+                                               EventTag = eventTag )
+
+        if beamFlags.beamType == 'singlebeam' or beamFlags.beamType == 'cosmics':
+            MuonCalibAlg.addTriggerTag = False
+        else:
+            MuonCalibAlg.addTriggerTag = rec.doTrigger()
+        MuonCalibAlg.doTruth=rec.doTruth()
+        topSequence += MuonCalibAlg
+        return topSequence.MuonCalibAlg
+
+
+def setupMuonCalibNtuple():
+    global topSequence,muonRecFlags,beamFlags,ToolSvc,rec,DetFlags
+    if not rec.doMuon() or not DetFlags.Muon_on():
+        logMuon.warning("Not setting up requested Muon Calibration Ntuple because Muons are off")
+        return
+    
+    logMuon.info("Setting up Muon Calibration Ntuple")
+    try:
+        configs = getCalibConfigs()
+        # MuonSegmentToCalibSegment is only needed if we want segments
+        if muonRecFlags.calibNtupleSegments and muonRecFlags.calibMuonStandalone:
+            MuonSegmentToCalibSegment = getMuonSegmentToCalibSegment()
+
+        # MuonCalibAlg is always needed
+        eventTag="UNKNOWN"
+        if (muonRecFlags.calibNtupleSegments or muonRecFlags.calibNtupleTracks) and muonRecFlags.calibMuonStandalone:
+            if len(configs) >= 1:
+                eventTag = configs[0]["eventTag"]
+        elif muonRecFlags.calibNtupleTrigger:
+            eventTag = "TRIG"
+        else:
+            eventTag = "HITS"
+
+        MuonCalibAlg = getMuonCalibAlg(eventTag)
+        # configure for writing ntuple
+        from MuonCalibTools.MuonCalibToolsConf import MuonCalib__PatternNtupleMaker
+        MuonCalibTool = MuonCalib__PatternNtupleMaker("MuonCalibPatternNtupleMaker")
+        MuonCalibTool.FillTruth = rec.doTruth()
+        MuonCalibTool.DoRawTGC = (muonRecFlags.doTGCs() and muonRecFlags.calibNtupleRawTGC())
+        ToolSvc += MuonCalibTool
+        MuonCalibAlg.MuonCalibTool = MuonCalibTool
+
+        # MuonCalibExtraTree only if we want to write tracks
+        if muonRecFlags.calibNtupleTracks:
+            MuonCalibTool.DelayFinish = True
+            from MuonCalibExtraTreeAlg.MuonCalibExtraTreeAlgConf import MuonCalib__MuonCalibExtraTreeAlg
+            MuonCalibExtraTreeAlg = MuonCalib__MuonCalibExtraTreeAlg("MuonCalibExtraTreeAlg",
+                                                                     NtupleName = "PatternNtupleMaker",
+                                                                     )
+            segmentOnTrackSelector=None
+            if hasattr(topSequence, "MuonSegmentToCalibSegment"):
+              from MuonCalibExtraTreeAlg.MuonCalibExtraTreeAlgConf import MuonCalib__SegmentOnTrackSelector
+              segmentOnTrackSelector=MuonCalib__SegmentOnTrackSelector()
+              segmentOnTrackSelector.PattternLocation = "PatternsForCalibration"
+              ToolSvc+=segmentOnTrackSelector
+              MuonCalibExtraTreeAlg.SegmentOnTrackSelector= segmentOnTrackSelector
+            if not rec.doMuonCombined():
+               tool_nr=0
+               from MuonCalibExtraTreeAlg.MuonCalibExtraTreeAlgConf import MuonCalib__ExtraTreeTrackFillerTool
+               resPullCalc=getPublicTool("ResidualPullCalculator")
+               for config in configs:
+                 trackDumpTool = MuonCalib__ExtraTreeTrackFillerTool("ExtraTreeTrackFillerTool" + str(tool_nr))
+                 trackDumpTool.TrackCollectionKey = config['tracksKey']
+                 trackDumpTool.SegmentAuthors = [config['segmentAuthor']]
+                 trackDumpTool.TrackAuthor = config['trackAuthor']
+                 trackDumpTool.PullCalculator = resPullCalc
+                 ToolSvc+=trackDumpTool
+                 MuonCalibExtraTreeAlg.TrackFillerTools.append(trackDumpTool)
+                 tool_nr+=1
+            # configure needed tools
+
+
+            # add to topSequence
+            topSequence += MuonCalibExtraTreeAlg
+
+
+        # MuonCalibExtraTreeTriggerAlg only if trigger is available
+        if muonRecFlags.calibNtupleTrigger: # and DetFlags.detdescr.LVL1_on() and DetFlags.haveRDO.LVL1_on():
+            # protect against running without AtlasTrigger project
+            doMuCTPI = True
+            if doMuCTPI:
+                try:
+                    from TrigT1RPCRecRoiSvc import TrigT1RPCRecRoiConfig
+                    from TrigT1TGCRecRoiSvc import TrigT1TGCRecRoiConfig
+                except ImportError:
+                    logMuon.warning("MuonCalibExtraTreeTriggerAlg.doMuCTPI = False because AtlasTrigger is not available")
+                    doMuCTPI = False
+
+            # delay writing of MuonCalibAlg
+            MuonCalibTool.DelayFinish = True
+            # also delay MuonCalibExtraTreeAlg if it is running
+            try:
+                topSequence.MuonCalibExtraTreeAlg.DelayFinish = True
+            except AttributeError:
+                pass
+            
+            from MuonCalibExtraTreeAlg.MuonCalibExtraTreeAlgConf import MuonCalib__MuonCalibExtraTreeTriggerAlg
+            topSequence += MuonCalib__MuonCalibExtraTreeTriggerAlg( 'MuonCalibExtraTreeTriggerAlg',
+                                                                    doMuCTPI   = doMuCTPI,
+                                                                    doLVL1Calo = rec.doTile() or rec.doLArg() or DetFlags.haveRDO.Calo_on(),
+                                                                    doMBTS     = rec.doTile() or DetFlags.haveRDO.Tile_on() )
+
+
+    except:
+        from AthenaCommon.Resilience import treatException
+        treatException("Problem in MuonCalib - Muon Calibration Ntuple configuration probably incomplete")
+
+
+
+def setupMuonCalib():
+    global topSequence,ToolSvc
+    if not rec.doMuon() or not DetFlags.Muon_on():
+        logMuon.warning("Not setting up requested Muon Calibration because Muons are off")
+        return
+
+    logMuon.info("Setting up Muon Calibration")
+    try:
+        from MuonCnvExample.MuonCalibFlags import muonCalibFlags
+        muonCalibFlags.setDefaults()
+
+        configs = getCalibConfigs()
+        #
+        # MuonSegmentToCalibSegment
+        #
+        calibConfig = muonRec.allConfigs()[0].getCalibConfig() #muonRec.getConfig(muonCalibFlags.EventTag()).getCalibConfig()
+        MuonSegmentToCalibSegment = getMuonSegmentToCalibSegment()
+        #
+        # MuonCalibAlg
+        #
+        MuonCalibAlg = getMuonCalibAlg(muonCalibFlags.EventTag())
+
+        from MdtCalibTools.MdtCalibToolsConf import MuonCalib__MdtCalibTool
+        MuonCalibTool = MuonCalib__MdtCalibTool()
+        calibMode = muonCalibFlags.Mode()
+        if calibMode == 'regionNtuple':
+            from MdtCalibTools.MdtCalibToolsConf import MuonCalib__MdtCalibNtupleMakerTool
+            MdtCalibTool = MuonCalib__MdtCalibNtupleMakerTool()
+        else:
+            raise RuntimeError( "Unknown Muon Calibration Mode: %r" % calibMode )
+
+        ToolSvc += MdtCalibTool
+        MuonCalibTool.MdtCalibTool = MdtCalibTool
+
+        ToolSvc += MuonCalibTool
+        MuonCalibAlg.MuonCalibTool = MuonCalibTool
+
+    except:
+        from AthenaCommon.Resilience import treatException
+        treatException("Problem in MuonCalib - Muon Calibration configuration probably incomplete")
diff --git a/MuonSpectrometer/MuonConfig/python/CSC_DigitizationConfig.py b/MuonSpectrometer/MuonConfig/python/CSC_DigitizationConfig.py
index f215ecb6bd30..92fd9b5d6587 100644
--- a/MuonSpectrometer/MuonConfig/python/CSC_DigitizationConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/CSC_DigitizationConfig.py
@@ -48,7 +48,7 @@ def CSC_DigitizationToolCommonCfg(flags, name="CscDigitizationTool", **kwargs):
     kwargs.setdefault("DriftVelocity", 39)
     kwargs.setdefault("ElectronEnergy", 66) # eV
 
-    from MuonConfig.MuonCalibConfig import CscCalibToolCfg
+    from MuonConfig.MuonCalibrationConfig import CscCalibToolCfg
     kwargs.setdefault("cscCalibTool", acc.popToolsAndMerge(CscCalibToolCfg(flags)))
 
     CscDigitizationTool = CompFactory.CscDigitizationTool
diff --git a/MuonSpectrometer/MuonConfig/python/CscOverlayConfig.py b/MuonSpectrometer/MuonConfig/python/CscOverlayConfig.py
index c55be0e1047e..da666beb011d 100644
--- a/MuonSpectrometer/MuonConfig/python/CscOverlayConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/CscOverlayConfig.py
@@ -21,7 +21,7 @@ def CSCDataOverlayExtraCfg(flags, **kwargs):
 
 def CscOverlayAlgCfg(flags, name="CscOverlay", **kwargs):
     """Return a ComponentAccumulator for CSCOverlay algorithm"""
-    from MuonConfig.MuonCalibConfig import CscCalibToolCfg
+    from MuonConfig.MuonCalibrationConfig import CscCalibToolCfg
     acc = CscCalibToolCfg(flags)
     kwargs.setdefault("CalibTool", acc.popPrivateTools())
 
diff --git a/MuonSpectrometer/MuonConfig/python/MDT_DigitizationConfig.py b/MuonSpectrometer/MuonConfig/python/MDT_DigitizationConfig.py
index 94ed7f1ad3ce..7a0f4acff0a1 100644
--- a/MuonSpectrometer/MuonConfig/python/MDT_DigitizationConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MDT_DigitizationConfig.py
@@ -8,7 +8,7 @@ from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
 from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
 from MuonConfig.MuonByteStreamCnvTestConfig import MdtDigitToMdtRDOCfg
 from MuonConfig.MuonCablingConfig import MDTCablingConfigCfg
-from MuonConfig.MuonCalibConfig import MdtCalibrationDbToolCfg
+from MuonConfig.MuonCalibrationConfig import MdtCalibrationDbToolCfg
 from Digitization.TruthDigitizationOutputConfig import TruthDigitizationOutputCfg
 from Digitization.PileUpToolsConfig import PileUpToolsCfg
 from Digitization.PileUpMergeSvcConfigNew import PileUpMergeSvcCfg, PileUpXingFolderCfg
diff --git a/MuonSpectrometer/MuonConfig/python/MuonByteStreamCnvTestConfig.py b/MuonSpectrometer/MuonConfig/python/MuonByteStreamCnvTestConfig.py
index fdf5f1f4f738..a6dd3c76d15b 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonByteStreamCnvTestConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonByteStreamCnvTestConfig.py
@@ -117,7 +117,7 @@ def CscDigitToCscRDOCfg(flags, name="CscDigitToCscRDO", **kwargs):
     """Return ComponentAccumulator with configured CscDigitToCscRDO algorithm"""
     # for Csc, configuration is in the tool CscDigitToCscRDOTool
     # configure dependency
-    from MuonConfig.MuonCalibConfig import CscCalibToolCfg
+    from MuonConfig.MuonCalibrationConfig import CscCalibToolCfg
     acc = CscCalibToolCfg(flags)
     CscCalibTool = acc.popPrivateTools()
     # configure basic parameters
diff --git a/MuonSpectrometer/MuonConfig/python/MuonCSC_CnvToolsConfig.py b/MuonSpectrometer/MuonConfig/python/MuonCSC_CnvToolsConfig.py
index 0f8ac22f29c0..cf82a67f48c0 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonCSC_CnvToolsConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonCSC_CnvToolsConfig.py
@@ -4,7 +4,7 @@ from AthenaConfiguration.ComponentFactory import CompFactory
 
 
 def MuonCscRDODecoderCfg(flags, **kwargs):
-    from MuonConfig.MuonCalibConfig import CscCalibToolCfg
+    from MuonConfig.MuonCalibrationConfig import CscCalibToolCfg
     acc = CscCalibToolCfg(flags)
     kwargs.setdefault("cscCalibTool", acc.popPrivateTools())
 
diff --git a/MuonSpectrometer/MuonConfig/python/MuonCalibConfig.py b/MuonSpectrometer/MuonConfig/python/MuonCalibrationConfig.py
similarity index 100%
rename from MuonSpectrometer/MuonConfig/python/MuonCalibConfig.py
rename to MuonSpectrometer/MuonConfig/python/MuonCalibrationConfig.py
diff --git a/MuonSpectrometer/MuonConfig/python/MuonRIO_OnTrackCreatorConfig.py b/MuonSpectrometer/MuonConfig/python/MuonRIO_OnTrackCreatorConfig.py
index 7d0875b35d8a..94d30a541ef2 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonRIO_OnTrackCreatorConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonRIO_OnTrackCreatorConfig.py
@@ -2,7 +2,7 @@
 
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
-from MuonConfig.MuonCalibConfig import MdtCalibrationToolCfg, MdtCalibrationDbToolCfg
+from MuonConfig.MuonCalibrationConfig import MdtCalibrationToolCfg, MdtCalibrationDbToolCfg
 
 Muon__MdtDriftCircleOnTrackCreator=CompFactory.Muon.MdtDriftCircleOnTrackCreator
 Muon__CscClusterOnTrackCreator=CompFactory.Muon.CscClusterOnTrackCreator
diff --git a/MuonSpectrometer/MuonConfig/python/MuonRdoDecodeConfig.py b/MuonSpectrometer/MuonConfig/python/MuonRdoDecodeConfig.py
index a482c0f9b7cf..b78e56be7379 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonRdoDecodeConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonRdoDecodeConfig.py
@@ -126,7 +126,7 @@ def MdtRDODecodeCfg(flags, forTrigger=False):
     from MuonConfig.MuonCablingConfig import MDTCablingConfigCfg
     acc.merge( MDTCablingConfigCfg(flags) )
 
-    from MuonConfig.MuonCalibConfig import MdtCalibDbAlgCfg
+    from MuonConfig.MuonCalibrationConfig import MdtCalibDbAlgCfg
     acc.merge (MdtCalibDbAlgCfg(flags))
 
     # Make sure muon geometry is configured
diff --git a/MuonSpectrometer/MuonConfig/python/MuonSegmentFindingConfig.py b/MuonSpectrometer/MuonConfig/python/MuonSegmentFindingConfig.py
index b19192958cfa..01f3e5942990 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonSegmentFindingConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonSegmentFindingConfig.py
@@ -23,7 +23,7 @@ Muon__MuonSegmentSelectionTool=CompFactory.getComp("Muon::MuonSegmentSelectionTo
 Muon__MuonClusterSegmentFinder=CompFactory.getComp("Muon::MuonClusterSegmentFinder")
 
 #Local
-from MuonConfig.MuonCalibConfig import MdtCalibDbAlgCfg
+from MuonConfig.MuonCalibrationConfig import MdtCalibDbAlgCfg
 from MuonConfig.MuonRecToolsConfig import MCTBFitterCfg, MuonAmbiProcessorCfg, MuonStationIntersectSvcCfg, MuonTrackCleanerCfg, MuonTrackSummaryToolCfg, MuonEDMPrinterTool
 from MuonConfig.MuonRIO_OnTrackCreatorConfig import MdtCalibWindowNumber
 
@@ -405,7 +405,7 @@ def QratCscClusterFitterCfg(flags, **kwargs):
 
 def CalibCscStripFitterCfg(flags, name = "CalibCscStripFitter",**kwargs):
     CalibCscStripFitter=CompFactory.CalibCscStripFitter
-    from MuonConfig.MuonCalibConfig import CscCalibToolCfg
+    from MuonConfig.MuonCalibrationConfig import CscCalibToolCfg
     result = CscCalibToolCfg(flags)
     kwargs.setdefault("cscCalibTool", result.popPrivateTools() )
     result.setPrivateTools(CalibCscStripFitter(name=name,**kwargs))
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonCalibConfig.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonCalibConfig.py
deleted file mode 100644
index c09b3925ad1f..000000000000
--- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonCalibConfig.py
+++ /dev/null
@@ -1,254 +0,0 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-
-import os
-
-from AthenaCommon.Logging import logging
-
-log = logging.getLogger()
-log.info("Loading module %s",__name__)
-
-from AthenaCommon import CfgMgr
-from AthenaCommon.BeamFlags import jobproperties
-beamFlags = jobproperties.Beam
-from AthenaCommon.GlobalFlags import globalflags
-from AthenaCommon.DetFlags import DetFlags
-from AthenaCommon.AlgSequence import AlgSequence
-from AthenaCommon.AppMgr import ToolSvc,ServiceMgr
-from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-
-from RecExConfig.RecFlags import rec
-
-from MuonRecFlags import muonRecFlags
-from MuonRecUtils import logMuon,logMuonResil,override_lock_and_set_Value
-from MuonRec import muonRec
-
-from AthenaCommon.CfgGetter import getPrivateTool,getPrivateToolClone,getPublicTool,getPublicToolClone,getService,getServiceClone
-from AthenaCommon.ConfiguredFactory import getProperty
-
-muonRecFlags.setDefaults()
-
-topSequence = AlgSequence()
-
-# return a list of dictionaires containing the calib config info (keys etc)
-def getCalibConfigs():
-    global muonRecFlags,rec
-    configs = []
-    if muonRecFlags.calibMuonStandalone and (muonRecFlags.doStandalone or rec.readESD):
-#        try:
-            configs.append( muonRec.getConfig("MuonStandalone").getCalibConfig() )
-#        except KeyError:
-#            logMuon.warning("Could not get calibration config for MuonStandAlone - not adding MuonStandAlone info to calibration")
-#            muonRecFlags.calibMuonStandalone = False
-    else:
-        muonRecFlags.calibMuonStandalone = False
-
-    return configs
-        
-    
-
-## Setup MuonSegmenToCalibSegment algorithm.
-# @param[in] segmentKeys list of segment keys to use or single segments key (string)
-def getMuonSegmentToCalibSegment():
-    global topSequence,muonRecFlags
-    try:
-        return topSequence.MuonSegmentToCalibSegment
-    except AttributeError:
-            
-        from MuonCalibPatRec.MuonCalibPatRecConf import MuonCalib__MuonSegmentToCalibSegment
-        MuonSegmentToCalibSegment = MuonCalib__MuonSegmentToCalibSegment("MuonSegmentToCalibSegment")
-        # set consistent time-of-flight correction with MdtDriftCircleOnTrackCreator
-        mdtCreator = getPublicTool("MdtDriftCircleOnTrackCreator")
-        MuonSegmentToCalibSegment.DoTOF = getProperty(mdtCreator,"DoTofCorrection")
-        # when doing segment fits with floating t0's
-        MuonSegmentToCalibSegment.UpdateForT0Shift = type(MuonSegmentToCalibSegment.getDefaultProperty("UpdateForT0Shift")) (muonRecFlags.doSegmentT0Fit())
-        MuonSegmentToCalibSegment.UseCscSegments = False
-        MuonSegmentToCalibSegment.SegmentLocations = [ "MuonSegments" ]
-        MuonSegmentToCalibSegment.SegmentAuthors = [ 4,8 ] 
-        MuonSegmentToCalibSegment.ReadSegments = True # rather than SegmentCombinations
-
-        from MuonCnvExample import MuonCalibConfig
-        MuonCalibConfig.setupMdtCondDB()
-
-        # finally add it to topSequence
-        topSequence += MuonSegmentToCalibSegment
-
-    return topSequence.MuonSegmentToCalibSegment
-
-
-## Setup the basic MuonCalibAlg algorithm. Needs further configuration after this call
-# depending on the use-case.
-# @param[in] evenTag The event tag written to file
-def getMuonCalibAlg(eventTag):
-    global topSequence,beamFlags
-    try:
-        return topSequence.MuonCalibAlg
-    except AttributeError:
-        from MuonCalibAlgs.MuonCalibAlgsConf import MuonCalib__MuonCalibAlg
-        MuonCalibAlg = MuonCalib__MuonCalibAlg("MuonCalibAlg",
-                                               doMDTs = muonRecFlags.doMDTs(),
-                                               doCSCs = muonRecFlags.doCSCs(),
-                                               doRPCs = muonRecFlags.doRPCs(),
-                                               doTGCs = (muonRecFlags.doTGCs() and muonRecFlags.calibNtupleRawTGC()),
-                                               doTGCCoinData = (muonRecFlags.doTGCs() and muonRecFlags.calibNtupleRawTGC()),
-                                               doTruth = rec.doTruth(),
-                                               DoPrdSelect = muonRecFlags.doPrdSelect(),  # optional cutting away of PRD hits to simulate dead channels
-                                               NtupleName = muonRecFlags.calibNtupleOutput(),  # set the name of the output calibration ntuple
-                                               EventTag = eventTag )
-
-        if beamFlags.beamType == 'singlebeam' or beamFlags.beamType == 'cosmics':
-            MuonCalibAlg.addTriggerTag = False
-        else:
-            MuonCalibAlg.addTriggerTag = rec.doTrigger()
-        MuonCalibAlg.doTruth=rec.doTruth()
-        topSequence += MuonCalibAlg
-        return topSequence.MuonCalibAlg
-
-
-def setupMuonCalibNtuple():
-    global topSequence,muonRecFlags,beamFlags,ToolSvc,rec,DetFlags
-    if not rec.doMuon() or not DetFlags.Muon_on():
-        logMuon.warning("Not setting up requested Muon Calibration Ntuple because Muons are off")
-        return
-    
-    logMuon.info("Setting up Muon Calibration Ntuple")
-    try:
-        configs = getCalibConfigs()
-        # MuonSegmentToCalibSegment is only needed if we want segments
-        if muonRecFlags.calibNtupleSegments and muonRecFlags.calibMuonStandalone:
-            MuonSegmentToCalibSegment = getMuonSegmentToCalibSegment()
-
-        # MuonCalibAlg is always needed
-        eventTag="UNKNOWN"
-        if (muonRecFlags.calibNtupleSegments or muonRecFlags.calibNtupleTracks) and muonRecFlags.calibMuonStandalone:
-            if len(configs) >= 1:
-                eventTag = configs[0]["eventTag"]
-        elif muonRecFlags.calibNtupleTrigger:
-            eventTag = "TRIG"
-        else:
-            eventTag = "HITS"
-
-        MuonCalibAlg = getMuonCalibAlg(eventTag)
-        # configure for writing ntuple
-        from MuonCalibTools.MuonCalibToolsConf import MuonCalib__PatternNtupleMaker
-        MuonCalibTool = MuonCalib__PatternNtupleMaker("MuonCalibPatternNtupleMaker")
-        MuonCalibTool.FillTruth = rec.doTruth()
-        MuonCalibTool.DoRawTGC = (muonRecFlags.doTGCs() and muonRecFlags.calibNtupleRawTGC())
-        ToolSvc += MuonCalibTool
-        MuonCalibAlg.MuonCalibTool = MuonCalibTool
-
-        # MuonCalibExtraTree only if we want to write tracks
-        if muonRecFlags.calibNtupleTracks:
-            MuonCalibTool.DelayFinish = True
-            from MuonCalibExtraTreeAlg.MuonCalibExtraTreeAlgConf import MuonCalib__MuonCalibExtraTreeAlg
-            MuonCalibExtraTreeAlg = MuonCalib__MuonCalibExtraTreeAlg("MuonCalibExtraTreeAlg",
-                                                                     NtupleName = "PatternNtupleMaker",
-                                                                     )
-            segmentOnTrackSelector=None
-            if hasattr(topSequence, "MuonSegmentToCalibSegment"):
-              from MuonCalibExtraTreeAlg.MuonCalibExtraTreeAlgConf import MuonCalib__SegmentOnTrackSelector
-              segmentOnTrackSelector=MuonCalib__SegmentOnTrackSelector()
-              segmentOnTrackSelector.PattternLocation = "PatternsForCalibration"
-              ToolSvc+=segmentOnTrackSelector
-              MuonCalibExtraTreeAlg.SegmentOnTrackSelector= segmentOnTrackSelector
-            if not rec.doMuonCombined():
-               tool_nr=0
-               from MuonCalibExtraTreeAlg.MuonCalibExtraTreeAlgConf import MuonCalib__ExtraTreeTrackFillerTool
-               resPullCalc=getPublicTool("ResidualPullCalculator")
-               for config in configs:
-                 trackDumpTool = MuonCalib__ExtraTreeTrackFillerTool("ExtraTreeTrackFillerTool" + str(tool_nr))
-                 trackDumpTool.TrackCollectionKey = config['tracksKey']
-                 trackDumpTool.SegmentAuthors = [config['segmentAuthor']]
-                 trackDumpTool.TrackAuthor = config['trackAuthor']
-                 trackDumpTool.PullCalculator = resPullCalc
-                 ToolSvc+=trackDumpTool
-                 MuonCalibExtraTreeAlg.TrackFillerTools.append(trackDumpTool)
-                 tool_nr+=1
-            # configure needed tools
-
-
-            # add to topSequence
-            topSequence += MuonCalibExtraTreeAlg
-
-
-        # MuonCalibExtraTreeTriggerAlg only if trigger is available
-        if muonRecFlags.calibNtupleTrigger: # and DetFlags.detdescr.LVL1_on() and DetFlags.haveRDO.LVL1_on():
-            # protect against running without AtlasTrigger project
-            doMuCTPI = True
-            if doMuCTPI:
-                try:
-                    from TrigT1RPCRecRoiSvc import TrigT1RPCRecRoiConfig
-                    from TrigT1TGCRecRoiSvc import TrigT1TGCRecRoiConfig
-                except ImportError:
-                    logMuon.warning("MuonCalibExtraTreeTriggerAlg.doMuCTPI = False because AtlasTrigger is not available")
-                    doMuCTPI = False
-
-            # delay writing of MuonCalibAlg
-            MuonCalibTool.DelayFinish = True
-            # also delay MuonCalibExtraTreeAlg if it is running
-            try:
-                topSequence.MuonCalibExtraTreeAlg.DelayFinish = True
-            except AttributeError:
-                pass
-            
-            from MuonCalibExtraTreeAlg.MuonCalibExtraTreeAlgConf import MuonCalib__MuonCalibExtraTreeTriggerAlg
-            topSequence += MuonCalib__MuonCalibExtraTreeTriggerAlg( 'MuonCalibExtraTreeTriggerAlg',
-                                                                    doMuCTPI   = doMuCTPI,
-                                                                    doLVL1Calo = rec.doTile() or rec.doLArg() or DetFlags.haveRDO.Calo_on(),
-                                                                    doMBTS     = rec.doTile() or DetFlags.haveRDO.Tile_on() )
-
-
-    except:
-        from AthenaCommon.Resilience import treatException
-        treatException("Problem in MuonCalib - Muon Calibration Ntuple configuration probably incomplete")
-
-
-
-def setupMuonCalib():
-    global topSequence,ToolSvc
-    if not rec.doMuon() or not DetFlags.Muon_on():
-        logMuon.warning("Not setting up requested Muon Calibration because Muons are off")
-        return
-
-    logMuon.info("Setting up Muon Calibration")
-    try:
-        from MuonCnvExample.MuonCalibFlags import muonCalibFlags
-        muonCalibFlags.setDefaults()
-
-        configs = getCalibConfigs()
-        #
-        # MuonSegmentToCalibSegment
-        #
-        calibConfig = muonRec.allConfigs()[0].getCalibConfig() #muonRec.getConfig(muonCalibFlags.EventTag()).getCalibConfig()
-        MuonSegmentToCalibSegment = getMuonSegmentToCalibSegment()
-        #
-        # MuonCalibAlg
-        #
-        MuonCalibAlg = getMuonCalibAlg(muonCalibFlags.EventTag())
-
-        from MdtCalibTools.MdtCalibToolsConf import MuonCalib__MdtCalibTool
-        MuonCalibTool = MuonCalib__MdtCalibTool()
-        calibMode = muonCalibFlags.Mode()
-        if calibMode == 'regionNtuple':
-            from MdtCalibTools.MdtCalibToolsConf import MuonCalib__MdtCalibNtupleMakerTool
-            MdtCalibTool = MuonCalib__MdtCalibNtupleMakerTool()
-        else:
-            raise RuntimeError( "Unknown Muon Calibration Mode: %r" % calibMode )
-
-        ToolSvc += MdtCalibTool
-        MuonCalibTool.MdtCalibTool = MdtCalibTool
-
-        ToolSvc += MuonCalibTool
-        MuonCalibAlg.MuonCalibTool = MuonCalibTool
-
-    except:
-        from AthenaCommon.Resilience import treatException
-        treatException("Problem in MuonCalib - Muon Calibration configuration probably incomplete")
-
-
-# chose the setup
-if muonRecFlags.doCalibNtuple():
-    setupMuonCalibNtuple()
-elif muonRecFlags.doCalib():
-    setupMuonCalib()
-else:
-    logMuon.warning("Loading %s but not setting up any MuonCalibration or Ntuple" % __name__ )
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_jobOptions.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_jobOptions.py
index cfa9c78c7c52..c59a009fa16c 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_jobOptions.py
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_jobOptions.py
@@ -185,9 +185,17 @@ if muonRecFlags.useAlignmentCorrections():
 #--------------------------------------------------------------------------
 # Make Calibration Ntuple or run Calibration Algorithm
 #--------------------------------------------------------------------------
-if muonRecFlags.doCalib() or muonRecFlags.doCalibNtuple():
+if muonRecFlags.doCalibNtuple():
     from MuonRecExample import MuonAlignConfig
-    from MuonRecExample import MuonCalibConfig
+    from MuonCnvExample import setupMuonCalibNtuple
+    setupMuonCalibNtuple()
+elif muonRecFlags.doCalib():
+    from MuonRecExample import MuonAlignConfig
+    from MuonCnvExample import setupMuonCalib
+    setupMuonCalib()
+else:
+    logMuon.warning("Loading %s but not setting up any MuonCalibration or Ntuple" % __name__ )
+
 
 #--------------------------------------------------------------------------
 # Evaluate tracking performance
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/python/CscMonitorAlgorithm.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/python/CscMonitorAlgorithm.py
index 2162a404b3ed..e17c8370b03c 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/python/CscMonitorAlgorithm.py
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/python/CscMonitorAlgorithm.py
@@ -69,7 +69,7 @@ def CscMonitoringConfig(inputFlags):
     # # this example, no accumulator is returned, so no merge is necessary.
     # from MyDomainPackage.MyDomainPackageConf import MyDomainTool
     # exampleMonAlg.MyDomainTool = MyDomainTool()
-    from MuonConfig.MuonCalibConfig import CscCalibToolCfg
+    from MuonConfig.MuonCalibrationConfig import CscCalibToolCfg
     calibtool = result.popToolsAndMerge( CscCalibToolCfg(inputFlags) )
     cscClusMonAlg.CscCalibTool = calibtool
 
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedCalibConfig.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedCalibConfig.py
index cb1d3aa86397..c89df613f4d2 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedCalibConfig.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedCalibConfig.py
@@ -9,14 +9,20 @@ beamFlags = jobproperties.Beam
 
 from MuonCombinedRecExample.MuonCombinedRecFlags import muonCombinedRecFlags
 from MuonRecExample.MuonRecFlags import muonRecFlags
-#from MuonCalibAlgs.MuonCalibFlags import muonCalibFlags
 from MuonCnvExample.MuonCalibFlags import muonCalibFlags
-
 from RecExConfig.RecFlags import rec
 
-
 # configure calib algs for standalone
-from MuonRecExample import MuonCalibConfig
+if muonRecFlags.doCalibNtuple():
+    from MuonRecExample import MuonAlignConfig
+    from MuonCnvExample import setupMuonCalibNtuple
+    setupMuonCalibNtuple()
+elif muonRecFlags.doCalib():
+    from MuonRecExample import MuonAlignConfig
+    from MuonCnvExample import setupMuonCalib
+    setupMuonCalib()
+else:
+    logMuon.warning("Loading %s but not setting up any MuonCalibration or Ntuple" % __name__ )
 # NB. call setDefaults *after* import MuonCalibConfig
 muonCalibFlags.setDefaults()
 
-- 
GitLab


From cc0cbff18b45251588f3d017326ab42594a033b0 Mon Sep 17 00:00:00 2001
From: Pierre-Antoine Delsart <delsart@in2p3.fr>
Date: Wed, 7 Oct 2020 18:33:46 +0000
Subject: [PATCH 325/403] Jet configuration update and implementation of
 standard definition

---
 .../python/ParticleJetToolsConfig.py          |  17 +-
 .../python/JetCalibToolsConfig.py             |   3 +-
 .../python/JetMomentToolsConfig.py            |   3 +-
 .../JetRecConfig/python/ConstModHelpers.py    | 223 ++++--
 .../Jet/JetRecConfig/python/JetDefinition.py  | 551 ++++++++------
 .../Jet/JetRecConfig/python/JetGroomConfig.py |  32 +-
 .../Jet/JetRecConfig/python/JetGrooming.py    | 112 +--
 .../Jet/JetRecConfig/python/JetInputConfig.py |  72 ++
 .../Jet/JetRecConfig/python/JetModConfig.py   | 154 ++--
 .../Jet/JetRecConfig/python/JetRecConfig.py   | 679 ++++++++----------
 .../python/StandardJetConstits.py             | 204 ++++++
 .../JetRecConfig/python/StandardJetMods.py    |  86 ++-
 .../JetRecConfig/python/StandardSmallRJets.py |  79 ++
 .../Jet/JetRecConfig/python/Utilities.py      | 137 ++++
 .../Jet/JetRecConfig/share/JetRecTestCfg.py   | 109 ++-
 .../share/test_StandardSmallRJets.py          | 108 +++
 ...recexreco_art_jets_fromesd_newJobConfig.sh |  11 +
 .../HLTMenuConfig/Jet/JetRecoConfiguration.py |  97 ++-
 .../HLTMenuConfig/Jet/JetRecoSequences.py     |  66 +-
 .../HLTMenuConfig/Jet/TriggerJetMods.py       |   4 +-
 .../python/HLTMenuConfig/Jet/generateJet.py   |  24 +-
 .../python/HLTMenuConfig/MET/AlgConfigs.py    |  23 +-
 .../HLTMenuConfig/MET/METRecoSequences.py     |  13 +-
 23 files changed, 1796 insertions(+), 1011 deletions(-)
 create mode 100644 Reconstruction/Jet/JetRecConfig/python/JetInputConfig.py
 create mode 100644 Reconstruction/Jet/JetRecConfig/python/StandardJetConstits.py
 create mode 100644 Reconstruction/Jet/JetRecConfig/python/StandardSmallRJets.py
 create mode 100644 Reconstruction/Jet/JetRecConfig/python/Utilities.py
 create mode 100644 Reconstruction/Jet/JetRecConfig/share/test_StandardSmallRJets.py
 create mode 100755 Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_jets_fromesd_newJobConfig.sh

diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/python/ParticleJetToolsConfig.py b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/python/ParticleJetToolsConfig.py
index 92496227ae2d..c35dfe4c54ec 100644
--- a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/python/ParticleJetToolsConfig.py
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/python/ParticleJetToolsConfig.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
 
 ########################################################################
 #                                                                      #
@@ -36,18 +36,21 @@ truthpartoptions = {
     "FlavourLabel":{"ToolType":CompFactory.CopyFlavorLabelTruthParticles,"ptmin":5000},
 }
 def getCopyTruthLabelParticles(truthtype):
-    truthcategory = ""
+    toolProperties = {}
     if truthtype == "Partons":
         truthcategory = "Partons"
-    if truthtype in ["WBosons", "ZBosons", "HBosons", "TQuarksFinal"]:
+    elif truthtype in ["WBosons", "ZBosons", "HBosons", "TQuarksFinal"]:
         truthcategory = "BosonTop"
     else:
         truthcategory = "FlavourLabel"
+        toolProperties['ParticleType'] = truthtype
+        
     tooltype = truthpartoptions[truthcategory]["ToolType"]
-    ptmin = truthpartoptions[truthcategory]["ptmin"]
-    ctp = tooltype("truthpartcopy_{0}".format(truthtype),
-                   PtMin = ptmin,
-                   OutputName = "TruthLabel{0}".format(truthtype))
+    toolProperties.update( PtMin = truthpartoptions[truthcategory]["ptmin"],
+                           OutputName = "TruthLabel"+truthtype)
+    ctp = tooltype("truthpartcopy_"+truthtype,
+                   **toolProperties
+                   )
     return ctp
 
 # Generates input truth particle containers for truth jets
diff --git a/Reconstruction/Jet/JetCalibTools/python/JetCalibToolsConfig.py b/Reconstruction/Jet/JetCalibTools/python/JetCalibToolsConfig.py
index 8d419d0281c6..eecaa96de3b5 100644
--- a/Reconstruction/Jet/JetCalibTools/python/JetCalibToolsConfig.py
+++ b/Reconstruction/Jet/JetCalibTools/python/JetCalibToolsConfig.py
@@ -160,7 +160,8 @@ def getJetCalibToolPrereqs(modspec,jetdef):
     prereqs = []
     prereqs.append("mod:ConstitFourMom")
     if "JetArea" in calibseq: # Will not insert a prefix here
-        prereqs.append("input:EventDensity")
+        if calibcontext.startswith("Trig"): prereqs.append("input:HLT_EventDensity")
+        else: prereqs.append("input:EventDensity")
     if "GSC" in calibseq:
         prereqs += ["mod:CaloEnergies"]
         if calibcontext != "TrigRun2": # No track/MS GSC for trigger w/o FTK
diff --git a/Reconstruction/Jet/JetMomentTools/python/JetMomentToolsConfig.py b/Reconstruction/Jet/JetMomentTools/python/JetMomentToolsConfig.py
index 28628be137b8..dd0b7083e55c 100644
--- a/Reconstruction/Jet/JetMomentTools/python/JetMomentToolsConfig.py
+++ b/Reconstruction/Jet/JetMomentTools/python/JetMomentToolsConfig.py
@@ -74,7 +74,7 @@ def getConstitFourMomTool(jetdef):
     cfourmom = CompFactory.JetConstitFourMomTool("constitfourmom_{0}".format(jetdef.basename))
     if "LCTopo" in jetdef.basename or "EMTopo" in jetdef.basename:
         cfourmom.JetScaleNames = ["DetectorEtaPhi"]
-        if "HLT_" in jetdef.inputdef.inputname:
+        if "HLT_" in jetdef.fullname():
             cfourmom.AltConstitColls = [""]
             cfourmom.AltConstitScales = [0]
             cfourmom.AltJetScales = ["JetConstitScaleMomentum"]
@@ -104,6 +104,7 @@ def getJVFTool(modspec=""):
         TrackParticleContainer  = trackcollectionmap[modspec]["Tracks"],
         TrackSelector = jettrackselloose,
     )
+    print('aaaa', modspec, jvf.VertexContainer)
     return jvf
 
 
diff --git a/Reconstruction/Jet/JetRecConfig/python/ConstModHelpers.py b/Reconstruction/Jet/JetRecConfig/python/ConstModHelpers.py
index 5a1750857ffc..d1b4f4ac84ed 100644
--- a/Reconstruction/Jet/JetRecConfig/python/ConstModHelpers.py
+++ b/Reconstruction/Jet/JetRecConfig/python/ConstModHelpers.py
@@ -1,11 +1,12 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-
-########################################################################
-#                                                                      #
-# ConstModUtils: A module for configuring constituent modifiers        #
-# Author: TJ Khoo                                                      #
-#                                                                      #
-########################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+"""
+                                                                     #
+ConstModUtils: A module for configuring constituent modifiers        #
+Author: TJ Khoo                                                      #
+                                                                     #
+"""
+
 import cppyy
 try:
     cppyy.load_library('libxAODBaseObjectTypeDict')
@@ -19,86 +20,121 @@ constmodlog = Logging.logging.getLogger('ConstModHelpers')
 
 from AthenaConfiguration.ComponentFactory import CompFactory
 
-# Tool types and configs can be expanded if the user
-# wishes to add their own custom definitions
-
-# Maybe we need a config class in JetDefinition?
-ConstModTools = {
-    # Topoclusters
-    "Origin": CompFactory.CaloClusterConstituentsOrigin,
-    "EM":     CompFactory.ClusterAtEMScaleTool,
-    # Particle flow
-    "CorrectPFO": 
-              CompFactory.CorrectPFOTool,
-    "CHS":    CompFactory.ChargedHadronSubtractionTool,
-    # Pileup suppression
-    "Vor":    CompFactory.VoronoiWeightTool,
-    "CS":     CompFactory.ConstituentSubtractorTool,
-    "SK":     CompFactory.SoftKillerWeightTool
-}
-
-ConstModConfigs = {
-    # Topoclusters
-    "Origin": {},
-    "EM":     {},
-    # Particle flow
-    "CorrectPFO":
-              {"WeightPFOTool": CompFactory.getComp("CP::WeightPFOTool")("weightPFO")},
-    "CHS":    {},
-    # Pileup suppression
-    "Vor":    {"doSpread":False, "nSigma":0},
-    "CS":     {"MaxEta":5.},
-    "SK":     {}
-}
-
-def getConstitModAlg(constit,suffix="",tvaKey="JetTrackVtxAssoc",vtxKey="PrimaryVertices",monTool=None):
-    inputtype = constit.basetype
 
-    # Need to extend to TCC
-    if inputtype not in [xAODType.CaloCluster, xAODType.ParticleFlow]:
-        constmodlog.error("Only ParticleFlow and CaloCluster currently supported!")
-        raise TypeError("Unsupported input type {0}".format(inputtype))
+from .StandardJetConstits import jetconstitdic, jetinputdefdic, jetconstitmoddic
+from .JetDefinition import JetConstitSeq, JetInputDef, JetConstitSource
+
+class _dummyJetDef:
+    def __init__(self):
+        self._prereqDic = {}
+        self._prereqOrder = [] 
+    
+
+def aliasToInputDef(alias, parentjetdef=None):
+    """convert a string alias to a full config object, either a JetConstitSeq or a JetInputDef according to the alias.
+
+    This also recursively translate all aliases which are dependencies of this aliases. All these dependencies are 
+    collected into the 'parentjetdef' (JetDefinition ).
+    """
+    parentjetdef = parentjetdef or _dummyJetDef()
+    # ----------------
+    # support the cases where alias is not a string but directly a config object 
+    if isinstance(alias, JetConstitSource):
+        instantiateJetConstitAliases(alias, parentjetdef)
+        return alias
+    if isinstance(alias, JetInputDef):
+        instantiateJetInputDefAliases(alias, parentjetdef)
+        return alias
+
+    # else assume it's a string
+        
+    if alias in jetinputdefdic:
+        inputdef = jetinputdefdic[alias].clone()
+        instantiateJetInputDefAliases(inputdef, parentjetdef)
+        return inputdef
+    else:
+        constitseq = jetconstitdic[alias].clone( )
+        instantiateJetConstitAliases(constitseq, parentjetdef)
+        return constitseq
+
+def instantiateJetConstitAliases(constitseq, parentjetdef):
+    """Reccursively translate all aliases appearing in the prereqs of constitseq into proper config objects.
+    All are collected into the parentjetdef for which this JetConstitSeq is being configured.
+    Then instantiates all aliases for JetConstitModifier
+    """
+
+    # we technically need a JetInputDef for constitseq.inputname : conveniently declare it if not existing :
+    jetinputdefdic.setdefault( constitseq.inputname, JetInputDef( constitseq.inputname, constitseq.basetype) )
+    # we re-use the instantiateJetInputDefAliases to instantiate the prereqs
+    instantiateJetInputDefAliases( constitseq, parentjetdef,pre_prereqs=['input:'+constitseq.inputname])
+
+    # JetConstitSource don't have modifiers, we can return immediately
+    if not hasattr( constitseq, "modifiers") : return
+    
+    # instantiate the JetConstitModifier (those don't have dependencies)
+    for mod in constitseq.modifiers:
+        modInstance =  jetconstitmoddic[ mod ].clone()
+        constitseq._instanceMap[mod] = modInstance
+
+def instantiateJetInputDefAliases(jetinputdef, parentjetdef, pre_prereqs=[]):
+    """Reccursively translate all aliases appearing in the prereqs of jetinputdef into proper config objects.
+    All are collected into the parentjetdef for which this JetConstitSeq is being configured.
+    """
+    prereqs = jetinputdef.prereqs(parentjetdef) if  callable(jetinputdef.prereqs) else jetinputdef.prereqs
+    prereqs = pre_prereqs + prereqs
+    for prereq in prereqs   :
+        reqInstance = parentjetdef._prereqDic.get( prereq, None)
+        if reqInstance is None:
+            _ , inputkey = prereq.split(':') # always in the form "input:XXX"
+            reqInstance = aliasToInputDef(inputkey, parentjetdef)
+            parentjetdef._prereqDic[prereq] = reqInstance
+            parentjetdef._prereqOrder.append(prereq)
+
+        
 
 
-    sequence = list(constit.modifiers) # Copy, as we may make some additions
-    typename = {xAODType.CaloCluster:  "TopoCluster",
-                xAODType.ParticleFlow: "EMPFlow"
-                }[inputtype]
 
-    if inputtype == xAODType.ParticleFlow:
-        # Always do 4mom corrections first and CHS last
-        sequence = ["CorrectPFO"] + sequence + ["CHS"]
 
-    # If no mods are needed, don't give back a tool
-    if sequence == []: return None
+def getConstitModAlg(constit, monTool=None):
+    """returns a configured JetConstituentModSequence or None if constit.modifiers == [] """
+    
+    # JetConstitSource do not need any JetConstituentModSequence
+    # (they are only needed to trigger the building of the source container and a PJ algo)
+    if not isinstance(constit, JetConstitSeq): return
 
+    
+    inputtype = constit.basetype
+
+    sequence = constit.modifiers
+    
     modlist = []
+
+    #if modlist == []: return
+    if constit.inputname == constit.containername: return
+    
     for step in sequence:
-        if step == "LC":
-            continue # Nothing to do for LC clusters
-        tool = None
-
-        toolname = "ConstitMod{0}_{1}{2}".format(typename,step,suffix)
-        tool = ConstModTools[step](toolname,**ConstModConfigs[step])
-
-        # May want to set also for cluster origin correction
-        # but so far unused
-        if step=="CorrectPFO":
-            tool.VertexContainerKey = vtxKey
-        if step=="CHS":
-            tool.TrackVertexAssociation = tvaKey
-            tool.VertexContainerKey = vtxKey
+        modInstance = constit._instanceMap[ step ]
+        if not modInstance.tooltype: continue
+
+        toolclass = getattr( CompFactory, modInstance.tooltype)
+
+        # update the properties : if some of them are function, just replace by calling this func :
+        for k,v in modInstance.properties.items():
+            if callable(v) :
+                modInstance.properties[k ] = v( constit )
         
-        if inputtype == xAODType.ParticleFlow and step not in ["CorrectPFO","CHS"]:
+        tool =  toolclass(modInstance.name,**modInstance.properties)
+        
+        if inputtype == xAODType.ParticleFlow and modInstance.tooltype not in ["CorrectPFOTool","ChargedHadronSubtractionTool"]:
             tool.IgnoreChargedPFO=True
             tool.ApplyToChargedPFO=False
         tool.InputType = inputtype
         modlist.append(tool)
 
     sequenceshort = "".join(sequence)
-    seqname = "ConstitMod{0}_{1}{2}".format(sequenceshort,typename,suffix)
-    inputcontainer = str(constit.rawname)
-    outputcontainer = str(constit.inputname)
+    seqname = "ConstitMod{0}_{1}".format(sequenceshort,constit.name)
+    inputcontainer = str(constit.inputname)
+    outputcontainer = str(constit.containername)
     if inputtype==xAODType.ParticleFlow:
         # Tweak PF names because ConstModSequence needs to work with
         # up to 4 containers
@@ -111,14 +147,45 @@ def getConstitModAlg(constit,suffix="",tvaKey="JetTrackVtxAssoc",vtxKey="Primary
         outputcontainer = chopPFO(outputcontainer)
 
     modseq = CompFactory.JetConstituentModSequence(seqname,
-        InputType=inputtype,
-        OutputContainer = outputcontainer,
-        InputContainer= inputcontainer,
-        Modifiers = modlist,
-        MonTool = monTool
+                                                   InputType=inputtype,
+                                                   OutputContainer = outputcontainer,
+                                                   InputContainer= inputcontainer,
+                                                   Modifiers = modlist,
+                                                   MonTool = monTool,
     )
 
     constitmodalg = CompFactory.JetAlgorithm("jetalg_{0}".format(modseq.getName()))
     constitmodalg.Tools = [modseq]
 
     return constitmodalg
+
+
+
+
+
+def constitModWithAlternateTrk(mod, trkopt):
+    """Generates a new JetConstitModifier cloned from mod and stores it in the standard jetconstitmoddic.
+    The cloned JetConstitModifier has all its track related properties changed according to trackcollectionmap[trkopt]
+    This is mainly useful to configure trigger algs.
+    """
+    from JetRecTools.JetRecToolsConfig import trackcollectionmap
+    from JetRecConfig.StandardJetConstits import jetconstitmoddic
+    newmod = mod+trkopt
+
+    if newmod in jetconstitmoddic:
+        return jetconstitmoddic[newmod]
+
+    newmodInstance  = jetconstitmoddic[mod].clone()
+
+    trackproperties = trackcollectionmap[trkopt]
+    
+    if mod == "CorrectPFO":
+        newmodInstance.properties.update(VertexContainerKey=trackproperties["Vertices"])
+    elif mod=="CHS":
+        newmodInstance.properties.update(VertexContainerKey=trackproperties["Vertices"],
+                                         TrackVertexAssociation=trackproperties["TVA"])
+    jetconstitmoddic[newmod] = newmodInstance
+    
+    return newmodInstance
+
+
diff --git a/Reconstruction/Jet/JetRecConfig/python/JetDefinition.py b/Reconstruction/Jet/JetRecConfig/python/JetDefinition.py
index cdfafdd6e155..b762ff297842 100644
--- a/Reconstruction/Jet/JetRecConfig/python/JetDefinition.py
+++ b/Reconstruction/Jet/JetRecConfig/python/JetDefinition.py
@@ -1,19 +1,21 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-########################################################################
-#                                                                      #
-# JetDefinition: A module for classes encoding definitions of jets and #
-# related objects for configuring jet reconstruction                   #
-# Author: TJ Khoo                                                      #
-#                                                                      #
-########################################################################
+"""
+                                                                     
+JetDefinition: A module for classes encoding definitions of jets and 
+related objects for configuring jet reconstruction                   
+
+Author: TJ Khoo, P-A Delsart                                         
+                                                                     
+"""
 
-__all__ =  ["JetConstit", "JetGhost", "JetDefinition","xAODType"]
+__all__ =  [  "JetDefinition","xAODType", "JetModifier", "JetConstitModifier" , "JetConstitSeq", "JetInputDef"] 
 
 from AthenaCommon import Logging
 jetlog = Logging.logging.getLogger('JetDefinition')
 
 from xAODBase.xAODType import xAODType
+from .Utilities import make_lproperty, onlyAttributesAreProperties, clonable, make_alias
 
 # Code from JetRecUtils
 # define the convention that we write R truncating the decimal point
@@ -36,171 +38,15 @@ def buildJetAlgName(finder, mainParam, variableRMassScale=None, variableRMinRadi
         return finder + "VR" + str(int(variableRMassScale/1000)) + "Rmax" + rmaxstr + "Rmin" + rminstr
     return finder + formatRvalue(mainParam)
 
-# A class that defines the type of object used to build a jet
-# Normally defaults to standard offline input containers, but
-# can be overridden.
-class JetConstit(object):
-    def __init__(self,
-                 objtype,         # The type of xAOD object from which to build the jets
-                 modifiers=[],    # Modifications to be applied to constituents prior to jet finding
-                 rawname=None,    # Override the default input collection
-                 inputname=None,  # Override the default output collection (not to be used with modifiers)
-                 prefix=None):    # Optional prefix for the inputname (mainly for trigger)
-        self.__basetype = objtype
-        self.__modifiers = modifiers
-        # Override for unmodified container name
-        self.__rawname = rawname
-        # Override for final container name
-        self.__inputname = inputname
-        # Prefix for inputname
-        self.__prefix = prefix
-
-        self.defineLabelAndContainerNames()
-        pass
-
-    def __hash__(self):
-        return hash((self.__basetype,str(self.__modifiers)))
-
-    def __eq__(self,rhs):
-        return self.__hash__() == rhs.__hash__()
 
-    def __ne__(self,rhs):
-        return (not self.__eq__(rhs))
 
-    # Define type and modifiers as properties, with
-    # custom setter/getter such that if changed, these
-    # force resetting of the label and container name
-    @property
-    def basetype(self):
-        return self.__basetype
-    @basetype.setter
-    def basetype(self,basetype):
-        self.__basetype = basetype
-        self.defineLabelAndContainerNames()
-
-    @property
-    def prefix(self):
-        return self.__prefix
-
-    @property
-    def modifiers(self):
-        return self.__modifiers
-    @modifiers.setter
-    def modifiers(self,modifiers):
-        self.__modifiers = modifiers
-        self.defineLabelAndContainerNames()
-
-    def defineLabelAndContainerNames(self):
-        labelnames = {
-            xAODType.CaloCluster:      "Topo",
-            xAODType.ParticleFlow:     "EMPFlow",
-            xAODType.TrackParticle:    "Track",
-            xAODType.TruthParticle:    "Truth",
-            xAODType.TrackCaloCluster: "TrackCaloCluster",
-            xAODType.Jet:              "Jet",
-            }
-
-        # Need capability to override label?
-        self.label = ""
-        self.rawname = ""
-        self.inputname = ""
-
-        # Truth "modifiers" specify the selection tool config
-        # e.g. WZ, WZDressed, DarkHadrons, ...
-        # Track "modifiers" specifiy the vertex association
-        # Other "modifiers" determine the constit mods e.g.
-        # origin correction, PU suppression etc
-        # Topoclusters should also specify EM or LC
-        # Jets could specify a filter e.g. pt cut or JVT??
-        modstring = ""
-        if self.__modifiers:
-            for mod in self.__modifiers:
-                # Handle special case of topocluster state
-                if mod in ["EM","LC"]:
-                    self.label += mod
-                else:
-                    modstring += mod
-
-        self.label += labelnames[self.basetype]
-        if self.basetype!=xAODType.Jet:
-            self.label += modstring
-        if self.basetype==xAODType.TruthParticle:
-            self.label = self.label.replace("NoWZ","WZ")
-
-        containernames = {
-            xAODType.CaloCluster:      "TopoClusters",
-            xAODType.ParticleFlow:     "ParticleFlowObjects",
-            xAODType.TrackParticle:    "JetSelectedTracks",
-            xAODType.TruthParticle:    "JetInputTruthParticles",
-            xAODType.TrackCaloCluster: "TrackCaloClusters",
-            xAODType.Jet:              "Jets",
-            }
-        # Sometimes the unmodified container name is longer
-        defaultaffixesraw = {
-            xAODType.CaloCluster:      "CaloCal",
-            xAODType.ParticleFlow:     "JetETMiss",
-            xAODType.TrackCaloCluster: "CombinedAndNeutral",
-            }
-        # Sometimes the standard contstit container has default mods not in modlist
-        defaultaffixesinput = {
-            xAODType.ParticleFlow:     "CHS",
-            }
-
-        # User-specified override
-        if self.__rawname:
-            self.rawname = self.__rawname
-        else: # Default to standard container
-            if self.basetype in defaultaffixesraw.keys():
-                self.rawname = defaultaffixesraw[self.basetype]
-            self.rawname += containernames[self.basetype]
-
-        # User-specified override
-        if self.__inputname:
-            self.inputname = self.__inputname
-        else: # Default to naming with modifiers if requested, else default container
-            if not modstring and self.basetype in defaultaffixesinput.keys():
-                modstring = defaultaffixesinput[self.basetype]
-            modslast = [xAODType.TruthParticle, xAODType.TrackCaloCluster]
-            if self.basetype in modslast:
-                self.inputname = containernames[self.basetype]+modstring
-            else:
-                self.inputname = modstring+containernames[self.basetype]
-
-        if self.__prefix:
-            self.inputname = self.__prefix+self.inputname
-    pass
-
-    # Define a string conversion for printing
-    def __str__(self):
-        return "JetConstit({0}: {1})".format(self.label,self.inputname)
-    # Need to override __repr__ for printing in lists etc
-    __repr__ = __str__
-
-# Not too clear at this point what other info is needed
-# In principle one might want to state the truth types etc
-class JetGhost(object):
-    def __init__(self, inputtype):
-        self.inputtype = inputtype
-        self.label = "Ghost"+inputtype
-        pass
-
-    def __hash__(self):
-        return hash(self.inputtype)
-
-    def __eq__(self,rhs):
-        return self.__hash__() == rhs.__hash__()
-
-    def __ne__(self,rhs):
-        return (not self.__eq__(rhs))
-
-    # Define a string conversion for printing
-    def __str__(self):
-        return "JetGhost(Ghost{0})".format(self.inputtype)
-    # Need to override __repr__ for printing in lists etc
-    __repr__ = __str__
+def _condAlwaysPass(condflags):
+    return True,""
 
 from AthenaCommon.SystemOfUnits import MeV
 
+@clonable
+@onlyAttributesAreProperties
 class JetDefinition(object):
     def __init__(self,
                  algorithm,           # The fastjet clustering algorithm
@@ -210,19 +56,27 @@ class JetDefinition(object):
                  ptminfilter=5e3*MeV, # The minimum pt to retain xAOD jets after calibration in MeV
                  ghostdefs=[],        # The list of JetGhosts to ghost-associate
                  modifiers=[],        # The list of JetModifiers to execute after jet finding
-                 extrainputs=[]):     # The list of additional input types needed for jet finding
-
+                 extrainputs=[],      # The list of additional input types needed for jet finding
+                 standardRecoMode = False, # 
+                 prefix = "",         # allows to tune the full JetContainer name
+                 suffix = "",         # allows to tune the full JetContainer name
+                 lock = False,        # lock the properties of this instance to avoid accidental overwrite after __init__
+    ):     
+
+        self._locked = False # unlock during init
         # Should add some type checking here
         # Could use JetContainerInfo conversion
-        self.__algorithm = algorithm
-        if self.__algorithm not in ["Kt","AntiKt","CamKt"]:
+        if algorithm not in ["Kt","AntiKt","CamKt"]:
             jetlog.error("FastJet algorithm specification was not one of Kt, AntiKt, CamKt!")
             raise KeyError("Invalid fastjet algorithm choice: {0}".format(self.algorithm))
-
-        self.__radius = radius
-        self.__inputdef = inputdef
-        self.__defineName()
-
+        self._algorithm = algorithm
+
+        self._radius = radius
+        self._inputdef = inputdef
+        self._prefix = prefix
+        self._suffix = suffix
+        self._defineName()
+        
         self.ptmin = ptmin # The pt down to which FastJet is run
         self.ptminfilter = ptminfilter # The pt above which xAOD::Jets are kept, may include calibration
         if ptmin<1000.*MeV or ptminfilter<1000.*MeV:
@@ -232,12 +86,19 @@ class JetDefinition(object):
         self.modifiers = modifiers     # Tools to modify the jet
         self.extrainputs = extrainputs # Any extra input dependencies
 
+        self.standardRecoMode = standardRecoMode
+        
         # These should probably go in a derived class
         self.VRMinRadius = None
         self.VRMassScale = None
 
-        pass
+        
+        # used internally to resolve dependencies
+        self._prereqDic = {}
+        self._prereqOrder = [] 
+        self._locked = lock
 
+            
     def __hash__(self):
         return hash((self.__radius,self.__inputdef,self.ptmin,self.ptminfilter,str(self.ghostdefs),str(self.modifiers),str(self.extrainputs)))
 
@@ -250,37 +111,79 @@ class JetDefinition(object):
     # Define core attributes as properties, with
     # custom setter/getter such that if changed, these
     # force resetting of the jet name
-    @property
-    def algorithm(self):
-        return self.__algorithm
-    @algorithm.setter
+    @make_lproperty
+    def algorithm(self): pass
+
+    @algorithm.lsetter
     def algorithm(self,algorithm):
-        self.__algorithm = algorithm
-        self.__defineName()
+        self._algorithm = algorithm
+        self._defineName()
 
-    @property
-    def radius(self):
-        return self.__radius
-    @radius.setter
+    @make_lproperty
+    def radius(self): pass
+
+    @radius.lsetter
     def radius(self,radius):
-        self.__radius = radius
-        self.__defineName()
+        self._radius = radius
+        self._defineName()
 
-    @property
-    def inputdef(self):
-        return self.__inputdef
-    @inputdef.setter
+    @make_lproperty
+    def inputdef(self): pass
+    
+    @inputdef.lsetter
     def inputdef(self,inputdef):
-        self.__inputdef = inputdef
-        self.__defineName()
-
-    def __defineName(self):
-        self.basename = buildJetAlgName(self.__algorithm,self.__radius)+self.__inputdef.label
+        self._inputdef = inputdef
+        self._defineName()
+
+    @make_lproperty
+    def prefix(self): pass
+    
+    @prefix.lsetter
+    def prefix(self,p):
+        self._prefix = p
+        self._defineName()
+
+    @make_lproperty
+    def suffix(self): pass
+    
+    @suffix.lsetter
+    def suffix(self,p):
+        self._suffix = p
+        self._defineName()
+
+    @make_lproperty
+    def basename(self): pass
+
+    @basename.lsetter
+    def basename(self,v):
+        raise Exception("Can NOT set property basename of JetDefinition ",self," Change prefix or suffix instead.")
+        
+
+    @make_lproperty
+    def ghostdefs(self): pass
+    @make_lproperty
+    def modifiers(self): pass
+    @make_lproperty
+    def extrainputs(self): pass
+    @make_lproperty
+    def standardRecoMode(self): pass
+
+    @make_lproperty
+    def VRMinRadius(self): pass
+    @make_lproperty
+    def VRMassScale(self): pass
+    
+
+    def fullname(self):
+        return self.prefix+self.basename+"Jets"+self.suffix
+        
+    def _defineName(self):
+        self._basename = buildJetAlgName(self.algorithm,self.radius)+self.inputdef.label # .label
         if self.inputdef.basetype == xAODType.CaloCluster:
             # Omit cluster origin correction from jet name
             # Keep the origin correction explicit because sometimes we may not
             # wish to apply it, whereas PFlow corrections are applied implicitly
-            self.basename = self.basename.replace("Origin","")
+            self._basename = self.basename.replace("Origin","")
         pass
 
     # Define a string conversion for printing
@@ -291,14 +194,19 @@ class JetDefinition(object):
 
 
 ########################################################################
-# Helper to instantiate a generic jet modifier
-# Tools that typically have more complex properties set should have
-# their own dedicated helper functions defined
 
+@clonable
+@onlyAttributesAreProperties
 class JetModifier(object):
+    """Helper to instantiate a generic jet modifier
+    Tools that typically have more complex properties set should have
+    their own dedicated helper 'createfn' functions defined"""
+
     def __init__(self,tooltype,toolname,
-                 helperfn=None,
-                 prereqs=[],modspec=None,passJetDef=False):
+                 createfn=None,
+                 filterfn=_condAlwaysPass,                 
+                 prereqs=[],modspec=None,passJetDef=False,
+                 ):
         # For the easy cases where no helper function is needed.
         # They will be ignored in the case of a helper,
         # but are still required such that it's obvious what
@@ -315,10 +223,10 @@ class JetModifier(object):
         # modifier, and a ComponentAccumulator instance, 
         # in case additional supporting tools/services
         # need to be set up.
-        if helperfn is None:
-            self.helperfn = self.getGenericModifier
+        if createfn is None:
+            self.createfn = self.getGenericModifier
         else:
-            self.helperfn = helperfn
+            self.createfn = createfn
         self.modspec = modspec
         self.passJetDef = passJetDef
 
@@ -328,8 +236,35 @@ class JetModifier(object):
         # in which case a helper function can be defined.
         self.prereqs = prereqs
 
+        # a function taking a CondFlags as argument and deciding if this JetModifier is compatible
+        # with the conditions.
+        #  The function must return a tuple : (bool, "reason of failure")
+        self.filterfn = filterfn 
+
+        self._instanceMap = {}
+        #self._locked = lock
+                
+
+        
+    @make_lproperty
+    def tooltype(self):pass
+    @make_lproperty
+    def toolname(self):pass
+    @make_lproperty
+    def createfn(self):pass
+    @make_lproperty
+    def modspec(self):pass
+    @make_lproperty
+    def passJetDef(self):pass
+    @make_lproperty
+    def prereqs(self):pass
+    @make_lproperty
+    def filterfn(self):pass
+
+    
+    
     def __hash__(self):
-        return hash((self.toolname,self.tooltype,self.helperfn.__name__,self.modspec,self.passJetDef,str(self.prereqs)))
+        return hash((self.toolname,self.tooltype,self.createfn.__name__,self.modspec,self.passJetDef,str(self.prereqs)))
 
     def __eq__(self,rhs):
         return self.__hash__() == rhs.__hash__()
@@ -348,12 +283,194 @@ class JetModifier(object):
         tool = CompFactory.getComp(self.tooltype)(self.toolname)
         return tool
 
-    def getPrereqs(self,modspec="",jetdef=None):
-        prereqs = []
-        if self.prereqs.__class__ == list:
-            prereqs += self.prereqs
-        else:
-            prereqs += self.prereqs(modspec,jetdef)
-        jetlog.verbose("Prereqs for {0}: [{1}]".format(self.toolname,", ".join(prereqs)))
-        return prereqs
 
+
+
+########################################################################
+    
+@clonable
+@onlyAttributesAreProperties
+class JetInputDef(object):
+    """This describes an input source to jet finding, typically a container build outside the jet domain.
+    Sources can be container of constituents or ghost constituents (ex: clusters, tracks,...) but also
+    other object needed by JetModifier (ex: EventDensity or track-vertex association map).
+
+    Currently this class is mainly here to hold a helper (algoBuilder) function in charge of creating an algorithm to build the source. 
+    If this function is None, then we expect the container pre-exists in the evt store. 
+
+    Arguments to the constructor :
+      - name : container name in event store 
+      - objtype  : the xAODType (ex: xAODType.TruthParticle, xAODType.CaloCluster, ...)
+      - algoBuilder [optional] : a function returning a configured algorithm which build the container
+                                 the function is called as algoBuilder(parentjetdef, specs) where 
+                                     parentjetdef is the JetDefinition for which this input building is called.
+                                     specs is self.specs
+                                 If omitted, it is assumed the container pre-exists in the event store.
+     - specs [optional] : a string (or anything) which specifies some options, and passed to the algoBuilder function
+     - filterfn : a function taking a CondFlags as argument and deciding if this JetModifier is compatible
+                  with the conditions (same as JetModifier.filterfn )
+                  The function must return a tuple : (bool, "reason of failure")
+     - prereqs : a list of prerequisites for this input definition.
+    """
+    def __init__(self, name, objtype, algoBuilder=None, specs=None, filterfn= _condAlwaysPass, prereqs=[]):
+        self.name = name
+        self.basetype = objtype
+        self.algoBuilder = algoBuilder
+        self.specs = specs
+        self.filterfn = filterfn 
+        self.prereqs = prereqs
+
+        # # make outputname an alias of name, so JetInputDef shares an interface with JetConstitSeq.
+        # # we set the hidden attribute because the real one is unsettable (see below)
+        # self._outputname = name # Set outputname as an alias to name.
+        
+
+    @make_lproperty
+    def name(self): pass
+    @make_lproperty
+    def algoBuilder(self): pass
+    @make_lproperty
+    def basetype(self): pass
+    @make_lproperty
+    def specs(self): pass
+    @make_lproperty
+    def filterfn(self):pass
+    @make_lproperty
+    def prereqs(self):pass
+
+    # make outputname an alias of name so JetInputDef shares an interface with JetConstitSeq.
+    outputname = make_alias("name")
+    # @make_lproperty
+    # def outputname(self): pass
+    # @outputname.setter
+    # def outputname(self,v):
+    #     raise Exception("Can not set the 'outputname' attribute of a JetInputDef, set its 'name' instead")
+
+
+########################################################################    
+
+@clonable
+@onlyAttributesAreProperties
+class JetConstitModifier(object):
+    """Configuration for  a constituent modifier tool to be used in a JetConstituentModSequence.
+    See StandardJetConstits.py for usage of this class.
+    
+    the properties argument in __init__ defines directly the properties of the final tool :
+    if the tool has the property "PtMin" then passing 'dict(PtMin=10*GeV)' will result in 'tool.PtMin = 10*GeV'
+    IMPORTANT : If a property is itself an other tool, we can pass a function returning the tool like in 'dict(TheSubTool = mySubToolFunc)'
+    The function will be called only when appropriate in the form 'tool.TheSubTool = mySubToolFunc(constitseq)'
+    """
+    def __init__(self,
+                 name,
+                 tooltype,
+                 properties={}):
+        self.name = name
+        self.tooltype = tooltype
+        self.properties = properties
+
+    @make_lproperty
+    def name(self): pass
+    @make_lproperty
+    def tooltype(self): pass
+    @make_lproperty
+    def properties(self): pass
+    
+
+@clonable
+@onlyAttributesAreProperties
+class JetConstitSource(object):
+    """Configuration for simplest constituents (or ghost constituents) to jets. 
+    This describes what can be the input to a PseudoJetAlgorithm. 
+    The containername attribute must correspond to an existing JetInputDef so the system knows how to build this
+    source container (if necessary).
+    """
+    def __init__(self,
+                 name,            # identifies this constit source, must be unique.  
+                 objtype,         # The type of xAOD object from which to build the jets
+                 containername,   # The key of the source container in the event store. 
+                 prereqs = [],    # will contain references to JetInputDef 
+                 label = None,    # used to describe a category for these constits. if None, will default to name
+                 filterfn=_condAlwaysPass,                 
+                 lock = False,    # lock all properties of this instance
+    ):    
+
+        self.name = name 
+        self.containername = containername
+        #self.inputname = containername  # will act as an alias to containername (and immutable since it's not a property)
+        self.prereqs = prereqs
+        self.label = label or name
+        
+        self.basetype = objtype
+        self.filterfn = filterfn 
+
+        self._locked = lock
+
+    @make_lproperty
+    def basetype(self): pass
+        
+    @make_lproperty
+    def containername(self): pass
+    
+    @make_lproperty
+    def prereqs(self): pass
+
+    @make_lproperty
+    def filterfn(self):pass
+
+    # make an alias on containername so JetConstitSource and JetConstitSeq share an interface
+    inputname = make_alias("containername")
+
+@clonable
+@onlyAttributesAreProperties
+class JetConstitSeq(JetConstitSource):
+    """Configuration for JetConstituentModSequence. 
+    Describes the constituents which need to be build with a JetConstituentModSequence.
+    Uses a list of aliases to JetConstitModifier to describe the modif steps.
+    """
+    def __init__(self,
+                 name,
+                 objtype,         # The type of xAOD object from which to build the jets
+                 modifiers=[],    # Modifications to be applied to constituents prior to jet finding
+                 inputname=None,    # input collection which will be transformed into the source constituents
+                 outputname=None,  #  output collection, will be set to self.containername
+                 prereqs = [],     # will contain references to JetInputDef 
+                 label = None, 
+                 filterfn=_condAlwaysPass,                 
+                 lock = False,    # lock all properties of this instance
+    ):    
+        
+        JetConstitSource.__init__(self,name, objtype, outputname, prereqs=prereqs, filterfn=filterfn,label=label,lock=False, finalinit=False, )
+        self.inputname  = inputname or name
+        self.modifiers = modifiers
+
+        self._instanceMap = dict() # internal maps of modifier to actual configuration object        
+        
+        self._locked = lock
+
+    @make_lproperty
+    def modifiers(self): pass
+
+    @make_lproperty
+    def inputname(self): pass
+    @make_lproperty
+    def label(self): pass
+    
+    
+        
+    def __hash__(self):
+        return hash((self._basetype,str(self._modifiers)))
+
+    def __eq__(self,rhs):
+        return self.__hash__() == rhs.__hash__()
+
+    def __ne__(self,rhs):
+        return (not self.__eq__(rhs))
+
+    
+
+    # Define a string conversion for printing
+    def __str__(self):
+        return "JetConstitSeq({0}: {1})".format(self.name,self.inputname)
+    # Need to override __repr__ for printing in lists etc
+    __repr__ = __str__
+    
diff --git a/Reconstruction/Jet/JetRecConfig/python/JetGroomConfig.py b/Reconstruction/Jet/JetRecConfig/python/JetGroomConfig.py
index 4c90abb5bccd..b12202360b7b 100644
--- a/Reconstruction/Jet/JetRecConfig/python/JetGroomConfig.py
+++ b/Reconstruction/Jet/JetRecConfig/python/JetGroomConfig.py
@@ -13,8 +13,29 @@ jetlog = Logging.logging.getLogger('JetGroomConfig')
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
 
+import JetRecConfig.JetModConfig as modH
+from JetRecConfig.JetRecConfig import instantiateAliases, buildJetModifierList
+
 import six
 
+
+def instantiateGroomingAliases( groomdef ):
+    """ Instantiate all the modifier aliases contained in this groomdef.
+    At the same time fills the internal _prereqDic and _prereqOrder containers.
+    
+    This functions 
+      * assumes jetdef is not 'locked' 
+      * implies calls to recursives function constH.aliasToInputDef and modH.aliasToModDef
+    """
+
+    instantiateAliases(groomdef.ungroomeddef)
+    
+    for mod in groomdef.modifiers:
+        modInstance = modH.aliasToModDef(mod, groomdef)
+        groomdef._prereqDic['mod:'+mod] = modInstance
+        groomdef._prereqOrder.append('mod:'+mod)
+
+    
 ########################################################################
 # Get a jet groomer class given a tool name and the grooming definition object
 # The pjsin argument is for forwards compatibility when we switch to
@@ -30,7 +51,7 @@ def getJetGroomer(groomdef,pjsin):
 # Function for configuring the jet algorithm and groomers, given the
 # set of dependencies
 #
-def getJetGroomAlg(jetname,groomdef,pjsin,modlist,monTool=None):
+def getJetGroomAlg(jetname,groomdef,pjsin,monTool=None):
     jetlog.debug("Configuring JetAlgorithm \"jetalg_{0}\"".format(jetname))
 
     from . import JetRecConfig
@@ -39,16 +60,11 @@ def getJetGroomAlg(jetname,groomdef,pjsin,modlist,monTool=None):
     groomer = getJetGroomer(groomdef,pjsin)
     groomer.JetBuilder = builder
 
-    from . import JetModConfig
-    mods = []
-    # Dependency resolution should be done externally
-    for moddef,modspec in modlist:
-        mod = JetModConfig.getModifier(groomdef,moddef,modspec)
-        mods.append(mod)
+    mods = buildJetModifierList(groomdef)
 
     rectool = CompFactory.JetRecTool(jetname,
                                      JetGroomer=groomer,
-                                     InputContainer=groomdef.ungroomedname,
+                                     InputContainer=groomdef.ungroomeddef.fullname(),
                                      OutputContainer=jetname,
                                      JetPseudojetRetriever=CompFactory.JetPseudojetRetriever("jpjretriever"),
                                      JetModifiers=mods)
diff --git a/Reconstruction/Jet/JetRecConfig/python/JetGrooming.py b/Reconstruction/Jet/JetRecConfig/python/JetGrooming.py
index 578e105bdd1e..2d5aa6bdd278 100644
--- a/Reconstruction/Jet/JetRecConfig/python/JetGrooming.py
+++ b/Reconstruction/Jet/JetRecConfig/python/JetGrooming.py
@@ -11,29 +11,38 @@
 __all__ =  ["GroomingDefinition","JetTrimming","JetSoftDrop"]
 
 from AthenaCommon import Logging
+from .Utilities import make_lproperty, onlyAttributesAreProperties, clonable
 jetlog = Logging.logging.getLogger('JetGrooming')
 
+@clonable
+@onlyAttributesAreProperties
 class GroomingDefinition(object):
     def __init__(self, 
                  ungroomeddef,  # Ungroomed JetDefinition
-                 ungroomedname, # Input collection name (cannot be determined uniquely from inputdef)
+                 #ungroomedname, # Input collection name (cannot be determined uniquely from inputdef)
                  groomspec,     # Dict describing the grooming settings
-                 modifiers=[]): # JetModifiers to run after grooming
+                 modifiers=[],  # JetModifiers to run after grooming
+                 lock=False,
+                 ): 
 
-        self.ungroomedname = ungroomedname
+        #self.ungroomedname = ungroomedname
 
         # Dedicated setter/getter
-        self.__ungroomeddef = ungroomeddef
-        self.__groomspec = groomspec
+        self._ungroomeddef = ungroomeddef.clone() # to avoid messing with external jetdef
+        self._groomspec = groomspec
 
-        self.__checkGroomSpec(groomspec)
-        self.__groomspec = groomspec
+        self._checkGroomSpec(groomspec)
+        self._groomspec = groomspec
 
-        self.__defineName()
+        self._defineName()
 
         self.modifiers = modifiers     # Tools to modify the jet
 
-        pass
+        # used internally to resolve dependencies
+        self._prereqDic = {}
+        self._prereqOrder = [] 
+        self._locked = lock
+
 
     def __hash__(self):
         return hash("")
@@ -47,15 +56,34 @@ class GroomingDefinition(object):
     # Define core attributes as properties, with
     # custom setter/getter such that if changed, these
     # force resetting of the jet name
-    @property
-    def ungroomeddef(self):
-        return self.__ungroomeddef
-    @ungroomeddef.setter
+    @make_lproperty
+    def ungroomeddef(self): pass
+    @ungroomeddef.lsetter
     def ungroomeddef(self,ungroomeddef):
-        self.__ungroomeddef = ungroomeddef
-        self.defineName()
+        self._ungroomeddef = ungroomeddef.clone()
+        self._defineName()
+
+
+    @make_lproperty
+    def modifiers(self): pass
+        
+    @make_lproperty
+    def groomspec(self):
+        return self.__groomspec
+    @groomspec.lsetter
+    def groomspec(self,groomspec):
+        self._checkGroomSpec(groomspec)
+        self._groomspec = groomspec
+        self._defineName()
+
+    # To override in derived classes
+    def groomSpecAsStr(self):
+        return "Groomed"
 
-    def __checkGroomSpec(self,groomspec):
+    def fullname(self):
+        return self.ungroomeddef.prefix+self.basename+"Jets"
+    
+    def _checkGroomSpec(self,groomspec):
         # Check if options are supported (implemented)
         groomalg = groomspec["groomalg"]
         supportedGrooming = ["Trim","SoftDrop"]
@@ -64,33 +92,20 @@ class GroomingDefinition(object):
             for groomalg in supportedGrooming:
                 jetlog.error(groomalg)
             raise KeyError("Invalid grooming algorithm choice: {0}".format(groomalg))
+        
+    # @property
+    # def inputdef(self):
+    #     return self.__inputdef
+    # @inputdef.setter
+    # def inputdef(self,inputdef):
+    #     self.__inputdef = inputdef
+    #     self._defineName()
 
-    @property
-    def groomspec(self):
-        return self.__groomspec
-    @groomspec.setter
-    def groomspec(self,groomspec):
-        self.__groomspec = groomspec
-        self.defineName()
-
-    @property
-    def inputdef(self):
-        return self.__inputdef
-    @inputdef.setter
-    def inputdef(self,inputdef):
-        self.__inputdef = inputdef
-        self.defineName()
-
-    # To override in derived classes
-    def groomSpecAsStr(self):
-        return "Groomed"
 
-    def __defineName(self):
-        ungroomedNameBase = self.ungroomeddef.basename
+    def _defineName(self):
         # chop the label off so we can insert the trimming spec
-        groomedName = ungroomedNameBase + self.groomSpecAsStr()
+        groomedName = self.ungroomeddef.basename + self.groomSpecAsStr()
         self.basename = groomedName
-        pass
 
     # Define a string conversion for printing
     def __str__(self):
@@ -99,13 +114,17 @@ class GroomingDefinition(object):
     __repr__ = __str__
 
 
+@clonable
+@onlyAttributesAreProperties
 class JetTrimming(GroomingDefinition):
     def __init__(self, 
                  ungroomeddef,  # Ungroomed JetDefinition
-                 ungroomedname, # Input collection name (cannot be determined uniquely from inputdef)
+                 #ungroomedname, # Input collection name (cannot be determined uniquely from inputdef)
                  smallR,        # Subjet radius
                  ptfrac,        # Minimum subjet pt fraction
-                 modifiers=[]): # JetModifiers to run after grooming
+                 modifiers=[],  # JetModifiers to run after grooming
+                 lock=False,
+                 ): 
 
         # Apart from groomalg and ToolType, these correspond to the
         # grooming tool property values
@@ -122,7 +141,7 @@ class JetTrimming(GroomingDefinition):
             "PtFrac":   ptfrac,
             }
 
-        super(JetTrimming,self).__init__(ungroomeddef,ungroomedname,groomspec,modifiers)
+        super(JetTrimming,self).__init__(ungroomeddef,groomspec,modifiers,lock=lock,finalinit=False)
 
     def groomSpecAsStr(self):
         ptfrac = self.groomspec["PtFrac"]
@@ -134,13 +153,16 @@ class JetTrimming(GroomingDefinition):
         groomstr = "TrimmedPtFrac{}SmallR{}".format(ptfracstr,smallRstr)
         return groomstr
 
+@clonable
+@onlyAttributesAreProperties
 class JetSoftDrop(GroomingDefinition):
     def __init__(self,
                  ungroomeddef,  # Ungroomed JetDefinition
-                 ungroomedname, # Input collection name (cannot be determined uniquely from inputdef)
+                 #ungroomedname, # Input collection name (cannot be determined uniquely from inputdef)
                  zcut,          # ZCut
                  beta,          # Beta
-                 modifiers=[]): # JetModifiers to run after grooming
+                 modifiers=[],  # JetModifiers to run after grooming
+                 lock=False):
 
         # Apart from groomalg and ToolType, these correspond to the
         # grooming tool property values
@@ -156,7 +178,7 @@ class JetSoftDrop(GroomingDefinition):
             "Beta":   beta,
             }
 
-        super(JetSoftDrop,self).__init__(ungroomeddef,ungroomedname,groomspec,modifiers)
+        super(JetSoftDrop,self).__init__(ungroomeddef,groomspec,modifiers, lock=lock, finalinit=False)
 
     def groomSpecAsStr(self):
         beta     = self.groomspec["Beta"]
diff --git a/Reconstruction/Jet/JetRecConfig/python/JetInputConfig.py b/Reconstruction/Jet/JetRecConfig/python/JetInputConfig.py
new file mode 100644
index 000000000000..6c9e48d3f667
--- /dev/null
+++ b/Reconstruction/Jet/JetRecConfig/python/JetInputConfig.py
@@ -0,0 +1,72 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+"""
+# JetInputConfig: A helper module providing function to setup algorithms
+# in charge of preparing input sources to jets (ex: EventDensity algo, track
+# or truth selection,...)
+#
+# Author: P-A Delsart                                              #
+"""
+
+
+from AthenaConfiguration.ComponentFactory import CompFactory
+
+def _buildJetAlgForInput(suffix, tools ):
+    jetalg = CompFactory.JetAlgorithm("jetalg_"+suffix,
+                                      Tools = tools,
+    )
+    return jetalg
+
+def buildJetSelectedTracks( parentjetdef, inputspec ):
+    from JetRecTools import JetRecToolsConfig
+    # Jet track selection
+    t = JetRecToolsConfig.getTrackSelTool(doWriteTracks=True)
+    return _buildJetAlgForInput("JetSelectedTrack",
+                                tools = [ t ]
+                                )
+
+
+def buildJetTrackVertexAssoc( parentjetdef, inputspec ):
+    from JetRecTools import JetRecToolsConfig
+    # Jet track selection
+    return _buildJetAlgForInput("JetTVA",
+                                tools = [ JetRecToolsConfig.getTrackVertexAssocTool() ]
+    )
+    
+
+
+    
+def buildJetInputTruth(parentjetdef, truthmod):
+    truthmod = truthmod or ""
+    from ParticleJetTools.ParticleJetToolsConfig import getCopyTruthJetParticles
+    return _buildJetAlgForInput("truthpartcopy_"+truthmod,
+                                tools = [ getCopyTruthJetParticles(truthmod) ]
+    )
+
+def buildLabelledTruth(parentjetdef, truthmod):
+    from ParticleJetTools.ParticleJetToolsConfig import getCopyTruthLabelParticles
+    tool = getCopyTruthLabelParticles(truthmod)
+    return _buildJetAlgForInput("truthlabelcopy_"+truthmod,
+                                tools = [ tool ]
+    )
+
+
+
+########################################################################
+def buildEventShapeAlg( parentjetdef, inputspec ):
+    """Function producing an EventShapeAlg to calculate
+     median energy density for pileup correction"""
+    
+    nameprefix = inputspec or ""
+    label = parentjetdef.inputdef.label
+    rhokey = nameprefix+"Kt4"+label+"EventShape"
+    rhotoolname = "EventDensity_"+nameprefix+"Kt4"+label
+    
+    rhotool = CompFactory.EventDensityTool(rhotoolname)
+    rhotool.InputContainer = "PseudoJet"+label # same as in PseudoJet algs
+    rhotool.OutputContainer = rhokey
+    
+    eventshapealg = CompFactory.EventDensityAthAlg("{0}{1}Alg".format(nameprefix,rhotoolname))
+    eventshapealg.EventDensityTool = rhotool
+
+    return eventshapealg
+
diff --git a/Reconstruction/Jet/JetRecConfig/python/JetModConfig.py b/Reconstruction/Jet/JetRecConfig/python/JetModConfig.py
index 8c6478b8f47a..9d157f17c2bb 100644
--- a/Reconstruction/Jet/JetRecConfig/python/JetModConfig.py
+++ b/Reconstruction/Jet/JetRecConfig/python/JetModConfig.py
@@ -1,79 +1,18 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-
-########################################################################
-#                                                                      #
-# JetModConfig: A helper module for configuring jet modifier tools     #
-# Author: TJ Khoo                                                      #
-#                                                                      #
-########################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
+"""
+                                                                     #
+JetModConfig: A helper module for configuring jet modifier tools     #
+Author: TJ Khoo                                                      #
+                                                                     #
+"""
 from AthenaCommon import Logging
+from .JetDefinition import JetModifier
+import JetRecConfig.ConstModHelpers as constHelper
 modlog = Logging.logging.getLogger('JetModConfig')
 
-########################################################################
-# Function for generating a list of JetModifier tools
-# Keep a default empty modstrings as we might want to actually
-# specify some defaults (e.g. calib/filter/sort) for specific configs
-#
-# First incarnation is "dumb" but we want this to be "smart" and set up
-# the right tools in order, propagating dependencies.
-#
-def getFinalModifierListAndPrereqs(mods_initial, jetdef):
-    if len(mods_initial)==0: return [], set()
-    mods_final = []
-    # By the end of the recursion, all mods should have been applied already.
-    prereqs = set()
-
-    modlog.verbose("Initial mod list: " + str(mods_initial))
-
-    # Loop over the initial list
-    # Extract the concrete definition and specifier string
-    # Then grab any prereqs, and expand if the list contains mods
-    for mod in mods_initial:
-        moddef, modspec = getModDefAndSpec( mod )
-        modreqs = moddef.getPrereqs(modspec,jetdef)
-        prereqmods = []
-        for req in modreqs:
-            reqtype, reqspec = req.split(':',1)
-            if reqtype == "mod":
-                prereqmods.append(reqspec)
-            else:
-                prereqs.add( req )
-        # Recursion happens here
-        prereqmods_final, moreprereqs = getFinalModifierListAndPrereqs( prereqmods, jetdef )
-        prereqs.update( moreprereqs )
-        mods_final += prereqmods_final + [(moddef,modspec)]
-
-    modlog.verbose("Current input prereqs: {0}".format(prereqs))
-    modlog.verbose("Final modlist: {0}".format(mods_final))
-    return mods_final, prereqs
-
-# [Optional] Args are:
-#    1. Tool Type (may be ignored if the helper is a custom one)
-#    2. Tool Name (may be ignored if the helper is a custom one)
-#   [3.] Config helper
-#   [4.] Prereqs (default to []). If "None", will try to get from the function.
-#   [5.] Flag passJetDef specifying if the helper needs the jet definition
-# We use a helper class to encapsulate the modifier configuration
-
-# Translate modifier string into JetModifier if necessary
-# Extracts the modspec from the string or the config object
-def getModDefAndSpec(mod):
-    from .StandardJetMods import jetmoddict
-    moddef = mod
-    modspec = ""
-    if mod.__class__ == type("str"):
-        modkey = mod
-        if ":" in mod:
-            modkey, modspec = mod.split(':',1)
-        moddef = jetmoddict[modkey]
-    else:
-        modspec = moddef.modspec
-    modlog.verbose("Interpreted modifier string {0} as {1} with specification \"{2}\"".format(mod,moddef,modspec))
-    return moddef, modspec
-
-# Translate JetModifier into a concrete tool
 def getModifier(jetdef, moddef, modspec):
+    """Translate JetModifier into a concrete tool"""
     modtool = None
     modlog.verbose("Retrieving modifier {0}".format(str(moddef)))
 
@@ -86,11 +25,80 @@ def getModifier(jetdef, moddef, modspec):
 
     # Get the modifier tool
     try:
-        modtool = moddef.helperfn(**kwargs)
+        modtool = moddef.createfn(**kwargs)
     except Exception as e:
         modlog.error( "Unhandled modifier specification {0} for mod {1} acting on jet def {2}!".format(modspec,moddef,jetdef.basename) )
         modlog.error( "Received exception \"{0}\"".format(e) )
-        modlog.error( "Helper function is \"{0}\"".format(moddef.helperfn) )
+        modlog.error( "Helper function is \"{0}\"".format(moddef.createfn) )
         raise ValueError( "JetModConfig unable to handle mod {0} with spec \"{1}\"".format(moddef,modspec) )
 
     return modtool
+
+
+
+def prereqToDef(prereq, parentjetdef):
+    """translate a prereq string in the form 'type:alias' into a known config object.
+    """
+    reqtype, reqkey = prereq.split(':',1)
+    if reqtype=='mod':
+        reqInstance = aliasToModDef(reqkey, parentjetdef)
+    else:
+        reqInstance = constHelper.aliasToInputDef(reqkey, parentjetdef)
+    return reqInstance
+
+def aliasToModDef(alias, parentjetdef ):
+    """return an alias into a JetModifier config object, recursively instatiating all aliases in the dependencies of this JetModifier."""
+    if isinstance(alias, JetModifier):
+        return alias
+    # else assume it's a string
+
+    # split it, to extract the optional specifiers 
+    modL = alias.split(":")
+    modkey = modL[0]
+    modspec = ':'.join(modL[1:])
+
+    # retrieve an instance from the known modifiers in StandardJetMods :
+    from .StandardJetMods import jetmoddict
+    moddef = jetmoddict[modkey].clone( modspec = modspec)
+
+    
+    if callable(moddef.prereqs):
+        moddef.prereqs = moddef.prereqs( modspec, parentjetdef )        
+    
+    for prereq in moddef.prereqs:
+        reqInstance = parentjetdef._prereqDic.get( prereq, None)
+        if reqInstance is None:
+            reqInstance = prereqToDef(prereq, parentjetdef)
+
+        if prereq.startswith('ghost:'):
+            # then it is also an input : register this requirement also as an input
+            prereqN = prereq.split(':')[1]
+            parentjetdef._prereqOrder.append('input:'+prereqN)
+            parentjetdef._prereqDic['input:'+prereqN] = reqInstance # the input config instance is identical for input and ghost (only the PseudoJet will differ)
+            
+        parentjetdef._prereqOrder.append(prereq)
+        parentjetdef._prereqDic[prereq] = reqInstance
+        
+    return moddef
+
+
+
+def jetModWithAlternateTrk(jetdef, trkopt):
+    """ Update all the track-related JetModifier in jetdef._prereqOrder so that they have their optional specification
+    ('modspec') set to trkopt.
+    This is needed when some prereq JetModifier are generated without the specification. The main use case is trigger where the Track and vertex container name are different than the standard.
+    IMPORTANT : this must be called after instantiateAliases() .
+    """
+    
+    from JetRecTools.JetRecToolsConfig import trackcollectionmap
+
+    def changeJetModSpec( mod ):
+        if mod in ['mod:JVT','mod:JVF', 'mod:TrackMoments', 'mod:TrackSumMoments']:
+            return mod+':'+trkopt
+        return mod
+
+    for i in range(len(jetdef._prereqOrder)):
+        jetdef._prereqOrder[i] = changeJetModSpec( jetdef._prereqOrder[i] )
+    
+    # Deduplicate the prereq (with python > 3.6 dict is ordered so the trick is guaranteed to work) :
+    jetdef._prereqOrder[:] = list(dict.fromkeys(jetdef._prereqOrder) )
diff --git a/Reconstruction/Jet/JetRecConfig/python/JetRecConfig.py b/Reconstruction/Jet/JetRecConfig/python/JetRecConfig.py
index aabff57aeaab..4ba2d6d7e5be 100644
--- a/Reconstruction/Jet/JetRecConfig/python/JetRecConfig.py
+++ b/Reconstruction/Jet/JetRecConfig/python/JetRecConfig.py
@@ -1,55 +1,48 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-########################################################################
-#                                                                      #
-# JetRecConfig: A helper module for configuring jet reconstruction     #
-# Author: TJ Khoo                                                      #
-#                                                                      #
+"""
+JetRecConfig: A helper module for configuring jet reconstruction     
+
+Author: TJ Khoo, P-A Delsart                                                      
+"""
+
 ########################################################################
 
 from AthenaCommon import Logging
 jetlog = Logging.logging.getLogger('JetRecConfig')
 
-from xAODBase.xAODType import xAODType
 
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
 
+import JetRecConfig.ConstModHelpers as constH
+import JetRecConfig.JetModConfig as modH
+
 
-def propertiesOf(comp):
-    """ Obtain properties irrespectively of the config system"""
-    try:
-        propNames = comp._descriptors
-        return propNames
-    except Exception: 
-        pass
-    return comp.properties()
 
 
-__all__ = ["JetRecCfg", "resolveDependencies", "JetInputCfg"]
+__all__ = ["JetRecCfg", "JetInputCfg"]
+
+
 
 ########################################################################
-# Top-level function for running jet finding
-# (i.e. clustering from inputs)
-# This returns a ComponentAccumulator that can be merged with others
-# from elsewhere in the job, but will provide everything needed to
-# reconstruct one jet collection.
-# This could still be modularised further into the subcomponents of the
-# jet reconstruction job. For now, based on public tools, as private
-# tool migration has not been completed.
-#
-# Receives the jet definition and input flags, mainly for input file
-# peeking such that we don't attempt to reproduce stuff that's already
-# in the input file
-def JetRecCfg(jetdef, configFlags, jetnameprefix="",jetnamesuffix="", evsprefix="", jetnameoverride=None):
-    # Ordinarily we want to have jet collection names be descriptive and derived from
-    # the configured reconstruction.
-    # Nevertheless, we allow an explicit specification when necessary
-    # e.g. to ensure that the correct name is used in grooming operations
-    if jetnameoverride:
-        jetsfullname = jetnameoverride
-    else:
-        jetsfullname = jetnameprefix+jetdef.basename+"Jets"+jetnamesuffix
+    
+def JetRecCfg(jetdef0, configFlags):
+    """Top-level function for running jet finding
+    (i.e. clustering from inputs)
+    This returns a ComponentAccumulator that can be merged with others
+    from elsewhere in the job, but will provide everything needed to
+    reconstruct one jet collection.
+    This could still be modularised further into the subcomponents of the
+    jet reconstruction job.
+    Receives the jet definition and input flags, mainly for input file
+    peeking such that we don't attempt to reproduce stuff that's already
+    in the input file
+    """
+    # we clone the jetdef, so we're sure we're not using a 'locked' one 
+    jetdef = jetdef0.clone()
+    
+    jetsfullname = jetdef.fullname()
     jetlog.info("Setting up to find {0}".format(jetsfullname))
 
     sequencename = jetsfullname
@@ -58,328 +51,101 @@ def JetRecCfg(jetdef, configFlags, jetnameprefix="",jetnamesuffix="", evsprefix=
     from AthenaCommon.CFElements import parOR
     components.addSequence( parOR(sequencename) )
 
-    deps = resolveDependencies( jetdef )
+    # create proper config instances for each input and ghost aliases in this jetdef
+    # this implicitely calculates and adds the dependencies.
+    instantiateAliases(jetdef)
+    
+    # check if the conditions are compatible with the inputs & modifiers of this jetdef.
+    # if in standardRecoMode we will remove whatever is incompatible and still try to run
+    # if not, we raise an exception
+    removeComponentFailingConditions(jetdef, configFlags, raiseOnFailure= not jetdef.standardRecoMode)
+        
     
     # Schedule the various input collections.
     # We don't have to worry about ordering, as the scheduler
     # will handle the details. Just merge the components.
-    # 
-    # To facilitate running in serial mode, we also prepare
-    # the constituent PseudoJetAlgorithm here (needed for rho)
-    inputcomps = JetInputCfg(deps["inputs"], configFlags, sequenceName=jetsfullname, evsprefix=evsprefix)
-    constitpjalg = inputcomps.getPrimary()
+    inputcomps = JetInputCfg(jetdef, configFlags, sequenceName=jetsfullname)
+    components.merge(inputcomps)
+    
+    # Schedule the constituent PseudoJetAlg
+    constitpjalg = getConstitPJGAlg( jetdef.inputdef )
     constitpjkey = constitpjalg.OutputContainer
+    components.addEventAlgo( constitpjalg, jetsfullname )
 
-    components.merge(inputcomps)
-    pjs = [constitpjkey]
+    pjContNames = [constitpjkey]
 
     # Schedule the ghost PseudoJetAlgs
-    for ghostdef in deps["ghosts"]:
+    ghostlist = [ key for key in jetdef._prereqOrder if key.startswith('ghost:')]
+    for ghostkey in ghostlist:
+        ghostdef = jetdef._prereqDic[ghostkey]
         ghostpjalg = getGhostPJGAlg( ghostdef )
         components.addEventAlgo( ghostpjalg, sequencename )
         ghostpjkey = ghostpjalg.OutputContainer
-        pjs.append( ghostpjkey )
+        pjContNames.append( ghostpjkey )
 
     # Generate a JetAlgorithm to run the jet finding and modifiers
     # (via a JetRecTool instance).
-    mergepjalg = CompFactory.PseudoJetMerger(
-        "pjmergealg_"+jetsfullname,
-        InputPJContainers = pjs,
-        OutputContainer = "PseudoJetMerged_"+jetsfullname)
-
-    components.addEventAlgo(mergepjalg, sequencename)
-
-    jetrecalg = getJetRecAlg(jetsfullname, jetdef, "PseudoJetMerged_"+jetsfullname, deps["mods"])
- 
+    jetrecalg = getJetAlgorithm(jetsfullname, jetdef, pjContNames)
     components.addEventAlgo(jetrecalg, sequencename)
 
     jetlog.info("Scheduled JetAlgorithm instance \"jetalg_{0}\"".format(jetsfullname))
     return components
 
-########################################################################
-# The real workhorse -- establishes the full sequence of jet reco,
-# recursively expanding the prerequisites
-#
-# Avoids constructing any configurables at this stage, the goal being
-# to produce a human-readable job description.
-def resolveDependencies(jetdef):
-
-    jetlog.info("Resolving dependencies for {0} definition".format(jetdef.basename))
-
-    # Accumulate prerequisites of the base constituent type
-    # We just collect everything and sort out the types later
-    prereqs = set() # Resolve duplication as we go
-    prereqs.update( getConstitPrereqs( jetdef.inputdef ) )
-    prereqs.update( set( ["input:"+dep for dep in jetdef.extrainputs] ) )
-
-    # Add the Filter modifier if desired (usually it is)
-    # It might be simpler to just eliminate ptminfilter
-    # and always make this an explicit modifier
-    mods_initial = list(jetdef.modifiers)
-    if jetdef.ptminfilter>1e-9:
-        filtstr = "Filter:{0:.0f}".format(jetdef.ptminfilter)
-        # Insert pt filter after calibration if present
-        idx=-1
-        for imod, mod in enumerate(mods_initial):
-            if mod.startswith("Calib"):
-                idx = imod+1
-                break
-        mods_initial.insert(idx,filtstr)
-
-    # Accumulate prerequisites of the modifiers, as these are
-    # the most extensive. Internally resolves modifier chains,
-    # returning an updated modifiers list
-    # Need to use a list, as the order matters.
-    # The elements of the "final" list are tuples extracting
-    # the modifier specification.
-    from . import JetModConfig
-    mods_final, modprereqs = JetModConfig.getFinalModifierListAndPrereqs( mods_initial, jetdef )
-
-    # Remove the duplicates in the mod list -- just do this
-    # once at the end and preserve ordering.
-    def dedupe(mylist):
-        outlist = []
-        usedset = set()
-        for item in mylist:
-            if not (item in usedset):
-                outlist.append(item)
-                usedset.add(item)
-        return outlist
-    mods_final = dedupe( mods_final )
-
-    prereqs.update( modprereqs )
-
-    # Ghost prerequisites are only of type input, so we can
-    # afford to sort now.
-    prereqdict = {"ghost":set(), "input":set()}
-    prereqdict.update( classifyPrereqs(prereqs) )
-
-    # Copy the explicitly requested ghost defs and add to
-    # these those required by modifiers.
-    ghostdefs = set(jetdef.ghostdefs).union(prereqdict["ghost"])
-    # Expand from strings to JetGhost objects where needed.
-    ghostdefs = expandPrereqs( "ghost",ghostdefs )
-    
-    # Accumulate prerequisites of the ghost-associated types
-    jetlog.info("  Full list of ghosts: ")
-    for ghostdef in sorted(list(ghostdefs), key=lambda g: g.inputtype):
-        jetlog.info("    " + str(ghostdef))
-        gprereqs = getGhostPrereqs(ghostdef)
-        prereqdict["input"].update( [req.split(':',1)[1] for req in gprereqs] )
-
-    jetlog.info("  Full list of mods: ")
-    for mod, modspec in mods_final:
-        jetlog.info("    " + str(mod) + ("" if not modspec else ": \"{0}\"".format(modspec)))
-
-    # Return a dict of the dependencies, converting sets to lists.
-    # May want to further separate input deps.
-    dependencies = {
-        "inputs":  [jetdef.inputdef] + sorted(list( prereqdict["input"] )),
-        "ghosts":  list( ghostdefs ),
-        "mods":    mods_final
-        }
-
-    # We don't expand the inputs at this stage, as they are diverse
-    # and don't have a dedicated config class.
-    # Doing so may trigger another level of expansion if the inputs
-    # include a jet collection.
-    return dependencies
-    
-########################################################################
-# Function for classifying prerequisites
-#
-def classifyPrereqs(prereqs):
-    prereqdict = {}
-    for req in prereqs:
-        key,val = req.split(":",1)
-        jetlog.verbose( "Interpreted prereqs: {0} --> {1}".format(key,val) )
-        if key not in prereqdict.keys():
-            prereqdict[key] = set()
-        prereqdict[key].add(val)
-            
-    return prereqdict
-
-########################################################################
-# Function for expanding prerequisites into definitions
-# Only supporting ghosts for now, but could be extended
-#
-def expandPrereqs(reqtype,prereqs):
-    reqdefs = set()
-    from .JetDefinition import JetGhost
-    for req in prereqs:
-        if reqtype=="ghost":
-            if req.__class__ == JetGhost:
-                reqdefs.add( req )
-            else:
-                ghostdef = JetGhost(req)
-                reqdefs.add( ghostdef )
-                jetlog.debug("Expanded prereq {0} to {1}".format(req,ghostdef))
-        else:
-            jetlog.error("Prereqs \"{0}\" unsupported!".format(reqtype))
-            return None              
-    return reqdefs
-
-########################################################################
-# For each modifier in the given list with a configurable input container
-# name ("JetContainer"), configure it to containerName.
-# Also handle any container-specific configuration needed.
-def autoconfigureModifiers(modifiers, containerName):
-    for mod in modifiers:
-        if "JetContainer" in propertiesOf( mod ):
-            mod.JetContainer = containerName
-        if "DoPFlowMoments" in propertiesOf( mod ):
-            mod.DoPFlowMoments = ("PFlow" in containerName)
 
 
 ########################################################################
-# Function producing an EventShapeAlg to calculate
-# medaian energy density for pileup correction
-#
-def getEventShapeAlg( constit, constitpjkey, evsprefix="" ):
-
-    rhokey = evsprefix+"Kt4"+constit.label+"EventShape"
-    rhotoolname = "EventDensity_{}Kt4{}".format(evsprefix,constit.label)
-    
-    rhotool = CompFactory.EventDensityTool(rhotoolname)
-    rhotool.InputContainer = constitpjkey
-    rhotool.OutputContainer = rhokey
+def JetInputCfg(jetdef, configFlags, sequenceName):
+    """Function for setting up inputs to jet finding
     
-    eventshapealg = CompFactory.EventDensityAthAlg("{0}{1}Alg".format(evsprefix,rhotoolname))
-    eventshapealg.EventDensityTool = rhotool
+    This includes constituent modifications, track selection, copying of
+    input truth particles and event density calculations
+    """
 
-    return eventshapealg
-
-########################################################################
-# Function for setting up inputs to jet finding
-#
-# This includes constituent modifications, track selection, copying of
-# input truth particles and event density calculations
-def JetInputCfg(inputdeps, configFlags, sequenceName, evsprefix=""):
     jetlog.info("Setting up jet inputs.")
     components = ComponentAccumulator(sequenceName)
 
     jetlog.info("Inspecting input file contents")
-    filecontents = [i for i in configFlags.Input.Collections]
-
-    constit = inputdeps[0]
-    # Truth and track particle inputs are handled later
-    if constit.basetype not in [xAODType.TruthParticle, xAODType.TrackParticle] and constit.inputname!=constit.rawname:
-        # Protection against reproduction of existing containers
-        if constit.inputname in filecontents:
-            jetlog.debug("Input container {0} for label {1} already in input file.".format(constit.inputname, constit.label))
-        else:
-            jetlog.debug("Preparing Constit Mods for label {0} from {1}".format(constit.label,constit.inputname))
-            # May need to generate constituent modifier sequences to
-            # produce the input collection
-            from . import ConstModHelpers
-            constitalg = ConstModHelpers.getConstitModAlg(constit)
-            if constitalg:
-                components.addEventAlgo(constitalg)
+    filecontents = configFlags.Input.Collections
 
-    # Schedule the constituent PseudoJetAlg
-    constitpjalg = getConstitPJGAlg( constit )
-    constitpjkey = constitpjalg.OutputContainer
-    # Mark the constit PJGAlg as the primary so that the caller
-    # can access the output container name
-    components.addEventAlgo( constitpjalg, primary=True )
-
-    # Track selection and vertex association kind of go hand in hand, though it's not
-    # completely impossible that one might want one and not the other
-    if "JetSelectedTracks" in inputdeps or "JetTrackVtxAssoc" in inputdeps:
-        jetlog.debug("Setting up input track containers and track-vertex association")
-        from JetRecTools import JetRecToolsConfig
-        # Jet track selection
-        jettrackselloose = JetRecToolsConfig.getTrackSelTool(doWriteTracks=True)
-        jettvassoc = JetRecToolsConfig.getTrackVertexAssocTool()
-
-        jettrkprepalg = CompFactory.JetAlgorithm("jetalg_TrackPrep")
-        jettrkprepalg.Tools = [ jettrackselloose, jettvassoc ]
-        components.addEventAlgo( jettrkprepalg )
-
-    # Resolve the rest of the input dependencies
-    for dep in inputdeps[1:]:
-        # Generate prequisite truth particle collections
-        # There may be more than one.
-        if dep.startswith("JetInputTruthParticles"):
-            # Special conditions e.g. "WZ" are set as a suffix preceded by ":"
-            truthmod = ''
-            if ":" in dep:
-                truthmod = dep.split(':')[1]
-            tpcname = "truthpartcopy"+truthmod
-            jetlog.debug("Setting up input truth particle container JetInputTruthParticles{0}".format(truthmod))
-
-            from ParticleJetTools.ParticleJetToolsConfig import getCopyTruthJetParticles
-            tpc = getCopyTruthJetParticles(truthmod)
-
-            tpcalg = CompFactory.JetAlgorithm("jetalg_{0}".format(tpcname))
-            tpcalg.Tools = [tpc]
-            components.addEventAlgo(tpcalg)
-
-        # Truth particles specifically for truth labels
-        elif dep.startswith("TruthLabel"):
-            truthlabel = dep[10:]
-            tpcname = "truthpartcopy_"+truthlabel
-
-            jetlog.debug("Setting up input truth particle container TruthLabel{0}".format(truthlabel))
-            from ParticleJetTools.ParticleJetToolsConfig import getCopyTruthLabelParticles
-            tpc = getCopyTruthLabelParticles(truthlabel)
-
-            tpcalg = CompFactory.JetAlgorithm("jetalg_{0}".format(tpcname))
-            tpcalg.Tools = [tpc]
-            components.addEventAlgo(tpcalg)
-
-        # Calculate the event density for jet area subtraction taking the
-        # jet constituents as input
-        # Possibly not needed if constituent suppression has been applied.
-        # Will want to update the standalone ED python for other uses,
-        # e.g. isolation or rho from constituents that are not used to
-        # build a particular jet collection (e.g. neutral PFOs)
-        #
-        # Needs protection against reproduction of existing containers
-        elif dep == "EventDensity":
-            rhokey = "Kt4"+constit.label+"EventShape"
-            if rhokey in filecontents:
-                jetlog.info("Event density {0} for label {1} already in input file.".format(rhokey, constit.label))
+    inputdeps = [ inputkey for inputkey in jetdef._prereqOrder if inputkey.startswith('input:')]
+    
+    for inputfull in inputdeps:
+        #inputkey = inputfull[6:] # remove 'input:'
+        inputInstance = jetdef._prereqDic[inputfull]
+        from .JetDefinition import JetConstitSource
+
+        if isinstance(inputInstance, JetConstitSource):
+            if inputInstance.containername in filecontents:
+                jetlog.debug("Input container {0} for label {1} already in input file.".format(inputInstance.containername, inputInstance.name))
             else:
-                components.addEventAlgo( getEventShapeAlg(constit,constitpjkey,evsprefix) )
-
+                jetlog.debug("Preparing Constit Mods for label {0} from {1}".format(inputInstance.name,inputInstance.inputname))
+                # May need to generate constituent modifier sequences to
+                # produce the input collection
+                from . import ConstModHelpers
+                constitalg = ConstModHelpers.getConstitModAlg(inputInstance)
+                if constitalg:
+                    components.addEventAlgo(constitalg)
+        else:
+            jetlog.debug("Requesting input {} with function {} and specs {}".format(inputInstance.name, inputInstance.algoBuilder, inputInstance.specs) )
+            # inputInstance must be a JetInputDef
+            if inputInstance.algoBuilder:
+                components.addEventAlgo( inputInstance.algoBuilder( jetdef, inputInstance.specs )  )
+            else:
+                # for now just hope the input will be present... 
+                pass
     return components
 
-########################################################################
-# Functions for generating PseudoJetAlgorithms, including determining
-# the prerequisites for their operation
-#
-def getConstitPrereqs(basedef):
-    prereqs = []
-    if basedef.basetype==xAODType.TrackParticle:
-        prereqs = ["input:JetSelectedTracks","input:JetTrackVtxAssoc"]
-    elif basedef.basetype==xAODType.TruthParticle:
-        prereqs = ["input:JetInputTruthParticles:"+basedef.inputname[22:]]
-    return prereqs
-
-def getGhostPrereqs(ghostdef):
-    jetlog.verbose("Getting ghost PseudoJets of type {0}".format(ghostdef.inputtype))
-
-    prereqs = []
-    if ghostdef.inputtype=="Track":
-        prereqs = ["input:JetSelectedTracks","input:JetTrackVtxAssoc"]
-    elif ghostdef.inputtype.startswith("TruthLabel"):
-        truthsuffix = ghostdef.inputtype[5:]
-        prereqs = ["input:TruthLabel"+truthsuffix]
-    elif ghostdef.inputtype == "Truth":
-        prereqs = ["input:JetInputTruthParticles"]
-    return prereqs
-
-def getConstitPJGAlg(basedef):
-    jetlog.debug("Getting PseudoJetAlg for label {0} from {1}".format(basedef.label,basedef.inputname))
-    # 
-    full_label = basedef.label
-    if basedef.basetype == xAODType.Jet:
-        full_label += "_"+basedef.inputname
 
+def getConstitPJGAlg(constitdef):
+    """returns a configured PseudoJetAlgorithm which converts the inputs defined by constitdef into fastjet::PseudoJet"""
+    
+    jetlog.debug("Getting PseudoJetAlg for label {0} from {1}".format(constitdef.name,constitdef.inputname))
+
+    full_label = constitdef.label
+    
     pjgalg = CompFactory.PseudoJetAlgorithm(
-        "pjgalg_"+basedef.label,
-        InputContainer = basedef.inputname,
+        "pjgalg_"+constitdef.label,
+        InputContainer = constitdef.containername,
         OutputContainer = "PseudoJet"+full_label,
         Label = full_label,
         SkipNegativeEnergy=True
@@ -387,44 +153,50 @@ def getConstitPJGAlg(basedef):
     return pjgalg
 
 def getGhostPJGAlg(ghostdef):
-    label = "Ghost"+ghostdef.inputtype
-    kwargs = {
-        "OutputContainer":    "PseudoJet"+label,
-        "Label":              label,
-        "SkipNegativeEnergy": True
-        }
+    """returns a configured PseudoJetAlgorithm which converts the inputs defined by constitdef into fastjet::PseudoJet
+    
+    The difference for the above is this is dedicated to ghosts which need variations for the Label and the muon segment cases.  
+    """
+    label = "Ghost"+ghostdef.label # IMPORTANT !! "Ghost" in the label will be interpreted by teh C++ side !
+
+    kwargs = dict( 
+        InputContainer = ghostdef.containername,
+        OutputContainer=    "PseudoJet"+label,
+        Label=              label,
+        SkipNegativeEnergy= True,
+        #OutputLevel = 3,
+    )
 
     pjaclass = CompFactory.PseudoJetAlgorithm
-    if ghostdef.inputtype=="MuonSegment":
+    if ghostdef.basetype=="MuonSegment":
         # Muon segments have a specialised type
         pjaclass = CompFactory.MuonSegmentPseudoJetAlgorithm
-        kwargs = {
-            "InputContainer":"MuonSegments",
-            "OutputContainer":"PseudoJet"+label,
-            "Label":label,
-            "Pt":1e-20
-            }
-    elif ghostdef.inputtype=="Track":
-        kwargs["InputContainer"] = "JetSelectedTracks"
-    elif ghostdef.inputtype.startswith("TruthLabel"):
-        truthsuffix = ghostdef.inputtype[5:]
-        kwargs["InputContainer"] = "TruthLabel"+truthsuffix
-    elif ghostdef.inputtype == "Truth":
-        kwargs["InputContainer"] = "JetInputTruthParticles"
-    else:
-        raise ValueError("Unhandled ghost type {0} received!".format(ghostdef.inputtype))
-
-    pjgalg = pjaclass(
-        "pjgalg_"+label,
-        **kwargs
-        )
+        kwargs.update( Pt =1e-20 ) # ??,)
+        kwargs.pop('SkipNegativeEnergy')
+
+    pjgalg = pjaclass( "pjgalg_"+label, **kwargs )
     return pjgalg
 
-########################################################################
-# Function for configuring the jet algorithm and builders, given the
-# set of dependencies
-#
-def getJetAlgorithm(jetname, jetdef, pjs, modlist, monTool = None):
+
+def buildJetModifierList( jetdef ):
+    """returns the list of configured JetModifier tools needed by this jetdef.
+    This is done by instantiating the actual C++ tool as ordered in jetdef._prereqOrder
+    """
+    modlist = [ key for key in jetdef._prereqOrder if key.startswith('mod:')]
+    
+    from . import JetModConfig
+    mods = []
+    for modkey in modlist:
+        moddef = jetdef._prereqDic[modkey]
+        modkey = modkey[4:] # remove 'mod:'
+        modspec = '' if ':' not in modkey else modkey.split(':',1)[1]
+        mod = JetModConfig.getModifier(jetdef,moddef,modspec)
+        mods.append(mod)
+
+    return mods
+        
+def getJetAlgorithm(jetname, jetdef, pjContNames, monTool = None):
+    """returns a configured JetAlgorithm """
     jetlog.debug("Configuring JetAlgorithm \"jetalg_{0}\"".format(jetname))
 
     builder = getJetBuilder()
@@ -432,25 +204,72 @@ def getJetAlgorithm(jetname, jetdef, pjs, modlist, monTool = None):
     finder = getJetFinder(jetname, jetdef)
     finder.JetBuilder = builder
 
+    mods = buildJetModifierList(jetdef)
+    
+    rectool = getJetRecTool(jetname,finder,pjContNames,mods)
+    if monTool: rectool.MonTool = monTool
+
+    jetalg = CompFactory.JetAlgorithm("jetalg_"+jetname)
+    jetalg.Tools = [rectool]
+
+    return jetalg
+
+########################################################################
+# Function that substitues JetRecTool + JetAlgorithm
+#
+def getJetRecAlg(jetname, jetdef, pjContNames, modlist):
+
+    jclust = CompFactory.JetClusterer("builder")
+    jclust.JetAlgorithm = jetdef.algorithm
+    jclust.JetRadius = jetdef.radius
+    jclust.PtMin = jetdef.ptmin
+    jclust.InputPseudoJets = pjContNames
+    jclust.GhostArea = 0.01 # In which cases do we not want areas?
+    jclust.JetInputType = jetdef.inputdef.basetype
+
     from . import JetModConfig
     mods = []
     for moddef,modspec in modlist:
         mod = JetModConfig.getModifier(jetdef,moddef,modspec)
         mods.append(mod)
 
-    rectool = getJetRecTool(jetname,finder,pjs,mods)
-    if monTool: rectool.MonTool = monTool
+    jra = CompFactory.JetRecAlg(
+        "jetrecalg_"+jetname,
+        Provider = jclust,
+        Modifiers = mods,
+        OutputContainer = jetname)
 
-    jetalg = CompFactory.JetAlgorithm("jetalg_"+jetname)
-    jetalg.Tools = [rectool]
+    autoconfigureModifiers(jra.Modifiers, jetname)
+
+    return jra
 
-    return jetalg
 
 ########################################################################
-# Function for generating a jet builder, i.e. converter from
-# fastjet EDM to xAOD EDM
-#
+# For each modifier in the given list with a configurable input container
+# name ("JetContainer"), configure it to containerName.
+# Also handle any container-specific configuration needed.
+def autoconfigureModifiers(modifiers, containerName):
+    for mod in modifiers:
+        if "JetContainer" in propertiesOf( mod ):
+            mod.JetContainer = containerName
+        if "DoPFlowMoments" in propertiesOf( mod ):
+            mod.DoPFlowMoments = ("PFlow" in containerName)
+
+
+def propertiesOf(comp):
+    """ Obtain properties irrespectively of the config system"""
+    try:
+        propNames = comp._descriptors
+        return propNames
+    except Exception: 
+        pass
+    return comp.properties()
+            
+########################################################################
 def getJetBuilder(doArea=True):
+    """Returns  a jet builder (JetFromPseudojet) , i.e. converter from
+    fastjet EDM to xAOD EDM
+    """
     # Do we have any reasons for not using the area one?
     # Maybe CPU reduction if we don't need areas for calibration
     builder = CompFactory.JetFromPseudojet("jetbuild")
@@ -459,9 +278,9 @@ def getJetBuilder(doArea=True):
     return builder
 
 ########################################################################
-# Function for generating a jet finder, i.e. interface to fastjet
 #
 def getJetFinder(jetname, jetdef):
+    """Creates a jet finder, i.e. interface to fastjet"""
     finder = CompFactory.JetFinder("jetfind_"+jetname,
         JetAlgorithm = jetdef.algorithm,
         JetRadius = jetdef.radius,
@@ -485,6 +304,107 @@ def getJetRecTool(jetname, finder, pjs, mods):
     return jetrec
 
 
+
+def instantiateAliases( jetdef ):
+    """ Instantiate all the aliases contained in this jetdef : modifiers, ghosts and prereqs.
+    At the same time fills the internal _prereqDic and _prereqOrder containers.
+    
+    This functions 
+      * assumes jetdef is not 'locked' 
+      * implies calls to recursives function constH.aliasToInputDef and modH.aliasToModDef
+    """
+
+    # start with the inputdef (replacing the jetdef attribute to ensure it really is an instance, not only a str)
+    jetdef.inputdef = constH.aliasToInputDef(jetdef.inputdef, jetdef)
+
+    jetdef._prereqDic['input:'+jetdef.inputdef.name] = jetdef.inputdef
+    jetdef._prereqOrder.append('input:'+jetdef.inputdef.name)
+
+    for g in jetdef.extrainputs:
+        gInstance = constH.aliasToInputDef( g , jetdef)
+        jetdef._prereqDic['input:'+g] = gInstance
+        jetdef._prereqOrder.append('input:'+g)
+    
+    for g in jetdef.ghostdefs:
+        gInstance = constH.aliasToInputDef( g , jetdef)
+        jetdef._prereqDic['input:'+g] = gInstance
+        jetdef._prereqOrder.append('input:'+g)
+        jetdef._prereqDic['ghost:'+g] = gInstance
+        jetdef._prereqOrder.append('ghost:'+g)
+
+    for mod in jetdef.modifiers:
+        modInstance = modH.aliasToModDef(mod, jetdef)
+        jetdef._prereqDic['mod:'+mod] = modInstance
+        jetdef._prereqOrder.append('mod:'+mod)
+
+    # Deduplicate the prereq (with python > 3.6 dict is ordered so the trick is guaranteed to work) :
+    jetdef._prereqOrder[:] = list(dict.fromkeys(jetdef._prereqOrder) )
+
+
+    
+            
+def removeComponentFailingConditions(jetdef, configflags, raiseOnFailure=True):
+    """Filters the lists jetdef.modifiers and jetdef.ghosts (and jetdef._prereqOrder), so only the components
+    comptatible with configflags are selected. 
+    The compatibility is ultimately tested using the component 'filterfn' attributes.
+    Internally calls the function isComponentPassingConditions() (see below) 
+    """
+    jetlog.info("******************")
+    jetlog.info("Standard Reco mode : filtering components in "+str(jetdef))
+
+
+    ## TODO :
+    ## do not raise an exceptin immediately. Instead collect all failure
+    ## then report all of them, then raise
+    
+    # define a helper function returning a filtered list of components.
+    def filterList(inList, compType):
+        nOut=0
+        outList=[]
+        # loop over components in the list to be filtered
+        for comp in inList:
+            fullkey = compType+':'+comp
+            cInstance = jetdef._prereqDic[fullkey]
+            ok, reason = isComponentPassingConditions(cInstance, configflags, jetdef._prereqDic)
+            if not ok :
+                if raiseOnFailure:
+                    raise Exception("JetDefinition {} can NOT be scheduled. Failure  of {} {}  reason={}".format(
+                        jetdef, compType, comp, reason) )
+                
+                nOut+=1
+                jetlog.info("IMPORTANT : removing {}  {}  reason={} ".format(compType, comp, reason))
+                jetdef._prereqOrder.remove(fullkey)
+            else:
+                outList.append(comp)
+        jetlog.info(" *** Number of {} filtered components = {}  final  list={}".format(compType, nOut, outList) )
+        return outList
+    # ---------
+    
+    # call the helper function to perform filtering :
+    jetdef.ghostdefs = filterList( jetdef.ghostdefs, "ghost")
+    jetdef.modifiers = filterList( jetdef.modifiers, "mod")
+
+def isComponentPassingConditions(component, configflags, prereqDic):
+    """Test if component is compatible with configflags.
+    This is done by calling component.filterfn AND testing all its prereqs.
+    """
+    from .JetDefinition import JetModifier, JetConstitModifier
+    if isinstance(component, (JetModifier, JetConstitModifier)):
+        for req in component.prereqs:
+            if req not in prereqDic:
+                return False, "prereq "+req+" not available"
+            reqInstance = prereqDic[req]
+            ok, reason = isComponentPassingConditions(reqInstance, configflags, prereqDic)
+            if not ok :
+                return False, "prereq "+str(component)+" failed."
+
+    ok, reason = component.filterfn(configflags)
+    return ok, reason
+    
+    
+
+
+
 if __name__=="__main__":
 
     # Setting needed for the ComponentAccumulator to do its thing
@@ -518,32 +438,3 @@ if __name__=="__main__":
 
     import sys
     sys.exit(0)
-
-########################################################################
-# Function that substitues JetRecTool + JetAlgorithm
-#
-def getJetRecAlg(jetname, jetdef, pjs, modlist):
-
-    jclust = CompFactory.JetClusterer("builder")
-    jclust.JetAlgorithm = jetdef.algorithm
-    jclust.JetRadius = jetdef.radius
-    jclust.PtMin = jetdef.ptmin
-    jclust.InputPseudoJets = pjs
-    jclust.GhostArea = 0.01 # In which cases do we not want areas?
-    jclust.JetInputType = jetdef.inputdef.basetype
-
-    from . import JetModConfig
-    mods = []
-    for moddef,modspec in modlist:
-        mod = JetModConfig.getModifier(jetdef,moddef,modspec)
-        mods.append(mod)
-
-    jra = CompFactory.JetRecAlg(
-        "jetrecalg_"+jetname,
-        Provider = jclust,
-        Modifiers = mods,
-        OutputContainer = jetname)
-
-    autoconfigureModifiers(jra.Modifiers, jetname)
-
-    return jra
diff --git a/Reconstruction/Jet/JetRecConfig/python/StandardJetConstits.py b/Reconstruction/Jet/JetRecConfig/python/StandardJetConstits.py
new file mode 100644
index 000000000000..13005ce8aa2e
--- /dev/null
+++ b/Reconstruction/Jet/JetRecConfig/python/StandardJetConstits.py
@@ -0,0 +1,204 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+"""
+ StandardJetConstits: A module defining standard definitions for jet  constituents.
+ These can be copied and modified by users who want something a bit   
+ different from what is provided.                                     
+                                                                      
+ Author: TJ Khoo, P-A Delsart                                                      
+ * Written for the time being to work in R21, but with R22 in mind    
+                                                                      
+
+"""
+
+########################################################################
+from .JetDefinition import xAODType,  JetConstitSeq, JetInputDef, JetConstitModifier, JetConstitSource
+
+
+# Prepare dictionnaries to hold all of our standard definitions.
+# They will be filled from the list below
+from .Utilities import ldict
+jetconstitdic = ldict()
+jetconstitmoddic = ldict()
+jetinputdefdic = ldict()
+
+
+# This module contains the helper functions needed to instantiate the input container external
+# to Jet domain
+import JetRecConfig.JetInputConfig as inputcfg
+
+def _isMCTrue(flags):
+    """A simple filter function for  testing if we're running in MC
+    (probably worth re-allocating somehere else)"""
+    return flags.Input.isMC, "Not MC input"
+
+
+########################################################################
+## List of standard input sources for jets.
+
+_stdInputList = [
+    # Format is :
+    # JetInputDef( containername , containerType, ...optionnal parameters... )
+
+    # *****************************
+    JetInputDef("CaloCalTopoClusters", xAODType.CaloCluster),
+
+    # *****************************
+    JetInputDef("JetETMissParticleFlowObjects", xAODType.ParticleFlow),
+
+    # *****************************
+    JetInputDef("JetSelectedTracks",  xAODType.TrackParticle, algoBuilder = inputcfg.buildJetSelectedTracks),
+    JetInputDef("JetTrackVtxAssoc",   xAODType.TrackParticle, algoBuilder = inputcfg.buildJetTrackVertexAssoc),
+
+    # *****************************
+    JetInputDef("EventDensity", "EventShape", algoBuilder = inputcfg.buildEventShapeAlg,
+                prereqs = lambda jetdef : ["input:"+jetdef.inputdef.name] # this will force the input to be build *before* the EventDensity alg.
+    ),
+    JetInputDef("HLT_EventDensity", "EventShape", algoBuilder = inputcfg.buildEventShapeAlg,
+                prereqs = lambda jetdef : ["input:"+jetdef.inputdef.name], # this will force the input to be build *before* the EventDensity alg.
+                specs = 'HLT_'
+    ),
+
+    # *****************************
+    JetInputDef("MuonSegments", "MuonSegment",),
+
+
+    # *****************************
+    # Truth particles from the hard scatter vertex prior to Geant4 simulation.
+    # Neutrinos and muons are omitted; all other stable particles are included.
+    JetInputDef("JetInputTruthParticles",  xAODType.TruthParticle,
+                algoBuilder = inputcfg.buildJetInputTruth, filterfn=_isMCTrue ),
+
+    # Truth particles from the hard scatter vertex prior to Geant4 simulation.
+    # Prompt electrons, muons and neutrinos are excluded, all other stable particles
+    # are included, in particular leptons and neutrinos from hadron decays.
+    JetInputDef("JetInputTruthParticlesNoWZ",  xAODType.TruthParticle,
+                algoBuilder = inputcfg.buildJetInputTruth, filterfn=_isMCTrue,specs="NoWZ"),
+]
+
+
+_truthFlavours = ["BHadronsInitial", "BHadronsFinal", "BQuarksFinal",
+               "CHadronsInitial", "CHadronsFinal", "CQuarksFinal",
+               "TausFinal",
+               "WBosons", "ZBosons", "HBosons", "TQuarksFinal",
+               "Partons",]
+for label in  _truthFlavours:    
+    # re-use the main truth input definition : 
+    _stdInputList.append( JetInputDef("TruthLabel"+label, xAODType.TruthParticle,
+                                      algoBuilder = inputcfg.buildLabelledTruth,
+                                      filterfn=_isMCTrue, specs = label ) )
+
+
+
+# Fill the jetinputdefdic from the above list 
+for ji in _stdInputList:
+    ji._locked = True # lock the definitions so we have unmutable references !
+    jetinputdefdic[ji.name] = ji
+
+
+
+
+
+########################################################################
+## List of standard constituent modifiers 
+
+def _getPFOTool(constitSeq):
+    """One Property of the CorrectPFO constit modifier is a tool. 
+    we use this function as a placeholder, allowing to delay the intantiation of this property tool
+    to the time the modifier itself is instantiated.
+    """
+    from AthenaConfiguration.ComponentFactory import CompFactory
+    return CompFactory.getComp("CP::WeightPFOTool")("weightPFO")
+    
+
+vtxKey = "PrimaryVertices"
+tvaKey = "JetTrackVtxAssoc"
+_stdModList = [
+    # Format is :
+    # JetConstitModifier( name , toolType, dictionnary_of_tool_properties )
+    # (see JetDefinition.py for more details)
+    
+    JetConstitModifier("Origin", "CaloClusterConstituentsOrigin", ),
+    JetConstitModifier("EM",     "ClusterAtEMScaleTool", ),
+    JetConstitModifier("LC",     "", ),
+    # Particle flow
+    JetConstitModifier("CorrectPFO", "CorrectPFOTool",
+                       dict(VertexContainerKey=vtxKey,
+                            WeightPFOTool= _getPFOTool ) ), 
+              
+    JetConstitModifier("CHS",    "ChargedHadronSubtractionTool",
+                       dict(VertexContainerKey=vtxKey, TrackVertexAssociation=tvaKey) ),
+    
+    # Pileup suppression
+    JetConstitModifier("Vor",    "VoronoiWeightTool", dict(doSpread=False, nSigma=0) ),
+    JetConstitModifier("CS",     "ConstituentSubtractorTool", dict(MaxEta=5. ) ),
+    JetConstitModifier("SK",     "SoftKillerWeightTool",),
+                           
+]
+
+# Fill the jetconstitmoddic from the above list 
+for ji in _stdModList:
+    ji._locked = True
+    jetconstitmoddic[ji.name] = ji
+    
+
+    
+
+
+
+## ***************************************
+## List of standard constituent sequences
+##  This sequences uses the above constit modifiers     
+_stdSeqList = [
+    # Format is :
+    # JetConstitSeq( name , input_cont_type, list_of_modifiers, inputcontainer, outputcontainer )
+    # or
+    # JetConstitSource( name, input_cont_type, containername)
+    # see JetDefinition.py for details.
+
+    # *****************************
+    # Cluster constituents 
+    JetConstitSeq("EMTopoOrigin", xAODType.CaloCluster, ["EM","Origin"], "CaloCalTopoClusters", "EMOriginTopoClusters"),
+    JetConstitSeq("LCTopoOrigin",xAODType.CaloCluster, ["LC","Origin"],"CaloCalTopoClusters", "LCOriginTopoClusters"),
+    JetConstitSeq("LCTopoCSSK",  xAODType.CaloCluster, ["LC","Origin","CS","SK"],"CaloCalTopoClusters", "LCOriginTopoCSSK"),
+    
+
+
+    
+    # *****************************
+    # EM-scale particle flow objects with charged hadron subtraction
+    # For now we don't specify a scale, as only one works well, but
+    # this could be incorporated into the naming scheme and config
+    JetConstitSeq("EMPFlow", xAODType.ParticleFlow,["CorrectPFO", "CHS"] , 'JetETMissParticleFlowObjects', 'CHSParticleFlowObjects'),
+
+    # Particle Flow Objects with Constituent Subtraction + SoftKiller
+    JetConstitSeq("EMPFlowCSSK", xAODType.ParticleFlow,["CorrectPFO",  "CS","SK", "CHS"] , 'JetETMissParticleFlowObjects', 'CSSKParticleFlowObjects'),
+
+
+    # *****************************
+    # Track constituents
+    JetConstitSource("Track", xAODType.TrackParticle,'JetSelectedTracks'),
+    
+    # Track particles from the primary vertex
+    JetConstitSeq("PV0Track", xAODType.TrackParticle,["PV0"],'JetSelectedTracks', 'PV0JetSelectedTracks',
+                prereqs= ["input:JetTrackVtxAssoc"], ),
+
+    # *****************************
+    # Muon segments. Only used as ghosts
+    JetConstitSource("MuonSegment", "MuonSegment", "MuonSegments" ),
+
+    
+    # *****************************
+    # Truth particles (see JetInputDef declarations above for more details)
+    JetConstitSource("Truth", xAODType.TruthParticle, "JetInputTruthParticles" ),
+    
+    JetConstitSource("TruthWZ", xAODType.TruthParticle, "JetInputTruthParticlesNoWZ" ),
+]
+
+for label in  _truthFlavours:    
+    _stdSeqList.append( JetConstitSource(label, xAODType.TruthParticle, "TruthLabel"+label ) )
+
+# Fill the jetconstitdic from the above list 
+for jc in _stdSeqList:
+    jc._locked = True
+    jetconstitdic[jc.name] = jc
diff --git a/Reconstruction/Jet/JetRecConfig/python/StandardJetMods.py b/Reconstruction/Jet/JetRecConfig/python/StandardJetMods.py
index 3606cd15440f..a0f3d4017a99 100644
--- a/Reconstruction/Jet/JetRecConfig/python/StandardJetMods.py
+++ b/Reconstruction/Jet/JetRecConfig/python/StandardJetMods.py
@@ -1,25 +1,28 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+"""
+This module defines the standard JetModifier tools used in jet reco
 
+Definitions are grouped in a dictionary of tool configurations using the helpers defined
+in package configs.
+This dict maps a modifier alias to the JetModifier config object
+that in turn will be responsible for generating a configured tool.
+
+The JetModifier config class is defined in JetDefinition.py 
+[Optional] Args to the JetModifier constructor are:
+   1. Tool Type (ignored if the helper is a custom one)
+   2. Tool Name (ignored if the helper is a custom one)
+  [3.] Config helper
+  [4.] Prereqs (default to []). Can also be a function.
+  [5.] Flag passJetDef specifying if the helper needs the jet definition
+        --> should this be by default? prefer to avoid ignored args
+"""
 from .JetDefinition import JetModifier
 
-########################################################################
-# Define the dictionary of tool configurations using the helpers defined
-# in package configs.
-# This dict maps a modifier alias to the JetModifier config object
-# that in turn will be responsible for generating a configured tool.
-#
-# [Optional] Args to the JetModifier constructor are:
-#    1. Tool Type (ignored if the helper is a custom one)
-#    2. Tool Name (ignored if the helper is a custom one)
-#   [3.] Config helper
-#   [4.] Prereqs (default to []). Can also be a function.
-#   [5.] Flag passJetDef specifying if the helper needs the jet definition
-#         --> should this be by default? prefer to avoid ignored args
 jetmoddict = {}
 
 ########################################################################
 # Define the simple modifier setups here -- those defined in JetRec.
-#from JetRec import JetRecConf
+
 from AthenaConfiguration.ComponentFactory import CompFactory
 def getJetFilterTool(modspec):
     threshold = int(modspec)
@@ -28,7 +31,7 @@ def getJetFilterTool(modspec):
     return jetptfilter
 jetrecmods = {
     "Sort":   JetModifier("JetSorter","jetsort"),
-    "Filter": JetModifier("JetFilterTool","jetptfilter",helperfn=getJetFilterTool),
+    "Filter": JetModifier("JetFilterTool","jetptfilter",createfn=getJetFilterTool),
 }
 jetmoddict.update (jetrecmods)
 
@@ -42,7 +45,7 @@ jetmoddict.update (jetrecmods)
 from JetCalibTools import JetCalibToolsConfig
 jetcalibmods = {
     "Calib": JetModifier("JetCalibrationTool","jetcalib_jetcoll_calibseq",
-                         helperfn=JetCalibToolsConfig.getJetCalibToolFromString,
+                         createfn=JetCalibToolsConfig.getJetCalibToolFromString,
                          prereqs=JetCalibToolsConfig.getJetCalibToolPrereqs,passJetDef=True)
     }
 jetmoddict.update(jetcalibmods)
@@ -55,6 +58,7 @@ jetmoddict.update(jetcalibmods)
 # Standard jet moments
 from JetMomentTools import JetMomentToolsConfig
 jetmomentmods = {
+
     # Easy cases, no special config or prereqs, just default tool config
     "ClusterMoments":  JetModifier("JetClusterMomentsTool", "clsmoms"),
     "ECPSFrac":        JetModifier("JetECPSFractionTool", "ecpsfrac"),
@@ -62,32 +66,34 @@ jetmomentmods = {
 
     # More complex cases here
     "CaloEnergies":    JetModifier("JetCaloEnergies", "jetens",
-                                   prereqs=["mod:EMScaleMom"]),
+                                   prereqs=["mod:EMScaleMom"]
+    ),
     "CaloQuality":     JetModifier("JetCaloQualityTool", "caloqual",
-                                   helperfn=JetMomentToolsConfig.getCaloQualityTool),
+                                   createfn=JetMomentToolsConfig.getCaloQualityTool),
     "ConstitFourMom":  JetModifier("JetConstitFourMomTool", "constitfourmom_basename",
-                                   helperfn=JetMomentToolsConfig.getConstitFourMomTool,
+                                   createfn=JetMomentToolsConfig.getConstitFourMomTool,
                                    passJetDef=True),
     "EMScaleMom":      JetModifier("JetEMScaleMomTool", "emscalemom_basename",
-                                   helperfn=JetMomentToolsConfig.getEMScaleMomTool,
+                                   createfn=JetMomentToolsConfig.getEMScaleMomTool,
                                    passJetDef=True),
     "JVF":             JetModifier("JetVertexFractionTool", "jvf",
-                                   helperfn=JetMomentToolsConfig.getJVFTool,
+                                   createfn=JetMomentToolsConfig.getJVFTool,
                                    prereqs = ["mod:TrackMoments"] ),
     "JVT":             JetModifier("JetVertexTaggerTool", "jvt",
-                                   helperfn=JetMomentToolsConfig.getJVTTool,
+                                   createfn=JetMomentToolsConfig.getJVTTool,
                                    prereqs = [ "mod:JVF" ]),
     "LArHVCorr":       JetModifier("JetLArHVTool", "larhvcorr",
                                    prereqs = ["mod:EMScaleMom"]),
     "OriginSetPV":     JetModifier("JetOriginCorrectionTool", "origin_setpv",
                                    prereqs = [ "mod:JVF" ]),
     "TrackMoments":    JetModifier("JetTrackMomentsTool", "trkmoms",
-                                   helperfn=JetMomentToolsConfig.getTrackMomentsTool,
-                                   prereqs = [ "input:JetSelectedTracks","input:JetTrackVtxAssoc","ghost:Track" ]),
+                                   createfn=JetMomentToolsConfig.getTrackMomentsTool,
+                                   prereqs = [ "input:JetTrackVtxAssoc","ghost:Track" ]),
+
     "TrackSumMoments": JetModifier("JetTrackSumMomentsTool", "trksummoms",
-                                   helperfn=JetMomentToolsConfig.getTrackSumMomentsTool,
-                                   prereqs = [ "input:JetSelectedTracks","input:JetTrackVtxAssoc","ghost:Track" ]),
-    }
+                                   createfn=JetMomentToolsConfig.getTrackSumMomentsTool,
+                                   prereqs = [ "input:JetTrackVtxAssoc","ghost:Track" ]),
+}
 jetmoddict.update(jetmomentmods)
 
 # Truth labelling moments
@@ -95,16 +101,16 @@ from ParticleJetTools import ParticleJetToolsConfig
 particlejetmods = {
     # Easy cases, no special config or prereqs, just default tool config
     "PartonTruthLabel": JetModifier("Analysis::JetPartonTruthLabel","partontruthlabel",
-                                    prereqs=["ghost:TruthLabelPartons"]),
+                                    prereqs=["ghost:Partons"]),
 
     # More complex cases here
     "TruthPartonDR":    JetModifier("Analysis::JetConeLabeling","truthpartondr",
-                                    helperfn=ParticleJetToolsConfig.getJetConeLabeling),
+                                    createfn=ParticleJetToolsConfig.getJetConeLabeling),
     "JetDeltaRLabel":   JetModifier("ParticleJetDeltaRLabelTool","jetdrlabeler_jetptmin",
-                                    helperfn=ParticleJetToolsConfig.getJetDeltaRLabelTool,
-                                    prereqs=["input:TruthLabelBHadronsFinal",
-                                             "input:TruthLabelCHadronsFinal",
-                                             "input:TruthLabelTausFinal"])
+                                    createfn=ParticleJetToolsConfig.getJetDeltaRLabelTool,
+                                    prereqs=["ghost:BHadronsFinal",
+                                             "ghost:CHadronsFinal",
+                                             "ghost:TausFinal"])
     }
 jetmoddict.update(particlejetmods)
 
@@ -112,3 +118,15 @@ jetmoddict.update(particlejetmods)
 
 # This can also be expanded by users if they would rather do this than
 # pass in JetModifier instances in the JetDefinition
+
+
+## TEMPORARY HACK (change the names of ghost tracks )
+from JetRecTools.JetRecToolsConfig import trackcollectionmap
+trackcollectionmap[""] =  {
+    "Tracks":           "InDetTrackParticles",
+    "JetTracks":        "JetSelectedTracks",
+    "Vertices":         "PrimaryVertices",
+    "TVA":              "JetTrackVtxAssoc",
+    "GhostTracks":      "PseudoJetGhostTrack",
+    "GhostTracksLabel": "GhostTrack",
+    }
diff --git a/Reconstruction/Jet/JetRecConfig/python/StandardSmallRJets.py b/Reconstruction/Jet/JetRecConfig/python/StandardSmallRJets.py
new file mode 100644
index 000000000000..54f83e59704a
--- /dev/null
+++ b/Reconstruction/Jet/JetRecConfig/python/StandardSmallRJets.py
@@ -0,0 +1,79 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+from JetRecConfig.StandardJetConstits import jetconstitdic as cst
+from .JetDefinition import  JetDefinition
+from xAODBase.xAODType import xAODType
+
+
+
+# *********************************************************
+# Ghost-associated particles for the standard small R jets 
+# *********************************************************
+standardghosts =  ["Track","MuonSegment","Truth"]
+
+
+flavourghosts = ["TruthLabel"+ghosttype  for ghosttype in [
+    "BHadronsInitial", "BHadronsFinal", "BQuarksFinal",
+    "CHadronsInitial", "CHadronsFinal", "CQuarksFinal",
+    "TausFinal",
+    "WBosons", "ZBosons", "HBosons", "TQuarksFinal",
+    "Partons",]
+]
+
+
+
+
+# *********************************************************
+# Modifiers for the standard small R jets 
+# *********************************************************
+# (use tuples rather than lists to prevent accidental modification)
+standardrecomods = ( "Filter:10000","Width","TrackMoments","TrackSumMoments","JVF","JVT","OriginSetPV",
+                    "CaloEnergies", )
+clustermods      = ("ECPSFrac","ClusterMoments",)# "LArHVCorr" )
+truthmods        =  ("PartonTruthLabel","TruthPartonDR","JetDeltaRLabel:5000"  ) # not working well yet ?
+pflowmods        = ()
+
+
+
+# *********************************************************
+# Standard small R jets definitions
+# *********************************************************
+
+
+AntiKt4EMPFlow = JetDefinition("AntiKt",0.4,cst.EMPFlow,
+                               ghostdefs = standardghosts , # not working well yet : flavourghosts,
+                               modifiers = ("Calib:T0:mc",)+standardrecomods+truthmods, 
+                               standardRecoMode = True,                               
+                               lock = True
+)
+
+
+
+
+
+AntiKt4LCTopo = JetDefinition("AntiKt",0.4,cst.LCTopoOrigin,
+                              ghostdefs = standardghosts, # not working well yet : flavourghosts,,
+                              modifiers = standardrecomods+truthmods+clustermods,
+                              standardRecoMode = True,
+                              lock = True,
+)
+
+
+AntiKt4EMTopo = JetDefinition("AntiKt",0.4,cst.EMTopoOrigin,
+                              ghostdefs = standardghosts, # not working well yet : flavourghosts,,
+                              modifiers = standardrecomods+truthmods+clustermods,
+                              standardRecoMode = True,
+                              lock = True,
+)
+
+AntiKt4Truth = JetDefinition("AntiKt",0.4, cst.Truth,
+                              modifiers = [],
+                              standardRecoMode = True,
+                              lock = True,
+)
+
+AntiKt4TruthWZ = JetDefinition("AntiKt",0.4, cst.TruthWZ,
+                               modifiers = [],
+                               standardRecoMode = True,
+                               lock = True,
+)
diff --git a/Reconstruction/Jet/JetRecConfig/python/Utilities.py b/Reconstruction/Jet/JetRecConfig/python/Utilities.py
new file mode 100644
index 000000000000..9769877e09a9
--- /dev/null
+++ b/Reconstruction/Jet/JetRecConfig/python/Utilities.py
@@ -0,0 +1,137 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+
+"""
+This module defines utilities for the jet config.
+These are mainly to allow to "lock" the standard, reference definitions so
+they are not accidentally changed by some user scripts.
+"""
+
+class lproperty(property):
+    """Build on the standard property to allow a property to be locked if the holding class has its _locked attribute set to True """
+    def lsetter(self, func):
+        def lockedfunc(self, v):
+            if self._locked:
+                raise Exception("Error "+func.__name__+" is locked. Either clone or unlock",self)
+            func(self,v)
+        
+        return self.setter(lockedfunc)
+
+def make_lproperty( func  ):
+    """creates a property from a class method (or a str) which can be locked if the holding class has its _locked attribute set to True
+
+    usage : 
+    class A:
+        # simple locked property
+        x = make_lproperty('x')
+
+        # same but using decorator
+        @make_lproperty
+        def y(self): pass       
+
+        # same but now with customized setter :
+        @make_lproperty
+        def z(self): pass
+        @z.lsetter
+        def z(self, v):
+            print("setting z to ",v)
+            self._z = v
+
+    """
+    if isinstance(func, str):
+        pname = func
+    else:
+        pname = func.__name__
+    pname_i =  '_'+pname
+       
+    def _getter(self):
+        return getattr(self,pname_i, None)
+    def _setter(self, v):
+        if self._locked:            
+            raise AttributeError("Error property '"+pname+"' is locked. Either clone or unlock",self)
+        setattr(self, pname_i, v)
+    return lproperty(_getter, _setter)
+
+def make_alias( prop  ):
+    """Returns a property which act as a read-only alias to existing prop """
+    def _getter(self):
+        return getattr(self,prop,None)
+    def _setter(self,v):
+        raise AttributeError("Cannot set alias "+pname+" from "+str(self) )
+    return property(_getter, _setter)
+
+def listClassLProperties(cls):
+    lprops = [k for (k,v) in cls.__dict__.items() if isinstance(v,lproperty) ]
+    lprops +=[ '_'+k for k in lprops]
+    for base in cls.__bases__:
+        lprops += listClassLProperties(base)
+    return lprops
+    
+def onlyAttributesAreProperties(cls):
+    """Transforms the input class cls so the only attributes which can be set are the lproperty of the class.
+    Best used as a decorator. Ex : 
+    @onlyAttributesAreProperties
+    class A:
+        myprop0 = make_lproperty('myprop0')
+    
+    a = A()
+    a.myprop0 = 0 # ok 
+    a.mypropO = 3 # impossible
+    """
+    # build the list of attributes allowed to be set : these are the properties and _locked
+    #cls._allowedattributes = [k for (k,v) in cls.__dict__.items() if isinstance(v,lproperty) ]
+    #cls._allowedattributes +=[ '_'+k for k in cls._allowedattributes]
+    cls._allowedattributes = listClassLProperties( cls )
+    cls._allowedattributes += ['_locked']
+
+    # flag to activate the prevention of adding new attributes. we set it at the end of __init__ 
+    cls._nomoreattributes=False
+    cls._locked = False
+    
+    cls.__init__origin = cls.__init__ 
+    
+    # define a new __init__ for this class.
+    # the 'finalinit' argument allows to avoid locking the allowed attribute : this is to be used when a derived class wants to call the init of it's base class.
+    def initwraper(self, *l,finalinit=True, **args):
+        cls.__init__origin(self, *l,**args)
+        self._nomoreattributes = finalinit
+    cls.__init__ = initwraper
+        
+    # define a __setattr__ for this class
+    def setattr(self, k, v):
+        if self._nomoreattributes and k not in self._allowedattributes:
+            raise AttributeError("Setting attribute "+k+" on "+str(self)+" not allowed")
+        super(cls,self).__setattr__(k,v)        
+    cls.__setattr__ = setattr
+
+    return cls
+
+def clonable(cls):
+    """Transforms the input class cls by adding a clone() method. 
+    This clone() method returns a clone instance with a _locked attribute set to False by default (so the clone is modifiable) """
+    def clone(self, lock=False, **args):
+        from copy import deepcopy
+        o = deepcopy(self)
+        o._locked = False # unlock so we can modfiy the clone with user given arguments
+        for k,v in args.items():
+            setattr(o,k,v)
+        o._locked = lock
+        return o
+    cls.clone = clone
+    return cls
+
+
+class ldict(dict):
+    """A dictionnary which items can not be modified once set.
+
+    Also its items are attributes (Main/only motivation : easier interactive inspection)
+    """
+    def __setitem__(self, k, v):
+        if k in self:
+            raise KeyError("Can't override key "+k)
+        super().__setitem__(k,v)
+        super().__setattr__(k,v)
+
+    def update(self, **args): # we need to redefine it
+        for k,v in args.items():
+            self[k]=v
diff --git a/Reconstruction/Jet/JetRecConfig/share/JetRecTestCfg.py b/Reconstruction/Jet/JetRecConfig/share/JetRecTestCfg.py
index 11f94e75234c..7e9d703797e9 100755
--- a/Reconstruction/Jet/JetRecConfig/share/JetRecTestCfg.py
+++ b/Reconstruction/Jet/JetRecConfig/share/JetRecTestCfg.py
@@ -20,7 +20,7 @@ def JetRecTestCfg(jetdefs,configFlags,args):
         jetlog.info("Printing component accumulators for each jet collection")
     jetcas = []
     for jetdef in jetdefs:
-       jetcomps = JetRecConfig.JetRecCfg(jetdef,configFlags,jetnameprefix="New")
+       jetcomps = JetRecConfig.JetRecCfg(jetdef,configFlags)
        if args.printAccumulators:
            jetcomps.printConfig(withDetails=args.verboseAccumulators,summariseProps=True)
        jetcas.append(jetcomps)
@@ -35,75 +35,62 @@ def JetRecTestCfg(jetdefs,configFlags,args):
 
 def DefineJetCollections(configFlags):
 
-    # Here we define the jet configurations we want to build
-    # These mod and ghost lists should go in a common module
-    standardrecomods = ["Width","TrackMoments","TrackSumMoments","JVF","JVT","OriginSetPV",
-                        "CaloEnergies","LArHVCorr"]
-    clustermods = ["ECPSFrac","ClusterMoments"]
-    truthmods = ["PartonTruthLabel","TruthPartonDR","JetDeltaRLabel:5000"] if configFlags.Input.isMC else []
-
-    from JetRecConfig.JetDefinition import JetGhost
-    ghostlist = ["Track","MuonSegment","Truth"]
-    standardghosts = [JetGhost(ghosttype) for ghosttype in ghostlist]
-    flavourghostlist = ["BHadronsInitial", "BHadronsFinal", "BQuarksFinal",
-                        "CHadronsInitial", "CHadronsFinal", "CQuarksFinal",
-                        "TausFinal",
-                        "WBosons", "ZBosons", "HBosons", "TQuarksFinal",
-                        "Partons",
-                        ]
-    flavourghosts = [JetGhost("TruthLabel"+ghosttype) for ghosttype in flavourghostlist]
-    standardghosts += flavourghosts
-
     ########################################################################
     # First a demonstration of just building jets using standard definitions
-    from JetRecConfig.StandardJetDefs import AntiKt4EMTopo, AntiKt4EMPFlow, AntiKt4Truth, AntiKt4TruthWZ
+    from JetRecConfig.StandardSmallRJets import AntiKt4EMTopo, AntiKt4EMPFlow, AntiKt4Truth, AntiKt4TruthWZ
 
-    # This updates the original jet definitions, so might be a little risky
-    # in derivation code. Safer would be to always deepcopy into a local variable.
-    AntiKt4EMTopo.ptminfilter = 15e3
-    AntiKt4EMTopo.modifiers = ["Calib:T0:mc","Sort"] + standardrecomods + clustermods + truthmods
-    AntiKt4EMTopo.ghostdefs = standardghosts
-    #AntiKt4EMTopo.modifiers = ["Calib:AnalysisLatest:mc"]
 
-    AntiKt4EMPFlow.ptminfilter = 10e3
-    AntiKt4EMPFlow.modifiers = ["Calib:T0:mc","Sort"] + standardrecomods + truthmods
-    AntiKt4EMPFlow.ghostdefs = standardghosts
-    #AntiKt4EMPFlow.modifiers = ["Calib:AnalysisLatest:mc"]
+    # ************************
+    # TEMPORARY : comment out jet def modifications
+    
+    # # This updates the original jet definitions, so might be a little risky
+    # # in derivation code. Safer would be to always deepcopy into a local variable.
+    # #AntiKt4EMTopo.ptminfilter = 15e3
+    # AntiKt4EMTopo.modifiers = ["Calib:T0:mc","Sort"] + standardrecomods + clustermods + truthmods
 
-    AntiKt4Truth.ptminfilter = 2e3
-    AntiKt4Truth.extrainputs = ["EventDensity"]
+    # AntiKt4EMPFlow.ptminfilter = 10e3
+    # AntiKt4EMPFlow.modifiers = ["Calib:T0:mc","Sort"] + standardrecomods + truthmods
+    # AntiKt4EMPFlow.ghostdefs = standardghosts
+    # #AntiKt4EMPFlow.modifiers = ["Calib:AnalysisLatest:mc"]
 
-    AntiKt4TruthWZ.ptminfilter = 2e3
-    AntiKt4TruthWZ.extrainputs = ["EventDensity"]
+    # AntiKt4Truth.ptminfilter = 2e3
+    # AntiKt4Truth.extrainputs = ["EventDensity"]
 
-    ########################################################################
-    # Now we define our own definitions
-    from JetRecConfig.JetDefinition import JetConstit, JetDefinition, xAODType
-    EMTopoCSSK = JetConstit(xAODType.CaloCluster, ["EM","Origin","CS","SK"])
-    AntiKt4EMTopoCSSK = JetDefinition("AntiKt",0.4,EMTopoCSSK,ptmin=2e3,ptminfilter=2e3)
-    AntiKt4EMTopoCSSK.modifiers = ["ConstitFourMom"] + standardrecomods + clustermods + truthmods
-    AntiKt4EMTopoCSSK.ghostdefs = standardghosts
-    AntiKt4EMTopoCSSK.extrainputs = ["EventDensity"]
+    # AntiKt4TruthWZ.ptminfilter = 2e3
+    # AntiKt4TruthWZ.extrainputs = ["EventDensity"]
 
     ########################################################################
-    # We can also copy and modify the standard ones
-    from copy import deepcopy
-    from JetRecConfig.StandardJetDefs import CHSPFlow
-
-    CSSKPFlow = deepcopy(CHSPFlow)
-    CSSKPFlow.modifiers = ["CS","SK"]
-    AntiKt4EMPFlowCSSK = deepcopy(AntiKt4EMPFlow)
-    AntiKt4EMPFlowCSSK.inputdef = CSSKPFlow
-    AntiKt4EMPFlowCSSK.modifiers = ["ConstitFourMom"] + standardrecomods + truthmods
-    AntiKt4EMPFlowCSSK.ptmin = 2e3
-    AntiKt4EMPFlowCSSK.ptminfilter = 2e3
-    AntiKt4EMPFlowCSSK.ghostdefs = standardghosts
-    AntiKt4EMPFlowCSSK.extrainputs = ["EventDensity"]
-
-    jetdefs = [AntiKt4EMTopo,
-               AntiKt4EMPFlow,
-               AntiKt4EMTopoCSSK,
-               AntiKt4EMPFlowCSSK]
+    # ************************
+    # TEMPORARY : comment out custom CSSK definitions
+    # # Now we define our own definitions
+    # from JetRecConfig.JetDefinition import JetConstit, JetDefinition, xAODType
+    # EMTopoCSSK = JetConstit(xAODType.CaloCluster, ["EM","Origin","CS","SK"])
+    # AntiKt4EMTopoCSSK = JetDefinition("AntiKt",0.4,EMTopoCSSK,ptmin=2e3,ptminfilter=2e3)
+    # AntiKt4EMTopoCSSK.modifiers = ["ConstitFourMom"] + standardrecomods + clustermods + truthmods
+    # AntiKt4EMTopoCSSK.ghostdefs = standardghosts
+    # AntiKt4EMTopoCSSK.extrainputs = ["EventDensity"]
+
+    # ########################################################################
+    # # We can also copy and modify the standard ones
+    # from copy import deepcopy
+    # from JetRecConfig.StandardJetDefs import CHSPFlow
+
+    # CSSKPFlow = deepcopy(CHSPFlow)
+    # CSSKPFlow.modifiers = ["CS","SK"]
+    # AntiKt4EMPFlowCSSK = deepcopy(AntiKt4EMPFlow)
+    # AntiKt4EMPFlowCSSK.inputdef = CSSKPFlow
+    # AntiKt4EMPFlowCSSK.modifiers = ["ConstitFourMom"] + standardrecomods + truthmods
+    # AntiKt4EMPFlowCSSK.ptmin = 2e3
+    # AntiKt4EMPFlowCSSK.ptminfilter = 2e3
+    # AntiKt4EMPFlowCSSK.ghostdefs = standardghosts
+    # AntiKt4EMPFlowCSSK.extrainputs = ["EventDensity"]
+
+    jetdefs = [
+        AntiKt4EMTopo.clone(prefix="New"),
+        AntiKt4EMPFlow.clone(prefix="New"),
+        # AntiKt4EMTopoCSSK,
+        # AntiKt4EMPFlowCSSK,
+    ]
     if configFlags.Input.isMC:
         jetdefs += [AntiKt4Truth,
                     AntiKt4TruthWZ]
diff --git a/Reconstruction/Jet/JetRecConfig/share/test_StandardSmallRJets.py b/Reconstruction/Jet/JetRecConfig/share/test_StandardSmallRJets.py
new file mode 100644
index 000000000000..e815f191100d
--- /dev/null
+++ b/Reconstruction/Jet/JetRecConfig/share/test_StandardSmallRJets.py
@@ -0,0 +1,108 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+from JetRecConfig.StandardSmallRJets import AntiKt4EMPFlow, AntiKt4LCTopo
+from JetRecConfig.JetRecConfig import JetRecCfg, jetlog
+
+jetlog.setLevel(2)
+
+from pprint import pprint, pformat
+
+if __name__=="__main__":
+    from argparse import ArgumentParser
+    parser = ArgumentParser(prog="StandardTests: runs standard jet reconstruction from an ESD",
+                            usage="Call with an input file, pass -n=0 to skip execution, -t 0 for serial or 1 for threaded execution.")
+    #
+    parser.add_argument("-H", "--Help", default=False, action="store_true", help="Evidently pyROOT interferes with help :(")
+    #
+    parser.add_argument("-f", "--filesIn", type=str, help="Comma-separated list of input files")
+    parser.add_argument("-M", "--msgLvl",   default="INFO", help="The message verbosity")
+    parser.add_argument("-n", "--nEvents",  default=0, type=int, help="The number of events to run. 0 skips execution")
+    #
+    parser.add_argument("-t", "--nThreads", default=1, type=int, help="The number of concurrent threads to run. 0 uses serial Athena.")
+    parser.add_argument("-D", "--dumpSG",   default=False, action="store_true", help="Toggle StoreGate dump on each event")
+    #
+    args = parser.parse_args()
+
+    if args.Help:
+        parser.print_help()
+        import sys
+        sys.exit(0)
+
+    # Setting needed for the ComponentAccumulator to do its thing
+    from AthenaCommon.Configurable import Configurable
+    Configurable.configurableRun3Behavior=True
+
+    # Set message levels
+    from AthenaCommon import Constants
+    msgLvl = getattr(Constants,args.msgLvl)
+    from AthenaCommon.Logging import log
+    log.setLevel(msgLvl)
+    
+    # Config flags steer the job at various levels
+    from AthenaConfiguration.AllConfigFlags import ConfigFlags
+    ConfigFlags.Input.Files = args.filesIn.split(",")
+
+    # Flags relating to multithreaded execution
+    ConfigFlags.Concurrency.NumThreads = args.nThreads
+    if args.nThreads>0:
+        ConfigFlags.Scheduler.ShowDataDeps = True
+        ConfigFlags.Scheduler.ShowDataFlow = True
+        ConfigFlags.Scheduler.ShowControlFlow = True
+        ConfigFlags.Concurrency.NumConcurrentEvents = args.nThreads
+
+    # Prevent the flags from being modified
+    ConfigFlags.lock()
+
+    
+
+    # Get a ComponentAccumulator setting up the fundamental Athena job
+    from AthenaConfiguration.MainServicesConfig import MainServicesCfg 
+    cfg=MainServicesCfg(ConfigFlags) 
+
+    # Add the components for reading in pool files
+    from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
+    cfg.merge(PoolReadCfg(ConfigFlags))
+
+    # Nowadays the jet calibration tool requires the EventInfo
+    # to be decorated with lumi info, which is not in Run 2 AODs
+    from LumiBlockComps.LuminosityCondAlgConfig import LuminosityCondAlgCfg
+    cfg.merge(LuminosityCondAlgCfg(ConfigFlags))
+
+    from AthenaConfiguration.ComponentFactory import CompFactory
+    muWriter = CompFactory.LumiBlockMuWriter("LumiBlockMuWriter",LumiDataKey="LuminosityCondData")
+    cfg.addEventAlgo(muWriter,"AthAlgSeq")
+
+
+    
+    # Add the components from our jet reconstruction job
+    jetdefs = [AntiKt4EMPFlow.clone(prefix="New")  , AntiKt4LCTopo.clone(prefix="New") ]
+    for jetdef in jetdefs:
+        cfg.merge( JetRecCfg(jetdef,ConfigFlags) )        
+
+    # Write what we produced to AOD
+    # First define the output list
+    outputlist = ["EventInfo#*"]
+    originaljets = ["AntiKt4EMPFlowJets","AntiKt4EMTopoJets"]
+    for jetcoll in originaljets:
+        outputlist += ["xAOD::JetContainer#"+jetcoll,
+                       "xAOD::JetAuxContainer#"+jetcoll+"Aux."]
+    for jetdef in jetdefs:
+        key = jetdef.fullname()
+        outputlist += ["xAOD::JetContainer#"+key,
+                       "xAOD::JetAuxContainer#"+key+"Aux."]
+
+    # Now get the output stream components
+    from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
+    cfg.merge(OutputStreamCfg(ConfigFlags,"xAOD",ItemList=outputlist))
+    pprint( cfg.getEventAlgo("OutputStreamxAOD").ItemList )
+  
+    # Optionally, print the contents of the store every event
+    cfg.getService("StoreGateSvc").Dump = args.dumpSG
+
+    # Save this configuration to a pickle file
+    f=open("JetRecTest.pkl","wb")
+    cfg.store(f)
+    f.close()
+
+    # Run the job
+    cfg.run(maxEvents=args.nEvents)
diff --git a/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_jets_fromesd_newJobConfig.sh b/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_jets_fromesd_newJobConfig.sh
new file mode 100755
index 000000000000..5bf6a5d4ed3e
--- /dev/null
+++ b/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_jets_fromesd_newJobConfig.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# art-description: Athena runs jet reconstruction, using the new job configuration for Run 3, from an ESD file
+# art-type: local
+# art-athena-mt
+# art-include: master/Athena
+
+python $WorkDir_DIR/jobOptions/JetRecConfig/test_StandardSmallRJets.py  --filesIn /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecExRecoTest/mc16_13TeV.361022.Pythia8EvtGen_A14NNPDF23LO_jetjet_JZ2W.recon.ESD.e3668_s3170_r10572_homeMade.pool.root -n 50 | tee temp.log
+echo "art-result: ${PIPESTATUS[0]}"
+
+test_postProcessing_Errors.sh temp.log
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoConfiguration.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoConfiguration.py
index 7e871e53d952..c12e27287296 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoConfiguration.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoConfiguration.py
@@ -7,7 +7,9 @@
 # and translate it into the python configuration objects used by
 # jet reco code.
 
-from JetRecConfig.JetDefinition import JetConstit, xAODType, JetDefinition
+from JetRecConfig.JetDefinition import JetConstitSeq,JetConstitSource, xAODType, JetDefinition
+from . import TriggerJetMods # this is to define the ConstitFourMom_copy JetModifierC
+TriggerJetMods.ConstitFourMom_copy
 from AthenaCommon.Logging import logging
 log = logging.getLogger("TriggerMenuMT.HLTMenuConfig.Jet.JetRecoConfiguration")
 
@@ -39,36 +41,57 @@ def defineJetConstit(jetRecoDict,clustersKey=None,pfoPrefix=None):
     constitMods = []
     # Get the details of the constituent definition:
     # type, mods and the input container name
+
+    
     if "pf" in jetRecoDict["dataType"]:
         if pfoPrefix is None:
             raise RuntimeError("JetRecoConfiguration: Cannot define PF jets without pfo prefix!")
+
+        trkopt = jetRecoDict['trkopt']
+        from JetRecConfig.ConstModHelpers import constitModWithAlternateTrk
+        # Generate a new JetConstitModifier with track proterties setup according to trkopt
+        constitModWithAlternateTrk("CorrectPFO", trkopt) 
+        constitMods = ["CorrectPFO"+trkopt]
         # apply constituent pileup suppression
         if "cs" in jetRecoDict["dataType"]:
             constitMods.append("CS")
         if "sk" in jetRecoDict["dataType"]:
             constitMods.append("SK")
+        # Generate a new JetConstitModifier with track proterties setup according to trkopt
+        constitModWithAlternateTrk("CHS", trkopt) # 
+        constitMods += ["CHS"+trkopt]
+        
+        inputPFO = pfoPrefix+"ParticleFlowObjects"
+        modstring = ''.join(constitMods[1:-1])
+        if modstring == '':
+            modstring='CHS'
+        
         if not constitMods:
-            jetConstit = JetConstit( xAODType.ParticleFlow, constitMods, rawname=pfoPrefix+"ParticleFlowObjects", inputname=pfoPrefix+"CHSParticleFlowObjects")
+            jetConstit = JetConstitSeq( "HLT_EMPFlow", xAODType.ParticleFlow, constitMods, inputname=inputPFO, outputname=pfoPrefix+"CHSParticleFlowObjects", label="EMPFlow")
         else:
-            jetConstit = JetConstit( xAODType.ParticleFlow, constitMods, rawname=pfoPrefix+"ParticleFlowObjects", prefix=pfoPrefix)
-        
+            jetConstit = JetConstitSeq( "HLT_EMPFlow"+modstring, xAODType.ParticleFlow, constitMods, inputname=inputPFO, outputname=pfoPrefix+modstring+"ParticleFlowObjects",label='EMPFlow'+(modstring if modstring!='CHS' else '') )
+
+            
     if "tc" in jetRecoDict["dataType"]:
-        # apply this scale
-        if jetRecoDict["calib"] == "em":
-            constitMods = ["EM"] + constitMods
-        elif jetRecoDict["calib"] == "lcw":
-            constitMods = ["LC"] + constitMods
-        # read from this cluster collection,
-        # overriding the standard offline collection
-        jetConstit = JetConstit( xAODType.CaloCluster, constitMods, rawname=clustersKey, prefix="HLT_")
         # apply constituent pileup suppression
         if "cs" in jetRecoDict["dataType"]:
             constitMods.append("CS")
         if "sk" in jetRecoDict["dataType"]:
             constitMods.append("SK")
-        jetConstit.modifiers = constitMods
-        if clustersKey is not None and jetRecoDict["dataType"]=="tc":
-            jetConstit.inputname = clustersKey
+        # build a modifier identifier :
+        modstring = ''.join(constitMods)
+        # prepend the cluster calib state :
+        if jetRecoDict["calib"] == "em":
+            constitMods = ["EM"] + constitMods
+        elif jetRecoDict["calib"] == "lcw":
+            constitMods = ["LC"] + constitMods
+
+        jetConstit = JetConstitSeq( "HLT_"+constitMods[0]+"Topo",xAODType.CaloCluster, constitMods, inputname=clustersKey, outputname=clustersKey+modstring,label=constitMods[0]+'Topo'+modstring)
+
+    # declare our new JetConstitSeq in the standard dictionary
+    from JetRecConfig.StandardJetConstits import jetconstitdic
+    jetconstitdic.setdefault(jetConstit.name, jetConstit)
+
     return jetConstit
 
     
@@ -79,7 +102,7 @@ def interpretRecoAlg(recoAlg):
 
 # Arbitrary min pt for fastjet, set to be low enough for MHT(?)
 # Could/should adjust higher for large-R
-def defineJets(jetRecoDict,clustersKey=None,pfoPrefix=None):
+def defineJets(jetRecoDict,clustersKey=None,prefix='',pfoPrefix=None):
     minpt = {
         4:  7000,
         10: 50000,
@@ -87,20 +110,26 @@ def defineJets(jetRecoDict,clustersKey=None,pfoPrefix=None):
     jetalg, jetradius, jetextra = interpretRecoAlg(jetRecoDict["recoAlg"])
     actualradius = float(jetradius)/10
     jetConstit = defineJetConstit(jetRecoDict,clustersKey,pfoPrefix)
-    jetDef = JetDefinition( "AntiKt", actualradius, jetConstit, ptmin=minpt[jetradius])
+
+    suffix="_"+jetRecoDict["jetCalib"]
+    if jetRecoDict["trkopt"] != "notrk":
+        suffix += "_{}".format(jetRecoDict["trkopt"])
+    
+
+    jetDef = JetDefinition( "AntiKt", actualradius, jetConstit, ptmin=minpt[jetradius], prefix=prefix, suffix=suffix)
     return jetDef
 
-def defineReclusteredJets(jetRecoDict):
-    rcJetConstit = JetConstit( xAODType.Jet, [])
+def defineReclusteredJets(jetRecoDict,smallRjets):
+    rcJetConstit = JetConstitSource("RCJet", xAODType.Jet, smallRjets, label='JetRC')
     rcJetDef = JetDefinition( "AntiKt", 1.0, rcJetConstit)
     return rcJetDef
 
-def defineGroomedJets(jetRecoDict,ungroomedDef,ungroomedJetsName):
+def defineGroomedJets(jetRecoDict,ungroomedDef):#,ungroomedJetsName):
     from JetRecConfig.JetGrooming import JetTrimming, JetSoftDrop
     groomAlg = jetRecoDict["recoAlg"][3:] if 'sd' in jetRecoDict["recoAlg"] else jetRecoDict["recoAlg"][-1]
     groomDef = {
-        "sd":JetSoftDrop(ungroomedDef,ungroomedJetsName,zcut=0.1,beta=1.0),
-        "t" :JetTrimming(ungroomedDef,ungroomedJetsName,smallR=0.2,ptfrac=0.05),
+        "sd":JetSoftDrop(ungroomedDef,zcut=0.1,beta=1.0),
+        "t" :JetTrimming(ungroomedDef,smallR=0.2,ptfrac=0.05),
     }[groomAlg]
     return groomDef
 
@@ -115,9 +144,9 @@ def getModSpec(modname,modspec=''):
 
 def defineTrackMods(trkopt):
     trkmods = [
-        (jetmoddict["TrackMoments"],trkopt),
-        (jetmoddict["JVF"],trkopt),
-        (jetmoddict["JVT"],trkopt)
+        "TrackMoments:"+trkopt,
+        "JVF:"+trkopt,
+        "JVT:"+trkopt,
     ]
     return trkmods
 
@@ -167,16 +196,16 @@ def defineCalibFilterMods(jetRecoDict,dataSource,rhoKey="auto"):
             calibSeq += "_Insitu"
 
         calibSpec = ":".join( [calibContext, dataSource, calibSeq, rhoKey, pvname, gscDepth] )
-        from .TriggerJetMods import ConstitFourMom_copy
+
         if jetalg=="a4":
-            calibMods = [(ConstitFourMom_copy,""),
-                         getModSpec("CaloEnergies"), # Needed for GSC
-                         getModSpec("Calib",calibSpec),
-                         getModSpec("Sort")]
+            calibMods = ["ConstitFourMom_copy",
+                         "CaloEnergies", # Needed for GSC
+                         "Calib:"+calibSpec,
+                         "Sort"]
         else:
-            calibMods = [(ConstitFourMom_copy,""),
-                         getModSpec("Calib",calibSpec),
-                         getModSpec("Sort")]
+            calibMods = ["ConstitFourMom_copy",
+                         "Calib:"+calibSpec,
+                         "Sort"]
 
     filtercut = {"a4":7000, "a10":50000, "a10r": 50000, "a10t":50000, "a10sd":50000}[jetalg]
-    return calibMods + [getModSpec("Filter",filtercut)]
+    return calibMods + ["Filter:"+str(filtercut)]
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoSequences.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoSequences.py
index 54d1b7d8202a..9189cd93342c 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoSequences.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoSequences.py
@@ -7,6 +7,9 @@ from TriggerMenuMT.HLTMenuConfig.Menu.ChainConfigurationBase import RecoFragment
 from AthenaConfiguration.ComponentAccumulator import conf2toConfigurable
 from TriggerMenuMT.HLTMenuConfig.Jet import JetRecoConfiguration
 from JetRecConfig.JetRecConfig import getConstitPJGAlg, getJetAlgorithm
+from JetRecConfig import JetInputConfig
+from JetRecConfig import JetRecConfig
+
 from TrigEDMConfig.TriggerEDMRun3 import recordable
 
 # Translate the reco dict to a string for suffixing etc
@@ -81,28 +84,25 @@ def standardJetRecoSequence( configFlags, dataSource, RoIs, **jetRecoDict ):
         from eflowRec.PFHLTSequence import PFHLTSequence
         (pfseq, pfoPrefix) = RecoFragmentsPool.retrieve(PFHLTSequence, configFlags, clustersin=clustersKey, tracktype=jetRecoDict["trkopt"])
         recoSeq += pfseq
-        jetDef = JetRecoConfiguration.defineJets(jetRecoDict,pfoPrefix=pfoPrefix)
+        jetDef = JetRecoConfiguration.defineJets(jetRecoDict,pfoPrefix=pfoPrefix, prefix=jetNamePrefix)
     else:
-        jetDef = JetRecoConfiguration.defineJets(jetRecoDict,clustersKey=clustersKey)
-    useConstitMods = ["sktc","cssktc", "pf", "csskpf"]
-    doConstitMods = jetRecoDict["dataType"] in useConstitMods
+        jetDef = JetRecoConfiguration.defineJets(jetRecoDict,clustersKey=clustersKey, prefix=jetNamePrefix)
 
-    # chosen jet collection
-    jetsFullName = jetNamePrefix+jetDef.basename+"Jets_"+jetRecoDict["jetCalib"]
-    if jetRecoDict["trkopt"] != "notrk":
-        jetsFullName += "_{}".format(jetRecoDict["trkopt"])
+    doConstitMods = jetRecoDict["dataType"] in ["sktc","cssktc", "pf", "csskpf"]
+
+    jetsFullName = jetDef.fullname()
     sequenceOut = recordable(jetsFullName)
 
+    JetRecConfig.instantiateAliases(jetDef)
     if doConstitMods:
         # Get online monitoring jet rec tool
         from JetRecTools import OnlineMon                                                  
         monJetRecTool = OnlineMon.getMonTool_Algorithm("HLTJets/"+jetsFullName+"/")
 
         from JetRecConfig.ConstModHelpers import getConstitModAlg
-        if jetRecoDict["trkopt"] == "notrk":
-            recoSeq += getConstitModAlg(jetDef.inputdef,suffix="HLT",tvaKey="JetTrackVtxAssoc",vtxKey="PrimaryVertices",monTool=monJetRecTool)
-        else:
-            recoSeq += getConstitModAlg(jetDef.inputdef,suffix="HLT",tvaKey=trkcolls["TVA"],vtxKey=trkcolls["Vertices"],monTool=monJetRecTool)
+        constitModAlg = getConstitModAlg(jetDef.inputdef, monTool=monJetRecTool)
+        if constitModAlg:
+            recoSeq += constitModAlg
 
     # Add the PseudoJetGetter alg to the sequence
     constitPJAlg = getConstitPJGAlg( jetDef.inputdef )
@@ -114,7 +114,6 @@ def standardJetRecoSequence( configFlags, dataSource, RoIs, **jetRecoDict ):
     if trkcolls:
         pjs.append(trkcolls["GhostTracks"])
 
-    from JetRecConfig import JetRecConfig
     jetModList = []
     if jetRecoDict["trkopt"] != "notrk":
         trkMods = JetRecoConfiguration.defineTrackMods(jetRecoDict["trkopt"])
@@ -123,7 +122,7 @@ def standardJetRecoSequence( configFlags, dataSource, RoIs, **jetRecoDict ):
     rhoKey = "auto"
     if "sub" in jetRecoDict["jetCalib"]:
         # Add the event shape alg if needed for area subtraction
-        eventShapeAlg = JetRecConfig.getEventShapeAlg( jetDef.inputdef, constitPJKey, "HLT_" )
+        eventShapeAlg = JetInputConfig.buildEventShapeAlg( jetDef,  "HLT_" )
         recoSeq += conf2toConfigurable(eventShapeAlg)
         # Not currently written because impossible to merge
         # across event views, which is maybe a concern in
@@ -131,19 +130,26 @@ def standardJetRecoSequence( configFlags, dataSource, RoIs, **jetRecoDict ):
         rhoKey = eventShapeAlg.EventDensityTool.OutputContainer
 
     # Import the standard jet modifiers as defined for offline
-    # We can add/configure these differently if desired. In particular,
-    # we could define a TriggerJetMods module if settings need to
-    # diverge substantially e.g. track/vertex collections
+    # We can add/configure these differently if desired. 
     calibMods = JetRecoConfiguration.defineCalibFilterMods(jetRecoDict,dataSource, rhoKey)
     jetModList += calibMods
 
+
     # Get online monitoring tool
     from JetRec import JetOnlineMon
     monTool = JetOnlineMon.getMonTool_TrigJetAlgorithm("HLTJets/"+jetsFullName+"/")
 
+    jetDef.modifiers = jetModList
+    # recall instantiateAliases because we updated the modifiers
+    JetRecConfig.instantiateAliases(jetDef)
+
+    # make sure all our JetModifier have their track inputs set up according to trkopt
+    from JetRecConfig.JetModConfig import jetModWithAlternateTrk    
+    jetModWithAlternateTrk(jetDef, jetRecoDict['trkopt'] )
+    
     # Generate a JetAlgorithm to run the jet finding and modifiers
     # (via a JetRecTool instance).
-    jetRecAlg = JetRecConfig.getJetAlgorithm(jetsFullName, jetDef, pjs, jetModList, monTool)
+    jetRecAlg = JetRecConfig.getJetAlgorithm(jetsFullName, jetDef, pjs, monTool)
     recoSeq += conf2toConfigurable( jetRecAlg )
     # End of basic jet reco
     return recoSeq, sequenceOut, jetDef
@@ -162,25 +168,26 @@ def groomedJetRecoSequence( configFlags, dataSource, RoIs, **jetRecoDict ):
     # Need to forward the pseudojets of the parents to the groomer
     parentpjs = getattr(ungroomedJetRecoSequence,"jetalg_{}".format(ungroomedJetsName)).Tools[0].InputPseudoJets
 
-    groomDef = JetRecoConfiguration.defineGroomedJets(jetRecoDict,ungroomedDef,ungroomedJetsName)
-    groomedJetsFullName = jetNamePrefix+groomDef.basename+"Jets_"+jetRecoDict["jetCalib"]
+    
+    groomDef = JetRecoConfiguration.defineGroomedJets(jetRecoDict,ungroomedDef)#,ungroomedJetsName)
+    groomedJetsFullName = groomDef.fullname()+"_"+jetRecoDict["jetCalib"]
     if jetRecoDict["trkopt"]!="notrk":
         groomedJetsFullName += "_"+jetRecoDict["trkopt"]
 
-    groomedModList = JetRecoConfiguration.defineCalibFilterMods(jetRecoDict,dataSource)
+    groomDef.modifiers = JetRecoConfiguration.defineCalibFilterMods(jetRecoDict,dataSource)
     # Can add substructure mods here
 
     # Get online monitoring tool
     from JetRec import JetOnlineMon
     monTool = JetOnlineMon.getMonTool_TrigJetAlgorithm("HLTJets/"+groomedJetsFullName+"/")
 
-    from JetRecConfig.JetGroomConfig import getJetGroomAlg
-    groomalg = getJetGroomAlg(groomedJetsFullName,groomDef,parentpjs,groomedModList,monTool)
+    from JetRecConfig.JetGroomConfig import getJetGroomAlg, instantiateGroomingAliases
+    instantiateGroomingAliases(groomDef)
+    groomalg = getJetGroomAlg(groomedJetsFullName,groomDef,parentpjs,monTool)
     recoSeq += conf2toConfigurable( groomalg )
 
-    sequenceOut = recordable(groomedJetsFullName)
-    jetDef = groomDef
-    return recoSeq, sequenceOut, jetDef
+    sequenceOut = recordable(groomedJetsFullName)    
+    return recoSeq, sequenceOut, groomDef
 
 
 # Reclustering -- call the basic jet reco and add this to the sequence,
@@ -202,9 +209,8 @@ def reclusteredJetRecoSequence( configFlags, dataSource, RoIs, **jetRecoDict ):
                           OutputContainer=filteredJetsName,
                           PtMin=rcJetPtMin)
 
-    rcJetDef = JetRecoConfiguration.defineReclusteredJets(jetRecoDict)
-    rcJetDef.inputdef.inputname = filteredJetsName
-    rcJetsFullName = jetNamePrefix+rcJetDef.basename+"RCJets_"+jetRecoDict["jetCalib"]
+    rcJetDef = JetRecoConfiguration.defineReclusteredJets(jetRecoDict, filteredJetsName)
+    rcJetsFullName = jetNamePrefix+rcJetDef.basename+"Jets_"+jetRecoDict["jetCalib"]
     rcModList = [] # Could set substructure mods
     rcJetDef.modifiers = rcModList
 
@@ -217,7 +223,7 @@ def reclusteredJetRecoSequence( configFlags, dataSource, RoIs, **jetRecoDict ):
     monTool = JetOnlineMon.getMonTool_TrigJetAlgorithm("HLTJets/"+rcJetsFullName+"/")
 
     rcPJs = [rcConstitPJKey]
-    rcJetRecAlg = getJetAlgorithm(rcJetsFullName, rcJetDef, rcPJs, rcModList, monTool)
+    rcJetRecAlg = getJetAlgorithm(rcJetsFullName, rcJetDef, rcPJs,  monTool)
 
     recoSeq += conf2toConfigurable( rcJetRecAlg )
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/TriggerJetMods.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/TriggerJetMods.py
index 408f56fc5fb4..89531ab3a853 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/TriggerJetMods.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/TriggerJetMods.py
@@ -17,4 +17,6 @@ def getConstitFourMomTool_copy():
     return cfourmom
 
 ConstitFourMom_copy = JetModifier("JetConstitFourMomTool", "constitfourmom_copy",
-                                   helperfn=getConstitFourMomTool_copy)
+                                   createfn=getConstitFourMomTool_copy)
+from JetRecConfig.StandardJetMods import jetmoddict
+jetmoddict['ConstitFourMom_copy'] = ConstitFourMom_copy
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/generateJet.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/generateJet.py
index 183e5aa9f0c8..5683afb49b17 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/generateJet.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/generateJet.py
@@ -56,22 +56,24 @@ def generateChains( flags, chainDict ):
 
     #sequencing of actual jet reconstruction
     from JetRecConfig import JetRecConfig
-    from JetRecConfig.JetDefinition import JetConstit, JetDefinition, xAODType
-   
+    from JetRecConfig.JetDefinition import JetConstitSeq, JetDefinition, xAODType, JetInputDef
+    from JetRecConfig.StandardJetConstits import jetinputdefdic
+
+    # declare a jet source for the HLT clusters if needed :
+    jetinputdefdic.setdefault(clustersname , JetInputDef(clustersname, xAODType.CaloCluster) )
     #hardcoded jet collection for now 
     clustermods = ["ECPSFrac","ClusterMoments"]
     trigMinPt = 7e3
-    HLT_EMTopo = JetConstit( xAODType.CaloCluster, ["EM"])
-    HLT_EMTopo.rawname = clustersname
-    HLT_EMTopo.inputname = clustersname
-    HLT_AntiKt4EMTopo_subjesIS = JetDefinition( "AntiKt", 0.4, HLT_EMTopo, ptmin=trigMinPt,ptminfilter=trigMinPt)
+    HLT_EMTopo = JetConstitSeq( "HLT_EMTopo",xAODType.CaloCluster, ["EM"], clustersname, clustersname,label="EMTopo")
+    
+    HLT_AntiKt4EMTopo_subjesIS = JetDefinition( "AntiKt", 0.4, HLT_EMTopo, ptmin=trigMinPt,ptminfilter=trigMinPt,
+                                                prefix="HLT_",
+                                                suffix = "_subjesIS",
+                                               )
     HLT_AntiKt4EMTopo_subjesIS.modifiers = ["Calib:TrigRun2:data:JetArea_EtaJES_GSC_Insitu:HLT_Kt4EMTopoEventShape","Sort"] + clustermods 
 
-    jetprefix="HLT_"
-    jetsuffix="_subjesIS"
-    evsprefix="HLT_"
     # May need a switch to disable automatic modifier prerequisite generation
-    jetRecoComps = JetRecConfig.JetRecCfg(HLT_AntiKt4EMTopo_subjesIS, flags, jetprefix, jetsuffix, evsprefix)
+    jetRecoComps = JetRecConfig.JetRecCfg(HLT_AntiKt4EMTopo_subjesIS, flags) 
     inEventReco.mergeReco(jetRecoComps)    
 
     acc.merge(inEventReco,stepReco.getName())
@@ -79,7 +81,7 @@ def generateChains( flags, chainDict ):
     #hypo
     from TrigHLTJetHypo.TrigJetHypoToolConfig import trigJetHypoToolFromDict
     hypo = CompFactory.TrigJetHypoAlgMT("TrigJetHypoAlgMT_a4tcem_subjesIS")
-    jetsfullname = jetprefix+HLT_AntiKt4EMTopo_subjesIS.basename+"Jets"+jetsuffix
+    jetsfullname = HLT_AntiKt4EMTopo_subjesIS.fullname()
     hypo.Jets = jetsfullname
     acc.addEventAlgo(hypo)
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MET/AlgConfigs.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MET/AlgConfigs.py
index 0d8ee40c27af..91b456ed7964 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MET/AlgConfigs.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MET/AlgConfigs.py
@@ -144,6 +144,7 @@ class TrkMHTConfig(AlgConfig):
         jetRecoDict = jetRecoDictForMET(trkopt="ftf", **recoDict)
         # TODO - right now jet calibration is hardcoded to EM
         jetRecoDict["calib"] = "em"
+        
         jetSeq, jetName, jetDef = RecoFragmentsPool.retrieve(
             jetRecoSequence, ConfigFlags, **jetRecoDict
         )
@@ -168,7 +169,7 @@ class TrkMHTConfig(AlgConfig):
         self.fexAlg.TrackSelTool.maxZ0SinTheta = 1.5
         self.fexAlg.TrackSelTool.maxD0overSigmaD0 = 3
         self.fexAlg.TrackSelTool.minPt = 1 * Units.GeV
-
+        
 
 class PFSumConfig(AlgConfig):
     @classmethod
@@ -273,7 +274,6 @@ class MHTPufitConfig(AlgConfig):
     def __init__(self, **recoDict):
         super(MHTPufitConfig, self).__init__(**recoDict)
         from ..Jet.JetRecoSequences import jetRecoSequence
-        from ..Jet.JetRecoConfiguration import defineJets
         from TriggerMenuMT.HLTMenuConfig.CommonSequences.CaloSequenceSetup import (
             caloClusterRecoSequence,
         )
@@ -300,23 +300,22 @@ class MHTPufitConfig(AlgConfig):
                 clustersin=clusterName,
                 tracktype=jetRecoDict["trkopt"],
             )
-            jetDef = defineJets(jetRecoDict, pfoPrefix=pfoPrefix)
+            #jetDef = defineJets(jetRecoDict, pfoPrefix=pfoPrefix)
         elif jetRecoDict["dataType"] == "tc":
-            jetDef = defineJets(jetRecoDict, clustersKey=clusterName)
+            pass
+        #jetDef = defineJets(jetRecoDict, clustersKey=clusterName)
         else:
             raise ValueError(
                 "Unexpected jetDataType {}".format(jetRecoDict["dataType"])
             )
-        inputName = jetDef.inputdef.inputname
+        inputName = jetDef.inputdef.containername
         calibHasAreaSub = "sub" in jetRecoDict["jetCalib"]
         if calibHasAreaSub:
-            from JetRecConfig.JetRecConfig import getEventShapeAlg, getConstitPJGAlg
-
-            evtShapeAlg = getEventShapeAlg(
-                jetDef.inputdef,
-                getConstitPJGAlg(jetDef.inputdef).OutputContainer,
-                "HLT_",
-            )
+            from JetRecConfig.JetRecConfig import instantiateAliases
+            from JetRecConfig.JetInputConfig import buildEventShapeAlg
+            instantiateAliases(jetDef)
+            evtShapeAlg = buildEventShapeAlg( jetDef,  "HLT_" )
+            
             rhoKey = evtShapeAlg.EventDensityTool.OutputContainer
         else:
             rhoKey = ""
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MET/METRecoSequences.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MET/METRecoSequences.py
index d3a86c27f3c6..ce5aedd1244a 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MET/METRecoSequences.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MET/METRecoSequences.py
@@ -57,13 +57,18 @@ def pfoRecoSequence(dummyFlags, RoIs, **recoDict):
     jetRecoDict["calib"] = "em"
     jetRecoDict["dataType"] = "pf"
     constit = defineJetConstit(jetRecoDict, pfoPrefix=pfoPrefix)
+    from JetRecConfig.ConstModHelpers import aliasToInputDef
+    constit = aliasToInputDef(constit)
     constit_mod_seq = getConstitModAlg(
         constit,
-        "HLT",
-        tvaKey="JetTrackVtxAssoc_{trkopt}".format(**jetRecoDict),
-        vtxKey="HLT_IDVertex_FS",
+        # "HLT",
+        # tvaKey="JetTrackVtxAssoc_{trkopt}".format(**jetRecoDict),
+        # vtxKey="HLT_IDVertex_FS",
     )
-    return [tcSeq, pfSeq, constit_mod_seq], pfoPrefix
+    allSeqs = [tcSeq, pfSeq]
+    if constit_mod_seq :
+        allSeqs.append(constit_mod_seq)
+    return allSeqs, pfoPrefix
 
 
 def cvfClusterSequence(dummyFlags, RoIs, **recoDict):
-- 
GitLab


From c9c31ed63e1a4049b03f8666549b8fd04b783be2 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Fri, 28 Aug 2020 23:16:55 -0400
Subject: [PATCH 326/403] CaloRec: Add ClusterCorrection configuration flags.

Add new-style configuration flags for cluster corrections.
(To allow migrating cluster corrections to the new configuration scheme.)
---
 Calorimeter/CaloRec/python/CaloConfigFlags.py | 55 ++++++++++++++++++-
 1 file changed, 54 insertions(+), 1 deletion(-)

diff --git a/Calorimeter/CaloRec/python/CaloConfigFlags.py b/Calorimeter/CaloRec/python/CaloConfigFlags.py
index 75ae806ab700..d21452e1f792 100644
--- a/Calorimeter/CaloRec/python/CaloConfigFlags.py
+++ b/Calorimeter/CaloRec/python/CaloConfigFlags.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 from AthenaConfiguration.AthConfigFlags import AthConfigFlags
 
@@ -21,4 +21,57 @@ def createCaloConfigFlags():
     ccf.addFlag("Calo.TopoCluster.doTreatEnergyCutAsAbsolute",False)     
     ccf.addFlag("Calo.TopoCluster.doTopoClusterLocalCalib",True)
 
+    #### Cluster correction flags:
+    # If true, then reweight cells to prevent double-counting between clusters.
+    ccf.addFlag ('Calo.ClusterCorrection.doSlidingWindowCellWeights', False)
+
+    # If true, then among groups of clusters very close to each other,
+    # remove all clusters but one.
+    ccf.addFlag ('Calo.ClusterCorrection.doSlidingWindowRemoveDuplicates', False)
+
+    # If true, remove clusters with energy below a threshold.
+    ccf.addFlag ('Calo.ClusterCorrection.doSlidingWindowRemoveBad', True)
+
+    # Defines from where we should try to construct the tools.
+    # May be one of 'jo', 'pool', 'cool'.
+    # May also be a list of them, to try in order.
+    # It may also be set to a string defined in poolfiles to try to
+    # read all tools from that file (except those marked as nopool).
+    ccf.addFlag ('Calo.ClusterCorrection.defaultSource',
+                 ['cool', 'pool', 'jo'])
+
+    # Override the default correction version for sliding window clusters.
+    ccf.addFlag ('Calo.ClusterCorrection.caloSwWhichCorrection', '')
+
+    # Override the default correction version for EM topo clusters.
+    ccf.addFlag ('Calo.ClusterCorrection.caloTopoEMWhichCorrection', '')
+
+    # This flag allows setting additional correction arguments for
+    # sliding window clusters.  It should normally be empty, but it may be
+    # set for testing new correction versions.
+    ccf.addFlag ('Calo.ClusterCorrection.caloSwCorrectionArgs', {})
+
+    # This flag allows setting additional correction arguments for
+    # EM topo clusters.  It should normally be empty, but it may be
+    # set for testing new correction versions.
+    ccf.addFlag ('Calo.ClusterCorrection.caloTopoEMCorrectionArgs', {})
+
+    # Correction generation string that's embedded in database tags.
+    # This string gets changed every time the database is updated.
+    ccf.addFlag ('Calo.ClusterCorrection.caloSwGeneration', '')
+
+    # Correction generation string that's embedded in database tags.
+    # This string gets changed every time the database is updated.
+    ccf.addFlag ('Calo.ClusterCorrection.caloTopoEMGeneration', '')
+
+    # This flag allows overriding the subdetector name used for
+    # database connections.  It's a dictionary, the keys of which are the
+    # correction classes (normally either `CaloSwClusterCorrections'
+    # or `EMTopoClusterCorrections').  If the correction class isn't
+    # found, we use a key of None instead as a default.
+    #
+    # The subdetector name is normally `CALO'.  However, it can be set to the
+    # name of a local sqlite file to force reading COOL information from there.
+    ccf.addFlag ('Calo.ClusterCorrection.dbSubdetName', {None : 'CALO'})
+
     return ccf
-- 
GitLab


From 0756baa3881c96d20618b681e50708a96e641e52 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Tue, 22 Sep 2020 16:19:14 -0400
Subject: [PATCH 327/403] CaloRec: Update CaloClusterCorrDBWriter for
 ToolWithConstants.

Update CaloClusterCorrDBWriter to use ToolWithConstants,
rather than the obsolete ToolWithConstantsMixin.
---
 .../CaloRec/src/CaloClusterCorrDBWriter.cxx   | 78 ++++---------------
 .../CaloRec/src/CaloClusterCorrDBWriter.h     | 36 ++++-----
 2 files changed, 30 insertions(+), 84 deletions(-)

diff --git a/Calorimeter/CaloRec/src/CaloClusterCorrDBWriter.cxx b/Calorimeter/CaloRec/src/CaloClusterCorrDBWriter.cxx
index 28f5b2c4b1d7..1ea957fb5ec0 100644
--- a/Calorimeter/CaloRec/src/CaloClusterCorrDBWriter.cxx
+++ b/Calorimeter/CaloRec/src/CaloClusterCorrDBWriter.cxx
@@ -9,76 +9,23 @@
 
 
 #include "CaloClusterCorrDBWriter.h"
-#include "GaudiKernel/ISvcLocator.h"
-#include "GaudiKernel/StatusCode.h"
-#include "GaudiKernel/MsgStream.h"
-#include "GaudiKernel/IToolSvc.h"
-#include "GaudiKernel/ListItem.h"
+#include "GaudiKernel/ThreadLocalContext.h"
 
 #include "CaloRec/ToolWithConstantsMixin.h"
 #include "CaloConditions/ToolConstants.h"
 #include "AthenaKernel/errorcheck.h"
 
-//#include "ToolConstants2Blob.h"
-
 
 using namespace CaloRec;
 
-//#############################################################################
-CaloClusterCorrDBWriter::CaloClusterCorrDBWriter(const std::string& name, 
-						 ISvcLocator* pSvcLocator) 
-  : AthAlgorithm(name, pSvcLocator),
-    m_blobTool("Blob2ToolConstants")
-{
-  // Name(s) of Cluster Correction Tools
-  declareProperty("ClusterCorrectionTools", m_correctionToolNames);
-  declareProperty("key",m_key="");
-  declareProperty("COOLInlineFolder",m_inlineFolder);
-}
-
-//#############################################################################
-
-CaloClusterCorrDBWriter::~CaloClusterCorrDBWriter()
-{ }
-
 //#############################################################################
 
 StatusCode CaloClusterCorrDBWriter::initialize()
 {
-  //Get ToolSvc  
-  IToolSvc*     p_toolSvc;
-  CHECK( service("ToolSvc", p_toolSvc) );
-
-  CHECK( m_blobTool.retrieve());
-
-  
-  // allocate tools derived from ToolsWithConstants
-  std::vector<std::string>::const_iterator firstTool=m_correctionToolNames.begin();
-  std::vector<std::string>::const_iterator lastTool =m_correctionToolNames.end();
-  for ( ; firstTool != lastTool; ++firstTool ) {
-    IAlgTool* algToolPtr;
-    ListItem  clusAlgoTool(*firstTool);
-    StatusCode scTool = p_toolSvc->retrieveTool(clusAlgoTool.type(),
-						clusAlgoTool.name(),
-						algToolPtr,
-						this);
-    if ( scTool.isFailure() ) {
-      REPORT_MESSAGE(MSG::ERROR) << "Cannot find tool for " << *firstTool;
-    }
-    else {
-      REPORT_MESSAGE(MSG::INFO) << m_key << ": "
-                                << "Found tool for " << *firstTool;
-      
-      // check for tool type
-      CaloRec::ToolWithConstantsMixin* theTool = 
-	dynamic_cast<CaloRec::ToolWithConstantsMixin*>(algToolPtr);
-      if ( theTool != nullptr ) { 
-	m_correctionTools.push_back(theTool);
-      }
-    }
-  }
+  ATH_CHECK( m_blobTool.retrieve());
+  ATH_CHECK( m_tools.retrieve());
   REPORT_MESSAGE(MSG::INFO) << m_key << ": "
-                            << "Found " << m_correctionTools.size() <<
+                            << "Found " << m_tools.size() <<
     " tools.";
   return StatusCode::SUCCESS;
 }
@@ -87,6 +34,7 @@ StatusCode CaloClusterCorrDBWriter::initialize()
 
 StatusCode CaloClusterCorrDBWriter::finalize()
 {
+  const EventContext& ctx = Gaudi::Hive::currentContext();
   if (!m_inlineFolder.empty()) {
     CaloRec::ToolConstants tc;
     std::string toolnames;
@@ -100,15 +48,15 @@ StatusCode CaloClusterCorrDBWriter::finalize()
       CHECK(detStore()->record(attrColl,m_inlineFolder));
     }
 
-    for (size_t i = 0; i < m_correctionTools.size(); i++) {
-      CHECK( m_correctionTools[i]->mergeConstants (tc) );
-      toolnames += m_correctionTools[i]->name() + " ";	
+    for (size_t i = 0; i < m_tools.size(); i++) {
+      CHECK( m_tools[i]->mergeConstants (tc, ctx) );
+      toolnames += m_tools[i]->name() + " ";	
     }
     coral::AttributeList* attrList=m_blobTool->ToolConstantsToAttrList(&tc);
     if (!attrList)
       return StatusCode::FAILURE;
     
-    const std::string& tName=m_key;//m_correctionTools[i]->name();
+    const std::string& tName=m_key;
     attrColl->add(coolChannelNbr,tName);
     attrColl->add(coolChannelNbr,*attrList);
     
@@ -121,9 +69,9 @@ StatusCode CaloClusterCorrDBWriter::finalize()
   else {
     auto tc = std::make_unique<CaloRec::ToolConstants>();
     std::string toolnames;
-    for (size_t i = 0; i < m_correctionTools.size(); i++) {
-      CHECK( m_correctionTools[i]->mergeConstants (*tc) );
-      toolnames += m_correctionTools[i]->name() + " ";
+    for (size_t i = 0; i < m_tools.size(); i++) {
+      CHECK( m_tools[i]->mergeConstants (*tc, ctx) );
+      toolnames += m_tools[i]->name() + " ";
     }
 
     CHECK( detStore()->record (std::move(tc), m_key) );
@@ -142,7 +90,7 @@ StatusCode CaloClusterCorrDBWriter::finalize()
 
 //#############################################################################
 
-StatusCode CaloClusterCorrDBWriter::execute()
+StatusCode CaloClusterCorrDBWriter::execute (const EventContext& /*ctx*/) const
 {
   return StatusCode::SUCCESS;
 }
diff --git a/Calorimeter/CaloRec/src/CaloClusterCorrDBWriter.h b/Calorimeter/CaloRec/src/CaloClusterCorrDBWriter.h
index 4955af8e4c5e..319da945ca39 100644
--- a/Calorimeter/CaloRec/src/CaloClusterCorrDBWriter.h
+++ b/Calorimeter/CaloRec/src/CaloClusterCorrDBWriter.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 CALOREC_CALOCLUSTERCORRDBWRITER
@@ -20,42 +20,40 @@
 
 
 
-#include "AthenaBaseComps/AthAlgorithm.h"
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
 #include "GaudiKernel/ToolHandle.h"
-#include "CaloRec/ToolWithConstantsMixin.h"
+#include "CaloInterface/IToolWithConstants.h"
 #include "CaloRec/Blob2ToolConstants.h"
 #include <vector>
 #include <string>
 
 
-class CaloClusterCorrDBWriter : public AthAlgorithm
+class CaloClusterCorrDBWriter : public AthReentrantAlgorithm
 {
 
  public:
+  using AthReentrantAlgorithm::AthReentrantAlgorithm;
 
-  CaloClusterCorrDBWriter(const std::string& name, ISvcLocator* pSvcLocator);
-  virtual ~CaloClusterCorrDBWriter();
-  virtual StatusCode initialize();
-  virtual StatusCode execute();
-  virtual StatusCode finalize();
+  virtual StatusCode initialize() override;
+  virtual StatusCode execute(const EventContext& ctx) const override;
+  virtual StatusCode finalize() override;
   
  private:
-
-  /** @brief The list of tool names (jobOptions)*/
-  std::vector<std::string> m_correctionToolNames;
+  /** @brief The list of tools */
+  ToolHandleArray<IToolWithConstants> m_tools
+  { this, "ClusterCorrectionTools", {}, "Cluster correction tools" };
 
   /** @brief Key for the DetectorStore (jobOptions) 
    * The ToolConstants will be recorded with this key.
    */
-  std::string m_key;
-
-  std::string m_inlineFolder;
+  StringProperty m_key
+  { this, "key", "" };
 
-  /** @brief the actual list of tools corresponding to above names */
-  std::vector<CaloRec::ToolWithConstantsMixin*>  m_correctionTools; 
+  StringProperty m_inlineFolder
+  { this, "COOLInlineFolder", "" };
 
-  ToolHandle<Blob2ToolConstants> m_blobTool;
-  
+  ToolHandle<Blob2ToolConstants> m_blobTool
+  { this, "Blob2ToolConstants", "Blob2ToolConstants" };
 };
 
 #endif // CALOREC_CALOCLUSTERCORRDBWRITER
-- 
GitLab


From d824943eb37fb5f6b1695a15b3079c1d49f263f7 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 7 Oct 2020 21:45:04 +0200
Subject: [PATCH 328/403] CaloInterface: Fix base class of IToolWithConstants.

IToolWithConstants needs to derive  from IAlgTool.
---
 Calorimeter/CaloInterface/CaloInterface/IToolWithConstants.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Calorimeter/CaloInterface/CaloInterface/IToolWithConstants.h b/Calorimeter/CaloInterface/CaloInterface/IToolWithConstants.h
index ba5023b3c087..d58d79b057cb 100644
--- a/Calorimeter/CaloInterface/CaloInterface/IToolWithConstants.h
+++ b/Calorimeter/CaloInterface/CaloInterface/IToolWithConstants.h
@@ -15,7 +15,7 @@
 
 
 #include "CaloConditions/ToolConstants.h"
-#include "GaudiKernel/IInterface.h"
+#include "GaudiKernel/IAlgTool.h"
 #include "GaudiKernel/StatusCode.h"
 #include "GaudiKernel/EventContext.h"
 #include <string>
@@ -27,7 +27,7 @@
  * Defines operations needed by CaloClusterCorrDBWriter.
  */
 class IToolWithConstants
-  : virtual public IInterface
+  : virtual public IAlgTool
 {
 public:
   DeclareInterfaceID (IToolWithConstants, 1, 0);
-- 
GitLab


From 6d015a2378052fbea11e9711a50b35002239f804 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Tue, 22 Sep 2020 16:17:28 -0400
Subject: [PATCH 329/403] CaloUtils: Thread-safety cleanup.

Clean up CaloTowerBuilderToolTestAlg, allowing it to be checked.
---
 Calorimeter/CaloUtils/CMakeLists.txt          |  2 +-
 .../src/CaloTowerBuilderToolTestAlg.cxx       | 39 ++-----------------
 .../src/CaloTowerBuilderToolTestAlg.h         | 10 ++---
 3 files changed, 10 insertions(+), 41 deletions(-)

diff --git a/Calorimeter/CaloUtils/CMakeLists.txt b/Calorimeter/CaloUtils/CMakeLists.txt
index 709f5a9381ad..bcf8db8424fd 100644
--- a/Calorimeter/CaloUtils/CMakeLists.txt
+++ b/Calorimeter/CaloUtils/CMakeLists.txt
@@ -12,7 +12,7 @@ atlas_add_library( CaloUtilsLib CaloUtils/*.h CaloUtils/*.icc src/*.h src/*.cxx
    PUBLIC_HEADERS CaloUtils
    PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
    LINK_LIBRARIES AthenaBaseComps AthenaKernel CaloConditions CaloDetDescrLib CaloEvent CaloGeoHelpers CaloIdentifier CaloInterfaceLib CxxUtils FourMom GaudiKernel Navigation StoreGateLib xAODCaloEvent
-   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} GeoModelInterfaces Identifier SGTools )
+   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} GeoModelInterfaces Identifier SGTools TestTools )
 
 atlas_add_component( CaloUtils src/components/*.cxx
    LINK_LIBRARIES CaloUtilsLib )
diff --git a/Calorimeter/CaloUtils/src/CaloTowerBuilderToolTestAlg.cxx b/Calorimeter/CaloUtils/src/CaloTowerBuilderToolTestAlg.cxx
index ea5bc10ca8d0..d2365b7d6fc7 100644
--- a/Calorimeter/CaloUtils/src/CaloTowerBuilderToolTestAlg.cxx
+++ b/Calorimeter/CaloUtils/src/CaloTowerBuilderToolTestAlg.cxx
@@ -1,8 +1,6 @@
 /*
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
-
-// $Id$
 /**
  * @file  CaloTowerBuilderToolTestAlg.cxx
  * @author scott snyder <snyder@bnl.gov>
@@ -12,9 +10,6 @@
 
 #undef NDEBUG
 
-//This is a test so no need to be thread safe
-#include "CxxUtils/checker_macros.h"
-ATLAS_NO_CHECK_FILE_THREAD_SAFETY;
 
 #include "CaloTowerBuilderToolTestAlg.h"
 #include "CaloUtils/CaloTowerBuilderTool.h"
@@ -22,6 +17,7 @@ ATLAS_NO_CHECK_FILE_THREAD_SAFETY;
 #include "CaloEvent/CaloTowerContainer.h"
 #include "CaloDetDescr/CaloDetDescrManager.h"
 #include "AthenaKernel/errorcheck.h"
+#include "TestTools/random.h"
 #include "CLHEP/Units/SystemOfUnits.h"
 #include <cstdlib>
 #include <iostream>
@@ -35,34 +31,6 @@ using CLHEP::GeV;
 namespace {
 
 
-// Dufus-quality RNG, using LCG.  Constants from numerical recipies.
-// I don't particularly care about RNG quality here, just about
-// getting something that's reproducible.
-#include <cstdint>
-uint32_t seed = 1;
-uint32_t rngmax = static_cast<uint32_t> (-1);
-uint32_t rng()
-{
-  seed = (1664525*seed + 1013904223);
-  return seed;
-}
-
-float randf (float rmax, float rmin = 0)
-{
-  return static_cast<float>(rng()) / rngmax * (rmax-rmin) + rmin;
-}
-int randi (int rmax, int rmin = 0)
-{
-  return static_cast<int> (randf(rmax, rmin));
-}
-
-struct RNG
-{
-  int operator() (int n) const { return randi (n); }
-};
-//RNG stlrand;
-
-
 bool comp (double x1, double x2, double thresh = 1e-6)
 {
   double den = std::abs(x1) + std::abs(x2);
@@ -82,7 +50,8 @@ CaloTowerBuilderToolTestAlg::CaloTowerBuilderToolTestAlg
   (const std::string& name,
    ISvcLocator* pSvcLocator)
     : AthAlgorithm (name, pSvcLocator),
-      m_builder ("CaloTowerBuilderTool")
+      m_builder ("CaloTowerBuilderTool"),
+      m_seed (1)
 {
 }
 
@@ -115,7 +84,7 @@ CaloTowerBuilderToolTestAlg::make_cells()
     for (const CaloDetDescrElement* dde :
            ddman->element_range (subcalo))
     {
-      float energy = randf (100*GeV);
+      float energy = Athena_test::randf_seed (m_seed, 100*GeV);
       cells->push_back (new CaloCell (dde, energy, 0, 0, 0, 
                                       CaloGain::LARMEDIUMGAIN) );
     }
diff --git a/Calorimeter/CaloUtils/src/CaloTowerBuilderToolTestAlg.h b/Calorimeter/CaloUtils/src/CaloTowerBuilderToolTestAlg.h
index 1c6516f292b5..59d909b11bd8 100644
--- a/Calorimeter/CaloUtils/src/CaloTowerBuilderToolTestAlg.h
+++ b/Calorimeter/CaloUtils/src/CaloTowerBuilderToolTestAlg.h
@@ -1,10 +1,7 @@
 // This file's extension implies that it's C, but it's really -*- C++ -*-.
-
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
-
-// $Id$
 /**
  * @file CaloTowerBuilderToolTestAlg.h
  * @author scott snyder <snyder@bnl.gov>
@@ -23,9 +20,10 @@
 #include "CaloIdentifier/CaloCell_ID.h"
 #include "GaudiKernel/ToolHandle.h"
 #include <vector>
+#include <cstdint>
 class CaloCellContainer;
 class CaloTowerContainer;
-class ICaloTowerBuilderToolBase;
+class ICaloTowerBuilderToolBase; 
 
 
 class CaloTowerBuilderToolTestAlg
@@ -61,6 +59,8 @@ private:
   ToolHandle<ICaloTowerBuilderToolBase> m_builder;
   std::vector<CaloCell_ID::SUBCALO> m_calos;
   CaloTowerSeg m_seg;
+
+  uint32_t m_seed;
 };
 
 
-- 
GitLab


From b62c24e39ac4483714338c90e52ca297759027de Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 6 Oct 2020 19:15:20 +0200
Subject: [PATCH 330/403] CaloUtils: test

---
 Calorimeter/CaloUtils/CMakeLists.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Calorimeter/CaloUtils/CMakeLists.txt b/Calorimeter/CaloUtils/CMakeLists.txt
index bcf8db8424fd..c1b999aab124 100644
--- a/Calorimeter/CaloUtils/CMakeLists.txt
+++ b/Calorimeter/CaloUtils/CMakeLists.txt
@@ -54,18 +54,18 @@ atlas_add_test( exceptions_test
 
 atlas_add_test( CaloTowerStore_test
    SCRIPT test/CaloTowerStore_test.sh
-   LOG_IGNORE_PATTERN "Reading file|Unable to locate catalog|Cache alignment"
+   LOG_IGNORE_PATTERN "Reading file|Unable to locate catalog|Cache alignment|IOVDbSvc +INFO"
    PROPERTIES TIMEOUT 500 )
 
 atlas_add_test( CaloTowerBuilderTool_test
    SCRIPT test/CaloTowerBuilderTool_test.sh
-   LOG_IGNORE_PATTERN "Reading file|Unable to locate catalog|Cache alignment"
+   LOG_IGNORE_PATTERN "Reading file|Unable to locate catalog|Cache alignment|IOVDbSvc +INFO"
    ENVIRONMENT "ATLAS_REFERENCE_TAG=CaloUtils/CaloUtils-01-00-13"
    PROPERTIES TIMEOUT 500 )
 
 atlas_add_test( ToolWithConstants_test
    SCRIPT test/ToolWithConstants_test.py
-   LOG_IGNORE_PATTERN "no dictionary for|by peeking into|Current filenames:" )
+   LOG_IGNORE_PATTERN "no dictionary for|by peeking into|Current filenames:|IOVDbSvc +INFO|Added successfully Conversion|DetDescrCnvSvc +INFO|GeoModelSvc +INFO|IOVSvc +INFO|with default tag" )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.txt share/*.py )
-- 
GitLab


From 9331970c074b093f38c2608b12a1cbd7c803bd74 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Wed, 7 Oct 2020 00:04:13 -0400
Subject: [PATCH 331/403] StoreGateBindings: More fixes for root 6.22.

New pyroot doesn't automatically convert C++ strings to python strings.
---
 Control/StoreGateBindings/python/Bindings.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/Control/StoreGateBindings/python/Bindings.py b/Control/StoreGateBindings/python/Bindings.py
index 8400673b2e54..cc8f7c746c5d 100644
--- a/Control/StoreGateBindings/python/Bindings.py
+++ b/Control/StoreGateBindings/python/Bindings.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: StoreGateBindings/python/Bindings.py
 # @author: Wim Lavrijsen <WLavrijsen@lbl.gov>
@@ -83,7 +83,7 @@ def _setup():
     # dict-pythonization of storegate: __getitem__
     def __getitem__ (self, key):
         try:
-            ret = py_sg_getitem(self, key.encode())
+            ret = py_sg_getitem(self, str(key).encode())
         except LookupError as err:
             raise KeyError(str(err))
         if ret and hasattr(ret,'setStore') and not ret.hasStore():
@@ -136,16 +136,16 @@ def _setup():
             clid = self._pyclidsvc.clid(clid.__name__)
         if clid is None:
             return [p.name() for p in self.proxies()]
-        return list(self._cpp_keys(clid, allKeys))
+        return [str(x) for x in self._cpp_keys(clid, allKeys)]
     StoreGateSvc._cpp_keys = StoreGateSvc.keys
     StoreGateSvc.keys = keys
 
 
     #The cppyy version that comes with ROOT v6.22 checks also __len__!=0
     #when casting to bool. Since we defined a __len__ method, newly-created 
-    #(empty) StoreGate instances are always casted to False and therfore 
+    #(empty) StoreGate instances are always casted to False and therefore 
     #considered invalid. 
-    #Work-aroudn by implementing our own __bool__ method
+    #Work-around by implementing our own __bool__ method
     StoreGateSvc.__bool__ = lambda self : True
     
     return
-- 
GitLab


From fd9f90220b400dd5c9e4a79bbbd8f4df51e9023d Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Wed, 7 Oct 2020 00:05:43 -0400
Subject: [PATCH 332/403] AthenaPython: Root 6.22 fix.

New pyroot spells template specializations with [], not ().
---
 Control/AthenaPython/python/FilePeekerLib.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Control/AthenaPython/python/FilePeekerLib.py b/Control/AthenaPython/python/FilePeekerLib.py
index 8862a188bbcd..41a0f4f7a2e2 100644
--- a/Control/AthenaPython/python/FilePeekerLib.py
+++ b/Control/AthenaPython/python/FilePeekerLib.py
@@ -231,7 +231,7 @@ class FilePeeker(PyAthena.Alg):
                     spec   = a.specification()
                     a_type = spec.typeName()
                     if a_type.find('string') >= 0:
-                        a_data = a.data('string')()
+                        a_data = a.data['string']()
                         try:
                             a_data = eval(a_data,{},{})
                         except Exception:
-- 
GitLab


From cef46d583a1d3bd60207fdaf4599026486c2f883 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Tue, 6 Oct 2020 17:35:36 -0400
Subject: [PATCH 333/403] TileEvent: Enable thread-safety checking.

Enable thread-safety checking.
Fix resulting warnings
---
 .../TileEvent/ATLAS_CHECK_THREAD_SAFETY       |  1 +
 TileCalorimeter/TileEvent/src/TileCell.cxx    |  6 +++--
 .../TileEvent/src/TileLaserObject.cxx         |  6 ++---
 TileCalorimeter/TileEvent/src/TileRawData.cxx |  6 +++--
 TileCalorimeter/TileEvent/src/TileSimData.cxx |  6 +++--
 TileCalorimeter/TileEvent/src/TileTTL1.cxx    |  6 +++--
 .../TileEvent/src/TileTTL1Cell.cxx            |  6 +++--
 TileCalorimeter/TileEvent/src/TileTrigger.cxx |  6 +++--
 .../TileMutableBeamElemContainer_test.cxx     | 23 ++++++++++---------
 .../test/TileMutableDataContainer_test.cxx    | 23 ++++++++++---------
 .../test/TileMutableDigitsContainer_test.cxx  | 22 ++++++++++--------
 .../test/TileMutableHitContainer_test.cxx     | 23 ++++++++++---------
 .../TileMutableRawChannelContainer_test.cxx   | 23 ++++++++++---------
 13 files changed, 88 insertions(+), 69 deletions(-)
 create mode 100644 TileCalorimeter/TileEvent/TileEvent/ATLAS_CHECK_THREAD_SAFETY

diff --git a/TileCalorimeter/TileEvent/TileEvent/ATLAS_CHECK_THREAD_SAFETY b/TileCalorimeter/TileEvent/TileEvent/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 000000000000..902b81eba5b7
--- /dev/null
+++ b/TileCalorimeter/TileEvent/TileEvent/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+TileCalorimeter/TileEvent
diff --git a/TileCalorimeter/TileEvent/src/TileCell.cxx b/TileCalorimeter/TileEvent/src/TileCell.cxx
index 8cd8fa5f4fbc..8288c71f45ec 100755
--- a/TileCalorimeter/TileEvent/src/TileCell.cxx
+++ b/TileCalorimeter/TileEvent/src/TileCell.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
 */
 
 //*****************************************************************************
@@ -30,7 +30,9 @@
 #include <iomanip>
 
 // get cabling
-extern TileCablingService * s_cabling;
+namespace {
+const TileCablingService * const s_cabling = TileCablingService::getInstance();
+}
 
 //=========================
 // Constructors
diff --git a/TileCalorimeter/TileEvent/src/TileLaserObject.cxx b/TileCalorimeter/TileEvent/src/TileLaserObject.cxx
index 4df701398078..37c2593c6234 100644
--- a/TileCalorimeter/TileEvent/src/TileLaserObject.cxx
+++ b/TileCalorimeter/TileEvent/src/TileLaserObject.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
 */
 
 /*author Renato Febbraro*/
@@ -317,7 +317,7 @@ void TileLaserObject::setDiode(const unsigned int diode,
     } // IF
   }else{
     //   log<<MSG::ERROR<<"Exit code in method TileLaserObject::setDiode"<<endmsg;
-    exit(0);
+    std::abort();
   }
 }
 
@@ -337,7 +337,7 @@ void TileLaserObject::setPmt(const unsigned int pmt,
     } // IF
   }else{
     //    log<<MSG::ERROR<<"Exit code in method TileLaserObject::setPmt"<<endmsg;
-    exit(0);
+    std::abort();
   }
 }
 
diff --git a/TileCalorimeter/TileEvent/src/TileRawData.cxx b/TileCalorimeter/TileEvent/src/TileRawData.cxx
index 061f3d3121f0..a9f933671799 100755
--- a/TileCalorimeter/TileEvent/src/TileRawData.cxx
+++ b/TileCalorimeter/TileEvent/src/TileRawData.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
 */
 
 //*****************************************************************************
@@ -29,7 +29,9 @@
 #include <iomanip>
 
 // get cabling
-TileCablingService * s_cabling = TileCablingService::getInstance();
+namespace {
+const TileCablingService * const s_cabling = TileCablingService::getInstance();
+}
 
 TileRawData::TileRawData( const Identifier& id )
   : m_adc_hwid (s_cabling->s2h_adc_id(id))
diff --git a/TileCalorimeter/TileEvent/src/TileSimData.cxx b/TileCalorimeter/TileEvent/src/TileSimData.cxx
index 57caa20da655..ed4d69fe02be 100755
--- a/TileCalorimeter/TileEvent/src/TileSimData.cxx
+++ b/TileCalorimeter/TileEvent/src/TileSimData.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,7 +27,9 @@
 #include <iostream>
 
 // get cabling
-extern TileCablingService * s_cabling;
+namespace {
+const TileCablingService * const s_cabling = TileCablingService::getInstance();
+}
 
 TileSimData::TileSimData( const Identifier& id ) : m_pmt_id( id )
 {
diff --git a/TileCalorimeter/TileEvent/src/TileTTL1.cxx b/TileCalorimeter/TileEvent/src/TileTTL1.cxx
index 330074c6eda2..bafe805f55b4 100755
--- a/TileCalorimeter/TileEvent/src/TileTTL1.cxx
+++ b/TileCalorimeter/TileEvent/src/TileTTL1.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
 */
 
 //*****************************************************************************
@@ -27,7 +27,9 @@
 #include <iomanip>
 
 // get cabling
-extern TileCablingService * s_cabling;
+namespace {
+const TileCablingService * const s_cabling = TileCablingService::getInstance();
+}
 
 TileTTL1::TileTTL1( const Identifier& id,
                     const std::vector<float>& digits ) :
diff --git a/TileCalorimeter/TileEvent/src/TileTTL1Cell.cxx b/TileCalorimeter/TileEvent/src/TileTTL1Cell.cxx
index a8896e95f8bb..b10b1d047197 100755
--- a/TileCalorimeter/TileEvent/src/TileTTL1Cell.cxx
+++ b/TileCalorimeter/TileEvent/src/TileTTL1Cell.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
 */
 
 //*****************************************************************************
@@ -30,7 +30,9 @@
 #include <iomanip>
 
 // get cabling
-extern TileCablingService * s_cabling;
+namespace {
+const TileCablingService * const s_cabling = TileCablingService::getInstance();
+}
 
 //=========================
 // Constructors
diff --git a/TileCalorimeter/TileEvent/src/TileTrigger.cxx b/TileCalorimeter/TileEvent/src/TileTrigger.cxx
index d5f76e596e07..f029661683af 100755
--- a/TileCalorimeter/TileEvent/src/TileTrigger.cxx
+++ b/TileCalorimeter/TileEvent/src/TileTrigger.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
 */
 
 //*****************************************************************************
@@ -27,7 +27,9 @@
 #include <iomanip>
 
 // get cabling
-extern TileCablingService * s_cabling;
+namespace {
+const TileCablingService * const s_cabling = TileCablingService::getInstance();
+}
 
 TileTrigger::TileTrigger(int id, const Identifier& mtid, double mtsum, 
 		std::vector<Identifier>& boardtid, std::vector<double>& boardtsum,
diff --git a/TileCalorimeter/TileEvent/test/TileMutableBeamElemContainer_test.cxx b/TileCalorimeter/TileEvent/test/TileMutableBeamElemContainer_test.cxx
index 8e063f7f7e23..a3990be1f280 100644
--- a/TileCalorimeter/TileEvent/test/TileMutableBeamElemContainer_test.cxx
+++ b/TileCalorimeter/TileEvent/test/TileMutableBeamElemContainer_test.cxx
@@ -1,8 +1,6 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
-/*
- */
 /**
  * @file TileEvent/test/TileMutableBeamElemContainer_test.cxx
  * @author scott snyder <snyder@bnl.gov>
@@ -24,16 +22,19 @@ static const size_t NCOLL = 2;
 static const size_t NCHAN = 10;
 
 
-IdDictParser parser;
-TileHWID hwid;
-TileTBID tbid;
-TileID   tileid;
-
-
 class TileCablingSvc
 {
 public:
-  static
+  IdDictParser parser;
+  TileHWID hwid;
+  TileTBID tbid;
+  TileID   tileid;
+
+  TileCablingSvc()
+  {
+    init_idhelpers();
+  }
+
   void init_idhelpers()
   {
     tileid.set_do_neighbours (false);
@@ -247,7 +248,7 @@ void test1()
 int main()
 {
   std::cout << "TileMutableBeamElemContainer_test\n";
-  TileCablingSvc::init_idhelpers();
+  TileCablingSvc cabling;
   test1();
   return 0;
 }
diff --git a/TileCalorimeter/TileEvent/test/TileMutableDataContainer_test.cxx b/TileCalorimeter/TileEvent/test/TileMutableDataContainer_test.cxx
index 56e58dece28c..ee0aed60ff2d 100644
--- a/TileCalorimeter/TileEvent/test/TileMutableDataContainer_test.cxx
+++ b/TileCalorimeter/TileEvent/test/TileMutableDataContainer_test.cxx
@@ -1,8 +1,6 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
-/*
- */
 /**
  * @file TileEvent/testTileMutableDataContainer_test.cxx
  * @author scott snyder <snyder@bnl.gov>
@@ -27,16 +25,19 @@ static const size_t NCOLL = 2;
 static const size_t NCHAN = 10;
 
 
-IdDictParser parser;
-TileHWID hwid;
-TileTBID tbid;
-TileID   tileid;
-
-
 class TileCablingSvc
 {
 public:
-  static
+  IdDictParser parser;
+  TileHWID hwid;
+  TileTBID tbid;
+  TileID   tileid;
+
+  TileCablingSvc()
+  {
+    init_idhelpers();
+  }
+
   void init_idhelpers()
   {
     tileid.set_do_neighbours (false);
@@ -247,7 +248,7 @@ void test1()
 int main()
 {
   std::cout << "TileMutableDataContainer_test\n";
-  TileCablingSvc::init_idhelpers();
+  TileCablingSvc cabling;
   test1();
   return 0;
 }
diff --git a/TileCalorimeter/TileEvent/test/TileMutableDigitsContainer_test.cxx b/TileCalorimeter/TileEvent/test/TileMutableDigitsContainer_test.cxx
index 426215257e0b..c14b0983f9dc 100644
--- a/TileCalorimeter/TileEvent/test/TileMutableDigitsContainer_test.cxx
+++ b/TileCalorimeter/TileEvent/test/TileMutableDigitsContainer_test.cxx
@@ -1,8 +1,6 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
-/*
- */
 /**
  * @file TileEvent/test/TileMutableDigitsContainer_test.cxx
  * @author scott snyder <snyder@bnl.gov>
@@ -24,16 +22,20 @@ static const size_t NCOLL = 2;
 static const size_t NCHAN = 10;
 
 
-IdDictParser parser;
-TileHWID hwid;
-TileTBID tbid;
-TileID   tileid;
-
 
 class TileCablingSvc
 {
 public:
-  static
+  IdDictParser parser;
+  TileHWID hwid;
+  TileTBID tbid;
+  TileID   tileid;
+
+  TileCablingSvc()
+  {
+    init_idhelpers();
+  }
+
   void init_idhelpers()
   {
     tileid.set_do_neighbours (false);
@@ -265,7 +267,7 @@ void test1()
 int main()
 {
   std::cout << "TileMutableDigitsContainer_test\n";
-  TileCablingSvc::init_idhelpers();
+  TileCablingSvc cabling;
   test1();
   return 0;
 }
diff --git a/TileCalorimeter/TileEvent/test/TileMutableHitContainer_test.cxx b/TileCalorimeter/TileEvent/test/TileMutableHitContainer_test.cxx
index 7932cf21060f..6106657ab3c5 100644
--- a/TileCalorimeter/TileEvent/test/TileMutableHitContainer_test.cxx
+++ b/TileCalorimeter/TileEvent/test/TileMutableHitContainer_test.cxx
@@ -1,8 +1,6 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
-/*
- */
 /**
  * @file TileEvent/test/TileMutableHitContainer_test.cxx
  * @author scott snyder <snyder@bnl.gov>
@@ -24,16 +22,19 @@ static const size_t NCOLL = 2;
 static const size_t NCHAN = 10;
 
 
-IdDictParser parser;
-TileHWID hwid;
-TileTBID tbid;
-TileID   tileid;
-
-
 class TileCablingSvc
 {
 public:
-  static
+  IdDictParser parser;
+  TileHWID hwid;
+  TileTBID tbid;
+  TileID   tileid;
+
+  TileCablingSvc()
+  {
+    init_idhelpers();
+  }
+
   void init_idhelpers()
   {
     tileid.set_do_neighbours (false);
@@ -236,7 +237,7 @@ void test1()
 int main()
 {
   std::cout << "TileMutableHitContainer_test\n";
-  TileCablingSvc::init_idhelpers();
+  TileCablingSvc cabling;
   test1();
   return 0;
 }
diff --git a/TileCalorimeter/TileEvent/test/TileMutableRawChannelContainer_test.cxx b/TileCalorimeter/TileEvent/test/TileMutableRawChannelContainer_test.cxx
index 10c14c6f0c76..820a30ae4d69 100644
--- a/TileCalorimeter/TileEvent/test/TileMutableRawChannelContainer_test.cxx
+++ b/TileCalorimeter/TileEvent/test/TileMutableRawChannelContainer_test.cxx
@@ -1,8 +1,6 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
-/*
- */
 /**
  * @file TileEvent/test/TileMutableRawChannelContainer_test.cxx
  * @author scott snyder <snyder@bnl.gov>
@@ -24,16 +22,19 @@ static const size_t NCOLL = 2;
 static const size_t NCHAN = 10;
 
 
-IdDictParser parser;
-TileHWID hwid;
-TileTBID tbid;
-TileID   tileid;
-
-
 class TileCablingSvc
 {
 public:
-  static
+  IdDictParser parser;
+  TileHWID hwid;
+  TileTBID tbid;
+  TileID   tileid;
+
+  TileCablingSvc()
+  {
+    init_idhelpers();
+  }
+
   void init_idhelpers()
   {
     tileid.set_do_neighbours (false);
@@ -283,7 +284,7 @@ void test1()
 int main()
 {
   std::cout << "TileMutableRawChannelContainer_test\n";
-  TileCablingSvc::init_idhelpers();
+  TileCablingSvc cabling;
   test1();
   return 0;
 }
-- 
GitLab


From 7dd0cbac2298be34856b2e4909a7eb8d977a72e8 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 7 Oct 2020 17:05:06 +0200
Subject: [PATCH 334/403] GoodRunsLists: Remove reference to StoreGate.h.

Remove reference to obsolete header StoreGate.h.
---
 DataQuality/GoodRunsLists/src/GoodRunsListSelectorTool.cxx | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/DataQuality/GoodRunsLists/src/GoodRunsListSelectorTool.cxx b/DataQuality/GoodRunsLists/src/GoodRunsListSelectorTool.cxx
index 0cdad5ee15df..38d0f9564ea2 100644
--- a/DataQuality/GoodRunsLists/src/GoodRunsListSelectorTool.cxx
+++ b/DataQuality/GoodRunsLists/src/GoodRunsListSelectorTool.cxx
@@ -1,7 +1,7 @@
 #ifndef XAOD_ANALYSIS
 
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -16,7 +16,6 @@
 #include "GaudiKernel/MsgStream.h"
 #include "EventInfo/EventInfo.h"
 #include "EventInfo/EventID.h"
-#include "StoreGate/StoreGate.h"
 
 #include "TFormula.h"
 #include "TSystem.h"
-- 
GitLab


From 2052d7652eccf8a71ea1110f94b33c04aa7fe87c Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 7 Oct 2020 17:09:25 +0200
Subject: [PATCH 335/403] AthenaRootComps: Remove reference to StoreGate.h.

Remove reference to obsolete header StoreGate.h.
---
 .../AthenaRoot/AthenaRootComps/src/RootNtupleEventSelector.cxx  | 2 +-
 Database/AthenaRoot/AthenaRootComps/src/xAODEventSelector.cxx   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Database/AthenaRoot/AthenaRootComps/src/RootNtupleEventSelector.cxx b/Database/AthenaRoot/AthenaRootComps/src/RootNtupleEventSelector.cxx
index 7d2a6a64e8c5..e0a63e2765a9 100644
--- a/Database/AthenaRoot/AthenaRootComps/src/RootNtupleEventSelector.cxx
+++ b/Database/AthenaRoot/AthenaRootComps/src/RootNtupleEventSelector.cxx
@@ -45,7 +45,7 @@
 #include "SGTools/StlMapClids.h"     // to make sure we have their clids
 #include "SGTools/StlVectorClids.h"  // to make sure we have their clids
 #include "SGTools/TransientAddress.h"
-#include "StoreGate/StoreGate.h" 
+#include "StoreGate/StoreGateSvc.h" 
 
 #include "TObject.h"
 #include "TTree.h"
diff --git a/Database/AthenaRoot/AthenaRootComps/src/xAODEventSelector.cxx b/Database/AthenaRoot/AthenaRootComps/src/xAODEventSelector.cxx
index 9785f6408b8c..4860a19f06c2 100644
--- a/Database/AthenaRoot/AthenaRootComps/src/xAODEventSelector.cxx
+++ b/Database/AthenaRoot/AthenaRootComps/src/xAODEventSelector.cxx
@@ -46,7 +46,7 @@
 #include "SGTools/StlMapClids.h"     // to make sure we have their clids
 #include "SGTools/StlVectorClids.h"  // to make sure we have their clids
 #include "SGTools/TransientAddress.h"
-#include "StoreGate/StoreGate.h" 
+#include "StoreGate/StoreGateSvc.h" 
 
 // EventInfo includes
 #include "EventInfo/EventInfo.h"
-- 
GitLab


From 148d5b985490ce7e82d600a629255a62f5554a3e Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 7 Oct 2020 17:13:01 +0200
Subject: [PATCH 336/403] IOVDbMetaDataTools: Remove reference to StoreGate.h.

Remove reference to obsolete header StoreGate.h.
---
 Database/IOVDbMetaDataTools/src/IOVDbMetaDataTool.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Database/IOVDbMetaDataTools/src/IOVDbMetaDataTool.cxx b/Database/IOVDbMetaDataTools/src/IOVDbMetaDataTool.cxx
index c08d767dc144..20c76b34a046 100755
--- a/Database/IOVDbMetaDataTools/src/IOVDbMetaDataTool.cxx
+++ b/Database/IOVDbMetaDataTools/src/IOVDbMetaDataTool.cxx
@@ -18,7 +18,7 @@
 #include "GaudiKernel/IIncidentSvc.h"
 #include "GaudiKernel/FileIncident.h"
 
-#include "StoreGate/StoreGate.h"
+#include "StoreGate/StoreGateSvc.h"
 #include "IOVDbDataModel/IOVMetaDataContainer.h"
 
 #include "CxxUtils/checker_macros.h"
-- 
GitLab


From 99a5edd22c4e4829ba4e51dc29402753c4b0f24e Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 7 Oct 2020 17:14:12 +0200
Subject: [PATCH 337/403] RegistrationServices: Remove reference to
 StoreGate.h.

Remove reference to obsolete header StoreGate.h.
---
 Database/RegistrationServices/src/IOVRegistrationSvc.cxx | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/Database/RegistrationServices/src/IOVRegistrationSvc.cxx b/Database/RegistrationServices/src/IOVRegistrationSvc.cxx
index 716c39baec90..fbfa5b511198 100644
--- a/Database/RegistrationServices/src/IOVRegistrationSvc.cxx
+++ b/Database/RegistrationServices/src/IOVRegistrationSvc.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -20,7 +20,6 @@
 //#include "GaudiKernel/DeclareFactoryEntries.h"
 
 // Athena includes
-#include "StoreGate/StoreGate.h"
 #include "IOVDbSvc/IIOVCondDbSvc.h"
 #include "AthenaKernel/IClassIDSvc.h"
 #include "AthenaKernel/IOVTime.h"
-- 
GitLab


From e8288dd10ff521e7bc6e528d0068f7543859f968 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 7 Oct 2020 17:15:46 +0200
Subject: [PATCH 338/403] DetDescrCnvSvc: Remove reference to StoreGate.h.

Remove reference to obsolete header StoreGate.h.
---
 DetectorDescription/DetDescrCnvSvc/src/DetDescrCnvSvc.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/DetectorDescription/DetDescrCnvSvc/src/DetDescrCnvSvc.cxx b/DetectorDescription/DetDescrCnvSvc/src/DetDescrCnvSvc.cxx
index 49b7a840adaf..e5389e93f4c1 100755
--- a/DetectorDescription/DetDescrCnvSvc/src/DetDescrCnvSvc.cxx
+++ b/DetectorDescription/DetDescrCnvSvc/src/DetDescrCnvSvc.cxx
@@ -16,7 +16,7 @@
 #include "GaudiKernel/IDataSelector.h"
 #include "GaudiKernel/IOpaqueAddress.h"
 
-#include "StoreGate/StoreGate.h"
+#include "StoreGate/StoreGateSvc.h"
 //  #include "SGTools/TransientAddress.h"
 
 //External definitions
-- 
GitLab


From c703553be48614bf60ca019611ca5e2c2c45ec8c Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 5 Oct 2020 09:19:41 -0400
Subject: [PATCH 339/403] PixelConditionsData: cmake fix

Library dependency fixes.
---
 .../PixelConditionsData/CMakeLists.txt             | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/InnerDetector/InDetConditions/PixelConditionsData/CMakeLists.txt b/InnerDetector/InDetConditions/PixelConditionsData/CMakeLists.txt
index 7f6ce0a55b29..e1d3edc2ab58 100644
--- a/InnerDetector/InDetConditions/PixelConditionsData/CMakeLists.txt
+++ b/InnerDetector/InDetConditions/PixelConditionsData/CMakeLists.txt
@@ -5,18 +5,6 @@
 # Declare the package name:
 atlas_subdir( PixelConditionsData )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( 
-  PUBLIC
-  Control/CxxUtils
-  DetectorDescription/Identifier
-  DetectorDescription/GeoPrimitives
-  Database/AthenaPOOL/AthenaPoolUtilities
-  InnerDetector/InDetConditions/InDetByteStreamErrors
-  PRIVATE
-  Control/AthenaKernel
-  GaudiKernel )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
@@ -27,6 +15,6 @@ atlas_add_library( PixelConditionsData
                    PUBLIC_HEADERS PixelConditionsData
                    PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
                    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES CxxUtils Identifier GeoPrimitives
+                   LINK_LIBRARIES CxxUtils Identifier GeoPrimitives InDetByteStreamErrors
                    PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel AthenaPoolUtilities GaudiKernel )
 
-- 
GitLab


From 1f3ee8fd665bd7fea708bf952bab29efa4231c90 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Thu, 6 Aug 2020 22:46:59 -0400
Subject: [PATCH 340/403] LArTPCnv: Add missing test reference file.

Add reference for LArLATOMEHeaderContainerCnv_p1_test.
---
 .../LArTPCnv/share/LArLATOMEHeaderContainerCnv_p1_test.ref       | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 LArCalorimeter/LArCnv/LArTPCnv/share/LArLATOMEHeaderContainerCnv_p1_test.ref

diff --git a/LArCalorimeter/LArCnv/LArTPCnv/share/LArLATOMEHeaderContainerCnv_p1_test.ref b/LArCalorimeter/LArCnv/LArTPCnv/share/LArLATOMEHeaderContainerCnv_p1_test.ref
new file mode 100644
index 000000000000..a5bce3fd2565
--- /dev/null
+++ b/LArCalorimeter/LArCnv/LArTPCnv/share/LArLATOMEHeaderContainerCnv_p1_test.ref
@@ -0,0 +1 @@
+test1
-- 
GitLab


From 0f4894b629b13dccada3a75c5ed43d8817367790 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Sat, 26 Sep 2020 00:19:38 +0200
Subject: [PATCH 341/403] DataQualityConfigurations: Config file syntax fix.

Config files use # for comments, not /* */.
---
 .../config/AFP/collisions_run.config                        | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/DataQuality/DataQualityConfigurations/config/AFP/collisions_run.config b/DataQuality/DataQualityConfigurations/config/AFP/collisions_run.config
index c54e9aa21f17..d3746b9f85b4 100644
--- a/DataQuality/DataQualityConfigurations/config/AFP/collisions_run.config
+++ b/DataQuality/DataQualityConfigurations/config/AFP/collisions_run.config
@@ -1,6 +1,6 @@
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
+#
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+#
 ############################################################
 # AFP
 # Nikola Dikic
-- 
GitLab


From c8bbf91d8c7808d5bbfda07081d23f9b06f2f0b5 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Thu, 8 Oct 2020 02:53:56 +0200
Subject: [PATCH 342/403] Allow to pass EventContext to
 IExtendedTrackSummaryHelperTool

---
 .../InDetTrackSummaryHelperTool.h             |  61 ++++----
 .../src/InDetTrackSummaryHelperTool.cxx       |  16 ++-
 .../src/MuonTrackSummaryHelperTool.h          |   4 +-
 .../ISF_TrackSummaryHelperTool.h              |   2 +
 .../IExtendedTrackSummaryHelperTool.h         | 130 +++++++++++++-----
 .../TrkTrackSummaryTool/TrackSummaryTool.h    |   8 +-
 .../src/TrackSummaryTool.cxx                  |  50 ++++---
 7 files changed, 184 insertions(+), 87 deletions(-)

diff --git a/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/InDetTrackSummaryHelperTool/InDetTrackSummaryHelperTool.h b/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/InDetTrackSummaryHelperTool/InDetTrackSummaryHelperTool.h
index d16e40b8d40b..b61b8bd890b3 100755
--- a/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/InDetTrackSummaryHelperTool/InDetTrackSummaryHelperTool.h
+++ b/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/InDetTrackSummaryHelperTool/InDetTrackSummaryHelperTool.h
@@ -57,34 +57,43 @@ namespace InDet {
         Output: Changes in information and hitPattern
         Input quantities rot, tsos are used to increment the counts for hits and outliers in information and to set the proper bits in hitPattern.
     */
-    virtual void analyse(const Trk::Track& track,
-                         const Trk::PRDtoTrackMap *prd_to_track_map,
-                         const Trk::RIO_OnTrack* rot,
-                         const Trk::TrackStateOnSurface* tsos,
-                         std::vector<int>& information, 
-                         std::bitset<Trk::numberOfDetectorTypes>& hitPattern ) const override;
-
-    virtual void analyse(const Trk::Track& track,
-                         const Trk::PRDtoTrackMap *prd_to_track_map,
-                         const Trk::CompetingRIOsOnTrack* crot,
-                         const Trk::TrackStateOnSurface* tsos,
-                         std::vector<int>& information, 
-                         std::bitset<Trk::numberOfDetectorTypes>& hitPattern ) const override;
-
-    virtual void analyse(const Trk::Track& track,
-                         const Trk::RIO_OnTrack* rot,
-                         const Trk::TrackStateOnSurface* tsos,
-                         std::vector<int>& information,
-                         std::bitset<Trk::numberOfDetectorTypes>& hitPattern ) const override {
-      analyse(track,nullptr,rot,tsos,information,hitPattern);
+    using IExtendedTrackSummaryHelperTool::analyse;
+    virtual void analyse(
+      const EventContext& ctx,
+      const Trk::Track& track,
+      const Trk::PRDtoTrackMap* prd_to_track_map,
+      const Trk::RIO_OnTrack* rot,
+      const Trk::TrackStateOnSurface* tsos,
+      std::vector<int>& information,
+      std::bitset<Trk::numberOfDetectorTypes>& hitPattern) const override final;
+
+    virtual void analyse(
+      const EventContext& ctx,
+      const Trk::Track& track,
+      const Trk::PRDtoTrackMap* prd_to_track_map,
+      const Trk::CompetingRIOsOnTrack* crot,
+      const Trk::TrackStateOnSurface* tsos,
+      std::vector<int>& information,
+      std::bitset<Trk::numberOfDetectorTypes>& hitPattern) const override final;
+
+    virtual void analyse(
+      const Trk::Track& track,
+      const Trk::RIO_OnTrack* rot,
+      const Trk::TrackStateOnSurface* tsos,
+      std::vector<int>& information,
+      std::bitset<Trk::numberOfDetectorTypes>& hitPattern) const override
+    {
+      analyse(track, nullptr, rot, tsos, information, hitPattern);
     }
 
-    virtual void analyse(const Trk::Track& track,
-                         const Trk::CompetingRIOsOnTrack* crot,
-                         const Trk::TrackStateOnSurface* tsos,
-                         std::vector<int>& information,
-                         std::bitset<Trk::numberOfDetectorTypes>& hitPattern ) const override {
-      analyse(track,nullptr, crot,tsos,information,hitPattern);
+    virtual void analyse(
+      const Trk::Track& track,
+      const Trk::CompetingRIOsOnTrack* crot,
+      const Trk::TrackStateOnSurface* tsos,
+      std::vector<int>& information,
+      std::bitset<Trk::numberOfDetectorTypes>& hitPattern) const override
+    {
+      analyse(track, nullptr, crot, tsos, information, hitPattern);
     }
 
     /** Input : track, partHyp
diff --git a/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/src/InDetTrackSummaryHelperTool.cxx b/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/src/InDetTrackSummaryHelperTool.cxx
index aaf99fd5f1e0..3205c62f0215 100755
--- a/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/src/InDetTrackSummaryHelperTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/src/InDetTrackSummaryHelperTool.cxx
@@ -108,7 +108,8 @@ namespace {
 }
 
 //==========================================================================
-void InDet::InDetTrackSummaryHelperTool::analyse(const Trk::Track& track,
+void InDet::InDetTrackSummaryHelperTool::analyse(const EventContext& ctx,
+                                                 const Trk::Track& track,
                                                  const Trk::PRDtoTrackMap *prd_to_track_map,
                                                  const Trk::RIO_OnTrack* rot,
                                                  const Trk::TrackStateOnSurface* tsos,
@@ -238,7 +239,7 @@ void InDet::InDetTrackSummaryHelperTool::analyse(const Trk::Track& track,
     bool isArgonStraw   = false;
     bool isKryptonStraw = false;
     if (not m_TRTStrawSummaryTool.empty()) {
-      int statusHT = m_TRTStrawSummaryTool->getStatusHT(id);
+      int statusHT = m_TRTStrawSummaryTool->getStatusHT(id,ctx);
       if ( statusHT == TRTCond::StrawStatus::Argon or
            statusHT == TRTCond::StrawStatus::Dead  or
            statusHT == TRTCond::StrawStatus::EmulateArgon ) {
@@ -302,7 +303,8 @@ void InDet::InDetTrackSummaryHelperTool::analyse(const Trk::Track& track,
   return;
 }
 
-void InDet::InDetTrackSummaryHelperTool::analyse(const Trk::Track& track,
+void InDet::InDetTrackSummaryHelperTool::analyse(const EventContext& ctx,
+                                                 const Trk::Track& track,
                                                  const Trk::PRDtoTrackMap *prd_to_track_map,
                                                  const Trk::CompetingRIOsOnTrack* crot,
                                                  const Trk::TrackStateOnSurface* tsos,
@@ -310,7 +312,13 @@ void InDet::InDetTrackSummaryHelperTool::analyse(const Trk::Track& track,
                                                  std::bitset<Trk::numberOfDetectorTypes>& hitPattern ) const
 {
   // re-produce prior behaviour (i.e. just take most probable ROT)
-  analyse(track, prd_to_track_map,  &crot->rioOnTrack(crot->indexOfMaxAssignProb() ), tsos, information, hitPattern);
+  analyse(ctx,
+          track,
+          prd_to_track_map,
+          &crot->rioOnTrack(crot->indexOfMaxAssignProb()),
+          tsos,
+          information,
+          hitPattern);
 }
 
 void InDet::InDetTrackSummaryHelperTool::searchForHoles(const Trk::Track& track,
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/src/MuonTrackSummaryHelperTool.h b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/src/MuonTrackSummaryHelperTool.h
index 6a45faabff7f..2b072f2b099c 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/src/MuonTrackSummaryHelperTool.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/src/MuonTrackSummaryHelperTool.h
@@ -44,7 +44,9 @@ namespace Muon {
     virtual ~MuonTrackSummaryHelperTool()=default;
         
     virtual StatusCode initialize() override;
-        
+
+    using IExtendedTrackSummaryHelperTool::analyse;    
+    using IExtendedTrackSummaryHelperTool::updateSharedHitCount;    
     virtual void analyse(
                          const Trk::Track& trk,
                          const Trk::RIO_OnTrack* rot,
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/ISF_FatrasRecoTools/ISF_TrackSummaryHelperTool.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/ISF_FatrasRecoTools/ISF_TrackSummaryHelperTool.h
index 7790f808ca3a..f1478e30d46c 100644
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/ISF_FatrasRecoTools/ISF_TrackSummaryHelperTool.h
+++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/ISF_FatrasRecoTools/ISF_TrackSummaryHelperTool.h
@@ -44,6 +44,8 @@ namespace iFatras {
         Output: Changes in information and hitPattern
         Input quantities rot, tsos are used to increment the counts for hits and outliers in information and to set the proper bits in hitPattern.
     */
+    using IExtendedTrackSummaryHelperTool::analyse;
+    using IExtendedTrackSummaryHelperTool::updateSharedHitCount;
     virtual void analyse(const Trk::Track& track,
                          const Trk::PRDtoTrackMap *prd_to_track_map,
                          const Trk::RIO_OnTrack* rot,
diff --git a/Tracking/TrkTools/TrkToolInterfaces/TrkToolInterfaces/IExtendedTrackSummaryHelperTool.h b/Tracking/TrkTools/TrkToolInterfaces/TrkToolInterfaces/IExtendedTrackSummaryHelperTool.h
index a719c233e085..2fd7cec77d5d 100644
--- a/Tracking/TrkTools/TrkToolInterfaces/TrkToolInterfaces/IExtendedTrackSummaryHelperTool.h
+++ b/Tracking/TrkTools/TrkToolInterfaces/TrkToolInterfaces/IExtendedTrackSummaryHelperTool.h
@@ -1,19 +1,17 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef IEXTENDEDTRACKSUMMARYHELPERTOOL
 #define IEXTENDEDTRACKSUMMARYHELPERTOOL
 
-
+#include "TrkToolInterfaces/ITrackSummaryHelperTool.h"
+#include "GaudiKernel/EventContext.h"
 #include "GaudiKernel/IAlgTool.h"
+#include "GaudiKernel/ThreadLocalContext.h"
 #include <vector>
 #include <bitset>
 
-// @TODO remove once interface without PRDtoTrackMap argument is retired.
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Woverloaded-virtual"
-#include "TrkToolInterfaces/ITrackSummaryHelperTool.h"
 
 class Identifier;
 
@@ -35,43 +33,105 @@ namespace Trk {
     @author Edward Moyse, Martin Siebel <http://consult.cern.ch/xwho>
 */
 
-  class IExtendedTrackSummaryHelperTool : virtual public ITrackSummaryHelperTool {
+  class IExtendedTrackSummaryHelperTool : virtual public ITrackSummaryHelperTool
+  {
   public:
     static const InterfaceID& interfaceID();
 
-  /** fill 'information' and 'hitpattern' using information from 'rot'. Should be overloaded by concrete
-    TrackSummaryHelperTools. It is mandatory that the RIO_OnTrack* points to exactly the object contained
-      inside the TrackStateOnSurface. This is to avoid that the RTTI from the TrackSummaryTool is done twice.
-        */
-      virtual void analyse(const Trk::Track& track,
-                           const Trk::PRDtoTrackMap *prd_to_track_map,
-                           const RIO_OnTrack* rot,
-                           const TrackStateOnSurface* tsos,
-                           std::vector<int>& information,
-                           std::bitset<Trk::numberOfDetectorTypes>& hitPattern ) const = 0;
-
-      virtual void analyse(const Trk::Track& track,
-                           const Trk::PRDtoTrackMap *prd_to_track_map,
-                           const CompetingRIOsOnTrack* crot,
-                           const TrackStateOnSurface* tsos,
-                           std::vector<int>& information,
-                           std::bitset<Trk::numberOfDetectorTypes>& hitPattern ) const = 0;
-
-      virtual void updateSharedHitCount(const Trk::Track&,
-                                        const Trk::PRDtoTrackMap *prd_to_track_map,
-                                        Trk::TrackSummary&) const  = 0 ;
-
-    virtual void addDetailedTrackSummary(const Track& track, Trk::TrackSummary& summary ) const = 0;
-
-
-
+    /** fill 'information' and 'hitpattern' using information from 'rot'. Should
+      be overloaded by concrete TrackSummaryHelperTools. It is mandatory that
+      the RIO_OnTrack* points to exactly the object contained inside the
+      TrackStateOnSurface. This is to avoid that the RTTI from the
+      TrackSummaryTool is done twice.
+      */
+    using ITrackSummaryHelperTool::analyse;
+    using ITrackSummaryHelperTool::updateSharedHitCount;
+    using ITrackSummaryHelperTool::addDetailedTrackSummary;
+
+    /*
+     * First the context aware methods.
+     * If this set is not overloaded , it
+     * will call the methods without EventContext
+     */
+
+    virtual void analyse(
+      const EventContext& ctx,
+      const Trk::Track& track,
+      const Trk::PRDtoTrackMap* prd_to_track_map,
+      const RIO_OnTrack* rot,
+      const TrackStateOnSurface* tsos,
+      std::vector<int>& information,
+      std::bitset<Trk::numberOfDetectorTypes>& hitPattern) const
+    {
+      (void)(ctx);
+      analyse(track, prd_to_track_map, rot, tsos, information, hitPattern);
+    }
+
+    virtual void analyse(
+      const EventContext& ctx,
+      const Trk::Track& track,
+      const Trk::PRDtoTrackMap* prd_to_track_map,
+      const CompetingRIOsOnTrack* crot,
+      const TrackStateOnSurface* tsos,
+      std::vector<int>& information,
+      std::bitset<Trk::numberOfDetectorTypes>& hitPattern) const
+    {
+      (void)(ctx);
+      analyse(track, prd_to_track_map, crot, tsos, information, hitPattern);
+    }
+
+    /*
+     * The context unaware methods.
+     * If this set is not overloaded , it
+     * will call the methods with EventContext
+     */
+
+    virtual void analyse(
+      const Trk::Track& track,
+      const Trk::PRDtoTrackMap* prd_to_track_map,
+      const RIO_OnTrack* rot,
+      const TrackStateOnSurface* tsos,
+      std::vector<int>& information,
+      std::bitset<Trk::numberOfDetectorTypes>& hitPattern) const
+    {
+      analyse(Gaudi::Hive::currentContext(),
+              track,
+              prd_to_track_map,
+              rot,
+              tsos,
+              information,
+              hitPattern);
+    }
+
+    virtual void analyse(
+      const Trk::Track& track,
+      const Trk::PRDtoTrackMap* prd_to_track_map,
+      const CompetingRIOsOnTrack* crot,
+      const TrackStateOnSurface* tsos,
+      std::vector<int>& information,
+      std::bitset<Trk::numberOfDetectorTypes>& hitPattern) const
+    {
+      analyse(Gaudi::Hive::currentContext(),
+              track,
+              prd_to_track_map,
+              crot,
+              tsos,
+              information,
+              hitPattern);
+    }
+
+    virtual void updateSharedHitCount(
+      const Trk::Track&,
+      const Trk::PRDtoTrackMap* prd_to_track_map,
+      Trk::TrackSummary&) const = 0;
+
+    virtual void addDetailedTrackSummary(const Track& track,
+                                         Trk::TrackSummary& summary) const = 0;
   };
   inline const InterfaceID& Trk::IExtendedTrackSummaryHelperTool::interfaceID()
   {
     return IID_ITrackSummaryHelperTool;
   }
 
-
 }
-#pragma GCC diagnostic pop
 #endif
diff --git a/Tracking/TrkTools/TrkTrackSummaryTool/TrkTrackSummaryTool/TrackSummaryTool.h b/Tracking/TrkTools/TrkTrackSummaryTool/TrkTrackSummaryTool/TrackSummaryTool.h
index 9014d072681f..405062de0b39 100755
--- a/Tracking/TrkTools/TrkTrackSummaryTool/TrkTrackSummaryTool/TrackSummaryTool.h
+++ b/Tracking/TrkTools/TrkTrackSummaryTool/TrkTrackSummaryTool/TrackSummaryTool.h
@@ -6,8 +6,8 @@
 #define TRKTRACKSUMMARYTOOL_H
 
 #include "AthenaBaseComps/AthAlgTool.h"
-#include "CxxUtils/checker_macros.h"
 #include "GaudiKernel/ToolHandle.h"
+#include "GaudiKernel/EventContext.h"
 #include "TrkParameters/TrackParameters.h"
 #include "TrkTrack/Track.h"
 #include "TrkTrackSummary/TrackSummary.h"
@@ -277,7 +277,8 @@ private:
 
   /**loops over TrackStatesOnSurface and uses this to produce the summary
      information Fills 'information', 'eProbability', and 'hitPattern'*/
-  void processTrackStates(const Track& track,
+  void processTrackStates(const EventContext& ctx,
+                          const Track& track,
                           const Trk::PRDtoTrackMap* prd_to_track_map,
                           const DataVector<const TrackStateOnSurface>* tsos,
                           std::vector<int>& information,
@@ -285,7 +286,8 @@ private:
                           bool doHolesInDet,
                           bool doHolesMuon) const;
 
-  void processMeasurement(const Track& track,
+  void processMeasurement(const EventContext& ctx,
+                          const Track& track,
                           const Trk::PRDtoTrackMap* prd_to_track_map,
                           const Trk::MeasurementBase* meas,
                           const Trk::TrackStateOnSurface* tsos,
diff --git a/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx b/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx
index 3b081fddc069..7b4ae59a39dd 100755
--- a/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx
+++ b/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx
@@ -19,6 +19,7 @@
 #include "TrkGeometry/TrackingVolume.h"
 #include "TrkParameters/TrackParameters.h"
 
+
 #include <cassert>
 #include <vector>
 #include <algorithm>
@@ -282,12 +283,20 @@ std::vector<float> eProbability(numberOfeProbabilityTypes, 0.5);
 
   ATH_MSG_DEBUG ("Produce summary for: "<<track.info().dumpInfo());
 
+
+  const EventContext& ctx= Gaudi::Hive::currentContext();
   if (track.trackStateOnSurfaces()!=nullptr)
   {
     information[Trk::numberOfOutliersOnTrack] = 0;
-    processTrackStates(track,prd_to_track_map, track.trackStateOnSurfaces(), information, hitPattern,
-                       doHolesInDet, doHolesMuon);
-  }else{
+    processTrackStates(ctx,
+                       track,
+                       prd_to_track_map,
+                       track.trackStateOnSurfaces(),
+                       information,
+                       hitPattern,
+                       doHolesInDet,
+                       doHolesMuon);
+  } else {
     ATH_MSG_WARNING ("Null pointer to TSoS found on Track (author = "
       <<track.info().dumpInfo()<<"). This should never happen! ");
   }
@@ -400,16 +409,20 @@ void Trk::TrackSummaryTool::updateAdditionalInfo(const Track& track, const Trk::
  * Then the internal helpers
  */
 
-void Trk::TrackSummaryTool::processTrackStates(const Track& track,
-                                               const Trk::PRDtoTrackMap *prd_to_track_map,
-					       const DataVector<const TrackStateOnSurface>* tsos,
-					       std::vector<int>& information,
-					       std::bitset<numberOfDetectorTypes>& hitPattern,
-                                               bool doHolesInDet,
-                                               bool doHolesMuon) const
+void
+Trk::TrackSummaryTool::processTrackStates(
+  const EventContext& ctx,
+  const Track& track,
+  const Trk::PRDtoTrackMap* prd_to_track_map,
+  const DataVector<const TrackStateOnSurface>* tsos,
+  std::vector<int>& information,
+  std::bitset<numberOfDetectorTypes>& hitPattern,
+  bool doHolesInDet,
+  bool doHolesMuon) const
 {
   ATH_MSG_DEBUG ("Starting to process " << tsos->size() << " track states");
 
+
   int measCounter = 0;
   int cntAddChi2 = 0;
   float chi2Sum = 0;
@@ -426,7 +439,7 @@ void Trk::TrackSummaryTool::processTrackStates(const Track& track,
       } else {
         if ((*it)->type(Trk::TrackStateOnSurface::Outlier)) ++information[Trk::numberOfOutliersOnTrack]; // increment outlier counter
         ATH_MSG_VERBOSE ("analysing TSoS " << measCounter << " of type " << (*it)->dumpType() );
-        processMeasurement(track, prd_to_track_map, measurement, *it, information, hitPattern);
+        processMeasurement(ctx,track, prd_to_track_map, measurement, *it, information, hitPattern);
       } // if have measurement pointer
     } // if type measurement, scatterer or outlier
 
@@ -464,12 +477,13 @@ void Trk::TrackSummaryTool::processTrackStates(const Track& track,
   if (varChi2>0 && varChi2<1.e13) information[Trk::standardDeviationOfChi2OS] = int(sqrt(varChi2)*100);
 }
 
-void Trk::TrackSummaryTool::processMeasurement(const Track& track,
+void Trk::TrackSummaryTool::processMeasurement(const EventContext& ctx,
+                                               const Track& track,
                                                const Trk::PRDtoTrackMap *prd_to_track_map,
-					       const Trk::MeasurementBase* meas,
-					       const Trk::TrackStateOnSurface* tsos,
-					       std::vector<int>& information,
-					       std::bitset<numberOfDetectorTypes>& hitPattern) const
+                                               const Trk::MeasurementBase* meas,
+                                               const Trk::TrackStateOnSurface* tsos,
+                                               std::vector<int>& information,
+                                               std::bitset<numberOfDetectorTypes>& hitPattern) const
 {
 
   // Check if the measurement type is RIO on Track (ROT)
@@ -484,7 +498,7 @@ void Trk::TrackSummaryTool::processMeasurement(const Track& track,
     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);
+      tool->analyse(ctx,track,prd_to_track_map, rot,tsos,information, hitPattern);
     }
   } else {
     //check if the measurement type is CompetingRIOsOnTrack
@@ -501,7 +515,7 @@ void Trk::TrackSummaryTool::processMeasurement(const Track& track,
       if (tool==nullptr){
         ATH_MSG_WARNING("Cannot find tool to match cROT. Skipping.");
       } else {
-        tool->analyse(track,prd_to_track_map, compROT,tsos,information, hitPattern);
+        tool->analyse(ctx,track,prd_to_track_map, compROT,tsos,information, hitPattern);
       }
     }
   }
-- 
GitLab


From cd2525fe6c487ebdcb3e0e951e63a7a536a2086f Mon Sep 17 00:00:00 2001
From: Walter Lampl <Walter.Lampl@cern.ch>
Date: Thu, 8 Oct 2020 09:12:43 +0200
Subject: [PATCH 343/403] LArCellConditions: More fixes for master, switch to
 LArCablingCondAlg, resurrect bad-channel printout

---
 .../python/LArCellConditionsAlg.py            | 75 +++++++++++--------
 1 file changed, 42 insertions(+), 33 deletions(-)

diff --git a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCellConditionsAlg.py b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCellConditionsAlg.py
index f677055139d9..6f221c59fa7a 100644
--- a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCellConditionsAlg.py
+++ b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCellConditionsAlg.py
@@ -80,18 +80,6 @@ class LArCellConditionsAlg(PyAthena.Alg):
             self.msg.error("Failed to get CaloCell_ID")
             return StatusCode.Failure
 
-
-        # -----------------------------------------------------------
-        # Initialize LArCabling service
-        self.larCablingSvc=PyAthena.py_tool("LArCablingLegacyService")
-        if self.larCablingSvc is None:
-            self.msg.error('Problem retrieving LArCablingService pointer !')
-            return StatusCode.Failure
-        else:
-            self.msg.info('retrieved [%s]', self.larCablingSvc.name())
-
-
-
         self.bc_packing=LArBadChanBitPacking()
 
         self.noisepattern=0
@@ -130,13 +118,28 @@ class LArCellConditionsAlg(PyAthena.Alg):
     def execute(self):
         self.msg.info('running execute...')
 
-        #for some obscure reason, we need run dump before we can retrieve the flat objects using their abstract interface
-        garbagedump = open("sgdump.txt", 'w')
-        self._condStore.dump(garbagedump)
-        garbagedump.close()
+        #for debugging purposes:
+        #sgdump = open("sgdump.txt", 'w')
+        #self._condStore.dump(sgdump)
+        #sgdump.close()
 
         eid=ROOT.Gaudi.Hive.currentContext().eventID()
 
+        try:
+            condCont=self._condStore.retrieve("CondCont<LArOnOffIdMapping>","LArOnOffIdMap")
+            self.larCabling=condCont.find(eid)
+        except Exception:
+            print("ERROR, failed to get LArCabling")
+            return StatusCode.Failure
+
+
+        try:
+            condCont=self._condStore.retrieve("CondCont<LArBadChannelCont>","LArBadChannel")
+            self.badChannels=condCont.find(eid)
+        except Exception:
+            print("ERROR, failed to get LArBadChannels")
+            return StatusCode.Failure
+            
         if self.includeConditions:
             try:
                 condCont=self._condStore.retrieve("CondCont<ILArPedestal>","LArPedestal")
@@ -240,9 +243,9 @@ class LArCellConditionsAlg(PyAthena.Alg):
                 t_int=int(rep,10)
                 t=Identifier(c_uint(t_int))
                 if self.onlineID.is_lar(t):
-                    print(t," IsLAr (online)")
+                    print(t.get_identifier32().get_compact()," IsLAr (online)")
                 if self.offlineID.is_lar(t):
-                    print(t," isLAr (offline)")
+                    print(t.get_identifier32().getCompact()," isLAr (offline)")
             except:
                 pass
 
@@ -255,7 +258,7 @@ class LArCellConditionsAlg(PyAthena.Alg):
                 if s==-1:s=0
                 chid=self.getOnlineIDFromString(rep[s:])
                 if chid is not None and self.onlineID.is_lar(chid):
-                    id=self.larCablingSvc.cnvToIdentifier(chid)
+                    id=self.larCabling.cnvToIdentifier(chid)
                     if id is None: id=self.noid
                     self.printChannelInfo(id,chid)
                 else:
@@ -268,7 +271,7 @@ class LArCellConditionsAlg(PyAthena.Alg):
                 if s==-1:s=0
                 id=self.getOfflineIDFromString(rep[s:])
                 if id is not None and self.offlineID.is_lar(id):
-                    chid=self.larCablingSvc.createSignalChannelID(id)
+                    chid=self.larCabling.createSignalChannelID(id)
                     self.printChannelInfo(id,chid)
                 else:
                     print("ERROR: Could not interpret input.")
@@ -278,11 +281,11 @@ class LArCellConditionsAlg(PyAthena.Alg):
             #Try to interpet input as identifiers
             chid=self.getOnlineIDFromString(rep)
             if chid is not None and self.onlineID.is_lar(chid):
-                id=self.larCablingSvc.cnvToIdentifier(chid)
+                id=self.larCabling.cnvToIdentifier(chid)
             else: #try interpret at offline ID
                 id=self.getOfflineIDFromString(rep)
                 if id is not None and self.offlineID.is_lar(id):
-                     chid=self.larCablingSvc.createSignalChannelID(id)
+                     chid=self.larCabling.createSignalChannelID(id)
                      
             if chid is None or id is None:
                 print( "ERROR: Could not interpret input.")
@@ -295,7 +298,8 @@ class LArCellConditionsAlg(PyAthena.Alg):
         return StatusCode.Success
 
     def printChannelInfo(self,id,chid):
-        print(self.IdentifiersToString(chid,id))
+        bc=self.badChannels.status(chid)
+        print(self.IdentifiersToString(chid,id)+ " " + self.bc_packing.stringStatus(bc))
         if id!=self.noid: #Don't try to show anything more for disconnected channels
             if self.includeLocation:
                 try:
@@ -331,8 +335,8 @@ class LArCellConditionsAlg(PyAthena.Alg):
                         ped=-9999
                         pedRMS=-9999
 
-                    print ("Ped: %.3f " % ped,end="")
-                    print ("PedRMS: %.3f" % pedRMS,end="")
+                    print (" Ped: %.3f " % ped,end="")
+                    print (" PedRMS: %.3f" % pedRMS,end="")
 
                     if self.larRamp is not None:
                         ramp=self.larRamp.ADC2DAC(chid,gain)
@@ -348,7 +352,7 @@ class LArCellConditionsAlg(PyAthena.Alg):
                         print (" MphysOverMcal: %.5f" % mpmc,end="")
                     else:
                         print (" MphysOverMcal: None",end="")
-                    print (os.linesep)
+                    print ("")
             if self.includeDSPTh:
                 if self.larDSPThr is not None:
                     tQThr=self.larDSPThr.tQThr(chid)
@@ -412,7 +416,7 @@ class LArCellConditionsAlg(PyAthena.Alg):
             onlName+="FT "+str(ft)+"("+ftname+")/Slot "+str(slot)+"/Chan "+str(chan)
 
             try:
-                calibLines=self.larCablingSvc.calibSlotLine(chid);
+                calibLines=self.larCabling.calibSlotLine(chid);
                 if (len(calibLines)):
                     onlName+="/CL"
                     for calib_chid in calibLines:
@@ -714,7 +718,7 @@ class LArCellConditionsAlg(PyAthena.Alg):
         outfile=None
         layer=None
         cl=None
-        tbl=maketrans(",:;#=","     ");
+        tbl=str.maketrans(",:;#=","     ");
         tokens=[]
         for t in input.translate(tbl).split():
             if len(t):
@@ -811,7 +815,7 @@ class LArCellConditionsAlg(PyAthena.Alg):
                     print("Unknown Keyword",tokens[i]    )
             i=i+1
 
-        print("Searching for cells with",end="")
+        print("Searching for cells with ",end="")
         if eta is not None: print(" %.3f <= eta <= %.3f" % (eta[0],eta[1]),end="")
         if phi is not None: print(" %.3f <= phi <= %.3f" % (phi[0],phi[1]),end="")
         if layer is not None: print(" %.0f <= layer <= %.0f" % (layer[0],layer[1]),end="")
@@ -855,9 +859,14 @@ class LArCellConditionsAlg(PyAthena.Alg):
         #for idH in range(self.offlineID.calo_cell_hash_max()): //This one includes also tile cells
         for idH in range(182468):
             idHash=IdentifierHash(idH)
-            chid=self.larCablingSvc.createSignalChannelIDFromHash(idHash)
+            chid=self.larCabling.createSignalChannelIDFromHash(idHash)
             
             #print ("Loop hash=%i , on: %x , off: %x" % (idH, chid.get_identifier32().get_compact(), self.offlineID.cell_id(idHash).get_identifier32().get_compact()))
+            #Check Bad-Channel Status
+            bcstat=self.badChannels.status(chid)
+            if bctypes!=0:
+                bcw=bcstat.packedData()
+                if bcw & bctypes == 0: continue
 
                     
             #Check Online Id
@@ -868,7 +877,7 @@ class LArCellConditionsAlg(PyAthena.Alg):
 
             if cl is not None:
                 try:
-                    calibLines=self.larCablingSvc.calibSlotLine(chid);
+                    calibLines=self.larCabling.calibSlotLine(chid);
                     keep=False
                     for foundCLs in calibLines:
                         if self.onlineID.channel(foundCLs) == cl:
@@ -891,13 +900,13 @@ class LArCellConditionsAlg(PyAthena.Alg):
                 p=theDDE.phi()
                 if eta is not None and (e<eta[0] or e>eta[1]): continue
                 if phi is not None and (p<phi[0] or p>phi[1]): continue
-                ep=" eta=%.3f phi=%.3f" % (e,p)
+                ep=" eta=%.3f phi=%.3f " % (e,p)
                 
             id=self.offlineID.cell_id(idHash)
             if subcalo is not None and subcalo!=self.offlineID.sub_calo(id): continue
             if layer is not None and (self.offlineID.sampling(id)<layer[0] or self.offlineID.sampling(id)>layer[1]): continue
 
-            br=self.output(self.IdentifiersToString(chid,id) + " " +ep,outfile)
+            br=self.output(self.IdentifiersToString(chid,id) + " " +ep+self.bc_packing.stringStatus(bcstat),outfile)
             if br: break
             
         if outfile is not None: outfile.close()
-- 
GitLab


From 9aed8159bc7e456fcd1886d3bf304a9ccf03eb3f Mon Sep 17 00:00:00 2001
From: Walter Lampl <Walter.Lampl@cern.ch>
Date: Thu, 8 Oct 2020 11:14:33 +0200
Subject: [PATCH 344/403] remove CaloSampleEnergies.[h,cxx]

---
 .../CaloUtils/CaloUtils/CaloSampleEnergies.h  | 76 -------------------
 .../CaloUtils/src/CaloSampleEnergies.cxx      | 29 -------
 2 files changed, 105 deletions(-)
 delete mode 100644 Calorimeter/CaloUtils/CaloUtils/CaloSampleEnergies.h
 delete mode 100644 Calorimeter/CaloUtils/src/CaloSampleEnergies.cxx

diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloSampleEnergies.h b/Calorimeter/CaloUtils/CaloUtils/CaloSampleEnergies.h
deleted file mode 100644
index 5c5abf2f1587..000000000000
--- a/Calorimeter/CaloUtils/CaloUtils/CaloSampleEnergies.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef CALOUTILS_CALOSAMPLEENERGIRES_H
-#define CALOUTILS_CALOSAMPLEENERGIRES_H
-
-/*   Purpose:	Given a CaloTower, CaloCluster, or iterator pair of
-	        CaloCells, return a vector of energy in each sampling 
-*/
-
-#include "CaloEvent/CaloCell.h" 
-#include "CaloGeoHelpers/CaloSampling.h" 
-
-class CaloTower;
-class CaloCluster; 
-
-#include <vector>
-#include <math.h>
-
-class CaloSampleEnergies
-{
-
- public:
-
-  typedef  std::vector<double>                  E_VECTOR ; 
-  typedef  E_VECTOR::const_iterator             E_ITERATOR;
-
-  CaloSampleEnergies( );
-  ~CaloSampleEnergies();
-
-  /** Return energy in each Sampling for CaloTower
-  */ 
-  const E_VECTOR& getEnergies(const CaloTower*) ; 
-  /** Return energy in each Sampling for CaloCluster
-  */ 
-  const E_VECTOR& getEnergies(const CaloCluster*) ; 
-
-  /** Return energy in each Sampling for a pair of interators
-  */ 
-  template <class ITER > 
-  const E_VECTOR& getEnergies( ITER t1, ITER t2); 
-
- private: 
-  E_VECTOR m_vec ; 
-
-};
-
-template <class ITER> 
-const CaloSampleEnergies::E_VECTOR& CaloSampleEnergies::getEnergies(ITER it1, 
-							ITER it2)
-{
-
- int nEntry = CaloSampling::Unknown ; 
-
- for(int i=0; i<nEntry; ++i) m_vec[i]=0; 
-
- for(; it1!=it2;++it1) 
- {
-  const CaloCell* cell   = *it1; 
-  int sam = cell->caloDDE()->getSampling();
-  m_vec[sam] += cell->energy(); 
- }
-
- return m_vec;
-
-} 
-
-#endif
-
-
-
-
-
-
-
diff --git a/Calorimeter/CaloUtils/src/CaloSampleEnergies.cxx b/Calorimeter/CaloUtils/src/CaloSampleEnergies.cxx
deleted file mode 100644
index 17d261744d6f..000000000000
--- a/Calorimeter/CaloUtils/src/CaloSampleEnergies.cxx
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include "CaloUtils/CaloSampleEnergies.h" 
-#include "CaloEvent/CaloTower.h"
-#include "CaloEvent/CaloCluster.h"
-
-// constructor
-CaloSampleEnergies::CaloSampleEnergies() : m_vec((int)(CaloSampling::Unknown))
-{  }
-
-// destructor 
-CaloSampleEnergies::~CaloSampleEnergies() { }  
-
-
-// CaloTower
-const CaloSampleEnergies::E_VECTOR& 
-   CaloSampleEnergies::getEnergies( const CaloTower*  obj ) 
-{
-   return getEnergies(obj->cell_begin(),obj->cell_end() ); 
-} 
-
-// CaloCluster
-const CaloSampleEnergies::E_VECTOR& 
-   CaloSampleEnergies::getEnergies( const CaloCluster* obj ) 
-{
-   return getEnergies(obj->cell_begin(),obj->cell_end() ); 
-} 
-- 
GitLab


From 464bb6c9eaab752535c289fde4507b887de6f591 Mon Sep 17 00:00:00 2001
From: Walter Lampl <Walter.Lampl@cern.ch>
Date: Thu, 8 Oct 2020 11:17:17 +0200
Subject: [PATCH 345/403] Remove CaloCellESort, CaloCellEtSelector,
 CaloCellESelector

---
 .../CaloUtils/CaloUtils/CaloCellESelector.h   | 27 -------------
 .../CaloUtils/CaloUtils/CaloCellESort.h       | 40 -------------------
 .../CaloUtils/CaloUtils/CaloCellEtSelector.h  | 27 -------------
 .../CaloUtils/src/CaloCellESelector.cxx       | 24 -----------
 .../CaloUtils/src/CaloCellEtSelector.cxx      | 24 -----------
 5 files changed, 142 deletions(-)
 delete mode 100644 Calorimeter/CaloUtils/CaloUtils/CaloCellESelector.h
 delete mode 100644 Calorimeter/CaloUtils/CaloUtils/CaloCellESort.h
 delete mode 100644 Calorimeter/CaloUtils/CaloUtils/CaloCellEtSelector.h
 delete mode 100644 Calorimeter/CaloUtils/src/CaloCellESelector.cxx
 delete mode 100644 Calorimeter/CaloUtils/src/CaloCellEtSelector.cxx

diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloCellESelector.h b/Calorimeter/CaloUtils/CaloUtils/CaloCellESelector.h
deleted file mode 100644
index ce75755be268..000000000000
--- a/Calorimeter/CaloUtils/CaloUtils/CaloCellESelector.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef CALOUTILS_CALOCELLESELECTOR_H
-#define CALOUTILS_CALOCELLESELECTOR_H
-
-#include "CaloInterface/ICaloCellSelector.h"
-
-class CaloCell;
-
-class CaloCellESelector : public ICaloCellSelector
-{
- public:
-
-  CaloCellESelector();
-  CaloCellESelector(double minE, double maxE=-1.);
-
-  virtual ~CaloCellESelector();
-
-  virtual bool accept(const CaloCell* aCell) const;
-
- private:
-
-  double m_minE, m_maxE;
-};
-#endif
diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloCellESort.h b/Calorimeter/CaloUtils/CaloUtils/CaloCellESort.h
deleted file mode 100644
index 0a367a1d7e63..000000000000
--- a/Calorimeter/CaloUtils/CaloUtils/CaloCellESort.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef CALOCELLESORT_H
-#define CALOCELLESORT_H
-//-----------------------------------------------------------------------
-// File and Version Information:
-// $Id: CaloCellESort.h,v 1.1 2005-06-14 20:33:49 menke Exp $
-//
-// Description: E sorting for CaloCell 
-//   
-// Environment:
-//      Software developed for the ATLAS Detector at the CERN LHC
-//
-// Author List:
-//      Sven Menke
-//
-//-----------------------------------------------------------------------
-
-#include "CaloEvent/CaloCell.h"
-
-namespace CaloCellESort{
-// comparison,  order Cell by E
-class compare
- {
-
-  public:
-  inline   compare() {} ;
-  inline   bool operator () (const CaloCell* c1, 
-			     const CaloCell* c2)
-  {
-    return c1->e() > c2->e() ;
-  }  
-  
- };
-}
-
-#endif // CALOCELLESORT_H
-
diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloCellEtSelector.h b/Calorimeter/CaloUtils/CaloUtils/CaloCellEtSelector.h
deleted file mode 100644
index 33f7c82aff4d..000000000000
--- a/Calorimeter/CaloUtils/CaloUtils/CaloCellEtSelector.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef CALOUTILS_CALOCELLETSELECTOR_H
-#define CALOUTILS_CALOCELLETSELECTOR_H
-
-#include "CaloInterface/ICaloCellSelector.h"
-
-class CaloCell;
-
-class CaloCellEtSelector : public ICaloCellSelector
-{
- public:
-
-  CaloCellEtSelector();
-  CaloCellEtSelector(double minEt, double maxEt=-1.);
-
-  virtual ~CaloCellEtSelector();
-
-  virtual bool accept(const CaloCell* aCell) const;
-
- private:
-
-  double m_minEt, m_maxEt;
-};
-#endif
diff --git a/Calorimeter/CaloUtils/src/CaloCellESelector.cxx b/Calorimeter/CaloUtils/src/CaloCellESelector.cxx
deleted file mode 100644
index 803a9ca9ac79..000000000000
--- a/Calorimeter/CaloUtils/src/CaloCellESelector.cxx
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-
-#include "CaloEvent/CaloCell.h"
-
-#include "CaloUtils/CaloCellESelector.h"
-
-CaloCellESelector::CaloCellESelector(double minE,double maxE)
-  : ICaloCellSelector()
-  , m_minE(minE), m_maxE(maxE)
-{ }
-
-CaloCellESelector::~CaloCellESelector()
-{ }
-
-bool CaloCellESelector::accept(const CaloCell* aCell) const
-{
-  if (!aCell) return false;
-  return m_maxE > m_minE
-    ? aCell->e() >= m_minE && aCell->e() <= m_maxE
-    : aCell->e() >= m_minE;
-}
diff --git a/Calorimeter/CaloUtils/src/CaloCellEtSelector.cxx b/Calorimeter/CaloUtils/src/CaloCellEtSelector.cxx
deleted file mode 100644
index 88641f7a994c..000000000000
--- a/Calorimeter/CaloUtils/src/CaloCellEtSelector.cxx
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
-
-
-#include "CaloEvent/CaloCell.h"
-
-#include "CaloUtils/CaloCellEtSelector.h"
-
-CaloCellEtSelector::CaloCellEtSelector(double minEt,double maxEt)
-  : ICaloCellSelector()
-  , m_minEt(minEt), m_maxEt(maxEt)
-{ }
-
-CaloCellEtSelector::~CaloCellEtSelector()
-{ }
-
-bool CaloCellEtSelector::accept(const CaloCell* aCell) const
-{
-  if (!aCell) return false;
-  return m_maxEt > m_minEt && aCell != nullptr 
-    ? aCell->et() >= m_minEt && aCell->et() <= m_maxEt
-    : aCell->et() >= m_minEt;
-}
-- 
GitLab


From e777423099d3337201e48233ab4e8c7eba97b298 Mon Sep 17 00:00:00 2001
From: Walter Lampl <Walter.Lampl@cern.ch>
Date: Thu, 8 Oct 2020 11:20:00 +0200
Subject: [PATCH 346/403] Remove CaloCellSamplingAcceptor and
 CaloCellSamplingRejector

---
 .../CaloUtils/CaloCellSamplingAcceptor.h      | 48 --------------
 .../CaloUtils/CaloCellSamplingRejector.h      | 47 --------------
 .../CaloUtils/CaloCellSamplingSelectorBase.h  | 63 -------------------
 3 files changed, 158 deletions(-)
 delete mode 100644 Calorimeter/CaloUtils/CaloUtils/CaloCellSamplingAcceptor.h
 delete mode 100644 Calorimeter/CaloUtils/CaloUtils/CaloCellSamplingRejector.h
 delete mode 100644 Calorimeter/CaloUtils/CaloUtils/CaloCellSamplingSelectorBase.h

diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloCellSamplingAcceptor.h b/Calorimeter/CaloUtils/CaloUtils/CaloCellSamplingAcceptor.h
deleted file mode 100644
index 36a9ea5711c1..000000000000
--- a/Calorimeter/CaloUtils/CaloUtils/CaloCellSamplingAcceptor.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef CALOUTILS_CALOCELLSAMPLINGACCEPTOR_H
-#define CALOUTILS_CALOCELLSAMPLINGACCEPTOR_H
-
-#include "CaloUtils/CaloCellSamplingSelectorBase.h"
-
-template<typename LIST>
-class CaloCellSamplingAcceptor 
-  : public CaloCellSamplingSelectorBase<LIST>
-{
-
-public:
-
-  CaloCellSamplingAcceptor();
-  CaloCellSamplingAcceptor(const LIST& samplings);
-  virtual ~CaloCellSamplingAcceptor() { };
-
-protected:
-
-  virtual bool checkSampling(const CaloSampling::CaloSample& aSampling) const;
-
-};
-
-template<typename LIST>
-CaloCellSamplingAcceptor<LIST>::CaloCellSamplingAcceptor()
-  : CaloCellSamplingSelectorBase<LIST>()
-{ }
-
-template<typename LIST>
-CaloCellSamplingAcceptor<LIST>::CaloCellSamplingAcceptor(const LIST&
-							 samplings)
-  : CaloCellSamplingSelectorBase<LIST>(samplings)
-{ }
-
-
-template<typename LIST>
-bool 
-CaloCellSamplingAcceptor<LIST>::checkSampling(const CaloSampling::CaloSample&
-					      aSampling) const
-{
-  return 
-    std::find(this->m_listOfSamplings.begin(),this->m_listOfSamplings.end(),aSampling) 
-    != this->m_listOfSamplings.end();
-}
-#endif
diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloCellSamplingRejector.h b/Calorimeter/CaloUtils/CaloUtils/CaloCellSamplingRejector.h
deleted file mode 100644
index b78ec6708a60..000000000000
--- a/Calorimeter/CaloUtils/CaloUtils/CaloCellSamplingRejector.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef CALOUTILS_CALOCELLSAMPLINGREJECTOR_H
-#define CALOUTILS_CALOCELLSAMPLINGREJECTOR_H
-
-#include "CaloUtils/CaloCellSamplingSelectorBase.h"
-
-template<typename LIST>
-class CaloCellSamplingRejector 
-  : public CaloCellSamplingSelectorBase<LIST>
-{
-
-public:
-
-  CaloCellSamplingRejector();
-  CaloCellSamplingRejector(const LIST& samplings);
-  virtual ~CaloCellSamplingRejector() { };
-
-protected:
-
-  virtual bool checkSampling(const CaloSampling::CaloSample& aSampling) const;
-};
-
-template<typename LIST>
-CaloCellSamplingRejector<LIST>::CaloCellSamplingRejector()
-  : CaloCellSamplingSelectorBase<LIST>()
-{ }
-
-template<typename LIST>
-CaloCellSamplingRejector<LIST>::CaloCellSamplingRejector(const LIST&
-							 samplings)
-  : CaloCellSamplingSelectorBase<LIST>(samplings)
-{ }
-
-
-template<typename LIST>
-bool 
-CaloCellSamplingRejector<LIST>::checkSampling(const CaloSampling::CaloSample&
-					      aSampling) const
-{
-  return 
-    std::find(this->m_listOfSamplings.begin(),this->m_listOfSamplings.end(),aSampling)
-    == this->m_listOfSamplings.end();
-}
-#endif
diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloCellSamplingSelectorBase.h b/Calorimeter/CaloUtils/CaloUtils/CaloCellSamplingSelectorBase.h
deleted file mode 100644
index d03f3001c67a..000000000000
--- a/Calorimeter/CaloUtils/CaloUtils/CaloCellSamplingSelectorBase.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef CALOUTILS_CALOCELLSAMPLINGSELECTORBASE_H
-#define CALOUTILS_CALOCELLSAMPLINGSELECTORBASE_H
-
-#include "CaloInterface/ICaloCellSelector.h"
-
-#include "CaloGeoHelpers/CaloSampling.h"
-
-#include <algorithm>
-#include <iterator>
-
-class CaloCell;
-
-template<typename LIST>
-class CaloCellSamplingSelectorBase : virtual public ICaloCellSelector
-{
-public:
-
-  CaloCellSamplingSelectorBase();
-  CaloCellSamplingSelectorBase(const LIST& samplings);
-
-  virtual ~CaloCellSamplingSelectorBase();
-
-  virtual bool accept(const CaloCell* pCell) const;
-
-protected:
-
-  LIST m_listOfSamplings;
-
-  virtual bool 
-  checkSampling(const CaloSampling::CaloSample& aSampling) const = 0;
-
-};
-
-template<typename LIST>
-CaloCellSamplingSelectorBase<LIST>::CaloCellSamplingSelectorBase()
-{ }
-
-template<typename LIST>
-CaloCellSamplingSelectorBase<LIST>::
-CaloCellSamplingSelectorBase(const LIST& samplings)
-{
-  std::copy(samplings.begin(),samplings.end(),
-	    std::back_insert_iterator<LIST>(m_listOfSamplings));
-}
-
-template<typename LIST>
-CaloCellSamplingSelectorBase<LIST>::~CaloCellSamplingSelectorBase()
-{ }
-
-template<typename LIST>
-bool
-CaloCellSamplingSelectorBase<LIST>::accept(const CaloCell* pCell) const
-{
-  CaloSampling::CaloSample theSampling = pCell->caloDDE()->getSampling();
-  return theSampling != CaloSampling::Unknown 
-    ? this->checkSampling(theSampling)
-    : false;
-}
-#endif
-- 
GitLab


From 1348f792a14464a59b0cfa807d8db7379b7c3d20 Mon Sep 17 00:00:00 2001
From: Ivan Sayago Galvan <ivan.sayago.galvan@cern.ch>
Date: Thu, 8 Oct 2020 10:23:14 +0000
Subject: [PATCH 347/403] Update
 TileCalorimeter/TileMonitoring/python/TileTMDBDigitsMonitorAlgorithm.py

---
 .../python/TileTMDBDigitsMonitorAlgorithm.py  | 78 +------------------
 1 file changed, 1 insertion(+), 77 deletions(-)

diff --git a/TileCalorimeter/TileMonitoring/python/TileTMDBDigitsMonitorAlgorithm.py b/TileCalorimeter/TileMonitoring/python/TileTMDBDigitsMonitorAlgorithm.py
index 34172705d2c7..e056dc41f0c1 100644
--- a/TileCalorimeter/TileMonitoring/python/TileTMDBDigitsMonitorAlgorithm.py
+++ b/TileCalorimeter/TileMonitoring/python/TileTMDBDigitsMonitorAlgorithm.py
@@ -16,81 +16,15 @@ def TileTMDBDigitsMonitoringConfig(flags):
     from TileConditions.TileCablingSvcConfig import TileCablingSvcCfg
     result.merge( TileCablingSvcCfg(flags) )
 
-    
-    ### STEP 1 ###
-    # If you need to set up special tools, etc., you will need your own ComponentAccumulator;
-    # uncomment the following 2 lines and use the last three lines of this function instead of the ones
-    # just before
-    # from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
-    # result = ComponentAccumulator()
-
-    # The following class will make a sequence, configure algorithms, and link
-    # them to GenericMonitoringTools
     from AthenaMonitoring import AthMonitorCfgHelper
     helper = AthMonitorCfgHelper(flags, 'TileTMDBDigitsMonitoring')
 
 
-    ### STEP 2 ###
-    # Adding an algorithm to the helper. Here, we will use the example 
-    # algorithm in the AthenaMonitoring package. Just pass the type to the 
-    # helper. Then, the helper will instantiate an instance and set up the 
-    # base class configuration following the flags. The returned object 
-    # is the algorithm.
     from AthenaConfiguration.ComponentFactory import CompFactory
     tileTMDBDigitsMonAlg = helper.addAlgorithm(CompFactory.TileTMDBDigitsMonitorAlgorithm, 'TileTMDBDigitsMonAlg')
-    
-
-    # # If for some really obscure reason you need to instantiate an algorithm
-    # # yourself, the AddAlgorithm method will still configure the base 
-    # # properties and add the algorithm to the monitoring sequence.
-    # helper.AddAlgorithm(myExistingAlg)
 
-
-    ### STEP 3 ###
-    # Edit properties of a algorithm
-    # some generic property
-    # tileTMDBDigitsMonAlg.RandomHist = True
-    # to enable a trigger filter, for example:
-    # tileTMDBDigitsMonAlg.TriggerChain = 'HLT_mu26_ivarmedium'
     tileTMDBDigitsMonAlg.TriggerChain = ''
 
-    ### STEP 4 ###
-    # Add some tools. N.B. Do not use your own trigger decion tool. Use the
-    # standard one that is included with AthMonitorAlgorithm.
-
-    # # First, add a tool that's set up by a different configuration function. 
-    # # In this case, CaloNoiseToolCfg returns its own component accumulator, 
-    # # which must be merged with the one from this function.
-    # from CaloTools.CaloNoiseToolConfig import CaloNoiseToolCfg
-    # caloNoiseAcc, caloNoiseTool = CaloNoiseToolCfg(flags)
-    # result.merge(caloNoiseAcc)
-    # tileTMDBDigitsMonAlg.CaloNoiseTool = caloNoiseTool
-
-    # # Then, add a tool that doesn't have its own configuration function. In
-    # # this example, no accumulator is returned, so no merge is necessary.
-    # from MyDomainPackage.MyDomainPackageConf import MyDomainTool
-    # tileTMDBDigitsMonAlg.MyDomainTool = MyDomainTool()
-
-    # Add a generic monitoring tool (a "group" in old language). The returned 
-    # object here is the standard GenericMonitoringTool.
-    # myGroup = helper.addGroup(
-    #     tileTMDBDigitsMonAlg,
-    #     'ExampleMonitor',
-    #     'OneRing/'
-    #)
-
-    # Add a GMT for the other example monitor algorithm
-    # anotherGroup = helper.addGroup(anotherExampleMonAlg,'ExampleMonitor')
-
-
-    # Configure histogram with tileTMDBDigitsMonAlg algorithm execution time
-
-
-
-    ### STEP 5 ###
-    # Configure histograms
-
-
 
     run = str(flags.Input.RunNumber[0])
     from TileMonitoring.TileMonitoringCfgHelper import addTileTMDB_1DHistogramsArray, addTileTMDB_2DHistogramsArray
@@ -127,14 +61,6 @@ def TileTMDBDigitsMonitoringConfig(flags):
                                     xbins = 101, xmin = -0.5, xmax = 100.5)
 
 
-    ### STEP 6 ###
-    # Finalize. The return value should be a tuple of the ComponentAccumulator
-    # and the sequence containing the created algorithms. If we haven't called
-    # any configuration other than the AthMonitorCfgHelper here, then we can 
-    # just return directly (and not create "result" above)
-    # return helper.result()
-    
-    # # Otherwise, merge with result object and return
     accumalator = helper.result()
     result.merge(accumalator)
     return result
@@ -164,9 +90,8 @@ if __name__=='__main__':
 
     # Initialize configuration object, add accumulator, merge, and run.
     from AthenaConfiguration.MainServicesConfig import MainServicesCfg 
-    # from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
     cfg = MainServicesCfg(ConfigFlags)
-    # cfg.merge(PoolReadCfg(ConfigFlags))
+
 
     from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
     tileTypeNames = ['TileDigitsContainer/MuRcvDigitsCnt']
@@ -187,5 +112,4 @@ if __name__=='__main__':
     sc = cfg.run(maxEvents=-1)
 
     import sys
-    # Success should be 0
     sys.exit(not sc.isSuccess())
-- 
GitLab


From 842a4d48f4ecb34bad3b990c9df8b6e640590a88 Mon Sep 17 00:00:00 2001
From: Oleg Kuprash <oleg.kuprash@cern.ch>
Date: Thu, 8 Oct 2020 13:20:00 +0200
Subject: [PATCH 348/403] Python 3 fix

---
 .../TrigAnalysisTest/bin/checkFileTrigSize_RTT.py           | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Trigger/TrigValidation/TrigAnalysisTest/bin/checkFileTrigSize_RTT.py b/Trigger/TrigValidation/TrigAnalysisTest/bin/checkFileTrigSize_RTT.py
index 7239ea8d8285..b1e4cef9b6cc 100755
--- a/Trigger/TrigValidation/TrigAnalysisTest/bin/checkFileTrigSize_RTT.py
+++ b/Trigger/TrigValidation/TrigAnalysisTest/bin/checkFileTrigSize_RTT.py
@@ -1095,7 +1095,7 @@ class checkFileTrigSize_RTT:
 
             #for new xAOD    
             if re.search("Total",line):
-                if (unicode(splitline[4])).isnumeric():
+                if (str(splitline[4])).isnumeric():
                     self.total = float(splitline[4])
 
             #only count the good lines (ie. not "=====", etc.)
@@ -1203,8 +1203,8 @@ class checkFileTrigSize_RTT:
 
             
         print()
-        print("Summary of catagories:")
-        fout.write( "\n Summary of catagories:\n") 
+        print("Summary of categories:")
+        fout.write( "\n Summary of categories:\n")
 
         #print the size of each counter (and calculate the sum)
         for counter in listofCounters:
-- 
GitLab


From 6a88e50de8ab3a29fa9ee4a384cef9adac25a6f7 Mon Sep 17 00:00:00 2001
From: Oleg Kuprash <oleg.kuprash@cern.ch>
Date: Thu, 8 Oct 2020 13:20:26 +0200
Subject: [PATCH 349/403] Use Run 3 trigger EDM list

---
 .../TrigValidation/TrigValAlgs/python/TrigValAlgsConfig.py   | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Trigger/TrigValidation/TrigValAlgs/python/TrigValAlgsConfig.py b/Trigger/TrigValidation/TrigValAlgs/python/TrigValAlgsConfig.py
index 96600fad8d35..524de6923fae 100755
--- a/Trigger/TrigValidation/TrigValAlgs/python/TrigValAlgsConfig.py
+++ b/Trigger/TrigValidation/TrigValAlgs/python/TrigValAlgsConfig.py
@@ -64,8 +64,9 @@ class TrigEDMChecker ( TrigEDMChecker ):
 
 
 def getEDMAuxList():
-    from TrigEDMConfig.TriggerEDM import getTriggerObjList,TriggerHLTList
-    tlist=getTriggerObjList('AODFULL',[TriggerHLTList])
+    from TrigEDMConfig.TriggerEDM import getTriggerEDMList
+    #from AthenaConfiguration.AllConfigFlags import ConfigFlags as flags
+    tlist=getTriggerEDMList('AODFULL',3)
     objlist=[]
     for t,kset in six.iteritems(tlist):
         for k in kset:
-- 
GitLab


From 33bd1dff26f6bb09a49748297c9c1e7d0bede2e8 Mon Sep 17 00:00:00 2001
From: Oleg Kuprash <oleg.kuprash@cern.ch>
Date: Thu, 8 Oct 2020 13:21:10 +0200
Subject: [PATCH 350/403] TrigEDMAuxChecker needs a major fix, disable for the
 time being

---
 .../TrigAnalysisTest/python/TrigAnalysisSteps.py              | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Trigger/TrigValidation/TrigAnalysisTest/python/TrigAnalysisSteps.py b/Trigger/TrigValidation/TrigAnalysisTest/python/TrigAnalysisSteps.py
index 1d0eede3af94..cfa617aa119a 100644
--- a/Trigger/TrigValidation/TrigAnalysisTest/python/TrigAnalysisSteps.py
+++ b/Trigger/TrigValidation/TrigAnalysisTest/python/TrigAnalysisSteps.py
@@ -164,7 +164,9 @@ def trig_analysis_exec_steps(input_file='AOD.pool.root'):
     return [
         TrigDecChecker(in_file=input_file),
         TrigEDMChecker(in_file=input_file),
-        TrigEDMAuxChecker(in_file=input_file)]
+        # to be fixed and enabled
+        #TrigEDMAuxChecker(in_file=input_file)
+    ]
 
 def trig_analysis_check_steps():
     return [CheckFileTrigSizeStep()]
-- 
GitLab


From eb9905b00e016357c6900148ec6cd005d6208eca Mon Sep 17 00:00:00 2001
From: Oleg Kuprash <oleg.kuprash@cern.ch>
Date: Thu, 8 Oct 2020 13:21:38 +0200
Subject: [PATCH 351/403] The trigger collections are hardcoded to Run 2 values

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

diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/testAthenaTrigAOD_TrigEDMCheck.py b/Trigger/TrigValidation/TrigAnalysisTest/share/testAthenaTrigAOD_TrigEDMCheck.py
index a1525c75c57a..bfd009be2121 100644
--- a/Trigger/TrigValidation/TrigAnalysisTest/share/testAthenaTrigAOD_TrigEDMCheck.py
+++ b/Trigger/TrigValidation/TrigAnalysisTest/share/testAthenaTrigAOD_TrigEDMCheck.py
@@ -98,7 +98,7 @@ ToolSvc.TrigDecisionTool.Navigation.Dlls = EDMLibraries
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
 topSequence += TrigEDMChecker
-TrigEDMChecker.doDumpAll = True
+TrigEDMChecker.doDumpAll = False
 
 
 
-- 
GitLab


From 67e6a891212790988e703f9a88adc644069d31fc Mon Sep 17 00:00:00 2001
From: Julie Kirk <Julie.Kirk@cern.ch>
Date: Thu, 8 Oct 2020 14:27:46 +0200
Subject: [PATCH 352/403] Change parameters for TrigInDetValidation MT jobs -
 try 8 and 12 threads

---
 .../test/test_trigID_all_ttbar_pu80_mt.py                   | 2 +-
 .../test/test_trigID_all_ttbar_pu80_mt2.py                  | 6 +++---
 .../test/test_trigID_all_ttbar_pu80_mt3.py                  | 6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt.py
index 378b33fe8329..55be636e80d1 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt.py
@@ -56,7 +56,7 @@ for opt,arg in opts:
 rdo2aod = TrigInDetReco()
 rdo2aod.slices = ['muon','electron','tau','bjet']
 rdo2aod.max_events = 2000 
-rdo2aod.threads = 1 # TODO: change to 4
+rdo2aod.threads = 4
 rdo2aod.concurrent_events = 4 
 rdo2aod.perfmon = False
 rdo2aod.timeout = 18*3600
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt2.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt2.py
index 7ef225f72347..85e21cdfe4ff 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt2.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt2.py
@@ -4,7 +4,7 @@
 # art-type: grid
 # art-include: master/Athena
 # art-input-nfiles: 3
-# art-athena-mt: 4
+# art-athena-mt: 8
 # art-memory: 4096
 # art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
 # art-output: *.txt
@@ -56,8 +56,8 @@ for opt,arg in opts:
 rdo2aod = TrigInDetReco()
 rdo2aod.slices = ['muon','electron','tau','bjet']
 rdo2aod.max_events = 2000 
-rdo2aod.threads = 4 
-rdo2aod.concurrent_events = 4 
+rdo2aod.threads = 8 
+rdo2aod.concurrent_events = 8
 rdo2aod.perfmon = False
 rdo2aod.timeout = 18*3600
 rdo2aod.input = 'ttbar_pu80'   # defined in TrigValTools/share/TrigValInputs.json  
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt3.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt3.py
index 9ff4e7edcc96..5f9a61599948 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt3.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt3.py
@@ -4,7 +4,7 @@
 # art-type: grid
 # art-include: master/Athena
 # art-input-nfiles: 3
-# art-athena-mt: 4
+# art-athena-mt: 12
 # art-memory: 4096
 # art-output: *.txt
 # art-output: *.log
@@ -55,8 +55,8 @@ for opt,arg in opts:
 rdo2aod = TrigInDetReco()
 rdo2aod.slices = ['muon','electron','tau','bjet']
 rdo2aod.max_events = 2000 
-rdo2aod.threads = 4
-rdo2aod.concurrent_events = 1 
+rdo2aod.threads = 12
+rdo2aod.concurrent_events = 12 
 rdo2aod.perfmon = False
 rdo2aod.timeout = 18*3600
 rdo2aod.input = 'ttbar_pu80'   # defined in TrigValTools/share/TrigValInputs.json  
-- 
GitLab


From 57bc2978f4971596602fcf0adef9e744eb21c25e Mon Sep 17 00:00:00 2001
From: Savanna Marie Shaw <savanna.marie.shaw@cern.ch>
Date: Thu, 8 Oct 2020 14:45:27 +0200
Subject: [PATCH 353/403] Update MuonTrackBuilder config for Run 2 triggers

Updating the track building config for the Run 2 triggers as there was some conflict such that the incorrect configuration is being picked up when running individual triggers compared to the full menu.
---
 .../TrigMuonEF/python/TrigMuonEFConfig.py           | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py b/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py
index b60697b17d69..2db8347a2972 100755
--- a/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py
+++ b/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py
@@ -377,7 +377,18 @@ def TMEF_MuonCreatorTool(name="TMEF_MuonCreatorTool",**kwargs):
 
 def TMEF_MuonCandidateTrackBuilderTool(name="TMEF_MuonCandidateTrackBuilderTool",**kwargs):
     kwargs.setdefault('MuonTrackBuilder', 'TMEF_CombinedMuonTrackBuilder')
-    kwargs.setdefault('MuonSegmentTrackBuilder', CfgGetter.getPublicTool("MooMuonTrackBuilder"))
+    from MuonRecExample.MuonRecUtils import ExtraFlags
+    extraFlags = ExtraFlags()
+    extraFlags.setFlagDefault("doSegmentPhiMatching", True)
+    from MuonRecExample.MuonStandaloneFlags import muonStandaloneFlags
+    extraFlags.setFlagDefault(muonStandaloneFlags.optimiseMomentumResolutionUsingChi2) # take name & value from JobProperty
+    extraFlags.setFlagDefault(muonStandaloneFlags.strategy)
+    extraFlags.setFlagDefault(muonStandaloneFlags.trackBuilder)
+    extraFlags.setFlagDefault(muonStandaloneFlags.printSummary)
+    extraFlags.setFlagDefault(muonStandaloneFlags.refinementTool)
+    if "TrackBuilderTool" not in kwargs:
+        extraFlags.setFlagDefault('UseTrackingHistory',True)
+    kwargs.setdefault('MuonSegmentTrackBuilder', CfgGetter.getPublicToolClone("MooMuonTrackBuilder","MooTrackBuilderTemplate",extraFlags=extraFlags))
     return CfgMgr.Muon__MuonCandidateTrackBuilderTool(name,**kwargs)
 
 def TMEF_MuonPRDSelectionTool(name="TMEF_MuonPRDSelectionTool",**kwargs):
-- 
GitLab


From 2c5df871506ebe0b684cbcebcedeecca26d9836c Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Thu, 8 Oct 2020 16:04:34 +0200
Subject: [PATCH 354/403] Remove template argument from
 Gaudi::Accumulators:Counter

The template argument of `Gaudi::Accumulators:Counter` was never used
(the underlying type was always `unsigned long`). gaudi/Gaudi!1112 will
no longer allow specifying a template argument.
---
 .../egammaAlgs/src/egammaSelectedTrackCopy.h  | 16 +++----
 .../egammaAlgs/src/egammaTopoClusterCopier.h  |  8 ++--
 .../TrkExTools/TrkExTools/Extrapolator.h      | 42 +++++++++----------
 .../TrkExTools/TrkExTools/Navigator.h         | 20 ++++-----
 .../TrkGaussianSumFilter/GsfExtrapolator.h    | 24 +++--------
 5 files changed, 49 insertions(+), 61 deletions(-)

diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaSelectedTrackCopy.h b/Reconstruction/egamma/egammaAlgs/src/egammaSelectedTrackCopy.h
index 1457745db97f..e72fa6abe1de 100644
--- a/Reconstruction/egamma/egammaAlgs/src/egammaSelectedTrackCopy.h
+++ b/Reconstruction/egamma/egammaAlgs/src/egammaSelectedTrackCopy.h
@@ -168,13 +168,13 @@ private:
                         "SCT_DetectorElementCollection",
                         "Key of SiDetectorElementCollection for SCT" };
 
-  mutable Gaudi::Accumulators::Counter<unsigned long> m_AllClusters;
-  mutable Gaudi::Accumulators::Counter<unsigned long> m_SelectedClusters;
-  mutable Gaudi::Accumulators::Counter<unsigned long> m_AllTracks;
-  mutable Gaudi::Accumulators::Counter<unsigned long> m_SelectedTracks;
-  mutable Gaudi::Accumulators::Counter<unsigned long> m_AllSiTracks;
-  mutable Gaudi::Accumulators::Counter<unsigned long> m_SelectedSiTracks;
-  mutable Gaudi::Accumulators::Counter<unsigned long> m_AllTRTTracks;
-  mutable Gaudi::Accumulators::Counter<unsigned long> m_SelectedTRTTracks;
+  mutable Gaudi::Accumulators::Counter<> m_AllClusters;
+  mutable Gaudi::Accumulators::Counter<> m_SelectedClusters;
+  mutable Gaudi::Accumulators::Counter<> m_AllTracks;
+  mutable Gaudi::Accumulators::Counter<> m_SelectedTracks;
+  mutable Gaudi::Accumulators::Counter<> m_AllSiTracks;
+  mutable Gaudi::Accumulators::Counter<> m_SelectedSiTracks;
+  mutable Gaudi::Accumulators::Counter<> m_AllTRTTracks;
+  mutable Gaudi::Accumulators::Counter<> m_SelectedTRTTracks;
 };
 #endif
diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaTopoClusterCopier.h b/Reconstruction/egamma/egammaAlgs/src/egammaTopoClusterCopier.h
index 7661343ec097..27a518eba54a 100644
--- a/Reconstruction/egamma/egammaAlgs/src/egammaTopoClusterCopier.h
+++ b/Reconstruction/egamma/egammaAlgs/src/egammaTopoClusterCopier.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 EGAMMAALGS_EGAMMATOPOCLUSTERCOPIER_H
@@ -47,9 +47,9 @@ class egammaTopoClusterCopier : public AthReentrantAlgorithm {
   Gaudi::Property<float> m_ECut {this, "ECut", 500, "minimum energy of selected clusters"};
   Gaudi::Property<float> m_EMFracCut {this, "EMFracCut", 0.5, "mimimum EM fraction"};
  
-  mutable Gaudi::Accumulators::Counter<long int>                     m_AllClusters;            
-  mutable Gaudi::Accumulators::Counter<long int>                     m_PassPreSelection;
-  mutable Gaudi::Accumulators::Counter<long int>                     m_PassSelection; 
+  mutable Gaudi::Accumulators::Counter<>                     m_AllClusters;
+  mutable Gaudi::Accumulators::Counter<>                     m_PassPreSelection;
+  mutable Gaudi::Accumulators::Counter<>                     m_PassSelection;
 };
 
 #endif // EGAMMATOOLS_EMCLUSTERTOOL_H
diff --git a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Extrapolator.h b/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Extrapolator.h
index ba1bd19e06b6..b0939e4acbe7 100755
--- a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Extrapolator.h
+++ b/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Extrapolator.h
@@ -932,49 +932,49 @@ private:
   bool m_materialEffectsOnTrackValidation; //!< mat effects on track validation
 
   // extrapolation counters
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_extrapolateCalls; //!< number of calls: extrapolate() method
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_extrapolateBlindlyCalls; //!< number of calls: extrapolateBlindly() method
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_extrapolateDirectlyCalls; //!< number of calls: extrapolateDirectly() method
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     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>
+  mutable Gaudi::Accumulators::Counter<> m_startThroughAssociation; //!< navigation intialization
+  mutable Gaudi::Accumulators::Counter<> m_startThroughRecall;      //!< navigation intialization
+  mutable Gaudi::Accumulators::Counter<>
     m_startThroughGlobalSearch; //!< navigation intialization
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_destinationThroughAssociation; //!< navigation intialization
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_destinationThroughRecall; //!< navigation intialization
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_destinationThroughGlobalSearch; //!< navigation intialization
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_layerSwitched; //!< number of layers that have been switched
 
   // navigation counters
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_navigationBreakLoop; //!< number of navigation breaks due to loop
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_navigationBreakOscillation; //!< number of navigation breaks due to oscillation
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_navigationBreakNoVolume; //!< number of navigation breaks due no Volume found
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_navigationBreakDistIncrease; //!< number of navigation breaks due to distance increase
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_navigationBreakVolumeSignature; //!< number of navigation breaks due to distance increase
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_overlapSurfaceHit; //!< number of OverlapSurfaces found
 
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_meotSearchCallsFw; //!< how often the meot search is called: forward
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_meotSearchCallsBw; //!< how often the meot search is called: backward
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_meotSearchSuccessfulFw; //!< how often the meot search was successful: forward
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_meotSearchSuccessfulBw; //!< how often the meot search was successful: backward
 };
 
diff --git a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Navigator.h b/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Navigator.h
index fbc3fa653045..80ecaf0e5398 100755
--- a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Navigator.h
+++ b/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Navigator.h
@@ -192,16 +192,16 @@ namespace Trk {
       // ------ PERFORMANCE STATISTICS -------------------------------- //
       /* All performance stat counters are atomic (the simplest solution perhaps
        * not the most performant one)*/
-      mutable Gaudi::Accumulators::Counter<int>       m_forwardCalls;              //!< counter for forward nextBounday calls
-      mutable Gaudi::Accumulators::Counter<int>       m_forwardFirstBoundSwitch;   //!< counter for failed first forward nextBounday calls
-      mutable Gaudi::Accumulators::Counter<int>       m_forwardSecondBoundSwitch;  //!< counter for failed second forward nextBounday calls
-      mutable Gaudi::Accumulators::Counter<int>       m_forwardThirdBoundSwitch;   //!< counter for failed third forward nextBounday calls
-      mutable Gaudi::Accumulators::Counter<int>       m_backwardCalls;             //!< counter for backward nextBounday calls
-      mutable Gaudi::Accumulators::Counter<int>       m_backwardFirstBoundSwitch;  //!< counter for failed first backward nextBounday calls
-      mutable Gaudi::Accumulators::Counter<int>       m_backwardSecondBoundSwitch; //!< counter for failed second backward nextBounday calls
-      mutable Gaudi::Accumulators::Counter<int>       m_backwardThirdBoundSwitch;  //!< counter for failed third backward nextBounday calls
-      mutable Gaudi::Accumulators::Counter<int>       m_outsideVolumeCase;         //!< counter for navigation-break in outside volume cases (ovc)
-      mutable Gaudi::Accumulators::Counter<int>       m_sucessfulBackPropagation;  //!< counter for sucessful recovery of navigation-break in ovc
+      mutable Gaudi::Accumulators::Counter<>       m_forwardCalls;              //!< counter for forward nextBounday calls
+      mutable Gaudi::Accumulators::Counter<>       m_forwardFirstBoundSwitch;   //!< counter for failed first forward nextBounday calls
+      mutable Gaudi::Accumulators::Counter<>       m_forwardSecondBoundSwitch;  //!< counter for failed second forward nextBounday calls
+      mutable Gaudi::Accumulators::Counter<>       m_forwardThirdBoundSwitch;   //!< counter for failed third forward nextBounday calls
+      mutable Gaudi::Accumulators::Counter<>       m_backwardCalls;             //!< counter for backward nextBounday calls
+      mutable Gaudi::Accumulators::Counter<>       m_backwardFirstBoundSwitch;  //!< counter for failed first backward nextBounday calls
+      mutable Gaudi::Accumulators::Counter<>       m_backwardSecondBoundSwitch; //!< counter for failed second backward nextBounday calls
+      mutable Gaudi::Accumulators::Counter<>       m_backwardThirdBoundSwitch;  //!< counter for failed third backward nextBounday calls
+      mutable Gaudi::Accumulators::Counter<>       m_outsideVolumeCase;         //!< counter for navigation-break in outside volume cases (ovc)
+      mutable Gaudi::Accumulators::Counter<>       m_sucessfulBackPropagation;  //!< counter for sucessful recovery of navigation-break in ovc
     };
 
 } // end of namespace
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfExtrapolator.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfExtrapolator.h
index fc6e6283a8ba..8f41475d80b3 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfExtrapolator.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfExtrapolator.h
@@ -295,30 +295,18 @@ private:
   Trk::MagneticFieldProperties m_fieldProperties;
 
   //!< Statistics: Number of calls to the main extrapolate method
-  mutable Gaudi::Accumulators::Counter<int,
-                                       Gaudi::Accumulators::atomicity::full>
-    m_extrapolateCalls;
+  mutable Gaudi::Accumulators::Counter<> m_extrapolateCalls;
   //!< Statistics: Number of calls to the extrapolate directly method
-  mutable Gaudi::Accumulators::Counter<int,
-                                       Gaudi::Accumulators::atomicity::full>
-    m_extrapolateDirectlyCalls;
+  mutable Gaudi::Accumulators::Counter<> m_extrapolateDirectlyCalls;
   //!< Statistics: Number of calls to the  extrapolate directly fallback
-  mutable Gaudi::Accumulators::Counter<int,
-                                       Gaudi::Accumulators::atomicity::full>
-    m_extrapolateDirectlyFallbacks;
+  mutable Gaudi::Accumulators::Counter<> m_extrapolateDirectlyFallbacks;
   //!< Statistics: Number of times navigation stepping fails to go the  right
   //!< way
-  mutable Gaudi::Accumulators::Counter<int,
-                                       Gaudi::Accumulators::atomicity::full>
-    m_navigationDistanceIncreaseBreaks;
+  mutable Gaudi::Accumulators::Counter<> m_navigationDistanceIncreaseBreaks;
   //!< Statistics: Number of times a tracking volume oscillation is detected
-  mutable Gaudi::Accumulators::Counter<int,
-                                       Gaudi::Accumulators::atomicity::full>
-    m_oscillationBreaks;
+  mutable Gaudi::Accumulators::Counter<> m_oscillationBreaks;
   //!< Statistics: Number of times the volume boundary is missed
-  mutable Gaudi::Accumulators::Counter<int,
-                                       Gaudi::Accumulators::atomicity::full>
-    m_missedVolumeBoundary;
+  mutable Gaudi::Accumulators::Counter<> m_missedVolumeBoundary;
 };
 
 } // end namespace Trk
-- 
GitLab


From d4262cecfe5695c9543ae17b049c6eeff624741b Mon Sep 17 00:00:00 2001
From: Zaza Chubinidze <zazachubin@gmail.com>
Date: Thu, 8 Oct 2020 16:27:27 +0200
Subject: [PATCH 355/403] fix Clusterization example and cleanup

---
 .../python/ClusterizationConfig.py            | 10 ++-
 .../InDetConfig/python/TrackRecoConfig.py     | 67 +++++++++++--------
 2 files changed, 42 insertions(+), 35 deletions(-)

diff --git a/InnerDetector/InDetConfig/python/ClusterizationConfig.py b/InnerDetector/InDetConfig/python/ClusterizationConfig.py
index bdc5672a1c0e..80d683ef1860 100644
--- a/InnerDetector/InDetConfig/python/ClusterizationConfig.py
+++ b/InnerDetector/InDetConfig/python/ClusterizationConfig.py
@@ -76,12 +76,10 @@ if __name__ == "__main__":
 
     acc = InDetClusterizationAlgorithmsCfg(ConfigFlags)
     top_acc.merge(acc)
-    # import pdb ; pdb.set_trace()
+
     iovsvc = top_acc.getService('IOVDbSvc')
     iovsvc.OutputLevel=5
-    ##acc.setAppProperty("EvtMax",25)
-    ##acc.store(open("test_SiClusterization.pkl", "w"))
+
+    top_acc.printConfig()
     top_acc.run(25)
-    #with open('test4.pkl', mode="wb") as f:
-    #   dill.dump(acc, f)
-    top_acc.store(open("test00.pkl", "wb"))
+    top_acc.store(open("test_Clusterization.pkl", "wb"))
diff --git a/InnerDetector/InDetConfig/python/TrackRecoConfig.py b/InnerDetector/InDetConfig/python/TrackRecoConfig.py
index 1d4e35f410c1..0291fe7b2372 100644
--- a/InnerDetector/InDetConfig/python/TrackRecoConfig.py
+++ b/InnerDetector/InDetConfig/python/TrackRecoConfig.py
@@ -4,15 +4,15 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
 
 ##------------------------------------------------------------------------------
-def BCM_ZeroSuppressionCfg(flags, **kwargs):
+def BCM_ZeroSuppressionCfg(flags, name="InDetBCM_ZeroSuppression", **kwargs):
     acc = ComponentAccumulator()
     kwargs.setdefault("BcmContainerName", "BCM_RDOs")
-    algo = CompFactory.BCM_ZeroSuppression("InDetBCM_ZeroSuppression", **kwargs)
+    algo = CompFactory.BCM_ZeroSuppression(name=name, **kwargs)
     acc.addEventAlgo(algo, primary = True)
     return acc
 
 ##------------------------------------------------------------------------------
-def PixelClusterizationCfg(flags, **kwargs) :
+def PixelClusterizationCfg(flags, name = "InDetPixelClusterization", **kwargs) :
     acc = ComponentAccumulator()
     sub_acc = MergedPixelsToolCfg(flags, **kwargs)
     merged_pixels_tool = sub_acc.getPrimary()
@@ -21,24 +21,29 @@ def PixelClusterizationCfg(flags, **kwargs) :
     ambi_finder=sub_acc.getPrimary()
     acc.merge(sub_acc)
 
-    acc.addEventAlgo( CompFactory.InDet.PixelClusterization(   name         = "InDetPixelClusterization",
-                                                    clusteringTool          = merged_pixels_tool,
-                                                    gangedAmbiguitiesFinder = ambi_finder,
-                                                    DataObjectName          = "PixelRDOs",
-                                                    ClustersName            = "PixelClusters" ))
+    # Region selector tools for Pixel
+    from RegionSelector.RegSelToolConfig import regSelTool_Pixel_Cfg
+    RegSelTool_Pixel = acc.popToolsAndMerge(regSelTool_Pixel_Cfg(flags))
+
+    kwargs.setdefault("clusteringTool", merged_pixels_tool)
+    kwargs.setdefault("gangedAmbiguitiesFinder", ambi_finder)
+    kwargs.setdefault("DataObjectName", "PixelRDOs")
+    kwargs.setdefault("ClustersName", "PixelClusters")
+    kwargs.setdefault("RegSelTool", RegSelTool_Pixel)
+
+    acc.addEventAlgo(CompFactory.InDet.PixelClusterization(name=name, **kwargs))
     return acc
 ##------------------------------------------------------------------------------
-def PixelClusterizationPUCfg(flags, **kwargs) :
-    kwargs.setdefault("name", "InDetPixelClusterizationPU")
+def PixelClusterizationPUCfg(flags, name="InDetPixelClusterizationPU", **kwargs) :
     kwargs.setdefault("DataObjectName", "Pixel_PU_RDOs")
     kwargs.setdefault("ClustersName", "PixelPUClusters")
     kwargs.setdefault("AmbiguitiesMap", "PixelClusterAmbiguitiesMapPU")
-    return PixelClusterizationCfg(flags, **kwargs)
+    return PixelClusterizationCfg(flags, name=name, **kwargs)
 
 ##------------------------------------------------------------------------------
 ##------------------------------------------------------------------------------
 
-def SCTClusterizationCfg(flags, **kwargs) :
+def SCTClusterizationCfg(flags, name="InDetSCT_Clusterization", **kwargs) :
     acc = ComponentAccumulator()
 
     # Need to get SCT_ConditionsSummaryTool for e.g. SCT_ClusteringTool
@@ -49,33 +54,32 @@ def SCTClusterizationCfg(flags, **kwargs) :
     accbuf = ClusterMakerToolCfg(flags)
     InDetClusterMakerTool = accbuf.getPrimary()
     acc.merge(accbuf)
-    InDetSCT_ClusteringTool = CompFactory.InDet.SCT_ClusteringTool(    name              = "InDetSCT_ClusteringTool",
-                                                            globalPosAlg     = InDetClusterMakerTool,
-                                                            conditionsTool = InDetSCT_ConditionsSummaryToolWithoutFlagged)
+    InDetSCT_ClusteringTool = CompFactory.InDet.SCT_ClusteringTool( name           = "InDetSCT_ClusteringTool",
+                                                                    globalPosAlg   = InDetClusterMakerTool,
+                                                                    conditionsTool = InDetSCT_ConditionsSummaryToolWithoutFlagged)
     if flags.InDet.selectSCTIntimeHits :
        if flags.InDet.InDet25nsec : 
           InDetSCT_ClusteringTool.timeBins = "01X" 
        else: 
           InDetSCT_ClusteringTool.timeBins = "X1X" 
 
-    acc.addEventAlgo( CompFactory.InDet.SCT_Clusterization(    name                    = "InDetSCT_Clusterization",
-                                                    clusteringTool          = InDetSCT_ClusteringTool,
-                                                    DataObjectName          = 'SCT_RDOs', ##InDetKeys.SCT_RDOs(),
-                                                    ClustersName            = 'SCT_Clusters', ##InDetKeys.SCT_Clusters(),
-                                                    conditionsTool          = InDetSCT_ConditionsSummaryToolWithoutFlagged  ) )
+    kwargs.setdefault("clusteringTool", InDetSCT_ClusteringTool)
+    kwargs.setdefault("DataObjectName", 'SCT_RDOs') ##InDetKeys.SCT_RDOs()
+    kwargs.setdefault("ClustersName", 'SCT_Clusters') ##InDetKeys.SCT_Clusters()
+    kwargs.setdefault("conditionsTool", InDetSCT_ConditionsSummaryToolWithoutFlagged)
 
-    return acc
+    acc.addEventAlgo( CompFactory.InDet.SCT_Clusterization(name=name, **kwargs))
 
+    return acc
 
 ##------------------------------------------------------------------------------
 ##------------------------------------------------------------------------------
 ##------------------------------------------------------------------------------
 
-def SCTClusterizationPUCfg(flags, **kwargs) :
-    kwargs.setdefault("name", "InDetSCT_ClusterizationPU")
+def SCTClusterizationPUCfg(flags, name="InDetSCT_ClusterizationPU", **kwargs) :
     kwargs.setdefault("DataObjectName", "SCT_PU_RDOs" )   #flags.InDetKeys.SCT_PU_RDOs
-    kwargs.setdefault("ClustersName", "SCT_PU_Clusters") #flags.InDetKeys.SCT_PU_Clusters
-    return SCTClusterizationCfg(flags, **kwargs)
+    kwargs.setdefault("ClustersName", "SCT_PU_Clusters")  #flags.InDetKeys.SCT_PU_Clusters
+    return SCTClusterizationCfg(flags, name=name, **kwargs)
 
 ##------------------------------------------------------------------------------
 def PixelGangedAmbiguitiesFinderCfg(flags) :
@@ -84,7 +88,6 @@ def PixelGangedAmbiguitiesFinderCfg(flags) :
     acc.addPublicTool( InDetPixelGangedAmbiguitiesFinder, primary=True)
     return acc
 
-
 ##------------------------------------------------------------------------------
 def MergedPixelsToolCfg(flags, **kwargs) :
       acc = ComponentAccumulator()
@@ -109,9 +112,11 @@ def MergedPixelsToolCfg(flags, **kwargs) :
      
       acc.addPublicTool(InDetMergedPixelsTool, primary=True)
       return acc
+
 ##------------------------------------------------------------------------------
-def ClusterMakerToolCfg(flags, **kwargs) :
-    from PixelConditionsAlgorithms.PixelConditionsConfig import PixelChargeCalibCondAlgCfg, PixelConfigCondAlgCfg
+def ClusterMakerToolCfg(flags, name="InDetClusterMakerTool", **kwargs) :
+    from PixelConditionsAlgorithms.PixelConditionsConfig import (PixelChargeCalibCondAlgCfg, PixelConfigCondAlgCfg,
+                                                                 PixelOfflineCalibCondAlgCfg, PixelCablingCondAlgCfg, PixelReadoutSpeedAlgCfg)
 
     acc = ComponentAccumulator()
     # This directly needs the following Conditions data:
@@ -119,7 +124,11 @@ def ClusterMakerToolCfg(flags, **kwargs) :
     acc.merge( PixelChargeCalibCondAlgCfg(flags))
     acc.merge( PixelConfigCondAlgCfg(flags))
 
-    InDetClusterMakerTool = CompFactory.InDet.ClusterMakerTool(name = "InDetClusterMakerTool", **kwargs)
+    acc.merge(PixelOfflineCalibCondAlgCfg(flags))
+    acc.merge(PixelCablingCondAlgCfg(flags))
+    acc.merge(PixelReadoutSpeedAlgCfg(flags))
+
+    InDetClusterMakerTool = CompFactory.InDet.ClusterMakerTool(name = name, **kwargs)
 
     from SiLorentzAngleTool.SCT_LorentzAngleConfig import SCT_LorentzAngleCfg
     SCTLorentzAngleTool = acc.popToolsAndMerge( SCT_LorentzAngleCfg(flags) )    
-- 
GitLab


From bdf7960e7aebb27d6f426c0e1bd68c9cc23fb8c3 Mon Sep 17 00:00:00 2001
From: Walter Lampl <Walter.Lampl@cern.ch>
Date: Thu, 8 Oct 2020 16:31:16 +0200
Subject: [PATCH 356/403] MuonHitTimingTool: use RPC_TimingTool as private tool

---
 .../MuonRecTools/MuonTimingTools/src/MuonHitTimingTool.cxx    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTimingTools/src/MuonHitTimingTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTimingTools/src/MuonHitTimingTool.cxx
index f033040f4896..31eb87891487 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTimingTools/src/MuonHitTimingTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTimingTools/src/MuonHitTimingTool.cxx
@@ -10,7 +10,9 @@
 namespace Muon {
 
   MuonHitTimingTool::MuonHitTimingTool(const std::string& t, const std::string& n, const IInterface* p):
-    AthAlgTool(t,n,p) {
+    AthAlgTool(t,n,p),
+    m_hitTimingTools(this)
+  {
     declareInterface<IMuonHitTimingTool>(this);
     
     for( unsigned int tech = 0;tech<MuonStationIndex::TechnologyIndexMax;++tech ){
-- 
GitLab


From 15273979eb7bdc47a9b4d4b9e573b53db0e22bb0 Mon Sep 17 00:00:00 2001
From: Bertrand Martin <martindl@cern.ch>
Date: Thu, 8 Oct 2020 16:33:11 +0200
Subject: [PATCH 357/403] tauRec: update of ESD and AOD tau containers

Hello,

This MR is updating the list of ESD and AOD tau containers.
Some containers have been renamed for the sake of harmonisation and clarity: TauPi0SubtractedClusters becomes TauInitialPi0Clusters (there is no subtraction performed here), and finalTauPi0s becomes TauFinalPi0s.
The containers are now all added via TauESDList and TauAODList, and the use of objKeyStore has been discontinued. It is unclear why objKeyStore was still in use, it is confusing that some containers are stored via e.g. "objKeyStore.addManyTypesStreamESD", while some others are saved via "TauESDList".
Note: a final renaming might occur very soon, because we no longer need to define a "TauPi0Clusters" container (which is a subset of TauPi0SubtractedClusters = TauInitialPi0Clusters, that we used to store on disk), now that we store TauPi0SubtractedClusters = TauInitialPi0Clusters (to become simply "TauPi0Clusters").
To be done in a follow-up MR.

Cheers,
Bertrand
---
 Reconstruction/tauRec/python/TauRecBuilder.py | 43 ++--------
 .../tauRec/python/TauRecRunConfigured.py      |  4 +-
 Reconstruction/tauRec/python/TauRecRunner.py  | 44 ++--------
 .../share/Pi0ClusterMaker_jobOptions.py       |  4 +-
 Reconstruction/tauRec/share/TauAODList.py     | 52 ++++++------
 Reconstruction/tauRec/share/TauESDList.py     | 84 +++++--------------
 Reconstruction/tauRec/tauRec/TauRunnerAlg.h   |  7 +-
 7 files changed, 68 insertions(+), 170 deletions(-)

diff --git a/Reconstruction/tauRec/python/TauRecBuilder.py b/Reconstruction/tauRec/python/TauRecBuilder.py
index cdab5f3e925a..1efea1c01731 100644
--- a/Reconstruction/tauRec/python/TauRecBuilder.py
+++ b/Reconstruction/tauRec/python/TauRecBuilder.py
@@ -13,61 +13,34 @@
 ################################################################################
 
 import os, sys, string
-
 from AthenaCommon.Logging import logging
 from AthenaCommon.SystemOfUnits import *
 from AthenaCommon.Constants import *
 from AthenaCommon.BeamFlags import jobproperties
 import traceback
-
 from RecExConfig.Configured import Configured
 from .TauRecConfigured import TauRecConfigured
 
-# global tauRec config keys - to be replaced with tauRecFlags
-_outputType = "xAOD::TauJetContainer"
-_outputKey = "TauJets"
-_outputAuxType = "xAOD::TauJetAuxContainer"
-_outputAuxKey = "TauJetsAux."
-
 ################################################################################
 ## @class TauRecCoreBuilder
-# Build proper tau candidates and associate tracks, vertex and cells
+# Build tau candidates and associate tracks, vertex and cells
 ################################################################################
 class TauRecCoreBuilder ( TauRecConfigured ) :
-    """Build proper tau candidates and associate tracks, vertex and cells. 
+    """Build tau candidates and associate tracks, vertex and cells. 
     Calculate properties based on cell informations. 
-    Find clusters used for Pi0 identification and eflow variables.
-    PhotonConversion will be run here too.
-    """
-    
-    _output     = { _outputType:_outputKey , _outputAuxType:_outputAuxKey,
-                    'xAOD::TauTrackContainer' : 'TauTracks',
-                    'xAOD::CaloClusterContainer' : 'TauShotClusters',
-                    'xAOD::PFOContainer' : 'TauShotParticleFlowObjects',
-                    'CaloCellContainer' : 'TauCommonPi0Cells',
-                    }
-
+    Find cells used for Pi0 identification and eflow variables.
+    """    
 
     def __init__(self, name = "TauCoreBuilder",doPi0Clus=False, doTJVA=False):
         self.name = name
         self.doPi0Clus = doPi0Clus
         self.do_TJVA = doTJVA
         TauRecConfigured.__init__(self, name, doPi0Clus)
-
-
  
     def configure(self):
         mlog = logging.getLogger ('TauCoreBuilder.py::configure:')
         mlog.info('entering')
-        
-        
-        from RecExConfig.RecFlags import rec    
-        
-        from RecExConfig.ObjKeyStore import objKeyStore
-        objKeyStore.addManyTypesStreamESD(self._output)
-        objKeyStore.addManyTypesStreamAOD(self._output)   
-        objKeyStore.addManyTypesTransient(self._output)
-        
+                
         import tauRec.TauAlgorithmsHolder as taualgs
         from tauRec.tauRecFlags import tauFlags
         
@@ -119,10 +92,4 @@ class TauRecCoreBuilder ( TauRecConfigured ) :
     def TauBuilderToolHandle(self):
         return self._TauBuilderToolHandle
 
-    def outputKey(self):
-         return self._output[self._outputType]
-    
-    def outputType(self):
-         return self._outputType
-
 #end
diff --git a/Reconstruction/tauRec/python/TauRecRunConfigured.py b/Reconstruction/tauRec/python/TauRecRunConfigured.py
index b31874fd000c..ea01dfddb401 100644
--- a/Reconstruction/tauRec/python/TauRecRunConfigured.py
+++ b/Reconstruction/tauRec/python/TauRecRunConfigured.py
@@ -31,14 +31,14 @@ class TauRecRunConfigured ( Configured ) :
         from tauRec.tauRecFlags import tauFlags
         self._TauRunnerAlgHandle = TauRunnerAlg ( name=self.name+'Alg', 
                                                   Key_tauInputContainer="tmp_TauJets",
-                                                  Key_Pi0ClusterInputContainer="TauPi0SubtractedClusters",
+                                                  Key_Pi0ClusterInputContainer="TauInitialPi0Clusters",
                                                   Key_tauOutputContainer="TauJets",
                                                   Key_neutralPFOOutputContainer="TauNeutralParticleFlowObjects",
                                                   Key_pi0ClusterOutputContainer="TauPi0Clusters",
                                                   Key_hadronicPFOOutputContainer="TauHadronicParticleFlowObjects",
                                                   Key_vertexOutputContainer = "TauSecondaryVertices",
                                                   Key_chargedPFOOutputContainer = "TauChargedParticleFlowObjects",
-                                                  Key_pi0Container= "finalTauPi0s"
+                                                  Key_pi0Container= "TauFinalPi0s"
                                                   )
                                                                                                 
         Configured.__init__(self, ignoreExistingDataObject=ignoreExistingDataObject)
diff --git a/Reconstruction/tauRec/python/TauRecRunner.py b/Reconstruction/tauRec/python/TauRecRunner.py
index 04cc5c067417..789d13b2ef57 100644
--- a/Reconstruction/tauRec/python/TauRecRunner.py
+++ b/Reconstruction/tauRec/python/TauRecRunner.py
@@ -13,59 +13,37 @@
 ################################################################################
 
 import os, sys, string
-
 from AthenaCommon.Logging import logging
 from AthenaCommon.SystemOfUnits import *
 from AthenaCommon.Constants import *
 from AthenaCommon.BeamFlags import jobproperties
 import traceback
-
 from RecExConfig.Configured import Configured
 from .TauRecRunConfigured import TauRecRunConfigured
 
-# global tauRec config keys
-_outputType = "xAOD::TauJetContainer"
-_outputKey = "TauJets"
-_outputAuxType = "xAOD::TauJetAuxContainer"
-_outputAuxKey = "TauJetsAux."
-
 ################################################################################
 ## @class TauRecRunner
 # Build proper tau candidates and associate tracks, vertex and cells
 ################################################################################
 class TauRecRunner ( TauRecRunConfigured ) :
-    """Build proper tau candidates and associate tracks, vertex and cells. 
-    Calculate properties based on cell informations. 
-    Find clusters used for Pi0 identification and eflow variables.
-    PhotonConversion will be run here too.
+    """Build final tau candidates.
+    Run algorithms that require pi0 cells, and all downstream algorithms.
     """
   
-    _output     = { _outputType:_outputKey , _outputAuxType:_outputAuxKey }
-    
     def __init__(self, name = "TauRecRunner"):
         self.name = name
         TauRecRunConfigured.__init__(self, name)
-
-
  
     def configure(self):
         mlog = logging.getLogger ('TauRecRunner.py::configure:')
         mlog.info('entering')
                 
-        from RecExConfig.RecFlags import rec    
-        
-        # xxx ToDo: still needed?        
-        from RecExConfig.ObjKeyStore import objKeyStore
-        objKeyStore.addManyTypesStreamESD(self._output)
-        objKeyStore.addManyTypesStreamAOD(self._output)              
-        
-        import tauRec.TauAlgorithmsHolder as taualgs
-        
-        from tauRec.tauRecFlags import tauFlags
-                
+        from RecExConfig.RecFlags import rec                
+        import tauRec.TauAlgorithmsHolder as taualgs        
+        from tauRec.tauRecFlags import tauFlags                
         
         tools = []
-                        
+        
         tools.append(taualgs.getPi0ClusterCreator())
         tools.append(taualgs.getPi0ClusterScaler())
         tools.append(taualgs.getPi0ScoreCalculator())
@@ -129,14 +107,6 @@ class TauRecRunner ( TauRecRunConfigured ) :
                 
         # run first part of Tau Builder
         TauRecRunConfigured.WrapTauRecToolExecHandle(self, tool=tools)
-        return True
-        
-
-    def outputKey(self):
-         return self._output[self._outputType]
-    
-    def outputType(self):
-         return self._outputType
-
+        return True        
 
 #end
diff --git a/Reconstruction/tauRec/share/Pi0ClusterMaker_jobOptions.py b/Reconstruction/tauRec/share/Pi0ClusterMaker_jobOptions.py
index 1b97e0974cb7..4ee5fe96b024 100644
--- a/Reconstruction/tauRec/share/Pi0ClusterMaker_jobOptions.py
+++ b/Reconstruction/tauRec/share/Pi0ClusterMaker_jobOptions.py
@@ -249,8 +249,8 @@ TopoSplitterForTaus.RestrictHECIWandFCalNeighbors  = False
 TopoSplitterForTaus.WeightingOfNegClusters = jobproperties.CaloTopoClusterFlags.doTreatEnergyCutAsAbsolute()
 
 # cluster maker
-cluster_container = 'TauPi0SubtractedClusters'
-CaloTopoForTausMaker = CaloClusterMaker ("TauPi0SubtractedClusterMaker")
+cluster_container = 'TauInitialPi0Clusters'
+CaloTopoForTausMaker = CaloClusterMaker ("TauInitialPi0ClusterMaker")
 CaloTopoForTausMaker.ClustersOutputName=cluster_container
 CaloTopoForTausMaker.ClusterMakerTools=[
     TopoClusterForTaus.getFullName(),
diff --git a/Reconstruction/tauRec/share/TauAODList.py b/Reconstruction/tauRec/share/TauAODList.py
index 0df44446948e..df83c6b16998 100644
--- a/Reconstruction/tauRec/share/TauAODList.py
+++ b/Reconstruction/tauRec/share/TauAODList.py
@@ -11,38 +11,46 @@
 TauAODList = []
 
 #------------------------------------------------------------------------------
-# Tau Pi0 cluster
-#------------------------------------------------------------------------------
-#TauAODList += [ "xAOD::CaloClusterContainer#TauPi0Clusters" ]
-#TauAODList += [ "xAOD::CaloClusterAuxContainer#TauPi0ClustersAux." ]
-
-TauAODList += [ "xAOD::CaloClusterContainer#TauPi0SubtractedClusters" ]
-TauAODList += [ "xAOD::CaloClusterAuxContainer#TauPi0SubtractedClustersAux." ]
-TauAODList += [ "CaloClusterCellLinkContainer#TauPi0SubtractedClusters_links" ]
-
-#------------------------------------------------------------------------------
-# TauRec main xAOD containers
+# Taus
 #------------------------------------------------------------------------------
 TauAODList += [ "xAOD::TauJetContainer#TauJets" ]
 TauAODList += [ "xAOD::TauJetAuxContainer#TauJetsAux.-mu.-nVtxPU.-ABS_ETA_LEAD_TRACK.-TAU_ABSDELTAPHI.-TAU_ABSDELTAETA.-absipSigLeadTrk" ]
 
 #------------------------------------------------------------------------------
-# TauRec tauTrack xAOD containers
+# Tau tracks
 #------------------------------------------------------------------------------
 TauAODList += [ "xAOD::TauTrackContainer#TauTracks" ]
 TauAODList += [ "xAOD::TauTrackAuxContainer#TauTracksAux." ]
 
 #------------------------------------------------------------------------------
-# Secondary Vertex for Tau Decay
+# Secondary vertex
 #------------------------------------------------------------------------------
 TauAODList += [ "xAOD::VertexContainer#TauSecondaryVertices" ]
 TauAODList += [ "xAOD::VertexAuxContainer#TauSecondaryVerticesAux.-vxTrackAtVertex" ]
 
+#------------------------------------------------------------------------------
+# Pi0 cells
+#------------------------------------------------------------------------------
+TauAODList += [ "CaloCellContainer#TauCommonPi0Cells" ]
+TauAODList += [ "CaloClusterCellLinkContainer#TauInitialPi0Clusters_links" ]
+
+#------------------------------------------------------------------------------
+# Pi0 initial clusters
+#------------------------------------------------------------------------------
+TauAODList += [ "xAOD::CaloClusterContainer#TauInitialPi0Clusters" ]
+TauAODList += [ "xAOD::CaloClusterAuxContainer#TauInitialPi0ClustersAux." ]
+
+#------------------------------------------------------------------------------
+# Shot clusters
+#------------------------------------------------------------------------------
+TauAODList += [ "xAOD::CaloClusterContainer#TauShotClusters"]
+TauAODList += [ "xAOD::CaloClusterAuxContainer#TauShotClustersAux."]
+
 #------------------------------------------------------------------------------
 # Final reconstructed 4-vectors of Pi0s
 #------------------------------------------------------------------------------
-TauAODList += [ "xAOD::ParticleContainer#finalTauPi0s" ]
-TauAODList += [ "xAOD::ParticleAuxContainer#finalTauPi0sAux." ]
+TauAODList += [ "xAOD::ParticleContainer#TauFinalPi0s" ]
+TauAODList += [ "xAOD::ParticleAuxContainer#TauFinalPi0sAux." ]
 
 #------------------------------------------------------------------------------
 # Shot ParticleFlowObjects
@@ -68,18 +76,10 @@ TauAODList += [ "xAOD::PFOAuxContainer#TauNeutralParticleFlowObjectsAux." ]
 TauAODList += [ "xAOD::PFOContainer#TauHadronicParticleFlowObjects" ]
 TauAODList += [ "xAOD::PFOAuxContainer#TauHadronicParticleFlowObjectsAux." ]
 
+#------------------------------------------------------------------------------
+# Di-tau AOD content
+#------------------------------------------------------------------------------
 from DiTauRec.DiTauRecFlags import jobproperties
 if jobproperties.DiTauRecFlags.doDiTauRec():
     include("DiTauRec/DiTauAODList.py")
     TauAODList += DiTauAODList
-
-
-#-------------------------------------------------------------------------
-# eflowObjects for tau
-#--------------------------------------------------------------------------
-#TauAODList += [ "eflowObjectContainer#eflowObjects_tauMode" ]
-#TauAODList += [ "xAOD::PFOContainer#neutralTauPFO_eflowRec" ]
-#TauAODList += [ "xAOD::PFOAuxContainer#neutralTauPFO_eflowRecAux." ]
-#TauAODList += [ "xAOD::PFOContainer#chargedTauPFO_eflowRec" ]
-#TauAODList += [ "xAOD::PFOAuxContainer#chargedTauPFO_eflowRecAux." ]
-
diff --git a/Reconstruction/tauRec/share/TauESDList.py b/Reconstruction/tauRec/share/TauESDList.py
index 97ef76bd7a22..5313f4b1f07d 100644
--- a/Reconstruction/tauRec/share/TauESDList.py
+++ b/Reconstruction/tauRec/share/TauESDList.py
@@ -11,66 +11,46 @@
 TauESDList = []
 
 #------------------------------------------------------------------------------
-# Tau1P3P cell cluster
+# Taus
 #------------------------------------------------------------------------------
-#TauESDList += [ "CaloClusterContainer#Tau1P3PCellCluster" ]
-#TauESDList += [ "CaloCellLinkContainer#Tau1P3PCellCluster_Link" ]
-#TauESDList += [ "CaloShowerContainer#Tau1P3PCellCluster_Data" ]
-
-#------------------------------------------------------------------------------
-# TauRec cell cluster
-#------------------------------------------------------------------------------
-#TauESDList += [ "CaloClusterContainer#TauRecCellCluster" ]
-#TauESDList += [ "CaloCellLinkContainer#TauRecCellCluster_Link" ]
-#TauESDList += [ "CaloShowerContainer#TauRecCellCluster_Data" ]
+TauESDList += [ "xAOD::TauJetContainer#TauJets" ]
+TauESDList += [ "xAOD::TauJetAuxContainer#TauJetsAux." ]
 
 #------------------------------------------------------------------------------
-# Tau1P3P Pi0 cluster
+# Tau tracks
 #------------------------------------------------------------------------------
-#TauESDList += [ "CaloClusterContainer#TauPi0ClusterContainer" ]
-#TauESDList += [ "CaloCellLinkContainer#TauPi0ClusterContainer_Link" ]
-#TauESDList += [ "CaloShowerContainer#TauPi0ClusterContainer_Data" ]
-#TauESDList += [ "CaloCellContainer#TauCommonPi0CellContainer" ]  # for studies of the cell-based algorithm
+TauESDList += [ "xAOD::TauTrackContainer#TauTracks" ]
+TauESDList += [ "xAOD::TauTrackAuxContainer#TauTracksAux." ]
 
 #------------------------------------------------------------------------------
-# Tau Pi0 cluster
+# Secondary vertex
 #------------------------------------------------------------------------------
-TauESDList += [ "xAOD::CaloClusterContainer#TauPi0Clusters" ]
-TauESDList += [ "xAOD::CaloClusterAuxContainer#TauPi0ClustersAux." ]
-
+TauESDList += [ "xAOD::VertexContainer#TauSecondaryVertices" ]
+TauESDList += [ "xAOD::VertexAuxContainer#TauSecondaryVerticesAux.-vxTrackAtVertex" ]
 
 #------------------------------------------------------------------------------
-# Tau Pi0 cluster cell container and links
+# Pi0 cells
 #------------------------------------------------------------------------------
-TauESDList += [ "CaloClusterCellLinkContainer#TauPi0Clusters_links" ]
 TauESDList += [ "CaloCellContainer#TauCommonPi0Cells" ]
+TauESDList += [ "CaloClusterCellLinkContainer#TauInitialPi0Clusters_links" ]
 
 #------------------------------------------------------------------------------
-# TauRec main xAOD containers
+# Pi0 initial clusters
 #------------------------------------------------------------------------------
-TauESDList += [ "xAOD::TauJetContainer#TauJets" ]
-TauESDList += [ "xAOD::TauJetAuxContainer#TauJetsAux." ]
+TauESDList += [ "xAOD::CaloClusterContainer#TauInitialPi0Clusters" ]
+TauESDList += [ "xAOD::CaloClusterAuxContainer#TauInitialPi0ClustersAux." ]
 
 #------------------------------------------------------------------------------
-# TauRec tauTrack xAOD containers
+# Shot clusters
 #------------------------------------------------------------------------------
-TauESDList += [ "xAOD::TauTrackContainer#TauTracks" ]
-TauESDList += [ "xAOD::TauTrackAuxContainer#TauTracksAux." ]
+TauESDList += [ "xAOD::CaloClusterContainer#TauShotClusters"]
+TauESDList += [ "xAOD::CaloClusterAuxContainer#TauShotClustersAux."]
 
 #------------------------------------------------------------------------------
-# Secondary Vertex for Tau Decay
+# Final reconstructed 4-vectors of Pi0s
 #------------------------------------------------------------------------------
-TauESDList += [ "xAOD::VertexContainer#TauSecondaryVertices" ]
-TauESDList += [ "xAOD::VertexAuxContainer#TauSecondaryVerticesAux.-vxTrackAtVertex" ]
-
-TauESDList += [ "xAOD::ParticleContainer#finalTauPi0s" ]
-TauESDList += [ "xAOD::ParticleAuxContainer#finalTauPi0sAux." ]
-##------------------------------------------------------------------------------
-## Tau shot clusters
-##------------------------------------------------------------------------------
-#TauESDList += [ "CaloClusterContainer#TauShotClusters" ]
-#TauESDList += [ "CaloCellLinkContainer#TauShotClusters_Link" ]
-#TauESDList += [ "CaloShowerContainer#TauShotClusters_Data" ]
+TauESDList += [ "xAOD::ParticleContainer#TauFinalPi0s" ]
+TauESDList += [ "xAOD::ParticleAuxContainer#TauFinalPi0sAux." ]
 
 #------------------------------------------------------------------------------
 # Shot ParticleFlowObjects
@@ -95,29 +75,11 @@ TauESDList += [ "xAOD::PFOAuxContainer#TauNeutralParticleFlowObjectsAux." ]
 #------------------------------------------------------------------------------
 TauESDList += [ "xAOD::PFOContainer#TauHadronicParticleFlowObjects" ]
 TauESDList += [ "xAOD::PFOAuxContainer#TauHadronicParticleFlowObjectsAux." ]
-                    
-
-#-------------------------------------------------------------------------
-# eflowObjects for tau
-#--------------------------------------------------------------------------
-#TauESDList += [ "eflowObjectContainer#eflowObjects_tauMode" ]
-#TauESDList += [ "xAOD::PFOContainer#neutralTauPFO_eflowRec" ]
-#TauESDList += [ "xAOD::PFOAuxContainer#neutralTauPFO_eflowRecAux." ]
-#TauESDList += [ "xAOD::PFOContainer#chargedTauPFO_eflowRec" ]
-#TauESDList += [ "xAOD::PFOAuxContainer#chargedTauPFO_eflowRecAux." ]
-
-
-        
-##------------------------------------------------------------------------------
-## Tau1P3P cell EM012 cluster
-##------------------------------------------------------------------------------
-#TauESDList += [ "CaloClusterContainer#Tau1P3PCellEM012ClusterContainer" ]
-#TauESDList += [ "CaloCellLinkContainer#Tau1P3PCellEM012ClusterContainer_Link" ]
-#TauESDList += [ "CaloShowerContainer#Tau1P3PCellEM012ClusterContainer_Data" ]
-                                     
 
+#------------------------------------------------------------------------------
+# Di-tau AOD content
+#------------------------------------------------------------------------------
 from DiTauRec.DiTauRecFlags import jobproperties
 if jobproperties.DiTauRecFlags.doDiTauRec():
     include("DiTauRec/DiTauESDList.py")
     TauESDList += DiTauESDList
-    pass
diff --git a/Reconstruction/tauRec/tauRec/TauRunnerAlg.h b/Reconstruction/tauRec/tauRec/TauRunnerAlg.h
index 68c5da9a297e..498c3e194b27 100644
--- a/Reconstruction/tauRec/tauRec/TauRunnerAlg.h
+++ b/Reconstruction/tauRec/tauRec/TauRunnerAlg.h
@@ -48,16 +48,15 @@ class TauRunnerAlg: public AthAlgorithm
 	ToolHandleArray<ITauToolBase>  m_tools{this, "Tools", {}, "Tools building taus"};
 
 	SG::ReadHandleKey<xAOD::TauJetContainer> m_tauInputContainer{this,"Key_tauInputContainer","tmp_TauJets","input temp tau key"};
-	SG::ReadHandleKey<xAOD::CaloClusterContainer> m_pi0ClusterInputContainer{this,"Key_Pi0ClusterInputContainer", "TauPi0SubtractedClusters", "input pi0 cluster"};
-
-	SG::WriteHandleKey<xAOD::TauJetContainer> m_tauOutputContainer{this,"Key_tauOutputContainer","TauJets","output tau data key"};	
+	SG::ReadHandleKey<xAOD::CaloClusterContainer> m_pi0ClusterInputContainer{this,"Key_Pi0ClusterInputContainer", "TauInitialPi0Clusters", "input pi0 cluster"};
 
+	SG::WriteHandleKey<xAOD::TauJetContainer> m_tauOutputContainer{this,"Key_tauOutputContainer","TauJets","output tau data key"};
 	SG::WriteHandleKey<xAOD::PFOContainer> m_neutralPFOOutputContainer{this,"Key_neutralPFOOutputContainer", "TauNeutralParticleFlowObjects", "tau neutral pfo out key"};
 	SG::WriteHandleKey<xAOD::CaloClusterContainer> m_pi0ClusterOutputContainer{this,"Key_pi0ClusterOutputContainer", "TauPi0Clusters", "tau pi0cluster output"};
 	SG::WriteHandleKey<xAOD::PFOContainer> m_hadronicPFOOutputContainer{this,"Key_hadronicPFOOutputContainer", "TauHadronicParticleFlowObjects", "tau hadronic pfo out key"};
 	SG::WriteHandleKey<xAOD::VertexContainer> m_vertexOutputContainer{this,"Key_vertexOutputContainer", "TauSecondaryVertices", "input vertex container key"};
 	SG::WriteHandleKey<xAOD::PFOContainer> m_chargedPFOOutputContainer{this,"Key_chargedPFOOutputContainer", "TauChargedParticleFlowObjects", "tau charged pfo out key"};
-	SG::WriteHandleKey<xAOD::ParticleContainer> m_pi0Container{this,"Key_pi0Container", "finalTauPi0s", "tau final pi0s output"};
+	SG::WriteHandleKey<xAOD::ParticleContainer> m_pi0Container{this,"Key_pi0Container", "TauFinalPi0s", "tau final pi0s output"};
 	
 };
 
-- 
GitLab


From ab1c820e939f68b5e51e5de8fe40b8e8ae85842c Mon Sep 17 00:00:00 2001
From: Zaza Chubinidze <zazachubin@gmail.com>
Date: Thu, 8 Oct 2020 16:34:42 +0200
Subject: [PATCH 358/403] fix TRTPhaseConfig example

---
 .../InDetConfig/python/TRTPhaseConfig.py      | 34 ++++++++++++++++---
 1 file changed, 29 insertions(+), 5 deletions(-)

diff --git a/InnerDetector/InDetConfig/python/TRTPhaseConfig.py b/InnerDetector/InDetConfig/python/TRTPhaseConfig.py
index 5ad1858931d1..b904fe576ca1 100644
--- a/InnerDetector/InDetConfig/python/TRTPhaseConfig.py
+++ b/InnerDetector/InDetConfig/python/TRTPhaseConfig.py
@@ -2,6 +2,18 @@
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory     import CompFactory
 
+def TRTPhaseCondCfg(flags, name = "TRTPhaseCondAlg", **kwargs):
+    acc = ComponentAccumulator()
+    from InDetOverlay.TRT_ConditionsConfig import TRT_CalDbToolCfg
+    InDetTRTCalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
+    acc.addPublicTool(InDetTRTCalDbTool)
+
+    kwargs.setdefault("TRTCalDbTool", InDetTRTCalDbTool)
+    # Average T0 CondAlg
+    TRTPhaseCondAlg = CompFactory.TRTPhaseCondAlg(name = name, **kwargs)
+    acc.addCondAlgo(TRTPhaseCondAlg)
+    return acc
+
 def InDetTrackSummaryToolCfg(flags, name='InDetTrackSummaryTool',**kwargs) :
     acc = ComponentAccumulator()
 
@@ -36,7 +48,10 @@ def InDetCosmicsEventPhaseToolCfg(flags, name='InDetCosmicsEventPhaseTool', **kw
     else:
         kwargs.setdefault("GlobalOffset", -3.125)
     # CalDb tool
-    InDetTRTCalDbTool = CompFactory.TRT_CalDbTool(name = "TRT_CalDbTool")
+    from InDetOverlay.TRT_ConditionsConfig import TRT_CalDbToolCfg
+    InDetTRTCalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
+    acc.addPublicTool(InDetTRTCalDbTool)
+
     kwargs.setdefault("UseNewEP", True)
     kwargs.setdefault("TRTCalDbTool", InDetTRTCalDbTool)
 
@@ -56,7 +71,10 @@ def InDetFixedWindowTrackTimeToolCfg(flags, name='InDetFixedWindowTrackTimeTool'
     else:
         kwargs.setdefault("GlobalOffset", -3.125)
     # CalDb tool
-    InDetTRTCalDbTool = CompFactory.TRT_CalDbTool(name = "TRT_CalDbTool")
+    from InDetOverlay.TRT_ConditionsConfig import TRT_CalDbToolCfg
+    InDetTRTCalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
+    acc.addPublicTool(InDetTRTCalDbTool)
+
     cutWindowCenter  = -8.5
     cutWindowSize    = 7
     kwargs.setdefault("UseNewEP"     , True)
@@ -81,7 +99,10 @@ def InDetSlidingWindowTrackTimeToolCfg(flags, name='InDetSlidingWindowTrackTimeT
     else:
         kwargs.setdefault("GlobalOffset", -3.125)
     # CalDb tool
-    InDetTRTCalDbTool = CompFactory.TRT_CalDbTool(name = "TRT_CalDbTool")
+    from InDetOverlay.TRT_ConditionsConfig import TRT_CalDbToolCfg
+    InDetTRTCalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
+    acc.addPublicTool(InDetTRTCalDbTool)
+
     numberIterations = 5
     cutWindowSize    = 7
     kwargs.setdefault("UseNewEP"         , True)
@@ -111,7 +132,10 @@ def InDetCosmicsEventPhaseCfg(flags, InputTrackCollections, name = 'InDetCosmics
     acc.addPublicTool(InDetTrackSummaryTool)
 
     # CalDb tool
-    InDetTRTCalDbTool = CompFactory.TRT_CalDbTool(name = "TRT_CalDbTool")
+    from InDetOverlay.TRT_ConditionsConfig import TRT_CalDbToolCfg
+    InDetTRTCalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
+    acc.addPublicTool(InDetTRTCalDbTool)
+
     kwargs.setdefault("InputTracksNames" , InputTrackCollections)
     kwargs.setdefault("TrackSummaryTool" , InDetTrackSummaryTool)
     kwargs.setdefault("TRTCalDbTool"     , InDetTRTCalDbTool)
@@ -123,7 +147,6 @@ def InDetCosmicsEventPhaseCfg(flags, InputTrackCollections, name = 'InDetCosmics
 
     acc.addEventAlgo(CompFactory.InDet.InDetCosmicsEventPhase(name = name, **kwargs))
     return acc
-
 # --------------------------------------------------------------------------------
 #
 # --- TRT phase calculation
@@ -132,6 +155,7 @@ def InDetCosmicsEventPhaseCfg(flags, InputTrackCollections, name = 'InDetCosmics
 def TRTPhaseCfg(flags, self, InputTrackCollections = [], **kwargs):
     acc = ComponentAccumulator()
     if flags.InDet.doPRDFormation and flags.Detector.RecoTRT:
+        acc.merge(TRTPhaseCondCfg(flags))
         #    
         # --- calculation of the event phase from all 3 input collections
         #
-- 
GitLab


From ca5b690f69862bf5b611bb53ffaae2c09c37f3db Mon Sep 17 00:00:00 2001
From: Zaza Chubinidze <zazachubin@gmail.com>
Date: Thu, 8 Oct 2020 16:41:19 +0200
Subject: [PATCH 359/403] fix TRTPreProcessing example

---
 .../InDetConfig/python/TRTPreProcessing.py    | 31 ++++++++++++++++---
 1 file changed, 26 insertions(+), 5 deletions(-)

diff --git a/InnerDetector/InDetConfig/python/TRTPreProcessing.py b/InnerDetector/InDetConfig/python/TRTPreProcessing.py
index d5546a36f084..38f100e267d6 100644
--- a/InnerDetector/InDetConfig/python/TRTPreProcessing.py
+++ b/InnerDetector/InDetConfig/python/TRTPreProcessing.py
@@ -82,12 +82,11 @@ def InDetTRT_DriftFunctionToolCfg(flags, useTimeInfo, usePhase, name = "InDetTRT
                             -0.328962, -0.403399, -0.663656, -1.029428, -1.46008, -1.919092, -2.151582, -2.285481, -2.036822, -2.15805])
                     
     # Second calibration DB Service in case pile-up and physics hits have different calibrations
-    if ConfigFlags.Detector.RecoTRT:
-        TRT_CalDbTool = CompFactory.TRT_CalDbTool
-        InDetTRTCalDbTool2 = TRT_CalDbTool(	name="TRT_CalDbTool2",
-                                            RtFolderName="/TRT/Calib/MC/RT",
-                                            T0FolderName="/TRT/Calib/MC/T0")
+    if flags.Detector.RecoTRT:
+        from InDetOverlay.TRT_ConditionsConfig import TRT_CalDbToolCfg
+        InDetTRTCalDbTool2 = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
         acc.addPublicTool(InDetTRTCalDbTool2)
+
         kwargs.setdefault("TRTCalDbTool2", InDetTRTCalDbTool2)
         kwargs.setdefault("IsOverlay", True)
         kwargs.setdefault("IsMC", False)
@@ -209,6 +208,10 @@ def InDetTRT_RIO_MakerCfg(flags, useTimeInfo, usePhase, prefix, collection, name
     #
     InDetTRT_DriftCircleTool = acc.popToolsAndMerge(TRT_DriftCircleToolCfg(flags, useTimeInfo, usePhase, prefix, name = "InDetTRT_DriftCircleTool"))
     acc.addPublicTool(InDetTRT_DriftCircleTool)
+
+    # Region selector tools for TRT
+    from RegionSelector.RegSelToolConfig import regSelTool_TRT_Cfg
+    RegSelTool_TRT = acc.popToolsAndMerge(regSelTool_TRT_Cfg(flags))
     #
     # --- TRT_RIO_Maker Algorithm
     #
@@ -216,6 +219,7 @@ def InDetTRT_RIO_MakerCfg(flags, useTimeInfo, usePhase, prefix, collection, name
     kwargs.setdefault("TrtDescrManageLocation", 'TRT')
     kwargs.setdefault("TRTRDOLocation", 'TRT_RDOs')
     kwargs.setdefault("TRTRIOLocation", collection)
+    kwargs.setdefault("RegSelTool", RegSelTool_TRT)
 
     acc.addEventAlgo(CompFactory.InDet.TRT_RIO_Maker(name, **kwargs))
     return acc
@@ -227,6 +231,10 @@ def InDetTRT_RIO_MakerPUCfg(flags, useTimeInfo, usePhase, prefix, collectionPU,
     #
     InDetTRT_DriftCircleTool = acc.popToolsAndMerge(TRT_DriftCircleToolCfg(flags, useTimeInfo, usePhase, prefix, name = "InDetTRT_DriftCircleTool"))
     acc.addPublicTool(InDetTRT_DriftCircleTool)
+
+    # Region selector tools for TRT
+    from RegionSelector.RegSelToolConfig import regSelTool_TRT_Cfg
+    RegSelTool_TRT = acc.popToolsAndMerge(regSelTool_TRT_Cfg(flags))
     #
     # --- TRT_RIO_Maker Algorithm
     #
@@ -234,6 +242,7 @@ def InDetTRT_RIO_MakerPUCfg(flags, useTimeInfo, usePhase, prefix, collectionPU,
     kwargs.setdefault("TrtDescrManageLocation", 'TRT')
     kwargs.setdefault("TRTRDOLocation", 'TRT_PU_RDOs')
     kwargs.setdefault("TRTRIOLocation", collectionPU)
+    kwargs.setdefault("RegSelTool", RegSelTool_TRT)
 
     acc.addEventAlgo(CompFactory.InDet.TRT_RIO_Maker(name, **kwargs))
     return acc
@@ -242,6 +251,13 @@ def InDetTRT_RIO_MakerPUCfg(flags, useTimeInfo, usePhase, prefix, collectionPU,
 def TRTPreProcessingCfg(flags, useTimeInfo = True, usePhase = False, **kwargs):
     acc = ComponentAccumulator()
 
+    from PixelConditionsAlgorithms.PixelConditionsConfig import (PixelChargeCalibCondAlgCfg, PixelConfigCondAlgCfg, PixelCablingCondAlgCfg, PixelReadoutSpeedAlgCfg)
+
+    acc.merge(PixelChargeCalibCondAlgCfg(flags))
+    acc.merge(PixelConfigCondAlgCfg(flags))
+    acc.merge(PixelCablingCondAlgCfg(flags))
+    acc.merge(PixelReadoutSpeedAlgCfg(flags))
+
     if flags.InDet.doPRDFormation and flags.InDet.doTRT_PRDFormation:
         #
         # --- setup naming of tools and algs
@@ -306,6 +322,11 @@ if __name__ == "__main__":
     msgService = top_acc.getService('MessageSvc')
     msgService.Format = "S:%s E:%e % F%138W%S%7W%R%T  %0W%M"
 
+    from PixelGeoModel.PixelGeoModelConfig import PixelGeometryCfg
+    from SCT_GeoModel.SCT_GeoModelConfig import SCT_GeometryCfg
+    top_acc.merge( PixelGeometryCfg(ConfigFlags) )
+    top_acc.merge( SCT_GeometryCfg(ConfigFlags) )
+
     if not ConfigFlags.InDet.doDBMstandalone:
         top_acc.merge(TRTPreProcessingCfg(ConfigFlags,(not ConfigFlags.InDet.doTRTPhaseCalculation or ConfigFlags.Beam.Type =="collisions"),False))
     
-- 
GitLab


From 827071bd1ac0aeecd298317bea286e7d57470f43 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, 8 Oct 2020 16:43:58 +0200
Subject: [PATCH 360/403] allow a validation chain list to be used in pp && MC
 case

---
 .../python/HLTMonTriggerList.py               | 36 ++++++++++---------
 1 file changed, 20 insertions(+), 16 deletions(-)

diff --git a/Trigger/TrigMonitoring/TrigHLTMonitoring/python/HLTMonTriggerList.py b/Trigger/TrigMonitoring/TrigHLTMonitoring/python/HLTMonTriggerList.py
index 68544140eb08..0b1f6eede476 100644
--- a/Trigger/TrigMonitoring/TrigHLTMonitoring/python/HLTMonTriggerList.py
+++ b/Trigger/TrigMonitoring/TrigHLTMonitoring/python/HLTMonTriggerList.py
@@ -177,27 +177,31 @@ class HLTMonTriggerList:
 
 	# Config of monitoring lists which are dependent on running mode
 	def set_HLTMonTrigList_pp(self):
-		self.monitoring_bjet = bjet.monitoring_bjet_pp
-		self.monitoring_mujet = bjet.monitoring_mujet_pp
+                self.monitoring_bjet = bjet.monitoring_bjet_pp
+                self.monitoring_mujet = bjet.monitoring_mujet_pp
 
-		self.primary_bphys = bphys.primary_bphys_pp
+                self.primary_bphys = bphys.primary_bphys_pp
 
-		self.monitoring_l1jet = jets.monitoring_l1jet_pp
-		self.monitoring_jet = jets.monitoring_jet_pp
-		self.primary_l1jet = jets.primary_l1jet_pp
-		self.primary_jet = jets.primary_jet_pp
+                self.monitoring_l1jet = jets.monitoring_l1jet_pp
+                self.monitoring_jet = jets.monitoring_jet_pp
+                self.primary_l1jet = jets.primary_l1jet_pp
+                self.primary_jet = jets.primary_jet_pp
 
-		self.monitoring_met_shifter = met.monitoring_met_shifter_pp
-		self.monitoring_met_expert = met.monitoring_met_expert_pp
+                self.monitoring_met_shifter = met.monitoring_met_shifter_pp
+                self.monitoring_met_expert = met.monitoring_met_expert_pp
 
-		self.monitoring_muonNonIso = muon.monitoring_muonNonIso_pp
-		self.monitoring_muonIso = muon.monitoring_muonIso_pp
-		self.monitoring_MSonly = muon.monitoring_MSonly_pp
-		self.monitoring_muonEFFS = muon.monitoring_muonEFFS_pp
-		self.monitoring_muonLowpt = muon.monitoring_muonLowpt
-		self.monitoring_muon_Support = muon.monitoring_muon_Support_pp
+                self.monitoring_muonNonIso = muon.monitoring_muonNonIso_pp
+                self.monitoring_muonIso = muon.monitoring_muonIso_pp
+                self.monitoring_MSonly = muon.monitoring_MSonly_pp
+                self.monitoring_muonEFFS = muon.monitoring_muonEFFS_pp
+                self.monitoring_muonLowpt = muon.monitoring_muonLowpt
+                self.monitoring_muon_Support = muon.monitoring_muon_Support_pp
+
+                self.monitoring_tau = tau.monitoring_tau_pp
 
-		self.monitoring_tau = tau.monitoring_tau_pp
+                #override if both pp and MC are true
+                if DQMonFlags.monManDataType()=='monteCarlo':
+                        self.monitoring_tau = tau.monitoring_tau_validation
 
 	def set_HLTMonTrigList_HI(self):
 		self.monitoring_bjet = bjet.monitoring_bjet_hi
-- 
GitLab


From 3a4c042a952d6708a9319cb2bb06267364a7ee58 Mon Sep 17 00:00:00 2001
From: Zaza Chubinidze <zazachubin@gmail.com>
Date: Thu, 8 Oct 2020 16:46:28 +0200
Subject: [PATCH 361/403] add new TRTSegmentFindingConfig.py config with
 TrackingCommonConfig.py

---
 .../python/TRTSegmentFindingConfig.py         | 277 ++++++
 .../python/TrackingCommonConfig.py            | 820 ++++++++++++++++++
 2 files changed, 1097 insertions(+)
 create mode 100644 InnerDetector/InDetConfig/python/TRTSegmentFindingConfig.py
 create mode 100644 InnerDetector/InDetConfig/python/TrackingCommonConfig.py

diff --git a/InnerDetector/InDetConfig/python/TRTSegmentFindingConfig.py b/InnerDetector/InDetConfig/python/TRTSegmentFindingConfig.py
new file mode 100644
index 000000000000..b48fcaad1bcf
--- /dev/null
+++ b/InnerDetector/InDetConfig/python/TRTSegmentFindingConfig.py
@@ -0,0 +1,277 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.ComponentFactory import CompFactory
+import InDetConfig.TrackingCommonConfig as TC
+
+def TRT_TrackSegmentsMaker_BarrelCosmicsCfg(flags, name='InDetTRTSegmentsMaker', **kwargs) :
+    acc = ComponentAccumulator()
+
+    kwargs.setdefault("TrtManagerLocation", 'TRT') # InDetKeys.TRT_Manager
+    kwargs.setdefault("TRT_ClustersContainer", 'TRT_DriftCirclesUncalibrated') # InDetKeys.TRT_DriftCirclesUncalibrated
+    kwargs.setdefault("IsMagneticFieldOn", flags.BField.solenoidOn)
+
+    acc.setPrivateTools(CompFactory.InDet.TRT_TrackSegmentsMaker_BarrelCosmics(name = name, **kwargs))
+    return acc
+
+def TRT_TrackSegmentsMaker_ATLxkCfg(flags, name = 'InDetTRT_SeedsMaker', extension = '', TrackingCuts = None, InputCollections = None, **kwargs):
+    acc = ComponentAccumulator()
+    #
+    # --- decide if use the association tool
+    #
+    usePrdAssociationTool = len(InputCollections) > 0
+
+    #
+    # --- get list of already associated hits (always do this, even if no other tracking ran before)
+    #
+    prefix = 'InDetSegment'
+    suffix = extension
+    #
+    # --- cut values
+    #
+    if extension == "_TRT":
+        # TRT Subdetector segment finding
+        MinNumberDCs   = TrackingCuts.minTRTonly
+        pTmin          = TrackingCuts.minPT
+        sharedFrac     = TrackingCuts.maxTRTonlyShared
+    else:
+        # TRT-only/back-tracking segment finding
+        MinNumberDCs   = TrackingCuts.minSecondaryTRTonTrk
+        pTmin          = TrackingCuts.minSecondaryPt
+        sharedFrac     = TrackingCuts.maxSecondaryTRTShared
+    #
+    # --- offline version  of TRT segemnt making
+    #
+    InDetPatternPropagator = TC.InDetPatternPropagatorCfg()
+    acc.addPublicTool(InDetPatternPropagator)
+
+    InDetTRTExtensionTool = acc.popToolsAndMerge(TC.InDetTRT_ExtensionToolCfg(flags, TrackingCuts = TrackingCuts))
+    acc.addPublicTool(InDetTRTExtensionTool)
+
+    kwargs.setdefault("TRT_ClustersContainer", 'TRT_DriftCircles') # InDetKeys.TRT_DriftCircles
+    kwargs.setdefault("PropagatorTool", InDetPatternPropagator)
+    kwargs.setdefault("TrackExtensionTool", InDetTRTExtensionTool)
+    kwargs.setdefault("PRDtoTrackMap", prefix+'PRDtoTrackMap'+suffix if usePrdAssociationTool else '')
+    kwargs.setdefault("RemoveNoiseDriftCircles", flags.InDet.removeTRTNoise)
+    kwargs.setdefault("MinNumberDriftCircles", MinNumberDCs)
+    kwargs.setdefault("NumberMomentumChannel", TrackingCuts.TRTSegFinderPtBins)
+    kwargs.setdefault("pTmin", pTmin)
+    kwargs.setdefault("sharedFrac", sharedFrac)
+
+    InDetTRT_TrackSegmentsMaker = CompFactory.InDet.TRT_TrackSegmentsMaker_ATLxk(name = name, **kwargs)
+    acc.setPrivateTools(InDetTRT_TrackSegmentsMaker)
+    return acc
+
+def TRT_TrackSegmentsMakerCondAlg_ATLxkCfg(name = 'InDetTRT_SeedsMakerCondAlg', extension = '', TrackingCuts = None, **kwargs):
+    acc = ComponentAccumulator()
+    #
+    # --- cut values
+    #
+    if extension == "_TRT":
+        # TRT Subdetector segment finding
+        pTmin = TrackingCuts.minPT
+    else:
+        # TRT-only/back-tracking segment finding
+        pTmin = TrackingCuts.minSecondaryPt
+
+    InDetPatternPropagator = TC.InDetPatternPropagatorCfg()
+    acc.addPublicTool(InDetPatternPropagator)
+
+    kwargs.setdefault("PropagatorTool", InDetPatternPropagator)
+    kwargs.setdefault("NumberMomentumChannel", TrackingCuts.TRTSegFinderPtBins)
+    kwargs.setdefault("pTmin", pTmin)
+
+    InDetTRT_TrackSegmentsMakerCondAlg = CompFactory.InDet.TRT_TrackSegmentsMakerCondAlg_ATLxk(name = name, **kwargs)
+    acc.addCondAlgo(InDetTRT_TrackSegmentsMakerCondAlg)
+    return acc
+
+def TRT_TrackSegmentsFinderCfg(flags, name = 'InDetTRT_TrackSegmentsFinderPhase', extension = '', TrackingCuts = None, BarrelSegments = None, InputCollections =None, doPhase = False, **kwargs):
+    acc = ComponentAccumulator()
+
+    # ---------------------------------------------------------------
+    #
+    # --- now the main steering of the TRT segments finding
+    #
+    # ---------------------------------------------------------------
+    if flags.Beam.Type == "cosmics":
+        #
+        # --- cosmics barrel segments (use TRT track segements even for NewT) 
+        #
+        if doPhase:
+            InDetTRT_TrackSegmentsMakerPhase = acc.popToolsAndMerge(TRT_TrackSegmentsMaker_BarrelCosmicsCfg(flags, name='InDetTRTSegmentsMakerPhase'+extension))
+            acc.addPublicTool(InDetTRT_TrackSegmentsMakerPhase)
+
+            kwargs.setdefault("SegmentsMakerTool", InDetTRT_TrackSegmentsMakerPhase)
+            kwargs.setdefault("SegmentsLocation", BarrelSegments)
+        else:
+            InDetTRT_TrackSegmentsMaker = acc.popToolsAndMerge(TRT_TrackSegmentsMaker_BarrelCosmicsCfg(flags, name='InDetTRTSegmentsMaker'+extension,
+                                                                                                              TRT_ClustersContainer = 'TRT_DriftCircles')) # InDetKeys.TRT_DriftCircles
+            acc.addPublicTool(InDetTRT_TrackSegmentsMaker)
+
+            if flags.InDet.doCaloSeededTRTSegments or TrackingCuts.RoISeededBackTracking:
+                kwargs.setdefault("SegmentsMakerTool", InDetTRT_TrackSegmentsMaker)
+                kwargs.setdefault("SegmentsLocation", BarrelSegments)
+                kwargs.setdefault("useCaloSeeds", True)
+                kwargs.setdefault("InputClusterContainerName", 'InDetCaloClusterROIs') # InDetKeys.CaloClusterROIContainer
+            else:
+                kwargs.setdefault("SegmentsMakerTool", InDetTRT_TrackSegmentsMaker)
+                kwargs.setdefault("SegmentsLocation", BarrelSegments)
+                kwargs.setdefault("InputClusterContainerName", "")
+    else:
+        #
+        # --- offline version  of TRT segemnt making
+        #
+        InDetTRT_TrackSegmentsMaker = acc.popToolsAndMerge(TRT_TrackSegmentsMaker_ATLxkCfg( flags, 
+                                                                                            name = 'InDetTRT_SeedsMaker'+extension, 
+                                                                                            extension = extension,
+                                                                                            TrackingCuts = TrackingCuts,
+                                                                                            InputCollections = InputCollections))
+        acc.addPublicTool(InDetTRT_TrackSegmentsMaker)
+        kwargs.setdefault("SegmentsMakerTool", InDetTRT_TrackSegmentsMaker)
+
+        acc.merge(TRT_TrackSegmentsMakerCondAlg_ATLxkCfg(name = 'InDetTRT_SeedsMakerCondAlg'+ extension, 
+                                                         extension = extension,
+                                                         TrackingCuts=TrackingCuts))
+
+    acc.addEventAlgo(CompFactory.InDet.TRT_TrackSegmentsFinder( name = name, **kwargs))
+    return acc
+
+def SegmentDriftCircleAssValidationCfg(flags, name="InDetSegmentDriftCircleAssValidation", extension='', TrackingCuts=None, BarrelSegments='', **kwargs):
+    acc = ComponentAccumulator()
+    #
+    # --- cut values
+    #
+    if extension == "_TRT":
+        # TRT Subdetector segment finding
+        MinNumberDCs = TrackingCuts.minTRTonly
+        pTmin        = TrackingCuts.minPT
+    else:
+        # TRT-only/back-tracking segment finding
+        MinNumberDCs = TrackingCuts.minSecondaryTRTonTrk
+        pTmin        = TrackingCuts.minSecondaryPt
+
+    #kwargs.setdefault("OrigTracksLocation", BarrelSegments)
+    kwargs.setdefault("TRT_DriftCirclesName", 'TRT_DriftCircles') # InDetKeys.TRT_DriftCircles
+    kwargs.setdefault("pTmin", pTmin)
+    kwargs.setdefault("Pseudorapidity", 2.1) # end of TRT
+    kwargs.setdefault("RadiusMin", 0.)
+    kwargs.setdefault("RadiusMax", 600.)
+    kwargs.setdefault("MinNumberDCs", MinNumberDCs)
+
+    InDetSegmentDriftCircleAssValidation = CompFactory.InDet.SegmentDriftCircleAssValidation(name = name, **kwargs)
+    acc.addEventAlgo(InDetSegmentDriftCircleAssValidation)
+    return acc
+
+def TRTActiveCondAlgCfg(flags, name="TRTActiveCondAlg", **kwargs):
+    acc = ComponentAccumulator()
+
+    InDetTRTStrawStatusSummaryTool = acc.popToolsAndMerge(TC.InDetTRTStrawStatusSummaryToolCfg(flags))
+    acc.addPublicTool(InDetTRTStrawStatusSummaryTool)
+
+    kwargs.setdefault("TRTStrawStatusSummaryTool", InDetTRTStrawStatusSummaryTool)
+
+    TRTActiveCondAlg = CompFactory.TRTActiveCondAlg(name = name, **kwargs)
+    acc.addCondAlgo(TRTActiveCondAlg)
+    return acc
+
+def TRTSegmentFindingCfg(flags, extension = "", InputCollections = None, NewTrackingCuts = None, BarrelSegments = None, doPhase = False):
+    acc = ComponentAccumulator()
+    #
+    # --- decide if use the association tool
+    #
+    usePrdAssociationTool = len(InputCollections) > 0
+
+    #
+    # --- get list of already associated hits (always do this, even if no other tracking ran before)
+    #
+    prefix = 'InDetSegment'
+    suffix = extension
+    if usePrdAssociationTool:
+        acc.merge(TC.InDetTrackPRD_AssociationCfg(flags, namePrefix = prefix,
+                                                         nameSuffix = suffix,
+                                                         TracksName = list(InputCollections)))
+    #
+    # --- TRT track reconstruction
+    #
+    acc.merge(TRT_TrackSegmentsFinderCfg( flags,
+                                          name = 'InDetTRT_TrackSegmentsFinderPhase'+extension,
+                                          extension =extension,
+                                          TrackingCuts = NewTrackingCuts,
+                                          BarrelSegments=BarrelSegments,
+                                          InputCollections = InputCollections,
+                                          doPhase = doPhase))
+    #
+    # --- load TRT validation alg
+    #
+    
+    if flags.InDet.doTruth and not flags.Beam.Type == "cosmics":
+        acc.merge(SegmentDriftCircleAssValidationCfg(flags,
+                                                    name="InDetSegmentDriftCircleAssValidation"+extension,
+                                                    TrackingCuts = NewTrackingCuts,
+                                                    BarrelSegments=BarrelSegments))
+    
+    return acc
+
+
+if __name__ == "__main__":
+    from AthenaCommon.Configurable import Configurable
+    Configurable.configurableRun3Behavior=1
+
+    from AthenaConfiguration.AllConfigFlags import ConfigFlags
+    from AthenaConfiguration.TestDefaults import defaultTestFiles
+    ConfigFlags.Input.Files=defaultTestFiles.RDO
+
+    ConfigFlags.Detector.RecoTRT = True
+    ConfigFlags.Detector.RecoIBL = True
+
+    numThreads=1
+    ConfigFlags.Concurrency.NumThreads=numThreads
+    ConfigFlags.Concurrency.NumConcurrentEvents=numThreads # Might change this later, but good enough for the moment.
+
+    ConfigFlags.lock()
+    ConfigFlags.dump()
+
+    from AthenaConfiguration.MainServicesConfig import MainServicesCfg
+    top_acc = MainServicesCfg(ConfigFlags)
+
+    msgService = top_acc.getService('MessageSvc')
+    msgService.Format = "S:%s E:%e % F%138W%S%7W%R%T  %0W%M"
+    
+    from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
+    top_acc.merge(PoolReadCfg(ConfigFlags))
+
+    from MagFieldServices.MagFieldServicesConfig import MagneticFieldSvcCfg
+    top_acc.merge(MagneticFieldSvcCfg(ConfigFlags))
+
+    from TRT_GeoModel.TRT_GeoModelConfig import TRT_GeometryCfg
+    top_acc.merge(TRT_GeometryCfg( ConfigFlags ))
+
+    from PixelGeoModel.PixelGeoModelConfig import PixelGeometryCfg
+    from SCT_GeoModel.SCT_GeoModelConfig import SCT_GeometryCfg
+    top_acc.merge( PixelGeometryCfg(ConfigFlags) )
+    top_acc.merge( SCT_GeometryCfg(ConfigFlags) )
+
+    # NewTracking collection keys
+    InputCombinedInDetTracks = []
+
+    InDetNewTrackingCuts = ConfigFlags.InDet.Tracking
+    #############################################################################
+    top_acc.merge(TRTActiveCondAlgCfg(ConfigFlags))
+    top_acc.merge(TC.TRT_DetElementsRoadCondAlgCfg())
+
+    from InDetConfig.TRTPreProcessing import TRTPreProcessingCfg
+    if not ConfigFlags.InDet.doDBMstandalone:
+        top_acc.merge(TRTPreProcessingCfg(ConfigFlags,(not ConfigFlags.InDet.doTRTPhaseCalculation or ConfigFlags.Beam.Type =="collisions"),False))
+
+    top_acc.merge(TRTSegmentFindingCfg( ConfigFlags,
+                                        "",
+                                        InputCombinedInDetTracks,
+                                        InDetNewTrackingCuts,
+                                        'TRTSegments')) # InDetKeys.TRT_Segments
+    #############################################################################
+
+    iovsvc = top_acc.getService('IOVDbSvc')
+    iovsvc.OutputLevel=5
+    top_acc.getService('StoreGateSvc').Dump = True
+    top_acc.printConfig(withDetails = True, summariseProps = True)
+    top_acc.run(25)
+    top_acc.store(open("test_TRTSegmentFinding.pkl", "wb"))
\ No newline at end of file
diff --git a/InnerDetector/InDetConfig/python/TrackingCommonConfig.py b/InnerDetector/InDetConfig/python/TrackingCommonConfig.py
new file mode 100644
index 000000000000..62b03f5a3679
--- /dev/null
+++ b/InnerDetector/InDetConfig/python/TrackingCommonConfig.py
@@ -0,0 +1,820 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.ComponentFactory     import CompFactory
+from IOVDbSvc.IOVDbSvcConfig                  import addFoldersSplitOnline
+from InDetConfig.InDetRecToolConfig           import makeName
+#######################################################################
+
+def copyArgs(kwargs, copy_list):
+    dict_copy={}
+    for elm in copy_list :
+        if elm in kwargs :
+            dict_copy[elm]=kwargs[elm]
+    return dict_copy
+
+def NeuralNetworkToHistoToolCfg(**kwargs):
+    acc = ComponentAccumulator()
+    name = kwargs.pop('name',"NeuralNetworkToHistoTool")
+
+    NeuralNetworkToHistoTool=CompFactory.Trk.NeuralNetworkToHistoTool(name, **kwargs)
+    acc.setPrivateTools(NeuralNetworkToHistoTool)
+    return acc
+
+def PixelClusterNnCondAlgCfg(flags, **kwargs):
+    acc = ComponentAccumulator()
+    track_nn = kwargs.pop('TrackNetwork',False)
+    nn_names = [
+          "NumberParticles_NoTrack/",
+          "ImpactPoints1P_NoTrack/",
+          "ImpactPoints2P_NoTrack/",
+          "ImpactPoints3P_NoTrack/",
+          "ImpactPointErrorsX1_NoTrack/",
+          "ImpactPointErrorsX2_NoTrack/",
+          "ImpactPointErrorsX3_NoTrack/",
+          "ImpactPointErrorsY1_NoTrack/",
+          "ImpactPointErrorsY2_NoTrack/",
+          "ImpactPointErrorsY3_NoTrack/" ]
+
+    if track_nn :
+        nn_names = [ elm.replace('_NoTrack', '')  for elm in nn_names ]
+
+    acc.merge(addFoldersSplitOnline(flags, "PIXEL", "/PIXEL/Onl/PixelClustering/PixelClusNNCalib", "/PIXEL/PixelClustering/PixelClusNNCalib", className='CondAttrListCollection'))
+    kwargs.setdefault("NetworkNames", nn_names)
+    kwargs.setdefault("WriteKey", 'PixelClusterNN' if not track_nn else 'PixelClusterNNWithTrack')
+
+    if 'NetworkToHistoTool' not in kwargs :
+        NeuralNetworkToHistoTool = acc.popToolsAndMerge(NeuralNetworkToHistoToolCfg(name = "NeuralNetworkToHistoTool"))
+        kwargs.setdefault("NetworkToHistoTool", NeuralNetworkToHistoTool)
+        acc.addPublicTool(NeuralNetworkToHistoTool)
+
+    acc.addCondAlgo(CompFactory.InDet.TTrainedNetworkCondAlg(kwargs.pop("name", 'PixelClusterNnCondAlg'), **kwargs))
+    return acc
+
+def PixelClusterNnWithTrackCondAlgCfg(flags, **kwargs):
+    kwargs.setdefault("TrackNetwork", True)
+    kwargs.setdefault("name", 'PixelClusterNnWithTrackCondAlg')
+
+    acc = PixelClusterNnCondAlgCfg(flags, **kwargs)
+    return acc
+
+def LWTNNCondAlgCfg(flags, **kwargs):
+    acc = ComponentAccumulator()
+    # Check for the folder
+    acc.merge(addFoldersSplitOnline(flags, "PIXEL", "/PIXEL/Onl/PixelClustering/PixelNNCalibJSON", "/PIXEL/PixelClustering/PixelNNCalibJSON", className='CondAttrListCollection'))
+    # What we'll store it as
+    kwargs.setdefault("WriteKey", 'PixelClusterNNJSON')
+
+    # Set up the algorithm
+    acc.addCondAlgo(CompFactory.InDet.LWTNNCondAlg(kwargs.pop("name", "LWTNNCondAlg"), **kwargs))
+    return acc
+
+def NnClusterizationFactoryCfg(flags, name = 'NnClusterizationFactory', **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName(name, kwargs)
+
+    if 'PixelLorentzAngleTool' not in kwargs :
+        from SiLorentzAngleTool.PixelLorentzAngleConfig import PixelLorentzAngleTool
+        PixelLorentzAngleTool = PixelLorentzAngleTool(flags, name="PixelLorentzAngleTool", **kwargs)
+        acc.addPublicTool(PixelLorentzAngleTool)
+        kwargs.setdefault("PixelLorentzAngleTool", PixelLorentzAngleTool)
+
+    useTTrainedNetworks = flags.InDet.useNNTTrainedNetworks
+    do_runI = flags.GeoModel.Run not in ["RUN2", "RUN3"]
+
+    if useTTrainedNetworks :
+        acc.merge(PixelClusterNnCondAlgCfg(flags, name='PixelClusterNnCondAlg', GetInputsInfo = do_runI))
+        acc.merge(PixelClusterNnWithTrackCondAlgCfg(flags, name = 'PixelClusterNnWithTrackCondAlg', GetInputsInfo = do_runI))
+    else:
+        acc.merge(addFoldersSplitOnline(flags, "PIXEL", "/PIXEL/Onl/PixelClustering/PixelClusNNCalib", "/PIXEL/PixelClustering/PixelClusNNCalib", className='CondAttrListCollection'))
+        acc.merge(LWTNNCondAlgCfg(flags, name='LWTNNCondAlg'))
+
+    kwargs.setdefault("doRunI", True)
+    kwargs.setdefault("useToT", False if do_runI else flags.InDet.doNNToTCalibration)
+    kwargs.setdefault("useRecenteringNNWithoutTracks", True  if do_runI else False)
+    kwargs.setdefault("useRecenteringNNWithTracks", False if do_runI else False)
+    kwargs.setdefault("correctLorShiftBarrelWithoutTracks", 0)
+    kwargs.setdefault("correctLorShiftBarrelWithTracks", 0.030 if do_runI else 0.000)
+    kwargs.setdefault("useTTrainedNetworks", useTTrainedNetworks)
+    kwargs.setdefault("NnCollectionReadKey", 'PixelClusterNN')
+    kwargs.setdefault("NnCollectionWithTrackReadKey", 'PixelClusterNNWithTrack')
+    kwargs.setdefault("NnCollectionJSONReadKey", '' if useTTrainedNetworks else 'PixelClusterNNJSON')
+
+    NnClusterizationFactory = CompFactory.InDet.NnClusterizationFactory( name = the_name, **kwargs )
+
+    return NnClusterizationFactory
+
+def InDetPixelClusterOnTrackToolBaseCfg(flags, name, **kwargs):
+    the_name = makeName(name, kwargs)
+    split_cluster_map_extension = kwargs.pop('SplitClusterMapExtension','')
+    if (flags.Beam.Type == "cosmics") or flags.InDet.doDBMstandalone:
+        kwargs.setdefault("ErrorStrategy", 0)
+        kwargs.setdefault("PositionStrategy", 0)
+
+    kwargs.setdefault("DisableDistortions", flags.InDet.doFatras or flags.InDet.doDBMstandalone )
+    kwargs.setdefault("applyNNcorrection", flags.InDet.doPixelClusterSplitting and flags.InDet.pixelClusterSplittingType == 'NeuralNet' and not flags.InDet.doSLHC )
+    kwargs.setdefault("NNIBLcorrection", flags.InDet.doPixelClusterSplitting and flags.InDet.pixelClusterSplittingType == 'NeuralNet' and not flags.InDet.doSLHC )
+    kwargs.setdefault("SplitClusterAmbiguityMap", 'SplitClusterAmbiguityMap' + split_cluster_map_extension )
+    kwargs.setdefault("RunningTIDE_Ambi", flags.InDet.doTIDE_Ambi )
+
+    return CompFactory.InDet.PixelClusterOnTrackTool(the_name, **kwargs)
+
+def InDetPixelClusterOnTrackToolDigitalCfg(flags, name='InDetPixelClusterOnTrackToolDigital', **kwargs):
+    if 'LorentzAngleTool' not in kwargs :
+        from SiLorentzAngleTool.PixelLorentzAngleConfig import PixelLorentzAngleTool
+        kwargs.setdefault("LorentzAngleTool", PixelLorentzAngleTool(flags, name="PixelLorentzAngleTool") )
+
+    if flags.InDet.doDigitalROTCreation:
+        kwargs.setdefault("applyNNcorrection", False )
+        kwargs.setdefault("NNIBLcorrection", False )
+        kwargs.setdefault("ErrorStrategy", 2 )
+        kwargs.setdefault("PositionStrategy", 1 )
+        kwargs.setdefault("SplitClusterAmbiguityMap", "" )
+    else :
+        kwargs.setdefault("SplitClusterAmbiguityMap", "" )
+    return InDetPixelClusterOnTrackToolBaseCfg(flags, name=name, **kwargs)
+
+def InDetPixelClusterOnTrackToolNNSplittingCfg(flags, name='InDetPixelClusterOnTrackToolNNSplitting', **kwargs):
+    if flags.InDet.doPixelClusterSplitting and flags.InDet.pixelClusterSplittingType == 'NeuralNet':
+        if 'NnClusterizationFactory' not in kwargs :
+            NnClusterizationFactory = NnClusterizationFactoryCfg(flags)
+            kwargs.setdefault("NnClusterizationFactory", NnClusterizationFactory)
+
+    return InDetPixelClusterOnTrackToolBaseCfg(flags, name=name, **kwargs)
+
+def InDetPixelClusterOnTrackToolCfg(flags, name='InDetPixelClusterOnTrackTool', **kwargs):
+    if 'LorentzAngleTool' not in kwargs :
+        from SiLorentzAngleTool.PixelLorentzAngleConfig import PixelLorentzAngleTool
+        kwargs.setdefault("LorentzAngleTool", PixelLorentzAngleTool(flags, name="PixelLorentzAngleTool") )
+
+    if flags.InDet.doDigitalROTCreation:
+        return InDetPixelClusterOnTrackToolDigitalCfg(flags, name=name, **kwargs)
+    else:
+        return InDetPixelClusterOnTrackToolNNSplittingCfg(flags, name=name, **kwargs)
+
+def InDetSCT_ClusterOnTrackToolCfg(flags, name='InDetSCT_ClusterOnTrackTool', **kwargs):
+    the_name = makeName(name, kwargs)
+
+    if 'LorentzAngleTool' not in kwargs :
+        from SiLorentzAngleTool.PixelLorentzAngleConfig import PixelLorentzAngleTool
+        kwargs.setdefault("LorentzAngleTool", PixelLorentzAngleTool(flags, name="PixelLorentzAngleTool") )
+
+    kwargs.setdefault("CorrectionStrategy", 0 ) # do correct position bias
+    kwargs.setdefault("ErrorStrategy", 2 ) # do use phi dependent errors
+    return CompFactory.InDet.SCT_ClusterOnTrackTool(the_name, **kwargs)
+
+def InDetBroadSCT_ClusterOnTrackToolCfg(flags, name='InDetBroadSCT_ClusterOnTrackTool', **kwargs):
+    kwargs.setdefault("ErrorStrategy", 0)
+    return InDetSCT_ClusterOnTrackToolCfg(flags, name=name, **kwargs)
+
+def InDetBroadPixelClusterOnTrackToolCfg(flags, name='InDetBroadPixelClusterOnTrackTool', **kwargs):
+    kwargs.setdefault("ErrorStrategy", 0)
+    return InDetPixelClusterOnTrackToolCfg(flags, name=name, **kwargs)
+
+def RIO_OnTrackErrorScalingCondAlgCfg(flags, **kwargs):
+    acc = ComponentAccumulator()
+    the_name=kwargs.pop("name", None)
+
+    if flags.Detector.RecoIBL:
+        error_scaling_type   = ["PixelRIO_OnTrackErrorScaling"]
+        error_scaling_outkey = ["/Indet/TrkErrorScalingPixel"]
+    else:
+        error_scaling_type   = ["PixelRIO_OnTrackErrorScalingRun1"]
+        error_scaling_outkey = ["/Indet/TrkErrorScalingPixel"]
+
+    error_scaling_type      += ["SCTRIO_OnTrackErrorScaling"]
+    error_scaling_outkey    += ["/Indet/TrkErrorScalingSCT"]
+
+    error_scaling_type      += ["TRTRIO_OnTrackErrorScaling"]
+    error_scaling_outkey    += ["/Indet/TrkErrorScalingTRT"]
+
+    acc.merge(addFoldersSplitOnline(flags, 'INDET','/Indet/Onl/TrkErrorScaling','/Indet/TrkErrorScaling', className="CondAttrListCollection"))
+
+    kwargs.setdefault("ReadKey", "/Indet/TrkErrorScaling")
+    kwargs.setdefault("ErrorScalingType", error_scaling_type)
+    kwargs.setdefault("OutKeys", error_scaling_outkey)
+
+    if the_name is not None:
+        kwargs.setdefault("name", the_name)
+    acc.addCondAlgo(CompFactory.RIO_OnTrackErrorScalingCondAlg(**kwargs))
+    return acc
+
+def InDetTRT_DriftCircleOnTrackToolCfg(flags, name='TRT_DriftCircleOnTrackTool', **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+    kwargs.pop('isHLT',None)
+    acc.merge(RIO_OnTrackErrorScalingCondAlgCfg(flags, name = 'RIO_OnTrackErrorScalingCondAlg'))
+    kwargs.setdefault("TRTErrorScalingKey", '/Indet/TrkErrorScalingTRT')
+    kwargs.setdefault("LumiDataKey", '') # need to check
+    acc.addPublicTool(CompFactory.InDet.TRT_DriftCircleOnTrackTool(name = the_name, **kwargs), primary = True)
+    return acc
+
+def InDetBroadTRT_DriftCircleOnTrackToolCfg(name='InDetBroadTRT_DriftCircleOnTrackTool', **kwargs):
+    the_name = makeName( name, kwargs)
+    return CompFactory.InDet.TRT_DriftCircleOnTrackNoDriftTimeTool(the_name, **kwargs)
+
+def InDetRotCreatorCfg(flags, name='InDetRotCreator', **kwargs):
+    acc = ComponentAccumulator()
+    strip_args=['SplitClusterMapExtension','ClusterSplitProbabilityName','RenounceInputHandles','nameSuffix']
+    pix_cluster_on_track_args = copyArgs(kwargs,strip_args)
+    the_name = makeName(name, kwargs)
+
+    for an_arg in  strip_args:
+        kwargs.pop(an_arg, None)
+
+    use_broad_cluster_pix = flags.InDet.useBroadPixClusterErrors and (not flags.InDet.doDBMstandalone)
+    use_broad_cluster_sct = flags.InDet.useBroadSCTClusterErrors and (not flags.InDet.doDBMstandalone)
+
+    if 'ToolPixelCluster' not in kwargs :
+        if use_broad_cluster_pix :
+            ToolPixelCluster= InDetBroadPixelClusterOnTrackToolCfg(flags, **pix_cluster_on_track_args) 
+        else:
+            ToolPixelCluster= InDetPixelClusterOnTrackToolCfg(flags, **pix_cluster_on_track_args)
+        acc.addPublicTool(ToolPixelCluster)
+        kwargs.setdefault("ToolPixelCluster", ToolPixelCluster)  
+  
+    if 'ToolSCT_Cluster' not in kwargs :
+        if use_broad_cluster_sct :
+            ToolSCT_Cluster = InDetBroadSCT_ClusterOnTrackToolCfg(flags)
+        else :
+            ToolSCT_Cluster = InDetSCT_ClusterOnTrackToolCfg(flags)
+        kwargs.setdefault("ToolSCT_Cluster", ToolSCT_Cluster)
+        acc.addPublicTool(ToolSCT_Cluster)
+
+    if 'ToolTRT_DriftCircle' not in kwargs :
+        acc_trt = InDetTRT_DriftCircleOnTrackToolCfg(flags)
+        TRT_DriftCircleOnTrackTool = acc_trt.getPrimary()
+        acc.merge(acc_trt)
+        kwargs.setdefault("ToolTRT_DriftCircle", TRT_DriftCircleOnTrackTool)
+
+    kwargs.setdefault('Mode', 'indet')
+    acc.addPublicTool(CompFactory.Trk.RIO_OnTrackCreator(name=the_name, **kwargs), primary = True)
+    return acc
+
+def InDetTRT_DriftCircleOnTrackUniversalToolCfg(name='InDetTRT_RefitRotCreator', **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+    default_ScaleHitUncertainty = 2.5
+
+    if 'RIOonTrackToolDrift' not in kwargs :
+        RIOonTrackToolDrift = InDetBroadTRT_DriftCircleOnTrackToolCfg()
+        kwargs.setdefault("RIOonTrackToolDrift", RIOonTrackToolDrift)
+        acc.addPublicTool(RIOonTrackToolDrift)
+    if 'RIOonTrackToolTube' not in kwargs :
+        RIOonTrackToolTube = InDetBroadTRT_DriftCircleOnTrackToolCfg()
+        kwargs.setdefault("RIOonTrackToolTube", RIOonTrackToolTube)
+        acc.addPublicTool(RIOonTrackToolTube)
+    kwargs.setdefault("ScaleHitUncertainty", default_ScaleHitUncertainty) 
+    acc.setPrivateTools(CompFactory.InDet.TRT_DriftCircleOnTrackUniversalTool(name = the_name, **kwargs))
+    return acc
+
+def InDetRefitRotCreatorCfg(flags, name='InDetRefitRotCreator', **kwargs):
+    acc = ComponentAccumulator()
+    default_ScaleHitUncertainty = 2.5
+    ScaleHitUncertainty = kwargs.pop('ScaleHitUncertainty', default_ScaleHitUncertainty)
+    if flags.InDet.redoTRT_LR:
+        if flags.Detector.RecoTRT:
+            if 'ToolTRT_DriftCircle' not in kwargs :
+                ToolTRT_DriftCircle = acc.popToolsAndMerge(InDetTRT_DriftCircleOnTrackUniversalToolCfg(ScaleHitUncertainty = ScaleHitUncertainty))
+                kwargs.setdefault("ToolTRT_DriftCircle", ToolTRT_DriftCircle)
+                acc.addPublicTool(ToolTRT_DriftCircle)
+    acc.merge(InDetRotCreatorCfg(flags, name = name, **kwargs))
+    return acc
+
+def InDetPRDtoTrackMapToolGangedPixelsCfg(flags, name='PRDtoTrackMapToolGangedPixels', **kwargs):
+    the_name = makeName( name, kwargs)
+    kwargs.setdefault("PixelClusterAmbiguitiesMapName", 'PixelClusterAmbiguitiesMap') # InDetKeys.GangedPixelMap()
+    kwargs.setdefault("addTRToutliers", True)
+    return CompFactory.InDet.InDetPRDtoTrackMapToolGangedPixels( name=the_name, **kwargs)
+
+def InDetTrackPRD_AssociationCfg(flags, name='InDetTrackPRD_Association', **kwargs):
+    acc = ComponentAccumulator()
+    from InDetConfig.InDetRecToolConfig import makeNameGetPreAndSuffix
+    the_name,prefix,suffix=makeNameGetPreAndSuffix(name,kwargs)
+
+    if kwargs.get('TracksName', None) is None :
+        raise Exception('Not TracksName argument provided')
+    kwargs.setdefault("AssociationTool", InDetPRDtoTrackMapToolGangedPixelsCfg(flags) \
+                                                    if 'AssociationTool' not in kwargs else None )
+    kwargs.setdefault("AssociationMapName", prefix+'PRDtoTrackMap'+suffix )
+    acc.addEventAlgo(CompFactory.InDet.InDetTrackPRD_Association(name = the_name, **kwargs))
+    return acc
+
+def InDetTRTDriftCircleCutForPatternRecoCfg(flags, name='InDetTRTDriftCircleCutForPatternReco', TrackingCuts=None, **kwargs):
+    the_name = makeName( name, kwargs)
+
+    kwargs.setdefault("MinOffsetDCs", 5)
+    kwargs.setdefault("UseNewParameterization", TrackingCuts.useNewParameterizationTRT)
+    kwargs.setdefault("UseActiveFractionSvc", flags.Detector.RecoTRT)
+    return CompFactory.InDet.InDetTrtDriftCircleCutTool(the_name, **kwargs)
+
+def InDetSummaryHelperNoHoleSearchCfg(flags, name='InDetSummaryHelperNoHoleSearch', **kwargs):
+    acc = ComponentAccumulator()
+    if 'HoleSearch' not in kwargs :
+        kwargs.setdefault("HoleSearch", None)
+    from  InDetConfig.InDetRecToolConfig import InDetTrackSummaryHelperToolCfg
+    tmpAcc =  InDetTrackSummaryHelperToolCfg(flags, name = name, **kwargs)
+    InDetSummaryHelper = tmpAcc.getPrimary()
+    acc.merge(tmpAcc)
+    acc.setPrivateTools(InDetSummaryHelper)
+    return acc
+
+def InDetTrackSummaryToolCfg(flags, name='InDetTrackSummaryTool', **kwargs):
+    acc = ComponentAccumulator()
+    # makeName will remove the namePrefix in suffix from kwargs, so copyArgs has to be first
+    hlt_args = copyArgs(kwargs,['isHLT','namePrefix'])
+    id_helper_args = copyArgs(kwargs,['ClusterSplitProbabilityName','RenounceInputHandles','namePrefix','nameSuffix']) if 'ClusterSplitProbabilityName' in kwargs else {}
+    kwargs.pop('ClusterSplitProbabilityName',None)
+    kwargs.pop('RenounceInputHandles',None)
+    kwargs.pop('isHLT',None)
+    the_name = makeName( name, kwargs)
+    do_holes=kwargs.get("doHolesInDet",True)
+    if do_holes :
+        id_helper_args.update(hlt_args)
+    if 'InDetSummaryHelperTool' not in kwargs :
+        from  InDetConfig.InDetRecToolConfig import InDetTrackSummaryHelperToolCfg
+        tmpAcc =  InDetTrackSummaryHelperToolCfg(flags, **id_helper_args)
+        InDetSummaryHelper = tmpAcc.getPrimary()
+        acc.merge(tmpAcc)
+        InDetSummaryHelperNoHoleSearch = acc.popToolsAndMerge(InDetSummaryHelperNoHoleSearchCfg(flags, **id_helper_args))
+        acc.addPublicTool(InDetSummaryHelperNoHoleSearch)
+        kwargs.setdefault("InDetSummaryHelperTool", InDetSummaryHelper if do_holes else InDetSummaryHelperNoHoleSearch)
+
+    #
+    # Configurable version of TrkTrackSummaryTool: no TRT_PID tool needed here (no shared hits)
+    #
+    kwargs.setdefault("doSharedHits", False)
+    kwargs.setdefault("doHolesInDet", do_holes)
+    kwargs.setdefault("TRT_ElectronPidTool", None) # we don't want to use those tools during pattern
+    kwargs.setdefault("TRT_ToT_dEdxTool", None) # dito
+    kwargs.setdefault("PixelToTPIDTool", None) # we don't want to use those tools during pattern
+    acc.setPrivateTools(CompFactory.Trk.TrackSummaryTool(name = the_name, **kwargs))
+    return acc
+
+def InDetPixelToTPIDToolCfg(name = "InDetPixelToTPIDTool", **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+    InDetPixelToTPIDTool = CompFactory.InDet.PixelToTPIDTool(name = the_name, **kwargs)
+    acc.setPrivateTools(InDetPixelToTPIDTool)
+    return acc
+
+def InDetRecTestBLayerToolCfg(flags, name='InDetRecTestBLayerTool', **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+
+    if not flags.Detector.RecoPixel:
+        return None
+
+    if 'Extrapolator' not in kwargs :
+        from  InDetConfig.InDetRecToolConfig import InDetExtrapolatorCfg
+        tmpAcc =  InDetExtrapolatorCfg(flags)
+        kwargs.setdefault("Extrapolator", tmpAcc.getPrimary())
+        acc.merge(tmpAcc)
+
+    if 'PixelSummaryTool' not in kwargs :
+        from  InDetConfig.InDetRecToolConfig import PixelConditionsSummaryToolCfg
+        PixelConditionsSummaryTool = acc.popToolsAndMerge(PixelConditionsSummaryToolCfg(flags))
+        kwargs.setdefault( "PixelSummaryTool", PixelConditionsSummaryTool)
+        acc.merge(tmpAcc)
+
+    InDetTestBLayerTool = CompFactory.InDet.InDetTestBLayerTool(name=the_name, **kwargs)
+    acc.setPrivateTools(InDetTestBLayerTool)
+    return acc
+
+def InDetSummaryHelperSharedHitsCfg(flags, name='InDetSummaryHelperSharedHits', **kwargs):
+    acc = ComponentAccumulator()
+    if 'PixelToTPIDTool' not in kwargs :
+        InDetPixelToTPIDTool = acc.popToolsAndMerge(InDetPixelToTPIDToolCfg())
+        acc.addPublicTool(InDetPixelToTPIDTool)
+        kwargs.setdefault("PixelToTPIDTool", InDetPixelToTPIDTool)
+
+    if 'TestBLayerTool' not in kwargs :
+        if InDetRecTestBLayerToolCfg(flags) is not None:
+            InDetRecTestBLayerTool = acc.popToolsAndMerge(InDetRecTestBLayerToolCfg(flags))
+            acc.addPublicTool(InDetRecTestBLayerTool)
+            kwargs.setdefault("TestBLayerTool", InDetRecTestBLayerTool)
+        else:
+            kwargs.setdefault("TestBLayerTool", None)
+
+    kwargs.setdefault("DoSharedHits", flags.InDet.doSharedHits)
+
+    if flags.Detector.RecoTRT:
+        kwargs.setdefault("DoSharedHitsTRT", flags.InDet.doSharedHits)
+
+    from  InDetConfig.InDetRecToolConfig import InDetTrackSummaryHelperToolCfg
+    tmpAcc =  InDetTrackSummaryHelperToolCfg(flags, name = name, **kwargs)
+    InDetSummaryHelper = tmpAcc.getPrimary()
+    acc.merge(tmpAcc)
+    acc.setPrivateTools(InDetSummaryHelper)
+    return acc
+
+def InDetTRTStrawStatusSummaryToolCfg(flags, name = "InDetTRT_StrawStatusSummaryTool", **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+    kwargs.setdefault("isGEANT4", flags.Input.isMC)
+    InDetTRTStrawStatusSummaryTool = CompFactory.TRT_StrawStatusSummaryTool(name = the_name, **kwargs )
+    acc.setPrivateTools(InDetTRTStrawStatusSummaryTool)
+    return acc
+
+def InDetTRTCalDbToolCfg(name = "InDetTRT_CalDbTool", **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+    InDetTRTCalDbTool =  CompFactory.TRT_CalDbTool(name = the_name, **kwargs)
+    acc.setPrivateTools(InDetTRTCalDbTool)
+    return acc
+
+def InDetTRT_LocalOccupancyCfg(flags, name ="InDet_TRT_LocalOccupancy", **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+    if 'TRTCalDbTool' not in kwargs :
+        InDetTRTCalDbTool = acc.popToolsAndMerge(InDetTRTCalDbToolCfg())
+        acc.addPublicTool(InDetTRTCalDbTool)
+        kwargs.setdefault( "TRTCalDbTool", InDetTRTCalDbTool )
+
+    if 'TRTStrawStatusSummaryTool' not in kwargs :
+        InDetTRTStrawStatusSummaryTool = acc.popToolsAndMerge(InDetTRTStrawStatusSummaryToolCfg(flags))
+        acc.addPublicTool(InDetTRTStrawStatusSummaryTool)
+        kwargs.setdefault( "TRTStrawStatusSummaryTool", InDetTRTStrawStatusSummaryTool )
+
+    kwargs.setdefault("isTrigger", False)
+    InDetTRT_LocalOccupancy = CompFactory.InDet.TRT_LocalOccupancy(name=the_name, **kwargs )
+    acc.setPrivateTools(InDetTRT_LocalOccupancy)
+    return acc
+
+def InDetTRT_dEdxToolCfg(flags, name = "InDetTRT_dEdxTool", **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+
+    if not flags.Detector.RecoTRT or flags.InDet.doSLHC or flags.InDet.doHighPileup \
+            or  flags.InDet.useExistingTracksAsInput: # TRT_RDOs (used by the TRT_LocalOccupancy tool) are not present in ESD
+        return None
+
+    kwargs.setdefault("TRT_dEdx_isData", not flags.Input.isMC)
+
+    if 'TRT_LocalOccupancyTool' not in kwargs :
+        InDetTRT_LocalOccupancy = acc.popToolsAndMerge(InDetTRT_LocalOccupancyCfg(flags))
+        kwargs.setdefault( "TRT_LocalOccupancyTool", InDetTRT_LocalOccupancy)
+
+    InDetTRT_dEdxTool = CompFactory.TRT_ToT_dEdx(name = the_name, **kwargs)
+    return InDetTRT_dEdxTool
+
+def InDetTRT_ElectronPidToolCfg(flags, name = "InDetTRT_ElectronPidTool", **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+
+    if not flags.Detector.RecoTRT or  flags.InDet.doSLHC or  flags.InDet.doHighPileup \
+            or  flags.InDet.useExistingTracksAsInput: # TRT_RDOs (used by the TRT_LocalOccupancy tool) are not present in ESD
+        return None
+
+    if 'TRTStrawSummaryTool' not in kwargs :
+        InDetTRTStrawStatusSummaryTool = acc.popToolsAndMerge(InDetTRTStrawStatusSummaryToolCfg(flags))
+        acc.addPublicTool(InDetTRTStrawStatusSummaryTool)
+        kwargs.setdefault( "TRTStrawSummaryTool", InDetTRTStrawStatusSummaryTool)
+
+    if 'TRT_LocalOccupancyTool' not in kwargs :
+        InDetTRT_LocalOccupancy = acc.popToolsAndMerge(InDetTRT_LocalOccupancyCfg(flags))
+        acc.addPublicTool(InDetTRT_LocalOccupancy)
+        kwargs.setdefault( "TRT_LocalOccupancyTool", InDetTRT_LocalOccupancy)
+
+    if 'TRT_ToT_dEdx_Tool' not in kwargs :
+        InDetTRT_dEdxTool = InDetTRT_dEdxToolCfg(flags)
+        acc.addPublicTool(InDetTRT_dEdxTool)
+        kwargs.setdefault( "TRT_ToT_dEdx_Tool", InDetTRT_dEdxTool)
+
+    kwargs.setdefault( "isData", not flags.Input.isMC)
+
+    InDetTRT_ElectronPidTool = CompFactory.InDet.TRT_ElectronPidToolRun2(name = the_name, **kwargs)
+    return InDetTRT_ElectronPidTool
+
+def InDetTrackSummaryToolSharedHitsCfg(flags, name='InDetTrackSummaryToolSharedHits',**kwargs):
+    acc = ComponentAccumulator()
+    if 'InDetSummaryHelperTool' not in kwargs :
+        copy_args=['ClusterSplitProbabilityName','RenounceInputHandles','namePrefix','nameSuffix']
+        do_holes=kwargs.get("doHolesInDet",True)
+        if do_holes :
+            copy_args += ['isHLT']
+        id_helper_args = copyArgs(kwargs,copy_args) if 'ClusterSplitProbabilityName' in kwargs else {}
+        kwargs.pop('ClusterSplitProbabilityName',None)
+        kwargs.pop('RenounceInputHandles',None)
+
+        InDetSummaryHelperSharedHits = acc.popToolsAndMerge(InDetSummaryHelperSharedHitsCfg(flags, **id_helper_args))
+        acc.addPublicTool(InDetSummaryHelperSharedHits)
+        kwargs.setdefault("InDetSummaryHelperTool", InDetSummaryHelperSharedHits)
+
+    if 'TRT_ElectronPidTool' not in kwargs :
+        if InDetTRT_ElectronPidToolCfg(flags) is not None:
+            InDetTRT_ElectronPidTool = InDetTRT_ElectronPidToolCfg(flags)
+            acc.addPublicTool(InDetTRT_ElectronPidTool)
+            kwargs.setdefault("TRT_ElectronPidTool", InDetTRT_ElectronPidTool)
+        else:
+            kwargs.setdefault("TRT_ElectronPidTool", None)
+
+    if 'TRT_ToT_dEdxTool' not in kwargs :
+        InDetTRT_dEdxTool = InDetTRT_dEdxToolCfg(flags)
+        acc.addPublicTool(InDetTRT_dEdxTool)
+        kwargs.setdefault("TRT_ToT_dEdxTool", InDetTRT_dEdxTool)
+
+    if 'PixelToTPIDTool' not in kwargs :
+        InDetPixelToTPIDTool = acc.popToolsAndMerge(InDetPixelToTPIDToolCfg())
+        acc.addPublicTool(InDetPixelToTPIDTool)
+        kwargs.setdefault( "PixelToTPIDTool", InDetPixelToTPIDTool)
+
+    kwargs.setdefault( "doSharedHits", flags.InDet.doSharedHits)
+    kwargs.setdefault( "minTRThitsForTRTdEdx", 1)
+
+    InDetTrackSummaryTool = acc.popToolsAndMerge(InDetTrackSummaryToolCfg(flags, name, **kwargs))
+    acc.setPrivateTools(InDetTrackSummaryTool)
+    return acc
+
+def InDetUpdatorCfg(flags, name = 'InDetUpdator', **kwargs):
+    the_name = makeName( name, kwargs )
+    if flags.InDet.kalmanUpdator == "fast" :
+        return CompFactory.Trk.KalmanUpdator_xk(name = the_name, **kwargs)
+    elif flags.InDet.kalmanUpdator == "weight" :
+        return CompFactory.Trk.KalmanWeightUpdator(name = the_name, **kwargs)
+    elif flags.InDet.kalmanUpdator == "smatrix" :
+        return CompFactory.Trk.KalmanUpdatorSMatrix(name = the_name, **kwargs)
+    elif flags.InDet.kalmanUpdator == "amg" :
+        return CompFactory.Trk.KalmanUpdatorAmg(name = the_name, **kwargs)
+    else :
+        return CompFactory.Trk.KalmanUpdator(name = the_name, **kwargs)
+
+def InDetMultipleScatteringUpdatorCfg(name = "InDetMultipleScatteringUpdator", **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+
+    kwargs.setdefault( "UseTrkUtils", False)
+    MultipleScatteringUpdator = CompFactory.Trk.MultipleScatteringUpdator(name = the_name, **kwargs)
+    
+    acc.setPrivateTools(MultipleScatteringUpdator)
+    return acc
+
+def GlobalChi2FitterCfg(flags, name ='InDetTrackFitterTRT', **kwargs):
+    from InDetConfig.InDetRecToolConfig  import InDetNavigatorCfg, InDetPropagatorCfg, InDetExtrapolatorCfg
+    acc = ComponentAccumulator()
+
+    tmpAcc =  InDetExtrapolatorCfg(flags)
+    InDetExtrapolator = tmpAcc.getPrimary()
+    acc.merge(tmpAcc)
+
+    InDetNavigator = acc.popToolsAndMerge(InDetNavigatorCfg(flags))
+    acc.addPublicTool(InDetNavigator)
+
+    InDetPropagator = acc.popToolsAndMerge(InDetPropagatorCfg(flags))
+    acc.addPublicTool(InDetPropagator)
+
+    acc.merge(InDetRefitRotCreatorCfg(flags))
+    InDetRefitRotCreator = acc.getPublicTool("InDetRefitRotCreator")
+
+    InDetUpdator = InDetUpdatorCfg(flags)
+    acc.addPublicTool(InDetUpdator)
+
+    InDetMultipleScatteringUpdator = acc.popToolsAndMerge(InDetMultipleScatteringUpdatorCfg())
+    acc.addPublicTool(InDetMultipleScatteringUpdator)
+
+    if flags.InDet.doRobustReco or flags.Beam.Type == "cosmics":
+        kwargs.setdefault("MaxOutliers", 99)
+
+    if flags.InDet.materialInteractions and not flags.BField.solenoidOn:
+        from AthenaCommon.SystemOfUnits import MeV
+        kwargs.setdefault("Momentum", 1000.*MeV)
+
+    kwargs.setdefault("ExtrapolationTool", InDetExtrapolator)
+    kwargs.setdefault("NavigatorTool", InDetNavigator)
+    kwargs.setdefault("PropagatorTool", InDetPropagator)
+    kwargs.setdefault("RotCreatorTool", InDetRefitRotCreator)
+    kwargs.setdefault("MeasurementUpdateTool", InDetUpdator)
+    kwargs.setdefault("MultipleScatteringTool", InDetMultipleScatteringUpdator)
+    kwargs.setdefault("StraightLine", not flags.BField.solenoidOn)
+    kwargs.setdefault("ReintegrateOutliers", False)
+    kwargs.setdefault("MaxIterations", 10)
+    kwargs.setdefault("RecalculateDerivatives", False)
+    kwargs.setdefault("TrackChi2PerNDFCut", 999999)
+
+    acc.setPrivateTools(CompFactory.Trk.GlobalChi2Fitter(name = name, **kwargs))
+    return acc
+
+def InDetTrackSummaryToolTRTTracksCfg(flags, name='InDetTrackSummaryToolTRTTracks',**kwargs):
+    kwargs.setdefault("doSharedHits", True)
+    return InDetTrackSummaryToolSharedHitsCfg(flags, name = name, **kwargs)
+
+def PublicFKF(name = 'PublicFKF', **kwargs):
+    PublicFKF = CompFactory.Trk.ForwardKalmanFitter
+    return PublicFKF(name = name, **kwargs)
+
+def InDetFKF(name='InDetFKF', **kwargs):
+    kwargs.setdefault("StateChi2PerNDFPreCut", 30.0)
+    return PublicFKF(name=name, **kwargs)
+
+def InDetBKS(name='InDetBKS', **kwargs):
+    kwargs.setdefault("InitialCovarianceSeedFactor", 200.)
+    PublicBKS = CompFactory.Trk.KalmanSmoother
+    return PublicBKS(name = name, **kwargs)
+
+def InDetKOL(name = 'InDetKOL', **kwargs):
+    kwargs.setdefault("TrackChi2PerNDFCut", 17.0)
+    kwargs.setdefault("StateChi2PerNDFCut", 12.5)
+    PublicKOL = CompFactory.Trk.KalmanOutlierLogic
+    return PublicKOL(name = name, **kwargs)
+
+def InDetKalmanFitterCfg(flags, name ='InDetKalmanFitter', **kwargs):
+    acc = ComponentAccumulator()
+    from InDetConfig.InDetRecToolConfig import InDetExtrapolatorCfg
+
+    tmpAcc =  InDetExtrapolatorCfg(flags)
+    InDetExtrapolator = tmpAcc.getPrimary()
+    acc.merge(tmpAcc)
+
+    InDetUpdator = InDetUpdatorCfg(flags)
+    acc.addPublicTool(InDetUpdator)
+
+    tmpAcc =  InDetRotCreatorCfg(flags)
+    InDetRotCreator = tmpAcc.getPrimary()
+    acc.merge(tmpAcc)
+
+    kwargs.setdefault("ExtrapolatorHandle", InDetExtrapolator)
+    kwargs.setdefault("RIO_OnTrackCreatorHandle", InDetRotCreator)
+    kwargs.setdefault("MeasurementUpdatorHandle", InDetUpdator)
+    kwargs.setdefault("ForwardKalmanFitterHandle", InDetFKF())
+    kwargs.setdefault("KalmanSmootherHandle", InDetBKS())
+    kwargs.setdefault("KalmanOutlierLogicHandle", InDetKOL())
+    kwargs.setdefault("DynamicNoiseAdjustorHandle", None)
+    kwargs.setdefault("BrempointAnalyserHandle", None)
+    kwargs.setdefault("AlignableSurfaceProviderHandle", None)
+    kwargs.setdefault("RecalibratorHandle", None)
+    kwargs.setdefault("InternalDAFHandle", None)
+
+    acc.setPrivateTools(CompFactory.Trk.KalmanFitter(name = name, **kwargs))
+    return acc
+#############################################################################################
+#TRTSegmentFinder
+#############################################################################################
+def InDetPatternPropagatorCfg(name='InDetPatternPropagator', **kwargs):
+    the_name = makeName( name, kwargs)
+    return CompFactory.Trk.RungeKuttaPropagator(name = the_name, **kwargs)
+
+def InDetTRT_DriftCircleOnTrackUniversalToolCosmicsCfg(name='TRT_DriftCircleOnTrackUniversalTool', **kwargs):
+    kwargs.setdefault("ScaleHitUncertainty", 2.)
+    return InDetTRT_DriftCircleOnTrackUniversalToolCfg(name=name, **kwargs)
+
+def InDetTRT_DriftCircleOnTrackNoDriftTimeToolCfg(**kwargs):
+    return InDetBroadTRT_DriftCircleOnTrackToolCfg(**kwargs)
+
+def InDetTRT_ExtensionToolCosmicsCfg(flags, name='InDetTRT_ExtensionToolCosmics', **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+
+    if 'Propagator' not in kwargs :
+        from  InDetConfig.InDetRecToolConfig import InDetPropagatorCfg
+        InDetPropagator = acc.popToolsAndMerge(InDetPropagatorCfg(flags))
+        acc.addPublicTool(InDetPropagator)
+        kwargs.setdefault("Propagator", InDetPropagator)
+
+    if 'Extrapolator' not in kwargs :
+        from  InDetConfig.InDetRecToolConfig import InDetExtrapolatorCfg
+        InDetExtrapolator = acc.popToolsAndMerge(InDetExtrapolatorCfg(flags))
+        acc.addPublicTool(InDetExtrapolator)
+        kwargs.setdefault("Extrapolator", InDetExtrapolator)
+
+    if 'RIOonTrackToolYesDr' not in kwargs :
+        InDetTRT_DriftCircleOnTrackUniversalToolCosmics = acc.popToolsAndMerge(InDetTRT_DriftCircleOnTrackUniversalToolCosmicsCfg())
+        acc.addPublicTool(InDetTRT_DriftCircleOnTrackUniversalToolCosmics)
+        kwargs.setdefault("RIOonTrackToolYesDr", InDetTRT_DriftCircleOnTrackUniversalToolCosmics)
+
+    if 'RIOonTrackToolNoDr' not in kwargs :
+        InDetBroadTRT_DriftCircleOnTrackTool = InDetTRT_DriftCircleOnTrackNoDriftTimeToolCfg()
+        acc.addPublicTool(InDetBroadTRT_DriftCircleOnTrackTool)
+        kwargs.setdefault("RIOonTrackToolNoDr", InDetBroadTRT_DriftCircleOnTrackTool)
+
+    kwargs.setdefault("TRT_ClustersContainer", 'TRT_DriftCircles') # InDetKeys.TRT_DriftCircles()
+    kwargs.setdefault("SearchNeighbour", False)   # needs debugging!!!
+    kwargs.setdefault("RoadWidth", 10.0)
+    acc.setPrivateTools(CompFactory.InDet.TRT_TrackExtensionToolCosmics(name = the_name, **kwargs))
+    return acc
+
+def InDetPatternUpdatorCfg(name='InDetPatternUpdator', **kwargs):
+    the_name = makeName(name, kwargs)
+    return CompFactory.Trk.KalmanUpdator_xk(name = the_name, **kwargs)
+
+def InDetTRT_TrackExtensionTool_xkCfg(flags, name='InDetTRT_ExtensionTool', TrackingCuts=None, **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+
+    if 'PropagatorTool' not in kwargs :
+        InDetPatternPropagator = InDetPatternPropagatorCfg()
+        acc.addPublicTool(InDetPatternPropagator)
+        kwargs.setdefault("PropagatorTool", InDetPatternPropagator)
+
+    if 'UpdatorTool' not in kwargs :
+        InDetPatternUpdator = InDetPatternUpdatorCfg()
+        acc.addPublicTool(InDetPatternUpdator)
+        kwargs.setdefault("UpdatorTool", InDetPatternUpdator)
+
+    if 'DriftCircleCutTool' not in kwargs :
+        InDetTRTDriftCircleCutForPatternReco = InDetTRTDriftCircleCutForPatternRecoCfg(flags, TrackingCuts=TrackingCuts)
+        acc.addPublicTool(InDetTRTDriftCircleCutForPatternReco)
+        kwargs.setdefault("DriftCircleCutTool", InDetTRTDriftCircleCutForPatternReco)
+
+    if 'RIOonTrackToolYesDr' not in kwargs :
+        acc_tmp = InDetTRT_DriftCircleOnTrackToolCfg(flags)
+        InDetTRT_DriftCircleOnTrackTool = acc_tmp.getPrimary()
+        acc.merge(acc_tmp)
+        kwargs.setdefault("RIOonTrackToolYesDr", InDetTRT_DriftCircleOnTrackTool)
+
+    if 'RoadTool' not in kwargs :
+        InDetTRT_RoadMaker = acc.popToolsAndMerge(InDetTRT_RoadMakerCfg(flags))
+        acc.addPublicTool(InDetTRT_RoadMaker)
+        kwargs.setdefault("RoadTool", InDetTRT_RoadMaker)
+
+    kwargs.setdefault("TRT_ClustersContainer", 'TRT_DriftCircles') # InDetKeys.TRT_DriftCircles()
+    kwargs.setdefault("TrtManagerLocation", 'TRT') # InDetKeys.TRT_Manager()
+    kwargs.setdefault("UseDriftRadius", not flags.InDet.noTRTTiming)
+    kwargs.setdefault("MinNumberDriftCircles", TrackingCuts.minTRTonTrk)
+    kwargs.setdefault("ScaleHitUncertainty", 2)
+    kwargs.setdefault("RoadWidth", 20.)
+    kwargs.setdefault("UseParameterization", TrackingCuts.useParameterizedTRTCuts)
+    kwargs.setdefault("maxImpactParameter", 500 if flags.InDet.doBeamHalo or flags.InDet.doBeamGas else 50 )  # single beam running, open cuts
+
+    if TrackingCuts.RoISeededBackTracking:
+        kwargs.setdefault("minTRTSegmentpT", TrackingCuts.minSecondaryPt)
+
+    acc.setPrivateTools(CompFactory.InDet.TRT_TrackExtensionTool_xk(the_name, **kwargs))
+    return acc
+
+def InDetWeightCalculatorCfg(name='InDetWeightCalculator', **kwargs):
+    the_name = makeName( name, kwargs)
+    return CompFactory.Trk.DAF_SimpleWeightCalculator(name = the_name, **kwargs)
+
+def InDetCompetingTRT_DC_ToolCfg(flags, name='InDetCompetingTRT_DC_Tool', **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+
+    if 'Extrapolator' not in kwargs :
+        from  InDetConfig.InDetRecToolConfig import InDetExtrapolatorCfg
+        InDetExtrapolator = acc.popToolsAndMerge(InDetExtrapolatorCfg(flags))
+        acc.addPublicTool(InDetExtrapolator)
+        kwargs.setdefault("Extrapolator", InDetExtrapolator)
+
+    if 'ToolForWeightCalculation' not in kwargs :
+        InDetWeightCalculator = InDetWeightCalculatorCfg()
+        acc.addPublicTool(InDetWeightCalculator)
+        kwargs.setdefault("ToolForWeightCalculation", InDetWeightCalculator)
+
+    if 'ToolForTRT_DriftCircleOnTrackCreation' not in kwargs :
+        acc_tmp = InDetTRT_DriftCircleOnTrackToolCfg(flags)
+        InDetTRT_DriftCircleOnTrackTool = acc_tmp.getPrimary()
+        acc.merge(acc_tmp)
+        kwargs.setdefault("ToolForTRT_DriftCircleOnTrackCreation", InDetTRT_DriftCircleOnTrackTool)
+
+    acc.setPrivateTools(CompFactory.InDet.CompetingTRT_DriftCirclesOnTrackTool( the_name, **kwargs))
+    return acc
+
+def InDetTRT_RoadMakerCfg(flags, name='InDetTRT_RoadMaker', **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+    
+    InDetPatternPropagator = InDetPatternPropagatorCfg()
+    acc.addPublicTool(InDetPatternPropagator)
+    kwargs.setdefault("RoadWidth", 20.)
+    kwargs.setdefault("PropagatorTool", InDetPatternPropagator)
+    acc.setPrivateTools(CompFactory.InDet.TRT_DetElementsRoadMaker_xk(the_name, **kwargs))
+    return acc
+
+def InDetTRT_TrackExtensionTool_DAFCfg(flags, name='TRT_TrackExtensionTool_DAF',**kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+
+    if 'CompetingDriftCircleTool' not in kwargs :
+        InDetCompetingTRT_DC_Tool = acc.popToolsAndMerge(InDetCompetingTRT_DC_ToolCfg(flags))
+        acc.addPublicTool(InDetCompetingTRT_DC_Tool)
+        kwargs.setdefault("CompetingDriftCircleTool", InDetCompetingTRT_DC_Tool)
+
+    if 'PropagatorTool' not in kwargs :
+        InDetPatternPropagator = InDetPatternPropagatorCfg()
+        acc.addPublicTool(InDetPatternPropagator)
+        kwargs.setdefault("PropagatorTool", InDetPatternPropagator)
+
+    if 'RoadTool' not in kwargs :
+        InDetTRT_RoadMaker = acc.popToolsAndMerge(InDetTRT_RoadMakerCfg(flags)) 
+        acc.addPublicTool(InDetTRT_RoadMaker)
+        kwargs.setdefault("RoadTool", InDetTRT_RoadMaker)
+
+    kwargs.setdefault("TRT_DriftCircleContainer", 'TRT_DriftCircles') # InDetKeys.TRT_DriftCircles()
+
+    acc.setPrivateTools(CompFactory.InDet.TRT_TrackExtensionTool_DAF(the_name,**kwargs))
+    return acc
+
+def InDetTRT_ExtensionToolCfg(flags, TrackingCuts=None, **kwargs):
+    # @TODO set all names to InDetTRT_ExtensionTool ?
+    if (flags.InDet.trtExtensionType == 'xk') or (not flags.InDet.doNewTracking) :
+        if (flags.Beam.Type == "cosmics"):
+            return InDetTRT_ExtensionToolCosmicsCfg(flags, **kwargs)
+        else:
+            return InDetTRT_TrackExtensionTool_xkCfg(flags, TrackingCuts=TrackingCuts, **kwargs)
+    elif flags.InDet.trtExtensionType == 'DAF' :
+        return InDetTRT_TrackExtensionTool_DAFCfg(flags, name = 'InDetTRT_ExtensionTool',**kwargs)
+
+def TRT_DetElementsRoadCondAlgCfg(**kwargs):
+    acc = ComponentAccumulator()
+    the_name=kwargs.pop("name","InDet__TRT_DetElementsRoadCondAlg_xk")
+    acc.addCondAlgo(CompFactory.InDet.TRT_DetElementsRoadCondAlg_xk(the_name, **kwargs))
+    return acc
\ No newline at end of file
-- 
GitLab


From f0eaf03bc90625cc91a7d10ebaf1d0b9270227ac Mon Sep 17 00:00:00 2001
From: Masato Aoki <masato.aoki@cern.ch>
Date: Thu, 8 Oct 2020 18:11:09 +0200
Subject: [PATCH 362/403] update for TGC raw hits monitoring

---
 .../python/TgcRawDataMonitorAlgorithm.py      | 102 +++++++++++
 .../src/TgcRawDataMonitorAlgorithm.cxx        | 163 +++++++++++++++---
 .../src/TgcRawDataMonitorAlgorithm.h          |  17 +-
 3 files changed, 258 insertions(+), 24 deletions(-)

diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/python/TgcRawDataMonitorAlgorithm.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/python/TgcRawDataMonitorAlgorithm.py
index f1aca9130cdf..fa249c5e8df9 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/python/TgcRawDataMonitorAlgorithm.py
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/python/TgcRawDataMonitorAlgorithm.py
@@ -24,7 +24,15 @@ def TgcRawDataMonitoringConfig(inputFlags):
     tgcRawDataMonAlg.TagTrigList += ',HLT_mu26_ivarmedium_L1MU20'
     tgcRawDataMonAlg.TagTrigList += ',HLT_mu6'
     tgcRawDataMonAlg.TagTrigList += ',HLT_mu6_L1MU6'
+    tgcRawDataMonAlg.TagTrigList += ',HLT_mu6_idperf'
+    tgcRawDataMonAlg.TagTrigList += ',HLT_mu14'
     tgcRawDataMonAlg.TagTrigList += ',HLT_mu20_mu8noL1;HLT_mu20'
+    tgcRawDataMonAlg.TagTrigList += ',HLT_mu24_mu8noL1;HLT_mu24'
+    tgcRawDataMonAlg.TagTrigList += ',HLT_mu50_L1MU20'
+    tgcRawDataMonAlg.TagTrigList += ',HLT_mu60_0eta105_msonly_L1MU20'
+
+    tgcRawDataMonAlg.TagAndProbe = False
+    tgcRawDataMonAlg.TagAndProbeZmumu = False
 
     if not inputFlags.DQ.triggerDataAvailable:
         tgcRawDataMonAlg.MuonRoIContainerName = ''
@@ -91,12 +99,106 @@ def TgcRawDataMonitoringConfig(inputFlags):
     myGroup.defineHistogram('hit_bunch;TgcPrd_Timing',title='TgcPrd_Timing;Timing;Number of events',
                             path=hitPath,xbins=4,xmin=-1.5,xmax=1.5,xlabels=['Previous','Current','Next'])
 
+    for side in ['A', 'C']:# side-A or side-C
+        for station in range(1,5):# M1,2,3,4
+            for s_or_w in ['S','W']:# strip or wire
+                name = "%sM%02i%s" % (side,station,s_or_w)
+                x_name = "lb_for_%s" % (name)
+                y_name = name
+                nbins = 10
+                if station==1:
+                    nbins = 648
+                if station==2 or station==3:
+                    nbins = 528
+                if station==4:
+                    nbins = 90
+                myGroup.defineHistogram(x_name+','+y_name+';'+y_name+'_vs_lb',
+                                        title=y_name+'_vs_lb;Luminosity block;Chamber index',type='TH2F',
+                                        path=hitPath,xbins=100,xmin=-0.5,xmax=99.5,
+                                        ybins=nbins,ymin=0.5,ymax=nbins+0.5,opt='kAddBinsDynamically')
+                x_name = name
+                y_name = "timing_for_%s" % (name)
+                myGroup.defineHistogram(x_name+','+y_name+';'+y_name,
+                                        title='Timing_for_'+name+';Chamber index;Timing',type='TH2F',
+                                        path=hitPath,xbins=nbins,xmin=0.5,xmax=nbins+0.5,
+                                        ybins=3,ymin=-1.5,ymax=1.5,ylabels=['Previous','Current','Next'])
+
+                x_name = "x_%s" % (name)
+                y_name = "y_%s" % (name)
+                nbinsx = 10
+                nbinsy = 10
+                if station==1:
+                    nbinsx = 15
+                    nbinsy = 48
+                if station==2 or station==3:
+                    nbinsx = 12
+                    nbinsy = 48
+                if station==4:
+                    nbinsx = 4
+                    nbinsy = 24
+                myGroup.defineHistogram(x_name+','+y_name+';'+name+'_vs_iEta',
+                                        title=name+'_vs_iEta;iEta;Chamber index',type='TH2F',path=hitPath,
+                                        xbins=nbinsx,xmin=0.5,xmax=nbinsx+0.5,
+                                        ybins=nbinsy,ymin=0.5,ymax=nbinsy+0.5)
+
+
     coinPath = 'Coin/'
     myGroup.defineHistogram('coin_n;TgcCoin_nCoins',title='TgcPrd_nCoins;Number of coincidences;Number of events',
                             path=coinPath,xbins=100,xmin=0,xmax=1000,opt='kAddBinsDynamically')
     myGroup.defineHistogram('coin_bunch;TgcCoin_Timing',title='TgcCoin_Timing;Timing;Number of events',
                             path=coinPath,xbins=4,xmin=-1.5,xmax=1.5,xlabels=['Previous','Current','Next'])
     
+
+    hitDetailsPath = 'HitDetails/'
+    for side in ['A', 'C']:# side-A or side-C
+        for sector in range(1,13):# Sector 01,,,12
+            for station in range(1,5):# M1,2,3,4
+                for phi in range(4):# internal phi 0,1,2,3
+                    for eta in range(6):# eta index 1,,,5 for Endcap, and 0 for Forward
+                        for lay in range(1,4):# sub-layer 1,2,3 (triplet) or 1,2 (doublet)
+                            chamber_name = "%s%02dM%02df%02d%s%02dL%02d" % (side,sector,station,phi,'F' if eta==0 else 'E',eta,lay)
+                            for s_or_w in ['S','W']:# strip or wire
+                                nbins = 100
+                                if s_or_w=="S":
+                                    nbins = 32
+                                else:
+                                    if station==1 and eta==0 and lay==1: nbins = 105
+                                    if station==1 and eta==0 and lay==1: nbins = 104
+                                    if station==1 and eta==0 and lay==1: nbins = 105
+                                    if station==2 and eta==0: nbins = 125
+                                    if station==3 and eta==0: nbins = 122
+
+                                    if station==1 and eta==1: nbins = 24
+                                    if station==2 and eta==1: nbins = 32
+                                    if station==3 and eta==1: nbins = 31
+
+                                    if station==1 and eta==2: nbins = 23
+                                    if station==2 and eta==2: nbins = 32
+                                    if station==3 and eta==2: nbins = 30
+
+                                    if station==1 and eta==3 and lay==1: nbins = 61
+                                    if station==1 and eta==3 and lay==1: nbins = 62
+                                    if station==1 and eta==3 and lay==1: nbins = 62
+                                    if station==2 and eta==3: nbins = 32
+                                    if station==3 and eta==3: nbins = 32
+
+                                    if station==1 and eta==4 and lay==1: nbins = 92
+                                    if station==1 and eta==4 and lay==1: nbins = 91
+                                    if station==1 and eta==4 and lay==1: nbins = 91
+                                    if station==2 and eta==4: nbins = 103
+                                    if station==3 and eta==4: nbins = 106
+
+                                    if station==2 and eta==5: nbins = 110
+                                    if station==3 and eta==5: nbins = 96
+
+                                    if station==4 and eta==0: nbins = 32
+                                    if station==4 and eta==1: nbins = 24
+
+                                myGroup.defineHistogram('hits_on_'+chamber_name+s_or_w,
+                                                        title='Hits_on_'+chamber_name+s_or_w+";Channel ID;Number of events",
+                                                        path=hitDetailsPath,xbins=nbins,xmin=0.5,xmax=nbins+0.5)
+
+
     acc = helper.result()
     result.merge(acc)
     return result
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataMonitorAlgorithm.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataMonitorAlgorithm.cxx
index 5c60f071005e..2c4737d8ad31 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataMonitorAlgorithm.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataMonitorAlgorithm.cxx
@@ -143,15 +143,31 @@ StatusCode TgcRawDataMonitorAlgorithm::fillHistograms( const EventContext& ctx )
     mymuon.tagged = triggerMatching(muon,m_trigTagDefs)==StatusCode::SUCCESS ? true : false;
     /* fill info of isolation among muons */
     mymuon.isolated = true;
+    mymuon.probeOK = false;
+    if(!m_TagAndProbe.value()) mymuon.probeOK = true;
     for(const auto& muon2 : *muons){
       if( muon == muon2 )continue;
+
       TLorentzVector muonvec2;
       muonvec2.SetPtEtaPhiM(muon2->pt(),muon2->eta(),muon2->phi(),m_muonMass.value());
       float dr = muonvec2.DeltaR( mymuon.fourvec );
       if( dr < m_isolationWindow.value() ){
   	mymuon.isolated = false;
-  	break;
       }
+
+      if( muon2->muonType()!=xAOD::Muon::Combined )continue;
+      if( muon2->author()!=xAOD::Muon::MuidCo && muon2->author()!=xAOD::Muon::STACO )continue;
+      if( muon2->quality()!=xAOD::Muon::Tight && muon2->quality()!=xAOD::Muon::Medium )continue;
+      if( triggerMatching(muon2,m_trigTagDefs)!=StatusCode::SUCCESS )continue;
+      if(!m_TagAndProbeZmumu.value()){
+	mymuon.probeOK=true;
+      }else{
+	if( muon->charge() == muon2->charge() )continue;
+	double dimuon_mass = (muonvec2 + mymuon.fourvec).M();
+	if(std::abs( dimuon_mass - m_zMass.value()) > m_zMassWindow.value() )continue;
+	mymuon.probeOK=true;
+      }
+
     }
     /* fill extrapolation info (only to TGC) */
     extrapolate( muon, mymuon );
@@ -179,32 +195,18 @@ StatusCode TgcRawDataMonitorAlgorithm::fillHistograms( const EventContext& ctx )
       }
       if(pass) mymuon.matchedL1ThrInclusive.insert(ithr);
     }
+
     /* store MyMuon */
     mymuons.push_back( mymuon );
   }
 
-  /* fill probe of tag-and-probe info */
-  for(auto mymuon : mymuons){
-    mymuon.probeOK_any = false;
-    mymuon.probeOK_Z = false;
-    for(const auto& mu2 : mymuons){
-      if( mymuon.muon == mu2.muon )continue;
-      if( !mu2.tagged )continue;
-      mymuon.probeOK_any = true;
-      if( mymuon.muon->charge() == mu2.muon->charge() )continue;
-      double dimuon_mass = (mu2.fourvec + mymuon.fourvec).M();
-      if(std::abs( dimuon_mass - m_zMass.value()) > m_zMassWindow.value() )continue;
-      mymuon.probeOK_Z = true;
-      break;
-    }
-  }
   
-  auto muon_eta = Monitored::Collection("muon_eta",mymuons,[](const MyMuon& m){return (m.muon->pt()/1000>30)?m.muon->eta():-10;});variables.push_back(muon_eta);
-  auto muon_phi = Monitored::Collection("muon_phi",mymuons,[](const MyMuon& m){return (m.muon->pt()/1000>30)?m.muon->phi():-10;});variables.push_back(muon_phi);
-  auto muon_phi_rpc = Monitored::Collection("muon_phi_rpc",mymuons,[](const MyMuon& m){return (std::abs(m.muon->eta())<1.05&&m.muon->pt()/1000>30)?m.muon->phi():-10;});variables.push_back(muon_phi_rpc);
-  auto muon_phi_tgc = Monitored::Collection("muon_phi_tgc",mymuons,[](const MyMuon& m){return (std::abs(m.muon->eta())>1.05&&std::abs(m.muon->eta())<2.4&&m.muon->pt()/1000>30)?m.muon->phi():-10;});variables.push_back(muon_phi_tgc);
-  auto muon_pt_rpc = Monitored::Collection("muon_pt_rpc",mymuons,[](const MyMuon& m){return (std::abs(m.muon->eta())<1.05)?m.muon->pt()/1000:-10;});variables.push_back(muon_pt_rpc);
-  auto muon_pt_tgc = Monitored::Collection("muon_pt_tgc",mymuons,[](const MyMuon& m){return (std::abs(m.muon->eta())>1.05&&std::abs(m.muon->eta())<2.4)?m.muon->pt()/1000:-10;});variables.push_back(muon_pt_tgc);
+  auto muon_eta = Monitored::Collection("muon_eta",mymuons,[](const MyMuon& m){return (m.probeOK&&m.muon->pt()/1000>30)?m.muon->eta():-10;});variables.push_back(muon_eta);
+  auto muon_phi = Monitored::Collection("muon_phi",mymuons,[](const MyMuon& m){return (m.probeOK&&m.muon->pt()/1000>30)?m.muon->phi():-10;});variables.push_back(muon_phi);
+  auto muon_phi_rpc = Monitored::Collection("muon_phi_rpc",mymuons,[](const MyMuon& m){return (m.probeOK&&std::abs(m.muon->eta())<1.05&&m.muon->pt()/1000>30)?m.muon->phi():-10;});variables.push_back(muon_phi_rpc);
+  auto muon_phi_tgc = Monitored::Collection("muon_phi_tgc",mymuons,[](const MyMuon& m){return (m.probeOK&&std::abs(m.muon->eta())>1.05&&std::abs(m.muon->eta())<2.4&&m.muon->pt()/1000>30)?m.muon->phi():-10;});variables.push_back(muon_phi_tgc);
+  auto muon_pt_rpc = Monitored::Collection("muon_pt_rpc",mymuons,[](const MyMuon& m){return (m.probeOK&&std::abs(m.muon->eta())<1.05)?m.muon->pt()/1000:-10;});variables.push_back(muon_pt_rpc);
+  auto muon_pt_tgc = Monitored::Collection("muon_pt_tgc",mymuons,[](const MyMuon& m){return (m.probeOK&&std::abs(m.muon->eta())>1.05&&std::abs(m.muon->eta())<2.4)?m.muon->pt()/1000:-10;});variables.push_back(muon_pt_tgc);
   auto muon_l1passThr1 = Monitored::Collection("muon_l1passThr1",mymuons,[](const MyMuon& m){return m.matchedL1ThrInclusive.find(1)!=m.matchedL1ThrInclusive.end();});variables.push_back(muon_l1passThr1);
   auto muon_l1passThr2 = Monitored::Collection("muon_l1passThr2",mymuons,[](const MyMuon& m){return m.matchedL1ThrInclusive.find(2)!=m.matchedL1ThrInclusive.end();});variables.push_back(muon_l1passThr2);
   auto muon_l1passThr3 = Monitored::Collection("muon_l1passThr3",mymuons,[](const MyMuon& m){return m.matchedL1ThrInclusive.find(3)!=m.matchedL1ThrInclusive.end();});variables.push_back(muon_l1passThr3);
@@ -236,6 +238,12 @@ StatusCode TgcRawDataMonitorAlgorithm::fillHistograms( const EventContext& ctx )
   }
   const TgcIdHelper& tgcIdHelper = m_idHelperSvc->tgcIdHelper();
   std::vector<TgcHit> tgcHits;
+  std::set<TString> chamber_list;
+  std::map<TString,std::vector<TgcHit>> tgcHitsMap;
+  std::map<TString,std::vector<int>> tgcHitPhiMap;
+  std::map<TString,std::vector<int>> tgcHitEtaMap;
+  std::map<TString,std::vector<int>> tgcHitPhiMapGlobal;
+  std::map<TString,std::vector<int>> tgcHitTiming;
   for(auto tgccnt : *tgcPrd){
     for(auto data : *tgccnt){
       TgcHit tgcHit;
@@ -268,7 +276,101 @@ StatusCode TgcRawDataMonitorAlgorithm::fillHistograms( const EventContext& ctx )
       tgcHit.phi = tgcIdHelper.stationPhi(id);
       tgcHit.station = tgcIdHelper.stationName(id);
       tgcHit.bunch = bunch;
+
+      tgcHit.igasGap = tgcHit.gasGap;
+      tgcHit.ieta = tgcHit.eta;
+      tgcHit.iphi = tgcHit.phi;
+      tgcHit.side = ( tgcHit.ieta > 0 )?("A"):("C");
+      tgcHit.iside = ( tgcHit.ieta > 0 )?(0):(1);
+      tgcHit.M = 0;
+      tgcHit.istation = tgcHit.station;
+      if( tgcHit.istation == 41 || tgcHit.istation == 42 ) tgcHit.M = 1;
+      if( tgcHit.istation == 43 || tgcHit.istation == 44 ) tgcHit.M = 2;
+      if( tgcHit.istation == 45 || tgcHit.istation == 46 ) tgcHit.M = 3;
+      if( tgcHit.istation == 47 || tgcHit.istation == 48 ) tgcHit.M = 4; // EIFI
+      if(tgcHit.M == 0){
+	ATH_MSG_ERROR("unknown station: " << tgcHit.istation);
+      }
+
+      if( tgcHit.M != 4 ){ // Big Wheel, (M1,M2,M3)
+	if( tgcHit.istation % 2 == 0 ){ // Endcap
+	  int iphi2 = tgcHit.iphi + 1; // 2,3,4,..,49
+	  if(iphi2>=48)iphi2-=48; // 0,1,2,3 ..., 47
+	  tgcHit.sector = int(iphi2 / 4) + 1; // 1,2,3,,,12
+	  tgcHit.f = iphi2 - (tgcHit.sector-1) * 4; // 0,1,2,3
+	  tgcHit.E = (tgcHit.M==1) ? ( 5 - TMath::Abs( tgcHit.ieta ) ) : ( 6 - TMath::Abs( tgcHit.ieta ) );
+	  tgcHit.L = tgcHit.igasGap;
+	  tgcHit.name = Form( "%s%02iM%02if%02iE%02iL%02i%s", tgcHit.side.Data(), tgcHit.sector, tgcHit.M, tgcHit.f, tgcHit.E, tgcHit.L,(tgcHit.isStrip>0)?("S"):("W"));
+	}else{ // Forward
+	  int iphi2 = tgcHit.iphi; // 1,2,3,4,..,25
+	  if(iphi2>=24)iphi2-=24; // 0,1,2,3 ...,23
+	  tgcHit.sector = int(iphi2 / 2) + 1; // 1,2,3,,,12
+	  tgcHit.f = iphi2 - (tgcHit.sector-1) * 2; // 0,1
+	  if(tgcHit.f==1)tgcHit.f = 2;//0,2
+	  tgcHit.E = 0; // F
+	  tgcHit.L = tgcHit.igasGap;
+	  tgcHit.name = Form( "%s%02iM%02if%02iF00L%02i%s", tgcHit.side.Data(), tgcHit.sector, tgcHit.M, tgcHit.f, tgcHit.L,(tgcHit.isStrip>0)?("S"):("W"));
+	}
+      }else{ // Small Wheel (M4)
+	if( tgcHit.istation == 47 ){// FI
+	  tgcHit.sector = 0;
+	  tgcHit.f = tgcHit.iphi; // 1,2,3..24
+	  tgcHit.E = 0;
+	  tgcHit.L = tgcHit.igasGap;
+	  tgcHit.name = Form("%s00M04f%02iF00L%02i%s",tgcHit.side.Data(),tgcHit.f,tgcHit.L,(tgcHit.isStrip>0)?("S"):("W"));
+	}else if( tgcHit.istation == 48 ){// EI
+	  int iphi2 = (tgcHit.iphi>=21)?(tgcHit.iphi-21):(tgcHit.iphi); // 0,1,2,..,20
+	  if(iphi2>=0&&iphi2<=2){ tgcHit.sector = 1; tgcHit.f = iphi2;}
+	  if(iphi2>=3&&iphi2<=5){ tgcHit.sector = 3; tgcHit.f = iphi2-3;}
+	  if(iphi2>=6&&iphi2<=8){ tgcHit.sector = 5; tgcHit.f = iphi2-6;}
+	  if(iphi2>=9&&iphi2<=10){ tgcHit.sector = 7; tgcHit.f = iphi2-9 +1;}
+	  if(iphi2>=11&&iphi2<=13){ tgcHit.sector = 9; tgcHit.f = iphi2-11;}
+	  if(iphi2>=14&&iphi2<=15){ tgcHit.sector = 11; tgcHit.f = iphi2-13;}
+	  if(iphi2>=16&&iphi2<=18){ tgcHit.sector = 13; tgcHit.f = iphi2-16;}
+	  if(iphi2>=19&&iphi2<=20){ tgcHit.sector = 15; tgcHit.f = iphi2-19 +1;}
+	  tgcHit.E = 1;
+	  tgcHit.L = tgcHit.igasGap;
+	  tgcHit.name = Form("%s%02iM04f%02iE01L%02i%s",tgcHit.side.Data(),tgcHit.sector,tgcHit.f,tgcHit.L,(tgcHit.isStrip>0)?("S"):("W"));
+	}else{
+	  ATH_MSG_ERROR("Unknown detector");
+	}
+      }
       tgcHits.push_back(tgcHit);
+      tgcHitsMap[tgcHit.name].push_back(tgcHit);
+      chamber_list.insert(tgcHit.name);
+
+      TString station_name = Form("%sM%02i%s",tgcHit.side.Data(),tgcHit.M,(tgcHit.isStrip>0)?("S"):("W"));
+      int phimap_index = 0;
+      int etamap_index = 0;
+      int phimap_global_index = 0; // no empty bins compare to the above index
+      if( tgcHit.M==1 ){
+	phimap_index = (tgcHit.sector - 1) * 4 + tgcHit.f + 1;
+	int tmpeta = (tgcHit.E==0)?(5):(tgcHit.E);
+	etamap_index = (tmpeta - 1) * 3 + tgcHit.L;
+	int tmpphi = tgcHit.f;
+	if( tgcHit.E==0 && tgcHit.f==2 ) tmpphi = 1;
+	if( tgcHit.E>0 ) phimap_global_index = (tmpeta - 1) * 144 + (tgcHit.sector - 1) * 12 + tmpphi * 3 + tgcHit.L;
+	else             phimap_global_index = 576 + (tgcHit.sector - 1) * 6 + tmpphi * 3 + tgcHit.L;
+      }else if( tgcHit.M==2 || tgcHit.M==3 ){
+	phimap_index = (tgcHit.sector - 1) * 4 + tgcHit.f + 1;
+	int tmpeta = (tgcHit.E==0)?(6):(tgcHit.E);
+	etamap_index = (tmpeta - 1) * 2 + tgcHit.L;
+	int tmpphi = tgcHit.f;
+	if( tgcHit.E==0 && tgcHit.f==2 ) tmpphi = 1;
+	if( tgcHit.E>0 ) phimap_global_index = (tmpeta - 1) * 96 + (tgcHit.sector - 1) * 8 + tmpphi * 2 + tgcHit.L;
+	else             phimap_global_index = 480 + (tgcHit.sector - 1) * 4 + tmpphi * 2 + tgcHit.L;
+      }else if( tgcHit.M==4 ){
+	phimap_index = tgcHit.iphi;
+	int tmpeta = (tgcHit.E==0)?(2):(tgcHit.E);
+	etamap_index = (tmpeta - 1) * 2 + tgcHit.L;
+	if( tgcHit.E>0 ) phimap_global_index = (tgcHit.iphi-1) * 2 + tgcHit.L;
+	else             phimap_global_index = 42 + (tgcHit.iphi-1) * 2 + tgcHit.L;
+      }
+      tgcHitPhiMap[station_name].push_back(phimap_index);
+      tgcHitEtaMap[station_name].push_back(etamap_index);
+      tgcHitPhiMapGlobal[station_name].push_back(phimap_global_index);
+      tgcHitTiming[station_name].push_back(bunch);
+
     }
   }
 
@@ -276,6 +378,23 @@ StatusCode TgcRawDataMonitorAlgorithm::fillHistograms( const EventContext& ctx )
   auto hit_bunch = Monitored::Collection("hit_bunch",tgcHits,[](const TgcHit& m){return m.bunch;});variables.push_back(hit_bunch);
   auto hit_sideA = Monitored::Collection("hit_sideA",tgcHits,[](const TgcHit& m){return m.z>0;});variables.push_back(hit_sideA);
   auto hit_sideC = Monitored::Collection("hit_sideC",tgcHits,[](const TgcHit& m){return m.z<0;});variables.push_back(hit_sideC);
+
+  for(auto chamber_name : chamber_list){
+    auto hits_on_a_chamber = Monitored::Collection(Form("hits_on_%s",chamber_name.Data()),tgcHitsMap[chamber_name],[](const TgcHit& m){return m.channel;});
+    fill(m_packageName,hits_on_a_chamber);
+  }
+
+  for(auto phimap : tgcHitPhiMap){
+    auto x = Monitored::Collection(Form("x_%s",phimap.first.Data()),tgcHitEtaMap[phimap.first],[](const int& m){return m;});
+    auto y = Monitored::Collection(Form("y_%s",phimap.first.Data()),phimap.second,[](const int& m){return m;});
+    fill(m_packageName,x,y);
+  }
+  for(auto phimap : tgcHitPhiMapGlobal){
+    auto x = Monitored::Scalar<int>(Form("lb_for_%s",phimap.first.Data()),GetEventInfo(ctx)->lumiBlock());
+    auto y = Monitored::Collection(Form("%s",phimap.first.Data()),phimap.second,[](const int& m){return m;});
+    auto z = Monitored::Collection(Form("timing_for_%s",phimap.first.Data()),tgcHitTiming[phimap.first],[](const int& m){return m;});
+    fill(m_packageName,x,y,z);
+  }
   
   SG::ReadHandle<Muon::TgcCoinDataContainer> tgcCoinCurr(m_TgcCoinDataContainerCurrBCKey, ctx);
   if(!tgcCoinCurr.isValid()){
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataMonitorAlgorithm.h b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataMonitorAlgorithm.h
index b22c1e8c6e8a..5c7a7e031352 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataMonitorAlgorithm.h
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataMonitorAlgorithm.h
@@ -37,6 +37,7 @@ class TgcRawDataMonitorAlgorithm : public AthMonitorAlgorithm {
     bool isolated;
     bool probeOK_any;
     bool probeOK_Z;
+    bool probeOK;
     std::set<int> matchedL1ThrExclusive;
     std::set<int> matchedL1ThrInclusive;
   };
@@ -55,6 +56,18 @@ class TgcRawDataMonitorAlgorithm : public AthMonitorAlgorithm {
     int phi;
     int station;
     int bunch;
+    int sector;
+    int f;
+    int E;
+    int M;
+    int iphi;
+    int ieta;
+    int L;
+    TString name;
+    int istation;
+    int igasGap;
+    int iside;
+    TString side;
   };
   struct TgcTrig{
     float x_In;
@@ -84,7 +97,6 @@ class TgcRawDataMonitorAlgorithm : public AthMonitorAlgorithm {
     int bunch;
     int inner;
   };
-
   
  private:
   ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
@@ -99,7 +111,8 @@ class TgcRawDataMonitorAlgorithm : public AthMonitorAlgorithm {
   
   StringProperty m_packageName{this,"PackageName","TgcRawDataMonitor","group name for histograming"};
   StringProperty m_trigTagList{this,"TagTrigList","HLT_mu26_ivarmedium_L1MU20","list of triggers to be used for trigger matching"};
-  BooleanProperty m_TagAndProbe{this,"TagAndProbe",true,"switch to perform tag-and-probe method"};
+  BooleanProperty m_TagAndProbe{this,"TagAndProbe",false,"switch to perform tag-and-probe method"};
+  BooleanProperty m_TagAndProbeZmumu{this,"TagAndProbeZmumu",false,"switch to perform tag-and-probe method Z->mumu"};
   BooleanProperty m_anaTgcPrd{this,"AnaTgcPrd",false,"switch to perform analysis on TGC PRD/Coin"};
   BooleanProperty m_anaOfflMuon{this,"AnaOfflMuon",true,"switch to perform analysis on xAOD::Muon"};
   BooleanProperty m_anaMuonRoI{this,"AnaMuonRoI",true,"switch to perform analysis on xAOD::LVL1MuonRoI"};
-- 
GitLab


From 33035f087fd2343c179797891ed34dcc060b49f2 Mon Sep 17 00:00:00 2001
From: sutt <sutt@cern.ch>
Date: Thu, 8 Oct 2020 18:23:47 +0200
Subject: [PATCH 363/403] Potential fix for unitialised RegSelTool in
 PEBInfoWriterAlg_TestPEBFour

Potential fix, although not sure, as debug printout is not very helpful, so am only
guessing that this will fix it, submitting now and checking since it is a potential
bug fix for https://its.cern.ch/jira/browse/ATR-22163
---
 Trigger/TrigValidation/TrigP1Test/share/PEBDSTest.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/Trigger/TrigValidation/TrigP1Test/share/PEBDSTest.py b/Trigger/TrigValidation/TrigP1Test/share/PEBDSTest.py
index 8b1e2772cb86..2fcbff183e6c 100644
--- a/Trigger/TrigValidation/TrigP1Test/share/PEBDSTest.py
+++ b/Trigger/TrigValidation/TrigP1Test/share/PEBDSTest.py
@@ -87,10 +87,12 @@ def myPebInfoWriterTool(name, eventBuildType):
         tool.EtaWidth = 0.1
         tool.PhiWidth = 0.1
         tool.DetNames = ['All']
+
         from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel, makeRegSelTool_SCT, makeRegSelTool_TRT 
         tool.RegSelTool_Pixel = makeRegSelTool_Pixel()
         tool.RegSelTool_SCT   = makeRegSelTool_SCT()
         tool.RegSelTool_TRT   = makeRegSelTool_TRT()
+
         tool.ExtraROBs = []
         tool.ExtraSubDets = []
         tool.addHLTResultToROBList() # add the main (full) HLT result to the list
@@ -102,6 +104,12 @@ def myPebInfoWriterTool(name, eventBuildType):
         tool.PhiWidth = 0.5
         tool.DetNames = ['MDT', 'CSC', 'RPC', 'TGC', 'MM', 'STGC'] # all muon detectors
         tool.ExtraROBs = []
+
+        from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel, makeRegSelTool_SCT, makeRegSelTool_TRT 
+        tool.RegSelTool_Pixel = makeRegSelTool_Pixel()
+        tool.RegSelTool_SCT   = makeRegSelTool_SCT()
+        tool.RegSelTool_TRT   = makeRegSelTool_TRT()
+
     elif 'ElectronDSTest' in eventBuildType:
         # ElectronDSTest is an example of pure Data Scouting,
         # where only the special HLT result is saved and nothing else
@@ -114,10 +122,12 @@ def myPebInfoWriterTool(name, eventBuildType):
         tool.EtaWidth = 0.3
         tool.PhiWidth = 0.3
         tool.DetNames = ['PIXEL', 'SCT', 'TRT', 'TTEM', 'TTHEC', 'FCALEM', 'FCALHAD']
+
         from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel, makeRegSelTool_SCT, makeRegSelTool_TRT 
         tool.RegSelTool_Pixel = makeRegSelTool_Pixel()
         tool.RegSelTool_SCT   = makeRegSelTool_SCT()
         tool.RegSelTool_TRT   = makeRegSelTool_TRT()
+
         tool.ExtraROBs = []
         tool.ExtraSubDets = []
 
-- 
GitLab


From 939b2557ed3dee2f5c32ff261e43295477ebb039 Mon Sep 17 00:00:00 2001
From: Peter van Gemmeren <gemmeren@anl.gov>
Date: Thu, 8 Oct 2020 11:52:56 -0500
Subject: [PATCH 364/403] Clear context map on io_reinit (fork) so pool
 attributes get reset with correct context.

---
 .../src/SharedEvtQueueConsumer.cxx            |  7 ++--
 .../AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx | 35 +++++++++++++++----
 .../AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h   | 11 ++++--
 3 files changed, 41 insertions(+), 12 deletions(-)

diff --git a/Control/AthenaMPTools/src/SharedEvtQueueConsumer.cxx b/Control/AthenaMPTools/src/SharedEvtQueueConsumer.cxx
index a903b29b873e..6b65d29c9868 100644
--- a/Control/AthenaMPTools/src/SharedEvtQueueConsumer.cxx
+++ b/Control/AthenaMPTools/src/SharedEvtQueueConsumer.cxx
@@ -384,11 +384,12 @@ std::unique_ptr<AthenaInterprocess::ScheduledWork> SharedEvtQueueConsumer::boots
   }
 
   if(m_useSharedWriter && m_dataShare) {
-    if(!m_dataShare->makeClient(m_rankId + 1).isSuccess()) {
-      ATH_MSG_ERROR("Failed to make the conversion service a share client");
+    IProperty* propertyServer = dynamic_cast<IProperty*>(m_dataShare);
+    if (propertyServer==0 || propertyServer->setProperty("MakeStreamingToolClient", m_rankId + 1).isFailure()) {
+      ATH_MSG_ERROR("Could not change AthenaPoolCnvSvc MakeClient Property");
       return outwork;
     } else {
-    ATH_MSG_DEBUG("Successfully made the conversion service a share client");
+      ATH_MSG_DEBUG("Successfully made the conversion service a share client");
     }
   }
 
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx
index bca157b86f9d..c8f47d3dbd7c 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx
@@ -9,12 +9,12 @@
 
 #include "AthenaPoolCnvSvc.h"
 
+#include "GaudiKernel/AttribStringParser.h"
 #include "GaudiKernel/ClassID.h"
 #include "GaudiKernel/FileIncident.h"
-
-#include "GaudiKernel/IOpaqueAddress.h"
 #include "GaudiKernel/IIncidentSvc.h"
-#include "GaudiKernel/AttribStringParser.h"
+#include "GaudiKernel/IIoComponentMgr.h"
+#include "GaudiKernel/IOpaqueAddress.h"
 
 #include "AthenaKernel/IAthenaSerializeSvc.h"
 #include "AthenaKernel/IAthenaOutputStreamTool.h"
@@ -24,7 +24,6 @@
 #include "PersistentDataModel/TokenAddress.h"
 #include "PersistentDataModel/DataHeader.h"
 
-
 #include "StorageSvc/DbReflex.h"
 
 #include "AuxDiscoverySvc.h"
@@ -62,6 +61,13 @@ StatusCode AthenaPoolCnvSvc::initialize() {
          ATH_CHECK(arswsvc.retrieve());
       }
    }
+   // Register this service for 'I/O' events
+   ServiceHandle<IIoComponentMgr> iomgr("IoComponentMgr", name());
+   ATH_CHECK(iomgr.retrieve());
+   if (!iomgr->io_register(this).isSuccess()) {
+      ATH_MSG_FATAL("Could not register myself with the IoComponentMgr !");
+      return(StatusCode::FAILURE);
+   }
    // Extracting MaxFileSizes for global default and map by Database name.
    for (std::vector<std::string>::const_iterator iter = m_maxFileSizes.value().begin(),
 	   last = m_maxFileSizes.value().end(); iter != last; ++iter) {
@@ -101,6 +107,12 @@ StatusCode AthenaPoolCnvSvc::initialize() {
    return(StatusCode::SUCCESS);
 }
 //______________________________________________________________________________
+StatusCode AthenaPoolCnvSvc::io_reinit() {
+   ATH_MSG_DEBUG("I/O reinitialization...");
+   m_contextAttr.clear();
+   return(StatusCode::SUCCESS);
+}
+//______________________________________________________________________________
 StatusCode AthenaPoolCnvSvc::finalize() {
    // Release AthenaSerializeSvc
    if (!m_serializeSvc.empty()) {
@@ -137,6 +149,11 @@ StatusCode AthenaPoolCnvSvc::finalize() {
    m_cnvs.shrink_to_fit();
    return(StatusCode::SUCCESS);
 }
+//______________________________________________________________________________
+StatusCode AthenaPoolCnvSvc::io_finalize() {
+   ATH_MSG_DEBUG("I/O finalization...");
+   return(StatusCode::SUCCESS);
+}
 //_______________________________________________________________________
 StatusCode AthenaPoolCnvSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) {
    if (IAthenaPoolCnvSvc::interfaceID().versionMatch(riid)) {
@@ -266,7 +283,10 @@ StatusCode AthenaPoolCnvSvc::connectOutput(const std::string& outputConnectionSp
       return(StatusCode::FAILURE);
    }
    if (m_makeStreamingToolClient.value() > 0 && !m_outputStreamingTool.empty() && !m_outputStreamingTool[0]->isServer() && !m_outputStreamingTool[0]->isClient()) {
-      m_outputStreamingTool[0]->makeClient(m_makeStreamingToolClient.value()).ignore();
+      if (!makeClient(m_makeStreamingToolClient.value()).isSuccess()) {
+         ATH_MSG_ERROR("Could not make AthenaPoolCnvSvc a Share Client");
+         return(StatusCode::FAILURE);
+      }
    }
    if (!m_outputStreamingTool.empty() && m_outputStreamingTool[0]->isClient()
 	   && (!m_streamMetaDataOnly || outputConnectionSpec.find("[PoolContainerPrefix=" + m_metadataContainerProp.value() + "]") != std::string::npos)) {
@@ -670,7 +690,10 @@ Token* AthenaPoolCnvSvc::registerForWrite(Placement* placement, const void* obj,
       m_chronoStatSvc->chronoStart("cRepR_ALL");
    }
    if (m_makeStreamingToolClient.value() > 0 && !m_outputStreamingTool.empty() && !m_outputStreamingTool[0]->isServer() && !m_outputStreamingTool[0]->isClient()) {
-      m_outputStreamingTool[0]->makeClient(m_makeStreamingToolClient.value()).ignore();
+      if (!makeClient(m_makeStreamingToolClient.value()).isSuccess()) {
+         ATH_MSG_ERROR("Could not make AthenaPoolCnvSvc a Share Client");
+         return(nullptr);
+      }
    }
    Token* token = nullptr;
    if (!m_outputStreamingTool.empty() && m_outputStreamingTool[0]->isClient()
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h
index 8212f1a69e1e..7c0841165284 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h
@@ -12,15 +12,17 @@
 
 #include "AthenaPoolCnvSvc/IAthenaPoolCnvSvc.h"
 
+#include "GaudiKernel/IChronoStatSvc.h"
 #include "GaudiKernel/IIncidentListener.h"
+#include "GaudiKernel/IIoComponent.h"
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
+
 #include "StorageSvc/DbType.h"
 #include "AthenaBaseComps/AthCnvSvc.h"
 #include "AthenaKernel/IAthenaIPCTool.h"
-#include "GaudiKernel/IChronoStatSvc.h"
-#include "PoolSvc/IPoolSvc.h"
 #include "AthenaKernel/IClassIDSvc.h"
+#include "PoolSvc/IPoolSvc.h"
 
 #include <vector>
 #include <map>
@@ -37,7 +39,8 @@ template <class TYPE> class SvcFactory;
  **/
 class ATLAS_CHECK_THREAD_SAFETY AthenaPoolCnvSvc : public ::AthCnvSvc,
 		public virtual IAthenaPoolCnvSvc,
-		public virtual IIncidentListener {
+		public virtual IIncidentListener,
+		public virtual IIoComponent {
    // Allow the factory class access to the constructor
    friend class SvcFactory<AthenaPoolCnvSvc>;
 
@@ -45,8 +48,10 @@ public:
 
    /// Required of all Gaudi Services
    StatusCode initialize();
+   StatusCode io_reinit();
    /// Required of all Gaudi Services
    StatusCode finalize();
+   StatusCode io_finalize();
    /// Required of all Gaudi services:  see Gaudi documentation for details
    StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface);
 
-- 
GitLab


From 464f47bda7ee87851a762ecc4aa4595033296e76 Mon Sep 17 00:00:00 2001
From: Alexander Solodkov <Sanya.Solodkov@cern.ch>
Date: Thu, 8 Oct 2020 18:53:37 +0200
Subject: [PATCH 365/403] new method to retrieve run period added to
 TileCablingService

---
 .../TileConditions/TileConditions/TileCablingService.h           | 1 +
 1 file changed, 1 insertion(+)

diff --git a/TileCalorimeter/TileConditions/TileConditions/TileCablingService.h b/TileCalorimeter/TileConditions/TileConditions/TileCablingService.h
index 93a207fb8407..c857eba1c379 100644
--- a/TileCalorimeter/TileConditions/TileConditions/TileCablingService.h
+++ b/TileCalorimeter/TileConditions/TileConditions/TileCablingService.h
@@ -280,6 +280,7 @@ public:
     inline bool                isRun2Cabling()     const { return m_run2; }
     inline bool                isRun2PlusCabling() const { return m_run2plus; }
     inline bool                isRun3Cabling()     const { return m_run3; }
+    inline int                 runPeriod()         const { return (2 * int(m_run2) + 3 * int(m_run3)); }
 };
 
 #endif // TILECONDITIONS_TILECABLINGSERVICE_H
-- 
GitLab


From fb9e8c1ecd8d20a9868c63337c52ac3ca91ff293 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Thu, 8 Oct 2020 19:22:48 +0200
Subject: [PATCH 366/403] In principle we should be using the local cache
 consistently, rahter than falling back to the thread specific one

---
 .../TrkExTools/src/Extrapolator.cxx           | 22 +++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/Tracking/TrkExtrapolation/TrkExTools/src/Extrapolator.cxx b/Tracking/TrkExtrapolation/TrkExTools/src/Extrapolator.cxx
index 5340f8a854f4..3e850999ab66 100755
--- a/Tracking/TrkExtrapolation/TrkExTools/src/Extrapolator.cxx
+++ b/Tracking/TrkExtrapolation/TrkExTools/src/Extrapolator.cxx
@@ -5560,7 +5560,14 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(const EventContext& ctx,
               if (currentUpdator) {
                 nextPar = ManagedTrackParmPtr::recapture(
                   nextPar,
-                  currentUpdator->postUpdate(*nextPar, *nextLayer, dir, particle, matupmod).release());
+                  currentUpdator
+                    ->postUpdate(currentUpdatorCache,
+                                 *nextPar,
+                                 *nextLayer,
+                                 dir,
+                                 particle,
+                                 matupmod)
+                    .release());
               }
               if (!nextPar) {
                 ATH_MSG_VERBOSE("postUpdate failed for input parameters:"
@@ -5577,9 +5584,16 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(const EventContext& ctx,
           } else {
             double pIn = nextPar->momentum().mag();
             if (currentUpdator) {
-              nextPar = ManagedTrackParmPtr::recapture(
-                nextPar,
-                currentUpdator->update(nextPar.get(), *nextLayer, dir, particle, matupmod).release());
+              nextPar =
+                ManagedTrackParmPtr::recapture(nextPar,
+                                               currentUpdator
+                                                 ->update(currentUpdatorCache,
+                                                          nextPar.get(),
+                                                          *nextLayer,
+                                                          dir,
+                                                          particle,
+                                                          matupmod)
+                                                 .release());
             }
             if (!nextPar) {
               ATH_MSG_VERBOSE("  [+] Update may have killed track - return.");
-- 
GitLab


From 8b49238fb7d83329f16394180d1c8a2d26c0e0cb Mon Sep 17 00:00:00 2001
From: Joshua Falco Beirer <joshua.falco.beirer@cern.ch>
Date: Thu, 8 Oct 2020 17:43:04 +0000
Subject: [PATCH 367/403] Manual sweep of !36084 from 21.0 to master

---
 .../share/skeleton.ESDtoNTUP_FCS.py           |    4 +-
 .../src/FastCaloSimCaloExtrapolation.cxx      | 1472 ++++++++++-------
 .../src/FastCaloSimCaloExtrapolation.h        |  148 +-
 3 files changed, 984 insertions(+), 640 deletions(-)

diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/share/skeleton.ESDtoNTUP_FCS.py b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/share/skeleton.ESDtoNTUP_FCS.py
index ba648ab2c18a..1bd9e55073d8 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/share/skeleton.ESDtoNTUP_FCS.py
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/share/skeleton.ESDtoNTUP_FCS.py
@@ -35,8 +35,8 @@ from GaudiSvc.GaudiSvcConf import THistSvc
 ServiceMgr += THistSvc()
 ## Output NTUP_FCS File
 if hasattr(runArgs,"outputNTUP_FCSFile"):
-    print "Output is"
-    print  runArgs.outputNTUP_FCSFile
+    print("Output is")
+    print(runArgs.outputNTUP_FCSFile)
     ServiceMgr.THistSvc.Output +=["ISF_HitAnalysis DATAFILE='"+runArgs.outputNTUP_FCSFile+"' OPT='RECREATE'"] # FIXME top level directory name
 else:
     fcsntuplog.warning('No output file set')
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/FastCaloSimCaloExtrapolation.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/FastCaloSimCaloExtrapolation.cxx
index 63051909e0ca..607c2e9c5a7b 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/FastCaloSimCaloExtrapolation.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/FastCaloSimCaloExtrapolation.cxx
@@ -2,19 +2,29 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
+/* Athena includes */
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "GaudiKernel/ToolHandle.h"
+#include "GaudiKernel/IPartPropSvc.h"
+
+/* Header include */
 #include "FastCaloSimCaloExtrapolation.h"
 
+/* ISF includes */
+#include "ISF_FastCaloSimEvent/FastCaloSim_CaloCell_ID.h"
+#include "ISF_FastCaloSimParametrization/IFastCaloSimGeometryHelper.h"
 #include "ISF_FastCaloSimEvent/TFCSTruthState.h"
 
-
-#include "TrkParameters/TrackParameters.h"
+/* Tracking includes */
 #include "TrkGeometry/TrackingGeometry.h"
-#include "HepPDT/ParticleData.hh"
+
+/* Geometry primitives */
+#include "GeoPrimitives/GeoPrimitivesHelpers.h"
+
+/* Particle data */
 #include "HepPDT/ParticleDataTable.hh"
 
-#include "CaloDetDescr/ICaloCoordinateTool.h"
-#include "GaudiKernel/IPartPropSvc.h"
-#include "GaudiKernel/ListItem.h"
+
 
 FastCaloSimCaloExtrapolation::FastCaloSimCaloExtrapolation(const std::string& t, const std::string& n, const IInterface* p)
   : AthAlgTool(t,n,p)
@@ -30,13 +40,13 @@ FastCaloSimCaloExtrapolation::FastCaloSimCaloExtrapolation(const std::string& t,
   m_surfacelist.push_back(CaloCell_ID_FCS::EME2);
   m_surfacelist.push_back(CaloCell_ID_FCS::FCAL0);
   
-  declareProperty("CaloBoundaryR",                  m_CaloBoundaryR);
-  declareProperty("CaloBoundaryZ",                  m_CaloBoundaryZ);
-  declareProperty("CaloMargin",                     m_calomargin);
-  declareProperty("Surfacelist",                    m_surfacelist );
-  declareProperty("Extrapolator",                   m_extrapolator );
-  declareProperty("CaloEntrance",                   m_caloEntranceName );
-  declareProperty("CaloGeometryHelper",             m_CaloGeometryHelper );
+  declareProperty("CaloBoundaryR",      m_CaloBoundaryR);
+  declareProperty("CaloBoundaryZ",      m_CaloBoundaryZ);
+  declareProperty("CaloMargin",         m_calomargin);
+  declareProperty("Surfacelist",        m_surfacelist);
+  declareProperty("Extrapolator",       m_extrapolator);
+  declareProperty("CaloEntrance",       m_caloEntranceName);
+  declareProperty("CaloGeometryHelper", m_CaloGeometryHelper);
 }
 
 FastCaloSimCaloExtrapolation::~FastCaloSimCaloExtrapolation()
@@ -51,29 +61,25 @@ StatusCode FastCaloSimCaloExtrapolation::initialize()
   ATH_CHECK(m_CaloGeometryHelper.retrieve());
 
   // Get PDG table
-  IPartPropSvc* p_PartPropSvc=nullptr;
+  IPartPropSvc* p_PartPropSvc = nullptr;
 
   ATH_CHECK(service("PartPropSvc",p_PartPropSvc));
-  if(!p_PartPropSvc)
-    {
-      ATH_MSG_ERROR("could not find PartPropService");
-      return StatusCode::FAILURE;
-    }
+  if(!p_PartPropSvc){
+    ATH_MSG_ERROR("could not find PartPropService");
+    return StatusCode::FAILURE;
+  }
 
   m_particleDataTable = (HepPDT::ParticleDataTable*) p_PartPropSvc->PDT();
-  if(!m_particleDataTable)
-    {
-      ATH_MSG_ERROR("PDG table not found");
-      return StatusCode::FAILURE;
-    }
-  //#########################
+  if(!m_particleDataTable){
+    ATH_MSG_ERROR("PDG table not found");
+    return StatusCode::FAILURE;
+  }
 
   // Get TimedExtrapolator
-  if(!m_extrapolator.empty())
-    {
+  if(!m_extrapolator.empty()){
       ATH_CHECK(m_extrapolator.retrieve());
       ATH_MSG_INFO("Extrapolator retrieved "<< m_extrapolator);
-    }
+  }
 
   ATH_MSG_INFO("m_CaloBoundaryR="<<m_CaloBoundaryR<<" m_CaloBoundaryZ="<<m_CaloBoundaryZ<<" m_caloEntranceName "<<m_caloEntranceName);
 
@@ -81,71 +87,118 @@ StatusCode FastCaloSimCaloExtrapolation::initialize()
 
 }
 
-StatusCode FastCaloSimCaloExtrapolation::finalize()
-{
+
+StatusCode FastCaloSimCaloExtrapolation::finalize(){
   ATH_MSG_INFO( "Finalizing FastCaloSimCaloExtrapolation" );
   return StatusCode::SUCCESS;
 }
 
+bool FastCaloSimCaloExtrapolation::getCaloSurface(TFCSExtrapolationState& result, std::vector<Trk::HitInfo>* hitVector) const{
+  ATH_MSG_DEBUG("Start getCaloSurface()");
 
-void FastCaloSimCaloExtrapolation::extrapolate(TFCSExtrapolationState& result,const TFCSTruthState* truth) const
-{
+  //used to identify ID-Calo boundary in tracking tools
+  int IDCaloBoundary = 3000;
+  
+  result.set_CaloSurface_sample(CaloCell_ID_FCS::noSample);
+  result.set_CaloSurface_eta(-999);
+  result.set_CaloSurface_phi(-999);
+  result.set_CaloSurface_r(0);
+  result.set_CaloSurface_z(0);
+  double min_calo_surf_dist=1000;
 
-  //UPDATE EXTRAPOLATION
-  ATH_MSG_DEBUG("Start FastCaloSimCaloExtrapolation::extrapolate");
-  std::vector<Trk::HitInfo>* hitVector = caloHits(truth);
-  ATH_MSG_DEBUG("Done FastCaloSimCaloExtrapolation::extrapolate: caloHits");
+  for(unsigned int i=0;i<m_surfacelist.size();++i){
 
-  //////////////////////////////////////
-  // Start calo extrapolation
-  // First: get entry point into first calo sample
-  //////////////////////////////////////
-  ATH_MSG_DEBUG("FastCaloSimCaloExtrapolation::extrapolate:*** Get calo surface ***");
-  get_calo_surface(result,hitVector);
+    int sample=m_surfacelist[i];
+    std::vector<Trk::HitInfo>::iterator it = hitVector->begin();
 
-  ATH_MSG_DEBUG("FastCaloSimCaloExtrapolation::extrapolate:*** Do extrapolation to ID-calo boundary ***");
-  extrapolate_to_ID(result,truth,hitVector);
+    while (it != hitVector->end() && it->detID != (IDCaloBoundary+sample)) it++;
 
-  ATH_MSG_DEBUG("FastCaloSimCaloExtrapolation::extrapolate:*** Do extrapolation ***");
-  extrapolate(result,truth,hitVector);
+    if(it==hitVector->end()) continue;
 
-  ATH_MSG_DEBUG("FastCaloSimCaloExtrapolation::extrapolate: Truth extrapolation done");
+    Amg::Vector3D hitPos = (*it).trackParms->position();
+
+    //double offset = 0.;
+    double etaCalo = hitPos.eta();
+
+    if(std::abs(etaCalo)<900){
+        
+        double phiCalo = hitPos.phi();
+        double distsamp =deta(sample,etaCalo);
+
+        if(distsamp<min_calo_surf_dist && min_calo_surf_dist>=0){
+            
+            //hitVector is ordered in r, so if first surface was hit, keep it
+            result.set_CaloSurface_sample(sample);
+            result.set_CaloSurface_eta(etaCalo);
+            result.set_CaloSurface_phi(phiCalo);
+            double rcalo = rent(sample,etaCalo);
+            double zcalo = zent(sample,etaCalo);
+            result.set_CaloSurface_r(rcalo);
+            result.set_CaloSurface_z(zcalo);
+            min_calo_surf_dist = distsamp;
+            msg(MSG::DEBUG)<<" r="<<rcalo<<" z="<<zcalo;
 
-  for(std::vector<Trk::HitInfo>::iterator it = hitVector->begin();it < hitVector->end();++it)
-    {
-      if((*it).trackParms)
-        {
-          delete (*it).trackParms;
-          (*it).trackParms=0;
-        }
+            if(distsamp<0){
+              msg(MSG::DEBUG)<<endmsg;
+              break;
+            }
+          }
+        msg(MSG::DEBUG)<<endmsg;
+      }
+    else
+      msg(MSG::DEBUG)<<": eta > 900, not using this"<<endmsg;
     }
-  delete hitVector;
-  ATH_MSG_DEBUG("Done FastCaloSimCaloExtrapolation::extrapolate");
+
+  if(result.CaloSurface_sample() == CaloCell_ID_FCS::noSample){
+      // first intersection with sensitive calo layer
+      std::vector<Trk::HitInfo>::iterator it = hitVector->begin();
+
+      while(it < hitVector->end() && (*it).detID != 3) it++;   // to be updated
+
+      if (it == hitVector->end()) return false;  // no calo intersection, abort
+
+      Amg::Vector3D surface_hitPos = (*it).trackParms->position();
+
+      result.set_CaloSurface_eta(surface_hitPos.eta());
+      result.set_CaloSurface_phi(surface_hitPos.phi());
+      result.set_CaloSurface_r(surface_hitPos.perp());
+      result.set_CaloSurface_z(surface_hitPos[Amg::z]);
+
+      double pT=(*it).trackParms->momentum().perp();
+      if(std::abs(result.CaloSurface_eta())>4.9 || pT<500 || (std::abs(result.CaloSurface_eta())>4 && pT<1000))
+        ATH_MSG_DEBUG("only entrance to calo entrance layer found, no surface : eta="<<result.CaloSurface_eta()<<" phi="<<result.CaloSurface_phi()<<" r="<<result.CaloSurface_r()<<" z="<<result.CaloSurface_z()<<" pT="<<pT);
+      else
+        ATH_MSG_WARNING("only entrance to calo entrance layer found, no surface : eta="<<result.CaloSurface_eta()<<" phi="<<result.CaloSurface_phi()<<" r="<<result.CaloSurface_r()<<" z="<<result.CaloSurface_z()<<" pT="<<pT);
+    
+    } //sample
+  else ATH_MSG_DEBUG("entrance to calo surface : sample="<<result.CaloSurface_sample()<<" eta="<<result.CaloSurface_eta()<<" phi="<<result.CaloSurface_phi()<<" r="<<result.CaloSurface_r()<<" z="<<result.CaloSurface_z()<<" deta="<<min_calo_surf_dist);
+    
+  ATH_MSG_DEBUG("End getCaloSurface()");
+  return true;
 }
 
-std::vector<Trk::HitInfo>* FastCaloSimCaloExtrapolation::caloHits(const TFCSTruthState* truth, bool forceNeutral) const
-{
+
+std::unique_ptr<std::vector<Trk::HitInfo>> FastCaloSimCaloExtrapolation::caloHits(const TFCSTruthState* truth, bool forceNeutral) const{
   // Start calo extrapolation
   ATH_MSG_DEBUG ("[ fastCaloSim transport ] processing particle "<<truth->pdgid() );
 
-  std::vector<Trk::HitInfo>* hitVector =  new std::vector<Trk::HitInfo>;
+  auto hitVector = std::make_unique<std::vector<Trk::HitInfo>>();
 
   int     pdgId    = truth->pdgid();
   double  charge   = HepPDT::ParticleID(pdgId).charge();
   if (forceNeutral) charge   = 0.;
 
   // particle Hypothesis for the extrapolation
+  Trk::ParticleHypothesis pHypothesis = m_pdgToParticleHypothesis.convert(pdgId, charge);
 
-  Trk::ParticleHypothesis pHypothesis = m_pdgToParticleHypothesis.convert(pdgId,charge);
-
-  ATH_MSG_DEBUG ("particle hypothesis "<< pHypothesis );
+  ATH_MSG_DEBUG ("particle hypothesis "<< pHypothesis);
 
   // geantinos not handled by PdgToParticleHypothesis - fix there
-  if ( pdgId == 999 ) pHypothesis = Trk::geantino;
+  if (pdgId == 999) pHypothesis = Trk::geantino;
 
-  Amg::Vector3D pos = Amg::Vector3D( truth->vertex().X(), truth->vertex().Y(), truth->vertex().Z());
+  Amg::Vector3D pos = Amg::Vector3D(truth->vertex().X(), truth->vertex().Y(), truth->vertex().Z());
 
-  Amg::Vector3D mom(truth->X(),truth->Y(),truth->Z());
+  Amg::Vector3D mom(truth->X(), truth->Y(), truth->Z());
 
   ATH_MSG_DEBUG( "[ fastCaloSim transport ] x from position eta="<<pos.eta()<<" phi="<<pos.phi()<<" d="<<pos.mag()<<" pT="<<mom.perp() );
 
@@ -173,7 +226,7 @@ std::vector<Trk::HitInfo>* FastCaloSimCaloExtrapolation::caloHits(const TFCSTrut
   }
   */
 
-  Trk::TimeLimit timeLim(tDec,0.,decayProc);        // TODO: set vertex time info
+  Trk::TimeLimit timeLim(tDec, 0., decayProc);        // TODO: set vertex time info
 
   // prompt decay ( uncomment if unstable particles used )
   //if ( freepath>0. && freepath<0.01 ) {
@@ -185,677 +238,916 @@ std::vector<Trk::HitInfo>* FastCaloSimCaloExtrapolation::caloHits(const TFCSTrut
   //}
 
   // presample interactions - ADAPT FOR FASTCALOSIM
-  Trk::PathLimit pathLim(-1.,0);
-  //if (absPdg!=999 && pHypothesis<99) pathLim = m_samplingTool->sampleProcess(mom,isp.charge(),pHypothesis);
+  Trk::PathLimit pathLim(-1., 0);
 
   Trk::GeometrySignature nextGeoID=Trk::Calo;
 
   // first extrapolation to reach the ID boundary
-
   ATH_MSG_DEBUG( "[ fastCaloSim transport ] before calo entrance ");
 
   // get CaloEntrance if not done already
-  if(!m_caloEntrance)
-    {
-      m_caloEntrance = m_extrapolator->trackingGeometry()->trackingVolume(m_caloEntranceName);
-
-      if(!m_caloEntrance)
-        ATH_MSG_WARNING("CaloEntrance not found");
-      else
-        ATH_MSG_DEBUG("CaloEntrance found");
-    }
+  if(!m_caloEntrance){
+    m_caloEntrance = m_extrapolator->trackingGeometry()->trackingVolume(m_caloEntranceName);
+    if(!m_caloEntrance)
+      ATH_MSG_WARNING("CaloEntrance not found");
+    else
+      ATH_MSG_DEBUG("CaloEntrance found");
+  }
 
   ATH_MSG_DEBUG( "[ fastCaloSim transport ] after calo entrance ");
 
   const Trk::TrackParameters* caloEntry = 0;
 
-  if(m_caloEntrance && m_caloEntrance->inside(pos,0.001) && !m_extrapolator->trackingGeometry()->atVolumeBoundary(pos,m_caloEntrance,0.001))
-    {
+  if(m_caloEntrance && m_caloEntrance->inside(pos, 0.001) && !m_extrapolator->trackingGeometry()->atVolumeBoundary(pos,m_caloEntrance, 0.001)){
       std::vector<Trk::HitInfo>* dummyHitVector = 0;
-      if( charge==0 )
-        {
-          caloEntry = m_extrapolator->transportNeutralsWithPathLimit(inputPar,pathLim,timeLim,
-                                                                     Trk::alongMomentum,pHypothesis,dummyHitVector,nextGeoID,m_caloEntrance);
-
-        }
-      else
-        {
-          caloEntry = m_extrapolator->extrapolateWithPathLimit(inputPar,pathLim,timeLim,
-                                                               Trk::alongMomentum,pHypothesis,dummyHitVector,nextGeoID,m_caloEntrance);
-        }
-    }
-  else
-    caloEntry=&inputPar;
-  
-  if(caloEntry==&inputPar) {
-    ATH_MSG_DEBUG("Use clone of inputPar as caloEntry");
-    caloEntry=inputPar.clone();
+      if(charge==0) caloEntry = m_extrapolator->transportNeutralsWithPathLimit(inputPar,pathLim, timeLim, Trk::alongMomentum, pHypothesis, dummyHitVector, nextGeoID, m_caloEntrance);
+      else caloEntry = m_extrapolator->extrapolateWithPathLimit(inputPar, pathLim, timeLim, Trk::alongMomentum, pHypothesis, dummyHitVector, nextGeoID, m_caloEntrance);    
   }
+  else caloEntry=&inputPar;
 
   ATH_MSG_DEBUG( "[ fastCaloSim transport ] after calo caloEntry ");
 
-  if(caloEntry)
-    {
+  if(caloEntry){
       const Trk::TrackParameters* eParameters = 0;
 
       // save Calo entry hit (fallback info)
-      hitVector->push_back(Trk::HitInfo(caloEntry,timeLim.time,nextGeoID,0.));
+      hitVector->push_back(Trk::HitInfo(caloEntry->clone(), timeLim.time, nextGeoID, 0.));
 
       ATH_MSG_DEBUG( "[ fastCaloSim transport ] starting Calo transport from position eta="<<caloEntry->position().eta()<<" phi="<<caloEntry->position().phi()<<" d="<<caloEntry->position().mag() );
-
-      if(charge==0)
-        {
-          eParameters = m_extrapolator->transportNeutralsWithPathLimit(*caloEntry,pathLim,timeLim,
-                                                                       Trk::alongMomentum,pHypothesis,hitVector,nextGeoID);
-        }
-      else
-        {
-          eParameters = m_extrapolator->extrapolateWithPathLimit(*caloEntry,pathLim,timeLim,
-                                                                 Trk::alongMomentum,pHypothesis,hitVector,nextGeoID);
-        }
+      
+      std::vector<Trk::HitInfo>* rawHitVector =  hitVector.get();
+      if(charge == 0) eParameters = m_extrapolator->transportNeutralsWithPathLimit(*caloEntry,pathLim,timeLim, Trk::alongMomentum, pHypothesis, rawHitVector, nextGeoID);
+      else eParameters = m_extrapolator->extrapolateWithPathLimit(*caloEntry, pathLim, timeLim, Trk::alongMomentum, pHypothesis, rawHitVector, nextGeoID);
 
       // save Calo exit hit (fallback info)
-      if(eParameters) hitVector->push_back(Trk::HitInfo(eParameters,timeLim.time,nextGeoID,0.));
-      //delete eParameters;   // HitInfo took ownership
+      if(eParameters) hitVector->push_back(Trk::HitInfo(eParameters, timeLim.time, nextGeoID, 0.));
     } //if caloEntry
 
-  if(msgLvl(MSG::DEBUG))
-    {
-      std::vector<Trk::HitInfo>::iterator it = hitVector->begin();
-      while (it < hitVector->end() )
-        {
-          int sample=(*it).detID;
-          Amg::Vector3D hitPos = (*it).trackParms->position();
-          ATH_MSG_DEBUG(" HIT: layer="<<sample<<" sample="<<sample-3000<<" eta="<<hitPos.eta()<<" phi="<<hitPos.phi()<<" d="<<hitPos.mag());
-          ++it;
-        }
+  //used to identify ID-Calo boundary in tracking tools
+  int IDCaloBoundary = 3000;
+
+  if(msgLvl(MSG::DEBUG)){
+    std::vector<Trk::HitInfo>::iterator it = hitVector->begin();
+    while (it < hitVector->end()){
+        int sample=(*it).detID;
+        Amg::Vector3D hitPos = (*it).trackParms->position();
+        ATH_MSG_DEBUG(" HIT: layer="<<sample<<" sample="<<sample-IDCaloBoundary<<" eta="<<hitPos.eta()<<" phi="<<hitPos.phi()<<" d="<<hitPos.mag());
+        it++;
     }
+  }
 
   std::vector<Trk::HitInfo>::iterator it2 = hitVector->begin();
-  while(it2 < hitVector->end() )
-    {
-      int sample=(*it2).detID;
-      Amg::Vector3D hitPos = (*it2).trackParms->position();
-      ATH_MSG_DEBUG(" HIT: layer="<<sample<<" sample="<<sample-3000<<" eta="<<hitPos.eta()<<" phi="<<hitPos.phi()<<" r="<<hitPos.perp()<<" z="<<hitPos[Amg::z]);
-      ++it2;
-    }
+  while(it2 < hitVector->end()){
+    int sample=(*it2).detID;
+    Amg::Vector3D hitPos = (*it2).trackParms->position();
+    ATH_MSG_DEBUG(" HIT: layer="<<sample<<" sample="<<sample-IDCaloBoundary<<" eta="<<hitPos.eta()<<" phi="<<hitPos.phi()<<" r="<<hitPos.perp()<<" z="<<hitPos[Amg::z]);
+    it2++;
+  }
 
   // Extrapolation may fail for very low pT charged particles. Enforce charge 0 to prevent this 
-  if (not forceNeutral and hitVector->empty())
-    {
+  if (!forceNeutral && hitVector->empty()){
       ATH_MSG_DEBUG("forcing neutral charge in FastCaloSimCaloExtrapolation::caloHits");
       return caloHits(truth, true);
-    }
+  }
   // Don't expect this ever to happen. Nevertheless, error handling should be improved. 
   // This may require changes in periphery (adjustments after setting function type to StatusCode)
   else if(hitVector->empty()) ATH_MSG_ERROR("Empty hitVector even after forcing neutral charge. This may cause a segfault soon.");
 
-
   return hitVector;
 }
 
-//#######################################################################
-void FastCaloSimCaloExtrapolation::extrapolate(TFCSExtrapolationState& result,const TFCSTruthState* truth,std::vector<Trk::HitInfo>* hitVector) const
-{
-  ATH_MSG_DEBUG("Start extrapolate()");
 
-  double ptruth_eta=truth->Eta();
-  double ptruth_phi=truth->Phi();
-  double ptruth_pt =truth->Pt();
-  double ptruth_p  =truth->P();
-  int    pdgid     =truth->pdgid();
+void FastCaloSimCaloExtrapolation::extrapolateToID(TFCSExtrapolationState& result, std::vector<Trk::HitInfo>* hitVector) const{
+
+
+  ATH_MSG_DEBUG("Start extrapolateToID()");
+
+
+  //initialize values
+  result.set_IDCaloBoundary_eta(-999.);
+  result.set_IDCaloBoundary_phi(-999.);
+  result.set_IDCaloBoundary_r(0);
+  result.set_IDCaloBoundary_z(0);
+  result.set_IDCaloBoundary_AngleEta(-999.);
+  result.set_IDCaloBoundary_Angle3D(-999.);
+  
+  //magnitude of extrapolated position
+  double extPosDist = -1;
+
+  for (unsigned int surfID = 0; surfID<3; surfID++){
+
+    double R = m_CaloBoundaryR.at(surfID);
+    double Z = m_CaloBoundaryZ.at(surfID);
+
+    ATH_MSG_DEBUG("[ExtrapolateToID] Extrapolating to ID-Calo boundary with ID="<<surfID<<" R="<<R<<" Z="<<Z);
+
+    //extrapolated position and momentum direction at IDCaloBoundary
+    Amg::Vector3D extPos, momDir;
+    
+    //main extrapolation call
+    if(!extrapolateToCylinder(hitVector, R, Z, extPos, momDir)) continue;
+    
+    double tolerance = 0.001;
+    //test if z inside previous cylinder within some tolerance
+    if(surfID > 0 && std::abs(extPos[Amg::z]) < m_CaloBoundaryZ[surfID-1] - tolerance) continue;
+
+    //test if r inside next cylinder within some tolerance
+    if(surfID < m_CaloBoundaryR.size()-1 && extPos.perp() < m_CaloBoundaryR[surfID + 1] - tolerance) continue;
+
+    if(extPosDist >= 0 && extPos.mag() > extPosDist) continue;
+    
+    extPosDist = extPos.mag();
+
+    result.set_IDCaloBoundary_eta(extPos.eta());
+    result.set_IDCaloBoundary_phi(extPos.phi());
+    result.set_IDCaloBoundary_r(extPos.perp());
+    result.set_IDCaloBoundary_z(extPos[Amg::z]);
+    
+    //compute angle between extrapolated position vector and momentum at IDCaloBoundary
+    //can be used to correct shower shapes for particles which do not originate from {0,0,0}
+    double Angle3D  = Amg::angle(extPos, momDir);
+    double AngleEta = extPos.theta() - momDir.theta();
+    result.set_IDCaloBoundary_AngleEta(AngleEta);
+    result.set_IDCaloBoundary_Angle3D(Angle3D);
+
+  } //end of loop over surfaces
+  
+  if(result.IDCaloBoundary_eta() == -999) ATH_MSG_DEBUG("Failed extrapolation to ID-Calo boundary!");
+
+  ATH_MSG_DEBUG("[ExtrapolateToID] End extrapolateToID()");
+
+} 
+
+void FastCaloSimCaloExtrapolation::extrapolate(TFCSExtrapolationState& result, const TFCSTruthState* truth) const{ 
+
+
+  ATH_MSG_DEBUG("Start FastCaloSimCaloExtrapolation::extrapolate");
+  auto hitVector = caloHits(truth);
+  
+  ATH_MSG_DEBUG("Done FastCaloSimCaloExtrapolation::extrapolate: caloHits");
+
+  ATH_MSG_DEBUG("FastCaloSimCaloExtrapolation::extrapolate:*** Get calo surface ***");
+  getCaloSurface(result, hitVector.get());
+
+  ATH_MSG_DEBUG("FastCaloSimCaloExtrapolation::extrapolate:*** Do extrapolation to ID-calo boundary ***");
+  extrapolateToID(result, hitVector.get());
+ 
+  ATH_MSG_DEBUG("FastCaloSimCaloExtrapolation::extrapolate:*** Do extrapolation ***");
+  extrapolateToLayers(result, hitVector.get());
+
+  ATH_MSG_DEBUG("FastCaloSimCaloExtrapolation::extrapolate: Truth extrapolation done");
+
+  ATH_MSG_DEBUG("Done FastCaloSimCaloExtrapolation::extrapolate");
+
+  //trackParms needs to be manually deleted as ownership is given to FastCaloSimCaloExtrapolation   
+  for(std::vector<Trk::HitInfo>::iterator it = hitVector.get()->begin(); it != hitVector.get()->end(); ++it) {    
+    auto ptr = (*it).trackParms;    
+    if(ptr) delete ptr;   
+  }
+
+}
+
+
+void FastCaloSimCaloExtrapolation::extrapolateToLayers(TFCSExtrapolationState& result, std::vector<Trk::HitInfo>* hitVector) const
+{
+  ATH_MSG_DEBUG("[extrapolateToLayers] Start extrapolate");
 
   //////////////////////////////////////
   // Start calo extrapolation
   //////////////////////////////////////
 
-  std::vector< std::vector<double> > eta_safe(3);
-  std::vector< std::vector<double> > phi_safe(3);
-  std::vector< std::vector<double> > r_safe(3);
-  std::vector< std::vector<double> > z_safe(3);
-  for(int subpos=SUBPOS_MID;subpos<=SUBPOS_EXT;++subpos)
-    {
-      eta_safe[subpos].resize(CaloCell_ID_FCS::MaxSample,-999.0);
-      phi_safe[subpos].resize(CaloCell_ID_FCS::MaxSample,-999.0);
-      r_safe[subpos].resize(CaloCell_ID_FCS::MaxSample,-999.0);
-      z_safe[subpos].resize(CaloCell_ID_FCS::MaxSample,-999.0);
-    }
+  //only continue if inside the calo
+  if(std::abs(result.IDCaloBoundary_eta()) < 6){
+      //now try to extrapolate to all calo layers that contain energy
+      for(int sample=CaloCell_ID_FCS::FirstSample; sample<CaloCell_ID_FCS::MaxSample; ++sample){   
+          for(int subpos=SUBPOS_MID; subpos<=SUBPOS_EXT; ++subpos){ 
+            
+            float cylR, cylZ;
+            if(isCaloBarrel(sample)){
+              cylR = std::abs(rpos(sample, result.CaloSurface_eta(), subpos));
+              //EMB0 - EMB3 use z position of EME1 front end surface for extrapolation
+              //else extrapolate to cylinder with symmetrized maximum Z bounds
+              //set eta to a dummy value of 1000 and -1000 to force detector side
+              if(sample < 4) cylZ = result.CaloSurface_eta() > 0 ? std::abs(zpos(5, 1000, 1)) : std::abs(zpos(5, -1000, 1));
+              else cylZ = 0.5*(std::abs(zpos(sample, 1000, subpos)) + std::abs(zpos(sample, -1000, subpos)));
+            }
+            else{
+              //if we are not at barrel surface, extrapolate to cylinder with maximum R to reduce extrapolation length
+              cylZ = std::abs(zpos(sample, result.CaloSurface_eta(), subpos));
+              //calculate radius of cylinder we will extrapolate to
+              double mineta, maxeta, eta;
+              minmaxeta(sample, result.CaloSurface_eta(), mineta, maxeta);
+              //get eta where we will look up the layer radius
+              eta = result.CaloSurface_eta() > 0 ? mineta : maxeta;
+              //calculate azimuthal angle from pseudorapidity
+              double theta = 2*std::atan(std::exp(-eta));
+              //calculate maximum R of last cell of layer from z and theta
+              cylR = std::abs(cylZ*std::sqrt((1/(std::cos(theta)*std::cos(theta))) - 1));
+            }
 
-  // only continue if inside the calo
-  if( fabs(result.IDCaloBoundary_eta())<6 )
-    {
-      // now try to extrpolate to all calo layers, that contain energy
-      ATH_MSG_DEBUG("Calo position for particle id "<<pdgid<<", trutheta= " << ptruth_eta <<", truthphi= "<<ptruth_phi<<", truthp="<<ptruth_p<<", truthpt="<<ptruth_pt);
-      for(int sample=CaloCell_ID_FCS::FirstSample;sample<CaloCell_ID_FCS::MaxSample;++sample)
-        {
-          for(int subpos=SUBPOS_MID;subpos<=SUBPOS_EXT;++subpos)
-            {
-              if(get_calo_etaphi(result,hitVector,sample,subpos))
-                ATH_MSG_DEBUG( "Result in sample "<<sample<<"."<<subpos<<": eta="<<result.eta(sample,subpos)<<" phi="<<result.phi(sample,subpos)<<" r="<<result.r(sample,subpos)<<" z="<<result.z(sample,subpos)<<" (ok="<<result.OK(sample,subpos)<<")");
-              else
-                ATH_MSG_DEBUG( "Extrapolation to sample "<<sample<<" failed (ok="<<result.OK(sample,subpos)<<")");
-            } //for pos
+            Amg::Vector3D extPos, momDir;
+            if(extrapolateToCylinder(hitVector, cylR, cylZ, extPos, momDir)){
+
+              //scale the extrapolation to fit the radius of the cylinder in the case of barrel and scale extrapolation to fit z component in case of endcap layer
+              //scale is only non-unitary in case we extrapolate to the endcaps of the cylinder for barrel and in case we extrapolate to cover for endcaps
+              //this will keep phi, eta intact and only scale r and z to fit a sensible position on the cylinder
+              double scale = isCaloBarrel(sample) ? cylR / extPos.perp(): cylZ / std::abs(extPos.z());
+              extPos = scale * extPos; 
+
+              result.set_OK(sample, subpos,  true);
+              result.set_phi(sample, subpos, extPos.phi());
+              result.set_z  (sample, subpos, extPos.z());
+              result.set_eta(sample, subpos, extPos.eta());
+              result.set_r  (sample, subpos, extPos.perp());
+            }
+            else{
+              //in case that something goes wrong, use CaloSurface as extrapolation result
+              //not expected to happen
+              result.set_OK (sample, subpos, false);
+              result.set_phi(sample, subpos, result.CaloSurface_phi());
+              result.set_eta(sample, subpos, result.CaloSurface_eta());
+              result.set_z  (sample, subpos, zpos(sample, result.CaloSurface_eta(), subpos));
+              result.set_r  (sample, subpos, rpos(sample, result.CaloSurface_eta(), subpos));
+            }   
+          } //for pos
         } //for sample
     } //inside calo
-  else
-    ATH_MSG_WARNING( "Ups. Not inside calo. result.IDCaloBoundary_eta()="<<result.IDCaloBoundary_eta());
+  
+  else ATH_MSG_WARNING( "[extrapolateToLayers] Ups. Not inside calo. result.IDCaloBoundary_eta()="<<result.IDCaloBoundary_eta());
 
-  ATH_MSG_DEBUG("End extrapolate()");
+  ATH_MSG_DEBUG("[extrapolateToLayers] End extrapolateToLayers()");
 }
 
-void FastCaloSimCaloExtrapolation::extrapolate_to_ID(TFCSExtrapolationState& result,const TFCSTruthState* /*truth*/,std::vector<Trk::HitInfo>* hitVector) const
-{
-  ATH_MSG_DEBUG("Start extrapolate_to_ID()");
+bool FastCaloSimCaloExtrapolation::extrapolateToCylinder(std::vector<Trk::HitInfo> * hitVector, float cylR, float cylZ, Amg::Vector3D& extPos, Amg::Vector3D& momDir) const{
 
-  result.set_IDCaloBoundary_eta(-999.);
-  result.set_IDCaloBoundary_phi(-999.);
-  result.set_IDCaloBoundary_r(0);
-  result.set_IDCaloBoundary_z(0);
-  double result_dist=-1;
-  Amg::Vector3D result_hitpos(0,0,0);
-  Amg::Vector3D result_hitmom(0,0,0);
-  for(unsigned int i=0;i<m_CaloBoundaryR.size();++i) {
-    Amg::Vector3D hitpos;
-    Amg::Vector3D hitmom;
-    if(rz_cylinder_get_calo_etaphi(hitVector,m_CaloBoundaryR[i],m_CaloBoundaryZ[i],hitpos,hitmom)) {
-      // test if z within previous cylinder
-      ATH_MSG_DEBUG("BOUNDARY ID-CALO r="<<m_CaloBoundaryR[i]<<" z="<<m_CaloBoundaryZ[i]<<": eta="<<hitpos.eta()<<" phi="<<hitpos.phi()<<" r="<<hitpos.perp()<<" z="<<hitpos[Amg::z]<<" theta="<<hitpos.theta()<<" ; momentum eta="<<hitmom.eta()<<" phi="<<hitmom.phi()<<" theta="<<hitmom.theta());
-      if(i>0) {
-        if(hitpos[Amg::z]>=0) if(hitpos[Amg::z]< m_CaloBoundaryZ[i-1]) continue; 
-        if(hitpos[Amg::z]<0 ) if(hitpos[Amg::z]>-m_CaloBoundaryZ[i-1]) continue; 
-      }
+  if(hitVector->size() == 1){
+    Amg::Vector3D hitPos = hitVector->at(0).trackParms->position();
+    ATH_MSG_DEBUG("[extrapolateWithPCA(R="<<cylR<<",Z="<<cylZ<<")] Extrapolating single hit position to surface.");
+    extPos = projectOnCylinder(cylR, cylZ, hitPos);
+    momDir = hitVector->at(0).trackParms->momentum();
+    return true;
+  }
+
+  //if we do not find any good intersections, extrapolate to closest point on surface 
+  bool foundHit = extrapolateWithIntersection(hitVector, cylR, cylZ, extPos, momDir) ? true : extrapolateWithPCA(hitVector, cylR, cylZ, extPos, momDir);
+
+  if(foundHit){
+    ATH_MSG_DEBUG("[extrapolateToCylinder(R="<<cylR<<",Z="<<cylZ<<")::END] Extrapolated to cylinder with R="<<cylR<<" and Z="<<cylZ<<" at ("<< extPos[Amg::x]<<","<<extPos[Amg::y]<<","<<extPos[Amg::z]<<")");
+  }
+  else{ 
+    //this is not expected to ever happen
+    ATH_MSG_DEBUG("(R="<<cylR<<", Z="<<cylZ<<"::END) Extrapolation to cylinder surface failed!"); 
+  }
+
+
+  return foundHit;
+
+}
+
+
+bool FastCaloSimCaloExtrapolation::extrapolateWithIntersection(std::vector<Trk::HitInfo> * hitVector, float cylR, float cylZ, Amg::Vector3D& extPos, Amg::Vector3D& momDir) const{
 
-      // test if r within next cylinder
-      if(i<m_CaloBoundaryR.size()-1) if(hitpos.perp()<m_CaloBoundaryR[i+1]) continue;
+  ATH_MSG_DEBUG("[extrapolateWithIntersection(R="<<cylR<<",Z="<<cylZ<<")] Checking for cylinder intersections of line segments.");
+  
+  //counter for number of computed extrapolations, does not count cases of rejected extrapolations due to close by hit positions
+  unsigned int nExtrapolations = 0;
+  for (size_t hitID = 1; hitID < hitVector->size(); hitID++){   
+    //initialize intersection result variables
+    //get current and consecutive hit position and build hitLine
+    Amg::Vector3D hitPos1 = hitVector->at(hitID-1).trackParms->position();
+    Amg::Vector3D hitPos2 = hitVector->at(hitID).trackParms->position();
+    Amg::Vector3D hitDir  = hitPos2 - hitPos1; 
+
+    ATH_MSG_DEBUG("[extrapolateWithIntersection(R="<<cylR<<",Z="<<cylZ<<")] Considering line segment between ("<<hitPos1[Amg::x]<<","<<hitPos1[Amg::y]<<","<<hitPos1[Amg::z]<<") and ("
+                                                                                                         <<hitPos2[Amg::x]<<","<<hitPos2[Amg::y]<<","<<hitPos2[Amg::z]<<")");
+    //get position of the hit positions on the cylinder
+    HITPOSITION cylPosHit1 = whereOnCylinder(cylR, cylZ, hitPos1);    
+    HITPOSITION cylPosHit2 = whereOnCylinder(cylR, cylZ, hitPos2);    
+    
+    //check if one of the hit positions already lays on the cylinder surface    
+    if(cylPosHit1 == ON || cylPosHit2 == ON){   
+      extPos = cylPosHit1 == ON ? hitPos1 : hitPos2;    
+      momDir = cylPosHit1 == ON ? hitVector->at(hitID-1).trackParms->momentum() : hitVector->at(hitID).trackParms->momentum();     
+      ATH_MSG_DEBUG("[extrapolateWithIntersection(R="<<cylR<<",Z="<<cylZ<<")] Hit position already on cylinder surface.");    
+      return true;    
+    }
+
+    //do not try to extrapolate with intersections if the hit position are very close together
+    if(hitDir.norm() < 0.01) continue;
+    
+    //get intersections through cylinder
+    CylinderIntersections intersections = getCylinderIntersections(cylR, cylZ, hitPos1, hitPos2);
+    nExtrapolations++;
+    
+    Amg::Vector3D selectedIntersection(0, 0, 0); 
+
+    //select the best intersection
+    if(intersections.number == 1)      selectedIntersection = intersections.first;
+    else if(intersections.number > 1)  selectedIntersection = whichIntersection(cylR, cylZ, hitPos1, hitPos2, intersections.first, intersections.second) == 0 ? 
+                                                              intersections.first : intersections.second; 
+                                     
+    if(intersections.number > 0){
       
-      // test if previous found cylinder crossing is closer to (0,0,0) than this crossing
-      if(result_dist>=0) {
-        if(hitpos.mag() > result_dist) continue;
-      }
+      bool isForwardExtrapolation = (selectedIntersection[Amg::x] - hitPos1[Amg::x]) /  (hitPos2[Amg::x] -  hitPos1[Amg::x]) >= 0;
+      bool travelThroughSurface = doesTravelThroughSurface(cylR, cylZ, hitPos1, hitPos2);
+      
+      //do not allow for backward extrapolation except in the case of first two (distinguishable) hit positions outside cylinder 
+      //and in the case we detect a travel though the surface
+      if(nExtrapolations > 1 && !isForwardExtrapolation && !travelThroughSurface) continue;
       
-      result.set_IDCaloBoundary_eta(hitpos.eta());
-      result.set_IDCaloBoundary_phi(hitpos.phi());
-      result.set_IDCaloBoundary_r(hitpos.perp());
-      result.set_IDCaloBoundary_z(hitpos[Amg::z]);
-      result_dist=hitpos.mag();
-      result_hitpos=hitpos;
-      result_hitmom=hitmom;
-      ATH_MSG_DEBUG("BOUNDARY ID-CALO r="<<m_CaloBoundaryR[i]<<" z="<<m_CaloBoundaryZ[i]<<" accepted");
+      //check if the intersection between infinite line and cylinder lays on segment spanned by hit positions
+      bool intersectionOnSegment = isOnSegment(selectedIntersection, hitPos1, hitPos2);
+      //check if both hit positions lay outside of the cylinder
+      bool hitPosOutside = cylPosHit1 == OUTSIDE && cylPosHit2 == OUTSIDE;
+      
+      //we found our extrapolated hit position in case that either
+      //we detect that the line segment crosses the surface of the cylinder
+      //the intersection between the infinite lines and the cylinder lays on the line segment
+      //both hit positions are outside of the cylinder and there is a backwards extrapolation for the first two hit positions
+      //if this is not the case for any of the hit position pairs we will use the last two hit position for the linear extrapolation
+      //if these do not have any intersection, then we will pass back to extrapolateWithPCA
+      if(travelThroughSurface || intersectionOnSegment || (hitPosOutside && !isForwardExtrapolation && nExtrapolations == 1) || hitVector->size()-1 == hitID){
+        //take momentum direction of hit position closest to cylinder surface
+        //alternatively one could also take the extrapolated direction normDir = hitPos2 - hitPos1
+        double distHitPos1 = (hitPos1 - projectOnCylinder(cylR, cylZ, hitPos1)).norm(); 
+        double distHitPos2 = (hitPos2 - projectOnCylinder(cylR, cylZ, hitPos2)).norm(); 
+        momDir = distHitPos1 < distHitPos2 ? hitVector->at(hitID-1).trackParms->momentum() : hitVector->at(hitID).trackParms->momentum();
+        extPos = selectedIntersection; 
+        return true;
+      } 
+      ATH_MSG_DEBUG("[extrapolateWithIntersection(R="<<cylR<<",Z="<<cylZ<<")] Extrapolated position at ("<<selectedIntersection[Amg::x]<<","<<selectedIntersection[Amg::y]<<","<<selectedIntersection[Amg::z]<<")");
     }
-  }
-  
-  if(result_dist<0) {
-    ATH_MSG_WARNING("Extrapolation to IDCaloBoundary failed");
-  } else {
-    ATH_MSG_DEBUG("FINAL BOUNDARY ID-CALO  eta="<<result_hitpos.eta()<<" phi="<<result_hitpos.phi()<<" r="<<result_hitpos.perp()<<" z="<<result_hitpos[Amg::z]<<" theta="<<result_hitpos.theta()<<" ; momentum eta="<<result_hitmom.eta()<<" phi="<<result_hitmom.phi()<<" theta="<<result_hitmom.theta());
+  } //end of loop over hit positions
 
-  }
+  return false;
+}
+
+
+bool FastCaloSimCaloExtrapolation::extrapolateWithPCA(std::vector<Trk::HitInfo> * hitVector, float cylR, float cylZ, Amg::Vector3D& extPos, Amg::Vector3D& momDir) const{
+
+  bool foundHit = false;
+  ATH_MSG_DEBUG("[extrapolateWithPCA(R="<<cylR<<",Z="<<cylZ<<")] No forward intersections with cylinder surface. Extrapolating to closest point on surface.");
+
+  //here we also need to consider distances from line segments to the cylinder 
+  double minDistToSurface = 100000;
+  for (size_t hitID = 1; hitID < hitVector->size(); hitID++){   
+   
+    Amg::Vector3D hitPos1 = hitVector->at(hitID-1).trackParms->position();
+    Amg::Vector3D hitPos2 = hitVector->at(hitID).trackParms->position();
+
+    ATH_MSG_DEBUG("[extrapolateWithPCA(R="<<cylR<<",Z="<<cylZ<<")] Considering line segment between ("<<hitPos1[Amg::x]<<","<<hitPos1[Amg::y]<<","<<hitPos1[Amg::z]<<") and ("<<hitPos2[Amg::x]<<","<<hitPos2[Amg::y]<<","<<hitPos2[Amg::z]<<")");
+
+    Amg::Vector3D PCA;
+    //find the point of closest approach (PCA) to the cylinder on the line segment 
+    findPCA(cylR, cylZ, hitPos1, hitPos2, PCA);
+    //compute distance between PCA and cylinder
+    Amg::Vector3D cylinderSurfacePCA = projectOnCylinder(cylR, cylZ, PCA); 
+    double tmpMinDistToSurface = (PCA - cylinderSurfacePCA).norm();
+    
+    ATH_MSG_DEBUG("[extrapolateWithPCA(R="<<cylR<<",Z="<<cylZ<<")] Extrapolated line segment to ("<<cylinderSurfacePCA[Amg::x]<<","<<cylinderSurfacePCA[Amg::y]<<","<<cylinderSurfacePCA[Amg::z]<<") with distance "<<tmpMinDistToSurface);
+    
+    if(tmpMinDistToSurface < minDistToSurface){
+      foundHit = true;
+      extPos = cylinderSurfacePCA;
+      //take momentum direction of hit position closest to cylinder surface
+      //alternatively one could also take the extrapolated direction normDir = hitPos2 - hitPos1
+      double distHitPos1 = (hitPos1 - projectOnCylinder(cylR, cylZ, hitPos1)).norm(); 
+      double distHitPos2 = (hitPos2 - projectOnCylinder(cylR, cylZ, hitPos2)).norm(); 
+      momDir = distHitPos1 < distHitPos2 ? hitVector->at(hitID-1).trackParms->momentum() : hitVector->at(hitID).trackParms->momentum();
+
+      minDistToSurface = tmpMinDistToSurface;
+    }
+  } //end over loop of hit postions
+
+  return foundHit;
+} 
 
-  TVector3 vec(result_hitpos[Amg::x],result_hitpos[Amg::y],result_hitpos[Amg::z]);
 
-  //get the tangentvector on this interaction point:
-  //GlobalMomentum* mom=params_on_surface_ID->TrackParameters::momentum().unit() ;
-  //Trk::GlobalMomentum* trackmom=params_on_surface_ID->Trk::TrackParameters::momentum();
-  if(result_hitmom.mag()>0)
-    {
-      //angle between vec and trackmom:
-      TVector3 Trackmom(result_hitmom[Amg::x],result_hitmom[Amg::y],result_hitmom[Amg::z]);
-      double angle3D=Trackmom.Angle(vec); //isn't this the same as TVector3 vec?
-      ATH_MSG_DEBUG("    3D ANGLE "<<angle3D);
+void FastCaloSimCaloExtrapolation::findPCA(float cylR, float cylZ, Amg::Vector3D& hitPos1, Amg::Vector3D& hitPos2, Amg::Vector3D& PCA) const{
+  //in the following we will try to find the closest point-of-approach (PCA) to the cylinder on the line segment
+  //hit direction
+  Amg::Vector3D hitDir = hitPos2 - hitPos1;
 
-      double angleEta=vec.Theta()-Trackmom.Theta();
-      ATH_MSG_DEBUG("    ANGLE dTHEA"<<angleEta);
+  //project both hit positions onto the cylinder
+  Amg::Vector3D projCylinderHitPos1 = projectOnCylinder(cylR, cylZ, hitPos1);
+  Amg::Vector3D projCylinderHitPos2 = projectOnCylinder(cylR, cylZ, hitPos2);
+  //direction of line spanned by the two projected points on the cylinder surface
+  Amg::Vector3D cylinderProjDir = projCylinderHitPos2 - projCylinderHitPos1;
 
-      result.set_IDCaloBoundary_AngleEta(angleEta);
-      result.set_IDCaloBoundary_Angle3D(angle3D);
+  //CASE A: projections on the cylinder are close enough, take one of the hit positions as PCA 
+  if(cylinderProjDir.norm() < 0.0001) {PCA = hitPos1; return;};   
+
+  //CASE B: we are outside the Z bounds of the cylinder
+  if((hitPos1[Amg::z] > cylZ || hitPos1[Amg::z] < -cylZ) || (hitPos2[Amg::z] > cylZ || hitPos2[Amg::z] < -cylZ)){
+           
+    //calculate PCA to point on endcap
+    Amg::Vector3D cylZEndcap(0, 0, cylZ);
+    bool isParallelToEndcap = std::abs(hitPos1[Amg::z] - hitPos2[Amg::z]) < 0.00001;
+
+    //Check if parallel to endcap plane
+    if(isParallelToEndcap){
+
+      //if both inside there are infinite solutions take one in the middle
+      Amg::Vector3D intersectA, intersectB;
+      intersectA.setZero();
+      intersectB.setZero();
+      int nIntersections = circleLineIntersection2D(cylR, hitPos1, hitPos2, intersectA, intersectB);
+      
+      if(nIntersections == 2){
+        
+        bool IntAOnSegment = isOnSegment(intersectA, hitPos1, hitPos2);
+        bool IntBOnSegment = isOnSegment(intersectB, hitPos1, hitPos2);
+
+        if(IntAOnSegment && IntBOnSegment) PCA = intersectA + 0.5*(intersectB-intersectA);
+        else if(IntAOnSegment) PCA = hitPos1.perp() <= cylR ?  intersectA + 0.5*(hitPos1 - intersectA) : intersectA + 0.5*(hitPos2 - intersectA);
+        else if(IntBOnSegment) PCA = hitPos1.perp() <= cylR ?  intersectB + 0.5*(hitPos1 - intersectB) : intersectB + 0.5*(hitPos2 - intersectB);
+        //intersections are not on line segment, i.e. line segment is within extended cylinder
+        else PCA = hitPos1 + 0.5*hitDir;
+      
+      }
+      else if(!intersectA.isZero() || !intersectB.isZero()){
+        //this can only happen if the extended line is tangetial to the cylinder
+        //if intersection lays on segment PCA will be intersection, if not it will be the corresponding end points
+        Amg::Vector3D intersect = intersectA.isZero() ? intersectB : intersectA;
+        Amg::Vector3D hitPos = (hitPos1 - intersect).norm() < (hitPos2 - intersect).norm() ? hitPos1 : hitPos2;
+        bool IntOnSegment = isOnSegment(intersectA, hitPos1, hitPos2);
+        PCA = IntOnSegment ? intersect : hitPos;
+      
+      }
+      else{
+        //line segment is outside extended cylinder
+        //PCA corresponds to closest distance to center {0, 0, cylZ}
+        Amg::Vector3D infLinePCA = hitPos1 + ((cylZEndcap-hitPos1).dot(hitDir)/hitDir.dot(hitDir))*(hitDir);
+
+        if(isOnSegment(infLinePCA, hitPos1, hitPos2)) PCA = infLinePCA;
+        else PCA = (hitPos1 - infLinePCA).norm() < (hitPos2 - infLinePCA).norm() ? hitPos1 : hitPos2;    
+        
+      }
     }
-  else
-    {
-      result.set_IDCaloBoundary_AngleEta(-999.);
-      result.set_IDCaloBoundary_Angle3D(-999.);
+
+    else{
+
+      //figure out all other cases iteratively beginning with BoundA and BoundB
+      Amg::Vector3D BoundA, BoundB;
+      //this is point on line closest to {0, 0, cylZ}, always on segment
+      double t =  ((cylZEndcap-hitPos1).dot(hitDir)/hitDir.dot(hitDir));
+      BoundA = t <= 0 ? hitPos1 : (t >= 1 ? hitPos2 : hitPos1 + t*hitDir);
+      
+      //calculate intersection point of line segment and endcap plane and project intersection onto cylinder
+      //check if t is between 0 and 1, if not, take hitpos as starting bound
+      t = (cylZ-hitPos1[Amg::z]) / hitDir[Amg::z];
+      BoundB = t <= 0 ? hitPos1 : (t >= 1 ? hitPos2 : hitPos1 + t*hitDir);
+      //looks for the PCA iteratively in cases there is no easy analytical solution
+      getIterativePCA(cylR, cylZ, BoundA, BoundB, PCA);
+      
     }
 
-  ATH_MSG_DEBUG("End extrapolate_to_ID()");
+    return;
+  }
 
-} //extrapolate_to_ID
+  //CASE C: we are inside the Z bounds of the cylinder
+  //construct Z axis as straight line surface
+  Trk::StraightLineSurface line(new Amg::Transform3D(Trk::s_idTransform), 0, cylZ);
+  //compute point of closest approach to z axis
+  //this is analogous to finding the PCA of two 3D lines
+  Trk::Intersection PCACylBounds = line.straightLineIntersection(hitPos1, hitDir.unit(), false, true);
 
-bool FastCaloSimCaloExtrapolation::get_calo_surface(TFCSExtrapolationState& result,std::vector<Trk::HitInfo>* hitVector) const
-{
-  ATH_MSG_DEBUG("Start get_calo_surface()");
+  double distSurfHit1 = (projCylinderHitPos1 - hitPos1).norm();
+  double distSurfHit2 = (projCylinderHitPos2 - hitPos2).norm();
+  
+  //take PCA on line in case it lays on segment, otherwise take closest hit position to surface
+  PCA = isOnSegment(PCACylBounds.position, hitPos1, hitPos2) ? PCACylBounds.position : (distSurfHit1 < distSurfHit2 ? hitPos1 : hitPos2);
+  
+}
 
-  result.set_CaloSurface_sample(CaloCell_ID_FCS::noSample);
-  result.set_CaloSurface_eta(-999);
-  result.set_CaloSurface_phi(-999);
-  result.set_CaloSurface_r(0);
-  result.set_CaloSurface_z(0);
-  double min_calo_surf_dist=1000;
 
-  for(unsigned int i=0;i<m_surfacelist.size();++i)
-    {
+void FastCaloSimCaloExtrapolation::getIterativePCA(float cylR, float cylZ, Amg::Vector3D& BoundA, Amg::Vector3D& BoundB, Amg::Vector3D& PCA) const{
 
-      int sample=m_surfacelist[i];
-      std::vector<Trk::HitInfo>::iterator it = hitVector->begin();
+    ATH_MSG_DEBUG("[getIterativePCA] Finding PCA iteratively.");
+    
+    Amg::Vector3D boundDir = BoundB - BoundA;
+    double distBounds = boundDir.norm();
 
-      while (it != hitVector->end() && it->detID != (3000+sample) )
-        ++it;
-
-      if(it==hitVector->end()) continue;
-
-      Amg::Vector3D hitPos = (*it).trackParms->position();
-
-      //double offset = 0.;
-      double etaCalo = hitPos.eta();
-
-      if(fabs(etaCalo)<900)
-        {
-          double phiCalo = hitPos.phi();
-          double distsamp =deta(sample,etaCalo);
-
-          if(distsamp<min_calo_surf_dist && min_calo_surf_dist>=0)
-            {
-              //hitVector is ordered in r, so if first surface was hit, keep it
-              result.set_CaloSurface_sample(sample);
-              result.set_CaloSurface_eta(etaCalo);
-              result.set_CaloSurface_phi(phiCalo);
-              double rcalo=rent(sample,etaCalo);
-              double zcalo=zent(sample,etaCalo);
-              result.set_CaloSurface_r(rcalo);
-              result.set_CaloSurface_z(zcalo);
-              min_calo_surf_dist=distsamp;
-              msg(MSG::DEBUG)<<" r="<<rcalo<<" z="<<zcalo;
-
-              if(distsamp<0)
-                {
-                  msg(MSG::DEBUG)<<endmsg;
-                  break;
-                }
-            }
-          msg(MSG::DEBUG)<<endmsg;
-        }
-      else
-        msg(MSG::DEBUG)<<": eta > 900, not using this"<<endmsg;
+    //if bounds are close enough together, there is nothing to do.
+    if (distBounds < 0.001){ PCA = BoundA; return;} 
+
+    //this sets the precision of the iterative finding procedure
+    double stepSize = 0.01;
+
+    Amg::Vector3D tmpBoundA, tmpBoundB, tmpOnCylinderBoundA, tmpOnCylinderBoundB;
+    Amg::Vector3D resBoundA, resBoundB, resOnCylinderBoundA, resOnCylinderBoundB;
+    
+    //initial positions on cylinder and distance to line segment
+    Amg::Vector3D OnCylinderBoundA = projectOnCylinder(cylR, cylZ, BoundA);
+    Amg::Vector3D OnCylinderBoundB = projectOnCylinder(cylR, cylZ, BoundB);
+
+    double minDistA = (BoundA - OnCylinderBoundA).norm();
+    double minDistB = (BoundB - OnCylinderBoundB).norm();
+
+    double tmpMinDistA, tmpMinDistB;
+    unsigned int nHalfDivisions = (distBounds/stepSize)/2;
+    
+    for(unsigned int step = 0; step < nHalfDivisions; step++){
+
+      //temporary bounds on line segment
+      tmpBoundA = BoundA + (step+1)*stepSize*(boundDir/distBounds);
+      tmpBoundB = BoundB - (step+1)*stepSize*(boundDir/distBounds);
+
+      //temporary projected bounds on cylinder
+      tmpOnCylinderBoundA = projectOnCylinder(cylR, cylZ, tmpBoundA);
+      tmpOnCylinderBoundB = projectOnCylinder(cylR, cylZ, tmpBoundB);
+      
+      //temporary minimum distance between bound on segment and bound on cylinder
+      tmpMinDistA = (tmpBoundA - tmpOnCylinderBoundA).norm();
+      tmpMinDistB = (tmpBoundB - tmpOnCylinderBoundB).norm();
+      
+      if(minDistA >= tmpMinDistA){
+        minDistA = tmpMinDistA;
+      }
+      else{
+        double t = (step*stepSize)/distBounds;
+        resBoundA = BoundA + t*boundDir;
+        resBoundB = tmpBoundA;
+        break;
+      }
+
+      if(minDistB >= tmpMinDistB){
+        minDistB = tmpMinDistB;
+      }
+      else{
+        double t = (step*stepSize)/distBounds;
+        resBoundB = BoundB - t*boundDir;
+        resBoundA = tmpBoundB;
+        break;
+      }
     }
 
-  if(result.CaloSurface_sample()==CaloCell_ID_FCS::noSample)
-    {
-      // first intersection with sensitive calo layer
-      std::vector<Trk::HitInfo>::iterator it = hitVector->begin();
+    //return middle of best bounds
+    PCA = resBoundA + 0.5*(resBoundB - resBoundA);
 
-      while( it < hitVector->end() && (*it).detID != 3 )
-        ++it;   // to be updated
+}
 
-      if (it==hitVector->end())
-        return false;  // no calo intersection, abort
 
-      Amg::Vector3D surface_hitPos = (*it).trackParms->position();
+int FastCaloSimCaloExtrapolation::circleLineIntersection2D(float circR, Amg::Vector3D& pointA, Amg::Vector3D& pointB, Amg::Vector3D& intersectA, Amg::Vector3D& intersectB) const{
+    //find intersections intA and intB with line spanned by pointA and pointB
+    //returns number of intersections
+    //assumes circle lays in xy plane
 
-      result.set_CaloSurface_eta(surface_hitPos.eta());
-      result.set_CaloSurface_phi(surface_hitPos.phi());
-      result.set_CaloSurface_r(surface_hitPos.perp());
-      result.set_CaloSurface_z(surface_hitPos[Amg::z]);
+    double dx, dy, A, B, C, det, t;
 
-      double pT=(*it).trackParms->momentum().perp();
-      if(TMath::Abs(result.CaloSurface_eta())>4.9 || pT<500 || (TMath::Abs(result.CaloSurface_eta())>4 && pT<1000) )
-        ATH_MSG_DEBUG("only entrance to calo entrance layer found, no surface : eta="<<result.CaloSurface_eta()<<" phi="<<result.CaloSurface_phi()<<" r="<<result.CaloSurface_r()<<" z="<<result.CaloSurface_z()<<" pT="<<pT);
-      else
-        ATH_MSG_WARNING("only entrance to calo entrance layer found, no surface : eta="<<result.CaloSurface_eta()<<" phi="<<result.CaloSurface_phi()<<" r="<<result.CaloSurface_r()<<" z="<<result.CaloSurface_z()<<" pT="<<pT);
-    } //sample
-  else
-    {
-      ATH_MSG_DEBUG("entrance to calo surface : sample="<<result.CaloSurface_sample()<<" eta="<<result.CaloSurface_eta()<<" phi="<<result.CaloSurface_phi()<<" r="<<result.CaloSurface_r()<<" z="<<result.CaloSurface_z()<<" deta="<<min_calo_surf_dist);
+    dx = pointB[Amg::x] - pointA[Amg::x];
+    dy = pointB[Amg::y] - pointA[Amg::y];
+
+    A = dx * dx + dy * dy;
+    B = 2 * (dx * pointA[Amg::x] + dy * pointA[Amg::y]);
+    C = pointA[Amg::x] * pointA[Amg::x] + pointA[Amg::y] * pointA[Amg::y] - circR * circR;
+
+    det = B * B - 4 * A * C;
+    
+    if (A <= 0.0000001 || det < 0){   
+        ATH_MSG_DEBUG("[circleLineIntersection2D] No intersections.");
+        return 0;
+    }
+    else if (std::abs(det) < 0.00001){
+        //one solution, tangential case.
+        t = -B / (2 * A);
+        intersectA = {pointA[Amg::x] + t * dx, pointA[Amg::y] + t * dy, pointA[Amg::z]};
+        ATH_MSG_DEBUG("[circleLineIntersection2D] One intersection at ("<<intersectA[Amg::x]<<","<<intersectA[Amg::y]<<","<<intersectA[Amg::z]<<").");
+        return 1;
+    }
+    else{
+        // two solutions
+        t = (-B + std::sqrt(det)) / (2 * A);
+        intersectA = {pointA[Amg::x] + t * dx, pointA[Amg::y] + t * dy, pointA[Amg::z]};
+        t = (-B - std::sqrt(det)) / (2 * A);
+        intersectB = {pointA[Amg::x] + t * dx, pointA[Amg::y] + t * dy, pointB[Amg::z]};
+        ATH_MSG_DEBUG("[circleLineIntersection2D] Two intersections at ("<<intersectA[Amg::x]<<","<<intersectA[Amg::y]<<","<<intersectA[Amg::z]<<") and at ("<<intersectB[Amg::x]<<","<<intersectB[Amg::y]<<","<<intersectB[Amg::z]<<").");
+        return 2;
     }
 
-  ATH_MSG_DEBUG("End get_calo_surface()");
-  return true;
+
 }
 
-//UPDATED
-bool FastCaloSimCaloExtrapolation::get_calo_etaphi(TFCSExtrapolationState& result,std::vector<Trk::HitInfo>* hitVector, int sample,int subpos) const
-{
 
-  result.set_OK(sample,subpos,false);
-  result.set_eta(sample,subpos,result.CaloSurface_eta());
-  result.set_phi(sample,subpos,result.CaloSurface_phi());
-  result.set_r(sample,subpos,rpos(sample,result.CaloSurface_eta(),subpos));
-  result.set_z(sample,subpos,zpos(sample,result.CaloSurface_eta(),subpos));
-
-  double distsamp =deta(sample,result.CaloSurface_eta());
-  double lrzpos =rzpos(sample,result.CaloSurface_eta(),subpos);
-  double hitdist=0;
-  bool best_found=false;
-  double best_target=0;
-
-  std::vector<Trk::HitInfo>::iterator it = hitVector->begin();
-
-  while( it!= hitVector->end() && it->detID != (3000+sample) )
-    ++it;
-
-  //while ((*it).detID != (3000+sample) && it < hitVector->end() )  it++;
-
-  if(it!=hitVector->end())
-    {
-
-      Amg::Vector3D hitPos1 = (*it).trackParms->position();
-      int sid1=(*it).detID;
-      int sid2=-1;
-      Amg::Vector3D hitPos;
-      Amg::Vector3D hitPos2;
-
-      std::vector<Trk::HitInfo>::iterator itnext = it;
-      ++itnext;
-      if(itnext!=hitVector->end())
-        {
-          hitPos2 = (*itnext).trackParms->position();
-          sid2=(*itnext).detID;
-          double eta_avg=0.5*(hitPos1.eta()+hitPos2.eta());
-          double t;
-
-          if(isCaloBarrel(sample))
-            {
-              double r=rpos(sample,eta_avg,subpos);
-              double r1=hitPos1.perp();
-              double r2=hitPos2.perp();
-              t=(r-r1)/(r2-r1);
-              best_target=r;
-            }
-          else
-            {
-              double z=zpos(sample,eta_avg,subpos);
-              double z1=hitPos1[Amg::z];
-              double z2=hitPos2[Amg::z];
-              t=(z-z1)/(z2-z1);
-              best_target=z;
-            }
-          hitPos=t*hitPos2+(1-t)*hitPos1;
+Amg::Vector3D FastCaloSimCaloExtrapolation::projectOnCylinder(float cylR, float cylZ, Amg::Vector3D& hitPos) const {
+        
+  Amg::Vector3D closestPointOnCylinder;
+  Amg::Vector3D cylAxis(0, 0, cylZ);
+
+  //positive side
+  if(hitPos[Amg::z] >= cylZ){
+    //project hit position on x-y plane at positive side
+    Amg::Vector3D projHitPos(hitPos[Amg::x], hitPos[Amg::y], cylZ);
+    
+    //if r of hit position outside cylinder, closest hit is always on edge  
+    if(hitPos.perp() > cylR) closestPointOnCylinder = cylAxis + cylR * (projHitPos - cylAxis).unit();
+    else closestPointOnCylinder = cylAxis + hitPos.perp() * (projHitPos - cylAxis).unit();
+
+  } 
+  //negative side
+  else if (hitPos[Amg::z] <= -cylZ){
+    //project hit position on x-y plane at negative side
+    Amg::Vector3D projHitPos(hitPos[Amg::x], hitPos[Amg::y], -cylZ);
+    
+    if(hitPos.perp() > cylR) closestPointOnCylinder = -cylAxis + cylR * (projHitPos + cylAxis).unit();
+    else closestPointOnCylinder = -cylAxis + hitPos.perp() * (projHitPos + cylAxis).unit();
+
+  }
+  else{
+    Amg::Vector3D hitPosZ(0, 0, hitPos[Amg::z]);
+    closestPointOnCylinder = hitPosZ + cylR * (hitPos - hitPosZ).unit(); 
+  }
+  
+  return closestPointOnCylinder;
+
+}
+
 
-        }
-      else
-        {
-          hitPos=hitPos1;
-          hitPos2=hitPos1;
-        }
-
-      double etaCalo = hitPos.eta();
-      double phiCalo = hitPos.phi();
-      result.set_OK(sample,subpos,true);
-      result.set_eta(sample,subpos,etaCalo);
-      result.set_phi(sample,subpos,phiCalo);
-      result.set_r(sample,subpos,hitPos.perp());
-      result.set_z(sample,subpos,hitPos[Amg::z]);
-      hitdist=hitPos.mag();
-      lrzpos=rzpos(sample,etaCalo,subpos);
-      distsamp=deta(sample,etaCalo);
-      best_found=true;
-
-      ATH_MSG_DEBUG("extrapol with layer hit for sample="<<sample<<" : id="<<sid1<<" -> "<<sid2<<" target r/z="<<best_target<<" r1="<<hitPos1.perp()<<" z1="<<hitPos1[Amg::z]<<
-                    " r2="<<hitPos2.perp()<<" z2="<<hitPos2[Amg::z]<<" result.r="<<result.r(sample,subpos)<<" result.z="<<result.z(sample,subpos));
 
+CylinderIntersections FastCaloSimCaloExtrapolation::getCylinderIntersections(float cylR, float cylZ, Amg::Vector3D& hitPos1, Amg::Vector3D& hitPos2) const{
+  //calculates intersection of infinite line with cylinder --> can have 0 or 2 intersections
+  CylinderIntersections intersections;
+
+  //look for intersections with the cover of the cylinder
+  unsigned int nCoverIntersections = cylinderLineIntersection(cylR, cylZ, hitPos1, hitPos2, intersections.first, intersections.second);
+  if(nCoverIntersections == 2){
+    ATH_MSG_DEBUG("[getCylinderIntersections(R="<<cylR<<",Z="<<cylZ<<")] Found two cylinder intersections through cylinder cover.");
+    intersections.number = 2;
+    return intersections;
+  }
+  else if (nCoverIntersections == 1){
+    
+    Amg::Vector3D positiveEndcapIntersection, negativeEndcapIntersection;
+    bool IsPositiveEndcapIntersection = cylinderEndcapIntersection(cylR, cylZ, true, hitPos1, hitPos2, positiveEndcapIntersection);
+    bool IsNegativeEndcapIntersection = cylinderEndcapIntersection(cylR, cylZ, false, hitPos1, hitPos2, negativeEndcapIntersection);
+
+    if(IsPositiveEndcapIntersection && IsNegativeEndcapIntersection){
+      //if we have a cover intersection we only expect one additional endcap intersection
+      //both endcap intersections can be valid in case the intersection is at the edge of the cylinder cover and endcap
+      //in that case take the endcap intersection which is further away from the cylinder cover intersection to prevent taking the same intersection twice
+      ATH_MSG_DEBUG("[getCylinderIntersections(R="<<cylR<<",Z="<<cylZ<<")] Found intersection through cylinder cover and both endcaps. Intersection seems to be at edge of cover and endcap.");
+      intersections.second = (positiveEndcapIntersection - intersections.first).norm() > (negativeEndcapIntersection - intersections.first).norm() ? positiveEndcapIntersection : negativeEndcapIntersection;
+      intersections.number = 2;
+    }
+    else if(IsPositiveEndcapIntersection) {
+      ATH_MSG_DEBUG("[getCylinderIntersections(R="<<cylR<<",Z="<<cylZ<<")] Found intersection through cylinder cover and positive endcap.");
+      intersections.second = positiveEndcapIntersection;
+      intersections.number = 2;
+    }
+    else if(IsNegativeEndcapIntersection) {
+      ATH_MSG_DEBUG("[getCylinderIntersections(R="<<cylR<<",Z="<<cylZ<<")] Found intersection through cylinder cover and negative endcap.");
+      intersections.second = negativeEndcapIntersection;
+      intersections.number = 2;
+    }
+    else{
+      //line is tangential to cylinder cover
+      ATH_MSG_DEBUG("[getCylinderIntersections(R="<<cylR<<",Z="<<cylZ<<")] Found single intersection through cylinder cover.");
+      intersections.number = 1;
     }
 
-  if(!best_found)
-    {
-      it = hitVector->begin();
-      double best_dist=0.5;
-      bool best_inside=false;
-      int best_id1,best_id2;
-      Amg::Vector3D best_hitPos=(*it).trackParms->position();
-      while (it < hitVector->end()-1 )
-        {
-          Amg::Vector3D hitPos1 = (*it).trackParms->position();
-          int sid1=(*it).detID;
-          ++it;
-          Amg::Vector3D hitPos2 = (*it).trackParms->position();
-          int sid2=(*it).detID;
-          double eta_avg=0.5*(hitPos1.eta()+hitPos2.eta());
-          double t;
-          double tmp_target=0;
-          if(isCaloBarrel(sample))
-            {
-              double r=rpos(sample,eta_avg,subpos);
-              double r1=hitPos1.perp();
-              double r2=hitPos2.perp();
-              t=(r-r1)/(r2-r1);
-              tmp_target=r;
-            }
-          else
-            {
-              double z=zpos(sample,eta_avg,subpos);
-              double z1=hitPos1[Amg::z];
-              double z2=hitPos2[Amg::z];
-              t=(z-z1)/(z2-z1);
-              tmp_target=z;
-            }
-          Amg::Vector3D hitPos=t*hitPos2+(1-t)*hitPos1;
-          double dist=TMath::Min(TMath::Abs(t-0),TMath::Abs(t-1));
-          bool inside=false;
-          if(t>=0 && t<=1) inside=true;
-          if(!best_found || inside)
-            {
-              if(!best_inside || dist<best_dist)
-                {
-                  best_dist=dist;
-                  best_hitPos=hitPos;
-                  best_inside=inside;
-                  best_found=true;
-                  best_id1=sid1;
-                  best_id2=sid2;
-                  best_target=tmp_target;
-                }
-            }
-          else
-            {
-              if(!best_inside && dist<best_dist)
-                {
-                  best_dist=dist;
-                  best_hitPos=hitPos;
-                  best_inside=inside;
-                  best_found=true;
-                  best_id1=sid1;
-                  best_id2=sid2;
-                  best_target=tmp_target;
-                }
-            }
-          ATH_MSG_DEBUG("extrapol without layer hit for sample="<<sample<<" : id="<<sid1<<" -> "<<sid2<<" dist="<<dist<<" mindist="<<best_dist<<
-                        " t="<<t<<" best_inside="<<best_inside<<" target r/z="<<tmp_target<<
-                        " r1="<<hitPos1.perp()<<" z1="<<hitPos1[Amg::z]<<" r2="<<hitPos2.perp()<<" z2="<<hitPos2[Amg::z]<<
-                        " re="<<hitPos.perp()<<" ze="<<hitPos[Amg::z]<<
-                        " rb="<<best_hitPos.perp()<<" zb="<<best_hitPos[Amg::z]);
-          if(best_found)
-            {
-              double etaCalo = best_hitPos.eta();
-              result.set_OK(sample,subpos,true);
-              result.set_eta(sample,subpos,etaCalo);
-              result.set_phi(sample,subpos,best_hitPos.phi());
-              result.set_r(sample,subpos,best_hitPos.perp());
-              result.set_z(sample,subpos,best_hitPos[Amg::z]);
-              hitdist=best_hitPos.mag();
-              lrzpos=rzpos(sample,etaCalo,subpos);
-              distsamp=deta(sample,etaCalo);
-            }
-        } //while hit vector
-
-      if(best_found)
-        {
-          ATH_MSG_DEBUG("extrapol without layer hit: id="<<best_id1<<" -> "<<best_id2<<" mindist="<<best_dist<<
-                        " best_inside="<<best_inside<<" target r/z="<<best_target<<
-                        " rb="<<best_hitPos.perp()<<" zb="<<best_hitPos[Amg::z] );
-        }
+  }
+  else{
+    //no cylinder cover intersections 
+    Amg::Vector3D positiveEndcapIntersection, negativeEndcapIntersection;
+    bool IsPositiveEndcapIntersection = cylinderEndcapIntersection(cylR, cylZ, true, hitPos1, hitPos2, positiveEndcapIntersection);
+    bool IsNegativeEndcapIntersection = cylinderEndcapIntersection(cylR, cylZ, false, hitPos1, hitPos2, negativeEndcapIntersection);
+
+    if(IsPositiveEndcapIntersection && IsNegativeEndcapIntersection){
+      ATH_MSG_DEBUG("[getCylinderIntersections(R="<<cylR<<",Z="<<cylZ<<")] Found intersections through both endcaps.");
+      intersections.first = positiveEndcapIntersection;
+      intersections.second = negativeEndcapIntersection;
+      intersections.number = 2;
+    }
+    else if(IsPositiveEndcapIntersection) {
+      //dont expect this to ever happen
+      ATH_MSG_DEBUG("[getCylinderIntersections(R="<<cylR<<",Z="<<cylZ<<")] Found single intersection through positive endcap. This should not happen.");
+      intersections.first = positiveEndcapIntersection;
+      intersections.number = 1;
+    }
+    else if(IsNegativeEndcapIntersection) {
+      //dont expect this to ever happen
+      ATH_MSG_DEBUG("[getCylinderIntersections(R="<<cylR<<",Z="<<cylZ<<")] Found single intersection through negative endcap. This should not happen.");
+      intersections.first = negativeEndcapIntersection;
+      intersections.number = 1;
     }
+    else{
+      ATH_MSG_DEBUG("[getCylinderIntersections(R="<<cylR<<",Z="<<cylZ<<")] Found no cylinder intersections.");
+      //no intersections at all
+      intersections.number = 0;
 
-  if(isCaloBarrel(sample))
-    lrzpos*=cosh(result.eta(sample,subpos));
-  else
-    lrzpos= fabs(lrzpos/tanh(result.eta(sample,subpos)));
+    }
+  }
 
-  result.set_d(sample,subpos,lrzpos);
-  result.set_detaBorder(sample,subpos,distsamp);
+  return intersections;
 
-  ATH_MSG_DEBUG("Final TTC result for sample "<<sample<<" subpos="<<subpos<<" OK() "<<result.OK(sample,subpos)<<" eta="<<result.eta(sample,subpos)<<" phi="<<result.phi(sample,subpos)<<" dCalo="<<result.d(sample,subpos)<<" dist(hit)="<<hitdist);
 
-  return result.OK(sample,subpos);
 }
 
-//UPDATED
-bool FastCaloSimCaloExtrapolation::rz_cylinder_get_calo_etaphi(std::vector<Trk::HitInfo>* hitVector, double cylR, double cylZ, Amg::Vector3D& pos, Amg::Vector3D& mom) const
-{
 
-  bool best_found=false;
-  double best_dist=10000;
-  bool best_inside=false;
-  int best_id1,best_id2;
-
-  std::vector<Trk::HitInfo>::iterator it = hitVector->begin();
-  Amg::Vector3D best_hitPos=(*it).trackParms->position();
-  for(int rz=0;rz<=1;++rz) {
-    it = hitVector->begin();
-    while (it < hitVector->end()-1 ) {
-      Amg::Vector3D hitPos1 = (*it).trackParms->position();
-      Amg::Vector3D hitMom1 = (*it).trackParms->momentum();
-      int sid1=(*it).detID;
-      ++it;
-      Amg::Vector3D hitPos2 = (*it).trackParms->position();
-      Amg::Vector3D hitMom2 = (*it).trackParms->momentum();
-      int sid2=(*it).detID;
-
-      double t;
-      if(rz==1) {
-        double r=cylR;
-        double r1=hitPos1.perp();
-        double r2=hitPos2.perp();
-        t=(r-r1)/(r2-r1);
-      } else {
-        double z1=hitPos1[Amg::z];
-        double z2=hitPos2[Amg::z];
-        double z;
-        if(z1<0) z=-cylZ;
-         else z=cylZ;
-        t=(z-z1)/(z2-z1);
-      }
-      Amg::Vector3D hitPos=t*hitPos2+(1-t)*hitPos1;
+//calculates the intersection between the line defined by pointA and pointB and the cylinder cover definded by cylR and cylZ
+int FastCaloSimCaloExtrapolation::cylinderLineIntersection(float cylR, float cylZ, Amg::Vector3D& pointA, Amg::Vector3D& pointB, Amg::Vector3D& intersectA, Amg::Vector3D& intersectB) const{
+
+  //projections of points spanning the line onto the xy plane
+  Amg::Vector3D projPointA(pointA[Amg::x], pointA[Amg::y], 0);
+  Amg::Vector3D projPointB(pointB[Amg::x], pointB[Amg::y], 0);
+  Amg::Vector3D projDiff = projPointA - projPointB;
+
+  //calculate distance from (0,0,0) to line spanned by projPointA and projPointB
+  double t = (projPointA.dot(projDiff))/(projDiff).dot(projDiff);
+  double d = std::sqrt(projPointA.dot(projPointA) - t*t*(projDiff).dot(projDiff));
+
+  //if distance larger than cylinder radius then there are no intersection and we are done
+  if(d > cylR) return 0;
+
+  double k = std::sqrt((cylR*cylR - d*d)/(projDiff.dot(projDiff)));
+
+  intersectA = pointA + (t+k)*(pointB - pointA);
+  intersectB = pointA + (t-k)*(pointB - pointA);
+
+  //check if intersection is outside z bounds
+  bool IntAisValid = (intersectA[Amg::z] <= cylZ && intersectA[Amg::z] >= -cylZ);
+  bool IntBisValid = (intersectB[Amg::z] <= cylZ && intersectB[Amg::z] >= -cylZ);
+
+
+  if(IntAisValid && IntBisValid) return 2;
+  else if(IntAisValid) return 1;
+  else if(IntBisValid){
+    intersectA = intersectB;
+    return 1;
+  }
+
+
+  return 0;
+
+}
+
+
+bool FastCaloSimCaloExtrapolation::cylinderEndcapIntersection(float cylR, float cylZ, bool positiveEndcap, Amg::Vector3D& pointA, Amg::Vector3D& pointB, Amg::Vector3D& intersection) const{
+
+  //normal and point on endcap defines the plane
+  Amg::Vector3D pointOnEndcap;
+  Amg::Vector3D normal(0, 0, 1);
+  positiveEndcap ? pointOnEndcap = {0, 0, cylZ} : pointOnEndcap = {0, 0, -cylZ};
+  Amg::Vector3D hitDir = (pointB - pointA);
+
+  double denom = normal.dot(hitDir);
+  if (std::abs(denom) > 1e-6) { 
+    double t = normal.dot(pointOnEndcap - pointB)/denom;
+    //compute intersection regardless of direction (t>0 or t<0) 
+    intersection = pointB + t*hitDir;
+    Amg::Vector3D v = intersection - pointOnEndcap; 
+
+    //check if intersection is within cylR bounds 
+    return std::sqrt(v.dot(v)) <= cylR;
 
-      double dist=hitPos.mag();
-      bool inside=false;
-      
-      const float down_frac=-0.001;
-      const float up_frac=1.001;
-      if(t>=down_frac && t<=up_frac) {
-        if(hitPos.perp()<=cylR*up_frac && fabs(hitPos[Amg::z])<=cylZ*up_frac) inside=true;
-      }  
-
-      if(!best_found || inside) {
-        if(!best_inside || dist<best_dist) {
-          best_dist=dist;
-          best_hitPos=hitPos;
-          best_inside=inside;
-          best_found=true;
-          best_id1=sid1;
-          best_id2=sid2;
-          mom=t*hitMom2+(1-t)*hitMom1;
-        }
-      } else {
-        if(!best_inside && dist<best_dist) {
-          best_dist=dist;
-          best_hitPos=hitPos;
-          best_inside=inside;
-          best_found=true;
-          best_id1=sid1;
-          best_id2=sid2;
-          mom=t*hitMom2+(1-t)*hitMom1;
-        }
-      }
-      ATH_MSG_DEBUG(" extrapol without layer hit to r="<<cylR<<" z=+-"<<cylZ<<" : id="<<sid1<<" -> "<<sid2<<" dist="<<dist<<" bestdist="<<best_dist<<
-                    " t="<<t<<" inside="<<inside<<" best_inside="<<best_inside<<
-                    " r1="<<hitPos1.perp()<<" z1="<<hitPos1[Amg::z]<<" r2="<<hitPos2.perp()<<" z2="<<hitPos2[Amg::z]<<
-                    " re="<<hitPos.perp()<<" ze="<<hitPos[Amg::z]<<
-                    " rb="<<best_hitPos.perp()<<" zb="<<best_hitPos[Amg::z]
-                    );
-    }
   }
 
-  if(best_found) {
-    ATH_MSG_DEBUG(" extrapol to r="<<cylR<<" z="<<cylZ<<": id="<<best_id1<<" -> "<<best_id2<<" dist="<<best_dist<<
-                  " best_inside="<<best_inside<<
-                  " rb="<<best_hitPos.perp()<<" zb="<<best_hitPos[Amg::z]
-                  );
+  return false;
+
   }
-  pos=best_hitPos;
 
+int FastCaloSimCaloExtrapolation::whichIntersection(float cylR, float cylZ, Amg::Vector3D& hitPos1, Amg::Vector3D& hitPos2, Amg::Vector3D& intersectionA, Amg::Vector3D intersectionB) const{
+ 
+  //check if the hit positions are outside or inside the cylinder surface
+  HITPOSITION cylPosHit1 = whereOnCylinder(cylR, cylZ, hitPos1);
+  HITPOSITION cylPosHit2 = whereOnCylinder(cylR, cylZ, hitPos2);
+  
+  if((cylPosHit1 == INSIDE) ^ (cylPosHit2 == INSIDE)){
+    /* CASE A: one hit position inside and one outside of the cylinder (travel through surface), 
+    one intersection is on cylinder, take intersection closest to line segment */
+    ATH_MSG_DEBUG("[whichIntersection] Travel through surface.");
+    return getPointLineSegmentDistance(intersectionA, hitPos1, hitPos2) > getPointLineSegmentDistance(intersectionB, hitPos1, hitPos2);
+  }
+  else if(cylPosHit1 == INSIDE && cylPosHit2 == INSIDE){
+    /* CASE B: both hit position inside, take intersection which points towards travel direction of particle */
+    Amg::Vector3D directionA = intersectionA - hitPos2;
+    Amg::Vector3D directionB = intersectionB - hitPos2;
+    Amg::Vector3D hitDir = hitPos2 - hitPos1;
+    ATH_MSG_DEBUG("[whichIntersection] Both hit positions inside.");
+    return directionA.dot(hitDir) < directionB.dot(hitDir);
+  }
+  else{
+    // /* CASE C: both hit position outside and the intersections lay on the segment, take intersection closest to second hit position */
+    // /* CASE D: both hit positions are outside and the intersections are not on the line segment, take intersection closest to one of the hit positions */
+    double distHitPosIntersectA = (hitPos2 - intersectionA).norm();
+    double distHitPosIntersectB = (hitPos2 - intersectionB).norm();
+    ATH_MSG_DEBUG("[whichIntersection] Both hit positions outside.");
+    return distHitPosIntersectA > distHitPosIntersectB;
+  }
+} 
+
+double FastCaloSimCaloExtrapolation::getPointLineSegmentDistance(Amg::Vector3D& point, Amg::Vector3D& hitPos1, Amg::Vector3D& hitPos2) const{
+
+  Amg::Vector3D hitDir = hitPos2 - hitPos1;
+  Amg::Vector3D w = point - hitPos1;
+
+  double c1 = w.dot(hitDir);
+  if(c1 <= 0) return Amg::distance(point, hitPos1);
+  double c2 = hitDir.dot(hitDir);
+  if(c2 <= c1) return Amg::distance(point, hitPos2);
+  double t = c1/c2;
+  Amg::Vector3D vec = hitPos1 + t*hitDir;
+  return Amg::distance(point, vec);
 
-  return best_found;
 }
 
+enum FastCaloSimCaloExtrapolation::HITPOSITION FastCaloSimCaloExtrapolation::whereOnCylinder(float cylR, float cylZ, Amg::Vector3D& hitPos) const{
+  //set a 1mm tolerance within which the hit position is considered to be on the cylinder surface
+  //setting this higher can lead to extrapolation failures around truth particle eta ~4
+  float tolerance = 1;
+
+  bool isOnEndcap = hitPos.perp() <= cylR + tolerance && (hitPos[Amg::z] > 0 ? std::abs(hitPos[Amg::z] - cylZ) < tolerance : std::abs(hitPos[Amg::z] + cylZ) < tolerance);
+  bool isOnCover  = std::abs(hitPos.perp() - cylR) < tolerance && hitPos[Amg::z] < cylZ && hitPos[Amg::z] > -cylZ;
+  
+  //check if hit position is on endcap or cover of cylinder
+  if(isOnEndcap || isOnCover) return HITPOSITION::ON;
+  
+  //check if hit position is inside cover
+  if(hitPos[Amg::z] < cylZ && hitPos[Amg::z] > -cylZ && hitPos.perp() < cylR) return HITPOSITION::INSIDE;
+  
+  return HITPOSITION::OUTSIDE;
+}
+
+bool FastCaloSimCaloExtrapolation::doesTravelThroughSurface(float cylR, float cylZ, Amg::Vector3D& hitPos1, Amg::Vector3D& hitPos2) const{
+  //travel through surface in case one hit position is outside and the other outside of cylinder surface
+  return (whereOnCylinder(cylR, cylZ, hitPos1) == INSIDE) ^ (whereOnCylinder(cylR, cylZ, hitPos2) == INSIDE);
+}
+
+bool FastCaloSimCaloExtrapolation::isOnSegment(Amg::Vector3D& point, Amg::Vector3D& hitPos1, Amg::Vector3D& hitPos2) const{
+  return getPointLineSegmentDistance(point, hitPos1, hitPos2) < 0.001;
+}
 
 bool FastCaloSimCaloExtrapolation::isCaloBarrel(int sample) const
 {
   return GetCaloGeometry()->isCaloBarrel(sample);
 }
 
-double FastCaloSimCaloExtrapolation::deta(int sample,double eta) const
+double FastCaloSimCaloExtrapolation::deta(int sample, double eta) const
 {
-  return GetCaloGeometry()->deta(sample,eta);
+  return GetCaloGeometry()->deta(sample, eta);
 }
 
-void FastCaloSimCaloExtrapolation::minmaxeta(int sample,double eta,double& mineta,double& maxeta) const
+void FastCaloSimCaloExtrapolation::minmaxeta(int sample, double eta, double& mineta, double& maxeta) const
 {
-  GetCaloGeometry()->minmaxeta(sample,eta,mineta,maxeta);
+  GetCaloGeometry()->minmaxeta(sample, eta, mineta, maxeta);
 }
 
-double FastCaloSimCaloExtrapolation::rmid(int sample,double eta) const
+double FastCaloSimCaloExtrapolation::rmid(int sample, double eta) const
 {
-  return GetCaloGeometry()->rmid(sample,eta);
+  return GetCaloGeometry()->rmid(sample, eta);
 }
 
-double FastCaloSimCaloExtrapolation::zmid(int sample,double eta) const
+double FastCaloSimCaloExtrapolation::zmid(int sample, double eta) const
 {
-  return GetCaloGeometry()->zmid(sample,eta);
+  return GetCaloGeometry()->zmid(sample, eta);
 }
 
-double FastCaloSimCaloExtrapolation::rzmid(int sample,double eta) const
+double FastCaloSimCaloExtrapolation::rzmid(int sample, double eta) const
 {
-  return GetCaloGeometry()->rzmid(sample,eta);
+  return GetCaloGeometry()->rzmid(sample, eta);
 }
 
-double FastCaloSimCaloExtrapolation::rent(int sample,double eta) const
+double FastCaloSimCaloExtrapolation::rent(int sample, double eta) const
 {
-  return GetCaloGeometry()->rent(sample,eta);
+  return GetCaloGeometry()->rent(sample, eta);
 }
 
-double FastCaloSimCaloExtrapolation::zent(int sample,double eta) const
+double FastCaloSimCaloExtrapolation::zent(int sample, double eta) const
 {
-  return GetCaloGeometry()->zent(sample,eta);
+  return GetCaloGeometry()->zent(sample, eta);
 }
 
-double FastCaloSimCaloExtrapolation::rzent(int sample,double eta) const
+double FastCaloSimCaloExtrapolation::rzent(int sample, double eta) const
 {
-  return GetCaloGeometry()->rzent(sample,eta);
+  return GetCaloGeometry()->rzent(sample, eta);
 }
 
-double FastCaloSimCaloExtrapolation::rext(int sample,double eta) const
+double FastCaloSimCaloExtrapolation::rext(int sample, double eta) const
 {
-  return GetCaloGeometry()->rext(sample,eta);
+  return GetCaloGeometry()->rext(sample, eta);
 }
 
-double FastCaloSimCaloExtrapolation::zext(int sample,double eta) const
+double FastCaloSimCaloExtrapolation::zext(int sample, double eta) const
 {
-  return GetCaloGeometry()->zext(sample,eta);
+  return GetCaloGeometry()->zext(sample, eta);
 }
 
-double FastCaloSimCaloExtrapolation::rzext(int sample,double eta) const
+double FastCaloSimCaloExtrapolation::rzext(int sample, double eta) const
 {
-  return GetCaloGeometry()->rzext(sample,eta);
+  return GetCaloGeometry()->rzext(sample, eta);
 }
 
-double FastCaloSimCaloExtrapolation::rpos(int sample,double eta,int subpos) const
+double FastCaloSimCaloExtrapolation::rpos(int sample, double eta, int subpos) const
 {
-  return GetCaloGeometry()->rpos(sample,eta,subpos);
+  return GetCaloGeometry()->rpos(sample, eta, subpos);
 }
 
-double FastCaloSimCaloExtrapolation::zpos(int sample,double eta,int subpos) const
+double FastCaloSimCaloExtrapolation::zpos(int sample, double eta, int subpos) const
 {
-  return GetCaloGeometry()->zpos(sample,eta,subpos);
+  return GetCaloGeometry()->zpos(sample, eta, subpos);
 }
 
-double FastCaloSimCaloExtrapolation::rzpos(int sample,double eta,int subpos) const
+double FastCaloSimCaloExtrapolation::rzpos(int sample, double eta, int subpos) const
 {
-  return GetCaloGeometry()->rzpos(sample,eta,subpos);
+  return GetCaloGeometry()->rzpos(sample, eta, subpos);
 }
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/FastCaloSimCaloExtrapolation.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/FastCaloSimCaloExtrapolation.h
index 43ce44e0e8a2..3f884aca152b 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/FastCaloSimCaloExtrapolation.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/FastCaloSimCaloExtrapolation.h
@@ -1,96 +1,148 @@
 /*
-  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 FastCaloSimCaloExtrapolation_H
 #define FastCaloSimCaloExtrapolation_H
 
-// Athena includes
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "GaudiKernel/ToolHandle.h"
+#include "ISF_FastCaloSimParametrization/IFastCaloSimCaloExtrapolation.h"
+#include "ISF_FastCaloSimEvent/TFCSExtrapolationState.h"
+
+#include "TrkExInterfaces/ITimedExtrapolator.h"
+#include "TrkEventPrimitives/PdgToParticleHypothesis.h"
 
-#include <vector>
+class IFastCaloSimGeometryHelper;
+class ITimedExtrapolator;
+class TFCSTruthState;
 
 namespace Trk
 {
   class TrackingVolume;
 }
 
-#include "TrkExInterfaces/ITimedExtrapolator.h"
-#include "TrkEventPrimitives/PdgToParticleHypothesis.h"
-
 namespace HepPDT
 {
   class ParticleDataTable;
 }
 
-#include "ISF_FastCaloSimParametrization/IFastCaloSimCaloExtrapolation.h"
-#include "ISF_FastCaloSimEvent/FastCaloSim_CaloCell_ID.h"
-#include "ISF_FastCaloSimEvent/TFCSExtrapolationState.h"
 
-#include "ISF_FastCaloSimParametrization/IFastCaloSimGeometryHelper.h"
+struct CylinderIntersections
+{
+  Amg::Vector3D first;
+  Amg::Vector3D second;
+  unsigned int number;
+
+};
 
 
-class FastCaloSimCaloExtrapolation:public AthAlgTool, virtual public IFastCaloSimCaloExtrapolation
+class FastCaloSimCaloExtrapolation: public AthAlgTool, virtual public IFastCaloSimCaloExtrapolation
 {
 
 public:
-  FastCaloSimCaloExtrapolation( const std::string& t, const std::string& n, const IInterface* p );
+  
+  FastCaloSimCaloExtrapolation(const std::string& t, const std::string& n, const IInterface* p);
   ~FastCaloSimCaloExtrapolation();
 
   virtual StatusCode initialize() override final;
   virtual StatusCode finalize() override final;
 
-  enum SUBPOS { SUBPOS_MID = TFCSExtrapolationState::SUBPOS_MID, SUBPOS_ENT = TFCSExtrapolationState::SUBPOS_ENT, SUBPOS_EXT = TFCSExtrapolationState::SUBPOS_EXT}; //MID=middle, ENT=entrance, EXT=exit of cal layer
+  enum SUBPOS { 
+    SUBPOS_MID = TFCSExtrapolationState::SUBPOS_MID, //MID=middle of calo layer
+    SUBPOS_ENT = TFCSExtrapolationState::SUBPOS_ENT, //ENT=entrance of calo layer
+    SUBPOS_EXT = TFCSExtrapolationState::SUBPOS_EXT  //EXT=exit of calo layer
+  }; 
+
+  enum HITPOSITION{
+    INSIDE,  //hit position is inside cylinder bounds
+    OUTSIDE, //hit position is outside cylinder bounds
+    ON       //hit position is on cylinder bounds
+  };
 
   virtual void extrapolate(TFCSExtrapolationState& result,const TFCSTruthState* truth) const override final;
 
 protected:
+  
   const IFastCaloSimGeometryHelper* GetCaloGeometry() const {return &(*m_CaloGeometryHelper);};
 
-  // extrapolation through Calo
-  std::vector<Trk::HitInfo>* caloHits(const TFCSTruthState* truth, bool forceNeutral=false) const;
-  void extrapolate(TFCSExtrapolationState& result,const TFCSTruthState* truth,std::vector<Trk::HitInfo>* hitVector) const;
-  void extrapolate_to_ID(TFCSExtrapolationState& result,const TFCSTruthState* truth,std::vector<Trk::HitInfo>* hitVector) const;
-  bool get_calo_etaphi(TFCSExtrapolationState& result,std::vector<Trk::HitInfo>* hitVector,int sample,int subpos=SUBPOS_MID) const;
-  bool get_calo_surface(TFCSExtrapolationState& result,std::vector<Trk::HitInfo>* hitVector) const;
-  bool rz_cylinder_get_calo_etaphi(std::vector<Trk::HitInfo>* hitVector, double cylR, double cylZ, Amg::Vector3D& pos, Amg::Vector3D& mom) const;
-
+  ///Returns vector of hits used for the extrapolation
+  std::unique_ptr<std::vector<Trk::HitInfo>> caloHits(const TFCSTruthState* truth, bool forceNeutral = false) const;
+  
+  /*Main extrapolation methods*/
+
+  bool getCaloSurface(TFCSExtrapolationState& result, std::vector<Trk::HitInfo>* hitVector) const;
+  ///Finds best extrapolation extPos from the hitVector for a cylinder defined by radius cylR and half-length cylZ as well as corresponding momentum direction 
+  bool extrapolateToCylinder(std::vector<Trk::HitInfo>* hitVector, float cylR, float cylZ, Amg::Vector3D& extPos, Amg::Vector3D& momDir) const;
+  ///Extrapolates to ID using three uniquely defined cylinder surfaces
+  void extrapolateToID(TFCSExtrapolationState& result, std::vector<Trk::HitInfo>* hitVector) const;
+  ///Extrapolates to all other layers of the calorimeter
+  void extrapolateToLayers(TFCSExtrapolationState& result, std::vector<Trk::HitInfo>* hitVector) const;
+  
+  /*Extrapolator helper methods*/
+
+  ///Finds Point of Closest Approach (PCA) on the cylinder defined by radius cylR and half-length cylZ of a line segment spanned by two hit positions to a cylinder 
+  void findPCA(float cylR, float cylZ, Amg::Vector3D& hitPos1, Amg::Vector3D& hitPos2, Amg::Vector3D& PCA) const;
+  ///Computes the distance between a point and the line segment spanned by hitPos1 and hitPos2
+  double getPointLineSegmentDistance(Amg::Vector3D& point, Amg::Vector3D& hitPos1, Amg::Vector3D& hitPos2) const;
+  ///Finds PCA iteratively given two bounds A and B on a line segment, used for (rare) cases with no easy analytical solutions
+  void getIterativePCA(float cylR, float cylZ, Amg::Vector3D& BoundA, Amg::Vector3D& BoundB, Amg::Vector3D& PCA) const;
+  ///Returns true if point lies on the line segment spanned by hitPos1 and hitPos2, otherwise returns false
+  bool isOnSegment(Amg::Vector3D& point, Amg::Vector3D& hitPos1, Amg::Vector3D& hitPos2) const;
+  ///Computes intersection between the (infinite) line spanned by pointA and pointB with the positive (negative) endcap of a cylinder, returns true if intersection is found
+  bool cylinderEndcapIntersection(float cylR, float cylZ, bool positiveEndcap, Amg::Vector3D& pointA, Amg::Vector3D& pointB, Amg::Vector3D& intersection) const;
+  /*!Extrapolates position on cylinder by finding intersections of subsequent hit positions, intersection is considered if we detect a travel through the surface with
+   the line segment or we find a forward intersection (in the travel direction of the particle) which lies on the line segment, returns false if no such postion is found*/
+  bool extrapolateWithIntersection(std::vector<Trk::HitInfo> * hitVector, float cylR, float cylZ, Amg::Vector3D& extPos, Amg::Vector3D& momDir) const;
+  ///Extrapolates to the cylinder using the PCA to the polygon spanned by the individual line segments from the hitVector
+  bool extrapolateWithPCA(std::vector<Trk::HitInfo> * hitVector, float cylR, float cylZ, Amg::Vector3D& extPos, Amg::Vector3D& momDir) const;
+  ///Returns true if the line segment spanned by hitPos1 and hitPos2 crosses the cylinder surface, false otherwise
+  bool doesTravelThroughSurface(float cylR, float cylZ, Amg::Vector3D& hitPos1, Amg::Vector3D& hitPos2) const;
+  ///Returns ID of more sensible intersection between line segment spanned by hitPos1 and hitPos2 and cylinder
+  int whichIntersection(float cylR, float cylZ, Amg::Vector3D& hitPos1, Amg::Vector3D& hitPos2, Amg::Vector3D& intersectionA, Amg::Vector3D intersectionB) const;
+  ///Analytically computes 2D intersections between circle of radius circR and (infinite) line spanned by pointA nad pointB
+  int circleLineIntersection2D(float circR, Amg::Vector3D& pointA, Amg::Vector3D& pointB, Amg::Vector3D& intersectA, Amg::Vector3D& intersectB) const;
+  ///Analytically computes the intersection between the (infinite) line defined by pointA and pointB and the cylinder cover (without endcaps)
+  int cylinderLineIntersection(float cylR, float cylZ, Amg::Vector3D& pointA, Amg::Vector3D& pointB, Amg::Vector3D& intersectA, Amg::Vector3D& intersectB) const;
+  ///Checks if position of hitPos is inside, outside or on the cylinder bounds
+  enum HITPOSITION whereOnCylinder(float cylR, float cylZ, Amg::Vector3D& hitPos) const;
+  ///Projects position hitPos onto the cylinder surface and returns projected position
+  Amg::Vector3D projectOnCylinder(float cylR, float cylZ, Amg::Vector3D& hitPos) const;
+  ///Analytically computes the intersection between the (infinite) line spanned by hitPos1 and hitPos2 with a cylinder
+  CylinderIntersections getCylinderIntersections(float cylR, float cylZ, Amg::Vector3D& hitPos1, Amg::Vector3D& hitPos2) const;
+
+  //helper methods for calo geometry
+  void   minmaxeta(int sample, double eta, double& mineta, double& maxeta) const;
   bool   isCaloBarrel(int sample) const;
-  double deta(int sample,double eta) const;
-  void   minmaxeta(int sample,double eta,double& mineta,double& maxeta) const;
-  double rzmid(int sample,double eta) const;
-  double rzent(int sample,double eta) const;
-  double rzext(int sample,double eta) const;
-  double rmid(int sample,double eta) const;
-  double rent(int sample,double eta) const;
-  double rext(int sample,double eta) const;
-  double zmid(int sample,double eta) const;
-  double zent(int sample,double eta) const;
-  double zext(int sample,double eta) const;
-  double rpos(int sample,double eta,int subpos = CaloSubPos::SUBPOS_MID) const;
-  double zpos(int sample,double eta,int subpos = CaloSubPos::SUBPOS_MID) const;
-  double rzpos(int sample,double eta,int subpos = CaloSubPos::SUBPOS_MID) const;
+  double deta (int sample, double eta) const;
+  double rzmid(int sample, double eta) const;
+  double rzent(int sample, double eta) const;
+  double rzext(int sample, double eta) const;
+  double rmid (int sample, double eta) const;
+  double rent (int sample, double eta) const;
+  double rext (int sample, double eta) const;
+  double zmid (int sample, double eta) const;
+  double zent (int sample, double eta) const;
+  double zext (int sample, double eta) const;
+  double rpos (int sample, double eta, int subpos = CaloSubPos::SUBPOS_MID) const;
+  double zpos (int sample, double eta, int subpos = CaloSubPos::SUBPOS_MID) const;
+  double rzpos(int sample, double eta, int subpos = CaloSubPos::SUBPOS_MID) const;
 
   HepPDT::ParticleDataTable*     m_particleDataTable{nullptr};
 
-  //Define ID-CALO surface to be used for AFII 
-  //TODO: this should eventually extrapolate to a uniquly defined surface!
-  std::vector<double> m_CaloBoundaryR{1148.0,120.0,41.0};
-  std::vector<double> m_CaloBoundaryZ{3550.0,4587.0,4587.0};
+  //uniquely defined ID-Calo surfaces
+  std::vector<float> m_CaloBoundaryR{1148.0,120.0,41.0};
+  std::vector<float> m_CaloBoundaryZ{3550.0,4587.0,4587.0};
   double m_calomargin{100};
 
-  std::vector< int > m_surfacelist;
+  std::vector<int> m_surfacelist;
 
-  // The new Extrapolator setup
-  ToolHandle<Trk::ITimedExtrapolator> m_extrapolator;
-  mutable const Trk::TrackingVolume*  m_caloEntrance{nullptr};
-  std::string                         m_caloEntranceName{""};
+  ToolHandle<Trk::ITimedExtrapolator>    m_extrapolator;
+  mutable const Trk::TrackingVolume*     m_caloEntrance{nullptr};
+  std::string                            m_caloEntranceName{""};
 
-  Trk::PdgToParticleHypothesis        m_pdgToParticleHypothesis;
+  Trk::PdgToParticleHypothesis           m_pdgToParticleHypothesis;
 
-  // The FastCaloSimGeometryHelper tool
   ToolHandle<IFastCaloSimGeometryHelper> m_CaloGeometryHelper;
+
 };
 
 #endif // FastCaloSimCaloExtrapolation_H
-- 
GitLab


From 09dc79b545cdf72e1b76fcc63b7d8007effa381b Mon Sep 17 00:00:00 2001
From: Tim Martin <Tim.Martin@cern.ch>
Date: Thu, 8 Oct 2020 19:42:53 +0200
Subject: [PATCH 368/403] Avoid python clash

---
 Trigger/TrigCost/TrigCostAnalysis/CMakeLists.txt                | 2 +-
 .../share/{TrigCostAnalysis.py => RunTrigCostAnalysis.py}       | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename Trigger/TrigCost/TrigCostAnalysis/share/{TrigCostAnalysis.py => RunTrigCostAnalysis.py} (100%)

diff --git a/Trigger/TrigCost/TrigCostAnalysis/CMakeLists.txt b/Trigger/TrigCost/TrigCostAnalysis/CMakeLists.txt
index 6b9b7a8e7d2a..72339d0aa2bb 100644
--- a/Trigger/TrigCost/TrigCostAnalysis/CMakeLists.txt
+++ b/Trigger/TrigCost/TrigCostAnalysis/CMakeLists.txt
@@ -24,4 +24,4 @@ atlas_add_executable( trigCostHistToCSV
                       LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools AthenaBaseComps TrigCostAnalysisLib )
 
 atlas_install_joboptions( share/TrigCostAnalysis_JobOptions.py )
-atlas_install_scripts( share/TrigCostAnalysis.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
+atlas_install_scripts( share/RunTrigCostAnalysis.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/Trigger/TrigCost/TrigCostAnalysis/share/TrigCostAnalysis.py b/Trigger/TrigCost/TrigCostAnalysis/share/RunTrigCostAnalysis.py
similarity index 100%
rename from Trigger/TrigCost/TrigCostAnalysis/share/TrigCostAnalysis.py
rename to Trigger/TrigCost/TrigCostAnalysis/share/RunTrigCostAnalysis.py
-- 
GitLab


From 110d92b244c18e2357febadd98bbfab4e561bd36 Mon Sep 17 00:00:00 2001
From: Peter Onyisi <ponyisi@utexas.edu>
Date: Thu, 8 Oct 2020 17:52:50 +0000
Subject: [PATCH 369/403] Add CSC and MM new-style monitoring

---
 .../MuonDQAMonitoring/python/MuonDQAMonitoringConfig.py     | 6 ++++++
 .../MMRawDataMonitoring/python/MMMonitorAlgorithm.py        | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonDQAMonitoring/python/MuonDQAMonitoringConfig.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonDQAMonitoring/python/MuonDQAMonitoringConfig.py
index 631bb29d22ae..c8fd82611938 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonDQAMonitoring/python/MuonDQAMonitoringConfig.py
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonDQAMonitoring/python/MuonDQAMonitoringConfig.py
@@ -16,6 +16,12 @@ def MuonDQAMonitoringConfig(flags):
             result.merge(MdtMonitoringConfig(flags))
             result.merge(RpcMonitoringConfig(flags))
             result.merge(TgcRawDataMonitoringConfig(flags))
+            if flags.Detector.GeometryCSC:
+                from CscRawDataMonitoring.CscMonitorAlgorithm import CscMonitoringConfig
+                result.merge(CscMonitoringConfig(flags))
+            if flags.Detector.GeometryMM:
+                from MMRawDataMonitoring.MMMonitorAlgorithm import MMMonitoringConfig
+                result.merge(MMMonitoringConfig(flags))
 
     if flags.DQ.Steering.Muon.doTrackMon:
         # do not run in RAW->ESD
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MMRawDataMonitoring/python/MMMonitorAlgorithm.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MMRawDataMonitoring/python/MMMonitorAlgorithm.py
index b85f5ff7b974..3d2c55248381 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MMRawDataMonitoring/python/MMMonitorAlgorithm.py
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MMRawDataMonitoring/python/MMMonitorAlgorithm.py
@@ -4,7 +4,7 @@
 #
 
 from AthenaConfiguration.ComponentFactory import CompFactory
-from MMMonUtils import getMMLabel,getMMLabelY
+from .MMMonUtils import getMMLabel,getMMLabelY
 
 def MMMonitoringConfig(inputFlags):
     '''Function to configures some algorithms in the monitoring system.'''
-- 
GitLab


From 80627b89cc72fc12789fc162d610b97d69ee24af Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Thu, 8 Oct 2020 23:05:54 +0200
Subject: [PATCH 370/403] use the common tracking navigator from the Tracking
 common

---
 .../egammaRec/python/EMCommonRefitter.py       | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/Reconstruction/egamma/egammaRec/python/EMCommonRefitter.py b/Reconstruction/egamma/egammaRec/python/EMCommonRefitter.py
index 340d2986ad9a..a1621e15ebd3 100644
--- a/Reconstruction/egamma/egammaRec/python/EMCommonRefitter.py
+++ b/Reconstruction/egamma/egammaRec/python/EMCommonRefitter.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 __future__ import print_function
 from InDetRecExample import TrackingCommon as TrackingCommon
@@ -7,6 +7,8 @@ print("EMCommonRefitter.py")
 
 
 def getGSFTrackFitter():
+
+    # setup Rot and error scaling
     egRotCreator = TrackingCommon.getInDetRotCreator(
         name='egRotCreator',
         private=True)
@@ -15,23 +17,19 @@ def getGSFTrackFitter():
         TrackingCommon.getRIO_OnTrackErrorScalingCondAlg,
         'RIO_OnTrackErrorScalingCondAlg')
 
-    # get Rk propagator
+    # setup Rk propagator
     from TrkExRungeKuttaPropagator.TrkExRungeKuttaPropagatorConf import (
         Trk__RungeKuttaPropagator as Propagator)
 
     egTrkPropagator = Propagator(name='egTrkPropagator')
     egTrkPropagator.AccuracyParameter = 0.0001
 
-    # Setup the Navigator (default)
-    from TrkDetDescrSvc.AtlasTrackingGeometrySvc import (
-        AtlasTrackingGeometrySvc)
-
-    from TrkExTools.TrkExToolsConf import Trk__Navigator
-    egTrkNavigator = Trk__Navigator(
+    # setup Navigator
+    egTrkNavigator = TrackingCommon.getInDetNavigator(
         name='egTrkNavigator',
-        TrackingGeometrySvc=AtlasTrackingGeometrySvc)
+        private=True)
 
-    # Set up the GSF
+    # setup the GSF
     from TrkGaussianSumFilter.TrkGaussianSumFilterConf import (
         Trk__GsfMaterialMixtureConvolution)
 
-- 
GitLab


From b4ae6ae2c6dfbae65198d8e9960fc7b1db97836b Mon Sep 17 00:00:00 2001
From: Will Leight <wleight@cern.ch>
Date: Thu, 8 Oct 2020 23:18:20 +0200
Subject: [PATCH 371/403] Fix for ATLASRECTS-5687

This just restores the default method for dealing with a muon in the case that no cluster is built because no energy deposits are collected, namely setting the etcone values to 0.
---
 .../IsolationTool/Root/CaloIsolationTool.cxx  | 116 ++++++++++--------
 1 file changed, 68 insertions(+), 48 deletions(-)

diff --git a/Reconstruction/RecoTools/IsolationTool/Root/CaloIsolationTool.cxx b/Reconstruction/RecoTools/IsolationTool/Root/CaloIsolationTool.cxx
index af610bb51f00..591ec931f527 100644
--- a/Reconstruction/RecoTools/IsolationTool/Root/CaloIsolationTool.cxx
+++ b/Reconstruction/RecoTools/IsolationTool/Root/CaloIsolationTool.cxx
@@ -155,7 +155,7 @@ namespace xAOD {
 
     // muon etcone isolation
     const Muon* muon = dynamic_cast<const Muon*>(&particle);
-    if(muon) return caloCellIsolation(result,*muon,cones,corrlist,coneCoreSize, derefMap);
+    if(muon) return caloCellIsolation(result,*muon,cones,corrlist,coneCoreSize,derefMap);
 
     // egamma etcone isolation
     const Egamma* egam = dynamic_cast<const Egamma*>(ip);
@@ -719,62 +719,82 @@ namespace xAOD {
       conesf.push_back(cone);
       if(cone>maxConeSize) maxConeSize = cone;
     }
-
-    const xAOD::CaloCluster* muonCluster=*muon.clusterLink();
-    if(!muonCluster){//have to figure this part out
-      ATH_MSG_WARNING("muon has no cluster, cannot calculate etcone isolation");
-      return false;
-    }
     /// add coreCone if asked -- make sure it's the last one! or a better
     const double coreConeDR = coneCoreSize;
     bool doCoreCone = (!m_saveOnlyRequestedCorrections || result.corrlist.calobitset.test(static_cast<unsigned int>(Iso::coreCone)));
     if(doCoreCone && maxConeSize<coreConeDR) maxConeSize = coreConeDR;
-    /// start the calculation
-    ATH_MSG_DEBUG("calculating etcone for # " << conesf.size() << " cones");
-    Trk::CaloCellSelectorLayerdR selector(maxConeSize);
-    selector.preSelectAction(*muonCluster);
-    ATH_MSG_DEBUG("looping over cells " << muonCluster->size());
-    for(unsigned int i=0; i<conesf.size(); i++){
-      double totE = 0.;
-      selector.setConeSize(conesf[i]);
-      xAOD::CaloCluster::const_cell_iterator cell_itr=muonCluster->begin();
-      for(; cell_itr!=muonCluster->end(); ++cell_itr){
-        if( !selector.select(**cell_itr) ) continue;
-        if (m_ExcludeTG3 && CaloCell_ID::TileGap3 == (*cell_itr)->caloDDE()->getSampling()) continue;
-        totE += (*cell_itr)->et();
+
+    if(!muon.clusterLink().isValid()){
+      ATH_MSG_DEBUG("no valid cluster link");
+      //no cluster, set everything to 0
+      for(unsigned int i=0; i<conesf.size(); i++) result.etcones[i] = 0;
+      if(doCoreCone){
+	ATH_MSG_DEBUG("starting etcone, coreCone");
+	double totE = 0.;
+	std::map<Iso::IsolationCorrectionParameter,float> corecorr;
+	corecorr[Iso::coreEnergy] = totE;
+	corecorr[Iso::coreArea]   = coreConeDR*coreConeDR*M_PI;
+	result.coreCorrections[Iso::coreCone] = corecorr;
+	ATH_MSG_DEBUG("done etcone, coreCone");
+	/// apply the correction if required.                                                                                                                                                           
+	if(result.corrlist.calobitset.test(static_cast<unsigned int>(Iso::coreCone))){
+	  double ecore = totE;
+	  ATH_MSG_DEBUG("Applying coreCone correction for trackParticle etcone isolation.");
+	  for( unsigned int i=0;i<result.etcones.size();++i ) {
+	    result.etcones[i] -= ecore;
+	    ATH_MSG_DEBUG("i: " << i << " cone [before] " << result.etcones[i]+ecore << " cone [after] " << result.etcones[i]);
+	  }
+	}
       }
-      result.etcones[i] = totE;
-      ATH_MSG_DEBUG("etcone raw: coneSize = " << conesf[i] << "; etcone = " << result.etcones[i]);
     }
-    ATH_MSG_DEBUG("done looping over cells ");
-    /// do coreCone
-    if(doCoreCone){
-      ATH_MSG_DEBUG("starting etcone, coreCone");
-      double totE = 0.;
-      selector.setConeSize(coreConeDR);
-      xAOD::CaloCluster::const_cell_iterator cell_itr=muonCluster->begin();
-      for(; cell_itr!=muonCluster->end(); ++cell_itr){
-        if( !selector.select(**cell_itr) ) continue;
-        if (m_ExcludeTG3 && CaloCell_ID::TileGap3 == (*cell_itr)->caloDDE()->getSampling()) continue;
-        totE += (*cell_itr)->et();
+    else{
+      const xAOD::CaloCluster* muonCluster=*muon.clusterLink();
+      /// start the calculation
+      ATH_MSG_DEBUG("calculating etcone for # " << conesf.size() << " cones");
+      Trk::CaloCellSelectorLayerdR selector(maxConeSize);
+      selector.preSelectAction(*muonCluster);
+      ATH_MSG_DEBUG("looping over cells " << muonCluster->size());
+      for(unsigned int i=0; i<conesf.size(); i++){
+	double totE = 0.;
+	selector.setConeSize(conesf[i]);
+	xAOD::CaloCluster::const_cell_iterator cell_itr=muonCluster->begin();
+	for(; cell_itr!=muonCluster->end(); ++cell_itr){
+	  if( !selector.select(**cell_itr) ) continue;
+	  if (m_ExcludeTG3 && CaloCell_ID::TileGap3 == (*cell_itr)->caloDDE()->getSampling()) continue;
+	  totE += (*cell_itr)->et();
+	}
+	result.etcones[i] = totE;
+	ATH_MSG_DEBUG("etcone raw: coneSize = " << conesf[i] << "; etcone = " << result.etcones[i]);
       }
-      std::map<Iso::IsolationCorrectionParameter,float> corecorr;
-      corecorr[Iso::coreEnergy] = totE;
-      corecorr[Iso::coreArea]   = coreConeDR*coreConeDR*M_PI;
-      result.coreCorrections[Iso::coreCone] = corecorr;
-      ATH_MSG_DEBUG("done etcone, coreCone");
-
-      /// apply the correction if required.
-      if(result.corrlist.calobitset.test(static_cast<unsigned int>(Iso::coreCone))){
-        double ecore = totE;
-        ATH_MSG_DEBUG("Applying coreCone correction for trackParticle etcone isolation.");
-        for( unsigned int i=0;i<result.etcones.size();++i ) {
-          result.etcones[i] -= ecore;
-          ATH_MSG_DEBUG("i: " << i << " cone [before] " << result.etcones[i]+ecore << " cone [after] " << result.etcones[i]);
-        }
+      ATH_MSG_DEBUG("done looping over cells ");
+      /// do coreCone
+      if(doCoreCone){
+	ATH_MSG_DEBUG("starting etcone, coreCone");
+	double totE = 0.;
+	selector.setConeSize(coreConeDR);
+	xAOD::CaloCluster::const_cell_iterator cell_itr=muonCluster->begin();
+	for(; cell_itr!=muonCluster->end(); ++cell_itr){
+	  if( !selector.select(**cell_itr) ) continue;
+	  if (m_ExcludeTG3 && CaloCell_ID::TileGap3 == (*cell_itr)->caloDDE()->getSampling()) continue;
+	  totE += (*cell_itr)->et();
+	}
+	std::map<Iso::IsolationCorrectionParameter,float> corecorr;
+	corecorr[Iso::coreEnergy] = totE;
+	corecorr[Iso::coreArea]   = coreConeDR*coreConeDR*M_PI;
+	result.coreCorrections[Iso::coreCone] = corecorr;
+	ATH_MSG_DEBUG("done etcone, coreCone");
+	
+	/// apply the correction if required.
+	if(result.corrlist.calobitset.test(static_cast<unsigned int>(Iso::coreCone))){
+	  double ecore = totE;
+	  ATH_MSG_DEBUG("Applying coreCone correction for trackParticle etcone isolation.");
+	  for( unsigned int i=0;i<result.etcones.size();++i ) {
+	    result.etcones[i] -= ecore;
+	    ATH_MSG_DEBUG("i: " << i << " cone [before] " << result.etcones[i]+ecore << " cone [after] " << result.etcones[i]);
+	  }
+	}
       }
     }
-
     // calculate etcore
     if(!m_saveOnlyRequestedCorrections ||
        result.corrlist.calobitset.test(static_cast<unsigned int>(Iso::coreMuon))){
-- 
GitLab


From 5ff45f390cc75303f84b4116f32b553196f97878 Mon Sep 17 00:00:00 2001
From: Frank Berghaus <frank.berghaus@cern.ch>
Date: Thu, 8 Oct 2020 22:17:37 +0000
Subject: [PATCH 372/403] Style update for FileMetaData C++ sources

Enforce concistent style for source files defining the three
FileMetaData conversion tools.
---
 Event/xAOD/xAODMetaDataCnv/CMakeLists.txt     |  53 +--
 .../xAODMetaDataCnv/Root/FileMetaDataTool.cxx | 111 ++---
 .../FileMetaDataCreatorTool_jobOptions.py     |  54 ++-
 .../src/FileMetaDataCreatorTool.cxx           | 399 +++++++++---------
 .../src/FileMetaDataCreatorTool.h             |  72 ++--
 .../src/FileMetaDataMarkUpTool.cxx            | 180 ++++----
 .../src/FileMetaDataMarkUpTool.h              |  88 ++--
 .../xAODMetaDataCnv/FileMetaDataTool.h        |  72 ++--
 .../xAODMetaDataCnv/xAODMetaDataCnvAthena.h   |   3 +-
 .../xAODMetaDataCnv/xAODMetaDataCnvDict.h     |   3 +-
 10 files changed, 529 insertions(+), 506 deletions(-)

diff --git a/Event/xAOD/xAODMetaDataCnv/CMakeLists.txt b/Event/xAOD/xAODMetaDataCnv/CMakeLists.txt
index b9cdc1b30925..480b16fc6a00 100644
--- a/Event/xAOD/xAODMetaDataCnv/CMakeLists.txt
+++ b/Event/xAOD/xAODMetaDataCnv/CMakeLists.txt
@@ -8,43 +8,46 @@ atlas_subdir( xAODMetaDataCnv )
 
 # Extra dependencies, based on the environment that we're in:
 if( NOT XAOD_STANDALONE )
-   set( extra_deps
-      GaudiKernel
-      PRIVATE
-      Control/AthenaKernel
-      Database/AthenaPOOL/AthenaPoolUtilities
-      Event/EventInfo )
+  set(
+    extra_deps
+    GaudiKernel
+    PRIVATE
+    Control/AthenaKernel
+    Database/AthenaPOOL/AthenaPoolUtilities
+    Event/EventInfo
+  )
 endif()
 
 # Declare the package's dependencies:
 atlas_depends_on_subdirs(
-   PUBLIC
-   Control/AthToolSupport/AsgTools
-   Event/xAOD/xAODMetaData
-   ${extra_deps} )
+  PUBLIC
+  Control/AthToolSupport/AsgTools
+  Event/xAOD/xAODMetaData
+  ${extra_deps}
+)
 
 # Build the package differently in standalone and Athena modes:
 if( XAOD_STANDALONE )
 
-   # The main library is an installed one in this case:
-   atlas_add_library( xAODMetaDataCnv
-      xAODMetaDataCnv/*.h Root/*.cxx
-      PUBLIC_HEADERS xAODMetaDataCnv
-      LINK_LIBRARIES AsgTools xAODMetaData )
+  # The main library is an installed one in this case:
+  atlas_add_library( xAODMetaDataCnv
+    xAODMetaDataCnv/*.h Root/*.cxx
+    PUBLIC_HEADERS xAODMetaDataCnv
+    LINK_LIBRARIES AsgTools xAODMetaData )
 
-   # Plus we also build a dictionary:
-   atlas_add_dictionary( xAODMetaDataCnvDict
-      xAODMetaDataCnv/xAODMetaDataCnvDict.h
-      xAODMetaDataCnv/selection.xml
-      LINK_LIBRARIES xAODMetaDataCnv )
+  # Plus we also build a dictionary:
+  atlas_add_dictionary( xAODMetaDataCnvDict
+    xAODMetaDataCnv/xAODMetaDataCnvDict.h
+    xAODMetaDataCnv/selection.xml
+    LINK_LIBRARIES xAODMetaDataCnv )
 
 else()
 
-   # The main library is a component one in this case:
-   atlas_add_component( xAODMetaDataCnv
-      xAODMetaDataCnv/*.h src/*.cxx Root/*.cxx src/components/*.cxx
-      LINK_LIBRARIES AsgTools xAODMetaData GaudiKernel AthenaKernel
-      AthenaPoolUtilities EventInfo )
+  # The main library is a component one in this case:
+  atlas_add_component( xAODMetaDataCnv
+    xAODMetaDataCnv/*.h src/*.cxx Root/*.cxx src/components/*.cxx
+    LINK_LIBRARIES AsgTools xAODMetaData GaudiKernel AthenaKernel
+    AthenaPoolUtilities EventInfo )
 
 endif()
 
diff --git a/Event/xAOD/xAODMetaDataCnv/Root/FileMetaDataTool.cxx b/Event/xAOD/xAODMetaDataCnv/Root/FileMetaDataTool.cxx
index 9671c9e90b30..352fa3ff7aa0 100644
--- a/Event/xAOD/xAODMetaDataCnv/Root/FileMetaDataTool.cxx
+++ b/Event/xAOD/xAODMetaDataCnv/Root/FileMetaDataTool.cxx
@@ -1,32 +1,31 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-// $Id: FileMetaDataTool.cxx 683697 2015-07-17 09:12:14Z krasznaa $
-
 // Local include(s):
 #include "xAODMetaDataCnv/FileMetaDataTool.h"
 
 namespace xAODMaker {
 
-   FileMetaDataTool::FileMetaDataTool( const std::string& name )
-      : asg::AsgMetadataTool( name ),
-        m_md(), m_mdAux(), m_beginFileIncidentSeen( false ) {
-
-      declareProperty( "InputKey", m_inputKey = "FileMetaData" );
-      declareProperty( "OutputKey", m_outputKey = "FileMetaData" );
+FileMetaDataTool::FileMetaDataTool(const std::string& name)
+    : asg::AsgMetadataTool(name)
+    , m_md()
+    , m_mdAux()
+    , m_beginFileIncidentSeen(false) {
+      declareProperty("InputKey", m_inputKey = "FileMetaData");
+      declareProperty("OutputKey", m_outputKey = "FileMetaData");
 
 #ifndef XAOD_STANDALONE
-      declareInterface< ::IMetaDataTool >( this );
-#endif // XAOD_STANDALONE
-   }
-
-   StatusCode FileMetaDataTool::initialize() {
+      declareInterface< ::IMetaDataTool >(this);
+#endif  // XAOD_STANDALONE
+    }
 
+StatusCode
+    FileMetaDataTool::initialize() {
       // Greet the user:
-      ATH_MSG_DEBUG( "Initialising xAODMaker::FileMetaDataTool" );
-      ATH_MSG_DEBUG( "  InputKey  = " << m_inputKey );
-      ATH_MSG_DEBUG( "  OutputKey = " << m_outputKey );
+      ATH_MSG_DEBUG("Initialising xAODMaker::FileMetaDataTool");
+      ATH_MSG_DEBUG("  InputKey  = " << m_inputKey);
+      ATH_MSG_DEBUG("  OutputKey = " << m_outputKey);
 
       // Reset the member variable(s):
       m_md.reset();
@@ -35,80 +34,82 @@ namespace xAODMaker {
 
       // Return gracefully:
       return StatusCode::SUCCESS;
-   }
+    }
 
-   StatusCode FileMetaDataTool::endInputFile() {
+StatusCode
+    FileMetaDataTool::endInputFile() {
       // Return gracefully:
       return StatusCode::SUCCESS;
-   }
-   StatusCode FileMetaDataTool::beginInputFile() {
+    }
 
+StatusCode
+    FileMetaDataTool::beginInputFile() {
       // Whatever happens, we've seen the incident:
       m_beginFileIncidentSeen = true;
 
       // If the input file doesn't have any file-level metadata, then
       // finish right away:
-      if( ! inputMetaStore()->contains< xAOD::FileMetaData >( m_inputKey ) ) {
-         return StatusCode::SUCCESS;
+      if (!inputMetaStore()->contains< xAOD::FileMetaData >(m_inputKey)) {
+        return StatusCode::SUCCESS;
       }
 
       // Retrieve the input object:
       const xAOD::FileMetaData* input = 0;
-      ATH_CHECK( inputMetaStore()->retrieve( input, m_inputKey ) );
+      ATH_CHECK(inputMetaStore()->retrieve(input, m_inputKey));
 
       // Create the output objects if they don't exist yet:
-      if( ( ! m_md.get() ) && ( ! m_mdAux.get() ) ) {
-         ATH_MSG_DEBUG( "Creating output objects" );
-         m_md.reset( new xAOD::FileMetaData() );
-         m_mdAux.reset( new xAOD::FileMetaDataAuxInfo() );
-         m_md->setStore( m_mdAux.get() );
-
-         // Copy the payload of the input object:
-         *( m_md.get() ) = *input;
+      if ((!m_md.get()) && (!m_mdAux.get())) {
+        ATH_MSG_DEBUG("Creating output objects");
+        m_md.reset(new xAOD::FileMetaData());
+        m_mdAux.reset(new xAOD::FileMetaDataAuxInfo());
+        m_md->setStore(m_mdAux.get());
+
+        // Copy the payload of the input object:
+        *(m_md.get()) = *input;
       }
 
       // Make sure that the objects are compatible:
-      if( *( m_md.get() ) != *input ) {
-         ATH_MSG_ERROR( "Processing input files with differing conditions" );
-         ATH_MSG_ERROR( "Consistent xAOD::FileMetaData can't be provided for "
-                        "the output" );
-         return StatusCode::FAILURE;
+      if (*(m_md.get()) != *input) {
+        ATH_MSG_ERROR("Processing input files with differing conditions");
+        ATH_MSG_ERROR("Consistent xAOD::FileMetaData can't be provided for "
+                      "the output");
+        return StatusCode::FAILURE;
       }
 
       // Return gracefully:
       return StatusCode::SUCCESS;
-   }
-
-   StatusCode FileMetaDataTool::beginEvent() {
+    }
 
+StatusCode
+    FileMetaDataTool::beginEvent() {
       // In case we missed the BeginInputFile incident for the first input file,
       // make sure that we still run the appropriate function.
-      if( ! m_beginFileIncidentSeen ) {
-         ATH_CHECK( beginInputFile() );
+      if (!m_beginFileIncidentSeen) {
+        ATH_CHECK(beginInputFile());
       }
 
       // Return gracefully:
       return StatusCode::SUCCESS;
-   }
-
-   StatusCode FileMetaDataTool::metaDataStop() {
+    }
 
+StatusCode
+    FileMetaDataTool::metaDataStop() {
       // Don't be offended if the metadata already exists in the output:
-      if( outputMetaStore()->contains< xAOD::FileMetaData >( m_outputKey ) ) {
-         ATH_MSG_DEBUG( "xAOD::FileMetaData already in the output" );
-         return StatusCode::SUCCESS;
+      if (outputMetaStore()->contains< xAOD::FileMetaData >(m_outputKey)) {
+        ATH_MSG_DEBUG("xAOD::FileMetaData already in the output");
+        return StatusCode::SUCCESS;
       }
 
       // Record the metadata, if any was found on the input:
-      if( m_md.get() && m_mdAux.get() ) {
-         ATH_MSG_DEBUG( "Recoding file level metadata" );
-         ATH_CHECK( outputMetaStore()->record( m_md.release(), m_outputKey ) );
-         ATH_CHECK( outputMetaStore()->record( m_mdAux.release(),
-                                               m_outputKey + "Aux." ) );
+      if (m_md.get() && m_mdAux.get()) {
+        ATH_MSG_DEBUG("Recoding file level metadata");
+        ATH_CHECK(outputMetaStore()->record(m_md.release(), m_outputKey));
+        ATH_CHECK(outputMetaStore()->record(m_mdAux.release(),
+                                            m_outputKey + "Aux."));
       }
 
       // Return gracefully:
       return StatusCode::SUCCESS;
-   }
+    }
 
-} // namespace xAODMaker
+}  // namespace xAODMaker
diff --git a/Event/xAOD/xAODMetaDataCnv/share/FileMetaDataCreatorTool_jobOptions.py b/Event/xAOD/xAODMetaDataCnv/share/FileMetaDataCreatorTool_jobOptions.py
index 9235869dfc9f..21d0dcfefac7 100644
--- a/Event/xAOD/xAODMetaDataCnv/share/FileMetaDataCreatorTool_jobOptions.py
+++ b/Event/xAOD/xAODMetaDataCnv/share/FileMetaDataCreatorTool_jobOptions.py
@@ -1,34 +1,50 @@
-# $Id: FileMetaDataCreatorTool_jobOptions.py 670279 2015-05-27 15:18:27Z krasznaa $
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #
 # Test jobO for exercising xAODMaker::FileMetaDataCreatorTool to create
 # the file-level metadata.
 #
+from AthenaCommon import CfgMgr
+from AthenaCommon.AppMgr import ServiceMgr as svcMgr
+from AthenaCommon.AppMgr import ToolSvc
+from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+from RecExConfig.RecFlags import rec
+from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
 
 # Set up the reading of an input file:
-INFILE = "AOD.pool.root"
-from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-athenaCommonFlags.FilesInput = [ INFILE ]
+INFILE = (
+    "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CommonInputs/"
+    "data16_13TeV.00311321.physics_Main.recon.AOD.r9264/"
+    "AOD.11038520._000001.pool.root.1"
+)
+
+athenaCommonFlags.FilesInput = [INFILE]
 athenaCommonFlags.EvtMax = 10
 
 # Turn off most of what RecExCommon does:
-from RecExConfig.RecFlags import rec
-rec.doCBNT.set_Value_and_Lock( False )
-rec.doWriteAOD.set_Value_and_Lock( False )
-rec.doWriteTAG.set_Value_and_Lock( False )
-rec.AutoConfiguration = [ "everything" ]
+
+rec.doCBNT.set_Value_and_Lock(False)
+rec.doWriteAOD.set_Value_and_Lock(False)
+rec.doWriteTAG.set_Value_and_Lock(False)
+rec.AutoConfiguration = ["everything"]
 
 # Read the file using RecExCommon:
-include( "RecExCommon/RecExCommon_topOptions.py" )
+include("RecExCommon/RecExCommon_topOptions.py")
 
 # Set up the metadata tool:
-ToolSvc += CfgMgr.xAODMaker__FileMetaDataCreatorTool( "FileMetaDataCreatorTool",
-                                                      OutputLevel = 2 )
-svcMgr.MetaDataSvc.MetaDataTools += [ ToolSvc.FileMetaDataCreatorTool ]
+ToolSvc += CfgMgr.xAODMaker__FileMetaDataCreatorTool(
+    "FileMetaDataCreatorTool", OutputLevel=2
+)
+svcMgr.MetaDataSvc.MetaDataTools += [ToolSvc.FileMetaDataCreatorTool]
 
 # Set up the writing of an output file:
-from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
-stream = MSMgr.NewPoolRootStream( "StreamDAOD", "DxAOD.pool.root" )
-stream.AddItem( [ "xAOD::EventInfo#EventInfo",
-                  "xAOD::EventAuxInfo#EventInfoAux." ] )
-stream.AddMetaDataItem( [ "xAOD::FileMetaData#FileMetaData",
-                          "xAOD::FileMetaDataAuxInfo#FileMetaDataAux." ] )
+
+stream = MSMgr.NewPoolRootStream("StreamDAOD", "DxAOD.pool.root")
+stream.AddItem(
+    ["xAOD::EventInfo#EventInfo", "xAOD::EventAuxInfo#EventInfoAux."]
+)
+stream.AddMetaDataItem(
+    [
+        "xAOD::FileMetaData#FileMetaData",
+        "xAOD::FileMetaDataAuxInfo#FileMetaDataAux.",
+    ]
+)
diff --git a/Event/xAOD/xAODMetaDataCnv/src/FileMetaDataCreatorTool.cxx b/Event/xAOD/xAODMetaDataCnv/src/FileMetaDataCreatorTool.cxx
index a4397199a843..f7cecdc30cc0 100644
--- a/Event/xAOD/xAODMetaDataCnv/src/FileMetaDataCreatorTool.cxx
+++ b/Event/xAOD/xAODMetaDataCnv/src/FileMetaDataCreatorTool.cxx
@@ -1,9 +1,7 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-// $Id: FileMetaDataCreatorTool.cxx 685407 2015-07-24 16:15:06Z cranshaw $
-
 // System include(s):
 #include <algorithm>
 #include <sstream>
@@ -18,255 +16,260 @@
 
 namespace xAODMaker {
 
-   /// The folder in DetectorStore that we get the information from
-   static const std::string FOLDER_NAME = "/TagInfo";
-   static const std::string SIMFOLDER_NAME = "/Simulation/Parameters";
+/// The folder in DetectorStore that we get the information from
+static const char FOLDER_NAME[] = "/TagInfo";
+static const char SIMFOLDER_NAME[] = "/Simulation/Parameters";
 
 /// Helper macro to execute the setter functions correctly
-#define CHECK_BOOL( EXP )                                             \
-      do {                                                            \
-         try {                                                        \
-            if( ! EXP ) {                                             \
-               ATH_MSG_ERROR( "Failed to execute: " << #EXP );        \
-               return StatusCode::FAILURE;                            \
-            }                                                         \
-         } catch( const std::exception& ex ) {                        \
-            ATH_MSG_INFO( "Couldn't extract attribute with command: " \
-                          << #EXP );                                  \
-         }                                                            \
-      } while( 0 )
-
-   FileMetaDataCreatorTool::FileMetaDataCreatorTool( const std::string& name )
-      : asg::AsgMetadataTool( name ), 
-        m_md(), m_mdAux() {
-
-      declareProperty( "OutputKey", m_outputKey = "FileMetaData" );
-   }
-
-   StatusCode FileMetaDataCreatorTool::start() {
+#define CHECK_BOOL(EXP)                                      \
+do {                                                         \
+  try {                                                      \
+    if (!EXP) {                                              \
+      ATH_MSG_ERROR("Failed to execute: " << #EXP);          \
+      return StatusCode::FAILURE;                            \
+    }                                                        \
+  } catch(const std::exception& ex) {                        \
+    ATH_MSG_INFO("Couldn't extract attribute with command: " \
+                 << #EXP);                                   \
+  }                                                          \
+} while (0)
+
+FileMetaDataCreatorTool::FileMetaDataCreatorTool(const std::string& name)
+  : asg::AsgMetadataTool(name)
+  , m_md()
+  , m_mdAux() {
+    declareProperty("OutputKey", m_outputKey = "FileMetaData");
+  }
+
+StatusCode
+    FileMetaDataCreatorTool::start() {
       const DataHandle< CondAttrListCollection > dummy;
-      StatusCode sc = detStore()->
-                        regFcn( &xAODMaker::FileMetaDataCreatorTool::update,
-                                     this, dummy, FOLDER_NAME, true );
+      StatusCode sc = detStore()->regFcn(
+          &xAODMaker::FileMetaDataCreatorTool::update,
+          this,
+          dummy,
+          FOLDER_NAME,
+          true);
+
       if (sc.isFailure()) {
-         ATH_MSG_WARNING("Unable to register callback for " << FOLDER_NAME);
-         //return StatusCode::FAILURE;
+        ATH_MSG_WARNING("Unable to register callback for " << FOLDER_NAME);
+        // return StatusCode::FAILURE;
       }
-      if (detStore()->contains< AthenaAttributeList >(SIMFOLDER_NAME) ) {
+
+      if (detStore()->contains< AthenaAttributeList >(SIMFOLDER_NAME)) {
         const DataHandle< AthenaAttributeList > dummy2;
-        sc = detStore()->regFcn( &xAODMaker::FileMetaDataCreatorTool::update,
-                                     this, dummy2, SIMFOLDER_NAME, true );
+        sc = detStore()->regFcn(
+            &xAODMaker::FileMetaDataCreatorTool::update,
+            this,
+            dummy2,
+            SIMFOLDER_NAME,
+            true);
+
         if (sc.isFailure()) {
           ATH_MSG_WARNING("Unable to register callback for " << SIMFOLDER_NAME);
-          //return StatusCode::FAILURE;
+          // return StatusCode::FAILURE;
         }
-      }
-      else {
+      } else {
         ATH_MSG_INFO("Processing file with no " << SIMFOLDER_NAME);
       }
       return StatusCode::SUCCESS;
-   }
-
-   StatusCode FileMetaDataCreatorTool::initialize() {
+    }
 
+StatusCode
+    FileMetaDataCreatorTool::initialize() {
       // Greet the user:
-      ATH_MSG_DEBUG( "Initialising - Package version: " << PACKAGE_VERSION );
-      ATH_MSG_DEBUG( "  OutputKey = " << m_outputKey );
+      ATH_MSG_DEBUG("Initialising - Package version: " << PACKAGE_VERSION);
+      ATH_MSG_DEBUG("  OutputKey = " << m_outputKey);
 
       // Return gracefully:
       return StatusCode::SUCCESS;
-   }
-
-   StatusCode FileMetaDataCreatorTool::beginInputFile() {
+    }
 
+StatusCode
+    FileMetaDataCreatorTool::beginInputFile() {
       // Create the output objects if they don't exist yet:
-      if( ( ! m_md.get() ) && ( ! m_mdAux.get() ) ) {
-         ATH_MSG_DEBUG( "Creating output objects" );
-         m_md.reset( new xAOD::FileMetaData() );
-         m_mdAux.reset( new xAOD::FileMetaDataAuxInfo() );
-         m_md->setStore( m_mdAux.get() );
+      if ((!m_md.get()) && (!m_mdAux.get())) {
+        ATH_MSG_DEBUG("Creating output objects");
+        m_md.reset(new xAOD::FileMetaData());
+        m_mdAux.reset(new xAOD::FileMetaDataAuxInfo());
+        m_md->setStore(m_mdAux.get());
       }
 
-      ATH_MSG_DEBUG( "DetectorStore contents:\n\n" << detStore()->dump() );
+      ATH_MSG_DEBUG("DetectorStore contents:\n\n" << detStore()->dump());
 
       // Return gracefully:
       return StatusCode::SUCCESS;
-   }
+    }
 
-   StatusCode FileMetaDataCreatorTool::endInputFile() {
+StatusCode
+    FileMetaDataCreatorTool::endInputFile() {
       // Return gracefully:
       return StatusCode::SUCCESS;
-   }
-
-   StatusCode FileMetaDataCreatorTool::metaDataStop() {
+    }
 
+StatusCode
+    FileMetaDataCreatorTool::metaDataStop() {
       // Don't be offended if the metadata already exists in the output:
-      if( outputMetaStore()->contains< xAOD::FileMetaData >( m_outputKey ) ) {
-         ATH_MSG_DEBUG( "xAOD::FileMetaData already in the output" );
-         return StatusCode::SUCCESS;
+      if (outputMetaStore()->contains< xAOD::FileMetaData >(m_outputKey)) {
+        ATH_MSG_DEBUG("xAOD::FileMetaData already in the output");
+        return StatusCode::SUCCESS;
       }
+
       SG::ConstIterator<EventStreamInfo> esi_h1;
       SG::ConstIterator<EventStreamInfo> esi_h2;
-      StatusCode sc = outputMetaStore()->retrieve(esi_h1,esi_h2);
+      StatusCode sc = outputMetaStore()->retrieve(esi_h1, esi_h2);
       if (sc.isSuccess() && esi_h1 != esi_h2) {
-        if (esi_h1->getProcessingTags().size()==1) {
-           CHECK_BOOL( m_md->setValue( xAOD::FileMetaData::dataType,
-                                       *(esi_h1->getProcessingTags().begin()) ) );
+        if (esi_h1->getProcessingTags().size() == 1) {
+          CHECK_BOOL(m_md->setValue(
+                  xAOD::FileMetaData::dataType,
+                  *(esi_h1->getProcessingTags().begin())));
         } else {
-           ATH_MSG_WARNING("Found multiple output process tags");
-           CHECK_BOOL( m_md->setValue( xAOD::FileMetaData::dataType,"multiple") );
+          ATH_MSG_WARNING("Found multiple output process tags");
+          CHECK_BOOL(m_md->setValue(xAOD::FileMetaData::dataType, "multiple"));
         }
-        if (esi_h1->getEventTypes().size()==1) {
-           float id = esi_h1->getEventTypes().begin()->mc_channel_number();
-           CHECK_BOOL(m_md->setValue( xAOD::FileMetaData::mcProcID,id));
+        if (esi_h1->getEventTypes().size() == 1) {
+          float id = esi_h1->getEventTypes().begin()->mc_channel_number();
+          CHECK_BOOL(m_md->setValue(xAOD::FileMetaData::mcProcID, id));
         } else {
-           ATH_MSG_WARNING("Found multiple eventtypes");
-           CHECK_BOOL(m_md->setValue( xAOD::FileMetaData::mcProcID,float(0.0)));
+          ATH_MSG_WARNING("Found multiple eventtypes");
+          CHECK_BOOL(m_md->setValue(xAOD::FileMetaData::mcProcID, 0.0f));
         }
       }
 
       // Record the metadata, if any was found on the input:
-      if( m_md.get() && m_mdAux.get() ) {
-         ATH_MSG_DEBUG( "Recoding file level metadata" );
-         ATH_CHECK( outputMetaStore()->record( m_md.release(), m_outputKey ) );
-         ATH_CHECK( outputMetaStore()->record( m_mdAux.release(),
-                                               m_outputKey + "Aux." ) );
+      if (m_md.get() && m_mdAux.get()) {
+        ATH_MSG_DEBUG("Recoding file level metadata");
+        ATH_CHECK(outputMetaStore()->record(m_md.release(), m_outputKey));
+        ATH_CHECK(outputMetaStore()->record(m_mdAux.release(),
+                                            m_outputKey + "Aux."));
       }
 
       // Return gracefully:
       return StatusCode::SUCCESS;
-   }
-
-   StatusCode
-   FileMetaDataCreatorTool::update( IOVSVC_CALLBACK_ARGS_K( keys ) ) {
+    }
 
-      ATH_MSG_DEBUG( "update() invoked for key(s): " << keys );
+StatusCode
+    FileMetaDataCreatorTool::update(IOVSVC_CALLBACK_ARGS_K(keys)) {
+      ATH_MSG_DEBUG("update() invoked for key(s): " << keys);
 
       // Bail if the requested folder is not amongst the keys:
-      if( std::find( keys.begin(), keys.end(), FOLDER_NAME ) == keys.end() &&
-         std::find( keys.begin(), keys.end(), SIMFOLDER_NAME ) == keys.end() ) {
-         ATH_MSG_WARNING( "Update callback received without the \""
-                          << FOLDER_NAME << "\" key" );
-         return StatusCode::SUCCESS;
+      if (std::find(keys.begin(), keys.end(), FOLDER_NAME) == keys.end()
+          && std::find(keys.begin(), keys.end(), SIMFOLDER_NAME) == keys.end()) {
+        ATH_MSG_WARNING("Update callback received without the \""
+                        << FOLDER_NAME << "\" key");
+        return StatusCode::SUCCESS;
       }
 
       // Retrieve the needed metadata:
-      if (std::find( keys.begin(), keys.end(), FOLDER_NAME ) != keys.end()) {
-         const CondAttrListCollection* tagInfo = 0;
-         ATH_CHECK( detStore()->retrieve( tagInfo, FOLDER_NAME ) );
-      
-         ATH_MSG_DEBUG( "Retrieved object: " << FOLDER_NAME );
-
-         // Make sure that it has some the expected size:
-         if( tagInfo->size() > 1 ) {
-            ATH_MSG_WARNING( "Collection with >1 size received for \""
-                             << FOLDER_NAME << "\"" );
-         }
-         if( ! tagInfo->size() ) {
-            ATH_MSG_ERROR( "Empty collection received for \""
-                           << FOLDER_NAME << "\"" );
-            return StatusCode::FAILURE;
-         }
-         // Access the first, and only channel of the object:
-         const CondAttrListCollection::AttributeList& al =
-            tagInfo->attributeList( 0 );
-
-         if (al.exists("AtlasRelease")) {
-           CHECK_BOOL( m_md->setValue( xAOD::FileMetaData::productionRelease,                           al[ "AtlasRelease" ].data< std::string >() ) );
-         }
-         else {
-           ATH_MSG_WARNING("Did not find AtlasRelease in TagInfo setting to none");
-           CHECK_BOOL( m_md->setValue( xAOD::FileMetaData::productionRelease,
-                                       "none" ) );
-         }
-         if (al.exists("AMITag")) {
-           CHECK_BOOL( m_md->setValue( xAOD::FileMetaData::amiTag,
-                       al[ "AMITag" ].data< std::string >() ) );
-         }
-         else {
-           ATH_MSG_WARNING("Did not find AMITag in TagInfo setting to none");
-           CHECK_BOOL( m_md->setValue( xAOD::FileMetaData::amiTag,
-                                       "none" ) );
-         }
-         if (al.exists("GeoAtlas")) {
-           CHECK_BOOL( m_md->setValue( xAOD::FileMetaData::geometryVersion,
-                       al[ "GeoAtlas" ].data< std::string >() ) );
-         }
-         else {
-           ATH_MSG_WARNING("Did not find GeoAtlas in TagInfo setting to none");
-           CHECK_BOOL( m_md->setValue( xAOD::FileMetaData::geometryVersion,
-                                       "none" ) );
-         }
-         if (al.exists("IOVDbGlobalTag")) {
-           CHECK_BOOL( m_md->setValue( xAOD::FileMetaData::conditionsTag,
-                       al[ "IOVDbGlobalTag" ].data< std::string >() ) );
-         }
-         else {
-           ATH_MSG_WARNING("Did not find IOVDbGlobalTag in TagInfo setting to none");
-           CHECK_BOOL( m_md->setValue( xAOD::FileMetaData::conditionsTag,
-                                       "none" ) );
-         }
-
-         // Convert the beam energy to float. (If it exists.)
-         if (al.exists("beam_energy")) {
-           try {
-              const std::string beamEnergyStr =
-                 al[ "beam_energy" ].data< std::string >();
-              char* endptr = 0;
-              float beamEnergy = strtof( beamEnergyStr.c_str(), &endptr );
-              if( endptr ) {
-                 if( ! m_md->setValue( xAOD::FileMetaData::beamEnergy,
-                                       beamEnergy ) ) {
-                    ATH_MSG_ERROR( "Failed to set the beam energy" );
-                    return StatusCode::FAILURE;
-                 }
+      if (std::find(keys.begin(), keys.end(), FOLDER_NAME) != keys.end()) {
+        const CondAttrListCollection* tagInfo = 0;
+        ATH_CHECK(detStore()->retrieve(tagInfo, FOLDER_NAME));
+
+        ATH_MSG_DEBUG("Retrieved object: " << FOLDER_NAME);
+
+        // Make sure that it has some the expected size:
+        if (tagInfo->size() > 1) {
+          ATH_MSG_WARNING("Collection with >1 size received for \""
+                          << FOLDER_NAME << "\"");
+        }
+        if (!tagInfo->size()) {
+          ATH_MSG_ERROR("Empty collection received for \""
+                        << FOLDER_NAME << "\"");
+          return StatusCode::FAILURE;
+        }
+        // Access the first, and only channel of the object:
+        const CondAttrListCollection::AttributeList& al =
+            tagInfo->attributeList(0);
+
+        if (al.exists("AtlasRelease")) {
+          CHECK_BOOL(m_md->setValue(
+                  xAOD::FileMetaData::productionRelease,
+                  al[ "AtlasRelease" ].data< std::string >()));
+        } else {
+          ATH_MSG_WARNING("Did not find AtlasRelease in TagInfo setting to none");
+          CHECK_BOOL(m_md->setValue(xAOD::FileMetaData::productionRelease, "none"));
+        }
+
+        if (al.exists("AMITag")) {
+          CHECK_BOOL(m_md->setValue(
+                  xAOD::FileMetaData::amiTag,
+                  al["AMITag"].data< std::string >()));
+        } else {
+          ATH_MSG_WARNING("Did not find AMITag in TagInfo setting to none");
+          CHECK_BOOL(m_md->setValue(xAOD::FileMetaData::amiTag, "none"));
+        }
+
+        if (al.exists("GeoAtlas")) {
+          CHECK_BOOL(m_md->setValue(xAOD::FileMetaData::geometryVersion,
+                                    al["GeoAtlas"].data< std::string >()));
+        } else {
+          ATH_MSG_WARNING("Did not find GeoAtlas in TagInfo setting to none");
+          CHECK_BOOL(m_md->setValue(xAOD::FileMetaData::geometryVersion, "none"));
+        }
+
+        if (al.exists("IOVDbGlobalTag")) {
+          CHECK_BOOL(m_md->setValue(
+                  xAOD::FileMetaData::conditionsTag,
+                  al["IOVDbGlobalTag"].data< std::string >()));
+        } else {
+          ATH_MSG_WARNING("Did not find IOVDbGlobalTag in TagInfo setting to none");
+          CHECK_BOOL(m_md->setValue(xAOD::FileMetaData::conditionsTag, "none"));
+        }
+
+        // Convert the beam energy to float. (If it exists.)
+        if (al.exists("beam_energy")) {
+          try {
+            const std::string beamEnergyStr = al["beam_energy"].data< std::string >();
+            char* endptr = 0;
+            float beamEnergy = strtof(beamEnergyStr.c_str(), &endptr);
+            if (endptr) {
+              if (!m_md->setValue(xAOD::FileMetaData::beamEnergy, beamEnergy)) {
+                ATH_MSG_ERROR("Failed to set the beam energy");
+                return StatusCode::FAILURE;
               }
-           } catch( const std::exception& ex ) {
-              ATH_MSG_INFO( "Couldn't set the beam energy" );
-           }
-         }
-         else {
-           ATH_MSG_WARNING("Did not find beam_energy in TagInfo setting to -1");
-           CHECK_BOOL( m_md->setValue( xAOD::FileMetaData::beamEnergy, -1.0f ) );
-         }
-
-         if (al.exists("beam_type")) {
-           CHECK_BOOL( m_md->setValue( xAOD::FileMetaData::beamType,
-                       al[ "beam_type" ].data< std::string >() ) );
-         }
-         else {
-           ATH_MSG_WARNING("Did not find beam_type in TagInfo setting to none");
-           CHECK_BOOL( m_md->setValue( xAOD::FileMetaData::beamType,
-                                       "none" ) );
-         }
+            }
+          } catch(const std::exception& ex) {
+            ATH_MSG_INFO("Couldn't set the beam energy");
+          }
+        } else {
+          ATH_MSG_WARNING("Did not find beam_energy in TagInfo setting to -1");
+          CHECK_BOOL(m_md->setValue(xAOD::FileMetaData::beamEnergy, -1.0f));
+        }
+
+        if (al.exists("beam_type")) {
+          CHECK_BOOL(m_md->setValue(
+                  xAOD::FileMetaData::beamType,
+                  al["beam_type"].data< std::string >()));
+        } else {
+          ATH_MSG_WARNING("Did not find beam_type in TagInfo setting to none");
+          CHECK_BOOL(m_md->setValue(xAOD::FileMetaData::beamType, "none"));
+        }
       }
-      if (std::find( keys.begin(), keys.end(), SIMFOLDER_NAME ) != keys.end()) {
-         const AthenaAttributeList* simInfo = 0;
-         ATH_CHECK( detStore()->retrieve( simInfo, SIMFOLDER_NAME ) );
-         
-         if (simInfo->exists("SimulationFlavour")) {
-           std::string flavor = (*simInfo)[ "SimulationFlavour" ].data< std::string >();
-           if (flavor == "default") flavor = "FullSim";
-           CHECK_BOOL( m_md->setValue( xAOD::FileMetaData::simFlavour,
-                       flavor ) );
-         }
-         else {
-           ATH_MSG_ERROR("Unable to retrieve SimulationFlavour from " << SIMFOLDER_NAME);
-         }
-
-         if (simInfo->exists("IsEventOverlayInputSim")) {
-           bool isDataOverlay = (*simInfo)[ "IsEventOverlayInputSim" ].data< std::string >()=="True";
-           CHECK_BOOL( m_md->setValue( xAOD::FileMetaData::isDataOverlay,
-                       isDataOverlay ) );
-         }
-         else {
-           ATH_MSG_INFO("Unable to retrieve IsEventOverlayInputSim from " << SIMFOLDER_NAME << " - assuming not data overlay");
-           CHECK_BOOL( m_md->setValue( xAOD::FileMetaData::isDataOverlay, false ) );
-         }
+
+      if (std::find(keys.begin(), keys.end(), SIMFOLDER_NAME) != keys.end()) {
+        const AthenaAttributeList* simInfo = 0;
+        ATH_CHECK(detStore()->retrieve(simInfo, SIMFOLDER_NAME));
+
+        if (simInfo->exists("SimulationFlavour")) {
+          std::string flavor = (*simInfo)["SimulationFlavour"].data< std::string >();
+          if (flavor == "default") flavor = "FullSim";
+          CHECK_BOOL(m_md->setValue(xAOD::FileMetaData::simFlavour, flavor));
+        } else {
+          ATH_MSG_ERROR("Unable to retrieve SimulationFlavour from " << SIMFOLDER_NAME);
+        }
+
+        if (simInfo->exists("IsEventOverlayInputSim")) {
+          bool isDataOverlay = (*simInfo)["IsEventOverlayInputSim"].data< std::string >() == "True";
+          CHECK_BOOL(m_md->setValue(xAOD::FileMetaData::isDataOverlay, isDataOverlay));
+        } else {
+          ATH_MSG_INFO("Unable to retrieve IsEventOverlayInputSim from "
+                       << SIMFOLDER_NAME << " - assuming not data overlay");
+          CHECK_BOOL(m_md->setValue(xAOD::FileMetaData::isDataOverlay, false));
+        }
       }
 
       // Return gracefully:
       return StatusCode::SUCCESS;
-   }
+    }
 
-} // namespace xAODMaker
+}  // namespace xAODMaker
diff --git a/Event/xAOD/xAODMetaDataCnv/src/FileMetaDataCreatorTool.h b/Event/xAOD/xAODMetaDataCnv/src/FileMetaDataCreatorTool.h
index 433f97de0113..144431f39f52 100644
--- a/Event/xAOD/xAODMetaDataCnv/src/FileMetaDataCreatorTool.h
+++ b/Event/xAOD/xAODMetaDataCnv/src/FileMetaDataCreatorTool.h
@@ -1,10 +1,7 @@
 // Dear emacs, this is -*- c++ -*-
-
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
-
-// $Id: FileMetaDataCreatorTool.h 676522 2015-06-18 22:17:03Z cranshaw $
 #ifndef XAODMETADATACNV_FILEMETADATACREATORTOOL_H
 #define XAODMETADATACNV_FILEMETADATACREATORTOOL_H
 
@@ -24,40 +21,40 @@
 
 namespace xAODMaker {
 
-   /// Tool creating or propagating xAOD::FileMetaData information
-   ///
-   /// This Athena-only tool can be used to create xAOD::FileMetaData
-   /// information out of the non-ROOT-readable metadata available in
-   /// the input.
-   ///
-   /// Or, if the input file already has xAOD::FileMetaData payload,
-   /// it is taken as is, and copied to the output.
-   ///
-   /// The class uses asg::AsgMetadataTool as a base class for convenience,
-   /// but it's not a dual-use tool. (Hence the header is hidden from the
-   /// outside world.)
-   ///
-   /// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
-   ///
-   /// $Revision: 676522 $
-   /// $Date: 2015-06-19 00:17:03 +0200 (Fri, 19 Jun 2015) $
-   ///
-   class FileMetaDataCreatorTool : public asg::AsgMetadataTool,
-                                   public virtual ::IMetaDataTool {
-
-      /// Declare the correct constructor for Athena
-      ASG_TOOL_CLASS( FileMetaDataCreatorTool, IMetaDataTool )
-
-   public:
+/// Tool creating or propagating xAOD::FileMetaData information
+///
+/// This Athena-only tool can be used to create xAOD::FileMetaData
+/// information out of the non-ROOT-readable metadata available in
+/// the input.
+///
+/// Or, if the input file already has xAOD::FileMetaData payload,
+/// it is taken as is, and copied to the output.
+///
+/// The class uses asg::AsgMetadataTool as a base class for convenience,
+/// but it's not a dual-use tool. (Hence the header is hidden from the
+/// outside world.)
+///
+/// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
+///
+/// $Revision: 676522 $
+/// $Date: 2015-06-19 00:17:03 +0200 (Fri, 19 Jun 2015) $
+///
+class FileMetaDataCreatorTool
+    : public asg::AsgMetadataTool
+    , public virtual ::IMetaDataTool {
+  /// Declare the correct constructor for Athena
+  ASG_TOOL_CLASS(FileMetaDataCreatorTool, IMetaDataTool)
+
+ public:
       /// Regular AsgTool constructor
-      FileMetaDataCreatorTool( const std::string& name =
-                               "FileMetaDataCreatorTool" );
+      FileMetaDataCreatorTool(const std::string& name =
+                              "FileMetaDataCreatorTool");
 
       /// Function initialising the tool
       virtual StatusCode initialize();
       virtual StatusCode start();
 
-   protected:
+ protected:
       /// @name Functions called by the AsgMetadataTool base class
       /// @{
 
@@ -78,9 +75,9 @@ namespace xAODMaker {
 
       /// @}
 
-   private:
+ private:
       /// Function called by the DetectorStore when the metadata is updated
-      StatusCode update( IOVSVC_CALLBACK_ARGS_P( I, keys ) );
+      StatusCode update(IOVSVC_CALLBACK_ARGS_P(I, keys));
 
       /// Key of the metadata object for the output file
       std::string m_outputKey;
@@ -89,9 +86,8 @@ namespace xAODMaker {
       std::unique_ptr< xAOD::FileMetaData > m_md;
       /// The output auxiliary object
       std::unique_ptr< xAOD::FileMetaDataAuxInfo > m_mdAux;
+};  // class FileMetaDataCreatorTool
 
-   }; // class FileMetaDataCreatorTool
-
-} // namespace xAODMaker
+}  // namespace xAODMaker
 
-#endif // XAODMETADATACNV_FILEMETADATACREATORTOOL_H
+#endif  // XAODMETADATACNV_FILEMETADATACREATORTOOL_H
diff --git a/Event/xAOD/xAODMetaDataCnv/src/FileMetaDataMarkUpTool.cxx b/Event/xAOD/xAODMetaDataCnv/src/FileMetaDataMarkUpTool.cxx
index 4df951f99e22..17c31e3c70f6 100644
--- a/Event/xAOD/xAODMetaDataCnv/src/FileMetaDataMarkUpTool.cxx
+++ b/Event/xAOD/xAODMetaDataCnv/src/FileMetaDataMarkUpTool.cxx
@@ -2,11 +2,10 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-// $Id: FileMetaDataMarkUpTool.cxx 685407 2015-07-24 16:15:06Z cranshaw $
-
 // System include(s):
 #include <algorithm>
 #include <sstream>
+#include <vector>
 
 // Athena metadata EDM:
 #include "EventInfo/EventStreamInfo.h"
@@ -17,92 +16,107 @@
 namespace xAODMaker {
 
 /// Helper macro to execute the setter functions correctly
-#define CHECK_BOOL( EXP )                                             \
-      do {                                                            \
-         try {                                                        \
-            if( ! EXP ) {                                             \
-               ATH_MSG_ERROR( "Failed to execute: " << #EXP );        \
-               return StatusCode::FAILURE;                            \
-            }                                                         \
-         } catch( const std::exception& ex ) {                        \
-            ATH_MSG_INFO( "Couldn't extract attribute with command: " \
-                          << #EXP );                                  \
-         }                                                            \
-      } while( 0 )
-
-   FileMetaDataMarkUpTool::FileMetaDataMarkUpTool( const std::string& name )
-      : asg::AsgMetadataTool( name ) {
-
-      declareProperty( "Key", m_outputKey = "" );
-   }
-
-   StatusCode FileMetaDataMarkUpTool::initialize() {
-      return(StatusCode::SUCCESS);
-   }
-
-   StatusCode FileMetaDataMarkUpTool::postInitialize() {
-      return(StatusCode::SUCCESS);
-   }
-
-   StatusCode FileMetaDataMarkUpTool::preExecute() {
-      return(StatusCode::SUCCESS);
-   }
-
-   StatusCode FileMetaDataMarkUpTool::preStream() {
-      return(StatusCode::SUCCESS);
-   }
-
-   StatusCode FileMetaDataMarkUpTool::postExecute() {
-      return(StatusCode::SUCCESS);
-   }
-
-   StatusCode FileMetaDataMarkUpTool::preFinalize() {
-      ATH_MSG_DEBUG("in preFinalize()");
-      std::vector<std::string> fmd_keys;
-      outputMetaStore()->keys<xAOD::FileMetaData>( fmd_keys );
-      if (fmd_keys.size() != 1) {
-         return(StatusCode::SUCCESS);
-      }
-      if (!outputMetaStore()->transientContains<xAOD::FileMetaData>( *(fmd_keys.begin()) )) {
-         return(StatusCode::SUCCESS);
+#define CHECK_BOOL(EXP)                                        \
+  do {                                                         \
+    try {                                                      \
+      if (!EXP) {                                              \
+        ATH_MSG_ERROR("Failed to execute: " << #EXP);          \
+        return StatusCode::FAILURE;                            \
+      }                                                        \
+    } catch(const std::exception& ex) {                        \
+      ATH_MSG_INFO("Couldn't extract attribute with command: " \
+                   << #EXP);                                   \
+    }                                                          \
+  } while (0)
+
+  FileMetaDataMarkUpTool::FileMetaDataMarkUpTool(const std::string& name)
+      : asg::AsgMetadataTool(name) {
+        declareProperty("Key", m_outputKey = "");
       }
-      xAOD::FileMetaData* fmd = nullptr;
-      StatusCode sc = outputMetaStore()->retrieve(fmd, *(fmd_keys.begin()) );
-      if (!sc.isSuccess()) {
-         return(StatusCode::SUCCESS);
-      }
-      const EventStreamInfo* esi = nullptr;
-      sc = outputMetaStore()->retrieve(esi, m_outputKey);
-      if (sc.isSuccess()) {
-         ATH_MSG_DEBUG( "Setting xAOD::FileMetaData from output EventStreamInfo object " << m_outputKey );
-         if (esi->getProcessingTags().size()==1) {
-            CHECK_BOOL( fmd->setValue( xAOD::FileMetaData::dataType,
-                                       *(esi->getProcessingTags().begin()) ) );
-         } else {
-            CHECK_BOOL( fmd->setValue( xAOD::FileMetaData::dataType, m_outputKey ) );
-         }
-         if (esi->getEventTypes().size()==1) {
+
+  StatusCode
+      FileMetaDataMarkUpTool::initialize() {
+    return StatusCode::SUCCESS;
+  }
+
+  StatusCode
+      FileMetaDataMarkUpTool::postInitialize() {
+    return StatusCode::SUCCESS;
+  }
+
+  StatusCode
+      FileMetaDataMarkUpTool::preExecute() {
+    return StatusCode::SUCCESS;
+  }
+
+  StatusCode
+      FileMetaDataMarkUpTool::preStream() {
+    return StatusCode::SUCCESS;
+  }
+
+  StatusCode
+      FileMetaDataMarkUpTool::postExecute() {
+    return StatusCode::SUCCESS;
+  }
+
+  StatusCode
+      FileMetaDataMarkUpTool::preFinalize() {
+        ATH_MSG_DEBUG("in preFinalize()");
+
+        std::vector<std::string> fmd_keys;
+        outputMetaStore()->keys<xAOD::FileMetaData>(fmd_keys);
+        if (fmd_keys.size() != 1) {
+          return StatusCode::SUCCESS;
+        }
+
+        if (!outputMetaStore()->transientContains< xAOD::FileMetaData >(
+                *(fmd_keys.begin()))) {
+          return StatusCode::SUCCESS;
+        }
+
+        xAOD::FileMetaData* fmd = nullptr;
+        StatusCode sc = outputMetaStore()->retrieve(fmd, *(fmd_keys.begin()));
+        if (!sc.isSuccess()) {
+          return StatusCode::SUCCESS;
+        }
+
+        const EventStreamInfo* esi = nullptr;
+        sc = outputMetaStore()->retrieve(esi, m_outputKey);
+        if (sc.isSuccess()) {
+          ATH_MSG_DEBUG("Setting xAOD::FileMetaData from output "
+                        << "EventStreamInfo object " << m_outputKey);
+          if (esi->getProcessingTags().size() == 1) {
+            CHECK_BOOL(fmd->setValue(xAOD::FileMetaData::dataType,
+                                     *(esi->getProcessingTags().begin())));
+          } else {
+            CHECK_BOOL(fmd->setValue(xAOD::FileMetaData::dataType, m_outputKey));
+          }
+          if (esi->getEventTypes().size() == 1) {
             float id = esi->getEventTypes().begin()->mc_channel_number();
-            CHECK_BOOL( fmd->setValue( xAOD::FileMetaData::mcProcID, id) );
-         }
+            CHECK_BOOL(fmd->setValue(xAOD::FileMetaData::mcProcID, id));
+          }
+        }
+        return StatusCode::SUCCESS;
       }
-      return(StatusCode::SUCCESS);
-   }
 
-   StatusCode FileMetaDataMarkUpTool::finalize() {
-      return(StatusCode::SUCCESS);
-   }
+  StatusCode
+      FileMetaDataMarkUpTool::finalize() {
+    return StatusCode::SUCCESS;
+  }
 
-   StatusCode FileMetaDataMarkUpTool::start() {
-      return StatusCode::SUCCESS;
-   }
+  StatusCode
+      FileMetaDataMarkUpTool::start() {
+    return StatusCode::SUCCESS;
+  }
 
-   StatusCode FileMetaDataMarkUpTool::beginInputFile() {
-      return StatusCode::SUCCESS;
-   }
+  StatusCode
+      FileMetaDataMarkUpTool::beginInputFile() {
+    return StatusCode::SUCCESS;
+  }
 
-   StatusCode FileMetaDataMarkUpTool::metaDataStop() {
-      return StatusCode::SUCCESS;
-   }
+  StatusCode
+      FileMetaDataMarkUpTool::metaDataStop() {
+    return StatusCode::SUCCESS;
+  }
 
-} // namespace xAODMaker
+}  // namespace xAODMaker
diff --git a/Event/xAOD/xAODMetaDataCnv/src/FileMetaDataMarkUpTool.h b/Event/xAOD/xAODMetaDataCnv/src/FileMetaDataMarkUpTool.h
index 8e804b554167..50ce08e07e99 100644
--- a/Event/xAOD/xAODMetaDataCnv/src/FileMetaDataMarkUpTool.h
+++ b/Event/xAOD/xAODMetaDataCnv/src/FileMetaDataMarkUpTool.h
@@ -1,10 +1,7 @@
 // Dear emacs, this is -*- c++ -*-
-
 /*
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
-
-// $Id: FileMetaDataMarkUpTool.h 676522 2015-06-18 22:17:03Z cranshaw $
 #ifndef XAODMETADATACNV_FILEMETADATAMARKUPTOOL_H
 #define XAODMETADATACNV_FILEMETADATAMARKUPTOOL_H
 
@@ -23,70 +20,69 @@
 
 namespace xAODMaker {
 
-   /// Tool creating or propagating xAOD::FileMetaData information
-   ///
-   /// This Athena-only tool can be used to create xAOD::FileMetaData
-   /// information out of the non-ROOT-readable metadata available in
-   /// the input.
-   ///
-   /// Or, if the input file already has xAOD::FileMetaData payload,
-   /// it is taken as is, and copied to the output.
-   ///
-   /// The class uses asg::AsgMetadataTool as a base class for convenience,
-   /// but it's not a dual-use tool. (Hence the header is hidden from the
-   /// outside world.)
-   ///
-   /// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
-   ///
-   /// $Revision: 676522 $
-   /// $Date: 2015-06-19 00:17:03 +0200 (Fri, 19 Jun 2015) $
-   ///
-   class FileMetaDataMarkUpTool : public asg::AsgMetadataTool,
-                                   public virtual ::IAthenaOutputTool {
-
-      /// Declare the correct constructor for Athena
-      ASG_TOOL_CLASS( FileMetaDataMarkUpTool, IAthenaOutputTool )
-
-   public:
+/// Tool creating or propagating xAOD::FileMetaData information
+///
+/// This Athena-only tool can be used to create xAOD::FileMetaData
+/// information out of the non-ROOT-readable metadata available in
+/// the input.
+///
+/// Or, if the input file already has xAOD::FileMetaData payload,
+/// it is taken as is, and copied to the output.
+///
+/// The class uses asg::AsgMetadataTool as a base class for convenience,
+/// but it's not a dual-use tool. (Hence the header is hidden from the
+/// outside world.)
+///
+/// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
+///
+/// $Revision: 676522 $
+/// $Date: 2015-06-19 00:17:03 +0200 (Fri, 19 Jun 2015) $
+///
+class FileMetaDataMarkUpTool
+    : public asg::AsgMetadataTool
+    , public virtual ::IAthenaOutputTool {
+  /// Declare the correct constructor for Athena
+  ASG_TOOL_CLASS(FileMetaDataMarkUpTool, IAthenaOutputTool)
+
+ public:
       /// Regular AsgTool constructor
-      FileMetaDataMarkUpTool( const std::string& name =
-                               "FileMetaDataMarkUpTool" );
+      explicit FileMetaDataMarkUpTool(
+          const std::string& name = "FileMetaDataMarkUpTool");
 
       /// Required of all IAthenaOutputTools:
       /// Called by AthenaOutputStream::initialize() (via ToolSvc retrieve()).
-      virtual StatusCode initialize() override;
+      StatusCode initialize() override;
       /// Called at the end of AthenaOutputStream::initialize().
-      virtual StatusCode postInitialize() override;
+      StatusCode postInitialize() override;
       /// Called at the beginning of AthenaOutputStream::execute().
-      virtual StatusCode preExecute() override;
+      StatusCode preExecute() override;
       /// Called before actually streaming objects.
-      virtual StatusCode preStream() override;
+      StatusCode preStream() override;
       /// Called at the end of AthenaOutputStream::execute().
-      virtual StatusCode postExecute() override;
+      StatusCode postExecute() override;
       /// Called at the beginning of AthenaOutputStream::finalize().
-      virtual StatusCode preFinalize() override;
+      StatusCode preFinalize() override;
       /// Called at the end of AthenaOutputStream::finalize() (via release()).
-      virtual StatusCode finalize() override;
-      virtual StatusCode start() override;
+      StatusCode finalize() override;
+      StatusCode start() override;
 
-   protected:
+ protected:
       /// @name Functions called by the AsgMetadataTool base class
       /// @{
 
       /// Function collecting the metadata from a new input file
-      virtual StatusCode beginInputFile() override;
+      StatusCode beginInputFile() override;
 
       /// Function writing the collected metadata to the output
-      virtual StatusCode metaDataStop() override;
+      StatusCode metaDataStop() override;
 
       /// @}
 
-   private:
+ private:
       /// Key of the metadata object for the output file
       std::string m_outputKey;
+};  // class FileMetaDataMarkUpTool
 
-   }; // class FileMetaDataMarkUpTool
-
-} // namespace xAODMaker
+}  // namespace xAODMaker
 
-#endif // XAODMETADATACNV_FILEMETADATAMARKUPTOOL_H
+#endif  // XAODMETADATACNV_FILEMETADATAMARKUPTOOL_H
diff --git a/Event/xAOD/xAODMetaDataCnv/xAODMetaDataCnv/FileMetaDataTool.h b/Event/xAOD/xAODMetaDataCnv/xAODMetaDataCnv/FileMetaDataTool.h
index 01e15dc64ab5..3c3c718a93e5 100644
--- a/Event/xAOD/xAODMetaDataCnv/xAODMetaDataCnv/FileMetaDataTool.h
+++ b/Event/xAOD/xAODMetaDataCnv/xAODMetaDataCnv/FileMetaDataTool.h
@@ -1,10 +1,7 @@
 // Dear emacs, this is -*- c++ -*-
-
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
-
-// $Id: FileMetaDataTool.h 683697 2015-07-17 09:12:14Z krasznaa $
 #ifndef XAODMETADATACNV_FILEMETADATATOOL_H
 #define XAODMETADATACNV_FILEMETADATATOOL_H
 
@@ -16,7 +13,7 @@
 #include "AsgTools/AsgMetadataTool.h"
 #ifndef XAOD_STANDALONE
 #   include "AthenaKernel/IMetaDataTool.h"
-#endif // XAOD_STANDALONE
+#endif  // XAOD_STANDALONE
 
 // EDM include(s):
 #include "xAODMetaData/FileMetaData.h"
@@ -24,37 +21,37 @@
 
 namespace xAODMaker {
 
-   /// Tool taking care of propagating xAOD::FileMetaData information
-   ///
-   /// This dual-use tool can be used both in Athena and in AnalysisBase
-   /// to propagate the generic file-level metadata from the processed
-   /// input files to an output file.
-   ///
-   /// It relies on the input already containing the information in an
-   /// xAOD format.
-   ///
-   /// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
-   ///
-   /// $Revision: 683697 $
-   /// $Date: 2015-07-17 11:12:14 +0200 (Fri, 17 Jul 2015) $
-   ///
-   class FileMetaDataTool : public asg::AsgMetadataTool
+/// Tool taking care of propagating xAOD::FileMetaData information
+///
+/// This dual-use tool can be used both in Athena and in AnalysisBase
+/// to propagate the generic file-level metadata from the processed
+/// input files to an output file.
+///
+/// It relies on the input already containing the information in an
+/// xAOD format.
+///
+/// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
+///
+/// $Revision: 683697 $
+/// $Date: 2015-07-17 11:12:14 +0200 (Fri, 17 Jul 2015) $
+///
+class FileMetaDataTool
+    : public asg::AsgMetadataTool
 #ifndef XAOD_STANDALONE
-                          , public virtual ::IMetaDataTool
-#endif // XAOD_STANDALONE
-   {
-
+    , public virtual ::IMetaDataTool
+#endif  // XAOD_STANDALONE
+{
       /// Declare the correct constructor for Athena
-      ASG_TOOL_CLASS0( FileMetaDataTool )
+      ASG_TOOL_CLASS0(FileMetaDataTool)
 
-   public:
+ public:
       /// Regular AsgTool constructor
-      FileMetaDataTool( const std::string& name = "FileMetaDataTool" );
+      explicit FileMetaDataTool(const std::string& name = "FileMetaDataTool");
 
       /// Function initialising the tool
       virtual StatusCode initialize();
 
-   protected:
+ protected:
       /// @name Functions called by the AsgMetadataTool base class
       /// @{
 
@@ -71,15 +68,15 @@ namespace xAODMaker {
       virtual StatusCode metaDataStop();
 
 #ifndef XAOD_STANDALONE
-   /// Function collecting the metadata from a new input file
-   virtual StatusCode beginInputFile(const SG::SourceID&) {return beginInputFile();}
+      /// Function collecting the metadata from a new input file
+      virtual StatusCode beginInputFile(const SG::SourceID&) {return beginInputFile();}
 
-   /// Function collecting the metadata from a new input file
-   virtual StatusCode endInputFile(const SG::SourceID&) {return endInputFile();}
-#endif // XAOD_STANDALONE
+      /// Function collecting the metadata from a new input file
+      virtual StatusCode endInputFile(const SG::SourceID&) {return endInputFile();}
+#endif  // XAOD_STANDALONE
       /// @}
 
-   private:
+ private:
       /// Key of the metadata object in the input file
       std::string m_inputKey;
       /// Key of the metadata object for the output file
@@ -93,9 +90,8 @@ namespace xAODMaker {
       /// Internal flag for keeping track of whether a BeginInputFile incident
       /// was seen already
       bool m_beginFileIncidentSeen;
+};  // class FileMetaDataTool
 
-   }; // class FileMetaDataTool
-
-} // namespace xAODMaker
+}  // namespace xAODMaker
 
-#endif // XAODMETADATACNV_FILEMETADATATOOL_H
+#endif  // XAODMETADATACNV_FILEMETADATATOOL_H
diff --git a/Event/xAOD/xAODMetaDataCnv/xAODMetaDataCnv/xAODMetaDataCnvAthena.h b/Event/xAOD/xAODMetaDataCnv/xAODMetaDataCnv/xAODMetaDataCnvAthena.h
index d379b0346bd9..aa05a376f510 100644
--- a/Event/xAOD/xAODMetaDataCnv/xAODMetaDataCnv/xAODMetaDataCnvAthena.h
+++ b/Event/xAOD/xAODMetaDataCnv/xAODMetaDataCnv/xAODMetaDataCnvAthena.h
@@ -1,7 +1,6 @@
 // Dear emacs, this is -*- c++ -*-
-
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // $Id: xAODMetaDataCnvAthena.h 670279 2015-05-27 15:18:27Z krasznaa $
diff --git a/Event/xAOD/xAODMetaDataCnv/xAODMetaDataCnv/xAODMetaDataCnvDict.h b/Event/xAOD/xAODMetaDataCnv/xAODMetaDataCnv/xAODMetaDataCnvDict.h
index 557f9d7cbec4..2ba9da9f9e3d 100644
--- a/Event/xAOD/xAODMetaDataCnv/xAODMetaDataCnv/xAODMetaDataCnvDict.h
+++ b/Event/xAOD/xAODMetaDataCnv/xAODMetaDataCnv/xAODMetaDataCnvDict.h
@@ -1,7 +1,6 @@
 // Dear emacs, this is -*- c++ -*-
-
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // $Id: xAODMetaDataCnvDict.h 683697 2015-07-17 09:12:14Z krasznaa $
-- 
GitLab


From 67c6d212a72bac599e222f6819ff27241453e844 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 6 Oct 2020 04:02:30 +0200
Subject: [PATCH 373/403] TrigOutputHandling: Fixes for EL remapping.

In order for EL remapping (as well as thinning/veto) to work properly,
we need to copy aux containers being output via copyAuxStoreThinned.
Implement this in TrigEDMSerializerTool.

Also avoid relying on undefined behavior in TrigEDMDeserialiserAlg.

See ATR-22103.
---
 .../src/TriggerEDMDeserialiserAlg.cxx         | 10 +++++---
 .../src/TriggerEDMSerialiserTool.cxx          | 24 ++++++++++++++++++-
 2 files changed, 30 insertions(+), 4 deletions(-)

diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMDeserialiserAlg.cxx b/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMDeserialiserAlg.cxx
index e5f4ed71f450..a39aa0c19116 100644
--- a/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMDeserialiserAlg.cxx
+++ b/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMDeserialiserAlg.cxx
@@ -178,15 +178,19 @@ StatusCode TriggerEDMDeserialiserAlg::deserialise(   const Payload* dataptr  ) c
       }
 
       if ( isxAODInterfaceContainer ) {
+        static const RootType vbase = RootType::ByNameNoQuiet( "SG::AuxVectorBase" );
 	currentAuxStore = nullptr; // the store will be following, setting it to nullptr assure we catch issue with of missing Aux
-	xAODInterfaceContainer = reinterpret_cast<SG::AuxVectorBase*>(dataBucket->object());
+	xAODInterfaceContainer =
+          reinterpret_cast<SG::AuxVectorBase*>(classDesc.Cast (vbase, dataBucket->object(), true));
       } else if ( isxAODAuxContainer )  {
 	ATH_CHECK( key.back() == '.' );
 	ATH_CHECK( std::count( key.begin(), key.end(), '.')  == 1 );
 	ATH_CHECK( currentAuxStore == nullptr );
 	ATH_CHECK( xAODInterfaceContainer != nullptr );
-	
-	xAOD::AuxContainerBase* auxHolder = reinterpret_cast<xAOD::AuxContainerBase*>(dataBucket->object());
+
+        static const RootType auxinterface = RootType::ByNameNoQuiet( "SG::IAuxStore" );
+	xAOD::AuxContainerBase* auxHolder =
+          reinterpret_cast<xAOD::AuxContainerBase*>(classDesc.Cast (auxinterface, dataBucket->object(), true));
 	ATH_CHECK( auxHolder != nullptr );
 	xAODInterfaceContainer->setStore( auxHolder );
 	currentAuxStore = new WritableAuxStore();
diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMSerialiserTool.cxx b/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMSerialiserTool.cxx
index 18ad4deb0c43..18a291418dd1 100644
--- a/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMSerialiserTool.cxx
+++ b/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMSerialiserTool.cxx
@@ -11,6 +11,7 @@
 #include "AthenaKernel/StorableConversions.h"
 #include "AthContainersInterfaces/IAuxStoreIO.h"
 #include "AthContainers/AuxTypeRegistry.h"
+#include "AthContainers/tools/copyAuxStoreThinned.h"
 #include "AthContainers/debug.h"
 #include "xAODCore/AuxContainerBase.h"
 #include "xAODTrigger/TrigCompositeAuxContainer.h"
@@ -297,7 +298,28 @@ StatusCode TriggerEDMSerialiserTool::serialisexAODAuxContainer( void* data,
   SGImplSvc* evtStore) const
 {
   ATH_MSG_DEBUG("xAOD Aux Container");
-  ATH_CHECK( serialiseContainer( data, address, buffer ) );
+
+  void* copy = data;
+  RootType classDesc = RootType::ByNameNoQuiet( address.persType );
+  static const RootType interface = RootType::ByNameNoQuiet( "SG::IAuxStore" );
+  static const RootType interface_c = RootType::ByNameNoQuiet( "xAOD::AuxContainerBase" );
+
+  void* data_interface = classDesc.Cast (interface_c, data, true);
+  if (data_interface) {
+    const xAOD::AuxContainerBase* store = reinterpret_cast<const xAOD::AuxContainerBase*> (data_interface);
+    copy = classDesc.Construct();
+    void* copy_interface = classDesc.Cast (interface, copy, true);
+    SG::copyAuxStoreThinned (*store,
+                             *reinterpret_cast<SG::IAuxStore*> (copy_interface),
+                             nullptr);
+  }
+
+  ATH_CHECK( serialiseContainer( copy, address, buffer ) );
+
+  if (copy != data) {
+    classDesc.Destruct (copy);
+  }
+
   size_t baseSize = buffer.size();
   if ( not m_saveDynamic )
     return StatusCode::SUCCESS;
-- 
GitLab


From 5f1ca4c142eed2cea45518aa0a56e0ae7248b6ea Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 6 Oct 2020 02:50:03 +0200
Subject: [PATCH 374/403] JetRec: Fix test.

In JetRecAlgTestCfg, need to explicitly set GhostArea in JetClusterer.
Otherwise JRA_trim will crash trying to read it.

This test has been failing for some time with a FATAL error, but no one
was looking at the output, so it was being ignored.
---
 Reconstruction/Jet/JetRec/share/JetRecAlgTestCfg.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Reconstruction/Jet/JetRec/share/JetRecAlgTestCfg.py b/Reconstruction/Jet/JetRec/share/JetRecAlgTestCfg.py
index 9232884db3d3..13c4c42a69c3 100755
--- a/Reconstruction/Jet/JetRec/share/JetRecAlgTestCfg.py
+++ b/Reconstruction/Jet/JetRec/share/JetRecAlgTestCfg.py
@@ -128,6 +128,7 @@ def JetBuildAlgCfg(ConfigFlags,buildjetsname):
     jclust.JetAlgorithm = "AntiKt"
     jclust.JetRadius = 1.0
     jclust.PtMin = 10e3 # MeV
+    jclust.GhostArea = 0.01
     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
-- 
GitLab


From 54579594c9a2fd59aa09b07e7af17bf7a0bb0b49 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 5 Oct 2020 21:12:12 -0400
Subject: [PATCH 375/403] MuonTrackMonitoring: Fix clang warning.

Spurious copy within range-for.
---
 .../MuonDQA/MuonTrackMonitoring/src/RecoMuonSegmentPlots.cxx    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonTrackMonitoring/src/RecoMuonSegmentPlots.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonTrackMonitoring/src/RecoMuonSegmentPlots.cxx
index da495e1c3cdb..d8c2eef6d022 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonTrackMonitoring/src/RecoMuonSegmentPlots.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonTrackMonitoring/src/RecoMuonSegmentPlots.cxx
@@ -33,7 +33,7 @@ void RecoMuonSegmentPlots::fill(const xAOD::Muon& mu){
 //use the link to fill
 void RecoMuonSegmentPlots::fill(const std::vector<ElementLink<DataVector<xAOD::MuonSegment_v1>>> Mu_Segments){
 
-  for(const auto Mu_Segment : Mu_Segments){
+  for(const auto& Mu_Segment : Mu_Segments){
     const ElementLink<DataVector<xAOD::MuonSegment_v1>> Mu_seg = Mu_Segment;
     if(Mu_seg.isValid()){
       const xAOD::MuonSegment* seg = *Mu_seg;
-- 
GitLab


From 568465f27e08088756e7974007ad027a11781ce9 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 5 Oct 2020 21:49:16 -0400
Subject: [PATCH 376/403] InDetOverlay: Fix warnings in TRTOverlay_test.

Disable thread-safety checking for TRTOverlay_test; otherwise we get
warnings from gmock.

Fix some signed/unsigned comparison warnings.

List main source first in the cmake file.
---
 .../InDetRawAlgs/InDetOverlay/CMakeLists.txt  |  2 +-
 .../InDetOverlay/test/TRTOverlay_test.cxx     | 62 ++++++++++---------
 2 files changed, 34 insertions(+), 30 deletions(-)

diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/CMakeLists.txt b/InnerDetector/InDetRawAlgs/InDetOverlay/CMakeLists.txt
index ed109d04c803..45930adf8013 100644
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/CMakeLists.txt
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/CMakeLists.txt
@@ -31,7 +31,7 @@ atlas_add_test( SCTOverlay_test
                 ENVIRONMENT "JOBOPTSEARCHPATH=${_jobOPath}" )
 
 atlas_add_test( TRTOverlay_test
-                SOURCES src/TRTOverlay.cxx test/TRTOverlay_test.cxx
+                SOURCES test/TRTOverlay_test.cxx src/TRTOverlay.cxx
                 INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${GTEST_INCLUDE_DIRS} ${GMOCK_INCLUDE_DIRS}
                 LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps IDC_OverlayBase GaudiKernel InDetRawData StoreGateLib SGtests GeneratorObjects InDetIdentifier InDetSimData TrkTrack TRT_ConditionsServicesLib TRT_ElectronPidToolsLib IdDictParser ${GTEST_LIBRARIES} ${GMOCK_LIBRARIES}
                 ENVIRONMENT "JOBOPTSEARCHPATH=${_jobOPath}" )
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlay_test.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlay_test.cxx
index c9de5b8a2e91..367675951898 100644
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlay_test.cxx
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlay_test.cxx
@@ -9,6 +9,10 @@
 
 #undef NDEBUG
 
+// Otherwise we get warnings about mutable members in gmock.
+#include "CxxUtils/checker_macros.h"
+ATLAS_NO_CHECK_FILE_THREAD_SAFETY;
+
 // Tested AthAlgorithm
 #include "../InDetOverlay/TRTOverlay.h"
 
@@ -65,18 +69,18 @@ namespace OverlayTesting {
     MOCK_CONST_METHOD1(getDetectorOccupancy, std::map<int, double>(const TRT_RDO_Container*) );
 
     // Dummy methods to confirm status
-    virtual StatusCode initialize() override final {
+    virtual StatusCode initialize() final {
       ATH_MSG_INFO ("initializing MockTRT_LocalOccupancy: " << name());
       return StatusCode::SUCCESS;
     };
 
     // dummy methods implementing in pure virtual interface methods (to make class non-abstract)
     /** Return the local occupancy for the sectors crossed by a given track */
-    virtual float LocalOccupancy( const Trk::Track& ) const override { return 1.0; }; // not used - dummy implementation
-    virtual float LocalOccupancy(const double, const double) const  override{ return 1.0; }; // not used - dummy implementation
+    virtual float LocalOccupancy( const Trk::Track& ) const { return 1.0; }; // not used - dummy implementation
+    virtual float LocalOccupancy(const double, const double) const { return 1.0; }; // not used - dummy implementation
 
     /** Return the global occupancy of the event*/
-    virtual std::vector<float> GlobalOccupancy( ) const override { std::vector<float> dummyVect{}; return dummyVect; }; // not used - dummy implementation
+    virtual std::vector<float> GlobalOccupancy( ) const { std::vector<float> dummyVect{}; return dummyVect; }; // not used - dummy implementation
   };
 
   DECLARE_COMPONENT( MockTRT_LocalOccupancy )
@@ -96,23 +100,23 @@ namespace OverlayTesting {
     virtual ~MockTRT_StrawStatusSummaryTool() = default;
 
     // Dummy methods to confirm status
-    virtual StatusCode initialize() override final {
+    virtual StatusCode initialize() final {
       ATH_MSG_INFO ("initializing MockTRT_StrawStatusSummaryTool: " << name());
       return StatusCode::SUCCESS;
     };
 
-    virtual int getStatus(const Identifier ) const override { return 1; }; // not used - dummy implementation
-    virtual int getStatusPermanent(const Identifier) const override { return 1; }; // not used - dummy implementation
+    virtual int getStatus(const Identifier ) const { return 1; }; // not used - dummy implementation
+    virtual int getStatusPermanent(const Identifier) const { return 1; }; // not used - dummy implementation
     MOCK_CONST_METHOD1(getStatusHT, int(const Identifier)); // This is the only method that we actually need! <--------------
-    virtual bool get_status(const Identifier) const override { return false; }; // not used - dummy implementation
-    virtual bool get_statusHT(const Identifier) const override { return false; }; // not used - dummy implementation
-    virtual const StrawStatusContainer* getStrawStatusHTContainer() const override {return nullptr;}; // not used - dummy implementation
+    virtual bool get_status(const Identifier) const { return false; }; // not used - dummy implementation
+    virtual bool get_statusHT(const Identifier) const { return false; }; // not used - dummy implementation
+    virtual const StrawStatusContainer* getStrawStatusHTContainer() const {return nullptr;}; // not used - dummy implementation
 
-    virtual int getStatus(const Identifier, const EventContext&  ) const override { return 1; }; // not used - dummy implementation
-    virtual int getStatusPermanent(const Identifier, const EventContext& ) const override { return 1; }; // not used - dummy implementation
-    virtual int getStatusHT(const Identifier, const EventContext& ) const override { return 1; }; // not used - dummy implementation
-    virtual bool get_status(const Identifier, const EventContext& ) const override { return false; }; // not used - dummy implementation
-    virtual bool get_statusHT(const Identifier, const EventContext& ) const override { return false; }; // not used - dummy implementation
+    virtual int getStatus(const Identifier, const EventContext&  ) const { return 1; }; // not used - dummy implementation
+    virtual int getStatusPermanent(const Identifier, const EventContext& ) const { return 1; }; // not used - dummy implementation
+    virtual int getStatusHT(const Identifier, const EventContext& ) const { return 1; }; // not used - dummy implementation
+    virtual bool get_status(const Identifier, const EventContext& ) const { return false; }; // not used - dummy implementation
+    virtual bool get_statusHT(const Identifier, const EventContext& ) const { return false; }; // not used - dummy implementation
 
   };
 
@@ -359,7 +363,7 @@ namespace OverlayTesting {
     // check output makes sense
     SG::ReadHandle<TRT_RDO_Container> outputDataHandle{"StoreGateSvc+TRT_RDOs"};
     ASSERT_TRUE( outputDataHandle.isValid() );
-    ASSERT_EQ( outputDataHandle->numberOfCollections(), 0 );
+    ASSERT_EQ( outputDataHandle->numberOfCollections(), 0u );
   }
 
   TEST_F(TRTOverlay_test, containers_with_matching_empty_collections) {
@@ -390,7 +394,7 @@ namespace OverlayTesting {
     // check output makes sense
     SG::ReadHandle<TRT_RDO_Container> outputDataHandle{"StoreGateSvc+TRT_RDOs"};
     ASSERT_TRUE( outputDataHandle.isValid() );
-    ASSERT_EQ( outputDataHandle->numberOfCollections(),1 );
+    ASSERT_EQ( outputDataHandle->numberOfCollections(),1u );
     const TRT_RDO_Collection *outputCollection = outputDataHandle->indexFindPtr(sigElementHash);
     ASSERT_NE( outputCollection, nullptr );
     ASSERT_TRUE( outputCollection->empty() );
@@ -424,7 +428,7 @@ namespace OverlayTesting {
     // check output makes sense
     SG::ReadHandle<TRT_RDO_Container> outputDataHandle{"StoreGateSvc+TRT_RDOs"};
     ASSERT_TRUE( outputDataHandle.isValid() );
-    ASSERT_EQ( outputDataHandle->numberOfCollections(), 2 );
+    ASSERT_EQ( outputDataHandle->numberOfCollections(), 2u );
     const TRT_RDO_Collection *outputCollection1 = outputDataHandle->indexFindPtr(sigElementHash);
     ASSERT_NE( outputCollection1, nullptr );
     ASSERT_TRUE( outputCollection1->empty() );
@@ -482,10 +486,10 @@ namespace OverlayTesting {
     // check output makes sense
     SG::ReadHandle<TRT_RDO_Container> outputDataHandle{"StoreGateSvc+TRT_RDOs"};
     ASSERT_TRUE( outputDataHandle.isValid() );
-    ASSERT_EQ( outputDataHandle->numberOfCollections(), 1 );
+    ASSERT_EQ( outputDataHandle->numberOfCollections(), 1u );
     const TRT_RDO_Collection *outputCollection1 = outputDataHandle->indexFindPtr(sigElementHash);
     ASSERT_NE( outputCollection1, nullptr );
-    ASSERT_EQ( outputCollection1->size(), 1 );
+    ASSERT_EQ( outputCollection1->size(), 1u );
     const TRT_LoLumRawData* outputDigit1 = dynamic_cast<const TRT_LoLumRawData*>(outputCollection1->at(0));
     ASSERT_NE( outputDigit1, nullptr );
     ASSERT_EQ( outputDigit1->highLevel(), sigHT );
@@ -561,7 +565,7 @@ namespace OverlayTesting {
     ASSERT_TRUE( outputDataHandle.isValid() );
     const TRT_RDO_Collection *outputCollection1 = outputDataHandle->indexFindPtr(sigElementHash);
     ASSERT_NE( outputCollection1, nullptr );
-    ASSERT_EQ( outputCollection1->size(), 1 );
+    ASSERT_EQ( outputCollection1->size(), 1u );
     const TRT_LoLumRawData* outputDigit1 = dynamic_cast<const TRT_LoLumRawData*>(outputCollection1->at(0));
     ASSERT_NE( outputDigit1, nullptr );
     ASSERT_EQ( outputDigit1->highLevel(), sigHT );
@@ -569,7 +573,7 @@ namespace OverlayTesting {
     ASSERT_EQ( outputDigit1->driftTimeBin(), sigDriftTimeBin );
     const TRT_RDO_Collection *outputCollection2 = outputDataHandle->indexFindPtr(bkgElementHash);
     ASSERT_NE( outputCollection2, nullptr );
-    ASSERT_EQ( outputCollection2->size(), 1 );
+    ASSERT_EQ( outputCollection2->size(), 1u );
     const TRT_LoLumRawData* outputDigit2 = dynamic_cast<const TRT_LoLumRawData*>(outputCollection2->at(0));
     ASSERT_NE( outputDigit2, nullptr );
     ASSERT_EQ( outputDigit2->highLevel(), bkgHT );
@@ -637,7 +641,7 @@ namespace OverlayTesting {
     ASSERT_TRUE( outputDataHandle.isValid() );
     const TRT_RDO_Collection *outputCollection1 = outputDataHandle->indexFindPtr(sigElementHash);
     ASSERT_NE( outputCollection1, nullptr );
-    ASSERT_EQ( outputCollection1->size(), 1 );
+    ASSERT_EQ( outputCollection1->size(), 1u );
     const TRT_LoLumRawData* outputDigit1 = dynamic_cast<const TRT_LoLumRawData*>(outputCollection1->at(0));
     ASSERT_NE( outputDigit1, nullptr );
     ASSERT_EQ( outputDigit1->highLevel(), sigHT );
@@ -723,12 +727,12 @@ namespace OverlayTesting {
     ASSERT_TRUE( outputDataHandle.isValid() );
     const TRT_RDO_Collection *outputCollection1 = outputDataHandle->indexFindPtr(sigElementHash);
     ASSERT_NE( outputCollection1, nullptr );
-    ASSERT_EQ( outputCollection1->size(), 1 );
+    ASSERT_EQ( outputCollection1->size(), 1u );
     const TRT_LoLumRawData* outputDigit1 = dynamic_cast<const TRT_LoLumRawData*>(outputCollection1->at(0));
     ASSERT_NE( outputDigit1, nullptr );
     ASSERT_EQ( outputDigit1->highLevel(), sigHT );
     ASSERT_EQ( outputDigit1->timeOverThreshold(), outputTOT );
-    ASSERT_EQ( outputDigit1->driftTimeBin(), outputDriftTimeBin );
+    ASSERT_EQ( outputDigit1->driftTimeBin(), static_cast<int>(outputDriftTimeBin) );
   }
 
   TEST_F(TRTOverlay_test, containers_with_matching_collections_with_differing_LT_RDOs_same_strawID) {
@@ -821,12 +825,12 @@ namespace OverlayTesting {
     ASSERT_TRUE( outputDataHandle.isValid() );
     const TRT_RDO_Collection *outputCollection1 = outputDataHandle->indexFindPtr(sigElementHash);
     ASSERT_NE( outputCollection1, nullptr );
-    ASSERT_EQ( outputCollection1->size(), 1 );
+    ASSERT_EQ( outputCollection1->size(), 1u );
     const TRT_LoLumRawData* outputDigit1 = dynamic_cast<const TRT_LoLumRawData*>(outputCollection1->at(0));
     ASSERT_NE( outputDigit1, nullptr );
     ASSERT_EQ( outputDigit1->highLevel(), sigHT );
     ASSERT_EQ( outputDigit1->timeOverThreshold(), outputTOT );
-    ASSERT_EQ( outputDigit1->driftTimeBin(), outputDriftTimeBin );
+    ASSERT_EQ( outputDigit1->driftTimeBin(), static_cast<int>(outputDriftTimeBin) );
   }
 
   TEST_F(TRTOverlay_test, containers_with_matching_collections_with_differing_LT_RDOs_same_strawID_ForceHTbit) {
@@ -918,12 +922,12 @@ namespace OverlayTesting {
     ASSERT_TRUE( outputDataHandle.isValid() );
     const TRT_RDO_Collection *outputCollection1 = outputDataHandle->indexFindPtr(sigElementHash);
     ASSERT_NE( outputCollection1, nullptr );
-    ASSERT_EQ( outputCollection1->size(), 1 );
+    ASSERT_EQ( outputCollection1->size(), 1u );
     const TRT_LoLumRawData* outputDigit1 = dynamic_cast<const TRT_LoLumRawData*>(outputCollection1->at(0));
     ASSERT_NE( outputDigit1, nullptr );
     ASSERT_EQ( outputDigit1->highLevel(), true );
     ASSERT_EQ( outputDigit1->timeOverThreshold(), outputTOT );
-    ASSERT_EQ( outputDigit1->driftTimeBin(), outputDriftTimeBin );
+    ASSERT_EQ( outputDigit1->driftTimeBin(), static_cast<int>(outputDriftTimeBin) );
   }
 
 } // <-- namespace OverlayTesting
-- 
GitLab


From dbf44fcbe89ee075e5aa1a9cbf3f4097cf5fcb5c Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Sat, 3 Oct 2020 20:42:46 -0400
Subject: [PATCH 377/403] SiClusterOnTrackTool: cmake fix

Library dependency fix.
---
 .../SiClusterOnTrackTool/CMakeLists.txt       | 29 +------------------
 1 file changed, 1 insertion(+), 28 deletions(-)

diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/CMakeLists.txt b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/CMakeLists.txt
index c4c645b4ee8e..7b3574e7378a 100644
--- a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/CMakeLists.txt
+++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/CMakeLists.txt
@@ -5,33 +5,6 @@
 # Declare the package name:
 atlas_subdir( SiClusterOnTrackTool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          DetectorDescription/GeoPrimitives
-                          GaudiKernel
-                          InnerDetector/InDetConditions/InDetCondTools
-                          InnerDetector/InDetDetDescr/SCT_ModuleDistortions
-                          InnerDetector/InDetRecEvent/InDetPrepRawData
-                          InnerDetector/InDetRecEvent/InDetRIO_OnTrack
-                          Tracking/TrkEvent/TrkParameters
-                          Tracking/TrkTools/TrkToolInterfaces
-                          Tracking/TrkEvent/TrkRIO_OnTrack
-                          Tracking/TrkEvent/TrkEventUtils
-                          Tracking/TrkUtilityPackages/TrkNeuralNetworkUtils
-                          Control/StoreGate
-                          PRIVATE
-                          Event/EventPrimitives
-                          InnerDetector/InDetConditions/PixelConditionsTools
-                          InnerDetector/InDetConditions/PixelConditionsData
-                          InnerDetector/InDetDetDescr/InDetIdentifier
-                          InnerDetector/InDetDetDescr/InDetReadoutGeometry
-			  InnerDetector/InDetDetDescr/PixelReadoutGeometry
-                          InnerDetector/InDetDetDescr/PixelGeoModel
-                          InnerDetector/InDetRecTools/SiClusterizationTool
-                          Tracking/TrkDetDescr/TrkSurfaces )
-
 # External dependencies:
 find_package( Eigen )
 
@@ -40,7 +13,7 @@ atlas_add_component( SiClusterOnTrackTool
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps AthenaPoolUtilities GeoPrimitives GaudiKernel InDetPrepRawData InDetRIO_OnTrack TrkParameters TrkToolInterfaces StoreGateLib SGtests EventPrimitives InDetIdentifier InDetReadoutGeometry PixelReadoutGeometry SiClusterizationToolLib TrkSurfaces TrkRIO_OnTrack PixelConditionsData TrkNeuralNetworkUtilsLib TrkEventUtils)
+                     LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps AthenaPoolUtilities GeoPrimitives GaudiKernel InDetPrepRawData InDetRIO_OnTrack TrkParameters TrkToolInterfaces StoreGateLib SGtests EventPrimitives InDetIdentifier InDetReadoutGeometry PixelReadoutGeometry SiClusterizationToolLib TrkSurfaces TrkRIO_OnTrack PixelConditionsData TrkNeuralNetworkUtilsLib TrkEventUtils SCT_ModuleDistortionsLib )
 
 # Install files from the package:
 atlas_install_headers( SiClusterOnTrackTool )
-- 
GitLab


From f2ce9045be5f11e238260e5cbcc1957e1854addc Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Tue, 6 Oct 2020 16:51:16 -0400
Subject: [PATCH 378/403] TileSimEvent: Enable thread-safety checking.

Enable thread-safety checking.
Clean up resulting warnings.
---
 .../TileSimEvent/TileSimEvent/ATLAS_CHECK_THREAD_SAFETY     | 1 +
 TileCalorimeter/TileSimEvent/src/TileHit.cxx                | 6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)
 create mode 100644 TileCalorimeter/TileSimEvent/TileSimEvent/ATLAS_CHECK_THREAD_SAFETY

diff --git a/TileCalorimeter/TileSimEvent/TileSimEvent/ATLAS_CHECK_THREAD_SAFETY b/TileCalorimeter/TileSimEvent/TileSimEvent/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 000000000000..d38aea3cadff
--- /dev/null
+++ b/TileCalorimeter/TileSimEvent/TileSimEvent/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+TileCalorimeter/TileSimEvent
diff --git a/TileCalorimeter/TileSimEvent/src/TileHit.cxx b/TileCalorimeter/TileSimEvent/src/TileHit.cxx
index 366c386ddc83..6dd6c3ad8047 100755
--- a/TileCalorimeter/TileSimEvent/src/TileHit.cxx
+++ b/TileCalorimeter/TileSimEvent/src/TileHit.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
 */
 
 //********************************************************************
@@ -30,8 +30,10 @@
 #include <cmath>
 
 
+namespace {
 // get cabling
-TileCablingService * s_cabling = TileCablingService::getInstance();
+const TileCablingService * const s_cabling = TileCablingService::getInstance();
+}
 
 TileHit::TileHit(const Identifier & id, float energy, float time)
     : m_pmt_id( id )
-- 
GitLab


From 9035559adc01ed78ed577261b9db2185ab5378f8 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Thu, 8 Oct 2020 16:35:46 +0200
Subject: [PATCH 379/403] Event: cmake cleanup

Remove `atlas_depends_on_subdirs` and cleanup link dependencies.
---
 .../xAODAssociationsAthenaPool/CMakeLists.txt | 21 ++---------
 Event/xAOD/xAODBPhys/CMakeLists.txt           | 36 ++++---------------
 Event/xAOD/xAODBTaggingCnv/CMakeLists.txt     | 15 +-------
 Event/xAOD/xAODCaloEventCnv/CMakeLists.txt    | 22 ++----------
 Event/xAOD/xAODCnvInterfaces/CMakeLists.txt   |  8 +----
 Event/xAOD/xAODCoreAthenaPool/CMakeLists.txt  | 17 ++-------
 .../xAOD/xAODCutFlowAthenaPool/CMakeLists.txt | 12 +------
 Event/xAOD/xAODEgammaCnv/CMakeLists.txt       | 19 +---------
 .../xAODEventFormatAthenaPool/CMakeLists.txt  | 10 +-----
 Event/xAOD/xAODEventFormatCnv/CMakeLists.txt  |  6 ----
 .../xAOD/xAODForwardAthenaPool/CMakeLists.txt | 13 +------
 Event/xAOD/xAODForwardCnv/CMakeLists.txt      | 23 +++++-------
 .../xAOD/xAODHIEventAthenaPool/CMakeLists.txt | 12 +------
 Event/xAOD/xAODJetCnv/CMakeLists.txt          | 17 +--------
 .../xAODLuminosityAthenaPool/CMakeLists.txt   | 10 +-----
 .../xAODMetaDataAthenaPool/CMakeLists.txt     | 10 +-----
 Event/xAOD/xAODMetaDataCnv/CMakeLists.txt     | 25 +------------
 .../xAODMissingETAthenaPool/CMakeLists.txt    |  9 -----
 Event/xAOD/xAODMissingETCnv/CMakeLists.txt    | 12 +------
 Event/xAOD/xAODTauCnv/CMakeLists.txt          | 16 +--------
 Event/xAOD/xAODTrackingCnv/CMakeLists.txt     | 27 +-------------
 21 files changed, 35 insertions(+), 305 deletions(-)

diff --git a/Event/xAOD/xAODAssociationsAthenaPool/CMakeLists.txt b/Event/xAOD/xAODAssociationsAthenaPool/CMakeLists.txt
index d8e535d0bca7..5c66be090653 100644
--- a/Event/xAOD/xAODAssociationsAthenaPool/CMakeLists.txt
+++ b/Event/xAOD/xAODAssociationsAthenaPool/CMakeLists.txt
@@ -1,29 +1,12 @@
-################################################################################
-# Package: xAODAssociationsAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODAssociationsAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          Control/AthContainers
-                          Control/AthenaKernel
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Event/xAOD/xAODAssociations
-                          Event/xAOD/xAODCaloEvent
-                          Event/xAOD/xAODTracking )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( xAODAssociationsAthenaPoolPoolCnv
                            src/*.cxx
                            FILES xAODAssociations/TrackParticleClusterAssociationContainer.h xAODAssociations/TrackParticleClusterAssociationAuxContainer.h
                            TYPES_WITH_NAMESPACE xAOD::TrackParticleClusterAssociationContainer xAOD::TrackParticleClusterAssociationAuxContainer
                            CNV_PFX xAOD
-                           INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                           LINK_LIBRARIES ${ROOT_LIBRARIES} AthContainers AthenaKernel AthenaPoolCnvSvcLib AthenaPoolUtilities xAODAssociations xAODCaloEvent xAODTracking )
-
+                           LINK_LIBRARIES AthenaPoolCnvSvcLib xAODAssociations )
diff --git a/Event/xAOD/xAODBPhys/CMakeLists.txt b/Event/xAOD/xAODBPhys/CMakeLists.txt
index 22379b569ea3..127e26aa78a5 100644
--- a/Event/xAOD/xAODBPhys/CMakeLists.txt
+++ b/Event/xAOD/xAODBPhys/CMakeLists.txt
@@ -1,37 +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
 
-# $Id: CMakeLists.txt 805745 2017-05-31 17:23:48Z wwalko $
-#
-# Build configuration for the package.
-#
-#********************************************
-# The name of the package:
+# Declare the package name:
 atlas_subdir( xAODBPhys )
 
-# Package dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Event/xAOD/xAODTracking
-   Event/xAOD/xAODMuon
-   Event/xAOD/xAODMetaData
-   Event/xAOD/xAODEgamma
-   PRIVATE
-   )
-
 # Used external(s):
 find_package( ROOT COMPONENTS Core Physics Matrix )
 
 # Build the main library of the package: 
 atlas_add_library( xAODBPhysLib
-		   xAODBPhys/*.h Root/*.cxx src/*.cxx
-		   PUBLIC_HEADERS xAODBPhys
-		   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-		   LINK_LIBRARIES ${ROOT_LIBRARIES} 
-		   xAODTracking
-		   xAODMuon
-                   xAODEgamma
-		   xAODMetaData
-		   )
-
+		           xAODBPhys/*.h Root/*.cxx src/*.cxx
+		           PUBLIC_HEADERS xAODBPhys
+		           INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+		           LINK_LIBRARIES ${ROOT_LIBRARIES} xAODEgamma xAODMetaData xAODMuon xAODTracking
+                   PRIVATE_LINK_LIBRARIES AthContainers )
diff --git a/Event/xAOD/xAODBTaggingCnv/CMakeLists.txt b/Event/xAOD/xAODBTaggingCnv/CMakeLists.txt
index 0b0a965c1520..25eb186e01d8 100644
--- a/Event/xAOD/xAODBTaggingCnv/CMakeLists.txt
+++ b/Event/xAOD/xAODBTaggingCnv/CMakeLists.txt
@@ -1,29 +1,16 @@
-################################################################################
-# Package: xAODBTaggingCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODBTaggingCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Event/xAOD/xAODBTagging
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          GaudiKernel
-                          Trigger/TrigEvent/TrigParticle )
-
 atlas_add_library( xAODBTaggingCnvLib
                    xAODBTaggingCnv/*.h
                    INTERFACE
                    PUBLIC_HEADERS xAODBTaggingCnv
                    LINK_LIBRARIES GaudiKernel xAODBTagging )
 
-
 # Component(s) in the package:
 atlas_add_component( xAODBTaggingCnv
                      src/*.cxx
                      src/components/*.cxx
                      LINK_LIBRARIES xAODBTaggingCnvLib xAODBTagging AthenaBaseComps AthenaKernel GaudiKernel TrigParticle )
-
diff --git a/Event/xAOD/xAODCaloEventCnv/CMakeLists.txt b/Event/xAOD/xAODCaloEventCnv/CMakeLists.txt
index f9e353c36dac..11d631f92f47 100644
--- a/Event/xAOD/xAODCaloEventCnv/CMakeLists.txt
+++ b/Event/xAOD/xAODCaloEventCnv/CMakeLists.txt
@@ -1,25 +1,8 @@
-################################################################################
-# Package: xAODCaloEventCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODCaloEventCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Event/xAOD/xAODCaloEvent
-                          PRIVATE
-                          AtlasTest/TestTools
-                          Calorimeter/CaloEvent
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Event/EventKernel
-                          GaudiKernel )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
-
 # Component(s) in the package:
 atlas_add_library( xAODCaloEventCnvLib
                    xAODCaloEventCnv/*.h
@@ -31,8 +14,7 @@ atlas_add_library( xAODCaloEventCnvLib
 atlas_add_component( xAODCaloEventCnv
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} xAODCaloEventCnvLib xAODCaloEvent CaloEvent AthenaBaseComps AthenaKernel EventKernel GaudiKernel )
+                     LINK_LIBRARIES xAODCaloEventCnvLib xAODCaloEvent CaloEvent AthenaBaseComps AthenaKernel GaudiKernel )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/Event/xAOD/xAODCnvInterfaces/CMakeLists.txt b/Event/xAOD/xAODCnvInterfaces/CMakeLists.txt
index 8564104a2026..72863cae61b8 100644
--- a/Event/xAOD/xAODCnvInterfaces/CMakeLists.txt
+++ b/Event/xAOD/xAODCnvInterfaces/CMakeLists.txt
@@ -1,14 +1,8 @@
-################################################################################
-# Package: xAODCnvInterfaces
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODCnvInterfaces )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel )
-
 # Component(s) in the package:
 atlas_add_library( xAODCnvInterfaces
                    PUBLIC_HEADERS xAODCnvInterfaces
diff --git a/Event/xAOD/xAODCoreAthenaPool/CMakeLists.txt b/Event/xAOD/xAODCoreAthenaPool/CMakeLists.txt
index 3b84a08b33f6..400a9823e47b 100644
--- a/Event/xAOD/xAODCoreAthenaPool/CMakeLists.txt
+++ b/Event/xAOD/xAODCoreAthenaPool/CMakeLists.txt
@@ -1,20 +1,8 @@
-# $Id: CMakeLists.txt 769660 2016-08-23 15:51:19Z krasznaa $
-################################################################################
-# Package: xAODCoreAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODCoreAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PRIVATE
-   Control/AthContainers
-   Control/AthenaKernel
-   Database/AthenaPOOL/AthenaPoolCnvSvc
-   Database/AthenaPOOL/AthenaPoolUtilities
-   Event/xAOD/xAODCore )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( xAODCoreAthenaPoolPoolCnv
    src/*.cxx
@@ -23,5 +11,4 @@ atlas_add_poolcnv_library( xAODCoreAthenaPoolPoolCnv
    TYPES_WITH_NAMESPACE xAOD::AuxInfoBase xAOD::AuxContainerBase
    xAOD::ShallowAuxContainer xAOD::ShallowAuxInfo
    CNV_PFX xAOD
-   LINK_LIBRARIES AthContainers AthenaKernel AthenaPoolCnvSvcLib
-   AthenaPoolUtilities xAODCore )
+   LINK_LIBRARIES AthContainers AthenaKernel AthenaPoolCnvSvcLib xAODCore )
diff --git a/Event/xAOD/xAODCutFlowAthenaPool/CMakeLists.txt b/Event/xAOD/xAODCutFlowAthenaPool/CMakeLists.txt
index db6958fcbcf4..d9c7076aca6d 100644
--- a/Event/xAOD/xAODCutFlowAthenaPool/CMakeLists.txt
+++ b/Event/xAOD/xAODCutFlowAthenaPool/CMakeLists.txt
@@ -1,18 +1,8 @@
-################################################################################
-# Package: xAODCutFlowAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODCutFlowAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          Control/AthContainers
-                          Control/AthenaKernel
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Event/xAOD/xAODCutFlow )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( xAODCutFlowAthenaPoolPoolCnv
                            src/*.cxx
diff --git a/Event/xAOD/xAODEgammaCnv/CMakeLists.txt b/Event/xAOD/xAODEgammaCnv/CMakeLists.txt
index b49dc176ad89..4f240116163a 100644
--- a/Event/xAOD/xAODEgammaCnv/CMakeLists.txt
+++ b/Event/xAOD/xAODEgammaCnv/CMakeLists.txt
@@ -1,25 +1,8 @@
-################################################################################
-# Package: xAODEgammaCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODEgammaCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthContainers
-                          Event/xAOD/xAODEgamma
-                          GaudiKernel
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Event/FourMom
-                          Event/xAOD/xAODTracking
-                          Event/xAOD/xAODTruth
-                          PhysicsAnalysis/AnalysisCommon/ParticleEvent
-                          Reconstruction/Particle
-                          Reconstruction/egamma/egammaEvent )
-
 # Component(s) in the package:
 atlas_add_library( xAODEgammaCnvLib
                    xAODEgammaCnv/*.h
diff --git a/Event/xAOD/xAODEventFormatAthenaPool/CMakeLists.txt b/Event/xAOD/xAODEventFormatAthenaPool/CMakeLists.txt
index 6f4931291178..37216a7264b7 100644
--- a/Event/xAOD/xAODEventFormatAthenaPool/CMakeLists.txt
+++ b/Event/xAOD/xAODEventFormatAthenaPool/CMakeLists.txt
@@ -1,16 +1,8 @@
-################################################################################
-# Package: xAODEventFormatAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODEventFormatAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Event/xAOD/xAODEventFormat )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( xAODEventFormatAthenaPoolPoolCnv
                            src/*.cxx
diff --git a/Event/xAOD/xAODEventFormatCnv/CMakeLists.txt b/Event/xAOD/xAODEventFormatCnv/CMakeLists.txt
index b488fbda41a5..c24bb3a933b7 100644
--- a/Event/xAOD/xAODEventFormatCnv/CMakeLists.txt
+++ b/Event/xAOD/xAODEventFormatCnv/CMakeLists.txt
@@ -34,7 +34,6 @@ atlas_add_library( xAODEventFormatCnvTestLib
     xAODEventFormat
   PRIVATE_LINK_LIBRARIES AthenaBaseComps StoreGateLib )
 
-
 atlas_add_poolcnv_library( xAODEventFormatCnvTestAthenaPoolCnv
   src/test/cnv/*.h src/test/cnv/*.cxx
   FILES
@@ -65,14 +64,9 @@ atlas_add_xaod_smart_pointer_dicts(
   OUTPUT _selectionFile
   CONTAINERS "xAODMakerTest::AVec_v1" )
 
-
 # Install files from the package.
 atlas_install_joboptions( share/*.py )
 
-atlas_depends_on_subdirs(
-  PUBLIC
-  PRIVATE AtlasTest/TestTools )
-
 # Test(s) in the package.
 atlas_add_test( Write
   SCRIPT athena.py --threads=8 xAODEventFormatCnv/EventFormatWriteTestJobOptions.py )
diff --git a/Event/xAOD/xAODForwardAthenaPool/CMakeLists.txt b/Event/xAOD/xAODForwardAthenaPool/CMakeLists.txt
index 911634a1081a..8f4bb12e8177 100644
--- a/Event/xAOD/xAODForwardAthenaPool/CMakeLists.txt
+++ b/Event/xAOD/xAODForwardAthenaPool/CMakeLists.txt
@@ -1,19 +1,8 @@
-################################################################################
-# Package: xAODForwardAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODForwardAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PRIVATE
-   Control/AthContainers
-   Control/AthenaKernel
-   Database/AthenaPOOL/AthenaPoolCnvSvc
-   Database/AthenaPOOL/AthenaPoolUtilities
-   Event/xAOD/xAODForward )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( xAODForwardAthenaPoolPoolCnv
    src/*.h src/*.cxx
diff --git a/Event/xAOD/xAODForwardCnv/CMakeLists.txt b/Event/xAOD/xAODForwardCnv/CMakeLists.txt
index 15e2400edb81..1fe8dff71a3a 100644
--- a/Event/xAOD/xAODForwardCnv/CMakeLists.txt
+++ b/Event/xAOD/xAODForwardCnv/CMakeLists.txt
@@ -1,28 +1,21 @@
-################################################################################
-# Package: xAODForwardCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODForwardCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Event/xAOD/xAODForward
-                          GaudiKernel
-                          TileCalorimeter/TileEvent
-                          TileCalorimeter/TileIdentifier
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel )
-
 # Component(s) in the package:
+atlas_add_library( xAODForwardCnvLib
+                   xAODForwardCnv/*.h
+                   INTERFACE
+                   PUBLIC_HEADERS xAODForwardCnv
+                   LINK_LIBRARIES GaudiKernel TileEvent xAODForward )
+
 atlas_add_component( xAODForwardCnv
                      src/*.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES xAODForward GaudiKernel TileEvent TileIdentifier AthenaBaseComps AthenaKernel )
+                     LINK_LIBRARIES xAODForward GaudiKernel TileEvent TileIdentifier AthenaBaseComps AthenaKernel xAODForwardCnvLib )
 
 # Install files from the package:
-atlas_install_headers( xAODForwardCnv )
 atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/*.py )
 
diff --git a/Event/xAOD/xAODHIEventAthenaPool/CMakeLists.txt b/Event/xAOD/xAODHIEventAthenaPool/CMakeLists.txt
index 0da0001ff3c4..d1b086f02d63 100644
--- a/Event/xAOD/xAODHIEventAthenaPool/CMakeLists.txt
+++ b/Event/xAOD/xAODHIEventAthenaPool/CMakeLists.txt
@@ -1,18 +1,8 @@
-################################################################################
-# Package: xAODHIEventAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODHIEventAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          Control/AthContainers
-                          Control/AthenaKernel
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Event/xAOD/xAODHIEvent )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( xAODHIEventAthenaPoolPoolCnv
                            src/*.cxx
diff --git a/Event/xAOD/xAODJetCnv/CMakeLists.txt b/Event/xAOD/xAODJetCnv/CMakeLists.txt
index ebe42202f992..f03c03e7cb03 100644
--- a/Event/xAOD/xAODJetCnv/CMakeLists.txt
+++ b/Event/xAOD/xAODJetCnv/CMakeLists.txt
@@ -1,29 +1,14 @@
-################################################################################
-# Package: xAODJetCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODJetCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthLinks
-                          Event/xAOD/xAODBase
-                          Event/xAOD/xAODJet
-                          GaudiKernel
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          Reconstruction/Jet/JetEvent )
-
 atlas_add_library( xAODJetCnvLib
                    xAODJetCnv/*.h
                    INTERFACE
                    PUBLIC_HEADERS xAODJetCnv
                    LINK_LIBRARIES GaudiKernel xAODJet xAODBase AthLinks )
 
-
 # Component(s) in the package:
 atlas_add_component( xAODJetCnv
                      src/*.cxx
diff --git a/Event/xAOD/xAODLuminosityAthenaPool/CMakeLists.txt b/Event/xAOD/xAODLuminosityAthenaPool/CMakeLists.txt
index 87319204976a..5e5ddd8633cb 100644
--- a/Event/xAOD/xAODLuminosityAthenaPool/CMakeLists.txt
+++ b/Event/xAOD/xAODLuminosityAthenaPool/CMakeLists.txt
@@ -1,16 +1,8 @@
-################################################################################
-# Package: xAODLuminosityAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODLuminosityAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Event/xAOD/xAODLuminosity )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( xAODLuminosityAthenaPoolPoolCnv
                            src/*.cxx
diff --git a/Event/xAOD/xAODMetaDataAthenaPool/CMakeLists.txt b/Event/xAOD/xAODMetaDataAthenaPool/CMakeLists.txt
index 909a743fe509..399ee39794c1 100644
--- a/Event/xAOD/xAODMetaDataAthenaPool/CMakeLists.txt
+++ b/Event/xAOD/xAODMetaDataAthenaPool/CMakeLists.txt
@@ -1,16 +1,8 @@
-################################################################################
-# Package: xAODMetaDataAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODMetaDataAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Event/xAOD/xAODMetaData )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( xAODMetaDataAthenaPoolPoolCnv
                            src/*.cxx
diff --git a/Event/xAOD/xAODMetaDataCnv/CMakeLists.txt b/Event/xAOD/xAODMetaDataCnv/CMakeLists.txt
index 480b16fc6a00..101270ff9e4d 100644
--- a/Event/xAOD/xAODMetaDataCnv/CMakeLists.txt
+++ b/Event/xAOD/xAODMetaDataCnv/CMakeLists.txt
@@ -1,31 +1,8 @@
-# $Id: CMakeLists.txt 744578 2016-05-03 16:26:20Z krasznaa $
-################################################################################
-# Package: xAODMetaDataCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODMetaDataCnv )
 
-# Extra dependencies, based on the environment that we're in:
-if( NOT XAOD_STANDALONE )
-  set(
-    extra_deps
-    GaudiKernel
-    PRIVATE
-    Control/AthenaKernel
-    Database/AthenaPOOL/AthenaPoolUtilities
-    Event/EventInfo
-  )
-endif()
-
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-  PUBLIC
-  Control/AthToolSupport/AsgTools
-  Event/xAOD/xAODMetaData
-  ${extra_deps}
-)
-
 # Build the package differently in standalone and Athena modes:
 if( XAOD_STANDALONE )
 
diff --git a/Event/xAOD/xAODMissingETAthenaPool/CMakeLists.txt b/Event/xAOD/xAODMissingETAthenaPool/CMakeLists.txt
index fe3fdf7cc08a..06da5811a3e6 100644
--- a/Event/xAOD/xAODMissingETAthenaPool/CMakeLists.txt
+++ b/Event/xAOD/xAODMissingETAthenaPool/CMakeLists.txt
@@ -3,15 +3,6 @@
 # Declare the package name:
 atlas_subdir( xAODMissingETAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          Control/AthContainers
-                          Control/AthenaKernel
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Event/xAOD/xAODMissingET
-                          GaudiKernel )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( xAODMissingETAthenaPoolPoolCnv
    src/*.h src/*.cxx
diff --git a/Event/xAOD/xAODMissingETCnv/CMakeLists.txt b/Event/xAOD/xAODMissingETCnv/CMakeLists.txt
index 25061b5122e9..11aa6b3fefc8 100644
--- a/Event/xAOD/xAODMissingETCnv/CMakeLists.txt
+++ b/Event/xAOD/xAODMissingETCnv/CMakeLists.txt
@@ -1,18 +1,8 @@
-################################################################################
-# Package: xAODMissingETCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODMissingETCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Event/xAOD/xAODMissingET
-                          GaudiKernel
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Reconstruction/MissingETEvent )
-
 # Component(s) in the package:
 atlas_add_component( xAODMissingETCnv
                      src/*.cxx
diff --git a/Event/xAOD/xAODTauCnv/CMakeLists.txt b/Event/xAOD/xAODTauCnv/CMakeLists.txt
index bd43c731e295..370af6d8d802 100644
--- a/Event/xAOD/xAODTauCnv/CMakeLists.txt
+++ b/Event/xAOD/xAODTauCnv/CMakeLists.txt
@@ -1,28 +1,14 @@
-################################################################################
-# Package: xAODTauCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODTauCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthContainers
-                          Event/xAOD/xAODTau
-                          Reconstruction/tauEvent
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          GaudiKernel
-				 )
-
 atlas_add_library( xAODTauCnvLib
                    xAODTauCnv/*.h
                    INTERFACE
                    PUBLIC_HEADERS xAODTauCnv
                    LINK_LIBRARIES GaudiKernel AthContainers xAODTau tauEvent )
 
-
 # Component(s) in the package:
 atlas_add_component( xAODTauCnv
                      src/*.cxx
diff --git a/Event/xAOD/xAODTrackingCnv/CMakeLists.txt b/Event/xAOD/xAODTrackingCnv/CMakeLists.txt
index df9daef57bca..d48e57d6c758 100644
--- a/Event/xAOD/xAODTrackingCnv/CMakeLists.txt
+++ b/Event/xAOD/xAODTrackingCnv/CMakeLists.txt
@@ -1,33 +1,8 @@
-# $Id: CMakeLists.txt 789457 2016-12-13 12:00:43Z krasznaa $
-################################################################################
-# Package: xAODTrackingCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODTrackingCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   GaudiKernel
-   Event/xAOD/xAODTracking
-   Tracking/TrkEvent/TrkTrack
-   PRIVATE
-   Control/AthenaBaseComps
-   Control/AthenaKernel
-   Event/EventPrimitives
-   Event/xAOD/xAODCore
-   Generators/GeneratorObjects
-   PhysicsAnalysis/MCTruthClassifier
-   Reconstruction/Particle
-   Reconstruction/ParticleTruth
-   Tracking/TrkEvent/TrkLinks
-   Tracking/TrkEvent/TrkParticleBase
-   Tracking/TrkEvent/TrkTrackLink
-   Tracking/TrkEvent/TrkTruthData
-   Tracking/TrkEvent/VxVertex
-   Tracking/TrkTools/TrkToolInterfaces )
-
 # Component(s) in the package:
 atlas_add_library( xAODTrackingCnvLib
    xAODTrackingCnv/*.h
-- 
GitLab


From 0a65823ec4a32778600a81c6bc66f2a097ad25cd Mon Sep 17 00:00:00 2001
From: Daniela Boerner <daniela.boerner@cern.ch>
Date: Fri, 9 Oct 2020 09:26:29 +0200
Subject: [PATCH 380/403] fix references

---
 .../share/ref_RDOtoRDOTrig_v1Dev_build.ref    | 26 ++++++++---------
 .../share/ref_data_v1Dev_build.ref            | 28 +++++++++----------
 2 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
index 2060d7418e73..9f32921c33b7 100644
--- a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
@@ -24,7 +24,7 @@ TrigSignatureMoniMT                                 INFO -- #1796849979 Events
 TrigSignatureMoniMT                                 INFO -- #1796849979 Features                             2          0          0          0          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_2e3_etcut_L12EM3 #2613484113
 TrigSignatureMoniMT                                 INFO -- #2613484113 Events         20         20         20         20         20         -          -          -          -          -          -          -          -          -          -          20
-TrigSignatureMoniMT                                 INFO -- #2613484113 Features                             342        3676       780        -          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #2613484113 Features                             342        3676       738        -          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_2g10_loose_mu20_L1MU20 #3765708828
 TrigSignatureMoniMT                                 INFO -- #3765708828 Events         8          8          1          1          1          0          0          0          0          0          -          -          -          -          -          0
 TrigSignatureMoniMT                                 INFO -- #3765708828 Features                             2          2          6          0          0          0          0          0          -          -          -          -          -
@@ -258,34 +258,34 @@ TrigSignatureMoniMT                                 INFO -- #1745513164 Events
 TrigSignatureMoniMT                                 INFO -- #1745513164 Features                             55         55         55         -          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e3_etcut_L1EM3 #683953566
 TrigSignatureMoniMT                                 INFO -- #683953566 Events          20         20         20         20         20         -          -          -          -          -          -          -          -          -          -          20
-TrigSignatureMoniMT                                 INFO -- #683953566 Features                              171        1838       390        -          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #683953566 Features                              171        1838       369        -          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e5_etcut_L1EM3 #324908483
 TrigSignatureMoniMT                                 INFO -- #324908483 Events          20         20         20         20         20         -          -          -          -          -          -          -          -          -          -          20
 TrigSignatureMoniMT                                 INFO -- #324908483 Features                              137        1652       190        -          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e5_lhloose_L1EM3 #736648247
 TrigSignatureMoniMT                                 INFO -- #736648247 Events          20         20         18         18         18         4          -          -          -          -          -          -          -          -          -          4
-TrigSignatureMoniMT                                 INFO -- #736648247 Features                              54         585        109        5          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #736648247 Features                              54         585        105        5          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e5_lhloose_noringer_L1EM3 #1053337356
 TrigSignatureMoniMT                                 INFO -- #1053337356 Events         20         20         17         17         17         4          -          -          -          -          -          -          -          -          -          4
-TrigSignatureMoniMT                                 INFO -- #1053337356 Features                             56         650        116        5          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #1053337356 Features                             56         650        113        5          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e5_lhmedium_L1EM3 #2713915187
 TrigSignatureMoniMT                                 INFO -- #2713915187 Events         20         20         18         18         18         4          -          -          -          -          -          -          -          -          -          4
-TrigSignatureMoniMT                                 INFO -- #2713915187 Features                             53         580        106        5          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #2713915187 Features                             53         580        102        5          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e5_lhmedium_noringer_L1EM3 #176627878
 TrigSignatureMoniMT                                 INFO -- #176627878 Events          20         20         16         16         16         4          -          -          -          -          -          -          -          -          -          4
-TrigSignatureMoniMT                                 INFO -- #176627878 Features                              48         531        93         5          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #176627878 Features                              48         531        91         5          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e5_lhtight_L1EM3 #2070133824
 TrigSignatureMoniMT                                 INFO -- #2070133824 Events         20         20         18         18         18         4          -          -          -          -          -          -          -          -          -          4
-TrigSignatureMoniMT                                 INFO -- #2070133824 Features                             51         561        101        5          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #2070133824 Features                             51         561        97         5          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e5_lhtight_nod0_L1EM3 #3303895627
 TrigSignatureMoniMT                                 INFO -- #3303895627 Events         20         20         18         18         18         4          -          -          -          -          -          -          -          -          -          4
-TrigSignatureMoniMT                                 INFO -- #3303895627 Features                             51         561        101        5          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #3303895627 Features                             51         561        97         5          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e5_lhtight_noringer_L1EM3 #2758326765
 TrigSignatureMoniMT                                 INFO -- #2758326765 Events         20         20         16         16         16         4          -          -          -          -          -          -          -          -          -          4
-TrigSignatureMoniMT                                 INFO -- #2758326765 Features                             45         513        84         5          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #2758326765 Features                             45         513        82         5          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e5_lhtight_noringer_nod0_L1EM3 #1690619419
 TrigSignatureMoniMT                                 INFO -- #1690619419 Events         20         20         16         16         16         4          -          -          -          -          -          -          -          -          -          4
-TrigSignatureMoniMT                                 INFO -- #1690619419 Features                             45         513        84         5          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #1690619419 Features                             45         513        82         5          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e60_lhmedium_L1EM22VHI #298591874
 TrigSignatureMoniMT                                 INFO -- #298591874 Events          6          6          2          2          2          2          -          -          -          -          -          -          -          -          -          2
 TrigSignatureMoniMT                                 INFO -- #298591874 Features                              2          33         4          2          -          -          -          -          -          -          -          -          -
@@ -354,13 +354,13 @@ TrigSignatureMoniMT                                 INFO -- #3486231698 Events
 TrigSignatureMoniMT                                 INFO -- #3486231698 Features                             137        137        190        118        -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_g5_loose_L1EM3 #3230088967
 TrigSignatureMoniMT                                 INFO -- #3230088967 Events         20         20         17         17         17         9          -          -          -          -          -          -          -          -          -          9
-TrigSignatureMoniMT                                 INFO -- #3230088967 Features                             56         56         116        12         -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #3230088967 Features                             56         56         113        12         -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_g5_medium_L1EM3 #385248610
 TrigSignatureMoniMT                                 INFO -- #385248610 Events          20         20         16         16         16         9          -          -          -          -          -          -          -          -          -          9
-TrigSignatureMoniMT                                 INFO -- #385248610 Features                              48         48         93         12         -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #385248610 Features                              48         48         91         12         -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_g5_tight_L1EM3 #3280865118
 TrigSignatureMoniMT                                 INFO -- #3280865118 Events         20         20         16         16         16         9          -          -          -          -          -          -          -          -          -          9
-TrigSignatureMoniMT                                 INFO -- #3280865118 Features                             45         45         84         9          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #3280865118 Features                             45         45         82         9          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_j0_perf_L1J12_EMPTY #1341875780
 TrigSignatureMoniMT                                 INFO -- #1341875780 Events         0          0          0          0          0          0          0          0          0          0          0          0          -          -          -          0
 TrigSignatureMoniMT                                 INFO -- #1341875780 Features                             0          0          0          0          0          0          0          0          0          0          -          -          -
diff --git a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
index 673cb5fc6065..2e59e14d5910 100644
--- a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
@@ -24,7 +24,7 @@ TrigSignatureMoniMT                                 INFO -- #1796849979 Events
 TrigSignatureMoniMT                                 INFO -- #1796849979 Features                             0          0          0          0          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_2e3_etcut_L12EM3 #2613484113
 TrigSignatureMoniMT                                 INFO -- #2613484113 Events         20         20         15         13         13         -          -          -          -          -          -          -          -          -          -          13         
-TrigSignatureMoniMT                                 INFO -- #2613484113 Features                             94         324        178        -          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #2613484113 Features                             94         324        172        -          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_2g10_loose_mu20_L1MU20 #3765708828
 TrigSignatureMoniMT                                 INFO -- #3765708828 Events         20         20         0          0          0          0          0          0          0          0          -          -          -          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #3765708828 Features                             0          0          0          0          0          0          0          0          -          -          -          -          -          
@@ -258,34 +258,34 @@ TrigSignatureMoniMT                                 INFO -- #1745513164 Events
 TrigSignatureMoniMT                                 INFO -- #1745513164 Features                             23         23         23         -          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e3_etcut_L1EM3 #683953566
 TrigSignatureMoniMT                                 INFO -- #683953566 Events          20         20         15         14         14         -          -          -          -          -          -          -          -          -          -          14         
-TrigSignatureMoniMT                                 INFO -- #683953566 Features                              48         163        90         -          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #683953566 Features                              48         163        87         -          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e5_etcut_L1EM3 #324908483
 TrigSignatureMoniMT                                 INFO -- #324908483 Events          20         20         13         13         13         -          -          -          -          -          -          -          -          -          -          13         
 TrigSignatureMoniMT                                 INFO -- #324908483 Features                              41         148        49         -          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e5_lhloose_L1EM3 #736648247
 TrigSignatureMoniMT                                 INFO -- #736648247 Events          20         20         9          9          9          0          -          -          -          -          -          -          -          -          -          0          
-TrigSignatureMoniMT                                 INFO -- #736648247 Features                              18         52         28         0          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #736648247 Features                              18         52         27         0          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e5_lhloose_noringer_L1EM3 #1053337356
 TrigSignatureMoniMT                                 INFO -- #1053337356 Events         20         20         10         10         10         0          -          -          -          -          -          -          -          -          -          0          
-TrigSignatureMoniMT                                 INFO -- #1053337356 Features                             15         48         31         0          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #1053337356 Features                             15         48         29         0          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e5_lhmedium_L1EM3 #2713915187
 TrigSignatureMoniMT                                 INFO -- #2713915187 Events         20         20         9          9          9          0          -          -          -          -          -          -          -          -          -          0          
-TrigSignatureMoniMT                                 INFO -- #2713915187 Features                             19         55         28         0          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #2713915187 Features                             19         55         27         0          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e5_lhmedium_noringer_L1EM3 #176627878
 TrigSignatureMoniMT                                 INFO -- #176627878 Events          20         20         9          9          9          0          -          -          -          -          -          -          -          -          -          0          
-TrigSignatureMoniMT                                 INFO -- #176627878 Features                              13         51         30         0          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #176627878 Features                              13         51         29         0          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e5_lhtight_L1EM3 #2070133824
 TrigSignatureMoniMT                                 INFO -- #2070133824 Events         20         20         8          8          8          0          -          -          -          -          -          -          -          -          -          0          
-TrigSignatureMoniMT                                 INFO -- #2070133824 Features                             16         43         25         0          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #2070133824 Features                             16         43         24         0          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e5_lhtight_nod0_L1EM3 #3303895627
 TrigSignatureMoniMT                                 INFO -- #3303895627 Events         20         20         8          8          8          0          -          -          -          -          -          -          -          -          -          0          
-TrigSignatureMoniMT                                 INFO -- #3303895627 Features                             16         43         25         0          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #3303895627 Features                             16         43         24         0          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e5_lhtight_noringer_L1EM3 #2758326765
 TrigSignatureMoniMT                                 INFO -- #2758326765 Events         20         20         9          9          9          0          -          -          -          -          -          -          -          -          -          0          
-TrigSignatureMoniMT                                 INFO -- #2758326765 Features                             13         51         30         0          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #2758326765 Features                             13         51         29         0          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e5_lhtight_noringer_nod0_L1EM3 #1690619419
 TrigSignatureMoniMT                                 INFO -- #1690619419 Events         20         20         9          9          9          0          -          -          -          -          -          -          -          -          -          0          
-TrigSignatureMoniMT                                 INFO -- #1690619419 Features                             13         51         30         0          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #1690619419 Features                             13         51         29         0          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e60_lhmedium_L1EM22VHI #298591874
 TrigSignatureMoniMT                                 INFO -- #298591874 Events          20         20         0          0          0          0          -          -          -          -          -          -          -          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #298591874 Features                              0          0          0          0          -          -          -          -          -          -          -          -          -          
@@ -327,7 +327,7 @@ TrigSignatureMoniMT                                 INFO -- #1417839619 Events
 TrigSignatureMoniMT                                 INFO -- #1417839619 Features                             3          3          2          -          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_g25_loose_L1EM20VH #3476696431
 TrigSignatureMoniMT                                 INFO -- #3476696431 Events         20         20         2          2          2          0          -          -          -          -          -          -          -          -          -          0          
-TrigSignatureMoniMT                                 INFO -- #3476696431 Features                             2          2          6          0          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #3476696431 Features                             2          2          5          0          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_g25_medium_L1EM20VH #1519793981
 TrigSignatureMoniMT                                 INFO -- #1519793981 Events         20         20         0          0          0          0          -          -          -          -          -          -          -          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #1519793981 Features                             0          0          0          0          -          -          -          -          -          -          -          -          -          
@@ -354,13 +354,13 @@ TrigSignatureMoniMT                                 INFO -- #3486231698 Events
 TrigSignatureMoniMT                                 INFO -- #3486231698 Features                             41         41         50         36         -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_g5_loose_L1EM3 #3230088967
 TrigSignatureMoniMT                                 INFO -- #3230088967 Events         20         20         10         10         10         2          -          -          -          -          -          -          -          -          -          2          
-TrigSignatureMoniMT                                 INFO -- #3230088967 Features                             15         15         31         2          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #3230088967 Features                             15         15         29         2          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_g5_medium_L1EM3 #385248610
 TrigSignatureMoniMT                                 INFO -- #385248610 Events          20         20         9          9          9          2          -          -          -          -          -          -          -          -          -          2          
-TrigSignatureMoniMT                                 INFO -- #385248610 Features                              13         13         30         2          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #385248610 Features                              13         13         29         2          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_g5_tight_L1EM3 #3280865118
 TrigSignatureMoniMT                                 INFO -- #3280865118 Events         20         20         9          9          9          1          -          -          -          -          -          -          -          -          -          1          
-TrigSignatureMoniMT                                 INFO -- #3280865118 Features                             13         13         30         1          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #3280865118 Features                             13         13         29         1          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_j0_perf_L1J12_EMPTY #1341875780
 TrigSignatureMoniMT                                 INFO -- #1341875780 Events         20         20         0          0          0          0          0          0          0          0          0          8          -          -          -          8          
 TrigSignatureMoniMT                                 INFO -- #1341875780 Features                             0          0          0          0          0          0          0          0          0          117        -          -          -          
-- 
GitLab


From 08277743d9a7b60690eca5bb1a87b1531491d555 Mon Sep 17 00:00:00 2001
From: Masato Aoki <masato.aoki@cern.ch>
Date: Fri, 9 Oct 2020 10:46:42 +0200
Subject: [PATCH 381/403] fixed if-statements

---
 .../python/TgcRawDataMonitorAlgorithm.py      | 68 +++++++++----------
 .../src/TgcRawDataMonitorAlgorithm.cxx        | 20 +++---
 2 files changed, 43 insertions(+), 45 deletions(-)

diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/python/TgcRawDataMonitorAlgorithm.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/python/TgcRawDataMonitorAlgorithm.py
index fa249c5e8df9..617f0a5b3c98 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/python/TgcRawDataMonitorAlgorithm.py
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/python/TgcRawDataMonitorAlgorithm.py
@@ -108,10 +108,11 @@ def TgcRawDataMonitoringConfig(inputFlags):
                 nbins = 10
                 if station==1:
                     nbins = 648
-                if station==2 or station==3:
+                elif station==2 or station==3:
                     nbins = 528
-                if station==4:
+                else: # station==4
                     nbins = 90
+
                 myGroup.defineHistogram(x_name+','+y_name+';'+y_name+'_vs_lb',
                                         title=y_name+'_vs_lb;Luminosity block;Chamber index',type='TH2F',
                                         path=hitPath,xbins=100,xmin=-0.5,xmax=99.5,
@@ -130,12 +131,13 @@ def TgcRawDataMonitoringConfig(inputFlags):
                 if station==1:
                     nbinsx = 15
                     nbinsy = 48
-                if station==2 or station==3:
+                elif station==2 or station==3:
                     nbinsx = 12
                     nbinsy = 48
-                if station==4:
+                else: # station==4
                     nbinsx = 4
                     nbinsy = 24
+
                 myGroup.defineHistogram(x_name+','+y_name+';'+name+'_vs_iEta',
                                         title=name+'_vs_iEta;iEta;Chamber index',type='TH2F',path=hitPath,
                                         xbins=nbinsx,xmin=0.5,xmax=nbinsx+0.5,
@@ -162,37 +164,33 @@ def TgcRawDataMonitoringConfig(inputFlags):
                                 if s_or_w=="S":
                                     nbins = 32
                                 else:
-                                    if station==1 and eta==0 and lay==1: nbins = 105
-                                    if station==1 and eta==0 and lay==1: nbins = 104
-                                    if station==1 and eta==0 and lay==1: nbins = 105
-                                    if station==2 and eta==0: nbins = 125
-                                    if station==3 and eta==0: nbins = 122
-
-                                    if station==1 and eta==1: nbins = 24
-                                    if station==2 and eta==1: nbins = 32
-                                    if station==3 and eta==1: nbins = 31
-
-                                    if station==1 and eta==2: nbins = 23
-                                    if station==2 and eta==2: nbins = 32
-                                    if station==3 and eta==2: nbins = 30
-
-                                    if station==1 and eta==3 and lay==1: nbins = 61
-                                    if station==1 and eta==3 and lay==1: nbins = 62
-                                    if station==1 and eta==3 and lay==1: nbins = 62
-                                    if station==2 and eta==3: nbins = 32
-                                    if station==3 and eta==3: nbins = 32
-
-                                    if station==1 and eta==4 and lay==1: nbins = 92
-                                    if station==1 and eta==4 and lay==1: nbins = 91
-                                    if station==1 and eta==4 and lay==1: nbins = 91
-                                    if station==2 and eta==4: nbins = 103
-                                    if station==3 and eta==4: nbins = 106
-
-                                    if station==2 and eta==5: nbins = 110
-                                    if station==3 and eta==5: nbins = 96
-
-                                    if station==4 and eta==0: nbins = 32
-                                    if station==4 and eta==1: nbins = 24
+                                    if station==1:
+                                        if eta==1:     nbins = 24
+                                        elif eta==2:   nbins = 23
+                                        elif eta==3:
+                                            if lay==1: nbins = 61
+                                            else:      nbins = 62
+                                        elif eta==4:
+                                            if lay==1: nbins = 92
+                                            else:      nbins = 91
+                                        else: # forward
+                                            if lay==2: nbins = 104
+                                            else:      nbins = 105
+                                    elif station==2:
+                                        if eta==1 or eta==2 or eta==3: nbins = 32
+                                        elif eta==4:                   nbins = 103
+                                        elif eta==5:                   nbins = 110
+                                        else:                          nbins = 125 # forward
+                                    elif station==3:
+                                        if eta==1:   nbins = 31
+                                        elif eta==2: nbins = 30
+                                        elif eta==3: nbins = 32
+                                        elif eta==4: nbins = 106
+                                        elif eta==5: nbins = 96
+                                        else:        nbins = 122
+                                    else: # EI/FI
+                                        if eta==1:   nbins = 24 # EI
+                                        else:        nbins = 32 # FI
 
                                 myGroup.defineHistogram('hits_on_'+chamber_name+s_or_w,
                                                         title='Hits_on_'+chamber_name+s_or_w+";Channel ID;Number of events",
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataMonitorAlgorithm.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataMonitorAlgorithm.cxx
index 2c4737d8ad31..913e4b3308dc 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataMonitorAlgorithm.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataMonitorAlgorithm.cxx
@@ -285,9 +285,9 @@ StatusCode TgcRawDataMonitorAlgorithm::fillHistograms( const EventContext& ctx )
       tgcHit.M = 0;
       tgcHit.istation = tgcHit.station;
       if( tgcHit.istation == 41 || tgcHit.istation == 42 ) tgcHit.M = 1;
-      if( tgcHit.istation == 43 || tgcHit.istation == 44 ) tgcHit.M = 2;
-      if( tgcHit.istation == 45 || tgcHit.istation == 46 ) tgcHit.M = 3;
-      if( tgcHit.istation == 47 || tgcHit.istation == 48 ) tgcHit.M = 4; // EIFI
+      else if( tgcHit.istation == 43 || tgcHit.istation == 44 ) tgcHit.M = 2;
+      else if( tgcHit.istation == 45 || tgcHit.istation == 46 ) tgcHit.M = 3;
+      else if( tgcHit.istation == 47 || tgcHit.istation == 48 ) tgcHit.M = 4; // EIFI
       if(tgcHit.M == 0){
 	ATH_MSG_ERROR("unknown station: " << tgcHit.istation);
       }
@@ -321,13 +321,13 @@ StatusCode TgcRawDataMonitorAlgorithm::fillHistograms( const EventContext& ctx )
 	}else if( tgcHit.istation == 48 ){// EI
 	  int iphi2 = (tgcHit.iphi>=21)?(tgcHit.iphi-21):(tgcHit.iphi); // 0,1,2,..,20
 	  if(iphi2>=0&&iphi2<=2){ tgcHit.sector = 1; tgcHit.f = iphi2;}
-	  if(iphi2>=3&&iphi2<=5){ tgcHit.sector = 3; tgcHit.f = iphi2-3;}
-	  if(iphi2>=6&&iphi2<=8){ tgcHit.sector = 5; tgcHit.f = iphi2-6;}
-	  if(iphi2>=9&&iphi2<=10){ tgcHit.sector = 7; tgcHit.f = iphi2-9 +1;}
-	  if(iphi2>=11&&iphi2<=13){ tgcHit.sector = 9; tgcHit.f = iphi2-11;}
-	  if(iphi2>=14&&iphi2<=15){ tgcHit.sector = 11; tgcHit.f = iphi2-13;}
-	  if(iphi2>=16&&iphi2<=18){ tgcHit.sector = 13; tgcHit.f = iphi2-16;}
-	  if(iphi2>=19&&iphi2<=20){ tgcHit.sector = 15; tgcHit.f = iphi2-19 +1;}
+	  else if(iphi2>=3&&iphi2<=5){ tgcHit.sector = 3; tgcHit.f = iphi2-3;}
+	  else if(iphi2>=6&&iphi2<=8){ tgcHit.sector = 5; tgcHit.f = iphi2-6;}
+	  else if(iphi2>=9&&iphi2<=10){ tgcHit.sector = 7; tgcHit.f = iphi2-9 +1;}
+	  else if(iphi2>=11&&iphi2<=13){ tgcHit.sector = 9; tgcHit.f = iphi2-11;}
+	  else if(iphi2>=14&&iphi2<=15){ tgcHit.sector = 11; tgcHit.f = iphi2-13;}
+	  else if(iphi2>=16&&iphi2<=18){ tgcHit.sector = 13; tgcHit.f = iphi2-16;}
+	  else if(iphi2>=19&&iphi2<=20){ tgcHit.sector = 15; tgcHit.f = iphi2-19 +1;}
 	  tgcHit.E = 1;
 	  tgcHit.L = tgcHit.igasGap;
 	  tgcHit.name = Form("%s%02iM04f%02iE01L%02i%s",tgcHit.side.Data(),tgcHit.sector,tgcHit.f,tgcHit.L,(tgcHit.isStrip>0)?("S"):("W"));
-- 
GitLab


From 9f316b0bb943e57cd558f6b2e2c9fd7228d1d528 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: Fri, 9 Oct 2020 11:40:24 +0200
Subject: [PATCH 382/403] use consistent intendation

---
 .../python/HLTMonTriggerList.py               | 474 +++++++++---------
 1 file changed, 237 insertions(+), 237 deletions(-)

diff --git a/Trigger/TrigMonitoring/TrigHLTMonitoring/python/HLTMonTriggerList.py b/Trigger/TrigMonitoring/TrigHLTMonitoring/python/HLTMonTriggerList.py
index 0b1f6eede476..80f5e3779c49 100644
--- a/Trigger/TrigMonitoring/TrigHLTMonitoring/python/HLTMonTriggerList.py
+++ b/Trigger/TrigMonitoring/TrigHLTMonitoring/python/HLTMonTriggerList.py
@@ -1,5 +1,5 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-
+ 
 from __future__ import print_function
 
 import TrigBjetMonitoring.TrigBjetMonitCategory as bjet
@@ -12,242 +12,242 @@ import TrigMuonMonitoring.TrigMuonMonitCategory as muon
 import TrigTauMonitoring.TrigTauMonitCategory as tau
 
 if 'DQMonFlags' not in dir():
-	from AthenaMonitoring.DQMonFlags import DQMonFlags
+  from AthenaMonitoring.DQMonFlags import DQMonFlags
 
 class HLTMonTriggerList:
-
-	# HLTMonTriggerList config
-	_configured = False
-
-	# running mode config
-	_get_monitoring_mode_success = False
-	mc_mode = False
-	pp_mode = False
-	HI_mode = False
-	cosmic_mode = False
-
-	# trigger lists
-	monitoring_mujet = []
-	monitoring_bjet = []
-	monitoring_bphys = []
-	primary_bphys = []
-	monitoring_egamma = []
-	primary_single_ele = []
-	primary_single_ele_iso = []
-	primary_single_ele_cutbased = []
-	primary_single_ele_cutbased_iso = []
-	primary_double_ele = []
-	primary_double_ele_cutbased = []
-	monitoring_ele_idperf = []
-	monitoring_ele_idperf_cutbased = []
-	monitoring_Zee = []
-	monitoring_Jpsiee = []
-	primary_single_pho = []
-	primary_double_pho = []
-	monitoring_l1jet = []
-	monitoring_jet = []
-	primary_l1jet = []
-	primary_jet = []
-	monitoring_met_shifter = []
-	monitoring_met_expert = []
-	monitoring_minbias = []
-	monitoring_muonNonIso = []
-	monitoring_muonIso = []
-	monitoring_MSonly = []
-	monitoring_muonEFFS = []
-	monitoring_muonLowpt = []
-	monitoring_muon_Support = []
-	monitoring_tau = []
-	monitoring_singleTau = []
-
-
-	def __init__(self):
-		if not self._configured:
-			self.config()
-
-	def config(self):
-
-		self.set_HLTMonTrigList_default()
-
-		self._get_monitoring_mode_success = self.get_monitoring_mode()
-
-		if self._get_monitoring_mode_success is False:
-			# what should be done in this case?
-			print ("HLTMonTriggerList: Error getting monitoring mode, default monitoring lists will be used.")
-
-		elif self.pp_mode is True:
-			print ("HLTMonTriggerList: Setting up pp monitoring.")
-			self.set_HLTMonTrigList_pp()
-
-		elif self.mc_mode is True:
-			print ("HLTMonTriggerList: Setting up MC monitoring.")
-			self.set_HLTMonTrigList_mc()
-
-		elif self.HI_mode is True:
-			print ("HLTMonTriggerList: Setting up HI monitoring.")
-			self.set_HLTMonTrigList_HI()
-
-		elif self.cosmic_mode is True:
-			print ("HLTMonTriggerList: Setting up cosmic monitoring.")
-			self.set_HLTMonTrigList_cosmic()
-
-		self._configured = True
-
-
-	# Implementation of https://its.cern.ch/jira/browse/ATR-13200
-	def get_monitoring_mode(self):
-		# Set monitoring mode
-		self.data_type = DQMonFlags.monManDataType()
-
-		if self.data_type == 'monteCarlo':
-			self.mc_mode = True
-			return True
-
-		elif self.data_type == 'collisions':
-			#singlebeam is included in collisions
-			self.pp_mode = True
-			return True
-
-		elif self.data_type == 'heavyioncollisions':
-			#heavy ion is pPb or PbPb
-			self.HI_mode = True
-			return True
-
-		elif self.data_type == 'cosmics':
-			self.cosmic_mode = True
-			return True
-
-		else:
-			return False
-
-
-	# Config of default/running mode independent monitoring lists
-	def set_HLTMonTrigList_default(self):
-		# Monitoring lists (defaults) which are independent of running mode:
-		# These are the trigger lists that will be used unless they are overwritten based on the running mode. In this way the trigger lists can be updated based on running mode with no risk of a signature being left unmonitored
-
-		# set the bjet and mujet triggers to the default values
-		self.monitoring_bjet = bjet.monitoring_bjet
-		self.monitoring_mujet = bjet.monitoring_mujet
-
-		# set the bphys triggers to the default values
-		self.monitoring_bphys = bphys.monitoring_bphys
-		self.primary_bphys = bphys.primary_bphys
-
-		# set the egamma triggers to the default values
-		self.monitoring_egamma = egamma.monitoring_egamma
-		self.primary_single_ele = egamma.primary_single_ele
-		self.primary_single_ele_iso = egamma.primary_single_ele_iso
-		self.primary_single_ele_cutbased = egamma.primary_single_ele_cutbased
-		self.primary_single_ele_cutbased_iso = egamma.primary_single_ele_cutbased_iso
-		self.primary_double_ele = egamma.primary_double_ele
-		self.primary_double_ele_cutbased = egamma.primary_double_ele_cutbased
-		self.monitoring_ele_idperf = egamma.monitoring_ele_idperf
-		self.monitoring_ele_idperf_cutbased = egamma.monitoring_ele_idperf_cutbased
-		self.monitoring_Zee = egamma.monitoring_Zee
-		self.monitoring_Jpsiee = egamma.monitoring_Jpsiee
-		self.primary_single_pho = egamma.primary_single_pho
-		self.primary_double_pho = egamma.primary_double_pho
-
-		# set the jet triggers to the default values
-		self.monitoring_l1jet = jets.monitoring_l1jet
-		self.monitoring_jet = jets.monitoring_jet
-		self.primary_l1jet = jets.primary_l1jet
-		self.primary_jet = jets.primary_jet
-
-		# set the met triggers to the default values
-		self.monitoring_met_shifter = met.monitoring_met_shifter
-		self.monitoring_met_expert = met.monitoring_met_expert
-
-		# set the minbias triggers to the default values
-		self.monitoring_minbias = minbias.monitoring_minbias
-
-		# set the muon triggers to the default values
-		self.monitoring_muonNonIso = muon.monitoring_muonNonIso
-		self.monitoring_muonIso = muon.monitoring_muonIso
-		self.monitoring_MSonly = muon.monitoring_MSonly
-		self.monitoring_muonEFFS = muon.monitoring_muonEFFS
-		self.monitoring_muonLowpt = muon.monitoring_muonLowpt
-		self.monitoring_muon_Support = muon.monitoring_muon_Support
-
-		# set the tau triggers to the default values
-		self.monitoring_tau = tau.monitoring_tau
-		self.monitoring_singleTau = tau.monitoring_singleTau
-
-
-	# Config of monitoring lists which are dependent on running mode
-	def set_HLTMonTrigList_pp(self):
-                self.monitoring_bjet = bjet.monitoring_bjet_pp
-                self.monitoring_mujet = bjet.monitoring_mujet_pp
-
-                self.primary_bphys = bphys.primary_bphys_pp
-
-                self.monitoring_l1jet = jets.monitoring_l1jet_pp
-                self.monitoring_jet = jets.monitoring_jet_pp
-                self.primary_l1jet = jets.primary_l1jet_pp
-                self.primary_jet = jets.primary_jet_pp
-
-                self.monitoring_met_shifter = met.monitoring_met_shifter_pp
-                self.monitoring_met_expert = met.monitoring_met_expert_pp
-
-                self.monitoring_muonNonIso = muon.monitoring_muonNonIso_pp
-                self.monitoring_muonIso = muon.monitoring_muonIso_pp
-                self.monitoring_MSonly = muon.monitoring_MSonly_pp
-                self.monitoring_muonEFFS = muon.monitoring_muonEFFS_pp
-                self.monitoring_muonLowpt = muon.monitoring_muonLowpt
-                self.monitoring_muon_Support = muon.monitoring_muon_Support_pp
-
-                self.monitoring_tau = tau.monitoring_tau_pp
-
-                #override if both pp and MC are true
-                if DQMonFlags.monManDataType()=='monteCarlo':
-                        self.monitoring_tau = tau.monitoring_tau_validation
-
-	def set_HLTMonTrigList_HI(self):
-		self.monitoring_bjet = bjet.monitoring_bjet_hi
-		self.monitoring_mujet = bjet.monitoring_mujet_hi
-
-		self.primary_bphys = bphys.primary_bphys_hi
-
-		self.monitoring_l1jet = jets.monitoring_l1jet_hi
-		self.monitoring_jet = jets.monitoring_jet_hi
-		self.primary_l1jet = jets.primary_l1jet_hi
-		self.primary_jet = jets.primary_jet_hi
-
-		self.monitoring_met_shifter = []
-		self.monitoring_met_expert = []
-
-		self.monitoring_muonNonIso = muon.monitoring_muonNonIso_HI
-		self.monitoring_muonIso = muon.monitoring_muonIso_HI
-		self.monitoring_MSonly = muon.monitoring_MSonly_HI
-		self.monitoring_muonEFFS = muon.monitoring_muonEFFS_HI
-		self.monitoring_muonLowpt = muon.monitoring_muonLowpt
-		self.monitoring_muon_Support = muon.monitoring_muon_Support_HI
-
-	def set_HLTMonTrigList_cosmic (self):
-		self.monitoring_bjet = bjet.monitoring_bjet_cosmic
-
-		self.monitoring_l1jet = jets.monitoring_l1jet_cosmic
-		self.monitoring_jet = jets.monitoring_jet_cosmic
-		self.primary_l1jet = jets.primary_l1jet_cosmic
-		self.primary_jet = jets.primary_jet_cosmic
-
-		self.monitoring_met_shifter = met.monitoring_met_shifter_cosmic
-		self.monitoring_met_expert = met.monitoring_met_expert_cosmic
-
-		self.monitoring_tau = tau.monitoring_tau_cosmic
-		self.monitoring_singleTau = tau.monitoring_singleTau_cosmic
-
-	def set_HLTMonTrigList_mc(self):
-		self.monitoring_bjet = bjet.monitoring_bjet_validation
-		self.monitoring_mujet = bjet.monitoring_mujet_validation
-
-		self.monitoring_l1jet = jets.monitoring_l1jet_validation
-		self.monitoring_jet = jets.monitoring_jet_validation
-		self.primary_l1jet = jets.primary_l1jet_validation
-		self.primary_jet = jets.primary_jet_validation
-
-		self.monitoring_tau = tau.monitoring_tau_validation
-
-
+  
+  # HLTMonTriggerList config
+  _configured = False
+  
+  # running mode config
+  _get_monitoring_mode_success = False
+  mc_mode = False
+  pp_mode = False
+  HI_mode = False
+  cosmic_mode = False
+  
+  # trigger lists
+  monitoring_mujet = []
+  monitoring_bjet = []
+  monitoring_bphys = []
+  primary_bphys = []
+  monitoring_egamma = []
+  primary_single_ele = []
+  primary_single_ele_iso = []
+  primary_single_ele_cutbased = []
+  primary_single_ele_cutbased_iso = []
+  primary_double_ele = []
+  primary_double_ele_cutbased = []
+  monitoring_ele_idperf = []
+  monitoring_ele_idperf_cutbased = []
+  monitoring_Zee = []
+  monitoring_Jpsiee = []
+  primary_single_pho = []
+  primary_double_pho = []
+  monitoring_l1jet = []
+  monitoring_jet = []
+  primary_l1jet = []
+  primary_jet = []
+  monitoring_met_shifter = []
+  monitoring_met_expert = []
+  monitoring_minbias = []
+  monitoring_muonNonIso = []
+  monitoring_muonIso = []
+  monitoring_MSonly = []
+  monitoring_muonEFFS = []
+  monitoring_muonLowpt = []
+  monitoring_muon_Support = []
+  monitoring_tau = []
+  monitoring_singleTau = []
+  
+  
+  def __init__(self):
+    if not self._configured:
+      self.config()
+
+  def config(self):
+    
+    self.set_HLTMonTrigList_default()
+    
+    self._get_monitoring_mode_success = self.get_monitoring_mode()
+    
+    if self._get_monitoring_mode_success is False:
+      # what should be done in this case?
+      print ("HLTMonTriggerList: Error getting monitoring mode, default monitoring lists will be used.")
+      
+    elif self.pp_mode is True:
+      print ("HLTMonTriggerList: Setting up pp monitoring.")
+      self.set_HLTMonTrigList_pp()
+      
+    elif self.mc_mode is True:
+      print ("HLTMonTriggerList: Setting up MC monitoring.")
+      self.set_HLTMonTrigList_mc()
+      
+    elif self.HI_mode is True:
+      print ("HLTMonTriggerList: Setting up HI monitoring.")
+      self.set_HLTMonTrigList_HI()
+      
+    elif self.cosmic_mode is True:
+      print ("HLTMonTriggerList: Setting up cosmic monitoring.")
+      self.set_HLTMonTrigList_cosmic()
+      
+    self._configured = True
+
+
+  # Implementation of https://its.cern.ch/jira/browse/ATR-13200
+  def get_monitoring_mode(self):
+    # Set monitoring mode
+    self.data_type = DQMonFlags.monManDataType()
+    
+    if self.data_type == 'monteCarlo':
+      self.mc_mode = True
+      return True
+    
+    elif self.data_type == 'collisions':
+      #singlebeam is included in collisions
+      self.pp_mode = True
+      return True
+    
+    elif self.data_type == 'heavyioncollisions':
+      #heavy ion is pPb or PbPb
+      self.HI_mode = True
+      return True
+    
+    elif self.data_type == 'cosmics':
+      self.cosmic_mode = True
+      return True
+    
+    else:
+      return False
+
+
+  # Config of default/running mode independent monitoring lists
+  def set_HLTMonTrigList_default(self):
+    # Monitoring lists (defaults) which are independent of running mode:
+    # These are the trigger lists that will be used unless they are overwritten based on the running mode. In this way the trigger lists can be updated based on running mode with no risk of a signature being left unmonitored
+    
+    # set the bjet and mujet triggers to the default values
+    self.monitoring_bjet = bjet.monitoring_bjet
+    self.monitoring_mujet = bjet.monitoring_mujet
+    
+    # set the bphys triggers to the default values
+    self.monitoring_bphys = bphys.monitoring_bphys
+    self.primary_bphys = bphys.primary_bphys
+    
+    # set the egamma triggers to the default values
+    self.monitoring_egamma = egamma.monitoring_egamma
+    self.primary_single_ele = egamma.primary_single_ele
+    self.primary_single_ele_iso = egamma.primary_single_ele_iso
+    self.primary_single_ele_cutbased = egamma.primary_single_ele_cutbased
+    self.primary_single_ele_cutbased_iso = egamma.primary_single_ele_cutbased_iso
+    self.primary_double_ele = egamma.primary_double_ele
+    self.primary_double_ele_cutbased = egamma.primary_double_ele_cutbased
+    self.monitoring_ele_idperf = egamma.monitoring_ele_idperf
+    self.monitoring_ele_idperf_cutbased = egamma.monitoring_ele_idperf_cutbased
+    self.monitoring_Zee = egamma.monitoring_Zee
+    self.monitoring_Jpsiee = egamma.monitoring_Jpsiee
+    self.primary_single_pho = egamma.primary_single_pho
+    self.primary_double_pho = egamma.primary_double_pho
+    
+    # set the jet triggers to the default values
+    self.monitoring_l1jet = jets.monitoring_l1jet
+    self.monitoring_jet = jets.monitoring_jet
+    self.primary_l1jet = jets.primary_l1jet
+    self.primary_jet = jets.primary_jet
+    
+    # set the met triggers to the default values
+    self.monitoring_met_shifter = met.monitoring_met_shifter
+    self.monitoring_met_expert = met.monitoring_met_expert
+    
+    # set the minbias triggers to the default values
+    self.monitoring_minbias = minbias.monitoring_minbias
+    
+    # set the muon triggers to the default values
+    self.monitoring_muonNonIso = muon.monitoring_muonNonIso
+    self.monitoring_muonIso = muon.monitoring_muonIso
+    self.monitoring_MSonly = muon.monitoring_MSonly
+    self.monitoring_muonEFFS = muon.monitoring_muonEFFS
+    self.monitoring_muonLowpt = muon.monitoring_muonLowpt
+    self.monitoring_muon_Support = muon.monitoring_muon_Support
+    
+    # set the tau triggers to the default values
+    self.monitoring_tau = tau.monitoring_tau
+    self.monitoring_singleTau = tau.monitoring_singleTau
+    
+    
+  # Config of monitoring lists which are dependent on running mode
+  def set_HLTMonTrigList_pp(self):
+    self.monitoring_bjet = bjet.monitoring_bjet_pp
+    self.monitoring_mujet = bjet.monitoring_mujet_pp
+    
+    self.primary_bphys = bphys.primary_bphys_pp
+    
+    self.monitoring_l1jet = jets.monitoring_l1jet_pp
+    self.monitoring_jet = jets.monitoring_jet_pp
+    self.primary_l1jet = jets.primary_l1jet_pp
+    self.primary_jet = jets.primary_jet_pp
+    
+    self.monitoring_met_shifter = met.monitoring_met_shifter_pp
+    self.monitoring_met_expert = met.monitoring_met_expert_pp
+    
+    self.monitoring_muonNonIso = muon.monitoring_muonNonIso_pp
+    self.monitoring_muonIso = muon.monitoring_muonIso_pp
+    self.monitoring_MSonly = muon.monitoring_MSonly_pp
+    self.monitoring_muonEFFS = muon.monitoring_muonEFFS_pp
+    self.monitoring_muonLowpt = muon.monitoring_muonLowpt
+    self.monitoring_muon_Support = muon.monitoring_muon_Support_pp
+    
+    self.monitoring_tau = tau.monitoring_tau_pp
+    
+    #override if both pp and MC are true
+    if DQMonFlags.monManDataType()=='monteCarlo':
+      self.monitoring_tau = tau.monitoring_tau_validation
+
+  def set_HLTMonTrigList_HI(self):
+    self.monitoring_bjet = bjet.monitoring_bjet_hi
+    self.monitoring_mujet = bjet.monitoring_mujet_hi
+    
+    self.primary_bphys = bphys.primary_bphys_hi
+    
+    self.monitoring_l1jet = jets.monitoring_l1jet_hi
+    self.monitoring_jet = jets.monitoring_jet_hi
+    self.primary_l1jet = jets.primary_l1jet_hi
+    self.primary_jet = jets.primary_jet_hi
+    
+    self.monitoring_met_shifter = []
+    self.monitoring_met_expert = []
+    
+    self.monitoring_muonNonIso = muon.monitoring_muonNonIso_HI
+    self.monitoring_muonIso = muon.monitoring_muonIso_HI
+    self.monitoring_MSonly = muon.monitoring_MSonly_HI
+    self.monitoring_muonEFFS = muon.monitoring_muonEFFS_HI
+    self.monitoring_muonLowpt = muon.monitoring_muonLowpt
+    self.monitoring_muon_Support = muon.monitoring_muon_Support_HI
+    
+  def set_HLTMonTrigList_cosmic (self):
+    self.monitoring_bjet = bjet.monitoring_bjet_cosmic
+    
+    self.monitoring_l1jet = jets.monitoring_l1jet_cosmic
+    self.monitoring_jet = jets.monitoring_jet_cosmic
+    self.primary_l1jet = jets.primary_l1jet_cosmic
+    self.primary_jet = jets.primary_jet_cosmic
+    
+    self.monitoring_met_shifter = met.monitoring_met_shifter_cosmic
+    self.monitoring_met_expert = met.monitoring_met_expert_cosmic
+    
+    self.monitoring_tau = tau.monitoring_tau_cosmic
+    self.monitoring_singleTau = tau.monitoring_singleTau_cosmic
+    
+  def set_HLTMonTrigList_mc(self):
+    self.monitoring_bjet = bjet.monitoring_bjet_validation
+    self.monitoring_mujet = bjet.monitoring_mujet_validation
+    
+    self.monitoring_l1jet = jets.monitoring_l1jet_validation
+    self.monitoring_jet = jets.monitoring_jet_validation
+    self.primary_l1jet = jets.primary_l1jet_validation
+    self.primary_jet = jets.primary_jet_validation
+    
+    self.monitoring_tau = tau.monitoring_tau_validation
+    
+    
 hltmonList = HLTMonTriggerList()
-- 
GitLab


From 9b6b2c379a94bca6f509fd6b26987ed98c6c568b Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Wed, 7 Oct 2020 11:19:53 -0400
Subject: [PATCH 383/403] FileCatalog: Enable thread-safety checking.

Enable thread-safety checking.
Fix resulting warnings.
---
 .../FileCatalog/ATLAS_CHECK_THREAD_SAFETY     |  1 +
 .../APR/FileCatalog/test/URIParser_test.cxx   |  4 ++--
 .../FileCatalog/utilities/FCaddReplica.cpp    | 17 ++++++++---------
 .../FileCatalog/utilities/FCdeleteEntry.cpp   | 19 +++++++++----------
 .../APR/FileCatalog/utilities/FCdeletePFN.cpp | 17 ++++++++---------
 .../APR/FileCatalog/utilities/FClistGUID.cpp  | 15 +++++++--------
 .../APR/FileCatalog/utilities/FClistLFN.cpp   | 13 ++++++-------
 .../APR/FileCatalog/utilities/FClistPFN.cpp   | 13 ++++++-------
 .../FileCatalog/utilities/FCregisterLFN.cpp   | 15 +++++++--------
 .../FileCatalog/utilities/FCregisterPFN.cpp   | 15 +++++++--------
 .../APR/FileCatalog/utilities/FCrenamePFN.cpp | 15 +++++++--------
 11 files changed, 68 insertions(+), 76 deletions(-)
 create mode 100644 Database/APR/FileCatalog/FileCatalog/ATLAS_CHECK_THREAD_SAFETY

diff --git a/Database/APR/FileCatalog/FileCatalog/ATLAS_CHECK_THREAD_SAFETY b/Database/APR/FileCatalog/FileCatalog/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 000000000000..a9f156d201be
--- /dev/null
+++ b/Database/APR/FileCatalog/FileCatalog/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Database/APR/FileCatalog
diff --git a/Database/APR/FileCatalog/test/URIParser_test.cxx b/Database/APR/FileCatalog/test/URIParser_test.cxx
index 8de9abb457e3..cdca6bb025c6 100755
--- a/Database/APR/FileCatalog/test/URIParser_test.cxx
+++ b/Database/APR/FileCatalog/test/URIParser_test.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //$Id: URIParser_test.cxx 457829 2011-09-08 13:13:25Z mnowak $
@@ -36,7 +36,7 @@ int main(){
     p.parse();p.dump(); 
   }catch(const pool::Exception& er){
     std::cerr <<er.what()<< std::endl;
-    exit(1);
+    return 1;
   }
 }
 
diff --git a/Database/APR/FileCatalog/utilities/FCaddReplica.cpp b/Database/APR/FileCatalog/utilities/FCaddReplica.cpp
index 4370ad9f0c83..a409808db331 100755
--- a/Database/APR/FileCatalog/utilities/FCaddReplica.cpp
+++ b/Database/APR/FileCatalog/utilities/FCaddReplica.cpp
@@ -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
 */
 
 /**FCaddReplica.cpp -- FileCatalog command line tool to add replica pfn 
@@ -20,8 +20,6 @@ void printUsage(){
   std::cout<<"usage: FCaddReplica -r replica [-p pfname -g guid -u contactstring -h]" <<std::endl;
 }
 
-static const char* opts[] = {"r","p","g","u","h",0};
-
 
 int main(int argc, char** argv)
 {
@@ -33,6 +31,7 @@ int main(int argc, char** argv)
   FileCatalog::FileID myguid;
   try{
     CommandLine commands(argc,argv);
+    const char* opts[] = {"r","p","g","u","h",0};
     commands.CheckOptions(opts);
     
     if( commands.Exists("u") ){
@@ -51,22 +50,22 @@ int main(int argc, char** argv)
     }
     if( commands.Exists("h") ){
       printUsage();
-      exit(0);
+      return 0;
     }
   }catch(std::string& strError){
     std::cerr << "Error: command parsing error "<<strError<<std::endl;
-    exit(-1);
+    return -1;
   }
   
   if( myrpf.empty() ){
     printUsage();
     std::cerr<<"Error: must specify replica name using -r"<<std::endl;
-    exit(0);
+    return 0;
   }
   if( mypfn.empty()&& myguid.empty() ){
     printUsage();
     std::cerr<<"Error: must specify PFN using -p or guid using -g"<<std::endl;
-    exit(0);
+    return 0;
   }
   try{
     std::unique_ptr<IFileCatalog> mycatalog(new IFileCatalog);
@@ -88,10 +87,10 @@ int main(int argc, char** argv)
     }
   }catch (const pool::Exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }catch (const std::exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }
 }
 
diff --git a/Database/APR/FileCatalog/utilities/FCdeleteEntry.cpp b/Database/APR/FileCatalog/utilities/FCdeleteEntry.cpp
index 0cdd294897ec..0752d444c863 100755
--- a/Database/APR/FileCatalog/utilities/FCdeleteEntry.cpp
+++ b/Database/APR/FileCatalog/utilities/FCdeleteEntry.cpp
@@ -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
 */
 
 /**FCdeleteEntry.cpp -- FileCatalog command line tool to delete all entries associated with given file.
@@ -19,8 +19,6 @@ void printUsage(){
   std::cout<<"usage: FCdeleteEntry [-q query -l lfname -p pfname -u contactstring -h]" <<std::endl;
 }
 
-static const char* opts[] = {"q","l","p","u","h",0};
-
 
 int main(int argc, char** argv)
 {
@@ -32,6 +30,7 @@ int main(int argc, char** argv)
   std::string  myquery;
   try{
     CommandLine commands(argc,argv);
+    const char* opts[] = {"q","l","p","u","h",0};
     commands.CheckOptions(opts);
 
     if( commands.Exists("u") ){
@@ -51,23 +50,23 @@ int main(int argc, char** argv)
     
     if( commands.Exists("h") ){
       printUsage();
-      exit(0);
+      return 0;
     }
   }catch(std::string& strError){
     std::cerr << "Error: command parsing error "<<strError<<std::endl;
-    exit(0);
+    return 0;
   }
   
   if( mylfn.empty() && mypfn.empty() && myquery.empty() ){
     printUsage();
     std::cerr<<"Error: must specify lfname using -l , pfname using -p, query using -q"<<std::endl;
-    exit(0);
+    return 0;
   }
 
   if( !mylfn.empty() && !mypfn.empty() ){
     printUsage();
     std::cerr<<"Error: can only delete either PFN or LFN"<<std::endl;
-    exit(0);
+    return 0;
   }
   try{  
     std::unique_ptr<IFileCatalog> mycatalog(new IFileCatalog);
@@ -79,7 +78,7 @@ int main(int argc, char** argv)
     mycatalog->start();
     if( !myquery.empty() ){
        std::cerr << "Query option not supported" << std::endl;
-       exit(2); 
+       return 2;
     }else if( !mylfn.empty() ){
        mycatalog->deleteFID( mycatalog->lookupLFN( mylfn ) );
     }else if( !mypfn.empty() ) {
@@ -89,10 +88,10 @@ int main(int argc, char** argv)
     mycatalog->disconnect();
   }catch (const pool::Exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }catch (const std::exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }
 }
 
diff --git a/Database/APR/FileCatalog/utilities/FCdeletePFN.cpp b/Database/APR/FileCatalog/utilities/FCdeletePFN.cpp
index a3b500fe5d15..ded3e4dde787 100755
--- a/Database/APR/FileCatalog/utilities/FCdeletePFN.cpp
+++ b/Database/APR/FileCatalog/utilities/FCdeletePFN.cpp
@@ -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
 */
 
 /** FCdeletePFN.cpp -- FileCatalog command line tool to delete the selected PFN 
@@ -19,8 +19,6 @@ void printUsage(){
   std::cout<<"usage: FCdeletePFN [-q query -p pfname -u contactstring -h]" <<std::endl;
 }
 
-static const char* opts[] = {"p","q","u","h",0};
-
 
 int main(int argc, char** argv)
 {
@@ -31,6 +29,7 @@ int main(int argc, char** argv)
   std::string  myquery;
   try{
     CommandLine commands(argc,argv);
+    const char* opts[] = {"p","q","u","h",0};
     commands.CheckOptions(opts);
 
     if( commands.Exists("u") ){
@@ -46,17 +45,17 @@ int main(int argc, char** argv)
     }
     if( commands.Exists("h") ){
       printUsage();
-      exit(0);
+      return 0;
     }
   }catch(std::string& strError){
     std::cerr<< "Error: command parsing error "<<strError<<std::endl;
-    exit(0);
+    return 0;
   }
   
   if( mypfn.empty() && myquery.empty() ){
     printUsage();
     std::cerr<<"Error: must specify pfname using -p, query using -q"<<std::endl;
-    exit(0);
+    return 0;
   }
   try{
     std::unique_ptr<IFileCatalog> mycatalog(new IFileCatalog);
@@ -67,7 +66,7 @@ int main(int argc, char** argv)
     mycatalog->start();
     if( !myquery.empty() ){
       std::cerr << "Query option not supported" << std::endl;
-      exit(2); 
+      return 2;
     }else if( !mypfn.empty() ) {
       mycatalog->deletePFN(mypfn);
     }
@@ -75,10 +74,10 @@ int main(int argc, char** argv)
     mycatalog->disconnect();
   }catch (const pool::Exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }catch (const std::exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }
 }
 
diff --git a/Database/APR/FileCatalog/utilities/FClistGUID.cpp b/Database/APR/FileCatalog/utilities/FClistGUID.cpp
index f1aa7fa971b4..5e224bd8eacb 100644
--- a/Database/APR/FileCatalog/utilities/FClistGUID.cpp
+++ b/Database/APR/FileCatalog/utilities/FClistGUID.cpp
@@ -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
 */
 
 /**FClistGUID.cpp -- FileCatalog command line tool to list guid
@@ -22,8 +22,6 @@ void printUsage(){
   std::cout<<"usage: FClistGUID [-p pfname -l lfname -q query -u contactstring -h]" <<std::endl; 
 }
 
-static const char* opts[] = {"p","l","q","u","h",0};
-
 class contactParser{
 public:
   contactParser(const std::string& contact):m_contact(contact){}
@@ -62,6 +60,7 @@ int main(int argc, char** argv)
   std::string  query;
   try{
     CommandLine commands(argc,argv);
+    const char* opts[] = {"p","l","q","u","h",0};
     commands.CheckOptions(opts);
     
     if( commands.Exists("u") ){
@@ -80,11 +79,11 @@ int main(int argc, char** argv)
     }
     if( commands.Exists("h") ){
       printUsage();
-      exit(0);
+      return 0;
     }
   }catch(std::string& strError){
     std::cerr<< "Error: command parsing error "<<strError<<std::endl;
-    exit(1);
+    return 1;
   }
 
   if(!query.empty()&&!mypfn.empty()){
@@ -110,7 +109,7 @@ int main(int argc, char** argv)
     pool::IFileCatalog::Strings fids;
     if( !query.empty() ){
        std::cerr << "Query option not supported" << std::endl;
-       exit(2); 
+       return 2;
     } else if( !mypfn.empty() ){
        fids.push_back( mycatalog->lookupPFN( mypfn ) );
     } else if( !mylfn.empty() ){
@@ -125,10 +124,10 @@ int main(int argc, char** argv)
     mycatalog->disconnect();
   }catch (const pool::Exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }catch (const std::exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }
 }
 
diff --git a/Database/APR/FileCatalog/utilities/FClistLFN.cpp b/Database/APR/FileCatalog/utilities/FClistLFN.cpp
index b3f42119184b..cddad5128a24 100755
--- a/Database/APR/FileCatalog/utilities/FClistLFN.cpp
+++ b/Database/APR/FileCatalog/utilities/FClistLFN.cpp
@@ -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
 */
 
 /**FClistLFN.cpp -- FileCatalog command line tool to list all the LFN entries from the catalog.
@@ -21,8 +21,6 @@ void printUsage(){
   std::cout<<"usage: FClistLFN [-p pfname] [-u contactstring] [-h]" <<std::endl; 
 }
 
-static const char* opts[] = {"p","u","h",0};
-
 
 class contactParser{
 public:
@@ -58,6 +56,7 @@ int main(int argc, char** argv)
   std::string  mypfn;
   try{
     CommandLine commands(argc,argv);
+    const char* opts[] = {"p","u","h",0};
     commands.CheckOptions(opts);
     
     if( commands.Exists("u") ){
@@ -70,11 +69,11 @@ int main(int argc, char** argv)
     }
     if( commands.Exists("h") ){
       printUsage();
-      exit(0);
+      return 0;
     }
   }catch(std::string& strError){
     std::cerr<< "Error: command parsing error "<<strError<<std::endl;
-    exit(0);
+    return 0;
   }
 
   if( !mypfn.empty() ) {
@@ -116,10 +115,10 @@ int main(int argc, char** argv)
     mycatalog->disconnect();
   }catch (const pool::Exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }catch (const std::exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }
 }
 
diff --git a/Database/APR/FileCatalog/utilities/FClistPFN.cpp b/Database/APR/FileCatalog/utilities/FClistPFN.cpp
index 25d1980aef50..8a2ef5d5a27b 100755
--- a/Database/APR/FileCatalog/utilities/FClistPFN.cpp
+++ b/Database/APR/FileCatalog/utilities/FClistPFN.cpp
@@ -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
 */
 
 /**FClistPFN.cpp -- FileCatalog command line tool to list the PFN entries from the catalog
@@ -23,8 +23,6 @@ void printUsage(){
   std::cout<<"usage: FClistPFN [-l lfname] [-u contactstring] [-t -h]" <<std::endl; 
 }
 
-static const char* opts[] = {"t","l","u","f","h",0};
-
 
 class contactParser{
 public:
@@ -61,6 +59,7 @@ int main(int argc, char** argv)
   bool printall=false;
   try{
     CommandLine commands(argc,argv);
+    const char* opts[] = {"t","l","u","f","h",0};
     commands.CheckOptions(opts);
 
     if( commands.Exists("u") ){
@@ -79,11 +78,11 @@ int main(int argc, char** argv)
     }
     if( commands.Exists("h") ){
       printUsage();
-      exit(0);
+      return 0;
     }
   }catch(std::string& strError){
     std::cerr << "Error: command parsing error "<<strError<<std::endl;
-    exit(0);
+    return 0;
   }
 
   try{
@@ -129,10 +128,10 @@ int main(int argc, char** argv)
     mycatalog->disconnect();
   }catch (const pool::Exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }catch (const std::exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }
 }
 
diff --git a/Database/APR/FileCatalog/utilities/FCregisterLFN.cpp b/Database/APR/FileCatalog/utilities/FCregisterLFN.cpp
index 2d1ad5a62d32..92692b48f8c0 100755
--- a/Database/APR/FileCatalog/utilities/FCregisterLFN.cpp
+++ b/Database/APR/FileCatalog/utilities/FCregisterLFN.cpp
@@ -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
 */
 
 /**FCregisterLFN.cpp -- FileCatalog command line tool to register a LFN
@@ -20,8 +20,6 @@ void printUsage(){
   std::cout<<"usage: FCregisterLFN -l lfname -p pfname [-u contactstring -h]" <<std::endl;
 }
 
-static const char* opts[] = {"p","l","u","h",0};
-
 
 int main(int argc, char** argv)
 {
@@ -32,6 +30,7 @@ int main(int argc, char** argv)
   std::string  mylfn;
   try{
     CommandLine commands(argc,argv);
+    const char* opts[] = {"p","l","u","h",0};
     commands.CheckOptions(opts);
 
     if( commands.Exists("u") ){
@@ -47,17 +46,17 @@ int main(int argc, char** argv)
     }
     if( commands.Exists("h") ){
       printUsage();
-      exit(0);
+      return 0;
     }
   }catch(std::string& strError){
     std::cerr << "Error: command parsing error "<<strError<<std::endl;
-    exit(0);
+    return 0;
   }
   
   if( mypfn.empty() || mylfn.empty() ){
     printUsage();
     std::cerr<<"Error: must specify pfname using -p, lfname using -l"<<std::endl;
-    exit(0);
+    return 0;
   }
   try{
     std::unique_ptr<IFileCatalog> mycatalog(new IFileCatalog);
@@ -71,10 +70,10 @@ int main(int argc, char** argv)
     mycatalog->disconnect();
   }catch (const pool::Exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }catch (const std::exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }
 }
 
diff --git a/Database/APR/FileCatalog/utilities/FCregisterPFN.cpp b/Database/APR/FileCatalog/utilities/FCregisterPFN.cpp
index e42d0e404997..d0820dc49790 100755
--- a/Database/APR/FileCatalog/utilities/FCregisterPFN.cpp
+++ b/Database/APR/FileCatalog/utilities/FCregisterPFN.cpp
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -20,8 +20,6 @@ void printUsage(){
   std::cout<< "usage: registerPFN -p pfname [ -u contactstring -t filetype -g guid -h ]" <<std::endl;
 }
 
-static const char* opts[] = {"p","t","g","u","h",0};
-
 
 int main(int argc, char** argv)
 {
@@ -33,6 +31,7 @@ int main(int argc, char** argv)
   std::string myguid;
   try{
     CommandLine commands(argc,argv);
+    const char* opts[] = {"p","t","g","u","h",0};
     commands.CheckOptions(opts);
 
     if( commands.Exists("u") ){
@@ -51,17 +50,17 @@ int main(int argc, char** argv)
     }
     if( commands.Exists("h") ){
       printUsage();
-      exit(0);
+      return 0;
     }
   }catch(std::string& strError){
     std::cerr<<"Error: command parsing error "<<strError<<std::endl;
-    exit(0);
+    return 0;
   }
   
   if( mypfn.empty() ){
     printUsage();
     std::cerr<<"Error: must specify pfname using -p"<<std::endl;
-    exit(0);
+    return 0;
   }
   try{  
     std::unique_ptr<IFileCatalog> mycatalog(new IFileCatalog);
@@ -76,10 +75,10 @@ int main(int argc, char** argv)
     std::cout<<myguid<<std::endl;
   }catch (const pool::Exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }catch (const std::exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }
 }
 
diff --git a/Database/APR/FileCatalog/utilities/FCrenamePFN.cpp b/Database/APR/FileCatalog/utilities/FCrenamePFN.cpp
index 61b6ce2c47fe..8d911bd514d7 100755
--- a/Database/APR/FileCatalog/utilities/FCrenamePFN.cpp
+++ b/Database/APR/FileCatalog/utilities/FCrenamePFN.cpp
@@ -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
 */
 
 /**FCrenamePFN.cpp -- FileCatalog command line tool to rename PFN. Used in the case the file has been moved.
@@ -18,8 +18,6 @@ void printUsage(){
   std::cout<<"usage: FCrenamePFN -p pfname -n newpfname [-u contactstring -h]" <<std::endl;
 }
 
-static const char* opts[] = {"p","n","u","h",0};
-
 
 int main(int argc, char** argv)
 {
@@ -30,6 +28,7 @@ int main(int argc, char** argv)
   std::string  mynewpfn;
   try{
     CommandLine commands(argc,argv);
+    const char* opts[] = {"p","n","u","h",0};
     commands.CheckOptions(opts);
 
     if( commands.Exists("u") ){
@@ -43,17 +42,17 @@ int main(int argc, char** argv)
     }
     if( commands.Exists("h") ){
       printUsage();
-      exit(0);
+      return 0;
     }
   }catch(std::string& strError){
     std::cerr << "error "<<strError<<std::endl;
-    exit(1);
+    return 1;
   }
   
   if( mypfn.empty() || mynewpfn.empty() ){
     printUsage();
     std::cerr<<"must specify pfname using -p, newpfname using -n "<<std::endl;
-    exit(0);
+    return 0;
   }
   try{
     std::unique_ptr<IFileCatalog> mycatalog(new IFileCatalog);
@@ -67,10 +66,10 @@ int main(int argc, char** argv)
     mycatalog->disconnect();
   }catch (const pool::Exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }catch (const std::exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }
 }
 
-- 
GitLab


From 8ae88c9a9ccce6d9373afa7076dca6c77e1f6a40 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Thu, 8 Oct 2020 15:42:06 +0200
Subject: [PATCH 384/403] DetDescrCondTools: Remove reference to StoreGate.h.

Remove reference to obsolete header StoreGate.h.
---
 .../DetDescrCond/DetDescrCondTools/src/CoolStrFileSvc.h       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/DetectorDescription/DetDescrCond/DetDescrCondTools/src/CoolStrFileSvc.h b/DetectorDescription/DetDescrCond/DetDescrCondTools/src/CoolStrFileSvc.h
index 58c6b29333b5..1e00121c625d 100755
--- a/DetectorDescription/DetDescrCond/DetDescrCondTools/src/CoolStrFileSvc.h
+++ b/DetectorDescription/DetDescrCond/DetDescrCondTools/src/CoolStrFileSvc.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 DETDESCRCONDTOOLS_COOLSTRFILESVC_H
@@ -10,7 +10,7 @@
 #include "DetDescrCondTools/ICoolStrFileSvc.h"
 #include "AthenaBaseComps/AthService.h"
 
-#include "StoreGate/StoreGate.h"
+#include "StoreGate/StoreGateSvc.h"
 class CoolStrFileSvc : public virtual ICoolStrFileSvc, public virtual AthService
 {
   template <class TYPE> class SvcFactory;
-- 
GitLab


From 7ca8457fc0aa6f1aa352be53e240da8f8df06f3f Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Thu, 8 Oct 2020 15:43:55 +0200
Subject: [PATCH 385/403] GeoModelSvc: Remove reference to StoreGate.h.

Remove reference to obsolete header StoreGate.h.
---
 .../GeoModel/GeoModelSvc/src/RDBMaterialManager.cxx              | 1 -
 1 file changed, 1 deletion(-)

diff --git a/DetectorDescription/GeoModel/GeoModelSvc/src/RDBMaterialManager.cxx b/DetectorDescription/GeoModel/GeoModelSvc/src/RDBMaterialManager.cxx
index 78c92b83a5f9..83bd068fcfbb 100755
--- a/DetectorDescription/GeoModel/GeoModelSvc/src/RDBMaterialManager.cxx
+++ b/DetectorDescription/GeoModel/GeoModelSvc/src/RDBMaterialManager.cxx
@@ -10,7 +10,6 @@
 #include "GeoModelKernel/GeoElement.h"
 #include "GeoModelKernel/Units.h"
 
-#include "StoreGate/StoreGate.h"
 #include "StoreGate/DataHandle.h"
 
 #include "RDBAccessSvc/IRDBAccessSvc.h"
-- 
GitLab


From f0166a933b0c054519a969d74c517e7c6c1685ea Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Thu, 8 Oct 2020 15:45:26 +0200
Subject: [PATCH 386/403] IdDictDetDescrCnv: Remove reference to StoreGate.h.

Remove reference to obsolete header StoreGate.h.
---
 .../IdDictDetDescrCnv/src/AtlasIDDetDescrCnv.cxx               | 3 +--
 .../IdDictDetDescrCnv/src/IdDictDetDescrCnv.cxx                | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/DetectorDescription/IdDictDetDescrCnv/src/AtlasIDDetDescrCnv.cxx b/DetectorDescription/IdDictDetDescrCnv/src/AtlasIDDetDescrCnv.cxx
index 3478bbe27512..811fc1cf07fe 100755
--- a/DetectorDescription/IdDictDetDescrCnv/src/AtlasIDDetDescrCnv.cxx
+++ b/DetectorDescription/IdDictDetDescrCnv/src/AtlasIDDetDescrCnv.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,7 +17,6 @@
 #include "DetDescrCnvSvc/DetDescrConverter.h"
 #include "DetDescrCnvSvc/DetDescrAddress.h"
 #include "GaudiKernel/MsgStream.h"
-#include "StoreGate/StoreGate.h" 
 #include "AthenaKernel/StorableConversions.h"
 
 #include "IdDictDetDescr/IdDictManager.h"
diff --git a/DetectorDescription/IdDictDetDescrCnv/src/IdDictDetDescrCnv.cxx b/DetectorDescription/IdDictDetDescrCnv/src/IdDictDetDescrCnv.cxx
index 74a87ea9b436..2ad3d0bb4a21 100755
--- a/DetectorDescription/IdDictDetDescrCnv/src/IdDictDetDescrCnv.cxx
+++ b/DetectorDescription/IdDictDetDescrCnv/src/IdDictDetDescrCnv.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
 */
 
 /***************************************************************************
@@ -26,7 +26,6 @@
  
 #include "GaudiKernel/MsgStream.h"
 
-#include "StoreGate/StoreGate.h" 
 #include "AthenaKernel/StorableConversions.h"
 
 
-- 
GitLab


From b66859c145f838133aa82c9cbf22db67d7741c31 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Thu, 8 Oct 2020 15:46:20 +0200
Subject: [PATCH 387/403] EventBookkeeperTools: Remove reference to
 StoreGate.h.

Remove reference to obsolete header StoreGate.h.
---
 Event/EventBookkeeperTools/src/FillEBCFromFlat.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Event/EventBookkeeperTools/src/FillEBCFromFlat.h b/Event/EventBookkeeperTools/src/FillEBCFromFlat.h
index b8c5a275e508..468a67c63798 100644
--- a/Event/EventBookkeeperTools/src/FillEBCFromFlat.h
+++ b/Event/EventBookkeeperTools/src/FillEBCFromFlat.h
@@ -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
 */
 
 #ifndef FILL_EBC_FROM_FLAT_H
 #define FILL_EBC_FROM_FLAT_H
 
 #include "GaudiKernel/ServiceHandle.h"
-#include "StoreGate/StoreGate.h"
+#include "StoreGate/StoreGateSvc.h"
 
 #include "SGTools/StlVectorClids.h"
 #include "SGTools/BuiltinsClids.h"
-- 
GitLab


From 1540c852c62130113ca1a932982ba2ab97fb8f95 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Thu, 8 Oct 2020 15:47:08 +0200
Subject: [PATCH 388/403] ForwardIdCnvc: Remove reference to StoreGate.h.

Remove reference to obsolete header StoreGate.h.
---
 ForwardDetectors/ForwardIdCnv/src/ZdcIDDetDescrCnv.cxx | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/ForwardDetectors/ForwardIdCnv/src/ZdcIDDetDescrCnv.cxx b/ForwardDetectors/ForwardIdCnv/src/ZdcIDDetDescrCnv.cxx
index 090c74254638..026f28b05d11 100644
--- a/ForwardDetectors/ForwardIdCnv/src/ZdcIDDetDescrCnv.cxx
+++ b/ForwardDetectors/ForwardIdCnv/src/ZdcIDDetDescrCnv.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
 */
 
 /***************************************************************************
@@ -17,7 +17,6 @@
 #include "DetDescrCnvSvc/DetDescrConverter.h"
 #include "DetDescrCnvSvc/DetDescrAddress.h"
 #include "GaudiKernel/MsgStream.h"
-#include "StoreGate/StoreGate.h" 
 
 #include "IdDictDetDescr/IdDictManager.h"
 #include "ZdcIdentifier/ZdcID.h"
-- 
GitLab


From 23cd6c0a1e6d4241ce822e75b7d25a4ad45d3188 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Fri, 9 Oct 2020 14:58:40 +0200
Subject: [PATCH 389/403] LArCalibUtils: Fix variable name to follow coding
 conventions

---
 .../python/GetCoolChannelSelection.py         | 20 +++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/LArCalorimeter/LArCalibUtils/python/GetCoolChannelSelection.py b/LArCalorimeter/LArCalibUtils/python/GetCoolChannelSelection.py
index 30a31fb6c9d3..5c4d9f00854b 100644
--- a/LArCalorimeter/LArCalibUtils/python/GetCoolChannelSelection.py
+++ b/LArCalorimeter/LArCalibUtils/python/GetCoolChannelSelection.py
@@ -15,27 +15,27 @@ def GetCoolChannelSelection(partition, gain, withPS):
     else:
         print("ERROR Gain out of range: ", gain)
         return ""
-    retstring=""
+    retString=""
     if (partition=="EMBA"):
-        retstring="%i:%i"%(g+35,g+66)
+        retString="%i:%i"%(g+35,g+66)
         if (withPS):
-            retstring+=",%s:%s"%(g+149,g+180)
+            retString+=",%s:%s"%(g+149,g+180)
             
     elif (partition=="EMBC"):
-        retstring="%i:%i"%(g+3,g+34)
+        retString="%i:%i"%(g+3,g+34)
         if (withPS):
-            retstring+=",%s:%s"%(g+117,g+148)
+            retString+=",%s:%s"%(g+117,g+148)
     
     elif (partition=="EMECA"):
-        retstring="%i:%i,%i,%i,%i,%i"\
+        retString="%i:%i,%i,%i,%i,%i"\
                      %(g+92,g+116,g+232,g+234,g+236,g+238)
         if (withPS):
-            retstring+=",%s:%s"%(g+210,g+230)
+            retString+=",%s:%s"%(g+210,g+230)
             
     elif (partition=="EMECA"):
-        retstring="%i:%i,%i,%i,%i,%i"\
+        retString="%i:%i,%i,%i,%i,%i"\
                    %(g+67,g+91,g+231,g+233,g+235,g+237)
         if (withPS):
-            retstring+=",%s:%s"%(g+181,g+209)
+            retString+=",%s:%s"%(g+181,g+209)
             
-    return retstring
+    return retString
-- 
GitLab


From fd490fe8693b3f1a1bb9fed06b715914bb480565 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Fri, 9 Oct 2020 17:44:27 +0200
Subject: [PATCH 390/403] clean up some compilation failures.

---
 .../IdDictDetDescrCnv/src/AtlasIDDetDescrCnv.cxx               | 3 ++-
 ForwardDetectors/ForwardIdCnv/src/ZdcIDDetDescrCnv.cxx         | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/DetectorDescription/IdDictDetDescrCnv/src/AtlasIDDetDescrCnv.cxx b/DetectorDescription/IdDictDetDescrCnv/src/AtlasIDDetDescrCnv.cxx
index 811fc1cf07fe..b2b6cedbe943 100755
--- a/DetectorDescription/IdDictDetDescrCnv/src/AtlasIDDetDescrCnv.cxx
+++ b/DetectorDescription/IdDictDetDescrCnv/src/AtlasIDDetDescrCnv.cxx
@@ -18,6 +18,7 @@
 #include "DetDescrCnvSvc/DetDescrAddress.h"
 #include "GaudiKernel/MsgStream.h"
 #include "AthenaKernel/StorableConversions.h"
+#include "StoreGate/StoreGateSvc.h"
 
 #include "IdDictDetDescr/IdDictManager.h"
 #include "AtlasDetDescr/AtlasDetectorID.h"
@@ -121,7 +122,7 @@ AtlasIDDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pObj)
     } else {}
  
     // Get the dictionary manager from the detector store
-    const DataHandle<IdDictManager> idDictMgr;
+    const IdDictManager* idDictMgr;
     status = detStore->retrieve(idDictMgr, "IdDict");
     if (status.isFailure()) {
 	log << MSG::FATAL << "Could not get IdDictManager !" << endmsg;
diff --git a/ForwardDetectors/ForwardIdCnv/src/ZdcIDDetDescrCnv.cxx b/ForwardDetectors/ForwardIdCnv/src/ZdcIDDetDescrCnv.cxx
index 026f28b05d11..721e66a00593 100644
--- a/ForwardDetectors/ForwardIdCnv/src/ZdcIDDetDescrCnv.cxx
+++ b/ForwardDetectors/ForwardIdCnv/src/ZdcIDDetDescrCnv.cxx
@@ -16,6 +16,7 @@
 
 #include "DetDescrCnvSvc/DetDescrConverter.h"
 #include "DetDescrCnvSvc/DetDescrAddress.h"
+#include "StoreGate/StoreGateSvc.h"
 #include "GaudiKernel/MsgStream.h"
 
 #include "IdDictDetDescr/IdDictManager.h"
@@ -119,7 +120,7 @@ ZdcIDDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pObj)
     } else {}
  
     // Get the dictionary manager from the detector store
-    const DataHandle<IdDictManager> idDictMgr;
+    const IdDictManager* idDictMgr = nullptr;
     status = detStore->retrieve(idDictMgr, "IdDict");
     if (status.isFailure()) {
 	log << MSG::FATAL << "Could not get IdDictManager !" << endmsg;
-- 
GitLab


From 787c640067a1de9c7675e04683930defb700104d Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Fri, 9 Oct 2020 18:30:03 +0000
Subject: [PATCH 391/403] Add SCTSiLorentzAngleTestAlgConfig.py to run
 SCTSiLorentzAngleTestAlg in unit test

---
 .../SiLorentzAngleTool/CMakeLists.txt         |  4 ++
 .../python/SCTSiLorentzAngleTestAlgConfig.py  | 46 +++++++++++++++++++
 2 files changed, 50 insertions(+)
 create mode 100644 InnerDetector/InDetConditions/SiLorentzAngleTool/python/SCTSiLorentzAngleTestAlgConfig.py

diff --git a/InnerDetector/InDetConditions/SiLorentzAngleTool/CMakeLists.txt b/InnerDetector/InDetConditions/SiLorentzAngleTool/CMakeLists.txt
index 7afdee9b19be..db384aa64ddc 100644
--- a/InnerDetector/InDetConditions/SiLorentzAngleTool/CMakeLists.txt
+++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/CMakeLists.txt
@@ -44,6 +44,10 @@ atlas_add_test( TestSCTLorentzAngle
                 PROPERTIES TIMEOUT 300
                 ENVIRONMENT THREADS=5 )
 
+atlas_add_test( TestSCTLorentzAngleNewConf
+                SCRIPT python -m SiLorentzAngleTool.SCTSiLorentzAngleTestAlgConfig
+                PROPERTIES TIMEOUT 300 )
+
 atlas_add_test( SiLorentzAngleConfig_test
                 SCRIPT test/SiLorentzAngleConfig_test.py
                 PROPERTIES TIMEOUT 30 )
diff --git a/InnerDetector/InDetConditions/SiLorentzAngleTool/python/SCTSiLorentzAngleTestAlgConfig.py b/InnerDetector/InDetConditions/SiLorentzAngleTool/python/SCTSiLorentzAngleTestAlgConfig.py
new file mode 100644
index 000000000000..89d6edef896f
--- /dev/null
+++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/python/SCTSiLorentzAngleTestAlgConfig.py
@@ -0,0 +1,46 @@
+"""Define method to configure and test SCTSiLorentzAngleTestAlg
+
+Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+"""
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.ComponentFactory import CompFactory
+
+def SCTSiLorentzAngleTestAlgCfg(flags, name="SCTSiLorentzAngleTestAlg", **kwargs):
+    """Return a configured SCTSiLorentzAngleTestAlg"""
+    acc = ComponentAccumulator()
+    from SiLorentzAngleTool.SCT_LorentzAngleConfig import SCT_LorentzAngleCfg
+    kwargs.setdefault("SCTLorentzAngleTool", acc.popToolsAndMerge(SCT_LorentzAngleCfg(flags)))
+    acc.addEventAlgo(CompFactory.SCTSiLorentzAngleTestAlg(**kwargs))
+    return acc
+
+if __name__=="__main__":
+    from AthenaCommon.Logging import log
+    from AthenaCommon.Constants import INFO
+    log.setLevel(INFO)
+
+    from AthenaCommon.Configurable import Configurable
+    Configurable.configurableRun3Behavior=1
+
+    from AthenaConfiguration.AllConfigFlags import ConfigFlags
+    ConfigFlags.Input.isMC = True
+    ConfigFlags.Input.ProjectName = "mc16_13TeV"
+    ConfigFlags.Input.RunNumber = [300000] # MC16c 2017 run number
+    ConfigFlags.addFlag("Input.InitialTimeStamp", 1500000000) # MC16c 2017 time stamp
+    ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-18"
+    ConfigFlags.GeoModel.AtlasVersion = "ATLAS-R2-2015-03-01-00"
+    ConfigFlags.Detector.GeometrySCT = True
+    ConfigFlags.lock()
+
+    from AthenaConfiguration.MainServicesConfig import MainServicesCfg
+    cfg = MainServicesCfg(ConfigFlags)
+
+    from SCT_GeoModel.SCT_GeoModelConfig import SCT_GeometryCfg
+    cfg.merge(SCT_GeometryCfg(ConfigFlags))
+
+    from McEventSelector.McEventSelectorConfig import McEventSelectorCfg
+    cfg.merge(McEventSelectorCfg(ConfigFlags))
+
+    cfg.merge(SCTSiLorentzAngleTestAlgCfg(ConfigFlags))
+
+    cfg.run(maxEvents=20)
+                                                                                                                                
-- 
GitLab


From bf3298881f4aa14ad013075e8df0567ad3cbbf83 Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Fri, 9 Oct 2020 18:30:57 +0000
Subject: [PATCH 392/403] Add SCT_DCSConditionsTestAlgConfig.py to run
 SCT_DCSConditionsTestAlg in the new job configuration.

---
 .../SCT_ConditionsAlgorithms/CMakeLists.txt   |  5 ++-
 .../python/SCT_DCSConditionsTestAlgConfig.py  | 45 +++++++++++++++++++
 2 files changed, 49 insertions(+), 1 deletion(-)
 create mode 100644 InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/python/SCT_DCSConditionsTestAlgConfig.py

diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt
index f81a2bc64d87..1c9e57a5efcd 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt
@@ -98,8 +98,11 @@ atlas_add_test( TestSummary
                 ENVIRONMENT THREADS=5 )
 atlas_add_test( TestTdaqEnabled
                 SCRIPT athena.py --threads=5 SCT_ConditionsAlgorithms/testTdaqEnabled.py
-                PROPERTIES TIMEOUT 720
+                PROPERTIES TIMEOUT 600
                 ENVIRONMENT THREADS=5 )
+atlas_add_test( TestDCSConditionsNewConf
+                SCRIPT python -m SCT_ConditionsAlgorithms.SCT_DCSConditionsTestAlgConfig
+                PROPERTIES TIMEOUT 600 )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/python/SCT_DCSConditionsTestAlgConfig.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/python/SCT_DCSConditionsTestAlgConfig.py
new file mode 100644
index 000000000000..3cb842621dd5
--- /dev/null
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/python/SCT_DCSConditionsTestAlgConfig.py
@@ -0,0 +1,45 @@
+"""Define method to configure and test SCT_DCSConditionsTestAlg
+
+Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+"""
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.ComponentFactory import CompFactory
+
+def SCT_DCSConditionsTestAlgCfg(flags, name="SCT_DCSConditionsTestAlg", **kwargs):
+    """Return a configured SCT_DCSConditionsTestAlg"""
+    acc = ComponentAccumulator()
+    from SCT_ConditionsTools.SCT_DCSConditionsConfig import SCT_DCSConditionsCfg
+    kwargs.setdefault("SCT_DCSConditionsTool", acc.popToolsAndMerge(SCT_DCSConditionsCfg(flags)))
+    acc.addEventAlgo(CompFactory.SCT_DCSConditionsTestAlg(**kwargs))
+    return acc
+
+if __name__=="__main__":
+    from AthenaCommon.Logging import log
+    from AthenaCommon.Constants import INFO
+    log.setLevel(INFO)
+
+    from AthenaCommon.Configurable import Configurable
+    Configurable.configurableRun3Behavior=1
+    
+    from AthenaConfiguration.AllConfigFlags import ConfigFlags
+    ConfigFlags.Input.isMC = False
+    ConfigFlags.Input.ProjectName = "data17_13TeV"
+    ConfigFlags.Input.RunNumber = [310809]
+    ConfigFlags.addFlag("Input.InitialTimeStamp", 1476741326) # LB 18 of run 310809, 10/17/2016 @ 9:55pm (UTC)
+    ConfigFlags.IOVDb.GlobalTag = "CONDBR2-BLKPA-2017-06"
+    ConfigFlags.GeoModel.AtlasVersion = "ATLAS-R2-2015-03-01-00"
+    ConfigFlags.Detector.GeometrySCT = True
+    ConfigFlags.lock()
+
+    from AthenaConfiguration.MainServicesConfig import MainServicesCfg
+    cfg = MainServicesCfg(ConfigFlags)
+
+    from AtlasGeoModel.GeoModelConfig import GeoModelCfg
+    cfg.merge(GeoModelCfg(ConfigFlags))
+
+    from McEventSelector.McEventSelectorConfig import McEventSelectorCfg
+    cfg.merge(McEventSelectorCfg(ConfigFlags))
+
+    cfg.merge(SCT_DCSConditionsTestAlgCfg(ConfigFlags))
+
+    cfg.run(maxEvents=20)
-- 
GitLab


From 3a45821fce72b3c0ed57555b168032095069b34f Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Sun, 4 Oct 2020 18:07:11 -0400
Subject: [PATCH 393/403] TrigBjetMonitoring: Fix compilation warning.

It makes no sense to try to format a function to an output stream.
What must have been meant is to format the result of calling the function...
---
 .../src/TrigBjetMonitorAlgorithm.cxx                   | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/Trigger/TrigMonitoring/TrigBjetMonitoring/src/TrigBjetMonitorAlgorithm.cxx b/Trigger/TrigMonitoring/TrigBjetMonitoring/src/TrigBjetMonitorAlgorithm.cxx
index 1ea900de7888..44ff7dbcb3e3 100644
--- a/Trigger/TrigMonitoring/TrigBjetMonitoring/src/TrigBjetMonitorAlgorithm.cxx
+++ b/Trigger/TrigMonitoring/TrigBjetMonitoring/src/TrigBjetMonitorAlgorithm.cxx
@@ -368,8 +368,9 @@ StatusCode TrigBjetMonitorAlgorithm::fillHistograms( const EventContext& ctx ) c
 	    NameH = "DL1_mv_tr_"+trigName;
 	    ATH_MSG_DEBUG( " NameH: " << NameH  );
 	    auto DL1_mv = Monitored::Scalar<double>(NameH,0.0);
-	    if ( LLR (DL1_pu, DL1_pc, DL1_pb, DL1_mv) ) fill("TrigBjetMonitor",DL1_mv);
-	    ATH_MSG_DEBUG("        DL1_mv: " << DL1_mv << " LLR: " << LLR); 
+            bool theLLR = LLR (DL1_pu, DL1_pc, DL1_pb, DL1_mv);
+	    if ( theLLR ) fill("TrigBjetMonitor",DL1_mv);
+	    ATH_MSG_DEBUG("        DL1_mv: " << DL1_mv << " LLR: " << theLLR); 
 
 
 	    NameH = "DL1r_pu_tr_"+trigName;
@@ -396,8 +397,9 @@ StatusCode TrigBjetMonitorAlgorithm::fillHistograms( const EventContext& ctx ) c
 	    NameH = "DL1r_mv_tr_"+trigName;
 	    ATH_MSG_DEBUG( " NameH: " << NameH  );
 	    auto DL1r_mv = Monitored::Scalar<double>(NameH,0.0);
-	    if ( LLR (DL1r_pu, DL1r_pc, DL1r_pb, DL1r_mv) ) fill("TrigBjetMonitor",DL1r_mv);
-	    ATH_MSG_DEBUG("        DL1r_mv: " << DL1r_mv << " LLR: " << LLR); 
+            theLLR = LLR (DL1r_pu, DL1r_pc, DL1r_pb, DL1r_mv);
+	    if ( theLLR ) fill("TrigBjetMonitor",DL1r_mv);
+	    ATH_MSG_DEBUG("        DL1r_mv: " << DL1r_mv << " LLR: " << theLLR); 
 
 	  } // if (ijet == 0)
 	  
-- 
GitLab


From 63ee86e18175ae566287c091934bfb831c3b9fb3 Mon Sep 17 00:00:00 2001
From: Joerg Stelzer <joerg.stelzer@cern.ch>
Date: Fri, 9 Oct 2020 20:46:24 +0000
Subject: [PATCH 394/403] TrigPSC: Fix for running athenaHLT from DB with
 HLTPSK

When running from the DB in athenaHLT, the HLTPSK needs to be read from
the database directly, `HLTPrescaleCondAlg.Source` needs to be changed
to `DB` to avoid trying to read the key from COOL.

Relates to ATR-22143.
---
 .../TrigPSC/share/TrigPSCPythonDbSetup.py     | 10 +++--
 .../TrigConfigSvc/src/HLTPrescaleCondAlg.cxx  | 43 +++++++++++++------
 2 files changed, 36 insertions(+), 17 deletions(-)

diff --git a/HLT/Trigger/TrigControl/TrigPSC/share/TrigPSCPythonDbSetup.py b/HLT/Trigger/TrigControl/TrigPSC/share/TrigPSCPythonDbSetup.py
index 1ba9ef0567df..120f219b32c7 100644
--- a/HLT/Trigger/TrigControl/TrigPSC/share/TrigPSCPythonDbSetup.py
+++ b/HLT/Trigger/TrigControl/TrigPSC/share/TrigPSCPythonDbSetup.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   TrigPSCPythonDbSetup.py
@@ -6,8 +6,8 @@
 ## @author Frank Winklmeier
 ###############################################################
 
-## This is a very minimal Python setup. It is only included when
-## the POSTCOMMAND is non-empty while running from the DB.
+## This is a very minimal Python setup. It is only used when running
+## with athenaHLT from the DB. It is not used in a partition!
 ## Besides providing basic python bindings it also takes care of
 ## switching the OutputLevel in case the "-l" option was used.
 
@@ -39,6 +39,10 @@ from GaudiPython import *
 from GaudiPython.Bindings import iProperty
 from TrigCommon.TrigPyHelper import trigApp
 
+## If HLT PSK is set on command line read it from DB (and not COOL)
+if 'hltkey' in PscConfig.optmap['JOBOPTIONSPATH']:
+   trigApp.changeJobProperties('HLTPrescaleCondAlg', 'Source', 'DB')
+
 ## Set OutputLevel in JobOptionsSvc if "-l" option was used in athenaHLT
 if logLevel!="INFO":
    outputLevel = int(locals()[logLevel])
diff --git a/Trigger/TrigConfiguration/TrigConfigSvc/src/HLTPrescaleCondAlg.cxx b/Trigger/TrigConfiguration/TrigConfigSvc/src/HLTPrescaleCondAlg.cxx
index fc1faa470485..f6b6947c9566 100644
--- a/Trigger/TrigConfiguration/TrigConfigSvc/src/HLTPrescaleCondAlg.cxx
+++ b/Trigger/TrigConfiguration/TrigConfigSvc/src/HLTPrescaleCondAlg.cxx
@@ -27,7 +27,6 @@ TrigConf::HLTPrescaleCondAlg::createFromFile( const std::string & filename ) con
    if( psLoader.loadFile( filename, *pss) ) {
       ATH_MSG_INFO( "HLT prescales set successfully loaded from file " << filename );
    } else {
-      ATH_MSG_WARNING( "Failed loading HLT prescales set from file " << filename ); // will be made an error later
       pss = nullptr;
    }
    return pss;
@@ -71,15 +70,17 @@ TrigConf::HLTPrescaleCondAlg::initialize() {
 
    ATH_CHECK(m_hltPrescalesSetOutputKey.initialize());
 
-   if( m_configSource == "COOL" && m_dbConnection == "JOSVC" ) {
-      if( auto joSvc = serviceLocator()->service<TrigConf::IJobOptionsSvc>( "JobOptionsSvc" ) ) {
-         if( joSvc->hltPrescaleKey()>0 ) {
-            m_psk = joSvc->hltPrescaleKey();
-            m_dbConnection = joSvc->server();
-            ATH_MSG_INFO("Set psk to " << m_psk <<  " and db connection to " << m_dbConnection );
+   if( m_dbConnection == "JOSVC" ) {
+      if( m_configSource == "COOL" || m_configSource == "DB" ) {
+         if( auto joSvc = serviceLocator()->service<TrigConf::IJobOptionsSvc>( "JobOptionsSvc" ) ) {
+            if( joSvc->hltPrescaleKey()>0 ) {
+               m_psk = joSvc->hltPrescaleKey();
+               m_dbConnection = joSvc->server();
+               ATH_MSG_INFO("Set psk to " << m_psk <<  " and db connection to " << m_dbConnection );
+            }
+         } else {
+            ATH_MSG_DEBUG("Did not locate TrigConf::IJobOptionsSvc");
          }
-      } else {
-         ATH_MSG_DEBUG("Did not locate TrigConf::IJobOptionsSvc");
       }
    }
 
@@ -92,15 +93,24 @@ TrigConf::HLTPrescaleCondAlg::initialize() {
 
       // index 0 indicates that the configuration is from a file, a DB
       // PSK is greater than 0
-      m_pssMap[0] = createFromFile( m_filename );
+      std::shared_ptr<HLTPrescalesSet> pss = createFromFile( m_filename );
+      if( pss == nullptr ) {
+         ATH_MSG_ERROR( "Failed loading HLT prescales set from the file " << m_filename );
+         return StatusCode::FAILURE;
+      }
+      m_pssMap[0] = pss;
 
    } else if( m_psk != 0u ) {
 
       // this is for the case where the reading from the DB was
       // configured and also when we read from COOL online and get a
       // PSK through the JobOptionsSvc
-      m_pssMap[m_psk] = createFromDB( m_psk, true );
-
+      std::shared_ptr<HLTPrescalesSet> pss = createFromDB( m_psk, true );
+      if( pss == nullptr ) {
+         ATH_MSG_ERROR( "Failed loading HLT prescales set " << m_psk << " from the database" );
+         return StatusCode::FAILURE;
+      }
+      m_pssMap[m_psk] = pss;
    }
 
    return StatusCode::SUCCESS;
@@ -156,11 +166,16 @@ TrigConf::HLTPrescaleCondAlg::execute(const EventContext& ctx) const {
       auto pssi = m_pssMap.find( hltPsk );
 
       if( pssi == m_pssMap.end()) {
-
+         
          bool isRun3 = range.start().run_number()>350000;
 
          pss = m_pssMap[hltPsk] = createFromDB( hltPsk, isRun3 );
 
+         if( pss == nullptr ) {
+            ATH_MSG_ERROR( "Failed loading HLT prescales set from the database" );
+            return StatusCode::FAILURE;
+         }
+
       } else {
       
          pss = pssi->second;
@@ -181,7 +196,7 @@ TrigConf::HLTPrescaleCondAlg::execute(const EventContext& ctx) const {
       ATH_MSG_INFO("Recording empty HLT prescales set with range " << range);
       ATH_CHECK( writeCondHandle.record( range, new HLTPrescalesSet ) );
    } else {
-      ATH_MSG_INFO("Recording HLT prescales set with range " << range);
+      ATH_MSG_INFO("Recording HLT prescales set with range " << range << " (key = " << hltPsk << ")");
       ATH_CHECK( writeCondHandle.record( range, new HLTPrescalesSet(*pss) ) );
    }
 
-- 
GitLab


From 32e2147dcf852ddc34959ea83bfb0097b8ffb8ca Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Fri, 9 Oct 2020 20:48:51 +0000
Subject: [PATCH 395/403] Add SCTHitEffMonAlg, SCTErrMonAlg, SCTHitsNoiseMonAlg
 to SCTMonitoringConfig.py

---
 .../SCT_Monitoring/CMakeLists.txt             |   2 +
 .../SCT_Monitoring/doc/packagedoc.h           |   7 -
 .../SCT_Monitoring/python/SCTErrMonAlg.py     | 235 ++++++++++++++++++
 .../SCT_Monitoring/python/SCTHitEffMonAlg.py  |   4 +-
 .../python/SCTHitsNoiseMonAlg.py              | 204 +++++++++++++++
 .../python/SCTMonitoringConfig.py             |   8 +-
 6 files changed, 450 insertions(+), 10 deletions(-)
 create mode 100644 InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTErrMonAlg.py
 create mode 100644 InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTHitsNoiseMonAlg.py

diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/CMakeLists.txt b/InnerDetector/InDetMonitoring/SCT_Monitoring/CMakeLists.txt
index 3746f67d0e70..85069ddd3d88 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/CMakeLists.txt
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/CMakeLists.txt
@@ -21,6 +21,8 @@ atlas_add_dictionary( SCT_MonitoringDict
                       SCT_Monitoring/selection.xml )
 
 # Run tests:
+# This is a standalone test with ESD input.
+# This is not essential and can be abandoned if it won't run.
 atlas_add_test( SCTLorentzMonAlg_test
                 SCRIPT python -m SCT_Monitoring.SCTLorentzMonAlg
                 PROPERTIES TIMEOUT 600 )
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/doc/packagedoc.h b/InnerDetector/InDetMonitoring/SCT_Monitoring/doc/packagedoc.h
index 42a92f246308..bd79e788f50e 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/doc/packagedoc.h
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/doc/packagedoc.h
@@ -29,7 +29,6 @@ Here are the active monitoring algorithms / tools:
 @subsection SCT_Monitoring_SCT_MonitoringConfigurationNewNew Configuration in the new DQ framework and the new job configuration framework
 
 InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTMonitoringConfig.py is the main configuration script.
-Only SCTLorentzMonAlg and SCTTracksMonAlg are configured in the script using SCTLorentzMonAlg.py and SCTTracksMonAlg.py because the Inner Dector configuration is not fully ready in the new job configuration framework as of October, 2020.
 
 When the Reco_tf.py command is used, the chain is the following:
 - Reconstruction/RecJobTransforms/scripts/Reco_tf.py
@@ -39,12 +38,6 @@ When the Reco_tf.py command is used, the chain is the following:
 - Control/AthenaMonitoring/python/AthenaMonitoringCfg.py
 - InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTMonitoringConfig.py
 
-Individual algorithms can be run using the configuration scripts like:
-
-\verbatim
-python -m SCT_Monitoring.SCTLorentzMonAlg
-\endverbatim
-
 @subsection SCT_Monitoring_SCT_MonitoringConfigurationNewOld Configuration in the new DQ framework and the old job configuration framework
 
 InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringSCT.py is the main configuration script.
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTErrMonAlg.py b/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTErrMonAlg.py
new file mode 100644
index 000000000000..febbed7bf3b5
--- /dev/null
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTErrMonAlg.py
@@ -0,0 +1,235 @@
+#
+#  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+#
+
+'''@file SCTErrMonAlg_jobOptions.py
+@author Susumu Oda
+@date 2020-10-08
+@brief New style configuration of SCTErrMonAlg
+'''
+
+def SCTErrMonAlgConfig(inputFlags):
+
+    from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+    result = ComponentAccumulator()
+
+    from AthenaMonitoring import AthMonitorCfgHelper
+    helper = AthMonitorCfgHelper(inputFlags, 'SCTErrMonCfg')
+
+    from AthenaConfiguration.ComponentFactory import CompFactory
+    myMonAlg = helper.addAlgorithm(CompFactory.SCTErrMonAlg, 'SCTErrMonAlg')
+    myMonAlg.TriggerChain = ""
+
+    # SCT conditions tools (update is necessary when the ID configuration in the new job framework is ready.)
+    ConditionsTools = []
+    myMonAlg.conditionsTool = CompFactory.SCT_ConfigurationConditionsTool(name="InDetSCT_ConfigurationConditionsTool")
+    ConditionsTools += [myMonAlg.conditionsTool]
+    myMonAlg.SCT_ByteStreamErrorsTool = CompFactory.SCT_ByteStreamErrorsTool(name="SCT_ByteStreamErrorsTool")
+    myMonAlg.SCT_ByteStreamErrorsTool.ConfigTool = myMonAlg.conditionsTool
+    ConditionsTools += [myMonAlg.SCT_ByteStreamErrorsTool]
+    if inputFlags.InDet.useDCS:
+        myMonAlg.SCT_DCSConditionsTool = CompFactory.SCT_DCSConditionsTool(name="InDetSCT_DCSConditionsTool")
+        ConditionsTools += [myMonAlg.SCT_DCSConditionsTool]
+    else:
+        myMonAlg.UseDCS = False
+    ConditionsTools += [CompFactory.SCT_ReadCalibDataTool(name="InDetSCT_ReadCalibDataTool")]
+    if not inputFlags.Common.isOnline:
+        ConditionsTools += [CompFactory.SCT_MonitorConditionsTool(name="InDetSCT_MonitorConditionsTool")]
+    if not inputFlags.Input.isMC:
+        ConditionsTools += [CompFactory.SCT_TdaqEnabledTool(name="InDetSCT_TdaqEnabledTool")]
+    kwargs = {}
+    kwargs.setdefault("ConditionsTools", ConditionsTools)
+    myMonAlg.SCT_ConditionsSummaryTool = CompFactory.SCT_ConditionsSummaryTool(name="InDetSCT_ConditionsSummaryTool", **kwargs)
+
+    ## The following does not work when running Reco_tf.py
+    ## because it configures condition algorithms
+    ## and they conflict with ones configured in the old framework.
+    # myMonAlg.SCT_ConditionsSummaryTool = result.popToolsAndMerge(InDetSCT_ConditionsSummaryToolCfg(inputFlags))
+    # from InDetConfig.InDetRecToolConfig import SCT_ConfigurationCondAlgCfg, SCT_ConfigurationConditionsToolCfg
+    # result.merge(SCT_ConfigurationCondAlgCfg(inputFlags))
+    # myMonAlg.conditionsTool = result.popToolsAndMerge(SCT_ConfigurationConditionsToolCfg(inputFlags))
+    # from InDetConfig.InDetRecToolConfig import SCT_ByteStreamErrorsToolCfg
+    # myMonAlg.SCT_ByteStreamErrorsTool = result.popToolsAndMerge(SCT_ByteStreamErrorsToolCfg(inputFlags))
+    # if inputFlags.InDet.useDCS:
+    #     from SCT_ConditionsTools.SCT_DCSConditionsConfig import SCT_DCSConditionsCfg
+    #     myMonAlg.SCT_DCSConditionsTool = result.popToolsAndMerge(SCT_DCSConditionsCfg(inputFlags))
+    # else:
+    #     myMonAlg.UseDCS = False
+
+    # FilterTools
+    # There seems no new configureation corresponding to
+    # from AthenaMonitoring.FilledBunchFilterTool import GetFilledBunchFilterTool
+    if inputFlags.Beam.Type=='collisions':
+        if inputFlags.Input.isMC:
+            from AthenaMonitoring.AthenaMonitoringConf import DQDummyFilterTool
+            myMonAlg.FilterTools += [DQDummyFilterTool()]
+        else:
+            from AthenaMonitoring.AthenaMonitoringConf import DQFilledBunchFilterTool
+            from TrigBunchCrossingTool.BunchCrossingTool import BunchCrossingTool
+            monFilledBunchFilterTool = DQFilledBunchFilterTool()
+            monFilledBunchFilterTool.bunchCrossingTool = BunchCrossingTool()
+            myMonAlg.FilterTools += [monFilledBunchFilterTool]
+
+    myMonGroup = helper.addGroup(myMonAlg, "SCTErrMonitor", "SCT/")
+
+    # Configure histograms
+
+    from ROOT import SCT_Monitoring as sctMon #import SCT_MonitoringNumbers.h
+
+    # Filled in fillHistograms
+    myMonGroup.defineHistogram(varname = "lumiBlock;NumberOfEventsVsLB",
+                               cutmask = "is1D",
+                               type = "TH1F",
+                               title = "Num of events per LB ;LumiBlock",
+                               path = "GENERAL/Conf",
+                               xbins = sctMon.NBINS_LBs,
+                               xmin = 0.5,
+                               xmax = sctMon.NBINS_LBs+0.5)
+
+    # Filled in fillHistograms
+    myMonGroup.defineHistogram(varname = "lumiBlock;NumberOfSCTFlagErrorsVsLB",
+                               cutmask = "sctFlag",
+                               type = "TH1F",
+                               title = "Num of SCT Flag errors per LB ;LumiBlock",
+                               path = "GENERAL/Conf",
+                               xbins = sctMon.NBINS_LBs,
+                               xmin = 0.5,
+                               xmax = sctMon.NBINS_LBs+0.5)
+
+    # Filled in fillHistograms
+    myMonGroup.defineHistogram(varname = "lumiBlock, sctFlag;FractionOfSCTFlagErrorsPerLB",
+                               type = "TProfile",
+                               title = "Frac of SCT Flag errors per LB ;LumiBlock",
+                               path = "GENERAL/Conf",
+                               xbins = sctMon.NBINS_LBs,
+                               xmin = 0.5,
+                               xmax = sctMon.NBINS_LBs+0.5)
+
+    # Filled in fillConfigurationDetails
+    myMonGroup.defineHistogram(varname = "detailedConfBin, nBad;SCTConfDetails",
+                               type = "TProfile",
+                               title = "Exclusion from the Configuration",
+                               path = "GENERAL/Conf",
+                               xbins = sctMon.ConfbinsDetailed,
+                               xmin = -0.5,
+                               xmax = sctMon.ConfbinsDetailed-0.5,
+                               xlabels = ["Modules", "Link 0", "Link 1", "Chips", "Strips (10^{2})"])
+
+    # Filled in fillHistograms
+    myMonGroup.defineHistogram(varname = "moduleOutBin, moduleOut;SCTConfOutM",
+                               type = "TProfile",
+                               title = "Num of Out Modules in All Region",
+                               path = "GENERAL/Conf",
+                               xbins = 1,
+                               xmin = -0.5,
+                               xmax = 0.5,
+                               xlabels = ["Mod Out"])
+
+    # Fiiled in fillByteStreamErrors
+    from ROOT import SCT_ByteStreamErrors
+    for i in range(SCT_ByteStreamErrors.NUM_ERROR_TYPES):
+        myMonGroup.defineHistogram(varname = "lumiBlock, n_"+SCT_ByteStreamErrors.ErrorTypeDescription[i]+";SCT_"+SCT_ByteStreamErrors.ErrorTypeDescription[i]+"VsLbs",
+                                   type = "TProfile",
+                                   title = "Ave. "+SCT_ByteStreamErrors.ErrorTypeDescription[i]+" per LB in All Region;LumiBlock;Num of "+SCT_ByteStreamErrors.ErrorTypeDescription[i],
+                                   path = "GENERAL/Conf",
+                                   xbins = sctMon.NBINS_LBs,
+                                   xmin = 0.5,
+                                   xmax = sctMon.NBINS_LBs+0.5)
+
+    # Fiiled in fillByteStreamErrors
+    for i in range(sctMon.N_ERRCATEGORY):
+        myMonGroup.defineHistogram(varname = "lumiBlock, n_"+sctMon.CategoryErrorsNames[i]+";SCT_LinksWith"+sctMon.CategoryErrorsNames[i]+"VsLbs",
+                                   type = "TProfile",
+                                   title = "Ave. Num of Links with "+sctMon.CategoryErrorsNames[i]+" per LB in All Region;LumiBlock;Num of Links with "+sctMon.CategoryErrorsNames[i],
+                                   path = "GENERAL/Conf",
+                                   xbins = sctMon.NBINS_LBs,
+                                   xmin = 0.5,
+                                   xmax = sctMon.NBINS_LBs+0.5)
+
+    # Filled in fillByteStreamErrors
+    for errCate in range(sctMon.N_ERRCATEGORY):
+        for region in range(sctMon.N_REGIONS):
+            for layer in range(sctMon.N_ENDCAPSx2):
+                myMonGroup.defineHistogram(varname = "eta, phi, hasError_"+sctMon.CategoryErrorsNames[errCate]+"_"+sctMon.subDetNameShort[region].Data()+"_"+str(layer/2)+"_"+str(layer%2)+";SCT_NumberOf"+sctMon.CategoryErrorsNames[errCate]+sctMon.subDetNameShort[region].Data()+"_"+str(layer/2)+"_"+str(layer%2),
+                                           type = "TProfile2D",
+                                           title = "Num of "+sctMon.CategoryErrorsNames[errCate]+" per "+sctMon.layerName[region].Data()+str(layer/2)+"_"+str(layer%2),
+                                           path = "SCT"+sctMon.subDetNameShort[region].Data()+"/errors/"+sctMon.CategoryErrorsNames[errCate],
+                                           xbins = sctMon.N_ETA_BINS if region==sctMon.BARREL_INDEX else sctMon.N_ETA_BINS_EC,
+                                           xmin = (sctMon.FIRST_ETA_BIN if region==sctMon.BARREL_INDEX else sctMon.FIRST_ETA_BIN_EC)-0.5,
+                                           xmax = (sctMon.LAST_ETA_BIN if region==sctMon.BARREL_INDEX else sctMon.LAST_ETA_BIN_EC)+0.5,
+                                           ybins = sctMon.N_PHI_BINS if region==sctMon.BARREL_INDEX else sctMon.N_PHI_BINS_EC,
+                                           ymin = (sctMon.FIRST_PHI_BIN if region==sctMon.BARREL_INDEX else sctMon.FIRST_PHI_BIN_EC)-0.5,
+                                           ymax = (sctMon.LAST_PHI_BIN if region==sctMon.BARREL_INDEX else sctMon.LAST_PHI_BIN_EC)+0.5,
+                                           duration = "lb")
+
+    # Filled in fillByteStreamErrorsHelper
+    myMonGroup.defineHistogram(varname = "maskedLinksBin;Masked Links",
+                               weight = "maskedLinks",
+                               type = "TH1I",
+                               title = "Number of Masked Links for SCT,ECA,B,ECC",
+                               path = "GENERAL/errors",
+                               xbins = sctMon.N_REGIONS_INC_GENERAL,
+                               xmin = -0.5,
+                               xmax = sctMon.N_REGIONS_INC_GENERAL-0.5,
+                               xlabels = ["EndCapC", "Barrel", "EndCapA", "All"])
+
+    # Filled in fillHistograms
+    myMonGroup.defineHistogram(varname = "flaggedWafersIndices, nFlaggedWafers;FlaggedWafers",
+                               type = "TProfile",
+                               title = "Number of flagged wafers for SCT,ECA,B,ECC",
+                               path = "GENERAL/errors",
+                               xbins = sctMon.N_REGIONS_INC_GENERAL,
+                               xmin = -0.5,
+                               xmax = sctMon.N_REGIONS_INC_GENERAL-0.5,
+                               xlabels = ["EndCapC", "Barrel", "EndCapA", "All"])
+
+    # Filled in fillByteStreamErrors
+    coverageTitles = [
+        "", # All (not used)
+        "Ave. Coverage of Enabled Links per LB", # All - Disabled
+        "Ave. Coverage of Links with No Bad LinkLevelError per LB", # All - BadLinkLevelError
+        "Ave. Coverage of Links with No Bad RODLevelError per LB", # All - BadRODLevelError
+        "Ave. Coverage of Links with No Bad Error per LB", # All - BadError
+        "Ave. Coverage of links Not Affected by PS Trip", # All - PSTrip (DCS)
+        "Ave. Coverage of Links With No Bad Problem per LB" # All - Summary
+    ]
+    for iProblem in range(1, sctMon.numberOfProblemForCoverage):
+        myMonGroup.defineHistogram(varname = "lumiBlock, detectorCoverage"+sctMon.coverageVarNames[iProblem]+";SCT_Coverage"+sctMon.coverageVarNames[iProblem]+"VsLbs",
+                                   type = "TProfile",
+                                   title = coverageTitles[iProblem]+";LumiBlock;Detector Coverage [%]",
+                                   path = "DetectorCoverage",
+                                   xbins = sctMon.NBINS_LBs,
+                                   xmin = 0.5,
+                                   xmax = sctMon.NBINS_LBs+0.5)    
+
+    # Fiiled in fillByteStreamErrors
+    myMonGroup.defineHistogram(varname = "lumiBlock, psTripModules;SCT_ModulesWithPSTripVsLbs",
+                               type = "TProfile",
+                               title = "Ave. Num of Modules Affected by PS Trip per LB in All Region;LumiBlock;Num. of Modules Affected by PS Trip",
+                               path = "DetectorCoverage",
+                               xbins = sctMon.NBINS_LBs,
+                               xmin = 0.5,
+                               xmax = sctMon.NBINS_LBs+0.5)
+
+    # Filled in fillByteStreamErrorsHelper
+    xlabels = [SCT_ByteStreamErrors.ErrorTypeDescription[i] for i in range(SCT_ByteStreamErrors.NUM_ERROR_TYPES)]
+    for reg in range(sctMon.N_REGIONS):
+        nLayers = sctMon.n_layers[reg]*2
+        ylabels = [str(i/2)+"_"+str(i%2) for i in range(nLayers)]
+        myMonGroup.defineHistogram(varname = "errorType, layerSide, errorFraction;RateErrorsPerLumi",
+                                   cutmask = "is"+sctMon.subDetNameShort[reg].Data(),
+                                   type = "TProfile2D",
+                                   title = "Rate of Error Types for "+sctMon.layerName[reg].Data()+" per Lumi-Block",
+                                   path = "SCT"+sctMon.subDetNameShort[reg].Data()+"/errors",
+                                   xbins = SCT_ByteStreamErrors.NUM_ERROR_TYPES,
+                                   xmin = -0.5,
+                                   xmax = SCT_ByteStreamErrors.NUM_ERROR_TYPES-0.5,
+                                   xlabels = xlabels,
+                                   ybins = nLayers,
+                                   ymin = -0.5,
+                                   ymax = nLayers-0.5,
+                                   ylabels = ylabels,
+                                   duration = "lb")
+
+    result.merge(helper.result())
+    return result
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTHitEffMonAlg.py b/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTHitEffMonAlg.py
index ed50ebf56f18..09e7956c59a1 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTHitEffMonAlg.py
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTHitEffMonAlg.py
@@ -155,7 +155,7 @@ def SCTHitEffMonAlgConfig(inputFlags):
 
     # 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
@@ -180,7 +180,7 @@ def SCTHitEffMonAlgConfig(inputFlags):
         # Efficiency as a function of LB
         myMonGroup[isub].defineHistogram(varname= "LumiBlock, eff;"+"effLumiBlock", #different names for fill
                                          type= "TProfile",
-                                         title= "Efficiency vs Luminosity block in "+sctMon.subDetName[isub]+";Luminosity block"+";Efficiency",
+                                         title= "Efficiency vs Luminosity block in "+subDetName[isub]+";Luminosity block"+";Efficiency",
                                          path="eff",
                                          xbins=sctMon.NBINS_LBs,
                                          xmin=0.5,
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTHitsNoiseMonAlg.py b/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTHitsNoiseMonAlg.py
new file mode 100644
index 000000000000..21db3f66f768
--- /dev/null
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTHitsNoiseMonAlg.py
@@ -0,0 +1,204 @@
+#
+#  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+#
+
+'''@file SCTHitNoiseMonAlg.py
+@author Susumu Oda
+@date 2020-10-08
+@brief New style configuration of SCTHitNoiseMonAlg
+'''
+
+def Title( i, isub):
+    m_layerStr = i / 2
+    m_sideStr = i % 2
+    m_region = isub
+    if m_region == 1 :
+        return "Layer " + str(m_layerStr) + " Side " + str(m_sideStr)
+    else: 
+        return "Disk " + str(m_layerStr) + " Side " + str(m_sideStr)
+  
+
+def SCTHitsNoiseMonAlgConfig(inputFlags):
+
+    from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+    result = ComponentAccumulator()
+    
+    from AthenaMonitoring import AthMonitorCfgHelper
+    helper = AthMonitorCfgHelper(inputFlags, 'SCTHitsNoiseMonCfg')
+           
+    from AthenaConfiguration.ComponentFactory import CompFactory
+    myMonAlg = helper.addAlgorithm(CompFactory.SCTHitsNoiseMonAlg, 'SCTHitsNoiseMonAlg')
+    myMonAlg.TriggerChain = ""
+
+    # Trigger histogram will be made only for data.
+    myMonAlg.doTrigger = (not inputFlags.Input.isMC)
+
+    from ROOT import SCT_Monitoring as sctMon #import SCT_MonitoringNumbers.h
+
+    # Add a generic monitoring tool (a "group" in old language). The returned 
+    # object here is the standard GenericMonitoringTool.
+    dimension = [sctMon.N_REGIONS]
+
+    MonGroupArray = helper.addArray(dimension,myMonAlg,"SCTHitsNoiseMonitor","SCT") # SCTHitsNoiseMonitor_3 on index 0 !!
+
+    myMonGroupGeneral = helper.addGroup(
+        myMonAlg,
+        "SCTHitsNoiseMonitorGeneral",
+        "SCT/GENERAL/"
+    )
+
+    # Configure histograms
+
+    abbreviations = ["ECp", "", "ECm"]
+    names = ["Endcap A", "Barrel", "Endcap C"]
+    path = ["SCTEA", "SCTB", "SCTEC"]
+    noiseAbbreviations = ["ECA","BAR","ECC"]
+    titleAbbreviations = ["ECp","BAR","ECm"]
+    limits = [ sctMon.N_DISKS*2, sctMon.N_BARRELS*2, sctMon.N_DISKS*2 ]
+
+    for isub in range(sctMon.N_REGIONS):
+        for i in range(limits[isub]):
+
+            HitsMapName = "hitsmap" + abbreviations[isub] +  "_" + str(i/2) + "_" + str(i%2)
+            HitsMapTitle = "SCT Hitmap for " + names[isub] + ": " + Title(i,isub)
+            MonGroupArray.__getitem__(isub).defineHistogram(varname= "eta_"+HitsMapName+",phi_"+HitsMapName+";"+HitsMapName,
+                                                            type= "TH2F", 
+                                                            title= HitsMapTitle + ";Index in the direction of #eta;Index in the direction of #phi",
+                                                            path= path[isub] + "/hits",
+                                                            xbins=sctMon.n_etabins[isub], xmin=sctMon.f_etabin[isub]-0.5, xmax=sctMon.l_etabin[isub]+0.5,
+                                                            ybins=sctMon.n_phibins[isub], ymin=sctMon.f_phibin[isub]-0.5 , ymax=sctMon.l_phibin[isub]+0.5,
+                                                            weight="numberOfStrips_"+HitsMapName )
+                    
+            streamhitmap = "mapsOfHitsOnTracks" + abbreviations[isub] + "_" + "trackhitsmap_" + str(i/2) + "_" + str(i%2)
+            histotitle = "SCT hits on tracks for " + names[isub] + " " + Title(i,isub)
+            MonGroupArray.__getitem__(isub).defineHistogram(varname= "eta_"+streamhitmap + ",phi_"+streamhitmap + ";"+streamhitmap,
+                                                            type= "TH2F", 
+                                                            title= histotitle + ";Index in the direction of #eta;Index in the direction of #phi",
+                                                            path= path[isub] + "/hits/mapsOfHitsOnTracks/",
+                                                            xbins=sctMon.n_etabins[isub], xmin=sctMon.f_etabin[isub]-0.5, xmax=sctMon.l_etabin[isub]+0.5,
+                                                            ybins=sctMon.n_phibins[isub], ymin=sctMon.f_phibin[isub]-0.5 , ymax=sctMon.l_phibin[isub]+0.5 )
+                    
+            occMap = "occupancymap" + abbreviations[isub] + "_" + str(i/2) + "_" + str(i%2)
+            hitoccupancy = "hitoccupancymap" + abbreviations[isub] + "_" + str(i/2) + "_" + str(i%2)
+            histotitleR  = "SCT Hit Occupancy map for " + names[isub] + ": " + Title(i,isub)
+            MonGroupArray.__getitem__(isub).defineHistogram(varname= "eta_"+occMap + ",phi_"+occMap + ",HO_"+occMap+";" + hitoccupancy,
+                                                            type= "TProfile2D", 
+                                                            title= histotitleR + ";Index in the direction of #eta;Index in the direction of #phi",
+                                                            path= path[isub] + "/Noise",
+                                                            xbins=sctMon.n_etabins[isub], xmin=sctMon.f_etabin[isub]-0.5, xmax=sctMon.l_etabin[isub]+0.5,
+                                                            ybins=sctMon.n_phibins[isub], ymin=sctMon.f_phibin[isub]-0.5, ymax=sctMon.l_phibin[isub]+0.5 )
+        
+            noiseoccupancy = "noiseoccupancymaptrigger" + abbreviations[isub] + "_" + str(i/2) + "_" + str(i%2)
+            m_NOTriggerItem =  "L1_RD0_EMPTY"
+            histotitletrigger = "SCT Noise Occupancy map for " + m_NOTriggerItem + " Trigger and " + names[isub] + ": " + Title(i,isub)
+            MonGroupArray.__getitem__(isub).defineHistogram(varname= "eta_"+occMap + ",phi_"+occMap + ",NO_"+occMap+";" + noiseoccupancy,
+                                                            type= "TProfile2D", 
+                                                            title= histotitletrigger + ";Index in the direction of #eta;Index in the direction of #phi",
+                                                            cutmask= "IsSelectedTrigger_"+occMap,
+                                                            path= path[isub] + "/Noise",
+                                                            xbins=sctMon.n_etabins[isub], xmin=sctMon.f_etabin[isub]-0.5, xmax=sctMon.l_etabin[isub]+0.5,
+                                                            ybins=sctMon.n_phibins[isub], ymin=sctMon.f_phibin[isub]-0.5, ymax=sctMon.l_phibin[isub]+0.5 )
+        
+        #End i Loop
+    
+        MonGroupArray.__getitem__(isub).defineHistogram(varname= "LB,HO;"+ noiseAbbreviations[isub] + "HO_vsLB",
+                                                        type= "TProfile", 
+                                                        title= "HO vs LB for all region (SP noise)" + ";LumiBlock;Hit Occupancy [10^{-5}]",
+                                                        path= path[isub] + "/Noise",
+                                                        xbins=sctMon.NBINS_LBs, xmin = 0.5, xmax = sctMon.NBINS_LBs + 0.5)
+
+        MonGroupArray.__getitem__(isub).defineHistogram(varname= "LB,HO;"+ noiseAbbreviations[isub] + "HOTrigger_vsLB",
+                                                        type= "TProfile", 
+                                                        title= "HO with trigger vs LB for all region (SP noise)" + ";LumiBlock;Hit Occupancy [10^{-5}]",
+                                                        cutmask= "IsSelectedTrigger",
+                                                        path= path[isub] + "/Noise",
+                                                        xbins=sctMon.NBINS_LBs, xmin = 0.5, xmax = sctMon.NBINS_LBs + 0.5)
+                
+        MonGroupArray.__getitem__(isub).defineHistogram(varname= "LB,NO;"+ noiseAbbreviations[isub] + "NO_vsLB",
+                                                        type= "TProfile", 
+                                                        title= "NO vs LB for all region (SP noise)" + ";LumiBlock;Hit Occupancy [10^{-5}]",
+                                                        path= path[isub] + "/Noise",
+                                                        xbins=sctMon.NBINS_LBs, xmin = 0.5, xmax = sctMon.NBINS_LBs + 0.5)
+                
+        MonGroupArray.__getitem__(isub).defineHistogram(varname= "LB,NO;"+ noiseAbbreviations[isub] + "NOTrigger_vsLB",
+                                                        type= "TProfile", 
+                                                        title= "NO with Trigger vs LB for all region (SP noise)" + ";LumiBlock;Hit Occupancy [10^{-5}]",
+                                                        cutmask= "IsSelectedTrigger",
+                                                        path= path[isub] + "/Noise",
+                                                        xbins=sctMon.NBINS_LBs, xmin = 0.5, xmax = sctMon.NBINS_LBs + 0.5)
+
+        MonGroupArray.__getitem__(isub).defineHistogram(varname= "LBHits,numberOfHitsFromSPs;" + "h_HSPHitsTrigger"+titleAbbreviations[isub]+"_vsLB",
+                                                        type= "TProfile", 
+                                                        title= "Average num of SP Hits in " + titleAbbreviations[isub] + " with trigger vs LB" + ";LumiBlock;Average number of SP Hits",
+                                                        cutmask= "isSelectedTriggerHits",
+                                                        path= path[isub] + "/Noise",
+                                                        xbins=sctMon.NBINS_LBs, xmin = 0.5, xmax = sctMon.NBINS_LBs + 0.5)
+
+        MonGroupArray.__getitem__(isub).defineHistogram(varname= "LBHits,numberOfHitsFromSPs;" + "h_HSPHits"+titleAbbreviations[isub]+"_vsLB",
+                                                        type= "TProfile", 
+                                                        title= "Average num of SP Hits in " + titleAbbreviations[isub] + " vs LB" + ";LumiBlock;Average number of SP Hits",
+                                                        path= path[isub] + "/Noise",
+                                                        xbins=sctMon.NBINS_LBs, xmin = 0.5, xmax = sctMon.NBINS_LBs + 0.5)
+
+        MonGroupArray.__getitem__(isub).defineHistogram(varname= "LBHits,numberOfHitsFromAllRDOs;" + "h_HallHitsTrigger"+titleAbbreviations[isub]+"_vsLB",
+                                                        type= "TProfile", 
+                                                        title= "Average num of all Hits in " + titleAbbreviations[isub] + " with trigger vs LB" + ";LumiBlock;Average number of SP Hits",
+                                                        cutmask= "isSelectedTriggerHits",
+                                                        path= path[isub] + "/Noise",
+                                                        xbins=sctMon.NBINS_LBs, xmin = 0.5, xmax = sctMon.NBINS_LBs + 0.5)
+
+        MonGroupArray.__getitem__(isub).defineHistogram(varname= "LBHits,numberOfHitsFromAllRDOs;" + "h_HallHits"+titleAbbreviations[isub]+"_vsLB",
+                                                        type= "TProfile", 
+                                                        title= "Average num of all Hits in " + titleAbbreviations[isub] + " vs LB" + ";LumiBlock;Average number of SP Hits",
+                                                        path= path[isub] + "/Noise",
+                                                        xbins=sctMon.NBINS_LBs, xmin = 0.5, xmax = sctMon.NBINS_LBs + 0.5)
+
+    #GENERAL
+    myMonGroupGeneral.defineHistogram(varname= "clu_size",
+                                      type= "TH1F", 
+                                      title= "SCT Cluster Size" + ";Cluster Size;Num of Events",
+                                      path=  "/hits",
+                                      xbins=200, xmin = 0, xmax = 200)
+    
+    myMonGroupGeneral.defineHistogram(varname= "LB,HO;"+ "HO_vsLB",
+                                      type= "TProfile", 
+                                      title= "HO vs LB for all region (SP noise)" + ";LumiBlock;Hit Occupancy [10^{-5}]",
+                                      path= "/noise",
+                                      xbins=sctMon.NBINS_LBs, xmin = 0.5, xmax = sctMon.NBINS_LBs + 0.5)
+
+    myMonGroupGeneral.defineHistogram(varname= "LB,HO;"+  "HOTrigger_vsLB",
+                                      type= "TProfile", 
+                                      title= "HO with trigger vs LB for all region (SP noise)" + ";LumiBlock;Hit Occupancy [10^{-5}]",
+                                      cutmask= "IsSelectedTrigger",
+                                      path=  "/noise",
+                                      xbins=sctMon.NBINS_LBs, xmin = 0.5, xmax = sctMon.NBINS_LBs + 0.5)
+                
+    myMonGroupGeneral.defineHistogram(varname= "LB,NO;"+ "NO_vsLB",
+                                      type= "TProfile", 
+                                      title= "NO vs LB for all region (SP noise)" + ";LumiBlock;Hit Occupancy [10^{-5}]",
+                                      path= "/noise",
+                                      xbins=sctMon.NBINS_LBs, xmin = 0.5, xmax = sctMon.NBINS_LBs + 0.5)
+                
+    myMonGroupGeneral.defineHistogram(varname= "LB,NO;"+ "NOTrigger_vsLB",
+                                      type= "TProfile", 
+                                      title= "NO with Trigger vs LB for all region (SP noise)" + ";LumiBlock;Hit Occupancy [10^{-5}]",
+                                      cutmask= "IsSelectedTrigger",
+                                      path= "/noise",
+                                      xbins=sctMon.NBINS_LBs, xmin = 0.5, xmax = sctMon.NBINS_LBs + 0.5)
+
+    myMonGroupGeneral.defineHistogram(varname= "Bec_TBinFracAll,TBin_TBinFracAll;" + "TBinFracAll",
+                                      type= "TProfile", 
+                                      title= "fraction of 01X for each region" + "; ;Fraction of 01X",
+                                      path= "/tbin",
+                                      xbins= sctMon.N_REGIONS, xmin = 0., xmax = sctMon.N_REGIONS,
+                                      xlabels= names)
+   
+    myMonGroupGeneral.defineHistogram(varname= "sct_hits",
+                                      type= "TH1F",
+                                      title= "Total SCT Hits;Total SCT Hits;Entries",
+                                      path= "/hits/summary",
+                                      xbins= sctMon.N_NOISE_HIT_BINS, xmin = sctMon.FIRST_NOISE_HIT_BIN, xmax = sctMon.LAST_NOISE_HIT_BIN)
+
+    result.merge(helper.result())
+    return result
+
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTMonitoringConfig.py b/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTMonitoringConfig.py
index e810beac3f93..a9f821c5f861 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTMonitoringConfig.py
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTMonitoringConfig.py
@@ -1,11 +1,17 @@
 #
-#  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+#  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #
 
 def SCTMonitoringConfig(flags):
     from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
     acc = ComponentAccumulator()
     if flags.DQ.Environment in ('online', 'tier0', 'tier0Raw'):
+        from .SCTErrMonAlg import SCTErrMonAlgConfig
+        acc.merge(SCTErrMonAlgConfig(flags))
+        from .SCTHitEffMonAlg import SCTHitEffMonAlgConfig
+        acc.merge(SCTHitEffMonAlgConfig(flags))
+        from .SCTHitsNoiseMonAlg import SCTHitsNoiseMonAlgConfig
+        acc.merge(SCTHitsNoiseMonAlgConfig(flags))
         from .SCTLorentzMonAlg import SCTLorentzMonAlgConfig
         acc.merge(SCTLorentzMonAlgConfig(flags))
         from .SCTTracksMonAlg import SCTTracksMonAlgConfig
-- 
GitLab


From 3deae17fba314c614d67a8f91a0b786a32fe89b9 Mon Sep 17 00:00:00 2001
From: Pavol Strizenec <pavol.strizenec@cern.ch>
Date: Fri, 9 Oct 2020 20:53:04 +0000
Subject: [PATCH 396/403] LAr SuperCells processing in LArCalibUtils

---
 .../LArCalibUtils/LArCalibDigitMaker.h        |   3 +
 .../LArCalibUtils/LArRampBuilder.h            |  16 ++-
 .../LArCalibUtils/src/LArAutoCorrMaker.cxx    |   6 +-
 .../LArCalibUtils/src/LArCalibDigitMaker.cxx  |  31 ++++-
 .../LArCalibUtils/src/LArRampBuilder.cxx      | 131 ++++++++++++++++--
 5 files changed, 168 insertions(+), 19 deletions(-)

diff --git a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArCalibDigitMaker.h b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArCalibDigitMaker.h
index 1e110eeb8060..29bd7d575e7c 100644
--- a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArCalibDigitMaker.h
+++ b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArCalibDigitMaker.h
@@ -23,6 +23,7 @@ class LArCalibDigitMaker : public AthAlgorithm
   StatusCode finalize(){return StatusCode::SUCCESS;}
  private:
   SG::ReadCondHandleKey<LArCalibLineMapping> m_calibMapKey{this,"CalibMapKey","LArCalibLineMap","SG Key of calib line mapping object"};
+  SG::ReadCondHandleKey<LArCalibLineMapping> m_calibMapSCKey{this,"CalibMapSCKey","LArCalibIdMapSC","SG Key of calib line mapping object"};
   std::vector<std::string> m_keylist;
   std::vector<unsigned> m_vPattern;
   std::vector<unsigned> m_vDAC;
@@ -31,6 +32,8 @@ class LArCalibDigitMaker : public AthAlgorithm
   unsigned m_nTrigger;
   double m_delayScale;
   bool m_dontRun;
+  bool m_isSC;
+  
 };
 
 #endif
diff --git a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArRampBuilder.h b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArRampBuilder.h
index ad0221e3578d..673d7a0a763b 100644
--- a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArRampBuilder.h
+++ b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArRampBuilder.h
@@ -47,8 +47,9 @@
 #include "LArCabling/LArOnOffIdMapping.h"
 #include "StoreGate/ReadCondHandleKey.h"
 
+#include "LArRecConditions/LArCalibLineMapping.h"
 //#include "LArCalibTriggerAccumulator.h"
-
+#include "CaloDetDescr/ICaloSuperCellIDTool.h"
 #include <vector>
 #include <string>
 #include <map>
@@ -76,6 +77,8 @@ public:
 
 private:
   SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this, "OnOffMap", "LArOnOffIdMap", "SG key for mapping object"};
+  SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKeySC{this,"ScCablingKey","LArOnOffIdMapSC","SG Key of SC LArOnOffIdMapping object"};
+
   //Private member functions
   // choose reconstruction mode (i.e. OF or Parabola)
   void chooseRecoMode() ;
@@ -100,7 +103,8 @@ private:
   ToolHandle<LArParabolaPeakRecoTool> m_peakParabolaTool;
   ToolHandle<LArShapePeakRecoTool>    m_peakShapeTool;
   ToolHandle<LArOFPeakRecoTool>       m_peakOFTool;
- 
+  ToolHandle<ICaloSuperCellIDTool> m_sc2ccMappingTool;
+
   unsigned m_event_counter; 
   int m_delay;
   int m_ipassShape; 
@@ -162,6 +166,14 @@ private:
 
   uint16_t m_fatalFebErrorPattern;
 
+  // For calib line mapping, only used for SC for now 
+  IntegerProperty m_nPulsedCalibLines;
+  std::vector<int> m_pulsedCalibLines;    
+  SG::ReadCondHandleKey<LArCalibLineMapping> m_calibMapKey{this,"CalibMapKey","LArCalibLineMap","SG Key of calib line mapping object"};
+  SG::ReadCondHandleKey<LArCalibLineMapping> m_calibMapSCKey{this,"CalibMapSCKey","LArCalibIdMapSC","SG Key of calib line mapping object"};
+  
+
+
 };
 
 #endif
diff --git a/LArCalorimeter/LArCalibUtils/src/LArAutoCorrMaker.cxx b/LArCalorimeter/LArCalibUtils/src/LArAutoCorrMaker.cxx
index b56db1c4e0e8..ebe0864264a3 100755
--- a/LArCalorimeter/LArCalibUtils/src/LArAutoCorrMaker.cxx
+++ b/LArCalorimeter/LArCalibUtils/src/LArAutoCorrMaker.cxx
@@ -49,7 +49,6 @@ LArAutoCorrMaker::LArAutoCorrMaker(const std::string& name, ISvcLocator* pSvcLoc
   declareProperty("KeyOutput",    m_keyoutput="LArAutoCorr");
   declareProperty("events_ref",   m_nref=50);
   declareProperty("nsigma",       m_rms_cut=5);
-  declareProperty("Nsamples",     m_nsamples=32);
   declareProperty("normalize",    m_normalize=1); 
   declareProperty("physics",      m_physics=0); 
   declareProperty("GroupingType", m_groupingType); 
@@ -139,7 +138,10 @@ StatusCode LArAutoCorrMaker::execute()
     ATH_MSG_DEBUG("Got LArDigitContainer with key " << *key_it <<", size="  << larDigitContainer->size());
     ++m_nEvents;
     LArDigitContainer::const_iterator it=larDigitContainer->begin();
-    LArDigitContainer::const_iterator it_end=larDigitContainer->end();    
+    LArDigitContainer::const_iterator it_end=larDigitContainer->end();  
+    m_nsamples = (*larDigitContainer->begin())->nsamples();
+    ATH_MSG_DEBUG("NSAMPLES (from digit container) = " << m_nsamples );
+
     for(;it!=it_end;it++){
       const HWIdentifier chid=(*it)->hardwareID();
       const CaloGain::CaloGain gain=(*it)->gain();
diff --git a/LArCalorimeter/LArCalibUtils/src/LArCalibDigitMaker.cxx b/LArCalorimeter/LArCalibUtils/src/LArCalibDigitMaker.cxx
index 7a4a666a50e1..c52a8c8f3863 100644
--- a/LArCalorimeter/LArCalibUtils/src/LArCalibDigitMaker.cxx
+++ b/LArCalorimeter/LArCalibUtils/src/LArCalibDigitMaker.cxx
@@ -33,6 +33,7 @@ LArCalibDigitMaker::LArCalibDigitMaker(const std::string& name, ISvcLocator* pSv
  declareProperty("BoardIDs",m_vBoardIDs);
  declareProperty("DelayScale",m_delayScale=(25./240.)*ns);
  declareProperty("DontRun",m_dontRun=false); //Put only Board configuration in DetectorStore
+ declareProperty("isSC",m_isSC=false);
 }
 
 LArCalibDigitMaker::~LArCalibDigitMaker() 
@@ -42,7 +43,18 @@ LArCalibDigitMaker::~LArCalibDigitMaker()
 StatusCode LArCalibDigitMaker::initialize()
 {
   ATH_MSG_DEBUG ( "======== LArCalibDigitMaker Initialize ========" );
-  ATH_CHECK( m_calibMapKey.initialize() );
+  // bool containsKeySC = false;
+  for (unsigned int i = 0; i < m_keylist.size(); ++i) {
+    if (m_keylist.at(i).compare("SC") == 0) {
+       m_isSC = true;
+       ATH_MSG_DEBUG ( "======== LArCalibDigitMaker isSC is True  ========" );
+    }
+  }
+  if(m_isSC){
+    ATH_CHECK( m_calibMapSCKey.initialize() );
+  }else{
+    ATH_CHECK( m_calibMapKey.initialize() );
+  }
     
 //  std::cout << "Pattern.size()=" << m_vPattern.size() << std::endl;
 //   std::cout << "DAC.size()=" << m_vDAC.size() << std::endl;
@@ -51,6 +63,9 @@ StatusCode LArCalibDigitMaker::initialize()
 //   std::cout << "BoardIDs.size()=" << m_vBoardIDs.size() << std::endl;
 
   //Check if calibParams are given consistently: Either all or non
+
+
+
   if (!((m_vBoardIDs.size()==0 && m_vDAC.size()==0 && m_vDelay.size()==0 && m_vPattern.size()==0 && m_nTrigger==0) ||
       (m_vBoardIDs.size() && m_vDAC.size() && m_vDelay.size() && m_vPattern.size() && m_nTrigger))) {
     ATH_MSG_ERROR ( "Problem with jobOptions! Please set either ALL calibration parameters" << std:: endl 
@@ -92,8 +107,18 @@ StatusCode LArCalibDigitMaker::execute() {
 
  const EventContext& ctx = Gaudi::Hive::currentContext();
 
- SG::ReadCondHandle<LArCalibLineMapping> clHdl{m_calibMapKey};
- const LArCalibLineMapping* clcabling{*clHdl};
+
+ const LArCalibLineMapping *clcabling=0;
+ if(m_isSC) {
+   ATH_MSG_DEBUG ( "======== LArCalibDigitMaker: using SC calib line map" );
+   SG::ReadCondHandle<LArCalibLineMapping> clHdl{m_calibMapSCKey};
+   clcabling=*clHdl;
+ } else {
+   SG::ReadCondHandle<LArCalibLineMapping> clHdl{m_calibMapKey};
+   clcabling=*clHdl;
+ }
+ 
+
  if(!clcabling) {
     ATH_MSG_ERROR( "Do not have cabling mapping from key " << m_calibMapKey.key() );
     return StatusCode::FAILURE;
diff --git a/LArCalorimeter/LArCalibUtils/src/LArRampBuilder.cxx b/LArCalorimeter/LArCalibUtils/src/LArRampBuilder.cxx
index c28511fdd1b7..40177ba1d2ac 100644
--- a/LArCalorimeter/LArCalibUtils/src/LArRampBuilder.cxx
+++ b/LArCalorimeter/LArCalibUtils/src/LArRampBuilder.cxx
@@ -26,6 +26,7 @@ LArRampBuilder::LArRampBuilder(const std::string& name, ISvcLocator* pSvcLocator
     m_peakParabolaTool("LArParabolaPeakRecoTool"),
     m_peakShapeTool("LArShapePeakRecoTool"),
     m_peakOFTool("LArOFPeakRecoTool"),
+    m_sc2ccMappingTool("CaloSuperCellIDTool"),
     m_event_counter(0),
     m_recoType(OF),
     m_onlineHelper(),
@@ -87,6 +88,7 @@ StatusCode LArRampBuilder::initialize()
   
   StatusCode sc;
   if ( m_isSC ) {
+    ATH_MSG_DEBUG("==== LArRampBuilder - looking at SuperCells ====");
     const LArOnline_SuperCellID* ll;
     sc = detStore()->retrieve(ll, "LArOnline_SuperCellID");
     if (sc.isFailure()) {
@@ -111,8 +113,19 @@ StatusCode LArRampBuilder::initialize()
     }
     
   }
-  
+  if ( m_isSC ) ATH_CHECK( m_sc2ccMappingTool.retrieve() );
+
   ATH_CHECK( m_cablingKey.initialize() );
+  if ( m_isSC ) ATH_CHECK( m_cablingKeySC.initialize() );
+
+  // Initialise keys for calib line mapping
+  if (m_isSC){   
+    ATH_CHECK( m_calibMapSCKey.initialize() );
+    ATH_CHECK( m_calibMapKey.initialize() );
+  }else{
+    ATH_CHECK( m_calibMapKey.initialize() );
+  }
+    
 
   if(m_doBadChannelMask) { 
     sc=m_badChannelMask.retrieve(); 
@@ -151,6 +164,9 @@ StatusCode LArRampBuilder::initialize()
        ATH_MSG_INFO( " register callback for HEC map " );
      }
   }
+ 
+  
+
 
   return StatusCode::SUCCESS;
 }
@@ -229,6 +245,55 @@ StatusCode LArRampBuilder::execute()
     if (m_event_counter==1)
       ATH_MSG_WARNING("No FebErrorSummaryObject found! Feb errors not checked!");
  
+  
+
+  ///*
+  // calib line mapping for SC
+  const LArCalibLineMapping *clCont=0;
+  const LArCalibLineMapping *clContSC=0;
+  if(m_isSC) {
+    ATH_MSG_DEBUG( "LArRampBuilder: using SC calib map" );
+    SG::ReadCondHandle<LArCalibLineMapping> clHdlSC{m_calibMapSCKey};
+    clContSC=*clHdlSC;
+
+    if(!clContSC) {
+      ATH_MSG_WARNING( "Do not have SC calib line mapping !!!" );
+      return StatusCode::FAILURE;
+    } else {
+      ATH_MSG_DEBUG( "DONE THE SETUP SC calib line" );
+    }
+  }//} else {
+  // calib line mapping for main readout
+  SG::ReadCondHandle<LArCalibLineMapping> clHdl{m_calibMapKey};
+  clCont=*clHdl;
+  //}
+  if(!clCont) {
+    ATH_MSG_WARNING( "Do not have calib line mapping !!!" );
+    return StatusCode::FAILURE;
+  } else {
+    ATH_MSG_DEBUG( "DONE THE SETUP calib line" );
+  }
+  // end of calib line mapping
+  // */
+  
+  const LArOnOffIdMapping* cabling(0);
+  if( m_isSC ){
+    SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKeySC};
+    cabling = {*cablingHdl};
+    if(!cabling) {
+	ATH_MSG_ERROR("Do not have mapping object " << m_cablingKeySC.key());
+        return StatusCode::FAILURE;
+    }
+  }else{
+    SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey};
+    cabling = {*cablingHdl};
+    if(!cabling) {
+       ATH_MSG_ERROR("Do not have mapping object " << m_cablingKey.key());
+       return StatusCode::FAILURE;
+    }
+  }
+  
+  
 
   std::vector<std::string>::const_iterator key_it=m_keylist.begin();
   std::vector<std::string>::const_iterator key_it_e=m_keylist.end();
@@ -301,6 +366,8 @@ StatusCode LArRampBuilder::execute()
 	  int DAC = larCaliWave.getDAC();
 	  IdentifierHash chidwave_hash = m_onlineHelper->channel_Hash(itVec.channelId());
 	  
+
+
 	  bool IsBad = false;
 	  for(int i=0;i<24*NSamplesKeep;i++){
 	    tempWave[i] = larCaliWave.getSample(i);
@@ -371,6 +438,27 @@ StatusCode LArRampBuilder::execute()
 	}
       }
 
+      // HEC Calibration lines
+      const std::vector<HWIdentifier>& calibLineV = clCont->calibSlotLine(chid);
+      ATH_MSG_DEBUG( "pulsed lines: "<< calibLineV.size() );
+      if(m_isSC){
+	const std::vector<HWIdentifier>& calibLineVSC = clContSC->calibSlotLine(chid);
+	ATH_MSG_DEBUG( "pulsed SC lines: "<< calibLineVSC.size() );
+      }
+      // std::vector<HWIdentifier>::const_iterator calibLineIt = calibLineV.begin();
+      // for(calibLineIt = calibLineV.begin(); calibLineIt != calibLineV.end();++calibLineIt) {
+      // ATH_MSG_DEBUG( "CALIB LINE "<< m_onlineHelper->channel(*calibLineIt) );
+      // }
+      
+      std::vector<Identifier> ccellIds(0);
+      if( m_isSC ){
+	Identifier myofflineID = cabling->cnvToIdentifier((*it)->hardwareID()) ;
+
+	ccellIds = m_sc2ccMappingTool->superCellToOfflineID( myofflineID );
+	ATH_MSG_DEBUG( "Cell: " << myofflineID << " " << (*it)->channelID() << " " << chid << " " << ccellIds.size() << " : " << ccellIds );
+      }
+
+
       if (m_delay==-1) { //First (pulsed) cell to be processed:
 	m_delay=(*it)->delay();
       }
@@ -440,16 +528,28 @@ StatusCode LArRampBuilder::execute()
       //            << " mean " << (*it)->mean()[0] << " " << (*it)->mean()[1] << " " << (*it)->mean()[2] << " " << (*it)->mean()[3]
       //            << " " << (*it)->mean()[4] << " " << (*it)->mean()[5] << " " << (*it)->mean()[6] << std::endl;
       //     }
-      //  }
+      //  }      
+
       
-      LArCalibTriggerAccumulator& accpoints=(m_ramps->get(chid,gain))[(*it)->DAC()];
-      //rawramp.addAccumulatedEvent( (*it)->mean(),(*it)->RMS(), (*it)->nTriggers() );
-      LArCalibTriggerAccumulator::ERRTYPE ec=accpoints.add((*it)->sampleSum(),(*it)->sample2Sum(),(*it)->nTriggers());
-      if (ec==LArCalibTriggerAccumulator::WrongNSamples) {
-	ATH_MSG_ERROR( "Failed to accumulate sub-steps: Inconsistent number of ADC samples");
-      }
-      if (ec==LArCalibTriggerAccumulator::NumericOverflow) {
-	ATH_MSG_ERROR( "Failed to accumulate sub-steps: Numeric Overflow");
+      if (m_isSC){  // Changed here to give DAC value for supercell, rather than DAC for a constituent cell
+	LArCalibTriggerAccumulator& accpoints=(m_ramps->get(chid,gain))[(*it)->DAC()*ccellIds.size()];
+	LArCalibTriggerAccumulator::ERRTYPE ec=accpoints.add((*it)->sampleSum(),(*it)->sample2Sum(),(*it)->nTriggers());
+	if (ec==LArCalibTriggerAccumulator::WrongNSamples) {
+	  ATH_MSG_ERROR( "Failed to accumulate sub-steps: Inconsistent number of ADC samples");
+	}
+	if (ec==LArCalibTriggerAccumulator::NumericOverflow) {
+	  ATH_MSG_ERROR( "Failed to accumulate sub-steps: Numeric Overflow");
+	}
+      }else{
+	LArCalibTriggerAccumulator& accpoints=(m_ramps->get(chid,gain))[(*it)->DAC()];
+	//rawramp.addAccumulatedEvent( (*it)->mean(),(*it)->RMS(), (*it)->nTriggers() );
+	LArCalibTriggerAccumulator::ERRTYPE ec=accpoints.add((*it)->sampleSum(),(*it)->sample2Sum(),(*it)->nTriggers());
+	if (ec==LArCalibTriggerAccumulator::WrongNSamples) {
+	  ATH_MSG_ERROR( "Failed to accumulate sub-steps: Inconsistent number of ADC samples");
+	}
+	if (ec==LArCalibTriggerAccumulator::NumericOverflow) {
+	  ATH_MSG_ERROR( "Failed to accumulate sub-steps: Numeric Overflow");
+	}
       }
     }//End loop over all cells
   } //End loop over all containers
@@ -483,13 +583,17 @@ StatusCode LArRampBuilder::stop()
   else
     larRampComplete=NULL;
   
+  
   SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey};
   const LArOnOffIdMapping* cabling{*cablingHdl};
   if(!cabling) {
-     ATH_MSG_ERROR("Do not have mapping object " << m_cablingKey.key());
-     return StatusCode::FAILURE;
+    ATH_MSG_ERROR("Do not have mapping object " << m_cablingKey.key());
+    return StatusCode::FAILURE;
   }
 
+
+
+
   int containerCounter=0;
   //Outermost loop goes over all gains (different containers).
   //for (CaloGain::CaloGain gain=CaloGain::LARHIGHGAIN;gain<CaloGain::LARNGAIN;gain++) {
@@ -525,6 +629,9 @@ StatusCode LArRampBuilder::stop()
       std::vector<float> adc0v;
       bool isADCsat = false;
 
+
+
+
       for (;dac_it!=dac_it_e;dac_it++) {
 
         LArRawRamp::RAMPPOINT_t ramppoint;
-- 
GitLab


From c60cabfd5802c39bf2ded8d4cf48c90c2bdbe336 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Wed, 7 Oct 2020 18:01:20 -0400
Subject: [PATCH 397/403] AthenaCommon: Remove athena3.py.

Remove athena3.py script.
This was used during the py3 migration, but is no longer useful.
---
 Control/AthenaCommon/share/athena3.py | 214 --------------------------
 1 file changed, 214 deletions(-)
 delete mode 100755 Control/AthenaCommon/share/athena3.py

diff --git a/Control/AthenaCommon/share/athena3.py b/Control/AthenaCommon/share/athena3.py
deleted file mode 100755
index c563db0e1ce4..000000000000
--- a/Control/AthenaCommon/share/athena3.py
+++ /dev/null
@@ -1,214 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-#
-# athena.py is born as shell script to preload some optional libraries
-#
-"""date"
-
-# defaults
-export USETCMALLOC=0
-export USEIMF=0
-
-# but use tcmalloc by default if TCMALLOCDIR is defined
-if [ -n "$TCMALLOCDIR" ]; then
-    export USETCMALLOC=1
-fi
-
-# parse command line arguments
-for a in ${@}
-do
-    case "$a" in
-	--leak-check*)   USETCMALLOC=0;;
-	--delete-check*) USETCMALLOC=0;;
-	--stdcmalloc)    USETCMALLOC=0;;
-	--tcmalloc)      USETCMALLOC=1;;
-	--stdcmath)      USEIMF=0;;
-	--imf)           USEIMF=1;;
-	--preloadlib*)     export ATHENA_ADD_PRELOAD=${a#*=};;
-	--drop-and-reload) export ATHENA_DROP_RELOAD=1;;
-    esac
-done
-
-# Do the actual preloading via LD_PRELOAD
-source `which athena_preload.sh `
-
-# Now resurrect ourselves as python script
-python_path=`which python3`
-"exec" "$python_path" "-tt" "$0" "$@";
-
-"""
-
-
-# File: athena.py
-# Author: Wim Lavrijsen (WLavrijsen@lbl.gov)
-# "
-# This script allows you to run Athena from python. It is developed against
-# the cppyy based GaudiPython and python 2.6/7.x.
-#
-# Debugging is supported with the '-d' option (hook debugger after running
-# all user scripts, and just before calling initialize) and the --debug
-# option (requires "conf", "init", or "exec" and will hook just before that
-# stage). The hook will give you the gdb prompt, from where you can set
-# break points, load additional shared libraries, or drop into interactive
-# athena mode (if -i specified on the cli). Alternatively, you can start
-# with gdb, like so:
-#
-#  $ gdb python
-#  (gdb) run `which athena.py` [options] [<file1>.py [<file2>.py ...
-#
-# Usage of valgrind is supported, but it requires full paths and explicit
-# arguments in its run, like so:
-#
-#  $ valgrind `which python` `which athena.py` [options] [<file1>.py ...
-#
-# or, alternatively (valgrind 3.2.0 and up):
-#
-#  $ valgrind --trace-children=yes `which athena.py` [options] [<file1>.py ...
-#
-# Note that any error messages/leaks that valgrind reports on python can be
-# ignored, as valgrind is wrong (see the file Misc/README.valgrind in the
-# python installation).
-#
-# Additional details on debugging are available on the Wiki:
-#
-#   https://uimon.cern.ch/twiki/bin/view/Atlas/StartingDebuggerWithAthenaPy
-#
-
-__version__ = '3.3.0'
-__author__  = 'Wim Lavrijsen (WLavrijsen@lbl.gov)'
-__doc__     = 'For details about athena.py, run "less `which athena.py`"'
-
-import sys, os
-import getopt
-
-ldpreload = os.getenv( 'LD_PRELOAD' ) or ''
-
-### parse the command line arguments -----------------------------------------
-import AthenaCommon.AthOptionsParser as aop
-opts = aop.parse()
-_help_and_exit = aop._help_and_exit
-
-### remove preload hack for proper execution of child-processes --------------
-if ldpreload:
-   if 'TCMALLOCDIR' in os.environ:
-       tcmlib = os.getenv( 'TCMALLOCDIR' ) +  "/libtcmalloc.so"
-       ldpreload = ldpreload.replace(tcmlib, '' )
-       tcmlib = os.getenv( 'TCMALLOCDIR' ) +  "/libtcmalloc_minimal.so"
-       ldpreload = ldpreload.replace(tcmlib, '' )
-       del tcmlib
-   if os.getenv( 'ATHENA_ADD_PRELOAD' ):
-      ldpreload = ldpreload.replace(os.getenv( 'ATHENA_ADD_PRELOAD' ), '' )
-      os.unsetenv( 'ATHENA_ADD_PRELOAD' )
-   ldpreload = ldpreload.replace( '::', ':')
-   ldpreload = ldpreload.strip(':')
-
-   if not ldpreload:
-      del os.environ[ 'LD_PRELOAD' ]
-   else:
-      os.environ[ 'LD_PRELOAD' ] = ldpreload
-del ldpreload
-
-### start profiler, if requested
-if opts.profile_python:
-   import cProfile
- # profiler is created and controlled programmatically b/c a CLI profiling of
- # athena.py doesn't work (globals are lost from include() execfile() calls),
- # and because this allows easy excluding of the (all C++) Gaudi run
-   cProfile._athena_python_profiler = cProfile.Profile()
-   cProfile._athena_python_profiler.enable()
-
-### debugging setup
-from AthenaCommon.Debugging import DbgStage
-DbgStage.value = opts.dbg_stage
-
-### python interpreter configuration -----------------------------------------
-if not os.getcwd() in sys.path:
-   sys.path = [ os.getcwd() ] + sys.path
-
-if not '' in sys.path:
-   sys.path = [ '' ] + sys.path
-
-
-## rename ourselfs to athena, both the prompt and the process (for top & ps)
-sys.ps1 = 'athena> '
-sys.ps2 = '.   ... '
-
-try:
-   import ctypes
-   from ctypes.util import find_library as ctypes_find_library
-   libc = ctypes.cdll.LoadLibrary( ctypes_find_library('c') )
-   libc.prctl( 15, 'athena.py', 0, 0, 0 )
-except Exception:
-   pass            # don't worry about it failing ...
-
-## user session history (deleted in Preparation.py)
-fhistory = os.path.expanduser( '~/.athena.history' )
-
-
-## interface setup as appropriate
-if opts.run_batch and not opts.dbg_stage:
- # in batch there is no need for stdin
-   if sys.stdin and os.isatty( sys.stdin.fileno() ):
-      os.close( sys.stdin.fileno() )
-else:
-   # Make sure ROOT gets initialized early, so that it shuts down last.
-   # Otherwise, ROOT can get shut down before Gaudi, leading to crashes
-   # when Athena components dereference ROOT objects that have been deleted.
-   import ROOT
-
- # readline support
-   import rlcompleter, readline
-
-   readline.parse_and_bind( 'tab: complete' )
-   readline.parse_and_bind( 'set show-all-if-ambiguous On' )
-
- # history support
-   if os.path.exists( fhistory ):
-      readline.read_history_file( fhistory )
-   readline.set_history_length( 1024 )
-
-   del readline, rlcompleter
-
-## use of shell escapes in interactive mode
-if not opts.run_batch:
-   import AthenaCommon.ShellEscapes as ShellEscapes
-   sys.excepthook = ShellEscapes.ShellEscapes()
-   del ShellEscapes
-
-
-### logging and messages -----------------------------------------------------
-from AthenaCommon.Logging import *
-_msg = log # from above import...
-
-## test and set log level
-try:
-   _msg.setLevel (getattr(logging, opts.msg_lvl))
-except:
-   _help_and_exit()
-
-
-### default file name for ease of use ----------------------------------------
-if not opts.scripts and os.path.exists(opts.default_jobopt):
-   _msg.info("using default file %s", opts.default_jobopt)
-   opts.scripts.append(opts.default_jobopt)
-
-if not (opts.scripts or opts.fromdb) and opts.run_batch:
-   _msg.error( "batch mode requires at least one script" )
-   from AthenaCommon.ExitCodes import INCLUDE_ERROR
-   _help_and_exit( INCLUDE_ERROR )
-del _help_and_exit
-
-
-### file inclusion and tracing -----------------------------------------------
-from AthenaCommon.Include import IncludeError, include
-include.setShowIncludes(opts.showincludes)
-include.setClean(opts.drop_cfg)
-
-
-### pre-execution step -------------------------------------------------------
-include( "AthenaCommon/Preparation.py" )
-
-
-### execution of user script and drop into batch or interactive mode ---------
-include( "AthenaCommon/Execution.py" )
-- 
GitLab


From 4fd3ccc27247547e98c5b84cae0267f1c6191e39 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Fri, 9 Oct 2020 15:39:42 +0200
Subject: [PATCH 398/403] CaloUtilsc: Remove reference to StoreGate.h.

Remove reference to obsolete header StoreGate.h.
---
 Calorimeter/CaloUtils/CaloUtils/CaloTopoTowerBuilderToolBase.h | 3 +--
 Calorimeter/CaloUtils/test/CaloLayerCalculator_test.cxx        | 1 -
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloTopoTowerBuilderToolBase.h b/Calorimeter/CaloUtils/CaloUtils/CaloTopoTowerBuilderToolBase.h
index 6bf04b0609a8..82b8f718e4bc 100644
--- a/Calorimeter/CaloUtils/CaloUtils/CaloTopoTowerBuilderToolBase.h
+++ b/Calorimeter/CaloUtils/CaloUtils/CaloTopoTowerBuilderToolBase.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 CALOREC_CALOTOPOTOWERBUILDERTOOLBASE_H
@@ -20,7 +20,6 @@
 #include "GaudiKernel/ToolHandle.h"
 #include "CaloInterface/ICaloTopoTowerBuilderToolBase.h"
 #include "CaloEvent/CaloTowerSeg.h"
-#include "StoreGate/StoreGate.h"
 #include <string>
 
 class CaloTowerContainer;
diff --git a/Calorimeter/CaloUtils/test/CaloLayerCalculator_test.cxx b/Calorimeter/CaloUtils/test/CaloLayerCalculator_test.cxx
index c5f9809daaef..7b0e31f4cb7c 100644
--- a/Calorimeter/CaloUtils/test/CaloLayerCalculator_test.cxx
+++ b/Calorimeter/CaloUtils/test/CaloLayerCalculator_test.cxx
@@ -37,7 +37,6 @@ ATLAS_NO_CHECK_FILE_THREAD_SAFETY;
 #include "CaloIdentifier/TileID.h"
 #include "StoreGate/StoreGateSvc.h"
 #include "IdDictParser/IdDictParser.h"
-#include "StoreGate/StoreGate.h"
 #include "TestTools/initGaudi.h"
 #include "GaudiKernel/Bootstrap.h"
 #include "CLHEP/Units/SystemOfUnits.h"
-- 
GitLab


From 019127669029b287f192332cc48d3626d356bccc Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Fri, 9 Oct 2020 15:33:40 +0200
Subject: [PATCH 399/403] ByteStreamCnvSvcc: Remove reference to StoreGate.h.

Remove reference to obsolete header StoreGate.h.
---
 Event/ByteStreamCnvSvc/src/ByteStreamCnvSvc.cxx         | 3 +--
 Event/ByteStreamCnvSvc/src/ByteStreamMergeOutputSvc.cxx | 2 --
 Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx  | 1 -
 3 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamCnvSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamCnvSvc.cxx
index c3182d8eeb70..fc5836a7b390 100644
--- a/Event/ByteStreamCnvSvc/src/ByteStreamCnvSvc.cxx
+++ b/Event/ByteStreamCnvSvc/src/ByteStreamCnvSvc.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 "ByteStreamCnvSvc/ByteStreamCnvSvc.h"
@@ -7,7 +7,6 @@
 #include "ByteStreamCnvSvcBase/FullEventAssembler.h"
 #include "ByteStreamCnvSvcBase/ByteStreamAddress.h"
 
-#include "StoreGate/StoreGate.h"
 #include "xAODEventInfo/EventInfo.h"
 #include "xAODTrigger/TrigDecision.h"
 
diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamMergeOutputSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamMergeOutputSvc.cxx
index 8148846ca32e..506706b4da22 100644
--- a/Event/ByteStreamCnvSvc/src/ByteStreamMergeOutputSvc.cxx
+++ b/Event/ByteStreamCnvSvc/src/ByteStreamMergeOutputSvc.cxx
@@ -5,8 +5,6 @@
 #include "ByteStreamMergeOutputSvc.h"
 #include "ByteStreamData/ByteStream.h"
 
-#include "StoreGate/StoreGate.h"
-
 #include "GaudiKernel/GenericAddress.h"
 #include "GaudiKernel/MsgStream.h"
 #include "GaudiKernel/ISvcLocator.h"
diff --git a/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx b/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx
index 413376e18750..8ecff3c9a53f 100644
--- a/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx
+++ b/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx
@@ -16,7 +16,6 @@
 
 #include "AthenaKernel/IAthenaIPCTool.h"
 #include "EventInfo/EventInfo.h"
-#include "StoreGate/StoreGate.h"
 
 // EventInfoAttributeList includes
 #include "AthenaPoolUtilities/AthenaAttributeList.h"
-- 
GitLab


From 430f45996b593f429a4eae3152a6b650c7f0d1c6 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Fri, 9 Oct 2020 15:35:27 +0200
Subject: [PATCH 400/403] LUCID_RawDataByteStreamCnv: Remove reference to
 StoreGate.h.

Remove reference to obsolete header StoreGate.h.
---
 .../LUCID_RawDataByteStreamCnv/LUCID_DigitByteStreamCnv.h     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_RawDataByteStreamCnv/LUCID_RawDataByteStreamCnv/LUCID_DigitByteStreamCnv.h b/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_RawDataByteStreamCnv/LUCID_RawDataByteStreamCnv/LUCID_DigitByteStreamCnv.h
index a5c0e56a9ec3..dddd20764815 100644
--- a/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_RawDataByteStreamCnv/LUCID_RawDataByteStreamCnv/LUCID_DigitByteStreamCnv.h
+++ b/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_RawDataByteStreamCnv/LUCID_RawDataByteStreamCnv/LUCID_DigitByteStreamCnv.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
 */
 
 // *************************************************************************
@@ -31,7 +31,7 @@
 #include "GaudiKernel/IRegistry.h"
 #include "GaudiKernel/IToolSvc.h"
 
-#include "StoreGate/StoreGate.h"
+#include "StoreGate/StoreGateSvc.h"
 
 #include "AthenaKernel/MsgStreamMember.h"
 
-- 
GitLab


From 326866401a31c54dd64fb126c8827c4168a12748 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Fri, 9 Oct 2020 15:37:17 +0200
Subject: [PATCH 401/403] GeneratorObjects: Remove reference to StoreGate.h.

Remove reference to obsolete header StoreGate.h.
---
 Generators/GeneratorObjects/src/HepMcParticleLink.cxx | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Generators/GeneratorObjects/src/HepMcParticleLink.cxx b/Generators/GeneratorObjects/src/HepMcParticleLink.cxx
index 8a92a7829e84..be4e96ac8016 100644
--- a/Generators/GeneratorObjects/src/HepMcParticleLink.cxx
+++ b/Generators/GeneratorObjects/src/HepMcParticleLink.cxx
@@ -9,7 +9,6 @@
 
 #include "GeneratorObjects/HepMcParticleLink.h"
 #include "GeneratorObjects/McEventCollection.h"
-#include "StoreGate/StoreGate.h"
 #include "AtlasHepMC/GenParticle.h"
 #include "AtlasHepMC/GenEvent.h"
 #include "AthenaKernel/getMessageSvc.h"
-- 
GitLab


From bc548bde6250ae92c783dd7e943bc2fd4e69dd77 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Fri, 9 Oct 2020 15:38:27 +0200
Subject: [PATCH 402/403] InDetBeamSpotService: Remove reference to
 StoreGate.h.

Remove reference to obsolete header StoreGate.h.
---
 .../InDetConditions/InDetBeamSpotService/src/BeamCondSvc.h    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/InnerDetector/InDetConditions/InDetBeamSpotService/src/BeamCondSvc.h b/InnerDetector/InDetConditions/InDetBeamSpotService/src/BeamCondSvc.h
index e0db27dac96b..90f6c162b9ac 100644
--- a/InnerDetector/InDetConditions/InDetBeamSpotService/src/BeamCondSvc.h
+++ b/InnerDetector/InDetConditions/InDetBeamSpotService/src/BeamCondSvc.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 InDetBeamSpotService_BEAMCOND_H
@@ -11,7 +11,7 @@
 #include "GeoPrimitives/GeoPrimitives.h"
 #include "AthenaBaseComps/AthService.h"
 #include "GaudiKernel/ServiceHandle.h"
-#include "StoreGate/StoreGate.h"
+#include "StoreGate/StoreGateSvc.h"
 
 #ifndef SIMULATIONBASE
 namespace Trk {
-- 
GitLab


From fb5d41a92a3976338ce69fb1e37f9d6410a5cc79 Mon Sep 17 00:00:00 2001
From: Attila Krasznahorkay <attila.krasznahorkay@cern.ch>
Date: Sat, 10 Oct 2020 07:33:36 +0000
Subject: [PATCH 403/403] Updated AnalysisBase/version.txt

As the installation of 22.2.0 to CVMFS is already underway in ATLINFR-3765.
---
 Projects/AnalysisBase/version.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Projects/AnalysisBase/version.txt b/Projects/AnalysisBase/version.txt
index 44e031ba9ba4..0398faf11c23 100644
--- a/Projects/AnalysisBase/version.txt
+++ b/Projects/AnalysisBase/version.txt
@@ -1 +1 @@
-22.2.0
+22.2.1
-- 
GitLab