diff --git a/Calorimeter/CaloClusterCorrection/python/CaloSwPhioff_v5data.py b/Calorimeter/CaloClusterCorrection/python/CaloSwPhioff_v5data.py
index 5b7cbaf6c081731a3a9add76d3a1a7ce41604378..6a11bc7ed176f060299ad65120e58fe5e0f78e45 100755
--- a/Calorimeter/CaloClusterCorrection/python/CaloSwPhioff_v5data.py
+++ b/Calorimeter/CaloClusterCorrection/python/CaloSwPhioff_v5data.py
@@ -1,7 +1,5 @@
-# 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: CaloSwPhioff_v5data.py 579457 2014-01-21 21:20:22Z ehill $
 #
 # File: CaloClusterCorrection/python/CaloSwPhioff_v5_data.py
 # Created: Sep 2010, sss
@@ -33,6 +31,7 @@ def _flip_phi (corr):
     
 def _copy_parms (src, dst):
     for (k, v) in src.__dict__.items():
+        if k[0] == '_': continue
         if k == 'correction':
             v = _flip_phi (v)
         setattr (dst, k, v)
diff --git a/Calorimeter/CaloClusterCorrection/python/common.py b/Calorimeter/CaloClusterCorrection/python/common.py
index 814e69783c5b61c70d1f172e5d3a2e387a054ed5..f71b6117e59e99c9fef26ad7c888c1d719576114 100755
--- a/Calorimeter/CaloClusterCorrection/python/common.py
+++ b/Calorimeter/CaloClusterCorrection/python/common.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
 
 #
 # $Id: common.py,v 1.39 2009-05-20 20:48:52 ssnyder Exp $
@@ -1120,7 +1120,7 @@ from AthenaCommon.Configurable import Configurable
 def _calocorr_setup (self):
     save_properties = {}
     try:
-        for (k, v) in self._properties.items():
+        for (k, v) in list(self._properties.items()):
             if self in v.history and len (v.history[self]) >= 1:
                 pass
             else:
diff --git a/Calorimeter/CaloRec/python/CaloRecFlags.py b/Calorimeter/CaloRec/python/CaloRecFlags.py
index bb6f10ecd1022ec247009a4d03861282596929ee..6fa0d33277e133b1ab6e4f14eb93a59fb2276853 100644
--- a/Calorimeter/CaloRec/python/CaloRecFlags.py
+++ b/Calorimeter/CaloRec/python/CaloRecFlags.py
@@ -135,7 +135,7 @@ class doEMDigits(CaloRecFlagsJobProperty):
    """
    statusOn = True
    allowedTypes=['bool']
-   StoredValue=True
+   StoredValue=False
 
 class doFillMBTSBackgroundBit(CaloRecFlagsJobProperty):
     """ swtich to active filling of MBTS bit in the background word of the EventInfo object
diff --git a/Control/AthenaBaseComps/src/AthCnvSvc.cxx b/Control/AthenaBaseComps/src/AthCnvSvc.cxx
index 25720dd7759e58fb95082a136e97972110d5f9ac..180c50d10bd67aac374e0bfed721ac6cd756edd5 100644
--- a/Control/AthenaBaseComps/src/AthCnvSvc.cxx
+++ b/Control/AthenaBaseComps/src/AthCnvSvc.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
 */
 
 // AthCnvSvc.cxx 
@@ -194,7 +194,7 @@ AthCnvSvc::setDataProvider(IDataProviderSvc* pDataSvc)
   m_dataSvc->addRef();
   Workers::iterator stop  = m_workers.end();
   Workers::iterator start = m_workers.begin();
-  for(Workers::iterator i=start; i != stop; i++ )    {
+  for(Workers::iterator i=start; i != stop; ++i )    {
     IConverter* cnv = i->second.converter();
     if ( 0 != cnv )   {
       if (cnv->setDataProvider(m_dataSvc).isFailure()) {
@@ -245,7 +245,7 @@ AthCnvSvc::setAddressCreator(IAddressCreator* creator)
   m_addressCreator = creator;
   Workers::iterator stop  = m_workers.end();
   Workers::iterator start = m_workers.begin();
-  for(Workers::iterator i=start; i != stop; i++ )    {
+  for(Workers::iterator i=start; i != stop; ++i )    {
     IConverter* cnv = i->second.converter();
     if ( 0 != cnv )   {
       if (cnv->setAddressCreator(m_addressCreator).isFailure()) {
diff --git a/Control/AthenaCommon/python/CFElements.py b/Control/AthenaCommon/python/CFElements.py
index df7e9e47a92ce2926fcee1756df14b28a6dfcc72..c7996cbdc326d846ad6266a79d7a955e39b5a306 100755
--- a/Control/AthenaCommon/python/CFElements.py
+++ b/Control/AthenaCommon/python/CFElements.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 AthenaConfiguration.ComponentFactory import CompFactory
 from AthenaCommon.Configurable import Configurable
@@ -313,16 +313,20 @@ class TestLegacyCF( unittest.TestCase, TestCF ):
         from AthenaCommon.Configurable import ConfigurablePyAlgorithm
         Configurable.configurableRun3Behavior=0
         top = parOR("top")
-        top += parOR("nest1")
-        nest2 = seqAND("nest2")
-        top += nest2
-        top += ConfigurablePyAlgorithm("SomeAlg0")
-        nest2 += parOR("deep_nest1")
-        nest2 += parOR("deep_nest2")
-
-        nest2 += ConfigurablePyAlgorithm("SomeAlg1")
-        nest2 += ConfigurablePyAlgorithm("SomeAlg2")
-        nest2 += ConfigurablePyAlgorithm("SomeAlg3")
+
+        # Skip initialization if it's already been done... otherwise, we'll
+        # get errors about duplicates.
+        if not top.getChildren():
+            top += parOR("nest1")
+            nest2 = seqAND("nest2")
+            top += nest2
+            top += ConfigurablePyAlgorithm("SomeAlg0")
+            nest2 += parOR("deep_nest1")
+            nest2 += parOR("deep_nest2")
+
+            nest2 += ConfigurablePyAlgorithm("SomeAlg1")
+            nest2 += ConfigurablePyAlgorithm("SomeAlg2")
+            nest2 += ConfigurablePyAlgorithm("SomeAlg3")
         self.top = top
 
 
diff --git a/Control/AthenaCommon/share/CFElementsTest.ref b/Control/AthenaCommon/share/CFElementsTest.ref
new file mode 100644
index 0000000000000000000000000000000000000000..0f9878b530f3b73cafb86cd4bb665a30e749ef00
--- /dev/null
+++ b/Control/AthenaCommon/share/CFElementsTest.ref
@@ -0,0 +1,17 @@
+test_findAlgorithms (AthenaCommon.CFElements.TestConf2CF) ... ok
+test_findDeep (AthenaCommon.CFElements.TestConf2CF) ... ok
+test_findMissing (AthenaCommon.CFElements.TestConf2CF) ... ok
+test_findRespectingScope (AthenaCommon.CFElements.TestConf2CF) ... ok
+test_findTop (AthenaCommon.CFElements.TestConf2CF) ... ok
+test_flatCollectors (AthenaCommon.CFElements.TestConf2CF) ... ok
+test_findAlgorithms (AthenaCommon.CFElements.TestLegacyCF) ... ok
+test_findDeep (AthenaCommon.CFElements.TestLegacyCF) ... ok
+test_findMissing (AthenaCommon.CFElements.TestLegacyCF) ... ok
+test_findRespectingScope (AthenaCommon.CFElements.TestLegacyCF) ... ok
+test_findTop (AthenaCommon.CFElements.TestLegacyCF) ... ok
+test_flatCollectors (AthenaCommon.CFElements.TestLegacyCF) ... ok
+
+----------------------------------------------------------------------
+Ran 12 tests in 0.002s
+
+OK
diff --git a/Control/AthenaConfiguration/python/ComponentAccumulator.py b/Control/AthenaConfiguration/python/ComponentAccumulator.py
index 25cd773e566f4fdd7e3190f5748b2ba95ff6aeeb..6013dbf569fdf9a9f9cc09999f80620858658553 100644
--- a/Control/AthenaConfiguration/python/ComponentAccumulator.py
+++ b/Control/AthenaConfiguration/python/ComponentAccumulator.py
@@ -819,9 +819,14 @@ def __setProperties( destConfigurableInstance, sourceConf2Instance, indent="" ):
             setattr( destConfigurableInstance, pname, [conf2toConfigurable( tool, __indent( indent ) ) for tool in pvalue] )
             _log.debug( "{}Set the private tools array {} of {}".format( indent, pname,  destConfigurableInstance.name() ) )
         elif "PrivateToolHandle" in propType or "GaudiConfig2.Configurables" in propType or "ServiceHandle" in propType:
-            #_log.info( "{} {}  {}".format( indent, pname, dir(pvalue) ) )
             _log.debug( "{}Set the property {}  that is private tool {} ".format( indent,  pname, destConfigurableInstance.name() ) )
-            setattr( destConfigurableInstance, pname, conf2toConfigurable( pvalue, indent=__indent( indent ) ) )
+            try: #sometimes it is not printable
+                _log.debug("{}Tool: {}".format(indent, pvalue))
+            except Exception:
+                _log.debug("{}Could not print it".format(indent))
+                pass
+            if pvalue is not None:
+                setattr( destConfigurableInstance, pname, conf2toConfigurable( pvalue, indent=__indent( indent ) ) )
         else: # plain data
             if isinstance(pvalue,(GaudiConfig2.semantics._ListHelper,GaudiConfig2.semantics._DictHelper)):
                 pvalue=pvalue.data
@@ -899,7 +904,7 @@ def conf2toConfigurable( comp, indent="" ):
 
 
     def __areSettingsSame( existingConfigurableInstance, newConf2Instance, indent="" ):
-        _log.debug( "{}Checking if setting is the same {}".format( indent, compName(existingConfigurableInstance) ) )
+        _log.debug( "{}Checking if setting is the same {}".format( indent, existingConfigurableInstance.getFullName() ) )
         alreadySetProperties = dict([ (pname, pvalue) for pname,pvalue
                                       in six.iteritems(existingConfigurableInstance.getValuedProperties()) ])
         for pname, pvalue in six.iteritems( newConf2Instance._properties ): # six.iteritems(comp._properties):
@@ -914,15 +919,18 @@ def conf2toConfigurable( comp, indent="" ):
                 for oldC, newC in zip( alreadySetProperties[pname], pvalue):
                     __areSettingsSame( oldC, newC, __indent(indent))
             elif "PrivateToolHandle" in propType or "GaudiConfig2.Configurables" in propType or "ServiceHandle" in propType:
-                #__areSettingsSame( alreadySetProperties[pname], pvalue, __indent(indent))
-                _log.debug( "{} {}".format( indent, dir(pvalue) ) )
-                __areSettingsSame( getattr(existingConfigurableInstance, pname), pvalue, __indent(indent))
+                exisitngVal = getattr(existingConfigurableInstance, pname)
+                if isinstance( pvalue, str ):
+                    _log.warning("{}The handle {} of component {}.{} is just a string {}, skipping deeper checks, configuration may be incorrect".format(indent, propType, newConf2Instance.name, pname, pvalue))
+                else:
+                    _log.debug( "{}Some kind of handle  and, object type {} existing {}".format( indent, type(pvalue), type(exisitngVal) ) )
+                    __areSettingsSame( exisitngVal, pvalue, indent)
             else:
                 if isinstance(pvalue,(GaudiConfig2.semantics._ListHelper,GaudiConfig2.semantics._DictHelper)):
                     pvalue=pvalue.data
 
                 if alreadySetProperties[pname] != pvalue:
-                    _log.info("{}Merging property: {} for {}".format(__indent(indent), pname, newConf2Instance.getName() ))
+                    _log.info("{}Merging property: {} for {}".format(indent, pname, newConf2Instance.getName() ))
                     # create surrogate
                     clone = newConf2Instance.getInstance("Clone")
                     setattr(clone, pname, alreadySetProperties[pname])
@@ -932,15 +940,16 @@ def conf2toConfigurable( comp, indent="" ):
                     setattr(existingConfigurable, pname, updatedPropValue)
                     del clone
                     _log.info("{} invoked GaudiConf2 semantics to merge the {} and the {} to {} for property {} of {}".format(
-                        __indent(indent), alreadySetProperties[pname], pvalue, pname,  updatedPropValue, existingConfigurable.getName()))
+                        indent, alreadySetProperties[pname], pvalue, pname,  updatedPropValue, existingConfigurable.getFullName()))
 
     existingConfigurable = __alreadyConfigured( comp.name )
     if existingConfigurable: # if configurable exists we try to merge with it
+        _log.debug( "{}Pre-existing configurable {} was found, checking if has the same properties".format( indent, comp.getName() ) )
         __areSettingsSame( existingConfigurable, comp )
         _log.debug( "{}Pre-existing configurable was found to have the same properties".format( indent, comp.name ) )
         instance = existingConfigurable
     else: # create new configurable
-        _log.debug( "{}Creating component configurable {}".format( indent, comp.name ) )
+        _log.debug( "{}Creating component configurable {}".format( indent, comp.getFullJobOptName() ) )
         configurableClass = __findConfigurableClass( comp.getFullJobOptName().split( "/" )[0] )
         instance = configurableClass( comp.name )
         __setProperties( instance, comp, __indent( indent ) )
diff --git a/Control/AthenaPython/python/PyAthenaComps.py b/Control/AthenaPython/python/PyAthenaComps.py
index 95e5d4df682a4221f63cc4dae450dd3d2c53744f..60301958e3b0ef1a6175a7235ec0ea569d413cee 100644
--- a/Control/AthenaPython/python/PyAthenaComps.py
+++ b/Control/AthenaPython/python/PyAthenaComps.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: PyAthenaComps.py
 # @purpose: a set of Python classes for PyAthena
@@ -77,6 +77,7 @@ class Alg( CfgPyAlgorithm ):
         super(Alg, self).__init__(name, **kw)
         self._pyath_evtstore = None # handle to the evt store
         self._pyath_detstore = None # handle to the det store
+        self._pyath_condstore = None # handle to the cond store
         self._ctx = None
         self.__component_type__="Algorithm"
         self.__cpp_type__=self.__class__.__name__
@@ -97,6 +98,13 @@ class Alg( CfgPyAlgorithm ):
             self._pyath_detstore = PyAthena.py_svc('StoreGateSvc/DetectorStore')
         return self._pyath_detstore
     
+    @property
+    def condStore(self):
+        if not self._pyath_condstore:
+            import AthenaPython.PyAthena as PyAthena
+            self._pyath_condtstore = PyAthena.py_svc('StoreGateSvc/ConditionStore')
+        return self._pyath_condstore
+    
     def sysInitialize(self):
         self.msg.setLevel(_get_prop_value(self,'OutputLevel'))
         return self.initialize()
@@ -225,6 +233,7 @@ class AlgTool( CfgPyAlgTool ):
         self.__dict__['msg']  = logging.getLogger( self.getJobOptName() )
         self._pyath_evtstore = None # handle to the evt store
         self._pyath_detstore = None # handle to the det store
+        self._pyath_condstore = None # handle to the cond store
         self.__component_type__ = "AlgTool"
         self.__cpp_type__=self.__class__.__name__
         return
@@ -243,6 +252,13 @@ class AlgTool( CfgPyAlgTool ):
             self._pyath_detstore = PyAthena.py_svc('StoreGateSvc/DetectorStore')
         return self._pyath_detstore
     
+    @property
+    def condStore(self):
+        if not self._pyath_condstore:
+            import AthenaPython.PyAthena as PyAthena
+            self._pyath_condstore = PyAthena.py_svc('StoreGateSvc/ConditionStore')
+        return self._pyath_condstore
+    
     def sysInitialize(self):
         self.msg.setLevel(_get_prop_value(self,'OutputLevel'))
         return self.initialize()
diff --git a/Control/AthenaServices/CMakeLists.txt b/Control/AthenaServices/CMakeLists.txt
index 86f3ec34c1496892ed3aa214bfc76bc7f1b462a4..cd9bda4b2242f614a28a37a0274f40e079738da2 100644
--- a/Control/AthenaServices/CMakeLists.txt
+++ b/Control/AthenaServices/CMakeLists.txt
@@ -57,6 +57,8 @@ atlas_add_test( AthenaOutputStream_test
    LINK_LIBRARIES TestTools AsgTools AthenaKernel SGTools StoreGateLib GaudiKernel AthenaBaseComps PersistentDataModel
    LOG_IGNORE_PATTERN "^AthenaRootStrea... +(INFO|DEBUG)|^AthenaSealSvc +DEBUG|^SGAudSvc +(INFO|DEBUG)|of type DataHistory|DEBUG Recorded object|object modifiable when retrieved|^ToolSvc +DEBUG Service base class initialized|^ServiceManager +DEBUG Initializing service|^IncidentSvc *DEBUG Adding .* listener|DecisionSvc +DEBUG|^IoComponentMgr +(INFO|DEBUG)|DBReplicaSvc|^HistogramPersis.*DEBUG|^ItemListSvc +(INFO|DEBUG)|Info File PoolFileCatalog.xml does not exist|DataModelCompatSvc::initialize|^ProxyProviderSvc +DEBUG|^DataModelCompatSvc +DEBUG|^AthenaOutputStreamVERBOSE|^AthenaOutputStream +DEBUG|^TimelineSvc +DEBUG"
    ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" )
+# Avoid spurious ubsan warnings.
+set_target_properties( AthenaServices_AthenaOutputStream_test PROPERTIES ENABLE_EXPORTS True )
 
 atlas_add_test( FPEControlSvc_test
    SOURCES test/FPEControlSvc_test.cxx
diff --git a/Control/RootUtils/RootUtils/PyROOTTFilePythonize.h b/Control/RootUtils/RootUtils/PyROOTTFilePythonize.h
index f65efbb215d05d2f4df6049906437fa74bd8bd43..2fc9d6bad2f765dead326c950b73d60af5a156a1 100644
--- a/Control/RootUtils/RootUtils/PyROOTTFilePythonize.h
+++ b/Control/RootUtils/RootUtils/PyROOTTFilePythonize.h
@@ -1,11 +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 RootUtils/PyROOTTFilePythonize.h
  * @author Sebastien Binet
@@ -54,11 +50,14 @@ public:
 
   /** the buffer of bytes
    */
-  char* buf;
+  std::vector<char> buf;
 
   /** 
+   * After we drop py2, we can simplify the code in PyUtils.RootUtils.py
+   * by just returning a bytes object from here.
    */
-  void* buffer() const { return (void*)buf; }
+  void* buffer() const { return (void*)buf.data(); }
+
 };
 
 /** @brief read `len` bytes from file `f`
diff --git a/Control/RootUtils/RootUtils/RootUtilsPyROOTDict.h b/Control/RootUtils/RootUtils/RootUtilsPyROOTDict.h
index 7cb56d351511104384a8d4972d6d55dd9503c63b..de05a3c5e04096e6742000bc5b2442ef176b3731 100644
--- a/Control/RootUtils/RootUtils/RootUtilsPyROOTDict.h
+++ b/Control/RootUtils/RootUtils/RootUtilsPyROOTDict.h
@@ -1,7 +1,7 @@
 // This file's extension implies that it's C, but it's really -*- C++ -*-.
 
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // $Id: RootUtilsPyROOTDict.h,v 1.5 2008-04-23 19:48:34 ssnyder Exp $
@@ -26,7 +26,7 @@
 // Work around a problem sometimes seen with cling in which `struct timespec'
 // appears to be predeclared without the include guard being defined.
 // This can cause problems, for example, with headers that include Python.h.
-// As a workaroud, force the include guard to be defined when this
+// As a workaround, force the include guard to be defined when this
 // dictionary is loaded.
 #include "TInterpreter.h"
 class RootUtilsInit
diff --git a/Control/RootUtils/src/pyroot/PyROOTTFilePythonize.cxx b/Control/RootUtils/src/pyroot/PyROOTTFilePythonize.cxx
index 0f19e3dbcf380ab97761f03057e6993c0b0023de..c2d80d2132db508ca72c8e88ee2c269598f218ac 100644
--- a/Control/RootUtils/src/pyroot/PyROOTTFilePythonize.cxx
+++ b/Control/RootUtils/src/pyroot/PyROOTTFilePythonize.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 RootUtils/src/pyroot/PyROOTTFilePythonize.cxx
  * @author Sebastien Binet
@@ -23,26 +21,18 @@ namespace RootUtils {
 
 PyBytes::PyBytes(size_t buf_sz) : 
   sz(buf_sz>0?buf_sz:0), 
-  buf(0)
+  buf(sz)
 {
-  if (this->sz>0) {
-    buf = (char*)malloc(sizeof(char)*this->sz);
-  }
 }
 
 PyBytes::~PyBytes() 
 {
-  free(buf); buf = 0;
 }
 
 PyBytes::PyBytes(const PyBytes& rhs) : 
   sz(rhs.sz), 
-  buf(0)
+  buf(rhs.buf)
 {
-  if (this->sz>0) {
-    buf = (char*)malloc(sizeof(char)*this->sz);     
-    buf = (char*)memcpy(buf, rhs.buf, this->sz);
-  }
 }
 
 PyBytes&
@@ -50,11 +40,7 @@ PyBytes::operator=(const PyBytes& rhs)
 {
   if (this != &rhs) {
     this->sz = rhs.sz;
-    free(this->buf); this->buf = 0;
-    if (this->sz>0) {      
-      this->buf = (char*)malloc(sizeof(char)*this->sz);     
-      this->buf = (char*)memcpy(this->buf, rhs.buf, rhs.sz);
-    }
+    this->buf = rhs.buf;
   }
   return *this;
 }
@@ -85,7 +71,7 @@ _pythonize_read_root_file(TFile* f, Int_t len)
 
   len = (len>remain) ? remain : len;
   PyBytes buf(len);
-  if (f->ReadBuffer((char*)buf.buf, buf.sz)) {
+  if (f->ReadBuffer((char*)buf.buf.data(), buf.sz)) {
     //err
     return PyBytes(0);
   }
diff --git a/Control/SGMon/SGAudSvc/src/SGAudSvc.cxx b/Control/SGMon/SGAudSvc/src/SGAudSvc.cxx
index 133f4c8b63c733800bdc11e78b0daa04f674b2fe..7af1a51b283e41d929c676b0cfae1f1a69bdb346 100644
--- a/Control/SGMon/SGAudSvc/src/SGAudSvc.cxx
+++ b/Control/SGMon/SGAudSvc/src/SGAudSvc.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
 */
 
 // SGAudSvc.cxx 
@@ -143,12 +143,12 @@ SGAudSvc::finalize() {
   
   f << "Algs: " << m_vAlg.size() << std::endl;
   std::vector<std::string>::iterator i;
-  for (i=m_vAlg.begin();i<m_vAlg.end();i++) {
+  for (i=m_vAlg.begin();i<m_vAlg.end();++i) {
           f << (*i) << std::endl;
   }
   
   f << "Obj: "<< m_vObj.size()<<std::endl;
-  for (i=m_vObj.begin();i<m_vObj.end();i++) {
+  for (i=m_vObj.begin();i<m_vObj.end();++i) {
           f << (*i) << std::endl; 
   }
 
@@ -405,7 +405,7 @@ SGAudSvc::SGGetCurrentAlg(){
   if (name!=m_currAlg){
     std::vector<std::string>::iterator i;
     int index=0;
-    for (i=m_vAlg.begin();i<m_vAlg.end();i++){
+    for (i=m_vAlg.begin();i<m_vAlg.end();++i){
       if (*i==name) {
 	m_nCurrAlg=index;
 	m_currAlg=name;
@@ -427,7 +427,7 @@ void
 SGAudSvc::getNobj(std::string name){
   std::vector<std::string>::iterator i;
   int index=0;
-  for (i=m_vObj.begin();i<m_vObj.end();i++){
+  for (i=m_vObj.begin();i<m_vObj.end();++i){
     if (*i==name) {
       m_nCurrObj=index;
       m_currObj=name;
diff --git a/DataQuality/DataQualityTools/python/DQTDetSynchMonAlg.py b/DataQuality/DataQualityTools/python/DQTDetSynchMonAlg.py
index 01e74965b80006817b883f2bb2f7a7ecbb09d050..859b37791fe51dd692336c48894307383cf0db68 100644
--- a/DataQuality/DataQualityTools/python/DQTDetSynchMonAlg.py
+++ b/DataQuality/DataQualityTools/python/DQTDetSynchMonAlg.py
@@ -173,9 +173,9 @@ if __name__ == '__main__':
     # Initialize configuration object, add accumulator, merge, and run.
     from AthenaConfiguration.MainServicesConfig import MainServicesCfg 
     #from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
-    from ByteStreamCnvSvc.ByteStreamConfig import TrigBSReadCfg
+    from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
     cfg = MainServicesCfg(ConfigFlags)
-    cfg.merge(TrigBSReadCfg(ConfigFlags))
+    cfg.merge(ByteStreamReadCfg(ConfigFlags))
     from TrigInDetConfig.InDetConfig import TrigInDetConfig
     cfg.merge(TrigInDetConfig(ConfigFlags))
 
diff --git a/DataQuality/ZLumiScripts/grid/generateDSFile.py b/DataQuality/ZLumiScripts/grid/generateDSFile.py
new file mode 100755
index 0000000000000000000000000000000000000000..502f0ecd7bc3d1320c7ebac9bc04513e22029ba4
--- /dev/null
+++ b/DataQuality/ZLumiScripts/grid/generateDSFile.py
@@ -0,0 +1,12 @@
+#!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+# helper script to generate JSON file of datasets for batch pathena submission
+
+import sys, json
+prefix = sys.argv[1]
+dslist = sys.argv[2:]
+jlist = []
+for ds in dslist:
+    jlist.append({'inDS': ds, 'outDS': prefix + '.' + ds.split(':')[-1]})
+with open('inOutDs.json', 'w') as ofile:
+    json.dump(jlist, ofile)
diff --git a/DataQuality/ZLumiScripts/grid/grl.py b/DataQuality/ZLumiScripts/grid/grl.py
new file mode 100644
index 0000000000000000000000000000000000000000..d37882385badb4c1dd27cfa8c3af770df2d3d3f9
--- /dev/null
+++ b/DataQuality/ZLumiScripts/grid/grl.py
@@ -0,0 +1,18 @@
+#!/us/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+# Postinclude snippet for Reco_tf to bring in a GRL
+
+from __future__ import print_function
+
+from GoodRunsLists.GoodRunsListsConf import GoodRunsListSelectorTool
+from GoodRunsListsUser.GoodRunsListsUserConf import GRLTriggerSelectorAlg
+from AthenaCommon.AlgSequence import AthSequencer
+import os
+if 'GRL' in os.environ:
+    print('Executing GRL code')
+    ToolSvc += GoodRunsListSelectorTool()
+    ToolSvc.GoodRunsListSelectorTool.GoodRunsListVec = [ os.environ['GRL']  ]
+
+    seq = AthSequencer("AthMasterSeq")
+    seq += GRLTriggerSelectorAlg("GRLAlg")
+    seq.GRLAlg.GoodRunsListArray=[ os.environ['GRLNAME'] ]
diff --git a/DataQuality/ZLumiScripts/grid/merge.py b/DataQuality/ZLumiScripts/grid/merge.py
new file mode 100755
index 0000000000000000000000000000000000000000..2d5b11f0a201b25d763cf83664cad2f9f6b11413
--- /dev/null
+++ b/DataQuality/ZLumiScripts/grid/merge.py
@@ -0,0 +1,20 @@
+#!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+# Simple script to invoke DQHistogramMerge for merging Grid output
+
+from __future__ import print_function
+
+import commands, argparse, sys
+parser = argparse.ArgumentParser()
+parser.add_argument('-o', help='outfilename')
+parser.add_argument('infiles', nargs='+', help='infilenames')
+args=parser.parse_args()
+
+with open('merge.txt', 'w') as txtfile:
+    for f in args.infiles:
+        txtfile.write(f + '\n')
+
+status, output = commands.getstatusoutput('DQHistogramMerge.py merge.txt %s' % args.o)
+print(output)
+sys.exit(status)
+
diff --git a/DataQuality/ZLumiScripts/grid/submission.sh b/DataQuality/ZLumiScripts/grid/submission.sh
new file mode 100755
index 0000000000000000000000000000000000000000..8dcc39619265356c36dbe988ac1623fd7940fc31
--- /dev/null
+++ b/DataQuality/ZLumiScripts/grid/submission.sh
@@ -0,0 +1,100 @@
+#!/bin/bash
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+#
+# Submit pathena jobs to make Z counting HIST files for data
+# Adjust DATASETS and LOWMU variables to configure the job
+# Also see below for commented out code that enables using a GRL
+
+#DATASETS=$(rucio ls 'data16_13TeV.00*physics_Main*.AOD*' --filter account=tzero --short)
+#DATASETS=$(rucio list-content data16_13TeV:data16_13TeV.periodG.physics_Main.PhysCont.AOD.repro21_v01 --short)
+#DATASETS="data18_13TeV.00356124.physics_Main.merge.AOD.f1035_m1999 data18_13TeV.00359823.physics_Main.merge.AOD.f1034_m2020 data18_13TeV.00363738.physics_Main.merge.AOD.f1006_m2037 data18_13TeV.00364292.physics_Main.merge.AOD.f1002_m2037 data18_13TeV.00350361.physics_Main.merge.AOD.f934_m1960"
+
+#DATASETS="data17_13TeV:data17_13TeV.00338834.physics_Main.merge.AOD.r10258_p3399_tid13253867_00"
+#LOWMU=0
+
+# 2017 5 TeV low mu
+#DATASETS=$(rucio list-content data17_5TeV:data17_5TeV.periodM.physics_Main.PhysCont.AOD.pro22_v02 --short)
+#LOWMU=1
+
+# 2017 13 TeV low mu
+#DATASETS=$(rucio list-content data17_13TeV:data17_13TeV.periodN.physics_Main.PhysCont.AOD.pro22_v03 --short)
+#LOWMU=1
+
+# 2018 13 TeV low mu period J
+#DATASETS=$(rucio list-content data18_13TeV:data18_13TeV.periodJ.physics_Main.PhysCont.AOD.t0pro22_v01 --short)
+#LOWMU=1
+
+# 2018 13 TeV low mu period G2
+#DATASETS=$(rucio list-content data18_13TeV:data18_13TeV.periodG2.physics_Main.PhysCont.AOD.t0pro22_v01 --short)
+#LOWMU=1
+
+# 2018 13 TeV low mu period G2
+#DATASETS=$(rucio list-content data18_13TeV:data18_13TeV.periodG4.physics_Main.PhysCont.AOD.t0pro22_v01 --short)
+#LOWMU=1
+
+# 2015 13 TeV high mu
+#DATASETS=$(rucio list-content data15_13TeV:data15_13TeV.periodAllYear.physics_Main.PhysCont.AOD.repro21_v03 --short)
+#LOWMU=0
+
+# 2016 13 TeV high mu
+#DATASETS=$(rucio list-content data16_13TeV:data16_13TeV.periodAllYear.physics_Main.PhysCont.AOD.repro21_v03 --short)
+#LOWMU=0
+
+# 2017 13 TeV high mu
+#DATASETS=$(rucio list-content data17_13TeV:data17_13TeV.periodAllYear.physics_Main.PhysCont.AOD.pro22_v03 --short)
+#LOWMU=0
+
+# 2018 13 TeV high mu
+DATASETS=$(rucio list-content data18_13TeV:data18_13TeV.periodB.physics_Main.PhysCont.AOD.t0pro22_v01 data18_13TeV:data18_13TeV.periodC.physics_Main.PhysCont.AOD.t0pro22_v01 data18_13TeV:data18_13TeV.periodD.physics_Main.PhysCont.AOD.t0pro22_v01 data18_13TeV:data18_13TeV.periodE.physics_Main.PhysCont.AOD.t0pro22_v01 data18_13TeV:data18_13TeV.periodF.physics_Main.PhysCont.AOD.t0pro22_v01 data18_13TeV:data18_13TeV.periodH.physics_Main.PhysCont.AOD.t0pro22_v01 data18_13TeV:data18_13TeV.periodI.physics_Main.PhysCont.AOD.t0pro22_v01 data18_13TeV:data18_13TeV.periodJ.physics_Main.PhysCont.AOD.t0pro22_v01 data18_13TeV:data18_13TeV.periodK.physics_Main.PhysCont.AOD.t0pro22_v01 data18_13TeV:data18_13TeV.periodL.physics_Main.PhysCont.AOD.t0pro22_v01 data18_13TeV:data18_13TeV.periodM.physics_Main.PhysCont.AOD.t0pro22_v01 data18_13TeV:data18_13TeV.periodN.physics_Main.PhysCont.AOD.t0pro22_v01 data18_13TeV:data18_13TeV.periodO.physics_Main.PhysCont.AOD.t0pro22_v01 data18_13TeV:data18_13TeV.periodQ.physics_Main.PhysCont.AOD.t0pro22_v01 --short)
+LOWMU=0
+
+PREFIX=user.ponyisi.2020320a2.merge
+./generateDSFile.py $PREFIX ${DATASETS}
+#POSTEXEC="ToolSvc.DQTMuonSelectionTool.MaxEta=0.9;ToolSvc.DQTGlobalWZFinderTool.MuonMaxEta=0.9"
+#POSTEXEC="pass"
+POSTEXEC="ToolSvc.DQTGlobalWZFinderTool.FillBCIDTrees=True"
+if [[ $LOWMU == 1 ]] ; then {
+    POSTEXEC=${POSTEXEC}";\
+ToolSvc.monTrigTransTool.triggerMapping[\"primary_single_ele_iso\"]=\"\";\
+ToolSvc.monTrigTransTool.triggerMapping[\"primary_single_ele\"]=\"HLT_e15_lhloose_nod0_L1EM12\";\
+ToolSvc.monTrigTransTool.triggerMapping[\"monitoring_muonIso\"]=\"\";\
+ToolSvc.monTrigTransTool.triggerMapping[\"monitoring_muonNonIso\"]=\"HLT_mu14\""
+}; elif [[ $DATASETS == data15* ]] ; then {
+    POSTEXEC=${POSTEXEC}";\
+ToolSvc.monTrigTransTool.triggerMapping[\"primary_single_ele_iso\"]=\"\";\
+ToolSvc.monTrigTransTool.triggerMapping[\"primary_single_ele\"]=\"HLT_e24_lhmedium_L1EM20VH,HLT_e60_lhmedium,HLT_e120_lhloose\";\
+ToolSvc.monTrigTransTool.triggerMapping[\"monitoring_muonIso\"]=\"HLT_mu20_iloose_L1MU15\""
+}; else {
+    POSTEXEC=${POSTEXEC}";\
+ToolSvc.monTrigTransTool.triggerMapping[\"primary_single_ele_iso\"]=\"HLT_e26_lhtight_nod0_ivarloose\";\
+ToolSvc.monTrigTransTool.triggerMapping[\"primary_single_ele\"]=\"HLT_e60_lhmedium_nod0,HLT_e140_lhloose_nod0\""
+    }; fi
+
+if [[ $DATASETS == data18* ]] ; then {
+    export GRL=/cvmfs/atlas.cern.ch/repo/sw/database/GroupData/GoodRunsLists/data18_13TeV/20190318/physics_25ns_Triggerno17e33prim.xml
+    export GRLNAME=PHYS_StandardGRL_All_Good_25ns_Triggerno17e33prim
+} ; elif [[ $DATASETS == data17* ]] ; then {
+    export GRL=/cvmfs/atlas.cern.ch/repo/sw/database/GroupData/GoodRunsLists/data17_13TeV/20180619/physics_25ns_Triggerno17e33prim.xml
+    export GRLNAME=PHYS_StandardGRL_All_Good_25ns_Triggerno17e33prim
+} ; elif [[ $DATASETS == data16* ]] ; then {
+    export GRL=/cvmfs/atlas.cern.ch/repo/sw/database/GroupData/GoodRunsLists/data16_13TeV/20180129/physics_25ns_21.0.19.xml
+    export GRLNAME=PHYS_StandardGRL_All_Good_25ns
+} ; elif [[ $DATASETS == data15* ]] ; then {
+    export GRL=/cvmfs/atlas.cern.ch/repo/sw/database/GroupData/GoodRunsLists/data15_13TeV/20170619/physics_25ns_21.0.19.xml
+    export GRLNAME=PHYS_StandardGRL_All_Good_25ns
+} ; else {
+    export GRL=None
+    export GRLNAME=None
+} ; fi
+
+EXCLUDE=""
+# following gives a GRL filter
+#CMD="export GRL=$GRL;export GRLNAME=$GRLNAME;Reco_tf.py --preExec='rec.doApplyAODFix.set_Value_and_Lock(False);DQMonFlags.set_All_Off();DQMonFlags.doGlobalMon.set_Value_and_Lock(True)' --postExec='$POSTEXEC' --inputAODFile=%IN --outputHIST_AODFile=%OUT.HIST_AOD.root --postInclude='grl.py'"
+CMD="Reco_tf.py --preExec='rec.doApplyAODFix.set_Value_and_Lock(False);DQMonFlags.set_All_Off();DQMonFlags.doGlobalMon.set_Value_and_Lock(True)' --postExec='$POSTEXEC' --inputAODFile=%IN --outputHIST_AODFile=%OUT.HIST_AOD.root"
+
+ADDITIONAL="--addNthFieldOfInDSToLFN=2 --mergeOutput --mergeScript='merge.py' --excludedSite=ANALY_GOEGRID,ANALY_GLASGOW_SL7,UKI-SCOTGRID-GLASGOW,ANALY_LANCS_SL7,ANALY_FZU"
+
+echo pathena $EXCLUDE --trf "$CMD" $ADDITIONAL --inOutDsJson inOutDs.json
+pathena $EXCLUDE --trf "$CMD" $ADDITIONAL --inOutDsJson inOutDs.json
+
+rm inOutDs.json
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx
index 081a7b67d03d8814e6e8415cf8dd7e62f5aeab50..28f099b8dcf5e6266066ed5647e7a21950dfb7bb 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx
@@ -1165,7 +1165,6 @@ AthenaPoolCnvSvc::AthenaPoolCnvSvc(const std::string& name, ISvcLocator* pSvcLoc
 	::AthCnvSvc(name, pSvcLocator, POOL_StorageType),
 	m_outputStreamingTool(this)
 {
-   declareProperty("InputStreamingTool", m_inputStreamingTool);
    declareProperty("OutputStreamingTool", m_outputStreamingTool);
 }
 //______________________________________________________________________________
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h
index 8b7e21d4048deaee48ee594976093deb9190e7e3..be992df67047c1e8ead1062046b54195bb8e1a2f 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h
@@ -183,7 +183,7 @@ private: // data
    ServiceHandle<IChronoStatSvc> m_chronoStatSvc{this,"ChronoStatSvc","ChronoStatSvc"};
    ServiceHandle<IClassIDSvc>    m_clidSvc{this,"ClassIDSvc","ClassIDSvc"};
    ServiceHandle<IAthenaSerializeSvc> m_serializeSvc{this,"AthenaRootSerializeSvc","AthenaRootSerializeSvc"};
-   ToolHandle<IAthenaIPCTool>    m_inputStreamingTool{this,"InputStreamingTool"};
+   ToolHandle<IAthenaIPCTool>    m_inputStreamingTool{this,"InputStreamingTool",{}};
    ToolHandleArray<IAthenaIPCTool>    m_outputStreamingTool;
    //The following doesn't work because of Gaudi issue #122
    //ToolHandleArray<IAthenaIPCTool>    m_outputStreamingTool{this,"OutputStreamingTool", {} };
diff --git a/Database/AthenaPOOL/EventSelectorAthenaPool/CMakeLists.txt b/Database/AthenaPOOL/EventSelectorAthenaPool/CMakeLists.txt
index a929c62272a130aa2e1453b4496098238ee1bd15..5d9257e6ba333731796b3039042c1d9cb026f21a 100644
--- a/Database/AthenaPOOL/EventSelectorAthenaPool/CMakeLists.txt
+++ b/Database/AthenaPOOL/EventSelectorAthenaPool/CMakeLists.txt
@@ -39,3 +39,8 @@ atlas_add_component( EventSelectorAthenaPool
 atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/*.py )
 
+
+atlas_add_test( CondProxyProviderConfig_test
+                SCRIPT python -m EventSelectorAthenaPool.CondProxyProviderConfig
+                LOG_SELECT_PATTERN "ComponentAccumulator|^---|^CondProxyProvider" )
+
diff --git a/Database/AthenaPOOL/EventSelectorAthenaPool/python/CondProxyProviderConfig.py b/Database/AthenaPOOL/EventSelectorAthenaPool/python/CondProxyProviderConfig.py
new file mode 100644
index 0000000000000000000000000000000000000000..02ecf31fe608ff70409bf3c17dee80b2bf74d82f
--- /dev/null
+++ b/Database/AthenaPOOL/EventSelectorAthenaPool/python/CondProxyProviderConfig.py
@@ -0,0 +1,44 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+# File: EventSelectorAthenaPool/python/CondProxyProviderConfig.py
+# Created: Jun 2020, sss
+# Purpose: Configure CondProxyProvider.
+
+from __future__ import print_function
+
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.ComponentFactory import CompFactory
+
+
+def CondProxyProviderCfg (flags, poolFiles):
+    if not isinstance (poolFiles, list):
+        poolFiles = [poolFiles]
+
+    result = ComponentAccumulator()
+
+    ProxyProviderSvc = CompFactory.ProxyProviderSvc # SGComps
+    pps = ProxyProviderSvc (ProviderNames = ['CondProxyProvider'])
+    result.addService (pps)
+    
+    CondProxyProvider = CompFactory.CondProxyProvider # EventSelectorAthenaPool
+    cpp = CondProxyProvider (InputCollections = poolFiles)
+    result.addService (cpp)
+
+    return result
+    
+
+if __name__ == "__main__":
+    from AthenaCommon.Configurable import Configurable
+    Configurable.configurableRun3Behavior=1
+    from AthenaConfiguration.AllConfigFlags import ConfigFlags
+    ConfigFlags.loadAllDynamicFlags()
+
+    flags1 = ConfigFlags.clone()
+    flags1.lock()
+    acc1 = ComponentAccumulator()
+    acc1.merge (CondProxyProviderCfg (flags1, 'file1'))
+    acc1.merge (CondProxyProviderCfg (flags1, ['file2', 'file3']))
+    acc1.printConfig (summariseProps=True)
+    print ('CondProxyProvider:', acc1.getService('CondProxyProvider'))
+    acc1.wasMerged()
+
diff --git a/Database/AthenaPOOL/EventSelectorAthenaPool/share/CondProxyProviderConfig_test.ref b/Database/AthenaPOOL/EventSelectorAthenaPool/share/CondProxyProviderConfig_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..494822f7cad636702a71366ad6d9e155fb9ff209
--- /dev/null
+++ b/Database/AthenaPOOL/EventSelectorAthenaPool/share/CondProxyProviderConfig_test.ref
@@ -0,0 +1,16 @@
+Py:Athena            INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [config.EventSelectorAthenaPool-20200617/24fa4eb1a41] -- built on [2020-06-17T2014]
+Py:ComponentAccumulator    INFO Event Inputs
+Py:ComponentAccumulator    INFO Event Algorithm Sequences
+Py:ComponentAccumulator    INFO Top sequence 0
+Py:ComponentAccumulator    INFO \__ AthAlgSeq (seq: SEQ AND)
+Py:ComponentAccumulator    INFO Condition Algorithms
+Py:ComponentAccumulator    INFO Services
+Py:ComponentAccumulator    INFO ['ProxyProviderSvc', 'CondProxyProvider']
+Py:ComponentAccumulator    INFO Public Tools
+Py:ComponentAccumulator    INFO [
+Py:ComponentAccumulator    INFO ]
+Py:ComponentAccumulator    INFO Private Tools
+Py:ComponentAccumulator    INFO [
+Py:ComponentAccumulator    INFO ]
+Py:ComponentAccumulator    INFO TheApp properties
+CondProxyProvider: CondProxyProvider('CondProxyProvider', InputCollections=['file1', 'file2', 'file3'])
diff --git a/Database/AthenaPOOL/EventSelectorAthenaPool/src/CondProxyProvider.cxx b/Database/AthenaPOOL/EventSelectorAthenaPool/src/CondProxyProvider.cxx
index 9e3b2859b48bf9669ec3ecd0d3cd0bab24b5625b..7d761658725d488bf3379c92b3c8f15894df92f1 100755
--- a/Database/AthenaPOOL/EventSelectorAthenaPool/src/CondProxyProvider.cxx
+++ b/Database/AthenaPOOL/EventSelectorAthenaPool/src/CondProxyProvider.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /** @file CondProxyProvider.cxx
@@ -33,7 +33,6 @@ CondProxyProvider::CondProxyProvider(const std::string& name, ISvcLocator* pSvcL
 	m_athenaPoolCnvSvc("AthenaPoolCnvSvc", name),
 	m_poolCollectionConverter(0),
 	m_headerIterator(0) {
-   declareProperty("InputCollections", m_inputCollectionsProp);
 }
 //________________________________________________________________________________
 CondProxyProvider::~CondProxyProvider() {
diff --git a/Database/AthenaPOOL/EventSelectorAthenaPool/src/CondProxyProvider.h b/Database/AthenaPOOL/EventSelectorAthenaPool/src/CondProxyProvider.h
index 761bee1d20cf13d80e5e05a9061d32598b266e1b..6f8d5c0726fa1ac6ad29f18a2776f94be3ba9248 100755
--- a/Database/AthenaPOOL/EventSelectorAthenaPool/src/CondProxyProvider.h
+++ b/Database/AthenaPOOL/EventSelectorAthenaPool/src/CondProxyProvider.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 CONDPROXYPROVIDER_H
@@ -63,7 +63,8 @@ private: // data
 
 private: // properties
    /// InputCollections, vector with names of the input collections.
-   StringArrayProperty m_inputCollectionsProp;
+   StringArrayProperty m_inputCollectionsProp
+   { this, "InputCollections", {}, "Files to read", "OrderedSet<std::string>" };
    mutable std::vector<std::string>::const_iterator m_inputCollectionsIterator;
 
 private: // internal helper functions
diff --git a/DetectorDescription/RegionSelector/python/RegSelConfig.py b/DetectorDescription/RegionSelector/python/RegSelConfig.py
index 29984e3bf91c062565f411a85d397963af9003ae..a440fb5b4393ce3c5778f31698e647a8eeea144d 100644
--- a/DetectorDescription/RegionSelector/python/RegSelConfig.py
+++ b/DetectorDescription/RegionSelector/python/RegSelConfig.py
@@ -136,8 +136,8 @@ if __name__ == "__main__":
     #    cfg.merge( PoolReadCfg( ConfigFlags ) )
 
     
-    from ByteStreamCnvSvc.ByteStreamConfig import TrigBSReadCfg
-    cfg.merge(TrigBSReadCfg( ConfigFlags ))
+    from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
+    cfg.merge(ByteStreamReadCfg( ConfigFlags ))
     
     
     acc = regSelCfg( ConfigFlags )
diff --git a/Event/ByteStreamCnvSvc/ByteStreamCnvSvc/ByteStreamCnvSvc.h b/Event/ByteStreamCnvSvc/ByteStreamCnvSvc/ByteStreamCnvSvc.h
index 3fe4f35c9a7e6985a85c1b6979ae0d42af763921..f8123fe9aaa23c7325f4628a471e3900a628b29a 100644
--- a/Event/ByteStreamCnvSvc/ByteStreamCnvSvc/ByteStreamCnvSvc.h
+++ b/Event/ByteStreamCnvSvc/ByteStreamCnvSvc/ByteStreamCnvSvc.h
@@ -60,7 +60,7 @@ private:
    std::string m_ioSvcName;
 
    /// list of service names
-   Gaudi::Property<std::vector<std::string>> m_ioSvcNameList{ this, "ByteStreamOutputSvcList", {}, "", "Set<T>"};
+   Gaudi::Property<std::vector<std::string>> m_ioSvcNameList{ this, "ByteStreamOutputSvcList", {}, "", "OrderedSet<T>"};
    
    /// Services for writing output
    std::map<std::string, ByteStreamOutputSvc*> m_ioSvcMap;
diff --git a/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py b/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py
index 17fbb7de231d8145d8c5eae3c138e49e6cd08a16..de44b7f9143ca2463b142b824a866d020410ec03 100644
--- a/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py
+++ b/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py
@@ -64,11 +64,6 @@ def ByteStreamReadCfg( inputFlags, typeNames=[] ):
 
     return acc
 
-def TrigBSReadCfg( flags, typeNames=[] ):
-    # TODO: Search and replace all clients to use ByteStreamReadCfg directly, then remove TrigBSReadCfg
-    return ByteStreamReadCfg( flags, typeNames )
-
-
 def ByteStreamWriteCfg( flags, typeNames=[] ):
     acc = ComponentAccumulator("AthOutSeq")
     outputSvc = CompFactory.ByteStreamEventStorageOutputSvc()
@@ -106,6 +101,6 @@ if __name__ == "__main__":
 
     ConfigFlags.Input.Files = defaultTestFiles.RAW
 
-    acc = TrigBSReadCfg( ConfigFlags )
+    acc = ByteStreamReadCfg( ConfigFlags )
     acc.store( open( "test.pkl", "wb" ) )
     print("All OK")
diff --git a/ForwardDetectors/ForwardTransportSvc/CMakeLists.txt b/ForwardDetectors/ForwardTransportSvc/CMakeLists.txt
index ce54b1424631e843ecd30a5f1a5abbb1d59737ee..24b09cfe5c3e9065523a92079bf4cb27bcb21dc6 100644
--- a/ForwardDetectors/ForwardTransportSvc/CMakeLists.txt
+++ b/ForwardDetectors/ForwardTransportSvc/CMakeLists.txt
@@ -20,15 +20,21 @@ find_package( Geant4 )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 find_package( XercesC )
 
+atlas_add_library( ForwardTransportSvcLib
+                   ForwardTransportSvc/*.h
+                   INTERFACE
+                   PUBLIC_HEADERS ForwardTransportSvc
+                   INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS}
+                   LINK_LIBRARIES GaudiKernel AtlasHepMCLib ForwardTracker )
+
 # Component(s) in the package:
 atlas_add_component( ForwardTransportSvc
                      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} AtlasHepMCLib ForwardTracker GaudiKernel AthenaBaseComps GeneratorObjects ForwardTracker )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} ForwardTransportSvcLib AthenaBaseComps GeneratorObjects ForwardTracker )
 
 # Install files from the package:
-atlas_install_headers( ForwardTransportSvc )
 atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/*.py )
 
diff --git a/Generators/AtlasHepMC/AtlasHepMC/GenVertex.h b/Generators/AtlasHepMC/AtlasHepMC/GenVertex.h
index 2130d84475ecf36d765e87adb11022d78bf7d954..a90b6c53159f7756c41a0aaa8b16a936753b9cee 100644
--- a/Generators/AtlasHepMC/AtlasHepMC/GenVertex.h
+++ b/Generators/AtlasHepMC/AtlasHepMC/GenVertex.h
@@ -46,6 +46,7 @@ inline GenVertexPtr newGenVertexPtr(const HepMC::FourVector &pos = HepMC::FourVe
     return new HepMC::GenVertex(pos,i);
 }
 inline int barcode(ConstGenVertexPtr p){ return p->barcode();}
+inline void* raw_pointer(GenVertexPtr p){ return p;}
 }
 #endif
 #endif
diff --git a/Generators/FlowAfterburner/CMakeLists.txt b/Generators/FlowAfterburner/CMakeLists.txt
index e02dacd8244da2cfda45ab6d2979ca3e5df520e4..0185f2a587c7d75ff6707c639024cf300a289bf5 100644
--- a/Generators/FlowAfterburner/CMakeLists.txt
+++ b/Generators/FlowAfterburner/CMakeLists.txt
@@ -30,12 +30,12 @@ atlas_add_library( FlowAfterburnerLib
                    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 TruthUtils )
+                   PRIVATE_LINK_LIBRARIES AtlasHepMCLib AtlasHepMCsearchLib 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 ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel GaudiKernel TruthHelper GeneratorObjects StoreGateLib SGtests TruthUtils FlowAfterburnerLib )
+                     LINK_LIBRARIES ${GSL_LIBRARIES} ${ROOT_LIBRARIES} AtlasHepMCLib  AtlasHepMCsearchLib ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel GaudiKernel TruthHelper GeneratorObjects StoreGateLib SGtests TruthUtils FlowAfterburnerLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/Generators/GeneratorFilters/src/WeightedBDtoElectronFilter.cxx b/Generators/GeneratorFilters/src/WeightedBDtoElectronFilter.cxx
index 4895bf0804302529f2667f89fa91cc9a9bceedcf..d92361c11506a3f188da3f73b4e99e0dc9542dd2 100644
--- a/Generators/GeneratorFilters/src/WeightedBDtoElectronFilter.cxx
+++ b/Generators/GeneratorFilters/src/WeightedBDtoElectronFilter.cxx
@@ -66,37 +66,28 @@ StatusCode WeightedBDtoElectronFilter::filterEvent() {
   McEventCollection::const_iterator itr;
   for (itr = events()->begin(); itr!=events()->end(); ++itr) {
     const HepMC::GenEvent* genEvt = (*itr);
-    for (HepMC::GenEvent::particle_const_iterator pitr = genEvt->particles_begin(); pitr != genEvt->particles_end(); ++pitr) {
-      double etaAbs = fabs((*pitr)->momentum().pseudoRapidity());
-      double pt = (*pitr)->momentum().perp();
-
+    for (auto pitr: *genEvt) {
       // check stables only
-      if ( (*pitr)->status() == 1) {
-        // check pdg_id
-        if ( std::abs((*pitr)->pdg_id()) == 11 ) {
-          // check pt
-          if ( pt>=m_PtMin && pt<=m_PtMax) {
-            // check eta
-            if ( etaAbs <=m_EtaRange ) {
-
-              // check parent and ancestors for B hadron
-              auto bParent = FindBParent( (*pitr) );
-              if ( bParent != 0 ) {
-
-                // apply prescale factors
-                if ( PassPrescaleCheck( etaAbs, pt ) ) {
-                  ATH_MSG_VERBOSE(" found good electron (pass prescale): PID = " << (*pitr)->pdg_id() <<
+      if ( pitr->status() != 1)  continue;
+      // check pdg_id
+      if ( std::abs(pitr->pdg_id()) != 11 )  continue;
+      double etaAbs = std::abs(pitr->momentum().pseudoRapidity());
+      double pt = pitr->momentum().perp();
+      // check pt
+      if ( pt<m_PtMin || pt>m_PtMax) continue;
+      // check eta
+      if ( etaAbs > m_EtaRange ) continue;
+      // check parent and ancestors for B hadron
+      auto bParent = FindBParent( pitr );
+      if ( !bParent ) continue;
+      // apply prescale factors
+      if ( ! PassPrescaleCheck( etaAbs, pt ) ) continue;
+      ATH_MSG_VERBOSE(" found good electron (pass prescale): PID = " << pitr->pdg_id() <<
                                   "					   B hadron PID = " << bParent->pdg_id() <<
-                                  "					   electron pt	= " << (*pitr)->momentum().perp()/1000. << " GeV " <<
-                                  "					   electron eta = " << (*pitr)->momentum().pseudoRapidity() <<
+                                  "					   electron pt	= " << pitr->momentum().perp()/1000. << " GeV " <<
+                                  "					   electron eta = " << pitr->momentum().pseudoRapidity() <<
                                   " ===>>> event passed WeightedBDtoElectronFilter ");
-                  return StatusCode::SUCCESS;
-                }
-              } // B parent
-            } // eta range
-          } // pt cut
-        } // pdg id
-      } // stable
+      return StatusCode::SUCCESS;
     } // particle loop
   } // gen events loop
 
diff --git a/Generators/GeneratorFilters/src/XtoVVDecayFilter.cxx b/Generators/GeneratorFilters/src/XtoVVDecayFilter.cxx
index 0360724d7e35da417dc83336f6034048c430d294..5675023cba9c760c0cee7d176cab210e422eafe3 100644
--- a/Generators/GeneratorFilters/src/XtoVVDecayFilter.cxx
+++ b/Generators/GeneratorFilters/src/XtoVVDecayFilter.cxx
@@ -54,22 +54,20 @@ StatusCode XtoVVDecayFilter::filterEvent() {
   for (itr = events()->begin(); itr != events()->end(); ++itr) {
     // Loop over all particles in the event
     const HepMC::GenEvent* genEvt = (*itr);
-    for (HepMC::GenEvent::particle_const_iterator pitr = genEvt->particles_begin(); pitr != genEvt->particles_end(); ++pitr) {
-      if ( abs((*pitr)->pdg_id()) == m_PDGParent && (*pitr)->status() == m_StatusParent) {
-        HepMC::GenVertex::particle_iterator firstMother = (*pitr)->production_vertex()->particles_begin(HepMC::parents);
-        HepMC::GenVertex::particle_iterator endMother = (*pitr)->production_vertex()->particles_end(HepMC::parents);
-        HepMC::GenVertex::particle_iterator thisMother = firstMother;
+    for (auto pitr: *genEvt) {
+      if ( abs(pitr->pdg_id()) != m_PDGParent || pitr->status() != m_StatusParent) continue;
         bool isGrandParentOK = false;
-        for (; thisMother != endMother; ++thisMother) {
-          ATH_MSG_DEBUG(" Parent " << (*pitr)->pdg_id() << " barcode = "   << (*pitr)->barcode() << " status = "  << (*pitr)->status());
-          ATH_MSG_DEBUG(" a Parent mother "  << (*thisMother)->pdg_id()<< " barcode = " << (*thisMother)->barcode());
+        auto firstMother = pitr->production_vertex()->particles_begin(HepMC::parents);
+        auto endMother = pitr->production_vertex()->particles_end(HepMC::parents);
+        for (auto  thisMother=firstMother;thisMother!=endMother;thisMother++) {
+          ATH_MSG_DEBUG(" Parent " << pitr->pdg_id() << " barcode = "   << HepMC::barcode(pitr) << " status = "  << pitr->status());
+          ATH_MSG_DEBUG(" a Parent mother "  << (*thisMother)->pdg_id()<< " barcode = " << HepMC::barcode(*thisMother));
           if ( (*thisMother)->pdg_id() == m_PDGGrandParent ) isGrandParentOK = true;
         }
         ATH_MSG_DEBUG(" Grand Parent is OK? " << isGrandParentOK);
         if (!isGrandParentOK) continue;
         ++nGoodParent;
-        FindAncestor((*pitr)->end_vertex(), m_PDGParent, okPDGChild1, okPDGChild2);
-      }
+        FindAncestor(pitr->end_vertex(), m_PDGParent, okPDGChild1, okPDGChild2);
     }
   }
   ATH_MSG_DEBUG("Result " << nGoodParent << " " << okPDGChild1 << " " << okPDGChild2);
@@ -93,8 +91,7 @@ void XtoVVDecayFilter::FindAncestor(const HepMC::GenVertexPtr searchvertex,
   if (!searchvertex) return;
   const HepMC::GenVertex::particles_out_const_iterator firstAncestor = searchvertex->particles_out_const_begin();
   const HepMC::GenVertex::particles_out_const_iterator endAncestor = searchvertex->particles_out_const_end();
-  HepMC::GenVertex::particles_out_const_iterator thisAncestor = firstAncestor;
-  for (; thisAncestor != endAncestor; ++thisAncestor){
+  for (  auto thisAncestor = firstAncestor; thisAncestor != endAncestor; ++thisAncestor){
     //ATH_MSG_DEBUG(" child " << (*thisAncestor)->pdg_id());
     if (abs((*thisAncestor)->pdg_id()) == targetPDGID) { //same particle as parent
       FindAncestor((*thisAncestor)->end_vertex(), targetPDGID, okPDGChild1, okPDGChild2);
diff --git a/Generators/HforTool/CMakeLists.txt b/Generators/HforTool/CMakeLists.txt
index 7a875a64ba609d2a919cd9ca0c0b7dba415b9579..79cd889ad38f14debc31c94b19f11b4673730936 100644
--- a/Generators/HforTool/CMakeLists.txt
+++ b/Generators/HforTool/CMakeLists.txt
@@ -26,7 +26,7 @@ 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 )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} AtlasHepMCLib AthenaBaseComps EventInfo GaudiKernel JetEvent StoreGateLib SGtests GeneratorObjects TruthUtils GenInterfacesLib )
 
 # Install files from the package:
 atlas_install_headers( HforTool )
diff --git a/HLT/Trigger/TrigControl/TrigExamples/TrigExPartialEB/python/MTCalibPebConfig.py b/HLT/Trigger/TrigControl/TrigExamples/TrigExPartialEB/python/MTCalibPebConfig.py
index fe45172ac3be9c2ece6fb3f6602db9169a14ea17..72de33222c81676d30d0dfe52e5fd40bf2eb39b0 100644
--- a/HLT/Trigger/TrigControl/TrigExamples/TrigExPartialEB/python/MTCalibPebConfig.py
+++ b/HLT/Trigger/TrigControl/TrigExamples/TrigExPartialEB/python/MTCalibPebConfig.py
@@ -68,18 +68,18 @@ rob_list = [
 ]
 
 rob_access_dict = {
-  '01 :GET:RND20: Retrieve ': rob_list,
-  '02 :GET:RND10: Retrieve ': rob_list,
-  '03 :GET:RND5:  Retrieve ': rob_list,
-  '04 :GET:RND10: Retrieve ': rob_list,
-  '05 :GET:RND20: Retrieve ': rob_list,
-  '06 :GET:RND50: Retrieve ': rob_list,
-  '07 :GET:RND10: Retrieve ': rob_list,
-  '08 :GET:RND5:  Retrieve ': rob_list,
-  '09 :GET:RND20: Retrieve ': rob_list,
-  '10 :GET:RND20: Retrieve ': rob_list,
-  '11 :GET:RND10: Retrieve ': rob_list,
-  '12 :GET:RND10: Retrieve ': rob_list
+  '01 :ADDGET:RND20:': rob_list,  # Prefetch+Retrieve  20 random ROBs from rob_list
+  '02 :GET:RND10:   ': rob_list,  # Retrieve           10 random ROBs from rob_list
+  '03 :GET:RND5:    ': rob_list,  # Retrieve            5 random ROBs from rob_list
+  '04 :ADD:RND10:   ': rob_list,  # Prefetch           10 random ROBs from rob_list
+  '05 :ADD:RND20:   ': rob_list,  # Prefetch           20 random ROBs from rob_list
+  '06 :ADDGET:RND50:': rob_list,  # Prefetch+Retrieve  50 random ROBs from rob_list
+  '07 :ADDGET:RND10:': rob_list,  # Prefetch+Retrieve  10 random ROBs from rob_list
+  '08 :ADDGET:RND5: ': rob_list,  # Prefetch+Retrieve   5 random ROBs from rob_list
+  '09 :GET:RND20:   ': rob_list,  # Retrieve           20 random ROBs from rob_list
+  '10 :ADDGET:RND20:': rob_list,  # Prefetch+Retrieve  20 random ROBs from rob_list
+  '11 :GET:RND10:   ': rob_list,  # Retrieve           10 random ROBs from rob_list
+  '12 :ADDGET:RND10:': rob_list   # Prefetch+Retrieve  10 random ROBs from rob_list
 }
 
 class MTCalibPebHypoOptions:
diff --git a/HLT/Trigger/TrigControl/TrigExamples/TrigExPartialEB/src/MTCalibPebHypoTool.cxx b/HLT/Trigger/TrigControl/TrigExamples/TrigExPartialEB/src/MTCalibPebHypoTool.cxx
index a7442a31b97fdf1c3ed2e7b7be6c5a9c6af9734c..83c6a217465ae114f30247bb0c15ccd9de585282 100644
--- a/HLT/Trigger/TrigControl/TrigExamples/TrigExPartialEB/src/MTCalibPebHypoTool.cxx
+++ b/HLT/Trigger/TrigControl/TrigExamples/TrigExPartialEB/src/MTCalibPebHypoTool.cxx
@@ -200,35 +200,31 @@ StatusCode MTCalibPebHypoTool::decide(const MTCalibPebHypoTool::Input& input) co
     else robs = robVec;
 
     // Execute the ROB requests
-    switch (instr.type) {
-      case ROBRequestInstruction::Type::ADD: {
-        // Prefetch ROBs
-        ATH_MSG_DEBUG("Preloading ROBs: " << idsToString(robs));
-        m_robDataProviderSvc->addROBData(input.eventContext, robs, name()+"-ADD");
-        break;
-      }
-      case ROBRequestInstruction::Type::GET: {
-        // Retrieve ROBs
-        ATH_MSG_DEBUG("Retrieving ROBs: " << idsToString(robs));
-        // VROBFRAG is a typedef for std::vector<const eformat::ROBFragment<const uint32_t*>*>
-        IROBDataProviderSvc::VROBFRAG robFragments;
-        m_robDataProviderSvc->getROBData(input.eventContext, robs, robFragments, name()+"-GET");
-        ATH_MSG_DEBUG("Number of ROBs retrieved: " << robFragments.size());
-        if (!robFragments.empty())
-          ATH_MSG_DEBUG("List of ROBs found: " << std::endl << format(robFragments));
-        break;
-      }
-      case ROBRequestInstruction::Type::COL: {
-        // Event building
-        ATH_MSG_DEBUG("Requesting full event ROBs");
-        int nrobs = m_robDataProviderSvc->collectCompleteEventData(input.eventContext, name()+"-COL");
-        ATH_MSG_DEBUG("Number of ROBs retrieved: " << nrobs);
-        break;
-      }
-      default: {
-        ATH_MSG_ERROR("Invalid ROB request instruction " << instr.toString());
-        return StatusCode::FAILURE;
-      }
+    using ReqType = ROBRequestInstruction::Type;
+    if (instr.type == ReqType::ADD || instr.type == ReqType::ADDGET) {
+      // Prefetch ROBs
+      ATH_MSG_DEBUG("Preloading ROBs: " << idsToString(robs));
+      m_robDataProviderSvc->addROBData(input.eventContext, robs, name()+"-ADD");
+    }
+    if (instr.type == ReqType::GET || instr.type == ReqType::ADDGET) {
+      // Retrieve ROBs
+      ATH_MSG_DEBUG("Retrieving ROBs: " << idsToString(robs));
+      // VROBFRAG is a typedef for std::vector<const eformat::ROBFragment<const uint32_t*>*>
+      IROBDataProviderSvc::VROBFRAG robFragments;
+      m_robDataProviderSvc->getROBData(input.eventContext, robs, robFragments, name()+"-GET");
+      ATH_MSG_DEBUG("Number of ROBs retrieved: " << robFragments.size());
+      if (!robFragments.empty())
+        ATH_MSG_DEBUG("List of ROBs found: " << std::endl << format(robFragments));
+    }
+    if (instr.type == ReqType::COL) {
+      // Event building
+      ATH_MSG_DEBUG("Requesting full event ROBs");
+      int nrobs = m_robDataProviderSvc->collectCompleteEventData(input.eventContext, name()+"-COL");
+      ATH_MSG_DEBUG("Number of ROBs retrieved: " << nrobs);
+    }
+    if (instr.type == ReqType::INVALID) {
+      ATH_MSG_ERROR("Invalid ROB request instruction " << instr.toString());
+      return StatusCode::FAILURE;
     }
 
     // Sleep between ROB requests
@@ -290,6 +286,7 @@ MTCalibPebHypoTool::ROBRequestInstruction::ROBRequestInstruction(std::string_vie
 #endif
   if (str.find(":ADD:")!=std::string_view::npos) type = ROBRequestInstruction::ADD;
   else if (str.find(":GET:")!=std::string_view::npos) type = ROBRequestInstruction::GET;
+  else if (str.find(":ADDGET:")!=std::string_view::npos) type = ROBRequestInstruction::ADDGET;
   else if (str.find(":COL:")!=std::string_view::npos) type = ROBRequestInstruction::COL;
   if (size_t pos=str.find(":RND"); pos!=std::string_view::npos) {
     size_t firstDigit=pos+4;
@@ -307,6 +304,7 @@ const std::string MTCalibPebHypoTool::ROBRequestInstruction::toString() const {
   if (type==INVALID) s+="INVALID";
   else if (type==ADD) s+="ADD";
   else if (type==GET) s+="GET";
+  else if (type==ADDGET) s+="ADDGET";
   else if (type==COL) s+="COL";
   s += ", isRandom=";
   s += isRandom ? "true" : "false";
diff --git a/HLT/Trigger/TrigControl/TrigExamples/TrigExPartialEB/src/MTCalibPebHypoTool.h b/HLT/Trigger/TrigControl/TrigExamples/TrigExPartialEB/src/MTCalibPebHypoTool.h
index a4e13f068bb75a06ce2919aaa9a10646563418a7..58bad04d0e515216b0948781258b1c58a1fa6d75 100644
--- a/HLT/Trigger/TrigControl/TrigExamples/TrigExPartialEB/src/MTCalibPebHypoTool.h
+++ b/HLT/Trigger/TrigControl/TrigExamples/TrigExPartialEB/src/MTCalibPebHypoTool.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 TRIGEXPARTIALEB_MTCALIBPEBHYPOTOOL_H
@@ -52,7 +52,7 @@ private:
     /// String form for debug print-outs
     const std::string toString() const;
     /// Type of instruction
-    enum Type {INVALID, ADD, GET, COL} type = INVALID;
+    enum Type {INVALID, ADD, GET, ADDGET, COL} type = INVALID;
     /// Flag switching requests of a random sub-sample of the ROB list
     bool isRandom = false;
     /// Size of random request
@@ -83,11 +83,11 @@ private:
   Gaudi::Property<std::map<std::string,std::vector<uint32_t> > > m_robAccessDictProp {
     this, "ROBAccessDict", {},
     "Dictionary of prefetch/retrieve operations with given ROB IDs. The value is a vector of ROB IDs. "
-    "The string key has to contain :ADD: (prefetch), :GET: (retrieve), or :COL: (full event building). :ADD: and :GET: "
-    "may be also appended with :RNDX: where X is an integer. In this case, random X ROBs will be prefetched/retrieved "
-    "from the provided list, e.g. :GET:RND10: retrieves 10 random ROBs from the list. Otherwise the full list is used. "
-    "Note std::map is sorted by std::less<std::string>, so starting the key with a number may be needed to enforce "
-    "ordering, e.g. '01 :ADD:RND10:'."
+    "The string key has to contain :ADD: (prefetch), :GET: (retrieve), :ADDGET: (prefetch+retrieve) or :COL: (full "
+    "event building). :ADD:, :GET: and :ADDGET: may be also appended with :RNDX: where X is an integer. In this case, "
+    "random X ROBs will be prefetched/retrieved from the provided list, e.g. :GET:RND10: retrieves 10 random ROBs from "
+    "the list. Otherwise the full list is used. Note std::map is sorted by std::less<std::string>, so starting the key "
+    "with a number may be needed to enforce ordering, e.g. '01 :ADD:RND10:'."
   };
   Gaudi::Property<unsigned int> m_timeBetweenRobReqMillisec {
     this, "TimeBetweenROBReqMillisec", 0,
diff --git a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/share/AdditionalVertexing.py b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/share/AdditionalVertexing.py
index 556676f766fd8537b2c24a97f96be1a0c70640d4..e7d9c378280d7621f10ca0c9f85deb649df9fc7f 100644
--- a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/share/AdditionalVertexing.py
+++ b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/share/AdditionalVertexing.py
@@ -196,13 +196,9 @@ def GeneralVertexer(system='Combined', setup=None,tracksName=None, suffix=""):
             InDetPriVxFinderTool_vx.maxChi2PerTrack = 15.
     
     elif vxSetup == 'AdaptiveFinding':
+        #
         # --- load adaptive primary vertex finder
         #
-        # from InDetPriVxFinderTool.InDetPriVxFinderToolConf import InDet__InDetAdaptivePriVxFinderTool
-        # InDetPriVxFinderTool_Si = InDet__InDetAdaptivePriVxFinderTool(name             = "InDetAdaptivePriVxFinderTool_Si",
-        #                                                              VertexFitterTool = InDetVxFitterTool,
-        #                                                              TrackSelector    = InDetTrackSelectorTool_Si
-        #                                                              )
         
         from InDetPriVxFinderTool.InDetPriVxFinderToolConf import InDet__InDetIterativePriVxFinderTool
         InDetPriVxFinderTool_vx = InDet__InDetIterativePriVxFinderTool(name             = "InDetIterativePriVxFinderTool_"+system+"_"+vxSetup+suffix,
diff --git a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/share/AdditionalVertexing_old.py b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/share/AdditionalVertexing_old.py
index fbc4b41a2b6abae7658b31fb8f639749ed80f7b2..a3a1034ee2844786e5eaeb5088ca9db6cf04163c 100644
--- a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/share/AdditionalVertexing_old.py
+++ b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/share/AdditionalVertexing_old.py
@@ -80,13 +80,9 @@ if (not (InDetFlags.primaryVertexSetup() == 'AdaptiveFinding') and
       InDetPriVxFinderTool_Pix.maxChi2PerTrack = 15.
     
 elif InDetFlags.primaryVertexSetup() == 'AdaptiveFinding':
+    #
     # --- load adaptive primary vertex finder
     #
-    #from InDetPriVxFinderTool.InDetPriVxFinderToolConf import InDet__InDetAdaptivePriVxFinderTool
-    #InDetPriVxFinderTool_Si = InDet__InDetAdaptivePriVxFinderTool(name             = "InDetAdaptivePriVxFinderTool_Si",
-    #                                                              VertexFitterTool = InDetVxFitterTool,
-    #                                                              TrackSelector    = InDetTrackSelectorTool_Si
-    #                                                              )
 
     from InDetPriVxFinderTool.InDetPriVxFinderToolConf import InDet__InDetIterativePriVxFinderTool
     InDetPriVxFinderTool_Pix = InDet__InDetIterativePriVxFinderTool(name             = "InDetIterativePriVxFinderTool_Pix",
diff --git a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..eed4ad1258efaf3086c04465e527ece85975f5f4
--- /dev/null
+++ b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+InnerDetector/InDetConditions/PixelConditionsData
diff --git a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelClusterOnTrackErrorData.h b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelClusterOnTrackErrorData.h
index f40cef7ad2d89f039e99bc704ddca7a3b04a519b..bc9ba56fc70e9e554285e91626edf9009b9d3677 100644
--- a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelClusterOnTrackErrorData.h
+++ b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelClusterOnTrackErrorData.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
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -44,24 +44,24 @@ class PixelClusterOnTrackErrorData {
 
 
     // get parametrizations
-    const std::vector<float> getClusterSizeBinsX(){return m_csx;}
-    const std::vector<float> getClusterSizeBinsY(){return m_csy;}
-    const std::vector<float> getEtaBins(){return m_etaref;}
-    const std::vector<float> getIncidenceAngleBins(){return m_phibins;}
+    const std::vector<float> getClusterSizeBinsX() const {return m_csx;}
+    const std::vector<float> getClusterSizeBinsY() const {return m_csy;}
+    const std::vector<float> getEtaBins() const {return m_etaref;}
+    const std::vector<float> getIncidenceAngleBins() const {return m_phibins;}
     // IBL
-    const std::vector<float> getEtaIBLBins(){return m_ibletaref;}
-    const std::vector<float> getIncidenceAngleIBLBins(){return m_iblphibins;}
+    const std::vector<float> getEtaIBLBins() const {return m_ibletaref;}
+    const std::vector<float> getIncidenceAngleIBLBins() const {return m_iblphibins;}
 
 
     // old parametrization (analytical formula)
-    double getPixelBarrelPhiError(double ang, int phiClusterSize); 
+    double getPixelBarrelPhiError(double ang, int phiClusterSize) const; 
 
     // new parametrization (read from DB)
-    float getPixelBarrelEtaError(int ibin);
-    float getPixelBarrelPhiError(int ibin);
+    float getPixelBarrelEtaError(int ibin) const;
+    float getPixelBarrelPhiError(int ibin) const;
     // IBL
-    float getPixelIBLEtaError(int ibin);
-    float getPixelIBLPhiError(int ibin);
+    float getPixelIBLEtaError(int ibin) const;
+    float getPixelIBLPhiError(int ibin) const;
 
     void setParameters(const int ncsx, const int ncsy, const int neta, const int nalpha, 
                        int offset, std::vector<float> constants);
@@ -76,13 +76,13 @@ class PixelClusterOnTrackErrorData {
       m_ibletaerror[ibin] = error; }
 
 
-    int getBarrelBinPhi(double angle, int phiClusterSize);
+    int getBarrelBinPhi(double angle, int phiClusterSize) const;
 
     int getBarrelBinEta(double eta, int etaClusterSize, 
-		      int phiClusterSize);
+		      int phiClusterSize) const;
     // IBL
-    int getIBLBinPhi(double angle, int phiClusterSize);
-    int getIBLBinEta(double eta, int etaClusterSize);
+    int getIBLBinPhi(double angle, int phiClusterSize) const;
+    int getIBLBinEta(double eta, int etaClusterSize) const;
 
     // save constants on text file
     void Print(std::string file) const;
diff --git a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelOfflineCalibData.h b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelOfflineCalibData.h
index f6b9af934b565325c1740c3eb1b2ddfc0acd433a..c77c29d0da40c60a520912942a87d110784377ea 100644
--- a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelOfflineCalibData.h
+++ b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelOfflineCalibData.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
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -51,9 +51,12 @@ class PixelOfflineCalibData{
   int size() const;
   
   // get the pointer to pixel cluster error data
-  PixelClusterErrorData* getPixelClusterErrorData() const; 
-  PixelChargeInterpolationParameters* getPixelChargeInterpolationParameters() const; 
-  PixelClusterOnTrackErrorData* getPixelClusterOnTrackErrorData() const;
+  PixelClusterErrorData* getPixelClusterErrorData();
+  PixelChargeInterpolationParameters* getPixelChargeInterpolationParameters();
+  PixelClusterOnTrackErrorData* getPixelClusterOnTrackErrorData();
+  const PixelClusterErrorData* getPixelClusterErrorData() const; 
+  const PixelChargeInterpolationParameters* getPixelChargeInterpolationParameters() const; 
+  const PixelClusterOnTrackErrorData* getPixelClusterOnTrackErrorData() const;
 
   // Get/Set the numerical constants 
   int GetNumberOfConstants() const;
@@ -109,15 +112,28 @@ inline bool PixelOfflineCalibData::update(const PixelClusterOnTrackErrorData& id
   return true;
 }
 
-inline PixelClusterErrorData* PixelOfflineCalibData::getPixelClusterErrorData() const {
+inline PixelClusterErrorData* PixelOfflineCalibData::getPixelClusterErrorData() {
   return m_clustererrordata;
 }
 
-inline PixelChargeInterpolationParameters* PixelOfflineCalibData::getPixelChargeInterpolationParameters() const {
+inline PixelChargeInterpolationParameters* PixelOfflineCalibData::getPixelChargeInterpolationParameters() {
   return m_chargeinterpolationparameters;
 }
 
 inline PixelClusterOnTrackErrorData* 
+    PixelOfflineCalibData::getPixelClusterOnTrackErrorData() {
+  return m_clusterontrackerrordata;
+}
+
+inline const PixelClusterErrorData* PixelOfflineCalibData::getPixelClusterErrorData() const {
+  return m_clustererrordata;
+}
+
+inline const PixelChargeInterpolationParameters* PixelOfflineCalibData::getPixelChargeInterpolationParameters() const {
+  return m_chargeinterpolationparameters;
+}
+
+inline const PixelClusterOnTrackErrorData* 
     PixelOfflineCalibData::getPixelClusterOnTrackErrorData() const {
   return m_clusterontrackerrordata;
 }
diff --git a/InnerDetector/InDetConditions/PixelConditionsData/src/PixelClusterOnTrackErrorData.cxx b/InnerDetector/InDetConditions/PixelConditionsData/src/PixelClusterOnTrackErrorData.cxx
index 569e6aa6886c4f554429addb84c65a7111e9327d..83f75b2a922268743aa272929479c2d14b946764 100644
--- a/InnerDetector/InDetConditions/PixelConditionsData/src/PixelClusterOnTrackErrorData.cxx
+++ b/InnerDetector/InDetConditions/PixelConditionsData/src/PixelClusterOnTrackErrorData.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 "PixelConditionsData/PixelClusterOnTrackErrorData.h"
@@ -124,7 +124,7 @@ int PixelClusterOnTrackErrorData::getNumberOfEtaIBLBins() const{
 }
 
 double PixelClusterOnTrackErrorData::getPixelBarrelPhiError(double ang, 
-                                                    int deltax){ 
+                                                    int deltax) const { 
    double errphi=50*CLHEP::micrometer/pow(12,0.5);
    // error on phi coordinate
     if(deltax == 1){
@@ -159,39 +159,35 @@ double PixelClusterOnTrackErrorData::getPixelBarrelPhiError(double ang,
     return errphi; 
 }
 
-float PixelClusterOnTrackErrorData::getPixelBarrelEtaError(int ibin){
+float PixelClusterOnTrackErrorData::getPixelBarrelEtaError(int ibin) const {
   if(ibin < 0) return -1;
   if(static_cast<unsigned int>(ibin) >= m_barreletaerror.size()) return -2;
   return m_barreletaerror[ibin];
 }
 
-float PixelClusterOnTrackErrorData::getPixelBarrelPhiError(int ibin){
+float PixelClusterOnTrackErrorData::getPixelBarrelPhiError(int ibin) const {
   if(ibin < 0){ return -1; }
   if(static_cast<unsigned int>(ibin) >= m_barrelphierror.size()){ return -2;}
   return m_barrelphierror[ibin];
 }
 
-float PixelClusterOnTrackErrorData::getPixelIBLEtaError(int ibin){
+float PixelClusterOnTrackErrorData::getPixelIBLEtaError(int ibin) const {
     if(ibin < 0||m_version>-2) return -1;
     if(static_cast<unsigned int>(ibin) >= m_ibletaerror.size()) return -2;
     return m_ibletaerror[ibin];
 }
 
-float PixelClusterOnTrackErrorData::getPixelIBLPhiError(int ibin){
+float PixelClusterOnTrackErrorData::getPixelIBLPhiError(int ibin) const {
     if(ibin < 0||m_version>-2){ return -1; }
     if(static_cast<unsigned int>(ibin) >= m_iblphierror.size()){ return -2;}
     return m_iblphierror[ibin];
 }
 
 int PixelClusterOnTrackErrorData::getBarrelBinPhi(double angle, 
-                                   int phiClusterSize){
+                                   int phiClusterSize) const {
 
   int iang =0;
   int nang = m_phibins.size();
-  if(nang == 0) {
-    Initialize();
-    nang = m_phibins.size();
-  }
   for(int i=0; i<nang; i++){  
     if(angle > m_phibins[i]) iang=i;  
   } 
@@ -205,14 +201,10 @@ int PixelClusterOnTrackErrorData::getBarrelBinPhi(double angle,
 }
 
 int PixelClusterOnTrackErrorData::getBarrelBinEta(double eta, int etaClusterSize, 
-    int phiClusterSize){
+    int phiClusterSize) const {
 
   int ieta=0;
   int neta = m_etaref.size();
-  if(neta == 0) {
-    Initialize();
-    neta = m_etaref.size();
-  }
   for(int i=0; i<neta; i++){  
     if(eta>m_etaref[i]) ieta=i;  
   } 
@@ -232,7 +224,7 @@ int PixelClusterOnTrackErrorData::getBarrelBinEta(double eta, int etaClusterSize
 }
 
 int PixelClusterOnTrackErrorData::getIBLBinPhi(double angle,
-						    int phiClusterSize){
+						    int phiClusterSize) const {
     if(m_version>-2) return -1;
     int iang =0;
     int nang = m_iblphibins.size();
@@ -246,7 +238,7 @@ int PixelClusterOnTrackErrorData::getIBLBinPhi(double angle,
     return m_csxbinsibl*iang+iphi;
 }
 
-int PixelClusterOnTrackErrorData::getIBLBinEta(double eta, int etaClusterSize){
+int PixelClusterOnTrackErrorData::getIBLBinEta(double eta, int etaClusterSize) const {
 
     if(m_version>-2) return -1;
     int ieta=0;
diff --git a/InnerDetector/InDetConditions/PixelConditionsData/src/SpecialPixelMap.cxx b/InnerDetector/InDetConditions/PixelConditionsData/src/SpecialPixelMap.cxx
index 51aa639ac91ea41d5946cdc47427a4129d9df7b8..c8296aaf9b983076b485f3921ca1142173730a2e 100755
--- a/InnerDetector/InDetConditions/PixelConditionsData/src/SpecialPixelMap.cxx
+++ b/InnerDetector/InDetConditions/PixelConditionsData/src/SpecialPixelMap.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 "PixelConditionsData/SpecialPixelMap.h"
@@ -20,7 +20,7 @@
 
 //***** DetectorSpecialPixelMap *****//
 const int nmtype(5);
-static unsigned int columnsPerFEIX[5]={18,80,132,80,132}; // number of columns per FEI3, 4, 50, 51, 52 
+static const unsigned int columnsPerFEIX[5]={18,80,132,80,132}; // number of columns per FEI3, 4, 50, 51, 52 
 //static unsigned int rowsPerFEIX[5]={164, 336, 672, 339, 678}; // number of rows per FEI3, 4, 50, 51, 52
 //static unsigned int rowsRdoPerFEIX[5]={160, 336, 672, 336, 672}; // number of rows readout per FEI3, 4, 50, 51, 52
 
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadoutTool.cxx b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadoutTool.cxx
index 0ee1f02af526f36bec2da99f7810ed06472ac144..f9842458af648f9ad2b071926eaac0347066aef4 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadoutTool.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadoutTool.cxx
@@ -21,7 +21,9 @@ SCT_ReadoutTool::SCT_ReadoutTool(const std::string& type, const std::string& nam
 StatusCode SCT_ReadoutTool::initialize() {
   ATH_MSG_DEBUG("Initialize SCT_ReadoutTool");
   // Retrieve cabling
-  ATH_CHECK(m_cablingTool.retrieve());
+  if (!m_cablingTool.empty()) {
+    ATH_CHECK(m_cablingTool.retrieve());
+  }
   // Retrieve SCT helper
   ATH_CHECK(detStore()->retrieve(m_sctId, "SCT_ID"));
   // Get MessageSvc for SCT_ReadoutData
diff --git a/InnerDetector/InDetConditions/TRT_ConditionsData/TRT_ConditionsData/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetConditions/TRT_ConditionsData/TRT_ConditionsData/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..3c71a096029e524f8aaf60682992976ce3d4b8a0
--- /dev/null
+++ b/InnerDetector/InDetConditions/TRT_ConditionsData/TRT_ConditionsData/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+InnerDetector/InDetConditions/TRT_ConditionsData
diff --git a/InnerDetector/InDetConditions/TRT_ConditionsData/TRT_ConditionsData/ExpandedIdentifier.h b/InnerDetector/InDetConditions/TRT_ConditionsData/TRT_ConditionsData/ExpandedIdentifier.h
index a4c66f6fb999ed9c4a0ee6ad8523972366a20a15..59e9aa01f8c6ae4806dc4db5b274ca56124a190b 100755
--- a/InnerDetector/InDetConditions/TRT_ConditionsData/TRT_ConditionsData/ExpandedIdentifier.h
+++ b/InnerDetector/InDetConditions/TRT_ConditionsData/TRT_ConditionsData/ExpandedIdentifier.h
@@ -1,11 +1,12 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef TRTConditionsData_TRTCondIdentifier_h
 #define TRTConditionsData_TRTCondIdentifier_h
 
 #include <iostream>
+#include <string>
 
 namespace TRTCond
 {
@@ -63,8 +64,8 @@ namespace TRTCond
     size_t level() const { return m_level ; }
     
     /** returns level name */
-    static const char* name(size_t l) { 
-      static const char* names[] = {"detector","barrelec","layer_or_wheel","module","straw_layer","straw"} ;
+    const std::string name(size_t l) const { 
+      static const std::string names[] = {"detector","barrelec","layer_or_wheel","module","straw_layer","straw"} ;
       return names[l] ;
     }
     
diff --git a/InnerDetector/InDetConditions/TRT_ConditionsData/TRT_ConditionsData/HWMap.h b/InnerDetector/InDetConditions/TRT_ConditionsData/TRT_ConditionsData/HWMap.h
index e35a7ceb070f0800bf315c24595ffcca1ac31378..b53778d1b15fb87d03a665ae769511c23d062336 100644
--- a/InnerDetector/InDetConditions/TRT_ConditionsData/TRT_ConditionsData/HWMap.h
+++ b/InnerDetector/InDetConditions/TRT_ConditionsData/TRT_ConditionsData/HWMap.h
@@ -26,12 +26,12 @@ namespace TRTCond{
 
   virtual ~HWMap() {}
 
-  std::vector<std::string>* get_Barrel_HV_Names() const {return m_Barrel_HV_CoolChanNames; } 
-  std::vector<std::string>* get_EndcapA_HV_Names() const {return m_EndcapA_HV_CoolChanNames; } 
-  std::vector<std::string>* get_EndcapC_HV_Names() const {return m_EndcapC_HV_CoolChanNames; } 
-  std::vector<int>* get_Barrel_HV_Nums() const {return m_Barrel_HV_CoolChanNums; }
-  std::vector<int>* get_EndcapA_HV_Nums() const {return m_EndcapA_HV_CoolChanNums; }
-  std::vector<int>* get_EndcapC_HV_Nums() const {return m_EndcapC_HV_CoolChanNums; }
+  const std::vector<std::string>* get_Barrel_HV_Names() const {return m_Barrel_HV_CoolChanNames; } 
+  const std::vector<std::string>* get_EndcapA_HV_Names() const {return m_EndcapA_HV_CoolChanNames; } 
+  const std::vector<std::string>* get_EndcapC_HV_Names() const {return m_EndcapC_HV_CoolChanNames; } 
+  const std::vector<int>* get_Barrel_HV_Nums() const {return m_Barrel_HV_CoolChanNums; }
+  const std::vector<int>* get_EndcapA_HV_Nums() const {return m_EndcapA_HV_CoolChanNums; }
+  const std::vector<int>* get_EndcapC_HV_Nums() const {return m_EndcapC_HV_CoolChanNums; }
  
   void setBarrelName(int i, const std::string & name) {
     m_Barrel_HV_CoolChanNames->at(i)=name;
diff --git a/InnerDetector/InDetConditions/TRT_ConditionsData/TRT_ConditionsData/NestedContainer.h b/InnerDetector/InDetConditions/TRT_ConditionsData/TRT_ConditionsData/NestedContainer.h
index 559102e201601d8df1e0b93108e2370dcc87f380..cdca38a253dc4d3b2b0fd5c8486a9dfd1d6f741d 100755
--- a/InnerDetector/InDetConditions/TRT_ConditionsData/TRT_ConditionsData/NestedContainer.h
+++ b/InnerDetector/InDetConditions/TRT_ConditionsData/TRT_ConditionsData/NestedContainer.h
@@ -333,7 +333,8 @@ namespace TRTCond
     }
     void print() const {
       printindent() ;
-      std::cout << "level = " << ExpandedIdentifier::name(NestingLevel) << " (" << NestingLevel << ")"  << std::endl ;
+      ExpandedIdentifier id;
+      std::cout << "level = " << id.name(NestingLevel) << " (" << NestingLevel << ")"  << std::endl ;
       for(unsigned int i=0; i< m_daughters.size(); ++i) {
 	printindent() ;
 	std::cout << "daughter " << i << std::endl ;
diff --git a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..679fd77dbe7b03b1e6794438a788e23408c834e8
--- /dev/null
+++ b/InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+InnerDetector/InDetDetDescr/PixelReadoutGeometry
diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/python/TestSCT_CablingCfg.py b/InnerDetector/InDetDetDescr/SCT_Cabling/python/TestSCT_CablingCfg.py
index d6ddb08d6f9d52b36ac315fcadeda21b273f0cb8..79c28131ebd0fa7fe60da5cb0bb7f95cd4eaf6ff 100644
--- a/InnerDetector/InDetDetDescr/SCT_Cabling/python/TestSCT_CablingCfg.py
+++ b/InnerDetector/InDetDetDescr/SCT_Cabling/python/TestSCT_CablingCfg.py
@@ -17,8 +17,7 @@ def SCT_TestCablingAlgCfg(configFlags):
     cfg.merge(geoCfg)
 
     from AthenaCommon.Constants import INFO
-    from AthenaCommon.CfgGetter import getPrivateTool
-    SCT_CablingTool = getPrivateTool("SCT_CablingTool")
+    SCT_CablingTool = CompFactory.SCT_CablingTool()
     SCT_CablingTool.DataSource = "COOLVECTOR"
     SCT_CablingTool.OutputLevel = INFO
 
diff --git a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..a7dad220e72f384af312288075078d3585768935
--- /dev/null
+++ b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+InnerDetector/InDetDetDescr/SCT_ReadoutGeometry
diff --git a/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/TRT_ReadoutGeometry/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/TRT_ReadoutGeometry/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..e600f0fc551954f13f3706e245a5901775827644
--- /dev/null
+++ b/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/TRT_ReadoutGeometry/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+InnerDetector/InDetDetDescr/TRT_ReadoutGeometry
diff --git a/InnerDetector/InDetDetDescrCnv/InDetIdCnv/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetDetDescrCnv/InDetIdCnv/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..882243e2cd9bcae3aedc14320b0eb85847f1f6ec
--- /dev/null
+++ b/InnerDetector/InDetDetDescrCnv/InDetIdCnv/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+InnerDetector/InDetDetDescrCnv/InDetIdCnv
diff --git a/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/PixelIDDetDescrCnv.cxx b/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/PixelIDDetDescrCnv.cxx
index 0937c86e3f730ae5d9e06b48a3791b79adf6a0e9..f3add41451da418bac8cf05f9b36c796960589a3 100644
--- a/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/PixelIDDetDescrCnv.cxx
+++ b/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/PixelIDDetDescrCnv.cxx
@@ -121,7 +121,7 @@ PixelIDDetDescrCnv::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/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/SCT_IDDetDescrCnv.cxx b/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/SCT_IDDetDescrCnv.cxx
index 800757616629e0a944b5fa7a05e56d00db8c9acd..7f49d1839237992daf2cad76530e7f0c2eb73bda 100644
--- a/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/SCT_IDDetDescrCnv.cxx
+++ b/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/SCT_IDDetDescrCnv.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
 */
 
 /***************************************************************************
@@ -122,7 +122,7 @@ SCT_IDDetDescrCnv::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/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/SiliconIDDetDescrCnv.cxx b/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/SiliconIDDetDescrCnv.cxx
index f7a9302786f8fa83d99d433e29658c02fb7dc8b7..8655441e63528e2adf558157d0f4c4fe801c4c6f 100644
--- a/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/SiliconIDDetDescrCnv.cxx
+++ b/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/SiliconIDDetDescrCnv.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
 */
 
 /***************************************************************************
@@ -124,7 +124,7 @@ SiliconIDDetDescrCnv::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/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/TRT_IDDetDescrCnv.cxx b/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/TRT_IDDetDescrCnv.cxx
index 8804f39781c8557bde44e2382d16b60b17f1c2fa..6477047a37044944fea13963af3e5e73fcd15ba1 100644
--- a/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/TRT_IDDetDescrCnv.cxx
+++ b/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/TRT_IDDetDescrCnv.cxx
@@ -122,7 +122,7 @@ TRT_IDDetDescrCnv::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/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..4301ca91b9879a99e6091b3942079818eeef7987
--- /dev/null
+++ b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+InnerDetector/InDetDigitization/FastSiDigitization
diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/PixelFastDigitizationTool.h b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/PixelFastDigitizationTool.h
index d96b8a98dc7f8b98c139721b764ee853b0e7fb5e..63214264860233f719517491322be27c97e0bf2f 100644
--- a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/PixelFastDigitizationTool.h
+++ b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/PixelFastDigitizationTool.h
@@ -122,8 +122,6 @@ private:
   bool                                  m_pixEmulateSurfaceCharge;  //!< emulate the surface charge
   double                                m_pixSmearPathLength;       //!< the 2. model parameter: smear the path
   bool                                  m_pixSmearLandau;           //!< if true : landau else: gauss
-  mutable int                           m_siDeltaPhiCut;
-  mutable int                           m_siDeltaEtaCut;
   double                                m_pixMinimalPathCut;        //!< the 1. model parameter: minimal 3D path in pixel
   double                                m_pixPathLengthTotConv;     //!< from path length to tot
   bool                                  m_pixModuleDistortion;       //!< simulationn of module bowing
diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SiSmearedDigitizationTool.h b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SiSmearedDigitizationTool.h
index de8b59c63c5b850c9c50e8d0565a08a6813df629..995d8006de5524049b6736af17bc32be525cd56e 100644
--- a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SiSmearedDigitizationTool.h
+++ b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SiSmearedDigitizationTool.h
@@ -127,8 +127,8 @@ public:
   CLHEP::HepRandomEngine*           m_randomEngine;
   std::string                m_randomEngineName;         //!< Name of the random number stream
 
-  mutable float m_pitch_X;
-  mutable float m_pitch_Y;
+  float m_pitch_X;
+  float m_pitch_Y;
 
   bool m_merge;
   double m_nSigma;
@@ -215,7 +215,7 @@ public:
   double           m_Err_y_SCT;
 
   ServiceHandle<Trk::ITrackingGeometrySvc>     m_trackingGeometrySvc;        //!< Service handle for retrieving the TrackingGeometry
-  mutable const Trk::TrackingGeometry*              m_trackingGeometry;           //!< The TrackingGeometry to be retrieved
+  const Trk::TrackingGeometry*              m_trackingGeometry;           //!< The TrackingGeometry to be retrieved
   std::string                                  m_trackingGeometryName;       //!< The Name of the TrackingGeometry
 
   bool m_useCustomGeometry;
diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/src/PixelFastDigitizationTool.cxx b/InnerDetector/InDetDigitization/FastSiDigitization/src/PixelFastDigitizationTool.cxx
index 972379c352bdd24ed8b1ebc3b95c7f90790cd9ac..108651dbdb1e38d6ff4eed2895b686094d3c1cbb 100644
--- a/InnerDetector/InDetDigitization/FastSiDigitization/src/PixelFastDigitizationTool.cxx
+++ b/InnerDetector/InDetDigitization/FastSiDigitization/src/PixelFastDigitizationTool.cxx
@@ -93,8 +93,6 @@ PixelFastDigitizationTool::PixelFastDigitizationTool(const std::string &type, co
   m_pixEmulateSurfaceCharge(true),
   m_pixSmearPathLength(0.01),
   m_pixSmearLandau(true),
-  m_siDeltaPhiCut(0),
-  m_siDeltaEtaCut(0),
   m_pixMinimalPathCut(0.06),// Optimized choice of threshold (old 0.02)
   m_pixPathLengthTotConv(125.),
   m_pixModuleDistortion(true), // default: false
diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/src/SCT_FastDigitization.cxx b/InnerDetector/InDetDigitization/FastSiDigitization/src/SCT_FastDigitization.cxx
index b63d9133c93803d95596b734db35d847060a4c5d..8c2c0bf60bd44c9afc23857153ea1d5976c74eda 100644
--- a/InnerDetector/InDetDigitization/FastSiDigitization/src/SCT_FastDigitization.cxx
+++ b/InnerDetector/InDetDigitization/FastSiDigitization/src/SCT_FastDigitization.cxx
@@ -11,7 +11,6 @@
 SCT_FastDigitization::SCT_FastDigitization(const std::string &name, ISvcLocator *pSvcLocator) :
     AthAlgorithm(name, pSvcLocator)
 {
-  declareProperty("DigitizationTool", m_digTool, "AthAlgTool which performs the SCT digitization");
 }
 
 //----------------------------------------------------------------------
diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx b/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx
index c2de5e1952742b9bf873f4ba6ee9b7bc939cc3be..703d09ab7ac6086611cdddecaa1d93dfc4c34e99 100644
--- a/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx
+++ b/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx
@@ -1448,9 +1448,9 @@ StatusCode SiSmearedDigitizationTool::digitize(const EventContext& ctx)
 
         if (!m_useCustomGeometry) {
           // Pixel Design needed -------------------------------------------------------------
-          InDetDD::SCT_ModuleSideDesign* design_sct;
+          const InDetDD::SCT_ModuleSideDesign* design_sct;
 
-          design_sct = (InDetDD::SCT_ModuleSideDesign*)&hitSiDetElement->design();
+          design_sct = dynamic_cast<const InDetDD::SCT_ModuleSideDesign*>(&hitSiDetElement->design());
 
           if (!design_sct) {
             ATH_MSG_INFO ( "Could not get design"<< design_sct) ;
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTDecode.py b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTDecode.py
index 9547557cb61ae1dc9b3593864c387bf64864216f..cd5a176d56a08beca4d1ea1c0c5a4d5d3ff11c30 100644
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTDecode.py
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTDecode.py
@@ -124,6 +124,7 @@ InDetClusterMakerTool = InDet__ClusterMakerTool(name = "InDetClusterMakerTool",
                                                 PixelCablingSvc = None,
                                                 PixelModuleData = "",
                                                 PixelChargeCalibCondData = "",
+                                                PixelOfflineCalibData = '',
                                                 PixelLorentzAngleTool = None,
                                                 SCTLorentzAngleTool = sctLorentzAngleToolSetup.SCTLorentzAngleTool)
 # SCT conditions setups
diff --git a/InnerDetector/InDetG4/TRT_G4_SD/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetG4/TRT_G4_SD/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..72be774972ffba17ee4d3636b8c29e48d0e316fc
--- /dev/null
+++ b/InnerDetector/InDetG4/TRT_G4_SD/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+InnerDetector/InDetG4/TRT_G4_SD
diff --git a/InnerDetector/InDetG4/TRT_G4_SD/src/TRTPrintingOfHits.h b/InnerDetector/InDetG4/TRT_G4_SD/src/TRTPrintingOfHits.h
index ab6c44a22c31096ce24cb92ceba1951e05c03370..02c6169617e23501062d5a2846d12d31b16d9694 100644
--- a/InnerDetector/InDetG4/TRT_G4_SD/src/TRTPrintingOfHits.h
+++ b/InnerDetector/InDetG4/TRT_G4_SD/src/TRTPrintingOfHits.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 TRT_G4_SD_TRTPrintingOfHits_hh
@@ -7,6 +7,8 @@
 
 #include "AthenaKernel/MsgStreamMember.h"
 
+#include "CxxUtils/checker_macros.h"
+
 class TRTUncompressedHit;
 class TRTOutputFile;
 
@@ -29,7 +31,7 @@ class TRTPrintingOfHits
 
     TRTOutputFile* m_pOutputFile;
 
-    mutable Athena::MsgStreamMember m_msg;
+    mutable Athena::MsgStreamMember m_msg ATLAS_THREAD_SAFE;
 
 };
 
diff --git a/InnerDetector/InDetG4/TRT_G4_SD/src/TRTProcessingOfBarrelHits.cxx b/InnerDetector/InDetG4/TRT_G4_SD/src/TRTProcessingOfBarrelHits.cxx
index dfaaef0e73dc570b2ad1a84776160409a270a152..73d3b085de0d49fab56496427cfd64e6b0b107c4 100644
--- a/InnerDetector/InDetG4/TRT_G4_SD/src/TRTProcessingOfBarrelHits.cxx
+++ b/InnerDetector/InDetG4/TRT_G4_SD/src/TRTProcessingOfBarrelHits.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
 */
 
 // Class header
@@ -144,8 +144,8 @@ bool TRTProcessingOfBarrelHits::ProcessHit(G4Step* pStep)
   G4ThreeVector globalPostStepPoint = pPostStepPoint->GetPosition();
 
 
-  G4TouchableHistory* pTouchableHistory =
-    (G4TouchableHistory*) pPreStepPoint->GetTouchable();
+  const G4TouchableHistory* pTouchableHistory =
+    dynamic_cast<const G4TouchableHistory*>(pPreStepPoint->GetTouchable());
 
   const G4AffineTransform& topTransform = pTouchableHistory->GetHistory()->
     GetTopTransform();
diff --git a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..e6868d0b898300bfb3303a6310c0a6af5347d04b
--- /dev/null
+++ b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual
diff --git a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/GetDetectorLocalFrames.h b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/GetDetectorLocalFrames.h
index a3fddfa19ea6244fd48c1cd8f9eb280cf345bbbe..7d9cd541ab7cee2980119d5173ba1aaa4e3c2dc5 100644
--- a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/GetDetectorLocalFrames.h
+++ b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/GetDetectorLocalFrames.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
 */
 
 /** 
@@ -71,7 +71,7 @@ class GetDetectorLocalFrames:public AthAlgorithm {
     const TRT_ID *m_TRTHelper;
     const InDetDD::TRT_DetectorManager *m_TRTDetectorManager;
     
-    
-    
+    /** Counter */
+    int m_eventCount{-1};
     
 };
diff --git a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/GetDetectorPositions.h b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/GetDetectorPositions.h
index cd9711d54f901d98e34c003a0781102fe547702d..bdf0ce1264ae206505a92d327594a86bd0bf65aa 100644
--- a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/GetDetectorPositions.h
+++ b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/GetDetectorPositions.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
 */
 
 /** 
@@ -71,7 +71,7 @@ class GetDetectorPositions:public AthAlgorithm {
     const TRT_ID *m_TRTHelper;
     const InDetDD::TRT_DetectorManager *m_TRTDetectorManager;
     
-    
-    
+    /** Counter */
+    int m_eventCount{-1};
     
 };
diff --git a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorLocalFrames.cxx b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorLocalFrames.cxx
index 6062ff84e2a06baa234082a5fd1c23d6a0396c51..9e59af2253e874972924d5350209d46aad1de250 100644
--- a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorLocalFrames.cxx
+++ b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorLocalFrames.cxx
@@ -91,10 +91,10 @@ StatusCode GetDetectorLocalFrames::execute() {
   if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "execute() check global position" << endmsg;
   
     StatusCode sc = StatusCode::SUCCESS;
-    static int eventCount(-1); eventCount++;
+    m_eventCount++;
     
     /** run only for one event */
-    if (eventCount!=0) 
+    if (m_eventCount!=0) 
       return sc; 
     
     std::cout << "========================================================================================" <<std::endl;
diff --git a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorPositions.cxx b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorPositions.cxx
index b87ca822eee7bef8d6f4bd6f539bc01113753419..0a59e59857f850f93943682eede477e9a62a3e42 100644
--- a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorPositions.cxx
+++ b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorPositions.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
 */
 
 /** 
@@ -101,10 +101,10 @@ StatusCode GetDetectorPositions::execute() {
   if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "execute() check global position" << endmsg;
   
   //StatusCode sc = StatusCode::SUCCESS;
-    static int eventCount(-1); eventCount++;
+  m_eventCount++;
     
     /** run only for one event */
-    if (eventCount!=0) 
+    if (m_eventCount!=0) 
       return StatusCode::SUCCESS; 
     
     std::cout << "========================================================================================" <<std::endl;
diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/InDetGlobalMonitoringRun3Test/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/InDetGlobalMonitoringRun3Test/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..a826341212b8aac524a3432c0b2b264f56e218e0
--- /dev/null
+++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/InDetGlobalMonitoringRun3Test/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetMonitoring/PixelMonitoring/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..682942c9a6b85ec50ae4889442df677551e3fa19
--- /dev/null
+++ b/InnerDetector/InDetMonitoring/PixelMonitoring/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+InnerDetector/InDetMonitoring/PixelMonitoring
diff --git a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/TRTMonitoringRun3/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/TRTMonitoringRun3/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..7f595a2ceff7eb505ae42e23ab8594b99ba3ac62
--- /dev/null
+++ b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/TRTMonitoringRun3/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+InnerDetector/InDetMonitoring/TRTMonitoringRun3
diff --git a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/TRTMonitoringRun3/TRTMonitoringRun3ESD_Alg.h b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/TRTMonitoringRun3/TRTMonitoringRun3ESD_Alg.h
index 2d262b435df7fb1a9f920530390d4b0e80cc686c..75479033532b46249f48f799e4eaeaa25857535c 100644
--- a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/TRTMonitoringRun3/TRTMonitoringRun3ESD_Alg.h
+++ b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/TRTMonitoringRun3/TRTMonitoringRun3ESD_Alg.h
@@ -65,7 +65,7 @@ public:
     virtual StatusCode initialize() override;
     virtual StatusCode fillHistograms( const EventContext& ctx ) const override;
 private:
-    bool m_ArgonXenonSplitter;
+    BooleanProperty m_ArgonXenonSplitter{this, "doArgonXenonSeparation", true};
     enum GasType{ Xe = 0, Ar = 1, Kr = 2 };
 
     const AtlasDetectorID * m_idHelper;
diff --git a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/TRTMonitoringRun3/TRTMonitoringRun3RAW_Alg.h b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/TRTMonitoringRun3/TRTMonitoringRun3RAW_Alg.h
index f16252aa690b27fbb425956374a3b465ffae2e5b..022fe8908b4aa438063e7f8da063a15fbbec5774 100644
--- a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/TRTMonitoringRun3/TRTMonitoringRun3RAW_Alg.h
+++ b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/TRTMonitoringRun3/TRTMonitoringRun3RAW_Alg.h
@@ -78,7 +78,7 @@ private:
     bool m_doHitsMon;
     float m_DistToStraw;
     
-    bool m_ArgonXenonSplitter;
+    BooleanProperty m_ArgonXenonSplitter{this, "doArgonXenonSeparation", true};
     
     int m_totalEvents;
     float m_longToTCut;
diff --git a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/src/TRTMonitoringRun3ESD_Alg.cxx b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/src/TRTMonitoringRun3ESD_Alg.cxx
index efb53011b17c92cb32bb680cc40f48fa33e2aa46..fa2b8a9121fe7f34005f38e1f3048b986f50329a 100644
--- a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/src/TRTMonitoringRun3ESD_Alg.cxx
+++ b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/src/TRTMonitoringRun3ESD_Alg.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 "TRTMonitoringRun3/TRTMonitoringRun3ESD_Alg.h"
@@ -1115,7 +1115,6 @@ for (; p_trk != trackCollection.end(); ++p_trk) {
 }
 
 
-int maxtimestamp = 0.;
 //----------------------------------------------------------------------------------//
 StatusCode TRTMonitoringRun3ESD_Alg::fillTRTHighThreshold(const xAOD::TrackParticleContainer& trackCollection,
                                                      const xAOD::EventInfo& eventInfo) const {
@@ -1131,12 +1130,6 @@ StatusCode TRTMonitoringRun3ESD_Alg::fillTRTHighThreshold(const xAOD::TrackParti
     const Trk::Perigee *perigee = NULL;
     const DataVector<const Trk::TrackParameters> *AllTrkPar(0);
     DataVector<const Trk::TrackParameters>::const_iterator p_trkpariter;
-    int timeStamp;
-    timeStamp = eventInfo.timeStamp();
-
-    if (timeStamp > maxtimestamp) {
-        maxtimestamp = timeStamp;
-    }
 
     int runNumber;
     runNumber = eventInfo.runNumber();
diff --git a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/SiTrackerSpacePointFinder.h b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/SiTrackerSpacePointFinder.h
index 88a38ac85da89705881cbb02d2f95d644d3deaa8..5b08e6df375b14470f06f07c6991f7582b985604 100755
--- a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/SiTrackerSpacePointFinder.h
+++ b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/SiTrackerSpacePointFinder.h
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef SiSpacePointFormation_SI_POINT_FINDER_H
@@ -151,8 +151,6 @@ namespace InDet {
     SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
     /// To get SCT neighbours
     SG::ReadCondHandleKey<InDet::SiElementPropertiesTable> m_SCTPropertiesKey{this, "SCTPropertiesKey", "SCT_ElementPropertiesTable", "Key of input SiElementPropertiesTable for SCT"};
-    /// For Pixel alignment
-    SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_pixelDetEleCollKey{this, "PixelDetEleCollKey", "PixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel"};
     /// For SCT alignment
     SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
     //@}
diff --git a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiTrackerSpacePointFinder.cxx b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiTrackerSpacePointFinder.cxx
index 882c26a2835d96863cb384878a3013f9dea42f9d..0409f5acca3962696bfa95a631f92e627ef54d42 100755
--- a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiTrackerSpacePointFinder.cxx
+++ b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiTrackerSpacePointFinder.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
 */
 
 /***************************************************************************
@@ -94,7 +94,6 @@ StatusCode SiTrackerSpacePointFinder::initialize()
   // create containers (requires the Identifier Helpers)
   if (m_selectPixels){
     ATH_CHECK(detStore()->retrieve(m_idHelperPixel,"PixelID"));
-    ATH_CHECK(m_pixelDetEleCollKey.initialize());
   }
 
   if (m_selectSCTs) {
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetAdaptiveMultiPriVxFinderTool.h b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetAdaptiveMultiPriVxFinderTool.h
index 4b210fd05f60a9c0a932d48d32beb363692c0f81..054694ac30d3923283c6474fbb89e12ad0ad1394 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetAdaptiveMultiPriVxFinderTool.h
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetAdaptiveMultiPriVxFinderTool.h
@@ -83,28 +83,31 @@
 #define INDETPRIVXFINDERTOOL_INDETADAPTIVEMULTIPRIVXFINDERTOOL_H
 
 #include "AthenaBaseComps/AthAlgTool.h"
-#include "CxxUtils/checker_macros.h"
-#include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
-#include "InDetRecToolInterfaces/IVertexFinder.h"
+#include "GaudiKernel/EventContext.h"
 #include "TrkParameters/TrackParameters.h"
 #include "TrkParticleBase/TrackParticleBaseCollection.h"
 #include "TrkTrack/TrackCollection.h" // type def ...
-#include <utility>
+
+#include "BeamSpotConditionsData/BeamSpotData.h"
+#include "InDetRecToolInterfaces/IVertexFinder.h"
+#include "TrkVertexFitters/AdaptiveMultiVertexFitter.h"
+#include "InDetTrackSelectionTool/IInDetTrackSelectionTool.h"
+#include "TrkVertexFitterInterfaces/IVertexAnalyticSeedFinder.h"
+#include "TrkVertexFitterInterfaces/ITrackToVertexIPEstimator.h"
 /**
  * Forward declarations
  */
-#include "BeamSpotConditionsData/BeamSpotData.h"
-#include "TrkVertexFitterInterfaces/ITrackToVertexIPEstimator.h"
 #include "xAODTracking/TrackParticleContainerFwd.h"
 #include "xAODTracking/TrackParticleFwd.h"
 #include "xAODTracking/VertexContainerFwd.h"
 #include "xAODTracking/VertexFwd.h"
+
+#include <utility>
+
 class TrackToVtxLinkContainer;
 
 namespace Trk {
-class IVertexAnalyticSeedFinder;
-class AdaptiveMultiVertexFitter;
 class Track;
 class ITrackLink;
 class TrkQuality;
@@ -112,7 +115,6 @@ class IVxCandidateXAODVertex;
 }
 
 namespace InDet {
-class IInDetTrackSelectionTool;
 
 class InDetAdaptiveMultiPriVxFinderTool
   : public AthAlgTool
@@ -123,7 +125,8 @@ public:
   InDetAdaptiveMultiPriVxFinderTool(const std::string& t,
                                     const std::string& n,
                                     const IInterface* p);
-  virtual ~InDetAdaptiveMultiPriVxFinderTool();
+
+  virtual ~InDetAdaptiveMultiPriVxFinderTool() = default;
 
   virtual StatusCode initialize() override;
 
@@ -140,23 +143,51 @@ public:
   using IVertexFinder::findVertex;
 
   virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  findVertex(const TrackCollection* trackTES) const override;
+  findVertex(const EventContext& ctx,
+             const TrackCollection* trackTES) const override;
 
   virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  findVertex(const xAOD::TrackParticleContainer* trackParticles) const override;
+  findVertex(const EventContext& ctx,
+             const xAOD::TrackParticleContainer* trackParticles) const override;
 
   virtual StatusCode finalize() override;
 
 private:
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
+    const EventContext& ctx,
     const std::vector<const Trk::ITrackLink*>& trackVector) const;
 
   void SGError(const std::string& errService);
-  virtual void printParameterSettings();
+  void printParameterSettings();
+ 
+  ToolHandle<Trk::AdaptiveMultiVertexFitter> m_MultiVertexFitter{
+    this,
+    "VertexFitterTool",
+    "Trk::AdaptiveMultiVertexFitter",
+    "Multi Vertex Fitter"
+  };
+  ToolHandle<Trk::IVertexAnalyticSeedFinder> m_analyticSeedFinder{
+    this,
+    "SeedFinder",
+    "Trk::TrackDensitySeedFinder",
+    " Seed Finder"
+  };
+  ToolHandle<InDet::IInDetTrackSelectionTool> m_trkFilter{
+    this,
+    "TrackSelector",
+    "InDet::InDetTrackSelection",
+    "Track Selection Tool"
+  };
 
-  ToolHandle<Trk::AdaptiveMultiVertexFitter> m_MultiVertexFitter;
-  ToolHandle<Trk::IVertexAnalyticSeedFinder> m_analyticSeedFinder;
-  ToolHandle<InDet::IInDetTrackSelectionTool> m_trkFilter;
+  /*
+   * Impact parameter estimator used to calculate significance
+   */
+  ToolHandle<Trk::ITrackToVertexIPEstimator> m_ipEstimator{
+    this,
+    "IPEstimator",
+    "Trk::TrackToVertexIPEstimator",
+    "IP estimator"
+  };
 
   SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey{
     this,
@@ -257,13 +288,6 @@ private:
 
   double m_minweight;
 
-  /*
-   * Impact parameter estimator used to calculate significance
-   */
-  ToolHandle<Trk::ITrackToVertexIPEstimator> m_ipEstimator{
-    "Trk::TrackToVertexIPEstimator"
-  };
-
   /*
    * Maximum amount of iterations allowed for vertex finding.
    *
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetAdaptivePriVxFinderTool.h b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetAdaptivePriVxFinderTool.h
deleted file mode 100755
index 3284422e7b3c2e1ba59daaf70c922597f4f90b3e..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/InDetPriVxFinderTool/InDetAdaptivePriVxFinderTool.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
- *
- * @class InDet::InDetAdaptivePriVxFinderTool
- *
- * @author Giacinto Piacquadio (Freiburg University)
- *
- *
- * This class provides an implementation for a primary
- * vertex finding tool, which uses the Adaptive Vertex
- * Fitter to reject outliers not belonging to the primary
- * vertex interaction.
- *
- * The steps done are simply;
- * - Tracks are selected according to the specified cuts
- * - The Adaptive Vertex Finder is used to fit them
- *
- * Contrary to the InDetPriVxFinderTool, the outlier
- * rejection is done by the fitter and not by the finder.
- *
- * One only vertex can be fit, so it is not suited (as a
- * finder) when many minimum bias vertices can be expected.
- * In this case please use the <i>InDetPriVxFinderTool</i>.
- *
- *
- * (this is a modified verson of InDetPriVxFinderTool.h of A. Wildauer & F.
- *Akesson) changes : 06/12/2006   Kirill.Prokofiev@cern.ch EDM cleanup and
- *switching to the FitQuality use
- *
- *      2016-04-26   David Shope <david.richard.shope@cern.ch>
- *      EDM Migration to xAOD - from Trk::VxCandidate to xAOD::Vertex
- *
- *        findVertex will now always return an xAOD::VertexContainer,
- *        even when using a TrackCollection or a TrackParticleBaseCollection
- *        as input.
- *
- ***************************************************************************/
-
-// implemented using as template the InDetPriVxFinderTool class of A. Wildauer
-// and F. Akesson
-
-#ifndef INDETPRIVXFINDERTOOL_INDETADAPTIVEPRIVXFINDERTOOL_H
-#define INDETPRIVXFINDERTOOL_INDETADAPTIVEPRIVXFINDERTOOL_H
-
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "GaudiKernel/ServiceHandle.h"
-#include "GaudiKernel/ToolHandle.h"
-#include "InDetRecToolInterfaces/IVertexFinder.h"
-#include "TrkParameters/TrackParameters.h"
-#include "TrkParticleBase/TrackParticleBaseCollection.h" // type def ...
-#include "TrkTrack/TrackCollection.h"                    // type def ...
-/**
- * Forward declarations
- */
-
-#include "BeamSpotConditionsData/BeamSpotData.h"
-#include "xAODTracking/TrackParticleContainerFwd.h"
-#include "xAODTracking/TrackParticleFwd.h"
-#include "xAODTracking/VertexContainerFwd.h"
-#include "xAODTracking/VertexFwd.h"
-
-namespace Trk {
-class IVertexFitter;
-class Track;
-class TrackParticleBase;
-class IVxCandidateXAODVertex;
-}
-
-namespace InDet {
-class IInDetTrackSelectionTool;
-
-class InDetAdaptivePriVxFinderTool
-  : public AthAlgTool
-  , virtual public IVertexFinder
-{
-
-public:
-  /**
-   * Constructor
-   */
-
-  InDetAdaptivePriVxFinderTool(const std::string& t,
-                               const std::string& n,
-                               const IInterface* p);
-
-  /**
-   * Destructor
-   */
-
-  virtual ~InDetAdaptivePriVxFinderTool();
-
-  virtual StatusCode initialize() override;
-
-  /**
-   * Finding method.
-   * Has as input a track collection and as output
-   * a VxContainer.
-   */
-
-  using IVertexFinder::findVertex;
-
-  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
-    const TrackCollection* trackTES) const override;
- 
-  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
-    const xAOD::TrackParticleContainer* trackParticles) const override;
-
-  virtual StatusCode finalize() override;
-
-private:
-  /** the common finding code (regardless of Track or TrackParticle(Base) is
-   * here */
-  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
-    std::vector<const Trk::TrackParameters*>& origParameters) const;
-
-  ToolHandle<Trk::IVertexFitter> m_iVertexFitter;
-  ToolHandle<InDet::IInDetTrackSelectionTool> m_trkFilter;
-
-  SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey{
-    this,
-    "BeamSpotKey",
-    "BeamSpotData",
-    "SG key for beam spot"
-  };
-
-  void SGError(const std::string& errService);
-
-  /**
-   * Internal method to print the parameters setting
-   */
-
-  virtual void printParameterSettings();
-
-}; // end of class definitions
-} // end of namespace definitions
-#endif
-
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptiveMultiPriVxFinderTool.cxx b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptiveMultiPriVxFinderTool.cxx
index baab3314d2cd8b98af40233983f19cb2c91c3382..5701911d59a10ed1c35a92fe7bef6ba4e85656cc 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptiveMultiPriVxFinderTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptiveMultiPriVxFinderTool.cxx
@@ -21,27 +21,20 @@
                           (trial working point for high luminosities)
 
 ***************************************************************************/
+#include "InDetPriVxFinderTool/InDetAdaptiveMultiPriVxFinderTool.h"
 #include "VxVertex/RecVertex.h"
 #include "VxVertex/Vertex.h"
-#include "InDetPriVxFinderTool/InDetAdaptiveMultiPriVxFinderTool.h"
 #include "TrkTrack/Track.h"
 #include "TrkParameters/TrackParameters.h"
-#include <map>
-#include <vector>
-
 #include "EventPrimitives/EventPrimitives.h"
 #include "EventPrimitives/EventPrimitivesHelpers.h"
 #include "GeoPrimitives/GeoPrimitives.h"
 
-#include "InDetTrackSelectionTool/IInDetTrackSelectionTool.h"
-
 #include "VxMultiVertex/MvfFitInfo.h"
 #include "VxMultiVertex/MVFVxTrackAtVertex.h"
 #include "VxMultiVertex/TrackToVtxLink.h"
 #include "AthContainers/DataVector.h"
 #include "TrkEventPrimitives/ParamDefs.h"
-#include "TrkVertexFitters/AdaptiveMultiVertexFitter.h"
-#include "TrkVertexFitterInterfaces/IVertexAnalyticSeedFinder.h"
 #include "TrkTrack/LinkToTrack.h"
 #include "TrkLinks/LinkToXAODTrackParticle.h"
 
@@ -53,66 +46,60 @@
 #include "xAODTracking/TrackParticleAuxContainer.h"
 
 #include <cmath>
+#include <map>
+#include <vector>
 
 namespace InDet
 {
-  InDetAdaptiveMultiPriVxFinderTool::InDetAdaptiveMultiPriVxFinderTool(const std::string& t, const std::string& n,
-                                                                       const IInterface* p)
-    : AthAlgTool(t, n, p),
-    m_MultiVertexFitter("Trk::AdaptiveMultiVertexFitter"),
-    m_analyticSeedFinder("Trk::TrackDensitySeedFinder"),
-    m_trkFilter("InDet::InDetTrackSelection"),
-    m_useBeamConstraint(true),
-    m_TracksMaxZinterval(1.),
-    m_maxVertexChi2(18.42),
-    m_realMultiVertex(true),
-    m_useFastCompatibility(true),
-    m_selectiontype(0),
-    m_finalCutMaxVertexChi2(18.42),
-    m_cutVertexDependence(3.),
-    m_minweight(0.0001),
-    m_maxIterations(100),
-    m_addSingleTrackVertices(false),
-    m_do3dSplitting(false),
-    m_zBfieldApprox(0.60407),
-    m_maximumVertexContamination(0.5),
-    m_tracksMaxSignificance(5.),
-    m_useSeedConstraint(true)
-  {
-    declareInterface<IVertexFinder>(this);//by GP: changed from InDetMultiAdaptivePriVxFinderTool to IPriVxFinderTool
-    /* Retrieve StoreGate container and tool names from job options */
-    declareProperty("SeedFinder", m_analyticSeedFinder);
-    declareProperty("VertexFitterTool", m_MultiVertexFitter);
-    declareProperty("TrackSelector", m_trkFilter);
-
-    //finder options
-    declareProperty("TracksMaxZinterval", m_TracksMaxZinterval);
-    declareProperty("maxVertexChi2", m_maxVertexChi2);
-    declareProperty("finalCutMaxVertexChi2", m_finalCutMaxVertexChi2);
-    declareProperty("cutVertexDependence", m_cutVertexDependence);
-    declareProperty("MinWeight", m_minweight);
-    declareProperty("realMultiVertex", m_realMultiVertex);
-    declareProperty("useFastCompatibility", m_useFastCompatibility);
-    declareProperty("useBeamConstraint", m_useBeamConstraint);
-    declareProperty("addSingleTrackVertices", m_addSingleTrackVertices);
-    declareProperty("tracksMaxSignificance",m_tracksMaxSignificance);
-    declareProperty("m_useSeedConstraint",m_useSeedConstraint);
-    //********* signal vertex selection (for pile up) ****
-    declareProperty("selectiontype", m_selectiontype);
-    //==0 for sum p_t^2
-    //==1 for NN
-    //==2 for min bias compatibility estimation (in the future)
-    declareProperty("maxIterations", m_maxIterations);
-    declareProperty("do3dSplitting", m_do3dSplitting);
-    declareProperty("zBfieldApprox", m_zBfieldApprox);
-    declareProperty("maximumVertexContamination", m_maximumVertexContamination);
-    declareProperty( "IPEstimator", m_ipEstimator );
+InDetAdaptiveMultiPriVxFinderTool::InDetAdaptiveMultiPriVxFinderTool(
+  const std::string& t,
+  const std::string& n,
+  const IInterface* p)
+  : AthAlgTool(t, n, p)
+  , m_useBeamConstraint(true)
+  , m_TracksMaxZinterval(1.)
+  , m_maxVertexChi2(18.42)
+  , m_realMultiVertex(true)
+  , m_useFastCompatibility(true)
+  , m_selectiontype(0)
+  , m_finalCutMaxVertexChi2(18.42)
+  , m_cutVertexDependence(3.)
+  , m_minweight(0.0001)
+  , m_maxIterations(100)
+  , m_addSingleTrackVertices(false)
+  , m_do3dSplitting(false)
+  , m_zBfieldApprox(0.60407)
+  , m_maximumVertexContamination(0.5)
+  , m_tracksMaxSignificance(5.)
+  , m_useSeedConstraint(true)
+{
+  declareInterface<IVertexFinder>(
+    this); // by GP: changed from InDetMultiAdaptivePriVxFinderTool to
+           // IPriVxFinderTool
+  // finder options
+  declareProperty("TracksMaxZinterval", m_TracksMaxZinterval);
+  declareProperty("maxVertexChi2", m_maxVertexChi2);
+  declareProperty("finalCutMaxVertexChi2", m_finalCutMaxVertexChi2);
+  declareProperty("cutVertexDependence", m_cutVertexDependence);
+  declareProperty("MinWeight", m_minweight);
+  declareProperty("realMultiVertex", m_realMultiVertex);
+  declareProperty("useFastCompatibility", m_useFastCompatibility);
+  declareProperty("useBeamConstraint", m_useBeamConstraint);
+  declareProperty("addSingleTrackVertices", m_addSingleTrackVertices);
+  declareProperty("tracksMaxSignificance", m_tracksMaxSignificance);
+  declareProperty("m_useSeedConstraint", m_useSeedConstraint);
+  //********* signal vertex selection (for pile up) ****
+  declareProperty("selectiontype", m_selectiontype);
+  //==0 for sum p_t^2
+  //==1 for NN
+  //==2 for min bias compatibility estimation (in the future)
+  declareProperty("maxIterations", m_maxIterations);
+  declareProperty("do3dSplitting", m_do3dSplitting);
+  declareProperty("zBfieldApprox", m_zBfieldApprox);
+  declareProperty("maximumVertexContamination", m_maximumVertexContamination);
 
   }
 
-  InDetAdaptiveMultiPriVxFinderTool::~InDetAdaptiveMultiPriVxFinderTool()
-  {}
-
   StatusCode
   InDetAdaptiveMultiPriVxFinderTool::initialize() {
     /* Get the right vertex fitting tool */
@@ -146,8 +133,12 @@ namespace InDet
   } //anonymous namespace
 
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  InDetAdaptiveMultiPriVxFinderTool::findVertex(const TrackCollection* trackTES) const{
-    SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
+  InDetAdaptiveMultiPriVxFinderTool::findVertex(
+    const EventContext& ctx,
+    const TrackCollection* trackTES) const
+  {
+    SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle{ m_beamSpotKey,
+                                                            ctx };
     const Trk::RecVertex &beamposition(beamSpotHandle->beamVtx());
 
     std::vector<const Trk::ITrackLink*> selectedTracks;
@@ -174,7 +165,8 @@ namespace InDet
     ATH_MSG_DEBUG("Of " << trackTES->size() << " tracks "
                         << selectedTracks.size() << " survived the preselection.");
 
-    std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> returnContainers = findVertex(selectedTracks);
+    std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+      returnContainers = findVertex(ctx, selectedTracks);
 
     std::vector<const Trk::ITrackLink*>::iterator ibegin = selectedTracks.begin();
     std::vector<const Trk::ITrackLink*>::iterator iend = selectedTracks.end();
@@ -189,11 +181,14 @@ namespace InDet
     return returnContainers;
   }
 
-
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  InDetAdaptiveMultiPriVxFinderTool::findVertex(const xAOD::TrackParticleContainer* trackParticles) const {
+  InDetAdaptiveMultiPriVxFinderTool::findVertex(
+    const EventContext& ctx,
+    const xAOD::TrackParticleContainer* trackParticles) const
+  {
     std::vector<const Trk::ITrackLink*> selectedTracks;
-    SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
+    SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle{ m_beamSpotKey,
+                                                            ctx };
     xAOD::Vertex beamposition;
     beamposition.makePrivateStore();
     beamposition.setPosition(beamSpotHandle->beamVtx().position());
@@ -227,7 +222,8 @@ namespace InDet
     ATH_MSG_DEBUG(
       "Of " << trackParticles->size() << " tracks " << selectedTracks.size() << " survived the preselection.");
 
-    std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> returnContainers = findVertex(selectedTracks);
+    std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
+      returnContainers = findVertex(ctx, selectedTracks);
 
     std::vector<const Trk::ITrackLink*>::iterator ibegin = selectedTracks.begin();
     std::vector<const Trk::ITrackLink*>::iterator iend = selectedTracks.end();
@@ -244,13 +240,17 @@ namespace InDet
   }
 
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  InDetAdaptiveMultiPriVxFinderTool::findVertex(const std::vector<const Trk::ITrackLink*>& trackVector) const {
-    // TODO: put this in a better place
+  InDetAdaptiveMultiPriVxFinderTool::findVertex(
+    const EventContext& ctx,
+    const std::vector<const Trk::ITrackLink*>& trackVector) const
+  {
     // Prepare objects holding the decoration of xAOD::Vertex with MVF auxdata
     // For optimization of access speed
-    xAOD::Vertex::Decorator< Trk::MvfFitInfo* > MvfFitInfo("MvfFitInfo");
-    xAOD::Vertex::Decorator< bool > isInitialized("isInitialized");
-    xAOD::Vertex::Decorator< std::vector< Trk::VxTrackAtVertex* > > VTAV("VTAV");
+    static const xAOD::Vertex::Decorator<Trk::MvfFitInfo*> MvfFitInfo(
+      "MvfFitInfo");
+    static const xAOD::Vertex::Decorator<bool> isInitialized("isInitialized");
+    static const xAOD::Vertex::Decorator<std::vector<Trk::VxTrackAtVertex*>>
+      VTAV("VTAV");
 
     if (m_selectiontype == 1) {
       ATH_MSG_WARNING("Only Selection Type 0 supported for MT");
@@ -271,19 +271,15 @@ namespace InDet
 
     Amg::Vector3D actualVertex;
 
-
     std::map<const Trk::ITrackLink*, Trk::TrackToVtxLink*> TrackLinkOf;
-
     //create a map between ITrackLink* and TrackToVtxLink*
     std::vector<const Trk::ITrackLink*>::const_iterator trkbegin = origTracks.begin();
     std::vector<const Trk::ITrackLink*>::const_iterator trkend = origTracks.end();
 
 
     for (std::vector<const Trk::ITrackLink*>::const_iterator trkiter = trkbegin; trkiter != trkend; ++trkiter) {
-      Trk::TrackToVtxLink* newTrkToVtxLink(new Trk::TrackToVtxLink(new std::vector<xAOD::Vertex*>)); // makePrivateStore()
-                                                                                                     // is called for
-                                                                                                     // each vertex to
-                                                                                                     // add in iteration
+      Trk::TrackToVtxLink* newTrkToVtxLink(new Trk::TrackToVtxLink(new std::vector<xAOD::Vertex*>));
+      // makePrivateStore() is called for each vertex to add in iteration
       TrackLinkOf[*trkiter] = newTrkToVtxLink;
       myTrackToVtxLinks.push_back(newTrkToVtxLink);
     }
@@ -292,7 +288,8 @@ namespace InDet
     //prepare iterators for tracks only necessary for seeding
     std::vector<const Trk::ITrackLink*>::iterator seedtrkbegin = seedTracks.begin();
     std::vector<const Trk::ITrackLink*>::iterator seedtrkend = seedTracks.end();
-    SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
+    SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle{ m_beamSpotKey,
+                                                            ctx };
     int iteration = 0;
 
   int nNoCompatibleTracks(0);
@@ -358,8 +355,9 @@ namespace InDet
       //new xAOD::Vertex with this
       xAOD::Vertex* actualcandidate = new xAOD::Vertex;
       actualcandidate->makePrivateStore();
-      actualcandidate->setVertexType(xAOD::VxType::NotSpecified); // to mimic the initialization present in the old EDM                                                          // constructor
-      // now add decorations!
+      actualcandidate->setVertexType(xAOD::VxType::NotSpecified);
+      // to mimic the initialization present in the old EDM
+      // constructor now add decorations!
       MvfFitInfo(*actualcandidate) = new Trk::MvfFitInfo(constraintVertex,
                                                          new Amg::Vector3D(actualVertex),
                                                          new Amg::Vector3D(actualVertex));
@@ -411,9 +409,12 @@ namespace InDet
           actualVertex = Amg::Vector3D(0., 0., newz);
           actualcandidate = new xAOD::Vertex();
           actualcandidate->makePrivateStore();
-          actualcandidate->setVertexType(xAOD::VxType::NotSpecified); // to mimic the initialization present in the old
-                                                                      // EDM constructor
-          // TODO: Think about where everything is deleted! Does Trk::MvfFitInfo destructor and do MVFVxTrackAtVertex
+          actualcandidate->setVertexType(xAOD::VxType::NotSpecified);
+          // to mimic the initialization present in the old
+          // EDM constructor
+
+          // TODO: Think about where everything is deleted! Does Trk::MvfFitInfo
+          // destructor and do MVFVxTrackAtVertex
           // destructors get called when actualcandidate gets deleted?
           // now add decorations!
           MvfFitInfo(*actualcandidate) = new Trk::MvfFitInfo(new xAOD::Vertex(*constraintVertex),
@@ -623,7 +624,6 @@ namespace InDet
         }
       }
 
-
       ///////////////
       //now break the cycle if you didn't diminish the number of seeds...
       ATH_MSG_DEBUG("Remaining seeds: " << seedTracks.size() << " previous round " << seedtracknumber);
@@ -731,27 +731,34 @@ namespace InDet
   ATH_MSG_DEBUG("Vertices deleted for contamination cut: " << nContamintationCut);
   ATH_MSG_DEBUG("Vertices deleted for proximity to previous: " << nWithin3sigma);
 
-    ATH_MSG_DEBUG("Primary vertex finding complete with " << iteration <<
-                  " iterations and " << myxAODVertices.size() << " vertices found.");
-
-    //correction of a bug: you can estimate the probability of being
-    //the primary interaction vertex only after the whole multivertexfit
-    //is finished!!! (the first is influenced by the fit of the second and so
-    //on...)
-    std::vector<xAODVertex_pair>::iterator vtxBegin = myxAODVertices.begin();
-    std::vector<xAODVertex_pair>::iterator vtxEnd = myxAODVertices.end();
-    // To make sure that the right tracks are in the std::vector<Trk::VxTrackAtVertex> of each vertex - up until now,
-    // they are kept in the VTAV decoration
-    for (std::vector<xAODVertex_pair>::iterator vtxIter = vtxBegin; vtxIter != vtxEnd; ++vtxIter) {
-      xAOD::Vertex* cand = vtxIter->second;
-      std::vector<Trk::VxTrackAtVertex>* tracksOfVertex = &(cand->vxTrackAtVertex());
-      tracksOfVertex->clear();
-      std::vector<Trk::VxTrackAtVertex*>::iterator MVFtrkBegin = VTAV(*cand).begin();
-      std::vector<Trk::VxTrackAtVertex*>::iterator MVFtrkEnd = VTAV(*cand).end();
-      for (std::vector<Trk::VxTrackAtVertex*>::iterator MVFtrkIter = MVFtrkBegin; MVFtrkIter != MVFtrkEnd;
-           ++MVFtrkIter) {
-        tracksOfVertex->push_back(**MVFtrkIter);
-      }
+  ATH_MSG_DEBUG("Primary vertex finding complete with "
+                << iteration << " iterations and " << myxAODVertices.size()
+                << " vertices found.");
+
+  // correction of a bug: you can estimate the probability of being
+  // the primary interaction vertex only after the whole multivertexfit
+  // is finished!!! (the first is influenced by the fit of the second and so
+  // on...)
+  std::vector<xAODVertex_pair>::iterator vtxBegin = myxAODVertices.begin();
+  std::vector<xAODVertex_pair>::iterator vtxEnd = myxAODVertices.end();
+  // To make sure that the right tracks are in the
+  // std::vector<Trk::VxTrackAtVertex> of each vertex - up until now, they are
+  // kept in the VTAV decoration
+  for (std::vector<xAODVertex_pair>::iterator vtxIter = vtxBegin;
+       vtxIter != vtxEnd;
+       ++vtxIter) {
+    xAOD::Vertex* cand = vtxIter->second;
+    std::vector<Trk::VxTrackAtVertex>* tracksOfVertex =
+      &(cand->vxTrackAtVertex());
+    tracksOfVertex->clear();
+    std::vector<Trk::VxTrackAtVertex*>::iterator MVFtrkBegin =
+      VTAV(*cand).begin();
+    std::vector<Trk::VxTrackAtVertex*>::iterator MVFtrkEnd = VTAV(*cand).end();
+    for (std::vector<Trk::VxTrackAtVertex*>::iterator MVFtrkIter = MVFtrkBegin;
+         MVFtrkIter != MVFtrkEnd;
+         ++MVFtrkIter) {
+      tracksOfVertex->push_back(**MVFtrkIter);
+    }
     }
     //before filling the container, you have to decide what is your most probable signal vertex
     for (std::vector<xAODVertex_pair>::iterator vtxIter = vtxBegin; vtxIter != vtxEnd; ++vtxIter) {
@@ -876,7 +883,8 @@ namespace InDet
     // TODO: put this in a better place
     // Prepare objects holding the decoration of xAOD::Vertex with MVF auxdata
     // For optimization of access speed
-    xAOD::Vertex::Decorator< std::vector<Trk::VxTrackAtVertex*> > VTAV("VTAV");
+    static const xAOD::Vertex::Decorator<std::vector<Trk::VxTrackAtVertex*>>
+      VTAV("VTAV");
 
     std::vector<Trk::VxTrackAtVertex*>::iterator begintracks = VTAV(*mycand).begin();
     std::vector<Trk::VxTrackAtVertex*>::iterator endtracks = VTAV(*mycand).end();
@@ -998,7 +1006,8 @@ namespace InDet
     {  
       if ( ipas->sigmad0 > 0 && ipas->sigmaz0 > 0)
       {
-  significance = std::sqrt( std::pow(ipas->IPd0/ipas->sigmad0,2) + std::pow(ipas->IPz0/ipas->sigmaz0,2) );
+        significance = std::sqrt(std::pow(ipas->IPd0 / ipas->sigmad0, 2) +
+                                 std::pow(ipas->IPz0 / ipas->sigmaz0, 2));
       }
       delete ipas;
     }
@@ -1010,8 +1019,8 @@ namespace InDet
     if (candidate == nullptr) return;
 
     // decorators
-    xAOD::Vertex::Decorator< Trk::MvfFitInfo* > MvfFitInfo("MvfFitInfo");
-    xAOD::Vertex::Decorator< std::vector< Trk::VxTrackAtVertex* > > VTAV("VTAV");
+    static const xAOD::Vertex::Decorator< Trk::MvfFitInfo* > MvfFitInfo("MvfFitInfo");
+    static const xAOD::Vertex::Decorator< std::vector< Trk::VxTrackAtVertex* > > VTAV("VTAV");
 
     if (VTAV.isAvailable(*candidate)) {
       for (auto tav : VTAV(*candidate)) {
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptivePriVxFinderTool.cxx b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptivePriVxFinderTool.cxx
deleted file mode 100755
index 0a6b08589c31be28d413e599a22102e5ba128237..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptivePriVxFinderTool.cxx
+++ /dev/null
@@ -1,364 +0,0 @@
-/*
-   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
- */
-
-/***************************************************************************
-                         InDetAdaptivePriVxFinderTool.cxx  -  Description
-                             -------------------
-    begin   : 28-01-2004
-    authors : Giacinto Piacquadio (Freiburg Univ),
-              this is a modified version of the primary vertex finder of Andreas Wildauer (CERN PH-ATC), Fredrik Akesson
-                (CERN PH-ATC)
-    changes :
-          06/12/2006   Kirill.Prokofiev@cern.ch
-          EDM cleanup and switching to the FitQuality use
-
-              2016-04-26   David Shope <david.richard.shope@cern.ch>
-              EDM Migration to xAOD - from Trk::VxCandidate to xAOD::Vertex
-
-                findVertex will now always return an xAOD::VertexContainer,
-                even when using a TrackCollection or a TrackParticleBaseCollection
-                as input.
-
-***************************************************************************/
-#include "InDetPriVxFinderTool/InDetAdaptivePriVxFinderTool.h"
-#include "TrkTrack/Track.h"
-#include "TrkEventPrimitives/FitQuality.h"
-#include "TrkTrackSummary/TrackSummary.h"
-#include "TrkParticleBase/TrackParticleBase.h"
-#include "TrkParameters/TrackParameters.h"
-#include <map>
-#include <vector>
-#include <utility>
-#include "EventPrimitives/EventPrimitives.h"
-#include "EventPrimitives/EventPrimitivesHelpers.h"
-#include "GeoPrimitives/GeoPrimitives.h"
-
-#include "InDetTrackSelectionTool/IInDetTrackSelectionTool.h"
-
-//#include "VxVertex/VxContainer.h"
-#include "VxVertex/RecVertex.h"
-#include "VxVertex/VxTrackAtVertex.h"
-#include "AthContainers/DataVector.h"
-#include "TrkEventPrimitives/ParamDefs.h"
-#include "TrkVertexFitterInterfaces/IVertexFitter.h"
-
-#include "TrkTrackLink/ITrackLink.h"
-#include "TrkTrack/LinkToTrack.h"
-#include "TrkLinks/LinkToXAODTrackParticle.h"
-#include "TrkParticleBase/LinkToTrackParticleBase.h"
-//#define INDETADAPTIVEPRIVXFINDERTOOL_DEBUG
-
-#include "xAODTracking/Vertex.h"
-#include "xAODTracking/TrackParticle.h"
-#include "xAODTracking/VertexContainer.h"
-#include "xAODTracking/VertexAuxContainer.h"
-#include "xAODTracking/TrackParticleContainer.h"
-#include "xAODTracking/TrackParticleAuxContainer.h"
-
-namespace InDet
-{
-#if 0
-  namespace {
-    void
-    deleteMeasuredPerigeeIf(bool IsToDelete, const Trk::TrackParameters*& WhatToDelete) {
-      if (IsToDelete) {
-        delete WhatToDelete;
-        WhatToDelete = 0;
-      }
-    }
-  }
-#endif
-
-  InDetAdaptivePriVxFinderTool::InDetAdaptivePriVxFinderTool(const std::string& t, const std::string& n,
-                                                             const IInterface* p)
-    : AthAlgTool(t, n, p),
-    m_iVertexFitter("Trk::AdaptiveVertexFitter"),
-    m_trkFilter("InDet::InDetTrackSelection")
-  {
-    declareInterface<IVertexFinder>(this);//by GP: changed from InDetAdaptivePriVxFinderTool to IPriVxFinderTool
-    /* Retrieve StoreGate container and tool names from job options */
-    declareProperty("VertexFitterTool", m_iVertexFitter);
-    declareProperty("TrackSelector", m_trkFilter);
-    /* Cuts for track preselection */
-  }
-
-  InDetAdaptivePriVxFinderTool::~InDetAdaptivePriVxFinderTool()
-  {}
-
-  StatusCode
-  InDetAdaptivePriVxFinderTool::initialize() {
-    StatusCode sc;
-
-    /* Get the right vertex fitting tool from ToolSvc */
-    if (m_iVertexFitter.retrieve().isFailure()) {
-      msg(MSG::FATAL) << "Failed to retrieve tool " << m_iVertexFitter << endmsg;
-      return StatusCode::FAILURE;
-    }
-
-    ATH_CHECK(m_beamSpotKey.initialize());
-
-    if (m_trkFilter.retrieve().isFailure()) {
-      msg(MSG::ERROR) << " Unable to retrieve " << m_trkFilter << endmsg;
-      return StatusCode::FAILURE;
-    }
-
-    // since some parameters special to an inherited class this method
-    // will be overloaded by the inherited class
-    printParameterSettings();
-
-    msg(MSG::INFO) << "Initialization successful" << endmsg;
-    return StatusCode::SUCCESS;
-  }
-
-  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  InDetAdaptivePriVxFinderTool::findVertex(
-    const TrackCollection* trackTES) const
-  {
-    // TODO: change trkFilter to allow for this replacement
-    /*
-       xAOD::Vertex beamposition;
-       beamposition.makePrivateStore();
-       beamposition.setPosition(beamSpotHandle->beamVtx().position());
-       beamposition.setCovariancePosition(beamSpotHandle->beamVtx().covariancePosition());
-     */
-    SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
-    const Trk::RecVertex &beamposition(beamSpotHandle->beamVtx());
-
-    //---- Start of preselection of tracks ---------------//
-    std::vector<const Trk::TrackParameters*> origParameters;
-    origParameters.clear();
-    for (TrackCollection::const_iterator itr = trackTES->begin(); itr != trackTES->end(); itr++) {
-      if (!static_cast<bool>(m_trkFilter->accept(**itr, &beamposition))) continue;
-      origParameters.push_back((*itr)->perigeeParameters());
-    }
-    if (msgLvl(MSG::DEBUG)) msg() << "Of " << trackTES->size() << " tracks " << origParameters.size() <<
-        " survived the preselection." << endmsg;
-
-    //---- do the actual vertex finding on TrackParameters obejcts ---------------//
-    std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> returnContainers = findVertex(origParameters);
-
-    //---- validate the element links ---------------//
-    for (xAOD::VertexContainer::iterator vxContItr = returnContainers.first->begin();
-         vxContItr != returnContainers.first->end(); vxContItr++) {
-      std::vector<Trk::VxTrackAtVertex>* tmpVxTAVtx = &(*vxContItr)->vxTrackAtVertex();
-      for (std::vector<Trk::VxTrackAtVertex>::iterator itr = tmpVxTAVtx->begin(); itr != tmpVxTAVtx->end(); itr++) {
-        const Trk::TrackParameters* initialPerigee = (*itr).initialPerigee();
-        const Trk::Track* correspondingTrack(nullptr);
-        // find the track to that perigee ...
-        for (TrackCollection::const_iterator itr1 = trackTES->begin(); itr1 != trackTES->end(); itr1++) {
-          if (initialPerigee == (*itr1)->perigeeParameters()) {
-            correspondingTrack = (*itr1);
-            continue;
-          }
-        }
-
-        // validate the track link
-        if (correspondingTrack != nullptr) {
-          Trk::LinkToTrack* link = new Trk::LinkToTrack;
-          link->setStorableObject(*trackTES);
-          link->setElement(correspondingTrack);
-          (*itr).setOrigTrack(link);
-        } else msg(MSG::WARNING) <<
-          "No corresponding track found for this initial perigee! Vertex will have no link to the track." << endmsg;
-        // TODO: also mention that links stored directly in xAOD::Vertices are not set because a TrackCollection was
-        // given as input
-      }
-    }
-
-    return returnContainers;
-  }
-
-  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  InDetAdaptivePriVxFinderTool::findVertex(
-    const xAOD::TrackParticleContainer* trackParticles) const
-  {
-    ATH_MSG_DEBUG(" Number of input tracks before track selection: " << trackParticles->size());
-    SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
-
-
-    xAOD::Vertex beamposition;
-    beamposition.makePrivateStore();
-    beamposition.setPosition(beamSpotHandle->beamVtx().position());
-    beamposition.setCovariancePosition(beamSpotHandle->beamVtx().covariancePosition());
-
-    //---- Start of preselection of tracks ---------------//
-    std::vector<const Trk::TrackParameters*> origParameters;
-    origParameters.clear();
-
-    typedef DataVector<xAOD::TrackParticle>::const_iterator TrackParticleDataVecIter;
-    for (TrackParticleDataVecIter itr = trackParticles->begin(); itr != trackParticles->end(); ++itr) {
-      if (!static_cast<bool>(m_trkFilter->accept(**itr, &beamposition))) continue;
-      origParameters.push_back(&(*itr)->perigeeParameters());
-      ATH_MSG_DEBUG("originalPerigee at " << &(*itr)->perigeeParameters());
-    }
-
-    //beamposition.releasePrivateStore(); //TODO: should I add this here? it was in InDetPriVxFinderTool method
-
-    ATH_MSG_DEBUG(
-      "Of " << trackParticles->size() << " tracks " << origParameters.size() << " survived the preselection.");
-
-    std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> returnContainers = findVertex(origParameters);
-
-    for (xAOD::VertexContainer::iterator vxContItr = returnContainers.first->begin();
-    vxContItr != returnContainers.first->end(); ++vxContItr) {
-      std::vector<Trk::VxTrackAtVertex>* tmpVxTAVtx = &(*vxContItr)->vxTrackAtVertex();
-
-      //assigning the input tracks to the fitted vertices through VxTrackAtVertices
-      for (std::vector<Trk::VxTrackAtVertex>::iterator itr = tmpVxTAVtx->begin(); itr != tmpVxTAVtx->end(); itr++) {
-        const Trk::TrackParameters* initialPerigee = (*itr).initialPerigee();
-        const xAOD::TrackParticle* correspondingTrack(nullptr);
-        // find the track to that perigee ...
-        for (TrackParticleDataVecIter itr1 = trackParticles->begin(); itr1 != trackParticles->end(); ++itr1) {
-          if (initialPerigee == &((*itr1)->perigeeParameters())) {
-            correspondingTrack = (*itr1);
-            continue;
-          }
-        }
-        if (correspondingTrack != nullptr) {
-          Trk::LinkToXAODTrackParticle* link = new Trk::LinkToXAODTrackParticle;
-          link->setStorableObject(*trackParticles);
-          link->setElement(correspondingTrack);
-          (*itr).setOrigTrack(link);
-        } else ATH_MSG_WARNING("No corresponding track found for this initial perigee! Vertex will have no link to the track.");
-      } //end of loop over vxTrackAtVertices to assign links
-
-      //now set links to xAOD::TrackParticles directly in xAOD::Vertices
-      unsigned int VTAVsize = (*vxContItr)->vxTrackAtVertex().size();
-      for (unsigned int i = 0; i < VTAVsize; ++i) {
-        Trk::VxTrackAtVertex* VTAV = &((*vxContItr)->vxTrackAtVertex().at(i));
-        //TODO: Will this pointer really hold 0 if no VxTrackAtVertex is found?
-        if (not VTAV) {
-          ATH_MSG_WARNING(" Trying to set link to xAOD::TrackParticle. The VxTrackAtVertex is not found");
-          continue;
-        }
-
-        Trk::ITrackLink* trklink = VTAV->trackOrParticleLink();
-
-        // See if the trklink is to an xAOD::TrackParticle
-        Trk::LinkToXAODTrackParticle* linkToXAODTP = dynamic_cast<Trk::LinkToXAODTrackParticle*>(trklink);
-        if (linkToXAODTP) {
-          //Now set the new link to the xAOD vertex
-          (*vxContItr)->addTrackAtVertex(*linkToXAODTP, VTAV->weight());
-        } else {
-          ATH_MSG_WARNING("Skipping track. Trying to set link to something else than xAOD::TrackParticle. Neutrals not supported.");
-        }
-      } //end of loop for setting links to xAOD::TrackParticles directly in xAOD::Vertices
-    } //end loop over fitted vertices
-
-    return returnContainers;
-  }
-
-  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
-  InDetAdaptivePriVxFinderTool::findVertex(std::vector<const Trk::TrackParameters*>& origParameters) const{
-    std::vector<Trk::VxTrackAtVertex>* trkAtVtx;
-
-    double vertexPt = 0.;
-    xAOD::VertexContainer* theVertexContainer = new xAOD::VertexContainer;
-    xAOD::VertexAuxContainer* theVertexAuxContainer = new xAOD::VertexAuxContainer;
-    theVertexContainer->setStore(theVertexAuxContainer);
-
-    xAOD::Vertex* myxAODVertex = nullptr;
-
-    //---- Start of fitting section ------------------------------------------------------//
-    if (!origParameters.empty()) {
-      SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
-      xAOD::Vertex beamposition;
-      beamposition.makePrivateStore();
-      beamposition.setPosition(beamSpotHandle->beamVtx().position());
-      beamposition.setCovariancePosition(beamSpotHandle->beamVtx().covariancePosition());
-      beamposition.setFitQuality(beamSpotHandle->beamVtx().fitQuality().chiSquared(), beamSpotHandle->beamVtx().fitQuality().doubleNumberDoF());
-      myxAODVertex = m_iVertexFitter->fit(origParameters, beamposition);
-      /* @TODO? The fit tool does not return tracks chi2 ordered anymore
-                We have to do it */
-    } else if (msgLvl(MSG::DEBUG)) msg() << "Less than two tracks or fitting without constraint - drop candidate vertex." << endmsg;
-    // end if preselection for first iteration
-
-    if (!origParameters.empty()) {
-      /* Store the primary vertex */
-      trkAtVtx = &(myxAODVertex->vxTrackAtVertex());
-      // do a loop through the element links to tracks in myVxCandidate.vxTrackAtVertex[]
-      // if ELEMENTLINKS are used
-      vertexPt = 0.;
-      for (unsigned int i = 0; i < trkAtVtx->size(); ++i) {
-        const Trk::TrackParameters* tmpTP = dynamic_cast<const Trk::TrackParameters*> ((*(trkAtVtx)) [i].initialPerigee());
-        //Second step: calculating the sunm of the pt's
-        if (tmpTP) vertexPt += tmpTP->pT();
-      }
-    } else {
-      if (myxAODVertex != nullptr) {
-        delete myxAODVertex;
-        myxAODVertex = nullptr;
-      }
-    }
-
-
-    if (myxAODVertex != nullptr) {
-      theVertexContainer->push_back(myxAODVertex);
-      if (msgLvl(MSG::DEBUG)) { /* Print info only if requested */
-        double xVtxError = Amg::error(myxAODVertex->covariancePosition(), 0);
-        double yVtxError = Amg::error(myxAODVertex->covariancePosition(), 1);
-        double zVtxError = Amg::error(myxAODVertex->covariancePosition(), 2);
-        msg() << "PVtx at ("
-              << myxAODVertex->position()[0] << "+/-" << xVtxError << ", "
-              << myxAODVertex->position()[1] << "+/-" << yVtxError << ", "
-              << myxAODVertex->position()[2] << "+/-" << zVtxError << ") with chi2 = "
-              << myxAODVertex->chiSquared() << " ("
-              << myxAODVertex->vxTrackAtVertex().size() << " tracks)" << endmsg;
-      }
-    }
-
-    //---- add dummy vertex at the end ------------------------------------------------------//
-    //---- if one or more vertices are already there: let dummy have same position as primary vertex
-    if (!theVertexContainer->empty()) {
-      xAOD::Vertex* primaryVtx = theVertexContainer->front();
-      if (!primaryVtx->vxTrackAtVertex().empty()) {
-        primaryVtx->setVertexType(xAOD::VxType::PriVtx);
-        xAOD::Vertex* dummyxAODVertex = new xAOD::Vertex;
-        theVertexContainer->push_back(dummyxAODVertex); // have to add vertex to container here first so it can use its
-                                                        // aux store
-        dummyxAODVertex->setPosition(primaryVtx->position());
-        dummyxAODVertex->setCovariancePosition(primaryVtx->covariancePosition());
-        dummyxAODVertex->vxTrackAtVertex() = std::vector<Trk::VxTrackAtVertex>();
-        dummyxAODVertex->setVertexType(xAOD::VxType::NoVtx);
-      } else {
-        primaryVtx->setVertexType((xAOD::VxType::VertexType) Trk::NoVtx);
-      }
-    }
-    //---- if no vertex is there let dummy be at beam spot
-    else if (theVertexContainer->empty()) {
-      SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
-      xAOD::Vertex* dummyxAODVertex = new xAOD::Vertex;
-      theVertexContainer->push_back(dummyxAODVertex); // have to add vertex to container here first so it can use its
-                                                      // aux store
-      dummyxAODVertex->setPosition(beamSpotHandle->beamVtx().position());
-      dummyxAODVertex->setCovariancePosition(beamSpotHandle->beamVtx().covariancePosition());
-      dummyxAODVertex->vxTrackAtVertex() = std::vector<Trk::VxTrackAtVertex>();
-      dummyxAODVertex->setVertexType(xAOD::VxType::NoVtx);
-    }
-
-    // loop over the pile up to set it as pile up (EXCLUDE first and last vertex: loop from 1 to size-1)
-    for (unsigned int i = 1; i < theVertexContainer->size() - 1; i++) {
-      (*theVertexContainer)[i]->setVertexType(xAOD::VxType::PileUp);
-    }
-
-    return std::make_pair(theVertexContainer, theVertexAuxContainer);
-  }
-
-  StatusCode
-  InDetAdaptivePriVxFinderTool::finalize() {
-    return StatusCode::SUCCESS;
-  }
-
-  void
-  InDetAdaptivePriVxFinderTool::printParameterSettings() {
-    msg(MSG::INFO) << "VxPrimary initialize(): Parametersettings " << endmsg;
-    msg(MSG::INFO) << "VertexFitter " << m_iVertexFitter << endmsg;
-    msg(MSG::INFO) << endmsg;
-  }
-
-  void
-  InDetAdaptivePriVxFinderTool::SGError(const std::string& errService) {
-    msg(MSG::FATAL) << errService << " not found. Exiting !" << endmsg;
- }
-} // end namespace InDet
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetIterativePriVxFinderTool.cxx b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetIterativePriVxFinderTool.cxx
index ff11c0cc818724c7e0be1b4dfe288d4168390d5d..911eba162a5f8424d255496671b8c771833a7eb1 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetIterativePriVxFinderTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetIterativePriVxFinderTool.cxx
@@ -94,7 +94,7 @@ namespace InDet
 }
 
 InDetIterativePriVxFinderTool::~InDetIterativePriVxFinderTool()
-{}
+= default;
 
 StatusCode InDetIterativePriVxFinderTool::initialize()
 {
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetMultiPriVxFinderTool.cxx b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetMultiPriVxFinderTool.cxx
index cc9217335afc78f4e474e81631e25b430816a081..17ba30ffc95a6cbe630c5b0f707240ca406947fb 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetMultiPriVxFinderTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetMultiPriVxFinderTool.cxx
@@ -92,7 +92,7 @@ namespace InDet
   }
 
   InDetMultiPriVxFinderTool::~InDetMultiPriVxFinderTool()
-  {}
+  = default;
 
   StatusCode
   InDetMultiPriVxFinderTool::initialize() {
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetPriVxFinderTool.cxx b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetPriVxFinderTool.cxx
index 2f26ea76e42fff47a4a6d3df5aaff82112591492..9ac1e16b78b51c75313606e41d317134d2ff3e4b 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetPriVxFinderTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetPriVxFinderTool.cxx
@@ -91,7 +91,7 @@ namespace InDet
   }
 
   InDetPriVxFinderTool::~InDetPriVxFinderTool()
-  {}
+  = default;
 
   StatusCode
   InDetPriVxFinderTool::initialize() {
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/components/InDetPriVxFinderTool_entries.cxx b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/components/InDetPriVxFinderTool_entries.cxx
index 98dc68e9410e1d03c73efae61061070bad025dbf..222a629eb832f7afce977e2e79ae6489d07854c0 100644
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/components/InDetPriVxFinderTool_entries.cxx
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/components/InDetPriVxFinderTool_entries.cxx
@@ -1,5 +1,4 @@
 #include "InDetPriVxFinderTool/InDetPriVxFinderTool.h"
-#include "InDetPriVxFinderTool/InDetAdaptivePriVxFinderTool.h"
 #include "InDetPriVxFinderTool/InDetIterativePriVxFinderTool.h"
 #include "InDetPriVxFinderTool/InDetAdaptiveMultiPriVxFinderTool.h"
 #include "InDetPriVxFinderTool/InDetMultiPriVxFinderTool.h"
@@ -9,7 +8,6 @@
 using namespace InDet;
 
 DECLARE_COMPONENT( InDetPriVxFinderTool )
-DECLARE_COMPONENT( InDetAdaptivePriVxFinderTool )
 DECLARE_COMPONENT( InDetIterativePriVxFinderTool )
 DECLARE_COMPONENT( InDetAdaptiveMultiPriVxFinderTool )
 DECLARE_COMPONENT( InDetMultiPriVxFinderTool )
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ATLxk.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ATLxk.cxx
index a89d4d99ee23c74303e893615b4a7b5d3ed7eaca..27b3950693bcacf6f6a6f4983b132381f2b09eab 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ATLxk.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ATLxk.cxx
@@ -415,14 +415,13 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newRegion
 
     SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel, ctx};
     if ( spacepointsPixel.isValid() ) {
-      SpacePointContainer::const_iterator spce = spacepointsPixel->end();
 
       // Loop through all trigger collections
       //
       for (const IdentifierHash& l: vPixel) {
-        SpacePointContainer::const_iterator w = spacepointsPixel->indexFind(l);
-        if (w==spce) continue;
-        for (const Trk::SpacePoint* sp: **w) {
+        auto w = spacepointsPixel->indexFindPtr(l);
+        if (w==nullptr) continue;
+        for (const Trk::SpacePoint* sp: *w) {
           float r = sp->r();
           if (r > m_r_rmax) continue;
           InDet::SiSpacePointForSeed* sps = newSpacePoint(data, sp);
@@ -443,14 +442,13 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newRegion
 
     SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT, ctx};
     if (spacepointsSCT.isValid()) {
-      SpacePointContainer::const_iterator spce = spacepointsSCT->end();
 
       // Loop through all trigger collections
       //
       for (const IdentifierHash& l: vSCT) {
-        SpacePointContainer::const_iterator w = spacepointsSCT->indexFind(l);
-        if (w==spce) continue;
-        for (const Trk::SpacePoint* sp: **w) {
+        auto w = spacepointsSCT->indexFindPtr(l);
+        if (w==nullptr) continue;
+        for (const Trk::SpacePoint* sp: *w) {
           float r = sp->r();
           if (r > m_r_rmax) continue;
           InDet::SiSpacePointForSeed* sps = newSpacePoint(data, sp);
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_BeamGas.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_BeamGas.cxx
index abd0d2c58d5d72b439e3bd25061fbfd664250ea4..2c7400366b8640c148bfd0a2b9bfc6a89e1d75c4 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_BeamGas.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_BeamGas.cxx
@@ -253,14 +253,13 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::newRegion
 
     SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel, ctx};
     if (spacepointsPixel.isValid()) {
-      SpacePointContainer::const_iterator spce = spacepointsPixel->end();
 
       // Loop through all trigger collections
       //
       for (const IdentifierHash& l: vPixel) {
-	SpacePointContainer::const_iterator w = spacepointsPixel->indexFind(l);
-	if (w==spce) continue;
-        for (const Trk::SpacePoint* sp: **w) {
+	auto w = spacepointsPixel->indexFindPtr(l);
+	if (w==nullptr) continue;
+        for (const Trk::SpacePoint* sp: *w) {
 	  float r = sp->r();
           if (r<0. || r>=m_r_rmax) continue;
 	  if (prd_to_track_map_cptr && isUsed(sp, *prd_to_track_map_cptr)) continue;
@@ -281,14 +280,12 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::newRegion
 
     SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT, ctx};
     if (spacepointsSCT.isValid()) {
-      SpacePointContainer::const_iterator spce = spacepointsSCT->end();
-
       // Loop through all trigger collections
       //
       for (const IdentifierHash& l: vPixel) {
-	SpacePointContainer::const_iterator w = spacepointsSCT->indexFind(l);
-	if (w==spce) continue;
-        for (const Trk::SpacePoint* sp: **w) {
+	auto w = spacepointsSCT->indexFindPtr(l);
+	if (w==nullptr) continue;
+        for (const Trk::SpacePoint* sp: *w) {
 	  float r = sp->r();
           if (r<0. || r>=m_r_rmax) continue;
 	  if (prd_to_track_map_cptr && isUsed(sp,*prd_to_track_map_cptr)) continue;
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Cosmic.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Cosmic.cxx
index e0572aad3cf5a5c03d247d8598de1e8960d6ff25..bbfc2e54f2528a1547fd12462d1a121ff6416b98 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Cosmic.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Cosmic.cxx
@@ -207,14 +207,12 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::newRegion
 
     SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel, ctx};
     if (spacepointsPixel.isValid()) {
-      SpacePointContainer::const_iterator spce = spacepointsPixel->end();
-
       // Loop through all trigger collections
       //
       for (const IdentifierHash& l: vPixel) {
-	SpacePointContainer::const_iterator w = spacepointsPixel->indexFind(l);
-	if (w==spce) continue;
-        for (const Trk::SpacePoint* sp: **w) {
+	auto w = spacepointsPixel->indexFindPtr(l);
+	if (w==nullptr) continue;
+        for (const Trk::SpacePoint* sp: *w) {
 	  float r = sp->r();
           if (r<0. || r>=m_r_rmax) continue;
 	  if (prd_to_track_map_cptr && isUsed(sp,*prd_to_track_map_cptr)) continue;
@@ -236,14 +234,13 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::newRegion
 
     SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT, ctx};
     if (spacepointsSCT.isValid()) {
-      SpacePointContainer::const_iterator spce = spacepointsSCT->end();
 
       // Loop through all trigger collections
       //
       for (const IdentifierHash& l: vSCT) {
-	SpacePointContainer::const_iterator w = spacepointsSCT->indexFind(l);
-	if (w==spce) continue;
-        for (const Trk::SpacePoint* sp: **w) {
+	auto w = spacepointsSCT->indexFindPtr(l);
+	if (w==nullptr) continue;
+        for (const Trk::SpacePoint* sp: *w) {
 	  float r = sp->r();
           if (r<0. || r>=m_r_rmax) continue;
 	  if (prd_to_track_map_cptr && isUsed(sp,*prd_to_track_map_cptr)) continue;
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_HeavyIon.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_HeavyIon.cxx
index 02777545edfc2acf061cde31d621e6f00d7887dc..423b40ddfde67c2e3daebc184356c9adcdddd03c 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_HeavyIon.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_HeavyIon.cxx
@@ -208,14 +208,13 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::newRegion
 
     SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel, ctx};
     if (spacepointsPixel.isValid()) {
-      SpacePointContainer::const_iterator spce = spacepointsPixel->end();
 
       // Loop through all trigger collections
       //
       for (const IdentifierHash& l: vPixel) {
-	SpacePointContainer::const_iterator w = spacepointsPixel->indexFind(l);
-	if (w==spce) continue;
-        for (const Trk::SpacePoint* sp: **w) {
+	auto w = spacepointsPixel->indexFindPtr(l);
+	if (w==nullptr) continue;
+        for (const Trk::SpacePoint* sp: *w) {
 	  float r = sp->r();
           if (r<0. || r>=m_r_rmax) continue;
 	  InDet::SiSpacePointForSeed* sps = newSpacePoint(data, sp);
@@ -236,14 +235,13 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::newRegion
 
     SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT, ctx};
     if (spacepointsSCT.isValid()) {
-      SpacePointContainer::const_iterator spce = spacepointsSCT->end();
 
       // Loop through all trigger collections
       //
       for (const IdentifierHash& l: vSCT) {
-	SpacePointContainer::const_iterator w = spacepointsSCT->indexFind(l);
-	if (w==spce) continue;
-        for (const Trk::SpacePoint* sp: **w) {
+	auto w = spacepointsSCT->indexFindPtr(l);
+	if (w==nullptr) continue;
+        for (const Trk::SpacePoint* sp: *w) {
 	  float r = sp->r();
           if (r<0. || r>=m_r_rmax) continue;
 	  InDet::SiSpacePointForSeed* sps = newSpacePoint(data, sp);
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ITK.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ITK.cxx
index eff676328de360bb4183d4247c0611b745fbc68d..acc9bb73cea63d1b0ced23e61bf19f2ecd54dd1b 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ITK.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ITK.cxx
@@ -302,14 +302,13 @@ void InDet::SiSpacePointsSeedMaker_ITK::newRegion
 
     SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel, ctx};
     if (spacepointsPixel.isValid()) {
-      SpacePointContainer::const_iterator spce = spacepointsPixel->end();
 
       // Loop through all trigger collections
       //
       for (const IdentifierHash& l: vPixel) {
-	SpacePointContainer::const_iterator w = spacepointsPixel->indexFind(l);
-	if (w==spce) continue;
-        for (const Trk::SpacePoint* sp: **w) {
+	auto w = spacepointsPixel->indexFindPtr(l);
+	if (w==nullptr) continue;
+        for (const Trk::SpacePoint* sp: *w) {
 	  float r = sp->r();
           if (r > m_r_rmax || r < m_r_rmin) continue;
 	  InDet::SiSpacePointForSeedITK* sps = newSpacePoint(data, sp);
@@ -330,14 +329,13 @@ void InDet::SiSpacePointsSeedMaker_ITK::newRegion
 
     SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT, ctx};
     if (spacepointsSCT.isValid()) {
-      SpacePointContainer::const_iterator spce = spacepointsSCT->end();
 
       // Loop through all trigger collections
       //
       for (const IdentifierHash& l: vSCT) {
-	SpacePointContainer::const_iterator w = spacepointsSCT->indexFind(l);
-	if (w==spce) continue;
-        for (const Trk::SpacePoint* sp: **w) {
+	auto w = spacepointsSCT->indexFindPtr(l);
+	if (w==nullptr) continue;
+        for (const Trk::SpacePoint* sp: *w) {
 	  float r = sp->r();
           if (r > m_r_rmax || r < m_r_rmin) continue;
 	  InDet::SiSpacePointForSeedITK* sps = newSpacePoint(data, sp);
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_LowMomentum.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_LowMomentum.cxx
index 942b6e1bb578ec78ff7d307fdf231d05ad331c31..d85bfc747981a6ea71e96053793d72c13cf2a43d 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_LowMomentum.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_LowMomentum.cxx
@@ -199,9 +199,9 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::newRegion
       // Loop through all trigger collections
       //
       for (const IdentifierHash& l: vPixel) {
-        SpacePointContainer::const_iterator w = spacepointsPixel->indexFind(l);
-        if (w==spce) continue;
-        for (const Trk::SpacePoint* sp: **w) {
+        auto w = spacepointsPixel->indexFindPtr(l);
+        if (w==nullptr) continue;
+        for (const Trk::SpacePoint* sp: *w) {
           float r = sp->r();
           if (r<0. || r>=m_r_rmax) continue;
           if (prd_to_track_map_cptr && isUsed(sp,*prd_to_track_map_cptr)) continue;
@@ -231,9 +231,9 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::newRegion
       // Loop through all trigger collections
       //
       for (const IdentifierHash& l: vSCT) {
-        SpacePointContainer::const_iterator w = spacepointsSCT->indexFind(l);
-        if (w==spce) continue;
-        for (const Trk::SpacePoint* sp: **w) {
+        auto w = spacepointsSCT->indexFindPtr(l);
+        if (w==nullptr) continue;
+        for (const Trk::SpacePoint* sp: *w) {
           float r = sp->r();
           if (r<0. || r>=m_r_rmax) continue;
           if (prd_to_track_map_cptr && isUsed(sp,*prd_to_track_map_cptr)) continue;
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Trigger.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Trigger.cxx
index 35bf26575177d3d98ebe2a0a4130d31af326b62f..61db8694e7a55ebb3f8a1c656487686e2ce2e99c 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Trigger.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Trigger.cxx
@@ -237,14 +237,13 @@ void InDet::SiSpacePointsSeedMaker_Trigger::newRegion
 
     SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel, ctx};
     if (spacepointsPixel.isValid()) {
-      SpacePointContainer::const_iterator spce = spacepointsPixel->end();
 
       // Loop through all trigger collections
       //
       for (const IdentifierHash& l: vPixel) {
-        SpacePointContainer::const_iterator  w =  spacepointsPixel->indexFind(l);
-        if (w==spce) continue;
-        for (const Trk::SpacePoint* sp: **w) {
+        auto w =  spacepointsPixel->indexFindPtr(l);
+        if (w==nullptr) continue;
+        for (const Trk::SpacePoint* sp: *w) {
           float r = sp->r();
           if (r<0. || r>=m_r_rmax) continue;
           InDet::SiSpacePointForSeed* sps = newSpacePoint(data, sp);
@@ -265,14 +264,13 @@ void InDet::SiSpacePointsSeedMaker_Trigger::newRegion
 
     SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT, ctx};
     if (spacepointsSCT.isValid()) {
-      SpacePointContainer::const_iterator spce = spacepointsSCT->end();
 
       // Loop through all trigger collections
       //
       for (const IdentifierHash& l: vSCT) {
-        SpacePointContainer::const_iterator w = spacepointsSCT->indexFind(l);
-        if (w==spce) continue;
-        for (const Trk::SpacePoint* sp: **w) {
+        auto w = spacepointsSCT->indexFindPtr(l);
+        if (w==nullptr) continue;
+        for (const Trk::SpacePoint* sp: *w) {
           float r = sp->r();
           if (r<0. || r>=m_r_rmax) continue;
           InDet::SiSpacePointForSeed* sps = newSpacePoint(data, sp);
diff --git a/InnerDetector/InDetRecTools/TRT_TrackSegmentsTool_xk/src/TRT_TrackSegmentsMaker_ATLxk.cxx b/InnerDetector/InDetRecTools/TRT_TrackSegmentsTool_xk/src/TRT_TrackSegmentsMaker_ATLxk.cxx
index 22fa30885a8d473018cd7a97e2830ee645798ac5..1559bbc9f07147a35d861eb2bc4763c00c8dfd45 100755
--- a/InnerDetector/InDetRecTools/TRT_TrackSegmentsTool_xk/src/TRT_TrackSegmentsMaker_ATLxk.cxx
+++ b/InnerDetector/InDetRecTools/TRT_TrackSegmentsTool_xk/src/TRT_TrackSegmentsMaker_ATLxk.cxx
@@ -273,11 +273,11 @@ InDet::TRT_TrackSegmentsMaker_ATLxk::newRegion
   int n = 0;
   for(; d!=de; ++d) {
 
-    InDet::TRT_DriftCircleContainer::const_iterator w = trtcontainer->indexFind((*d));
+    auto w = trtcontainer->indexFindPtr((*d));
 
-    if(w!=we) {
+    if(w!=nullptr) {
 
-      Identifier ID = (*w)->identify();
+      Identifier ID = w->identify();
       int be = m_trtid->barrel_ec     (ID);
       int lw = m_trtid->layer_or_wheel(ID);
       int sl = m_trtid->straw_layer   (ID);
@@ -289,7 +289,7 @@ InDet::TRT_TrackSegmentsMaker_ATLxk::newRegion
       unsigned int ad  = 1000*b+l;
 
       InDet::TRT_DriftCircleCollection::const_iterator 
-	c  = (*w)->begin(), ce = (*w)->end();
+	c  = w->begin(), ce = w->end();
 
       for(; c!=ce; ++c) {
 
diff --git a/InnerDetector/InDetSimUtils/TRT_TR_Process/CMakeLists.txt b/InnerDetector/InDetSimUtils/TRT_TR_Process/CMakeLists.txt
index e9bfd7aa1677290042a7b43c627d23259b75aae8..1bd1d7f7eb4f8bc560361b990049155473cdb8d0 100644
--- a/InnerDetector/InDetSimUtils/TRT_TR_Process/CMakeLists.txt
+++ b/InnerDetector/InDetSimUtils/TRT_TR_Process/CMakeLists.txt
@@ -11,6 +11,7 @@ atlas_depends_on_subdirs( PUBLIC
                           PRIVATE
                           Control/AthenaBaseComps
                           Control/AthenaKernel
+                          Control/CxxUtils
                           Control/StoreGate
                           DetectorDescription/GeoModel/GeoModelInterfaces
                           DetectorDescription/IdDictDetDescr
@@ -29,7 +30,7 @@ atlas_add_component( TRT_TR_Process
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${Boost_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel AthenaBaseComps AthenaKernel StoreGateLib SGtests IdDictDetDescr G4AtlasInterfaces GeoMaterial2G4 GeoModelInterfaces PathResolver )
+                     LINK_LIBRARIES ${Boost_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel AthenaBaseComps AthenaKernel CxxUtils StoreGateLib SGtests IdDictDetDescr G4AtlasInterfaces GeoMaterial2G4 GeoModelInterfaces PathResolver )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
diff --git a/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRRegionXMLHandler.h b/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRRegionXMLHandler.h
index 16ef0967c6000650f4789161ff3f445c70e2494b..49e31cc5944baaf2a7369514a837033d5ede8692 100644
--- a/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRRegionXMLHandler.h
+++ b/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRRegionXMLHandler.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 TRREGIONXMLHANDLER_H
@@ -8,6 +8,7 @@
 #include <string>
 #include "StoreGate/StoreGateSvc.h"
 #include "AthenaKernel/MsgStreamMember.h"
+#include "CxxUtils/checker_macros.h"
 
 class TRTTransitionRadiation;
 
@@ -22,7 +23,7 @@ private:
   TRTTransitionRadiation * m_theProcess;
   StoreGateSvc* m_storeGate;
   bool m_initialLayoutIdDict;
-  mutable Athena::MsgStreamMember m_msg;
+  mutable Athena::MsgStreamMember m_msg ATLAS_THREAD_SAFE;
 };
 
 #endif
diff --git a/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRTRadiatorParameters.h b/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRTRadiatorParameters.h
index c571ce7542f04ed0b6663b67e2ef5dd574abe284..03d964267cbf20279bed227573a6b01635fbcf31 100644
--- a/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRTRadiatorParameters.h
+++ b/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRTRadiatorParameters.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 TRTRADIATORPARAMETERS_H
@@ -20,7 +20,7 @@ public:
     m_GasThickness(dGas),
     m_BEflg(beflag) {}
 
-  G4LogicalVolume * GetLogicalVolume() const { return m_aLogicalVolume; }
+  const G4LogicalVolume * GetLogicalVolume() const { return m_aLogicalVolume; }
   G4double          GetFoilThickness() const { return m_FoilThickness; }
   G4double          GetGasThickness()  const { return m_GasThickness; }
   BEflag            GetBEflag()        const { return m_BEflg; }
diff --git a/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRTTransitionRadiation.h b/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRTTransitionRadiation.h
index 18c17bb7e841e34f0bc54df5c92fc729ab366b9e..96735c7c06565a852bc28f6c461f4cf57d160f41 100644
--- a/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRTTransitionRadiation.h
+++ b/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRTTransitionRadiation.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 TRTTRANSITIONRADIATION_H
@@ -14,9 +14,11 @@
 #include "G4Step.hh"
 #include "G4Track.hh"
 
+#include "AthenaKernel/MsgStreamMember.h"
+#include "CxxUtils/checker_macros.h"
+
 #include <vector>
 #include <iostream>
-#include "AthenaKernel/MsgStreamMember.h"
 
 //using namespace std;
 
@@ -106,7 +108,7 @@ private:
   G4double* m_sigmaGas;
   G4double* m_sigmaFoil;
 
-  mutable Athena::MsgStreamMember m_msg;
+  mutable Athena::MsgStreamMember m_msg ATLAS_THREAD_SAFE;
 
 };
 
diff --git a/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelCondAlg.h b/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelCondAlg.h
index 41059798aa0c99f2e4395666510e26569dd48d77..4cd9956e9fae4f793e311d9b8e199c409462de1c 100644
--- a/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelCondAlg.h
+++ b/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelCondAlg.h
@@ -20,11 +20,11 @@ class LArBadChannelCondAlg: public AthAlgorithm {
   //Delegate to base-class ctor
   using AthAlgorithm::AthAlgorithm;
 
-  ~LArBadChannelCondAlg()=default;
+  virtual ~LArBadChannelCondAlg()=default;
 
-  StatusCode initialize() override;
-  StatusCode execute() override;
-  StatusCode finalize() {return StatusCode::SUCCESS;}
+  virtual StatusCode initialize() override;
+  virtual StatusCode execute() override;
+  virtual StatusCode finalize() override {return StatusCode::SUCCESS;}
 
  private:
   SG::ReadCondHandleKey<CondAttrListCollection> m_BCInputKey{this,"ReadKey","/LAR/BadChannelsOfl/BadChannels",
diff --git a/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadFebCondAlg.h b/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadFebCondAlg.h
index 17f82e86b2792305bf5dd4f8c14da1724281bb98..1f46d844dc07b1226d51dd611c7d46e41979c753 100644
--- a/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadFebCondAlg.h
+++ b/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadFebCondAlg.h
@@ -1,7 +1,7 @@
 //Dear emacs, this is -*- c++ -*-
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef LARBADFEBCONDALG_H
@@ -18,11 +18,11 @@ class LArBadFebCondAlg: public AthAlgorithm {
  public:
   //Delegate to base-class ctor
   using AthAlgorithm::AthAlgorithm;
-  ~LArBadFebCondAlg()=default;
+  virtual ~LArBadFebCondAlg()=default;
 
-  StatusCode initialize() override;
-  StatusCode execute() override;
-  StatusCode finalize() {return StatusCode::SUCCESS;}
+  virtual StatusCode initialize() override;
+  virtual StatusCode execute() override;
+  virtual StatusCode finalize() override {return StatusCode::SUCCESS;}
 
  private:
   SG::ReadCondHandleKey<AthenaAttributeList> m_BCInputKey{this,"ReadKey","/LAR/BadFebsOfl/BadFebs",
diff --git a/LArCalorimeter/LArCabling/LArCabling/LArCablingDict.h b/LArCalorimeter/LArCabling/LArCabling/LArCablingDict.h
index 337d916b84aa7513f1ecc864cd8d771c603dc8a9..1fa52e9482f3860eb15e06e7f1aae362d241e21f 100644
--- a/LArCalorimeter/LArCabling/LArCabling/LArCablingDict.h
+++ b/LArCalorimeter/LArCabling/LArCabling/LArCablingDict.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
 */
 
 /**
@@ -15,5 +15,6 @@
 # define LARCABLING_LARCABLINGDICT_H
 
 #include "LArCabling/LArCablingLegacyService.h"
+#include "LArCabling/LArOnOffIdMapping.h"
 
 #endif // LARCABLING_LARCABLINGDICT_H
diff --git a/LArCalorimeter/LArCabling/LArCabling/selection.xml b/LArCalorimeter/LArCabling/LArCabling/selection.xml
index bb1f63778fcc3aba16631b5b768cdec94c605a78..dc60cf54e10dfd562d6e7b27b683322ade94946b 100755
--- a/LArCalorimeter/LArCabling/LArCabling/selection.xml
+++ b/LArCalorimeter/LArCabling/LArCabling/selection.xml
@@ -2,6 +2,8 @@
 
   <class name="LArCablingLegacyService" />
   <class name="LArCablingBase" />
+  <class name="LArOnOffIdMapping" />
+  <class name="CondCont<LArOnOffIdMapping>" />
 
 </lcgdict>
 
diff --git a/LArCalorimeter/LArCafJobs/LArCafJobs/LArReadCells.h b/LArCalorimeter/LArCafJobs/LArCafJobs/LArReadCells.h
index f1dfb7ee16e208e44d3678215a4b962fab0d832f..da9eece21c0784ce178707cbb4bc7f3b60114656 100644
--- a/LArCalorimeter/LArCafJobs/LArCafJobs/LArReadCells.h
+++ b/LArCalorimeter/LArCafJobs/LArCafJobs/LArReadCells.h
@@ -41,16 +41,16 @@ class LArReadCells: public ::AthAlgorithm {
    int m_bcid; 
    int m_error;
    int m_ncells;
-   float m_ECell[250000];
-   float m_TCell[250000];
-   float m_EtaCell[250000];
-   float m_PhiCell[250000];
-   int   m_LayerCell[250000];
-   int   m_ProvCell[250000];
-   int   m_QuaCell[250000];
-   int   m_GainCell[250000];
-   int   m_HwidCell[250000];
-   int   m_ADC[250000][32];
+   std::vector<float> m_ECell     { 250000 };
+   std::vector<float> m_TCell     { 250000 };
+   std::vector<float> m_EtaCell   { 250000 };
+   std::vector<float> m_PhiCell   { 250000 };
+   std::vector<int>   m_LayerCell { 250000 };
+   std::vector<int>   m_ProvCell  { 250000 };
+   std::vector<int>   m_QuaCell   { 250000 };
+   std::vector<int>   m_GainCell  { 250000 };
+   std::vector<int>   m_HwidCell  { 250000 };
+   std::vector<int[32]> m_ADC     { 250000 };
 
     SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};
     SG::ReadCondHandleKey<ILArPedestal> m_pedestalKey{this,"PedestalKey","LArPedestal","SG Key of Pedestal conditions object"};
diff --git a/LArCalorimeter/LArCafJobs/src/LArReadCells.cxx b/LArCalorimeter/LArCafJobs/src/LArReadCells.cxx
index 2a3f4f35c7eff7a7c696467794dd0f45980fa7a4..fdd5ab522719956a8bfaa572f9bdf619f6d1e888 100644
--- a/LArCalorimeter/LArCafJobs/src/LArReadCells.cxx
+++ b/LArCalorimeter/LArCafJobs/src/LArReadCells.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2028 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "LArCafJobs/LArReadCells.h"
@@ -44,16 +44,16 @@ StatusCode LArReadCells::initialize() {
   m_tree->Branch("BCID",&m_bcid,"BCID/I");
   m_tree->Branch("LArError",&m_error,"LArError/I");
   m_tree->Branch("ncells",&m_ncells,"ncells/I");
-  m_tree->Branch("ECell",m_ECell,"eCell[ncells]/F");
-  m_tree->Branch("TCell",m_TCell,"tCell[ncells]/F");
-  m_tree->Branch("EtaCell",m_EtaCell,"etaCell[ncells]/F");
-  m_tree->Branch("PhiCell",m_PhiCell,"phiCell[ncells]/F");
-  m_tree->Branch("LayerCell",m_LayerCell,"layerCell[ncells]/I");
-  m_tree->Branch("ProvCell", m_ProvCell,"provCell[ncells]/I");
-  m_tree->Branch("QuaCell", m_QuaCell,"quaCell[ncells]/I");
-  m_tree->Branch("GainCell", m_GainCell,"gainCell[ncells]/I");
-  m_tree->Branch("HwidCell", m_HwidCell,"hwidCell[ncells]/I");
-  m_tree->Branch("ADC",m_ADC,"ADC[ncells][32]/I");
+  m_tree->Branch("ECell",m_ECell.data(),"eCell[ncells]/F");
+  m_tree->Branch("TCell",m_TCell.data(),"tCell[ncells]/F");
+  m_tree->Branch("EtaCell",m_EtaCell.data(),"etaCell[ncells]/F");
+  m_tree->Branch("PhiCell",m_PhiCell.data(),"phiCell[ncells]/F");
+  m_tree->Branch("LayerCell",m_LayerCell.data(),"layerCell[ncells]/I");
+  m_tree->Branch("ProvCell", m_ProvCell.data(),"provCell[ncells]/I");
+  m_tree->Branch("QuaCell", m_QuaCell.data(),"quaCell[ncells]/I");
+  m_tree->Branch("GainCell", m_GainCell.data(),"gainCell[ncells]/I");
+  m_tree->Branch("HwidCell", m_HwidCell.data(),"hwidCell[ncells]/I");
+  m_tree->Branch("ADC",m_ADC.data(),"ADC[ncells][32]/I");
 
   ATH_CHECK(detStore()->retrieve(m_caloIdMgr));
   m_calo_id      = m_caloIdMgr->getCaloCell_ID();
diff --git a/LArCalorimeter/LArClusterRec/share/LArCluster_jobOptions.py b/LArCalorimeter/LArClusterRec/share/LArCluster_jobOptions.py
index f0ce8954e4d4b45380650b745e2b4e6a05a223a1..4fc7ef9a91ca54d8e8c6d769e2ba2fc933a550c1 100755
--- a/LArCalorimeter/LArClusterRec/share/LArCluster_jobOptions.py
+++ b/LArCalorimeter/LArClusterRec/share/LArCluster_jobOptions.py
@@ -10,4 +10,5 @@ from LArClusterRec.LArClusterSwGetters import *
 LArClusterSwEle35Getter()
 
 # 7x11 clusters with no corrections.
-LArClusterSw711GetterNocorr()
+# not built by default
+#LArClusterSw711GetterNocorr()
diff --git a/LArCalorimeter/LArG4/LArG4ShowerLibSvc/CMakeLists.txt b/LArCalorimeter/LArG4/LArG4ShowerLibSvc/CMakeLists.txt
index d24e7c490fbb880ba0293f614998583dfea54b1a..ef9f5753b1f8211ce8d92600042f6834928ca103 100644
--- a/LArCalorimeter/LArG4/LArG4ShowerLibSvc/CMakeLists.txt
+++ b/LArCalorimeter/LArG4/LArG4ShowerLibSvc/CMakeLists.txt
@@ -21,15 +21,20 @@ find_package( Geant4 )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 find_package( XercesC )
 
+atlas_add_library( LArG4ShowerLibSvcLib
+                   LArG4ShowerLibSvc/*.h
+                   INTERFACE
+                   PUBLIC_HEADERS LArG4ShowerLibSvc
+                   LINK_LIBRARIES GaudiKernel LArG4Code AthenaBaseComps )
+
 # Component(s) in the package:
 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} AthenaBaseComps GaudiKernel LArG4Code AthenaKernel LArG4ShowerLib PathResolver )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES}  LArG4ShowerLibSvcLib AthenaKernel LArG4ShowerLib PathResolver )
 
 # Install files from the package:
-atlas_install_headers( LArG4ShowerLibSvc )
 atlas_install_python_modules( python/*.py )
 atlas_install_scripts( share/*.py )
 
diff --git a/LArCalorimeter/LArMonitoring/python/LArHVDBConfig.py b/LArCalorimeter/LArMonitoring/python/LArHVDBConfig.py
index a35f1155c2f70328a306878c3cceb76fdd94ed47..e34f4a3f6ac61acd0a8fb2475999e9967ce55215 100644
--- a/LArCalorimeter/LArMonitoring/python/LArHVDBConfig.py
+++ b/LArCalorimeter/LArMonitoring/python/LArHVDBConfig.py
@@ -49,8 +49,8 @@ if __name__=="__main__":
     ConfigFlags.lock()
 
     cfg=ComponentAccumulator()
-    from ByteStreamCnvSvc.ByteStreamConfig import TrigBSReadCfg
-    cfg.merge( TrigBSReadCfg(ConfigFlags) )
+    from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
+    cfg.merge( ByteStreamReadCfg(ConfigFlags) )
 
     from LArGeoAlgsNV.LArGMConfig import LArGMCfg
     cfg.merge(LArGMCfg(ConfigFlags))
diff --git a/LArCalorimeter/LArRecUtils/src/LArSymConditionsAlg.h b/LArCalorimeter/LArRecUtils/src/LArSymConditionsAlg.h
index 8d5881192ed66ad3c53bfbcb3d1898df48c8c7d8..e864ee1b89900a4bdaa6faf0e1bec0713d3cd93e 100644
--- a/LArCalorimeter/LArRecUtils/src/LArSymConditionsAlg.h
+++ b/LArCalorimeter/LArRecUtils/src/LArSymConditionsAlg.h
@@ -21,11 +21,11 @@ class LArSymConditionsAlg: public AthAlgorithm {
   //delegate to base-class ctor
   using AthAlgorithm::AthAlgorithm;
 
-  ~LArSymConditionsAlg()=default;
+  virtual ~LArSymConditionsAlg()=default;
 
-  StatusCode initialize() override;
-  StatusCode execute() override;
-  StatusCode finalize() {return StatusCode::SUCCESS;}
+  virtual StatusCode initialize() override;
+  virtual StatusCode execute() override;
+  virtual StatusCode finalize() override {return StatusCode::SUCCESS;}
 
  private:
   SG::ReadCondHandleKey<LArMCSym> m_mcSymKey{this,"LArMCSym","LArMCSym","Key of the LArMCSym symmetry table CDO"};
diff --git a/MagneticField/MagFieldServices/MagFieldServices/AtlasFieldSvc.h b/MagneticField/MagFieldServices/MagFieldServices/AtlasFieldSvc.h
index 529398741971db19801ce924c1aca473573ffcc7..15a5e27d213e78880aa0f3adc08a4ef38892ac0c 100644
--- a/MagneticField/MagFieldServices/MagFieldServices/AtlasFieldSvc.h
+++ b/MagneticField/MagFieldServices/MagFieldServices/AtlasFieldSvc.h
@@ -41,27 +41,27 @@ namespace MagField {
       @author Elmar.Ritsch -at- cern.ch
     */
 
-  class AtlasFieldSvc : public extends<AthService, IMagFieldSvc, IIncidentListener> {
+  class ATLAS_NOT_THREAD_SAFE AtlasFieldSvc : public extends<AthService, IMagFieldSvc, IIncidentListener> {
     public:
 
       //** Constructor with parameters */
-      AtlasFieldSvc( const std::string& name, ISvcLocator* pSvcLocator )  ATLAS_CTORDTOR_NOT_THREAD_SAFE;
+      AtlasFieldSvc( const std::string& name, ISvcLocator* pSvcLocator );
 
       /** Destructor */
-      virtual ~AtlasFieldSvc()  ATLAS_CTORDTOR_NOT_THREAD_SAFE ;
+      virtual ~AtlasFieldSvc();
 
       /** Athena algorithm's interface methods */
-      virtual StatusCode  initialize  ATLAS_NOT_THREAD_SAFE () override;
+      virtual StatusCode  initialize() override;
       virtual StatusCode  finalize() override;
 
       /** Read **/
       virtual void handle(const Incident& runIncident) override;
 
       /** Call back for possible magnet current update **/
-      StatusCode updateCurrent ATLAS_NOT_THREAD_SAFE (IOVSVC_CALLBACK_ARGS);
+      StatusCode updateCurrent(IOVSVC_CALLBACK_ARGS);
 
       /** Call back for possible magnet filename update **/
-      StatusCode updateMapFilenames ATLAS_NOT_THREAD_SAFE (IOVSVC_CALLBACK_ARGS);
+      StatusCode updateMapFilenames(IOVSVC_CALLBACK_ARGS);
 
       /** get B field value at given position */
       /** xyz[3] is in mm, bxyz[3] is in kT */
diff --git a/MagneticField/MagFieldServices/src/AtlasFieldSvc.cxx b/MagneticField/MagFieldServices/src/AtlasFieldSvc.cxx
index 91e2a91d46cbeb33557279199e364c44c4854b7f..9bb04bfd1092cd6a71a3129b8aaf49f4442808b5 100644
--- a/MagneticField/MagFieldServices/src/AtlasFieldSvc.cxx
+++ b/MagneticField/MagFieldServices/src/AtlasFieldSvc.cxx
@@ -90,7 +90,7 @@ MagField::AtlasFieldSvc::~AtlasFieldSvc()
 }
 
 /** framework methods */
-StatusCode MagField::AtlasFieldSvc::initialize ATLAS_NOT_THREAD_SAFE ( )
+StatusCode MagField::AtlasFieldSvc::initialize( )
 {
     ATH_MSG_INFO( "initialize() ..." );
 
@@ -211,7 +211,7 @@ StatusCode MagField::AtlasFieldSvc::importCurrents(AtlasFieldSvcTLS &tls)
 }
 
 /** callback for possible magnet current update **/
-StatusCode MagField::AtlasFieldSvc::updateCurrent ATLAS_NOT_THREAD_SAFE (IOVSVC_CALLBACK_ARGS)
+StatusCode MagField::AtlasFieldSvc::updateCurrent(IOVSVC_CALLBACK_ARGS)
 {
     // get magnet currents from DCS
     double solcur(0.);
@@ -304,7 +304,7 @@ StatusCode MagField::AtlasFieldSvc::updateCurrent ATLAS_NOT_THREAD_SAFE (IOVSVC_
 }
 
 /** callback for possible field map filenames update **/
-StatusCode MagField::AtlasFieldSvc::updateMapFilenames ATLAS_NOT_THREAD_SAFE (IOVSVC_CALLBACK_ARGS)
+StatusCode MagField::AtlasFieldSvc::updateMapFilenames(IOVSVC_CALLBACK_ARGS)
 {
     ATH_MSG_INFO( "reading magnetic field map filenames from COOL" );
 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/MuonPrepRawData/MMPrepData_p1.h b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/MuonPrepRawData/MMPrepData_p1.h
index f6382d41025b08df4a146eaf362f014168509acb..9e9faa0037fd0b21fe491408893b01e90f0ad277 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/MuonPrepRawData/MMPrepData_p1.h
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/MuonPrepRawData/MMPrepData_p1.h
@@ -43,7 +43,7 @@ namespace Muon
 	std::vector<float>        m_stripDriftDist;
 	std::vector<Amg::MatrixX> m_stripDriftErrors;
 
-  int m_author; // contains the info about which cluster builder tool produced the PRD
+  int m_author = 0; // contains the info about which cluster builder tool produced the PRD
         
         //@}
         
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MMPrepDataCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MMPrepDataCnv_p1.cxx
index 9afba6d518f4fb308b31fff05e12bb8762f61323..da3beb2151df3838d5a4d8fd3bee7cd48938b4fd 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MMPrepDataCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MMPrepDataCnv_p1.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "MuonPrepRawData/MMPrepData.h"
@@ -58,6 +58,7 @@ persToTrans( const Muon::MMPrepData_p1 *persObj, Muon::MMPrepData *transObj,MsgS
 				transObj->identify(),
                                 transObj->detectorElement(),
                                 log);
+  transObj->setAuthor(static_cast<Muon::MMPrepData::Author>(persObj->m_author));
 }
 
 void MMPrepDataCnv_p1::
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MMPrepDataCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MMPrepDataCnv_p1_test.cxx
index bd2f4670d611597afa73154ed4950eb780d40ef3..edd4baa0eb175f6d0e1dfb3f97ab85a8fa13900e 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MMPrepDataCnv_p1_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MMPrepDataCnv_p1_test.cxx
@@ -1,8 +1,6 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
-
-// $Id$
 /**
  * @file MuonEventTPCnv/test/MMPrepDataCnv_p1_test.cxx
  * @author scott snyder <snyder@bnl.gov>
@@ -41,6 +39,7 @@ void compare (const Muon::MuonCluster& p1,
 void compare (const Muon::MMPrepData& p1,
               const Muon::MMPrepData& p2)
 {
+  assert (p1.author() == p2.author());
   compare (static_cast<const Muon::MuonCluster&>(p1),
            static_cast<const Muon::MuonCluster&>(p2));
   assert (p1.detectorElement() == p2.detectorElement());
@@ -80,6 +79,7 @@ void test1()
                            rdoList,
                            new Amg::MatrixX(cov),
                            nullptr);
+  trans1.setAuthor (Muon::MMPrepData::ConstraintuTPCClusterBuilder);
                           
   testit (trans1);
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MMPrepDataContainerCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MMPrepDataContainerCnv_p1_test.cxx
index 3dbbe5d65df9a8b70109d07621d565ed70a6d6a6..5f4a64b2b19eeee1880c6ccc77db6ec87171444c 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MMPrepDataContainerCnv_p1_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MMPrepDataContainerCnv_p1_test.cxx
@@ -42,6 +42,7 @@ void compare (const Muon::MuonCluster& p1,
 void compare (const Muon::MMPrepData& p1,
               const Muon::MMPrepData& p2)
 {
+  assert (p1.author() == p2.author());
   assert (p1.identify() == p2.identify());
   compare (static_cast<const Muon::MuonCluster&>(p1),
            static_cast<const Muon::MuonCluster&>(p2));
@@ -117,6 +118,7 @@ makeclusts (const MuonGM::MuonDetectorManager& muo_dd)
          rdoList,
          new Amg::MatrixX(cov),
          muo_dd.getMMReadoutElement (clusId));
+      cl->setAuthor (Muon::MMPrepData::ProjectionClusterBuilder);
       coll->push_back (std::move (cl));
     }
     assert(cont->addCollection (coll.release(), hash));
diff --git a/MuonSpectrometer/MuonConfig/python/MuonBytestreamDecodeConfig.py b/MuonSpectrometer/MuonConfig/python/MuonBytestreamDecodeConfig.py
index ac542423ddc94bd48cc0df26a2f733ea7dfa7135..8f58c38694b5270dead7455c2c90f23628ec5902 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonBytestreamDecodeConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonBytestreamDecodeConfig.py
@@ -228,8 +228,8 @@ if __name__=="__main__":
     cfg=ComponentAccumulator()
     
     # Seem to need this to read BS properly
-    from ByteStreamCnvSvc.ByteStreamConfig import TrigBSReadCfg
-    cfg.merge(TrigBSReadCfg(ConfigFlags ))
+    from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
+    cfg.merge(ByteStreamReadCfg(ConfigFlags ))
 
     # Schedule Rpc data decoding
     rpcdecodingAcc = RpcBytestreamDecodeCfg( ConfigFlags ) 
diff --git a/MuonSpectrometer/MuonConfig/python/MuonRdoDecodeConfig.py b/MuonSpectrometer/MuonConfig/python/MuonRdoDecodeConfig.py
index 0932823f79f26b3be6ddd1113bebc8ca8e263511..f3a55a6af013914745314c581af74dece3e8e522 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonRdoDecodeConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonRdoDecodeConfig.py
@@ -224,8 +224,8 @@ def muonRdoDecodeTestData( forTrigger = False ):
     cfg=ComponentAccumulator()
 
     # Seem to need this to read BS properly
-    from ByteStreamCnvSvc.ByteStreamConfig import TrigBSReadCfg
-    cfg.merge(TrigBSReadCfg(ConfigFlags ))
+    from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
+    cfg.merge(ByteStreamReadCfg(ConfigFlags ))
 
     # Add the MuonCache to ComponentAccumulator for trigger/RoI testing mode
     if forTrigger:
diff --git a/MuonSpectrometer/MuonDetDescr/MuonAGDD/MuonAGDD/MuonAGDDTool.h b/MuonSpectrometer/MuonDetDescr/MuonAGDD/MuonAGDD/MuonAGDDTool.h
index f9b1e323f6967700f530930fd3c48d00cc3a6e04..b0032c8eda77fd050eb7434f8cdaafffda920093 100644
--- a/MuonSpectrometer/MuonDetDescr/MuonAGDD/MuonAGDD/MuonAGDDTool.h
+++ b/MuonSpectrometer/MuonDetDescr/MuonAGDD/MuonAGDD/MuonAGDDTool.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 MuonAGDDTool_H
@@ -20,8 +20,7 @@ class IToolSvc;
 class MuonAGDDTool: public AGDDToolBase
 {
 public:
-	MuonAGDDTool(const std::string& type, const std::string& name, 
-				 const IInterface* parent);
+	MuonAGDDTool(const std::string& type, const std::string& name, const IInterface* parent);
 	virtual StatusCode construct();
 	
 	virtual StatusCode initialize();
@@ -32,6 +31,8 @@ private:
 	std::vector<std::string> m_structuresFromFlags;
 	std::string m_outFileType;
 	std::string m_outPREsqlName;
+	std::string m_DBFileName;
+	std::string m_agdd2GeoSvcName;
 
 	bool m_readAGDD;
 	bool m_dumpAGDD;
diff --git a/MuonSpectrometer/MuonDetDescr/MuonAGDD/MuonAGDD/NSWAGDDTool.h b/MuonSpectrometer/MuonDetDescr/MuonAGDD/MuonAGDD/NSWAGDDTool.h
index f91c9ed8f8c3a66b18c63a47e8688b6c0baf307e..afd6fa7e2896231508258ace41b15525b80f1e26 100644
--- a/MuonSpectrometer/MuonDetDescr/MuonAGDD/MuonAGDD/NSWAGDDTool.h
+++ b/MuonSpectrometer/MuonDetDescr/MuonAGDD/MuonAGDD/NSWAGDDTool.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 NSWAGDDTool_H
@@ -17,8 +17,7 @@ namespace MuonGM
 class NSWAGDDTool: public AGDDToolBase
 {
 public:
-	NSWAGDDTool(const std::string& type, const std::string& name, 
-				 const IInterface* parent);
+	NSWAGDDTool(const std::string& type, const std::string& name, const IInterface* parent);
 	virtual StatusCode construct();
 	
 	virtual StatusCode initialize();
@@ -36,6 +35,8 @@ private:
 
 	std::string m_outFileType;
 	std::string m_outPREsqlName;
+	std::string m_DBFileName;
+	std::string m_agdd2GeoSvcName;
 
 	bool m_readAGDD;
 	bool m_dumpAGDD;
diff --git a/MuonSpectrometer/MuonDetDescr/MuonAGDD/src/MuonAGDDTool.cxx b/MuonSpectrometer/MuonDetDescr/MuonAGDD/src/MuonAGDDTool.cxx
index 8cc4c830566ab8a9c11daefcde9705659c58f050..66f9790e635d17919ff51bd1673003d0b80bf939 100644
--- a/MuonSpectrometer/MuonDetDescr/MuonAGDD/src/MuonAGDDTool.cxx
+++ b/MuonSpectrometer/MuonDetDescr/MuonAGDD/src/MuonAGDDTool.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 "MuonAGDD/MuonAGDDTool.h"
@@ -16,19 +16,23 @@
 
 using namespace MuonGM;
 
-MuonAGDDTool::MuonAGDDTool(const std::string& type, const std::string& name, 
-				 const IInterface* parent):AGDDToolBase(type,name,parent),
-					m_overrideConfiguration(false),m_buildNSW(true)
+MuonAGDDTool::MuonAGDDTool(const std::string& type, const std::string& name, const IInterface* parent) :
+    AGDDToolBase(type,name,parent),
+    m_outPREsqlName(""),
+    m_overrideConfiguration(false),
+    m_buildNSW(true)
 #ifndef SIMULATIONBASE
 					, p_AmdcsimrecAthenaSvc ( "AmdcsimrecAthenaSvc",name )
 #endif
 {
   	declareProperty( "Structures" ,     m_structuresToBuild);
 	declareProperty( "ReadAGDD",   		m_readAGDD = true);
-	declareProperty( "DumpAGDD",		m_dumpAGDD = false);
+	declareProperty( "DumpAGDD",		m_dumpAGDD = false, "write blob from DB into text file");
 	declareProperty( "OverrideConfiguration",m_overrideConfiguration = false);
 	declareProperty( "BuildNSW",		m_buildNSW = true);
 	declareProperty( "OutputFileType",	m_outFileType = "AGDD", "Name for database table");
+	declareProperty( "OutputFileName",	m_DBFileName = "", "specify name for DB text file");
+	declareProperty( "AGDDtoGeoSvcName", m_agdd2GeoSvcName = "AGDDtoGeoSvc", "specify name of AGDDtoGeoSvc");
 }
 
 StatusCode MuonAGDDTool::initialize()
@@ -39,6 +43,10 @@ StatusCode MuonAGDDTool::initialize()
 
 	ATH_CHECK(AGDDToolBase::initialize());
 
+	if (m_DBFileName.empty()) {
+		m_DBFileName = "Generated_" + m_outFileType + "_pool.txt";
+	}
+
 	// please see more details on regarding the dependency on AMDB on ATLASSIM-3636
 	// and the CMakeLists.txt . the NSWAGDDTool avoids the dependency already
 #ifndef SIMULATIONBASE
@@ -48,6 +56,7 @@ StatusCode MuonAGDDTool::initialize()
 	if (m_buildNSW) 
 	{
 		MuonAGDDToolHelper theHelper;
+		theHelper.setAGDDtoGeoSvcName(m_agdd2GeoSvcName);
 		theHelper.SetNSWComponents();
 	}
 	
@@ -58,7 +67,8 @@ StatusCode MuonAGDDTool::initialize()
 StatusCode MuonAGDDTool::construct() 
 {
 	MuonAGDDToolHelper theHelper;
-		
+	theHelper.setAGDDtoGeoSvcName(m_agdd2GeoSvcName);
+
 	m_controller->UseGeoModelDetector("Muon");
 	
 	if (!m_locked)
@@ -81,8 +91,8 @@ StatusCode MuonAGDDTool::construct()
 	}
 	
 	ATH_MSG_INFO(" now reading AGDD blob ");
-	
-	std::string AGDDfile=theHelper.GetAGDD(m_dumpAGDD, m_outFileType);
+
+	std::string AGDDfile=theHelper.GetAGDD(m_dumpAGDD, m_outFileType, m_DBFileName);
 #ifndef SIMULATIONBASE
 	if(m_writeDBfile) AGDDfile = p_AmdcsimrecAthenaSvc->GetAgddString();
 #endif
diff --git a/MuonSpectrometer/MuonDetDescr/MuonAGDD/src/MuonAGDDToolHelper.cxx b/MuonSpectrometer/MuonDetDescr/MuonAGDD/src/MuonAGDDToolHelper.cxx
index abdf632b9556e5b0709caf5ee051cc3d62980940..e582c335e369e680674e81b1f019f85bdcd5aac4 100644
--- a/MuonSpectrometer/MuonDetDescr/MuonAGDD/src/MuonAGDDToolHelper.cxx
+++ b/MuonSpectrometer/MuonDetDescr/MuonAGDD/src/MuonAGDDToolHelper.cxx
@@ -38,12 +38,15 @@
 #include "MuonAGDDBase/mmSpacer_TechHandler.h"
 #include "MuonAGDDBase/mm_readoutHandler.h"
 
+#include <TString.h> // for Form
 #include <fstream>
 
 using namespace MuonGM;
 
-MuonAGDDToolHelper::MuonAGDDToolHelper()
-{
+MuonAGDDToolHelper::MuonAGDDToolHelper() :
+    p_RDBAccessSvc(nullptr),
+    p_GeoModelSvc(nullptr),
+    m_svcName("AGDDtoGeoSvc") {
 	StatusCode result;
 	
 	result=Gaudi::svcLocator()->service("GeoModelSvc",p_GeoModelSvc);
@@ -64,10 +67,8 @@ std::vector<std::string>& MuonAGDDToolHelper::ReadAGDDFlags()
 	structuresFromFlags.clear();
    std::string agdd2geoVersion = p_RDBAccessSvc->getChildTag("AGDD2GeoSwitches",p_GeoModelSvc->muonVersion(),"MuonSpectrometer");
 
-//   m_AGDD2GeoSwitches.clear();
    if(!agdd2geoVersion.empty()) 
    {
-//     m_AGDD2GeoSwitchesStamp = m_AGDD2GeoSwitchesStamp + 1;
      std::string TheKEYNAME;
      int TheKEYVALUE;
      IRDBRecordset_ptr pIRDBRecordset = p_RDBAccessSvc->getRecordsetPtr("AGDD2GeoSwitches",p_GeoModelSvc->muonVersion(),"MuonSpectrometer");
@@ -78,8 +79,6 @@ std::vector<std::string>& MuonAGDDToolHelper::ReadAGDDFlags()
        TheKEYVALUE = record->getInt("KEYVALUE");
        if ( TheKEYVALUE == 1 )
        {
-//        std::cout<<"  Add to m_AGDD2GeoSwitches " << TheKEYNAME <<std::endl;
-//		 if (aliases->IsAliased(TheKEYNAME))
          structuresFromFlags.push_back(TheKEYNAME);
        }
      }
@@ -92,7 +91,7 @@ std::vector<std::string>& MuonAGDDToolHelper::ReadAGDDFlags()
 }
 
 
-std::string MuonAGDDToolHelper::GetAGDD(bool dumpIt, std::string tableName)
+std::string MuonAGDDToolHelper::GetAGDD(const bool dumpIt, const std::string& tableName, const std::string& outFileName)
 {
 
    const IGeoModelSvc * geoModel=p_GeoModelSvc;
@@ -125,11 +124,7 @@ std::string MuonAGDDToolHelper::GetAGDD(bool dumpIt, std::string tableName)
    if (dumpIt) 
    {
 	 	std::ofstream  GeneratedFile;
-		std::string fileName;
-		fileName.append("Generated_");
-		fileName.append(tableName);
-		fileName.append("_pool.txt");
-	 	GeneratedFile.open(fileName);
+	 	GeneratedFile.open(outFileName);
 		GeneratedFile<<AgddString<<std::endl;
 		GeneratedFile.close();
    }
@@ -140,45 +135,20 @@ std::string MuonAGDDToolHelper::GetAGDD(bool dumpIt, std::string tableName)
 
 bool MuonAGDDToolHelper::BuildMScomponents() const
 {
-
-//  ATH_MSG_INFO("BuildMScomponents - start");
-
-  StoreGateSvc* pDetStore=0;
+  StoreGateSvc* pDetStore=nullptr;
   ISvcLocator* svcLocator = Gaudi::svcLocator();
-  StatusCode sc=svcLocator->service("DetectorStore",pDetStore);
-  if (sc.isFailure()) 
-    {
-//      ATH_MSG_ERROR("AGDDController could not get at the detector store!");
-    }
-  MuonGM::MuonDetectorManager*	muonMgr;
-  sc = pDetStore->retrieve( muonMgr );
-  if ( sc.isFailure() ) {
-//   ATH_MSG_ERROR(" Cannot retrieve MuonDetectorManager " );
-   return false;
-  }
-
+  if (svcLocator->service("DetectorStore",pDetStore).isFailure()) return false;
+  MuonGM::MuonDetectorManager* muonMgr=nullptr;
+  if (pDetStore->retrieve(muonMgr).isFailure()) return false;
   bool readoutGeoDone =  BuildReadoutGeometry(muonMgr/*, GetMSdetectors*/);
-  if (!readoutGeoDone) {
-//   ATH_MSG_INFO(" Problems met while building the ReadoutGeometry " );
-   return false;
-  }
-//  else ATH_MSG_INFO( "ReadoutGeometry created" );
-//  ATH_MSG_INFO("In BuildMScomponents - done");
-
+  if (!readoutGeoDone) return false;
   return true;
 }
 
 bool MuonAGDDToolHelper::BuildReadoutGeometry(MuonGM::MuonDetectorManager* mgr/*, std::map<GeoFullPhysVol*, std::string>* vec*/) const
 {
   bool geoBuilt = true;  
-//  ATH_MSG_INFO("In BuildReadoutGeometry - start");
 
-  //std::map<std::string, GeoFullPhysVol*>* myMap =  NULL;
-  //myMap = GetMSdetectors();
-  //log<<MSG::INFO<<"In AGDD2GeoSvc::BuildReadoutGeometry - size of the detector map = "<<myMap->size()<<endmsg;
-
-  //std::map<std::string, GeoFullPhysVol*>::const_iterator it;
-  
   detectorList& dList=AGDDDetectorStore::GetDetectorStore()->GetDetectorList();
   detectorList::const_iterator it;
   for (it=dList.begin(); it!=dList.end(); ++it)
@@ -188,7 +158,6 @@ bool MuonAGDDToolHelper::BuildReadoutGeometry(MuonGM::MuonDetectorManager* mgr/*
       {
       std::string chTag = dPos[i]->ID.detectorAddress;
       GeoFullPhysVol* vol = dPos[i]->theVolume;
-//      ATH_MSG_INFO("Building RE for component named <"<<chTag<<">");
       
       std::string stName = chTag.substr(0,4);
       
@@ -205,20 +174,10 @@ bool MuonAGDDToolHelper::BuildReadoutGeometry(MuonGM::MuonDetectorManager* mgr/*
       phiIndex = atoi((chTag.substr(12,1)).c_str());
       mLayer = atoi((chTag.substr(7,1)).c_str());
       
-      //MuonReadoutElement* re = NULL;
       if (chTag.substr(0,3)=="sMD")
 	  {
 	  MMReadoutElement* re = new MMReadoutElement((GeoVFullPhysVol*)vol, stName, etaIndex, phiIndex, mLayer, false, mgr);
 	  std::string myVolName = (chTag.substr(0,8)).c_str();
-	  /* AGDDParameterBagMM* MMparaBag = dynamic_cast<AGDDParameterBagMM*> (AGDDParameterStore::GetParameterStore()->GetParameterBag(myVolName));
-	  if(!MMparaBag) {
-	    std::cout << " not possible to retrieve parameters for <" << myVolName << ": quitting! >" << std::endl;
-		return false;
-	  }
-	  double pitch;
-	  if(iLS==1) pitch = MMparaBag->TechParameters->pitchSS; //small
-	  else pitch = MMparaBag->TechParameters->pitchLS; //large
-	  re->initDesign(MMparaBag->largeX, MMparaBag->smallX, MMparaBag->lengthY, pitch, MMparaBag->TechParameters->thickness); */
 	  re->initDesign(-999., -999., -999., -999., -999.);
 	  re->fillCache();
 	  mgr->addMMReadoutElement_withIdFields(re, iLS, etaIndex, phiIndex, mLayer);
@@ -228,43 +187,23 @@ bool MuonAGDDToolHelper::BuildReadoutGeometry(MuonGM::MuonDetectorManager* mgr/*
 	  {
 	  sTgcReadoutElement* re = new sTgcReadoutElement((GeoVFullPhysVol*)vol, stName, etaIndex, phiIndex, mLayer, false, mgr);	  
 	  std::string myVolName = (chTag.substr(0,8)).c_str();
-	  /*
-	  AGDDParameterBagsTGC* sTGCparaBag = dynamic_cast<AGDDParameterBagsTGC*> (AGDDParameterStore::GetParameterStore()->GetParameterBag(myVolName));
-	  if(!sTGCparaBag) {
-	    std::cout << " not possible to retrieve parameters for <" << myVolName << ": quitting! >" << std::endl;
-		return false;
-	  }
-	  re->initDesign(sTGCparaBag->largeX, sTGCparaBag->smallX, sTGCparaBag->lengthY, sTGCparaBag->TechParameters->stripPitch,
-			 sTGCparaBag->TechParameters->wirePitch, sTGCparaBag->TechParameters->stripWidth, sTGCparaBag->TechParameters->wireWidth,
-			 sTGCparaBag->TechParameters->thickness);
-	  
-	  since the concept of Parameter Bag is dismissed things get hardcoded
-	  initDesign for sTGCReadoutElement only uses stripPitch, strip Width and thickness - all other dimensions (here -999.) are (hard)coded there again
-	  */
 	  re->initDesign(-999., -999., -999., 3.2, -999., 2.7, -999., 2.6);
 	  re->fillCache();
 	  mgr->addsTgcReadoutElement_withIdFields(re, iLS, etaIndex, phiIndex, mLayer);
     re->setDelta(mgr);
 	  }
 	  }
-
-      //aggdContainer->push_back(*it);
   }
-  //std::cout<<"Size of the NSWdetectors = <"<<vec->size()<<"> "<<aggdContainer->size()<<std::cout;
-  //sc=pDetStore->record( aggdContainer ,"NSWdetectors");
   return geoBuilt;
 
 }
 
 void MuonAGDDToolHelper::SetNSWComponents()
 {
-	IAGDDtoGeoSvc* agddsvc;
-	StatusCode result;
-	result=Gaudi::svcLocator()->service("AGDDtoGeoSvc",agddsvc);
-	if (result.isFailure())
-    {
-    	std::cout<<"could not initialize AGDDtoGeoSvc!!! "<<std::endl;
-    }
+	IAGDDtoGeoSvc* agddsvc = nullptr;
+	if (Gaudi::svcLocator()->service(m_svcName,agddsvc).isFailure()) {
+    throw std::runtime_error(Form("File: %s, Line: %d\nMuonAGDDToolHelper::SetNSWComponents() - Could not retrieve %s from ServiceLocator", __FILE__, __LINE__, m_svcName.c_str()));
+  }
 	
 	agddsvc->addHandler(new micromegasHandler("micromegas"));
 	agddsvc->addHandler(new mm_TechHandler("mm_Tech"));
@@ -275,3 +214,7 @@ void MuonAGDDToolHelper::SetNSWComponents()
 	agddsvc->addHandler(new mmSpacer_TechHandler("mmSpacer_Tech"));
 	agddsvc->addHandler(new mm_readoutHandler("mm_readout"));
 }	
+
+void MuonAGDDToolHelper::setAGDDtoGeoSvcName(const std::string& name) {
+  m_svcName = name;
+}
\ No newline at end of file
diff --git a/MuonSpectrometer/MuonDetDescr/MuonAGDD/src/MuonAGDDToolHelper.h b/MuonSpectrometer/MuonDetDescr/MuonAGDD/src/MuonAGDDToolHelper.h
index 4a88db9124efc92b2885138ae437ca149334f43a..7b65dbaea9728ae2936d9608893f72b76f49a4ce 100644
--- a/MuonSpectrometer/MuonDetDescr/MuonAGDD/src/MuonAGDDToolHelper.h
+++ b/MuonSpectrometer/MuonDetDescr/MuonAGDD/src/MuonAGDDToolHelper.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 MUONAGDD_MUONAGDDTOOLHELPER_H
@@ -25,15 +25,18 @@ public:
 	
 	void SetNSWComponents();
 	
-	std::string GetAGDD(bool dumpIt, std::string tableName);
+	std::string GetAGDD(const bool dumpIt, const std::string& tableName, const std::string& outFileName);
 	
 	bool BuildMScomponents() const;
 	bool BuildReadoutGeometry(MuonGM::MuonDetectorManager* mgr) const;
 
+	void setAGDDtoGeoSvcName(const std::string& name);
+
 private:
 
 	IRDBAccessSvc* p_RDBAccessSvc;
 	IGeoModelSvc* p_GeoModelSvc;
+	std::string m_svcName;
 	
 };
 
diff --git a/MuonSpectrometer/MuonDetDescr/MuonAGDD/src/NSWAGDDTool.cxx b/MuonSpectrometer/MuonDetDescr/MuonAGDD/src/NSWAGDDTool.cxx
index 3eef8bc23151d8f7f7d641e199bf8195a5fc20fb..4ae838e48938fb840830a22eeff38f6764fedb45 100644
--- a/MuonSpectrometer/MuonDetDescr/MuonAGDD/src/NSWAGDDTool.cxx
+++ b/MuonSpectrometer/MuonDetDescr/MuonAGDD/src/NSWAGDDTool.cxx
@@ -1,22 +1,24 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "MuonAGDD/NSWAGDDTool.h"
+
 #include "MuonAGDDToolHelper.h"
 #include "AGDDControl/AGDDController.h"
 #include "AGDDControl/AGDD2GeoModelBuilder.h"
 #include "AGDD2GeoSvc/IAGDD2GeoSvc.h"
-
 #include "AGDDModel/AGDDParameterStore.h"
 #include "AGDDKernel/AGDDDetector.h"
 #include "AGDDKernel/AGDDDetectorStore.h"
+
 #include <fstream>
 
 using namespace MuonGM;
 
-NSWAGDDTool::NSWAGDDTool(const std::string& type, const std::string& name, 
-				 const IInterface* parent):AGDDToolBase(type,name,parent)
+NSWAGDDTool::NSWAGDDTool(const std::string& type, const std::string& name, const IInterface* parent) :
+    AGDDToolBase(type,name,parent),
+    m_outPREsqlName("")
 {
 	declareProperty( "ReadAGDD",   		m_readAGDD    = true,           "read description from DB");
 	declareProperty( "DumpAGDD",		m_dumpAGDD    = false,          "write out parsed XML");
@@ -28,6 +30,8 @@ NSWAGDDTool::NSWAGDDTool(const std::string& type, const std::string& name,
 	declareProperty( "OutputFilePASVNAME",	m_outFilePasN = "",		"passive structure version string");
 	declareProperty( "OutputFileFORMAT",	m_outFileForm = "AGDDXML",	"format of output file");
 	declareProperty( "OutputFileType",	m_outFileType = "NSWD", 	"name for database table");
+	declareProperty( "OutputFileName",	m_DBFileName = "", "specify name for DB text file");
+	declareProperty( "AGDDtoGeoSvcName", m_agdd2GeoSvcName = "AGDDtoGeoSvc", "specify name of AGDDtoGeoSvc");
 }
 
 StatusCode NSWAGDDTool::initialize()
@@ -44,7 +48,11 @@ StatusCode NSWAGDDTool::initialize()
 	m_outFileName = "Out.AmdcOracle.AM." + m_outFileType + "temp.data";
 	m_outPREsqlName = "Out.AmdcOracle.AM." + m_outFileType + ".PREsql";
 
-        ATH_CHECK(AGDDToolBase::initialize());
+    ATH_CHECK(AGDDToolBase::initialize());
+
+	if (m_DBFileName.empty()) {
+		m_DBFileName = "Generated_" + m_outFileType + "_pool.txt";
+	}
 	
 	static int iEntries=0;
 	
@@ -52,6 +60,7 @@ StatusCode NSWAGDDTool::initialize()
 	{
 		iEntries=1;
 		MuonAGDDToolHelper theHelper;
+		theHelper.setAGDDtoGeoSvcName(m_agdd2GeoSvcName);
 		theHelper.SetNSWComponents();
 	}
 
@@ -65,6 +74,7 @@ StatusCode NSWAGDDTool::construct()
 	ATH_MSG_INFO(" Name = "<<name());
 	
 	MuonAGDDToolHelper theHelper;
+	theHelper.setAGDDtoGeoSvcName(m_agdd2GeoSvcName);
 	if (!m_readAGDD)
 	{
 		ATH_MSG_INFO(" trying to parse files ");
@@ -73,7 +83,7 @@ StatusCode NSWAGDDTool::construct()
 	else
 	{
 		ATH_MSG_INFO(" trying to parse data base content ");
-		std::string AGDDfile = theHelper.GetAGDD(m_dumpAGDD, m_outFileType);
+		std::string AGDDfile = theHelper.GetAGDD(m_dumpAGDD, m_outFileType, m_DBFileName);
 		m_controller->ParseString(AGDDfile);
 	}
 	
@@ -100,7 +110,6 @@ StatusCode NSWAGDDTool::construct()
 	if(m_writeDBfile)
 	{
 		// build model before writing blob - if Athena crashes the XML is not good and should not become a blob
-		//((AGDD2GeoModelBuilder*)m_controller->GetBuilder())->BuildAllVolumes();
 		ATH_MSG_INFO("\t-- attempting to write output to "<< m_outFileName );
 		if( !m_outFileName.empty() )
 		{
diff --git a/MuonSpectrometer/MuonG4/MuonG4SD/CMakeLists.txt b/MuonSpectrometer/MuonG4/MuonG4SD/CMakeLists.txt
index 6b5fc4af3475f49dcb71df8b23244868218d9c25..4d89fe082969240448a350404b418b8dd889a038 100644
--- a/MuonSpectrometer/MuonG4/MuonG4SD/CMakeLists.txt
+++ b/MuonSpectrometer/MuonG4/MuonG4SD/CMakeLists.txt
@@ -22,19 +22,18 @@ find_package( Geant4 )
 find_package( XercesC )
 find_package( GTest )
 
-# Component(s) in the package:
-atlas_add_component( MuonG4SD
-                     src/*.cxx
-                     src/components/*.cxx
-                     INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} StoreGateLib SGtests GeoPrimitives GaudiKernel MuonSimEvent G4AtlasToolsLib MCTruth )
-
 atlas_add_library( MuonG4SDLib
                    src/*.cxx
                    NO_PUBLIC_HEADERS MuonG4SD
                    INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
                    LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} StoreGateLib SGtests GeoPrimitives GaudiKernel MuonSimEvent G4AtlasToolsLib MCTruth )
 
+# Component(s) in the package:
+atlas_add_component( MuonG4SD
+                     src/components/*.cxx
+                     INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} MuonG4SDLib StoreGateLib SGtests GeoPrimitives GaudiKernel MuonSimEvent G4AtlasToolsLib MCTruth )
+
 atlas_add_test( CSCSensitiveDetector_gtest
                 SOURCES test/CSCSensitiveDetector_gtest.cxx
                 INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${GTEST_INCLUDE_DIRS}
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MMPrepData.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MMPrepData.cxx
index 67a2a0f867ba3a8b00c5a209e89a3fa3a1637382..9083f4d7abe22850d4759c254d7b870ab197973d 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MMPrepData.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MMPrepData.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 "MuonPrepRawData/MMPrepData.h"
@@ -31,7 +31,8 @@ namespace Muon
     m_stripTimes(stripTimes),
     m_stripCharges(stripCharges),
     m_stripDriftDist(),
-    m_stripDriftErrors()
+    m_stripDriftErrors(),
+    m_author (SimpleClusterBuilder)
   { }
 
   MMPrepData::MMPrepData( const Identifier& RDOId,
@@ -51,7 +52,8 @@ namespace Muon
     m_chisqProb(0.0),
     m_stripNumbers(),
     m_stripTimes(),
-    m_stripCharges()
+    m_stripCharges(),
+    m_author (SimpleClusterBuilder)
   { }
 
   MMPrepData::MMPrepData( const Identifier& RDOId,
@@ -72,7 +74,8 @@ namespace Muon
     m_chisqProb(0.0),
     m_stripNumbers(),
     m_stripTimes(),
-    m_stripCharges()
+    m_stripCharges(),
+    m_author (SimpleClusterBuilder)
   { }
 
   MMPrepData::MMPrepData( const Identifier& RDOId,
@@ -92,7 +95,8 @@ namespace Muon
     m_stripTimes(),
     m_stripCharges(),
     m_stripDriftDist(),
-    m_stripDriftErrors()
+    m_stripDriftErrors(),
+    m_author (SimpleClusterBuilder)
   { }
 
   // Destructor:
@@ -114,7 +118,8 @@ namespace Muon
     m_stripTimes(),
     m_stripCharges(),
     m_stripDriftDist(),
-    m_stripDriftErrors()    
+    m_stripDriftErrors(),
+    m_author (SimpleClusterBuilder)
   { }
 
   //copy constructor:
@@ -130,7 +135,8 @@ namespace Muon
     m_stripTimes(RIO.m_stripTimes),
     m_stripCharges(RIO.m_stripCharges),
     m_stripDriftDist(RIO.m_stripDriftDist),
-    m_stripDriftErrors(RIO.m_stripDriftErrors)
+    m_stripDriftErrors(RIO.m_stripDriftErrors),
+    m_author(RIO.m_author)
   { }
 
   //move constructor:
@@ -146,7 +152,8 @@ namespace Muon
     m_stripTimes(RIO.m_stripTimes),
     m_stripCharges(RIO.m_stripCharges),
     m_stripDriftDist(RIO.m_stripDriftDist),
-    m_stripDriftErrors(RIO.m_stripDriftErrors)
+    m_stripDriftErrors(RIO.m_stripDriftErrors),
+    m_author(RIO.m_author)
   { }
 
   /// set the micro-tpc quantities
@@ -185,6 +192,7 @@ namespace Muon
 	m_stripCharges = RIO.m_stripCharges;
 	m_stripDriftDist = RIO.m_stripDriftDist;
 	m_stripDriftErrors = RIO.m_stripDriftErrors;
+	m_author = RIO.m_author;
       }
     return *this;
 
@@ -207,6 +215,7 @@ namespace Muon
 	m_stripCharges = RIO.m_stripCharges;
 	m_stripDriftDist = RIO.m_stripDriftDist;
 	m_stripDriftErrors = RIO.m_stripDriftErrors;
+	m_author = RIO.m_author;
       }
     return *this;
 
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_myTopOptions.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_myTopOptions.py
index 9e2fa8f727b997d67be0de2f2c9d874b24a4b9fc..1d302bc779470817728960542d506a621f0bfbcc 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_myTopOptions.py
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_myTopOptions.py
@@ -1,5 +1,7 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
+from __future__ import print_function
+
 from MuonRecExample.MuonRecFlags import muonRecFlags
 from RecExConfig.RecFlags import rec
 from RecExConfig.RecAlgsFlags import recAlgs
@@ -78,7 +80,6 @@ try:
 except:
     # print the stacktrace (saving could fail, and would then obscure the real problem)
     import traceback
-    from __future__ import print_function
     print ('INFO: MuonRec_myTopOptions.py - stack trace:')
     print (traceback.format_exc().rstrip())
     
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/JetAugmentationTool.h b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/JetAugmentationTool.h
index df941b7ccf00fc0643da87966050e92abc1872e2..f4bc5557f3e873273aad89cea9d48e913e763100 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/JetAugmentationTool.h
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/JetAugmentationTool.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
 */
 
 // JetAugmentationTool.h, (c) ATLAS Detector software
@@ -66,7 +66,6 @@ namespace DerivationFramework {
     //PFlow fJVT
     std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_fjvt;
     std::string m_fjvtMomentKey;
-    bool m_dofjvt;
 
     // b-tagging       @author tripiana@cern.ch
     std::vector<SG::AuxElement::Decorator<float>*> m_dec_btag;
diff --git a/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/src/EventCleaningTestAlg.cxx b/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/src/EventCleaningTestAlg.cxx
index 08f3c23cb974b1146cd77c7727de44922081fed0..59dd4b871cda45c14ae41f90f3646da91235b2e2 100644
--- a/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/src/EventCleaningTestAlg.cxx
+++ b/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/src/EventCleaningTestAlg.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
 */
 
 // EDM includes
@@ -7,8 +7,6 @@
 // Local includes
 #include "EventCleaningTestAlg.h"
 
-static const float GeV = 1000.;
-static const float invGeV = 1./GeV;
 
 //-----------------------------------------------------------------------------
 // Constructor
diff --git a/PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticleContainer.h b/PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticleContainer.h
index bc14d8075330bae2843c99ebc505b0157134e46f..8199b5a3249ada6ab0843cb3c4c62bad59ecce36 100644
--- a/PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticleContainer.h
+++ b/PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticleContainer.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
 */
 
 // TruthParticleContainer.h 
@@ -220,7 +220,7 @@ inline
 std::ostream& TruthParticleContainer::dump( std::ostream& out ) const 
 {
   if ( m_genEvent.isValid() ) {
-    (*m_genEvent)->print( out );
+    HepMC::Print::line(out,*m_genEvent);
   }
   return out;
 }
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetSignificanceTool.h b/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetSignificanceTool.h
index b97f8d17403053ea74cbb15f5cb7f4bc3f5bdde0..a4dc4db8b370a38377421f0c1ebe6c56bec9a623 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetSignificanceTool.h
+++ b/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetSignificanceTool.h
@@ -29,7 +29,7 @@ class HIJetSignificanceTool: public asg::AsgTool,
  public:
   HIJetSignificanceTool(const std::string & name);
 
-  virtual StatusCode initialize();
+  virtual StatusCode initialize() override;
 
   //The modifyJet function has to be replaced by decorate
   //virtual int modifyJet(xAOD::Jet& ) const ;
diff --git a/Reconstruction/Jet/JetRec/JetRec/JetClusterer.h b/Reconstruction/Jet/JetRec/JetRec/JetClusterer.h
index 32fbe46d8b8bed5843b1d39c548b81740c8b46c2..64b71f7bd2e950f6d0c316b40ef139c8b640341b 100644
--- a/Reconstruction/Jet/JetRec/JetRec/JetClusterer.h
+++ b/Reconstruction/Jet/JetRec/JetRec/JetClusterer.h
@@ -19,13 +19,14 @@
 
 #include "xAODEventInfo/EventInfo.h"
 #include "StoreGate/ReadHandleKey.h"
+#include "StoreGate/WriteHandleKey.h"
 
 #include "JetInterface/IJetProvider.h"
 #include "AsgTools/AsgTool.h"
 
 #include "JetRec/PseudoJetContainer.h"
 #include "JetRec/JetFromPseudojet.h"
-
+#include "JetEDM/PseudoJetVector.h"
 
 #include "fastjet/PseudoJet.hh"
 #include "fastjet/AreaDefinition.hh"
@@ -61,7 +62,7 @@ protected:
   SG::ReadHandleKey<PseudoJetContainer> m_inputPseudoJets {this, "InputPseudoJets", "inputpseudojet", "input constituents"};
 
   /// used to build the key under which the final PJ will be stored in evtStore() 
-  std::string m_finalPseudoJets;
+  SG::WriteHandleKey<PseudoJetVector> m_finalPseudoJets {this, "FinalPseudoJets_DONOTSET", "", "output pseudojets -- autoconfigured name"};
   
   // Job options.
   Gaudi::Property<std::string>  m_jetalg {this, "JetAlgorithm", "AntiKt", "alg type : AntiKt, Kt, CA..."};
diff --git a/Reconstruction/Jet/JetRec/JetRec/JetGroomer.h b/Reconstruction/Jet/JetRec/JetRec/JetGroomer.h
index 3cbff98faf653e31b81a69fc7cfc2fb7ec9e6ce0..60bca3c63ccdc57afbdca8c32a31ad5505fbdab6 100644
--- a/Reconstruction/Jet/JetRec/JetRec/JetGroomer.h
+++ b/Reconstruction/Jet/JetRec/JetRec/JetGroomer.h
@@ -9,16 +9,23 @@
 ///
 /// \class JetGroomer
 ///
-/// Creates a new JetContainer by grooming an input jet collection
+/// Base class for tools that create a new JetContainer by grooming an input jet collection
 ///
-/// This tool implements the IJetProvider interface. The JetContainer it returns is built by
-/// running an IJetGroomer tool (e.g. JetTrimmer) on the input jets.
+/// This tool implements the IJetProvider interface. Children should override (only)
+/// the initialize and insertGroomedJet methods, to implement a specific instance of
+/// jet grooming.
 ///
 
 #include "AsgTools/AsgTool.h"
+
 #include "StoreGate/ReadHandleKey.h"
+#include "StoreGate/WriteHandleKey.h"
+
 #include "JetInterface/IJetProvider.h"
-#include "JetInterface/IJetGroomer.h"
+
+#include "JetEDM/PseudoJetVector.h"
+#include "JetRec/PseudoJetContainer.h"
+
 #include "xAODJet/JetContainer.h"
 #include "xAODJet/JetAuxContainer.h"
 
@@ -32,17 +39,23 @@ class JetGroomer
     using asg::AsgTool::AsgTool;
 
     virtual StatusCode initialize() override;
-    virtual std::pair<std::unique_ptr<xAOD::JetContainer>, std::unique_ptr<SG::IAuxStore> > getJets() const override;
 
-  private:
-    // Handle Input JetContainer
-    SG::ReadHandleKey<xAOD::JetContainer> m_inputJetsKey {this, "UngroomedJets", "", "Jet collection to be groomed"};
+    // From IJetProvider
+    virtual std::pair<std::unique_ptr<xAOD::JetContainer>, std::unique_ptr<SG::IAuxStore> > getJets() const override final;
+
+    // Implementation of grooming goes here
+    // The jet is inserted into the output container, which is necessary for speed
+    // in the xAOD container paradigm
+  virtual void insertGroomedJet(const xAOD::Jet&, const PseudoJetContainer&, xAOD::JetContainer&, PseudoJetVector&) const = 0;
+
+  protected:
+  /// Handle Input JetContainer (this contains the parent ungroomed jets to be trimmed)
+  SG::ReadHandleKey<xAOD::JetContainer> m_inputJetContainer {this, "UngroomedJets", "ungroomedinput", "Input ungroomed jet container"};
 
-    // Handle Input PseudoJetContainer
-    // Needed to extract the constituents
-    SG::ReadHandleKey<PseudoJetContainer> m_inputPseudoJetsKey {this, "ParentPseudoJets", "", "Input constituents"};
+  /// This is the input to the parent JetContainer. It is needed in order to re-assign the ghost constituents from the final groomed PJ to the xAOD::Jet
+  SG::ReadHandleKey<PseudoJetContainer> m_inputPseudoJets {this, "ParentPseudoJets", "inputpseudojet", "input constituents of parent JetContainer"};
 
-    ToolHandle<IJetGroomer> m_groomer ={this , "Groomer" , {} , "Tool grooming the jets (trim, prune, softdrop etc)"};
+   SG::WriteHandleKey<PseudoJetVector> m_finalPseudoJets {this, "FinalPseudoJets_DONOTSET", "", "output pseudojets -- autoconfigured name"};
 
 };
 
diff --git a/Reconstruction/Jet/JetRec/JetRec/PseudoJetTranslator.h b/Reconstruction/Jet/JetRec/JetRec/PseudoJetTranslator.h
index 6053fd625d034a8709f3dd97407ee0b0517a6596..84cd8386558978265c2208b4f2ff98c3aa8a1d66 100644
--- a/Reconstruction/Jet/JetRec/JetRec/PseudoJetTranslator.h
+++ b/Reconstruction/Jet/JetRec/JetRec/PseudoJetTranslator.h
@@ -15,14 +15,14 @@ public:
 
   PseudoJetTranslator(bool saveArea, bool saveArea4Vec) : m_saveArea(saveArea), m_saveArea4Vec(saveArea4Vec) {}
   
-  xAOD::Jet * translate(const fastjet::PseudoJet& pj,
-			const PseudoJetContainer& pjCont,
-			xAOD::JetContainer& jetCont) const ;
+  xAOD::Jet& translate(const fastjet::PseudoJet& pj,
+		       const PseudoJetContainer& pjCont,
+		       xAOD::JetContainer& jetCont) const ;
 
-  xAOD::Jet * translate(const fastjet::PseudoJet& pj,
-			const PseudoJetContainer& pjCont,
-			xAOD::JetContainer& jetCont,
-			const xAOD::Jet &parent) const ;
+  xAOD::Jet& translate(const fastjet::PseudoJet& pj,
+		       const PseudoJetContainer& pjCont,
+		       xAOD::JetContainer& jetCont,
+		       const xAOD::Jet &parent) const ;
 
   
   
diff --git a/Reconstruction/Jet/JetRec/Root/JetClusterer.cxx b/Reconstruction/Jet/JetRec/Root/JetClusterer.cxx
index e7ac8847ef1a8fc1dd0eccac20c9ff6cdd604428..fba227864d178fa7510fbb259ad40682dfbd8ca8 100644
--- a/Reconstruction/Jet/JetRec/Root/JetClusterer.cxx
+++ b/Reconstruction/Jet/JetRec/Root/JetClusterer.cxx
@@ -14,7 +14,6 @@
 #include "xAODJet/JetAuxContainer.h"
 
 #include "JetEDM/FastJetUtils.h"
-#include "JetEDM/PseudoJetVector.h"
 
 #include "JetRec/PseudoJetTranslator.h"
 
@@ -25,15 +24,15 @@ namespace JetClustererHelper {
       //const xAOD::EventInfo* pevinfo = handle.cptr();
       auto ievt = ei->eventNumber();
       auto irun = ei->runNumber();
-      
+
       if ( ei->eventType(xAOD::EventInfo::IS_SIMULATION)) {
 	// For MC, use the channel and MC event number
 	ievt = ei->mcEventNumber();
 	irun = ei->mcChannelNumber();
-      }      
+      }
       seeds.push_back(ievt);
       seeds.push_back(irun);
-  }  
+  }
 }
 
 StatusCode JetClusterer::initialize() {
@@ -50,17 +49,22 @@ StatusCode JetClusterer::initialize() {
     ATH_MSG_ERROR("Invalid jet size parameter: " << m_jetrad);
     return StatusCode::FAILURE;
   }
-  
+
   // buld an empty ClusterSequence, just for the fastjet splash screen to appear during initialization (?)
   fastjet::JetDefinition jetdef(m_fjalg, m_jetrad);
   PseudoJetVector empty;
   fastjet::ClusterSequence cs(empty, jetdef);
   cs.inclusive_jets(m_ptmin);
-  
+
   // Input DataHandles
+  if( !m_finalPseudoJets.empty() ) {
+    ATH_MSG_WARNING("A non-empty value was found for the FinalPseudoJets WriteHandleKey -- this will be ignored!");
+  }
+
   ATH_CHECK( m_eventinfokey.initialize() );
   ATH_CHECK( m_inputPseudoJets.initialize() );
-  m_finalPseudoJets = m_inputPseudoJets.key() +"FinalPJ";
+  m_finalPseudoJets = name() + "FinalPJ";
+  ATH_CHECK( m_finalPseudoJets.initialize() );
 
   return StatusCode::SUCCESS;
 }
@@ -78,7 +82,7 @@ std::pair<std::unique_ptr<xAOD::JetContainer>, std::unique_ptr<SG::IAuxStore> >
     return nullreturn;
   }
 
-  // Build the container to be returned 
+  // Build the container to be returned
   // Avoid memory leaks with unique_ptr
   auto jets = std::make_unique<xAOD::JetContainer>();
   auto auxCont = std::make_unique<xAOD::JetAuxContainer>();
@@ -94,7 +98,7 @@ std::pair<std::unique_ptr<xAOD::JetContainer>, std::unique_ptr<SG::IAuxStore> >
   bool useArea = m_ghostarea <= 0 ;
   if ( useArea ) {
     ATH_MSG_DEBUG("Creating input cluster sequence");
-    clSequence = new fastjet::ClusterSequence(*pseudoJetVector, jetdef);    
+    clSequence = new fastjet::ClusterSequence(*pseudoJetVector, jetdef);
   } else {
     // Prepare ghost area specifications -------------
     ATH_MSG_DEBUG("Creating input area cluster sequence");
@@ -104,7 +108,7 @@ std::pair<std::unique_ptr<xAOD::JetContainer>, std::unique_ptr<SG::IAuxStore> >
     else {return nullreturn;}
   }
 
-  
+
   // -----------------------
   // Build a new pointer to a PseudoJetVector containing the final PseudoJet
   // This allows us to own the vector of PseudoJet which we will put in the evt store.
@@ -116,7 +120,7 @@ std::pair<std::unique_ptr<xAOD::JetContainer>, std::unique_ptr<SG::IAuxStore> >
       msg() << "  Pseudojet with pt " << std::setprecision(4) << pj.Et()*1e-3 << " has " << pj.constituents().size() << " constituents" << endmsg;
     }
   }
-  
+
   // Let fastjet deal with deletion of ClusterSequence, so we don't need to also put it in the EventStore.
   clSequence->delete_self_when_unused();
 
@@ -128,19 +132,19 @@ std::pair<std::unique_ptr<xAOD::JetContainer>, std::unique_ptr<SG::IAuxStore> >
   PseudoJetTranslator pjTranslator(useArea, useArea);
   for (const fastjet::PseudoJet &  pj: *pjVector ) {
     // create the xAOD::Jet from the PseudoJet, doing the signal & ghost constituents extraction
-    xAOD::Jet* jet = pjTranslator.translate(pj, *pjContHandle, *jets);
-    
+    xAOD::Jet& jet = pjTranslator.translate(pj, *pjContHandle, *jets);
+
     // Add the PseudoJet onto the xAOD jet. Maybe we should do it in the above JetFromPseudojet call ??
-    pjAccessor(*jet) = &pj;
+    pjAccessor(jet) = &pj;
 
-    jet->setInputType(  xAOD::JetInput::Type( (int) m_inputType) ) ;
+    jet.setInputType(  xAOD::JetInput::Type( (int) m_inputType) ) ;
     xAOD::JetAlgorithmType::ID ialg = xAOD::JetAlgorithmType::algId(m_fjalg);
-    jet->setAlgorithmType(ialg);
-    jet->setSizeParameter((float)m_jetrad);
-    if(useArea) jet->setAttribute(xAOD::JetAttribute::JetGhostArea, (float)m_ghostarea);
-    
-    ATH_MSG_VERBOSE( "  xAOD::Jet with pt " << std::setprecision(4) << jet->pt()*1e-3 << " has " << jet->getConstituents().size() << " constituents" );
-    ATH_MSG_VERBOSE( "  Leading constituent is of type " << jet->getConstituents()[0].rawConstituent()->type());
+    jet.setAlgorithmType(ialg);
+    jet.setSizeParameter((float)m_jetrad);
+    if(useArea) jet.setAttribute(xAOD::JetAttribute::JetGhostArea, (float)m_ghostarea);
+
+    ATH_MSG_VERBOSE( "  xAOD::Jet with pt " << std::setprecision(4) << jet.pt()*1e-3 << " has " << jet.getConstituents().size() << " constituents" );
+    ATH_MSG_VERBOSE( "  Leading constituent is of type " << jet.getConstituents()[0].rawConstituent()->type());
   }
 
   // -------------------------------------
@@ -163,9 +167,9 @@ fastjet::AreaDefinition JetClusterer::buildAreaDefinition(bool & seedsok) const
 
     fastjet::GhostedAreaSpec gspec(5.0, 1, m_ghostarea);
     seedsok = true;
-    
+
     if ( m_ranopt == 1 ) {
-      // Use run/event number as random number seeds.      
+      // Use run/event number as random number seeds.
       auto evtInfoHandle = SG::makeHandle(m_eventinfokey);
       if (!evtInfoHandle.isValid()){
         ATH_MSG_ERROR("Unable to retrieve event info");
@@ -178,7 +182,7 @@ fastjet::AreaDefinition JetClusterer::buildAreaDefinition(bool & seedsok) const
       gspec.set_random_status(inseeds);
     }
 
-    
+
     ATH_MSG_DEBUG("Active area specs:");
     ATH_MSG_DEBUG("  Requested ghost area: " << m_ghostarea);
     ATH_MSG_DEBUG("     Actual ghost area: " << gspec.actual_ghost_area());
diff --git a/Reconstruction/Jet/JetRec/Root/JetGroomer.cxx b/Reconstruction/Jet/JetRec/Root/JetGroomer.cxx
index 44aefcb547a5bd9e113ea5d13be5ddac2c67b8ab..65138a0b6222fda95d80f2f654a301bcaf3b9164 100644
--- a/Reconstruction/Jet/JetRec/Root/JetGroomer.cxx
+++ b/Reconstruction/Jet/JetRec/Root/JetGroomer.cxx
@@ -4,6 +4,7 @@
 
 #include "JetRec/JetGroomer.h"
 
+#include "fastjet/PseudoJet.hh"
 #include "JetRec/PseudoJetContainer.h"
 
 using xAOD::JetContainer;
@@ -12,47 +13,73 @@ StatusCode JetGroomer::initialize() {
 
   ATH_MSG_DEBUG("Initializing...");
 
- if(m_inputJetsKey.empty()){
+ if(m_inputJetContainer.empty()){
     ATH_MSG_ERROR("Jet grooming requested with no input ungroomed jets");
     return StatusCode::FAILURE;
-  } else if(m_inputPseudoJetsKey.empty()){
+  } else if(m_inputPseudoJets.empty()){
     ATH_MSG_ERROR("Jet grooming requested with no input pseudojets");
     return StatusCode::FAILURE;
   }
   else{
-    ATH_CHECK(m_inputJetsKey.initialize());
-    ATH_CHECK(m_inputPseudoJetsKey.initialize());
-    ATH_CHECK(m_groomer.retrieve());
+    if(!m_finalPseudoJets.empty()){
+      ATH_MSG_WARNING("A non-empty value was found for the FinalPseudoJets WriteHandleKey -- this will be ignored!");
+    }
+
+    ATH_CHECK(m_inputJetContainer.initialize());
+    ATH_CHECK(m_inputPseudoJets.initialize());
+    m_finalPseudoJets = name() + "FinalPJ";
+    ATH_CHECK(m_finalPseudoJets.initialize());
   }
 
   return StatusCode::SUCCESS;
 }
 
 
+// Common operations for any jet groomer
 std::pair<std::unique_ptr<xAOD::JetContainer>,std::unique_ptr<SG::IAuxStore> > JetGroomer::getJets() const {
+  // Return this in case of any problems
+  auto nullreturn = std::make_pair(std::unique_ptr<xAOD::JetContainer>(nullptr), std::unique_ptr<SG::IAuxStore>(nullptr));
 
+  // -----------------------
   // retrieve input
-  SG::ReadHandle<JetContainer> inputJets(m_inputJetsKey);
+  SG::ReadHandle<xAOD::JetContainer> jetContHandle(m_inputJetContainer);
+  if(!jetContHandle.isValid()) {
+    ATH_MSG_ERROR("No valid JetContainer with key "<< m_inputJetContainer.key());
+    return nullreturn;
+  }
 
-  if(inputJets.isValid()) {
-    ATH_MSG_DEBUG("Retrieval of ungroomed jets succeeded");
-  } else {
-    ATH_MSG_ERROR("Retrieval of ungroomed jets failed");
-    return std::make_pair(std::unique_ptr<xAOD::JetContainer>(nullptr),std::unique_ptr<SG::IAuxStore>(nullptr));
+  SG::ReadHandle<PseudoJetContainer> pjContHandle(m_inputPseudoJets);
+  if(!pjContHandle.isValid()) {
+    ATH_MSG_ERROR("No valid PseudoJetContainer with key "<< m_inputPseudoJets.key());
+    return nullreturn;
   }
 
-  ATH_MSG_DEBUG("Grooming jets");
-  // Create the output containers
-  // Make sure that memory is managed safely
-  auto outjets = std::make_unique<xAOD::JetContainer>();
-  auto outaux  = std::make_unique<xAOD::JetAuxContainer>();
-  outjets->setStore(outaux.get());
+  // Build the container to be returned
+  // Avoid memory leaks with unique_ptr
+  auto groomedJets = std::make_unique<xAOD::JetContainer>();
+  auto auxCont = std::make_unique<xAOD::JetAuxContainer>();
+  groomedJets->setStore(auxCont.get());
 
-  SG::ReadHandle<PseudoJetContainer> inputPseudoJets(m_inputPseudoJetsKey);
+  // -----------------------
+  // Build a new pointer to a PseudoJetVector containing the final groomed PseudoJets
+  // This allows us to own the vector of PseudoJet which we will put in the evt store.
+  // Thus the contained PseudoJet will be kept frozen there and we can safely use pointer to them from the xAOD::Jet objects
+  auto groomPJVector = std::make_unique<PseudoJetVector>( );
+  groomPJVector->resize( jetContHandle->size() );
+
+  // loop over input jets
+  for (const xAOD::Jet* parentJet: *jetContHandle){
+    // Child will create a groomed jet and insert it into the output container
+    this->insertGroomedJet(*parentJet, *pjContHandle, *groomedJets, *groomPJVector);
+  }
 
-  for (const xAOD::Jet* jet : *inputJets){
-    m_groomer->groom(*jet, *inputPseudoJets, *outjets);
+  // -------------------------------------
+  // record final PseudoJetVector
+  SG::WriteHandle<PseudoJetVector> pjVectorHandle(m_finalPseudoJets);
+  if(!pjVectorHandle.record(std::move(groomPJVector))){
+    ATH_MSG_ERROR("Can't record PseudoJetVector under key "<< m_finalPseudoJets);
+    return nullreturn;
   }
 
-  return std::make_pair(std::move(outjets),std::move(outaux));
+  return std::make_pair(std::move(groomedJets),std::move(auxCont));
 }
diff --git a/Reconstruction/Jet/JetRec/Root/JetTrimmer.cxx b/Reconstruction/Jet/JetRec/Root/JetTrimmer.cxx
index 507e04ecf793816c78453aade05f05810189d17c..5c52857d1e88f09c83153957663d9084b3d21e02 100644
--- a/Reconstruction/Jet/JetRec/Root/JetTrimmer.cxx
+++ b/Reconstruction/Jet/JetRec/Root/JetTrimmer.cxx
@@ -73,8 +73,8 @@ int JetTrimmer::groom(const xAOD::Jet& jin,
   // Add jet to collection.
   xAOD::Jet* pjet = m_bld->add(pjtrim, pjContainer, jets, &jin);
   pjet->setAttribute<int>("TransformType", xAOD::JetTransform::Trim);
-  pjet->setAttribute("RClus", m_rclus);
-  pjet->setAttribute("PtFrac", m_ptfrac);
+  pjet->setAttribute("RClus", float(m_rclus));
+  pjet->setAttribute("PtFrac", float(m_ptfrac));
   pjet->setAttribute<int>("NTrimSubjets", nptrim);
   ATH_MSG_DEBUG("Properties after trimming:");
   ATH_MSG_DEBUG("   ncon: " << pjtrim.constituents().size() << "/"
diff --git a/Reconstruction/Jet/JetRec/Root/PseudoJetTranslator.cxx b/Reconstruction/Jet/JetRec/Root/PseudoJetTranslator.cxx
index c194e9044adf4a0b8898c392c6514862d25952ed..d5ae49d2096e4c0845a69add3e71b138fc58114f 100644
--- a/Reconstruction/Jet/JetRec/Root/PseudoJetTranslator.cxx
+++ b/Reconstruction/Jet/JetRec/Root/PseudoJetTranslator.cxx
@@ -4,53 +4,54 @@
 #include "JetRec/PseudoJetTranslator.h"
 
 
-xAOD::Jet* PseudoJetTranslator::translate(const fastjet::PseudoJet& pj,
+xAOD::Jet& PseudoJetTranslator::translate(const fastjet::PseudoJet& pj,
 					  const PseudoJetContainer& pjCont,
 					  xAOD::JetContainer& jetCont) const {
 
-  xAOD::Jet* jet = new xAOD::Jet();
-  jetCont.push_back(jet);
-  jet->setJetP4( xAOD::JetFourMom_t( pj.pt(), pj.eta(), pj.phi(), pj.m() ) );
+  // Create a new jet in place at the end of the container
+  jetCont.emplace_back(new xAOD::Jet());
+  xAOD::Jet& jet = *jetCont.back();
+  jet.setJetP4( xAOD::JetFourMom_t( pj.pt(), pj.eta(), pj.phi(), pj.m() ) );
 
-  static SG::AuxElement::Accessor<const fastjet::PseudoJet*> pjAccessor("PseudoJet");
-  pjAccessor(*jet) = &pj;
+  const static SG::AuxElement::Accessor<const fastjet::PseudoJet*> pjAccessor("PseudoJet");
+  pjAccessor(jet) = &pj;
 
   // Record the jet-finding momentum, i.e. the one used to find/groom the jet.
-  jet->setJetP4(xAOD::JetConstitScaleMomentum, jet->jetP4());
+  jet.setJetP4(xAOD::JetConstitScaleMomentum, jet.jetP4());
 
   // save area if needed ---------
   if( pj.has_area() ){
 
-    if(m_saveArea) jet->setAttribute(xAOD::JetAttribute::ActiveArea,pj.area());
+    if(m_saveArea) jet.setAttribute(xAOD::JetAttribute::ActiveArea,pj.area());
     if(m_saveArea4Vec){
         fastjet::PseudoJet pja = pj.area_4vector();
         xAOD::JetFourMom_t fvarea(pja.pt(), pja.eta(), pja.phi(), pja.m());
-        jet->setAttribute(xAOD::JetAttribute::ActiveArea4vec, fvarea);      
+        jet.setAttribute(xAOD::JetAttribute::ActiveArea4vec, fvarea);      
     }    
   }// area -------------
   
-  pjCont.extractConstituents(*jet, pj);
+  pjCont.extractConstituents(jet, pj);
 
   return jet;
 }
 
-xAOD::Jet* PseudoJetTranslator::translate(const fastjet::PseudoJet& pj,
+xAOD::Jet& PseudoJetTranslator::translate(const fastjet::PseudoJet& pj,
 					  const PseudoJetContainer& pjCont,
 					  xAOD::JetContainer& jetCont,
 					  const xAOD::Jet &parent ) const {
-  xAOD::Jet * jet = translate(pj, pjCont, jetCont);
+  xAOD::Jet& jet = translate(pj, pjCont, jetCont);
 
   const xAOD::JetContainer* parentCont = dynamic_cast<const xAOD::JetContainer*>(parent.container());
   if ( parentCont == 0 ) { return jet ;}  // can this happen? if so THIS IS an ERROR ! should do something
 
   ElementLink<xAOD::JetContainer> el(*parentCont, parent.index());
-  jet->setAttribute("Parent", el);
+  jet.setAttribute("Parent", el);
 
-  jet->setInputType(parent.getInputType());
-  jet->setAlgorithmType(parent.getAlgorithmType());
-  jet->setSizeParameter(parent.getSizeParameter());
-  jet->setConstituentsSignalState(parent.getConstituentsSignalState());
-  jet->setAttribute(xAOD::JetAttribute::JetGhostArea, parent.getAttribute<float>(xAOD::JetAttribute::JetGhostArea));
+  jet.setInputType(parent.getInputType());
+  jet.setAlgorithmType(parent.getAlgorithmType());
+  jet.setSizeParameter(parent.getSizeParameter());
+  jet.setConstituentsSignalState(parent.getConstituentsSignalState());
+  jet.setAttribute(xAOD::JetAttribute::JetGhostArea, parent.getAttribute<float>(xAOD::JetAttribute::JetGhostArea));
 
   return jet;
 }
diff --git a/Reconstruction/Jet/JetRec/share/JetRecAlgTestCfg.py b/Reconstruction/Jet/JetRec/share/JetRecAlgTestCfg.py
index ad9f2e7cc7553c5f160a5cc769766a10c38b25a0..9232884db3d359d1aeb11019c4c070e5eaff954c 100755
--- a/Reconstruction/Jet/JetRec/share/JetRecAlgTestCfg.py
+++ b/Reconstruction/Jet/JetRec/share/JetRecAlgTestCfg.py
@@ -32,8 +32,8 @@ ConfigFlags.lock()
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 
 # Get a ComponentAccumulator setting up the fundamental Athena job
-from AthenaConfiguration.MainServicesConfig import MainServicesCfg 
-cfg=MainServicesCfg(ConfigFlags) 
+from AthenaConfiguration.MainServicesConfig import MainServicesCfg
+cfg=MainServicesCfg(ConfigFlags)
 
 # Add the components for reading in pool files
 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
@@ -120,7 +120,7 @@ def JetBuildAlgCfg(ConfigFlags,buildjetsname):
         "pjmergealg_"+buildjetsname,
         InputPJContainers = pjcs,
         OutputContainer = "PseudoJetMerged_"+buildjetsname)
-    
+
     buildcfg.addEventAlgo(mergepjalg)
 
     # Create the JetClusterer, set some standard options
@@ -162,15 +162,14 @@ def JetGroomAlgCfg(ConfigFlags,buildjetsname,groomjetsname):
 
     # Create the JetGroomer, provide it with a JetTrimmer
     jtrim = CompFactory.JetTrimming("trimSmallR2Frac5",RClus=0.2,PtFrac=0.05)
-    jtrim.InputJetContainer = buildjetsname
-    jtrim.InputPseudoJets = "PseudoJetMerged_"+buildjetsname
-    jtrim.TrimmedOutputPseudoJets = "PseudoJet"+groomjetsname
+    jtrim.UngroomedJets = buildjetsname
+    jtrim.ParentPseudoJets = "PseudoJetMerged_"+buildjetsname
 
     # Create the JetRecAlg, configure it to use the builder
     # using constructor syntax instead
     # (equivalent to setting properties with "=")
     jra = CompFactory.JetRecAlg(
-        "JRA_groom",
+        "JRA_trim",
         Provider = jtrim,       # Single ToolHandle
         Modifiers = [], # ToolHandleArray
         OutputContainer = groomjetsname)
diff --git a/Reconstruction/Jet/JetRec/src/JetTrimming.cxx b/Reconstruction/Jet/JetRec/src/JetTrimming.cxx
index 445674e9ffa5bb41b0eaa2e33b0cf4ad78c771b5..6379a4d8d0f6e41b49d2b966542f669eda932e13 100644
--- a/Reconstruction/Jet/JetRec/src/JetTrimming.cxx
+++ b/Reconstruction/Jet/JetRec/src/JetTrimming.cxx
@@ -7,124 +7,77 @@
 #include "fastjet/PseudoJet.hh"
 #include "fastjet/JetDefinition.hh"
 #include "fastjet/Selector.hh"
-#include "fastjet/tools/Filter.hh"
 #include "JetEDM/PseudoJetVector.h"
 
 #include "JetRec/PseudoJetTranslator.h"
 
 
-using fastjet::PseudoJet;
-using xAOD::JetContainer;
-
-
+  // tool implementing the operations to convert fastjet::PseudoJet -> xAOD::Jet
+const static PseudoJetTranslator s_pjTranslator(false, false); // false => do not save jet areas
 
 //**********************************************************************
 
 StatusCode JetTrimming::initialize() {
+  ATH_CHECK( JetGroomer::initialize() );
+
+  // Unfortunately not possible to do this because there is no
+  // declareProperty overload for CheckedProperty in AsgTool
+  //
+  // Enforce upper/lower limits of Gaudi::Properties
+  // m_rclus.verifier().setBounds(0.,10.);
+  // m_ptfrac.verifier().setBounds(0.,1.);
   if ( m_rclus < 0.0 || m_rclus > 10.0 ) {
-    ATH_MSG_ERROR("Invalid value for RClus " << m_rclus);
+    ATH_MSG_ERROR("Invalid value " << m_rclus << "for RClus. Allowable range is 0-10");
     return StatusCode::FAILURE;
   }
   if ( m_ptfrac < 0.0 || m_ptfrac > 1.0 ) {
-    ATH_MSG_ERROR("Invalid value for PtFrac " << m_ptfrac);
+    ATH_MSG_ERROR("Invalid value " << m_ptfrac << "for PtFrac. Allowable range is 0-1");
     return StatusCode::FAILURE;
   }
 
-  ATH_CHECK( m_inputPseudoJets.initialize() );
-  ATH_CHECK( m_inputJetContainer.initialize() );
+  // Define the trimmer
+  m_trimmer = std::make_unique<fastjet::Filter>(fastjet::JetDefinition(fastjet::kt_algorithm, m_rclus),
+						fastjet::SelectorPtFractionMin(m_ptfrac));
 
   ATH_MSG_INFO("     Recluster R: " << m_rclus);
   ATH_MSG_INFO("  pT faction min: " << m_ptfrac);
+
   return StatusCode::SUCCESS;
 }
 
 
 //**********************************************************************
-std::pair<std::unique_ptr<xAOD::JetContainer>, std::unique_ptr<SG::IAuxStore> > JetTrimming::getJets() const {
-  // Return this in case of any problems
-  auto nullreturn = std::make_pair(std::unique_ptr<xAOD::JetContainer>(nullptr), std::unique_ptr<SG::IAuxStore>(nullptr));
-
-  // -----------------------
-  // retrieve input
-  SG::ReadHandle<xAOD::JetContainer> jetContHandle(m_inputJetContainer);
-  if(!jetContHandle.isValid()) {
-    ATH_MSG_ERROR("No valid JetContainer with key "<< m_inputJetContainer.key());
-    return nullreturn;
-  }
-
-  SG::ReadHandle<PseudoJetContainer> pjContHandle(m_inputPseudoJets);
-  if(!pjContHandle.isValid()) {
-    ATH_MSG_ERROR("No valid PseudoJetContainer with key "<< m_inputPseudoJets.key());
-    return nullreturn;
-  }
-
-  // Build the container to be returned 
-  // Avoid memory leaks with unique_ptr
-  auto trimmedJets = std::make_unique<xAOD::JetContainer>();
-  auto auxCont = std::make_unique<xAOD::JetAuxContainer>();
-  trimmedJets->setStore(auxCont.get());
-
-
-  // The trimmer 
-  fastjet::Filter trimmer(fastjet::JetDefinition(fastjet::kt_algorithm, m_rclus),
-                          fastjet::SelectorPtFractionMin(m_ptfrac));
-
-  // tool implementing the operations to convert fastjet::PseudoJet -> xAOD::Jet
-  PseudoJetTranslator pjTranslator(false, false); // false => do not save jet areas
-
-  // -----------------------
-  // Build a new pointer to a PseudoJetVector containing the final trimmed PseudoJets
-  // This allows us to own the vector of PseudoJet which we will put in the evt store.
-  // Thus the contained PseudoJet will be kept frozen there and we can safely use pointer to them from the xAOD::Jet objects
-  auto trimPJVector = std::make_unique<PseudoJetVector>( );
-  trimPJVector->resize( jetContHandle->size() );
-  // Accessors to retrieve and set the pointers to PseudoJet 
-  static SG::AuxElement::ConstAccessor<const fastjet::PseudoJet*> pjConstAcc("PseudoJet");
-  static SG::AuxElement::Accessor<const fastjet::PseudoJet*> pjAcc("PseudoJet");
-
-
-  // loop over input jets
-  int count = 0;
-  for (const xAOD::Jet* parentJet: *jetContHandle){
-    // retrieve the PseudoJet from the parent :
-    const PseudoJet * parentPJ = pjConstAcc(*parentJet);
-    
-    // Trim :
-    PseudoJet trimmedPJ = trimmer(*parentPJ) ;
-    (*trimPJVector)[count] = trimmedPJ; // save a *copy* of this trimmed PJ
-    
-    ATH_MSG_VERBOSE("   Input cluster sequence: " << parentPJ->associated_cluster_sequence());
-    ATH_MSG_VERBOSE(" Trimmed cluster sequence: " << trimmedPJ.associated_cluster_sequence());
-
-    // build the xAOD::Jet from the PseudoJet, and put it in the container
-    xAOD::Jet* jet = pjTranslator.translate(trimmedPJ, *pjContHandle, *trimmedJets, *parentJet);
-
-    // decorate with the pointer to the PJ we keep in the evt store. 
-    pjAcc(*jet) = & (*trimPJVector)[count] ; 
-    
-    int nptrim = trimmedPJ.pieces().size();
-    jet->setAttribute<int>(xAOD::JetAttribute::TransformType, xAOD::JetTransform::Trim);
-    jet->setAttribute<int>(xAOD::JetAttribute::NTrimSubjets, nptrim);
-    // Need to convert from GaudiProperty
-    jet->setAttribute(xAOD::JetAttribute::RClus, float(m_rclus));
-    jet->setAttribute(xAOD::JetAttribute::PtFrac, float(m_ptfrac));
-    ATH_MSG_DEBUG("Properties after trimming:");
-    ATH_MSG_DEBUG("   ncon: " << trimmedPJ.constituents().size() << "/"
-		  << parentPJ->constituents().size());
-    ATH_MSG_DEBUG("   nsub: " << nptrim);
-    count++;
-  }
-
-  // -------------------------------------
-  // record final PseudoJetVector
-  SG::WriteHandle<PseudoJetVector> pjVectorHandle(m_finalPseudoJets);
-  if(!pjVectorHandle.record(std::move(trimPJVector))){
-    ATH_MSG_ERROR("Can't record PseudoJetVector under key "<< m_finalPseudoJets);
-    return nullreturn;
-  }
-  
-  // Return the jet container and aux, use move to transfer
-  // ownership of pointers to caller
-  return std::make_pair(std::move(trimmedJets), std::move(auxCont));
 
+void JetTrimming::insertGroomedJet(const xAOD::Jet& parentjet, const PseudoJetContainer& inpjcont, xAOD::JetContainer& outcont, PseudoJetVector& trimpjvec) const {
+
+  const static SG::AuxElement::Accessor<const fastjet::PseudoJet*> s_pjAcc("PseudoJet");
+  const static SG::AuxElement::ConstAccessor<const fastjet::PseudoJet*> s_pjConstAcc("PseudoJet");
+
+  // retrieve the PseudoJet from the parent :
+  const fastjet::PseudoJet& parentPJ = *s_pjConstAcc(parentjet);
+
+  // Trim :
+  fastjet::PseudoJet trimmedPJ = m_trimmer->result(parentPJ) ;
+  ATH_MSG_VERBOSE("   Input cluster sequence: " << parentPJ.associated_cluster_sequence());
+  ATH_MSG_VERBOSE(" Trimmed cluster sequence: " << trimmedPJ.associated_cluster_sequence());
+
+  // build the xAOD::Jet from the PseudoJet, and put it in the container
+  xAOD::Jet& jet = s_pjTranslator.translate(trimmedPJ, inpjcont, outcont, parentjet);
+  // The vector is resized externally to match the jet container size,
+  // so just fill the corresponding entry
+  trimpjvec[jet.index()] = trimmedPJ; // save a *copy* of this trimmed PJ
+
+  // decorate with the pointer to the PJ we keep in the evt store.
+  s_pjAcc(jet) = & trimpjvec[jet.index()];
+
+  int nptrim = trimmedPJ.pieces().size();
+  jet.setAttribute<int>(xAOD::JetAttribute::TransformType, xAOD::JetTransform::Trim);
+  jet.setAttribute<int>(xAOD::JetAttribute::NTrimSubjets, nptrim);
+  // Need to convert from GaudiProperty
+  jet.setAttribute(xAOD::JetAttribute::RClus, float(m_rclus));
+  jet.setAttribute(xAOD::JetAttribute::PtFrac, float(m_ptfrac));
+  ATH_MSG_VERBOSE("Properties after trimming:");
+  ATH_MSG_VERBOSE("   ncon: " << trimmedPJ.constituents().size() << "/"
+		  << parentPJ.constituents().size());
+  ATH_MSG_VERBOSE("   nsub: " << nptrim);
 }
diff --git a/Reconstruction/Jet/JetRec/src/JetTrimming.h b/Reconstruction/Jet/JetRec/src/JetTrimming.h
index faa7d192ac173db6b800ade3607c9b25ed5701fe..4302969abe17fc70af7f247b3efafc6493f26855 100644
--- a/Reconstruction/Jet/JetRec/src/JetTrimming.h
+++ b/Reconstruction/Jet/JetRec/src/JetTrimming.h
@@ -15,47 +15,35 @@
 /// running the trimming procedure on each jet of the parent JetContainer the tool is acting on.
 /// Obviously the parent JetContainer must be present in the evt store, but also the input PseudoJetContainer from which it has been built.
 
-#include "xAODEventInfo/EventInfo.h"
-#include "StoreGate/ReadHandleKey.h"
-#include "xAODJet/JetAuxContainer.h"
+#include "fastjet/PseudoJet.hh"
+#include "fastjet/tools/Filter.hh"
 
-#include "JetInterface/IJetProvider.h"
-#include "AsgTools/AsgTool.h"
+#include "xAODJet/JetContainer.h"
 
+#include "JetInterface/IJetProvider.h"
+#include "JetRec/JetGroomer.h"
 #include "JetRec/PseudoJetContainer.h"
 
-
 class JetTrimming
-: public asg::AsgTool,
-  virtual public JetProvider<xAOD::JetAuxContainer> {
+: virtual public JetGroomer {
   ASG_TOOL_CLASS(JetTrimming, IJetProvider)
 
 public:
 
-  using asg::AsgTool::AsgTool;
+  using JetGroomer::JetGroomer;
 
-  StatusCode initialize() override;
+  StatusCode initialize() override final;
 
-  /// Return the final jets with their aux store.
-  /// Can return a pair of null pointers if an error occurs.
-  std::pair<std::unique_ptr<xAOD::JetContainer>, std::unique_ptr<SG::IAuxStore> > getJets() const override;
+  virtual void insertGroomedJet(const xAOD::Jet&, const PseudoJetContainer&, xAOD::JetContainer&, PseudoJetVector&) const override final;
 
+private:
 
-protected:
+  // The filter object that will apply the grooming
+  std::unique_ptr<fastjet::Filter> m_trimmer;
     
-
-  /// Handle Input JetContainer (this contains the parent ungroomed jets to be trimmed) 
-  SG::ReadHandleKey<xAOD::JetContainer> m_inputJetContainer {this, "InputJetContainer", "ungroomedinput", "Input ungroomed jet container"};
-
-  /// This is the input to the parent JetContainer. It is needed in order to re-assign the ghost constituents from the final trimmed PJ to the xAOD::Jet
-  SG::ReadHandleKey<PseudoJetContainer> m_inputPseudoJets {this, "InputPseudoJets", "inputpseudojet", "input constituents of parent JetContainer"};
-  
-  
   // Job options.
   Gaudi::Property<float> m_rclus        {this, "RClus", 0.3 , "R for reclustering (0 for none)"}; 
   Gaudi::Property<float> m_ptfrac       {this, "PtFrac", 0.03, "pT fraction for retaining subjets"};
-  Gaudi::Property<std::string> m_finalPseudoJets       {this, "TrimmedOutputPseudoJets", "undef", "Key to save the final trimmed pj. Necessary in order to ensure a valid PJ can be linked from xAOD::Jet"};
-  
   
 };
 
diff --git a/Reconstruction/Jet/JetRec/src/components/JetRec_entries.cxx b/Reconstruction/Jet/JetRec/src/components/JetRec_entries.cxx
index 87ea18b902ceac02071a4eaa10fbbc5250129603..bc1988eef2711cb477c5cedbee0cf4f921bb7184 100644
--- a/Reconstruction/Jet/JetRec/src/components/JetRec_entries.cxx
+++ b/Reconstruction/Jet/JetRec/src/components/JetRec_entries.cxx
@@ -27,7 +27,6 @@
 #include "JetRec/JetConstitRemover.h"
 #include "JetRec/JetClusterer.h"
 #include "JetRec/JetCopier.h"
-#include "JetRec/JetGroomer.h"
 
 DECLARE_COMPONENT( JetToolRunner )
 DECLARE_COMPONENT( JetRecTool )
@@ -48,7 +47,6 @@ DECLARE_COMPONENT( JetPseudojetCopier )
 DECLARE_COMPONENT( JetConstitRemover )
 DECLARE_COMPONENT( JetClusterer )
 DECLARE_COMPONENT( JetCopier )
-DECLARE_COMPONENT( JetGroomer )
 DECLARE_COMPONENT( PseudoJetMerger )
 
 DECLARE_COMPONENT( JetAlgorithm )
diff --git a/Reconstruction/Jet/JetSubStructureMomentTools/JetSubStructureMomentTools/EnergyCorrelatorGeneralizedRatiosTool.h b/Reconstruction/Jet/JetSubStructureMomentTools/JetSubStructureMomentTools/EnergyCorrelatorGeneralizedRatiosTool.h
index 8f65864f88a0841eb355341f439a20aff687caef..9fd0c235caf7820084799b5021cb79dc6148640b 100644
--- a/Reconstruction/Jet/JetSubStructureMomentTools/JetSubStructureMomentTools/EnergyCorrelatorGeneralizedRatiosTool.h
+++ b/Reconstruction/Jet/JetSubStructureMomentTools/JetSubStructureMomentTools/EnergyCorrelatorGeneralizedRatiosTool.h
@@ -27,7 +27,8 @@ class EnergyCorrelatorGeneralizedRatiosTool :
     ASG_TOOL_CLASS(EnergyCorrelatorGeneralizedRatiosTool, IJetModifier)
     
     public:
-      // Constructor and destructor
+      
+      /// Constructor
       EnergyCorrelatorGeneralizedRatiosTool(std::string name);
 
       virtual StatusCode initialize() override;
@@ -35,12 +36,106 @@ class EnergyCorrelatorGeneralizedRatiosTool :
       int modifyJet(xAOD::Jet &jet) const override;
 
     private:
+
+      /// ECFG ratio moments structure
+      struct moments_t;
+      
+      /// Configurable as properties
+      bool m_doM3;
       bool m_doN3;
       bool m_doLSeries;
       std::vector<float> m_rawBetaVals; /// Vector of input values before cleaning
-      std::vector<float> m_betaVals; /// Local vector for cleaned up inputs
       bool m_doDichroic;
 
+      /// Map of moment accessors and decorators using beta as the key
+      std::map< float, moments_t > m_moments;
+
+      /// ConstAccessors for L-series ECFs
+      std::unique_ptr< SG::AuxElement::ConstAccessor<float> > m_acc_ECFG_2_1_2;
+      std::unique_ptr< SG::AuxElement::ConstAccessor<float> > m_acc_ECFG_3_1_1;
+      std::unique_ptr< SG::AuxElement::ConstAccessor<float> > m_acc_ECFG_3_2_1;
+      std::unique_ptr< SG::AuxElement::ConstAccessor<float> > m_acc_ECFG_3_2_2;
+      std::unique_ptr< SG::AuxElement::ConstAccessor<float> > m_acc_ECFG_3_3_1;
+      std::unique_ptr< SG::AuxElement::ConstAccessor<float> > m_acc_ECFG_4_2_2;
+      std::unique_ptr< SG::AuxElement::ConstAccessor<float> > m_acc_ECFG_4_4_1;
+      
+      /// Decorator for L-series ECFRs
+      std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_L1;
+      std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_L2;
+      std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_L3;
+      std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_L4;
+      std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_L5;
+
+};
+
+/**
+ * --------------------------------------------------------------------------------
+ * Structure to hold all of the necessary moment information for a single set of
+ * EnergyCorrelatorGeneralized ratio calculations. This includes the prefix and 
+ * suffix, beta, and the necessary accessors and decorators.
+ * --------------------------------------------------------------------------------
+ **/
+
+struct EnergyCorrelatorGeneralizedRatiosTool::moments_t {
+
+  /// Prefix for decorations
+  std::string prefix;
+
+  /// Suffix for decorations
+  std::string suffix;
+
+  /// Beta value for calculations
+  float beta;
+
+  /// ECFG accessors
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_ECFG_2_1;
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_ECFG_3_1;
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_ECFG_3_2;
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_ECFG_4_1;
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_ECFG_4_2;
+
+  /// ECFG ungroomed accessors
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_ECFG_2_1_ungroomed;
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_ECFG_3_1_ungroomed;
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_ECFG_3_2_ungroomed;
+  
+  /// M and N series decorators
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_M2;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_M3;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_N2;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_N3;
+
+  /// Dichroic M and N series decorators
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_M2_dichroic;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_N2_dichroic;
+
+  moments_t (float Beta, std::string Prefix) {
+
+    prefix = Prefix;
+    beta = Beta;
+
+    suffix = GetBetaSuffix(beta);
+
+    acc_ECFG_2_1 = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"ECFG_2_1"+suffix);
+    acc_ECFG_3_1 = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"ECFG_3_1"+suffix);
+    acc_ECFG_3_2 = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"ECFG_3_2"+suffix);
+    acc_ECFG_4_1 = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"ECFG_4_1"+suffix);
+    acc_ECFG_4_2 = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"ECFG_4_2"+suffix);
+
+    acc_ECFG_2_1_ungroomed = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"ECFG_2_1_ungroomed"+suffix);
+    acc_ECFG_3_1_ungroomed = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"ECFG_3_1_ungroomed"+suffix);
+    acc_ECFG_3_2_ungroomed = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"ECFG_3_2_ungroomed"+suffix);
+    
+    dec_M2 = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"M2"+suffix);
+    dec_M3 = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"M3"+suffix);
+    dec_N2 = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"N2"+suffix);
+    dec_N3 = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"N3"+suffix);
+    
+    dec_M2_dichroic = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"M2_dichroic"+suffix);
+    dec_N2_dichroic = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"N2_dichroic"+suffix);
+
+  }
+
 };
 
 #endif
diff --git a/Reconstruction/Jet/JetSubStructureMomentTools/JetSubStructureMomentTools/EnergyCorrelatorGeneralizedTool.h b/Reconstruction/Jet/JetSubStructureMomentTools/JetSubStructureMomentTools/EnergyCorrelatorGeneralizedTool.h
index 7f4169048884d3e0a80eb634c4550bc1a2207949..c997afcbc51b53c5700b1065f36bbf412ebaf1dd 100644
--- a/Reconstruction/Jet/JetSubStructureMomentTools/JetSubStructureMomentTools/EnergyCorrelatorGeneralizedTool.h
+++ b/Reconstruction/Jet/JetSubStructureMomentTools/JetSubStructureMomentTools/EnergyCorrelatorGeneralizedTool.h
@@ -25,9 +25,10 @@
 class EnergyCorrelatorGeneralizedTool :
   public JetSubStructureMomentToolsBase {
     ASG_TOOL_CLASS(EnergyCorrelatorGeneralizedTool, IJetModifier)
-    
+
     public:
-      // Constructor and destructor
+
+      /// Constructor
       EnergyCorrelatorGeneralizedTool(std::string name);
 
       virtual StatusCode initialize() override;
@@ -35,13 +36,82 @@ class EnergyCorrelatorGeneralizedTool :
       int modifyJet(xAOD::Jet &injet) const override;
 
     private:
+
+      /// ECFG moments structure
+      struct moments_t;
+
+      /// Configurable as properties
       float m_Beta;
+      bool m_doM3;
       bool m_doN3;
       bool m_doLSeries;
       std::vector<float> m_rawBetaVals; /// Vector of input values before cleaning
-      std::vector<float> m_betaVals; /// Local vector for cleaned up inputs
       bool m_doDichroic;
 
+      /// Map of moment decorators using beta as the key
+      std::map< float, moments_t > m_moments;
+
+      /// Decorators for L-series ECFs
+      std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_ECFG_2_1_2;
+      std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_ECFG_3_1_1;
+      std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_ECFG_3_2_1;
+      std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_ECFG_3_2_2;
+      std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_ECFG_3_3_1;
+      std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_ECFG_4_2_2;
+      std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_ECFG_4_4_1;
+
+  };
+
+/**
+ * --------------------------------------------------------------------------------
+ * Structure to hold all of the necessary moment information for a single set of 
+ * EnergyCorrelatorGeneralized calculations. This includes the prefix and suffix, 
+ * beta, and the necessary decorators.
+ * --------------------------------------------------------------------------------
+ **/
+
+struct EnergyCorrelatorGeneralizedTool::moments_t {
+
+  /// Prefix for decorations
+  std::string prefix;
+
+  /// Suffix for decorations
+  std::string suffix;
+
+  /// Beta value for calculations
+  float beta;
+
+  /// ECFG decorators
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_ECFG_2_1;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_ECFG_3_1;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_ECFG_3_2;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_ECFG_4_1;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_ECFG_4_2;
+  
+  /// ECFG ungroomed decorators
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_ECFG_2_1_ungroomed;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_ECFG_3_1_ungroomed;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_ECFG_3_2_ungroomed;
+  
+  moments_t (float Beta, std::string Prefix) {
+
+    prefix = Prefix;
+    beta = Beta;
+
+    suffix = GetBetaSuffix(beta);
+
+    dec_ECFG_2_1 = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"ECFG_2_1"+suffix);
+    dec_ECFG_3_1 = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"ECFG_3_1"+suffix);
+    dec_ECFG_3_2 = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"ECFG_3_2"+suffix);
+    dec_ECFG_4_1 = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"ECFG_4_1"+suffix);
+    dec_ECFG_4_2 = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"ECFG_4_2"+suffix);
+    
+    dec_ECFG_2_1_ungroomed = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"ECFG_2_1_ungroomed"+suffix);
+    dec_ECFG_3_1_ungroomed = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"ECFG_3_1_ungroomed"+suffix);
+    dec_ECFG_3_2_ungroomed = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"ECFG_3_2_ungroomed"+suffix);
+
+  }
+
 };
 
 #endif
diff --git a/Reconstruction/Jet/JetSubStructureMomentTools/JetSubStructureMomentTools/EnergyCorrelatorRatiosTool.h b/Reconstruction/Jet/JetSubStructureMomentTools/JetSubStructureMomentTools/EnergyCorrelatorRatiosTool.h
index 6148b1e3210488420183ea10934258d3b155002a..3ec8f99a473156b02e79627620f78d65ed7b138f 100644
--- a/Reconstruction/Jet/JetSubStructureMomentTools/JetSubStructureMomentTools/EnergyCorrelatorRatiosTool.h
+++ b/Reconstruction/Jet/JetSubStructureMomentTools/JetSubStructureMomentTools/EnergyCorrelatorRatiosTool.h
@@ -25,9 +25,10 @@
 class EnergyCorrelatorRatiosTool :
   public JetSubStructureMomentToolsBase {
     ASG_TOOL_CLASS(EnergyCorrelatorRatiosTool, IJetModifier)
-    
+
     public:
-      // Constructor and destructor
+
+      /// Constructor
       EnergyCorrelatorRatiosTool(std::string name);
      
       virtual StatusCode initialize() override;
@@ -35,12 +36,89 @@ class EnergyCorrelatorRatiosTool :
       int modifyJet(xAOD::Jet &jet) const override;
 
     private:
+
+      /// ECF ratio moments structure
+      struct moments_t;
+
+      /// Configurable as properties
       bool m_doC3;
       bool m_doC4;
       std::vector<float> m_rawBetaVals; /// Vector of input values before cleaning
-      std::vector<float> m_betaVals; /// Local vector for cleaned up inputs
       bool m_doDichroic;
 
+      /// Map of moment accessors and decorators using beta as the key
+      std::map< float, moments_t > m_moments;
+
+  };
+
+/**
+ * --------------------------------------------------------------------------------
+ * Structure to hold all of the necessary moment information for a single set of
+ * EnergyCorrelator ratio calculations. This includes the prefix and suffix, beta,
+ * and the necessary accessors and decorators.
+ * --------------------------------------------------------------------------------
+ **/
+
+struct EnergyCorrelatorRatiosTool::moments_t {
+
+  /// Prefix for decorations
+  std::string prefix;
+
+  /// Suffix for decorations
+  std::string suffix;
+
+  /// Beta value for calculations
+  float beta;
+
+  /// ECF accessors
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_ECF1;
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_ECF2;
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_ECF3;
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_ECF4;
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_ECF5;
+
+  /// ECF ungroomed accessors
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_ECF1_ungroomed;
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_ECF2_ungroomed;
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_ECF3_ungroomed;
+
+  /// C and D series decorators
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_C1;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_C2;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_C3;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_C4;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_D2;
+
+  /// Dichroic C and D series decorators
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_D2_dichroic;
+
+  moments_t (float Beta, std::string Prefix) {
+
+    prefix = Prefix;
+    beta = Beta;
+
+    suffix = GetBetaSuffix(beta);
+
+    acc_ECF1 = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"ECF1"+suffix);
+    acc_ECF2 = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"ECF2"+suffix);
+    acc_ECF3 = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"ECF3"+suffix);
+    acc_ECF4 = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"ECF4"+suffix);
+    acc_ECF5 = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"ECF5"+suffix);
+
+    acc_ECF1_ungroomed = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"ECF1_ungroomed"+suffix);
+    acc_ECF2_ungroomed = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"ECF2_ungroomed"+suffix);
+    acc_ECF3_ungroomed = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"ECF3_ungroomed"+suffix);
+
+    dec_C1 = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"C1"+suffix);
+    dec_C2 = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"C2"+suffix);
+    dec_C3 = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"C3"+suffix);
+    dec_C4 = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"C4"+suffix);
+    dec_D2 = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"D2"+suffix);
+
+    dec_D2_dichroic = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"D2_dichroic"+suffix);
+
+  }
+
 };
 
 #endif
diff --git a/Reconstruction/Jet/JetSubStructureMomentTools/JetSubStructureMomentTools/EnergyCorrelatorTool.h b/Reconstruction/Jet/JetSubStructureMomentTools/JetSubStructureMomentTools/EnergyCorrelatorTool.h
index 10653bc77b8ebad5da5a280dc663e4fbf6fb0682..66159e793a8d773e42c672c7c64ebf4785013219 100644
--- a/Reconstruction/Jet/JetSubStructureMomentTools/JetSubStructureMomentTools/EnergyCorrelatorTool.h
+++ b/Reconstruction/Jet/JetSubStructureMomentTools/JetSubStructureMomentTools/EnergyCorrelatorTool.h
@@ -25,9 +25,10 @@
 class EnergyCorrelatorTool :
   public JetSubStructureMomentToolsBase {
     ASG_TOOL_CLASS(EnergyCorrelatorTool, IJetModifier)
-    
+
     public:
-      // Constructor and destructor
+      
+      /// Constructor
       EnergyCorrelatorTool(std::string name);
      
       virtual StatusCode initialize() override;
@@ -35,12 +36,71 @@ class EnergyCorrelatorTool :
       int modifyJet(xAOD::Jet &injet) const override;
 
     private:
+
+      /// ECF moments structure
+      struct moments_t;
+
+      /// Configurable as properties
       float m_Beta;
       bool m_doC3;
       bool m_doC4;
       std::vector<float> m_rawBetaVals; /// Vector of input values before cleaning
-      std::vector<float> m_betaVals; /// Local vector for cleaned up inputs
       bool m_doDichroic;
+      
+      /// Map of moment calculators and decorators using beta as the key
+      std::map< float, moments_t > m_moments;
+
+  };
+
+/**
+ * --------------------------------------------------------------------------------
+ * Structure to hold all of the necessary moment information for a single set of
+ * EnergyCorrelator calculations. This includes the prefix and suffix, beta, and
+ * the necessary decorators.
+ * --------------------------------------------------------------------------------
+ **/
+
+struct EnergyCorrelatorTool::moments_t {
+
+  /// Prefix for decorations
+  std::string prefix;
+
+  /// Suffix for decorations
+  std::string suffix;
+
+  /// Beta value for calculations
+  float beta;
+
+  /// ECF decorators
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_ECF1;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_ECF2;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_ECF3;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_ECF4;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_ECF5;
+
+  /// ECF ungroomed decorators
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_ECF1_ungroomed;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_ECF2_ungroomed;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_ECF3_ungroomed;
+
+  moments_t (float Beta, std::string Prefix) {
+
+    prefix = Prefix;
+    beta = Beta;
+
+    suffix = GetBetaSuffix(beta);
+
+    dec_ECF1 = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"ECF1"+suffix);
+    dec_ECF2 = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"ECF2"+suffix);
+    dec_ECF3 = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"ECF3"+suffix);
+    dec_ECF4 = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"ECF4"+suffix);
+    dec_ECF5 = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"ECF5"+suffix);
+
+    dec_ECF1_ungroomed = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"ECF1_ungroomed"+suffix);
+    dec_ECF2_ungroomed = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"ECF2_ungroomed"+suffix);
+    dec_ECF3_ungroomed = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"ECF3_ungroomed"+suffix);
+
+  }
 
 };
 
diff --git a/Reconstruction/Jet/JetSubStructureMomentTools/JetSubStructureMomentTools/NSubjettinessRatiosTool.h b/Reconstruction/Jet/JetSubStructureMomentTools/JetSubStructureMomentTools/NSubjettinessRatiosTool.h
index 49bdf099de909ee959fb9be9888c10cb7fc33a1c..8262e7c0f7949d075a34a967ca49b28d509c69f3 100644
--- a/Reconstruction/Jet/JetSubStructureMomentTools/JetSubStructureMomentTools/NSubjettinessRatiosTool.h
+++ b/Reconstruction/Jet/JetSubStructureMomentTools/JetSubStructureMomentTools/NSubjettinessRatiosTool.h
@@ -27,7 +27,8 @@ class NSubjettinessRatiosTool :
     ASG_TOOL_CLASS(NSubjettinessRatiosTool, IJetModifier)
 
     public:
-      // Constructor and destructor
+
+      /// Constructor
       NSubjettinessRatiosTool(std::string name);
 
       StatusCode initialize();
@@ -35,9 +36,123 @@ class NSubjettinessRatiosTool :
       int modifyJet(xAOD::Jet &jet) const;
 
     private:
+
+      /// N-subjettiness ratio moments structure
+      struct moments_t;
+
+      /// Configurable as properties
       std::vector<float> m_rawAlphaVals; /// Vector of input values before cleaning
-      std::vector<float> m_alphaVals; /// Local vector for cleaned up inputs
       bool m_doDichroic;
+  
+      /// Map of moment accessors and decorators using alpha as the key
+      std::map< float, moments_t > m_moments;
+
+  };
+
+/**
+ * --------------------------------------------------------------------------------
+ * Structure to hold all of the necessary moment information for a single set of
+ * NSubjettiness ratio calculations. This includes the prefix and suffix, alpha, 
+ * and the necessary accessors and decorators.
+ * --------------------------------------------------------------------------------
+ **/
+
+struct NSubjettinessRatiosTool::moments_t {
+
+  /// Prefix for decorations
+  std::string prefix;
+
+  /// Suffix for decorations
+  std::string suffix;
+
+  /// Beta value for calculations
+  float alpha;
+
+  /// NSubjettiness accessors
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_Tau1;
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_Tau2;
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_Tau3;
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_Tau4;
+
+  /// NSubjettiness ungroomed accessors
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_Tau2_ungroomed;
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_Tau3_ungroomed;
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_Tau4_ungroomed;
+
+  /// WTA NSubjettiness accessors
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_Tau1_wta;
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_Tau2_wta;
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_Tau3_wta;
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_Tau4_wta;
+
+  /// WTA NSubjettiness ungroomed accessors
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_Tau2_wta_ungroomed;
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_Tau3_wta_ungroomed;
+  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_Tau4_wta_ungroomed;
+
+  /// NSubjettiness Ratios decorators
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau21;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau32;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau42;
+
+  /// Dichroic NSubjettiness Ratios decorators
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau21_dichroic;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau32_dichroic;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau42_dichroic;
+
+  /// WTA NSubjettiness Ratios decorators
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau21_wta;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau32_wta;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau42_wta;
+
+  /// WTA Dichroic NSubjettiness Ratios decorators
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau21_wta_dichroic;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau32_wta_dichroic;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau42_wta_dichroic;
+
+  moments_t (float Alpha, std::string Prefix) {
+
+    prefix = Prefix;
+    alpha = Alpha;
+
+    suffix = GetAlphaSuffix(alpha);
+
+    acc_Tau1 = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"Tau1"+suffix);
+    acc_Tau2 = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"Tau2"+suffix);
+    acc_Tau3 = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"Tau3"+suffix);
+    acc_Tau4 = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"Tau4"+suffix);
+
+    acc_Tau2_ungroomed = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"Tau2_ungroomed"+suffix);
+    acc_Tau3_ungroomed = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"Tau3_ungroomed"+suffix);
+    acc_Tau4_ungroomed = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"Tau4_ungroomed"+suffix);
+
+    acc_Tau1_wta = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"Tau1_wta"+suffix);
+    acc_Tau2_wta = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"Tau2_wta"+suffix);
+    acc_Tau3_wta = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"Tau3_wta"+suffix);
+    acc_Tau4_wta = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"Tau4_wta"+suffix);
+
+    acc_Tau2_wta_ungroomed = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"Tau2_wta_ungroomed"+suffix);
+    acc_Tau3_wta_ungroomed = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"Tau3_wta_ungroomed"+suffix);
+    acc_Tau4_wta_ungroomed = std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"Tau4_wta_ungroomed"+suffix);
+
+    dec_Tau21 = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau21"+suffix);
+    dec_Tau32 = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau32"+suffix);
+    dec_Tau42 = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau42"+suffix);
+
+    dec_Tau21_dichroic = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau21_dichroic"+suffix);
+    dec_Tau32_dichroic = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau32_dichroic"+suffix);
+    dec_Tau42_dichroic = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau42_dichroic"+suffix);
+
+    dec_Tau21_wta = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau21_wta"+suffix);
+    dec_Tau32_wta = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau32_wta"+suffix);
+    dec_Tau42_wta = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau42_wta"+suffix);
+
+    dec_Tau21_wta_dichroic = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau21_wta_dichroic"+suffix);
+    dec_Tau32_wta_dichroic = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau32_wta_dichroic"+suffix);
+    dec_Tau42_wta_dichroic = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau42_wta_dichroic"+suffix);
+
+  }
+
 };
 
 #endif
diff --git a/Reconstruction/Jet/JetSubStructureMomentTools/JetSubStructureMomentTools/NSubjettinessTool.h b/Reconstruction/Jet/JetSubStructureMomentTools/JetSubStructureMomentTools/NSubjettinessTool.h
index df9087ef86d7945db1d0509105e7311d6db66960..500b645d794a9d6f568ee7728b68aab4dff3a81a 100644
--- a/Reconstruction/Jet/JetSubStructureMomentTools/JetSubStructureMomentTools/NSubjettinessTool.h
+++ b/Reconstruction/Jet/JetSubStructureMomentTools/JetSubStructureMomentTools/NSubjettinessTool.h
@@ -35,11 +35,85 @@ class NSubjettinessTool :
       int modifyJet(xAOD::Jet &injet) const;
 
     private:
+
+      /// N-subjettiness moments structure
+      struct moments_t;
+
+      /// Configurable as properties
       float m_Alpha;
       std::vector<float> m_rawAlphaVals; /// Vector of input values before cleaning
-      std::vector<float> m_alphaVals; /// Local vector for cleaned up inputs
       bool m_doDichroic;
-      
+
+      /// Map of decorators using alpha as the key
+      std::map< float, moments_t > m_moments;
+
+  };
+
+/**
+ * --------------------------------------------------------------------------------
+ * Structure to hold all of the necessary moment information for a single set of
+ * NSubjettiness calculations. This includes the prefix and suffix, alpha, and the
+ * necessary decorators.
+ * --------------------------------------------------------------------------------
+ **/
+
+struct NSubjettinessTool::moments_t {
+
+  /// Prefix for decorations
+  std::string prefix;
+
+  /// Alpha value for calculations
+  float alpha;
+
+  /// NSubjettiness decorators
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau1;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau2;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau3;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau4;
+
+  /// NSubjettiness ungroomed decorators
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau2_ungroomed;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau3_ungroomed;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau4_ungroomed;
+
+  /// WTA NSubjettiness decorators
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau1_wta;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau2_wta;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau3_wta;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau4_wta;
+
+  /// WTA NSubjettiness ungroomed decorators
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau2_wta_ungroomed;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau3_wta_ungroomed;
+  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau4_wta_ungroomed;
+
+  moments_t (float Alpha, std::string Prefix) {
+
+    prefix = Prefix;
+    alpha = Alpha;
+
+    std::string suffix = GetAlphaSuffix(alpha);
+
+    dec_Tau1 = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau1"+suffix);
+    dec_Tau2 = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau2"+suffix);
+    dec_Tau3 = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau3"+suffix);
+    dec_Tau4 = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau4"+suffix);
+
+    dec_Tau2_ungroomed = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau2_ungroomed"+suffix);
+    dec_Tau3_ungroomed = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau3_ungroomed"+suffix);
+    dec_Tau4_ungroomed = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau4_ungroomed"+suffix);
+
+    dec_Tau1_wta = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau1_wta"+suffix);
+    dec_Tau2_wta = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau2_wta"+suffix);
+    dec_Tau3_wta = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau3_wta"+suffix);
+    dec_Tau4_wta = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau4_wta"+suffix);
+
+    dec_Tau2_wta_ungroomed = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau2_wta_ungroomed"+suffix);
+    dec_Tau3_wta_ungroomed = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau3_wta_ungroomed"+suffix);
+    dec_Tau4_wta_ungroomed = std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau4_wta_ungroomed"+suffix);
+
+  }
+
 };
 
 #endif
diff --git a/Reconstruction/Jet/JetSubStructureMomentTools/Root/EnergyCorrelatorGeneralizedRatiosTool.cxx b/Reconstruction/Jet/JetSubStructureMomentTools/Root/EnergyCorrelatorGeneralizedRatiosTool.cxx
index c0438a37449a499a5a27698c1254d51fec292d3d..ac2ade3f53e2b8225ac15c3afb1f8d3fc16393e7 100644
--- a/Reconstruction/Jet/JetSubStructureMomentTools/Root/EnergyCorrelatorGeneralizedRatiosTool.cxx
+++ b/Reconstruction/Jet/JetSubStructureMomentTools/Root/EnergyCorrelatorGeneralizedRatiosTool.cxx
@@ -8,214 +8,261 @@
 EnergyCorrelatorGeneralizedRatiosTool::EnergyCorrelatorGeneralizedRatiosTool(std::string name) : 
   JetSubStructureMomentToolsBase(name)
 {
-  declareProperty("BetaList", m_rawBetaVals = {});
-  declareProperty("DoN3", m_doN3 = false);
-  declareProperty("DoLSeries", m_doLSeries = false);
+  declareProperty("BetaList",   m_rawBetaVals = {});
+  declareProperty("DoM3",       m_doM3 = false);
+  declareProperty("DoN3",       m_doN3 = false);
+  declareProperty("DoLSeries",  m_doLSeries = false);
   declareProperty("DoDichroic", m_doDichroic = false);
 }
 
 StatusCode EnergyCorrelatorGeneralizedRatiosTool::initialize() {
 
-  // Add beta = 1.0 by default
-  m_betaVals.push_back(1.0);
+  /// Call base class initialize to fix up m_prefix
+  ATH_CHECK( JetSubStructureMomentToolsBase::initialize() );
 
-  // Clean up input list of beta values
-  for(float beta : m_rawBetaVals) {
+  /// Add beta = 1.0 by default
+  m_moments.emplace( 1.0, moments_t(1.0, m_prefix) );
 
-    // Round to the nearest 0.1
+  /// Clean up input list of beta values
+  for( float beta : m_rawBetaVals ) {
+
+    /// Round to the nearest 0.1
     float betaFix = round( beta * 10.0 ) / 10.0;
-    if(std::abs(beta-betaFix) > 1.0e-5) ATH_MSG_DEBUG("beta = " << beta << " has been rounded to " << betaFix);
+    if( std::abs(beta-betaFix) > 1.0e-5 ) ATH_MSG_DEBUG( "beta = " << beta << " has been rounded to " << betaFix );
 
-    // Skip negative values of beta
-    if(betaFix < 0.0) {
-      ATH_MSG_WARNING("beta must be positive. Skipping beta = " << beta);
+    /// Skip negative values of beta
+    if( betaFix < 0.0 ) {
+      ATH_MSG_WARNING( "beta must be positive. Skipping beta = " << beta );
       continue;
     }
 
-    // Only store value if it is not already in the list
-    if( std::find(m_betaVals.begin(), m_betaVals.end(), betaFix) == m_betaVals.end() ) m_betaVals.push_back(betaFix);
+    /// Store value. std::map::emplace prevents duplicate entries
+    m_moments.emplace( betaFix, moments_t(betaFix, m_prefix) );
+
   }
 
-  for(float beta : m_betaVals) {
-    ATH_MSG_DEBUG("Including beta = " << beta);
+  /// Print out list of beta values to debug stream
+  for( auto const& moment : m_moments ) {
+    ATH_MSG_DEBUG( "Including beta = " << moment.first );
   }
 
-  ATH_CHECK(JetSubStructureMomentToolsBase::initialize());
+  /// Initialize accessors for L-series
+  m_acc_ECFG_2_1_2 = std::make_unique< SG::AuxElement::Accessor<float> >(m_prefix+"ECFG_2_1_2");
+  m_acc_ECFG_3_1_1 = std::make_unique< SG::AuxElement::Accessor<float> >(m_prefix+"ECFG_3_1_1");
+  m_acc_ECFG_3_2_1 = std::make_unique< SG::AuxElement::Accessor<float> >(m_prefix+"ECFG_3_2_1");
+  m_acc_ECFG_3_2_2 = std::make_unique< SG::AuxElement::Accessor<float> >(m_prefix+"ECFG_3_2_2");
+  m_acc_ECFG_3_3_1 = std::make_unique< SG::AuxElement::Accessor<float> >(m_prefix+"ECFG_3_3_1");
+  m_acc_ECFG_4_2_2 = std::make_unique< SG::AuxElement::Accessor<float> >(m_prefix+"ECFG_4_2_2");
+  m_acc_ECFG_4_4_1 = std::make_unique< SG::AuxElement::Accessor<float> >(m_prefix+"ECFG_4_4_1");
+
+  /// Initialize decorators for L-series
+  m_dec_L1 = std::make_unique< SG::AuxElement::Decorator<float> >(m_prefix+"L1");
+  m_dec_L2 = std::make_unique< SG::AuxElement::Decorator<float> >(m_prefix+"L2");
+  m_dec_L3 = std::make_unique< SG::AuxElement::Decorator<float> >(m_prefix+"L3");
+  m_dec_L4 = std::make_unique< SG::AuxElement::Decorator<float> >(m_prefix+"L4");
+  m_dec_L5 = std::make_unique< SG::AuxElement::Decorator<float> >(m_prefix+"L5");
 
   return StatusCode::SUCCESS;
+
 }
 
 int EnergyCorrelatorGeneralizedRatiosTool::modifyJet(xAOD::Jet &jet) const {
 
-  for(float beta : m_betaVals) {
-    std::string suffix = GetBetaSuffix(beta);
+  for( auto const& moment : m_moments ) {
+
+    std::string suffix = moment.second.suffix;
 
-    if (!jet.isAvailable<float>(m_prefix+"ECFG_2_1"+suffix)) {
-      ATH_MSG_WARNING("Energy correlation function " << m_prefix << "ECFG_2_1" << suffix << "' is not available. Exiting..");
+    /// Check to make sure all of the necessary ECFG decorations are available
+    if( !moment.second.acc_ECFG_2_1->isAvailable(jet) ) {
+      ATH_MSG_WARNING( "Energy correlation function " << m_prefix << "ECFG_2_1" << suffix << "' is not available. Exiting." );
       return 1;
     }
 
-    if (!jet.isAvailable<float>(m_prefix+"ECFG_3_2"+suffix)) {
-      ATH_MSG_WARNING("Energy correlation function " << m_prefix << "ECFG_3_2" << suffix << "' is not available. Exiting..");
+    if( !moment.second.acc_ECFG_3_2->isAvailable(jet) ) {
+      ATH_MSG_WARNING( "Energy correlation function " << m_prefix << "ECFG_3_2" << suffix << "' is not available. Exiting." );
       return 1;
     }
 
-    if(m_doN3) {
-      if (!jet.isAvailable<float>(m_prefix+"ECFG_3_1"+suffix)) {
-        ATH_MSG_WARNING("Energy correlation function " << m_prefix << "ECFG_3_1" << suffix << "' is not available. Exiting..");
+    if( m_doM3 || m_doN3 ) {
+      if( !moment.second.acc_ECFG_3_1->isAvailable(jet) ) {
+        ATH_MSG_WARNING( "Energy correlation function " << m_prefix << "ECFG_3_1" << suffix << "' is not available. Exiting." );
         return 1;
       }
+    }
 
-      if (!jet.isAvailable<float>(m_prefix+"ECFG_4_2"+suffix)) {
-        ATH_MSG_WARNING("Energy correlation function " << m_prefix << "ECFG_4_2" << suffix << "' is not available. Exiting..");
+    if( m_doM3 ) {
+      if( !moment.second.acc_ECFG_4_1->isAvailable(jet) ) {
+        ATH_MSG_WARNING( "Energy correlation function " << m_prefix << "ECFG_4_1" << suffix << "' is not available. Exiting." );
         return 1;
       }
     }
 
-    if (m_doDichroic) {
-      if (!jet.isAvailable<float>(m_prefix+"ECFG_2_1_ungroomed"+suffix)) {
-        ATH_MSG_WARNING("Energy correlation function " << m_prefix << "ECFG_2_1_ungroomed" << suffix << "' is not available. Exiting..");
+    if( m_doN3 ) {
+      if( !moment.second.acc_ECFG_4_2->isAvailable(jet) ) {
+        ATH_MSG_WARNING( "Energy correlation function " << m_prefix << "ECFG_4_2" << suffix << "' is not available. Exiting." );
         return 1;
       }
+    }
 
-      if (!jet.isAvailable<float>(m_prefix+"ECFG_3_1_ungroomed"+suffix)) {
-        ATH_MSG_WARNING("Energy correlation function " << m_prefix << "ECFG_3_1_ungroomed" << suffix << "' is not available. Exiting..");
+    if( m_doDichroic ) {
+      if( !moment.second.acc_ECFG_2_1_ungroomed->isAvailable(jet) ) {
+        ATH_MSG_WARNING( "Energy correlation function " << m_prefix << "ECFG_2_1_ungroomed" << suffix << "' is not available. Exiting." );
         return 1;
       }
 
-      if(m_doN3) {
-        if (!jet.isAvailable<float>(m_prefix+"ECFG_3_2_ungroomed"+suffix)) {
-          ATH_MSG_WARNING("Energy correlation function " << m_prefix << "ECFG_3_2_ungroomed" << suffix << "' is not available. Exiting..");
-          return 1;
-        }
+      if( !moment.second.acc_ECFG_3_1_ungroomed->isAvailable(jet) ) {
+        ATH_MSG_WARNING( "Energy correlation function " << m_prefix << "ECFG_3_1_ungroomed" << suffix << "' is not available. Exiting." );
+        return 1;
       }
-    }
 
-    float ecfg_2_1 = jet.getAttribute<float>(m_prefix+"ECFG_2_1"+suffix);
-    float ecfg_3_1 = jet.getAttribute<float>(m_prefix+"ECFG_3_1"+suffix);
-    float ecfg_3_2 = jet.getAttribute<float>(m_prefix+"ECFG_3_2"+suffix);
-    float ecfg_4_2 = jet.getAttribute<float>(m_prefix+"ECFG_4_2"+suffix);
+      if( !moment.second.acc_ECFG_3_2_ungroomed->isAvailable(jet) ) {
+        ATH_MSG_WARNING( "Energy correlation function " << m_prefix << "ECFG_3_2_ungroomed" << suffix << "' is not available. Exiting." );
+        return 1;
+      }
+    }
 
+    float ecfg_2_1 = (*moment.second.acc_ECFG_2_1)(jet);
+    float ecfg_3_1 = (*moment.second.acc_ECFG_3_1)(jet);
+    float ecfg_3_2 = (*moment.second.acc_ECFG_3_2)(jet);
+    float ecfg_4_1 = (*moment.second.acc_ECFG_4_2)(jet);
+    float ecfg_4_2 = (*moment.second.acc_ECFG_4_2)(jet);
+    
     float ecfg_2_1_ungroomed = -999.0;
     float ecfg_3_1_ungroomed = -999.0;
     float ecfg_3_2_ungroomed = -999.0;
 
-    if (m_doDichroic) {
-      ecfg_2_1_ungroomed = jet.getAttribute<float>(m_prefix+"ECFG_2_1_ungroomed"+suffix);
-      ecfg_3_1_ungroomed = jet.getAttribute<float>(m_prefix+"ECFG_3_1_ungroomed"+suffix);
-      ecfg_3_2_ungroomed = jet.getAttribute<float>(m_prefix+"ECFG_3_2_ungroomed"+suffix);
+    if( m_doDichroic ) {
+      ecfg_2_1_ungroomed = (*moment.second.acc_ECFG_2_1_ungroomed)(jet);
+      ecfg_3_1_ungroomed = (*moment.second.acc_ECFG_3_1_ungroomed)(jet);
+      ecfg_3_2_ungroomed = (*moment.second.acc_ECFG_3_2_ungroomed)(jet);
     }
 
-    // N2
-    if(ecfg_2_1 > 1e-8) { // Prevent div-0
-      jet.setAttribute(m_prefix+"N2"+suffix, ecfg_3_2 / (pow(ecfg_2_1, 2.0)));
+    float M2 = -999.0;
+    float M3 = -999.0;
+
+    float N2 = -999.0;
+    float N3 = -999.0;
+    
+    float M2_dichroic = -999.0;
+    float N2_dichroic = -999.0;
 
-      if(ecfg_3_2_ungroomed > 1e-8 && ecfg_2_1_ungroomed > 1e-8)
-        jet.setAttribute(m_prefix+"N2_dichroic"+suffix, ecfg_3_2_ungroomed / (ecfg_2_1_ungroomed * ecfg_2_1));
-      else
-        jet.setAttribute(m_prefix+"N2_dichroic"+suffix, -999.0);
+    /// M2
+    if( ecfg_2_1 > 1e-8 ) /// Prevent div-0
+    {
+     
+      M2 = ecfg_3_1 / ecfg_2_1;
+
+      if( ecfg_3_1_ungroomed > 1e-8 )
+      {
+        M2_dichroic = ecfg_3_1_ungroomed / ecfg_2_1;
+      }
+    
     }
-    else {
-      jet.setAttribute(m_prefix+"N2"+suffix, -999.0);
-      jet.setAttribute(m_prefix+"N2_dichroic"+suffix, -999.0);
+    
+    /// M3
+    if( m_doM3 && ecfg_3_1 > 1e-8 ) /// Prevent div-0
+    {
+      M3 = ecfg_4_1 / ecfg_3_1;
     }
 
-    // N3
-    if(m_doN3 && ecfg_3_1 > 1e-8) // Prevent div-0
-      jet.setAttribute(m_prefix+"N3"+suffix, ecfg_4_2 / (pow(ecfg_3_1, 2.0)));
-    else
-      jet.setAttribute(m_prefix+"N3"+suffix, -999.0);
+    /// N2
+    if( ecfg_2_1 > 1e-8 ) /// Prevent div-0
+    {
+      
+      N2 = ecfg_3_2 / pow( ecfg_2_1, 2.0 );
 
-    // M2
-    if(ecfg_2_1 > 1e-8) { // Prevent div-0
-      jet.setAttribute(m_prefix+"M2"+suffix, ecfg_3_1 / ecfg_2_1);
+      if( ecfg_3_2_ungroomed > 1e-8 && ecfg_2_1_ungroomed > 1e-8 )
+      {
+        N2_dichroic = ecfg_3_2_ungroomed / ( ecfg_2_1_ungroomed * ecfg_2_1 );
+      }
 
-      if(ecfg_3_1_ungroomed > 1e-8)
-        jet.setAttribute(m_prefix+"M2_dichroic"+suffix, ecfg_3_1_ungroomed / ecfg_2_1);
-      else
-        jet.setAttribute(m_prefix+"M2_dichroic"+suffix, -999.0);
     }
-    else {
-      jet.setAttribute(m_prefix+"M2"+suffix, -999.0);
-      jet.setAttribute(m_prefix+"M2_dichroic"+suffix, -999.0);
+
+    /// N3
+    if( m_doN3 && ecfg_3_1 > 1e-8 ) /// Prevent div-0
+    {
+      N3 = ecfg_4_2 / pow( ecfg_3_1, 2.0 );
     }
 
+    (*moment.second.dec_M2)(jet) = M2;
+    (*moment.second.dec_M3)(jet) = M3;
+    
+    (*moment.second.dec_N2)(jet) = N2;
+    (*moment.second.dec_N3)(jet) = N3;
+    
+    (*moment.second.dec_M2_dichroic)(jet) = M2_dichroic;
+    (*moment.second.dec_N2_dichroic)(jet) = N2_dichroic;
+
   }
 
-  if (m_doLSeries) {
-    // These are for t/H discrimination
-    if (!jet.isAvailable<float>(m_prefix+"ECFG_2_1_2") ||
-        !jet.isAvailable<float>(m_prefix+"ECFG_3_1_1") ||
-        !jet.isAvailable<float>(m_prefix+"ECFG_3_2_1") ||
-        !jet.isAvailable<float>(m_prefix+"ECFG_3_2_2") ||
-        !jet.isAvailable<float>(m_prefix+"ECFG_4_2_2") ||
-        !jet.isAvailable<float>(m_prefix+"ECFG_3_3_1") ||
-        !jet.isAvailable<float>(m_prefix+"ECFG_4_4_1")) {
+  /**
+   * ------------------------------------------------------------------
+   * L-series ECFG ratios (experimental for ttH t/H discrimination)
+   *
+   * The exponents E are determined in order to make the ratios dimensionless
+   *
+   * E = (a*n) / (b*m)
+   * for an ECFG_X_Y_Z, a=Y, n=Z
+   *
+   * e.g. for L1
+   * ecfg_3_3_1 / ecfg_2_1_2
+   * E = (3*1) / (1*2) = 3./2.
+   * ------------------------------------------------------------------
+   */
+
+  float L1 = -999.0;
+  float L2 = -999.0;
+  float L3 = -999.0;
+  float L4 = -999.0;
+  float L5 = -999.0;
+
+  if( m_doLSeries ) {
+
+    if( !m_acc_ECFG_2_1_2->isAvailable(jet) ||
+        !m_acc_ECFG_3_1_1->isAvailable(jet) ||
+        !m_acc_ECFG_3_2_1->isAvailable(jet) ||
+        !m_acc_ECFG_3_2_2->isAvailable(jet) ||
+        !m_acc_ECFG_3_3_1->isAvailable(jet) ||
+        !m_acc_ECFG_4_2_2->isAvailable(jet) ||
+        !m_acc_ECFG_4_4_1->isAvailable(jet) ) {
       ATH_MSG_WARNING("L series energy correlation functions with prefix '" << m_prefix << "' are not all available. Exiting..");
       return 1;
     }
-  }
-
-  float ecfg_2_1_2 = -999.0;
-  float ecfg_3_1_1 = -999.0;
-  float ecfg_3_2_1 = -999.0;
-  float ecfg_3_2_2 = -999.0;
-  float ecfg_4_2_2 = -999.0;
-  float ecfg_3_3_1 = -999.0;
-  float ecfg_4_4_1 = -999.0;
-
-  if (m_doLSeries) {
-    ecfg_2_1_2 = jet.getAttribute<float>(m_prefix+"ECFG_2_1_2");
-    ecfg_3_1_1 = jet.getAttribute<float>(m_prefix+"ECFG_3_1_1");
-    ecfg_3_2_1 = jet.getAttribute<float>(m_prefix+"ECFG_3_2_1");  
-    ecfg_3_2_2 = jet.getAttribute<float>(m_prefix+"ECFG_3_2_2");
-    ecfg_4_2_2 = jet.getAttribute<float>(m_prefix+"ECFG_4_2_2");
-    ecfg_3_3_1 = jet.getAttribute<float>(m_prefix+"ECFG_3_3_1");
-    ecfg_4_4_1 = jet.getAttribute<float>(m_prefix+"ECFG_4_4_1");
-  }
-
-  // L-series variables
-  // (experimental for ttH t/H discrimination)
-
-  /*
-     The exponents are determined in order to make 
-     the whole thing dimensionless
 
-     E = (a*n) / (b*m)
-     for an ECFG_X_Y_Z, a=Y, n=Z
+    float ecfg_2_1_2 = (*m_acc_ECFG_2_1_2)(jet);
+    float ecfg_3_1_1 = (*m_acc_ECFG_3_1_1)(jet);
+    float ecfg_3_2_1 = (*m_acc_ECFG_3_2_1)(jet);
+    float ecfg_3_2_2 = (*m_acc_ECFG_3_2_2)(jet);
+    float ecfg_3_3_1 = (*m_acc_ECFG_3_3_1)(jet);
+    float ecfg_4_2_2 = (*m_acc_ECFG_4_2_2)(jet);
+    float ecfg_4_4_1 = (*m_acc_ECFG_4_4_1)(jet);
+
+    if( ecfg_2_1_2 > 1e-8 ) /// Prevent div-0
+    {
+      L1 = ecfg_3_2_1 / pow( ecfg_2_1_2, 1.0 );
+      L2 = ecfg_3_3_1 / pow( ecfg_2_1_2, (3.0/2.0) );
+    }
 
-     e.g. for L1
+    if( ecfg_3_3_1 > 1e-8 ) /// Prevent div-0
+    {
+      L3 = ecfg_3_1_1 / pow( ecfg_3_3_1, (1.0/3.0) );
+      L4 = ecfg_3_2_2 / pow( ecfg_3_3_1, (4.0/3.0) );
+    }
 
-     ecfg_3_3_1 / ecfg_2_1_2
-     E = (3*1) / (1*2) = 3./2.
-     */
+    if( ecfg_4_4_1 > 1e-8 ) /// Prevent div-0
+    {
+      L5 = ecfg_4_2_2 / pow( ecfg_4_4_1, 1.0 );
+    }
 
-  if(ecfg_2_1_2 > 1e-8) // Prevent div-0
-  {
-    jet.setAttribute(m_prefix+"L1", ecfg_3_2_1 / (pow(ecfg_2_1_2, (1.) )));
-    jet.setAttribute(m_prefix+"L2", ecfg_3_3_1 / (pow(ecfg_2_1_2, (3./2.) )));
-  }
-  else
-  {
-    jet.setAttribute(m_prefix+"L1",-999.0);
-    jet.setAttribute(m_prefix+"L2",-999.0);
-  }
 
-  if(ecfg_3_3_1 > 1e-8) // Prevent div-0
-  {  
-    jet.setAttribute(m_prefix+"L3", ecfg_3_1_1 / (pow(ecfg_3_3_1, (1./3.) )) );
-    jet.setAttribute(m_prefix+"L4", ecfg_3_2_2 / (pow(ecfg_3_3_1, (4./3.) )) );
-  }
-  else
-  {
-    jet.setAttribute(m_prefix+"L3",-999.0);
-    jet.setAttribute(m_prefix+"L4",-999.0);
   }
 
-  if(ecfg_4_4_1 > 1e-8) // Prevent div-0
-    jet.setAttribute(m_prefix+"L5", ecfg_4_2_2 / (pow(ecfg_4_4_1, (1.) )) );
-  else
-    jet.setAttribute(m_prefix+"L5",-999.0);
+  (*m_dec_L1)(jet) = L1;
+  (*m_dec_L2)(jet) = L2;
+  (*m_dec_L3)(jet) = L3;
+  (*m_dec_L4)(jet) = L4;
+  (*m_dec_L5)(jet) = L5;
 
   return 0;
+
 }
diff --git a/Reconstruction/Jet/JetSubStructureMomentTools/Root/EnergyCorrelatorGeneralizedTool.cxx b/Reconstruction/Jet/JetSubStructureMomentTools/Root/EnergyCorrelatorGeneralizedTool.cxx
index 8bff896e130cdcd57dbdb9351ccac6a58b7882d6..bf5143f67fd7190323a307ce5eb5360e9f3523b2 100644
--- a/Reconstruction/Jet/JetSubStructureMomentTools/Root/EnergyCorrelatorGeneralizedTool.cxx
+++ b/Reconstruction/Jet/JetSubStructureMomentTools/Root/EnergyCorrelatorGeneralizedTool.cxx
@@ -3,181 +3,255 @@
 */
 
 #include "JetSubStructureMomentTools/EnergyCorrelatorGeneralizedTool.h"
-#include "JetSubStructureUtils/EnergyCorrelatorGeneralized.h" 
-#include "JetSubStructureUtils/EnergyCorrelator.h" 
+#include "JetSubStructureUtils/EnergyCorrelatorGeneralized.h"
+#include "JetSubStructureUtils/EnergyCorrelator.h"
 
 EnergyCorrelatorGeneralizedTool::EnergyCorrelatorGeneralizedTool(std::string name) : 
   JetSubStructureMomentToolsBase(name)
 {
-  declareProperty("Beta", m_Beta = 1.0);
-  declareProperty("BetaList", m_rawBetaVals = {});
-  declareProperty("DoN3", m_doN3 = false);
-  declareProperty("DoLSeries", m_doLSeries = false);
+  declareProperty("Beta",       m_Beta = 1.0);
+  declareProperty("BetaList",   m_rawBetaVals = {});
+  declareProperty("DoM3",       m_doM3 = false);
+  declareProperty("DoN3",       m_doN3 = false);
+  declareProperty("DoLSeries",  m_doLSeries = false);
   declareProperty("DoDichroic", m_doDichroic = false);
 }
 
 StatusCode EnergyCorrelatorGeneralizedTool::initialize() {
 
-  // Add beta = 1.0 by default
-  m_betaVals.push_back(1.0);
+  /// Call base class initialize to fix up m_prefix
+  ATH_CHECK( JetSubStructureMomentToolsBase::initialize() );
 
-  // Add beta = m_Beta by default to keep backwards compatibility
-  if( std::abs(m_Beta-1.0) > 1.0e-5 ) m_betaVals.push_back(m_Beta);
+  /// Add beta = 1.0 by default
+  m_moments.emplace( 1.0, moments_t(1.0, m_prefix) );
 
-  // Clean up input list of beta values
-  for(float beta : m_rawBetaVals) {
+  /// Add beta = m_Beta by default to keep backwards compatibility
+  if( std::abs(m_Beta-1.0) > 1.0e-5 ) {
 
-    // Round to the nearest 0.1
+    /// Give warning about deprecation
+    ATH_MSG_WARNING( "The Beta property is deprecated, please use the BetaList property to provide a list of values" );
+
+    /// Use m_Beta to not break analysis code
+    m_moments.emplace( m_Beta, moments_t(m_Beta, m_prefix) );
+
+  }
+
+  /// Clean up input list of beta values
+  for( float beta : m_rawBetaVals ) {
+
+    /// Round to the nearest 0.1
     float betaFix = round( beta * 10.0 ) / 10.0;
-    if(std::abs(beta-betaFix) > 1.0e-5) ATH_MSG_DEBUG("beta = " << beta << " has been rounded to " << betaFix);
+    if( std::abs(beta-betaFix) > 1.0e-5 ) ATH_MSG_DEBUG( "beta = " << beta << " has been rounded to " << betaFix );
 
-    // Skip negative values of beta
-    if(betaFix < 0.0) {
-      ATH_MSG_WARNING("beta must be positive. Skipping beta = " << beta);
+    /// Skip negative values of beta
+    if( betaFix < 0.0 ) {
+      ATH_MSG_WARNING( "beta must be positive. Skipping beta = " << beta );
       continue;
     }
 
-    // Only store value if it is not already in the list
-    if( std::find(m_betaVals.begin(), m_betaVals.end(), betaFix) == m_betaVals.end() ) m_betaVals.push_back(betaFix);
+    /// Store value. std::map::emplace prevents duplicate entries
+    m_moments.emplace( betaFix, moments_t(betaFix, m_prefix) );
+
   }
 
-  for(float beta : m_betaVals) {
-    ATH_MSG_DEBUG("Including beta = " << beta);
+  /// Print out list of beta values to debug stream
+  for( auto const& moment : m_moments ) {
+    ATH_MSG_DEBUG( "Including beta = " << moment.first );
   }
 
-  ATH_CHECK(JetSubStructureMomentToolsBase::initialize());
+  /// Initialize decorators for L-series
+  m_dec_ECFG_2_1_2 = std::make_unique< SG::AuxElement::Decorator<float> >(m_prefix+"ECFG_2_1_2");
+  m_dec_ECFG_3_1_1 = std::make_unique< SG::AuxElement::Decorator<float> >(m_prefix+"ECFG_3_1_1");
+  m_dec_ECFG_3_2_1 = std::make_unique< SG::AuxElement::Decorator<float> >(m_prefix+"ECFG_3_2_1");
+  m_dec_ECFG_3_2_2 = std::make_unique< SG::AuxElement::Decorator<float> >(m_prefix+"ECFG_3_2_2");
+  m_dec_ECFG_3_3_1 = std::make_unique< SG::AuxElement::Decorator<float> >(m_prefix+"ECFG_3_3_1");
+  m_dec_ECFG_4_2_2 = std::make_unique< SG::AuxElement::Decorator<float> >(m_prefix+"ECFG_4_2_2");
+  m_dec_ECFG_4_4_1 = std::make_unique< SG::AuxElement::Decorator<float> >(m_prefix+"ECFG_4_4_1");
 
   return StatusCode::SUCCESS;
+
 }
 
 int EnergyCorrelatorGeneralizedTool::modifyJet(xAOD::Jet &injet) const {
-  
+
   fastjet::PseudoJet jet;
   fastjet::PseudoJet jet_ungroomed;
-  
-  bool decorate = SetupDecoration(jet,injet);
-  bool decorate_ungroomed = false;
-  if(m_doDichroic) {
-    // Get parent jet here and replace injet
+
+  /// Bool to decide whether calculation should be performed
+  bool calculate = SetupDecoration(jet,injet);
+
+  /// Bool to decide if ungroomed jet moments should be calculated
+  bool calculate_ungroomed = false;
+
+  if( m_doDichroic ) {
+
+    /// Get parent jet
     ElementLink<xAOD::JetContainer> parentLink = injet.auxdata<ElementLink<xAOD::JetContainer> >("Parent");
 
-    // Return error is parent element link is broken
-    if(!parentLink.isValid()) {
-      ATH_MSG_ERROR("Parent element link is not valid. Aborting");
+    /// Return error is parent element link is broken
+    if( !parentLink.isValid() ) {
+      ATH_MSG_ERROR( "Parent element link is not valid. Aborting" );
       return 1;
     }
 
     const xAOD::Jet* parentJet = *(parentLink);
-    decorate_ungroomed = SetupDecoration(jet_ungroomed,*parentJet);
-  }
+    calculate_ungroomed = SetupDecoration(jet_ungroomed,*parentJet);
 
-  for(float beta : m_betaVals) {
+  }
 
-    std::string suffix = GetBetaSuffix(beta);
+  /// Loop over all of the moments
+  for( auto const& moment : m_moments ) {
 
-    // These are used for N2 and M2
-    float ECFG_2_1_value = -999, ECFG_3_2_value = -999;
-    float ECFG_2_1_value_ungroomed = -999, ECFG_3_2_value_ungroomed = -999;
+    float beta = moment.first;
 
-    // These are used for N3
-    float ECFG_3_1_value = -999, ECFG_4_2_value = -999;
-    float ECFG_3_1_value_ungroomed = -999;
+    /// These are used for M2 and N2
+    float ECFG_2_1_value = -999.0;
+    float ECFG_3_2_value = -999.0;
+    
+    /// These are used for dichroic M2 and N2
+    float ECFG_2_1_ungroomed_value = -999.0;
+    float ECFG_3_1_ungroomed_value = -999.0;
+    float ECFG_3_2_ungroomed_value = -999.0;
 
-    if (decorate) {
+    /// These are used for M3 and N3
+    float ECFG_3_1_value = -999.0;
+    float ECFG_4_1_value = -999.0;
+    float ECFG_4_2_value = -999.0;
 
-      // These are used for N2 and M2
+    if( calculate ) {
 
+      /// These are used for N2 and M2
       JetSubStructureUtils::EnergyCorrelatorGeneralized ECFG_3_2(2, 3, beta, JetSubStructureUtils::EnergyCorrelator::pt_R);
       JetSubStructureUtils::EnergyCorrelatorGeneralized ECFG_2_1(1, 2, beta, JetSubStructureUtils::EnergyCorrelator::pt_R);
+
       ECFG_2_1_value = ECFG_2_1.result(jet);
       ECFG_3_2_value = ECFG_3_2.result(jet);
 
-      if (decorate_ungroomed) {
-        ECFG_2_1_value_ungroomed = ECFG_2_1.result(jet_ungroomed);
-        ECFG_3_2_value_ungroomed = ECFG_3_2.result(jet_ungroomed);
+      /// These are used for dichroic N2 and M2
+      if( calculate_ungroomed ) {
+        ECFG_2_1_ungroomed_value = ECFG_2_1.result(jet_ungroomed);
+        ECFG_3_2_ungroomed_value = ECFG_3_2.result(jet_ungroomed);
       }
 
-      // These are used for N3
+      /// These are used for M3 and N3
+      if( m_doM3 || m_doN3 ) {
 
-      if(m_doN3) {
-        JetSubStructureUtils::EnergyCorrelatorGeneralized ECFG_4_2(2, 4, beta, JetSubStructureUtils::EnergyCorrelator::pt_R);
         JetSubStructureUtils::EnergyCorrelatorGeneralized ECFG_3_1(1, 3, beta, JetSubStructureUtils::EnergyCorrelator::pt_R);
+
         ECFG_3_1_value = ECFG_3_1.result(jet);
-        ECFG_4_2_value = ECFG_4_2.result(jet);
 
-        if (decorate_ungroomed) {
-          ECFG_3_1_value_ungroomed = ECFG_3_1.result(jet_ungroomed);
+        if( calculate_ungroomed ) {
+          ECFG_3_1_ungroomed_value = ECFG_3_1.result(jet_ungroomed);
+        }
+
+        /// This is used for M3
+        if( m_doM3 ) {
+          JetSubStructureUtils::EnergyCorrelatorGeneralized ECFG_4_1(1, 4, beta, JetSubStructureUtils::EnergyCorrelator::pt_R);
+          ECFG_4_1_value = ECFG_4_1.result(jet);
+        }
+
+        /// This is used for N3
+        if( m_doN3 ) {
+          JetSubStructureUtils::EnergyCorrelatorGeneralized ECFG_4_2(2, 4, beta, JetSubStructureUtils::EnergyCorrelator::pt_R);
+          ECFG_4_2_value = ECFG_4_2.result(jet);
         }
 
       }
 
     }
 
-    injet.setAttribute(m_prefix+"ECFG_2_1"+suffix, ECFG_2_1_value);
-    injet.setAttribute(m_prefix+"ECFG_3_2"+suffix, ECFG_3_2_value);
-    injet.setAttribute(m_prefix+"ECFG_3_1"+suffix, ECFG_3_1_value);
-    injet.setAttribute(m_prefix+"ECFG_4_2"+suffix, ECFG_4_2_value);
+    (*moment.second.dec_ECFG_2_1)(injet) = ECFG_2_1_value;
+    (*moment.second.dec_ECFG_3_1)(injet) = ECFG_3_1_value;
+    (*moment.second.dec_ECFG_3_2)(injet) = ECFG_3_2_value;
+    (*moment.second.dec_ECFG_4_1)(injet) = ECFG_4_1_value;
+    (*moment.second.dec_ECFG_4_2)(injet) = ECFG_4_2_value;
 
-    injet.setAttribute(m_prefix+"ECFG_2_1_ungroomed"+suffix, ECFG_2_1_value_ungroomed);
-    injet.setAttribute(m_prefix+"ECFG_3_2_ungroomed"+suffix, ECFG_3_2_value_ungroomed);
-    injet.setAttribute(m_prefix+"ECFG_3_1_ungroomed"+suffix, ECFG_3_1_value_ungroomed);
+    (*moment.second.dec_ECFG_2_1_ungroomed)(injet) = ECFG_2_1_ungroomed_value;
+    (*moment.second.dec_ECFG_3_1_ungroomed)(injet) = ECFG_3_1_ungroomed_value;
+    (*moment.second.dec_ECFG_3_2_ungroomed)(injet) = ECFG_3_2_ungroomed_value;
 
   }
 
-  // These are for t/H discrimination
-  float ECFG_3_3_2_value = -999, ECFG_3_2_2_value = -999, ECFG_3_3_1_value = -999,
-        ECFG_4_2_2_value = -999, ECFG_4_4_1_value = -999, ECFG_2_1_2_value = -999, ECFG_3_2_1_value =  -999,
-        ECFG_3_1_1_value = -999;
-  // N.B. ECFG_angles_n_beta !!
-
-  if (decorate) {
+  /// ECFGs for L-series ratios that are for t/H discrimination
+  float ECFG_2_1_2_value = -999;
+  float ECFG_3_1_1_value = -999;
+  float ECFG_3_2_1_value = -999;
+  float ECFG_3_2_2_value = -999;
+  float ECFG_3_3_1_value = -999;
+  float ECFG_4_2_2_value = -999;
+  float ECFG_4_4_1_value = -999;
+
+  /// N.B. ECFG_angles_n_beta !!
+
+  if( calculate && m_doLSeries ) {
+
+    /**
+     * ------------------------------------------------------
+     * Some of the ECFGs for the L-series ratios may already have been calculated
+     * depending on which beta values are included. Checks are put in place for
+     * each one and if it has already been calculated the value is simply copied.
+     * This is meant to prevent duplicating CPU intensive calculations that have
+     * already been performed.
+     * ------------------------------------------------------
+     */
+
+    /// 212
+    if( m_moments.count(2.0) ) {
+      ECFG_2_1_2_value = (*m_moments.at(2.0).dec_ECFG_2_1)(injet);
+    }
+    else {
+      JetSubStructureUtils::EnergyCorrelatorGeneralized ECFG_2_1_2(1, 2, 2, JetSubStructureUtils::EnergyCorrelator::pt_R);
+      ECFG_2_1_2_value = ECFG_2_1_2.result(jet);
+    }
 
-    // These are for t/H discrimination
+    /// 311
+    if( m_doN3 ) {
+      ECFG_3_1_1_value = (*m_moments.at(1.0).dec_ECFG_3_1)(injet);
+    }
+    else {
+      JetSubStructureUtils::EnergyCorrelatorGeneralized ECFG_3_1_1(1, 3, 1, JetSubStructureUtils::EnergyCorrelator::pt_R);
+      ECFG_3_1_1_value = ECFG_3_1_1.result(jet);
+    }
 
-    if(m_doLSeries) {
-      // 332
-      JetSubStructureUtils::EnergyCorrelatorGeneralized ECFG_3_3_2(3, 3, 2, JetSubStructureUtils::EnergyCorrelator::pt_R);
-      ECFG_3_3_2_value = ECFG_3_3_2.result(jet);
+    /// 321
+    ECFG_3_2_1_value = (*m_moments.at(1.0).dec_ECFG_3_2)(injet);
 
-      // 322
+    /// 322
+    if( m_moments.count(2.0) ) {
+      ECFG_3_2_2_value = (*m_moments.at(2.0).dec_ECFG_3_2)(injet);
+    }
+    else {
       JetSubStructureUtils::EnergyCorrelatorGeneralized ECFG_3_2_2(2, 3, 2, JetSubStructureUtils::EnergyCorrelator::pt_R);
-      ECFG_3_2_2_value =  ECFG_3_2_2.result(jet);
+      ECFG_3_2_2_value = ECFG_3_2_2.result(jet);
+    }
 
-      // 331
-      JetSubStructureUtils::EnergyCorrelatorGeneralized ECFG_3_3_1(3, 3, 1, JetSubStructureUtils::EnergyCorrelator::pt_R);
-      ECFG_3_3_1_value = ECFG_3_3_1.result(jet);
+    /// 331
+    JetSubStructureUtils::EnergyCorrelatorGeneralized ECFG_3_3_1(3, 3, 1, JetSubStructureUtils::EnergyCorrelator::pt_R);
+    ECFG_3_3_1_value = ECFG_3_3_1.result(jet);
 
-      // 422
+    /// 422
+    if( m_doN3 && m_moments.count(2.0) ) {
+      ECFG_4_2_2_value = (*m_moments.at(2.0).dec_ECFG_4_2)(injet);
+    }
+    else {
       JetSubStructureUtils::EnergyCorrelatorGeneralized ECFG_4_2_2(2, 4, 2, JetSubStructureUtils::EnergyCorrelator::pt_R);
       ECFG_4_2_2_value = ECFG_4_2_2.result(jet);
-
-      // 441
-      JetSubStructureUtils::EnergyCorrelatorGeneralized ECFG_4_4_1(4, 4, 1, JetSubStructureUtils::EnergyCorrelator::pt_R);
-      ECFG_4_4_1_value = ECFG_4_4_1.result(jet);
-
-      // 212
-      JetSubStructureUtils::EnergyCorrelatorGeneralized ECFG_2_1_2(1, 2, 2, JetSubStructureUtils::EnergyCorrelator::pt_R);
-      ECFG_2_1_2_value = ECFG_2_1_2.result(jet);
-
-      // 321
-      JetSubStructureUtils::EnergyCorrelatorGeneralized ECFG_3_2_1(2, 3, 1, JetSubStructureUtils::EnergyCorrelator::pt_R);
-      ECFG_3_2_1_value = ECFG_3_2_1.result(jet);
-
-      // 311
-      JetSubStructureUtils::EnergyCorrelatorGeneralized ECFG_3_1_1(1, 3, 1, JetSubStructureUtils::EnergyCorrelator::pt_R);
-      ECFG_3_1_1_value = ECFG_3_1_1.result(jet);
     }
 
+    /// 441
+    JetSubStructureUtils::EnergyCorrelatorGeneralized ECFG_4_4_1(4, 4, 1, JetSubStructureUtils::EnergyCorrelator::pt_R);
+    ECFG_4_4_1_value = ECFG_4_4_1.result(jet);
+  
   }
 
-  injet.setAttribute(m_prefix+"ECFG_3_3_2", ECFG_3_3_2_value);
-  injet.setAttribute(m_prefix+"ECFG_3_2_2", ECFG_3_2_2_value);
-  injet.setAttribute(m_prefix+"ECFG_3_3_1", ECFG_3_3_1_value);
-  injet.setAttribute(m_prefix+"ECFG_4_2_2", ECFG_4_2_2_value);
-  injet.setAttribute(m_prefix+"ECFG_4_4_1", ECFG_4_4_1_value);
-  injet.setAttribute(m_prefix+"ECFG_2_1_2", ECFG_2_1_2_value);
-  injet.setAttribute(m_prefix+"ECFG_3_2_1", ECFG_3_2_1_value);
-  injet.setAttribute(m_prefix+"ECFG_3_1_1", ECFG_3_1_1_value);
+  (*m_dec_ECFG_2_1_2)(injet) = ECFG_2_1_2_value;
+  (*m_dec_ECFG_3_1_1)(injet) = ECFG_3_1_1_value;
+  (*m_dec_ECFG_3_2_1)(injet) = ECFG_3_2_1_value;
+  (*m_dec_ECFG_3_2_2)(injet) = ECFG_3_2_2_value;
+  (*m_dec_ECFG_3_3_1)(injet) = ECFG_3_3_1_value;
+  (*m_dec_ECFG_4_2_2)(injet) = ECFG_4_2_2_value;
+  (*m_dec_ECFG_4_4_1)(injet) = ECFG_4_4_1_value;
 
   return 0;
+
 }
diff --git a/Reconstruction/Jet/JetSubStructureMomentTools/Root/EnergyCorrelatorRatiosTool.cxx b/Reconstruction/Jet/JetSubStructureMomentTools/Root/EnergyCorrelatorRatiosTool.cxx
index 67c6b03e30eef7c460a7e153a3bfa1a211fa4fd0..0f1fb76f891d109cee0f327e9a1e25b3f144db9f 100644
--- a/Reconstruction/Jet/JetSubStructureMomentTools/Root/EnergyCorrelatorRatiosTool.cxx
+++ b/Reconstruction/Jet/JetSubStructureMomentTools/Root/EnergyCorrelatorRatiosTool.cxx
@@ -16,149 +16,177 @@ EnergyCorrelatorRatiosTool::EnergyCorrelatorRatiosTool(std::string name) :
 
 StatusCode EnergyCorrelatorRatiosTool::initialize() {
 
-  // Add beta = 1.0 by default
-  m_betaVals.push_back(1.0);
+  /// Call base class initialize to fix up m_prefix
+  ATH_CHECK( JetSubStructureMomentToolsBase::initialize() );
 
-  // Clean up input list of beta values
-  for(float beta : m_rawBetaVals) {
+  /// Add beta = 1.0 by default
+  m_moments.emplace( 1.0, moments_t(1.0, m_prefix) );
 
-    // Round to the nearest 0.1
+  /// Clean up input list of beta values
+  for( float beta : m_rawBetaVals ) {
+
+    /// Round to the nearest 0.1
     float betaFix = round( beta * 10.0 ) / 10.0;
-    if(std::abs(beta-betaFix) > 1.0e-5) ATH_MSG_DEBUG("beta = " << beta << " has been rounded to " << betaFix);
+    if( std::abs(beta-betaFix) > 1.0e-5 ) ATH_MSG_DEBUG( "beta = " << beta << " has been rounded to " << betaFix );
 
-    // Skip negative values of beta
-    if(betaFix < 0.0) {
-      ATH_MSG_WARNING("beta must be positive. Skipping beta = " << beta);
+    /// Skip negative values of beta
+    if( betaFix < 0.0 ) {
+      ATH_MSG_WARNING( "beta must be positive. Skipping beta = " << beta );
       continue;
     }
 
-    // Only store value if it is not already in the list
-    if( std::find(m_betaVals.begin(), m_betaVals.end(), betaFix) == m_betaVals.end() ) m_betaVals.push_back(betaFix);
+    /// Store value. std::map::emplace prevents duplicate entries
+    m_moments.emplace( betaFix, moments_t(betaFix, m_prefix) );
+  
   }
 
-  for(float beta : m_betaVals) {
-    ATH_MSG_DEBUG("Including beta = " << beta);
+  /// Print out list of beta values to debug stream
+  for( auto const& moment : m_moments ) {
+    ATH_MSG_DEBUG( "Including beta = " << moment.first );
   }
 
-  // If DoC4 is set to true, set DoC3 to true by default since it won't
-  // add any additional computational overhead
-  if(m_doC4) m_doC3 = true;
-
-  ATH_CHECK(JetSubStructureMomentToolsBase::initialize());
+  /// If DoC4 is set to true, set DoC3 to true by default since it won't
+  /// add any additional computational overhead
+  if( m_doC4 ) m_doC3 = true;
 
   return StatusCode::SUCCESS;
+
 }
 
 int EnergyCorrelatorRatiosTool::modifyJet(xAOD::Jet &jet) const {
   
-  for(float beta : m_betaVals) {
-    std::string suffix = GetBetaSuffix(beta);
+  for( auto const& moment : m_moments ) {
+ 
+    std::string suffix = moment.second.suffix;
 
-    if (!jet.isAvailable<float>(m_prefix+"ECF1"+suffix)) {
-      ATH_MSG_WARNING("Energy correlation function " << m_prefix << "ECF1" << suffix << " is not available. Exiting..");
+    /// Check to make sure all of the necessary ECF decorations are available
+    if( !moment.second.acc_ECF1->isAvailable(jet) ) {
+      ATH_MSG_WARNING( "Energy correlation function " << m_prefix << "ECF1" << suffix << " is not available. Exiting." );
       return 1;
     }
 
-    if (!jet.isAvailable<float>(m_prefix+"ECF2"+suffix)) {
-      ATH_MSG_WARNING("Energy correlation function " << m_prefix << "ECF2" << suffix << " is not available. Exiting..");
+    if( !moment.second.acc_ECF2->isAvailable(jet) ) {
+      ATH_MSG_WARNING( "Energy correlation function " << m_prefix << "ECF2" << suffix << " is not available. Exiting." );
       return 1;
     }
 
-    if (!jet.isAvailable<float>(m_prefix+"ECF3"+suffix)) {
-      ATH_MSG_WARNING("Energy correlation function " << m_prefix << "ECF3" << suffix << " is not available. Exiting..");
+    if( !moment.second.acc_ECF3->isAvailable(jet) ) {
+      ATH_MSG_WARNING( "Energy correlation function " << m_prefix << "ECF3" << suffix << " is not available. Exiting." );
       return 1;
     }
 
-    if (m_doC3 && !jet.isAvailable<float>(m_prefix+"ECF4"+suffix)) {
-      ATH_MSG_WARNING("Energy correlation function " << m_prefix << "ECF4" << suffix << " is not available. Exiting..");
-      return 1;
+    if( m_doC3 ) {
+      if( !moment.second.acc_ECF4->isAvailable(jet) ) {
+        ATH_MSG_WARNING( "Energy correlation function " << m_prefix << "ECF4" << suffix << " is not available. Exiting." );
+        return 1;
+      }
     }
 
-    if (m_doC4 && !jet.isAvailable<float>(m_prefix+"ECF5"+suffix)) {
-      ATH_MSG_WARNING("Energy correlation function " << m_prefix << "ECF5" << suffix << " is not available. Exiting..");
-      return 1;
+    if( m_doC4 ) {
+      if( !moment.second.acc_ECF5->isAvailable(jet) ) {
+        ATH_MSG_WARNING( "Energy correlation function " << m_prefix << "ECF5" << suffix << " is not available. Exiting." );
+        return 1;
+      }
     }
 
     if(m_doDichroic) {
-      if (!jet.isAvailable<float>(m_prefix+"ECF1_ungroomed"+suffix)) {
-        ATH_MSG_WARNING("Energy correlation function " << m_prefix << "ECF1_ungroomed" << suffix << " is not available. Exiting..");
+      if( !moment.second.acc_ECF1_ungroomed->isAvailable(jet) ) {
+        ATH_MSG_WARNING( "Energy correlation function " << m_prefix << "ECF1_ungroomed" << suffix << " is not available. Exiting." );
         return 1;
       }
 
-      if (!jet.isAvailable<float>(m_prefix+"ECF2_ungroomed"+suffix)) {
-        ATH_MSG_WARNING("Energy correlation function " << m_prefix << "ECF2_ungroomed" << suffix << " is not available. Exiting..");
+      if( !moment.second.acc_ECF2_ungroomed->isAvailable(jet) ) {
+        ATH_MSG_WARNING( "Energy correlation function " << m_prefix << "ECF2_ungroomed" << suffix << " is not available. Exiting." );
         return 1;
       }
 
-      if (!jet.isAvailable<float>(m_prefix+"ECF3_ungroomed"+suffix)) {
-        ATH_MSG_WARNING("Energy correlation function " << m_prefix << "ECF3_ungroomed" << suffix << " is not available. Exiting..");
+      if( !moment.second.acc_ECF3_ungroomed->isAvailable(jet) ) {
+        ATH_MSG_WARNING( "Energy correlation function " << m_prefix << "ECF3_ungroomed" << suffix << " is not available. Exiting." );
         return 1;
       }
     }
 
-    float ecf1 = jet.getAttribute<float>(m_prefix+"ECF1"+suffix);
-    float ecf2 = jet.getAttribute<float>(m_prefix+"ECF2"+suffix);
-    float ecf3 = jet.getAttribute<float>(m_prefix+"ECF3"+suffix);
+    float ecf1 = (*moment.second.acc_ECF1)(jet);
+    float ecf2 = (*moment.second.acc_ECF2)(jet);
+    float ecf3 = (*moment.second.acc_ECF3)(jet);
 
     float ecf4 = -999.0;
-    if(m_doC3) {
-      ecf4 = jet.getAttribute<float>(m_prefix+"ECF4"+suffix);
+    if( m_doC3 ) {
+      ecf4 = (*moment.second.acc_ECF4)(jet);
     }
 
     float ecf5 = -999.0;
-    if(m_doC4) {
-      ecf5 = jet.getAttribute<float>(m_prefix+"ECF5"+suffix);
+    if( m_doC4 ) {
+      ecf5 = (*moment.second.acc_ECF5)(jet);
     }
 
     float ecf1_ungroomed = -999.0;
     float ecf2_ungroomed = -999.0;
     float ecf3_ungroomed = -999.0;
 
-    if(m_doDichroic) {
-      ecf1_ungroomed = jet.getAttribute<float>(m_prefix+"ECF1_ungroomed"+suffix);
-      ecf2_ungroomed = jet.getAttribute<float>(m_prefix+"ECF2_ungroomed"+suffix);
-      ecf3_ungroomed = jet.getAttribute<float>(m_prefix+"ECF3_ungroomed"+suffix);
+    if( m_doDichroic ) {
+      ecf1_ungroomed = (*moment.second.acc_ECF1_ungroomed)(jet);
+      ecf2_ungroomed = (*moment.second.acc_ECF2_ungroomed)(jet);
+      ecf3_ungroomed = (*moment.second.acc_ECF3_ungroomed)(jet);
     }
 
-    // D2
-    if(ecf2 > 1e-8) { // Prevent div-0
-      jet.setAttribute(m_prefix+"D2"+suffix, ecf3 * pow(ecf1, 3.0) / pow(ecf2, 3.0));
+    float C1 = -999.0;
+    float C2 = -999.0;
+    float C3 = -999.0;
+    float C4 = -999.0;
+    
+    float D2 = -999.0;
+    
+    float D2_dichroic = -999.0;
+
+    /// C1
+    if( ecf1 > 1e-8 ) /// Prevent div-0
+    {
+      C1 = ecf2 / pow( ecf1, 2.0 );
+    }
 
-      if(ecf2_ungroomed > 1e-8 && ecf3_ungroomed > 1e-8)
-        jet.setAttribute(m_prefix+"D2_dichroic"+suffix, ecf3_ungroomed * ecf1_ungroomed * pow(ecf1, 2.0) / ( pow(ecf2_ungroomed, 2.0) * ecf2 ));
-      else
-        jet.setAttribute(m_prefix+"D2_dichroic"+suffix, -999.0);
+    /// C2
+    if( ecf2 > 1e-8 ) /// Prevent div-0
+    {
+      C2 = ecf3 * ecf1 / pow( ecf2, 2.0 );
+    }
 
+    /// C3
+    if( m_doC3 && ecf3 > 1e-8 ) /// Prevent div-0
+    {
+      C3 = ecf4 * ecf2 / pow( ecf3, 2.0 );
     }
-    else {
-      jet.setAttribute(m_prefix+"D2"+suffix, -999.0);
-      jet.setAttribute(m_prefix+"D2_dichroic"+suffix, -999.0);
+
+    /// C4
+    if( m_doC4 && ecf4 > 1e-8 ) /// Prevent div-0
+    {
+      C4 = ecf5 * ecf3 / pow( ecf4, 2.0 );
     }
 
-    // C1
-    if(ecf1 > 1e-8) // Prevent div-0
-      jet.setAttribute(m_prefix+"C1"+suffix, ecf2 / pow(ecf1, 2.0));
-    else
-      jet.setAttribute(m_prefix+"C1"+suffix, -999.0);
-
-    // C2
-    if(ecf2 > 1e-8) // Prevent div-0
-      jet.setAttribute(m_prefix+"C2"+suffix, ecf3 * ecf1 / pow(ecf2, 2.0));
-    else
-      jet.setAttribute(m_prefix+"C2"+suffix, -999.0);
-
-    // C3
-    if(m_doC3 && ecf3 > 1e-8) // Prevent div-0
-      jet.setAttribute(m_prefix+"C3"+suffix, ecf4 * ecf2 / pow(ecf3, 2.0));
-    else
-      jet.setAttribute(m_prefix+"C3"+suffix, -999.0);
-
-    // C4
-    if(m_doC4 && ecf4 > 1e-8) // Prevent div-0
-      jet.setAttribute(m_prefix+"C4"+suffix, ecf5 * ecf3 / pow(ecf4, 2.0));
-    else
-      jet.setAttribute(m_prefix+"C4"+suffix, -999.0);
+    /// D2
+    if( ecf2 > 1e-8 ) /// Prevent div-0
+    {
+
+      D2 = ecf3 * pow( ecf1, 3.0 ) / pow( ecf2, 3.0 );
+
+      if( ecf2_ungroomed > 1e-8 && ecf3_ungroomed > 1e-8 )
+      {
+        D2_dichroic = ecf3_ungroomed * ecf1_ungroomed * pow( ecf1, 2.0 ) / ( pow( ecf2_ungroomed, 2.0 ) * ecf2 );
+      }
+
+    }
+
+    (*moment.second.dec_C1)(jet) = C1;
+    (*moment.second.dec_C2)(jet) = C2;
+    (*moment.second.dec_C3)(jet) = C3;
+    (*moment.second.dec_C4)(jet) = C4;
+    
+    (*moment.second.dec_D2)(jet) = D2;
+
+    (*moment.second.dec_D2_dichroic)(jet) = D2_dichroic;
+
   }
 
   return 0;
+
 }
diff --git a/Reconstruction/Jet/JetSubStructureMomentTools/Root/EnergyCorrelatorTool.cxx b/Reconstruction/Jet/JetSubStructureMomentTools/Root/EnergyCorrelatorTool.cxx
index 23cc78c2d22ffc815b6f1a03aec444fb1c88b700..44cd07c5bc7498aafe919abd1f7fbb43648c24db 100644
--- a/Reconstruction/Jet/JetSubStructureMomentTools/Root/EnergyCorrelatorTool.cxx
+++ b/Reconstruction/Jet/JetSubStructureMomentTools/Root/EnergyCorrelatorTool.cxx
@@ -3,54 +3,66 @@
 */
 
 #include "JetSubStructureMomentTools/EnergyCorrelatorTool.h"
-#include "JetSubStructureUtils/EnergyCorrelator.h" 
+#include "JetSubStructureUtils/EnergyCorrelator.h"
 
 EnergyCorrelatorTool::EnergyCorrelatorTool(std::string name) : 
   JetSubStructureMomentToolsBase(name)
 {
-  declareProperty("Beta", m_Beta = 1.0);
-  declareProperty("BetaList", m_rawBetaVals = {});
-  declareProperty("DoC3", m_doC3 = false);
-  declareProperty("DoC4", m_doC4 = false);
+  declareProperty("Beta",       m_Beta = 1.0);
+  declareProperty("BetaList",   m_rawBetaVals = {});
+  declareProperty("DoC3",       m_doC3 = false);
+  declareProperty("DoC4",       m_doC4 = false);
   declareProperty("DoDichroic", m_doDichroic = false);
 }
 
 StatusCode EnergyCorrelatorTool::initialize() {
 
-  // Add beta = 1.0 by default
-  m_betaVals.push_back(1.0);
+  /// Call base class initialize to fix up m_prefix
+  ATH_CHECK( JetSubStructureMomentToolsBase::initialize() );
 
-  // Add beta = m_Beta by default to keep backwards compatibility
-  if( std::abs(m_Beta-1.0) > 1.0e-5 ) m_betaVals.push_back(m_Beta);
+  /// Add beta = 1.0 by default
+  m_moments.emplace( 1.0, moments_t(1.0, m_prefix) );
 
-  // Clean up input list of beta values
-  for(float beta : m_rawBetaVals) {
+  /// Add beta = m_Beta by default to keep backwards compatibility
+  if( std::abs(m_Beta-1.0) > 1.0e-5 ) {
 
-    // Round to the nearest 0.1
+    /// Give warning about deprecation
+    ATH_MSG_WARNING( "The Beta property is deprecated, please use the BetaList property to provide a list of values");
+
+    /// Use m_Beta to not break analysis code
+    m_moments.emplace( m_Beta, moments_t(m_Beta, m_prefix) );
+
+  }
+
+  /// Clean up input list of beta values
+  for( float beta : m_rawBetaVals ) {
+
+    /// Round to the nearest 0.1
     float betaFix = round( beta * 10.0 ) / 10.0;
-    if(std::abs(beta-betaFix) > 1.0e-5) ATH_MSG_DEBUG("beta = " << beta << " has been rounded to " << betaFix);
+    if( std::abs(beta-betaFix) > 1.0e-5 ) ATH_MSG_DEBUG( "beta = " << beta << " has been rounded to " << betaFix );
 
-    // Skip negative values of beta
-    if(betaFix < 0.0) {
-      ATH_MSG_WARNING("beta must be positive. Skipping beta = " << beta);
+    /// Skip negative values of beta
+    if( betaFix < 0.0 ) {
+      ATH_MSG_WARNING( "beta must be positive. Skipping beta = " << beta );
       continue;
     }
 
-    // Only store value if it is not already in the list
-    if( std::find(m_betaVals.begin(), m_betaVals.end(), betaFix) == m_betaVals.end() ) m_betaVals.push_back(betaFix);
-  }
+    /// Store value. std::map::emplace prevents duplicate entries
+    m_moments.emplace( betaFix, moments_t(betaFix, m_prefix) );
 
-  for(float beta : m_betaVals) {
-    ATH_MSG_DEBUG("Including beta = " << beta);
   }
 
-  // If DoC4 is set to true, set DoC3 to true by default since it won't
-  // add any additional computational overhead
-  if(m_doC4) m_doC3 = true;
+  /// Print out list of beta values to debug stream
+  for( auto const& moment : m_moments ) {
+    ATH_MSG_DEBUG( "Including beta = " << moment.first );
+  }
 
-  ATH_CHECK(JetSubStructureMomentToolsBase::initialize());
+  /// If DoC4 is set to true, set DoC3 to true by default since it won't
+  /// add any additional computational overhead
+  if( m_doC4 ) m_doC3 = true;
 
   return StatusCode::SUCCESS;
+
 }
 
 int EnergyCorrelatorTool::modifyJet(xAOD::Jet &injet) const {
@@ -58,81 +70,82 @@ int EnergyCorrelatorTool::modifyJet(xAOD::Jet &injet) const {
   fastjet::PseudoJet jet;
   fastjet::PseudoJet jet_ungroomed;
 
-  bool decorate = SetupDecoration(jet,injet);
-  bool decorate_ungroomed = false;
-  if(m_doDichroic) {
-    // Get parent jet here and replace injet
+  /// Bool to decide whether calculation should be performed
+  bool calculate = SetupDecoration(jet,injet);
+
+  /// Bool to decide if ungroomed jet moments should be calculated
+  bool calculate_ungroomed = false;
+
+  if( m_doDichroic ) {
+
+    /// Get parent jet
     ElementLink<xAOD::JetContainer> parentLink = injet.auxdata<ElementLink<xAOD::JetContainer> >("Parent");
 
-    // Return error is parent element link is broken
-    if(!parentLink.isValid()) {
-      ATH_MSG_ERROR("Parent element link is not valid. Aborting");
+    /// Return error is parent element link is broken
+    if( !parentLink.isValid() ) {
+      ATH_MSG_ERROR( "Parent element link is not valid. Aborting" );
       return 1;
     }
 
     const xAOD::Jet* parentJet = *(parentLink);
-    decorate_ungroomed = SetupDecoration(jet_ungroomed,*parentJet);
-  }
+    calculate_ungroomed = SetupDecoration(jet_ungroomed,*parentJet);
 
-  for(float beta : m_betaVals) {
+  }
 
-    if(beta < 0.0) {
-      ATH_MSG_WARNING("Negative beta values are not supported. Skipping " << beta);
-      continue;
-    }
+  for( auto const& moment : m_moments ) {
 
-    std::string suffix = GetBetaSuffix(beta);
+    float beta = moment.first;
 
-    float result_ECF1 = -999;
-    float result_ECF2 = -999;
-    float result_ECF3 = -999;
-    float result_ECF4 = -999;
-    float result_ECF5 = -999;
+    float ECF1_value = -999;
+    float ECF2_value = -999;
+    float ECF3_value = -999;
+    float ECF4_value = -999;
+    float ECF5_value = -999;
 
-    float result_ECF1_ungroomed = -999;
-    float result_ECF2_ungroomed = -999;
-    float result_ECF3_ungroomed = -999;
+    float ECF1_ungroomed_value = -999;
+    float ECF2_ungroomed_value = -999;
+    float ECF3_ungroomed_value = -999;
 
-    if(decorate) {
+    if( calculate ) {
 
       JetSubStructureUtils::EnergyCorrelator ECF1(1, beta, JetSubStructureUtils::EnergyCorrelator::pt_R);
       JetSubStructureUtils::EnergyCorrelator ECF2(2, beta, JetSubStructureUtils::EnergyCorrelator::pt_R);
       JetSubStructureUtils::EnergyCorrelator ECF3(3, beta, JetSubStructureUtils::EnergyCorrelator::pt_R);
 
-      result_ECF1 = ECF1.result(jet);
-      result_ECF2 = ECF2.result(jet);
-      result_ECF3 = ECF3.result(jet);
+      ECF1_value = ECF1.result(jet);
+      ECF2_value = ECF2.result(jet);
+      ECF3_value = ECF3.result(jet);
 
-      if(m_doC3) {
+      if( m_doC3 ) {
         JetSubStructureUtils::EnergyCorrelator ECF4(4, beta, JetSubStructureUtils::EnergyCorrelator::pt_R);
-        result_ECF4 = ECF4.result(jet);
+        ECF4_value = ECF4.result(jet);
       }
 
-      if(m_doC4) {
+      if( m_doC4 ) {
         JetSubStructureUtils::EnergyCorrelator ECF5(5, beta, JetSubStructureUtils::EnergyCorrelator::pt_R);
-        result_ECF5 = ECF5.result(jet);
+        ECF5_value = ECF5.result(jet);
       }
 
-      if(decorate_ungroomed) {
-        result_ECF1_ungroomed = ECF1.result(jet_ungroomed);
-        result_ECF2_ungroomed = ECF2.result(jet_ungroomed);
-        result_ECF3_ungroomed = ECF3.result(jet_ungroomed);
+      if( calculate_ungroomed ) {
+        ECF1_ungroomed_value = ECF1.result(jet_ungroomed);
+        ECF2_ungroomed_value = ECF2.result(jet_ungroomed);
+        ECF3_ungroomed_value = ECF3.result(jet_ungroomed);
       }
 
     }
 
-    injet.setAttribute(m_prefix+"ECF1"+suffix, result_ECF1);
-    injet.setAttribute(m_prefix+"ECF2"+suffix, result_ECF2);
-    injet.setAttribute(m_prefix+"ECF3"+suffix, result_ECF3);
-    injet.setAttribute(m_prefix+"ECF4"+suffix, result_ECF4);
-    injet.setAttribute(m_prefix+"ECF5"+suffix, result_ECF5);
+    (*moment.second.dec_ECF1)(injet) = ECF1_value;
+    (*moment.second.dec_ECF2)(injet) = ECF2_value;
+    (*moment.second.dec_ECF3)(injet) = ECF3_value;
+    (*moment.second.dec_ECF4)(injet) = ECF4_value;
+    (*moment.second.dec_ECF5)(injet) = ECF5_value;
 
-    injet.setAttribute(m_prefix+"ECF1_ungroomed"+suffix, result_ECF1_ungroomed);
-    injet.setAttribute(m_prefix+"ECF2_ungroomed"+suffix, result_ECF2_ungroomed);
-    injet.setAttribute(m_prefix+"ECF3_ungroomed"+suffix, result_ECF3_ungroomed);
+    (*moment.second.dec_ECF1_ungroomed)(injet) = ECF1_ungroomed_value;
+    (*moment.second.dec_ECF2_ungroomed)(injet) = ECF2_ungroomed_value;
+    (*moment.second.dec_ECF3_ungroomed)(injet) = ECF3_ungroomed_value;
 
   }
 
   return 0;
-}
 
+}
diff --git a/Reconstruction/Jet/JetSubStructureMomentTools/Root/NSubjettinessRatiosTool.cxx b/Reconstruction/Jet/JetSubStructureMomentTools/Root/NSubjettinessRatiosTool.cxx
index a4c36cd9f4e7c392a3e370f40c601f6dcf1038f4..4e00035896ce04fbfdc8d8c5c519e64f025f903c 100644
--- a/Reconstruction/Jet/JetSubStructureMomentTools/Root/NSubjettinessRatiosTool.cxx
+++ b/Reconstruction/Jet/JetSubStructureMomentTools/Root/NSubjettinessRatiosTool.cxx
@@ -12,170 +12,195 @@ NSubjettinessRatiosTool::NSubjettinessRatiosTool(std::string name) :
 }
 
 StatusCode NSubjettinessRatiosTool::initialize() {
-  // Add alpha = 1.0 by default
-  m_alphaVals.push_back(1.0);
 
-  // Clean up input list of alpha values
-  for(float alpha : m_rawAlphaVals) {
+  /// Call base class initialize to fix up m_prefix
+  ATH_CHECK(JetSubStructureMomentToolsBase::initialize());
+
+  /// Add alpha = 1.0 by default
+  m_moments.emplace( 1.0, moments_t(1.0, m_prefix) );
+
+  /// Clean up input list of alpha values
+  for( float alpha : m_rawAlphaVals ) {
 
-    // Round to the nearest 0.1
+    /// Round to the nearest 0.1
     float alphaFix = round( alpha * 10.0 ) / 10.0;
-    if(std::abs(alpha-alphaFix) > 1.0e-5) ATH_MSG_DEBUG("alpha = " << alpha << " has been rounded to " << alphaFix);
+    if( std::abs(alpha-alphaFix) > 1.0e-5 ) ATH_MSG_DEBUG( "alpha = " << alpha << " has been rounded to " << alphaFix );
 
-    // Skip negative values of alpha
-    if(alphaFix < 0.0) {
-      ATH_MSG_WARNING("alpha must be positive. Skipping alpha = " << alpha);
+    /// Skip negative values of alpha
+    if( alphaFix < 0.0 ) {
+      ATH_MSG_WARNING( "alpha must be positive. Skipping alpha = " << alpha );
       continue;
     }
 
-    // Only store value if it is not already in the list
-    if( std::find(m_alphaVals.begin(), m_alphaVals.end(), alphaFix) == m_alphaVals.end() ) m_alphaVals.push_back(alphaFix);
-  }
+    /// Store value. std::map::emplace prevents duplicate entries
+    m_moments.emplace( alphaFix, moments_t(alphaFix, m_prefix) );
 
-  for(float alpha : m_alphaVals) {
-    ATH_MSG_DEBUG("Including alpha = " << alpha);
   }
 
-  ATH_CHECK(JetSubStructureMomentToolsBase::initialize());
+  for( auto const& moment : m_moments ) {
+    ATH_MSG_DEBUG( "Including alpha = " << moment.first );
+  }
 
   return StatusCode::SUCCESS;
+
 }
 
 int NSubjettinessRatiosTool::modifyJet(xAOD::Jet &jet) const {
 
-  for(float alpha : m_alphaVals) {
-    std::string suffix = GetAlphaSuffix(alpha);
+  for( auto const& moment : m_moments ) {
+
+    std::string suffix = moment.second.suffix;
 
-    if (!jet.isAvailable<float>(m_prefix+"Tau1"+suffix) ||
-        !jet.isAvailable<float>(m_prefix+"Tau2"+suffix) ||
-        !jet.isAvailable<float>(m_prefix+"Tau3"+suffix) ||
-        !jet.isAvailable<float>(m_prefix+"Tau4"+suffix) ||
-        !jet.isAvailable<float>(m_prefix+"Tau1_wta"+suffix) ||
-        !jet.isAvailable<float>(m_prefix+"Tau2_wta"+suffix) ||
-        !jet.isAvailable<float>(m_prefix+"Tau3_wta"+suffix) ||
-        !jet.isAvailable<float>(m_prefix+"Tau4_wta"+suffix)) {
+    if( !moment.second.acc_Tau1->isAvailable(jet) ||
+        !moment.second.acc_Tau2->isAvailable(jet) ||
+        !moment.second.acc_Tau3->isAvailable(jet) ||
+        !moment.second.acc_Tau4->isAvailable(jet) ||
+        !moment.second.acc_Tau1_wta->isAvailable(jet) ||
+        !moment.second.acc_Tau2_wta->isAvailable(jet) ||
+        !moment.second.acc_Tau3_wta->isAvailable(jet) ||
+        !moment.second.acc_Tau4_wta->isAvailable(jet)) {
 
-      ATH_MSG_ERROR("Tau decorations for " << m_prefix << " with " << suffix << " are not all available. Exiting..");
+      ATH_MSG_ERROR( "Not all " << m_prefix << " Tau decorations with " << suffix << " are available. Exiting." );
       return 1;
+
     }
 
-    if (m_doDichroic) {
-      if (!jet.isAvailable<float>(m_prefix+"Tau2_ungroomed"+suffix) ||
-          !jet.isAvailable<float>(m_prefix+"Tau3_ungroomed"+suffix) ||
-          !jet.isAvailable<float>(m_prefix+"Tau4_ungroomed"+suffix) ||
-          !jet.isAvailable<float>(m_prefix+"Tau2_wta_ungroomed"+suffix) ||
-          !jet.isAvailable<float>(m_prefix+"Tau3_wta_ungroomed"+suffix) ||
-          !jet.isAvailable<float>(m_prefix+"Tau4_wta_ungroomed"+suffix)) {
+    if( m_doDichroic ) {
+
+      if( !moment.second.acc_Tau2_ungroomed->isAvailable(jet) ||
+          !moment.second.acc_Tau3_ungroomed->isAvailable(jet) ||
+          !moment.second.acc_Tau4_ungroomed->isAvailable(jet) ||
+          !moment.second.acc_Tau2_wta_ungroomed->isAvailable(jet) ||
+          !moment.second.acc_Tau3_wta_ungroomed->isAvailable(jet) ||
+          !moment.second.acc_Tau4_wta_ungroomed->isAvailable(jet)) {
 
-        ATH_MSG_ERROR("Ungroomed tau decorations for " << m_prefix << " with " << suffix << " are not all available. Exiting..");
+        ATH_MSG_ERROR( "Not all ungroomed " << m_prefix << " Tau decorations with " << suffix << " are available. Exiting." );
         return 1;
+
       }
+
     }
 
-    // Regular
-    float tau1 = jet.getAttribute<float>(m_prefix+"Tau1"+suffix);
-    float tau2 = jet.getAttribute<float>(m_prefix+"Tau2"+suffix);
-    float tau3 = jet.getAttribute<float>(m_prefix+"Tau3"+suffix);
-    float tau4 = jet.getAttribute<float>(m_prefix+"Tau4"+suffix);
+    /// Regular NSubjettiness
+    float Tau1 = (*moment.second.acc_Tau1)(jet);
+    float Tau2 = (*moment.second.acc_Tau2)(jet);
+    float Tau3 = (*moment.second.acc_Tau3)(jet);
+    float Tau4 = (*moment.second.acc_Tau4)(jet);
 
-    float tau2_ungroomed = -999.0;
-    float tau3_ungroomed = -999.0;
-    float tau4_ungroomed = -999.0;
+    float Tau2_ungroomed = -999.0;
+    float Tau3_ungroomed = -999.0;
+    float Tau4_ungroomed = -999.0;
 
-    if (m_doDichroic) {
-      tau2_ungroomed = jet.getAttribute<float>(m_prefix+"Tau2_ungroomed"+suffix);
-      tau3_ungroomed = jet.getAttribute<float>(m_prefix+"Tau3_ungroomed"+suffix);
-      tau4_ungroomed = jet.getAttribute<float>(m_prefix+"Tau4_ungroomed"+suffix);
+    if( m_doDichroic ) {
+      Tau2_ungroomed = (*moment.second.acc_Tau2_ungroomed)(jet);
+      Tau3_ungroomed = (*moment.second.acc_Tau3_ungroomed)(jet);
+      Tau4_ungroomed = (*moment.second.acc_Tau4_ungroomed)(jet);
     }
 
-    //Prevent div-0 and check against default value (-999) of the decoration
-    if(tau1 > 1e-8) {
-      jet.setAttribute(m_prefix+"Tau21"+suffix, tau2/tau1);
-      if(tau2_ungroomed > 1e-8)
-        jet.setAttribute(m_prefix+"Tau21_dichroic"+suffix, tau2_ungroomed/tau1);
-      else
-        jet.setAttribute(m_prefix+"Tau21_dichroic"+suffix, -999.0);
-    }
-    else {
-      jet.setAttribute(m_prefix+"Tau21"+suffix, -999.0);
-      jet.setAttribute(m_prefix+"Tau21_dichroic"+suffix, -999.0);
-    }
+    float Tau21 = -999.0;
+    float Tau32 = -999.0;
+    float Tau42 = -999.0;
 
-    //Prevent div-0 and check against default value (-999) of the decoration
-    if(tau2 > 1e-8) {
-      jet.setAttribute(m_prefix+"Tau32"+suffix, tau3/tau2);
-      jet.setAttribute(m_prefix+"Tau42"+suffix, tau4/tau2);
+    float Tau21_dichroic = -999.0;
+    float Tau32_dichroic = -999.0;
+    float Tau42_dichroic = -999.0;
 
-      if(tau3_ungroomed > 1e-8)
-        jet.setAttribute(m_prefix+"Tau32_dichroic"+suffix, tau3_ungroomed/tau2);
-      else
-        jet.setAttribute(m_prefix+"Tau32_dichroic"+suffix, -999.0);
+    /// Prevent div-0 and check against default value (-999) of the decoration
+    if( Tau1 > 1e-8 ) {
 
-      if(tau4_ungroomed > 1e-8)
-        jet.setAttribute(m_prefix+"Tau42_dichroic"+suffix, tau4_ungroomed/tau2);
-      else
-        jet.setAttribute(m_prefix+"Tau42_dichroic"+suffix, -999.0);
-    }
-    else {
-      jet.setAttribute(m_prefix+"Tau32"+suffix, -999.0);
-      jet.setAttribute(m_prefix+"Tau42"+suffix, -999.0);
+      Tau21 = Tau2 / Tau1;
+
+      if( Tau2_ungroomed > 1e-8 ) {
+        Tau21_dichroic = Tau2_ungroomed/Tau1;
+      }
 
-      jet.setAttribute(m_prefix+"Tau32_dichroic"+suffix, -999.0);
-      jet.setAttribute(m_prefix+"Tau42_dichroic"+suffix, -999.0);
     }
 
-    float tau1_wta = jet.getAttribute<float>(m_prefix+"Tau1_wta"+suffix);
-    float tau2_wta = jet.getAttribute<float>(m_prefix+"Tau2_wta"+suffix);
-    float tau3_wta = jet.getAttribute<float>(m_prefix+"Tau3_wta"+suffix);
-    float tau4_wta = jet.getAttribute<float>(m_prefix+"Tau4_wta"+suffix);
+    /// Prevent div-0 and check against default value (-999) of the decoration
+    if( Tau2 > 1e-8 ) {
 
-    float tau2_wta_ungroomed = -999.0;
-    float tau3_wta_ungroomed = -999.0;
-    float tau4_wta_ungroomed = -999.0;
+      Tau32 = Tau3 / Tau2;
+      Tau42 = Tau4 / Tau2;
 
-    if (m_doDichroic) {
-      tau2_wta_ungroomed = jet.getAttribute<float>(m_prefix+"Tau2_wta_ungroomed"+suffix);
-      tau3_wta_ungroomed = jet.getAttribute<float>(m_prefix+"Tau3_wta_ungroomed"+suffix);
-      tau4_wta_ungroomed = jet.getAttribute<float>(m_prefix+"Tau4_wta_ungroomed"+suffix);
-    }
+      if(Tau3_ungroomed > 1e-8) {
+        Tau32_dichroic = Tau3_ungroomed / Tau2;
+      }
+
+      if(Tau4_ungroomed > 1e-8) {
+        Tau42_dichroic = Tau4_ungroomed / Tau2;
+      }
 
-    // WTA
-    //Prevent div-0 and check against default value (-999) of the decoration
-    if(tau1_wta > 1e-8) {
-      jet.setAttribute(m_prefix+"Tau21_wta"+suffix, tau2_wta/tau1_wta);
-      if(tau2_wta_ungroomed > 1e-8)
-        jet.setAttribute(m_prefix+"Tau21_wta_dichroic"+suffix, tau2_wta_ungroomed/tau1_wta);
-      else
-        jet.setAttribute(m_prefix+"Tau21_wta_dichroic"+suffix, -999.0);
     }
-    else {
-      jet.setAttribute(m_prefix+"Tau21_wta"+suffix, -999.0);
-      jet.setAttribute(m_prefix+"Tau21_wta_dichroic"+suffix, -999.0);
+
+    /// WTA NSubjettiness
+    float Tau1_wta = (*moment.second.acc_Tau1_wta)(jet);
+    float Tau2_wta = (*moment.second.acc_Tau2_wta)(jet);
+    float Tau3_wta = (*moment.second.acc_Tau3_wta)(jet);
+    float Tau4_wta = (*moment.second.acc_Tau4_wta)(jet);
+
+    float Tau2_wta_ungroomed = -999.0;
+    float Tau3_wta_ungroomed = -999.0;
+    float Tau4_wta_ungroomed = -999.0;
+
+    if( m_doDichroic ) {
+      Tau2_wta_ungroomed = (*moment.second.acc_Tau2_wta_ungroomed)(jet);
+      Tau3_wta_ungroomed = (*moment.second.acc_Tau3_wta_ungroomed)(jet);
+      Tau4_wta_ungroomed = (*moment.second.acc_Tau4_wta_ungroomed)(jet);
     }
 
-    //Prevent div-0 and check against default value (-999) of the decoration
-    if(tau2_wta > 1e-8) {
-      jet.setAttribute(m_prefix+"Tau32_wta"+suffix, tau3_wta/tau2_wta);
-      jet.setAttribute(m_prefix+"Tau42_wta"+suffix, tau4_wta/tau2_wta);
+    float Tau21_wta = -999.0;
+    float Tau32_wta = -999.0;
+    float Tau42_wta = -999.0;
+
+    float Tau21_wta_dichroic = -999.0;
+    float Tau32_wta_dichroic = -999.0;
+    float Tau42_wta_dichroic = -999.0;
 
-      if(tau3_wta_ungroomed > 1e-8)
-        jet.setAttribute(m_prefix+"Tau32_wta_dichroic"+suffix, tau3_wta_ungroomed/tau2_wta);
-      else
-        jet.setAttribute(m_prefix+"Tau32_wta_dichroic"+suffix, -999.0);
+    /// Prevent div-0 and check against default value (-999) of the decoration
+    if( Tau1_wta > 1e-8 ) {
+
+      Tau21_wta = Tau2_wta / Tau1_wta;
+
+      if( Tau2_wta_ungroomed > 1e-8 ) {
+        Tau21_wta_dichroic = Tau2_wta_ungroomed / Tau1_wta;
+      }
 
-      if(tau4_wta_ungroomed > 1e-8)
-        jet.setAttribute(m_prefix+"Tau42_wta_dichroic"+suffix, tau4_wta_ungroomed/tau2_wta);
-      else
-        jet.setAttribute(m_prefix+"Tau42_wta_dichroic"+suffix, -999.0);
     }
-    else {
-      jet.setAttribute(m_prefix+"Tau32_wta"+suffix, -999.0);
-      jet.setAttribute(m_prefix+"Tau42_wta"+suffix, -999.0);
 
-      jet.setAttribute(m_prefix+"Tau32_wta_dichroic"+suffix, -999.0);
-      jet.setAttribute(m_prefix+"Tau42_wta_dichroic"+suffix, -999.0);
+    /// Prevent div-0 and check against default value (-999) of the decoration
+    if( Tau2_wta > 1e-8 ) {
+
+      Tau32_wta = Tau3_wta / Tau2_wta;
+      Tau42_wta = Tau4_wta / Tau2_wta;
+
+      if( Tau3_wta_ungroomed > 1e-8 ) {
+        Tau32_wta_dichroic = Tau3_wta_ungroomed / Tau2_wta;
+      }
+
+      if(Tau4_wta_ungroomed > 1e-8) {
+        Tau42_wta_dichroic = Tau4_wta_ungroomed / Tau2_wta;
+      }
+
     }
+
+    (*moment.second.dec_Tau21)(jet) = Tau21;
+    (*moment.second.dec_Tau32)(jet) = Tau32;
+    (*moment.second.dec_Tau42)(jet) = Tau42;
+
+    (*moment.second.dec_Tau21_dichroic)(jet) = Tau21_dichroic;
+    (*moment.second.dec_Tau32_dichroic)(jet) = Tau32_dichroic;
+    (*moment.second.dec_Tau42_dichroic)(jet) = Tau42_dichroic;
+
+    (*moment.second.dec_Tau21_wta)(jet) = Tau21_wta;
+    (*moment.second.dec_Tau32_wta)(jet) = Tau32_wta;
+    (*moment.second.dec_Tau42_wta)(jet) = Tau42_wta;
+
+    (*moment.second.dec_Tau21_wta_dichroic)(jet) = Tau21_wta_dichroic;
+    (*moment.second.dec_Tau32_wta_dichroic)(jet) = Tau32_wta_dichroic;
+    (*moment.second.dec_Tau42_wta_dichroic)(jet) = Tau42_wta_dichroic;
+
   }
 
   return 0;
+
 }
diff --git a/Reconstruction/Jet/JetSubStructureMomentTools/Root/NSubjettinessTool.cxx b/Reconstruction/Jet/JetSubStructureMomentTools/Root/NSubjettinessTool.cxx
index b71d2b1d160703d5420f72dbd7d7dca0bc193faf..3999d0d7909192a2497bcbff51755a7ecf32c304 100644
--- a/Reconstruction/Jet/JetSubStructureMomentTools/Root/NSubjettinessTool.cxx
+++ b/Reconstruction/Jet/JetSubStructureMomentTools/Root/NSubjettinessTool.cxx
@@ -9,42 +9,54 @@
 NSubjettinessTool::NSubjettinessTool(std::string name) : 
   JetSubStructureMomentToolsBase(name)
 {
-  declareProperty("Alpha", m_Alpha = 1.0);
-  declareProperty("AlphaList", m_rawAlphaVals = {});
+  declareProperty("Alpha",      m_Alpha = 1.0);
+  declareProperty("AlphaList",  m_rawAlphaVals = {});
   declareProperty("DoDichroic", m_doDichroic = false);
 }
 
 StatusCode NSubjettinessTool::initialize() {
-  // Add alpha = 1.0 by default
-  m_alphaVals.push_back(1.0);
+  
+  /// Call base class initialize to fix up m_prefix
+  ATH_CHECK( JetSubStructureMomentToolsBase::initialize() );
+
+  /// Add alpha = 1.0 by default
+  m_moments.emplace( 1.0, moments_t(1.0, m_prefix) );
+
+  /// Add alpha = m_Alpha by default to keep backwards compatibility
+  if( std::abs(m_Alpha-1.0) > 1.0e-5 ) {
+    
+    /// Give warning about deprecation
+    ATH_MSG_WARNING( "The Alpha property is deprecated, please use the AlphaList property to provide a list of values" );
 
-  // Add alpha = m_Alpha by default to keep backwards compatibility
-  if( std::abs(m_Alpha-1.0) > 1.0e-5 ) m_alphaVals.push_back(m_Alpha);
+    /// Use m_Alpha to not break analysis code
+    m_moments.emplace( m_Alpha, moments_t(m_Alpha, m_prefix) );
+  
+  }
 
-  // Clean up input list of alpha values
-  for(float alpha : m_rawAlphaVals) {
+  /// Clean up input list of alpha values
+  for( float alpha : m_rawAlphaVals ) {
     
-    // Round to the nearest 0.1
+    /// Round to the nearest 0.1
     float alphaFix = round( alpha * 10.0 ) / 10.0;
-    if(std::abs(alpha-alphaFix) > 1.0e-5) ATH_MSG_DEBUG("alpha = " << alpha << " has been rounded to " << alphaFix);
+    if( std::abs(alpha-alphaFix) > 1.0e-5 ) ATH_MSG_DEBUG( "alpha = " << alpha << " has been rounded to " << alphaFix );
 
-    // Skip negative values of alpha
-    if(alphaFix < 0.0) {
-      ATH_MSG_WARNING("alpha must be positive. Skipping alpha = " << alpha);
+    /// Skip negative values of alpha
+    if( alphaFix < 0.0 ) {
+      ATH_MSG_WARNING( "alpha must be positive. Skipping alpha = " << alpha );
       continue;
     }
 
-    // Only store value if it is not already in the list
-    if( std::find(m_alphaVals.begin(), m_alphaVals.end(), alphaFix) == m_alphaVals.end() ) m_alphaVals.push_back(alphaFix);
-  }
+    /// Store value. std::map::emplace prevents duplicate entries
+    m_moments.emplace( alphaFix, moments_t(alphaFix, m_prefix) );
 
-  for(float alpha : m_alphaVals) {
-    ATH_MSG_DEBUG("Including alpha = " << alpha);
   }
 
-  ATH_CHECK(JetSubStructureMomentToolsBase::initialize());
+  for( auto const& moment : m_moments ) {
+    ATH_MSG_DEBUG( "Including alpha = " << moment.first );
+  }
 
   return StatusCode::SUCCESS;
+
 }
 
 int NSubjettinessTool::modifyJet(xAOD::Jet &injet) const {
@@ -52,20 +64,25 @@ int NSubjettinessTool::modifyJet(xAOD::Jet &injet) const {
   fastjet::PseudoJet jet;
   fastjet::PseudoJet jet_ungroomed;
 
-  bool decorate = SetupDecoration(jet,injet);
-  bool decorate_ungroomed = false;
-  if(m_doDichroic) {
-    // Get parent jet here and replace injet
-    ElementLink<xAOD::JetContainer> parentLink = injet.auxdata<ElementLink<xAOD::JetContainer> >("Parent");
+  /// Bool to decide whether calculation should be performed
+  bool calculate = SetupDecoration(jet,injet);
+
+  /// Bool to decide if ungroomed jet moments should be calculated
+  bool calculate_ungroomed = false;
   
-    // Return error is parent element link is broken
-    if(!parentLink.isValid()) {
-      ATH_MSG_ERROR("Parent element link is not valid. Aborting");
+  if( m_doDichroic ) {
+
+    /// Get parent jet
+    ElementLink<xAOD::JetContainer> parentLink = injet.auxdata<ElementLink<xAOD::JetContainer> >("Parent");
+
+    /// Return error is parent element link is broken
+    if( !parentLink.isValid() ) {
+      ATH_MSG_ERROR( "Parent element link is not valid. Aborting" );
       return 1;
     }
 
     const xAOD::Jet* parentJet = *(parentLink);
-    decorate_ungroomed = SetupDecoration(jet_ungroomed,*parentJet);
+    calculate_ungroomed = SetupDecoration(jet_ungroomed,*parentJet);
   }
 
   // Supress a warning about undefined behavior in the fastjet
@@ -76,27 +93,35 @@ int NSubjettinessTool::modifyJet(xAOD::Jet &injet) const {
   std::call_once (oflag, CxxUtils::ubsan_suppress,
                   []() { fastjet::contrib::WTA_KT_Axes x; });
 
-  for(float alpha : m_alphaVals) {
-
-    if(alpha < 0.0) {
-      ATH_MSG_WARNING("Negative alpha values are not supported. Skipping " << alpha);
-      continue;
-    }
+  for( auto const& moment : m_moments ) {
 
-    std::string suffix = GetAlphaSuffix(alpha);
+    float alpha = moment.first;
 
+    /// This needs to be redone for each jet since it depends on the size parameter
     fastjet::contrib::NormalizedCutoffMeasure normalized_measure(alpha, injet.getSizeParameter(), 1000000);
 
-    // Groomed jet moments
-    float Tau1_value = -999, Tau2_value = -999, Tau3_value = -999, Tau4_value = -999,
-          Tau1_wta_value = -999, Tau2_wta_value = -999, Tau3_wta_value = -999, Tau4_wta_value = -999;
+    float Tau1_value = -999;
+    float Tau2_value = -999;
+    float Tau3_value = -999;
+    float Tau4_value = -999;
+    
+    float Tau2_ungroomed_value = -999;
+    float Tau3_ungroomed_value = -999;
+    float Tau4_ungroomed_value = -999;
+    
+    float Tau1_wta_value = -999;
+    float Tau2_wta_value = -999;
+    float Tau3_wta_value = -999;
+    float Tau4_wta_value = -999;
 
-    // Ungroomed jet moments
-    float Tau2_ungroomed_value = -999, Tau3_ungroomed_value = -999, Tau4_ungroomed_value = -999,
-          Tau2_wta_ungroomed_value = -999, Tau3_wta_ungroomed_value = -999, Tau4_wta_ungroomed_value = -999;
+    float Tau2_wta_ungroomed_value = -999;
+    float Tau3_wta_ungroomed_value = -999;
+    float Tau4_wta_ungroomed_value = -999;
 
-    if (decorate) {
+    if( calculate ) {
 
+      /// These calculators need to be created for each jet due to
+      /// the jet size parameter dependence in the normalized measure
       fastjet::contrib::KT_Axes kt_axes;
       JetSubStructureUtils::Nsubjettiness tau1(1, kt_axes, normalized_measure);
       JetSubStructureUtils::Nsubjettiness tau2(2, kt_axes, normalized_measure);
@@ -108,12 +133,14 @@ int NSubjettinessTool::modifyJet(xAOD::Jet &injet) const {
       Tau3_value = tau3.result(jet);
       Tau4_value = tau4.result(jet);
 
-      if(decorate_ungroomed) {
+      if( calculate_ungroomed ) {
         Tau2_ungroomed_value = tau2.result(jet_ungroomed);
         Tau3_ungroomed_value = tau3.result(jet_ungroomed);
         Tau4_ungroomed_value = tau4.result(jet_ungroomed);
       }
 
+      /// These calculators need to be created for each jet due to
+      /// the jet size parameter dependence in the normalized measure
       fastjet::contrib::WTA_KT_Axes wta_kt_axes;
       JetSubStructureUtils::Nsubjettiness tau1_wta(1, wta_kt_axes, normalized_measure);
       JetSubStructureUtils::Nsubjettiness tau2_wta(2, wta_kt_axes, normalized_measure);
@@ -125,7 +152,7 @@ int NSubjettinessTool::modifyJet(xAOD::Jet &injet) const {
       Tau3_wta_value = tau3_wta.result(jet);
       Tau4_wta_value = tau4_wta.result(jet);
 
-      if(decorate_ungroomed) {
+      if( calculate_ungroomed ) {
         Tau2_wta_ungroomed_value = tau2_wta.result(jet_ungroomed);
         Tau3_wta_ungroomed_value = tau3_wta.result(jet_ungroomed);
         Tau4_wta_ungroomed_value = tau4_wta.result(jet_ungroomed);
@@ -133,27 +160,26 @@ int NSubjettinessTool::modifyJet(xAOD::Jet &injet) const {
 
     }
 
-    // Groomed jet moments
-    injet.setAttribute(m_prefix+"Tau1"+suffix, Tau1_value);
-    injet.setAttribute(m_prefix+"Tau2"+suffix, Tau2_value);
-    injet.setAttribute(m_prefix+"Tau3"+suffix, Tau3_value);
-    injet.setAttribute(m_prefix+"Tau4"+suffix, Tau4_value);
-
-    injet.setAttribute(m_prefix+"Tau1_wta"+suffix, Tau1_wta_value);
-    injet.setAttribute(m_prefix+"Tau2_wta"+suffix, Tau2_wta_value);
-    injet.setAttribute(m_prefix+"Tau3_wta"+suffix, Tau3_wta_value);
-    injet.setAttribute(m_prefix+"Tau4_wta"+suffix, Tau4_wta_value);
+    (*moment.second.dec_Tau1)(injet) = Tau1_value;
+    (*moment.second.dec_Tau2)(injet) = Tau2_value;
+    (*moment.second.dec_Tau3)(injet) = Tau3_value;
+    (*moment.second.dec_Tau4)(injet) = Tau4_value;
+    
+    (*moment.second.dec_Tau2_ungroomed)(injet) = Tau2_ungroomed_value;
+    (*moment.second.dec_Tau3_ungroomed)(injet) = Tau3_ungroomed_value;
+    (*moment.second.dec_Tau4_ungroomed)(injet) = Tau4_ungroomed_value;
 
-    // Ungroomed jet moments
-    injet.setAttribute(m_prefix+"Tau2_ungroomed"+suffix, Tau2_ungroomed_value);
-    injet.setAttribute(m_prefix+"Tau3_ungroomed"+suffix, Tau3_ungroomed_value);
-    injet.setAttribute(m_prefix+"Tau4_ungroomed"+suffix, Tau4_ungroomed_value);
+    (*moment.second.dec_Tau1_wta)(injet) = Tau1_wta_value;
+    (*moment.second.dec_Tau2_wta)(injet) = Tau2_wta_value;
+    (*moment.second.dec_Tau3_wta)(injet) = Tau3_wta_value;
+    (*moment.second.dec_Tau4_wta)(injet) = Tau4_wta_value;
 
-    injet.setAttribute(m_prefix+"Tau2_wta_ungroomed"+suffix, Tau2_wta_ungroomed_value);
-    injet.setAttribute(m_prefix+"Tau3_wta_ungroomed"+suffix, Tau3_wta_ungroomed_value);
-    injet.setAttribute(m_prefix+"Tau4_wta_ungroomed"+suffix, Tau4_wta_ungroomed_value);
+    (*moment.second.dec_Tau2_wta_ungroomed)(injet) = Tau2_wta_ungroomed_value;
+    (*moment.second.dec_Tau3_wta_ungroomed)(injet) = Tau3_wta_ungroomed_value;
+    (*moment.second.dec_Tau4_wta_ungroomed)(injet) = Tau4_wta_ungroomed_value;
 
   }
 
   return 0;
+
 }
diff --git a/Reconstruction/MVAUtils/util/convertXGBoostToRootTree.py b/Reconstruction/MVAUtils/util/convertXGBoostToRootTree.py
index 3aa1ff95fde9453fea92f2e78fbc60eb420327d9..96b7bca5e5ed7b6746e0c00947d55ee22992cff5 100755
--- a/Reconstruction/MVAUtils/util/convertXGBoostToRootTree.py
+++ b/Reconstruction/MVAUtils/util/convertXGBoostToRootTree.py
@@ -159,6 +159,9 @@ def test(model_file, tree_file, objective, tree_name='xgboost', ntests=10000, te
     if 'binary' in objective:
         logging.info("testing binary")
         return test_binary(bst, mva_utils, objective, ntests, test_file)
+    elif 'multi' in objective:
+        logging.info("testing multi-class")
+        return test_multiclass(bst,mva_utils, objective, ntests, test_file)
     else:
         logging.info("testing regression")
         return test_regression(bst, mva_utils, objective, ntests, test_file)
@@ -202,7 +205,6 @@ def test_regression(booster, mva_utils, objective, ntests=10000, test_file=None)
 def test_binary(booster, mva_utils, objective, ntests=10000, test_file=None):
     import numpy as np
     logging.info("Testing input features with binary classification")
-    print(test_file)
     if test_file is not None:
         data_input = np.load(test_file)
         logging.info("using as input %s inputs from file %s", len(data_input), test_file)
@@ -234,6 +236,44 @@ def test_binary(booster, mva_utils, objective, ntests=10000, test_file=None):
             return False
     return True
 
+def test_multiclass(booster, mva_utils, objective, ntests=10000, test_file=None):
+    import numpy as np
+    logging.info("using multiclass model")
+
+    if test_file is not None:
+        data_input = np.load(test_file)
+        logging.info("using as input %s inputs from file %s", len(data_input), test_file)
+    else:
+        logging.error("Please provide an input test file for testing")
+
+    start = time.time()
+    dTest = xgb.DMatrix(data_input)
+    results_xgboost = booster.predict(dTest)
+    ##Extract the number of classes from the python prediction
+    nclasses = results_xgboost.shape[1]
+    logging.info("xgboost (vectorized) timing = %s ms/input", (time.time() - start) * 1000 / len(data_input))
+
+    input_values_vector = ROOT.std.vector("float")()
+    results_MVAUtils = []
+    start = time.time()
+    for input_values in data_input:
+        input_values_vector.clear()
+        for v in input_values:
+            input_values_vector.push_back(v)
+        output_MVAUtils = mva_utils.GetMultiResponse(input_values_vector, nclasses)
+        results_MVAUtils.append(output_MVAUtils)
+
+    logging.info("mvautils (not vectorized+overhead) timing = %s ms/input", (time.time() - start) * 1000 / len(data_input))
+
+    for input_values, output_xgb, output_MVAUtils in zip(data_input, results_xgboost, results_MVAUtils):
+        if not np.allclose(output_xgb, output_MVAUtils):
+            logging.info("output are different:"
+                         "mvautils: %s\n"
+                         "xgboost: %s\n"
+                         "inputs: %s", output_MVAUtils, output_xgb, input_values)
+            return False
+    return True
+
 
 def check_file(fn):
     f = ROOT.TFile.Open(fn)
@@ -262,13 +302,13 @@ if __name__ == "__main__":
     parser.add_argument('--no-test', action='store_true', help="don't run test (not suggested)")
     parser.add_argument('--ntests', type=int, default=1000, help="number of random test, default=1000")
     parser.add_argument('--test-file', type=str, help='numpy table')
-    parser.add_argument('--objective', type=str, help='Specify the learning task and the corresponding learning objective, currently support options: binary:logistic, reg:linear(squarederror)')
+    parser.add_argument('--objective', type=str, help='Specify the learning task and the corresponding learning objective, currently support options: binary:logistic, reg:linear(squarederror), multi:softprob')
 
     args = parser.parse_args()
     logging.info("converting input file %s to root file %s", args.input, args.output)
 
-    #  'reg:linear'is been named as 'reg:squarederror' in newer version of xgboost (> 0.90) 
-    supported_objective = ['binary:logistic', 'reg:linear', 'reg:squarederror']
+    #  'reg:linear'is been named as 'reg:squarederror' in newer version of xgboost (> 0.90)
+    supported_objective = ['binary:logistic', 'reg:linear', 'reg:squarederror','multi:softprob']
 
     if args.objective not in supported_objective:
         parser.error('''
@@ -276,6 +316,7 @@ if __name__ == "__main__":
                      Only the following objectives are supported and tested:
                      - binary:logistic
                      - reg:linear(or squarederror)
+                     - multi:softprob
                      ''')
 
     if not args.input:
@@ -290,6 +331,8 @@ if __name__ == "__main__":
         print("model has not been tested. Do not use it production!")
     else:
         logging.info("testing model")
+        if not args.test_file:
+            parser.error("Attempting to do test but no test file was provided, pass this with '--test-file <test_file> or use option '--no_test' ")
         if not check_file(args.output):
             print("problem when checking file")
         result = test(args.input, args.output, args.objective, args.tree_name, args.ntests, args.test_file)
@@ -328,3 +371,17 @@ MVAUtils::BDT my_bdt(tree);
 // ...
 float output = my_bdt.Predict(input_values);
                 ''' % (args.output, output_treename, len(data[0])))
+            elif "multi" in objective:
+                print('''In c++ use your BDT as:
+#include "MVAUtils/BDT.h"
+
+TFile* f = TFile::Open("%s");
+TTree* tree = nullptr;
+f->GetObject("%s", tree);
+MVAUtils::BDT my_bdt(tree);
+// ...
+// std::vector<float> input_values(%d, 0.);
+// fill the vector using the order as in the trainig
+// ...
+float output = my_bdt.GetMultiResponse(input_values, nclasses);
+''' % (args.output, output_treename, len(data[0])))
diff --git a/Reconstruction/PFlow/PFlowUtils/CMakeLists.txt b/Reconstruction/PFlow/PFlowUtils/CMakeLists.txt
index 6407592f882a4221c06d85012d8de55504ab8c01..d81a34ffcaff3a3874cc01d0b6a3c42457007f37 100644
--- a/Reconstruction/PFlow/PFlowUtils/CMakeLists.txt
+++ b/Reconstruction/PFlow/PFlowUtils/CMakeLists.txt
@@ -34,7 +34,7 @@ if( NOT XAOD_STANDALONE )
    atlas_add_component( PFlowUtils
       src/*.h src/*.cxx src/components/*.cxx
       LINK_LIBRARIES AthenaBaseComps xAODJet xAODPFlow GaudiKernel xAODTruth
-      PFlowUtilsLib )
+      PFlowUtilsLib CaloCalibHitRecLib )
 endif()
 
 # Install files from the package:
diff --git a/Reconstruction/RecoTools/TrackToCalo/CMakeLists.txt b/Reconstruction/RecoTools/TrackToCalo/CMakeLists.txt
index fe374b6bc281616e8fe7142bf80357958c6b2d8b..51ad0d43c436f7ca52438f6406506df14e63b820 100644
--- a/Reconstruction/RecoTools/TrackToCalo/CMakeLists.txt
+++ b/Reconstruction/RecoTools/TrackToCalo/CMakeLists.txt
@@ -58,7 +58,8 @@ atlas_add_library( TrackToCaloLib
                    LINK_LIBRARIES ${EIGEN_LIBRARIES} CaloEvent CaloGeoHelpers GeoPrimitives xAODCaloEvent GaudiKernel ParticleCaloExtension RecoToolInterfaces 
 		   TrackCaloClusterRecToolsLib TrkCaloExtension TrkParametersIdentificationHelpers CaloDetDescrLib CaloUtilsLib InDetReadoutGeometry TRT_ReadoutGeometry
                    PRIVATE_LINK_LIBRARIES CaloIdentifier AthenaBaseComps AtlasDetDescr FourMomUtils xAODTracking xAODMuon xAODEgamma xAODTruth TrkSurfaces 
-                   TrkEventPrimitives TrkParameters TrkTrack TrkExInterfaces TrkToolInterfaces CxxUtils StoreGateLib EventKernel )
+                   TrkEventPrimitives TrkParameters TrkTrack TrkExInterfaces TrkToolInterfaces CxxUtils StoreGateLib EventKernel ParticlesInConeToolsLib ITrackToVertex
+                   InDetTrackSelectionToolLib )
 
 atlas_add_component( TrackToCalo
                      src/components/*.cxx
diff --git a/Reconstruction/eflowRec/eflowRec/IEFlowCellEOverPTool.h b/Reconstruction/eflowRec/eflowRec/IEFlowCellEOverPTool.h
index 483aebd653e20bd23a1a63295024355ce52f49aa..fd1f5a5852e8724374e488d0b5db836d19a6868b 100644
--- a/Reconstruction/eflowRec/eflowRec/IEFlowCellEOverPTool.h
+++ b/Reconstruction/eflowRec/eflowRec/IEFlowCellEOverPTool.h
@@ -25,25 +25,25 @@ class eflowEEtaBinnedParameters;
 static const InterfaceID IID_IEFlowCellEOverPTool("IEFlowCellEOverPTool", 1, 0);
 
 /**
-Pure virtual base class, from which concrete classes inherit and define  reference e/p mean and widths, as well as reference energy density radial profile fit parameters. Inherits from AthAlgTool. 
+Pure virtual base class, from which concrete classes inherit and define  reference e/p mean and widths, as well as reference energy density radial profile fit parameters. Inherits from AthAlgTool.
 */
 class IEFlowCellEOverPTool : public AthAlgTool {
 
  public:
 
   IEFlowCellEOverPTool(const std::string& type,const std::string& name,const IInterface* parent) : AthAlgTool(type,name,parent) {};
-  
+
   virtual ~IEFlowCellEOverPTool() {};
 
   static const InterfaceID& interfaceID();
 
   virtual StatusCode intialize() {return StatusCode::SUCCESS;};
-  virtual StatusCode execute(eflowEEtaBinnedParameters *binnedParameters) = 0 ;
+  virtual StatusCode fillBinnedParameters(eflowEEtaBinnedParameters *binnedParameters) const = 0;
   virtual StatusCode finalize() {return StatusCode::SUCCESS;};
 
 protected:
   enum E_BINS        { ENERGY_BIN_START = 0, E001bin = ENERGY_BIN_START, E003point5bin = 1, E010bin = 2, E020bin = 3, E032point5bin = 4, E040bin = 5, ENERGY_BIN_END = 6 };
-    
+
   enum ETA_BINS      { ETA_BIN_START = 0, eta050bin = ETA_BIN_START, eta100bin = 1, eta150bin = 2, eta250bin = 3, eta350bin = 4, eta450bin = 5, ETA_BIN_END = 6};
 
   enum SHAPE_PARAMS  { SHAPE_START = 0, NORM1 = SHAPE_START, WIDTH1 = 1, NORM2 = 2, WIDTH2 = 3, SHAPE_END = 4 };
@@ -51,8 +51,8 @@ protected:
 };
 
 inline const InterfaceID& IEFlowCellEOverPTool::interfaceID()
-{ 
-  return IID_IEFlowCellEOverPTool; 
+{
+  return IID_IEFlowCellEOverPTool;
 }
 
 
diff --git a/Reconstruction/eflowRec/eflowRec/PFLCCalibTool.h b/Reconstruction/eflowRec/eflowRec/PFLCCalibTool.h
index 229c9416e69789f71b70e7eea4e06bd73ce3eab6..6da1879999ff843f3e90e7413d1cc689f6e0a437 100644
--- a/Reconstruction/eflowRec/eflowRec/PFLCCalibTool.h
+++ b/Reconstruction/eflowRec/eflowRec/PFLCCalibTool.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 PFLCCALIBTOOL_H
@@ -8,7 +8,7 @@
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "xAODCaloEvent/CaloCluster.h"
-#include "CaloRec/CaloClusterCollectionProcessor.h"
+#include "CaloRec/CaloClusterProcessor.h"
 #include "eflowRec/IPFBaseTool.h"
 #include "eflowRec/IPFClusterCollectionTool.h"
 
@@ -16,7 +16,7 @@ class eflowCaloObjectContainer;
 class eflowRecCluster;
 
 /**
-This tool can either use a series of CaloClusterCollectionProcessor to calibrate the modified xAOD::CaloCluster (modified when we do the charged shower subtraction) using recalculated LC weights or its own internal method to use the stored LC weights in the eflowRecCluster objects. If using the LC weights which were stored in the eflowRecCluster then we use the container of eflowRecCluster, but if using recalculated LC weights for the modified xAOD::CaloCluster (modified when we remove calorimeter cells in the charged shower subtraction) then we need the container of xAOD::CaloCluster. The PFClusterCollectionTool provides both of these containers.
+This tool can either use a series of CaloClusterProcessor to calibrate the modified xAOD::CaloCluster (modified when we do the charged shower subtraction) using recalculated LC weights or its own internal method to use the stored LC weights in the eflowRecCluster objects. If using the LC weights which were stored in the eflowRecCluster then we use the container of eflowRecCluster, but if using recalculated LC weights for the modified xAOD::CaloCluster (modified when we remove calorimeter cells in the charged shower subtraction) then we need the container of xAOD::CaloCluster. The PFClusterCollectionTool provides both of these containers.
 */
 class PFLCCalibTool : public extends<AthAlgTool, IPFBaseTool> {
 
@@ -32,24 +32,24 @@ class PFLCCalibTool : public extends<AthAlgTool, IPFBaseTool> {
 
  private:
 
-  void apply(ToolHandle<CaloClusterCollectionProcessor>& calibTool, xAOD::CaloCluster* cluster);
-  void applyLocal(ToolHandle<CaloClusterCollectionProcessor>& calibTool, eflowRecCluster *cluster);
+  void apply(ToolHandle<CaloClusterProcessor>& calibTool, xAOD::CaloCluster* cluster);
+  void applyLocal(ToolHandle<CaloClusterProcessor>& calibTool, eflowRecCluster *cluster);
   void applyLocalWeight(eflowRecCluster* theEFRecCluster);
 
   /** Tool to put all clusters into a temporary container - then we use this to calculate moments, some of which depend on configuration of nearby clusters */
   ToolHandle<IPFClusterCollectionTool> m_clusterCollectionTool{this,"eflowRecClusterCollectionTool","eflowRecClusterCollectionTool","Tool to put all clusters into a temporary container - then we use this to calculate moments, some of which depend on configuration of nearby clusters"};
 
   /* Tool for applying local hadronc calibration weights to cells */
-  ToolHandle<CaloClusterCollectionProcessor> m_clusterLocalCalibTool{this,"CaloClusterLocalCalib","CaloClusterLocalCalib","Tool for applying local hadronc calibration weights to cells"};
+  ToolHandle<CaloClusterProcessor> m_clusterLocalCalibTool{this,"CaloClusterLocalCalib","CaloClusterLocalCalib","Tool for applying local hadronc calibration weights to cells"};
 
   /* Tool to deal with out of cluster corrections */
-  ToolHandle<CaloClusterCollectionProcessor> m_clusterLocalCalibOOCCTool{this,"CaloClusterLocalCalibOOCC","CaloClusterLocalCalib","Tool to deal with out of cluster corrections"};
+  ToolHandle<CaloClusterProcessor> m_clusterLocalCalibOOCCTool{this,"CaloClusterLocalCalibOOCC","CaloClusterLocalCalib","Tool to deal with out of cluster corrections"};
 
   /* Tool to do Pi0 corrections */
-  ToolHandle<CaloClusterCollectionProcessor> m_clusterLocalCalibOOCCPi0Tool{this,"CaloClusterLocalCalibOOCCPi0","CaloClusterLocalCalib","Tool to do Pi0 corrections"};
+  ToolHandle<CaloClusterProcessor> m_clusterLocalCalibOOCCPi0Tool{this,"CaloClusterLocalCalibOOCCPi0","CaloClusterLocalCalib","Tool to do Pi0 corrections"};
 
   /* Tool for correcting clusters at cell level for dead material */
-  ToolHandle<CaloClusterCollectionProcessor> m_clusterLocalCalibDMTool{this,"CaloClusterLocalCalibDM","CaloClusterLocalCalib","Tool for correcting clusters at cell level for dead material"};
+  ToolHandle<CaloClusterProcessor> m_clusterLocalCalibDMTool{this,"CaloClusterLocalCalibDM","CaloClusterLocalCalib","Tool for correcting clusters at cell level for dead material"};
 
   /** Toggle which LC weights scheme to use - default is to recalculate weights, rather than use saved weights */
   Gaudi::Property<bool> m_useLocalWeight{this,"UseLocalWeight",false,"Toggle which LC weights scheme to use - default is to recalculate weights, rather than use saved weights"};
diff --git a/Reconstruction/eflowRec/eflowRec/PFMatchInterfaces.h b/Reconstruction/eflowRec/eflowRec/PFMatchInterfaces.h
index 66c420a2aacdd77a1fd1d0dcaa8f024931b41a7b..11d503c72d3da4767bd1c03bed90e04ca07b6df6 100644
--- a/Reconstruction/eflowRec/eflowRec/PFMatchInterfaces.h
+++ b/Reconstruction/eflowRec/eflowRec/PFMatchInterfaces.h
@@ -131,8 +131,11 @@ public:
   DistanceProvider(std::unique_ptr<IPositionProvider> trackPosition,
                    std::unique_ptr<IPositionProvider> clusterPosition,
                    std::unique_ptr<DistanceCalculator<TrackPositionType, ClusterPositionType> > distanceCalculator):
-    m_trackPosition(std::move(trackPosition)), m_clusterPosition(std::move(clusterPosition)), m_distanceCalculator(std::move(distanceCalculator)) {
-    //in debug builds we check the pointer validity here to catch a problem early on
+    // dynamic_cast to ensure that the right distance provider classes are received
+    m_trackPosition(dynamic_cast<TrackPositionProvider<TrackPositionType>*>(trackPosition.release())),
+    m_clusterPosition(dynamic_cast<ClusterPositionProvider<ClusterPositionType>*>(clusterPosition.release())),
+    m_distanceCalculator(std::move(distanceCalculator)) {
+    // in debug builds we check the pointer validity here to catch a problem early on
     assert(m_trackPosition.get());
     assert(m_clusterPosition.get());
     assert(m_distanceCalculator.get());
@@ -140,33 +143,14 @@ public:
   virtual ~DistanceProvider() {}
 
   double distanceBetween(const ITrack* track, const ICluster* cluster) {
-    //if anything is not valid we return 10000 to indicate no match, in addition to error messages.
-    if (m_trackPosition.get()){
-      TrackPositionProvider<TrackPositionType>* trackPositionProvider = dynamic_cast<TrackPositionProvider<TrackPositionType>*>(m_trackPosition.get());
-      if (m_clusterPosition.get()){
-	ClusterPositionProvider<ClusterPositionType>* clusterPositionProvider = dynamic_cast<ClusterPositionProvider<ClusterPositionType>*>(m_clusterPosition.get());
-	if (m_distanceCalculator.get()){
-	  return m_distanceCalculator->distanceBetween(trackPositionProvider->getPosition(track),clusterPositionProvider->getPosition(cluster));
-	}
-	else{
-	  std::cerr << "ERROR: DistanceProvider has invalid std::unique_ptr<DistanceCalculator>" << std::endl;
-	return 10000;
-	}
-      }
-      else{
-	std::cerr << "ERROR: DistanceProvider has invalid std::unique_ptr<IPositionProvider> clusters" << std::endl;
-	return 10000;
-      }
-    }
-    else{
-      std::cerr << "ERROR: DistanceProvider has invalid std::unique_ptr<IPositionProvider> for tracks" << std::endl;
-      return 10000;
-    }
+    TrackPositionProvider<TrackPositionType>* trackPositionProvider = m_trackPosition.get();
+    ClusterPositionProvider<ClusterPositionType>* clusterPositionProvider = m_clusterPosition.get();
+    return m_distanceCalculator->distanceBetween(trackPositionProvider->getPosition(track),clusterPositionProvider->getPosition(cluster));
   }
 
 private:
-  std::unique_ptr<IPositionProvider> m_trackPosition;
-  std::unique_ptr<IPositionProvider> m_clusterPosition;
+  std::unique_ptr<TrackPositionProvider<TrackPositionType> > m_trackPosition;
+  std::unique_ptr<ClusterPositionProvider<ClusterPositionType> > m_clusterPosition;
   std::unique_ptr<DistanceCalculator<TrackPositionType, ClusterPositionType> > m_distanceCalculator;
 };
 
diff --git a/Reconstruction/eflowRec/eflowRec/eflowCaloObjectMaker.h b/Reconstruction/eflowRec/eflowRec/eflowCaloObjectMaker.h
index bc0704b1029dd3f706575b077efdbe237075ba44..599203aa99a68a0860db585ba8051e682f993b7d 100644
--- a/Reconstruction/eflowRec/eflowRec/eflowCaloObjectMaker.h
+++ b/Reconstruction/eflowRec/eflowRec/eflowCaloObjectMaker.h
@@ -30,7 +30,7 @@ public:
   eflowCaloObjectMaker() { }
 
   int makeTrkCluCaloObjects(eflowRecTrackContainer* eflowTrackContainer, eflowRecClusterContainer* eflowClusterContainer, eflowCaloObjectContainer* caloObjectContainer);
-  int makeTrkCluCaloObjects(std::vector<eflowRecTrack*> m_tracksToRecover, std::vector<eflowRecCluster*> m_clustersToConsider, eflowCaloObjectContainer* caloObjectContainer);
+  int makeTrkCluCaloObjects(std::vector<eflowRecTrack*>& tracksToRecover, std::vector<eflowRecCluster*>& clustersToConsider, eflowCaloObjectContainer* caloObjectContainer);
 
 private:
 
diff --git a/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_HLLHC.h b/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_HLLHC.h
index a6483bd57f35fccb292a27510fe5a4e565e638c0..140667c200354397fdff5a6e47c0b7248d0457ea 100644
--- a/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_HLLHC.h
+++ b/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_HLLHC.h
@@ -17,11 +17,11 @@ class eflowCellEOverPTool_mc12_HLLHC : public IEFlowCellEOverPTool {
  public:
 
   eflowCellEOverPTool_mc12_HLLHC(const std::string& type,const std::string& name,const IInterface* parent);
-  
+
   ~eflowCellEOverPTool_mc12_HLLHC() {};
 
   StatusCode initialize();
-  StatusCode execute(eflowEEtaBinnedParameters *binnedParameters) ;
+  StatusCode fillBinnedParameters(eflowEEtaBinnedParameters *binnedParameters) const;
   StatusCode finalize() ;
 
  private:
diff --git a/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_JetETMiss.h b/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_JetETMiss.h
index fb5b042b92f2a92ddff39509265e5849160f1e93..151649875ca920b21ad693c99a1bfdf6e36fd62f 100644
--- a/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_JetETMiss.h
+++ b/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_JetETMiss.h
@@ -29,11 +29,11 @@ class eflowCellEOverPTool_mc12_JetETMiss : public IEFlowCellEOverPTool {
  public:
 
   eflowCellEOverPTool_mc12_JetETMiss(const std::string& type,const std::string& name,const IInterface* parent);
-  
+
   ~eflowCellEOverPTool_mc12_JetETMiss() {};
 
   StatusCode initialize();
-  StatusCode execute(eflowEEtaBinnedParameters *binnedParameters) ;
+  StatusCode fillBinnedParameters(eflowEEtaBinnedParameters *binnedParameters) const;
   StatusCode finalize() ;
 
  private:
diff --git a/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_LC.h b/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_LC.h
index fad7105eaeb4f3cce4fae60789296e945558e09e..3d271515670fa619cc570ba197db02d0bcbd3fdd 100644
--- a/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_LC.h
+++ b/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_LC.h
@@ -29,11 +29,11 @@ class eflowCellEOverPTool_mc12_LC : public IEFlowCellEOverPTool {
  public:
 
   eflowCellEOverPTool_mc12_LC(const std::string& type,const std::string& name,const IInterface* parent);
-  
+
   ~eflowCellEOverPTool_mc12_LC() {};
 
   StatusCode initialize();
-  StatusCode execute(eflowEEtaBinnedParameters *binnedParameters) ;
+  StatusCode fillBinnedParameters(eflowEEtaBinnedParameters *binnedParameters) const;
   StatusCode finalize() ;
 
  private:
diff --git a/Reconstruction/eflowRec/python/PFOnlineMon.py b/Reconstruction/eflowRec/python/PFOnlineMon.py
index ec071ead7346304301b5462375d0eac2687688ec..d6375b1c0798f6b8a9cde0c3cf71a61f24787bb9 100644
--- a/Reconstruction/eflowRec/python/PFOnlineMon.py
+++ b/Reconstruction/eflowRec/python/PFOnlineMon.py
@@ -6,13 +6,13 @@ def getMonTool_PFAlgorithm():
 
     #monTool.HistPath = 'MyGroup/MySubDir'  # default is the parent name of MonTool
     monTool.defineHistogram( 'TIME_execute', path='EXPERT', type='TH1F', title='Counts',
-                             xbins=100, xmin=0, xmax=1000 )
+                             xbins=100, xmin=0., xmax=1000. )
     monTool.defineHistogram( 'TIME_subtract', path='EXPERT', type='TH1F', title='Counts',
-                             xbins=100, xmin=0, xmax=1000 )
+                             xbins=100, xmin=0., xmax=1000. )
     monTool.defineHistogram( 'N_efrTracks', path='EXPERT', type='TH1F', title='Counts',
-                             xbins=100, xmin=0, xmax=1000 )
+                             xbins=100, xmin=0., xmax=1000. )
     monTool.defineHistogram( 'N_efrClusters', path='EXPERT', type='TH1F', title='Counts',
-                             xbins=100, xmin=0, xmax=2000 )
+                             xbins=100, xmin=0., xmax=2000. )
     return monTool
 
 def getMonTool_PFTrackSelector():
@@ -21,9 +21,18 @@ def getMonTool_PFTrackSelector():
 
     #monTool.HistPath = 'MyGroup/MySubDir'  # default is the parent name of MonTool
     monTool.defineHistogram( 'TIME_execute', path='EXPERT', type='TH1F', title='Counts',
-                             xbins=100, xmin=0, xmax=1000 )
+                             xbins=100, xmin=0., xmax=1000. )
     monTool.defineHistogram( 'TIME_track', path='EXPERT', type='TH1F', title='Counts',
-                             xbins=50, xmin=0, xmax=50 )
+                             xbins=100, xmin=0., xmax=2500. )
     monTool.defineHistogram( 'N_tracks', path='EXPERT', type='TH1F', title='Counts',
-                             xbins=100, xmin=0, xmax=500 )
+                             xbins=100, xmin=0., xmax=1000. )
+    monTool.defineHistogram( 'eta_track', path='EXPERT', type='TH1F', title='Counts',
+                             xbins=120, xmin=-3., xmax=3. )
+    monTool.defineHistogram( 'pt_track', path='EXPERT', type='TH1F', title='Counts',
+                             xbins=100, xmin=0., xmax=25. )
+
+    monTool.defineHistogram( 'eta_track,TIME_track', path='EXPERT', type='TH2F', title='Counts',
+                             xbins=30, xmin=-3., xmax=3., ybins=50, ymin=0., ymax=2500. )
+    monTool.defineHistogram( 'pt_track,TIME_track', path='EXPERT', type='TH2F', title='Counts',
+                             xbins=25, xmin=0., xmax=25., ybins=50, ymin=0., ymax=2500. )
     return monTool
diff --git a/Reconstruction/eflowRec/src/PFCellLevelSubtractionTool.cxx b/Reconstruction/eflowRec/src/PFCellLevelSubtractionTool.cxx
index e4736422bbcf52c18ef81a75c8ef1e4317655836..3cefba89fe5f70768b0da53aa6812695f497f943 100644
--- a/Reconstruction/eflowRec/src/PFCellLevelSubtractionTool.cxx
+++ b/Reconstruction/eflowRec/src/PFCellLevelSubtractionTool.cxx
@@ -73,7 +73,7 @@ StatusCode PFCellLevelSubtractionTool::initialize(){
   m_integrator = std::make_unique<eflowLayerIntegrator>(gaussianRadius, gaussianRadiusError, maximumRadiusSigma, m_isHLLHC);
   m_binnedParameters = std::make_unique<eflowEEtaBinnedParameters>();
   
-  sc = m_theEOverPTool->execute(m_binnedParameters.get());
+  sc = m_theEOverPTool->fillBinnedParameters(m_binnedParameters.get());
 
   if (sc.isFailure()) {
     msg(MSG::WARNING) << "Could not execute eflowCellEOverPTool " << endmsg;
diff --git a/Reconstruction/eflowRec/src/PFLCCalibTool.cxx b/Reconstruction/eflowRec/src/PFLCCalibTool.cxx
index 4eb36e5e9a9997307b7d65b38807bb4636c09e15..9778ee2fdb6d36207d6ef1804ad87941ffbf0e94 100644
--- a/Reconstruction/eflowRec/src/PFLCCalibTool.cxx
+++ b/Reconstruction/eflowRec/src/PFLCCalibTool.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 "eflowRec/PFLCCalibTool.h"
@@ -69,15 +69,9 @@ StatusCode PFLCCalibTool::finalize() {
 }
 
 
-void PFLCCalibTool::apply(ToolHandle<CaloClusterCollectionProcessor>& calibTool, xAOD::CaloCluster* cluster) {
-
-  if (m_useLocalWeight) ATH_MSG_WARNING("Applying recalculated weights, when configuraiton requested to use original weights");
-  CaloClusterCollectionProcessor* myCollectionProcessor = &(*calibTool);
-  CaloClusterProcessor* myCalibProcessor = dynamic_cast<CaloClusterProcessor*>(myCollectionProcessor);
-  if (myCalibProcessor) {
-    if (myCalibProcessor->execute(cluster).isFailure()) ATH_MSG_WARNING("Could not execute " << calibTool.name());
-  }
-  else ATH_MSG_WARNING("Dynamic_cast provided NULL pointer to CaloClusterProcessor");
+void PFLCCalibTool::apply(ToolHandle<CaloClusterProcessor>& calibTool, xAOD::CaloCluster* cluster) {
+  if (m_useLocalWeight) ATH_MSG_WARNING("Applying recalculated weights, when configuration requested to use original weights");
+  if (calibTool->execute(cluster).isFailure()) ATH_MSG_WARNING("Could not execute " << calibTool.name());
 }
 
 void PFLCCalibTool::applyLocalWeight(eflowRecCluster* theEFRecClusters) {
diff --git a/Reconstruction/eflowRec/src/PFRecoverSplitShowersTool.cxx b/Reconstruction/eflowRec/src/PFRecoverSplitShowersTool.cxx
index 7b35b6aac13ecb0a860f1ad327651053065f805f..309bc881ff5fd4903e1111d91394e701e9cf5fb6 100644
--- a/Reconstruction/eflowRec/src/PFRecoverSplitShowersTool.cxx
+++ b/Reconstruction/eflowRec/src/PFRecoverSplitShowersTool.cxx
@@ -48,7 +48,7 @@ StatusCode PFRecoverSplitShowersTool::initialize(){
     return StatusCode::SUCCESS;
   }
 
-  if (m_theEOverPTool->execute(m_binnedParameters.get()).isFailure()){
+  if (m_theEOverPTool->fillBinnedParameters(m_binnedParameters.get()).isFailure()){
     ATH_MSG_WARNING("Could not execute eflowCellEOverPTool");
     return StatusCode::SUCCESS;
   }
diff --git a/Reconstruction/eflowRec/src/PFTrackSelector.cxx b/Reconstruction/eflowRec/src/PFTrackSelector.cxx
index e07e2781433624088b8893fafcff568caaec35ec..b3255e6d9812a23ccad187a46f9b03bb2a17dbbb 100644
--- a/Reconstruction/eflowRec/src/PFTrackSelector.cxx
+++ b/Reconstruction/eflowRec/src/PFTrackSelector.cxx
@@ -5,7 +5,9 @@
 #include "eflowRec/PFTrackSelector.h"
 #include "StoreGate/ReadCondHandleKey.h"
 #include "xAODEgamma/ElectronxAODHelpers.h"
+#include "GaudiKernel/SystemOfUnits.h"
 
+constexpr float invGeV = 1./CLHEP::GeV;
 
 PFTrackSelector::PFTrackSelector(const std::string& name, ISvcLocator* pSvcLocator):
   AthAlgorithm(name, pSvcLocator)
@@ -43,6 +45,8 @@ StatusCode PFTrackSelector::execute(){
   // Monitor the time taken to execute the alg
   auto t_exec = Monitored::Timer<std::chrono::milliseconds>( "TIME_execute" );
   auto N_tracks = Monitored::Scalar( "N_tracks", 0 );
+  auto eta_track = Monitored::Scalar( "eta_track", 0. );
+  auto pt_track = Monitored::Scalar( "pt_track", 0. );
 
   SG::WriteHandle<eflowRecTrackContainer> eflowRecTracksWriteHandle(m_eflowRecTracksWriteHandleKey);  
   ATH_CHECK(eflowRecTracksWriteHandle.record(std::make_unique<eflowRecTrackContainer>()));
@@ -76,13 +80,15 @@ StatusCode PFTrackSelector::execute(){
     
     if (!rejectTrack) {
       // Monitor the time per selected track
-      auto t_track = Monitored::Timer<std::chrono::milliseconds>( "TIME_track" );
+      auto t_track = Monitored::Timer<std::chrono::microseconds>( "TIME_track" );
       /* Create the eflowRecCluster and put it in the container */
       std::unique_ptr<eflowRecTrack> thisEFRecTrack  = std::make_unique<eflowRecTrack>(ElementLink<xAOD::TrackParticleContainer>(*tracksReadHandle, trackIndex), m_theTrackExtrapolatorTool);
       thisEFRecTrack->setTrackId(trackIndex);
       eflowRecTracksWriteHandle->push_back(std::move(thisEFRecTrack));
+      eta_track = thisTrack->eta();
+      pt_track = thisTrack->pt() * invGeV;
       // Fill histogram
-      auto mon_trktime = Monitored::Group(m_monTool, t_track);
+      auto mon_trk = Monitored::Group(m_monTool, t_track, eta_track, pt_track);
     }
     trackIndex++;
   }
diff --git a/Reconstruction/eflowRec/src/eflowCaloObjectMaker.cxx b/Reconstruction/eflowRec/src/eflowCaloObjectMaker.cxx
index e54537266bc0b58dbb7d7d8c3b6d4febe8785d76..8b0cc18da02c8c5d4572316c07b8e8ad37d47efe 100644
--- a/Reconstruction/eflowRec/src/eflowCaloObjectMaker.cxx
+++ b/Reconstruction/eflowRec/src/eflowCaloObjectMaker.cxx
@@ -38,7 +38,7 @@ int eflowCaloObjectMaker::makeTrkCluCaloObjects(eflowRecTrackContainer* eflowTra
 
 }
 
-int eflowCaloObjectMaker::makeTrkCluCaloObjects(std::vector<eflowRecTrack*> tracksToRecover, std::vector<eflowRecCluster*> clustersToConsider, eflowCaloObjectContainer* caloObjectContainer) {
+int eflowCaloObjectMaker::makeTrkCluCaloObjects(std::vector<eflowRecTrack*>& tracksToRecover, std::vector<eflowRecCluster*>& clustersToConsider, eflowCaloObjectContainer* caloObjectContainer) {
   int result(0);
 
   /* Create all eflowCaloObjects that contain only eflowRecTracks and cache eflowRecTracks matched with cluster */
diff --git a/Reconstruction/eflowRec/src/eflowCellEOverPTool_mc12_HLLHC.cxx b/Reconstruction/eflowRec/src/eflowCellEOverPTool_mc12_HLLHC.cxx
index a38b6d6bc47832483ac74770c282c25a80b68c4e..fbe182c2c1ddcbc8c7ead0eae6ee660d2c5d632e 100644
--- a/Reconstruction/eflowRec/src/eflowCellEOverPTool_mc12_HLLHC.cxx
+++ b/Reconstruction/eflowRec/src/eflowCellEOverPTool_mc12_HLLHC.cxx
@@ -36,10 +36,10 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::initialize(){
   return StatusCode::SUCCESS;
 }
 
-StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *binnedParameters){
+StatusCode eflowCellEOverPTool_mc12_HLLHC::fillBinnedParameters(eflowEEtaBinnedParameters *binnedParameters) const {
 
   if (binnedParameters) {
-    
+
     binnedParameters->initialise(m_eBinValues, m_etaBinBounds);
 
     ////////////////////////////
@@ -47,8 +47,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
     ////////////////////////////
 
    // j1st = EMB1
-    binnedParameters->setFudgeMean( E001bin, eta050bin, eflowFirstIntRegions::EMB1, 0.321000 ); 
-    binnedParameters->setFudgeStdDev( E001bin, eta050bin, eflowFirstIntRegions::EMB1, 0.299000 ); 
+    binnedParameters->setFudgeMean( E001bin, eta050bin, eflowFirstIntRegions::EMB1, 0.321000 );
+    binnedParameters->setFudgeStdDev( E001bin, eta050bin, eflowFirstIntRegions::EMB1, 0.299000 );
 
 
     binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM1,1.58218);
@@ -74,8 +74,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB2
-    binnedParameters->setFudgeMean( E001bin, eta050bin, eflowFirstIntRegions::EMB2, 0.465000 ); 
-    binnedParameters->setFudgeStdDev( E001bin, eta050bin, eflowFirstIntRegions::EMB2, 0.304000 ); 
+    binnedParameters->setFudgeMean( E001bin, eta050bin, eflowFirstIntRegions::EMB2, 0.465000 );
+    binnedParameters->setFudgeStdDev( E001bin, eta050bin, eflowFirstIntRegions::EMB2, 0.304000 );
 
 
     binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM1,0.292708);
@@ -97,8 +97,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB3
-    binnedParameters->setFudgeMean( E001bin, eta050bin, eflowFirstIntRegions::EMB3, 0.300000 ); 
-    binnedParameters->setFudgeStdDev( E001bin, eta050bin, eflowFirstIntRegions::EMB3, 0.288000 ); 
+    binnedParameters->setFudgeMean( E001bin, eta050bin, eflowFirstIntRegions::EMB3, 0.300000 );
+    binnedParameters->setFudgeStdDev( E001bin, eta050bin, eflowFirstIntRegions::EMB3, 0.288000 );
 
 
     binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM1,0.332119);
@@ -148,8 +148,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = Tile
-    binnedParameters->setFudgeMean( E001bin, eta050bin, eflowFirstIntRegions::Tile, 0.308000 ); 
-    binnedParameters->setFudgeStdDev( E001bin, eta050bin, eflowFirstIntRegions::Tile, 0.542000 ); 
+    binnedParameters->setFudgeMean( E001bin, eta050bin, eflowFirstIntRegions::Tile, 0.308000 );
+    binnedParameters->setFudgeStdDev( E001bin, eta050bin, eflowFirstIntRegions::Tile, 0.542000 );
 
 
     binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM1,0.0698781);
@@ -181,8 +181,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
     ////////////////////////////
 
    // j1st = EMB1
-    binnedParameters->setFudgeMean( E001bin, eta100bin, eflowFirstIntRegions::EMB1, 0.304000 ); 
-    binnedParameters->setFudgeStdDev( E001bin, eta100bin, eflowFirstIntRegions::EMB1, 0.312000 ); 
+    binnedParameters->setFudgeMean( E001bin, eta100bin, eflowFirstIntRegions::EMB1, 0.304000 );
+    binnedParameters->setFudgeStdDev( E001bin, eta100bin, eflowFirstIntRegions::EMB1, 0.312000 );
 
 
     binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM1,1.0613);
@@ -204,8 +204,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB2
-    binnedParameters->setFudgeMean( E001bin, eta100bin, eflowFirstIntRegions::EMB2, 0.457000 ); 
-    binnedParameters->setFudgeStdDev( E001bin, eta100bin, eflowFirstIntRegions::EMB2, 0.285000 ); 
+    binnedParameters->setFudgeMean( E001bin, eta100bin, eflowFirstIntRegions::EMB2, 0.457000 );
+    binnedParameters->setFudgeStdDev( E001bin, eta100bin, eflowFirstIntRegions::EMB2, 0.285000 );
 
 
     binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM1,0.201064);
@@ -227,8 +227,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB3
-    binnedParameters->setFudgeMean( E001bin, eta100bin, eflowFirstIntRegions::EMB3, 0.300000 ); 
-    binnedParameters->setFudgeStdDev( E001bin, eta100bin, eflowFirstIntRegions::EMB3, 0.509000 ); 
+    binnedParameters->setFudgeMean( E001bin, eta100bin, eflowFirstIntRegions::EMB3, 0.300000 );
+    binnedParameters->setFudgeStdDev( E001bin, eta100bin, eflowFirstIntRegions::EMB3, 0.509000 );
 
 
     binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM1,0.233052);
@@ -274,8 +274,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = Tile
-    binnedParameters->setFudgeMean( E001bin, eta100bin, eflowFirstIntRegions::Tile, 0.515000 ); 
-    binnedParameters->setFudgeStdDev( E001bin, eta100bin, eflowFirstIntRegions::Tile, 1.039000 ); 
+    binnedParameters->setFudgeMean( E001bin, eta100bin, eflowFirstIntRegions::Tile, 0.515000 );
+    binnedParameters->setFudgeStdDev( E001bin, eta100bin, eflowFirstIntRegions::Tile, 1.039000 );
 
 
     binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM1,0.393702);
@@ -291,8 +291,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
     ////////////////////////////
 
    // j1st = EMB1
-    binnedParameters->setFudgeMean( E001bin, eta150bin, eflowFirstIntRegions::EMB1, 0.316000 ); 
-    binnedParameters->setFudgeStdDev( E001bin, eta150bin, eflowFirstIntRegions::EMB1, 0.229000 ); 
+    binnedParameters->setFudgeMean( E001bin, eta150bin, eflowFirstIntRegions::EMB1, 0.316000 );
+    binnedParameters->setFudgeStdDev( E001bin, eta150bin, eflowFirstIntRegions::EMB1, 0.229000 );
 
 
     binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM1,0.711413);
@@ -314,8 +314,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB2
-    binnedParameters->setFudgeMean( E001bin, eta150bin, eflowFirstIntRegions::EMB2, 0.444000 ); 
-    binnedParameters->setFudgeStdDev( E001bin, eta150bin, eflowFirstIntRegions::EMB2, 0.255000 ); 
+    binnedParameters->setFudgeMean( E001bin, eta150bin, eflowFirstIntRegions::EMB2, 0.444000 );
+    binnedParameters->setFudgeStdDev( E001bin, eta150bin, eflowFirstIntRegions::EMB2, 0.255000 );
 
 
     binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM1,0.168614);
@@ -337,8 +337,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB3
-    binnedParameters->setFudgeMean( E001bin, eta150bin, eflowFirstIntRegions::EMB3, 0.300000 ); 
-    binnedParameters->setFudgeStdDev( E001bin, eta150bin, eflowFirstIntRegions::EMB3, 0.583000 ); 
+    binnedParameters->setFudgeMean( E001bin, eta150bin, eflowFirstIntRegions::EMB3, 0.300000 );
+    binnedParameters->setFudgeStdDev( E001bin, eta150bin, eflowFirstIntRegions::EMB3, 0.583000 );
 
 
     binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM1,0.297088);
@@ -360,15 +360,15 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EME1
-    binnedParameters->setFudgeMean( E001bin, eta150bin, eflowFirstIntRegions::EME1, 0.591000 ); 
-    binnedParameters->setFudgeStdDev( E001bin, eta150bin, eflowFirstIntRegions::EME1, 0.343000 ); 
+    binnedParameters->setFudgeMean( E001bin, eta150bin, eflowFirstIntRegions::EME1, 0.591000 );
+    binnedParameters->setFudgeStdDev( E001bin, eta150bin, eflowFirstIntRegions::EME1, 0.343000 );
 
 
 
 
    // j1st = EME2
-    binnedParameters->setFudgeMean( E001bin, eta150bin, eflowFirstIntRegions::EME2, 0.651000 ); 
-    binnedParameters->setFudgeStdDev( E001bin, eta150bin, eflowFirstIntRegions::EME2, 0.811000 ); 
+    binnedParameters->setFudgeMean( E001bin, eta150bin, eflowFirstIntRegions::EME2, 0.651000 );
+    binnedParameters->setFudgeStdDev( E001bin, eta150bin, eflowFirstIntRegions::EME2, 0.811000 );
 
 
 
@@ -384,8 +384,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = Tile
-    binnedParameters->setFudgeMean( E001bin, eta150bin, eflowFirstIntRegions::Tile, 0.332000 ); 
-    binnedParameters->setFudgeStdDev( E001bin, eta150bin, eflowFirstIntRegions::Tile, 0.472000 ); 
+    binnedParameters->setFudgeMean( E001bin, eta150bin, eflowFirstIntRegions::Tile, 0.332000 );
+    binnedParameters->setFudgeStdDev( E001bin, eta150bin, eflowFirstIntRegions::Tile, 0.472000 );
 
 
     binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM1,0.0810416);
@@ -428,8 +428,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EME1
-    binnedParameters->setFudgeMean( E001bin, eta250bin, eflowFirstIntRegions::EME1, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E001bin, eta250bin, eflowFirstIntRegions::EME1, 0.000000 ); 
+    binnedParameters->setFudgeMean( E001bin, eta250bin, eflowFirstIntRegions::EME1, 0.000000 );
+    binnedParameters->setFudgeStdDev( E001bin, eta250bin, eflowFirstIntRegions::EME1, 0.000000 );
 
 
     binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME1, NORM1,1.74282);
@@ -451,8 +451,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EME2
-    binnedParameters->setFudgeMean( E001bin, eta250bin, eflowFirstIntRegions::EME2, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E001bin, eta250bin, eflowFirstIntRegions::EME2, 0.000000 ); 
+    binnedParameters->setFudgeMean( E001bin, eta250bin, eflowFirstIntRegions::EME2, 0.000000 );
+    binnedParameters->setFudgeStdDev( E001bin, eta250bin, eflowFirstIntRegions::EME2, 0.000000 );
 
 
     binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME1, NORM1,0.364715);
@@ -474,8 +474,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EME3
-    binnedParameters->setFudgeMean( E001bin, eta250bin, eflowFirstIntRegions::EME3, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E001bin, eta250bin, eflowFirstIntRegions::EME3, 0.000000 ); 
+    binnedParameters->setFudgeMean( E001bin, eta250bin, eflowFirstIntRegions::EME3, 0.000000 );
+    binnedParameters->setFudgeStdDev( E001bin, eta250bin, eflowFirstIntRegions::EME3, 0.000000 );
 
 
     binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC1, NORM1,0.667073);
@@ -489,8 +489,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = HEC
-    binnedParameters->setFudgeMean( E001bin, eta250bin, eflowFirstIntRegions::HEC, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E001bin, eta250bin, eflowFirstIntRegions::HEC, 0.000000 ); 
+    binnedParameters->setFudgeMean( E001bin, eta250bin, eflowFirstIntRegions::HEC, 0.000000 );
+    binnedParameters->setFudgeStdDev( E001bin, eta250bin, eflowFirstIntRegions::HEC, 0.000000 );
 
 
 
@@ -503,8 +503,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
     ////////////////////////////
 
    // j1st = EMB1
-    binnedParameters->setFudgeMean( E003point5bin, eta050bin, eflowFirstIntRegions::EMB1, 0.406000 ); 
-    binnedParameters->setFudgeStdDev( E003point5bin, eta050bin, eflowFirstIntRegions::EMB1, 0.312000 ); 
+    binnedParameters->setFudgeMean( E003point5bin, eta050bin, eflowFirstIntRegions::EMB1, 0.406000 );
+    binnedParameters->setFudgeStdDev( E003point5bin, eta050bin, eflowFirstIntRegions::EMB1, 0.312000 );
 
 
     binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM1,1.43156);
@@ -534,8 +534,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB2
-    binnedParameters->setFudgeMean( E003point5bin, eta050bin, eflowFirstIntRegions::EMB2, 0.499000 ); 
-    binnedParameters->setFudgeStdDev( E003point5bin, eta050bin, eflowFirstIntRegions::EMB2, 0.198000 ); 
+    binnedParameters->setFudgeMean( E003point5bin, eta050bin, eflowFirstIntRegions::EMB2, 0.499000 );
+    binnedParameters->setFudgeStdDev( E003point5bin, eta050bin, eflowFirstIntRegions::EMB2, 0.198000 );
 
 
     binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM1,0.248212);
@@ -565,8 +565,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB3
-    binnedParameters->setFudgeMean( E003point5bin, eta050bin, eflowFirstIntRegions::EMB3, 0.334000 ); 
-    binnedParameters->setFudgeStdDev( E003point5bin, eta050bin, eflowFirstIntRegions::EMB3, 0.316000 ); 
+    binnedParameters->setFudgeMean( E003point5bin, eta050bin, eflowFirstIntRegions::EMB3, 0.334000 );
+    binnedParameters->setFudgeStdDev( E003point5bin, eta050bin, eflowFirstIntRegions::EMB3, 0.316000 );
 
 
     binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM1,0.148983);
@@ -616,8 +616,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = Tile
-    binnedParameters->setFudgeMean( E003point5bin, eta050bin, eflowFirstIntRegions::Tile, 0.740000 ); 
-    binnedParameters->setFudgeStdDev( E003point5bin, eta050bin, eflowFirstIntRegions::Tile, 0.230000 ); 
+    binnedParameters->setFudgeMean( E003point5bin, eta050bin, eflowFirstIntRegions::Tile, 0.740000 );
+    binnedParameters->setFudgeStdDev( E003point5bin, eta050bin, eflowFirstIntRegions::Tile, 0.230000 );
 
 
     binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM1,0.11613);
@@ -649,8 +649,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
     ////////////////////////////
 
    // j1st = EMB1
-    binnedParameters->setFudgeMean( E003point5bin, eta100bin, eflowFirstIntRegions::EMB1, 0.357000 ); 
-    binnedParameters->setFudgeStdDev( E003point5bin, eta100bin, eflowFirstIntRegions::EMB1, 0.285000 ); 
+    binnedParameters->setFudgeMean( E003point5bin, eta100bin, eflowFirstIntRegions::EMB1, 0.357000 );
+    binnedParameters->setFudgeStdDev( E003point5bin, eta100bin, eflowFirstIntRegions::EMB1, 0.285000 );
 
 
     binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM1,0.951874);
@@ -680,8 +680,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB2
-    binnedParameters->setFudgeMean( E003point5bin, eta100bin, eflowFirstIntRegions::EMB2, 0.482000 ); 
-    binnedParameters->setFudgeStdDev( E003point5bin, eta100bin, eflowFirstIntRegions::EMB2, 0.214000 ); 
+    binnedParameters->setFudgeMean( E003point5bin, eta100bin, eflowFirstIntRegions::EMB2, 0.482000 );
+    binnedParameters->setFudgeStdDev( E003point5bin, eta100bin, eflowFirstIntRegions::EMB2, 0.214000 );
 
 
     binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM1,0.162365);
@@ -707,8 +707,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB3
-    binnedParameters->setFudgeMean( E003point5bin, eta100bin, eflowFirstIntRegions::EMB3, 0.367000 ); 
-    binnedParameters->setFudgeStdDev( E003point5bin, eta100bin, eflowFirstIntRegions::EMB3, 0.232000 ); 
+    binnedParameters->setFudgeMean( E003point5bin, eta100bin, eflowFirstIntRegions::EMB3, 0.367000 );
+    binnedParameters->setFudgeStdDev( E003point5bin, eta100bin, eflowFirstIntRegions::EMB3, 0.232000 );
 
 
     binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM1,0.124101);
@@ -758,8 +758,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = Tile
-    binnedParameters->setFudgeMean( E003point5bin, eta100bin, eflowFirstIntRegions::Tile, 0.755000 ); 
-    binnedParameters->setFudgeStdDev( E003point5bin, eta100bin, eflowFirstIntRegions::Tile, 0.293000 ); 
+    binnedParameters->setFudgeMean( E003point5bin, eta100bin, eflowFirstIntRegions::Tile, 0.755000 );
+    binnedParameters->setFudgeStdDev( E003point5bin, eta100bin, eflowFirstIntRegions::Tile, 0.293000 );
 
 
     binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM1,0.0778484);
@@ -791,8 +791,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
     ////////////////////////////
 
    // j1st = EMB1
-    binnedParameters->setFudgeMean( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, 0.300000 ); 
-    binnedParameters->setFudgeStdDev( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, 0.275000 ); 
+    binnedParameters->setFudgeMean( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, 0.300000 );
+    binnedParameters->setFudgeStdDev( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, 0.275000 );
 
 
     binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM1,0.618127);
@@ -830,8 +830,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB2
-    binnedParameters->setFudgeMean( E003point5bin, eta150bin, eflowFirstIntRegions::EMB2, 0.414000 ); 
-    binnedParameters->setFudgeStdDev( E003point5bin, eta150bin, eflowFirstIntRegions::EMB2, 0.250000 ); 
+    binnedParameters->setFudgeMean( E003point5bin, eta150bin, eflowFirstIntRegions::EMB2, 0.414000 );
+    binnedParameters->setFudgeStdDev( E003point5bin, eta150bin, eflowFirstIntRegions::EMB2, 0.250000 );
 
 
     binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM1,0.135475);
@@ -857,8 +857,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB3
-    binnedParameters->setFudgeMean( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, 0.373000 ); 
-    binnedParameters->setFudgeStdDev( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, 0.218000 ); 
+    binnedParameters->setFudgeMean( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, 0.373000 );
+    binnedParameters->setFudgeStdDev( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, 0.218000 );
 
 
     binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM1,0.125619);
@@ -900,15 +900,15 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EME1
-    binnedParameters->setFudgeMean( E003point5bin, eta150bin, eflowFirstIntRegions::EME1, 0.300000 ); 
-    binnedParameters->setFudgeStdDev( E003point5bin, eta150bin, eflowFirstIntRegions::EME1, 0.262000 ); 
+    binnedParameters->setFudgeMean( E003point5bin, eta150bin, eflowFirstIntRegions::EME1, 0.300000 );
+    binnedParameters->setFudgeStdDev( E003point5bin, eta150bin, eflowFirstIntRegions::EME1, 0.262000 );
 
 
 
 
    // j1st = EME2
-    binnedParameters->setFudgeMean( E003point5bin, eta150bin, eflowFirstIntRegions::EME2, 0.339000 ); 
-    binnedParameters->setFudgeStdDev( E003point5bin, eta150bin, eflowFirstIntRegions::EME2, 0.223000 ); 
+    binnedParameters->setFudgeMean( E003point5bin, eta150bin, eflowFirstIntRegions::EME2, 0.339000 );
+    binnedParameters->setFudgeStdDev( E003point5bin, eta150bin, eflowFirstIntRegions::EME2, 0.223000 );
 
 
 
@@ -924,8 +924,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = Tile
-    binnedParameters->setFudgeMean( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, 0.300000 ); 
-    binnedParameters->setFudgeStdDev( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, 0.672000 ); 
+    binnedParameters->setFudgeMean( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, 0.300000 );
+    binnedParameters->setFudgeStdDev( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, 0.672000 );
 
 
     binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM1,0.0276654);
@@ -985,8 +985,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EME1
-    binnedParameters->setFudgeMean( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, 0.300000 ); 
-    binnedParameters->setFudgeStdDev( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, 0.279000 ); 
+    binnedParameters->setFudgeMean( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, 0.300000 );
+    binnedParameters->setFudgeStdDev( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, 0.279000 );
 
 
     binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME1, NORM1,2.80389);
@@ -1020,8 +1020,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EME2
-    binnedParameters->setFudgeMean( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, 0.415000 ); 
-    binnedParameters->setFudgeStdDev( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, 0.244000 ); 
+    binnedParameters->setFudgeMean( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, 0.415000 );
+    binnedParameters->setFudgeStdDev( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, 0.244000 );
 
 
     binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME1, NORM1,0.411762);
@@ -1055,8 +1055,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EME3
-    binnedParameters->setFudgeMean( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, 0.360000 ); 
-    binnedParameters->setFudgeStdDev( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, 0.264000 ); 
+    binnedParameters->setFudgeMean( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, 0.360000 );
+    binnedParameters->setFudgeStdDev( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, 0.264000 );
 
 
     binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME1, NORM1,0.221942);
@@ -1090,8 +1090,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = HEC
-    binnedParameters->setFudgeMean( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, 0.582000 ); 
-    binnedParameters->setFudgeStdDev( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, 0.334000 ); 
+    binnedParameters->setFudgeMean( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, 0.582000 );
+    binnedParameters->setFudgeStdDev( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, 0.334000 );
 
 
     binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME1, NORM1,0.284158);
@@ -1156,8 +1156,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
     ////////////////////////////
 
    // j1st = EMB1
-    binnedParameters->setFudgeMean( E010bin, eta050bin, eflowFirstIntRegions::EMB1, 0.576000 ); 
-    binnedParameters->setFudgeStdDev( E010bin, eta050bin, eflowFirstIntRegions::EMB1, 0.180000 ); 
+    binnedParameters->setFudgeMean( E010bin, eta050bin, eflowFirstIntRegions::EMB1, 0.576000 );
+    binnedParameters->setFudgeStdDev( E010bin, eta050bin, eflowFirstIntRegions::EMB1, 0.180000 );
 
 
     binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM1,2.43176);
@@ -1187,8 +1187,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB2
-    binnedParameters->setFudgeMean( E010bin, eta050bin, eflowFirstIntRegions::EMB2, 0.608000 ); 
-    binnedParameters->setFudgeStdDev( E010bin, eta050bin, eflowFirstIntRegions::EMB2, 0.154000 ); 
+    binnedParameters->setFudgeMean( E010bin, eta050bin, eflowFirstIntRegions::EMB2, 0.608000 );
+    binnedParameters->setFudgeStdDev( E010bin, eta050bin, eflowFirstIntRegions::EMB2, 0.154000 );
 
 
     binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM1,0.406566);
@@ -1218,8 +1218,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB3
-    binnedParameters->setFudgeMean( E010bin, eta050bin, eflowFirstIntRegions::EMB3, 0.524000 ); 
-    binnedParameters->setFudgeStdDev( E010bin, eta050bin, eflowFirstIntRegions::EMB3, 0.154000 ); 
+    binnedParameters->setFudgeMean( E010bin, eta050bin, eflowFirstIntRegions::EMB3, 0.524000 );
+    binnedParameters->setFudgeStdDev( E010bin, eta050bin, eflowFirstIntRegions::EMB3, 0.154000 );
 
 
     binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM1,0.14787);
@@ -1269,8 +1269,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = Tile
-    binnedParameters->setFudgeMean( E010bin, eta050bin, eflowFirstIntRegions::Tile, 0.722000 ); 
-    binnedParameters->setFudgeStdDev( E010bin, eta050bin, eflowFirstIntRegions::Tile, 0.154000 ); 
+    binnedParameters->setFudgeMean( E010bin, eta050bin, eflowFirstIntRegions::Tile, 0.722000 );
+    binnedParameters->setFudgeStdDev( E010bin, eta050bin, eflowFirstIntRegions::Tile, 0.154000 );
 
 
     binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM1,0.128433);
@@ -1303,8 +1303,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB1
-    binnedParameters->setFudgeMean( E010bin, eta100bin, eflowFirstIntRegions::EMB1, 0.543000 ); 
-    binnedParameters->setFudgeStdDev( E010bin, eta100bin, eflowFirstIntRegions::EMB1, 0.190000 ); 
+    binnedParameters->setFudgeMean( E010bin, eta100bin, eflowFirstIntRegions::EMB1, 0.543000 );
+    binnedParameters->setFudgeStdDev( E010bin, eta100bin, eflowFirstIntRegions::EMB1, 0.190000 );
 
 
     binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM1,1.52832);
@@ -1334,8 +1334,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB2
-    binnedParameters->setFudgeMean( E010bin, eta100bin, eflowFirstIntRegions::EMB2, 0.590000 ); 
-    binnedParameters->setFudgeStdDev( E010bin, eta100bin, eflowFirstIntRegions::EMB2, 0.157000 ); 
+    binnedParameters->setFudgeMean( E010bin, eta100bin, eflowFirstIntRegions::EMB2, 0.590000 );
+    binnedParameters->setFudgeStdDev( E010bin, eta100bin, eflowFirstIntRegions::EMB2, 0.157000 );
 
 
     binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM1,0.186236);
@@ -1361,8 +1361,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB3
-    binnedParameters->setFudgeMean( E010bin, eta100bin, eflowFirstIntRegions::EMB3, 0.510000 ); 
-    binnedParameters->setFudgeStdDev( E010bin, eta100bin, eflowFirstIntRegions::EMB3, 0.155000 ); 
+    binnedParameters->setFudgeMean( E010bin, eta100bin, eflowFirstIntRegions::EMB3, 0.510000 );
+    binnedParameters->setFudgeStdDev( E010bin, eta100bin, eflowFirstIntRegions::EMB3, 0.155000 );
 
 
     binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM1,0.109028);
@@ -1412,8 +1412,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = Tile
-    binnedParameters->setFudgeMean( E010bin, eta100bin, eflowFirstIntRegions::Tile, 0.721000 ); 
-    binnedParameters->setFudgeStdDev( E010bin, eta100bin, eflowFirstIntRegions::Tile, 0.144000 ); 
+    binnedParameters->setFudgeMean( E010bin, eta100bin, eflowFirstIntRegions::Tile, 0.721000 );
+    binnedParameters->setFudgeStdDev( E010bin, eta100bin, eflowFirstIntRegions::Tile, 0.144000 );
 
 
     binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM1,0.107734);
@@ -1445,8 +1445,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
     ////////////////////////////
 
    // j1st = EMB1
-    binnedParameters->setFudgeMean( E010bin, eta150bin, eflowFirstIntRegions::EMB1, 0.489000 ); 
-    binnedParameters->setFudgeStdDev( E010bin, eta150bin, eflowFirstIntRegions::EMB1, 0.226000 ); 
+    binnedParameters->setFudgeMean( E010bin, eta150bin, eflowFirstIntRegions::EMB1, 0.489000 );
+    binnedParameters->setFudgeStdDev( E010bin, eta150bin, eflowFirstIntRegions::EMB1, 0.226000 );
 
 
     binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM1,0.79114);
@@ -1484,8 +1484,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB2
-    binnedParameters->setFudgeMean( E010bin, eta150bin, eflowFirstIntRegions::EMB2, 0.550000 ); 
-    binnedParameters->setFudgeStdDev( E010bin, eta150bin, eflowFirstIntRegions::EMB2, 0.191000 ); 
+    binnedParameters->setFudgeMean( E010bin, eta150bin, eflowFirstIntRegions::EMB2, 0.550000 );
+    binnedParameters->setFudgeStdDev( E010bin, eta150bin, eflowFirstIntRegions::EMB2, 0.191000 );
 
 
     binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM1,0.175507);
@@ -1523,8 +1523,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB3
-    binnedParameters->setFudgeMean( E010bin, eta150bin, eflowFirstIntRegions::EMB3, 0.535000 ); 
-    binnedParameters->setFudgeStdDev( E010bin, eta150bin, eflowFirstIntRegions::EMB3, 0.198000 ); 
+    binnedParameters->setFudgeMean( E010bin, eta150bin, eflowFirstIntRegions::EMB3, 0.535000 );
+    binnedParameters->setFudgeStdDev( E010bin, eta150bin, eflowFirstIntRegions::EMB3, 0.198000 );
 
 
     binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM1,0.0852493);
@@ -1562,15 +1562,15 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EME1
-    binnedParameters->setFudgeMean( E010bin, eta150bin, eflowFirstIntRegions::EME1, 0.402000 ); 
-    binnedParameters->setFudgeStdDev( E010bin, eta150bin, eflowFirstIntRegions::EME1, 0.233000 ); 
+    binnedParameters->setFudgeMean( E010bin, eta150bin, eflowFirstIntRegions::EME1, 0.402000 );
+    binnedParameters->setFudgeStdDev( E010bin, eta150bin, eflowFirstIntRegions::EME1, 0.233000 );
 
 
 
 
    // j1st = EME2
-    binnedParameters->setFudgeMean( E010bin, eta150bin, eflowFirstIntRegions::EME2, 0.459000 ); 
-    binnedParameters->setFudgeStdDev( E010bin, eta150bin, eflowFirstIntRegions::EME2, 0.168000 ); 
+    binnedParameters->setFudgeMean( E010bin, eta150bin, eflowFirstIntRegions::EME2, 0.459000 );
+    binnedParameters->setFudgeStdDev( E010bin, eta150bin, eflowFirstIntRegions::EME2, 0.168000 );
 
 
 
@@ -1614,8 +1614,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = Tile
-    binnedParameters->setFudgeMean( E010bin, eta150bin, eflowFirstIntRegions::Tile, 0.795000 ); 
-    binnedParameters->setFudgeStdDev( E010bin, eta150bin, eflowFirstIntRegions::Tile, 0.169000 ); 
+    binnedParameters->setFudgeMean( E010bin, eta150bin, eflowFirstIntRegions::Tile, 0.795000 );
+    binnedParameters->setFudgeStdDev( E010bin, eta150bin, eflowFirstIntRegions::Tile, 0.169000 );
 
 
     binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM1,0.10351);
@@ -1694,8 +1694,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EME1
-    binnedParameters->setFudgeMean( E010bin, eta250bin, eflowFirstIntRegions::EME1, 0.483000 ); 
-    binnedParameters->setFudgeStdDev( E010bin, eta250bin, eflowFirstIntRegions::EME1, 0.239000 ); 
+    binnedParameters->setFudgeMean( E010bin, eta250bin, eflowFirstIntRegions::EME1, 0.483000 );
+    binnedParameters->setFudgeStdDev( E010bin, eta250bin, eflowFirstIntRegions::EME1, 0.239000 );
 
 
     binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME1, NORM1,4.15008);
@@ -1729,8 +1729,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EME2
-    binnedParameters->setFudgeMean( E010bin, eta250bin, eflowFirstIntRegions::EME2, 0.547000 ); 
-    binnedParameters->setFudgeStdDev( E010bin, eta250bin, eflowFirstIntRegions::EME2, 0.192000 ); 
+    binnedParameters->setFudgeMean( E010bin, eta250bin, eflowFirstIntRegions::EME2, 0.547000 );
+    binnedParameters->setFudgeStdDev( E010bin, eta250bin, eflowFirstIntRegions::EME2, 0.192000 );
 
 
     binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME1, NORM1,0.587762);
@@ -1764,8 +1764,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EME3
-    binnedParameters->setFudgeMean( E010bin, eta250bin, eflowFirstIntRegions::EME3, 0.572000 ); 
-    binnedParameters->setFudgeStdDev( E010bin, eta250bin, eflowFirstIntRegions::EME3, 0.220000 ); 
+    binnedParameters->setFudgeMean( E010bin, eta250bin, eflowFirstIntRegions::EME3, 0.572000 );
+    binnedParameters->setFudgeStdDev( E010bin, eta250bin, eflowFirstIntRegions::EME3, 0.220000 );
 
 
     binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME1, NORM1,0.300834);
@@ -1799,8 +1799,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = HEC
-    binnedParameters->setFudgeMean( E010bin, eta250bin, eflowFirstIntRegions::HEC, 0.679000 ); 
-    binnedParameters->setFudgeStdDev( E010bin, eta250bin, eflowFirstIntRegions::HEC, 0.230000 ); 
+    binnedParameters->setFudgeMean( E010bin, eta250bin, eflowFirstIntRegions::HEC, 0.679000 );
+    binnedParameters->setFudgeStdDev( E010bin, eta250bin, eflowFirstIntRegions::HEC, 0.230000 );
 
 
     binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, NORM1,0.0796651);
@@ -1885,8 +1885,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
     ////////////////////////////
 
    // j1st = EMB1
-    binnedParameters->setFudgeMean( E020bin, eta050bin, eflowFirstIntRegions::EMB1, 0.658000 ); 
-    binnedParameters->setFudgeStdDev( E020bin, eta050bin, eflowFirstIntRegions::EMB1, 0.127000 ); 
+    binnedParameters->setFudgeMean( E020bin, eta050bin, eflowFirstIntRegions::EMB1, 0.658000 );
+    binnedParameters->setFudgeStdDev( E020bin, eta050bin, eflowFirstIntRegions::EMB1, 0.127000 );
 
 
     binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM1,3.26847);
@@ -1916,8 +1916,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB2
-    binnedParameters->setFudgeMean( E020bin, eta050bin, eflowFirstIntRegions::EMB2, 0.669000 ); 
-    binnedParameters->setFudgeStdDev( E020bin, eta050bin, eflowFirstIntRegions::EMB2, 0.126000 ); 
+    binnedParameters->setFudgeMean( E020bin, eta050bin, eflowFirstIntRegions::EMB2, 0.669000 );
+    binnedParameters->setFudgeStdDev( E020bin, eta050bin, eflowFirstIntRegions::EMB2, 0.126000 );
 
 
     binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM1,0.397084);
@@ -1947,8 +1947,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB3
-    binnedParameters->setFudgeMean( E020bin, eta050bin, eflowFirstIntRegions::EMB3, 0.583000 ); 
-    binnedParameters->setFudgeStdDev( E020bin, eta050bin, eflowFirstIntRegions::EMB3, 0.123000 ); 
+    binnedParameters->setFudgeMean( E020bin, eta050bin, eflowFirstIntRegions::EMB3, 0.583000 );
+    binnedParameters->setFudgeStdDev( E020bin, eta050bin, eflowFirstIntRegions::EMB3, 0.123000 );
 
 
     binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM1,0.107883);
@@ -1998,8 +1998,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = Tile
-    binnedParameters->setFudgeMean( E020bin, eta050bin, eflowFirstIntRegions::Tile, 0.760000 ); 
-    binnedParameters->setFudgeStdDev( E020bin, eta050bin, eflowFirstIntRegions::Tile, 0.134000 ); 
+    binnedParameters->setFudgeMean( E020bin, eta050bin, eflowFirstIntRegions::Tile, 0.760000 );
+    binnedParameters->setFudgeStdDev( E020bin, eta050bin, eflowFirstIntRegions::Tile, 0.134000 );
 
 
     binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM1,0.112534);
@@ -2031,8 +2031,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
     ////////////////////////////
 
    // j1st = EMB1
-    binnedParameters->setFudgeMean( E020bin, eta100bin, eflowFirstIntRegions::EMB1, 0.620000 ); 
-    binnedParameters->setFudgeStdDev( E020bin, eta100bin, eflowFirstIntRegions::EMB1, 0.139000 ); 
+    binnedParameters->setFudgeMean( E020bin, eta100bin, eflowFirstIntRegions::EMB1, 0.620000 );
+    binnedParameters->setFudgeStdDev( E020bin, eta100bin, eflowFirstIntRegions::EMB1, 0.139000 );
 
 
     binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM1,1.45897);
@@ -2062,8 +2062,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB2
-    binnedParameters->setFudgeMean( E020bin, eta100bin, eflowFirstIntRegions::EMB2, 0.654000 ); 
-    binnedParameters->setFudgeStdDev( E020bin, eta100bin, eflowFirstIntRegions::EMB2, 0.126000 ); 
+    binnedParameters->setFudgeMean( E020bin, eta100bin, eflowFirstIntRegions::EMB2, 0.654000 );
+    binnedParameters->setFudgeStdDev( E020bin, eta100bin, eflowFirstIntRegions::EMB2, 0.126000 );
 
 
     binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM1,0.23826);
@@ -2093,8 +2093,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB3
-    binnedParameters->setFudgeMean( E020bin, eta100bin, eflowFirstIntRegions::EMB3, 0.556000 ); 
-    binnedParameters->setFudgeStdDev( E020bin, eta100bin, eflowFirstIntRegions::EMB3, 0.107000 ); 
+    binnedParameters->setFudgeMean( E020bin, eta100bin, eflowFirstIntRegions::EMB3, 0.556000 );
+    binnedParameters->setFudgeStdDev( E020bin, eta100bin, eflowFirstIntRegions::EMB3, 0.107000 );
 
 
     binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM1,0.080015);
@@ -2144,8 +2144,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = Tile
-    binnedParameters->setFudgeMean( E020bin, eta100bin, eflowFirstIntRegions::Tile, 0.738000 ); 
-    binnedParameters->setFudgeStdDev( E020bin, eta100bin, eflowFirstIntRegions::Tile, 0.128000 ); 
+    binnedParameters->setFudgeMean( E020bin, eta100bin, eflowFirstIntRegions::Tile, 0.738000 );
+    binnedParameters->setFudgeStdDev( E020bin, eta100bin, eflowFirstIntRegions::Tile, 0.128000 );
 
 
     binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM1,0.0456492);
@@ -2177,8 +2177,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
     ////////////////////////////
 
    // j1st = EMB1
-    binnedParameters->setFudgeMean( E020bin, eta150bin, eflowFirstIntRegions::EMB1, 0.581000 ); 
-    binnedParameters->setFudgeStdDev( E020bin, eta150bin, eflowFirstIntRegions::EMB1, 0.166000 ); 
+    binnedParameters->setFudgeMean( E020bin, eta150bin, eflowFirstIntRegions::EMB1, 0.581000 );
+    binnedParameters->setFudgeStdDev( E020bin, eta150bin, eflowFirstIntRegions::EMB1, 0.166000 );
 
 
     binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM1,1.30745);
@@ -2212,8 +2212,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB2
-    binnedParameters->setFudgeMean( E020bin, eta150bin, eflowFirstIntRegions::EMB2, 0.629000 ); 
-    binnedParameters->setFudgeStdDev( E020bin, eta150bin, eflowFirstIntRegions::EMB2, 0.159000 ); 
+    binnedParameters->setFudgeMean( E020bin, eta150bin, eflowFirstIntRegions::EMB2, 0.629000 );
+    binnedParameters->setFudgeStdDev( E020bin, eta150bin, eflowFirstIntRegions::EMB2, 0.159000 );
 
 
     binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM1,0.338733);
@@ -2247,8 +2247,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB3
-    binnedParameters->setFudgeMean( E020bin, eta150bin, eflowFirstIntRegions::EMB3, 0.618000 ); 
-    binnedParameters->setFudgeStdDev( E020bin, eta150bin, eflowFirstIntRegions::EMB3, 0.155000 ); 
+    binnedParameters->setFudgeMean( E020bin, eta150bin, eflowFirstIntRegions::EMB3, 0.618000 );
+    binnedParameters->setFudgeStdDev( E020bin, eta150bin, eflowFirstIntRegions::EMB3, 0.155000 );
 
 
     binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM1,0.09757);
@@ -2294,15 +2294,15 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EME1
-    binnedParameters->setFudgeMean( E020bin, eta150bin, eflowFirstIntRegions::EME1, 0.474000 ); 
-    binnedParameters->setFudgeStdDev( E020bin, eta150bin, eflowFirstIntRegions::EME1, 0.167000 ); 
+    binnedParameters->setFudgeMean( E020bin, eta150bin, eflowFirstIntRegions::EME1, 0.474000 );
+    binnedParameters->setFudgeStdDev( E020bin, eta150bin, eflowFirstIntRegions::EME1, 0.167000 );
 
 
 
 
    // j1st = EME2
-    binnedParameters->setFudgeMean( E020bin, eta150bin, eflowFirstIntRegions::EME2, 0.538000 ); 
-    binnedParameters->setFudgeStdDev( E020bin, eta150bin, eflowFirstIntRegions::EME2, 0.140000 ); 
+    binnedParameters->setFudgeMean( E020bin, eta150bin, eflowFirstIntRegions::EME2, 0.538000 );
+    binnedParameters->setFudgeStdDev( E020bin, eta150bin, eflowFirstIntRegions::EME2, 0.140000 );
 
 
 
@@ -2346,8 +2346,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = Tile
-    binnedParameters->setFudgeMean( E020bin, eta150bin, eflowFirstIntRegions::Tile, 0.816000 ); 
-    binnedParameters->setFudgeStdDev( E020bin, eta150bin, eflowFirstIntRegions::Tile, 0.129000 ); 
+    binnedParameters->setFudgeMean( E020bin, eta150bin, eflowFirstIntRegions::Tile, 0.816000 );
+    binnedParameters->setFudgeStdDev( E020bin, eta150bin, eflowFirstIntRegions::Tile, 0.129000 );
 
 
     binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM1,0.0877375);
@@ -2411,8 +2411,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EME1
-    binnedParameters->setFudgeMean( E020bin, eta250bin, eflowFirstIntRegions::EME1, 0.580000 ); 
-    binnedParameters->setFudgeStdDev( E020bin, eta250bin, eflowFirstIntRegions::EME1, 0.175000 ); 
+    binnedParameters->setFudgeMean( E020bin, eta250bin, eflowFirstIntRegions::EME1, 0.580000 );
+    binnedParameters->setFudgeStdDev( E020bin, eta250bin, eflowFirstIntRegions::EME1, 0.175000 );
 
 
     binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME1, NORM1,5.29384);
@@ -2446,8 +2446,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EME2
-    binnedParameters->setFudgeMean( E020bin, eta250bin, eflowFirstIntRegions::EME2, 0.638000 ); 
-    binnedParameters->setFudgeStdDev( E020bin, eta250bin, eflowFirstIntRegions::EME2, 0.145000 ); 
+    binnedParameters->setFudgeMean( E020bin, eta250bin, eflowFirstIntRegions::EME2, 0.638000 );
+    binnedParameters->setFudgeStdDev( E020bin, eta250bin, eflowFirstIntRegions::EME2, 0.145000 );
 
 
     binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME1, NORM1,0.929508);
@@ -2481,8 +2481,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EME3
-    binnedParameters->setFudgeMean( E020bin, eta250bin, eflowFirstIntRegions::EME3, 0.661000 ); 
-    binnedParameters->setFudgeStdDev( E020bin, eta250bin, eflowFirstIntRegions::EME3, 0.157000 ); 
+    binnedParameters->setFudgeMean( E020bin, eta250bin, eflowFirstIntRegions::EME3, 0.661000 );
+    binnedParameters->setFudgeStdDev( E020bin, eta250bin, eflowFirstIntRegions::EME3, 0.157000 );
 
 
     binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME1, NORM1,0.359184);
@@ -2516,8 +2516,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = HEC
-    binnedParameters->setFudgeMean( E020bin, eta250bin, eflowFirstIntRegions::HEC, 0.722000 ); 
-    binnedParameters->setFudgeStdDev( E020bin, eta250bin, eflowFirstIntRegions::HEC, 0.175000 ); 
+    binnedParameters->setFudgeMean( E020bin, eta250bin, eflowFirstIntRegions::HEC, 0.722000 );
+    binnedParameters->setFudgeStdDev( E020bin, eta250bin, eflowFirstIntRegions::HEC, 0.175000 );
 
 
     binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, NORM1,0.0129383);
@@ -2594,8 +2594,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
     ////////////////////////////
 
    // j1st = EMB1
-    binnedParameters->setFudgeMean( E032point5bin, eta050bin, eflowFirstIntRegions::EMB1, 0.691000 ); 
-    binnedParameters->setFudgeStdDev( E032point5bin, eta050bin, eflowFirstIntRegions::EMB1, 0.099000 ); 
+    binnedParameters->setFudgeMean( E032point5bin, eta050bin, eflowFirstIntRegions::EMB1, 0.691000 );
+    binnedParameters->setFudgeStdDev( E032point5bin, eta050bin, eflowFirstIntRegions::EMB1, 0.099000 );
 
 
     binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM1,3.22286);
@@ -2625,8 +2625,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB2
-    binnedParameters->setFudgeMean( E032point5bin, eta050bin, eflowFirstIntRegions::EMB2, 0.694000 ); 
-    binnedParameters->setFudgeStdDev( E032point5bin, eta050bin, eflowFirstIntRegions::EMB2, 0.103000 ); 
+    binnedParameters->setFudgeMean( E032point5bin, eta050bin, eflowFirstIntRegions::EMB2, 0.694000 );
+    binnedParameters->setFudgeStdDev( E032point5bin, eta050bin, eflowFirstIntRegions::EMB2, 0.103000 );
 
 
     binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM1,0.793048);
@@ -2656,8 +2656,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB3
-    binnedParameters->setFudgeMean( E032point5bin, eta050bin, eflowFirstIntRegions::EMB3, 0.600000 ); 
-    binnedParameters->setFudgeStdDev( E032point5bin, eta050bin, eflowFirstIntRegions::EMB3, 0.110000 ); 
+    binnedParameters->setFudgeMean( E032point5bin, eta050bin, eflowFirstIntRegions::EMB3, 0.600000 );
+    binnedParameters->setFudgeStdDev( E032point5bin, eta050bin, eflowFirstIntRegions::EMB3, 0.110000 );
 
 
     binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM1,0.104622);
@@ -2707,8 +2707,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = Tile
-    binnedParameters->setFudgeMean( E032point5bin, eta050bin, eflowFirstIntRegions::Tile, 0.783000 ); 
-    binnedParameters->setFudgeStdDev( E032point5bin, eta050bin, eflowFirstIntRegions::Tile, 0.102000 ); 
+    binnedParameters->setFudgeMean( E032point5bin, eta050bin, eflowFirstIntRegions::Tile, 0.783000 );
+    binnedParameters->setFudgeStdDev( E032point5bin, eta050bin, eflowFirstIntRegions::Tile, 0.102000 );
 
 
     binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM1,0.0682025);
@@ -2740,8 +2740,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
     ////////////////////////////
 
    // j1st = EMB1
-    binnedParameters->setFudgeMean( E032point5bin, eta100bin, eflowFirstIntRegions::EMB1, 0.663000 ); 
-    binnedParameters->setFudgeStdDev( E032point5bin, eta100bin, eflowFirstIntRegions::EMB1, 0.114000 ); 
+    binnedParameters->setFudgeMean( E032point5bin, eta100bin, eflowFirstIntRegions::EMB1, 0.663000 );
+    binnedParameters->setFudgeStdDev( E032point5bin, eta100bin, eflowFirstIntRegions::EMB1, 0.114000 );
 
 
     binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM1,1.51378);
@@ -2771,8 +2771,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB2
-    binnedParameters->setFudgeMean( E032point5bin, eta100bin, eflowFirstIntRegions::EMB2, 0.681000 ); 
-    binnedParameters->setFudgeStdDev( E032point5bin, eta100bin, eflowFirstIntRegions::EMB2, 0.108000 ); 
+    binnedParameters->setFudgeMean( E032point5bin, eta100bin, eflowFirstIntRegions::EMB2, 0.681000 );
+    binnedParameters->setFudgeStdDev( E032point5bin, eta100bin, eflowFirstIntRegions::EMB2, 0.108000 );
 
 
     binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM1,0.490985);
@@ -2802,8 +2802,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB3
-    binnedParameters->setFudgeMean( E032point5bin, eta100bin, eflowFirstIntRegions::EMB3, 0.584000 ); 
-    binnedParameters->setFudgeStdDev( E032point5bin, eta100bin, eflowFirstIntRegions::EMB3, 0.089000 ); 
+    binnedParameters->setFudgeMean( E032point5bin, eta100bin, eflowFirstIntRegions::EMB3, 0.584000 );
+    binnedParameters->setFudgeStdDev( E032point5bin, eta100bin, eflowFirstIntRegions::EMB3, 0.089000 );
 
 
     binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM1,0.0759035);
@@ -2853,8 +2853,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = Tile
-    binnedParameters->setFudgeMean( E032point5bin, eta100bin, eflowFirstIntRegions::Tile, 0.761000 ); 
-    binnedParameters->setFudgeStdDev( E032point5bin, eta100bin, eflowFirstIntRegions::Tile, 0.110000 ); 
+    binnedParameters->setFudgeMean( E032point5bin, eta100bin, eflowFirstIntRegions::Tile, 0.761000 );
+    binnedParameters->setFudgeStdDev( E032point5bin, eta100bin, eflowFirstIntRegions::Tile, 0.110000 );
 
 
     binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM1,0.0554494);
@@ -2886,8 +2886,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
     ////////////////////////////
 
    // j1st = EMB1
-    binnedParameters->setFudgeMean( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, 0.632000 ); 
-    binnedParameters->setFudgeStdDev( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, 0.138000 ); 
+    binnedParameters->setFudgeMean( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, 0.632000 );
+    binnedParameters->setFudgeStdDev( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, 0.138000 );
 
 
     binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM1,0.923022);
@@ -2929,8 +2929,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB2
-    binnedParameters->setFudgeMean( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, 0.674000 ); 
-    binnedParameters->setFudgeStdDev( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, 0.141000 ); 
+    binnedParameters->setFudgeMean( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, 0.674000 );
+    binnedParameters->setFudgeStdDev( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, 0.141000 );
 
 
     binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM1,0.481914);
@@ -2964,8 +2964,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB3
-    binnedParameters->setFudgeMean( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, 0.670000 ); 
-    binnedParameters->setFudgeStdDev( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, 0.124000 ); 
+    binnedParameters->setFudgeMean( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, 0.670000 );
+    binnedParameters->setFudgeStdDev( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, 0.124000 );
 
 
     binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM1,0.0896502);
@@ -3003,15 +3003,15 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EME1
-    binnedParameters->setFudgeMean( E032point5bin, eta150bin, eflowFirstIntRegions::EME1, 0.519000 ); 
-    binnedParameters->setFudgeStdDev( E032point5bin, eta150bin, eflowFirstIntRegions::EME1, 0.149000 ); 
+    binnedParameters->setFudgeMean( E032point5bin, eta150bin, eflowFirstIntRegions::EME1, 0.519000 );
+    binnedParameters->setFudgeStdDev( E032point5bin, eta150bin, eflowFirstIntRegions::EME1, 0.149000 );
 
 
 
 
    // j1st = EME2
-    binnedParameters->setFudgeMean( E032point5bin, eta150bin, eflowFirstIntRegions::EME2, 0.576000 ); 
-    binnedParameters->setFudgeStdDev( E032point5bin, eta150bin, eflowFirstIntRegions::EME2, 0.103000 ); 
+    binnedParameters->setFudgeMean( E032point5bin, eta150bin, eflowFirstIntRegions::EME2, 0.576000 );
+    binnedParameters->setFudgeStdDev( E032point5bin, eta150bin, eflowFirstIntRegions::EME2, 0.103000 );
 
 
 
@@ -3055,8 +3055,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = Tile
-    binnedParameters->setFudgeMean( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, 0.805000 ); 
-    binnedParameters->setFudgeStdDev( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, 0.120000 ); 
+    binnedParameters->setFudgeMean( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, 0.805000 );
+    binnedParameters->setFudgeStdDev( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, 0.120000 );
 
 
     binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM1,0.0728621);
@@ -3119,8 +3119,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EME1
-    binnedParameters->setFudgeMean( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, 0.635000 ); 
-    binnedParameters->setFudgeStdDev( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, 0.141000 ); 
+    binnedParameters->setFudgeMean( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, 0.635000 );
+    binnedParameters->setFudgeStdDev( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, 0.141000 );
 
 
     binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME1, NORM1,6.19746);
@@ -3154,8 +3154,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EME2
-    binnedParameters->setFudgeMean( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, 0.690000 ); 
-    binnedParameters->setFudgeStdDev( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, 0.127000 ); 
+    binnedParameters->setFudgeMean( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, 0.690000 );
+    binnedParameters->setFudgeStdDev( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, 0.127000 );
 
 
     binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME1, NORM1,1.20666);
@@ -3189,8 +3189,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EME3
-    binnedParameters->setFudgeMean( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, 0.692000 ); 
-    binnedParameters->setFudgeStdDev( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, 0.119000 ); 
+    binnedParameters->setFudgeMean( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, 0.692000 );
+    binnedParameters->setFudgeStdDev( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, 0.119000 );
 
 
     binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME1, NORM1,0.446582);
@@ -3224,8 +3224,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = HEC
-    binnedParameters->setFudgeMean( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, 0.739000 ); 
-    binnedParameters->setFudgeStdDev( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, 0.136000 ); 
+    binnedParameters->setFudgeMean( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, 0.739000 );
+    binnedParameters->setFudgeStdDev( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, 0.136000 );
 
 
     binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, NORM1,0.0153596);
@@ -3306,8 +3306,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
     ////////////////////////////
 
    // j1st = EMB1
-    binnedParameters->setFudgeMean( E040bin, eta050bin, eflowFirstIntRegions::EMB1, 0.730000 ); 
-    binnedParameters->setFudgeStdDev( E040bin, eta050bin, eflowFirstIntRegions::EMB1, 0.083000 ); 
+    binnedParameters->setFudgeMean( E040bin, eta050bin, eflowFirstIntRegions::EMB1, 0.730000 );
+    binnedParameters->setFudgeStdDev( E040bin, eta050bin, eflowFirstIntRegions::EMB1, 0.083000 );
 
 
     binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM1,2.17614);
@@ -3333,8 +3333,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB2
-    binnedParameters->setFudgeMean( E040bin, eta050bin, eflowFirstIntRegions::EMB2, 0.729000 ); 
-    binnedParameters->setFudgeStdDev( E040bin, eta050bin, eflowFirstIntRegions::EMB2, 0.084000 ); 
+    binnedParameters->setFudgeMean( E040bin, eta050bin, eflowFirstIntRegions::EMB2, 0.729000 );
+    binnedParameters->setFudgeStdDev( E040bin, eta050bin, eflowFirstIntRegions::EMB2, 0.084000 );
 
 
     binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM1,0.67587);
@@ -3360,8 +3360,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB3
-    binnedParameters->setFudgeMean( E040bin, eta050bin, eflowFirstIntRegions::EMB3, 0.646000 ); 
-    binnedParameters->setFudgeStdDev( E040bin, eta050bin, eflowFirstIntRegions::EMB3, 0.080000 ); 
+    binnedParameters->setFudgeMean( E040bin, eta050bin, eflowFirstIntRegions::EMB3, 0.646000 );
+    binnedParameters->setFudgeStdDev( E040bin, eta050bin, eflowFirstIntRegions::EMB3, 0.080000 );
 
 
     binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM1,0.120833);
@@ -3403,8 +3403,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = Tile
-    binnedParameters->setFudgeMean( E040bin, eta050bin, eflowFirstIntRegions::Tile, 0.801000 ); 
-    binnedParameters->setFudgeStdDev( E040bin, eta050bin, eflowFirstIntRegions::Tile, 0.089000 ); 
+    binnedParameters->setFudgeMean( E040bin, eta050bin, eflowFirstIntRegions::Tile, 0.801000 );
+    binnedParameters->setFudgeStdDev( E040bin, eta050bin, eflowFirstIntRegions::Tile, 0.089000 );
 
 
     binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM1,0.0661352);
@@ -3428,8 +3428,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
     ////////////////////////////
 
    // j1st = EMB1
-    binnedParameters->setFudgeMean( E040bin, eta100bin, eflowFirstIntRegions::EMB1, 0.708000 ); 
-    binnedParameters->setFudgeStdDev( E040bin, eta100bin, eflowFirstIntRegions::EMB1, 0.091000 ); 
+    binnedParameters->setFudgeMean( E040bin, eta100bin, eflowFirstIntRegions::EMB1, 0.708000 );
+    binnedParameters->setFudgeStdDev( E040bin, eta100bin, eflowFirstIntRegions::EMB1, 0.091000 );
 
 
     binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM1,1.56119);
@@ -3459,8 +3459,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB2
-    binnedParameters->setFudgeMean( E040bin, eta100bin, eflowFirstIntRegions::EMB2, 0.717000 ); 
-    binnedParameters->setFudgeStdDev( E040bin, eta100bin, eflowFirstIntRegions::EMB2, 0.085000 ); 
+    binnedParameters->setFudgeMean( E040bin, eta100bin, eflowFirstIntRegions::EMB2, 0.717000 );
+    binnedParameters->setFudgeStdDev( E040bin, eta100bin, eflowFirstIntRegions::EMB2, 0.085000 );
 
 
     binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM1,0.392916);
@@ -3490,8 +3490,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB3
-    binnedParameters->setFudgeMean( E040bin, eta100bin, eflowFirstIntRegions::EMB3, 0.617000 ); 
-    binnedParameters->setFudgeStdDev( E040bin, eta100bin, eflowFirstIntRegions::EMB3, 0.089000 ); 
+    binnedParameters->setFudgeMean( E040bin, eta100bin, eflowFirstIntRegions::EMB3, 0.617000 );
+    binnedParameters->setFudgeStdDev( E040bin, eta100bin, eflowFirstIntRegions::EMB3, 0.089000 );
 
 
     binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM1,0.0779037);
@@ -3541,8 +3541,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = Tile
-    binnedParameters->setFudgeMean( E040bin, eta100bin, eflowFirstIntRegions::Tile, 0.787000 ); 
-    binnedParameters->setFudgeStdDev( E040bin, eta100bin, eflowFirstIntRegions::Tile, 0.106000 ); 
+    binnedParameters->setFudgeMean( E040bin, eta100bin, eflowFirstIntRegions::Tile, 0.787000 );
+    binnedParameters->setFudgeStdDev( E040bin, eta100bin, eflowFirstIntRegions::Tile, 0.106000 );
 
 
     binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM1,0.0522344);
@@ -3574,8 +3574,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
     ////////////////////////////
 
    // j1st = EMB1
-    binnedParameters->setFudgeMean( E040bin, eta150bin, eflowFirstIntRegions::EMB1, 0.693000 ); 
-    binnedParameters->setFudgeStdDev( E040bin, eta150bin, eflowFirstIntRegions::EMB1, 0.112000 ); 
+    binnedParameters->setFudgeMean( E040bin, eta150bin, eflowFirstIntRegions::EMB1, 0.693000 );
+    binnedParameters->setFudgeStdDev( E040bin, eta150bin, eflowFirstIntRegions::EMB1, 0.112000 );
 
 
     binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM1,1.04058);
@@ -3613,8 +3613,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB2
-    binnedParameters->setFudgeMean( E040bin, eta150bin, eflowFirstIntRegions::EMB2, 0.721000 ); 
-    binnedParameters->setFudgeStdDev( E040bin, eta150bin, eflowFirstIntRegions::EMB2, 0.126000 ); 
+    binnedParameters->setFudgeMean( E040bin, eta150bin, eflowFirstIntRegions::EMB2, 0.721000 );
+    binnedParameters->setFudgeStdDev( E040bin, eta150bin, eflowFirstIntRegions::EMB2, 0.126000 );
 
 
     binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM1,0.417358);
@@ -3652,8 +3652,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EMB3
-    binnedParameters->setFudgeMean( E040bin, eta150bin, eflowFirstIntRegions::EMB3, 0.720000 ); 
-    binnedParameters->setFudgeStdDev( E040bin, eta150bin, eflowFirstIntRegions::EMB3, 0.108000 ); 
+    binnedParameters->setFudgeMean( E040bin, eta150bin, eflowFirstIntRegions::EMB3, 0.720000 );
+    binnedParameters->setFudgeStdDev( E040bin, eta150bin, eflowFirstIntRegions::EMB3, 0.108000 );
 
 
     binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM1,0.0769331);
@@ -3695,15 +3695,15 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EME1
-    binnedParameters->setFudgeMean( E040bin, eta150bin, eflowFirstIntRegions::EME1, 0.563000 ); 
-    binnedParameters->setFudgeStdDev( E040bin, eta150bin, eflowFirstIntRegions::EME1, 0.140000 ); 
+    binnedParameters->setFudgeMean( E040bin, eta150bin, eflowFirstIntRegions::EME1, 0.563000 );
+    binnedParameters->setFudgeStdDev( E040bin, eta150bin, eflowFirstIntRegions::EME1, 0.140000 );
 
 
 
 
    // j1st = EME2
-    binnedParameters->setFudgeMean( E040bin, eta150bin, eflowFirstIntRegions::EME2, 0.627000 ); 
-    binnedParameters->setFudgeStdDev( E040bin, eta150bin, eflowFirstIntRegions::EME2, 0.127000 ); 
+    binnedParameters->setFudgeMean( E040bin, eta150bin, eflowFirstIntRegions::EME2, 0.627000 );
+    binnedParameters->setFudgeStdDev( E040bin, eta150bin, eflowFirstIntRegions::EME2, 0.127000 );
 
 
 
@@ -3751,8 +3751,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = Tile
-    binnedParameters->setFudgeMean( E040bin, eta150bin, eflowFirstIntRegions::Tile, 0.822000 ); 
-    binnedParameters->setFudgeStdDev( E040bin, eta150bin, eflowFirstIntRegions::Tile, 0.110000 ); 
+    binnedParameters->setFudgeMean( E040bin, eta150bin, eflowFirstIntRegions::Tile, 0.822000 );
+    binnedParameters->setFudgeStdDev( E040bin, eta150bin, eflowFirstIntRegions::Tile, 0.110000 );
 
 
     binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM1,0.0641832);
@@ -3831,8 +3831,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EME1
-    binnedParameters->setFudgeMean( E040bin, eta250bin, eflowFirstIntRegions::EME1, 0.697000 ); 
-    binnedParameters->setFudgeStdDev( E040bin, eta250bin, eflowFirstIntRegions::EME1, 0.123000 ); 
+    binnedParameters->setFudgeMean( E040bin, eta250bin, eflowFirstIntRegions::EME1, 0.697000 );
+    binnedParameters->setFudgeStdDev( E040bin, eta250bin, eflowFirstIntRegions::EME1, 0.123000 );
 
 
     binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME1, NORM1,6.5128);
@@ -3866,8 +3866,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EME2
-    binnedParameters->setFudgeMean( E040bin, eta250bin, eflowFirstIntRegions::EME2, 0.736000 ); 
-    binnedParameters->setFudgeStdDev( E040bin, eta250bin, eflowFirstIntRegions::EME2, 0.100000 ); 
+    binnedParameters->setFudgeMean( E040bin, eta250bin, eflowFirstIntRegions::EME2, 0.736000 );
+    binnedParameters->setFudgeStdDev( E040bin, eta250bin, eflowFirstIntRegions::EME2, 0.100000 );
 
 
     binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME1, NORM1,1.73191);
@@ -3901,8 +3901,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = EME3
-    binnedParameters->setFudgeMean( E040bin, eta250bin, eflowFirstIntRegions::EME3, 0.729000 ); 
-    binnedParameters->setFudgeStdDev( E040bin, eta250bin, eflowFirstIntRegions::EME3, 0.095000 ); 
+    binnedParameters->setFudgeMean( E040bin, eta250bin, eflowFirstIntRegions::EME3, 0.729000 );
+    binnedParameters->setFudgeStdDev( E040bin, eta250bin, eflowFirstIntRegions::EME3, 0.095000 );
 
 
     binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME1, NORM1,0.323704);
@@ -3936,8 +3936,8 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
 
 
    // j1st = HEC
-    binnedParameters->setFudgeMean( E040bin, eta250bin, eflowFirstIntRegions::HEC, 0.763000 ); 
-    binnedParameters->setFudgeStdDev( E040bin, eta250bin, eflowFirstIntRegions::HEC, 0.111000 ); 
+    binnedParameters->setFudgeMean( E040bin, eta250bin, eflowFirstIntRegions::HEC, 0.763000 );
+    binnedParameters->setFudgeStdDev( E040bin, eta250bin, eflowFirstIntRegions::HEC, 0.111000 );
 
 
     binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, NORM1,0.0236786);
@@ -4022,109 +4022,109 @@ StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *bi
     binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM2,0.00138243);
     binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH2,0.0876664);
 
-    binnedParameters->setFudgeMean( E001bin, eta350bin, eflowFirstIntRegions::EME1, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E001bin, eta350bin, eflowFirstIntRegions::EME1, 0.000000 ); 
-    binnedParameters->setFudgeMean( E003point5bin, eta350bin, eflowFirstIntRegions::EME1, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E003point5bin, eta350bin, eflowFirstIntRegions::EME1, 0.000000 ); 
-    binnedParameters->setFudgeMean( E010bin, eta350bin, eflowFirstIntRegions::EME1, 0.619000 ); 
-    binnedParameters->setFudgeStdDev( E010bin, eta350bin, eflowFirstIntRegions::EME1, 0.613000 ); 
-    binnedParameters->setFudgeMean( E020bin, eta350bin, eflowFirstIntRegions::EME1, 0.532000 ); 
-    binnedParameters->setFudgeStdDev( E020bin, eta350bin, eflowFirstIntRegions::EME1, 0.233000 ); 
-    binnedParameters->setFudgeMean( E032point5bin, eta350bin, eflowFirstIntRegions::EME1, 0.572000 ); 
-    binnedParameters->setFudgeStdDev( E032point5bin, eta350bin, eflowFirstIntRegions::EME1, 0.130000 ); 
-    binnedParameters->setFudgeMean( E040bin, eta350bin, eflowFirstIntRegions::EME1, 0.639000 ); 
-    binnedParameters->setFudgeStdDev( E040bin, eta350bin, eflowFirstIntRegions::EME1, 0.195000 ); 
-
-    binnedParameters->setFudgeMean( E001bin, eta450bin, eflowFirstIntRegions::EME1, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E001bin, eta450bin, eflowFirstIntRegions::EME1, 0.000000 ); 
-    binnedParameters->setFudgeMean( E003point5bin, eta450bin, eflowFirstIntRegions::EME1, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E003point5bin, eta450bin, eflowFirstIntRegions::EME1, 0.000000 ); 
-    binnedParameters->setFudgeMean( E010bin, eta450bin, eflowFirstIntRegions::EME1, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E010bin, eta450bin, eflowFirstIntRegions::EME1, 0.000000 ); 
-    binnedParameters->setFudgeMean( E020bin, eta450bin, eflowFirstIntRegions::EME1, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E020bin, eta450bin, eflowFirstIntRegions::EME1, 0.000000 ); 
-    binnedParameters->setFudgeMean( E032point5bin, eta450bin, eflowFirstIntRegions::EME1, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E032point5bin, eta450bin, eflowFirstIntRegions::EME1, 0.000000 ); 
-    binnedParameters->setFudgeMean( E040bin, eta450bin, eflowFirstIntRegions::EME1, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E040bin, eta450bin, eflowFirstIntRegions::EME1, 0.000000 ); 
-
-    binnedParameters->setFudgeMean( E001bin, eta350bin, eflowFirstIntRegions::EME2, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E001bin, eta350bin, eflowFirstIntRegions::EME2, 0.000000 ); 
-    binnedParameters->setFudgeMean( E003point5bin, eta350bin, eflowFirstIntRegions::EME2, 0.300000 ); 
-    binnedParameters->setFudgeStdDev( E003point5bin, eta350bin, eflowFirstIntRegions::EME2, 1.837000 ); 
-    binnedParameters->setFudgeMean( E010bin, eta350bin, eflowFirstIntRegions::EME2, 0.515000 ); 
-    binnedParameters->setFudgeStdDev( E010bin, eta350bin, eflowFirstIntRegions::EME2, 0.203000 ); 
-    binnedParameters->setFudgeMean( E020bin, eta350bin, eflowFirstIntRegions::EME2, 0.594000 ); 
-    binnedParameters->setFudgeStdDev( E020bin, eta350bin, eflowFirstIntRegions::EME2, 0.186000 ); 
-    binnedParameters->setFudgeMean( E032point5bin, eta350bin, eflowFirstIntRegions::EME2, 0.636000 ); 
-    binnedParameters->setFudgeStdDev( E032point5bin, eta350bin, eflowFirstIntRegions::EME2, 0.148000 ); 
-    binnedParameters->setFudgeMean( E040bin, eta350bin, eflowFirstIntRegions::EME2, 0.693000 ); 
-    binnedParameters->setFudgeStdDev( E040bin, eta350bin, eflowFirstIntRegions::EME2, 0.131000 ); 
-
-    binnedParameters->setFudgeMean( E001bin, eta450bin, eflowFirstIntRegions::EME2, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E001bin, eta450bin, eflowFirstIntRegions::EME2, 0.000000 ); 
-    binnedParameters->setFudgeMean( E003point5bin, eta450bin, eflowFirstIntRegions::EME2, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E003point5bin, eta450bin, eflowFirstIntRegions::EME2, 0.000000 ); 
-    binnedParameters->setFudgeMean( E010bin, eta450bin, eflowFirstIntRegions::EME2, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E010bin, eta450bin, eflowFirstIntRegions::EME2, 0.000000 ); 
-    binnedParameters->setFudgeMean( E020bin, eta450bin, eflowFirstIntRegions::EME2, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E020bin, eta450bin, eflowFirstIntRegions::EME2, 0.000000 ); 
-    binnedParameters->setFudgeMean( E032point5bin, eta450bin, eflowFirstIntRegions::EME2, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E032point5bin, eta450bin, eflowFirstIntRegions::EME2, 0.000000 ); 
-    binnedParameters->setFudgeMean( E040bin, eta450bin, eflowFirstIntRegions::EME2, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E040bin, eta450bin, eflowFirstIntRegions::EME2, 0.000000 ); 
-
-    binnedParameters->setFudgeMean( E001bin, eta350bin, eflowFirstIntRegions::EME3, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E001bin, eta350bin, eflowFirstIntRegions::EME3, 0.000000 ); 
-    binnedParameters->setFudgeMean( E003point5bin, eta350bin, eflowFirstIntRegions::EME3, 0.424000 ); 
-    binnedParameters->setFudgeStdDev( E003point5bin, eta350bin, eflowFirstIntRegions::EME3, 0.253000 ); 
-    binnedParameters->setFudgeMean( E010bin, eta350bin, eflowFirstIntRegions::EME3, 0.549000 ); 
-    binnedParameters->setFudgeStdDev( E010bin, eta350bin, eflowFirstIntRegions::EME3, 0.230000 ); 
-    binnedParameters->setFudgeMean( E020bin, eta350bin, eflowFirstIntRegions::EME3, 0.612000 ); 
-    binnedParameters->setFudgeStdDev( E020bin, eta350bin, eflowFirstIntRegions::EME3, 0.166000 ); 
-    binnedParameters->setFudgeMean( E032point5bin, eta350bin, eflowFirstIntRegions::EME3, 0.642000 ); 
-    binnedParameters->setFudgeStdDev( E032point5bin, eta350bin, eflowFirstIntRegions::EME3, 0.139000 ); 
-    binnedParameters->setFudgeMean( E040bin, eta350bin, eflowFirstIntRegions::EME3, 0.687000 ); 
-    binnedParameters->setFudgeStdDev( E040bin, eta350bin, eflowFirstIntRegions::EME3, 0.120000 ); 
-
-    binnedParameters->setFudgeMean( E001bin, eta450bin, eflowFirstIntRegions::EME3, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E001bin, eta450bin, eflowFirstIntRegions::EME3, 0.000000 ); 
-    binnedParameters->setFudgeMean( E003point5bin, eta450bin, eflowFirstIntRegions::EME3, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E003point5bin, eta450bin, eflowFirstIntRegions::EME3, 0.000000 ); 
-    binnedParameters->setFudgeMean( E010bin, eta450bin, eflowFirstIntRegions::EME3, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E010bin, eta450bin, eflowFirstIntRegions::EME3, 0.000000 ); 
-    binnedParameters->setFudgeMean( E020bin, eta450bin, eflowFirstIntRegions::EME3, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E020bin, eta450bin, eflowFirstIntRegions::EME3, 0.000000 ); 
-    binnedParameters->setFudgeMean( E032point5bin, eta450bin, eflowFirstIntRegions::EME3, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E032point5bin, eta450bin, eflowFirstIntRegions::EME3, 0.000000 ); 
-    binnedParameters->setFudgeMean( E040bin, eta450bin, eflowFirstIntRegions::EME3, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E040bin, eta450bin, eflowFirstIntRegions::EME3, 0.000000 ); 
-
-    binnedParameters->setFudgeMean( E001bin, eta350bin, eflowFirstIntRegions::HEC, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E001bin, eta350bin, eflowFirstIntRegions::HEC, 0.000000 ); 
-    binnedParameters->setFudgeMean( E003point5bin, eta350bin, eflowFirstIntRegions::HEC, 0.971000 ); 
-    binnedParameters->setFudgeStdDev( E003point5bin, eta350bin, eflowFirstIntRegions::HEC, 0.500000 ); 
-    binnedParameters->setFudgeMean( E010bin, eta350bin, eflowFirstIntRegions::HEC, 0.636000 ); 
-    binnedParameters->setFudgeStdDev( E010bin, eta350bin, eflowFirstIntRegions::HEC, 0.220000 ); 
-    binnedParameters->setFudgeMean( E020bin, eta350bin, eflowFirstIntRegions::HEC, 0.682000 ); 
-    binnedParameters->setFudgeStdDev( E020bin, eta350bin, eflowFirstIntRegions::HEC, 0.180000 ); 
-    binnedParameters->setFudgeMean( E032point5bin, eta350bin, eflowFirstIntRegions::HEC, 0.705000 ); 
-    binnedParameters->setFudgeStdDev( E032point5bin, eta350bin, eflowFirstIntRegions::HEC, 0.145000 ); 
-    binnedParameters->setFudgeMean( E040bin, eta350bin, eflowFirstIntRegions::HEC, 0.732000 ); 
-    binnedParameters->setFudgeStdDev( E040bin, eta350bin, eflowFirstIntRegions::HEC, 0.130000 ); 
-
-    binnedParameters->setFudgeMean( E001bin, eta450bin, eflowFirstIntRegions::HEC, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E001bin, eta450bin, eflowFirstIntRegions::HEC, 0.000000 ); 
-    binnedParameters->setFudgeMean( E003point5bin, eta450bin, eflowFirstIntRegions::HEC, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E003point5bin, eta450bin, eflowFirstIntRegions::HEC, 0.000000 ); 
-    binnedParameters->setFudgeMean( E010bin, eta450bin, eflowFirstIntRegions::HEC, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E010bin, eta450bin, eflowFirstIntRegions::HEC, 0.000000 ); 
-    binnedParameters->setFudgeMean( E020bin, eta450bin, eflowFirstIntRegions::HEC, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E020bin, eta450bin, eflowFirstIntRegions::HEC, 0.000000 ); 
-    binnedParameters->setFudgeMean( E032point5bin, eta450bin, eflowFirstIntRegions::HEC, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E032point5bin, eta450bin, eflowFirstIntRegions::HEC, 0.000000 ); 
-    binnedParameters->setFudgeMean( E040bin, eta450bin, eflowFirstIntRegions::HEC, 0.000000 ); 
-    binnedParameters->setFudgeStdDev( E040bin, eta450bin, eflowFirstIntRegions::HEC, 0.000000 ); 
+    binnedParameters->setFudgeMean( E001bin, eta350bin, eflowFirstIntRegions::EME1, 0.000000 );
+    binnedParameters->setFudgeStdDev( E001bin, eta350bin, eflowFirstIntRegions::EME1, 0.000000 );
+    binnedParameters->setFudgeMean( E003point5bin, eta350bin, eflowFirstIntRegions::EME1, 0.000000 );
+    binnedParameters->setFudgeStdDev( E003point5bin, eta350bin, eflowFirstIntRegions::EME1, 0.000000 );
+    binnedParameters->setFudgeMean( E010bin, eta350bin, eflowFirstIntRegions::EME1, 0.619000 );
+    binnedParameters->setFudgeStdDev( E010bin, eta350bin, eflowFirstIntRegions::EME1, 0.613000 );
+    binnedParameters->setFudgeMean( E020bin, eta350bin, eflowFirstIntRegions::EME1, 0.532000 );
+    binnedParameters->setFudgeStdDev( E020bin, eta350bin, eflowFirstIntRegions::EME1, 0.233000 );
+    binnedParameters->setFudgeMean( E032point5bin, eta350bin, eflowFirstIntRegions::EME1, 0.572000 );
+    binnedParameters->setFudgeStdDev( E032point5bin, eta350bin, eflowFirstIntRegions::EME1, 0.130000 );
+    binnedParameters->setFudgeMean( E040bin, eta350bin, eflowFirstIntRegions::EME1, 0.639000 );
+    binnedParameters->setFudgeStdDev( E040bin, eta350bin, eflowFirstIntRegions::EME1, 0.195000 );
+
+    binnedParameters->setFudgeMean( E001bin, eta450bin, eflowFirstIntRegions::EME1, 0.000000 );
+    binnedParameters->setFudgeStdDev( E001bin, eta450bin, eflowFirstIntRegions::EME1, 0.000000 );
+    binnedParameters->setFudgeMean( E003point5bin, eta450bin, eflowFirstIntRegions::EME1, 0.000000 );
+    binnedParameters->setFudgeStdDev( E003point5bin, eta450bin, eflowFirstIntRegions::EME1, 0.000000 );
+    binnedParameters->setFudgeMean( E010bin, eta450bin, eflowFirstIntRegions::EME1, 0.000000 );
+    binnedParameters->setFudgeStdDev( E010bin, eta450bin, eflowFirstIntRegions::EME1, 0.000000 );
+    binnedParameters->setFudgeMean( E020bin, eta450bin, eflowFirstIntRegions::EME1, 0.000000 );
+    binnedParameters->setFudgeStdDev( E020bin, eta450bin, eflowFirstIntRegions::EME1, 0.000000 );
+    binnedParameters->setFudgeMean( E032point5bin, eta450bin, eflowFirstIntRegions::EME1, 0.000000 );
+    binnedParameters->setFudgeStdDev( E032point5bin, eta450bin, eflowFirstIntRegions::EME1, 0.000000 );
+    binnedParameters->setFudgeMean( E040bin, eta450bin, eflowFirstIntRegions::EME1, 0.000000 );
+    binnedParameters->setFudgeStdDev( E040bin, eta450bin, eflowFirstIntRegions::EME1, 0.000000 );
+
+    binnedParameters->setFudgeMean( E001bin, eta350bin, eflowFirstIntRegions::EME2, 0.000000 );
+    binnedParameters->setFudgeStdDev( E001bin, eta350bin, eflowFirstIntRegions::EME2, 0.000000 );
+    binnedParameters->setFudgeMean( E003point5bin, eta350bin, eflowFirstIntRegions::EME2, 0.300000 );
+    binnedParameters->setFudgeStdDev( E003point5bin, eta350bin, eflowFirstIntRegions::EME2, 1.837000 );
+    binnedParameters->setFudgeMean( E010bin, eta350bin, eflowFirstIntRegions::EME2, 0.515000 );
+    binnedParameters->setFudgeStdDev( E010bin, eta350bin, eflowFirstIntRegions::EME2, 0.203000 );
+    binnedParameters->setFudgeMean( E020bin, eta350bin, eflowFirstIntRegions::EME2, 0.594000 );
+    binnedParameters->setFudgeStdDev( E020bin, eta350bin, eflowFirstIntRegions::EME2, 0.186000 );
+    binnedParameters->setFudgeMean( E032point5bin, eta350bin, eflowFirstIntRegions::EME2, 0.636000 );
+    binnedParameters->setFudgeStdDev( E032point5bin, eta350bin, eflowFirstIntRegions::EME2, 0.148000 );
+    binnedParameters->setFudgeMean( E040bin, eta350bin, eflowFirstIntRegions::EME2, 0.693000 );
+    binnedParameters->setFudgeStdDev( E040bin, eta350bin, eflowFirstIntRegions::EME2, 0.131000 );
+
+    binnedParameters->setFudgeMean( E001bin, eta450bin, eflowFirstIntRegions::EME2, 0.000000 );
+    binnedParameters->setFudgeStdDev( E001bin, eta450bin, eflowFirstIntRegions::EME2, 0.000000 );
+    binnedParameters->setFudgeMean( E003point5bin, eta450bin, eflowFirstIntRegions::EME2, 0.000000 );
+    binnedParameters->setFudgeStdDev( E003point5bin, eta450bin, eflowFirstIntRegions::EME2, 0.000000 );
+    binnedParameters->setFudgeMean( E010bin, eta450bin, eflowFirstIntRegions::EME2, 0.000000 );
+    binnedParameters->setFudgeStdDev( E010bin, eta450bin, eflowFirstIntRegions::EME2, 0.000000 );
+    binnedParameters->setFudgeMean( E020bin, eta450bin, eflowFirstIntRegions::EME2, 0.000000 );
+    binnedParameters->setFudgeStdDev( E020bin, eta450bin, eflowFirstIntRegions::EME2, 0.000000 );
+    binnedParameters->setFudgeMean( E032point5bin, eta450bin, eflowFirstIntRegions::EME2, 0.000000 );
+    binnedParameters->setFudgeStdDev( E032point5bin, eta450bin, eflowFirstIntRegions::EME2, 0.000000 );
+    binnedParameters->setFudgeMean( E040bin, eta450bin, eflowFirstIntRegions::EME2, 0.000000 );
+    binnedParameters->setFudgeStdDev( E040bin, eta450bin, eflowFirstIntRegions::EME2, 0.000000 );
+
+    binnedParameters->setFudgeMean( E001bin, eta350bin, eflowFirstIntRegions::EME3, 0.000000 );
+    binnedParameters->setFudgeStdDev( E001bin, eta350bin, eflowFirstIntRegions::EME3, 0.000000 );
+    binnedParameters->setFudgeMean( E003point5bin, eta350bin, eflowFirstIntRegions::EME3, 0.424000 );
+    binnedParameters->setFudgeStdDev( E003point5bin, eta350bin, eflowFirstIntRegions::EME3, 0.253000 );
+    binnedParameters->setFudgeMean( E010bin, eta350bin, eflowFirstIntRegions::EME3, 0.549000 );
+    binnedParameters->setFudgeStdDev( E010bin, eta350bin, eflowFirstIntRegions::EME3, 0.230000 );
+    binnedParameters->setFudgeMean( E020bin, eta350bin, eflowFirstIntRegions::EME3, 0.612000 );
+    binnedParameters->setFudgeStdDev( E020bin, eta350bin, eflowFirstIntRegions::EME3, 0.166000 );
+    binnedParameters->setFudgeMean( E032point5bin, eta350bin, eflowFirstIntRegions::EME3, 0.642000 );
+    binnedParameters->setFudgeStdDev( E032point5bin, eta350bin, eflowFirstIntRegions::EME3, 0.139000 );
+    binnedParameters->setFudgeMean( E040bin, eta350bin, eflowFirstIntRegions::EME3, 0.687000 );
+    binnedParameters->setFudgeStdDev( E040bin, eta350bin, eflowFirstIntRegions::EME3, 0.120000 );
+
+    binnedParameters->setFudgeMean( E001bin, eta450bin, eflowFirstIntRegions::EME3, 0.000000 );
+    binnedParameters->setFudgeStdDev( E001bin, eta450bin, eflowFirstIntRegions::EME3, 0.000000 );
+    binnedParameters->setFudgeMean( E003point5bin, eta450bin, eflowFirstIntRegions::EME3, 0.000000 );
+    binnedParameters->setFudgeStdDev( E003point5bin, eta450bin, eflowFirstIntRegions::EME3, 0.000000 );
+    binnedParameters->setFudgeMean( E010bin, eta450bin, eflowFirstIntRegions::EME3, 0.000000 );
+    binnedParameters->setFudgeStdDev( E010bin, eta450bin, eflowFirstIntRegions::EME3, 0.000000 );
+    binnedParameters->setFudgeMean( E020bin, eta450bin, eflowFirstIntRegions::EME3, 0.000000 );
+    binnedParameters->setFudgeStdDev( E020bin, eta450bin, eflowFirstIntRegions::EME3, 0.000000 );
+    binnedParameters->setFudgeMean( E032point5bin, eta450bin, eflowFirstIntRegions::EME3, 0.000000 );
+    binnedParameters->setFudgeStdDev( E032point5bin, eta450bin, eflowFirstIntRegions::EME3, 0.000000 );
+    binnedParameters->setFudgeMean( E040bin, eta450bin, eflowFirstIntRegions::EME3, 0.000000 );
+    binnedParameters->setFudgeStdDev( E040bin, eta450bin, eflowFirstIntRegions::EME3, 0.000000 );
+
+    binnedParameters->setFudgeMean( E001bin, eta350bin, eflowFirstIntRegions::HEC, 0.000000 );
+    binnedParameters->setFudgeStdDev( E001bin, eta350bin, eflowFirstIntRegions::HEC, 0.000000 );
+    binnedParameters->setFudgeMean( E003point5bin, eta350bin, eflowFirstIntRegions::HEC, 0.971000 );
+    binnedParameters->setFudgeStdDev( E003point5bin, eta350bin, eflowFirstIntRegions::HEC, 0.500000 );
+    binnedParameters->setFudgeMean( E010bin, eta350bin, eflowFirstIntRegions::HEC, 0.636000 );
+    binnedParameters->setFudgeStdDev( E010bin, eta350bin, eflowFirstIntRegions::HEC, 0.220000 );
+    binnedParameters->setFudgeMean( E020bin, eta350bin, eflowFirstIntRegions::HEC, 0.682000 );
+    binnedParameters->setFudgeStdDev( E020bin, eta350bin, eflowFirstIntRegions::HEC, 0.180000 );
+    binnedParameters->setFudgeMean( E032point5bin, eta350bin, eflowFirstIntRegions::HEC, 0.705000 );
+    binnedParameters->setFudgeStdDev( E032point5bin, eta350bin, eflowFirstIntRegions::HEC, 0.145000 );
+    binnedParameters->setFudgeMean( E040bin, eta350bin, eflowFirstIntRegions::HEC, 0.732000 );
+    binnedParameters->setFudgeStdDev( E040bin, eta350bin, eflowFirstIntRegions::HEC, 0.130000 );
+
+    binnedParameters->setFudgeMean( E001bin, eta450bin, eflowFirstIntRegions::HEC, 0.000000 );
+    binnedParameters->setFudgeStdDev( E001bin, eta450bin, eflowFirstIntRegions::HEC, 0.000000 );
+    binnedParameters->setFudgeMean( E003point5bin, eta450bin, eflowFirstIntRegions::HEC, 0.000000 );
+    binnedParameters->setFudgeStdDev( E003point5bin, eta450bin, eflowFirstIntRegions::HEC, 0.000000 );
+    binnedParameters->setFudgeMean( E010bin, eta450bin, eflowFirstIntRegions::HEC, 0.000000 );
+    binnedParameters->setFudgeStdDev( E010bin, eta450bin, eflowFirstIntRegions::HEC, 0.000000 );
+    binnedParameters->setFudgeMean( E020bin, eta450bin, eflowFirstIntRegions::HEC, 0.000000 );
+    binnedParameters->setFudgeStdDev( E020bin, eta450bin, eflowFirstIntRegions::HEC, 0.000000 );
+    binnedParameters->setFudgeMean( E032point5bin, eta450bin, eflowFirstIntRegions::HEC, 0.000000 );
+    binnedParameters->setFudgeStdDev( E032point5bin, eta450bin, eflowFirstIntRegions::HEC, 0.000000 );
+    binnedParameters->setFudgeMean( E040bin, eta450bin, eflowFirstIntRegions::HEC, 0.000000 );
+    binnedParameters->setFudgeStdDev( E040bin, eta450bin, eflowFirstIntRegions::HEC, 0.000000 );
 
     binnedParameters->setFudgeMean( E001bin, eta350bin, eflowFirstIntRegions::FCAL, 0.000000 );
     binnedParameters->setFudgeStdDev( E001bin, eta350bin, eflowFirstIntRegions::FCAL, 0.000000 );
diff --git a/Reconstruction/eflowRec/src/eflowCellEOverPTool_mc12_JetETMiss.cxx b/Reconstruction/eflowRec/src/eflowCellEOverPTool_mc12_JetETMiss.cxx
index 4ea723a7072f33c2285515864acedbf16c0350a3..0a3a70003c47da02683f7f1307ade7ecdbb1c001 100644
--- a/Reconstruction/eflowRec/src/eflowCellEOverPTool_mc12_JetETMiss.cxx
+++ b/Reconstruction/eflowRec/src/eflowCellEOverPTool_mc12_JetETMiss.cxx
@@ -35,10 +35,10 @@ StatusCode eflowCellEOverPTool_mc12_JetETMiss::initialize(){
   return StatusCode::SUCCESS;
 }
 
-StatusCode eflowCellEOverPTool_mc12_JetETMiss::execute(eflowEEtaBinnedParameters *binnedParameters){
+StatusCode eflowCellEOverPTool_mc12_JetETMiss::fillBinnedParameters(eflowEEtaBinnedParameters *binnedParameters) const {
 
   if (binnedParameters) {
-    
+
     binnedParameters->initialise(m_eBinValues, m_etaBinBounds);
 
     ////////////////////////////
diff --git a/Reconstruction/eflowRec/src/eflowCellEOverPTool_mc12_LC.cxx b/Reconstruction/eflowRec/src/eflowCellEOverPTool_mc12_LC.cxx
index 2024273ab28d53a3f58f3dd3bc6e581b7e1a9907..634e017af21bf4d2a67c40fe2be041c7dcfd5712 100644
--- a/Reconstruction/eflowRec/src/eflowCellEOverPTool_mc12_LC.cxx
+++ b/Reconstruction/eflowRec/src/eflowCellEOverPTool_mc12_LC.cxx
@@ -39,10 +39,10 @@ StatusCode eflowCellEOverPTool_mc12_LC::initialize(){
   return StatusCode::SUCCESS;
 }
 
-StatusCode eflowCellEOverPTool_mc12_LC::execute(eflowEEtaBinnedParameters *binnedParameters){
+StatusCode eflowCellEOverPTool_mc12_LC::fillBinnedParameters(eflowEEtaBinnedParameters *binnedParameters) const {
 
   if (binnedParameters) {
-    
+
     binnedParameters->initialise(m_eBinValues, m_etaBinBounds);
 
     ////////////////////////////
diff --git a/Reconstruction/tauRec/python/tauRecFlags.py b/Reconstruction/tauRec/python/tauRecFlags.py
index 3e9f8fa0b4e9f312581eb5fc34d6903762a213bf..6ec2d19d5914c4df43419f33acf3848784bfb84c 100644
--- a/Reconstruction/tauRec/python/tauRecFlags.py
+++ b/Reconstruction/tauRec/python/tauRecFlags.py
@@ -52,6 +52,12 @@ class tauRecToolsCVMFSPath(JobProperty):
     allowedTypes=['string']
     StoredValue="tauRecTools/00-02-00/"
 
+class doTJVA(JobProperty):
+    """ switch of TJVA """
+    statusOn=True
+    allowedTypes=['bool']
+    StoredValue=True
+
 #deprecated
 class TauDiscriminantCVMFSPath(JobProperty):
     """ path to cvmfs file location
@@ -141,11 +147,10 @@ class doPanTau(JobProperty):
     StoredValue=True
 
 class doPi0(JobProperty):
-    """ switch on Pi0 Finder
-    """
+    """ switch of Pi0 Finder """
     statusOn=True
     allowedTypes=['bool']
-    StoredValue=False
+    StoredValue=True
 
 class pi0EtCuts(JobProperty):
     """ Set |eta| dependent Et requirement for pi0 tag
@@ -205,7 +210,7 @@ class tauRecFlags(JobPropertyContainer):
 jobproperties.add_Container(tauRecFlags)
 
 # I want always the following flags in the Rec container  
-_list_tau=[Enabled,doTauRec,isStandalone,tauRecSeedJetCollection,tauRecToolsCVMFSPath,TauDiscriminantCVMFSPath,tauRecMVATrackClassification,tauRecRNNTrackClassification,tauRecMVATrackClassificationConfig,tauRecRNNTrackClassificationConfig,tauRecSeedMaxEta,tauRecToolsDevToolList,tauRecToolsDevToolListProcessor,doRunTauDiscriminant,useVertexBasedConvFinder,useNewPIDBasedConvFinder,doPanTau,doPi0,pi0EtCuts,pi0MVACuts_1prong,pi0MVACuts_mprong,shotPtCut_1Photon,shotPtCut_2Photons,useOldVertexFitterAPI,useShowerSubClusters]
+_list_tau=[Enabled,doTauRec,isStandalone,tauRecSeedJetCollection,tauRecToolsCVMFSPath,doTJVA,TauDiscriminantCVMFSPath,tauRecMVATrackClassification,tauRecRNNTrackClassification,tauRecMVATrackClassificationConfig,tauRecRNNTrackClassificationConfig,tauRecSeedMaxEta,tauRecToolsDevToolList,tauRecToolsDevToolListProcessor,doRunTauDiscriminant,useVertexBasedConvFinder,useNewPIDBasedConvFinder,doPanTau,doPi0,pi0EtCuts,pi0MVACuts_1prong,pi0MVACuts_mprong,shotPtCut_1Photon,shotPtCut_2Photons,useOldVertexFitterAPI,useShowerSubClusters]
 for j in _list_tau: 
     jobproperties.tauRecFlags.add_JobProperty(j)
 del _list_tau
diff --git a/Reconstruction/tauRec/share/tauRec_jobOptions.py b/Reconstruction/tauRec/share/tauRec_jobOptions.py
index 50f62486ad0eedb3ffd0c9c8922a291d2db7b91e..7523c60066c9d03320841f9c11780d5c344b6468 100644
--- a/Reconstruction/tauRec/share/tauRec_jobOptions.py
+++ b/Reconstruction/tauRec/share/tauRec_jobOptions.py
@@ -12,29 +12,19 @@ from RecExConfig.RecFlags import rec
 from AthenaCommon.BeamFlags import jobproperties
 from AthenaCommon.GlobalFlags import globalflags
 import AthenaCommon.SystemOfUnits as Units
-from tauRec.tauRecFlags import jobproperties as taujp
+from tauRec.tauRecFlags import tauFlags
 
 # use Tau Jet Vertex Association Tool
-# each Tau candidate gets its own primary vertex
-# and the tracks are selected accroding to this vertex
-_doTJVA = True
+_doTJVA = tauFlags.doTJVA()
 
 # Pi0-finding algorithm
-_doPi0Clus = taujp.tauRecFlags.doPi0() #False by default
-_doPi0Clus = True 
+_doPi0Clus = tauFlags.doPi0()
 
-# Change jet seed (default AntiKt4LCTopoJets)
-# taujp.tauRecFlags.tauRecSeedJetCollection.set_Value_and_Lock("AntiKt4LCTopoJets")
-
-# the TauCoreBuilder
 from tauRec.TauRecBuilder import TauRecCoreBuilder
 TauRecCoreBuilder(doPi0Clus=_doPi0Clus, doTJVA=_doTJVA)
 
-#include("tauRec/Pi0ClusterMaker_Crakow_jobOptions.py")
 if _doPi0Clus:
     include("tauRec/Pi0ClusterMaker_jobOptions.py")
 
 from tauRec.TauRecRunner import TauRecRunner
 TauRecRunner(doPi0Clus=_doPi0Clus, doTJVA=_doTJVA)
-
-
diff --git a/Reconstruction/tauRec/test/test_tau_q221_serial.sh b/Reconstruction/tauRec/test/test_tau_q221_serial.sh
new file mode 100755
index 0000000000000000000000000000000000000000..9280bfca3a1f3690c3352dbcd4c8840ea51dd27a
--- /dev/null
+++ b/Reconstruction/tauRec/test/test_tau_q221_serial.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+#
+# art-description: q221 reconstruction ART on MC in serial mode
+# art-type: grid
+# art-include: master/Athena
+# art-output: myAOD.pool.root
+# art-output: NTUP_PHYSVAL.root
+# art-output: rootcomp.root
+# art-output: *.log
+# art-output: *.ps
+# art-output: dcube
+# art-html: dcube
+
+NEVENTS=500
+REF_DIR="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/tauRec/reference/q221"
+
+# run the reconstruction
+Reco_tf.py --maxEvents ${NEVENTS} --AMI q221
+echo "art-result: $? Reconstrution"
+
+# compare the AOD file
+art.py compare ref --entries 200 --mode semi-detailed --order-trees --diff-root myAOD.pool.root ${REF_DIR}/myAOD.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 myAOD.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_q431.sh b/Reconstruction/tauRec/test/test_tau_q431_serial.sh
similarity index 79%
rename from Reconstruction/tauRec/test/test_tau_q431.sh
rename to Reconstruction/tauRec/test/test_tau_q431_serial.sh
index 272f65b27e671d41b85c2b8e0104a69d96246b5f..da986bd30c1374a698e0c851065f7d9a845e59d5 100755
--- a/Reconstruction/tauRec/test/test_tau_q431.sh
+++ b/Reconstruction/tauRec/test/test_tau_q431_serial.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 #
-# art-description: ART for standalone tau reconstruction
+# art-description: q431 reconstruction ART on data in serail mode
 # art-type: grid
 # art-include: master/Athena
 # art-output: myAOD.pool.root
@@ -15,7 +15,7 @@ NEVENTS=500
 REF_DIR="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/tauRec/reference/q431"
 
 # run the reconstruction
-Reco_tf.py --maxEvents=${NEVENTS} --AMI=q431
+Reco_tf.py --maxEvents ${NEVENTS} --AMI=q431
 echo "art-result: $? Reconstrution"
 
 # compare the AOD file
@@ -23,7 +23,7 @@ art.py compare ref --entries 200 --mode=semi-detailed --order-trees --diff-root
 echo "art-result: $? diff-root"
 
 # run the physics validation
-Reco_tf.py --maxEvents=${NEVENTS} --validationFlags 'noExample,doTau' --inputAODFile=myAOD.pool.root  --outputNTUP_PHYSVALFile=NTUP_PHYSVAL.root
+Reco_tf.py --maxEvents ${NEVENTS} --validationFlags 'noExample,doTau' --inputAODFile=myAOD.pool.root  --outputNTUP_PHYSVALFile NTUP_PHYSVAL.root
 echo "art-result: $? PhysVal"
 
 # compare the histograms
@@ -34,7 +34,7 @@ echo "art-result: $? rootcomp"
 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.xml \
+    --config ${INPUT_DIR}/config_data.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_multithread.sh
new file mode 100755
index 0000000000000000000000000000000000000000..bdbdb141cffbd4eacac849d2cdf9f6e02396a5b9
--- /dev/null
+++ b/Reconstruction/tauRec/test/test_tau_standalone_multithread.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+#
+# art-description: standalone tau reconstruction ART on MC in multithread mode
+# art-type: grid
+# art-athena-mt: 8
+# 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 --threads 4 --evtMax ${NEVENTS}  tauRec/tau_standalone_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
+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.sh b/Reconstruction/tauRec/test/test_tau_standalone_serial.sh
similarity index 72%
rename from Reconstruction/tauRec/test/test_tau_standalone.sh
rename to Reconstruction/tauRec/test/test_tau_standalone_serial.sh
index 94247e5c67a7f74e3a2da9f83d6e1f1b8a8d05c8..1dbaf0c82c2f3259c4c97e2bffc9419360fd9711 100755
--- a/Reconstruction/tauRec/test/test_tau_standalone.sh
+++ b/Reconstruction/tauRec/test/test_tau_standalone_serial.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 #
-# art-description: ART for standalone tau reconstruction
+# art-description: standalone tau reconstruction on MC in serial mode
 # art-type: grid
 # art-include: master/Athena
 # art-output: *.root
@@ -13,15 +13,15 @@ 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_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 semi-detailed --order-trees --diff-root AOD.pool.root ${REF_DIR}/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
+Reco_tf.py --maxEvents ${NEVENTS} --validationFlags 'noExample,doTau' --inputAODFile AOD.pool.root  --outputNTUP_PHYSVALFile NTUP_PHYSVAL.root
 echo "art-result: $? PhysVal"
 
 # compare the histograms
@@ -32,7 +32,7 @@ echo "art-result: $? rootcomp"
 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.xml \
+    --config ${INPUT_DIR}/config_mc.xml \
     --reference ${REF_DIR}/NTUP_PHYSVAL.root \
     NTUP_PHYSVAL.root
 echo "art-result: $? dcube"
diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_g4ms_validation.sh b/Simulation/FastSimulation/FastChainPileup/test/test_g4ms_validation.sh
index b0daa560e85fe5302956b801d0e6cf4d0fe84de2..4c1f8434b5f21f6446640f1c5c16f3f69d9f2071 100755
--- a/Simulation/FastSimulation/FastChainPileup/test/test_g4ms_validation.sh
+++ b/Simulation/FastSimulation/FastChainPileup/test/test_g4ms_validation.sh
@@ -3,8 +3,10 @@
 # art-description: test
 #
 # art-type: grid
-# art-include: master/Athena
+# art-input: mc16_13TeV.410470.PhPy8EG_A14_ttbar_hdamp258p75_nonallhad.merge.EVNT.e6337_e5984
+# art-input-nfiles: 1
 # art-cores: 10
+# art-include: master/Athena
 # art-output: *.root
 # art-output: art_core*
 # art-output: dcube-*
@@ -34,27 +36,32 @@ case $ArtProcess in
 
         dcubeXmlNTUP="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/DCube-configs/${AtlasBuildBranch}/physval-validation.xml"
         dcubeRefNTUP="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/DCube-refs/${AtlasBuildBranch}/test_g4ms_validation/${merge_ntup_file}"
-        dcubeRefAF2NTUP="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/DCube-refs/${AtlasBuildBranch}/test_af2_validation/physval_af2_validation_all.root"
+        dcubeRefAF2NTUP="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/DCube-refs/${AtlasBuildBranch}/test_af2_validation/physval_af2_validation_merge.root"
 
         # Histogram comparison of G4MS with AF2 DCube
-        $ATLAS_LOCAL_ROOT/dcube/current/DCubeClient/python/dcube.py \
-        -p -x dcube-physval \
-        -c ${dcubeXmlNTUP} -r ${dcubeRefNTUP} ./${merge_ntup_file}
-        echo  "art-result: $? dcube-physval"
+         $ATLAS_LOCAL_ROOT/dcube/current/DCubeClient/python/dcube.py \
+         -p -x dcube-physval \
+         -c ${dcubeXmlNTUP} -r ${dcubeRefNTUP} ./${merge_ntup_file}
+         echo  "art-result: $? dcube-physval"
 
-        # Histogram comparison of G4MS with AF2 DCube
-        $ATLAS_LOCAL_ROOT/dcube/current/DCubeClient/python/dcube.py \
-        -p -x dcube-g4msVsaf2 \
-        -c ${dcubeXmlNTUP} -r ${dcubeRefAF2NTUP} ./${merge_ntup_file}
-        echo  "art-result: $? dcube-g4msVsaf2"
+         # Histogram comparison of G4MS with AF2 DCube
+         $ATLAS_LOCAL_ROOT/dcube/current/DCubeClient/python/dcube.py \
+         -p -x dcube-g4msVsaf2 \
+         -c ${dcubeXmlNTUP} -r ${dcubeRefAF2NTUP} ./${merge_ntup_file}
+         echo  "art-result: $? dcube-g4msVsaf2"
 
 	;;
 
     *)
 	echo "Test $ArtProcess"
-	
+
 	mkdir "art_core_${ArtProcess}"
 	cd "art_core_${ArtProcess}"
+
+        IFS=',' read -r -a file <<< "${ArtInFile}"
+        file=${file[0]}
+        x="../$file"
+
         
         max_events=1000
         skip_events=$((${max_events}*${ArtProcess}))
@@ -64,7 +71,7 @@ case $ArtProcess in
 	unset  ATHENA_NUM_PROC
 	
         # Output files to be saved
-        hist_file=HITS_${ArtProcess}.pool.root
+        hits_file=HITS_${ArtProcess}.pool.root
         aod_file=AOD_${ArtProcess}.pool.root
         ntup_file=physval_g4ms_${ArtProcess}.root
 
@@ -76,8 +83,8 @@ case $ArtProcess in
                   --preInclude 'EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py' \
                   --preExec 'EVNTtoHITS:simFlags.TightMuonStepping=True' \
                   --DataRunNumber '284500' --geometryVersion 'default:ATLAS-R2-2016-01-00-01' \
-                  --inputEVNTFile='/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/mc16_13TeV.410470.PhPy8EG_A14_ttbar_hdamp258p75_nonallhad.merge.EVNT.e6337_e5984_tid12860049_00/EVNT.12860049._002516.pool.root.1' \
-                  --outputHITSFile=${hist_file} \
+                  --inputEVNTFile=${x} \
+                  --outputHITSFile=${hits_file} \
                   --maxEvents ${max_events} --skipEvents ${skip_events} \
                   --randomSeed=1234 --imf False
         rc=$?
@@ -85,7 +92,7 @@ case $ArtProcess in
         if [ $rc -eq 0 ]
         then
             Reco_tf.py --autoConfiguration 'everything' \
-                  --inputHITSFile=${hist_file} --conditionsTag 'default:OFLCOND-MC16-SDR-25' \
+                  --inputHITSFile=${hits_file} --conditionsTag 'default:OFLCOND-MC16-SDR-25' \
                   --geometryVersion 'default:ATLAS-R2-2016-01-00-01' \
                   --postExec "all:CfgMgr.MessageSvc().setError+=['HepMcParticleLink']" \
                   --postInclude "default:PyJobTransforms/UseFrontier.py" \
@@ -98,7 +105,7 @@ case $ArtProcess in
 	    echo  "art-result: $rc2 Reco_${ArtProcess}"
             # if no problem, remove all files except the output files
 	fi
-        # for i in `ls | grep -v "${aod_file}\|${hist_file}\|${ntup_file}"` ; do rm -vrf $i; done
+        # for i in `ls | grep -v "${aod_file}\|${hits_file}\|${ntup_file}"` ; do rm -vrf $i; done
         for i in `ls | grep -v "${aod_file}\|${ntup_file}"` ; do rm -vrf $i; done
         
 
diff --git a/Tools/PyUtils/python/RootUtils.py b/Tools/PyUtils/python/RootUtils.py
index 8721cb3042a31a21798f8586d852598cf8f0f9a6..b921060778c5ec902571b6e6f095333e25c79f77 100644
--- a/Tools/PyUtils/python/RootUtils.py
+++ b/Tools/PyUtils/python/RootUtils.py
@@ -19,18 +19,10 @@ __all__ = [
 import os
 import re
 import six
-from array import array
 
 from .Decorators import memoize
 
 ### functions -----------------------------------------------------------------
-# Set buffer size, in bytes.
-# The argument to reshape is in elements, not bytes.
-def _set_byte_size (buf, sz):
-    eltsz = array(buf.typecode).itemsize
-    buf.reshape ((sz // eltsz,))
-    return
-
 def import_root(batch=True):
     """a helper method to wrap the 'import ROOT' statement to prevent ROOT
     from screwing up the display or loading graphics libraries when in batch
@@ -158,19 +150,17 @@ def _pythonize_tfile():
         """
         SZ = 4096
 
+        # FIXME: Once we drop py2, we can simplify this by using a bytes
+        # object directly instead of PyBytes.
         if size>=0:
             #size = _adjust_sz(size)
             #print ("-->0",self.tell(),size)
             c_buf = read_root_file(self, size)
             if c_buf and c_buf.sz:
-                #print ("-->1",self.tell(),c_buf.sz)
-                #self.seek(c_buf.sz+self.tell())
-                #print ("-->2",self.tell())
-                buf = c_buf.buffer()
-                _set_byte_size (buf, c_buf.sz)
+                v = c_buf.buf
                 if six.PY3:
-                    return buf.tobytes()
-                return str(buf[:])
+                    return bytes([ord(v[i]) for i in range(v.size())])
+                return ''.join([v[i] for i in range(v.size())])
             return ''
         else:
             size = SZ
@@ -179,12 +169,18 @@ def _pythonize_tfile():
                 #size = _adjust_sz(size)
                 c_buf = read_root_file(self, size)
                 if c_buf and c_buf.sz:
-                    buf = c_buf.buffer()
-                    _set_byte_size (buf, c_buf.sz)
-                    out.append(str(buf[:]))
+                    v = c_buf.buf
+                    if six.PY3:
+                        chunk = bytes([ord(v[i]) for i in range(v.size())])
+                    else:
+                        chunk = ''.join([v[i] for i in range(v.size())])
+                    out.append(chunk)
                 else:
                     break
+            if six.PY3:
+                return b''.join(out)
             return ''.join(out)
+            
     root.TFile.read = read
     del read
     
diff --git a/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersT.icc b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersT.icc
index 9c6cb0e145b1f2865739b62054b854a5c10ec7eb..6c30adc6f5ee8acff6211df9aa430a30a1f73a14 100644
--- a/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersT.icc
+++ b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersT.icc
@@ -32,7 +32,7 @@ ParametersT<DIM, T, S>::ParametersT(double loc1,
                                     double qop,
                                     const S& surface,
                                     AmgSymMatrix(DIM) * cov)
-  : ParametersBase<DIM, T>({}, cov, {}, {}, sgn(qop))
+  : ParametersBase<DIM, T>(AmgVector(DIM)::Zero(), cov, Amg::Vector3D::Zero(), Amg::Vector3D::Zero(), sgn(qop))
   , m_surface(nullptr)
 {
   m_surface.reset((surface.isFree() ? surface.clone() : &surface));
@@ -64,8 +64,8 @@ ParametersT<DIM, T, S>::ParametersT(const AmgVector(DIM) & parameters,
                                     AmgSymMatrix(DIM) * cov)
   : ParametersBase<DIM, T>(parameters,
                            cov,
-                           {},
-                           {},
+                           Amg::Vector3D::Zero(),
+                           Amg::Vector3D::Zero(),
                            sgn(parameters[Trk::qOverP]))
   , m_surface(nullptr)
 {
@@ -99,7 +99,7 @@ ParametersT<DIM, T, S>::ParametersT(const Amg::Vector3D& pos,
                                     double charge,
                                     const S& surface,
                                     AmgSymMatrix(DIM) * cov)
-  : ParametersBase<DIM, T>({}, cov, pos, mom, charge)
+  : ParametersBase<DIM, T>(AmgVector(DIM)::Zero(), cov, pos, mom, charge)
   , m_surface(surface.isFree() ? surface.clone() : &surface)
 {
   // get the local parameters via the surface
@@ -130,7 +130,7 @@ Trk::ParametersT<DIM, T, S>::ParametersT(const Amg::Vector3D& pos,
                                          double qop,
                                          const S& surface,
                                          AmgSymMatrix(DIM) * cov)
-  : ParametersBase<DIM, T>({}, cov, pos, {}, 1.)
+  : ParametersBase<DIM, T>(AmgVector(DIM)::Zero(), cov, pos, Amg::Vector3D::Zero(), 1.)
   , m_surface(surface.isFree() ? surface.clone() : &surface)
 {
   // decide the sign of the charge
diff --git a/Tracking/TrkFitter/TrkiPatFitterUtils/src/FitMeasurement.cxx b/Tracking/TrkFitter/TrkiPatFitterUtils/src/FitMeasurement.cxx
index a005b63d24d5a70017d63a31a8437b646469fe13..f165e58087962c52660c9bb88ac310070fde5ca0 100755
--- a/Tracking/TrkFitter/TrkiPatFitterUtils/src/FitMeasurement.cxx
+++ b/Tracking/TrkFitter/TrkiPatFitterUtils/src/FitMeasurement.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
 */
 
 /***************************************************************************
@@ -8,10 +8,6 @@
    i.e. position, surface, weights, intersection, derivatives, residual etc
  ***************************************************************************/
 
-#include <cmath>
-#include <iomanip>
-#include <iostream>
-// #include "EventPrimitives/EventPrimitives.h"
 #include "EventPrimitives/EventPrimitivesHelpers.h"
 #include "GaudiKernel/MsgStream.h"
 #include "GaudiKernel/SystemOfUnits.h"
@@ -34,6 +30,10 @@
 #include "TrkTrack/TrackStateOnSurface.h"
 #include "TrkiPatFitterUtils/FitMeasurement.h"
 
+#include <cmath>
+#include <iomanip>
+#include <iostream>
+
 namespace Trk{
   
 // MeasurementBase
@@ -1017,21 +1017,7 @@ void
 FitMeasurement::intersection (ExtrapolationType type,
 			      const TrackSurfaceIntersection* value)
 {
-    // by convention: FittedTrajectory clears out the previous intersections
-//     if (type == FittedTrajectory)
-//     {
-// 	for (int typ = 0; typ != ExtrapolationTypes; ++typ)
-// 	{
-// 	    if (! m_intersection[typ]) continue;
-// 	    delete m_intersection[typ];
-// 	    m_intersection[typ] = 0;
-// 	}
-//     }
-//     else
-    {
-	delete m_intersection[type];
-    }
-    
+    if (type!=FittedTrajectory) delete m_intersection[type];
     m_intersection[type] = value;
 }
 
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlignmentBarrelLUTSvc.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlignmentBarrelLUTSvc.h
index 0922223f7101410fa0864c2fb6f6378532818c2a..e97b9c2aea3b3989a8584ea33605139eb02af249 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlignmentBarrelLUTSvc.h
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlignmentBarrelLUTSvc.h
@@ -26,7 +26,7 @@ namespace TrigL2MuonSA {
   public:
     AlignmentBarrelLUTSvc(const std::string& name,ISvcLocator* sl);
 
-    virtual StatusCode queryInterface(const InterfaceID& riid,void** ppvIF);
+    virtual StatusCode queryInterface(const InterfaceID& riid,void** ppvIF) override;
 
     virtual StatusCode initialize() override;
 
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigCaloDataAccessConfig.py b/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigCaloDataAccessConfig.py
index 89b0204f7c36eadb2f13431f90298bddefd51b11..814312213c790cae9fa4b85d3f79a81da9f979e7 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigCaloDataAccessConfig.py
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigCaloDataAccessConfig.py
@@ -94,8 +94,8 @@ if __name__ == "__main__":
     ConfigFlags.lock()
     acc = ComponentAccumulator()
     
-    from ByteStreamCnvSvc.ByteStreamConfig import TrigBSReadCfg
-    acc.merge( TrigBSReadCfg( ConfigFlags ) )
+    from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
+    acc.merge( ByteStreamReadCfg( ConfigFlags ) )
 
     acc.merge( trigCaloDataAccessSvcCfg( ConfigFlags ) )
     
diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/CMakeLists.txt b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/CMakeLists.txt
index 03461a2f752301b6bf6c35f31348f5023d4d59bb..3d6d3226ba7eb59f1e3aae6a0bdd5bb4dd6b22ff 100644
--- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/CMakeLists.txt
+++ b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/CMakeLists.txt
@@ -1,43 +1,8 @@
-################################################################################
-# Package: TrigEgammaAnalysisTools
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TrigEgammaAnalysisTools )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthToolSupport/AsgTools
-                          Event/xAOD/xAODCaloEvent
-                          Event/xAOD/xAODEgamma
-                          Event/xAOD/xAODEventInfo
-                          Event/xAOD/xAODJet
-                          Event/xAOD/xAODPrimitives
-                          Event/xAOD/xAODTracking
-                          Event/xAOD/xAODTrigCalo
-                          Event/xAOD/xAODTrigEgamma
-                          Event/xAOD/xAODTrigRinger
-                          Event/xAOD/xAODTrigger
-                          Event/xAOD/xAODTruth
-                          Event/xAOD/xAODMissingET
-                          Event/xAOD/xAODCaloRings
-                          LumiBlock/LumiBlockComps
-                          PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools
-                          Reconstruction/RecoTools/RecoToolInterfaces
-                          Reconstruction/egamma/egammaMVACalib
-                          Trigger/TrigAnalysis/TrigDecisionTool
-                          Trigger/TrigAnalysis/TrigEgammaMatchingTool
-                          Trigger/TrigAnalysis/TrigEgammaEmulationTool
-                          Trigger/TrigConfiguration/TrigConfHLTData
-                          Trigger/TrigEvent/TrigSteeringEvent
-                          Trigger/TrigMonitoring/TrigHLTMonitoring
-                          PhysicsAnalysis/AnalysisCommon/PATCore
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaMonitoring
-                          Control/StoreGate
-                          GaudiKernel
-                          Trigger/TrigConfiguration/TrigConfxAOD )
 # External dependencies:
 find_package( Boost )
 find_package( ROOT COMPONENTS Core Hist Tree )
@@ -48,25 +13,18 @@ atlas_add_library( TrigEgammaAnalysisToolsLib
    PUBLIC_HEADERS TrigEgammaAnalysisTools
    INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
    PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
-   LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools xAODCaloEvent xAODEgamma
-   xAODEventInfo xAODJet xAODTracking xAODTrigCalo xAODTrigEgamma xAODTrigRinger xAODMissingET
-   xAODTrigger xAODCaloRings xAODTruth LumiBlockCompsLib EgammaAnalysisInterfacesLib
-   RecoToolInterfaces egammaMVACalibAnalysisLib 
-   TrigEgammaMatchingToolLib TrigEgammaEmulationToolLib TrigConfHLTData
-   TrigSteeringEvent TrigHLTMonitoringLib PATCoreLib
-   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} TrigConfxAODLib )
+   LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools EgammaAnalysisInterfacesLib GaudiKernel LumiBlockCompsLib LumiBlockData PATCoreLib StoreGateLib TrigConfHLTData TrigDecisionToolLib TrigEgammaEmulationToolLib TrigEgammaMatchingToolLib TrigHLTMonitoringLib TrigNavigationLib xAODCaloEvent xAODCaloRings xAODEgamma xAODEventInfo xAODJet xAODMissingET xAODTracking xAODTrigCalo xAODTrigEgamma xAODTrigRinger xAODTrigger xAODTruth
+   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} AthenaMonitoringLib TrigConfxAODLib TrigSteeringEvent )
 
 atlas_add_component( TrigEgammaAnalysisTools
-                     src/*.h
-                     src/*.cxx
-                     src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ElectronPhotonSelectorToolsLib egammaMVACalibLib TrigDecisionToolLib AthenaBaseComps AthenaMonitoringLib StoreGateLib SGtests GaudiKernel TrigEgammaAnalysisToolsLib )
+   src/*.h
+   src/*.cxx
+   src/components/*.cxx
+   LINK_LIBRARIES AthenaBaseComps AthenaMonitoringLib TrigEgammaAnalysisToolsLib )
 
 # Install files from the package:
 atlas_install_python_modules( python/TrigEgamma*.py )
 atlas_install_joboptions( share/test*.py )
 atlas_install_generic( share/trigEgammaDQ.py share/get_trigEgammaDQ.sh 
-                        DESTINATION share
-                        EXECUTABLE )
-
+   DESTINATION share
+   EXECUTABLE )
diff --git a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/CMakeLists.txt b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/CMakeLists.txt
index 72cdd17128357046d59524158a95efd71b04530d..e1c5b631fdca4c47646d265f91802e832a98a8b6 100644
--- a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/CMakeLists.txt
+++ b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/CMakeLists.txt
@@ -1,41 +1,8 @@
-################################################################################
-# Package: TrigEgammaEmulationTool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TrigEgammaEmulationTool )
 
-
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/AthContainers
-   Control/AthToolSupport/AsgTools
-   Event/xAOD/xAODBase
-   Event/xAOD/xAODCaloEvent
-   Event/xAOD/xAODEgamma
-   Event/xAOD/xAODPrimitives
-   Event/xAOD/xAODTracking
-   Event/xAOD/xAODTrigCalo
-   Event/xAOD/xAODTrigEgamma
-   Event/xAOD/xAODTrigRinger
-   Event/xAOD/xAODTrigger
-   PhysicsAnalysis/AnalysisCommon/PATCore
-   PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces
-   LumiBlock/LumiBlockComps
-   InnerDetector/InDetRecTools/InDetTrackSelectionTool
-   Reconstruction/RecoTools/RecoToolInterfaces
-   Tools/PathResolver
-   Trigger/TrigAnalysis/TrigDecisionTool
-   Trigger/TrigConfiguration/TrigConfHLTData
-   Trigger/TrigEvent/TrigSteeringEvent
-   Trigger/TrigHypothesis/TrigMultiVarHypo
-   Trigger/TrigAnalysis/TrigEgammaMatchingTool
-   PRIVATE
-   Control/AthenaBaseComps
-   Control/StoreGate
-   GaudiKernel )
-
 # External dependencies:
 find_package( Boost )
 find_package( CLHEP )
@@ -46,25 +13,13 @@ atlas_add_library( TrigEgammaEmulationToolLib
    PUBLIC_HEADERS TrigEgammaEmulationTool 
    INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
    PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
-   LINK_LIBRARIES ${CLHEP_LIBRARIES} AthContainers AsgTools xAODBase
-   xAODCaloEvent xAODEgamma xAODTracking xAODTrigCalo xAODTrigEgamma
-   xAODTrigRinger xAODTrigger PATCoreLib EgammaAnalysisInterfacesLib
-   LumiBlockCompsLib InDetTrackSelectionToolLib RecoToolInterfaces
-   TrigDecisionToolLib TrigConfHLTData TrigSteeringEvent TrigMultiVarHypoLib
-   TrigEgammaMatchingToolLib
-   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} )
+   LINK_LIBRARIES ${Boost_LIBRARIES} AsgTools AthContainers EgammaAnalysisInterfacesLib InDetTrackSelectionToolLib LumiBlockCompsLib PATCoreLib RecoToolInterfaces TrigConfHLTData TrigDecisionToolLib TrigEgammaMatchingToolLib TrigMultiVarHypoLib xAODBase xAODCaloEvent xAODCaloRings xAODEgamma xAODPrimitives xAODTracking xAODTrigCalo xAODTrigEgamma xAODTrigRinger xAODTrigger
+   PRIVATE_LINK_LIBRARIES StoreGateLib TrigSteeringEvent )
 
 atlas_add_component( TrigEgammaEmulationTool
-    src/*.h src/*.cxx src/components/*.cxx
-    LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES}
-    AthContainers AsgTools xAODBase xAODCaloEvent xAODEgamma  xAODTracking
-    xAODTrigCalo xAODTrigEgamma xAODTrigRinger xAODTrigger PATCoreLib
-    ElectronPhotonSelectorToolsLib TrigDecisionToolLib TrigConfHLTData
-    TrigSteeringEvent TrigMultiVarHypoLib AthenaBaseComps StoreGateLib SGtests
-    GaudiKernel TrigEgammaMatchingToolLib LumiBlockCompsLib IsolationToolLib
-    TrigEgammaEmulationToolLib) 
-
+   src/*.cxx src/components/*.cxx
+   LINK_LIBRARIES AthenaBaseComps GaudiKernel TrigEgammaEmulationToolLib )
 
 # Install files from the package:
-atlas_install_python_modules( python/TrigEgamma*.py )
+atlas_install_python_modules( python/TrigEgamma*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/test*.py )
diff --git a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationEFConfig.py b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationEFConfig.py
index 32bad9c316e894ee4d7b149b3177b08acc5158b0..d6415bdd0b2a02fad28e71c38b201f3f0e5d999e 100644
--- a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationEFConfig.py
+++ b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationEFConfig.py
@@ -1,12 +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
 
-from AthenaCommon                                                 import CfgMgr
 from AthenaCommon.AppMgr                                          import ToolSvc
 from egammaRec.Factories                                          import ToolFactory
 #from TrigEgammaHypo.TrigEgammaPidTools                            import ElectronToolName
 #from ElectronPhotonSelectorTools.ElectronPhotonSelectorToolsConf  import AsgElectronIsEMSelector
 #from ElectronPhotonSelectorTools.ElectronIsEMSelectorMapping      import ElectronIsEMMap,electronPIDmenu
-from TrigEgammaEmulationTool.TrigEgammaEmulationToolConfig        import OutputLevel
 
 
 #***********************************************************************
diff --git a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationIsolationConfig.py b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationIsolationConfig.py
index 23961e8ee341da9225168e7a51a8f84b4086fa12..d1b7d61ec9f37638f1f9136fcf1a76d818990f80 100644
--- a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationIsolationConfig.py
+++ b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationIsolationConfig.py
@@ -1,15 +1,12 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 def createIsoToolElectronSelector():
 
   from AthenaCommon.AppMgr import ToolSvc
-  from AthenaCommon import CfgMgr
-  from egammaRec.Factories                                          import ToolFactory
   from TrigEgammaEmulationTool.TrigEgammaEmulationToolConf import Trig__TrigEgammaIsolationSelectorTool
   from TrigEgammaEmulationTool.TrigEgammaEmulationToolConfig        import OutputLevel
   
   from TrigEgammaHypo.TrigEFElectronHypoConfig import isolation_dict, caloisolation_dict
-  from TrigEgammaHypo.TrigEFPhotonHypoConfig   import TrigEFPhotonIsoCutDefs
 
   # Track isolation -- remember to add TrackIsolation as a property of the class
   from IsolationTool.IsolationToolConf import xAOD__TrackIsolationTool
@@ -37,7 +34,7 @@ def createIsoToolElectronSelector():
   for wp in isolations:
 
     caloiso = True if 'icalo' in wp else False
-    trkiso = True if not 'icalo' in wp else False
+    trkiso = True if 'icalo' not in wp else False
     
     tool = Trig__TrigEgammaIsolationSelectorTool( 'IsolationTool_'+wp,
                                           RelEtConeCut = caloisolation_dict[wp] if caloiso else [-1,-1,-1,-1,-1,-1],
@@ -52,10 +49,4 @@ def createIsoToolElectronSelector():
     ToolSvc += tool
     IsoToolSelectors.append( tool )
 
-    #Just to see WTF!
-    _toolname='IsolationTool_'+wp
-    RelEtConeCut = caloisolation_dict[wp] if caloiso else [-1,-1,-1,-1,-1,-1],
-    RelPtConeCut = isolation_dict[wp] if trkiso else [-1,-1,-1,-1,-1,-1],
-
   return IsoToolSelectors
-
diff --git a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationL2Config.py b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationL2Config.py
index 75e49f2fd78659aac78e0351ee8a1dcfd78fd75c..0e04d23bd04f478258cab8138b78bdb9f47129d4 100644
--- a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationL2Config.py
+++ b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationL2Config.py
@@ -1,7 +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
 
-
-from egammaRec.Factories  import ToolFactory,FcnWrapper,AlgFactory, getPropertyValue
+from egammaRec.Factories  import ToolFactory
 from TrigEgammaEmulationTool.TrigEgammaEmulationToolConf import Trig__TrigEgammaL2CaloSelectorTool
 from TrigEgammaEmulationTool.TrigEgammaEmulationToolConf import Trig__TrigEgammaL2ElectronSelectorTool
 from AthenaCommon.SystemOfUnits                          import GeV
diff --git a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationPidToolsConfig.py b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationPidToolsConfig.py
index 2f8a02f377849e9fbdbe5e8ce875e42072de690e..4f708648df04dc3de9aed922ee9a286892fecd05 100644
--- a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationPidToolsConfig.py
+++ b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationPidToolsConfig.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
 #
 # TrigEgammaPidTools
 # Add all pid selectors to ToolSvc
@@ -11,18 +11,13 @@
 ###############################################################
 
 from AthenaCommon import CfgMgr
-from AthenaCommon.AppMgr import ToolSvc
 
 import PyUtils.RootUtils as ru
 ROOT = ru.import_root()
 import cppyy
 cppyy.loadDictionary('ElectronPhotonSelectorToolsDict')
-from ROOT import LikeEnum
-from ROOT import egammaPID
 
 from ElectronPhotonSelectorTools.TrigEGammaPIDdefs import SelectionDefElectron
-from ElectronPhotonSelectorTools.ElectronPhotonSelectorToolsConf import AsgElectronIsEMSelector
-from ElectronPhotonSelectorTools.ElectronIsEMSelectorMapping import ElectronIsEMMap,electronPIDmenu
 
 ###################################################################################################
 
@@ -44,7 +39,11 @@ def getEgammaIsEMSelectorCaloOnly( calibPath ):
   for idx, config in enumerate(configList):
     name = config.split('/')[-1].replace('.conf','_EFCalo_'+calibname)
     asg = CfgMgr.AsgElectronIsEMSelector(name)
-    asg.caloOnly=True; asg.isEMMask=mask[idx];  asg.ConfigFile=config; ToolSvc+=asg; asgTools.append(asg)
+    asg.caloOnly=True
+    asg.isEMMask=mask[idx]
+    asg.ConfigFile=config
+    ToolSvc+=asg
+    asgTools.append(asg)
   return asgTools
 
 
@@ -66,14 +65,17 @@ def getElectronIsEMSelector( calibPath ):
   for idx, config in enumerate(configList):
     name = config.split('/')[-1].replace('.conf','_HLT_'+calibname)
     asg = CfgMgr.AsgElectronIsEMSelector(name)
-    asg.isEMMask=mask[idx];  asg.ConfigFile=config; ToolSvc+=asg; asgTools.append(asg)
+    asg.isEMMask=mask[idx]
+    asg.ConfigFile=config
+    ToolSvc+=asg
+    asgTools.append(asg)
   return asgTools
 
 # http://atlas.web.cern.ch/Atlas/GROUPS/DATABASE/GroupData/ElectronPhotonSelectorTools/trigger/rel21_20170214/
 # http://atlas.web.cern.ch/Atlas/GROUPS/DATABASE/GroupData/ElectronPhotonSelectorTools/trigger/rel21_20170217/
 # http://atlas.web.cern.ch/Atlas/GROUPS/DATABASE/GroupData/ElectronPhotonSelectorTools/trigger/rel21_20170217_mc16a/
 def getEgammaLikelihoodSelectorCaloOnly( calibPath ):
-  
+
   from AthenaCommon.AppMgr import ToolSvc
   calibname = calibPath.split('/')[-1]
   configList = [
@@ -86,14 +88,18 @@ def getEgammaLikelihoodSelectorCaloOnly( calibPath ):
   for idx, config in enumerate(configList):
     name = config.split('/')[-1].replace('.conf','_EFCalo_'+calibname)
     asg = CfgMgr.AsgElectronLikelihoodTool(name)
-    asg.usePVContainer = False;  asg.ConfigFile=config; asg.caloOnly = True; ToolSvc+=asg; asgTools.append(asg)
+    asg.usePVContainer = False
+    asg.ConfigFile=config
+    asg.caloOnly = True
+    ToolSvc+=asg
+    asgTools.append(asg)
   return asgTools
 
 # http://atlas.web.cern.ch/Atlas/GROUPS/DATABASE/GroupData/ElectronPhotonSelectorTools/trigger/rel21_20170214/
 # http://atlas.web.cern.ch/Atlas/GROUPS/DATABASE/GroupData/ElectronPhotonSelectorTools/trigger/rel21_20170217/
 # http://atlas.web.cern.ch/Atlas/GROUPS/DATABASE/GroupData/ElectronPhotonSelectorTools/trigger/rel21_20170217_mc16a/
 def getElectronLikelihoodSelector2015( calibPath ):
-  
+
   from AthenaCommon.AppMgr import ToolSvc
   calibname = calibPath.split('/')[-1]
   configList = [
@@ -106,14 +112,18 @@ def getElectronLikelihoodSelector2015( calibPath ):
   for idx, config in enumerate(configList):
     name = config.split('/')[-1].replace('.conf','_HLT_'+calibname)
     asg = CfgMgr.AsgElectronLikelihoodTool(name)
-    asg.usePVContainer = False;  asg.ConfigFile=config; asg.caloOnly = True; ToolSvc+=asg; asgTools.append(asg)
+    asg.usePVContainer = False
+    asg.ConfigFile=config
+    asg.caloOnly = True
+    ToolSvc+=asg
+    asgTools.append(asg)
   return asgTools
 
 # http://atlas.web.cern.ch/Atlas/GROUPS/DATABASE/GroupData/ElectronPhotonSelectorTools/trigger/rel21_20170214/
 # http://atlas.web.cern.ch/Atlas/GROUPS/DATABASE/GroupData/ElectronPhotonSelectorTools/trigger/rel21_20170217/
 # http://atlas.web.cern.ch/Atlas/GROUPS/DATABASE/GroupData/ElectronPhotonSelectorTools/trigger/rel21_20170217_mc16a/
 def getElectronLikelihoodSelectorNoD0( calibPath ):
-  
+
   from AthenaCommon.AppMgr import ToolSvc
   calibname = calibPath.split('/')[-1]
   configList = [
@@ -126,7 +136,11 @@ def getElectronLikelihoodSelectorNoD0( calibPath ):
   for idx, config in enumerate(configList):
     name = config.split('/')[-1].replace('.conf','_HLT_'+calibname)
     asg = CfgMgr.AsgElectronLikelihoodTool(name)
-    asg.usePVContainer = False;  asg.ConfigFile=config; asg.caloOnly = True; ToolSvc+=asg; asgTools.append(asg)
+    asg.usePVContainer = False
+    asg.ConfigFile=config
+    asg.caloOnly = True
+    ToolSvc+=asg
+    asgTools.append(asg)
   return asgTools
 
 #####################################################################################################
diff --git a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationToolConfig.py b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationToolConfig.py
index 9872f0545619b8cd755cb97f6017923f8f5e7bbe..6e3ce5b1de4ef1084a90ee9820f8f49508a2f60c 100644
--- a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationToolConfig.py
+++ b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationToolConfig.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
 
 #********************************************************************************
 #
@@ -14,16 +14,11 @@ OutputLevel = 0
 from AthenaCommon.Logging import logging
 logger = logging.getLogger("TrigEgammaEmulationToolConfig")
 
-from AthenaCommon         import CfgMgr
 from AthenaCommon.AppMgr  import ToolSvc
-from egammaRec.Factories  import ToolFactory,FcnWrapper,AlgFactory, getPropertyValue
+from egammaRec.Factories  import ToolFactory
 import PyUtils.RootUtils as ru
 ROOT = ru.import_root()
-import cppyy
-
-# Following loads the online selectors
-from ElectronPhotonSelectorTools.ElectronPhotonSelectorToolsConf  import AsgElectronIsEMSelector
-from ElectronPhotonSelectorTools.ElectronIsEMSelectorMapping      import ElectronIsEMMap,electronPIDmenu
+import cppyy  # noqa: F401
 
 #*****************************************************************************
 #from TrigEgammaMatchingTool.TrigEgammaMatchingToolConf import Trig__TrigEgammaMatchingTool
diff --git a/Trigger/TrigAnalysis/TrigEgammaMatchingTool/CMakeLists.txt b/Trigger/TrigAnalysis/TrigEgammaMatchingTool/CMakeLists.txt
index 79db3b49f8e722b3065c7739da9ebf3e37795b34..ab41d94b4aaa1be32bdec6f30601510be4a8257e 100644
--- a/Trigger/TrigAnalysis/TrigEgammaMatchingTool/CMakeLists.txt
+++ b/Trigger/TrigAnalysis/TrigEgammaMatchingTool/CMakeLists.txt
@@ -1,52 +1,19 @@
-################################################################################
-# Package: TrigEgammaMatchingTool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TrigEgammaMatchingTool )
 
-
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Event/xAOD/xAODCaloEvent
-                          Event/xAOD/xAODEgamma
-                          Event/xAOD/xAODTracking
-                          Event/xAOD/xAODTrigCalo
-                          Event/xAOD/xAODTrigEgamma
-                          Event/xAOD/xAODMuon
-                          Event/xAOD/xAODTau
-                          Event/xAOD/xAODTrigger
-                          Trigger/TrigAnalysis/TrigDecisionTool
-                          Trigger/TrigConfiguration/TrigConfHLTData
-                          Trigger/TrigEvent/TrigSteeringEvent
-                          Trigger/TrigSteer/DecisionHandling
-                          PRIVATE
-                          Control/AthToolSupport/AsgTools
-                          Control/AthenaMonitoring
-                          Control/StoreGate
-                          Control/AthenaBaseComps
-                          GaudiKernel )
-
-
-
 # External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
+find_package( Boost )
 
 # Component(s) in the package:
 atlas_add_library( TrigEgammaMatchingToolLib
                    Root/*.cxx
                    PUBLIC_HEADERS TrigEgammaMatchingTool
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES AsgTools xAODCaloEvent xAODEgamma xAODTracking xAODTrigCalo xAODTrigEgamma TrigConfHLTData 
-                   TrigSteeringEvent TrigDecisionToolLib DecisionHandlingLib AthenaMonitoringLib
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} xAODMuon xAODTau xAODTrigger  )
-
+                   PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
+                   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} TrigSteeringEvent xAODRootAccess
+                   LINK_LIBRARIES AsgTools DecisionHandlingLib GaudiKernel TrigConfHLTData TrigDecisionToolLib xAODCaloEvent xAODEgamma xAODTracking xAODTrigCalo xAODTrigEgamma xAODTrigger )
 
 atlas_add_component( TrigEgammaMatchingTool
                      src/*.h src/*.cxx src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools xAODCaloEvent xAODEgamma xAODTracking xAODTrigCalo xAODTrigEgamma 
-                     TrigDecisionToolLib TrigConfHLTData TrigSteeringEvent AthenaBaseComps xAODMuon xAODTau xAODTrigger GaudiKernel 
-                     TrigEgammaMatchingToolLib AthenaMonitoringLib StoreGateLib)
-
-
+                     LINK_LIBRARIES AthenaBaseComps AthenaMonitoringLib GaudiKernel StoreGateLib TrigEgammaMatchingToolLib TriggerMatchingToolLib xAODMuon xAODTau )
diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/rmain.cxx b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/rmain.cxx
index e330577804045b851ac307bc8036e018a3ce8f1b..6f9eec0452cd66925854b98715fdf491ad8a0c3e 100644
--- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/rmain.cxx
+++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/rmain.cxx
@@ -535,6 +535,8 @@ int main(int argc, char** argv)
   int nbl = -1;
 
   int nsiholes = 2;
+  int npixholes = 20; /// essentially no limit
+  int nsctholes = 20; /// essentially no limit
 
   bool expectBL = false;
 
@@ -590,6 +592,8 @@ int main(int argc, char** argv)
   if ( inputdata.isTagDefined("zed") )      zed      = inputdata.GetValue("zed");
   if ( inputdata.isTagDefined("npix") )     npix     = inputdata.GetValue("npix");
   if ( inputdata.isTagDefined("nsiholes") ) nsiholes = inputdata.GetValue("nsiholes");
+  if ( inputdata.isTagDefined("npixholes") ) npixholes = inputdata.GetValue("npixholes");
+  if ( inputdata.isTagDefined("nsctholes") ) nsctholes = inputdata.GetValue("nsctholes");
   if ( inputdata.isTagDefined("expectBL") ) expectBL = ( inputdata.GetValue("expectBL") > 0.5 ? true : false );
   if ( inputdata.isTagDefined("nsct") )     nsct     = inputdata.GetValue("nsct");
   if ( inputdata.isTagDefined("nbl") )      nbl      = inputdata.GetValue("nbl");
@@ -930,7 +934,7 @@ int main(int argc, char** argv)
   Filter_Track filter_offline( eta, 1000, zed, pT, 
                                npix, nsct, -1, nbl, 
                                -2, -2, chi2prob, 
-                               20, 20, nsiholes, expectBL ); /// include chi2 probability cut 
+                               npixholes, nsctholes, nsiholes, expectBL ); /// include chi2 probability cut 
 
   if ( selectcharge!=0 ) filter_offline.chargeSelection( selectcharge );
   if ( pTMax>pT )        filter_offline.maxpT( pTMax );
diff --git a/Trigger/TrigAnalysis/TrigJiveXML/src/TrigSiSpacePointRetriever.cxx b/Trigger/TrigAnalysis/TrigJiveXML/src/TrigSiSpacePointRetriever.cxx
index 1e35fd89560d38f76fd4ad7b2a63c04504cf1c84..c42287556dbb754343892b217be39daccc0df46e 100755
--- a/Trigger/TrigAnalysis/TrigJiveXML/src/TrigSiSpacePointRetriever.cxx
+++ b/Trigger/TrigAnalysis/TrigJiveXML/src/TrigSiSpacePointRetriever.cxx
@@ -55,9 +55,9 @@ namespace JiveXML {
  
     int maxHash = m_pixelHelper->wafer_hash_max();
      for(int id=0;id<maxHash;++id){
-	    TrigSiSpacePointContainer::const_iterator spCollIt=pCont->indexFind(id);
-	    if(spCollIt==pCont->end()) continue;
-	    for(TrigSiSpacePointCollection::const_iterator spIt=(*spCollIt)->begin(); spIt!=(*spCollIt)->end();++spIt){
+	    auto spCollIt=pCont->indexFindPtr(id);
+	    if(spCollIt==nullptr) continue;
+	    for(TrigSiSpacePointCollection::const_iterator spIt=spCollIt->begin(); spIt!=spCollIt->end();++spIt){
 		x.push_back(DataType((*spIt)->x() /10.));
 		y.push_back(DataType((*spIt)->y() /10.));
 		z.push_back(DataType((*spIt)->z() /10.));
@@ -77,9 +77,9 @@ namespace JiveXML {
 
     int maxHash = m_sctHelper->wafer_hash_max();
        for(int id=0;id<maxHash;++id){
-	    TrigSiSpacePointContainer::const_iterator spCollIt=pCont->indexFind(id);
-	    if(spCollIt==pCont->end()) continue;
-	    for(TrigSiSpacePointCollection::const_iterator spIt=(*spCollIt)->begin(); spIt!=(*spCollIt)->end();++spIt){
+	    auto spCollIt=pCont->indexFindPtr(id);
+	    if(spCollIt==nullptr) continue;
+	    for(TrigSiSpacePointCollection::const_iterator spIt=spCollIt->begin(); spIt!=spCollIt->end();++spIt){
 		x.push_back(DataType((*spIt)->x() /10.));
 		y.push_back(DataType((*spIt)->y() /10.));
 		z.push_back(DataType((*spIt)->z() /10.));
diff --git a/Trigger/TrigEvent/TrigBSExtraction/CMakeLists.txt b/Trigger/TrigEvent/TrigBSExtraction/CMakeLists.txt
index 0f7f9b618324ea9475bab0a6850837e0ce2f9e41..10c01220bf6ae397ebdb3e6b7ea12e57980f9fcb 100644
--- a/Trigger/TrigEvent/TrigBSExtraction/CMakeLists.txt
+++ b/Trigger/TrigEvent/TrigBSExtraction/CMakeLists.txt
@@ -56,7 +56,7 @@ atlas_depends_on_subdirs( PUBLIC
 atlas_add_component( TrigBSExtraction
                      src/*.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES AthenaBaseComps StoreGateLib SGtests GaudiKernel TrigSerializeCnvSvcLib TrigNavigationLib TrigSteeringEvent xAODJet xAODMuon xAODTracking xAODTrigBphys xAODTrigCalo xAODTrigMinBias xAODTrigMissingET xAODTrigMuon xAODTau xAODEgamma xAODCaloEvent xAODTrigger xAODBTagging JetEvent Particle tauEvent egammaEvent CaloEvent TrkTrack TrigCaloEvent TrigInDetEvent TrigMissingEtEvent TrigMuonEvent TrigParticle TrigStorageDefinitions )
+                     LINK_LIBRARIES AthenaBaseComps StoreGateLib SGtests GaudiKernel TrigSerializeCnvSvcLib TrigNavigationLib TrigSteeringEvent xAODJet xAODMuon xAODTracking xAODTrigBphys xAODTrigCalo xAODTrigMinBias xAODTrigMissingET xAODTrigMuon xAODTau xAODEgamma xAODCaloEvent xAODTrigger xAODBTagging JetEvent Particle tauEvent egammaEvent CaloEvent TrkTrack TrigCaloEvent TrigInDetEvent TrigMissingEtEvent TrigMuonEvent TrigParticle TrigStorageDefinitions xAODTauCnvLib xAODTrigMuonCnvLib xAODJetCnvLib xAODTrigCaloCnvLib xAODBTaggingCnvLib xAODTrigBphysCnvLib xAODTrigMissingETCnvLib xAODTrigMinBiasCnvLib xAODEgammaCnvLib xAODCaloEventCnvLib xAODTriggerCnvLib )
 
 # Install files from the package:
 atlas_install_headers( TrigBSExtraction )
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulation/CMakeLists.txt b/Trigger/TrigT1/L1Topo/L1TopoSimulation/CMakeLists.txt
index c9aab2bc2571b83596d506a1556da6af688a0d85..d59494a9456fba0a3be7143cd576cafee83cea52 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoSimulation/CMakeLists.txt
+++ b/Trigger/TrigT1/L1Topo/L1TopoSimulation/CMakeLists.txt
@@ -33,7 +33,7 @@ atlas_disable_as_needed()
 
 # Component(s) in the package:
 atlas_add_library( L1TopoSimulationLib
-   L1TopoSimulation/*.h Root/*.cxx
+   L1TopoSimulation/*.h
    INTERFACE
    PUBLIC_HEADERS L1TopoSimulation
    LINK_LIBRARIES GaudiKernel )
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/L1TopoSimulationUtils/L1TopoDataTypes.h b/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/L1TopoSimulationUtils/L1TopoDataTypes.h
index 9bb22c40c45863c8fc1d730708bdabb3281e6888..c35486b9ea89211ab096a818eb9cf9091a2446c1 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/L1TopoSimulationUtils/L1TopoDataTypes.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/L1TopoSimulationUtils/L1TopoDataTypes.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
 */
 /*********************************
  * L1TopoDataTypes.h
@@ -182,8 +182,9 @@ namespace TSU {
           // Get integer part
           res += (m_tvalue>>F)&((1<<(PREC-F))-1) ? float((m_tvalue>>F)&((1<<(PREC-F))-1)) : 0;
           // Do the fractional part
-          for(unsigned j=0;j<F;++j){
-            res += (m_tvalue & (1 << (F-1-j))) ? 1./(2<<(j)) : 0;
+          if (F > 0) {
+            unsigned frac = m_tvalue & ( (1<<F)-1 );
+            res += static_cast<float>(frac) / (2<<(F-1));
           }
           return res;
        }
diff --git a/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetConfig.py b/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetConfig.py
index 21b0c07f878f2cd884fff2546317de7b8ca36bfb..a5fceef394520721819ea69a3afc09cb18d09a82 100644
--- a/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetConfig.py
+++ b/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetConfig.py
@@ -417,8 +417,8 @@ if __name__ == "__main__":
     l1DecoderAcc, l1DecoderAlg = L1DecoderCfg( ConfigFlags )
     acc.addEventAlgo(l1DecoderAlg)
     acc.merge(l1DecoderAcc)
-    from ByteStreamCnvSvc.ByteStreamConfig import TrigBSReadCfg
-    acc.merge(TrigBSReadCfg(ConfigFlags))
+    from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
+    acc.merge(ByteStreamReadCfg(ConfigFlags))
 
     acc.merge( TrigInDetConfig( ConfigFlags ) )
     from RegionSelector.RegSelConfig import regSelCfg
diff --git a/Trigger/TrigValidation/TrigInDetValidation/scripts/TIDAdataset.py b/Trigger/TrigValidation/TrigInDetValidation/scripts/TIDAdataset.py
index 84880e6f76973c8cb1a82356267d93c603256e4e..9e15e1ec9c48c20bf192af45b9768b36652030cb 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/scripts/TIDAdataset.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/scripts/TIDAdataset.py
@@ -1,5 +1,7 @@
 #!/bin/env python
 
+from __future__ import print_function
+
 #Import datasets from RTT--------------------------------------------------------------------------                                                   
 def importRTTdatasets(jobID):
     from AthenaCommon.Utils.unixtools import find_datafile
@@ -20,7 +22,7 @@ def importRTTdatasets(jobID):
 def main(argv):
     for x in argv[1:]:
         for ds in importRTTdatasets( x ):
-            print ds
+            print (ds)
 
 if __name__ == "__main__":
     import sys
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/EmuNewJOTest.py b/Trigger/TrigValidation/TrigUpgradeTest/share/EmuNewJOTest.py
index 84c4201a66e02c81c993d2e06299a45d2eae29f3..749f814e09d9ede13138d30c9e9e848e650fb238 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/EmuNewJOTest.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/EmuNewJOTest.py
@@ -7,7 +7,7 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.AllConfigFlags import ConfigFlags as flags
 from AthenaCommon.Constants import INFO, DEBUG, VERBOSE
 from AthenaCommon.Logging import logging
-from ByteStreamCnvSvc.ByteStreamConfig import TrigBSReadCfg
+from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
 from TrigUpgradeTest.TriggerHistSvcConfig import TriggerHistSvcConfig
 from MuonConfig.MuonCablingConfig import RPCCablingConfigCfg, TGCCablingConfigCfg
 from TrigConfigSvc.TrigConfigSvcConfig import TrigConfigSvcCfg
@@ -31,7 +31,7 @@ flags.Trigger.L1Decoder.forceEnableAllChains = True
 flags.lock()
 
 acc = ComponentAccumulator()
-acc.merge(TrigBSReadCfg(flags))
+acc.merge(ByteStreamReadCfg(flags))
 acc.merge(TriggerHistSvcConfig(flags))
 
 l1DecoderAlg, OrigHLTChains = generateL1DecoderAndChains()
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/newJOtest.py b/Trigger/TrigValidation/TrigUpgradeTest/share/newJOtest.py
index 29835f3dd108a30d3b575b0d047e19ae98cd966e..8461b59495332fd60949158de2c550d875d26a08 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/newJOtest.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/newJOtest.py
@@ -54,8 +54,8 @@ flags.lock()
 from AthenaCommon.Constants import INFO,DEBUG,WARNING
 acc = MainServicesCfg( flags )
 
-from ByteStreamCnvSvc.ByteStreamConfig import TrigBSReadCfg
-acc.merge(TrigBSReadCfg( flags ))
+from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
+acc.merge(ByteStreamReadCfg( flags ))
 
 
 from TrigUpgradeTest.TriggerHistSvcConfig import TriggerHistSvcConfig
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/CMakeLists.txt b/Trigger/TriggerCommon/TriggerMenuMT/CMakeLists.txt
index 1a23c5bb63ea542b2fb7d9383d613de3edff4356..70014723b4fd498abb8bc27dc082bebc76eeb82c 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/CMakeLists.txt
+++ b/Trigger/TriggerCommon/TriggerMenuMT/CMakeLists.txt
@@ -1,145 +1,57 @@
-################################################################################
-# Package: TriggerMenuMT
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TriggerMenuMT )
 
-# Declare the package's dependencies: 
-atlas_depends_on_subdirs( PRIVATE
-                          Trigger/TriggerCommon/TriggerJobOpts)
-
 # External dependencies:
 find_package( six )
 
-atlas_add_test( flake8
-   SCRIPT flake8 --select=ATL,F,E7,E9,W6,E101 --enable-extension=ATL900,ATL901,ATL902
-   ${CMAKE_CURRENT_SOURCE_DIR}/python ${CMAKE_CURRENT_SOURCE_DIR}/scripts
-   POST_EXEC_SCRIPT nopost.sh )
-
-#----------------------------------
-# Function to build trigger menu:
-function( atlas_build_lvl1_trigger_menu menu )
-
-   # Don't do anything in release recompilation dryrun mode. In all other
-   # modes, proceed as usual.
-   if( ATLAS_RELEASE_RECOMPILE_DRYRUN )
-      return()
-   endif()
-
-   # Command to build trigger menu. The idea is that ${menu}.stamp gets
-   # created as the last command, should the menu generation succeed such that 
-   # after a successful menu generation it wouldn't be attempted again.
-   # In order for the installation step to not try to re-generate
-   # the menu in case it was the generation itself that failed, another
-   # stamp file, ${menu}.attempted.stamp is created as the first command.
-   # The menu is then only generated as part of the installation step if
-   # this ${menu}.attempted.stamp file doesn't even exist.
-   
-   add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${menu}.stamp
-      COMMAND ${CMAKE_COMMAND} -E touch
-      ${CMAKE_CURRENT_BINARY_DIR}/${menu}.attempted.stamp
-      COMMAND ${CMAKE_COMMAND} -E make_directory
-      ${CMAKE_CURRENT_BINARY_DIR}/Menus/${menu}
-      COMMAND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/atlas_build_run.sh
-      ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/generateL1MenuMT.sh -r ${CMAKE_PROJECT_VERSION} ${menu}
-      ${CMAKE_CURRENT_BINARY_DIR}/Menus/${menu}
-      COMMAND ${CMAKE_COMMAND} -E make_directory
-      ${CMAKE_XML_OUTPUT_DIRECTORY}/TriggerMenuMT
-      COMMAND ${CMAKE_COMMAND} -E copy_directory
-      ${CMAKE_CURRENT_BINARY_DIR}/Menus/${menu}/
-      ${CMAKE_XML_OUTPUT_DIRECTORY}/TriggerMenuMT
-      COMMAND ${CMAKE_COMMAND} -E touch
-      ${CMAKE_CURRENT_BINARY_DIR}/${menu}.stamp
-      DEPENDS "Package_$<JOIN:$<TARGET_PROPERTY:ATLAS_PACKAGES_TARGET,ATLAS_PACKAGES>,;Package_>" )
-
-   # Create custom target and add it to package dependencies
-   add_custom_target( build_menu_${menu} ALL SOURCES
-      ${CMAKE_CURRENT_BINARY_DIR}/${menu}.stamp )
-
-   # In case the file generation failed, because it wasn't even attempted
-   # (failure in another package), then try to run the generation as part
-   # of the installation. Note that apparently chaining commands inside a
-   # single execute_process(...) call doesn't work correctly during installation
-   # for some reason. Hence it's taken apart into 3 separate calls.
-   install( CODE "if( NOT EXISTS
-                     ${CMAKE_CURRENT_BINARY_DIR}/${menu}.attempted.stamp )
-                     message( WARNING \"Generating trigger menu ${menu}\"
-                              \" during the installation\" )
-                     execute_process( COMMAND ${CMAKE_COMMAND} -E touch
-                        ${CMAKE_CURRENT_BINARY_DIR}/${menu}.attempted.stamp )
-                     execute_process(
-                        COMMAND ${CMAKE_COMMAND} -E make_directory
-                        ${CMAKE_CURRENT_BINARY_DIR}/Menus/${menu} )
-                     execute_process(
-                        COMMAND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/atlas_build_run.sh
-                        ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/generateL1MenuMT.sh
-                        -r ${CMAKE_PROJECT_VERSION} ${menu} ${CMAKE_CURRENT_BINARY_DIR}/Menus/${menu} )
-                  endif()" )
-
-   # Install the generated XML files. Note that this installation rule is
-   # executed after the previous code. So by this time the files should be
-   # in place, if they could be produced.
-   install( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Menus/${menu}/
-      DESTINATION ${CMAKE_INSTALL_XMLDIR}/TriggerMenuMT
-      USE_SOURCE_PERMISSIONS
-      FILES_MATCHING PATTERN "*.xml" )
-
-   # Create a target that will depend on all the other targets, and will
-   # print the "right message" at the end of the build. Notice that
-   # we can't rely on the Package_TriggerMenuXML target here, since
-   # the XML generation depends on all package targets being ready before
-   # it could start. So it would cause a circular dependency to make the
-   # menu targets be dependencies of the package target.
-   if( NOT TARGET TriggerMenuMTMain )
-      add_custom_target( TriggerMenuMTMain ALL
-         COMMAND ${CMAKE_COMMAND} -E echo
-         "TriggerMenuMT: Package build succeeded" )
-   endif()
-   add_dependencies( TriggerMenuMTMain build_menu_${menu} )
-
-endfunction ( atlas_build_lvl1_trigger_menu )
-
-
-
-#----------------------------------
 # Install files from the package:
 atlas_install_python_modules( python/*.py
                               python/LVL1MenuConfig
                               python/L1
                               python/HLTMenuConfig
-			      POST_BUILD_CMD ${ATLAS_FLAKE8})
-atlas_install_joboptions( share/*.py )
-
-atlas_install_scripts( scripts/generateMenuMT.py )
-atlas_install_scripts( scripts/generateL1MenuMT.sh )
-atlas_install_scripts( scripts/generateLVL1MenuMT.py )
-atlas_install_scripts( scripts/generateL1TopoMenuMT.py )
-atlas_install_scripts( scripts/test_HLTmenu.sh )
-atlas_install_scripts( scripts/generateL1MenuRun3.py )
-atlas_install_scripts( scripts/verify_menu_config.py )
-
-atlas_install_xmls( data/*.dtd data/*.xml )
-
-atlas_add_test( generateMenuMT_newJO SCRIPT python -m TriggerMenuMT.HLTMenuConfig.Menu.LS2_v1_newJO
-                PROPERTIES TIMEOUT 500 
-              )
-
-atlas_add_test( ViewCFTest     SCRIPT python -m unittest -v TriggerMenuMT.HLTMenuConfig.Test.ViewCFTest POST_EXEC_SCRIPT nopost.sh )
-
-atlas_add_test( generateMenuMT SCRIPT bash test_HLTmenu.sh
-                PROPERTIES TIMEOUT 4000 
-              )
-
-#----------------------------------
-# List of menus to be created:
-atlas_build_lvl1_trigger_menu( LS2_v1 )
-atlas_build_lvl1_trigger_menu( Physics_pp_run3_v1 )
-atlas_build_lvl1_trigger_menu( PhysicsP1_pp_run3_v1 )
-atlas_build_lvl1_trigger_menu( MC_pp_run3_v1 )
-atlas_build_lvl1_trigger_menu( Cosmic_run3_v1 )
-atlas_build_lvl1_trigger_menu( PhysicsP1_HI_run3_v1 )
-atlas_build_lvl1_trigger_menu( Dev_HI_run3_v1 )
+		                      POST_BUILD_CMD ${ATLAS_FLAKE8})
 
+atlas_install_scripts( scripts/generateMenuMT.py
+                       scripts/generateLVL1MenuMT.py
+                       scripts/generateL1TopoMenuMT.py
+                       scripts/generateL1MenuRun3.py
+                       scripts/verify_menu_config.py
+                       POST_BUILD_CMD ${ATLAS_FLAKE8} )
 
+atlas_install_scripts( scripts/generateL1MenuMT.sh )
+atlas_install_xmls( data/*.xml )
 
+# Tests in the package:
+atlas_add_test( flake8
+                SCRIPT flake8 --select=ATL,F,E7,E9,W6,E101 --enable-extension=ATL900,ATL901,ATL902
+                ${CMAKE_CURRENT_SOURCE_DIR}/python ${CMAKE_CURRENT_SOURCE_DIR}/scripts
+                POST_EXEC_SCRIPT nopost.sh )
+
+atlas_add_test( ViewCFTest
+                SCRIPT python -m unittest -v TriggerMenuMT.HLTMenuConfig.Test.ViewCFTest
+                POST_EXEC_SCRIPT nopost.sh )
+
+atlas_add_test( generateMenuMT_newJO
+                SCRIPT python -m TriggerMenuMT.HLTMenuConfig.Menu.LS2_v1_newJO
+                PROPERTIES TIMEOUT 500 )
+
+atlas_add_test( generateMenuMT
+                SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/scripts/test_HLTmenu.sh
+                PROPERTIES TIMEOUT 4000 )
+
+# Test L1 trigger menus:
+function( atlas_test_lvl1_trigger_menu menu )
+   atlas_add_test( "L1_${menu}"
+                   SCRIPT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/generateL1MenuMT.sh
+                   -r ${CMAKE_PROJECT_VERSION} ${menu} ${CMAKE_CURRENT_BINARY_DIR}/Menus/${menu} )
+endfunction()
+
+atlas_test_lvl1_trigger_menu( LS2_v1 )
+atlas_test_lvl1_trigger_menu( Physics_pp_run3_v1 )
+atlas_test_lvl1_trigger_menu( PhysicsP1_pp_run3_v1 )
+atlas_test_lvl1_trigger_menu( MC_pp_run3_v1 )
+atlas_test_lvl1_trigger_menu( Cosmic_run3_v1 )
+atlas_test_lvl1_trigger_menu( PhysicsP1_HI_run3_v1 )
+atlas_test_lvl1_trigger_menu( Dev_HI_run3_v1 )
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/scripts/menu_config_tests.py b/Trigger/TriggerCommon/TriggerMenuMT/python/menu_config_tests.py
similarity index 100%
rename from Trigger/TriggerCommon/TriggerMenuMT/scripts/menu_config_tests.py
rename to Trigger/TriggerCommon/TriggerMenuMT/python/menu_config_tests.py
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/scripts/generateL1MenuMT.sh b/Trigger/TriggerCommon/TriggerMenuMT/scripts/generateL1MenuMT.sh
index 705824041c53a6ec3ae836f27e525773fd6e3757..41b3b9679a7053f90602f43ac15debced29c85dd 100755
--- a/Trigger/TriggerCommon/TriggerMenuMT/scripts/generateL1MenuMT.sh
+++ b/Trigger/TriggerCommon/TriggerMenuMT/scripts/generateL1MenuMT.sh
@@ -36,6 +36,8 @@ menu=$1
 dest=$2
 if [ -z "$dest" ]; then
     dest=$PWD
+else
+    mkdir -p $dest
 fi
 
 # Get absolute path name
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/scripts/generateMenuMT.py b/Trigger/TriggerCommon/TriggerMenuMT/scripts/generateMenuMT.py
deleted file mode 100644
index c98b0ae0c8cec78fb52f3ff326cd241d834dabbe..0000000000000000000000000000000000000000
--- a/Trigger/TriggerCommon/TriggerMenuMT/scripts/generateMenuMT.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-
-# import flags
-doWriteRDOTrigger = False
-doWriteBS = False
-include("TriggerJobOpts/runHLT_standalone.py")  # noqa: F821
-
-#################################
-# Configure L1Decoder
-#################################
-
-# provide a minimal menu information
-from AthenaCommon.GlobalFlags import globalflags
-from AthenaCommon.AlgSequence import AlgSequence
-topSequence = AlgSequence()
-if globalflags.InputFormat.is_bytestream():
-   from AthenaCommon.Constants import DEBUG
-   topSequence.L1Decoder.ctpUnpacker.OutputLevel=DEBUG  # noqa: ATL900
-
-
-
-# this is a temporary hack to include new test chains
-# very hacky indeed, the L1 part should be in in the GenerateMenuMT part
-
-from TriggerJobOpts.TriggerFlags import TriggerFlags
-TriggerFlags.triggerMenuSetup = "LS2_v1"
-
-from TriggerMenuMT.HLTMenuConfig.Menu.GenerateMenuMT import GenerateMenuMT
-g = GenerateMenuMT()
-
-
-
-
-
-##########################################
-# Menu and CF construction
-##########################################
-g.generateMT()
-
-
-
-
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/scripts/testMenuMT.sh b/Trigger/TriggerCommon/TriggerMenuMT/scripts/testMenuMT.sh
deleted file mode 100755
index c26ea2bbdf29e7c550167f8ee7616260378954c6..0000000000000000000000000000000000000000
--- a/Trigger/TriggerCommon/TriggerMenuMT/scripts/testMenuMT.sh
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/usr/bin/env sh
-
-help() {
-    echo "Syntax: testMenuMT.sh [-r VERSION] MENU [DEST]"
-}
-
-if [ $# -lt 1 ]; then
-    help
-    exit 0
-fi
-
-while true; do
-    case "$1" in
-        -r)
-            release=$2
-            shift 2
-            ;;
-        -h)
-            help
-            exit 0
-            ;;
-        -*)
-            echo "Invalid parameter"
-            exit 1
-            ;;
-        *)
-            break
-    esac
-done
-
-menu=$1
-dest=$2
-if [ -z "$dest" ]; then
-    dest=$PWD
-fi
-
-# Get absolute path name
-dest=`cd $dest; pwd`
-
-if [ -z "$release" ]; then
-    release=${AtlasVersion}    # for interactive use
-fi
-
-# Temporary run directroy and cleanup traps in case of termination
-rundir=`mktemp -t -d tmxml.${menu}.XXXXXXXXXX`
-TRAPINT() {
-    rm -rf $rundir
-    return 130 # 128+SIGINT
-}
-TRAPTERM() {
-    rm -rf $rundir
-    return 143 # 128+SIGTERM
-}
-
-
-## menu generation starts here
-echo "generateHLTMenuMT: Building menu: ${menu} for ${release}"
-logfiletopo=topo${menu}.log
-logfilelvl1=lvl1${menu}.log
-logfilehlt=hlt${menu}.log
-cd $rundir
-
-generateLVL1MenuMT.py $menu &> $logfiletopo 
-generateL1TopoMenuMT.py $menu &> $logfilelvl1 
-generateMenuMT.py $menu &> $logfilehlt
-
-cp L1Topoconfig_*.xml ${dest}
-cp LVL1config_*.xml ${dest}
-#cp $logfilelvl1 $logfiletopo ${dest}
-
-if [[ -e outputLVL1config.xml ]]; then
-    cp outputLVL1config.xml ${dest}/LVL1config_${menu}_${release}.xml
-fi
-
-#this gives some more sensitivity to hidden problems
-grep --colour ERROR ${dest}/$logfile
-grep --colour -A 100 "Shortened traceback" ${dest}/$logfile
-
-rm -rf $rundir
-
-# Do not return real athena exit code as we want to pretend everything was fine
-#unset PYTHONDONTWRITEBYTECODE
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/scripts/test_HLTmenu.sh b/Trigger/TriggerCommon/TriggerMenuMT/scripts/test_HLTmenu.sh
index bce1f232c39ffb24e91e73423ebffe21e662e314..19dfbd9ff9c76e03c9285487972e0c42476e8324 100755
--- a/Trigger/TriggerCommon/TriggerMenuMT/scripts/test_HLTmenu.sh
+++ b/Trigger/TriggerCommon/TriggerMenuMT/scripts/test_HLTmenu.sh
@@ -2,6 +2,6 @@
 
 set -e
 
-athena --config-only=config.pkl -l DEBUG --threads=1 --skipEvents=10 --evtMax=20 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TriggerMenuMT/generateMT.py;
+athena --config-only=config.pkl -l DEBUG --threads=1 --skipEvents=10 --evtMax=20 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" -c "setMenu='LS2_v1';doWriteBS=False;from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.generateMenuDiagnostics=True" TriggerJobOpts/runHLT_standalone.py
 
 verify_menu_config.py -f $PWD || { echo "ERROR: Menu verification failed" ; exit 1; }
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/scripts/verify_menu_config.py b/Trigger/TriggerCommon/TriggerMenuMT/scripts/verify_menu_config.py
index d4e512a10bf513be1681a032f5abf4de3762bf9e..91a79a1ce3e2d89895f312990891c3641b7af5dd 100755
--- a/Trigger/TriggerCommon/TriggerMenuMT/scripts/verify_menu_config.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/scripts/verify_menu_config.py
@@ -15,7 +15,7 @@ import sys
 import argparse
 
 from AthenaCommon.Logging import logging
-from menu_config_tests import TriggerLevel, menu_tests
+from TriggerMenuMT.menu_config_tests import TriggerLevel, menu_tests
 
 log = logging.getLogger("TriggerMenuConfigTest")
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/share/generateMT.py b/Trigger/TriggerCommon/TriggerMenuMT/share/generateMT.py
deleted file mode 100755
index 9f5039fe5a8d35d0942a26ec1af5698299978df6..0000000000000000000000000000000000000000
--- a/Trigger/TriggerCommon/TriggerMenuMT/share/generateMT.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-
-setMenu             = "LS2_v1"
-doWriteRDOTrigger   = False
-doWriteBS           = False
-endJobAfterGenerate = False
-from TriggerJobOpts.TriggerFlags import TriggerFlags
-TriggerFlags.generateMenuDiagnostics = True
-include("TriggerJobOpts/runHLT_standalone.py")
-
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/share/trigermenuMT_test.py b/Trigger/TriggerCommon/TriggerMenuMT/share/trigermenuMT_test.py
deleted file mode 100644
index 9f64d82acfc6014771f18b52d797af877cf8cbff..0000000000000000000000000000000000000000
--- a/Trigger/TriggerCommon/TriggerMenuMT/share/trigermenuMT_test.py
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# Minimal example to build a trigger menu
-#
-from TriggerMenuMT.LVL1MenuConfig.TriggerConfigLVL1 import TriggerConfigLVL1            
-from TriggerMenuMT.LVL1MenuConfig.LVL1.Lvl1Flags import Lvl1Flags
-from TriggerMenuMT.LVL1MenuConfig.LVL1.Lvl1MenuItems import LVL1MenuItem
-from TriggerMenuMT.L1.Config.TriggerTypeDef import TT
-from TriggerMenuMT.LVL1MenuConfig.LVL1.Lvl1Condition import ThrCondition, Lvl1InternalTrigger
-from TriggerMenuMT.L1.Base.Logic import Logic
-
-# Define L1 menu thresholds and items
-Lvl1Flags.RemapThresholdsAsListed = True
-Lvl1Flags.thresholds = ['EM3','MU4']
-Lvl1Flags.items = ['L1_EM3','L1_MU4']
-
-l1menu = TriggerConfigLVL1( outputFile = 'l1menu.xml', 
-                            menuName = 'menutest',
-                            topoMenu = None )
-
-LVL1MenuItem.l1configForRegistration = l1menu
-
-# Register L1 menu
-bgrp = Logic(Lvl1InternalTrigger('BGRP0')) & Logic(Lvl1InternalTrigger('BGRP1'))
-
-EM3 = l1menu.registerThr('EM3','EM').addThrValue(3)
-LVL1MenuItem('L1_EM3'       ).setLogic( ThrCondition(EM3) & bgrp ).setTriggerType( TT.calo )
-
-MU4 = l1menu.registerThr('MU4','MUON').addThrValue(4)
-LVL1MenuItem('L1_MU4'       ).setLogic( ThrCondition(MU4) & bgrp ).setTriggerType( TT.muon )
-
-# Generate and write L1 menu
-l1menu.generateMenu()        
-l1menu.writeXML()
-
-
-from TriggerMenu.menu.TriggerPythonConfig import TriggerPythonConfig
-from TriggerMenu.menu.HLTObjects import HLTChain
-hltmenu = TriggerPythonConfig('hltmenu.xml')
-
-from TrigSteeringTest.TrigSteeringTestConf import PESA__dummyAlgo
-defalgo = PESA__dummyAlgo('Em3')
-hltmenu.addSequence("EM3" , defalgo, "em3" )
-
-chain = HLTChain( chain_name="HLT_e3", chain_counter="1", lower_chain_name="EM3", level = "HLT", prescale="1", pass_through="1")
-chain.addHLTSignature( "em3" ).addHLTSignature( "em3" )
-chain.addTriggerTypeBit('4')
-chain.addStreamTag('electrons', prescale='1', obeyLB="yes")
-chain.addStreamTag('IDCalibration', prescale='1', obeyLB="no", type="calibration")
-chain.addGroup("electrons")
-hltmenu.addHLTChain(chain)
-
-hltmenu.writeConfigFiles();
-
-import sys
-sys.exit(0)